jinxapi_github/v1_1_4/hyper/
mod.rs

1#![allow(non_snake_case)]
2
3use ::std::future::Future;
4use ::std::time::Duration;
5
6use ::authentic::{AuthenticationProtocol, AuthenticationProtocolConfigure, AuthenticError, WithAuthentication};
7use ::hyper::client::connect::Connect;
8
9use crate::v1_1_4::config::{Authentication, Configuration};
10
11pub enum AuthScheme {
12    None(::authentic::hyper::NoAuthentication),
13    AccessToken(::authentic::hyper::BearerAuthentication<::authentic::credential::TokenCredential>),
14    Basic(::authentic::hyper::BasicAuthentication<::authentic::credential::UsernamePasswordCredential>),
15    JWT(::authentic::hyper::BearerAuthentication<::authentic::credential::JsonWebTokenCredential>),
16}
17
18impl From<&Authentication> for AuthScheme {
19    fn from(authentication: &Authentication) -> Self {
20        match authentication {
21            Authentication::None => {
22                AuthScheme::None(::authentic::hyper::NoAuthentication::new())
23            }
24            Authentication::AccessToken(credential) => {
25                AuthScheme::AccessToken(::authentic::hyper::BearerAuthentication::new(credential.clone()).with_auth_scheme("token"))
26            }
27            Authentication::Basic(credential) => {
28                AuthScheme::Basic(::authentic::hyper::BasicAuthentication::new(credential.clone()))
29            }
30            Authentication::JWT(credential) => {
31                AuthScheme::JWT(::authentic::hyper::BearerAuthentication::new(credential.clone()))
32            }
33        }
34    }
35}
36
37impl AuthenticationProtocol for AuthScheme {
38    type Request = ::hyper::Request<::hyper::Body>;
39    type Response = ::hyper::Response<::hyper::Body>;
40    type Error = ::hyper::Error;
41
42    fn step(&self) -> Result<Option<authentic::AuthenticationStep<Self::Request>>, AuthenticError> {
43        match self {
44            AuthScheme::None(scheme) => scheme.step(),
45            AuthScheme::AccessToken(scheme) => scheme.step(),
46            AuthScheme::Basic(scheme) => scheme.step(),
47            AuthScheme::JWT(scheme) => scheme.step(),
48        }
49    }
50
51    fn respond(&mut self, response: Result<Self::Response, Self::Error>) {
52        match self {
53            AuthScheme::None(scheme) => scheme.respond(response),
54            AuthScheme::AccessToken(scheme) => scheme.respond(response),
55            AuthScheme::Basic(scheme) => scheme.respond(response),
56            AuthScheme::JWT(scheme) => scheme.respond(response),
57        }
58    }
59
60    fn has_completed(
61        &mut self,
62        response: &Self::Response,
63    ) -> Result<bool, AuthenticError> {
64        match self {
65            AuthScheme::None(scheme) => scheme.has_completed(response),
66            AuthScheme::AccessToken(scheme) => scheme.has_completed(response),
67            AuthScheme::Basic(scheme) => scheme.has_completed(response),
68            AuthScheme::JWT(scheme) => scheme.has_completed(response),
69        }
70    }
71}
72
73impl AuthenticationProtocolConfigure<http::request::Builder> for AuthScheme {
74    fn configure(
75        &self,
76        builder: http::request::Builder,
77    ) -> Result<http::request::Builder, AuthenticError> {
78        match self {
79            AuthScheme::None(scheme) => scheme.configure(builder),
80            AuthScheme::AccessToken(scheme) => scheme.configure(builder),
81            AuthScheme::Basic(scheme) => scheme.configure(builder),
82            AuthScheme::JWT(scheme) => scheme.configure(builder),
83        }
84    }
85}
86
87pub struct Caller<Connector, Sleep, SleepFut, SleepOut>
88where
89    Connector: Connect + Clone + Sync + Send + 'static,
90    Sleep: Fn(Duration) -> SleepFut,
91    SleepFut: Future<Output = SleepOut>
92{
93    client: ::hyper::client::Client<Connector>,
94    config: Configuration,
95    sleep: Sleep
96}
97
98impl<Connector, Sleep, SleepFut, SleepOut> Caller<Connector, Sleep, SleepFut, SleepOut>
99where
100    Connector: Connect + Clone + Sync + Send + 'static,
101    Sleep: Fn(Duration) -> SleepFut,
102    SleepFut: Future<Output = SleepOut>
103{
104    pub fn new(
105        client: ::hyper::client::Client<Connector>,
106        config: Configuration,
107        sleep: Sleep,
108    ) -> Caller<Connector, Sleep, SleepFut, SleepOut> {
109        Caller {
110            client,
111            config,
112            sleep,
113        }
114    }
115
116    /// GitHub API Root
117    /// 
118    /// Get Hypermedia links to resources accessible in GitHub's REST API
119    /// 
120    /// [API method documentation](https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint)
121    pub async fn meta_root(
122        &self,
123    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
124        let mut theScheme = AuthScheme::from(&self.config.authentication);
125
126        while let Some(auth_step) = theScheme.step()? {
127            match auth_step {
128                ::authentic::AuthenticationStep::Request(auth_request) => {
129                    theScheme.respond(self.client.request(auth_request).await);
130                }
131                ::authentic::AuthenticationStep::WaitFor(duration) => {
132                    (self.sleep)(duration).await;
133                }
134            }
135        }
136        let theBuilder = crate::v1_1_4::request::meta_root::http_builder(
137            self.config.base_url.as_ref(),
138            self.config.user_agent.as_ref(),
139            self.config.accept.as_deref(),
140        )?
141        .with_authentication(&theScheme)?;
142
143        let theRequest =
144            crate::v1_1_4::request::meta_root::hyper_request(theBuilder)?;
145
146        ::log::debug!("HTTP request: {:?}", &theRequest);
147
148        let theResponse = self.client.request(theRequest).await?;
149
150        ::log::debug!("HTTP response: {:?}", &theResponse);
151
152        Ok(theResponse)
153    }
154
155    /// Get the authenticated app
156    /// 
157    /// Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint.
158    /// 
159    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
160    /// 
161    /// [API method documentation](https://docs.github.com/rest/reference/apps#get-the-authenticated-app)
162    pub async fn apps_get_authenticated(
163        &self,
164    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
165        let mut theScheme = AuthScheme::from(&self.config.authentication);
166
167        while let Some(auth_step) = theScheme.step()? {
168            match auth_step {
169                ::authentic::AuthenticationStep::Request(auth_request) => {
170                    theScheme.respond(self.client.request(auth_request).await);
171                }
172                ::authentic::AuthenticationStep::WaitFor(duration) => {
173                    (self.sleep)(duration).await;
174                }
175            }
176        }
177        let theBuilder = crate::v1_1_4::request::apps_get_authenticated::http_builder(
178            self.config.base_url.as_ref(),
179            self.config.user_agent.as_ref(),
180            self.config.accept.as_deref(),
181        )?
182        .with_authentication(&theScheme)?;
183
184        let theRequest =
185            crate::v1_1_4::request::apps_get_authenticated::hyper_request(theBuilder)?;
186
187        ::log::debug!("HTTP request: {:?}", &theRequest);
188
189        let theResponse = self.client.request(theRequest).await?;
190
191        ::log::debug!("HTTP response: {:?}", &theResponse);
192
193        Ok(theResponse)
194    }
195
196    /// Create a GitHub App from a manifest
197    /// 
198    /// Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`.
199    /// 
200    /// [API method documentation](https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest)
201    pub async fn apps_create_from_manifest(
202        &self,
203        code: &str,
204    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
205        let mut theScheme = AuthScheme::from(&self.config.authentication);
206
207        while let Some(auth_step) = theScheme.step()? {
208            match auth_step {
209                ::authentic::AuthenticationStep::Request(auth_request) => {
210                    theScheme.respond(self.client.request(auth_request).await);
211                }
212                ::authentic::AuthenticationStep::WaitFor(duration) => {
213                    (self.sleep)(duration).await;
214                }
215            }
216        }
217        let theBuilder = crate::v1_1_4::request::apps_create_from_manifest::http_builder(
218            self.config.base_url.as_ref(),
219            code,
220            self.config.user_agent.as_ref(),
221            self.config.accept.as_deref(),
222        )?
223        .with_authentication(&theScheme)?;
224
225        let theRequest =
226            crate::v1_1_4::request::apps_create_from_manifest::hyper_request(theBuilder)?;
227
228        ::log::debug!("HTTP request: {:?}", &theRequest);
229
230        let theResponse = self.client.request(theRequest).await?;
231
232        ::log::debug!("HTTP response: {:?}", &theResponse);
233
234        Ok(theResponse)
235    }
236
237    /// Get a webhook configuration for an app
238    /// 
239    /// Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."
240    /// 
241    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
242    /// 
243    /// [API method documentation](https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app)
244    pub async fn apps_get_webhook_config_for_app(
245        &self,
246    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
247        let mut theScheme = AuthScheme::from(&self.config.authentication);
248
249        while let Some(auth_step) = theScheme.step()? {
250            match auth_step {
251                ::authentic::AuthenticationStep::Request(auth_request) => {
252                    theScheme.respond(self.client.request(auth_request).await);
253                }
254                ::authentic::AuthenticationStep::WaitFor(duration) => {
255                    (self.sleep)(duration).await;
256                }
257            }
258        }
259        let theBuilder = crate::v1_1_4::request::apps_get_webhook_config_for_app::http_builder(
260            self.config.base_url.as_ref(),
261            self.config.user_agent.as_ref(),
262            self.config.accept.as_deref(),
263        )?
264        .with_authentication(&theScheme)?;
265
266        let theRequest =
267            crate::v1_1_4::request::apps_get_webhook_config_for_app::hyper_request(theBuilder)?;
268
269        ::log::debug!("HTTP request: {:?}", &theRequest);
270
271        let theResponse = self.client.request(theRequest).await?;
272
273        ::log::debug!("HTTP response: {:?}", &theResponse);
274
275        Ok(theResponse)
276    }
277
278    /// Update a webhook configuration for an app
279    /// 
280    /// Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."
281    /// 
282    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
283    /// 
284    /// [API method documentation](https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app)
285    ///
286    /// # Content
287    ///
288    /// - [`&v1_1_4::request::apps_update_webhook_config_for_app::body::Json`](crate::v1_1_4::request::apps_update_webhook_config_for_app::body::Json)
289    pub async fn apps_update_webhook_config_for_app<Content>(
290        &self,
291        theContent: Content,
292    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
293    where
294        Content: Copy + TryInto<crate::v1_1_4::request::apps_update_webhook_config_for_app::Content<::hyper::Body>>,
295        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::apps_update_webhook_config_for_app::Content<::hyper::Body>>>::Error>
296    {
297        let mut theScheme = AuthScheme::from(&self.config.authentication);
298
299        while let Some(auth_step) = theScheme.step()? {
300            match auth_step {
301                ::authentic::AuthenticationStep::Request(auth_request) => {
302                    theScheme.respond(self.client.request(auth_request).await);
303                }
304                ::authentic::AuthenticationStep::WaitFor(duration) => {
305                    (self.sleep)(duration).await;
306                }
307            }
308        }
309        let theBuilder = crate::v1_1_4::request::apps_update_webhook_config_for_app::http_builder(
310            self.config.base_url.as_ref(),
311            self.config.user_agent.as_ref(),
312            self.config.accept.as_deref(),
313        )?
314        .with_authentication(&theScheme)?;
315
316        let theRequest = crate::v1_1_4::request::apps_update_webhook_config_for_app::hyper_request(
317            theBuilder,
318            theContent.try_into()?,
319        )?;
320
321        ::log::debug!("HTTP request: {:?}", &theRequest);
322
323        let theResponse = self.client.request(theRequest).await?;
324
325        ::log::debug!("HTTP response: {:?}", &theResponse);
326
327        Ok(theResponse)
328    }
329
330    /// List deliveries for an app webhook
331    /// 
332    /// Returns a list of webhook deliveries for the webhook configured for a GitHub App.
333    /// 
334    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
335    /// 
336    /// [API method documentation](https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook)
337    pub async fn apps_list_webhook_deliveries(
338        &self,
339        per_page: ::std::option::Option<i64>,
340        cursor: ::std::option::Option<&str>,
341    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
342        let mut theScheme = AuthScheme::from(&self.config.authentication);
343
344        while let Some(auth_step) = theScheme.step()? {
345            match auth_step {
346                ::authentic::AuthenticationStep::Request(auth_request) => {
347                    theScheme.respond(self.client.request(auth_request).await);
348                }
349                ::authentic::AuthenticationStep::WaitFor(duration) => {
350                    (self.sleep)(duration).await;
351                }
352            }
353        }
354        let theBuilder = crate::v1_1_4::request::apps_list_webhook_deliveries::http_builder(
355            self.config.base_url.as_ref(),
356            per_page,
357            cursor,
358            self.config.user_agent.as_ref(),
359            self.config.accept.as_deref(),
360        )?
361        .with_authentication(&theScheme)?;
362
363        let theRequest =
364            crate::v1_1_4::request::apps_list_webhook_deliveries::hyper_request(theBuilder)?;
365
366        ::log::debug!("HTTP request: {:?}", &theRequest);
367
368        let theResponse = self.client.request(theRequest).await?;
369
370        ::log::debug!("HTTP response: {:?}", &theResponse);
371
372        Ok(theResponse)
373    }
374
375    /// Get a delivery for an app webhook
376    /// 
377    /// Returns a delivery for the webhook configured for a GitHub App.
378    /// 
379    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
380    /// 
381    /// [API method documentation](https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook)
382    pub async fn apps_get_webhook_delivery(
383        &self,
384        delivery_id: i64,
385    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
386        let mut theScheme = AuthScheme::from(&self.config.authentication);
387
388        while let Some(auth_step) = theScheme.step()? {
389            match auth_step {
390                ::authentic::AuthenticationStep::Request(auth_request) => {
391                    theScheme.respond(self.client.request(auth_request).await);
392                }
393                ::authentic::AuthenticationStep::WaitFor(duration) => {
394                    (self.sleep)(duration).await;
395                }
396            }
397        }
398        let theBuilder = crate::v1_1_4::request::apps_get_webhook_delivery::http_builder(
399            self.config.base_url.as_ref(),
400            delivery_id,
401            self.config.user_agent.as_ref(),
402            self.config.accept.as_deref(),
403        )?
404        .with_authentication(&theScheme)?;
405
406        let theRequest =
407            crate::v1_1_4::request::apps_get_webhook_delivery::hyper_request(theBuilder)?;
408
409        ::log::debug!("HTTP request: {:?}", &theRequest);
410
411        let theResponse = self.client.request(theRequest).await?;
412
413        ::log::debug!("HTTP response: {:?}", &theResponse);
414
415        Ok(theResponse)
416    }
417
418    /// Redeliver a delivery for an app webhook
419    /// 
420    /// Redeliver a delivery for the webhook configured for a GitHub App.
421    /// 
422    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
423    /// 
424    /// [API method documentation](https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook)
425    pub async fn apps_redeliver_webhook_delivery(
426        &self,
427        delivery_id: i64,
428    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
429        let mut theScheme = AuthScheme::from(&self.config.authentication);
430
431        while let Some(auth_step) = theScheme.step()? {
432            match auth_step {
433                ::authentic::AuthenticationStep::Request(auth_request) => {
434                    theScheme.respond(self.client.request(auth_request).await);
435                }
436                ::authentic::AuthenticationStep::WaitFor(duration) => {
437                    (self.sleep)(duration).await;
438                }
439            }
440        }
441        let theBuilder = crate::v1_1_4::request::apps_redeliver_webhook_delivery::http_builder(
442            self.config.base_url.as_ref(),
443            delivery_id,
444            self.config.user_agent.as_ref(),
445            self.config.accept.as_deref(),
446        )?
447        .with_authentication(&theScheme)?;
448
449        let theRequest =
450            crate::v1_1_4::request::apps_redeliver_webhook_delivery::hyper_request(theBuilder)?;
451
452        ::log::debug!("HTTP request: {:?}", &theRequest);
453
454        let theResponse = self.client.request(theRequest).await?;
455
456        ::log::debug!("HTTP response: {:?}", &theResponse);
457
458        Ok(theResponse)
459    }
460
461    /// List installations for the authenticated app
462    /// 
463    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
464    /// 
465    /// The permissions the installation has are included under the `permissions` key.
466    /// 
467    /// [API method documentation](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)
468    pub async fn apps_list_installations(
469        &self,
470        per_page: ::std::option::Option<i64>,
471        page: ::std::option::Option<i64>,
472        since: ::std::option::Option<&str>,
473        outdated: ::std::option::Option<&str>,
474    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
475        let mut theScheme = AuthScheme::from(&self.config.authentication);
476
477        while let Some(auth_step) = theScheme.step()? {
478            match auth_step {
479                ::authentic::AuthenticationStep::Request(auth_request) => {
480                    theScheme.respond(self.client.request(auth_request).await);
481                }
482                ::authentic::AuthenticationStep::WaitFor(duration) => {
483                    (self.sleep)(duration).await;
484                }
485            }
486        }
487        let theBuilder = crate::v1_1_4::request::apps_list_installations::http_builder(
488            self.config.base_url.as_ref(),
489            per_page,
490            page,
491            since,
492            outdated,
493            self.config.user_agent.as_ref(),
494            self.config.accept.as_deref(),
495        )?
496        .with_authentication(&theScheme)?;
497
498        let theRequest =
499            crate::v1_1_4::request::apps_list_installations::hyper_request(theBuilder)?;
500
501        ::log::debug!("HTTP request: {:?}", &theRequest);
502
503        let theResponse = self.client.request(theRequest).await?;
504
505        ::log::debug!("HTTP response: {:?}", &theResponse);
506
507        Ok(theResponse)
508    }
509
510    /// Get an installation for the authenticated app
511    /// 
512    /// Enables an authenticated GitHub App to find an installation's information using the installation id.
513    /// 
514    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
515    /// 
516    /// [API method documentation](https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app)
517    pub async fn apps_get_installation(
518        &self,
519        installation_id: i64,
520    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
521        let mut theScheme = AuthScheme::from(&self.config.authentication);
522
523        while let Some(auth_step) = theScheme.step()? {
524            match auth_step {
525                ::authentic::AuthenticationStep::Request(auth_request) => {
526                    theScheme.respond(self.client.request(auth_request).await);
527                }
528                ::authentic::AuthenticationStep::WaitFor(duration) => {
529                    (self.sleep)(duration).await;
530                }
531            }
532        }
533        let theBuilder = crate::v1_1_4::request::apps_get_installation::http_builder(
534            self.config.base_url.as_ref(),
535            installation_id,
536            self.config.user_agent.as_ref(),
537            self.config.accept.as_deref(),
538        )?
539        .with_authentication(&theScheme)?;
540
541        let theRequest =
542            crate::v1_1_4::request::apps_get_installation::hyper_request(theBuilder)?;
543
544        ::log::debug!("HTTP request: {:?}", &theRequest);
545
546        let theResponse = self.client.request(theRequest).await?;
547
548        ::log::debug!("HTTP response: {:?}", &theResponse);
549
550        Ok(theResponse)
551    }
552
553    /// Delete an installation for the authenticated app
554    /// 
555    /// Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint.
556    /// 
557    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
558    /// 
559    /// [API method documentation](https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app)
560    pub async fn apps_delete_installation(
561        &self,
562        installation_id: i64,
563    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
564        let mut theScheme = AuthScheme::from(&self.config.authentication);
565
566        while let Some(auth_step) = theScheme.step()? {
567            match auth_step {
568                ::authentic::AuthenticationStep::Request(auth_request) => {
569                    theScheme.respond(self.client.request(auth_request).await);
570                }
571                ::authentic::AuthenticationStep::WaitFor(duration) => {
572                    (self.sleep)(duration).await;
573                }
574            }
575        }
576        let theBuilder = crate::v1_1_4::request::apps_delete_installation::http_builder(
577            self.config.base_url.as_ref(),
578            installation_id,
579            self.config.user_agent.as_ref(),
580            self.config.accept.as_deref(),
581        )?
582        .with_authentication(&theScheme)?;
583
584        let theRequest =
585            crate::v1_1_4::request::apps_delete_installation::hyper_request(theBuilder)?;
586
587        ::log::debug!("HTTP request: {:?}", &theRequest);
588
589        let theResponse = self.client.request(theRequest).await?;
590
591        ::log::debug!("HTTP response: {:?}", &theResponse);
592
593        Ok(theResponse)
594    }
595
596    /// Create an installation access token for an app
597    /// 
598    /// 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. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key.
599    /// 
600    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
601    /// 
602    /// [API method documentation](https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app)
603    ///
604    /// # Content
605    ///
606    /// - [`&v1_1_4::request::apps_create_installation_access_token::body::Json`](crate::v1_1_4::request::apps_create_installation_access_token::body::Json)
607    pub async fn apps_create_installation_access_token<Content>(
608        &self,
609        installation_id: i64,
610        theContent: Content,
611    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
612    where
613        Content: Copy + TryInto<crate::v1_1_4::request::apps_create_installation_access_token::Content<::hyper::Body>>,
614        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::apps_create_installation_access_token::Content<::hyper::Body>>>::Error>
615    {
616        let mut theScheme = AuthScheme::from(&self.config.authentication);
617
618        while let Some(auth_step) = theScheme.step()? {
619            match auth_step {
620                ::authentic::AuthenticationStep::Request(auth_request) => {
621                    theScheme.respond(self.client.request(auth_request).await);
622                }
623                ::authentic::AuthenticationStep::WaitFor(duration) => {
624                    (self.sleep)(duration).await;
625                }
626            }
627        }
628        let theBuilder = crate::v1_1_4::request::apps_create_installation_access_token::http_builder(
629            self.config.base_url.as_ref(),
630            installation_id,
631            self.config.user_agent.as_ref(),
632            self.config.accept.as_deref(),
633        )?
634        .with_authentication(&theScheme)?;
635
636        let theRequest = crate::v1_1_4::request::apps_create_installation_access_token::hyper_request(
637            theBuilder,
638            theContent.try_into()?,
639        )?;
640
641        ::log::debug!("HTTP request: {:?}", &theRequest);
642
643        let theResponse = self.client.request(theRequest).await?;
644
645        ::log::debug!("HTTP response: {:?}", &theResponse);
646
647        Ok(theResponse)
648    }
649
650    /// Suspend an app installation
651    /// 
652    /// Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.
653    /// 
654    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
655    /// 
656    /// [API method documentation](https://docs.github.com/rest/reference/apps#suspend-an-app-installation)
657    pub async fn apps_suspend_installation(
658        &self,
659        installation_id: i64,
660    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
661        let mut theScheme = AuthScheme::from(&self.config.authentication);
662
663        while let Some(auth_step) = theScheme.step()? {
664            match auth_step {
665                ::authentic::AuthenticationStep::Request(auth_request) => {
666                    theScheme.respond(self.client.request(auth_request).await);
667                }
668                ::authentic::AuthenticationStep::WaitFor(duration) => {
669                    (self.sleep)(duration).await;
670                }
671            }
672        }
673        let theBuilder = crate::v1_1_4::request::apps_suspend_installation::http_builder(
674            self.config.base_url.as_ref(),
675            installation_id,
676            self.config.user_agent.as_ref(),
677            self.config.accept.as_deref(),
678        )?
679        .with_authentication(&theScheme)?;
680
681        let theRequest =
682            crate::v1_1_4::request::apps_suspend_installation::hyper_request(theBuilder)?;
683
684        ::log::debug!("HTTP request: {:?}", &theRequest);
685
686        let theResponse = self.client.request(theRequest).await?;
687
688        ::log::debug!("HTTP response: {:?}", &theResponse);
689
690        Ok(theResponse)
691    }
692
693    /// Unsuspend an app installation
694    /// 
695    /// Removes a GitHub App installation suspension.
696    /// 
697    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
698    /// 
699    /// [API method documentation](https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation)
700    pub async fn apps_unsuspend_installation(
701        &self,
702        installation_id: i64,
703    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
704        let mut theScheme = AuthScheme::from(&self.config.authentication);
705
706        while let Some(auth_step) = theScheme.step()? {
707            match auth_step {
708                ::authentic::AuthenticationStep::Request(auth_request) => {
709                    theScheme.respond(self.client.request(auth_request).await);
710                }
711                ::authentic::AuthenticationStep::WaitFor(duration) => {
712                    (self.sleep)(duration).await;
713                }
714            }
715        }
716        let theBuilder = crate::v1_1_4::request::apps_unsuspend_installation::http_builder(
717            self.config.base_url.as_ref(),
718            installation_id,
719            self.config.user_agent.as_ref(),
720            self.config.accept.as_deref(),
721        )?
722        .with_authentication(&theScheme)?;
723
724        let theRequest =
725            crate::v1_1_4::request::apps_unsuspend_installation::hyper_request(theBuilder)?;
726
727        ::log::debug!("HTTP request: {:?}", &theRequest);
728
729        let theResponse = self.client.request(theRequest).await?;
730
731        ::log::debug!("HTTP response: {:?}", &theResponse);
732
733        Ok(theResponse)
734    }
735
736    /// List your grants
737    /// 
738    /// **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
739    /// 
740    /// You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`.
741    /// 
742    /// [API method documentation](https://docs.github.com/rest/reference/oauth-authorizations#list-your-grants)
743    pub async fn oauth_authorizations_list_grants(
744        &self,
745        per_page: ::std::option::Option<i64>,
746        page: ::std::option::Option<i64>,
747        client_id: ::std::option::Option<&str>,
748    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
749        let mut theScheme = AuthScheme::from(&self.config.authentication);
750
751        while let Some(auth_step) = theScheme.step()? {
752            match auth_step {
753                ::authentic::AuthenticationStep::Request(auth_request) => {
754                    theScheme.respond(self.client.request(auth_request).await);
755                }
756                ::authentic::AuthenticationStep::WaitFor(duration) => {
757                    (self.sleep)(duration).await;
758                }
759            }
760        }
761        let theBuilder = crate::v1_1_4::request::oauth_authorizations_list_grants::http_builder(
762            self.config.base_url.as_ref(),
763            per_page,
764            page,
765            client_id,
766            self.config.user_agent.as_ref(),
767            self.config.accept.as_deref(),
768        )?
769        .with_authentication(&theScheme)?;
770
771        let theRequest =
772            crate::v1_1_4::request::oauth_authorizations_list_grants::hyper_request(theBuilder)?;
773
774        ::log::debug!("HTTP request: {:?}", &theRequest);
775
776        let theResponse = self.client.request(theRequest).await?;
777
778        ::log::debug!("HTTP response: {:?}", &theResponse);
779
780        Ok(theResponse)
781    }
782
783    /// Get a single grant
784    /// 
785    /// **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
786    /// 
787    /// [API method documentation](https://docs.github.com/rest/reference/oauth-authorizations#get-a-single-grant)
788    pub async fn oauth_authorizations_get_grant(
789        &self,
790        grant_id: i64,
791    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
792        let mut theScheme = AuthScheme::from(&self.config.authentication);
793
794        while let Some(auth_step) = theScheme.step()? {
795            match auth_step {
796                ::authentic::AuthenticationStep::Request(auth_request) => {
797                    theScheme.respond(self.client.request(auth_request).await);
798                }
799                ::authentic::AuthenticationStep::WaitFor(duration) => {
800                    (self.sleep)(duration).await;
801                }
802            }
803        }
804        let theBuilder = crate::v1_1_4::request::oauth_authorizations_get_grant::http_builder(
805            self.config.base_url.as_ref(),
806            grant_id,
807            self.config.user_agent.as_ref(),
808            self.config.accept.as_deref(),
809        )?
810        .with_authentication(&theScheme)?;
811
812        let theRequest =
813            crate::v1_1_4::request::oauth_authorizations_get_grant::hyper_request(theBuilder)?;
814
815        ::log::debug!("HTTP request: {:?}", &theRequest);
816
817        let theResponse = self.client.request(theRequest).await?;
818
819        ::log::debug!("HTTP response: {:?}", &theResponse);
820
821        Ok(theResponse)
822    }
823
824    /// Delete a grant
825    /// 
826    /// **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
827    /// 
828    /// Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).
829    /// 
830    /// [API method documentation](https://docs.github.com/rest/reference/oauth-authorizations#delete-a-grant)
831    pub async fn oauth_authorizations_delete_grant(
832        &self,
833        grant_id: i64,
834    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
835        let mut theScheme = AuthScheme::from(&self.config.authentication);
836
837        while let Some(auth_step) = theScheme.step()? {
838            match auth_step {
839                ::authentic::AuthenticationStep::Request(auth_request) => {
840                    theScheme.respond(self.client.request(auth_request).await);
841                }
842                ::authentic::AuthenticationStep::WaitFor(duration) => {
843                    (self.sleep)(duration).await;
844                }
845            }
846        }
847        let theBuilder = crate::v1_1_4::request::oauth_authorizations_delete_grant::http_builder(
848            self.config.base_url.as_ref(),
849            grant_id,
850            self.config.user_agent.as_ref(),
851            self.config.accept.as_deref(),
852        )?
853        .with_authentication(&theScheme)?;
854
855        let theRequest =
856            crate::v1_1_4::request::oauth_authorizations_delete_grant::hyper_request(theBuilder)?;
857
858        ::log::debug!("HTTP request: {:?}", &theRequest);
859
860        let theResponse = self.client.request(theRequest).await?;
861
862        ::log::debug!("HTTP response: {:?}", &theResponse);
863
864        Ok(theResponse)
865    }
866
867    /// Delete an app authorization
868    /// 
869    /// OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.
870    /// Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).
871    /// 
872    /// [API method documentation](https://docs.github.com/rest/reference/apps#delete-an-app-authorization)
873    ///
874    /// # Content
875    ///
876    /// - [`&v1_1_4::request::apps_delete_authorization::body::Json`](crate::v1_1_4::request::apps_delete_authorization::body::Json)
877    pub async fn apps_delete_authorization<Content>(
878        &self,
879        client_id: &str,
880        theContent: Content,
881    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
882    where
883        Content: Copy + TryInto<crate::v1_1_4::request::apps_delete_authorization::Content<::hyper::Body>>,
884        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::apps_delete_authorization::Content<::hyper::Body>>>::Error>
885    {
886        let mut theScheme = AuthScheme::from(&self.config.authentication);
887
888        while let Some(auth_step) = theScheme.step()? {
889            match auth_step {
890                ::authentic::AuthenticationStep::Request(auth_request) => {
891                    theScheme.respond(self.client.request(auth_request).await);
892                }
893                ::authentic::AuthenticationStep::WaitFor(duration) => {
894                    (self.sleep)(duration).await;
895                }
896            }
897        }
898        let theBuilder = crate::v1_1_4::request::apps_delete_authorization::http_builder(
899            self.config.base_url.as_ref(),
900            client_id,
901            self.config.user_agent.as_ref(),
902            self.config.accept.as_deref(),
903        )?
904        .with_authentication(&theScheme)?;
905
906        let theRequest = crate::v1_1_4::request::apps_delete_authorization::hyper_request(
907            theBuilder,
908            theContent.try_into()?,
909        )?;
910
911        ::log::debug!("HTTP request: {:?}", &theRequest);
912
913        let theResponse = self.client.request(theRequest).await?;
914
915        ::log::debug!("HTTP response: {:?}", &theResponse);
916
917        Ok(theResponse)
918    }
919
920    /// Check a token
921    /// 
922    /// OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`.
923    /// 
924    /// [API method documentation](https://docs.github.com/rest/reference/apps#check-a-token)
925    ///
926    /// # Content
927    ///
928    /// - [`&v1_1_4::request::apps_check_token::body::Json`](crate::v1_1_4::request::apps_check_token::body::Json)
929    pub async fn apps_check_token<Content>(
930        &self,
931        client_id: &str,
932        theContent: Content,
933    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
934    where
935        Content: Copy + TryInto<crate::v1_1_4::request::apps_check_token::Content<::hyper::Body>>,
936        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::apps_check_token::Content<::hyper::Body>>>::Error>
937    {
938        let mut theScheme = AuthScheme::from(&self.config.authentication);
939
940        while let Some(auth_step) = theScheme.step()? {
941            match auth_step {
942                ::authentic::AuthenticationStep::Request(auth_request) => {
943                    theScheme.respond(self.client.request(auth_request).await);
944                }
945                ::authentic::AuthenticationStep::WaitFor(duration) => {
946                    (self.sleep)(duration).await;
947                }
948            }
949        }
950        let theBuilder = crate::v1_1_4::request::apps_check_token::http_builder(
951            self.config.base_url.as_ref(),
952            client_id,
953            self.config.user_agent.as_ref(),
954            self.config.accept.as_deref(),
955        )?
956        .with_authentication(&theScheme)?;
957
958        let theRequest = crate::v1_1_4::request::apps_check_token::hyper_request(
959            theBuilder,
960            theContent.try_into()?,
961        )?;
962
963        ::log::debug!("HTTP request: {:?}", &theRequest);
964
965        let theResponse = self.client.request(theRequest).await?;
966
967        ::log::debug!("HTTP response: {:?}", &theResponse);
968
969        Ok(theResponse)
970    }
971
972    /// Delete an app token
973    /// 
974    /// OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password.
975    /// 
976    /// [API method documentation](https://docs.github.com/rest/reference/apps#delete-an-app-token)
977    ///
978    /// # Content
979    ///
980    /// - [`&v1_1_4::request::apps_delete_token::body::Json`](crate::v1_1_4::request::apps_delete_token::body::Json)
981    pub async fn apps_delete_token<Content>(
982        &self,
983        client_id: &str,
984        theContent: Content,
985    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
986    where
987        Content: Copy + TryInto<crate::v1_1_4::request::apps_delete_token::Content<::hyper::Body>>,
988        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::apps_delete_token::Content<::hyper::Body>>>::Error>
989    {
990        let mut theScheme = AuthScheme::from(&self.config.authentication);
991
992        while let Some(auth_step) = theScheme.step()? {
993            match auth_step {
994                ::authentic::AuthenticationStep::Request(auth_request) => {
995                    theScheme.respond(self.client.request(auth_request).await);
996                }
997                ::authentic::AuthenticationStep::WaitFor(duration) => {
998                    (self.sleep)(duration).await;
999                }
1000            }
1001        }
1002        let theBuilder = crate::v1_1_4::request::apps_delete_token::http_builder(
1003            self.config.base_url.as_ref(),
1004            client_id,
1005            self.config.user_agent.as_ref(),
1006            self.config.accept.as_deref(),
1007        )?
1008        .with_authentication(&theScheme)?;
1009
1010        let theRequest = crate::v1_1_4::request::apps_delete_token::hyper_request(
1011            theBuilder,
1012            theContent.try_into()?,
1013        )?;
1014
1015        ::log::debug!("HTTP request: {:?}", &theRequest);
1016
1017        let theResponse = self.client.request(theRequest).await?;
1018
1019        ::log::debug!("HTTP response: {:?}", &theResponse);
1020
1021        Ok(theResponse)
1022    }
1023
1024    /// Reset a token
1025    /// 
1026    /// OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.
1027    /// 
1028    /// [API method documentation](https://docs.github.com/rest/reference/apps#reset-a-token)
1029    ///
1030    /// # Content
1031    ///
1032    /// - [`&v1_1_4::request::apps_reset_token::body::Json`](crate::v1_1_4::request::apps_reset_token::body::Json)
1033    pub async fn apps_reset_token<Content>(
1034        &self,
1035        client_id: &str,
1036        theContent: Content,
1037    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
1038    where
1039        Content: Copy + TryInto<crate::v1_1_4::request::apps_reset_token::Content<::hyper::Body>>,
1040        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::apps_reset_token::Content<::hyper::Body>>>::Error>
1041    {
1042        let mut theScheme = AuthScheme::from(&self.config.authentication);
1043
1044        while let Some(auth_step) = theScheme.step()? {
1045            match auth_step {
1046                ::authentic::AuthenticationStep::Request(auth_request) => {
1047                    theScheme.respond(self.client.request(auth_request).await);
1048                }
1049                ::authentic::AuthenticationStep::WaitFor(duration) => {
1050                    (self.sleep)(duration).await;
1051                }
1052            }
1053        }
1054        let theBuilder = crate::v1_1_4::request::apps_reset_token::http_builder(
1055            self.config.base_url.as_ref(),
1056            client_id,
1057            self.config.user_agent.as_ref(),
1058            self.config.accept.as_deref(),
1059        )?
1060        .with_authentication(&theScheme)?;
1061
1062        let theRequest = crate::v1_1_4::request::apps_reset_token::hyper_request(
1063            theBuilder,
1064            theContent.try_into()?,
1065        )?;
1066
1067        ::log::debug!("HTTP request: {:?}", &theRequest);
1068
1069        let theResponse = self.client.request(theRequest).await?;
1070
1071        ::log::debug!("HTTP response: {:?}", &theResponse);
1072
1073        Ok(theResponse)
1074    }
1075
1076    /// Create a scoped access token
1077    /// 
1078    /// Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`.
1079    /// 
1080    /// [API method documentation](https://docs.github.com/rest/reference/apps#create-a-scoped-access-token)
1081    ///
1082    /// # Content
1083    ///
1084    /// - [`&v1_1_4::request::apps_scope_token::body::Json`](crate::v1_1_4::request::apps_scope_token::body::Json)
1085    pub async fn apps_scope_token<Content>(
1086        &self,
1087        client_id: &str,
1088        theContent: Content,
1089    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
1090    where
1091        Content: Copy + TryInto<crate::v1_1_4::request::apps_scope_token::Content<::hyper::Body>>,
1092        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::apps_scope_token::Content<::hyper::Body>>>::Error>
1093    {
1094        let mut theScheme = AuthScheme::from(&self.config.authentication);
1095
1096        while let Some(auth_step) = theScheme.step()? {
1097            match auth_step {
1098                ::authentic::AuthenticationStep::Request(auth_request) => {
1099                    theScheme.respond(self.client.request(auth_request).await);
1100                }
1101                ::authentic::AuthenticationStep::WaitFor(duration) => {
1102                    (self.sleep)(duration).await;
1103                }
1104            }
1105        }
1106        let theBuilder = crate::v1_1_4::request::apps_scope_token::http_builder(
1107            self.config.base_url.as_ref(),
1108            client_id,
1109            self.config.user_agent.as_ref(),
1110            self.config.accept.as_deref(),
1111        )?
1112        .with_authentication(&theScheme)?;
1113
1114        let theRequest = crate::v1_1_4::request::apps_scope_token::hyper_request(
1115            theBuilder,
1116            theContent.try_into()?,
1117        )?;
1118
1119        ::log::debug!("HTTP request: {:?}", &theRequest);
1120
1121        let theResponse = self.client.request(theRequest).await?;
1122
1123        ::log::debug!("HTTP response: {:?}", &theResponse);
1124
1125        Ok(theResponse)
1126    }
1127
1128    /// Get an app
1129    /// 
1130    /// **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`).
1131    /// 
1132    /// If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
1133    /// 
1134    /// [API method documentation](https://docs.github.com/rest/reference/apps/#get-an-app)
1135    pub async fn apps_get_by_slug(
1136        &self,
1137        app_slug: &str,
1138    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
1139        let mut theScheme = AuthScheme::from(&self.config.authentication);
1140
1141        while let Some(auth_step) = theScheme.step()? {
1142            match auth_step {
1143                ::authentic::AuthenticationStep::Request(auth_request) => {
1144                    theScheme.respond(self.client.request(auth_request).await);
1145                }
1146                ::authentic::AuthenticationStep::WaitFor(duration) => {
1147                    (self.sleep)(duration).await;
1148                }
1149            }
1150        }
1151        let theBuilder = crate::v1_1_4::request::apps_get_by_slug::http_builder(
1152            self.config.base_url.as_ref(),
1153            app_slug,
1154            self.config.user_agent.as_ref(),
1155            self.config.accept.as_deref(),
1156        )?
1157        .with_authentication(&theScheme)?;
1158
1159        let theRequest =
1160            crate::v1_1_4::request::apps_get_by_slug::hyper_request(theBuilder)?;
1161
1162        ::log::debug!("HTTP request: {:?}", &theRequest);
1163
1164        let theResponse = self.client.request(theRequest).await?;
1165
1166        ::log::debug!("HTTP response: {:?}", &theResponse);
1167
1168        Ok(theResponse)
1169    }
1170
1171    /// List your authorizations
1172    /// 
1173    /// **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
1174    /// 
1175    /// [API method documentation](https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations)
1176    pub async fn oauth_authorizations_list_authorizations(
1177        &self,
1178        per_page: ::std::option::Option<i64>,
1179        page: ::std::option::Option<i64>,
1180        client_id: ::std::option::Option<&str>,
1181    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
1182        let mut theScheme = AuthScheme::from(&self.config.authentication);
1183
1184        while let Some(auth_step) = theScheme.step()? {
1185            match auth_step {
1186                ::authentic::AuthenticationStep::Request(auth_request) => {
1187                    theScheme.respond(self.client.request(auth_request).await);
1188                }
1189                ::authentic::AuthenticationStep::WaitFor(duration) => {
1190                    (self.sleep)(duration).await;
1191                }
1192            }
1193        }
1194        let theBuilder = crate::v1_1_4::request::oauth_authorizations_list_authorizations::http_builder(
1195            self.config.base_url.as_ref(),
1196            per_page,
1197            page,
1198            client_id,
1199            self.config.user_agent.as_ref(),
1200            self.config.accept.as_deref(),
1201        )?
1202        .with_authentication(&theScheme)?;
1203
1204        let theRequest =
1205            crate::v1_1_4::request::oauth_authorizations_list_authorizations::hyper_request(theBuilder)?;
1206
1207        ::log::debug!("HTTP request: {:?}", &theRequest);
1208
1209        let theResponse = self.client.request(theRequest).await?;
1210
1211        ::log::debug!("HTTP response: {:?}", &theResponse);
1212
1213        Ok(theResponse)
1214    }
1215
1216    /// Create a new authorization
1217    /// 
1218    /// **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
1219    /// 
1220    /// **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
1221    /// 
1222    /// Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
1223    /// 
1224    /// To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them.
1225    /// 
1226    /// You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use).
1227    /// 
1228    /// Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on).
1229    /// 
1230    /// [API method documentation](https://docs.github.com/rest/reference/oauth-authorizations#create-a-new-authorization)
1231    ///
1232    /// # Content
1233    ///
1234    /// - [`&v1_1_4::request::oauth_authorizations_create_authorization::body::Json`](crate::v1_1_4::request::oauth_authorizations_create_authorization::body::Json)
1235    pub async fn oauth_authorizations_create_authorization<Content>(
1236        &self,
1237        theContent: Content,
1238    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
1239    where
1240        Content: Copy + TryInto<crate::v1_1_4::request::oauth_authorizations_create_authorization::Content<::hyper::Body>>,
1241        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::oauth_authorizations_create_authorization::Content<::hyper::Body>>>::Error>
1242    {
1243        let mut theScheme = AuthScheme::from(&self.config.authentication);
1244
1245        while let Some(auth_step) = theScheme.step()? {
1246            match auth_step {
1247                ::authentic::AuthenticationStep::Request(auth_request) => {
1248                    theScheme.respond(self.client.request(auth_request).await);
1249                }
1250                ::authentic::AuthenticationStep::WaitFor(duration) => {
1251                    (self.sleep)(duration).await;
1252                }
1253            }
1254        }
1255        let theBuilder = crate::v1_1_4::request::oauth_authorizations_create_authorization::http_builder(
1256            self.config.base_url.as_ref(),
1257            self.config.user_agent.as_ref(),
1258            self.config.accept.as_deref(),
1259        )?
1260        .with_authentication(&theScheme)?;
1261
1262        let theRequest = crate::v1_1_4::request::oauth_authorizations_create_authorization::hyper_request(
1263            theBuilder,
1264            theContent.try_into()?,
1265        )?;
1266
1267        ::log::debug!("HTTP request: {:?}", &theRequest);
1268
1269        let theResponse = self.client.request(theRequest).await?;
1270
1271        ::log::debug!("HTTP response: {:?}", &theResponse);
1272
1273        Ok(theResponse)
1274    }
1275
1276    /// Get-or-create an authorization for a specific app
1277    /// 
1278    /// **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
1279    /// 
1280    /// **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
1281    /// 
1282    /// Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
1283    /// 
1284    /// If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
1285    /// 
1286    /// **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
1287    /// 
1288    /// [API method documentation](https://docs.github.com/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app)
1289    ///
1290    /// # Content
1291    ///
1292    /// - [`&v1_1_4::request::oauth_authorizations_get_or_create_authorization_for_app::body::Json`](crate::v1_1_4::request::oauth_authorizations_get_or_create_authorization_for_app::body::Json)
1293    pub async fn oauth_authorizations_get_or_create_authorization_for_app<Content>(
1294        &self,
1295        client_id: &str,
1296        theContent: Content,
1297    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
1298    where
1299        Content: Copy + TryInto<crate::v1_1_4::request::oauth_authorizations_get_or_create_authorization_for_app::Content<::hyper::Body>>,
1300        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::oauth_authorizations_get_or_create_authorization_for_app::Content<::hyper::Body>>>::Error>
1301    {
1302        let mut theScheme = AuthScheme::from(&self.config.authentication);
1303
1304        while let Some(auth_step) = theScheme.step()? {
1305            match auth_step {
1306                ::authentic::AuthenticationStep::Request(auth_request) => {
1307                    theScheme.respond(self.client.request(auth_request).await);
1308                }
1309                ::authentic::AuthenticationStep::WaitFor(duration) => {
1310                    (self.sleep)(duration).await;
1311                }
1312            }
1313        }
1314        let theBuilder = crate::v1_1_4::request::oauth_authorizations_get_or_create_authorization_for_app::http_builder(
1315            self.config.base_url.as_ref(),
1316            client_id,
1317            self.config.user_agent.as_ref(),
1318            self.config.accept.as_deref(),
1319        )?
1320        .with_authentication(&theScheme)?;
1321
1322        let theRequest = crate::v1_1_4::request::oauth_authorizations_get_or_create_authorization_for_app::hyper_request(
1323            theBuilder,
1324            theContent.try_into()?,
1325        )?;
1326
1327        ::log::debug!("HTTP request: {:?}", &theRequest);
1328
1329        let theResponse = self.client.request(theRequest).await?;
1330
1331        ::log::debug!("HTTP response: {:?}", &theResponse);
1332
1333        Ok(theResponse)
1334    }
1335
1336    /// Get-or-create an authorization for a specific app and fingerprint
1337    /// 
1338    /// **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
1339    /// 
1340    /// **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).
1341    /// 
1342    /// This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.
1343    /// 
1344    /// If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
1345    /// 
1346    /// [API method documentation](https://docs.github.com/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app-and-fingerprint)
1347    ///
1348    /// # Content
1349    ///
1350    /// - [`&v1_1_4::request::oauth_authorizations_get_or_create_authorization_for_app_and_fingerprint::body::Json`](crate::v1_1_4::request::oauth_authorizations_get_or_create_authorization_for_app_and_fingerprint::body::Json)
1351    pub async fn oauth_authorizations_get_or_create_authorization_for_app_and_fingerprint<Content>(
1352        &self,
1353        client_id: &str,
1354        fingerprint: &str,
1355        theContent: Content,
1356    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
1357    where
1358        Content: Copy + TryInto<crate::v1_1_4::request::oauth_authorizations_get_or_create_authorization_for_app_and_fingerprint::Content<::hyper::Body>>,
1359        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::oauth_authorizations_get_or_create_authorization_for_app_and_fingerprint::Content<::hyper::Body>>>::Error>
1360    {
1361        let mut theScheme = AuthScheme::from(&self.config.authentication);
1362
1363        while let Some(auth_step) = theScheme.step()? {
1364            match auth_step {
1365                ::authentic::AuthenticationStep::Request(auth_request) => {
1366                    theScheme.respond(self.client.request(auth_request).await);
1367                }
1368                ::authentic::AuthenticationStep::WaitFor(duration) => {
1369                    (self.sleep)(duration).await;
1370                }
1371            }
1372        }
1373        let theBuilder = crate::v1_1_4::request::oauth_authorizations_get_or_create_authorization_for_app_and_fingerprint::http_builder(
1374            self.config.base_url.as_ref(),
1375            client_id,
1376            fingerprint,
1377            self.config.user_agent.as_ref(),
1378            self.config.accept.as_deref(),
1379        )?
1380        .with_authentication(&theScheme)?;
1381
1382        let theRequest = crate::v1_1_4::request::oauth_authorizations_get_or_create_authorization_for_app_and_fingerprint::hyper_request(
1383            theBuilder,
1384            theContent.try_into()?,
1385        )?;
1386
1387        ::log::debug!("HTTP request: {:?}", &theRequest);
1388
1389        let theResponse = self.client.request(theRequest).await?;
1390
1391        ::log::debug!("HTTP response: {:?}", &theResponse);
1392
1393        Ok(theResponse)
1394    }
1395
1396    /// Get a single authorization
1397    /// 
1398    /// **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
1399    /// 
1400    /// [API method documentation](https://docs.github.com/rest/reference/oauth-authorizations#get-a-single-authorization)
1401    pub async fn oauth_authorizations_get_authorization(
1402        &self,
1403        authorization_id: i64,
1404    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
1405        let mut theScheme = AuthScheme::from(&self.config.authentication);
1406
1407        while let Some(auth_step) = theScheme.step()? {
1408            match auth_step {
1409                ::authentic::AuthenticationStep::Request(auth_request) => {
1410                    theScheme.respond(self.client.request(auth_request).await);
1411                }
1412                ::authentic::AuthenticationStep::WaitFor(duration) => {
1413                    (self.sleep)(duration).await;
1414                }
1415            }
1416        }
1417        let theBuilder = crate::v1_1_4::request::oauth_authorizations_get_authorization::http_builder(
1418            self.config.base_url.as_ref(),
1419            authorization_id,
1420            self.config.user_agent.as_ref(),
1421            self.config.accept.as_deref(),
1422        )?
1423        .with_authentication(&theScheme)?;
1424
1425        let theRequest =
1426            crate::v1_1_4::request::oauth_authorizations_get_authorization::hyper_request(theBuilder)?;
1427
1428        ::log::debug!("HTTP request: {:?}", &theRequest);
1429
1430        let theResponse = self.client.request(theRequest).await?;
1431
1432        ::log::debug!("HTTP response: {:?}", &theResponse);
1433
1434        Ok(theResponse)
1435    }
1436
1437    /// Delete an authorization
1438    /// 
1439    /// **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
1440    /// 
1441    /// [API method documentation](https://docs.github.com/rest/reference/oauth-authorizations#delete-an-authorization)
1442    pub async fn oauth_authorizations_delete_authorization(
1443        &self,
1444        authorization_id: i64,
1445    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
1446        let mut theScheme = AuthScheme::from(&self.config.authentication);
1447
1448        while let Some(auth_step) = theScheme.step()? {
1449            match auth_step {
1450                ::authentic::AuthenticationStep::Request(auth_request) => {
1451                    theScheme.respond(self.client.request(auth_request).await);
1452                }
1453                ::authentic::AuthenticationStep::WaitFor(duration) => {
1454                    (self.sleep)(duration).await;
1455                }
1456            }
1457        }
1458        let theBuilder = crate::v1_1_4::request::oauth_authorizations_delete_authorization::http_builder(
1459            self.config.base_url.as_ref(),
1460            authorization_id,
1461            self.config.user_agent.as_ref(),
1462            self.config.accept.as_deref(),
1463        )?
1464        .with_authentication(&theScheme)?;
1465
1466        let theRequest =
1467            crate::v1_1_4::request::oauth_authorizations_delete_authorization::hyper_request(theBuilder)?;
1468
1469        ::log::debug!("HTTP request: {:?}", &theRequest);
1470
1471        let theResponse = self.client.request(theRequest).await?;
1472
1473        ::log::debug!("HTTP response: {:?}", &theResponse);
1474
1475        Ok(theResponse)
1476    }
1477
1478    /// Update an existing authorization
1479    /// 
1480    /// **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).
1481    /// 
1482    /// If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)."
1483    /// 
1484    /// You can only send one of these scope keys at a time.
1485    /// 
1486    /// [API method documentation](https://docs.github.com/rest/reference/oauth-authorizations#update-an-existing-authorization)
1487    ///
1488    /// # Content
1489    ///
1490    /// - [`&v1_1_4::request::oauth_authorizations_update_authorization::body::Json`](crate::v1_1_4::request::oauth_authorizations_update_authorization::body::Json)
1491    pub async fn oauth_authorizations_update_authorization<Content>(
1492        &self,
1493        authorization_id: i64,
1494        theContent: Content,
1495    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
1496    where
1497        Content: Copy + TryInto<crate::v1_1_4::request::oauth_authorizations_update_authorization::Content<::hyper::Body>>,
1498        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::oauth_authorizations_update_authorization::Content<::hyper::Body>>>::Error>
1499    {
1500        let mut theScheme = AuthScheme::from(&self.config.authentication);
1501
1502        while let Some(auth_step) = theScheme.step()? {
1503            match auth_step {
1504                ::authentic::AuthenticationStep::Request(auth_request) => {
1505                    theScheme.respond(self.client.request(auth_request).await);
1506                }
1507                ::authentic::AuthenticationStep::WaitFor(duration) => {
1508                    (self.sleep)(duration).await;
1509                }
1510            }
1511        }
1512        let theBuilder = crate::v1_1_4::request::oauth_authorizations_update_authorization::http_builder(
1513            self.config.base_url.as_ref(),
1514            authorization_id,
1515            self.config.user_agent.as_ref(),
1516            self.config.accept.as_deref(),
1517        )?
1518        .with_authentication(&theScheme)?;
1519
1520        let theRequest = crate::v1_1_4::request::oauth_authorizations_update_authorization::hyper_request(
1521            theBuilder,
1522            theContent.try_into()?,
1523        )?;
1524
1525        ::log::debug!("HTTP request: {:?}", &theRequest);
1526
1527        let theResponse = self.client.request(theRequest).await?;
1528
1529        ::log::debug!("HTTP response: {:?}", &theResponse);
1530
1531        Ok(theResponse)
1532    }
1533
1534    /// Get all codes of conduct
1535    /// 
1536    /// [API method documentation](https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct)
1537    pub async fn codes_of_conduct_get_all_codes_of_conduct(
1538        &self,
1539    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
1540        let mut theScheme = AuthScheme::from(&self.config.authentication);
1541
1542        while let Some(auth_step) = theScheme.step()? {
1543            match auth_step {
1544                ::authentic::AuthenticationStep::Request(auth_request) => {
1545                    theScheme.respond(self.client.request(auth_request).await);
1546                }
1547                ::authentic::AuthenticationStep::WaitFor(duration) => {
1548                    (self.sleep)(duration).await;
1549                }
1550            }
1551        }
1552        let theBuilder = crate::v1_1_4::request::codes_of_conduct_get_all_codes_of_conduct::http_builder(
1553            self.config.base_url.as_ref(),
1554            self.config.user_agent.as_ref(),
1555            self.config.accept.as_deref(),
1556        )?
1557        .with_authentication(&theScheme)?;
1558
1559        let theRequest =
1560            crate::v1_1_4::request::codes_of_conduct_get_all_codes_of_conduct::hyper_request(theBuilder)?;
1561
1562        ::log::debug!("HTTP request: {:?}", &theRequest);
1563
1564        let theResponse = self.client.request(theRequest).await?;
1565
1566        ::log::debug!("HTTP response: {:?}", &theResponse);
1567
1568        Ok(theResponse)
1569    }
1570
1571    /// Get a code of conduct
1572    /// 
1573    /// [API method documentation](https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct)
1574    pub async fn codes_of_conduct_get_conduct_code(
1575        &self,
1576        key: &str,
1577    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
1578        let mut theScheme = AuthScheme::from(&self.config.authentication);
1579
1580        while let Some(auth_step) = theScheme.step()? {
1581            match auth_step {
1582                ::authentic::AuthenticationStep::Request(auth_request) => {
1583                    theScheme.respond(self.client.request(auth_request).await);
1584                }
1585                ::authentic::AuthenticationStep::WaitFor(duration) => {
1586                    (self.sleep)(duration).await;
1587                }
1588            }
1589        }
1590        let theBuilder = crate::v1_1_4::request::codes_of_conduct_get_conduct_code::http_builder(
1591            self.config.base_url.as_ref(),
1592            key,
1593            self.config.user_agent.as_ref(),
1594            self.config.accept.as_deref(),
1595        )?
1596        .with_authentication(&theScheme)?;
1597
1598        let theRequest =
1599            crate::v1_1_4::request::codes_of_conduct_get_conduct_code::hyper_request(theBuilder)?;
1600
1601        ::log::debug!("HTTP request: {:?}", &theRequest);
1602
1603        let theResponse = self.client.request(theRequest).await?;
1604
1605        ::log::debug!("HTTP response: {:?}", &theResponse);
1606
1607        Ok(theResponse)
1608    }
1609
1610    /// Get emojis
1611    /// 
1612    /// Lists all the emojis available to use on GitHub.
1613    /// 
1614    /// [API method documentation](https://docs.github.com/rest/reference/emojis#get-emojis)
1615    pub async fn emojis_get(
1616        &self,
1617    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
1618        let mut theScheme = AuthScheme::from(&self.config.authentication);
1619
1620        while let Some(auth_step) = theScheme.step()? {
1621            match auth_step {
1622                ::authentic::AuthenticationStep::Request(auth_request) => {
1623                    theScheme.respond(self.client.request(auth_request).await);
1624                }
1625                ::authentic::AuthenticationStep::WaitFor(duration) => {
1626                    (self.sleep)(duration).await;
1627                }
1628            }
1629        }
1630        let theBuilder = crate::v1_1_4::request::emojis_get::http_builder(
1631            self.config.base_url.as_ref(),
1632            self.config.user_agent.as_ref(),
1633            self.config.accept.as_deref(),
1634        )?
1635        .with_authentication(&theScheme)?;
1636
1637        let theRequest =
1638            crate::v1_1_4::request::emojis_get::hyper_request(theBuilder)?;
1639
1640        ::log::debug!("HTTP request: {:?}", &theRequest);
1641
1642        let theResponse = self.client.request(theRequest).await?;
1643
1644        ::log::debug!("HTTP response: {:?}", &theResponse);
1645
1646        Ok(theResponse)
1647    }
1648
1649    /// Get GitHub Actions cache usage for an enterprise
1650    /// 
1651    /// Gets the total GitHub Actions cache usage for an enterprise.
1652    /// The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.
1653    /// You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
1654    /// 
1655    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-enterprise)
1656    pub async fn actions_get_actions_cache_usage_for_enterprise(
1657        &self,
1658        enterprise: &str,
1659    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
1660        let mut theScheme = AuthScheme::from(&self.config.authentication);
1661
1662        while let Some(auth_step) = theScheme.step()? {
1663            match auth_step {
1664                ::authentic::AuthenticationStep::Request(auth_request) => {
1665                    theScheme.respond(self.client.request(auth_request).await);
1666                }
1667                ::authentic::AuthenticationStep::WaitFor(duration) => {
1668                    (self.sleep)(duration).await;
1669                }
1670            }
1671        }
1672        let theBuilder = crate::v1_1_4::request::actions_get_actions_cache_usage_for_enterprise::http_builder(
1673            self.config.base_url.as_ref(),
1674            enterprise,
1675            self.config.user_agent.as_ref(),
1676            self.config.accept.as_deref(),
1677        )?
1678        .with_authentication(&theScheme)?;
1679
1680        let theRequest =
1681            crate::v1_1_4::request::actions_get_actions_cache_usage_for_enterprise::hyper_request(theBuilder)?;
1682
1683        ::log::debug!("HTTP request: {:?}", &theRequest);
1684
1685        let theResponse = self.client.request(theRequest).await?;
1686
1687        ::log::debug!("HTTP response: {:?}", &theResponse);
1688
1689        Ok(theResponse)
1690    }
1691
1692    /// Get GitHub Actions permissions for an enterprise
1693    /// 
1694    /// Gets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise.
1695    /// 
1696    /// You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
1697    /// 
1698    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-enterprise)
1699    pub async fn enterprise_admin_get_github_actions_permissions_enterprise(
1700        &self,
1701        enterprise: &str,
1702    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
1703        let mut theScheme = AuthScheme::from(&self.config.authentication);
1704
1705        while let Some(auth_step) = theScheme.step()? {
1706            match auth_step {
1707                ::authentic::AuthenticationStep::Request(auth_request) => {
1708                    theScheme.respond(self.client.request(auth_request).await);
1709                }
1710                ::authentic::AuthenticationStep::WaitFor(duration) => {
1711                    (self.sleep)(duration).await;
1712                }
1713            }
1714        }
1715        let theBuilder = crate::v1_1_4::request::enterprise_admin_get_github_actions_permissions_enterprise::http_builder(
1716            self.config.base_url.as_ref(),
1717            enterprise,
1718            self.config.user_agent.as_ref(),
1719            self.config.accept.as_deref(),
1720        )?
1721        .with_authentication(&theScheme)?;
1722
1723        let theRequest =
1724            crate::v1_1_4::request::enterprise_admin_get_github_actions_permissions_enterprise::hyper_request(theBuilder)?;
1725
1726        ::log::debug!("HTTP request: {:?}", &theRequest);
1727
1728        let theResponse = self.client.request(theRequest).await?;
1729
1730        ::log::debug!("HTTP response: {:?}", &theResponse);
1731
1732        Ok(theResponse)
1733    }
1734
1735    /// Set GitHub Actions permissions for an enterprise
1736    /// 
1737    /// Sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise.
1738    /// 
1739    /// You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
1740    /// 
1741    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-enterprise)
1742    ///
1743    /// # Content
1744    ///
1745    /// - [`&v1_1_4::request::enterprise_admin_set_github_actions_permissions_enterprise::body::Json`](crate::v1_1_4::request::enterprise_admin_set_github_actions_permissions_enterprise::body::Json)
1746    pub async fn enterprise_admin_set_github_actions_permissions_enterprise<Content>(
1747        &self,
1748        enterprise: &str,
1749        theContent: Content,
1750    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
1751    where
1752        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_set_github_actions_permissions_enterprise::Content<::hyper::Body>>,
1753        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_set_github_actions_permissions_enterprise::Content<::hyper::Body>>>::Error>
1754    {
1755        let mut theScheme = AuthScheme::from(&self.config.authentication);
1756
1757        while let Some(auth_step) = theScheme.step()? {
1758            match auth_step {
1759                ::authentic::AuthenticationStep::Request(auth_request) => {
1760                    theScheme.respond(self.client.request(auth_request).await);
1761                }
1762                ::authentic::AuthenticationStep::WaitFor(duration) => {
1763                    (self.sleep)(duration).await;
1764                }
1765            }
1766        }
1767        let theBuilder = crate::v1_1_4::request::enterprise_admin_set_github_actions_permissions_enterprise::http_builder(
1768            self.config.base_url.as_ref(),
1769            enterprise,
1770            self.config.user_agent.as_ref(),
1771            self.config.accept.as_deref(),
1772        )?
1773        .with_authentication(&theScheme)?;
1774
1775        let theRequest = crate::v1_1_4::request::enterprise_admin_set_github_actions_permissions_enterprise::hyper_request(
1776            theBuilder,
1777            theContent.try_into()?,
1778        )?;
1779
1780        ::log::debug!("HTTP request: {:?}", &theRequest);
1781
1782        let theResponse = self.client.request(theRequest).await?;
1783
1784        ::log::debug!("HTTP response: {:?}", &theResponse);
1785
1786        Ok(theResponse)
1787    }
1788
1789    /// List selected organizations enabled for GitHub Actions in an enterprise
1790    /// 
1791    /// Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
1792    /// 
1793    /// You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
1794    /// 
1795    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-selected-organizations-enabled-for-github-actions-in-an-enterprise)
1796    pub async fn enterprise_admin_list_selected_organizations_enabled_github_actions_enterprise(
1797        &self,
1798        enterprise: &str,
1799        per_page: ::std::option::Option<i64>,
1800        page: ::std::option::Option<i64>,
1801    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
1802        let mut theScheme = AuthScheme::from(&self.config.authentication);
1803
1804        while let Some(auth_step) = theScheme.step()? {
1805            match auth_step {
1806                ::authentic::AuthenticationStep::Request(auth_request) => {
1807                    theScheme.respond(self.client.request(auth_request).await);
1808                }
1809                ::authentic::AuthenticationStep::WaitFor(duration) => {
1810                    (self.sleep)(duration).await;
1811                }
1812            }
1813        }
1814        let theBuilder = crate::v1_1_4::request::enterprise_admin_list_selected_organizations_enabled_github_actions_enterprise::http_builder(
1815            self.config.base_url.as_ref(),
1816            enterprise,
1817            per_page,
1818            page,
1819            self.config.user_agent.as_ref(),
1820            self.config.accept.as_deref(),
1821        )?
1822        .with_authentication(&theScheme)?;
1823
1824        let theRequest =
1825            crate::v1_1_4::request::enterprise_admin_list_selected_organizations_enabled_github_actions_enterprise::hyper_request(theBuilder)?;
1826
1827        ::log::debug!("HTTP request: {:?}", &theRequest);
1828
1829        let theResponse = self.client.request(theRequest).await?;
1830
1831        ::log::debug!("HTTP response: {:?}", &theResponse);
1832
1833        Ok(theResponse)
1834    }
1835
1836    /// Set selected organizations enabled for GitHub Actions in an enterprise
1837    /// 
1838    /// Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
1839    /// 
1840    /// You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
1841    /// 
1842    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-selected-organizations-enabled-for-github-actions-in-an-enterprise)
1843    ///
1844    /// # Content
1845    ///
1846    /// - [`&v1_1_4::request::enterprise_admin_set_selected_organizations_enabled_github_actions_enterprise::body::Json`](crate::v1_1_4::request::enterprise_admin_set_selected_organizations_enabled_github_actions_enterprise::body::Json)
1847    pub async fn enterprise_admin_set_selected_organizations_enabled_github_actions_enterprise<Content>(
1848        &self,
1849        enterprise: &str,
1850        theContent: Content,
1851    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
1852    where
1853        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_set_selected_organizations_enabled_github_actions_enterprise::Content<::hyper::Body>>,
1854        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_set_selected_organizations_enabled_github_actions_enterprise::Content<::hyper::Body>>>::Error>
1855    {
1856        let mut theScheme = AuthScheme::from(&self.config.authentication);
1857
1858        while let Some(auth_step) = theScheme.step()? {
1859            match auth_step {
1860                ::authentic::AuthenticationStep::Request(auth_request) => {
1861                    theScheme.respond(self.client.request(auth_request).await);
1862                }
1863                ::authentic::AuthenticationStep::WaitFor(duration) => {
1864                    (self.sleep)(duration).await;
1865                }
1866            }
1867        }
1868        let theBuilder = crate::v1_1_4::request::enterprise_admin_set_selected_organizations_enabled_github_actions_enterprise::http_builder(
1869            self.config.base_url.as_ref(),
1870            enterprise,
1871            self.config.user_agent.as_ref(),
1872            self.config.accept.as_deref(),
1873        )?
1874        .with_authentication(&theScheme)?;
1875
1876        let theRequest = crate::v1_1_4::request::enterprise_admin_set_selected_organizations_enabled_github_actions_enterprise::hyper_request(
1877            theBuilder,
1878            theContent.try_into()?,
1879        )?;
1880
1881        ::log::debug!("HTTP request: {:?}", &theRequest);
1882
1883        let theResponse = self.client.request(theRequest).await?;
1884
1885        ::log::debug!("HTTP response: {:?}", &theResponse);
1886
1887        Ok(theResponse)
1888    }
1889
1890    /// Enable a selected organization for GitHub Actions in an enterprise
1891    /// 
1892    /// Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
1893    /// 
1894    /// You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
1895    /// 
1896    /// [API method documentation](https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise)
1897    pub async fn enterprise_admin_enable_selected_organization_github_actions_enterprise(
1898        &self,
1899        enterprise: &str,
1900        org_id: i64,
1901    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
1902        let mut theScheme = AuthScheme::from(&self.config.authentication);
1903
1904        while let Some(auth_step) = theScheme.step()? {
1905            match auth_step {
1906                ::authentic::AuthenticationStep::Request(auth_request) => {
1907                    theScheme.respond(self.client.request(auth_request).await);
1908                }
1909                ::authentic::AuthenticationStep::WaitFor(duration) => {
1910                    (self.sleep)(duration).await;
1911                }
1912            }
1913        }
1914        let theBuilder = crate::v1_1_4::request::enterprise_admin_enable_selected_organization_github_actions_enterprise::http_builder(
1915            self.config.base_url.as_ref(),
1916            enterprise,
1917            org_id,
1918            self.config.user_agent.as_ref(),
1919            self.config.accept.as_deref(),
1920        )?
1921        .with_authentication(&theScheme)?;
1922
1923        let theRequest =
1924            crate::v1_1_4::request::enterprise_admin_enable_selected_organization_github_actions_enterprise::hyper_request(theBuilder)?;
1925
1926        ::log::debug!("HTTP request: {:?}", &theRequest);
1927
1928        let theResponse = self.client.request(theRequest).await?;
1929
1930        ::log::debug!("HTTP response: {:?}", &theResponse);
1931
1932        Ok(theResponse)
1933    }
1934
1935    /// Disable a selected organization for GitHub Actions in an enterprise
1936    /// 
1937    /// Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
1938    /// 
1939    /// You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
1940    /// 
1941    /// [API method documentation](https://docs.github.com/rest/reference/actions#disable-a-selected-organization-for-github-actions-in-an-enterprise)
1942    pub async fn enterprise_admin_disable_selected_organization_github_actions_enterprise(
1943        &self,
1944        enterprise: &str,
1945        org_id: i64,
1946    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
1947        let mut theScheme = AuthScheme::from(&self.config.authentication);
1948
1949        while let Some(auth_step) = theScheme.step()? {
1950            match auth_step {
1951                ::authentic::AuthenticationStep::Request(auth_request) => {
1952                    theScheme.respond(self.client.request(auth_request).await);
1953                }
1954                ::authentic::AuthenticationStep::WaitFor(duration) => {
1955                    (self.sleep)(duration).await;
1956                }
1957            }
1958        }
1959        let theBuilder = crate::v1_1_4::request::enterprise_admin_disable_selected_organization_github_actions_enterprise::http_builder(
1960            self.config.base_url.as_ref(),
1961            enterprise,
1962            org_id,
1963            self.config.user_agent.as_ref(),
1964            self.config.accept.as_deref(),
1965        )?
1966        .with_authentication(&theScheme)?;
1967
1968        let theRequest =
1969            crate::v1_1_4::request::enterprise_admin_disable_selected_organization_github_actions_enterprise::hyper_request(theBuilder)?;
1970
1971        ::log::debug!("HTTP request: {:?}", &theRequest);
1972
1973        let theResponse = self.client.request(theRequest).await?;
1974
1975        ::log::debug!("HTTP response: {:?}", &theResponse);
1976
1977        Ok(theResponse)
1978    }
1979
1980    /// Get allowed actions and reusable workflows for an enterprise
1981    /// 
1982    /// Gets the selected actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
1983    /// 
1984    /// You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
1985    /// 
1986    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-enterprise)
1987    pub async fn enterprise_admin_get_allowed_actions_enterprise(
1988        &self,
1989        enterprise: &str,
1990    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
1991        let mut theScheme = AuthScheme::from(&self.config.authentication);
1992
1993        while let Some(auth_step) = theScheme.step()? {
1994            match auth_step {
1995                ::authentic::AuthenticationStep::Request(auth_request) => {
1996                    theScheme.respond(self.client.request(auth_request).await);
1997                }
1998                ::authentic::AuthenticationStep::WaitFor(duration) => {
1999                    (self.sleep)(duration).await;
2000                }
2001            }
2002        }
2003        let theBuilder = crate::v1_1_4::request::enterprise_admin_get_allowed_actions_enterprise::http_builder(
2004            self.config.base_url.as_ref(),
2005            enterprise,
2006            self.config.user_agent.as_ref(),
2007            self.config.accept.as_deref(),
2008        )?
2009        .with_authentication(&theScheme)?;
2010
2011        let theRequest =
2012            crate::v1_1_4::request::enterprise_admin_get_allowed_actions_enterprise::hyper_request(theBuilder)?;
2013
2014        ::log::debug!("HTTP request: {:?}", &theRequest);
2015
2016        let theResponse = self.client.request(theRequest).await?;
2017
2018        ::log::debug!("HTTP response: {:?}", &theResponse);
2019
2020        Ok(theResponse)
2021    }
2022
2023    /// Set allowed actions and reusable workflows for an enterprise
2024    /// 
2025    /// Sets the actions and reusable workflows that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)."
2026    /// 
2027    /// You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
2028    /// 
2029    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-enterprise)
2030    ///
2031    /// # Content
2032    ///
2033    /// - [`&v1_1_4::schema::SelectedActions`](crate::v1_1_4::schema::SelectedActions)
2034    pub async fn enterprise_admin_set_allowed_actions_enterprise<Content>(
2035        &self,
2036        enterprise: &str,
2037        theContent: Content,
2038    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
2039    where
2040        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_set_allowed_actions_enterprise::Content<::hyper::Body>>,
2041        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_set_allowed_actions_enterprise::Content<::hyper::Body>>>::Error>
2042    {
2043        let mut theScheme = AuthScheme::from(&self.config.authentication);
2044
2045        while let Some(auth_step) = theScheme.step()? {
2046            match auth_step {
2047                ::authentic::AuthenticationStep::Request(auth_request) => {
2048                    theScheme.respond(self.client.request(auth_request).await);
2049                }
2050                ::authentic::AuthenticationStep::WaitFor(duration) => {
2051                    (self.sleep)(duration).await;
2052                }
2053            }
2054        }
2055        let theBuilder = crate::v1_1_4::request::enterprise_admin_set_allowed_actions_enterprise::http_builder(
2056            self.config.base_url.as_ref(),
2057            enterprise,
2058            self.config.user_agent.as_ref(),
2059            self.config.accept.as_deref(),
2060        )?
2061        .with_authentication(&theScheme)?;
2062
2063        let theRequest = crate::v1_1_4::request::enterprise_admin_set_allowed_actions_enterprise::hyper_request(
2064            theBuilder,
2065            theContent.try_into()?,
2066        )?;
2067
2068        ::log::debug!("HTTP request: {:?}", &theRequest);
2069
2070        let theResponse = self.client.request(theRequest).await?;
2071
2072        ::log::debug!("HTTP response: {:?}", &theResponse);
2073
2074        Ok(theResponse)
2075    }
2076
2077    /// Get default workflow permissions for an enterprise
2078    /// 
2079    /// Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise,
2080    /// as well as whether GitHub Actions can submit approving pull request reviews. For more information, see
2081    /// "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)."
2082    /// 
2083    /// You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
2084    /// GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint.
2085    /// 
2086    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-an-enterprise)
2087    pub async fn actions_get_github_actions_default_workflow_permissions_enterprise(
2088        &self,
2089        enterprise: &str,
2090    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2091        let mut theScheme = AuthScheme::from(&self.config.authentication);
2092
2093        while let Some(auth_step) = theScheme.step()? {
2094            match auth_step {
2095                ::authentic::AuthenticationStep::Request(auth_request) => {
2096                    theScheme.respond(self.client.request(auth_request).await);
2097                }
2098                ::authentic::AuthenticationStep::WaitFor(duration) => {
2099                    (self.sleep)(duration).await;
2100                }
2101            }
2102        }
2103        let theBuilder = crate::v1_1_4::request::actions_get_github_actions_default_workflow_permissions_enterprise::http_builder(
2104            self.config.base_url.as_ref(),
2105            enterprise,
2106            self.config.user_agent.as_ref(),
2107            self.config.accept.as_deref(),
2108        )?
2109        .with_authentication(&theScheme)?;
2110
2111        let theRequest =
2112            crate::v1_1_4::request::actions_get_github_actions_default_workflow_permissions_enterprise::hyper_request(theBuilder)?;
2113
2114        ::log::debug!("HTTP request: {:?}", &theRequest);
2115
2116        let theResponse = self.client.request(theRequest).await?;
2117
2118        ::log::debug!("HTTP response: {:?}", &theResponse);
2119
2120        Ok(theResponse)
2121    }
2122
2123    /// Set default workflow permissions for an enterprise
2124    /// 
2125    /// Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets
2126    /// whether GitHub Actions can submit approving pull request reviews. For more information, see
2127    /// "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)."
2128    /// 
2129    /// You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint.
2130    /// GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint.
2131    /// 
2132    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-an-enterprise)
2133    ///
2134    /// # Content
2135    ///
2136    /// - [`&v1_1_4::schema::ActionsSetDefaultWorkflowPermissions`](crate::v1_1_4::schema::ActionsSetDefaultWorkflowPermissions)
2137    pub async fn actions_set_github_actions_default_workflow_permissions_enterprise<Content>(
2138        &self,
2139        enterprise: &str,
2140        theContent: Content,
2141    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
2142    where
2143        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_github_actions_default_workflow_permissions_enterprise::Content<::hyper::Body>>,
2144        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_github_actions_default_workflow_permissions_enterprise::Content<::hyper::Body>>>::Error>
2145    {
2146        let mut theScheme = AuthScheme::from(&self.config.authentication);
2147
2148        while let Some(auth_step) = theScheme.step()? {
2149            match auth_step {
2150                ::authentic::AuthenticationStep::Request(auth_request) => {
2151                    theScheme.respond(self.client.request(auth_request).await);
2152                }
2153                ::authentic::AuthenticationStep::WaitFor(duration) => {
2154                    (self.sleep)(duration).await;
2155                }
2156            }
2157        }
2158        let theBuilder = crate::v1_1_4::request::actions_set_github_actions_default_workflow_permissions_enterprise::http_builder(
2159            self.config.base_url.as_ref(),
2160            enterprise,
2161            self.config.user_agent.as_ref(),
2162            self.config.accept.as_deref(),
2163        )?
2164        .with_authentication(&theScheme)?;
2165
2166        let theRequest = crate::v1_1_4::request::actions_set_github_actions_default_workflow_permissions_enterprise::hyper_request(
2167            theBuilder,
2168            theContent.try_into()?,
2169        )?;
2170
2171        ::log::debug!("HTTP request: {:?}", &theRequest);
2172
2173        let theResponse = self.client.request(theRequest).await?;
2174
2175        ::log::debug!("HTTP response: {:?}", &theResponse);
2176
2177        Ok(theResponse)
2178    }
2179
2180    /// List self-hosted runner groups for an enterprise
2181    /// 
2182    /// Lists all self-hosted runner groups for an enterprise.
2183    /// 
2184    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2185    /// 
2186    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise)
2187    pub async fn enterprise_admin_list_self_hosted_runner_groups_for_enterprise(
2188        &self,
2189        enterprise: &str,
2190        per_page: ::std::option::Option<i64>,
2191        page: ::std::option::Option<i64>,
2192        visible_to_organization: ::std::option::Option<&str>,
2193    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2194        let mut theScheme = AuthScheme::from(&self.config.authentication);
2195
2196        while let Some(auth_step) = theScheme.step()? {
2197            match auth_step {
2198                ::authentic::AuthenticationStep::Request(auth_request) => {
2199                    theScheme.respond(self.client.request(auth_request).await);
2200                }
2201                ::authentic::AuthenticationStep::WaitFor(duration) => {
2202                    (self.sleep)(duration).await;
2203                }
2204            }
2205        }
2206        let theBuilder = crate::v1_1_4::request::enterprise_admin_list_self_hosted_runner_groups_for_enterprise::http_builder(
2207            self.config.base_url.as_ref(),
2208            enterprise,
2209            per_page,
2210            page,
2211            visible_to_organization,
2212            self.config.user_agent.as_ref(),
2213            self.config.accept.as_deref(),
2214        )?
2215        .with_authentication(&theScheme)?;
2216
2217        let theRequest =
2218            crate::v1_1_4::request::enterprise_admin_list_self_hosted_runner_groups_for_enterprise::hyper_request(theBuilder)?;
2219
2220        ::log::debug!("HTTP request: {:?}", &theRequest);
2221
2222        let theResponse = self.client.request(theRequest).await?;
2223
2224        ::log::debug!("HTTP response: {:?}", &theResponse);
2225
2226        Ok(theResponse)
2227    }
2228
2229    /// Create a self-hosted runner group for an enterprise
2230    /// 
2231    /// Creates a new self-hosted runner group for an enterprise.
2232    /// 
2233    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2234    /// 
2235    /// [API method documentation](https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise)
2236    ///
2237    /// # Content
2238    ///
2239    /// - [`&v1_1_4::request::enterprise_admin_create_self_hosted_runner_group_for_enterprise::body::Json`](crate::v1_1_4::request::enterprise_admin_create_self_hosted_runner_group_for_enterprise::body::Json)
2240    pub async fn enterprise_admin_create_self_hosted_runner_group_for_enterprise<Content>(
2241        &self,
2242        enterprise: &str,
2243        theContent: Content,
2244    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
2245    where
2246        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_create_self_hosted_runner_group_for_enterprise::Content<::hyper::Body>>,
2247        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_create_self_hosted_runner_group_for_enterprise::Content<::hyper::Body>>>::Error>
2248    {
2249        let mut theScheme = AuthScheme::from(&self.config.authentication);
2250
2251        while let Some(auth_step) = theScheme.step()? {
2252            match auth_step {
2253                ::authentic::AuthenticationStep::Request(auth_request) => {
2254                    theScheme.respond(self.client.request(auth_request).await);
2255                }
2256                ::authentic::AuthenticationStep::WaitFor(duration) => {
2257                    (self.sleep)(duration).await;
2258                }
2259            }
2260        }
2261        let theBuilder = crate::v1_1_4::request::enterprise_admin_create_self_hosted_runner_group_for_enterprise::http_builder(
2262            self.config.base_url.as_ref(),
2263            enterprise,
2264            self.config.user_agent.as_ref(),
2265            self.config.accept.as_deref(),
2266        )?
2267        .with_authentication(&theScheme)?;
2268
2269        let theRequest = crate::v1_1_4::request::enterprise_admin_create_self_hosted_runner_group_for_enterprise::hyper_request(
2270            theBuilder,
2271            theContent.try_into()?,
2272        )?;
2273
2274        ::log::debug!("HTTP request: {:?}", &theRequest);
2275
2276        let theResponse = self.client.request(theRequest).await?;
2277
2278        ::log::debug!("HTTP response: {:?}", &theResponse);
2279
2280        Ok(theResponse)
2281    }
2282
2283    /// Get a self-hosted runner group for an enterprise
2284    /// 
2285    /// Gets a specific self-hosted runner group for an enterprise.
2286    /// 
2287    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2288    /// 
2289    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise)
2290    pub async fn enterprise_admin_get_self_hosted_runner_group_for_enterprise(
2291        &self,
2292        enterprise: &str,
2293        runner_group_id: i64,
2294    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2295        let mut theScheme = AuthScheme::from(&self.config.authentication);
2296
2297        while let Some(auth_step) = theScheme.step()? {
2298            match auth_step {
2299                ::authentic::AuthenticationStep::Request(auth_request) => {
2300                    theScheme.respond(self.client.request(auth_request).await);
2301                }
2302                ::authentic::AuthenticationStep::WaitFor(duration) => {
2303                    (self.sleep)(duration).await;
2304                }
2305            }
2306        }
2307        let theBuilder = crate::v1_1_4::request::enterprise_admin_get_self_hosted_runner_group_for_enterprise::http_builder(
2308            self.config.base_url.as_ref(),
2309            enterprise,
2310            runner_group_id,
2311            self.config.user_agent.as_ref(),
2312            self.config.accept.as_deref(),
2313        )?
2314        .with_authentication(&theScheme)?;
2315
2316        let theRequest =
2317            crate::v1_1_4::request::enterprise_admin_get_self_hosted_runner_group_for_enterprise::hyper_request(theBuilder)?;
2318
2319        ::log::debug!("HTTP request: {:?}", &theRequest);
2320
2321        let theResponse = self.client.request(theRequest).await?;
2322
2323        ::log::debug!("HTTP response: {:?}", &theResponse);
2324
2325        Ok(theResponse)
2326    }
2327
2328    /// Delete a self-hosted runner group from an enterprise
2329    /// 
2330    /// Deletes a self-hosted runner group for an enterprise.
2331    /// 
2332    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2333    /// 
2334    /// [API method documentation](https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-enterprise)
2335    pub async fn enterprise_admin_delete_self_hosted_runner_group_from_enterprise(
2336        &self,
2337        enterprise: &str,
2338        runner_group_id: i64,
2339    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2340        let mut theScheme = AuthScheme::from(&self.config.authentication);
2341
2342        while let Some(auth_step) = theScheme.step()? {
2343            match auth_step {
2344                ::authentic::AuthenticationStep::Request(auth_request) => {
2345                    theScheme.respond(self.client.request(auth_request).await);
2346                }
2347                ::authentic::AuthenticationStep::WaitFor(duration) => {
2348                    (self.sleep)(duration).await;
2349                }
2350            }
2351        }
2352        let theBuilder = crate::v1_1_4::request::enterprise_admin_delete_self_hosted_runner_group_from_enterprise::http_builder(
2353            self.config.base_url.as_ref(),
2354            enterprise,
2355            runner_group_id,
2356            self.config.user_agent.as_ref(),
2357            self.config.accept.as_deref(),
2358        )?
2359        .with_authentication(&theScheme)?;
2360
2361        let theRequest =
2362            crate::v1_1_4::request::enterprise_admin_delete_self_hosted_runner_group_from_enterprise::hyper_request(theBuilder)?;
2363
2364        ::log::debug!("HTTP request: {:?}", &theRequest);
2365
2366        let theResponse = self.client.request(theRequest).await?;
2367
2368        ::log::debug!("HTTP response: {:?}", &theResponse);
2369
2370        Ok(theResponse)
2371    }
2372
2373    /// Update a self-hosted runner group for an enterprise
2374    /// 
2375    /// Updates the `name` and `visibility` of a self-hosted runner group in an enterprise.
2376    /// 
2377    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2378    /// 
2379    /// [API method documentation](https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-enterprise)
2380    ///
2381    /// # Content
2382    ///
2383    /// - [`&v1_1_4::request::enterprise_admin_update_self_hosted_runner_group_for_enterprise::body::Json`](crate::v1_1_4::request::enterprise_admin_update_self_hosted_runner_group_for_enterprise::body::Json)
2384    pub async fn enterprise_admin_update_self_hosted_runner_group_for_enterprise<Content>(
2385        &self,
2386        enterprise: &str,
2387        runner_group_id: i64,
2388        theContent: Content,
2389    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
2390    where
2391        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_update_self_hosted_runner_group_for_enterprise::Content<::hyper::Body>>,
2392        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_update_self_hosted_runner_group_for_enterprise::Content<::hyper::Body>>>::Error>
2393    {
2394        let mut theScheme = AuthScheme::from(&self.config.authentication);
2395
2396        while let Some(auth_step) = theScheme.step()? {
2397            match auth_step {
2398                ::authentic::AuthenticationStep::Request(auth_request) => {
2399                    theScheme.respond(self.client.request(auth_request).await);
2400                }
2401                ::authentic::AuthenticationStep::WaitFor(duration) => {
2402                    (self.sleep)(duration).await;
2403                }
2404            }
2405        }
2406        let theBuilder = crate::v1_1_4::request::enterprise_admin_update_self_hosted_runner_group_for_enterprise::http_builder(
2407            self.config.base_url.as_ref(),
2408            enterprise,
2409            runner_group_id,
2410            self.config.user_agent.as_ref(),
2411            self.config.accept.as_deref(),
2412        )?
2413        .with_authentication(&theScheme)?;
2414
2415        let theRequest = crate::v1_1_4::request::enterprise_admin_update_self_hosted_runner_group_for_enterprise::hyper_request(
2416            theBuilder,
2417            theContent.try_into()?,
2418        )?;
2419
2420        ::log::debug!("HTTP request: {:?}", &theRequest);
2421
2422        let theResponse = self.client.request(theRequest).await?;
2423
2424        ::log::debug!("HTTP response: {:?}", &theResponse);
2425
2426        Ok(theResponse)
2427    }
2428
2429    /// List organization access to a self-hosted runner group in an enterprise
2430    /// 
2431    /// Lists the organizations with access to a self-hosted runner group.
2432    /// 
2433    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2434    /// 
2435    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-organization-access-to-a-self-hosted-runner-group-in-a-enterprise)
2436    pub async fn enterprise_admin_list_org_access_to_self_hosted_runner_group_in_enterprise(
2437        &self,
2438        enterprise: &str,
2439        runner_group_id: i64,
2440        per_page: ::std::option::Option<i64>,
2441        page: ::std::option::Option<i64>,
2442    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2443        let mut theScheme = AuthScheme::from(&self.config.authentication);
2444
2445        while let Some(auth_step) = theScheme.step()? {
2446            match auth_step {
2447                ::authentic::AuthenticationStep::Request(auth_request) => {
2448                    theScheme.respond(self.client.request(auth_request).await);
2449                }
2450                ::authentic::AuthenticationStep::WaitFor(duration) => {
2451                    (self.sleep)(duration).await;
2452                }
2453            }
2454        }
2455        let theBuilder = crate::v1_1_4::request::enterprise_admin_list_org_access_to_self_hosted_runner_group_in_enterprise::http_builder(
2456            self.config.base_url.as_ref(),
2457            enterprise,
2458            runner_group_id,
2459            per_page,
2460            page,
2461            self.config.user_agent.as_ref(),
2462            self.config.accept.as_deref(),
2463        )?
2464        .with_authentication(&theScheme)?;
2465
2466        let theRequest =
2467            crate::v1_1_4::request::enterprise_admin_list_org_access_to_self_hosted_runner_group_in_enterprise::hyper_request(theBuilder)?;
2468
2469        ::log::debug!("HTTP request: {:?}", &theRequest);
2470
2471        let theResponse = self.client.request(theRequest).await?;
2472
2473        ::log::debug!("HTTP response: {:?}", &theResponse);
2474
2475        Ok(theResponse)
2476    }
2477
2478    /// Set organization access for a self-hosted runner group in an enterprise
2479    /// 
2480    /// Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise.
2481    /// 
2482    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2483    /// 
2484    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-organization-access-to-a-self-hosted-runner-group-in-an-enterprise)
2485    ///
2486    /// # Content
2487    ///
2488    /// - [`&v1_1_4::request::enterprise_admin_set_org_access_to_self_hosted_runner_group_in_enterprise::body::Json`](crate::v1_1_4::request::enterprise_admin_set_org_access_to_self_hosted_runner_group_in_enterprise::body::Json)
2489    pub async fn enterprise_admin_set_org_access_to_self_hosted_runner_group_in_enterprise<Content>(
2490        &self,
2491        enterprise: &str,
2492        runner_group_id: i64,
2493        theContent: Content,
2494    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
2495    where
2496        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_set_org_access_to_self_hosted_runner_group_in_enterprise::Content<::hyper::Body>>,
2497        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_set_org_access_to_self_hosted_runner_group_in_enterprise::Content<::hyper::Body>>>::Error>
2498    {
2499        let mut theScheme = AuthScheme::from(&self.config.authentication);
2500
2501        while let Some(auth_step) = theScheme.step()? {
2502            match auth_step {
2503                ::authentic::AuthenticationStep::Request(auth_request) => {
2504                    theScheme.respond(self.client.request(auth_request).await);
2505                }
2506                ::authentic::AuthenticationStep::WaitFor(duration) => {
2507                    (self.sleep)(duration).await;
2508                }
2509            }
2510        }
2511        let theBuilder = crate::v1_1_4::request::enterprise_admin_set_org_access_to_self_hosted_runner_group_in_enterprise::http_builder(
2512            self.config.base_url.as_ref(),
2513            enterprise,
2514            runner_group_id,
2515            self.config.user_agent.as_ref(),
2516            self.config.accept.as_deref(),
2517        )?
2518        .with_authentication(&theScheme)?;
2519
2520        let theRequest = crate::v1_1_4::request::enterprise_admin_set_org_access_to_self_hosted_runner_group_in_enterprise::hyper_request(
2521            theBuilder,
2522            theContent.try_into()?,
2523        )?;
2524
2525        ::log::debug!("HTTP request: {:?}", &theRequest);
2526
2527        let theResponse = self.client.request(theRequest).await?;
2528
2529        ::log::debug!("HTTP response: {:?}", &theResponse);
2530
2531        Ok(theResponse)
2532    }
2533
2534    /// Add organization access to a self-hosted runner group in an enterprise
2535    /// 
2536    /// Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)."
2537    /// 
2538    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2539    /// 
2540    /// [API method documentation](https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise)
2541    pub async fn enterprise_admin_add_org_access_to_self_hosted_runner_group_in_enterprise(
2542        &self,
2543        enterprise: &str,
2544        runner_group_id: i64,
2545        org_id: i64,
2546    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2547        let mut theScheme = AuthScheme::from(&self.config.authentication);
2548
2549        while let Some(auth_step) = theScheme.step()? {
2550            match auth_step {
2551                ::authentic::AuthenticationStep::Request(auth_request) => {
2552                    theScheme.respond(self.client.request(auth_request).await);
2553                }
2554                ::authentic::AuthenticationStep::WaitFor(duration) => {
2555                    (self.sleep)(duration).await;
2556                }
2557            }
2558        }
2559        let theBuilder = crate::v1_1_4::request::enterprise_admin_add_org_access_to_self_hosted_runner_group_in_enterprise::http_builder(
2560            self.config.base_url.as_ref(),
2561            enterprise,
2562            runner_group_id,
2563            org_id,
2564            self.config.user_agent.as_ref(),
2565            self.config.accept.as_deref(),
2566        )?
2567        .with_authentication(&theScheme)?;
2568
2569        let theRequest =
2570            crate::v1_1_4::request::enterprise_admin_add_org_access_to_self_hosted_runner_group_in_enterprise::hyper_request(theBuilder)?;
2571
2572        ::log::debug!("HTTP request: {:?}", &theRequest);
2573
2574        let theResponse = self.client.request(theRequest).await?;
2575
2576        ::log::debug!("HTTP response: {:?}", &theResponse);
2577
2578        Ok(theResponse)
2579    }
2580
2581    /// Remove organization access to a self-hosted runner group in an enterprise
2582    /// 
2583    /// Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)."
2584    /// 
2585    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2586    /// 
2587    /// [API method documentation](https://docs.github.com/rest/reference/actions#remove-organization-access-to-a-self-hosted-runner-group-in-an-enterprise)
2588    pub async fn enterprise_admin_remove_org_access_to_self_hosted_runner_group_in_enterprise(
2589        &self,
2590        enterprise: &str,
2591        runner_group_id: i64,
2592        org_id: i64,
2593    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2594        let mut theScheme = AuthScheme::from(&self.config.authentication);
2595
2596        while let Some(auth_step) = theScheme.step()? {
2597            match auth_step {
2598                ::authentic::AuthenticationStep::Request(auth_request) => {
2599                    theScheme.respond(self.client.request(auth_request).await);
2600                }
2601                ::authentic::AuthenticationStep::WaitFor(duration) => {
2602                    (self.sleep)(duration).await;
2603                }
2604            }
2605        }
2606        let theBuilder = crate::v1_1_4::request::enterprise_admin_remove_org_access_to_self_hosted_runner_group_in_enterprise::http_builder(
2607            self.config.base_url.as_ref(),
2608            enterprise,
2609            runner_group_id,
2610            org_id,
2611            self.config.user_agent.as_ref(),
2612            self.config.accept.as_deref(),
2613        )?
2614        .with_authentication(&theScheme)?;
2615
2616        let theRequest =
2617            crate::v1_1_4::request::enterprise_admin_remove_org_access_to_self_hosted_runner_group_in_enterprise::hyper_request(theBuilder)?;
2618
2619        ::log::debug!("HTTP request: {:?}", &theRequest);
2620
2621        let theResponse = self.client.request(theRequest).await?;
2622
2623        ::log::debug!("HTTP response: {:?}", &theResponse);
2624
2625        Ok(theResponse)
2626    }
2627
2628    /// List self-hosted runners in a group for an enterprise
2629    /// 
2630    /// Lists the self-hosted runners that are in a specific enterprise group.
2631    /// 
2632    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2633    /// 
2634    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-enterprise)
2635    pub async fn enterprise_admin_list_self_hosted_runners_in_group_for_enterprise(
2636        &self,
2637        enterprise: &str,
2638        runner_group_id: i64,
2639        per_page: ::std::option::Option<i64>,
2640        page: ::std::option::Option<i64>,
2641    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2642        let mut theScheme = AuthScheme::from(&self.config.authentication);
2643
2644        while let Some(auth_step) = theScheme.step()? {
2645            match auth_step {
2646                ::authentic::AuthenticationStep::Request(auth_request) => {
2647                    theScheme.respond(self.client.request(auth_request).await);
2648                }
2649                ::authentic::AuthenticationStep::WaitFor(duration) => {
2650                    (self.sleep)(duration).await;
2651                }
2652            }
2653        }
2654        let theBuilder = crate::v1_1_4::request::enterprise_admin_list_self_hosted_runners_in_group_for_enterprise::http_builder(
2655            self.config.base_url.as_ref(),
2656            enterprise,
2657            runner_group_id,
2658            per_page,
2659            page,
2660            self.config.user_agent.as_ref(),
2661            self.config.accept.as_deref(),
2662        )?
2663        .with_authentication(&theScheme)?;
2664
2665        let theRequest =
2666            crate::v1_1_4::request::enterprise_admin_list_self_hosted_runners_in_group_for_enterprise::hyper_request(theBuilder)?;
2667
2668        ::log::debug!("HTTP request: {:?}", &theRequest);
2669
2670        let theResponse = self.client.request(theRequest).await?;
2671
2672        ::log::debug!("HTTP response: {:?}", &theResponse);
2673
2674        Ok(theResponse)
2675    }
2676
2677    /// Set self-hosted runners in a group for an enterprise
2678    /// 
2679    /// Replaces the list of self-hosted runners that are part of an enterprise runner group.
2680    /// 
2681    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2682    /// 
2683    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-enterprise)
2684    ///
2685    /// # Content
2686    ///
2687    /// - [`&v1_1_4::request::enterprise_admin_set_self_hosted_runners_in_group_for_enterprise::body::Json`](crate::v1_1_4::request::enterprise_admin_set_self_hosted_runners_in_group_for_enterprise::body::Json)
2688    pub async fn enterprise_admin_set_self_hosted_runners_in_group_for_enterprise<Content>(
2689        &self,
2690        enterprise: &str,
2691        runner_group_id: i64,
2692        theContent: Content,
2693    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
2694    where
2695        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_set_self_hosted_runners_in_group_for_enterprise::Content<::hyper::Body>>,
2696        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_set_self_hosted_runners_in_group_for_enterprise::Content<::hyper::Body>>>::Error>
2697    {
2698        let mut theScheme = AuthScheme::from(&self.config.authentication);
2699
2700        while let Some(auth_step) = theScheme.step()? {
2701            match auth_step {
2702                ::authentic::AuthenticationStep::Request(auth_request) => {
2703                    theScheme.respond(self.client.request(auth_request).await);
2704                }
2705                ::authentic::AuthenticationStep::WaitFor(duration) => {
2706                    (self.sleep)(duration).await;
2707                }
2708            }
2709        }
2710        let theBuilder = crate::v1_1_4::request::enterprise_admin_set_self_hosted_runners_in_group_for_enterprise::http_builder(
2711            self.config.base_url.as_ref(),
2712            enterprise,
2713            runner_group_id,
2714            self.config.user_agent.as_ref(),
2715            self.config.accept.as_deref(),
2716        )?
2717        .with_authentication(&theScheme)?;
2718
2719        let theRequest = crate::v1_1_4::request::enterprise_admin_set_self_hosted_runners_in_group_for_enterprise::hyper_request(
2720            theBuilder,
2721            theContent.try_into()?,
2722        )?;
2723
2724        ::log::debug!("HTTP request: {:?}", &theRequest);
2725
2726        let theResponse = self.client.request(theRequest).await?;
2727
2728        ::log::debug!("HTTP response: {:?}", &theResponse);
2729
2730        Ok(theResponse)
2731    }
2732
2733    /// Add a self-hosted runner to a group for an enterprise
2734    /// 
2735    /// Adds a self-hosted runner to a runner group configured in an enterprise.
2736    /// 
2737    /// You must authenticate using an access token with the `manage_runners:enterprise`
2738    /// scope to use this endpoint.
2739    /// 
2740    /// [API method documentation](https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-enterprise)
2741    pub async fn enterprise_admin_add_self_hosted_runner_to_group_for_enterprise(
2742        &self,
2743        enterprise: &str,
2744        runner_group_id: i64,
2745        runner_id: i64,
2746    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2747        let mut theScheme = AuthScheme::from(&self.config.authentication);
2748
2749        while let Some(auth_step) = theScheme.step()? {
2750            match auth_step {
2751                ::authentic::AuthenticationStep::Request(auth_request) => {
2752                    theScheme.respond(self.client.request(auth_request).await);
2753                }
2754                ::authentic::AuthenticationStep::WaitFor(duration) => {
2755                    (self.sleep)(duration).await;
2756                }
2757            }
2758        }
2759        let theBuilder = crate::v1_1_4::request::enterprise_admin_add_self_hosted_runner_to_group_for_enterprise::http_builder(
2760            self.config.base_url.as_ref(),
2761            enterprise,
2762            runner_group_id,
2763            runner_id,
2764            self.config.user_agent.as_ref(),
2765            self.config.accept.as_deref(),
2766        )?
2767        .with_authentication(&theScheme)?;
2768
2769        let theRequest =
2770            crate::v1_1_4::request::enterprise_admin_add_self_hosted_runner_to_group_for_enterprise::hyper_request(theBuilder)?;
2771
2772        ::log::debug!("HTTP request: {:?}", &theRequest);
2773
2774        let theResponse = self.client.request(theRequest).await?;
2775
2776        ::log::debug!("HTTP response: {:?}", &theResponse);
2777
2778        Ok(theResponse)
2779    }
2780
2781    /// Remove a self-hosted runner from a group for an enterprise
2782    /// 
2783    /// Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group.
2784    /// 
2785    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2786    /// 
2787    /// [API method documentation](https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise)
2788    pub async fn enterprise_admin_remove_self_hosted_runner_from_group_for_enterprise(
2789        &self,
2790        enterprise: &str,
2791        runner_group_id: i64,
2792        runner_id: i64,
2793    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2794        let mut theScheme = AuthScheme::from(&self.config.authentication);
2795
2796        while let Some(auth_step) = theScheme.step()? {
2797            match auth_step {
2798                ::authentic::AuthenticationStep::Request(auth_request) => {
2799                    theScheme.respond(self.client.request(auth_request).await);
2800                }
2801                ::authentic::AuthenticationStep::WaitFor(duration) => {
2802                    (self.sleep)(duration).await;
2803                }
2804            }
2805        }
2806        let theBuilder = crate::v1_1_4::request::enterprise_admin_remove_self_hosted_runner_from_group_for_enterprise::http_builder(
2807            self.config.base_url.as_ref(),
2808            enterprise,
2809            runner_group_id,
2810            runner_id,
2811            self.config.user_agent.as_ref(),
2812            self.config.accept.as_deref(),
2813        )?
2814        .with_authentication(&theScheme)?;
2815
2816        let theRequest =
2817            crate::v1_1_4::request::enterprise_admin_remove_self_hosted_runner_from_group_for_enterprise::hyper_request(theBuilder)?;
2818
2819        ::log::debug!("HTTP request: {:?}", &theRequest);
2820
2821        let theResponse = self.client.request(theRequest).await?;
2822
2823        ::log::debug!("HTTP response: {:?}", &theResponse);
2824
2825        Ok(theResponse)
2826    }
2827
2828    /// List self-hosted runners for an enterprise
2829    /// 
2830    /// Lists all self-hosted runners configured for an enterprise.
2831    /// 
2832    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2833    /// 
2834    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-enterprise)
2835    pub async fn enterprise_admin_list_self_hosted_runners_for_enterprise(
2836        &self,
2837        enterprise: &str,
2838        per_page: ::std::option::Option<i64>,
2839        page: ::std::option::Option<i64>,
2840    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2841        let mut theScheme = AuthScheme::from(&self.config.authentication);
2842
2843        while let Some(auth_step) = theScheme.step()? {
2844            match auth_step {
2845                ::authentic::AuthenticationStep::Request(auth_request) => {
2846                    theScheme.respond(self.client.request(auth_request).await);
2847                }
2848                ::authentic::AuthenticationStep::WaitFor(duration) => {
2849                    (self.sleep)(duration).await;
2850                }
2851            }
2852        }
2853        let theBuilder = crate::v1_1_4::request::enterprise_admin_list_self_hosted_runners_for_enterprise::http_builder(
2854            self.config.base_url.as_ref(),
2855            enterprise,
2856            per_page,
2857            page,
2858            self.config.user_agent.as_ref(),
2859            self.config.accept.as_deref(),
2860        )?
2861        .with_authentication(&theScheme)?;
2862
2863        let theRequest =
2864            crate::v1_1_4::request::enterprise_admin_list_self_hosted_runners_for_enterprise::hyper_request(theBuilder)?;
2865
2866        ::log::debug!("HTTP request: {:?}", &theRequest);
2867
2868        let theResponse = self.client.request(theRequest).await?;
2869
2870        ::log::debug!("HTTP response: {:?}", &theResponse);
2871
2872        Ok(theResponse)
2873    }
2874
2875    /// List runner applications for an enterprise
2876    /// 
2877    /// Lists binaries for the runner application that you can download and run.
2878    /// 
2879    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2880    /// 
2881    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-enterprise)
2882    pub async fn enterprise_admin_list_runner_applications_for_enterprise(
2883        &self,
2884        enterprise: &str,
2885    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2886        let mut theScheme = AuthScheme::from(&self.config.authentication);
2887
2888        while let Some(auth_step) = theScheme.step()? {
2889            match auth_step {
2890                ::authentic::AuthenticationStep::Request(auth_request) => {
2891                    theScheme.respond(self.client.request(auth_request).await);
2892                }
2893                ::authentic::AuthenticationStep::WaitFor(duration) => {
2894                    (self.sleep)(duration).await;
2895                }
2896            }
2897        }
2898        let theBuilder = crate::v1_1_4::request::enterprise_admin_list_runner_applications_for_enterprise::http_builder(
2899            self.config.base_url.as_ref(),
2900            enterprise,
2901            self.config.user_agent.as_ref(),
2902            self.config.accept.as_deref(),
2903        )?
2904        .with_authentication(&theScheme)?;
2905
2906        let theRequest =
2907            crate::v1_1_4::request::enterprise_admin_list_runner_applications_for_enterprise::hyper_request(theBuilder)?;
2908
2909        ::log::debug!("HTTP request: {:?}", &theRequest);
2910
2911        let theResponse = self.client.request(theRequest).await?;
2912
2913        ::log::debug!("HTTP response: {:?}", &theResponse);
2914
2915        Ok(theResponse)
2916    }
2917
2918    /// Create a registration token for an enterprise
2919    /// 
2920    /// Returns a token that you can pass to the `config` script. The token expires after one hour.
2921    /// 
2922    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2923    /// 
2924    /// #### Example using registration token
2925    /// 
2926    /// Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.
2927    /// 
2928    /// ```text
2929    /// ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN
2930    /// ```
2931    /// 
2932    /// [API method documentation](https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-enterprise)
2933    pub async fn enterprise_admin_create_registration_token_for_enterprise(
2934        &self,
2935        enterprise: &str,
2936    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2937        let mut theScheme = AuthScheme::from(&self.config.authentication);
2938
2939        while let Some(auth_step) = theScheme.step()? {
2940            match auth_step {
2941                ::authentic::AuthenticationStep::Request(auth_request) => {
2942                    theScheme.respond(self.client.request(auth_request).await);
2943                }
2944                ::authentic::AuthenticationStep::WaitFor(duration) => {
2945                    (self.sleep)(duration).await;
2946                }
2947            }
2948        }
2949        let theBuilder = crate::v1_1_4::request::enterprise_admin_create_registration_token_for_enterprise::http_builder(
2950            self.config.base_url.as_ref(),
2951            enterprise,
2952            self.config.user_agent.as_ref(),
2953            self.config.accept.as_deref(),
2954        )?
2955        .with_authentication(&theScheme)?;
2956
2957        let theRequest =
2958            crate::v1_1_4::request::enterprise_admin_create_registration_token_for_enterprise::hyper_request(theBuilder)?;
2959
2960        ::log::debug!("HTTP request: {:?}", &theRequest);
2961
2962        let theResponse = self.client.request(theRequest).await?;
2963
2964        ::log::debug!("HTTP response: {:?}", &theResponse);
2965
2966        Ok(theResponse)
2967    }
2968
2969    /// Create a remove token for an enterprise
2970    /// 
2971    /// Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour.
2972    /// 
2973    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
2974    /// 
2975    /// #### Example using remove token
2976    /// 
2977    /// To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this
2978    /// endpoint.
2979    /// 
2980    /// ```text
2981    /// ./config.sh remove --token TOKEN
2982    /// ```
2983    /// 
2984    /// [API method documentation](https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-enterprise)
2985    pub async fn enterprise_admin_create_remove_token_for_enterprise(
2986        &self,
2987        enterprise: &str,
2988    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
2989        let mut theScheme = AuthScheme::from(&self.config.authentication);
2990
2991        while let Some(auth_step) = theScheme.step()? {
2992            match auth_step {
2993                ::authentic::AuthenticationStep::Request(auth_request) => {
2994                    theScheme.respond(self.client.request(auth_request).await);
2995                }
2996                ::authentic::AuthenticationStep::WaitFor(duration) => {
2997                    (self.sleep)(duration).await;
2998                }
2999            }
3000        }
3001        let theBuilder = crate::v1_1_4::request::enterprise_admin_create_remove_token_for_enterprise::http_builder(
3002            self.config.base_url.as_ref(),
3003            enterprise,
3004            self.config.user_agent.as_ref(),
3005            self.config.accept.as_deref(),
3006        )?
3007        .with_authentication(&theScheme)?;
3008
3009        let theRequest =
3010            crate::v1_1_4::request::enterprise_admin_create_remove_token_for_enterprise::hyper_request(theBuilder)?;
3011
3012        ::log::debug!("HTTP request: {:?}", &theRequest);
3013
3014        let theResponse = self.client.request(theRequest).await?;
3015
3016        ::log::debug!("HTTP response: {:?}", &theResponse);
3017
3018        Ok(theResponse)
3019    }
3020
3021    /// Get a self-hosted runner for an enterprise
3022    /// 
3023    /// Gets a specific self-hosted runner configured in an enterprise.
3024    /// 
3025    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
3026    /// 
3027    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-enterprise)
3028    pub async fn enterprise_admin_get_self_hosted_runner_for_enterprise(
3029        &self,
3030        enterprise: &str,
3031        runner_id: i64,
3032    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3033        let mut theScheme = AuthScheme::from(&self.config.authentication);
3034
3035        while let Some(auth_step) = theScheme.step()? {
3036            match auth_step {
3037                ::authentic::AuthenticationStep::Request(auth_request) => {
3038                    theScheme.respond(self.client.request(auth_request).await);
3039                }
3040                ::authentic::AuthenticationStep::WaitFor(duration) => {
3041                    (self.sleep)(duration).await;
3042                }
3043            }
3044        }
3045        let theBuilder = crate::v1_1_4::request::enterprise_admin_get_self_hosted_runner_for_enterprise::http_builder(
3046            self.config.base_url.as_ref(),
3047            enterprise,
3048            runner_id,
3049            self.config.user_agent.as_ref(),
3050            self.config.accept.as_deref(),
3051        )?
3052        .with_authentication(&theScheme)?;
3053
3054        let theRequest =
3055            crate::v1_1_4::request::enterprise_admin_get_self_hosted_runner_for_enterprise::hyper_request(theBuilder)?;
3056
3057        ::log::debug!("HTTP request: {:?}", &theRequest);
3058
3059        let theResponse = self.client.request(theRequest).await?;
3060
3061        ::log::debug!("HTTP response: {:?}", &theResponse);
3062
3063        Ok(theResponse)
3064    }
3065
3066    /// Delete a self-hosted runner from an enterprise
3067    /// 
3068    /// Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
3069    /// 
3070    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
3071    /// 
3072    /// [API method documentation](https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise)
3073    pub async fn enterprise_admin_delete_self_hosted_runner_from_enterprise(
3074        &self,
3075        enterprise: &str,
3076        runner_id: i64,
3077    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3078        let mut theScheme = AuthScheme::from(&self.config.authentication);
3079
3080        while let Some(auth_step) = theScheme.step()? {
3081            match auth_step {
3082                ::authentic::AuthenticationStep::Request(auth_request) => {
3083                    theScheme.respond(self.client.request(auth_request).await);
3084                }
3085                ::authentic::AuthenticationStep::WaitFor(duration) => {
3086                    (self.sleep)(duration).await;
3087                }
3088            }
3089        }
3090        let theBuilder = crate::v1_1_4::request::enterprise_admin_delete_self_hosted_runner_from_enterprise::http_builder(
3091            self.config.base_url.as_ref(),
3092            enterprise,
3093            runner_id,
3094            self.config.user_agent.as_ref(),
3095            self.config.accept.as_deref(),
3096        )?
3097        .with_authentication(&theScheme)?;
3098
3099        let theRequest =
3100            crate::v1_1_4::request::enterprise_admin_delete_self_hosted_runner_from_enterprise::hyper_request(theBuilder)?;
3101
3102        ::log::debug!("HTTP request: {:?}", &theRequest);
3103
3104        let theResponse = self.client.request(theRequest).await?;
3105
3106        ::log::debug!("HTTP response: {:?}", &theResponse);
3107
3108        Ok(theResponse)
3109    }
3110
3111    /// List labels for a self-hosted runner for an enterprise
3112    /// 
3113    /// Lists all labels for a self-hosted runner configured in an enterprise.
3114    /// 
3115    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
3116    /// 
3117    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise)
3118    pub async fn enterprise_admin_list_labels_for_self_hosted_runner_for_enterprise(
3119        &self,
3120        enterprise: &str,
3121        runner_id: i64,
3122    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3123        let mut theScheme = AuthScheme::from(&self.config.authentication);
3124
3125        while let Some(auth_step) = theScheme.step()? {
3126            match auth_step {
3127                ::authentic::AuthenticationStep::Request(auth_request) => {
3128                    theScheme.respond(self.client.request(auth_request).await);
3129                }
3130                ::authentic::AuthenticationStep::WaitFor(duration) => {
3131                    (self.sleep)(duration).await;
3132                }
3133            }
3134        }
3135        let theBuilder = crate::v1_1_4::request::enterprise_admin_list_labels_for_self_hosted_runner_for_enterprise::http_builder(
3136            self.config.base_url.as_ref(),
3137            enterprise,
3138            runner_id,
3139            self.config.user_agent.as_ref(),
3140            self.config.accept.as_deref(),
3141        )?
3142        .with_authentication(&theScheme)?;
3143
3144        let theRequest =
3145            crate::v1_1_4::request::enterprise_admin_list_labels_for_self_hosted_runner_for_enterprise::hyper_request(theBuilder)?;
3146
3147        ::log::debug!("HTTP request: {:?}", &theRequest);
3148
3149        let theResponse = self.client.request(theRequest).await?;
3150
3151        ::log::debug!("HTTP response: {:?}", &theResponse);
3152
3153        Ok(theResponse)
3154    }
3155
3156    /// Set custom labels for a self-hosted runner for an enterprise
3157    /// 
3158    /// Remove all previous custom labels and set the new custom labels for a specific
3159    /// self-hosted runner configured in an enterprise.
3160    /// 
3161    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
3162    /// 
3163    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-enterprise)
3164    ///
3165    /// # Content
3166    ///
3167    /// - [`&v1_1_4::request::enterprise_admin_set_custom_labels_for_self_hosted_runner_for_enterprise::body::Json`](crate::v1_1_4::request::enterprise_admin_set_custom_labels_for_self_hosted_runner_for_enterprise::body::Json)
3168    pub async fn enterprise_admin_set_custom_labels_for_self_hosted_runner_for_enterprise<Content>(
3169        &self,
3170        enterprise: &str,
3171        runner_id: i64,
3172        theContent: Content,
3173    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
3174    where
3175        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_set_custom_labels_for_self_hosted_runner_for_enterprise::Content<::hyper::Body>>,
3176        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_set_custom_labels_for_self_hosted_runner_for_enterprise::Content<::hyper::Body>>>::Error>
3177    {
3178        let mut theScheme = AuthScheme::from(&self.config.authentication);
3179
3180        while let Some(auth_step) = theScheme.step()? {
3181            match auth_step {
3182                ::authentic::AuthenticationStep::Request(auth_request) => {
3183                    theScheme.respond(self.client.request(auth_request).await);
3184                }
3185                ::authentic::AuthenticationStep::WaitFor(duration) => {
3186                    (self.sleep)(duration).await;
3187                }
3188            }
3189        }
3190        let theBuilder = crate::v1_1_4::request::enterprise_admin_set_custom_labels_for_self_hosted_runner_for_enterprise::http_builder(
3191            self.config.base_url.as_ref(),
3192            enterprise,
3193            runner_id,
3194            self.config.user_agent.as_ref(),
3195            self.config.accept.as_deref(),
3196        )?
3197        .with_authentication(&theScheme)?;
3198
3199        let theRequest = crate::v1_1_4::request::enterprise_admin_set_custom_labels_for_self_hosted_runner_for_enterprise::hyper_request(
3200            theBuilder,
3201            theContent.try_into()?,
3202        )?;
3203
3204        ::log::debug!("HTTP request: {:?}", &theRequest);
3205
3206        let theResponse = self.client.request(theRequest).await?;
3207
3208        ::log::debug!("HTTP response: {:?}", &theResponse);
3209
3210        Ok(theResponse)
3211    }
3212
3213    /// Add custom labels to a self-hosted runner for an enterprise
3214    /// 
3215    /// Add custom labels to a self-hosted runner configured in an enterprise.
3216    /// 
3217    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
3218    /// 
3219    /// [API method documentation](https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise)
3220    ///
3221    /// # Content
3222    ///
3223    /// - [`&v1_1_4::request::enterprise_admin_add_custom_labels_to_self_hosted_runner_for_enterprise::body::Json`](crate::v1_1_4::request::enterprise_admin_add_custom_labels_to_self_hosted_runner_for_enterprise::body::Json)
3224    pub async fn enterprise_admin_add_custom_labels_to_self_hosted_runner_for_enterprise<Content>(
3225        &self,
3226        enterprise: &str,
3227        runner_id: i64,
3228        theContent: Content,
3229    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
3230    where
3231        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_add_custom_labels_to_self_hosted_runner_for_enterprise::Content<::hyper::Body>>,
3232        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_add_custom_labels_to_self_hosted_runner_for_enterprise::Content<::hyper::Body>>>::Error>
3233    {
3234        let mut theScheme = AuthScheme::from(&self.config.authentication);
3235
3236        while let Some(auth_step) = theScheme.step()? {
3237            match auth_step {
3238                ::authentic::AuthenticationStep::Request(auth_request) => {
3239                    theScheme.respond(self.client.request(auth_request).await);
3240                }
3241                ::authentic::AuthenticationStep::WaitFor(duration) => {
3242                    (self.sleep)(duration).await;
3243                }
3244            }
3245        }
3246        let theBuilder = crate::v1_1_4::request::enterprise_admin_add_custom_labels_to_self_hosted_runner_for_enterprise::http_builder(
3247            self.config.base_url.as_ref(),
3248            enterprise,
3249            runner_id,
3250            self.config.user_agent.as_ref(),
3251            self.config.accept.as_deref(),
3252        )?
3253        .with_authentication(&theScheme)?;
3254
3255        let theRequest = crate::v1_1_4::request::enterprise_admin_add_custom_labels_to_self_hosted_runner_for_enterprise::hyper_request(
3256            theBuilder,
3257            theContent.try_into()?,
3258        )?;
3259
3260        ::log::debug!("HTTP request: {:?}", &theRequest);
3261
3262        let theResponse = self.client.request(theRequest).await?;
3263
3264        ::log::debug!("HTTP response: {:?}", &theResponse);
3265
3266        Ok(theResponse)
3267    }
3268
3269    /// Remove all custom labels from a self-hosted runner for an enterprise
3270    /// 
3271    /// Remove all custom labels from a self-hosted runner configured in an
3272    /// enterprise. Returns the remaining read-only labels from the runner.
3273    /// 
3274    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
3275    /// 
3276    /// [API method documentation](https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-enterprise)
3277    pub async fn enterprise_admin_remove_all_custom_labels_from_self_hosted_runner_for_enterprise(
3278        &self,
3279        enterprise: &str,
3280        runner_id: i64,
3281    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3282        let mut theScheme = AuthScheme::from(&self.config.authentication);
3283
3284        while let Some(auth_step) = theScheme.step()? {
3285            match auth_step {
3286                ::authentic::AuthenticationStep::Request(auth_request) => {
3287                    theScheme.respond(self.client.request(auth_request).await);
3288                }
3289                ::authentic::AuthenticationStep::WaitFor(duration) => {
3290                    (self.sleep)(duration).await;
3291                }
3292            }
3293        }
3294        let theBuilder = crate::v1_1_4::request::enterprise_admin_remove_all_custom_labels_from_self_hosted_runner_for_enterprise::http_builder(
3295            self.config.base_url.as_ref(),
3296            enterprise,
3297            runner_id,
3298            self.config.user_agent.as_ref(),
3299            self.config.accept.as_deref(),
3300        )?
3301        .with_authentication(&theScheme)?;
3302
3303        let theRequest =
3304            crate::v1_1_4::request::enterprise_admin_remove_all_custom_labels_from_self_hosted_runner_for_enterprise::hyper_request(theBuilder)?;
3305
3306        ::log::debug!("HTTP request: {:?}", &theRequest);
3307
3308        let theResponse = self.client.request(theRequest).await?;
3309
3310        ::log::debug!("HTTP response: {:?}", &theResponse);
3311
3312        Ok(theResponse)
3313    }
3314
3315    /// Remove a custom label from a self-hosted runner for an enterprise
3316    /// 
3317    /// Remove a custom label from a self-hosted runner configured
3318    /// in an enterprise. Returns the remaining labels from the runner.
3319    /// 
3320    /// This endpoint returns a `404 Not Found` status if the custom label is not
3321    /// present on the runner.
3322    /// 
3323    /// You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint.
3324    /// 
3325    /// [API method documentation](https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-enterprise)
3326    pub async fn enterprise_admin_remove_custom_label_from_self_hosted_runner_for_enterprise(
3327        &self,
3328        enterprise: &str,
3329        runner_id: i64,
3330        name: &str,
3331    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3332        let mut theScheme = AuthScheme::from(&self.config.authentication);
3333
3334        while let Some(auth_step) = theScheme.step()? {
3335            match auth_step {
3336                ::authentic::AuthenticationStep::Request(auth_request) => {
3337                    theScheme.respond(self.client.request(auth_request).await);
3338                }
3339                ::authentic::AuthenticationStep::WaitFor(duration) => {
3340                    (self.sleep)(duration).await;
3341                }
3342            }
3343        }
3344        let theBuilder = crate::v1_1_4::request::enterprise_admin_remove_custom_label_from_self_hosted_runner_for_enterprise::http_builder(
3345            self.config.base_url.as_ref(),
3346            enterprise,
3347            runner_id,
3348            name,
3349            self.config.user_agent.as_ref(),
3350            self.config.accept.as_deref(),
3351        )?
3352        .with_authentication(&theScheme)?;
3353
3354        let theRequest =
3355            crate::v1_1_4::request::enterprise_admin_remove_custom_label_from_self_hosted_runner_for_enterprise::hyper_request(theBuilder)?;
3356
3357        ::log::debug!("HTTP request: {:?}", &theRequest);
3358
3359        let theResponse = self.client.request(theRequest).await?;
3360
3361        ::log::debug!("HTTP response: {:?}", &theResponse);
3362
3363        Ok(theResponse)
3364    }
3365
3366    /// Get the audit log for an enterprise
3367    /// 
3368    /// Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope.
3369    /// 
3370    /// [API method documentation](https://docs.github.com/rest/reference/enterprise-admin#get-the-audit-log-for-an-enterprise)
3371    #[allow(clippy::too_many_arguments)]
3372    pub async fn enterprise_admin_get_audit_log(
3373        &self,
3374        enterprise: &str,
3375        phrase: ::std::option::Option<&str>,
3376        include: ::std::option::Option<&str>,
3377        after: ::std::option::Option<&str>,
3378        before: ::std::option::Option<&str>,
3379        order: ::std::option::Option<&str>,
3380        page: ::std::option::Option<i64>,
3381        per_page: ::std::option::Option<i64>,
3382    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3383        let mut theScheme = AuthScheme::from(&self.config.authentication);
3384
3385        while let Some(auth_step) = theScheme.step()? {
3386            match auth_step {
3387                ::authentic::AuthenticationStep::Request(auth_request) => {
3388                    theScheme.respond(self.client.request(auth_request).await);
3389                }
3390                ::authentic::AuthenticationStep::WaitFor(duration) => {
3391                    (self.sleep)(duration).await;
3392                }
3393            }
3394        }
3395        let theBuilder = crate::v1_1_4::request::enterprise_admin_get_audit_log::http_builder(
3396            self.config.base_url.as_ref(),
3397            enterprise,
3398            phrase,
3399            include,
3400            after,
3401            before,
3402            order,
3403            page,
3404            per_page,
3405            self.config.user_agent.as_ref(),
3406            self.config.accept.as_deref(),
3407        )?
3408        .with_authentication(&theScheme)?;
3409
3410        let theRequest =
3411            crate::v1_1_4::request::enterprise_admin_get_audit_log::hyper_request(theBuilder)?;
3412
3413        ::log::debug!("HTTP request: {:?}", &theRequest);
3414
3415        let theResponse = self.client.request(theRequest).await?;
3416
3417        ::log::debug!("HTTP response: {:?}", &theResponse);
3418
3419        Ok(theResponse)
3420    }
3421
3422    /// List secret scanning alerts for an enterprise
3423    /// 
3424    /// Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest.
3425    /// To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).
3426    /// 
3427    /// [API method documentation](https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise)
3428    #[allow(clippy::too_many_arguments)]
3429    pub async fn secret_scanning_list_alerts_for_enterprise(
3430        &self,
3431        enterprise: &str,
3432        state: ::std::option::Option<&str>,
3433        secret_type: ::std::option::Option<&str>,
3434        resolution: ::std::option::Option<&str>,
3435        per_page: ::std::option::Option<i64>,
3436        before: ::std::option::Option<&str>,
3437        after: ::std::option::Option<&str>,
3438    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3439        let mut theScheme = AuthScheme::from(&self.config.authentication);
3440
3441        while let Some(auth_step) = theScheme.step()? {
3442            match auth_step {
3443                ::authentic::AuthenticationStep::Request(auth_request) => {
3444                    theScheme.respond(self.client.request(auth_request).await);
3445                }
3446                ::authentic::AuthenticationStep::WaitFor(duration) => {
3447                    (self.sleep)(duration).await;
3448                }
3449            }
3450        }
3451        let theBuilder = crate::v1_1_4::request::secret_scanning_list_alerts_for_enterprise::http_builder(
3452            self.config.base_url.as_ref(),
3453            enterprise,
3454            state,
3455            secret_type,
3456            resolution,
3457            per_page,
3458            before,
3459            after,
3460            self.config.user_agent.as_ref(),
3461            self.config.accept.as_deref(),
3462        )?
3463        .with_authentication(&theScheme)?;
3464
3465        let theRequest =
3466            crate::v1_1_4::request::secret_scanning_list_alerts_for_enterprise::hyper_request(theBuilder)?;
3467
3468        ::log::debug!("HTTP request: {:?}", &theRequest);
3469
3470        let theResponse = self.client.request(theRequest).await?;
3471
3472        ::log::debug!("HTTP response: {:?}", &theResponse);
3473
3474        Ok(theResponse)
3475    }
3476
3477    /// Get GitHub Actions billing for an enterprise
3478    /// 
3479    /// Gets the summary of the free and paid GitHub Actions minutes used.
3480    /// 
3481    /// Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
3482    /// 
3483    /// The authenticated user must be an enterprise admin.
3484    /// 
3485    /// [API method documentation](https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-enterprise)
3486    pub async fn billing_get_github_actions_billing_ghe(
3487        &self,
3488        enterprise: &str,
3489    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3490        let mut theScheme = AuthScheme::from(&self.config.authentication);
3491
3492        while let Some(auth_step) = theScheme.step()? {
3493            match auth_step {
3494                ::authentic::AuthenticationStep::Request(auth_request) => {
3495                    theScheme.respond(self.client.request(auth_request).await);
3496                }
3497                ::authentic::AuthenticationStep::WaitFor(duration) => {
3498                    (self.sleep)(duration).await;
3499                }
3500            }
3501        }
3502        let theBuilder = crate::v1_1_4::request::billing_get_github_actions_billing_ghe::http_builder(
3503            self.config.base_url.as_ref(),
3504            enterprise,
3505            self.config.user_agent.as_ref(),
3506            self.config.accept.as_deref(),
3507        )?
3508        .with_authentication(&theScheme)?;
3509
3510        let theRequest =
3511            crate::v1_1_4::request::billing_get_github_actions_billing_ghe::hyper_request(theBuilder)?;
3512
3513        ::log::debug!("HTTP request: {:?}", &theRequest);
3514
3515        let theResponse = self.client.request(theRequest).await?;
3516
3517        ::log::debug!("HTTP response: {:?}", &theResponse);
3518
3519        Ok(theResponse)
3520    }
3521
3522    /// Get GitHub Advanced Security active committers for an enterprise
3523    /// 
3524    /// Gets the GitHub Advanced Security active committers for an enterprise per repository.
3525    /// Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository.
3526    /// 
3527    /// [API method documentation](https://docs.github.com/rest/reference/billing#export-advanced-security-active-committers-data-for-enterprise)
3528    pub async fn billing_get_github_advanced_security_billing_ghe(
3529        &self,
3530        enterprise: &str,
3531        per_page: ::std::option::Option<i64>,
3532        page: ::std::option::Option<i64>,
3533    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3534        let mut theScheme = AuthScheme::from(&self.config.authentication);
3535
3536        while let Some(auth_step) = theScheme.step()? {
3537            match auth_step {
3538                ::authentic::AuthenticationStep::Request(auth_request) => {
3539                    theScheme.respond(self.client.request(auth_request).await);
3540                }
3541                ::authentic::AuthenticationStep::WaitFor(duration) => {
3542                    (self.sleep)(duration).await;
3543                }
3544            }
3545        }
3546        let theBuilder = crate::v1_1_4::request::billing_get_github_advanced_security_billing_ghe::http_builder(
3547            self.config.base_url.as_ref(),
3548            enterprise,
3549            per_page,
3550            page,
3551            self.config.user_agent.as_ref(),
3552            self.config.accept.as_deref(),
3553        )?
3554        .with_authentication(&theScheme)?;
3555
3556        let theRequest =
3557            crate::v1_1_4::request::billing_get_github_advanced_security_billing_ghe::hyper_request(theBuilder)?;
3558
3559        ::log::debug!("HTTP request: {:?}", &theRequest);
3560
3561        let theResponse = self.client.request(theRequest).await?;
3562
3563        ::log::debug!("HTTP response: {:?}", &theResponse);
3564
3565        Ok(theResponse)
3566    }
3567
3568    /// Get GitHub Packages billing for an enterprise
3569    /// 
3570    /// Gets the free and paid storage used for GitHub Packages in gigabytes.
3571    /// 
3572    /// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
3573    /// 
3574    /// The authenticated user must be an enterprise admin.
3575    /// 
3576    /// [API method documentation](https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-enterprise)
3577    pub async fn billing_get_github_packages_billing_ghe(
3578        &self,
3579        enterprise: &str,
3580    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3581        let mut theScheme = AuthScheme::from(&self.config.authentication);
3582
3583        while let Some(auth_step) = theScheme.step()? {
3584            match auth_step {
3585                ::authentic::AuthenticationStep::Request(auth_request) => {
3586                    theScheme.respond(self.client.request(auth_request).await);
3587                }
3588                ::authentic::AuthenticationStep::WaitFor(duration) => {
3589                    (self.sleep)(duration).await;
3590                }
3591            }
3592        }
3593        let theBuilder = crate::v1_1_4::request::billing_get_github_packages_billing_ghe::http_builder(
3594            self.config.base_url.as_ref(),
3595            enterprise,
3596            self.config.user_agent.as_ref(),
3597            self.config.accept.as_deref(),
3598        )?
3599        .with_authentication(&theScheme)?;
3600
3601        let theRequest =
3602            crate::v1_1_4::request::billing_get_github_packages_billing_ghe::hyper_request(theBuilder)?;
3603
3604        ::log::debug!("HTTP request: {:?}", &theRequest);
3605
3606        let theResponse = self.client.request(theRequest).await?;
3607
3608        ::log::debug!("HTTP response: {:?}", &theResponse);
3609
3610        Ok(theResponse)
3611    }
3612
3613    /// Get shared storage billing for an enterprise
3614    /// 
3615    /// Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.
3616    /// 
3617    /// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
3618    /// 
3619    /// The authenticated user must be an enterprise admin.
3620    /// 
3621    /// [API method documentation](https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-enterprise)
3622    pub async fn billing_get_shared_storage_billing_ghe(
3623        &self,
3624        enterprise: &str,
3625    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3626        let mut theScheme = AuthScheme::from(&self.config.authentication);
3627
3628        while let Some(auth_step) = theScheme.step()? {
3629            match auth_step {
3630                ::authentic::AuthenticationStep::Request(auth_request) => {
3631                    theScheme.respond(self.client.request(auth_request).await);
3632                }
3633                ::authentic::AuthenticationStep::WaitFor(duration) => {
3634                    (self.sleep)(duration).await;
3635                }
3636            }
3637        }
3638        let theBuilder = crate::v1_1_4::request::billing_get_shared_storage_billing_ghe::http_builder(
3639            self.config.base_url.as_ref(),
3640            enterprise,
3641            self.config.user_agent.as_ref(),
3642            self.config.accept.as_deref(),
3643        )?
3644        .with_authentication(&theScheme)?;
3645
3646        let theRequest =
3647            crate::v1_1_4::request::billing_get_shared_storage_billing_ghe::hyper_request(theBuilder)?;
3648
3649        ::log::debug!("HTTP request: {:?}", &theRequest);
3650
3651        let theResponse = self.client.request(theRequest).await?;
3652
3653        ::log::debug!("HTTP response: {:?}", &theResponse);
3654
3655        Ok(theResponse)
3656    }
3657
3658    /// List public events
3659    /// 
3660    /// We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.
3661    /// 
3662    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-public-events)
3663    pub async fn activity_list_public_events(
3664        &self,
3665        per_page: ::std::option::Option<i64>,
3666        page: ::std::option::Option<i64>,
3667    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3668        let mut theScheme = AuthScheme::from(&self.config.authentication);
3669
3670        while let Some(auth_step) = theScheme.step()? {
3671            match auth_step {
3672                ::authentic::AuthenticationStep::Request(auth_request) => {
3673                    theScheme.respond(self.client.request(auth_request).await);
3674                }
3675                ::authentic::AuthenticationStep::WaitFor(duration) => {
3676                    (self.sleep)(duration).await;
3677                }
3678            }
3679        }
3680        let theBuilder = crate::v1_1_4::request::activity_list_public_events::http_builder(
3681            self.config.base_url.as_ref(),
3682            per_page,
3683            page,
3684            self.config.user_agent.as_ref(),
3685            self.config.accept.as_deref(),
3686        )?
3687        .with_authentication(&theScheme)?;
3688
3689        let theRequest =
3690            crate::v1_1_4::request::activity_list_public_events::hyper_request(theBuilder)?;
3691
3692        ::log::debug!("HTTP request: {:?}", &theRequest);
3693
3694        let theResponse = self.client.request(theRequest).await?;
3695
3696        ::log::debug!("HTTP response: {:?}", &theResponse);
3697
3698        Ok(theResponse)
3699    }
3700
3701    /// Get feeds
3702    /// 
3703    /// GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user:
3704    /// 
3705    /// *   **Timeline**: The GitHub global public timeline
3706    /// *   **User**: The public timeline for any user, using [URI template](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia)
3707    /// *   **Current user public**: The public timeline for the authenticated user
3708    /// *   **Current user**: The private timeline for the authenticated user
3709    /// *   **Current user actor**: The private timeline for activity created by the authenticated user
3710    /// *   **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.
3711    /// *   **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.
3712    /// 
3713    /// **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens.
3714    /// 
3715    /// [API method documentation](https://docs.github.com/rest/reference/activity#get-feeds)
3716    pub async fn activity_get_feeds(
3717        &self,
3718    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3719        let mut theScheme = AuthScheme::from(&self.config.authentication);
3720
3721        while let Some(auth_step) = theScheme.step()? {
3722            match auth_step {
3723                ::authentic::AuthenticationStep::Request(auth_request) => {
3724                    theScheme.respond(self.client.request(auth_request).await);
3725                }
3726                ::authentic::AuthenticationStep::WaitFor(duration) => {
3727                    (self.sleep)(duration).await;
3728                }
3729            }
3730        }
3731        let theBuilder = crate::v1_1_4::request::activity_get_feeds::http_builder(
3732            self.config.base_url.as_ref(),
3733            self.config.user_agent.as_ref(),
3734            self.config.accept.as_deref(),
3735        )?
3736        .with_authentication(&theScheme)?;
3737
3738        let theRequest =
3739            crate::v1_1_4::request::activity_get_feeds::hyper_request(theBuilder)?;
3740
3741        ::log::debug!("HTTP request: {:?}", &theRequest);
3742
3743        let theResponse = self.client.request(theRequest).await?;
3744
3745        ::log::debug!("HTTP response: {:?}", &theResponse);
3746
3747        Ok(theResponse)
3748    }
3749
3750    /// List gists for the authenticated user
3751    /// 
3752    /// Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists:
3753    /// 
3754    /// [API method documentation](https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user)
3755    pub async fn gists_list(
3756        &self,
3757        since: ::std::option::Option<&str>,
3758        per_page: ::std::option::Option<i64>,
3759        page: ::std::option::Option<i64>,
3760    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3761        let mut theScheme = AuthScheme::from(&self.config.authentication);
3762
3763        while let Some(auth_step) = theScheme.step()? {
3764            match auth_step {
3765                ::authentic::AuthenticationStep::Request(auth_request) => {
3766                    theScheme.respond(self.client.request(auth_request).await);
3767                }
3768                ::authentic::AuthenticationStep::WaitFor(duration) => {
3769                    (self.sleep)(duration).await;
3770                }
3771            }
3772        }
3773        let theBuilder = crate::v1_1_4::request::gists_list::http_builder(
3774            self.config.base_url.as_ref(),
3775            since,
3776            per_page,
3777            page,
3778            self.config.user_agent.as_ref(),
3779            self.config.accept.as_deref(),
3780        )?
3781        .with_authentication(&theScheme)?;
3782
3783        let theRequest =
3784            crate::v1_1_4::request::gists_list::hyper_request(theBuilder)?;
3785
3786        ::log::debug!("HTTP request: {:?}", &theRequest);
3787
3788        let theResponse = self.client.request(theRequest).await?;
3789
3790        ::log::debug!("HTTP response: {:?}", &theResponse);
3791
3792        Ok(theResponse)
3793    }
3794
3795    /// Create a gist
3796    /// 
3797    /// Allows you to add a new gist with one or more files.
3798    /// 
3799    /// **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.
3800    /// 
3801    /// [API method documentation](https://docs.github.com/rest/reference/gists#create-a-gist)
3802    ///
3803    /// # Content
3804    ///
3805    /// - [`&v1_1_4::request::gists_create::body::Json`](crate::v1_1_4::request::gists_create::body::Json)
3806    pub async fn gists_create<Content>(
3807        &self,
3808        theContent: Content,
3809    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
3810    where
3811        Content: Copy + TryInto<crate::v1_1_4::request::gists_create::Content<::hyper::Body>>,
3812        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::gists_create::Content<::hyper::Body>>>::Error>
3813    {
3814        let mut theScheme = AuthScheme::from(&self.config.authentication);
3815
3816        while let Some(auth_step) = theScheme.step()? {
3817            match auth_step {
3818                ::authentic::AuthenticationStep::Request(auth_request) => {
3819                    theScheme.respond(self.client.request(auth_request).await);
3820                }
3821                ::authentic::AuthenticationStep::WaitFor(duration) => {
3822                    (self.sleep)(duration).await;
3823                }
3824            }
3825        }
3826        let theBuilder = crate::v1_1_4::request::gists_create::http_builder(
3827            self.config.base_url.as_ref(),
3828            self.config.user_agent.as_ref(),
3829            self.config.accept.as_deref(),
3830        )?
3831        .with_authentication(&theScheme)?;
3832
3833        let theRequest = crate::v1_1_4::request::gists_create::hyper_request(
3834            theBuilder,
3835            theContent.try_into()?,
3836        )?;
3837
3838        ::log::debug!("HTTP request: {:?}", &theRequest);
3839
3840        let theResponse = self.client.request(theRequest).await?;
3841
3842        ::log::debug!("HTTP response: {:?}", &theResponse);
3843
3844        Ok(theResponse)
3845    }
3846
3847    /// List public gists
3848    /// 
3849    /// List public gists sorted by most recently updated to least recently updated.
3850    /// 
3851    /// Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.
3852    /// 
3853    /// [API method documentation](https://docs.github.com/rest/reference/gists#list-public-gists)
3854    pub async fn gists_list_public(
3855        &self,
3856        since: ::std::option::Option<&str>,
3857        per_page: ::std::option::Option<i64>,
3858        page: ::std::option::Option<i64>,
3859    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3860        let mut theScheme = AuthScheme::from(&self.config.authentication);
3861
3862        while let Some(auth_step) = theScheme.step()? {
3863            match auth_step {
3864                ::authentic::AuthenticationStep::Request(auth_request) => {
3865                    theScheme.respond(self.client.request(auth_request).await);
3866                }
3867                ::authentic::AuthenticationStep::WaitFor(duration) => {
3868                    (self.sleep)(duration).await;
3869                }
3870            }
3871        }
3872        let theBuilder = crate::v1_1_4::request::gists_list_public::http_builder(
3873            self.config.base_url.as_ref(),
3874            since,
3875            per_page,
3876            page,
3877            self.config.user_agent.as_ref(),
3878            self.config.accept.as_deref(),
3879        )?
3880        .with_authentication(&theScheme)?;
3881
3882        let theRequest =
3883            crate::v1_1_4::request::gists_list_public::hyper_request(theBuilder)?;
3884
3885        ::log::debug!("HTTP request: {:?}", &theRequest);
3886
3887        let theResponse = self.client.request(theRequest).await?;
3888
3889        ::log::debug!("HTTP response: {:?}", &theResponse);
3890
3891        Ok(theResponse)
3892    }
3893
3894    /// List starred gists
3895    /// 
3896    /// List the authenticated user's starred gists:
3897    /// 
3898    /// [API method documentation](https://docs.github.com/rest/reference/gists#list-starred-gists)
3899    pub async fn gists_list_starred(
3900        &self,
3901        since: ::std::option::Option<&str>,
3902        per_page: ::std::option::Option<i64>,
3903        page: ::std::option::Option<i64>,
3904    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3905        let mut theScheme = AuthScheme::from(&self.config.authentication);
3906
3907        while let Some(auth_step) = theScheme.step()? {
3908            match auth_step {
3909                ::authentic::AuthenticationStep::Request(auth_request) => {
3910                    theScheme.respond(self.client.request(auth_request).await);
3911                }
3912                ::authentic::AuthenticationStep::WaitFor(duration) => {
3913                    (self.sleep)(duration).await;
3914                }
3915            }
3916        }
3917        let theBuilder = crate::v1_1_4::request::gists_list_starred::http_builder(
3918            self.config.base_url.as_ref(),
3919            since,
3920            per_page,
3921            page,
3922            self.config.user_agent.as_ref(),
3923            self.config.accept.as_deref(),
3924        )?
3925        .with_authentication(&theScheme)?;
3926
3927        let theRequest =
3928            crate::v1_1_4::request::gists_list_starred::hyper_request(theBuilder)?;
3929
3930        ::log::debug!("HTTP request: {:?}", &theRequest);
3931
3932        let theResponse = self.client.request(theRequest).await?;
3933
3934        ::log::debug!("HTTP response: {:?}", &theResponse);
3935
3936        Ok(theResponse)
3937    }
3938
3939    /// Get a gist
3940    /// 
3941    /// [API method documentation](https://docs.github.com/rest/reference/gists#get-a-gist)
3942    pub async fn gists_get(
3943        &self,
3944        gist_id: &str,
3945    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3946        let mut theScheme = AuthScheme::from(&self.config.authentication);
3947
3948        while let Some(auth_step) = theScheme.step()? {
3949            match auth_step {
3950                ::authentic::AuthenticationStep::Request(auth_request) => {
3951                    theScheme.respond(self.client.request(auth_request).await);
3952                }
3953                ::authentic::AuthenticationStep::WaitFor(duration) => {
3954                    (self.sleep)(duration).await;
3955                }
3956            }
3957        }
3958        let theBuilder = crate::v1_1_4::request::gists_get::http_builder(
3959            self.config.base_url.as_ref(),
3960            gist_id,
3961            self.config.user_agent.as_ref(),
3962            self.config.accept.as_deref(),
3963        )?
3964        .with_authentication(&theScheme)?;
3965
3966        let theRequest =
3967            crate::v1_1_4::request::gists_get::hyper_request(theBuilder)?;
3968
3969        ::log::debug!("HTTP request: {:?}", &theRequest);
3970
3971        let theResponse = self.client.request(theRequest).await?;
3972
3973        ::log::debug!("HTTP response: {:?}", &theResponse);
3974
3975        Ok(theResponse)
3976    }
3977
3978    /// Delete a gist
3979    /// 
3980    /// [API method documentation](https://docs.github.com/rest/reference/gists#delete-a-gist)
3981    pub async fn gists_delete(
3982        &self,
3983        gist_id: &str,
3984    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
3985        let mut theScheme = AuthScheme::from(&self.config.authentication);
3986
3987        while let Some(auth_step) = theScheme.step()? {
3988            match auth_step {
3989                ::authentic::AuthenticationStep::Request(auth_request) => {
3990                    theScheme.respond(self.client.request(auth_request).await);
3991                }
3992                ::authentic::AuthenticationStep::WaitFor(duration) => {
3993                    (self.sleep)(duration).await;
3994                }
3995            }
3996        }
3997        let theBuilder = crate::v1_1_4::request::gists_delete::http_builder(
3998            self.config.base_url.as_ref(),
3999            gist_id,
4000            self.config.user_agent.as_ref(),
4001            self.config.accept.as_deref(),
4002        )?
4003        .with_authentication(&theScheme)?;
4004
4005        let theRequest =
4006            crate::v1_1_4::request::gists_delete::hyper_request(theBuilder)?;
4007
4008        ::log::debug!("HTTP request: {:?}", &theRequest);
4009
4010        let theResponse = self.client.request(theRequest).await?;
4011
4012        ::log::debug!("HTTP response: {:?}", &theResponse);
4013
4014        Ok(theResponse)
4015    }
4016
4017    /// Update a gist
4018    /// 
4019    /// Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged.
4020    /// 
4021    /// [API method documentation](https://docs.github.com/rest/reference/gists/#update-a-gist)
4022    ///
4023    /// # Content
4024    ///
4025    /// - [`&::std::option::Option<crate::v1_1_4::request::gists_update::body::Json>`](crate::v1_1_4::request::gists_update::body::Json)
4026    pub async fn gists_update<Content>(
4027        &self,
4028        gist_id: &str,
4029        theContent: Content,
4030    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
4031    where
4032        Content: Copy + TryInto<crate::v1_1_4::request::gists_update::Content<::hyper::Body>>,
4033        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::gists_update::Content<::hyper::Body>>>::Error>
4034    {
4035        let mut theScheme = AuthScheme::from(&self.config.authentication);
4036
4037        while let Some(auth_step) = theScheme.step()? {
4038            match auth_step {
4039                ::authentic::AuthenticationStep::Request(auth_request) => {
4040                    theScheme.respond(self.client.request(auth_request).await);
4041                }
4042                ::authentic::AuthenticationStep::WaitFor(duration) => {
4043                    (self.sleep)(duration).await;
4044                }
4045            }
4046        }
4047        let theBuilder = crate::v1_1_4::request::gists_update::http_builder(
4048            self.config.base_url.as_ref(),
4049            gist_id,
4050            self.config.user_agent.as_ref(),
4051            self.config.accept.as_deref(),
4052        )?
4053        .with_authentication(&theScheme)?;
4054
4055        let theRequest = crate::v1_1_4::request::gists_update::hyper_request(
4056            theBuilder,
4057            theContent.try_into()?,
4058        )?;
4059
4060        ::log::debug!("HTTP request: {:?}", &theRequest);
4061
4062        let theResponse = self.client.request(theRequest).await?;
4063
4064        ::log::debug!("HTTP response: {:?}", &theResponse);
4065
4066        Ok(theResponse)
4067    }
4068
4069    /// List gist comments
4070    /// 
4071    /// [API method documentation](https://docs.github.com/rest/reference/gists#list-gist-comments)
4072    pub async fn gists_list_comments(
4073        &self,
4074        gist_id: &str,
4075        per_page: ::std::option::Option<i64>,
4076        page: ::std::option::Option<i64>,
4077    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4078        let mut theScheme = AuthScheme::from(&self.config.authentication);
4079
4080        while let Some(auth_step) = theScheme.step()? {
4081            match auth_step {
4082                ::authentic::AuthenticationStep::Request(auth_request) => {
4083                    theScheme.respond(self.client.request(auth_request).await);
4084                }
4085                ::authentic::AuthenticationStep::WaitFor(duration) => {
4086                    (self.sleep)(duration).await;
4087                }
4088            }
4089        }
4090        let theBuilder = crate::v1_1_4::request::gists_list_comments::http_builder(
4091            self.config.base_url.as_ref(),
4092            gist_id,
4093            per_page,
4094            page,
4095            self.config.user_agent.as_ref(),
4096            self.config.accept.as_deref(),
4097        )?
4098        .with_authentication(&theScheme)?;
4099
4100        let theRequest =
4101            crate::v1_1_4::request::gists_list_comments::hyper_request(theBuilder)?;
4102
4103        ::log::debug!("HTTP request: {:?}", &theRequest);
4104
4105        let theResponse = self.client.request(theRequest).await?;
4106
4107        ::log::debug!("HTTP response: {:?}", &theResponse);
4108
4109        Ok(theResponse)
4110    }
4111
4112    /// Create a gist comment
4113    /// 
4114    /// [API method documentation](https://docs.github.com/rest/reference/gists#create-a-gist-comment)
4115    ///
4116    /// # Content
4117    ///
4118    /// - [`&v1_1_4::request::gists_create_comment::body::Json`](crate::v1_1_4::request::gists_create_comment::body::Json)
4119    pub async fn gists_create_comment<Content>(
4120        &self,
4121        gist_id: &str,
4122        theContent: Content,
4123    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
4124    where
4125        Content: Copy + TryInto<crate::v1_1_4::request::gists_create_comment::Content<::hyper::Body>>,
4126        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::gists_create_comment::Content<::hyper::Body>>>::Error>
4127    {
4128        let mut theScheme = AuthScheme::from(&self.config.authentication);
4129
4130        while let Some(auth_step) = theScheme.step()? {
4131            match auth_step {
4132                ::authentic::AuthenticationStep::Request(auth_request) => {
4133                    theScheme.respond(self.client.request(auth_request).await);
4134                }
4135                ::authentic::AuthenticationStep::WaitFor(duration) => {
4136                    (self.sleep)(duration).await;
4137                }
4138            }
4139        }
4140        let theBuilder = crate::v1_1_4::request::gists_create_comment::http_builder(
4141            self.config.base_url.as_ref(),
4142            gist_id,
4143            self.config.user_agent.as_ref(),
4144            self.config.accept.as_deref(),
4145        )?
4146        .with_authentication(&theScheme)?;
4147
4148        let theRequest = crate::v1_1_4::request::gists_create_comment::hyper_request(
4149            theBuilder,
4150            theContent.try_into()?,
4151        )?;
4152
4153        ::log::debug!("HTTP request: {:?}", &theRequest);
4154
4155        let theResponse = self.client.request(theRequest).await?;
4156
4157        ::log::debug!("HTTP response: {:?}", &theResponse);
4158
4159        Ok(theResponse)
4160    }
4161
4162    /// Get a gist comment
4163    /// 
4164    /// [API method documentation](https://docs.github.com/rest/reference/gists#get-a-gist-comment)
4165    pub async fn gists_get_comment(
4166        &self,
4167        gist_id: &str,
4168        comment_id: i64,
4169    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4170        let mut theScheme = AuthScheme::from(&self.config.authentication);
4171
4172        while let Some(auth_step) = theScheme.step()? {
4173            match auth_step {
4174                ::authentic::AuthenticationStep::Request(auth_request) => {
4175                    theScheme.respond(self.client.request(auth_request).await);
4176                }
4177                ::authentic::AuthenticationStep::WaitFor(duration) => {
4178                    (self.sleep)(duration).await;
4179                }
4180            }
4181        }
4182        let theBuilder = crate::v1_1_4::request::gists_get_comment::http_builder(
4183            self.config.base_url.as_ref(),
4184            gist_id,
4185            comment_id,
4186            self.config.user_agent.as_ref(),
4187            self.config.accept.as_deref(),
4188        )?
4189        .with_authentication(&theScheme)?;
4190
4191        let theRequest =
4192            crate::v1_1_4::request::gists_get_comment::hyper_request(theBuilder)?;
4193
4194        ::log::debug!("HTTP request: {:?}", &theRequest);
4195
4196        let theResponse = self.client.request(theRequest).await?;
4197
4198        ::log::debug!("HTTP response: {:?}", &theResponse);
4199
4200        Ok(theResponse)
4201    }
4202
4203    /// Delete a gist comment
4204    /// 
4205    /// [API method documentation](https://docs.github.com/rest/reference/gists#delete-a-gist-comment)
4206    pub async fn gists_delete_comment(
4207        &self,
4208        gist_id: &str,
4209        comment_id: i64,
4210    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4211        let mut theScheme = AuthScheme::from(&self.config.authentication);
4212
4213        while let Some(auth_step) = theScheme.step()? {
4214            match auth_step {
4215                ::authentic::AuthenticationStep::Request(auth_request) => {
4216                    theScheme.respond(self.client.request(auth_request).await);
4217                }
4218                ::authentic::AuthenticationStep::WaitFor(duration) => {
4219                    (self.sleep)(duration).await;
4220                }
4221            }
4222        }
4223        let theBuilder = crate::v1_1_4::request::gists_delete_comment::http_builder(
4224            self.config.base_url.as_ref(),
4225            gist_id,
4226            comment_id,
4227            self.config.user_agent.as_ref(),
4228            self.config.accept.as_deref(),
4229        )?
4230        .with_authentication(&theScheme)?;
4231
4232        let theRequest =
4233            crate::v1_1_4::request::gists_delete_comment::hyper_request(theBuilder)?;
4234
4235        ::log::debug!("HTTP request: {:?}", &theRequest);
4236
4237        let theResponse = self.client.request(theRequest).await?;
4238
4239        ::log::debug!("HTTP response: {:?}", &theResponse);
4240
4241        Ok(theResponse)
4242    }
4243
4244    /// Update a gist comment
4245    /// 
4246    /// [API method documentation](https://docs.github.com/rest/reference/gists#update-a-gist-comment)
4247    ///
4248    /// # Content
4249    ///
4250    /// - [`&v1_1_4::request::gists_update_comment::body::Json`](crate::v1_1_4::request::gists_update_comment::body::Json)
4251    pub async fn gists_update_comment<Content>(
4252        &self,
4253        gist_id: &str,
4254        comment_id: i64,
4255        theContent: Content,
4256    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
4257    where
4258        Content: Copy + TryInto<crate::v1_1_4::request::gists_update_comment::Content<::hyper::Body>>,
4259        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::gists_update_comment::Content<::hyper::Body>>>::Error>
4260    {
4261        let mut theScheme = AuthScheme::from(&self.config.authentication);
4262
4263        while let Some(auth_step) = theScheme.step()? {
4264            match auth_step {
4265                ::authentic::AuthenticationStep::Request(auth_request) => {
4266                    theScheme.respond(self.client.request(auth_request).await);
4267                }
4268                ::authentic::AuthenticationStep::WaitFor(duration) => {
4269                    (self.sleep)(duration).await;
4270                }
4271            }
4272        }
4273        let theBuilder = crate::v1_1_4::request::gists_update_comment::http_builder(
4274            self.config.base_url.as_ref(),
4275            gist_id,
4276            comment_id,
4277            self.config.user_agent.as_ref(),
4278            self.config.accept.as_deref(),
4279        )?
4280        .with_authentication(&theScheme)?;
4281
4282        let theRequest = crate::v1_1_4::request::gists_update_comment::hyper_request(
4283            theBuilder,
4284            theContent.try_into()?,
4285        )?;
4286
4287        ::log::debug!("HTTP request: {:?}", &theRequest);
4288
4289        let theResponse = self.client.request(theRequest).await?;
4290
4291        ::log::debug!("HTTP response: {:?}", &theResponse);
4292
4293        Ok(theResponse)
4294    }
4295
4296    /// List gist commits
4297    /// 
4298    /// [API method documentation](https://docs.github.com/rest/reference/gists#list-gist-commits)
4299    pub async fn gists_list_commits(
4300        &self,
4301        gist_id: &str,
4302        per_page: ::std::option::Option<i64>,
4303        page: ::std::option::Option<i64>,
4304    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4305        let mut theScheme = AuthScheme::from(&self.config.authentication);
4306
4307        while let Some(auth_step) = theScheme.step()? {
4308            match auth_step {
4309                ::authentic::AuthenticationStep::Request(auth_request) => {
4310                    theScheme.respond(self.client.request(auth_request).await);
4311                }
4312                ::authentic::AuthenticationStep::WaitFor(duration) => {
4313                    (self.sleep)(duration).await;
4314                }
4315            }
4316        }
4317        let theBuilder = crate::v1_1_4::request::gists_list_commits::http_builder(
4318            self.config.base_url.as_ref(),
4319            gist_id,
4320            per_page,
4321            page,
4322            self.config.user_agent.as_ref(),
4323            self.config.accept.as_deref(),
4324        )?
4325        .with_authentication(&theScheme)?;
4326
4327        let theRequest =
4328            crate::v1_1_4::request::gists_list_commits::hyper_request(theBuilder)?;
4329
4330        ::log::debug!("HTTP request: {:?}", &theRequest);
4331
4332        let theResponse = self.client.request(theRequest).await?;
4333
4334        ::log::debug!("HTTP response: {:?}", &theResponse);
4335
4336        Ok(theResponse)
4337    }
4338
4339    /// List gist forks
4340    /// 
4341    /// [API method documentation](https://docs.github.com/rest/reference/gists#list-gist-forks)
4342    pub async fn gists_list_forks(
4343        &self,
4344        gist_id: &str,
4345        per_page: ::std::option::Option<i64>,
4346        page: ::std::option::Option<i64>,
4347    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4348        let mut theScheme = AuthScheme::from(&self.config.authentication);
4349
4350        while let Some(auth_step) = theScheme.step()? {
4351            match auth_step {
4352                ::authentic::AuthenticationStep::Request(auth_request) => {
4353                    theScheme.respond(self.client.request(auth_request).await);
4354                }
4355                ::authentic::AuthenticationStep::WaitFor(duration) => {
4356                    (self.sleep)(duration).await;
4357                }
4358            }
4359        }
4360        let theBuilder = crate::v1_1_4::request::gists_list_forks::http_builder(
4361            self.config.base_url.as_ref(),
4362            gist_id,
4363            per_page,
4364            page,
4365            self.config.user_agent.as_ref(),
4366            self.config.accept.as_deref(),
4367        )?
4368        .with_authentication(&theScheme)?;
4369
4370        let theRequest =
4371            crate::v1_1_4::request::gists_list_forks::hyper_request(theBuilder)?;
4372
4373        ::log::debug!("HTTP request: {:?}", &theRequest);
4374
4375        let theResponse = self.client.request(theRequest).await?;
4376
4377        ::log::debug!("HTTP response: {:?}", &theResponse);
4378
4379        Ok(theResponse)
4380    }
4381
4382    /// Fork a gist
4383    /// 
4384    /// **Note**: This was previously `/gists/:gist_id/fork`.
4385    /// 
4386    /// [API method documentation](https://docs.github.com/rest/reference/gists#fork-a-gist)
4387    pub async fn gists_fork(
4388        &self,
4389        gist_id: &str,
4390    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4391        let mut theScheme = AuthScheme::from(&self.config.authentication);
4392
4393        while let Some(auth_step) = theScheme.step()? {
4394            match auth_step {
4395                ::authentic::AuthenticationStep::Request(auth_request) => {
4396                    theScheme.respond(self.client.request(auth_request).await);
4397                }
4398                ::authentic::AuthenticationStep::WaitFor(duration) => {
4399                    (self.sleep)(duration).await;
4400                }
4401            }
4402        }
4403        let theBuilder = crate::v1_1_4::request::gists_fork::http_builder(
4404            self.config.base_url.as_ref(),
4405            gist_id,
4406            self.config.user_agent.as_ref(),
4407            self.config.accept.as_deref(),
4408        )?
4409        .with_authentication(&theScheme)?;
4410
4411        let theRequest =
4412            crate::v1_1_4::request::gists_fork::hyper_request(theBuilder)?;
4413
4414        ::log::debug!("HTTP request: {:?}", &theRequest);
4415
4416        let theResponse = self.client.request(theRequest).await?;
4417
4418        ::log::debug!("HTTP response: {:?}", &theResponse);
4419
4420        Ok(theResponse)
4421    }
4422
4423    /// Check if a gist is starred
4424    /// 
4425    /// [API method documentation](https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred)
4426    pub async fn gists_check_is_starred(
4427        &self,
4428        gist_id: &str,
4429    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4430        let mut theScheme = AuthScheme::from(&self.config.authentication);
4431
4432        while let Some(auth_step) = theScheme.step()? {
4433            match auth_step {
4434                ::authentic::AuthenticationStep::Request(auth_request) => {
4435                    theScheme.respond(self.client.request(auth_request).await);
4436                }
4437                ::authentic::AuthenticationStep::WaitFor(duration) => {
4438                    (self.sleep)(duration).await;
4439                }
4440            }
4441        }
4442        let theBuilder = crate::v1_1_4::request::gists_check_is_starred::http_builder(
4443            self.config.base_url.as_ref(),
4444            gist_id,
4445            self.config.user_agent.as_ref(),
4446            self.config.accept.as_deref(),
4447        )?
4448        .with_authentication(&theScheme)?;
4449
4450        let theRequest =
4451            crate::v1_1_4::request::gists_check_is_starred::hyper_request(theBuilder)?;
4452
4453        ::log::debug!("HTTP request: {:?}", &theRequest);
4454
4455        let theResponse = self.client.request(theRequest).await?;
4456
4457        ::log::debug!("HTTP response: {:?}", &theResponse);
4458
4459        Ok(theResponse)
4460    }
4461
4462    /// Star a gist
4463    /// 
4464    /// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
4465    /// 
4466    /// [API method documentation](https://docs.github.com/rest/reference/gists#star-a-gist)
4467    pub async fn gists_star(
4468        &self,
4469        gist_id: &str,
4470    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4471        let mut theScheme = AuthScheme::from(&self.config.authentication);
4472
4473        while let Some(auth_step) = theScheme.step()? {
4474            match auth_step {
4475                ::authentic::AuthenticationStep::Request(auth_request) => {
4476                    theScheme.respond(self.client.request(auth_request).await);
4477                }
4478                ::authentic::AuthenticationStep::WaitFor(duration) => {
4479                    (self.sleep)(duration).await;
4480                }
4481            }
4482        }
4483        let theBuilder = crate::v1_1_4::request::gists_star::http_builder(
4484            self.config.base_url.as_ref(),
4485            gist_id,
4486            self.config.user_agent.as_ref(),
4487            self.config.accept.as_deref(),
4488        )?
4489        .with_authentication(&theScheme)?;
4490
4491        let theRequest =
4492            crate::v1_1_4::request::gists_star::hyper_request(theBuilder)?;
4493
4494        ::log::debug!("HTTP request: {:?}", &theRequest);
4495
4496        let theResponse = self.client.request(theRequest).await?;
4497
4498        ::log::debug!("HTTP response: {:?}", &theResponse);
4499
4500        Ok(theResponse)
4501    }
4502
4503    /// Unstar a gist
4504    /// 
4505    /// [API method documentation](https://docs.github.com/rest/reference/gists#unstar-a-gist)
4506    pub async fn gists_unstar(
4507        &self,
4508        gist_id: &str,
4509    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4510        let mut theScheme = AuthScheme::from(&self.config.authentication);
4511
4512        while let Some(auth_step) = theScheme.step()? {
4513            match auth_step {
4514                ::authentic::AuthenticationStep::Request(auth_request) => {
4515                    theScheme.respond(self.client.request(auth_request).await);
4516                }
4517                ::authentic::AuthenticationStep::WaitFor(duration) => {
4518                    (self.sleep)(duration).await;
4519                }
4520            }
4521        }
4522        let theBuilder = crate::v1_1_4::request::gists_unstar::http_builder(
4523            self.config.base_url.as_ref(),
4524            gist_id,
4525            self.config.user_agent.as_ref(),
4526            self.config.accept.as_deref(),
4527        )?
4528        .with_authentication(&theScheme)?;
4529
4530        let theRequest =
4531            crate::v1_1_4::request::gists_unstar::hyper_request(theBuilder)?;
4532
4533        ::log::debug!("HTTP request: {:?}", &theRequest);
4534
4535        let theResponse = self.client.request(theRequest).await?;
4536
4537        ::log::debug!("HTTP response: {:?}", &theResponse);
4538
4539        Ok(theResponse)
4540    }
4541
4542    /// Get a gist revision
4543    /// 
4544    /// [API method documentation](https://docs.github.com/rest/reference/gists#get-a-gist-revision)
4545    pub async fn gists_get_revision(
4546        &self,
4547        gist_id: &str,
4548        sha: &str,
4549    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4550        let mut theScheme = AuthScheme::from(&self.config.authentication);
4551
4552        while let Some(auth_step) = theScheme.step()? {
4553            match auth_step {
4554                ::authentic::AuthenticationStep::Request(auth_request) => {
4555                    theScheme.respond(self.client.request(auth_request).await);
4556                }
4557                ::authentic::AuthenticationStep::WaitFor(duration) => {
4558                    (self.sleep)(duration).await;
4559                }
4560            }
4561        }
4562        let theBuilder = crate::v1_1_4::request::gists_get_revision::http_builder(
4563            self.config.base_url.as_ref(),
4564            gist_id,
4565            sha,
4566            self.config.user_agent.as_ref(),
4567            self.config.accept.as_deref(),
4568        )?
4569        .with_authentication(&theScheme)?;
4570
4571        let theRequest =
4572            crate::v1_1_4::request::gists_get_revision::hyper_request(theBuilder)?;
4573
4574        ::log::debug!("HTTP request: {:?}", &theRequest);
4575
4576        let theResponse = self.client.request(theRequest).await?;
4577
4578        ::log::debug!("HTTP response: {:?}", &theResponse);
4579
4580        Ok(theResponse)
4581    }
4582
4583    /// Get all gitignore templates
4584    /// 
4585    /// List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user).
4586    /// 
4587    /// [API method documentation](https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates)
4588    pub async fn gitignore_get_all_templates(
4589        &self,
4590    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4591        let mut theScheme = AuthScheme::from(&self.config.authentication);
4592
4593        while let Some(auth_step) = theScheme.step()? {
4594            match auth_step {
4595                ::authentic::AuthenticationStep::Request(auth_request) => {
4596                    theScheme.respond(self.client.request(auth_request).await);
4597                }
4598                ::authentic::AuthenticationStep::WaitFor(duration) => {
4599                    (self.sleep)(duration).await;
4600                }
4601            }
4602        }
4603        let theBuilder = crate::v1_1_4::request::gitignore_get_all_templates::http_builder(
4604            self.config.base_url.as_ref(),
4605            self.config.user_agent.as_ref(),
4606            self.config.accept.as_deref(),
4607        )?
4608        .with_authentication(&theScheme)?;
4609
4610        let theRequest =
4611            crate::v1_1_4::request::gitignore_get_all_templates::hyper_request(theBuilder)?;
4612
4613        ::log::debug!("HTTP request: {:?}", &theRequest);
4614
4615        let theResponse = self.client.request(theRequest).await?;
4616
4617        ::log::debug!("HTTP response: {:?}", &theResponse);
4618
4619        Ok(theResponse)
4620    }
4621
4622    /// Get a gitignore template
4623    /// 
4624    /// The API also allows fetching the source of a single template.
4625    /// Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents.
4626    /// 
4627    /// [API method documentation](https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template)
4628    pub async fn gitignore_get_template(
4629        &self,
4630        name: &str,
4631    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4632        let mut theScheme = AuthScheme::from(&self.config.authentication);
4633
4634        while let Some(auth_step) = theScheme.step()? {
4635            match auth_step {
4636                ::authentic::AuthenticationStep::Request(auth_request) => {
4637                    theScheme.respond(self.client.request(auth_request).await);
4638                }
4639                ::authentic::AuthenticationStep::WaitFor(duration) => {
4640                    (self.sleep)(duration).await;
4641                }
4642            }
4643        }
4644        let theBuilder = crate::v1_1_4::request::gitignore_get_template::http_builder(
4645            self.config.base_url.as_ref(),
4646            name,
4647            self.config.user_agent.as_ref(),
4648            self.config.accept.as_deref(),
4649        )?
4650        .with_authentication(&theScheme)?;
4651
4652        let theRequest =
4653            crate::v1_1_4::request::gitignore_get_template::hyper_request(theBuilder)?;
4654
4655        ::log::debug!("HTTP request: {:?}", &theRequest);
4656
4657        let theResponse = self.client.request(theRequest).await?;
4658
4659        ::log::debug!("HTTP response: {:?}", &theResponse);
4660
4661        Ok(theResponse)
4662    }
4663
4664    /// List repositories accessible to the app installation
4665    /// 
4666    /// List repositories that an app installation can access.
4667    /// 
4668    /// You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
4669    /// 
4670    /// [API method documentation](https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation)
4671    pub async fn apps_list_repos_accessible_to_installation(
4672        &self,
4673        per_page: ::std::option::Option<i64>,
4674        page: ::std::option::Option<i64>,
4675    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4676        let mut theScheme = AuthScheme::from(&self.config.authentication);
4677
4678        while let Some(auth_step) = theScheme.step()? {
4679            match auth_step {
4680                ::authentic::AuthenticationStep::Request(auth_request) => {
4681                    theScheme.respond(self.client.request(auth_request).await);
4682                }
4683                ::authentic::AuthenticationStep::WaitFor(duration) => {
4684                    (self.sleep)(duration).await;
4685                }
4686            }
4687        }
4688        let theBuilder = crate::v1_1_4::request::apps_list_repos_accessible_to_installation::http_builder(
4689            self.config.base_url.as_ref(),
4690            per_page,
4691            page,
4692            self.config.user_agent.as_ref(),
4693            self.config.accept.as_deref(),
4694        )?
4695        .with_authentication(&theScheme)?;
4696
4697        let theRequest =
4698            crate::v1_1_4::request::apps_list_repos_accessible_to_installation::hyper_request(theBuilder)?;
4699
4700        ::log::debug!("HTTP request: {:?}", &theRequest);
4701
4702        let theResponse = self.client.request(theRequest).await?;
4703
4704        ::log::debug!("HTTP response: {:?}", &theResponse);
4705
4706        Ok(theResponse)
4707    }
4708
4709    /// Revoke an installation access token
4710    /// 
4711    /// Revokes the installation token you're using to authenticate as an installation and access this endpoint.
4712    /// 
4713    /// Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint.
4714    /// 
4715    /// You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.
4716    /// 
4717    /// [API method documentation](https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token)
4718    pub async fn apps_revoke_installation_access_token(
4719        &self,
4720    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4721        let mut theScheme = AuthScheme::from(&self.config.authentication);
4722
4723        while let Some(auth_step) = theScheme.step()? {
4724            match auth_step {
4725                ::authentic::AuthenticationStep::Request(auth_request) => {
4726                    theScheme.respond(self.client.request(auth_request).await);
4727                }
4728                ::authentic::AuthenticationStep::WaitFor(duration) => {
4729                    (self.sleep)(duration).await;
4730                }
4731            }
4732        }
4733        let theBuilder = crate::v1_1_4::request::apps_revoke_installation_access_token::http_builder(
4734            self.config.base_url.as_ref(),
4735            self.config.user_agent.as_ref(),
4736            self.config.accept.as_deref(),
4737        )?
4738        .with_authentication(&theScheme)?;
4739
4740        let theRequest =
4741            crate::v1_1_4::request::apps_revoke_installation_access_token::hyper_request(theBuilder)?;
4742
4743        ::log::debug!("HTTP request: {:?}", &theRequest);
4744
4745        let theResponse = self.client.request(theRequest).await?;
4746
4747        ::log::debug!("HTTP response: {:?}", &theResponse);
4748
4749        Ok(theResponse)
4750    }
4751
4752    /// List issues assigned to the authenticated user
4753    /// 
4754    /// List issues assigned to the authenticated user across all visible repositories including owned repositories, member
4755    /// repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not
4756    /// necessarily assigned to you.
4757    /// 
4758    /// 
4759    /// **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
4760    /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
4761    /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
4762    /// request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
4763    /// 
4764    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user)
4765    #[allow(clippy::too_many_arguments)]
4766    pub async fn issues_list(
4767        &self,
4768        filter: &crate::types::IssueFilter<'_>,
4769        sort: &crate::types::Sort<'_>,
4770        collab: ::std::option::Option<bool>,
4771        orgs: ::std::option::Option<bool>,
4772        owned: ::std::option::Option<bool>,
4773        pulls: ::std::option::Option<bool>,
4774        per_page: ::std::option::Option<i64>,
4775        page: ::std::option::Option<i64>,
4776    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4777        let (sort, direction) = sort.extract();
4778        let mut theScheme = AuthScheme::from(&self.config.authentication);
4779
4780        while let Some(auth_step) = theScheme.step()? {
4781            match auth_step {
4782                ::authentic::AuthenticationStep::Request(auth_request) => {
4783                    theScheme.respond(self.client.request(auth_request).await);
4784                }
4785                ::authentic::AuthenticationStep::WaitFor(duration) => {
4786                    (self.sleep)(duration).await;
4787                }
4788            }
4789        }
4790        let theBuilder = crate::v1_1_4::request::issues_list::http_builder(
4791            self.config.base_url.as_ref(),
4792            filter.filter,
4793            filter.state,
4794            filter.labels,
4795            sort,
4796            direction,
4797            filter.since,
4798            collab,
4799            orgs,
4800            owned,
4801            pulls,
4802            per_page,
4803            page,
4804            self.config.user_agent.as_ref(),
4805            self.config.accept.as_deref(),
4806        )?
4807        .with_authentication(&theScheme)?;
4808
4809        let theRequest =
4810            crate::v1_1_4::request::issues_list::hyper_request(theBuilder)?;
4811
4812        ::log::debug!("HTTP request: {:?}", &theRequest);
4813
4814        let theResponse = self.client.request(theRequest).await?;
4815
4816        ::log::debug!("HTTP response: {:?}", &theResponse);
4817
4818        Ok(theResponse)
4819    }
4820
4821    /// Get all commonly used licenses
4822    /// 
4823    /// [API method documentation](https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses)
4824    pub async fn licenses_get_all_commonly_used(
4825        &self,
4826        featured: ::std::option::Option<bool>,
4827        per_page: ::std::option::Option<i64>,
4828        page: ::std::option::Option<i64>,
4829    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4830        let mut theScheme = AuthScheme::from(&self.config.authentication);
4831
4832        while let Some(auth_step) = theScheme.step()? {
4833            match auth_step {
4834                ::authentic::AuthenticationStep::Request(auth_request) => {
4835                    theScheme.respond(self.client.request(auth_request).await);
4836                }
4837                ::authentic::AuthenticationStep::WaitFor(duration) => {
4838                    (self.sleep)(duration).await;
4839                }
4840            }
4841        }
4842        let theBuilder = crate::v1_1_4::request::licenses_get_all_commonly_used::http_builder(
4843            self.config.base_url.as_ref(),
4844            featured,
4845            per_page,
4846            page,
4847            self.config.user_agent.as_ref(),
4848            self.config.accept.as_deref(),
4849        )?
4850        .with_authentication(&theScheme)?;
4851
4852        let theRequest =
4853            crate::v1_1_4::request::licenses_get_all_commonly_used::hyper_request(theBuilder)?;
4854
4855        ::log::debug!("HTTP request: {:?}", &theRequest);
4856
4857        let theResponse = self.client.request(theRequest).await?;
4858
4859        ::log::debug!("HTTP response: {:?}", &theResponse);
4860
4861        Ok(theResponse)
4862    }
4863
4864    /// Get a license
4865    /// 
4866    /// [API method documentation](https://docs.github.com/rest/reference/licenses#get-a-license)
4867    pub async fn licenses_get(
4868        &self,
4869        license: &str,
4870    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
4871        let mut theScheme = AuthScheme::from(&self.config.authentication);
4872
4873        while let Some(auth_step) = theScheme.step()? {
4874            match auth_step {
4875                ::authentic::AuthenticationStep::Request(auth_request) => {
4876                    theScheme.respond(self.client.request(auth_request).await);
4877                }
4878                ::authentic::AuthenticationStep::WaitFor(duration) => {
4879                    (self.sleep)(duration).await;
4880                }
4881            }
4882        }
4883        let theBuilder = crate::v1_1_4::request::licenses_get::http_builder(
4884            self.config.base_url.as_ref(),
4885            license,
4886            self.config.user_agent.as_ref(),
4887            self.config.accept.as_deref(),
4888        )?
4889        .with_authentication(&theScheme)?;
4890
4891        let theRequest =
4892            crate::v1_1_4::request::licenses_get::hyper_request(theBuilder)?;
4893
4894        ::log::debug!("HTTP request: {:?}", &theRequest);
4895
4896        let theResponse = self.client.request(theRequest).await?;
4897
4898        ::log::debug!("HTTP response: {:?}", &theResponse);
4899
4900        Ok(theResponse)
4901    }
4902
4903    /// Render a Markdown document
4904    /// 
4905    /// [API method documentation](https://docs.github.com/rest/reference/markdown#render-a-markdown-document)
4906    ///
4907    /// # Content
4908    ///
4909    /// - [`&v1_1_4::request::markdown_render::body::Json`](crate::v1_1_4::request::markdown_render::body::Json)
4910    pub async fn markdown_render<Content>(
4911        &self,
4912        theContent: Content,
4913    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
4914    where
4915        Content: Copy + TryInto<crate::v1_1_4::request::markdown_render::Content<::hyper::Body>>,
4916        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::markdown_render::Content<::hyper::Body>>>::Error>
4917    {
4918        let mut theScheme = AuthScheme::from(&self.config.authentication);
4919
4920        while let Some(auth_step) = theScheme.step()? {
4921            match auth_step {
4922                ::authentic::AuthenticationStep::Request(auth_request) => {
4923                    theScheme.respond(self.client.request(auth_request).await);
4924                }
4925                ::authentic::AuthenticationStep::WaitFor(duration) => {
4926                    (self.sleep)(duration).await;
4927                }
4928            }
4929        }
4930        let theBuilder = crate::v1_1_4::request::markdown_render::http_builder(
4931            self.config.base_url.as_ref(),
4932            self.config.user_agent.as_ref(),
4933            self.config.accept.as_deref(),
4934        )?
4935        .with_authentication(&theScheme)?;
4936
4937        let theRequest = crate::v1_1_4::request::markdown_render::hyper_request(
4938            theBuilder,
4939            theContent.try_into()?,
4940        )?;
4941
4942        ::log::debug!("HTTP request: {:?}", &theRequest);
4943
4944        let theResponse = self.client.request(theRequest).await?;
4945
4946        ::log::debug!("HTTP response: {:?}", &theResponse);
4947
4948        Ok(theResponse)
4949    }
4950
4951    /// Render a Markdown document in raw mode
4952    /// 
4953    /// You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less.
4954    /// 
4955    /// [API method documentation](https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode)
4956    ///
4957    /// # Content
4958    ///
4959    /// - [`&Cow<'static, str>`](::std::borrow::Cow)
4960    pub async fn markdown_render_raw<Content>(
4961        &self,
4962        theContent: Content,
4963    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
4964    where
4965        Content: Copy + TryInto<crate::v1_1_4::request::markdown_render_raw::Content<::hyper::Body>>,
4966        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::markdown_render_raw::Content<::hyper::Body>>>::Error>
4967    {
4968        let mut theScheme = AuthScheme::from(&self.config.authentication);
4969
4970        while let Some(auth_step) = theScheme.step()? {
4971            match auth_step {
4972                ::authentic::AuthenticationStep::Request(auth_request) => {
4973                    theScheme.respond(self.client.request(auth_request).await);
4974                }
4975                ::authentic::AuthenticationStep::WaitFor(duration) => {
4976                    (self.sleep)(duration).await;
4977                }
4978            }
4979        }
4980        let theBuilder = crate::v1_1_4::request::markdown_render_raw::http_builder(
4981            self.config.base_url.as_ref(),
4982            self.config.user_agent.as_ref(),
4983            self.config.accept.as_deref(),
4984        )?
4985        .with_authentication(&theScheme)?;
4986
4987        let theRequest = crate::v1_1_4::request::markdown_render_raw::hyper_request(
4988            theBuilder,
4989            theContent.try_into()?,
4990        )?;
4991
4992        ::log::debug!("HTTP request: {:?}", &theRequest);
4993
4994        let theResponse = self.client.request(theRequest).await?;
4995
4996        ::log::debug!("HTTP response: {:?}", &theResponse);
4997
4998        Ok(theResponse)
4999    }
5000
5001    /// Get a subscription plan for an account
5002    /// 
5003    /// Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
5004    /// 
5005    /// GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
5006    /// 
5007    /// [API method documentation](https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account)
5008    pub async fn apps_get_subscription_plan_for_account(
5009        &self,
5010        account_id: i64,
5011    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5012        let mut theScheme = AuthScheme::from(&self.config.authentication);
5013
5014        while let Some(auth_step) = theScheme.step()? {
5015            match auth_step {
5016                ::authentic::AuthenticationStep::Request(auth_request) => {
5017                    theScheme.respond(self.client.request(auth_request).await);
5018                }
5019                ::authentic::AuthenticationStep::WaitFor(duration) => {
5020                    (self.sleep)(duration).await;
5021                }
5022            }
5023        }
5024        let theBuilder = crate::v1_1_4::request::apps_get_subscription_plan_for_account::http_builder(
5025            self.config.base_url.as_ref(),
5026            account_id,
5027            self.config.user_agent.as_ref(),
5028            self.config.accept.as_deref(),
5029        )?
5030        .with_authentication(&theScheme)?;
5031
5032        let theRequest =
5033            crate::v1_1_4::request::apps_get_subscription_plan_for_account::hyper_request(theBuilder)?;
5034
5035        ::log::debug!("HTTP request: {:?}", &theRequest);
5036
5037        let theResponse = self.client.request(theRequest).await?;
5038
5039        ::log::debug!("HTTP response: {:?}", &theResponse);
5040
5041        Ok(theResponse)
5042    }
5043
5044    /// List plans
5045    /// 
5046    /// Lists all plans that are part of your GitHub Marketplace listing.
5047    /// 
5048    /// GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
5049    /// 
5050    /// [API method documentation](https://docs.github.com/rest/reference/apps#list-plans)
5051    pub async fn apps_list_plans(
5052        &self,
5053        per_page: ::std::option::Option<i64>,
5054        page: ::std::option::Option<i64>,
5055    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5056        let mut theScheme = AuthScheme::from(&self.config.authentication);
5057
5058        while let Some(auth_step) = theScheme.step()? {
5059            match auth_step {
5060                ::authentic::AuthenticationStep::Request(auth_request) => {
5061                    theScheme.respond(self.client.request(auth_request).await);
5062                }
5063                ::authentic::AuthenticationStep::WaitFor(duration) => {
5064                    (self.sleep)(duration).await;
5065                }
5066            }
5067        }
5068        let theBuilder = crate::v1_1_4::request::apps_list_plans::http_builder(
5069            self.config.base_url.as_ref(),
5070            per_page,
5071            page,
5072            self.config.user_agent.as_ref(),
5073            self.config.accept.as_deref(),
5074        )?
5075        .with_authentication(&theScheme)?;
5076
5077        let theRequest =
5078            crate::v1_1_4::request::apps_list_plans::hyper_request(theBuilder)?;
5079
5080        ::log::debug!("HTTP request: {:?}", &theRequest);
5081
5082        let theResponse = self.client.request(theRequest).await?;
5083
5084        ::log::debug!("HTTP response: {:?}", &theResponse);
5085
5086        Ok(theResponse)
5087    }
5088
5089    /// List accounts for a plan
5090    /// 
5091    /// Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
5092    /// 
5093    /// GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
5094    /// 
5095    /// [API method documentation](https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan)
5096    pub async fn apps_list_accounts_for_plan(
5097        &self,
5098        plan_id: i64,
5099        sort: &crate::types::Sort<'_>,
5100        per_page: ::std::option::Option<i64>,
5101        page: ::std::option::Option<i64>,
5102    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5103        let (sort, direction) = sort.extract();
5104        let mut theScheme = AuthScheme::from(&self.config.authentication);
5105
5106        while let Some(auth_step) = theScheme.step()? {
5107            match auth_step {
5108                ::authentic::AuthenticationStep::Request(auth_request) => {
5109                    theScheme.respond(self.client.request(auth_request).await);
5110                }
5111                ::authentic::AuthenticationStep::WaitFor(duration) => {
5112                    (self.sleep)(duration).await;
5113                }
5114            }
5115        }
5116        let theBuilder = crate::v1_1_4::request::apps_list_accounts_for_plan::http_builder(
5117            self.config.base_url.as_ref(),
5118            plan_id,
5119            sort,
5120            direction,
5121            per_page,
5122            page,
5123            self.config.user_agent.as_ref(),
5124            self.config.accept.as_deref(),
5125        )?
5126        .with_authentication(&theScheme)?;
5127
5128        let theRequest =
5129            crate::v1_1_4::request::apps_list_accounts_for_plan::hyper_request(theBuilder)?;
5130
5131        ::log::debug!("HTTP request: {:?}", &theRequest);
5132
5133        let theResponse = self.client.request(theRequest).await?;
5134
5135        ::log::debug!("HTTP response: {:?}", &theResponse);
5136
5137        Ok(theResponse)
5138    }
5139
5140    /// Get a subscription plan for an account (stubbed)
5141    /// 
5142    /// Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
5143    /// 
5144    /// GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
5145    /// 
5146    /// [API method documentation](https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed)
5147    pub async fn apps_get_subscription_plan_for_account_stubbed(
5148        &self,
5149        account_id: i64,
5150    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5151        let mut theScheme = AuthScheme::from(&self.config.authentication);
5152
5153        while let Some(auth_step) = theScheme.step()? {
5154            match auth_step {
5155                ::authentic::AuthenticationStep::Request(auth_request) => {
5156                    theScheme.respond(self.client.request(auth_request).await);
5157                }
5158                ::authentic::AuthenticationStep::WaitFor(duration) => {
5159                    (self.sleep)(duration).await;
5160                }
5161            }
5162        }
5163        let theBuilder = crate::v1_1_4::request::apps_get_subscription_plan_for_account_stubbed::http_builder(
5164            self.config.base_url.as_ref(),
5165            account_id,
5166            self.config.user_agent.as_ref(),
5167            self.config.accept.as_deref(),
5168        )?
5169        .with_authentication(&theScheme)?;
5170
5171        let theRequest =
5172            crate::v1_1_4::request::apps_get_subscription_plan_for_account_stubbed::hyper_request(theBuilder)?;
5173
5174        ::log::debug!("HTTP request: {:?}", &theRequest);
5175
5176        let theResponse = self.client.request(theRequest).await?;
5177
5178        ::log::debug!("HTTP response: {:?}", &theResponse);
5179
5180        Ok(theResponse)
5181    }
5182
5183    /// List plans (stubbed)
5184    /// 
5185    /// Lists all plans that are part of your GitHub Marketplace listing.
5186    /// 
5187    /// GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
5188    /// 
5189    /// [API method documentation](https://docs.github.com/rest/reference/apps#list-plans-stubbed)
5190    pub async fn apps_list_plans_stubbed(
5191        &self,
5192        per_page: ::std::option::Option<i64>,
5193        page: ::std::option::Option<i64>,
5194    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5195        let mut theScheme = AuthScheme::from(&self.config.authentication);
5196
5197        while let Some(auth_step) = theScheme.step()? {
5198            match auth_step {
5199                ::authentic::AuthenticationStep::Request(auth_request) => {
5200                    theScheme.respond(self.client.request(auth_request).await);
5201                }
5202                ::authentic::AuthenticationStep::WaitFor(duration) => {
5203                    (self.sleep)(duration).await;
5204                }
5205            }
5206        }
5207        let theBuilder = crate::v1_1_4::request::apps_list_plans_stubbed::http_builder(
5208            self.config.base_url.as_ref(),
5209            per_page,
5210            page,
5211            self.config.user_agent.as_ref(),
5212            self.config.accept.as_deref(),
5213        )?
5214        .with_authentication(&theScheme)?;
5215
5216        let theRequest =
5217            crate::v1_1_4::request::apps_list_plans_stubbed::hyper_request(theBuilder)?;
5218
5219        ::log::debug!("HTTP request: {:?}", &theRequest);
5220
5221        let theResponse = self.client.request(theRequest).await?;
5222
5223        ::log::debug!("HTTP response: {:?}", &theResponse);
5224
5225        Ok(theResponse)
5226    }
5227
5228    /// List accounts for a plan (stubbed)
5229    /// 
5230    /// Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.
5231    /// 
5232    /// GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint.
5233    /// 
5234    /// [API method documentation](https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed)
5235    pub async fn apps_list_accounts_for_plan_stubbed(
5236        &self,
5237        plan_id: i64,
5238        sort: &crate::types::Sort<'_>,
5239        per_page: ::std::option::Option<i64>,
5240        page: ::std::option::Option<i64>,
5241    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5242        let (sort, direction) = sort.extract();
5243        let mut theScheme = AuthScheme::from(&self.config.authentication);
5244
5245        while let Some(auth_step) = theScheme.step()? {
5246            match auth_step {
5247                ::authentic::AuthenticationStep::Request(auth_request) => {
5248                    theScheme.respond(self.client.request(auth_request).await);
5249                }
5250                ::authentic::AuthenticationStep::WaitFor(duration) => {
5251                    (self.sleep)(duration).await;
5252                }
5253            }
5254        }
5255        let theBuilder = crate::v1_1_4::request::apps_list_accounts_for_plan_stubbed::http_builder(
5256            self.config.base_url.as_ref(),
5257            plan_id,
5258            sort,
5259            direction,
5260            per_page,
5261            page,
5262            self.config.user_agent.as_ref(),
5263            self.config.accept.as_deref(),
5264        )?
5265        .with_authentication(&theScheme)?;
5266
5267        let theRequest =
5268            crate::v1_1_4::request::apps_list_accounts_for_plan_stubbed::hyper_request(theBuilder)?;
5269
5270        ::log::debug!("HTTP request: {:?}", &theRequest);
5271
5272        let theResponse = self.client.request(theRequest).await?;
5273
5274        ::log::debug!("HTTP response: {:?}", &theResponse);
5275
5276        Ok(theResponse)
5277    }
5278
5279    /// Get GitHub meta information
5280    /// 
5281    /// Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)."
5282    /// 
5283    /// **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses.
5284    /// 
5285    /// [API method documentation](https://docs.github.com/rest/reference/meta#get-github-meta-information)
5286    pub async fn meta_get(
5287        &self,
5288    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5289        let mut theScheme = AuthScheme::from(&self.config.authentication);
5290
5291        while let Some(auth_step) = theScheme.step()? {
5292            match auth_step {
5293                ::authentic::AuthenticationStep::Request(auth_request) => {
5294                    theScheme.respond(self.client.request(auth_request).await);
5295                }
5296                ::authentic::AuthenticationStep::WaitFor(duration) => {
5297                    (self.sleep)(duration).await;
5298                }
5299            }
5300        }
5301        let theBuilder = crate::v1_1_4::request::meta_get::http_builder(
5302            self.config.base_url.as_ref(),
5303            self.config.user_agent.as_ref(),
5304            self.config.accept.as_deref(),
5305        )?
5306        .with_authentication(&theScheme)?;
5307
5308        let theRequest =
5309            crate::v1_1_4::request::meta_get::hyper_request(theBuilder)?;
5310
5311        ::log::debug!("HTTP request: {:?}", &theRequest);
5312
5313        let theResponse = self.client.request(theRequest).await?;
5314
5315        ::log::debug!("HTTP response: {:?}", &theResponse);
5316
5317        Ok(theResponse)
5318    }
5319
5320    /// List public events for a network of repositories
5321    /// 
5322    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories)
5323    pub async fn activity_list_public_events_for_repo_network(
5324        &self,
5325        owner: &str,
5326        repo: &str,
5327        per_page: ::std::option::Option<i64>,
5328        page: ::std::option::Option<i64>,
5329    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5330        let mut theScheme = AuthScheme::from(&self.config.authentication);
5331
5332        while let Some(auth_step) = theScheme.step()? {
5333            match auth_step {
5334                ::authentic::AuthenticationStep::Request(auth_request) => {
5335                    theScheme.respond(self.client.request(auth_request).await);
5336                }
5337                ::authentic::AuthenticationStep::WaitFor(duration) => {
5338                    (self.sleep)(duration).await;
5339                }
5340            }
5341        }
5342        let theBuilder = crate::v1_1_4::request::activity_list_public_events_for_repo_network::http_builder(
5343            self.config.base_url.as_ref(),
5344            owner,
5345            repo,
5346            per_page,
5347            page,
5348            self.config.user_agent.as_ref(),
5349            self.config.accept.as_deref(),
5350        )?
5351        .with_authentication(&theScheme)?;
5352
5353        let theRequest =
5354            crate::v1_1_4::request::activity_list_public_events_for_repo_network::hyper_request(theBuilder)?;
5355
5356        ::log::debug!("HTTP request: {:?}", &theRequest);
5357
5358        let theResponse = self.client.request(theRequest).await?;
5359
5360        ::log::debug!("HTTP response: {:?}", &theResponse);
5361
5362        Ok(theResponse)
5363    }
5364
5365    /// List notifications for the authenticated user
5366    /// 
5367    /// List all notifications for the current user, sorted by most recently updated.
5368    /// 
5369    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user)
5370    pub async fn activity_list_notifications_for_authenticated_user(
5371        &self,
5372        all: ::std::option::Option<bool>,
5373        participating: ::std::option::Option<bool>,
5374        since: ::std::option::Option<&str>,
5375        before: ::std::option::Option<&str>,
5376        per_page: ::std::option::Option<i64>,
5377        page: ::std::option::Option<i64>,
5378    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5379        let mut theScheme = AuthScheme::from(&self.config.authentication);
5380
5381        while let Some(auth_step) = theScheme.step()? {
5382            match auth_step {
5383                ::authentic::AuthenticationStep::Request(auth_request) => {
5384                    theScheme.respond(self.client.request(auth_request).await);
5385                }
5386                ::authentic::AuthenticationStep::WaitFor(duration) => {
5387                    (self.sleep)(duration).await;
5388                }
5389            }
5390        }
5391        let theBuilder = crate::v1_1_4::request::activity_list_notifications_for_authenticated_user::http_builder(
5392            self.config.base_url.as_ref(),
5393            all,
5394            participating,
5395            since,
5396            before,
5397            per_page,
5398            page,
5399            self.config.user_agent.as_ref(),
5400            self.config.accept.as_deref(),
5401        )?
5402        .with_authentication(&theScheme)?;
5403
5404        let theRequest =
5405            crate::v1_1_4::request::activity_list_notifications_for_authenticated_user::hyper_request(theBuilder)?;
5406
5407        ::log::debug!("HTTP request: {:?}", &theRequest);
5408
5409        let theResponse = self.client.request(theRequest).await?;
5410
5411        ::log::debug!("HTTP response: {:?}", &theResponse);
5412
5413        Ok(theResponse)
5414    }
5415
5416    /// Mark notifications as read
5417    /// 
5418    /// Marks all notifications as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`.
5419    /// 
5420    /// [API method documentation](https://docs.github.com/rest/reference/activity#mark-notifications-as-read)
5421    ///
5422    /// # Content
5423    ///
5424    /// - [`&v1_1_4::request::activity_mark_notifications_as_read::body::Json`](crate::v1_1_4::request::activity_mark_notifications_as_read::body::Json)
5425    pub async fn activity_mark_notifications_as_read<Content>(
5426        &self,
5427        theContent: Content,
5428    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
5429    where
5430        Content: Copy + TryInto<crate::v1_1_4::request::activity_mark_notifications_as_read::Content<::hyper::Body>>,
5431        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::activity_mark_notifications_as_read::Content<::hyper::Body>>>::Error>
5432    {
5433        let mut theScheme = AuthScheme::from(&self.config.authentication);
5434
5435        while let Some(auth_step) = theScheme.step()? {
5436            match auth_step {
5437                ::authentic::AuthenticationStep::Request(auth_request) => {
5438                    theScheme.respond(self.client.request(auth_request).await);
5439                }
5440                ::authentic::AuthenticationStep::WaitFor(duration) => {
5441                    (self.sleep)(duration).await;
5442                }
5443            }
5444        }
5445        let theBuilder = crate::v1_1_4::request::activity_mark_notifications_as_read::http_builder(
5446            self.config.base_url.as_ref(),
5447            self.config.user_agent.as_ref(),
5448            self.config.accept.as_deref(),
5449        )?
5450        .with_authentication(&theScheme)?;
5451
5452        let theRequest = crate::v1_1_4::request::activity_mark_notifications_as_read::hyper_request(
5453            theBuilder,
5454            theContent.try_into()?,
5455        )?;
5456
5457        ::log::debug!("HTTP request: {:?}", &theRequest);
5458
5459        let theResponse = self.client.request(theRequest).await?;
5460
5461        ::log::debug!("HTTP response: {:?}", &theResponse);
5462
5463        Ok(theResponse)
5464    }
5465
5466    /// Get a thread
5467    /// 
5468    /// [API method documentation](https://docs.github.com/rest/reference/activity#get-a-thread)
5469    pub async fn activity_get_thread(
5470        &self,
5471        thread_id: i64,
5472    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5473        let mut theScheme = AuthScheme::from(&self.config.authentication);
5474
5475        while let Some(auth_step) = theScheme.step()? {
5476            match auth_step {
5477                ::authentic::AuthenticationStep::Request(auth_request) => {
5478                    theScheme.respond(self.client.request(auth_request).await);
5479                }
5480                ::authentic::AuthenticationStep::WaitFor(duration) => {
5481                    (self.sleep)(duration).await;
5482                }
5483            }
5484        }
5485        let theBuilder = crate::v1_1_4::request::activity_get_thread::http_builder(
5486            self.config.base_url.as_ref(),
5487            thread_id,
5488            self.config.user_agent.as_ref(),
5489            self.config.accept.as_deref(),
5490        )?
5491        .with_authentication(&theScheme)?;
5492
5493        let theRequest =
5494            crate::v1_1_4::request::activity_get_thread::hyper_request(theBuilder)?;
5495
5496        ::log::debug!("HTTP request: {:?}", &theRequest);
5497
5498        let theResponse = self.client.request(theRequest).await?;
5499
5500        ::log::debug!("HTTP response: {:?}", &theResponse);
5501
5502        Ok(theResponse)
5503    }
5504
5505    /// Mark a thread as read
5506    /// 
5507    /// [API method documentation](https://docs.github.com/rest/reference/activity#mark-a-thread-as-read)
5508    pub async fn activity_mark_thread_as_read(
5509        &self,
5510        thread_id: i64,
5511    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5512        let mut theScheme = AuthScheme::from(&self.config.authentication);
5513
5514        while let Some(auth_step) = theScheme.step()? {
5515            match auth_step {
5516                ::authentic::AuthenticationStep::Request(auth_request) => {
5517                    theScheme.respond(self.client.request(auth_request).await);
5518                }
5519                ::authentic::AuthenticationStep::WaitFor(duration) => {
5520                    (self.sleep)(duration).await;
5521                }
5522            }
5523        }
5524        let theBuilder = crate::v1_1_4::request::activity_mark_thread_as_read::http_builder(
5525            self.config.base_url.as_ref(),
5526            thread_id,
5527            self.config.user_agent.as_ref(),
5528            self.config.accept.as_deref(),
5529        )?
5530        .with_authentication(&theScheme)?;
5531
5532        let theRequest =
5533            crate::v1_1_4::request::activity_mark_thread_as_read::hyper_request(theBuilder)?;
5534
5535        ::log::debug!("HTTP request: {:?}", &theRequest);
5536
5537        let theResponse = self.client.request(theRequest).await?;
5538
5539        ::log::debug!("HTTP response: {:?}", &theResponse);
5540
5541        Ok(theResponse)
5542    }
5543
5544    /// Get a thread subscription for the authenticated user
5545    /// 
5546    /// This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#get-a-repository-subscription).
5547    /// 
5548    /// Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread.
5549    /// 
5550    /// [API method documentation](https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user)
5551    pub async fn activity_get_thread_subscription_for_authenticated_user(
5552        &self,
5553        thread_id: i64,
5554    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5555        let mut theScheme = AuthScheme::from(&self.config.authentication);
5556
5557        while let Some(auth_step) = theScheme.step()? {
5558            match auth_step {
5559                ::authentic::AuthenticationStep::Request(auth_request) => {
5560                    theScheme.respond(self.client.request(auth_request).await);
5561                }
5562                ::authentic::AuthenticationStep::WaitFor(duration) => {
5563                    (self.sleep)(duration).await;
5564                }
5565            }
5566        }
5567        let theBuilder = crate::v1_1_4::request::activity_get_thread_subscription_for_authenticated_user::http_builder(
5568            self.config.base_url.as_ref(),
5569            thread_id,
5570            self.config.user_agent.as_ref(),
5571            self.config.accept.as_deref(),
5572        )?
5573        .with_authentication(&theScheme)?;
5574
5575        let theRequest =
5576            crate::v1_1_4::request::activity_get_thread_subscription_for_authenticated_user::hyper_request(theBuilder)?;
5577
5578        ::log::debug!("HTTP request: {:?}", &theRequest);
5579
5580        let theResponse = self.client.request(theRequest).await?;
5581
5582        ::log::debug!("HTTP response: {:?}", &theResponse);
5583
5584        Ok(theResponse)
5585    }
5586
5587    /// Set a thread subscription
5588    /// 
5589    /// If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**.
5590    /// 
5591    /// You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.
5592    /// 
5593    /// Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint.
5594    /// 
5595    /// [API method documentation](https://docs.github.com/rest/reference/activity#set-a-thread-subscription)
5596    ///
5597    /// # Content
5598    ///
5599    /// - [`&v1_1_4::request::activity_set_thread_subscription::body::Json`](crate::v1_1_4::request::activity_set_thread_subscription::body::Json)
5600    pub async fn activity_set_thread_subscription<Content>(
5601        &self,
5602        thread_id: i64,
5603        theContent: Content,
5604    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
5605    where
5606        Content: Copy + TryInto<crate::v1_1_4::request::activity_set_thread_subscription::Content<::hyper::Body>>,
5607        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::activity_set_thread_subscription::Content<::hyper::Body>>>::Error>
5608    {
5609        let mut theScheme = AuthScheme::from(&self.config.authentication);
5610
5611        while let Some(auth_step) = theScheme.step()? {
5612            match auth_step {
5613                ::authentic::AuthenticationStep::Request(auth_request) => {
5614                    theScheme.respond(self.client.request(auth_request).await);
5615                }
5616                ::authentic::AuthenticationStep::WaitFor(duration) => {
5617                    (self.sleep)(duration).await;
5618                }
5619            }
5620        }
5621        let theBuilder = crate::v1_1_4::request::activity_set_thread_subscription::http_builder(
5622            self.config.base_url.as_ref(),
5623            thread_id,
5624            self.config.user_agent.as_ref(),
5625            self.config.accept.as_deref(),
5626        )?
5627        .with_authentication(&theScheme)?;
5628
5629        let theRequest = crate::v1_1_4::request::activity_set_thread_subscription::hyper_request(
5630            theBuilder,
5631            theContent.try_into()?,
5632        )?;
5633
5634        ::log::debug!("HTTP request: {:?}", &theRequest);
5635
5636        let theResponse = self.client.request(theRequest).await?;
5637
5638        ::log::debug!("HTTP response: {:?}", &theResponse);
5639
5640        Ok(theResponse)
5641    }
5642
5643    /// Delete a thread subscription
5644    /// 
5645    /// Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`.
5646    /// 
5647    /// [API method documentation](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription)
5648    pub async fn activity_delete_thread_subscription(
5649        &self,
5650        thread_id: i64,
5651    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5652        let mut theScheme = AuthScheme::from(&self.config.authentication);
5653
5654        while let Some(auth_step) = theScheme.step()? {
5655            match auth_step {
5656                ::authentic::AuthenticationStep::Request(auth_request) => {
5657                    theScheme.respond(self.client.request(auth_request).await);
5658                }
5659                ::authentic::AuthenticationStep::WaitFor(duration) => {
5660                    (self.sleep)(duration).await;
5661                }
5662            }
5663        }
5664        let theBuilder = crate::v1_1_4::request::activity_delete_thread_subscription::http_builder(
5665            self.config.base_url.as_ref(),
5666            thread_id,
5667            self.config.user_agent.as_ref(),
5668            self.config.accept.as_deref(),
5669        )?
5670        .with_authentication(&theScheme)?;
5671
5672        let theRequest =
5673            crate::v1_1_4::request::activity_delete_thread_subscription::hyper_request(theBuilder)?;
5674
5675        ::log::debug!("HTTP request: {:?}", &theRequest);
5676
5677        let theResponse = self.client.request(theRequest).await?;
5678
5679        ::log::debug!("HTTP response: {:?}", &theResponse);
5680
5681        Ok(theResponse)
5682    }
5683
5684    /// Get Octocat
5685    /// 
5686    /// Get the octocat as ASCII art
5687    /// 
5688    /// [API method documentation](https://docs.github.com/rest/reference/meta#get-octocat)
5689    pub async fn meta_get_octocat(
5690        &self,
5691        s: ::std::option::Option<&str>,
5692    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5693        let mut theScheme = AuthScheme::from(&self.config.authentication);
5694
5695        while let Some(auth_step) = theScheme.step()? {
5696            match auth_step {
5697                ::authentic::AuthenticationStep::Request(auth_request) => {
5698                    theScheme.respond(self.client.request(auth_request).await);
5699                }
5700                ::authentic::AuthenticationStep::WaitFor(duration) => {
5701                    (self.sleep)(duration).await;
5702                }
5703            }
5704        }
5705        let theBuilder = crate::v1_1_4::request::meta_get_octocat::http_builder(
5706            self.config.base_url.as_ref(),
5707            s,
5708            self.config.user_agent.as_ref(),
5709            self.config.accept.as_deref(),
5710        )?
5711        .with_authentication(&theScheme)?;
5712
5713        let theRequest =
5714            crate::v1_1_4::request::meta_get_octocat::hyper_request(theBuilder)?;
5715
5716        ::log::debug!("HTTP request: {:?}", &theRequest);
5717
5718        let theResponse = self.client.request(theRequest).await?;
5719
5720        ::log::debug!("HTTP response: {:?}", &theResponse);
5721
5722        Ok(theResponse)
5723    }
5724
5725    /// List organizations
5726    /// 
5727    /// Lists all organizations, in the order that they were created on GitHub.
5728    /// 
5729    /// **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations.
5730    /// 
5731    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-organizations)
5732    pub async fn orgs_list(
5733        &self,
5734        since: ::std::option::Option<i64>,
5735        per_page: ::std::option::Option<i64>,
5736    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5737        let mut theScheme = AuthScheme::from(&self.config.authentication);
5738
5739        while let Some(auth_step) = theScheme.step()? {
5740            match auth_step {
5741                ::authentic::AuthenticationStep::Request(auth_request) => {
5742                    theScheme.respond(self.client.request(auth_request).await);
5743                }
5744                ::authentic::AuthenticationStep::WaitFor(duration) => {
5745                    (self.sleep)(duration).await;
5746                }
5747            }
5748        }
5749        let theBuilder = crate::v1_1_4::request::orgs_list::http_builder(
5750            self.config.base_url.as_ref(),
5751            since,
5752            per_page,
5753            self.config.user_agent.as_ref(),
5754            self.config.accept.as_deref(),
5755        )?
5756        .with_authentication(&theScheme)?;
5757
5758        let theRequest =
5759            crate::v1_1_4::request::orgs_list::hyper_request(theBuilder)?;
5760
5761        ::log::debug!("HTTP request: {:?}", &theRequest);
5762
5763        let theResponse = self.client.request(theRequest).await?;
5764
5765        ::log::debug!("HTTP response: {:?}", &theResponse);
5766
5767        Ok(theResponse)
5768    }
5769
5770    /// List custom repository roles in an organization
5771    /// 
5772    /// List the custom repository roles available in this organization. In order to see custom
5773    /// repository roles in an organization, the authenticated user must be an organization owner.
5774    /// 
5775    /// For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)".
5776    /// 
5777    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-custom-repository-roles-in-an-organization)
5778    pub async fn orgs_list_custom_roles(
5779        &self,
5780        organization_id: &str,
5781    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5782        let mut theScheme = AuthScheme::from(&self.config.authentication);
5783
5784        while let Some(auth_step) = theScheme.step()? {
5785            match auth_step {
5786                ::authentic::AuthenticationStep::Request(auth_request) => {
5787                    theScheme.respond(self.client.request(auth_request).await);
5788                }
5789                ::authentic::AuthenticationStep::WaitFor(duration) => {
5790                    (self.sleep)(duration).await;
5791                }
5792            }
5793        }
5794        let theBuilder = crate::v1_1_4::request::orgs_list_custom_roles::http_builder(
5795            self.config.base_url.as_ref(),
5796            organization_id,
5797            self.config.user_agent.as_ref(),
5798            self.config.accept.as_deref(),
5799        )?
5800        .with_authentication(&theScheme)?;
5801
5802        let theRequest =
5803            crate::v1_1_4::request::orgs_list_custom_roles::hyper_request(theBuilder)?;
5804
5805        ::log::debug!("HTTP request: {:?}", &theRequest);
5806
5807        let theResponse = self.client.request(theRequest).await?;
5808
5809        ::log::debug!("HTTP response: {:?}", &theResponse);
5810
5811        Ok(theResponse)
5812    }
5813
5814    /// Get an organization
5815    /// 
5816    /// To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).
5817    /// 
5818    /// GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below."
5819    /// 
5820    /// [API method documentation](https://docs.github.com/rest/reference/orgs#get-an-organization)
5821    pub async fn orgs_get(
5822        &self,
5823        org: &str,
5824    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5825        let mut theScheme = AuthScheme::from(&self.config.authentication);
5826
5827        while let Some(auth_step) = theScheme.step()? {
5828            match auth_step {
5829                ::authentic::AuthenticationStep::Request(auth_request) => {
5830                    theScheme.respond(self.client.request(auth_request).await);
5831                }
5832                ::authentic::AuthenticationStep::WaitFor(duration) => {
5833                    (self.sleep)(duration).await;
5834                }
5835            }
5836        }
5837        let theBuilder = crate::v1_1_4::request::orgs_get::http_builder(
5838            self.config.base_url.as_ref(),
5839            org,
5840            self.config.user_agent.as_ref(),
5841            self.config.accept.as_deref(),
5842        )?
5843        .with_authentication(&theScheme)?;
5844
5845        let theRequest =
5846            crate::v1_1_4::request::orgs_get::hyper_request(theBuilder)?;
5847
5848        ::log::debug!("HTTP request: {:?}", &theRequest);
5849
5850        let theResponse = self.client.request(theRequest).await?;
5851
5852        ::log::debug!("HTTP response: {:?}", &theResponse);
5853
5854        Ok(theResponse)
5855    }
5856
5857    /// Update an organization
5858    /// 
5859    /// **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).
5860    /// 
5861    /// Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges.
5862    /// 
5863    /// [API method documentation](https://docs.github.com/rest/reference/orgs/#update-an-organization)
5864    ///
5865    /// # Content
5866    ///
5867    /// - [`&v1_1_4::request::orgs_update::body::Json`](crate::v1_1_4::request::orgs_update::body::Json)
5868    pub async fn orgs_update<Content>(
5869        &self,
5870        org: &str,
5871        theContent: Content,
5872    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
5873    where
5874        Content: Copy + TryInto<crate::v1_1_4::request::orgs_update::Content<::hyper::Body>>,
5875        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::orgs_update::Content<::hyper::Body>>>::Error>
5876    {
5877        let mut theScheme = AuthScheme::from(&self.config.authentication);
5878
5879        while let Some(auth_step) = theScheme.step()? {
5880            match auth_step {
5881                ::authentic::AuthenticationStep::Request(auth_request) => {
5882                    theScheme.respond(self.client.request(auth_request).await);
5883                }
5884                ::authentic::AuthenticationStep::WaitFor(duration) => {
5885                    (self.sleep)(duration).await;
5886                }
5887            }
5888        }
5889        let theBuilder = crate::v1_1_4::request::orgs_update::http_builder(
5890            self.config.base_url.as_ref(),
5891            org,
5892            self.config.user_agent.as_ref(),
5893            self.config.accept.as_deref(),
5894        )?
5895        .with_authentication(&theScheme)?;
5896
5897        let theRequest = crate::v1_1_4::request::orgs_update::hyper_request(
5898            theBuilder,
5899            theContent.try_into()?,
5900        )?;
5901
5902        ::log::debug!("HTTP request: {:?}", &theRequest);
5903
5904        let theResponse = self.client.request(theRequest).await?;
5905
5906        ::log::debug!("HTTP response: {:?}", &theResponse);
5907
5908        Ok(theResponse)
5909    }
5910
5911    /// Get GitHub Actions cache usage for an organization
5912    /// 
5913    /// Gets the total GitHub Actions cache usage for an organization.
5914    /// The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.
5915    /// You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint.
5916    /// 
5917    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization)
5918    pub async fn actions_get_actions_cache_usage_for_org(
5919        &self,
5920        org: &str,
5921    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5922        let mut theScheme = AuthScheme::from(&self.config.authentication);
5923
5924        while let Some(auth_step) = theScheme.step()? {
5925            match auth_step {
5926                ::authentic::AuthenticationStep::Request(auth_request) => {
5927                    theScheme.respond(self.client.request(auth_request).await);
5928                }
5929                ::authentic::AuthenticationStep::WaitFor(duration) => {
5930                    (self.sleep)(duration).await;
5931                }
5932            }
5933        }
5934        let theBuilder = crate::v1_1_4::request::actions_get_actions_cache_usage_for_org::http_builder(
5935            self.config.base_url.as_ref(),
5936            org,
5937            self.config.user_agent.as_ref(),
5938            self.config.accept.as_deref(),
5939        )?
5940        .with_authentication(&theScheme)?;
5941
5942        let theRequest =
5943            crate::v1_1_4::request::actions_get_actions_cache_usage_for_org::hyper_request(theBuilder)?;
5944
5945        ::log::debug!("HTTP request: {:?}", &theRequest);
5946
5947        let theResponse = self.client.request(theRequest).await?;
5948
5949        ::log::debug!("HTTP response: {:?}", &theResponse);
5950
5951        Ok(theResponse)
5952    }
5953
5954    /// List repositories with GitHub Actions cache usage for an organization
5955    /// 
5956    /// Lists repositories and their GitHub Actions cache usage for an organization.
5957    /// The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.
5958    /// You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint.
5959    /// 
5960    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization)
5961    pub async fn actions_get_actions_cache_usage_by_repo_for_org(
5962        &self,
5963        org: &str,
5964        per_page: ::std::option::Option<i64>,
5965        page: ::std::option::Option<i64>,
5966    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
5967        let mut theScheme = AuthScheme::from(&self.config.authentication);
5968
5969        while let Some(auth_step) = theScheme.step()? {
5970            match auth_step {
5971                ::authentic::AuthenticationStep::Request(auth_request) => {
5972                    theScheme.respond(self.client.request(auth_request).await);
5973                }
5974                ::authentic::AuthenticationStep::WaitFor(duration) => {
5975                    (self.sleep)(duration).await;
5976                }
5977            }
5978        }
5979        let theBuilder = crate::v1_1_4::request::actions_get_actions_cache_usage_by_repo_for_org::http_builder(
5980            self.config.base_url.as_ref(),
5981            org,
5982            per_page,
5983            page,
5984            self.config.user_agent.as_ref(),
5985            self.config.accept.as_deref(),
5986        )?
5987        .with_authentication(&theScheme)?;
5988
5989        let theRequest =
5990            crate::v1_1_4::request::actions_get_actions_cache_usage_by_repo_for_org::hyper_request(theBuilder)?;
5991
5992        ::log::debug!("HTTP request: {:?}", &theRequest);
5993
5994        let theResponse = self.client.request(theRequest).await?;
5995
5996        ::log::debug!("HTTP response: {:?}", &theResponse);
5997
5998        Ok(theResponse)
5999    }
6000
6001    /// Get GitHub Actions permissions for an organization
6002    /// 
6003    /// Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.
6004    /// 
6005    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
6006    /// 
6007    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization)
6008    pub async fn actions_get_github_actions_permissions_organization(
6009        &self,
6010        org: &str,
6011    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
6012        let mut theScheme = AuthScheme::from(&self.config.authentication);
6013
6014        while let Some(auth_step) = theScheme.step()? {
6015            match auth_step {
6016                ::authentic::AuthenticationStep::Request(auth_request) => {
6017                    theScheme.respond(self.client.request(auth_request).await);
6018                }
6019                ::authentic::AuthenticationStep::WaitFor(duration) => {
6020                    (self.sleep)(duration).await;
6021                }
6022            }
6023        }
6024        let theBuilder = crate::v1_1_4::request::actions_get_github_actions_permissions_organization::http_builder(
6025            self.config.base_url.as_ref(),
6026            org,
6027            self.config.user_agent.as_ref(),
6028            self.config.accept.as_deref(),
6029        )?
6030        .with_authentication(&theScheme)?;
6031
6032        let theRequest =
6033            crate::v1_1_4::request::actions_get_github_actions_permissions_organization::hyper_request(theBuilder)?;
6034
6035        ::log::debug!("HTTP request: {:?}", &theRequest);
6036
6037        let theResponse = self.client.request(theRequest).await?;
6038
6039        ::log::debug!("HTTP response: {:?}", &theResponse);
6040
6041        Ok(theResponse)
6042    }
6043
6044    /// Set GitHub Actions permissions for an organization
6045    /// 
6046    /// Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization.
6047    /// 
6048    /// If the organization belongs to an enterprise that has set restrictive permissions at the enterprise level, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the organization.
6049    /// 
6050    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
6051    /// 
6052    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization)
6053    ///
6054    /// # Content
6055    ///
6056    /// - [`&v1_1_4::request::actions_set_github_actions_permissions_organization::body::Json`](crate::v1_1_4::request::actions_set_github_actions_permissions_organization::body::Json)
6057    pub async fn actions_set_github_actions_permissions_organization<Content>(
6058        &self,
6059        org: &str,
6060        theContent: Content,
6061    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
6062    where
6063        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_github_actions_permissions_organization::Content<::hyper::Body>>,
6064        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_github_actions_permissions_organization::Content<::hyper::Body>>>::Error>
6065    {
6066        let mut theScheme = AuthScheme::from(&self.config.authentication);
6067
6068        while let Some(auth_step) = theScheme.step()? {
6069            match auth_step {
6070                ::authentic::AuthenticationStep::Request(auth_request) => {
6071                    theScheme.respond(self.client.request(auth_request).await);
6072                }
6073                ::authentic::AuthenticationStep::WaitFor(duration) => {
6074                    (self.sleep)(duration).await;
6075                }
6076            }
6077        }
6078        let theBuilder = crate::v1_1_4::request::actions_set_github_actions_permissions_organization::http_builder(
6079            self.config.base_url.as_ref(),
6080            org,
6081            self.config.user_agent.as_ref(),
6082            self.config.accept.as_deref(),
6083        )?
6084        .with_authentication(&theScheme)?;
6085
6086        let theRequest = crate::v1_1_4::request::actions_set_github_actions_permissions_organization::hyper_request(
6087            theBuilder,
6088            theContent.try_into()?,
6089        )?;
6090
6091        ::log::debug!("HTTP request: {:?}", &theRequest);
6092
6093        let theResponse = self.client.request(theRequest).await?;
6094
6095        ::log::debug!("HTTP response: {:?}", &theResponse);
6096
6097        Ok(theResponse)
6098    }
6099
6100    /// List selected repositories enabled for GitHub Actions in an organization
6101    /// 
6102    /// Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
6103    /// 
6104    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
6105    /// 
6106    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization)
6107    pub async fn actions_list_selected_repositories_enabled_github_actions_organization(
6108        &self,
6109        org: &str,
6110        per_page: ::std::option::Option<i64>,
6111        page: ::std::option::Option<i64>,
6112    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
6113        let mut theScheme = AuthScheme::from(&self.config.authentication);
6114
6115        while let Some(auth_step) = theScheme.step()? {
6116            match auth_step {
6117                ::authentic::AuthenticationStep::Request(auth_request) => {
6118                    theScheme.respond(self.client.request(auth_request).await);
6119                }
6120                ::authentic::AuthenticationStep::WaitFor(duration) => {
6121                    (self.sleep)(duration).await;
6122                }
6123            }
6124        }
6125        let theBuilder = crate::v1_1_4::request::actions_list_selected_repositories_enabled_github_actions_organization::http_builder(
6126            self.config.base_url.as_ref(),
6127            org,
6128            per_page,
6129            page,
6130            self.config.user_agent.as_ref(),
6131            self.config.accept.as_deref(),
6132        )?
6133        .with_authentication(&theScheme)?;
6134
6135        let theRequest =
6136            crate::v1_1_4::request::actions_list_selected_repositories_enabled_github_actions_organization::hyper_request(theBuilder)?;
6137
6138        ::log::debug!("HTTP request: {:?}", &theRequest);
6139
6140        let theResponse = self.client.request(theRequest).await?;
6141
6142        ::log::debug!("HTTP response: {:?}", &theResponse);
6143
6144        Ok(theResponse)
6145    }
6146
6147    /// Set selected repositories enabled for GitHub Actions in an organization
6148    /// 
6149    /// Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
6150    /// 
6151    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
6152    /// 
6153    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization)
6154    ///
6155    /// # Content
6156    ///
6157    /// - [`&v1_1_4::request::actions_set_selected_repositories_enabled_github_actions_organization::body::Json`](crate::v1_1_4::request::actions_set_selected_repositories_enabled_github_actions_organization::body::Json)
6158    pub async fn actions_set_selected_repositories_enabled_github_actions_organization<Content>(
6159        &self,
6160        org: &str,
6161        theContent: Content,
6162    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
6163    where
6164        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_selected_repositories_enabled_github_actions_organization::Content<::hyper::Body>>,
6165        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_selected_repositories_enabled_github_actions_organization::Content<::hyper::Body>>>::Error>
6166    {
6167        let mut theScheme = AuthScheme::from(&self.config.authentication);
6168
6169        while let Some(auth_step) = theScheme.step()? {
6170            match auth_step {
6171                ::authentic::AuthenticationStep::Request(auth_request) => {
6172                    theScheme.respond(self.client.request(auth_request).await);
6173                }
6174                ::authentic::AuthenticationStep::WaitFor(duration) => {
6175                    (self.sleep)(duration).await;
6176                }
6177            }
6178        }
6179        let theBuilder = crate::v1_1_4::request::actions_set_selected_repositories_enabled_github_actions_organization::http_builder(
6180            self.config.base_url.as_ref(),
6181            org,
6182            self.config.user_agent.as_ref(),
6183            self.config.accept.as_deref(),
6184        )?
6185        .with_authentication(&theScheme)?;
6186
6187        let theRequest = crate::v1_1_4::request::actions_set_selected_repositories_enabled_github_actions_organization::hyper_request(
6188            theBuilder,
6189            theContent.try_into()?,
6190        )?;
6191
6192        ::log::debug!("HTTP request: {:?}", &theRequest);
6193
6194        let theResponse = self.client.request(theRequest).await?;
6195
6196        ::log::debug!("HTTP response: {:?}", &theResponse);
6197
6198        Ok(theResponse)
6199    }
6200
6201    /// Enable a selected repository for GitHub Actions in an organization
6202    /// 
6203    /// Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
6204    /// 
6205    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
6206    /// 
6207    /// [API method documentation](https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization)
6208    pub async fn actions_enable_selected_repository_github_actions_organization(
6209        &self,
6210        org: &str,
6211        repository_id: i64,
6212    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
6213        let mut theScheme = AuthScheme::from(&self.config.authentication);
6214
6215        while let Some(auth_step) = theScheme.step()? {
6216            match auth_step {
6217                ::authentic::AuthenticationStep::Request(auth_request) => {
6218                    theScheme.respond(self.client.request(auth_request).await);
6219                }
6220                ::authentic::AuthenticationStep::WaitFor(duration) => {
6221                    (self.sleep)(duration).await;
6222                }
6223            }
6224        }
6225        let theBuilder = crate::v1_1_4::request::actions_enable_selected_repository_github_actions_organization::http_builder(
6226            self.config.base_url.as_ref(),
6227            org,
6228            repository_id,
6229            self.config.user_agent.as_ref(),
6230            self.config.accept.as_deref(),
6231        )?
6232        .with_authentication(&theScheme)?;
6233
6234        let theRequest =
6235            crate::v1_1_4::request::actions_enable_selected_repository_github_actions_organization::hyper_request(theBuilder)?;
6236
6237        ::log::debug!("HTTP request: {:?}", &theRequest);
6238
6239        let theResponse = self.client.request(theRequest).await?;
6240
6241        ::log::debug!("HTTP response: {:?}", &theResponse);
6242
6243        Ok(theResponse)
6244    }
6245
6246    /// Disable a selected repository for GitHub Actions in an organization
6247    /// 
6248    /// Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
6249    /// 
6250    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
6251    /// 
6252    /// [API method documentation](https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization)
6253    pub async fn actions_disable_selected_repository_github_actions_organization(
6254        &self,
6255        org: &str,
6256        repository_id: i64,
6257    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
6258        let mut theScheme = AuthScheme::from(&self.config.authentication);
6259
6260        while let Some(auth_step) = theScheme.step()? {
6261            match auth_step {
6262                ::authentic::AuthenticationStep::Request(auth_request) => {
6263                    theScheme.respond(self.client.request(auth_request).await);
6264                }
6265                ::authentic::AuthenticationStep::WaitFor(duration) => {
6266                    (self.sleep)(duration).await;
6267                }
6268            }
6269        }
6270        let theBuilder = crate::v1_1_4::request::actions_disable_selected_repository_github_actions_organization::http_builder(
6271            self.config.base_url.as_ref(),
6272            org,
6273            repository_id,
6274            self.config.user_agent.as_ref(),
6275            self.config.accept.as_deref(),
6276        )?
6277        .with_authentication(&theScheme)?;
6278
6279        let theRequest =
6280            crate::v1_1_4::request::actions_disable_selected_repository_github_actions_organization::hyper_request(theBuilder)?;
6281
6282        ::log::debug!("HTTP request: {:?}", &theRequest);
6283
6284        let theResponse = self.client.request(theRequest).await?;
6285
6286        ::log::debug!("HTTP response: {:?}", &theResponse);
6287
6288        Ok(theResponse)
6289    }
6290
6291    /// Get allowed actions and reusable workflows for an organization
6292    /// 
6293    /// Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).""
6294    /// 
6295    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
6296    /// 
6297    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization)
6298    pub async fn actions_get_allowed_actions_organization(
6299        &self,
6300        org: &str,
6301    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
6302        let mut theScheme = AuthScheme::from(&self.config.authentication);
6303
6304        while let Some(auth_step) = theScheme.step()? {
6305            match auth_step {
6306                ::authentic::AuthenticationStep::Request(auth_request) => {
6307                    theScheme.respond(self.client.request(auth_request).await);
6308                }
6309                ::authentic::AuthenticationStep::WaitFor(duration) => {
6310                    (self.sleep)(duration).await;
6311                }
6312            }
6313        }
6314        let theBuilder = crate::v1_1_4::request::actions_get_allowed_actions_organization::http_builder(
6315            self.config.base_url.as_ref(),
6316            org,
6317            self.config.user_agent.as_ref(),
6318            self.config.accept.as_deref(),
6319        )?
6320        .with_authentication(&theScheme)?;
6321
6322        let theRequest =
6323            crate::v1_1_4::request::actions_get_allowed_actions_organization::hyper_request(theBuilder)?;
6324
6325        ::log::debug!("HTTP request: {:?}", &theRequest);
6326
6327        let theResponse = self.client.request(theRequest).await?;
6328
6329        ::log::debug!("HTTP response: {:?}", &theResponse);
6330
6331        Ok(theResponse)
6332    }
6333
6334    /// Set allowed actions and reusable workflows for an organization
6335    /// 
6336    /// Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."
6337    /// 
6338    /// If the organization belongs to an enterprise that has `selected` actions and reusable workflows set at the enterprise level, then you cannot override any of the enterprise's allowed actions and reusable workflows settings.
6339    /// 
6340    /// To use the `patterns_allowed` setting for private repositories, the organization must belong to an enterprise. If the organization does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories in the organization.
6341    /// 
6342    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
6343    /// 
6344    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization)
6345    ///
6346    /// # Content
6347    ///
6348    /// - [`&v1_1_4::schema::SelectedActions`](crate::v1_1_4::schema::SelectedActions)
6349    pub async fn actions_set_allowed_actions_organization<Content>(
6350        &self,
6351        org: &str,
6352        theContent: Content,
6353    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
6354    where
6355        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_allowed_actions_organization::Content<::hyper::Body>>,
6356        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_allowed_actions_organization::Content<::hyper::Body>>>::Error>
6357    {
6358        let mut theScheme = AuthScheme::from(&self.config.authentication);
6359
6360        while let Some(auth_step) = theScheme.step()? {
6361            match auth_step {
6362                ::authentic::AuthenticationStep::Request(auth_request) => {
6363                    theScheme.respond(self.client.request(auth_request).await);
6364                }
6365                ::authentic::AuthenticationStep::WaitFor(duration) => {
6366                    (self.sleep)(duration).await;
6367                }
6368            }
6369        }
6370        let theBuilder = crate::v1_1_4::request::actions_set_allowed_actions_organization::http_builder(
6371            self.config.base_url.as_ref(),
6372            org,
6373            self.config.user_agent.as_ref(),
6374            self.config.accept.as_deref(),
6375        )?
6376        .with_authentication(&theScheme)?;
6377
6378        let theRequest = crate::v1_1_4::request::actions_set_allowed_actions_organization::hyper_request(
6379            theBuilder,
6380            theContent.try_into()?,
6381        )?;
6382
6383        ::log::debug!("HTTP request: {:?}", &theRequest);
6384
6385        let theResponse = self.client.request(theRequest).await?;
6386
6387        ::log::debug!("HTTP response: {:?}", &theResponse);
6388
6389        Ok(theResponse)
6390    }
6391
6392    /// Get default workflow permissions for an organization
6393    /// 
6394    /// Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization,
6395    /// as well as whether GitHub Actions can submit approving pull request reviews. For more information, see
6396    /// "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)."
6397    /// 
6398    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
6399    /// 
6400    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-default-workflow-permissions)
6401    pub async fn actions_get_github_actions_default_workflow_permissions_organization(
6402        &self,
6403        org: &str,
6404    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
6405        let mut theScheme = AuthScheme::from(&self.config.authentication);
6406
6407        while let Some(auth_step) = theScheme.step()? {
6408            match auth_step {
6409                ::authentic::AuthenticationStep::Request(auth_request) => {
6410                    theScheme.respond(self.client.request(auth_request).await);
6411                }
6412                ::authentic::AuthenticationStep::WaitFor(duration) => {
6413                    (self.sleep)(duration).await;
6414                }
6415            }
6416        }
6417        let theBuilder = crate::v1_1_4::request::actions_get_github_actions_default_workflow_permissions_organization::http_builder(
6418            self.config.base_url.as_ref(),
6419            org,
6420            self.config.user_agent.as_ref(),
6421            self.config.accept.as_deref(),
6422        )?
6423        .with_authentication(&theScheme)?;
6424
6425        let theRequest =
6426            crate::v1_1_4::request::actions_get_github_actions_default_workflow_permissions_organization::hyper_request(theBuilder)?;
6427
6428        ::log::debug!("HTTP request: {:?}", &theRequest);
6429
6430        let theResponse = self.client.request(theRequest).await?;
6431
6432        ::log::debug!("HTTP response: {:?}", &theResponse);
6433
6434        Ok(theResponse)
6435    }
6436
6437    /// Set default workflow permissions for an organization
6438    /// 
6439    /// Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions
6440    /// can submit approving pull request reviews. For more information, see
6441    /// "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)."
6442    /// 
6443    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API.
6444    /// 
6445    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-default-workflow-permissions)
6446    ///
6447    /// # Content
6448    ///
6449    /// - [`&v1_1_4::schema::ActionsSetDefaultWorkflowPermissions`](crate::v1_1_4::schema::ActionsSetDefaultWorkflowPermissions)
6450    pub async fn actions_set_github_actions_default_workflow_permissions_organization<Content>(
6451        &self,
6452        org: &str,
6453        theContent: Content,
6454    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
6455    where
6456        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_github_actions_default_workflow_permissions_organization::Content<::hyper::Body>>,
6457        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_github_actions_default_workflow_permissions_organization::Content<::hyper::Body>>>::Error>
6458    {
6459        let mut theScheme = AuthScheme::from(&self.config.authentication);
6460
6461        while let Some(auth_step) = theScheme.step()? {
6462            match auth_step {
6463                ::authentic::AuthenticationStep::Request(auth_request) => {
6464                    theScheme.respond(self.client.request(auth_request).await);
6465                }
6466                ::authentic::AuthenticationStep::WaitFor(duration) => {
6467                    (self.sleep)(duration).await;
6468                }
6469            }
6470        }
6471        let theBuilder = crate::v1_1_4::request::actions_set_github_actions_default_workflow_permissions_organization::http_builder(
6472            self.config.base_url.as_ref(),
6473            org,
6474            self.config.user_agent.as_ref(),
6475            self.config.accept.as_deref(),
6476        )?
6477        .with_authentication(&theScheme)?;
6478
6479        let theRequest = crate::v1_1_4::request::actions_set_github_actions_default_workflow_permissions_organization::hyper_request(
6480            theBuilder,
6481            theContent.try_into()?,
6482        )?;
6483
6484        ::log::debug!("HTTP request: {:?}", &theRequest);
6485
6486        let theResponse = self.client.request(theRequest).await?;
6487
6488        ::log::debug!("HTTP response: {:?}", &theResponse);
6489
6490        Ok(theResponse)
6491    }
6492
6493    /// List self-hosted runner groups for an organization
6494    /// 
6495    /// The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
6496    /// 
6497    /// Lists all self-hosted runner groups configured in an organization and inherited from an enterprise.
6498    /// 
6499    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
6500    /// 
6501    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization)
6502    pub async fn actions_list_self_hosted_runner_groups_for_org(
6503        &self,
6504        org: &str,
6505        per_page: ::std::option::Option<i64>,
6506        page: ::std::option::Option<i64>,
6507        visible_to_repository: ::std::option::Option<&str>,
6508    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
6509        let mut theScheme = AuthScheme::from(&self.config.authentication);
6510
6511        while let Some(auth_step) = theScheme.step()? {
6512            match auth_step {
6513                ::authentic::AuthenticationStep::Request(auth_request) => {
6514                    theScheme.respond(self.client.request(auth_request).await);
6515                }
6516                ::authentic::AuthenticationStep::WaitFor(duration) => {
6517                    (self.sleep)(duration).await;
6518                }
6519            }
6520        }
6521        let theBuilder = crate::v1_1_4::request::actions_list_self_hosted_runner_groups_for_org::http_builder(
6522            self.config.base_url.as_ref(),
6523            org,
6524            per_page,
6525            page,
6526            visible_to_repository,
6527            self.config.user_agent.as_ref(),
6528            self.config.accept.as_deref(),
6529        )?
6530        .with_authentication(&theScheme)?;
6531
6532        let theRequest =
6533            crate::v1_1_4::request::actions_list_self_hosted_runner_groups_for_org::hyper_request(theBuilder)?;
6534
6535        ::log::debug!("HTTP request: {:?}", &theRequest);
6536
6537        let theResponse = self.client.request(theRequest).await?;
6538
6539        ::log::debug!("HTTP response: {:?}", &theResponse);
6540
6541        Ok(theResponse)
6542    }
6543
6544    /// Create a self-hosted runner group for an organization
6545    /// 
6546    /// The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
6547    /// 
6548    /// Creates a new self-hosted runner group for an organization.
6549    /// 
6550    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
6551    /// 
6552    /// [API method documentation](https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization)
6553    ///
6554    /// # Content
6555    ///
6556    /// - [`&v1_1_4::request::actions_create_self_hosted_runner_group_for_org::body::Json`](crate::v1_1_4::request::actions_create_self_hosted_runner_group_for_org::body::Json)
6557    pub async fn actions_create_self_hosted_runner_group_for_org<Content>(
6558        &self,
6559        org: &str,
6560        theContent: Content,
6561    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
6562    where
6563        Content: Copy + TryInto<crate::v1_1_4::request::actions_create_self_hosted_runner_group_for_org::Content<::hyper::Body>>,
6564        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_create_self_hosted_runner_group_for_org::Content<::hyper::Body>>>::Error>
6565    {
6566        let mut theScheme = AuthScheme::from(&self.config.authentication);
6567
6568        while let Some(auth_step) = theScheme.step()? {
6569            match auth_step {
6570                ::authentic::AuthenticationStep::Request(auth_request) => {
6571                    theScheme.respond(self.client.request(auth_request).await);
6572                }
6573                ::authentic::AuthenticationStep::WaitFor(duration) => {
6574                    (self.sleep)(duration).await;
6575                }
6576            }
6577        }
6578        let theBuilder = crate::v1_1_4::request::actions_create_self_hosted_runner_group_for_org::http_builder(
6579            self.config.base_url.as_ref(),
6580            org,
6581            self.config.user_agent.as_ref(),
6582            self.config.accept.as_deref(),
6583        )?
6584        .with_authentication(&theScheme)?;
6585
6586        let theRequest = crate::v1_1_4::request::actions_create_self_hosted_runner_group_for_org::hyper_request(
6587            theBuilder,
6588            theContent.try_into()?,
6589        )?;
6590
6591        ::log::debug!("HTTP request: {:?}", &theRequest);
6592
6593        let theResponse = self.client.request(theRequest).await?;
6594
6595        ::log::debug!("HTTP response: {:?}", &theResponse);
6596
6597        Ok(theResponse)
6598    }
6599
6600    /// Get a self-hosted runner group for an organization
6601    /// 
6602    /// The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
6603    /// 
6604    /// Gets a specific self-hosted runner group for an organization.
6605    /// 
6606    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
6607    /// 
6608    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization)
6609    pub async fn actions_get_self_hosted_runner_group_for_org(
6610        &self,
6611        org: &str,
6612        runner_group_id: i64,
6613    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
6614        let mut theScheme = AuthScheme::from(&self.config.authentication);
6615
6616        while let Some(auth_step) = theScheme.step()? {
6617            match auth_step {
6618                ::authentic::AuthenticationStep::Request(auth_request) => {
6619                    theScheme.respond(self.client.request(auth_request).await);
6620                }
6621                ::authentic::AuthenticationStep::WaitFor(duration) => {
6622                    (self.sleep)(duration).await;
6623                }
6624            }
6625        }
6626        let theBuilder = crate::v1_1_4::request::actions_get_self_hosted_runner_group_for_org::http_builder(
6627            self.config.base_url.as_ref(),
6628            org,
6629            runner_group_id,
6630            self.config.user_agent.as_ref(),
6631            self.config.accept.as_deref(),
6632        )?
6633        .with_authentication(&theScheme)?;
6634
6635        let theRequest =
6636            crate::v1_1_4::request::actions_get_self_hosted_runner_group_for_org::hyper_request(theBuilder)?;
6637
6638        ::log::debug!("HTTP request: {:?}", &theRequest);
6639
6640        let theResponse = self.client.request(theRequest).await?;
6641
6642        ::log::debug!("HTTP response: {:?}", &theResponse);
6643
6644        Ok(theResponse)
6645    }
6646
6647    /// Delete a self-hosted runner group from an organization
6648    /// 
6649    /// The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
6650    /// 
6651    /// Deletes a self-hosted runner group for an organization.
6652    /// 
6653    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
6654    /// 
6655    /// [API method documentation](https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization)
6656    pub async fn actions_delete_self_hosted_runner_group_from_org(
6657        &self,
6658        org: &str,
6659        runner_group_id: i64,
6660    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
6661        let mut theScheme = AuthScheme::from(&self.config.authentication);
6662
6663        while let Some(auth_step) = theScheme.step()? {
6664            match auth_step {
6665                ::authentic::AuthenticationStep::Request(auth_request) => {
6666                    theScheme.respond(self.client.request(auth_request).await);
6667                }
6668                ::authentic::AuthenticationStep::WaitFor(duration) => {
6669                    (self.sleep)(duration).await;
6670                }
6671            }
6672        }
6673        let theBuilder = crate::v1_1_4::request::actions_delete_self_hosted_runner_group_from_org::http_builder(
6674            self.config.base_url.as_ref(),
6675            org,
6676            runner_group_id,
6677            self.config.user_agent.as_ref(),
6678            self.config.accept.as_deref(),
6679        )?
6680        .with_authentication(&theScheme)?;
6681
6682        let theRequest =
6683            crate::v1_1_4::request::actions_delete_self_hosted_runner_group_from_org::hyper_request(theBuilder)?;
6684
6685        ::log::debug!("HTTP request: {:?}", &theRequest);
6686
6687        let theResponse = self.client.request(theRequest).await?;
6688
6689        ::log::debug!("HTTP response: {:?}", &theResponse);
6690
6691        Ok(theResponse)
6692    }
6693
6694    /// Update a self-hosted runner group for an organization
6695    /// 
6696    /// The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
6697    /// 
6698    /// Updates the `name` and `visibility` of a self-hosted runner group in an organization.
6699    /// 
6700    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
6701    /// 
6702    /// [API method documentation](https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization)
6703    ///
6704    /// # Content
6705    ///
6706    /// - [`&v1_1_4::request::actions_update_self_hosted_runner_group_for_org::body::Json`](crate::v1_1_4::request::actions_update_self_hosted_runner_group_for_org::body::Json)
6707    pub async fn actions_update_self_hosted_runner_group_for_org<Content>(
6708        &self,
6709        org: &str,
6710        runner_group_id: i64,
6711        theContent: Content,
6712    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
6713    where
6714        Content: Copy + TryInto<crate::v1_1_4::request::actions_update_self_hosted_runner_group_for_org::Content<::hyper::Body>>,
6715        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_update_self_hosted_runner_group_for_org::Content<::hyper::Body>>>::Error>
6716    {
6717        let mut theScheme = AuthScheme::from(&self.config.authentication);
6718
6719        while let Some(auth_step) = theScheme.step()? {
6720            match auth_step {
6721                ::authentic::AuthenticationStep::Request(auth_request) => {
6722                    theScheme.respond(self.client.request(auth_request).await);
6723                }
6724                ::authentic::AuthenticationStep::WaitFor(duration) => {
6725                    (self.sleep)(duration).await;
6726                }
6727            }
6728        }
6729        let theBuilder = crate::v1_1_4::request::actions_update_self_hosted_runner_group_for_org::http_builder(
6730            self.config.base_url.as_ref(),
6731            org,
6732            runner_group_id,
6733            self.config.user_agent.as_ref(),
6734            self.config.accept.as_deref(),
6735        )?
6736        .with_authentication(&theScheme)?;
6737
6738        let theRequest = crate::v1_1_4::request::actions_update_self_hosted_runner_group_for_org::hyper_request(
6739            theBuilder,
6740            theContent.try_into()?,
6741        )?;
6742
6743        ::log::debug!("HTTP request: {:?}", &theRequest);
6744
6745        let theResponse = self.client.request(theRequest).await?;
6746
6747        ::log::debug!("HTTP response: {:?}", &theResponse);
6748
6749        Ok(theResponse)
6750    }
6751
6752    /// List repository access to a self-hosted runner group in an organization
6753    /// 
6754    /// The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
6755    /// 
6756    /// Lists the repositories with access to a self-hosted runner group configured in an organization.
6757    /// 
6758    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
6759    /// 
6760    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization)
6761    pub async fn actions_list_repo_access_to_self_hosted_runner_group_in_org(
6762        &self,
6763        org: &str,
6764        runner_group_id: i64,
6765        page: ::std::option::Option<i64>,
6766        per_page: ::std::option::Option<i64>,
6767    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
6768        let mut theScheme = AuthScheme::from(&self.config.authentication);
6769
6770        while let Some(auth_step) = theScheme.step()? {
6771            match auth_step {
6772                ::authentic::AuthenticationStep::Request(auth_request) => {
6773                    theScheme.respond(self.client.request(auth_request).await);
6774                }
6775                ::authentic::AuthenticationStep::WaitFor(duration) => {
6776                    (self.sleep)(duration).await;
6777                }
6778            }
6779        }
6780        let theBuilder = crate::v1_1_4::request::actions_list_repo_access_to_self_hosted_runner_group_in_org::http_builder(
6781            self.config.base_url.as_ref(),
6782            org,
6783            runner_group_id,
6784            page,
6785            per_page,
6786            self.config.user_agent.as_ref(),
6787            self.config.accept.as_deref(),
6788        )?
6789        .with_authentication(&theScheme)?;
6790
6791        let theRequest =
6792            crate::v1_1_4::request::actions_list_repo_access_to_self_hosted_runner_group_in_org::hyper_request(theBuilder)?;
6793
6794        ::log::debug!("HTTP request: {:?}", &theRequest);
6795
6796        let theResponse = self.client.request(theRequest).await?;
6797
6798        ::log::debug!("HTTP response: {:?}", &theResponse);
6799
6800        Ok(theResponse)
6801    }
6802
6803    /// Set repository access for a self-hosted runner group in an organization
6804    /// 
6805    /// The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
6806    /// 
6807    /// Replaces the list of repositories that have access to a self-hosted runner group configured in an organization.
6808    /// 
6809    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
6810    /// 
6811    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization)
6812    ///
6813    /// # Content
6814    ///
6815    /// - [`&v1_1_4::request::actions_set_repo_access_to_self_hosted_runner_group_in_org::body::Json`](crate::v1_1_4::request::actions_set_repo_access_to_self_hosted_runner_group_in_org::body::Json)
6816    pub async fn actions_set_repo_access_to_self_hosted_runner_group_in_org<Content>(
6817        &self,
6818        org: &str,
6819        runner_group_id: i64,
6820        theContent: Content,
6821    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
6822    where
6823        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_repo_access_to_self_hosted_runner_group_in_org::Content<::hyper::Body>>,
6824        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_repo_access_to_self_hosted_runner_group_in_org::Content<::hyper::Body>>>::Error>
6825    {
6826        let mut theScheme = AuthScheme::from(&self.config.authentication);
6827
6828        while let Some(auth_step) = theScheme.step()? {
6829            match auth_step {
6830                ::authentic::AuthenticationStep::Request(auth_request) => {
6831                    theScheme.respond(self.client.request(auth_request).await);
6832                }
6833                ::authentic::AuthenticationStep::WaitFor(duration) => {
6834                    (self.sleep)(duration).await;
6835                }
6836            }
6837        }
6838        let theBuilder = crate::v1_1_4::request::actions_set_repo_access_to_self_hosted_runner_group_in_org::http_builder(
6839            self.config.base_url.as_ref(),
6840            org,
6841            runner_group_id,
6842            self.config.user_agent.as_ref(),
6843            self.config.accept.as_deref(),
6844        )?
6845        .with_authentication(&theScheme)?;
6846
6847        let theRequest = crate::v1_1_4::request::actions_set_repo_access_to_self_hosted_runner_group_in_org::hyper_request(
6848            theBuilder,
6849            theContent.try_into()?,
6850        )?;
6851
6852        ::log::debug!("HTTP request: {:?}", &theRequest);
6853
6854        let theResponse = self.client.request(theRequest).await?;
6855
6856        ::log::debug!("HTTP response: {:?}", &theResponse);
6857
6858        Ok(theResponse)
6859    }
6860
6861    /// Add repository access to a self-hosted runner group in an organization
6862    /// 
6863    /// The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
6864    /// 
6865    /// 
6866    /// Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)."
6867    /// 
6868    /// You must authenticate using an access token with the `admin:org`
6869    /// scope to use this endpoint.
6870    /// 
6871    /// [API method documentation](https://docs.github.com/rest/reference/actions#add-repository-acess-to-a-self-hosted-runner-group-in-an-organization)
6872    pub async fn actions_add_repo_access_to_self_hosted_runner_group_in_org(
6873        &self,
6874        org: &str,
6875        runner_group_id: i64,
6876        repository_id: i64,
6877    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
6878        let mut theScheme = AuthScheme::from(&self.config.authentication);
6879
6880        while let Some(auth_step) = theScheme.step()? {
6881            match auth_step {
6882                ::authentic::AuthenticationStep::Request(auth_request) => {
6883                    theScheme.respond(self.client.request(auth_request).await);
6884                }
6885                ::authentic::AuthenticationStep::WaitFor(duration) => {
6886                    (self.sleep)(duration).await;
6887                }
6888            }
6889        }
6890        let theBuilder = crate::v1_1_4::request::actions_add_repo_access_to_self_hosted_runner_group_in_org::http_builder(
6891            self.config.base_url.as_ref(),
6892            org,
6893            runner_group_id,
6894            repository_id,
6895            self.config.user_agent.as_ref(),
6896            self.config.accept.as_deref(),
6897        )?
6898        .with_authentication(&theScheme)?;
6899
6900        let theRequest =
6901            crate::v1_1_4::request::actions_add_repo_access_to_self_hosted_runner_group_in_org::hyper_request(theBuilder)?;
6902
6903        ::log::debug!("HTTP request: {:?}", &theRequest);
6904
6905        let theResponse = self.client.request(theRequest).await?;
6906
6907        ::log::debug!("HTTP response: {:?}", &theResponse);
6908
6909        Ok(theResponse)
6910    }
6911
6912    /// Remove repository access to a self-hosted runner group in an organization
6913    /// 
6914    /// The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
6915    /// 
6916    /// 
6917    /// Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)."
6918    /// 
6919    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
6920    /// 
6921    /// [API method documentation](https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization)
6922    pub async fn actions_remove_repo_access_to_self_hosted_runner_group_in_org(
6923        &self,
6924        org: &str,
6925        runner_group_id: i64,
6926        repository_id: i64,
6927    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
6928        let mut theScheme = AuthScheme::from(&self.config.authentication);
6929
6930        while let Some(auth_step) = theScheme.step()? {
6931            match auth_step {
6932                ::authentic::AuthenticationStep::Request(auth_request) => {
6933                    theScheme.respond(self.client.request(auth_request).await);
6934                }
6935                ::authentic::AuthenticationStep::WaitFor(duration) => {
6936                    (self.sleep)(duration).await;
6937                }
6938            }
6939        }
6940        let theBuilder = crate::v1_1_4::request::actions_remove_repo_access_to_self_hosted_runner_group_in_org::http_builder(
6941            self.config.base_url.as_ref(),
6942            org,
6943            runner_group_id,
6944            repository_id,
6945            self.config.user_agent.as_ref(),
6946            self.config.accept.as_deref(),
6947        )?
6948        .with_authentication(&theScheme)?;
6949
6950        let theRequest =
6951            crate::v1_1_4::request::actions_remove_repo_access_to_self_hosted_runner_group_in_org::hyper_request(theBuilder)?;
6952
6953        ::log::debug!("HTTP request: {:?}", &theRequest);
6954
6955        let theResponse = self.client.request(theRequest).await?;
6956
6957        ::log::debug!("HTTP response: {:?}", &theResponse);
6958
6959        Ok(theResponse)
6960    }
6961
6962    /// List self-hosted runners in a group for an organization
6963    /// 
6964    /// The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
6965    /// 
6966    /// Lists self-hosted runners that are in a specific organization group.
6967    /// 
6968    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
6969    /// 
6970    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization)
6971    pub async fn actions_list_self_hosted_runners_in_group_for_org(
6972        &self,
6973        org: &str,
6974        runner_group_id: i64,
6975        per_page: ::std::option::Option<i64>,
6976        page: ::std::option::Option<i64>,
6977    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
6978        let mut theScheme = AuthScheme::from(&self.config.authentication);
6979
6980        while let Some(auth_step) = theScheme.step()? {
6981            match auth_step {
6982                ::authentic::AuthenticationStep::Request(auth_request) => {
6983                    theScheme.respond(self.client.request(auth_request).await);
6984                }
6985                ::authentic::AuthenticationStep::WaitFor(duration) => {
6986                    (self.sleep)(duration).await;
6987                }
6988            }
6989        }
6990        let theBuilder = crate::v1_1_4::request::actions_list_self_hosted_runners_in_group_for_org::http_builder(
6991            self.config.base_url.as_ref(),
6992            org,
6993            runner_group_id,
6994            per_page,
6995            page,
6996            self.config.user_agent.as_ref(),
6997            self.config.accept.as_deref(),
6998        )?
6999        .with_authentication(&theScheme)?;
7000
7001        let theRequest =
7002            crate::v1_1_4::request::actions_list_self_hosted_runners_in_group_for_org::hyper_request(theBuilder)?;
7003
7004        ::log::debug!("HTTP request: {:?}", &theRequest);
7005
7006        let theResponse = self.client.request(theRequest).await?;
7007
7008        ::log::debug!("HTTP response: {:?}", &theResponse);
7009
7010        Ok(theResponse)
7011    }
7012
7013    /// Set self-hosted runners in a group for an organization
7014    /// 
7015    /// The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
7016    /// 
7017    /// Replaces the list of self-hosted runners that are part of an organization runner group.
7018    /// 
7019    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
7020    /// 
7021    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization)
7022    ///
7023    /// # Content
7024    ///
7025    /// - [`&v1_1_4::request::actions_set_self_hosted_runners_in_group_for_org::body::Json`](crate::v1_1_4::request::actions_set_self_hosted_runners_in_group_for_org::body::Json)
7026    pub async fn actions_set_self_hosted_runners_in_group_for_org<Content>(
7027        &self,
7028        org: &str,
7029        runner_group_id: i64,
7030        theContent: Content,
7031    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
7032    where
7033        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_self_hosted_runners_in_group_for_org::Content<::hyper::Body>>,
7034        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_self_hosted_runners_in_group_for_org::Content<::hyper::Body>>>::Error>
7035    {
7036        let mut theScheme = AuthScheme::from(&self.config.authentication);
7037
7038        while let Some(auth_step) = theScheme.step()? {
7039            match auth_step {
7040                ::authentic::AuthenticationStep::Request(auth_request) => {
7041                    theScheme.respond(self.client.request(auth_request).await);
7042                }
7043                ::authentic::AuthenticationStep::WaitFor(duration) => {
7044                    (self.sleep)(duration).await;
7045                }
7046            }
7047        }
7048        let theBuilder = crate::v1_1_4::request::actions_set_self_hosted_runners_in_group_for_org::http_builder(
7049            self.config.base_url.as_ref(),
7050            org,
7051            runner_group_id,
7052            self.config.user_agent.as_ref(),
7053            self.config.accept.as_deref(),
7054        )?
7055        .with_authentication(&theScheme)?;
7056
7057        let theRequest = crate::v1_1_4::request::actions_set_self_hosted_runners_in_group_for_org::hyper_request(
7058            theBuilder,
7059            theContent.try_into()?,
7060        )?;
7061
7062        ::log::debug!("HTTP request: {:?}", &theRequest);
7063
7064        let theResponse = self.client.request(theRequest).await?;
7065
7066        ::log::debug!("HTTP response: {:?}", &theResponse);
7067
7068        Ok(theResponse)
7069    }
7070
7071    /// Add a self-hosted runner to a group for an organization
7072    /// 
7073    /// The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
7074    /// 
7075    /// 
7076    /// Adds a self-hosted runner to a runner group configured in an organization.
7077    /// 
7078    /// You must authenticate using an access token with the `admin:org`
7079    /// scope to use this endpoint.
7080    /// 
7081    /// [API method documentation](https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization)
7082    pub async fn actions_add_self_hosted_runner_to_group_for_org(
7083        &self,
7084        org: &str,
7085        runner_group_id: i64,
7086        runner_id: i64,
7087    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7088        let mut theScheme = AuthScheme::from(&self.config.authentication);
7089
7090        while let Some(auth_step) = theScheme.step()? {
7091            match auth_step {
7092                ::authentic::AuthenticationStep::Request(auth_request) => {
7093                    theScheme.respond(self.client.request(auth_request).await);
7094                }
7095                ::authentic::AuthenticationStep::WaitFor(duration) => {
7096                    (self.sleep)(duration).await;
7097                }
7098            }
7099        }
7100        let theBuilder = crate::v1_1_4::request::actions_add_self_hosted_runner_to_group_for_org::http_builder(
7101            self.config.base_url.as_ref(),
7102            org,
7103            runner_group_id,
7104            runner_id,
7105            self.config.user_agent.as_ref(),
7106            self.config.accept.as_deref(),
7107        )?
7108        .with_authentication(&theScheme)?;
7109
7110        let theRequest =
7111            crate::v1_1_4::request::actions_add_self_hosted_runner_to_group_for_org::hyper_request(theBuilder)?;
7112
7113        ::log::debug!("HTTP request: {:?}", &theRequest);
7114
7115        let theResponse = self.client.request(theRequest).await?;
7116
7117        ::log::debug!("HTTP response: {:?}", &theResponse);
7118
7119        Ok(theResponse)
7120    }
7121
7122    /// Remove a self-hosted runner from a group for an organization
7123    /// 
7124    /// The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)."
7125    /// 
7126    /// 
7127    /// Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group.
7128    /// 
7129    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
7130    /// 
7131    /// [API method documentation](https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization)
7132    pub async fn actions_remove_self_hosted_runner_from_group_for_org(
7133        &self,
7134        org: &str,
7135        runner_group_id: i64,
7136        runner_id: i64,
7137    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7138        let mut theScheme = AuthScheme::from(&self.config.authentication);
7139
7140        while let Some(auth_step) = theScheme.step()? {
7141            match auth_step {
7142                ::authentic::AuthenticationStep::Request(auth_request) => {
7143                    theScheme.respond(self.client.request(auth_request).await);
7144                }
7145                ::authentic::AuthenticationStep::WaitFor(duration) => {
7146                    (self.sleep)(duration).await;
7147                }
7148            }
7149        }
7150        let theBuilder = crate::v1_1_4::request::actions_remove_self_hosted_runner_from_group_for_org::http_builder(
7151            self.config.base_url.as_ref(),
7152            org,
7153            runner_group_id,
7154            runner_id,
7155            self.config.user_agent.as_ref(),
7156            self.config.accept.as_deref(),
7157        )?
7158        .with_authentication(&theScheme)?;
7159
7160        let theRequest =
7161            crate::v1_1_4::request::actions_remove_self_hosted_runner_from_group_for_org::hyper_request(theBuilder)?;
7162
7163        ::log::debug!("HTTP request: {:?}", &theRequest);
7164
7165        let theResponse = self.client.request(theRequest).await?;
7166
7167        ::log::debug!("HTTP response: {:?}", &theResponse);
7168
7169        Ok(theResponse)
7170    }
7171
7172    /// List self-hosted runners for an organization
7173    /// 
7174    /// Lists all self-hosted runners configured in an organization.
7175    /// 
7176    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
7177    /// 
7178    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization)
7179    pub async fn actions_list_self_hosted_runners_for_org(
7180        &self,
7181        org: &str,
7182        per_page: ::std::option::Option<i64>,
7183        page: ::std::option::Option<i64>,
7184    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7185        let mut theScheme = AuthScheme::from(&self.config.authentication);
7186
7187        while let Some(auth_step) = theScheme.step()? {
7188            match auth_step {
7189                ::authentic::AuthenticationStep::Request(auth_request) => {
7190                    theScheme.respond(self.client.request(auth_request).await);
7191                }
7192                ::authentic::AuthenticationStep::WaitFor(duration) => {
7193                    (self.sleep)(duration).await;
7194                }
7195            }
7196        }
7197        let theBuilder = crate::v1_1_4::request::actions_list_self_hosted_runners_for_org::http_builder(
7198            self.config.base_url.as_ref(),
7199            org,
7200            per_page,
7201            page,
7202            self.config.user_agent.as_ref(),
7203            self.config.accept.as_deref(),
7204        )?
7205        .with_authentication(&theScheme)?;
7206
7207        let theRequest =
7208            crate::v1_1_4::request::actions_list_self_hosted_runners_for_org::hyper_request(theBuilder)?;
7209
7210        ::log::debug!("HTTP request: {:?}", &theRequest);
7211
7212        let theResponse = self.client.request(theRequest).await?;
7213
7214        ::log::debug!("HTTP response: {:?}", &theResponse);
7215
7216        Ok(theResponse)
7217    }
7218
7219    /// List runner applications for an organization
7220    /// 
7221    /// Lists binaries for the runner application that you can download and run.
7222    /// 
7223    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
7224    /// 
7225    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization)
7226    pub async fn actions_list_runner_applications_for_org(
7227        &self,
7228        org: &str,
7229    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7230        let mut theScheme = AuthScheme::from(&self.config.authentication);
7231
7232        while let Some(auth_step) = theScheme.step()? {
7233            match auth_step {
7234                ::authentic::AuthenticationStep::Request(auth_request) => {
7235                    theScheme.respond(self.client.request(auth_request).await);
7236                }
7237                ::authentic::AuthenticationStep::WaitFor(duration) => {
7238                    (self.sleep)(duration).await;
7239                }
7240            }
7241        }
7242        let theBuilder = crate::v1_1_4::request::actions_list_runner_applications_for_org::http_builder(
7243            self.config.base_url.as_ref(),
7244            org,
7245            self.config.user_agent.as_ref(),
7246            self.config.accept.as_deref(),
7247        )?
7248        .with_authentication(&theScheme)?;
7249
7250        let theRequest =
7251            crate::v1_1_4::request::actions_list_runner_applications_for_org::hyper_request(theBuilder)?;
7252
7253        ::log::debug!("HTTP request: {:?}", &theRequest);
7254
7255        let theResponse = self.client.request(theRequest).await?;
7256
7257        ::log::debug!("HTTP response: {:?}", &theResponse);
7258
7259        Ok(theResponse)
7260    }
7261
7262    /// Create a registration token for an organization
7263    /// 
7264    /// Returns a token that you can pass to the `config` script. The token expires after one hour.
7265    /// 
7266    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
7267    /// 
7268    /// #### Example using registration token
7269    /// 
7270    /// Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.
7271    /// 
7272    /// ```text
7273    /// ./config.sh --url https://github.com/octo-org --token TOKEN
7274    /// ```
7275    /// 
7276    /// [API method documentation](https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization)
7277    pub async fn actions_create_registration_token_for_org(
7278        &self,
7279        org: &str,
7280    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7281        let mut theScheme = AuthScheme::from(&self.config.authentication);
7282
7283        while let Some(auth_step) = theScheme.step()? {
7284            match auth_step {
7285                ::authentic::AuthenticationStep::Request(auth_request) => {
7286                    theScheme.respond(self.client.request(auth_request).await);
7287                }
7288                ::authentic::AuthenticationStep::WaitFor(duration) => {
7289                    (self.sleep)(duration).await;
7290                }
7291            }
7292        }
7293        let theBuilder = crate::v1_1_4::request::actions_create_registration_token_for_org::http_builder(
7294            self.config.base_url.as_ref(),
7295            org,
7296            self.config.user_agent.as_ref(),
7297            self.config.accept.as_deref(),
7298        )?
7299        .with_authentication(&theScheme)?;
7300
7301        let theRequest =
7302            crate::v1_1_4::request::actions_create_registration_token_for_org::hyper_request(theBuilder)?;
7303
7304        ::log::debug!("HTTP request: {:?}", &theRequest);
7305
7306        let theResponse = self.client.request(theRequest).await?;
7307
7308        ::log::debug!("HTTP response: {:?}", &theResponse);
7309
7310        Ok(theResponse)
7311    }
7312
7313    /// Create a remove token for an organization
7314    /// 
7315    /// Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour.
7316    /// 
7317    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
7318    /// 
7319    /// #### Example using remove token
7320    /// 
7321    /// To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this
7322    /// endpoint.
7323    /// 
7324    /// ```text
7325    /// ./config.sh remove --token TOKEN
7326    /// ```
7327    /// 
7328    /// [API method documentation](https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization)
7329    pub async fn actions_create_remove_token_for_org(
7330        &self,
7331        org: &str,
7332    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7333        let mut theScheme = AuthScheme::from(&self.config.authentication);
7334
7335        while let Some(auth_step) = theScheme.step()? {
7336            match auth_step {
7337                ::authentic::AuthenticationStep::Request(auth_request) => {
7338                    theScheme.respond(self.client.request(auth_request).await);
7339                }
7340                ::authentic::AuthenticationStep::WaitFor(duration) => {
7341                    (self.sleep)(duration).await;
7342                }
7343            }
7344        }
7345        let theBuilder = crate::v1_1_4::request::actions_create_remove_token_for_org::http_builder(
7346            self.config.base_url.as_ref(),
7347            org,
7348            self.config.user_agent.as_ref(),
7349            self.config.accept.as_deref(),
7350        )?
7351        .with_authentication(&theScheme)?;
7352
7353        let theRequest =
7354            crate::v1_1_4::request::actions_create_remove_token_for_org::hyper_request(theBuilder)?;
7355
7356        ::log::debug!("HTTP request: {:?}", &theRequest);
7357
7358        let theResponse = self.client.request(theRequest).await?;
7359
7360        ::log::debug!("HTTP response: {:?}", &theResponse);
7361
7362        Ok(theResponse)
7363    }
7364
7365    /// Get a self-hosted runner for an organization
7366    /// 
7367    /// Gets a specific self-hosted runner configured in an organization.
7368    /// 
7369    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
7370    /// 
7371    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization)
7372    pub async fn actions_get_self_hosted_runner_for_org(
7373        &self,
7374        org: &str,
7375        runner_id: i64,
7376    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7377        let mut theScheme = AuthScheme::from(&self.config.authentication);
7378
7379        while let Some(auth_step) = theScheme.step()? {
7380            match auth_step {
7381                ::authentic::AuthenticationStep::Request(auth_request) => {
7382                    theScheme.respond(self.client.request(auth_request).await);
7383                }
7384                ::authentic::AuthenticationStep::WaitFor(duration) => {
7385                    (self.sleep)(duration).await;
7386                }
7387            }
7388        }
7389        let theBuilder = crate::v1_1_4::request::actions_get_self_hosted_runner_for_org::http_builder(
7390            self.config.base_url.as_ref(),
7391            org,
7392            runner_id,
7393            self.config.user_agent.as_ref(),
7394            self.config.accept.as_deref(),
7395        )?
7396        .with_authentication(&theScheme)?;
7397
7398        let theRequest =
7399            crate::v1_1_4::request::actions_get_self_hosted_runner_for_org::hyper_request(theBuilder)?;
7400
7401        ::log::debug!("HTTP request: {:?}", &theRequest);
7402
7403        let theResponse = self.client.request(theRequest).await?;
7404
7405        ::log::debug!("HTTP response: {:?}", &theResponse);
7406
7407        Ok(theResponse)
7408    }
7409
7410    /// Delete a self-hosted runner from an organization
7411    /// 
7412    /// Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
7413    /// 
7414    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
7415    /// 
7416    /// [API method documentation](https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization)
7417    pub async fn actions_delete_self_hosted_runner_from_org(
7418        &self,
7419        org: &str,
7420        runner_id: i64,
7421    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7422        let mut theScheme = AuthScheme::from(&self.config.authentication);
7423
7424        while let Some(auth_step) = theScheme.step()? {
7425            match auth_step {
7426                ::authentic::AuthenticationStep::Request(auth_request) => {
7427                    theScheme.respond(self.client.request(auth_request).await);
7428                }
7429                ::authentic::AuthenticationStep::WaitFor(duration) => {
7430                    (self.sleep)(duration).await;
7431                }
7432            }
7433        }
7434        let theBuilder = crate::v1_1_4::request::actions_delete_self_hosted_runner_from_org::http_builder(
7435            self.config.base_url.as_ref(),
7436            org,
7437            runner_id,
7438            self.config.user_agent.as_ref(),
7439            self.config.accept.as_deref(),
7440        )?
7441        .with_authentication(&theScheme)?;
7442
7443        let theRequest =
7444            crate::v1_1_4::request::actions_delete_self_hosted_runner_from_org::hyper_request(theBuilder)?;
7445
7446        ::log::debug!("HTTP request: {:?}", &theRequest);
7447
7448        let theResponse = self.client.request(theRequest).await?;
7449
7450        ::log::debug!("HTTP response: {:?}", &theResponse);
7451
7452        Ok(theResponse)
7453    }
7454
7455    /// List labels for a self-hosted runner for an organization
7456    /// 
7457    /// Lists all labels for a self-hosted runner configured in an organization.
7458    /// 
7459    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
7460    /// 
7461    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization)
7462    pub async fn actions_list_labels_for_self_hosted_runner_for_org(
7463        &self,
7464        org: &str,
7465        runner_id: i64,
7466    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7467        let mut theScheme = AuthScheme::from(&self.config.authentication);
7468
7469        while let Some(auth_step) = theScheme.step()? {
7470            match auth_step {
7471                ::authentic::AuthenticationStep::Request(auth_request) => {
7472                    theScheme.respond(self.client.request(auth_request).await);
7473                }
7474                ::authentic::AuthenticationStep::WaitFor(duration) => {
7475                    (self.sleep)(duration).await;
7476                }
7477            }
7478        }
7479        let theBuilder = crate::v1_1_4::request::actions_list_labels_for_self_hosted_runner_for_org::http_builder(
7480            self.config.base_url.as_ref(),
7481            org,
7482            runner_id,
7483            self.config.user_agent.as_ref(),
7484            self.config.accept.as_deref(),
7485        )?
7486        .with_authentication(&theScheme)?;
7487
7488        let theRequest =
7489            crate::v1_1_4::request::actions_list_labels_for_self_hosted_runner_for_org::hyper_request(theBuilder)?;
7490
7491        ::log::debug!("HTTP request: {:?}", &theRequest);
7492
7493        let theResponse = self.client.request(theRequest).await?;
7494
7495        ::log::debug!("HTTP response: {:?}", &theResponse);
7496
7497        Ok(theResponse)
7498    }
7499
7500    /// Set custom labels for a self-hosted runner for an organization
7501    /// 
7502    /// Remove all previous custom labels and set the new custom labels for a specific
7503    /// self-hosted runner configured in an organization.
7504    /// 
7505    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
7506    /// 
7507    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization)
7508    ///
7509    /// # Content
7510    ///
7511    /// - [`&v1_1_4::request::actions_set_custom_labels_for_self_hosted_runner_for_org::body::Json`](crate::v1_1_4::request::actions_set_custom_labels_for_self_hosted_runner_for_org::body::Json)
7512    pub async fn actions_set_custom_labels_for_self_hosted_runner_for_org<Content>(
7513        &self,
7514        org: &str,
7515        runner_id: i64,
7516        theContent: Content,
7517    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
7518    where
7519        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_custom_labels_for_self_hosted_runner_for_org::Content<::hyper::Body>>,
7520        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_custom_labels_for_self_hosted_runner_for_org::Content<::hyper::Body>>>::Error>
7521    {
7522        let mut theScheme = AuthScheme::from(&self.config.authentication);
7523
7524        while let Some(auth_step) = theScheme.step()? {
7525            match auth_step {
7526                ::authentic::AuthenticationStep::Request(auth_request) => {
7527                    theScheme.respond(self.client.request(auth_request).await);
7528                }
7529                ::authentic::AuthenticationStep::WaitFor(duration) => {
7530                    (self.sleep)(duration).await;
7531                }
7532            }
7533        }
7534        let theBuilder = crate::v1_1_4::request::actions_set_custom_labels_for_self_hosted_runner_for_org::http_builder(
7535            self.config.base_url.as_ref(),
7536            org,
7537            runner_id,
7538            self.config.user_agent.as_ref(),
7539            self.config.accept.as_deref(),
7540        )?
7541        .with_authentication(&theScheme)?;
7542
7543        let theRequest = crate::v1_1_4::request::actions_set_custom_labels_for_self_hosted_runner_for_org::hyper_request(
7544            theBuilder,
7545            theContent.try_into()?,
7546        )?;
7547
7548        ::log::debug!("HTTP request: {:?}", &theRequest);
7549
7550        let theResponse = self.client.request(theRequest).await?;
7551
7552        ::log::debug!("HTTP response: {:?}", &theResponse);
7553
7554        Ok(theResponse)
7555    }
7556
7557    /// Add custom labels to a self-hosted runner for an organization
7558    /// 
7559    /// Add custom labels to a self-hosted runner configured in an organization.
7560    /// 
7561    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
7562    /// 
7563    /// [API method documentation](https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization)
7564    ///
7565    /// # Content
7566    ///
7567    /// - [`&v1_1_4::request::actions_add_custom_labels_to_self_hosted_runner_for_org::body::Json`](crate::v1_1_4::request::actions_add_custom_labels_to_self_hosted_runner_for_org::body::Json)
7568    pub async fn actions_add_custom_labels_to_self_hosted_runner_for_org<Content>(
7569        &self,
7570        org: &str,
7571        runner_id: i64,
7572        theContent: Content,
7573    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
7574    where
7575        Content: Copy + TryInto<crate::v1_1_4::request::actions_add_custom_labels_to_self_hosted_runner_for_org::Content<::hyper::Body>>,
7576        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_add_custom_labels_to_self_hosted_runner_for_org::Content<::hyper::Body>>>::Error>
7577    {
7578        let mut theScheme = AuthScheme::from(&self.config.authentication);
7579
7580        while let Some(auth_step) = theScheme.step()? {
7581            match auth_step {
7582                ::authentic::AuthenticationStep::Request(auth_request) => {
7583                    theScheme.respond(self.client.request(auth_request).await);
7584                }
7585                ::authentic::AuthenticationStep::WaitFor(duration) => {
7586                    (self.sleep)(duration).await;
7587                }
7588            }
7589        }
7590        let theBuilder = crate::v1_1_4::request::actions_add_custom_labels_to_self_hosted_runner_for_org::http_builder(
7591            self.config.base_url.as_ref(),
7592            org,
7593            runner_id,
7594            self.config.user_agent.as_ref(),
7595            self.config.accept.as_deref(),
7596        )?
7597        .with_authentication(&theScheme)?;
7598
7599        let theRequest = crate::v1_1_4::request::actions_add_custom_labels_to_self_hosted_runner_for_org::hyper_request(
7600            theBuilder,
7601            theContent.try_into()?,
7602        )?;
7603
7604        ::log::debug!("HTTP request: {:?}", &theRequest);
7605
7606        let theResponse = self.client.request(theRequest).await?;
7607
7608        ::log::debug!("HTTP response: {:?}", &theResponse);
7609
7610        Ok(theResponse)
7611    }
7612
7613    /// Remove all custom labels from a self-hosted runner for an organization
7614    /// 
7615    /// Remove all custom labels from a self-hosted runner configured in an
7616    /// organization. Returns the remaining read-only labels from the runner.
7617    /// 
7618    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
7619    /// 
7620    /// [API method documentation](https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization)
7621    pub async fn actions_remove_all_custom_labels_from_self_hosted_runner_for_org(
7622        &self,
7623        org: &str,
7624        runner_id: i64,
7625    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7626        let mut theScheme = AuthScheme::from(&self.config.authentication);
7627
7628        while let Some(auth_step) = theScheme.step()? {
7629            match auth_step {
7630                ::authentic::AuthenticationStep::Request(auth_request) => {
7631                    theScheme.respond(self.client.request(auth_request).await);
7632                }
7633                ::authentic::AuthenticationStep::WaitFor(duration) => {
7634                    (self.sleep)(duration).await;
7635                }
7636            }
7637        }
7638        let theBuilder = crate::v1_1_4::request::actions_remove_all_custom_labels_from_self_hosted_runner_for_org::http_builder(
7639            self.config.base_url.as_ref(),
7640            org,
7641            runner_id,
7642            self.config.user_agent.as_ref(),
7643            self.config.accept.as_deref(),
7644        )?
7645        .with_authentication(&theScheme)?;
7646
7647        let theRequest =
7648            crate::v1_1_4::request::actions_remove_all_custom_labels_from_self_hosted_runner_for_org::hyper_request(theBuilder)?;
7649
7650        ::log::debug!("HTTP request: {:?}", &theRequest);
7651
7652        let theResponse = self.client.request(theRequest).await?;
7653
7654        ::log::debug!("HTTP response: {:?}", &theResponse);
7655
7656        Ok(theResponse)
7657    }
7658
7659    /// Remove a custom label from a self-hosted runner for an organization
7660    /// 
7661    /// Remove a custom label from a self-hosted runner configured
7662    /// in an organization. Returns the remaining labels from the runner.
7663    /// 
7664    /// This endpoint returns a `404 Not Found` status if the custom label is not
7665    /// present on the runner.
7666    /// 
7667    /// You must authenticate using an access token with the `admin:org` scope to use this endpoint.
7668    /// 
7669    /// [API method documentation](https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization)
7670    pub async fn actions_remove_custom_label_from_self_hosted_runner_for_org(
7671        &self,
7672        org: &str,
7673        runner_id: i64,
7674        name: &str,
7675    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7676        let mut theScheme = AuthScheme::from(&self.config.authentication);
7677
7678        while let Some(auth_step) = theScheme.step()? {
7679            match auth_step {
7680                ::authentic::AuthenticationStep::Request(auth_request) => {
7681                    theScheme.respond(self.client.request(auth_request).await);
7682                }
7683                ::authentic::AuthenticationStep::WaitFor(duration) => {
7684                    (self.sleep)(duration).await;
7685                }
7686            }
7687        }
7688        let theBuilder = crate::v1_1_4::request::actions_remove_custom_label_from_self_hosted_runner_for_org::http_builder(
7689            self.config.base_url.as_ref(),
7690            org,
7691            runner_id,
7692            name,
7693            self.config.user_agent.as_ref(),
7694            self.config.accept.as_deref(),
7695        )?
7696        .with_authentication(&theScheme)?;
7697
7698        let theRequest =
7699            crate::v1_1_4::request::actions_remove_custom_label_from_self_hosted_runner_for_org::hyper_request(theBuilder)?;
7700
7701        ::log::debug!("HTTP request: {:?}", &theRequest);
7702
7703        let theResponse = self.client.request(theRequest).await?;
7704
7705        ::log::debug!("HTTP response: {:?}", &theResponse);
7706
7707        Ok(theResponse)
7708    }
7709
7710    /// List organization secrets
7711    /// 
7712    /// Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.
7713    /// 
7714    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-organization-secrets)
7715    pub async fn actions_list_org_secrets(
7716        &self,
7717        org: &str,
7718        per_page: ::std::option::Option<i64>,
7719        page: ::std::option::Option<i64>,
7720    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7721        let mut theScheme = AuthScheme::from(&self.config.authentication);
7722
7723        while let Some(auth_step) = theScheme.step()? {
7724            match auth_step {
7725                ::authentic::AuthenticationStep::Request(auth_request) => {
7726                    theScheme.respond(self.client.request(auth_request).await);
7727                }
7728                ::authentic::AuthenticationStep::WaitFor(duration) => {
7729                    (self.sleep)(duration).await;
7730                }
7731            }
7732        }
7733        let theBuilder = crate::v1_1_4::request::actions_list_org_secrets::http_builder(
7734            self.config.base_url.as_ref(),
7735            org,
7736            per_page,
7737            page,
7738            self.config.user_agent.as_ref(),
7739            self.config.accept.as_deref(),
7740        )?
7741        .with_authentication(&theScheme)?;
7742
7743        let theRequest =
7744            crate::v1_1_4::request::actions_list_org_secrets::hyper_request(theBuilder)?;
7745
7746        ::log::debug!("HTTP request: {:?}", &theRequest);
7747
7748        let theResponse = self.client.request(theRequest).await?;
7749
7750        ::log::debug!("HTTP response: {:?}", &theResponse);
7751
7752        Ok(theResponse)
7753    }
7754
7755    /// Get an organization public key
7756    /// 
7757    /// Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.
7758    /// 
7759    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-an-organization-public-key)
7760    pub async fn actions_get_org_public_key(
7761        &self,
7762        org: &str,
7763    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7764        let mut theScheme = AuthScheme::from(&self.config.authentication);
7765
7766        while let Some(auth_step) = theScheme.step()? {
7767            match auth_step {
7768                ::authentic::AuthenticationStep::Request(auth_request) => {
7769                    theScheme.respond(self.client.request(auth_request).await);
7770                }
7771                ::authentic::AuthenticationStep::WaitFor(duration) => {
7772                    (self.sleep)(duration).await;
7773                }
7774            }
7775        }
7776        let theBuilder = crate::v1_1_4::request::actions_get_org_public_key::http_builder(
7777            self.config.base_url.as_ref(),
7778            org,
7779            self.config.user_agent.as_ref(),
7780            self.config.accept.as_deref(),
7781        )?
7782        .with_authentication(&theScheme)?;
7783
7784        let theRequest =
7785            crate::v1_1_4::request::actions_get_org_public_key::hyper_request(theBuilder)?;
7786
7787        ::log::debug!("HTTP request: {:?}", &theRequest);
7788
7789        let theResponse = self.client.request(theRequest).await?;
7790
7791        ::log::debug!("HTTP response: {:?}", &theResponse);
7792
7793        Ok(theResponse)
7794    }
7795
7796    /// Get an organization secret
7797    /// 
7798    /// Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.
7799    /// 
7800    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-an-organization-secret)
7801    pub async fn actions_get_org_secret(
7802        &self,
7803        org: &str,
7804        secret_name: &str,
7805    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7806        let mut theScheme = AuthScheme::from(&self.config.authentication);
7807
7808        while let Some(auth_step) = theScheme.step()? {
7809            match auth_step {
7810                ::authentic::AuthenticationStep::Request(auth_request) => {
7811                    theScheme.respond(self.client.request(auth_request).await);
7812                }
7813                ::authentic::AuthenticationStep::WaitFor(duration) => {
7814                    (self.sleep)(duration).await;
7815                }
7816            }
7817        }
7818        let theBuilder = crate::v1_1_4::request::actions_get_org_secret::http_builder(
7819            self.config.base_url.as_ref(),
7820            org,
7821            secret_name,
7822            self.config.user_agent.as_ref(),
7823            self.config.accept.as_deref(),
7824        )?
7825        .with_authentication(&theScheme)?;
7826
7827        let theRequest =
7828            crate::v1_1_4::request::actions_get_org_secret::hyper_request(theBuilder)?;
7829
7830        ::log::debug!("HTTP request: {:?}", &theRequest);
7831
7832        let theResponse = self.client.request(theRequest).await?;
7833
7834        ::log::debug!("HTTP response: {:?}", &theResponse);
7835
7836        Ok(theResponse)
7837    }
7838
7839    /// Create or update an organization secret
7840    /// 
7841    /// Creates or updates an organization secret with an encrypted value. Encrypt your secret using
7842    /// [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
7843    /// token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to
7844    /// use this endpoint.
7845    /// 
7846    /// #### Example encrypting a secret using Node.js
7847    /// 
7848    /// Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
7849    /// 
7850    /// ```text
7851    /// const sodium = require('tweetsodium');
7852    /// 
7853    /// const key = "base64-encoded-public-key";
7854    /// const value = "plain-text-secret";
7855    /// 
7856    /// // Convert the message and key to Uint8Array's (Buffer implements that interface)
7857    /// const messageBytes = Buffer.from(value);
7858    /// const keyBytes = Buffer.from(key, 'base64');
7859    /// 
7860    /// // Encrypt using LibSodium.
7861    /// const encryptedBytes = sodium.seal(messageBytes, keyBytes);
7862    /// 
7863    /// // Base64 the encrypted secret
7864    /// const encrypted = Buffer.from(encryptedBytes).toString('base64');
7865    /// 
7866    /// console.log(encrypted);
7867    /// ```
7868    /// 
7869    /// 
7870    /// #### Example encrypting a secret using Python
7871    /// 
7872    /// Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3.
7873    /// 
7874    /// ```text
7875    /// from base64 import b64encode
7876    /// from nacl import encoding, public
7877    /// 
7878    /// def encrypt(public_key: str, secret_value: str) -> str:
7879    ///   """Encrypt a Unicode string using the public key."""
7880    ///   public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
7881    ///   sealed_box = public.SealedBox(public_key)
7882    ///   encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
7883    ///   return b64encode(encrypted).decode("utf-8")
7884    /// ```
7885    /// 
7886    /// #### Example encrypting a secret using C#
7887    /// 
7888    /// Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
7889    /// 
7890    /// ```text
7891    /// var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
7892    /// var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
7893    /// 
7894    /// var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
7895    /// 
7896    /// Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
7897    /// ```
7898    /// 
7899    /// #### Example encrypting a secret using Ruby
7900    /// 
7901    /// Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
7902    /// 
7903    /// ```ruby
7904    /// require "rbnacl"
7905    /// require "base64"
7906    /// 
7907    /// key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
7908    /// public_key = RbNaCl::PublicKey.new(key)
7909    /// 
7910    /// box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
7911    /// encrypted_secret = box.encrypt("my_secret")
7912    /// 
7913    /// # Print the base64 encoded secret
7914    /// puts Base64.strict_encode64(encrypted_secret)
7915    /// ```
7916    /// 
7917    /// [API method documentation](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret)
7918    ///
7919    /// # Content
7920    ///
7921    /// - [`&v1_1_4::request::actions_create_or_update_org_secret::body::Json`](crate::v1_1_4::request::actions_create_or_update_org_secret::body::Json)
7922    pub async fn actions_create_or_update_org_secret<Content>(
7923        &self,
7924        org: &str,
7925        secret_name: &str,
7926        theContent: Content,
7927    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
7928    where
7929        Content: Copy + TryInto<crate::v1_1_4::request::actions_create_or_update_org_secret::Content<::hyper::Body>>,
7930        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_create_or_update_org_secret::Content<::hyper::Body>>>::Error>
7931    {
7932        let mut theScheme = AuthScheme::from(&self.config.authentication);
7933
7934        while let Some(auth_step) = theScheme.step()? {
7935            match auth_step {
7936                ::authentic::AuthenticationStep::Request(auth_request) => {
7937                    theScheme.respond(self.client.request(auth_request).await);
7938                }
7939                ::authentic::AuthenticationStep::WaitFor(duration) => {
7940                    (self.sleep)(duration).await;
7941                }
7942            }
7943        }
7944        let theBuilder = crate::v1_1_4::request::actions_create_or_update_org_secret::http_builder(
7945            self.config.base_url.as_ref(),
7946            org,
7947            secret_name,
7948            self.config.user_agent.as_ref(),
7949            self.config.accept.as_deref(),
7950        )?
7951        .with_authentication(&theScheme)?;
7952
7953        let theRequest = crate::v1_1_4::request::actions_create_or_update_org_secret::hyper_request(
7954            theBuilder,
7955            theContent.try_into()?,
7956        )?;
7957
7958        ::log::debug!("HTTP request: {:?}", &theRequest);
7959
7960        let theResponse = self.client.request(theRequest).await?;
7961
7962        ::log::debug!("HTTP response: {:?}", &theResponse);
7963
7964        Ok(theResponse)
7965    }
7966
7967    /// Delete an organization secret
7968    /// 
7969    /// Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.
7970    /// 
7971    /// [API method documentation](https://docs.github.com/rest/reference/actions#delete-an-organization-secret)
7972    pub async fn actions_delete_org_secret(
7973        &self,
7974        org: &str,
7975        secret_name: &str,
7976    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
7977        let mut theScheme = AuthScheme::from(&self.config.authentication);
7978
7979        while let Some(auth_step) = theScheme.step()? {
7980            match auth_step {
7981                ::authentic::AuthenticationStep::Request(auth_request) => {
7982                    theScheme.respond(self.client.request(auth_request).await);
7983                }
7984                ::authentic::AuthenticationStep::WaitFor(duration) => {
7985                    (self.sleep)(duration).await;
7986                }
7987            }
7988        }
7989        let theBuilder = crate::v1_1_4::request::actions_delete_org_secret::http_builder(
7990            self.config.base_url.as_ref(),
7991            org,
7992            secret_name,
7993            self.config.user_agent.as_ref(),
7994            self.config.accept.as_deref(),
7995        )?
7996        .with_authentication(&theScheme)?;
7997
7998        let theRequest =
7999            crate::v1_1_4::request::actions_delete_org_secret::hyper_request(theBuilder)?;
8000
8001        ::log::debug!("HTTP request: {:?}", &theRequest);
8002
8003        let theResponse = self.client.request(theRequest).await?;
8004
8005        ::log::debug!("HTTP response: {:?}", &theResponse);
8006
8007        Ok(theResponse)
8008    }
8009
8010    /// List selected repositories for an organization secret
8011    /// 
8012    /// Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.
8013    /// 
8014    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret)
8015    pub async fn actions_list_selected_repos_for_org_secret(
8016        &self,
8017        org: &str,
8018        secret_name: &str,
8019        page: ::std::option::Option<i64>,
8020        per_page: ::std::option::Option<i64>,
8021    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8022        let mut theScheme = AuthScheme::from(&self.config.authentication);
8023
8024        while let Some(auth_step) = theScheme.step()? {
8025            match auth_step {
8026                ::authentic::AuthenticationStep::Request(auth_request) => {
8027                    theScheme.respond(self.client.request(auth_request).await);
8028                }
8029                ::authentic::AuthenticationStep::WaitFor(duration) => {
8030                    (self.sleep)(duration).await;
8031                }
8032            }
8033        }
8034        let theBuilder = crate::v1_1_4::request::actions_list_selected_repos_for_org_secret::http_builder(
8035            self.config.base_url.as_ref(),
8036            org,
8037            secret_name,
8038            page,
8039            per_page,
8040            self.config.user_agent.as_ref(),
8041            self.config.accept.as_deref(),
8042        )?
8043        .with_authentication(&theScheme)?;
8044
8045        let theRequest =
8046            crate::v1_1_4::request::actions_list_selected_repos_for_org_secret::hyper_request(theBuilder)?;
8047
8048        ::log::debug!("HTTP request: {:?}", &theRequest);
8049
8050        let theResponse = self.client.request(theRequest).await?;
8051
8052        ::log::debug!("HTTP response: {:?}", &theResponse);
8053
8054        Ok(theResponse)
8055    }
8056
8057    /// Set selected repositories for an organization secret
8058    /// 
8059    /// Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.
8060    /// 
8061    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret)
8062    ///
8063    /// # Content
8064    ///
8065    /// - [`&v1_1_4::request::actions_set_selected_repos_for_org_secret::body::Json`](crate::v1_1_4::request::actions_set_selected_repos_for_org_secret::body::Json)
8066    pub async fn actions_set_selected_repos_for_org_secret<Content>(
8067        &self,
8068        org: &str,
8069        secret_name: &str,
8070        theContent: Content,
8071    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
8072    where
8073        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_selected_repos_for_org_secret::Content<::hyper::Body>>,
8074        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_selected_repos_for_org_secret::Content<::hyper::Body>>>::Error>
8075    {
8076        let mut theScheme = AuthScheme::from(&self.config.authentication);
8077
8078        while let Some(auth_step) = theScheme.step()? {
8079            match auth_step {
8080                ::authentic::AuthenticationStep::Request(auth_request) => {
8081                    theScheme.respond(self.client.request(auth_request).await);
8082                }
8083                ::authentic::AuthenticationStep::WaitFor(duration) => {
8084                    (self.sleep)(duration).await;
8085                }
8086            }
8087        }
8088        let theBuilder = crate::v1_1_4::request::actions_set_selected_repos_for_org_secret::http_builder(
8089            self.config.base_url.as_ref(),
8090            org,
8091            secret_name,
8092            self.config.user_agent.as_ref(),
8093            self.config.accept.as_deref(),
8094        )?
8095        .with_authentication(&theScheme)?;
8096
8097        let theRequest = crate::v1_1_4::request::actions_set_selected_repos_for_org_secret::hyper_request(
8098            theBuilder,
8099            theContent.try_into()?,
8100        )?;
8101
8102        ::log::debug!("HTTP request: {:?}", &theRequest);
8103
8104        let theResponse = self.client.request(theRequest).await?;
8105
8106        ::log::debug!("HTTP response: {:?}", &theResponse);
8107
8108        Ok(theResponse)
8109    }
8110
8111    /// Add selected repository to an organization secret
8112    /// 
8113    /// Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.
8114    /// 
8115    /// [API method documentation](https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret)
8116    pub async fn actions_add_selected_repo_to_org_secret(
8117        &self,
8118        org: &str,
8119        secret_name: &str,
8120        repository_id: i64,
8121    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8122        let mut theScheme = AuthScheme::from(&self.config.authentication);
8123
8124        while let Some(auth_step) = theScheme.step()? {
8125            match auth_step {
8126                ::authentic::AuthenticationStep::Request(auth_request) => {
8127                    theScheme.respond(self.client.request(auth_request).await);
8128                }
8129                ::authentic::AuthenticationStep::WaitFor(duration) => {
8130                    (self.sleep)(duration).await;
8131                }
8132            }
8133        }
8134        let theBuilder = crate::v1_1_4::request::actions_add_selected_repo_to_org_secret::http_builder(
8135            self.config.base_url.as_ref(),
8136            org,
8137            secret_name,
8138            repository_id,
8139            self.config.user_agent.as_ref(),
8140            self.config.accept.as_deref(),
8141        )?
8142        .with_authentication(&theScheme)?;
8143
8144        let theRequest =
8145            crate::v1_1_4::request::actions_add_selected_repo_to_org_secret::hyper_request(theBuilder)?;
8146
8147        ::log::debug!("HTTP request: {:?}", &theRequest);
8148
8149        let theResponse = self.client.request(theRequest).await?;
8150
8151        ::log::debug!("HTTP response: {:?}", &theResponse);
8152
8153        Ok(theResponse)
8154    }
8155
8156    /// Remove selected repository from an organization secret
8157    /// 
8158    /// Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.
8159    /// 
8160    /// [API method documentation](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret)
8161    pub async fn actions_remove_selected_repo_from_org_secret(
8162        &self,
8163        org: &str,
8164        secret_name: &str,
8165        repository_id: i64,
8166    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8167        let mut theScheme = AuthScheme::from(&self.config.authentication);
8168
8169        while let Some(auth_step) = theScheme.step()? {
8170            match auth_step {
8171                ::authentic::AuthenticationStep::Request(auth_request) => {
8172                    theScheme.respond(self.client.request(auth_request).await);
8173                }
8174                ::authentic::AuthenticationStep::WaitFor(duration) => {
8175                    (self.sleep)(duration).await;
8176                }
8177            }
8178        }
8179        let theBuilder = crate::v1_1_4::request::actions_remove_selected_repo_from_org_secret::http_builder(
8180            self.config.base_url.as_ref(),
8181            org,
8182            secret_name,
8183            repository_id,
8184            self.config.user_agent.as_ref(),
8185            self.config.accept.as_deref(),
8186        )?
8187        .with_authentication(&theScheme)?;
8188
8189        let theRequest =
8190            crate::v1_1_4::request::actions_remove_selected_repo_from_org_secret::hyper_request(theBuilder)?;
8191
8192        ::log::debug!("HTTP request: {:?}", &theRequest);
8193
8194        let theResponse = self.client.request(theRequest).await?;
8195
8196        ::log::debug!("HTTP response: {:?}", &theResponse);
8197
8198        Ok(theResponse)
8199    }
8200
8201    /// Get the audit log for an organization
8202    /// 
8203    /// Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)."
8204    /// 
8205    /// This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint.
8206    /// 
8207    /// By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)."
8208    /// 
8209    /// Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination)."
8210    /// 
8211    /// [API method documentation](https://docs.github.com/rest/reference/orgs#get-audit-log)
8212    #[allow(clippy::too_many_arguments)]
8213    pub async fn orgs_get_audit_log(
8214        &self,
8215        org: &str,
8216        phrase: ::std::option::Option<&str>,
8217        include: ::std::option::Option<&str>,
8218        after: ::std::option::Option<&str>,
8219        before: ::std::option::Option<&str>,
8220        order: ::std::option::Option<&str>,
8221        per_page: ::std::option::Option<i64>,
8222    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8223        let mut theScheme = AuthScheme::from(&self.config.authentication);
8224
8225        while let Some(auth_step) = theScheme.step()? {
8226            match auth_step {
8227                ::authentic::AuthenticationStep::Request(auth_request) => {
8228                    theScheme.respond(self.client.request(auth_request).await);
8229                }
8230                ::authentic::AuthenticationStep::WaitFor(duration) => {
8231                    (self.sleep)(duration).await;
8232                }
8233            }
8234        }
8235        let theBuilder = crate::v1_1_4::request::orgs_get_audit_log::http_builder(
8236            self.config.base_url.as_ref(),
8237            org,
8238            phrase,
8239            include,
8240            after,
8241            before,
8242            order,
8243            per_page,
8244            self.config.user_agent.as_ref(),
8245            self.config.accept.as_deref(),
8246        )?
8247        .with_authentication(&theScheme)?;
8248
8249        let theRequest =
8250            crate::v1_1_4::request::orgs_get_audit_log::hyper_request(theBuilder)?;
8251
8252        ::log::debug!("HTTP request: {:?}", &theRequest);
8253
8254        let theResponse = self.client.request(theRequest).await?;
8255
8256        ::log::debug!("HTTP response: {:?}", &theResponse);
8257
8258        Ok(theResponse)
8259    }
8260
8261    /// List users blocked by an organization
8262    /// 
8263    /// List the users blocked by an organization.
8264    /// 
8265    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization)
8266    pub async fn orgs_list_blocked_users(
8267        &self,
8268        org: &str,
8269    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8270        let mut theScheme = AuthScheme::from(&self.config.authentication);
8271
8272        while let Some(auth_step) = theScheme.step()? {
8273            match auth_step {
8274                ::authentic::AuthenticationStep::Request(auth_request) => {
8275                    theScheme.respond(self.client.request(auth_request).await);
8276                }
8277                ::authentic::AuthenticationStep::WaitFor(duration) => {
8278                    (self.sleep)(duration).await;
8279                }
8280            }
8281        }
8282        let theBuilder = crate::v1_1_4::request::orgs_list_blocked_users::http_builder(
8283            self.config.base_url.as_ref(),
8284            org,
8285            self.config.user_agent.as_ref(),
8286            self.config.accept.as_deref(),
8287        )?
8288        .with_authentication(&theScheme)?;
8289
8290        let theRequest =
8291            crate::v1_1_4::request::orgs_list_blocked_users::hyper_request(theBuilder)?;
8292
8293        ::log::debug!("HTTP request: {:?}", &theRequest);
8294
8295        let theResponse = self.client.request(theRequest).await?;
8296
8297        ::log::debug!("HTTP response: {:?}", &theResponse);
8298
8299        Ok(theResponse)
8300    }
8301
8302    /// Check if a user is blocked by an organization
8303    /// 
8304    /// [API method documentation](https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization)
8305    pub async fn orgs_check_blocked_user(
8306        &self,
8307        org: &str,
8308        username: &str,
8309    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8310        let mut theScheme = AuthScheme::from(&self.config.authentication);
8311
8312        while let Some(auth_step) = theScheme.step()? {
8313            match auth_step {
8314                ::authentic::AuthenticationStep::Request(auth_request) => {
8315                    theScheme.respond(self.client.request(auth_request).await);
8316                }
8317                ::authentic::AuthenticationStep::WaitFor(duration) => {
8318                    (self.sleep)(duration).await;
8319                }
8320            }
8321        }
8322        let theBuilder = crate::v1_1_4::request::orgs_check_blocked_user::http_builder(
8323            self.config.base_url.as_ref(),
8324            org,
8325            username,
8326            self.config.user_agent.as_ref(),
8327            self.config.accept.as_deref(),
8328        )?
8329        .with_authentication(&theScheme)?;
8330
8331        let theRequest =
8332            crate::v1_1_4::request::orgs_check_blocked_user::hyper_request(theBuilder)?;
8333
8334        ::log::debug!("HTTP request: {:?}", &theRequest);
8335
8336        let theResponse = self.client.request(theRequest).await?;
8337
8338        ::log::debug!("HTTP response: {:?}", &theResponse);
8339
8340        Ok(theResponse)
8341    }
8342
8343    /// Block a user from an organization
8344    /// 
8345    /// [API method documentation](https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization)
8346    pub async fn orgs_block_user(
8347        &self,
8348        org: &str,
8349        username: &str,
8350    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8351        let mut theScheme = AuthScheme::from(&self.config.authentication);
8352
8353        while let Some(auth_step) = theScheme.step()? {
8354            match auth_step {
8355                ::authentic::AuthenticationStep::Request(auth_request) => {
8356                    theScheme.respond(self.client.request(auth_request).await);
8357                }
8358                ::authentic::AuthenticationStep::WaitFor(duration) => {
8359                    (self.sleep)(duration).await;
8360                }
8361            }
8362        }
8363        let theBuilder = crate::v1_1_4::request::orgs_block_user::http_builder(
8364            self.config.base_url.as_ref(),
8365            org,
8366            username,
8367            self.config.user_agent.as_ref(),
8368            self.config.accept.as_deref(),
8369        )?
8370        .with_authentication(&theScheme)?;
8371
8372        let theRequest =
8373            crate::v1_1_4::request::orgs_block_user::hyper_request(theBuilder)?;
8374
8375        ::log::debug!("HTTP request: {:?}", &theRequest);
8376
8377        let theResponse = self.client.request(theRequest).await?;
8378
8379        ::log::debug!("HTTP response: {:?}", &theResponse);
8380
8381        Ok(theResponse)
8382    }
8383
8384    /// Unblock a user from an organization
8385    /// 
8386    /// [API method documentation](https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization)
8387    pub async fn orgs_unblock_user(
8388        &self,
8389        org: &str,
8390        username: &str,
8391    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8392        let mut theScheme = AuthScheme::from(&self.config.authentication);
8393
8394        while let Some(auth_step) = theScheme.step()? {
8395            match auth_step {
8396                ::authentic::AuthenticationStep::Request(auth_request) => {
8397                    theScheme.respond(self.client.request(auth_request).await);
8398                }
8399                ::authentic::AuthenticationStep::WaitFor(duration) => {
8400                    (self.sleep)(duration).await;
8401                }
8402            }
8403        }
8404        let theBuilder = crate::v1_1_4::request::orgs_unblock_user::http_builder(
8405            self.config.base_url.as_ref(),
8406            org,
8407            username,
8408            self.config.user_agent.as_ref(),
8409            self.config.accept.as_deref(),
8410        )?
8411        .with_authentication(&theScheme)?;
8412
8413        let theRequest =
8414            crate::v1_1_4::request::orgs_unblock_user::hyper_request(theBuilder)?;
8415
8416        ::log::debug!("HTTP request: {:?}", &theRequest);
8417
8418        let theResponse = self.client.request(theRequest).await?;
8419
8420        ::log::debug!("HTTP response: {:?}", &theResponse);
8421
8422        Ok(theResponse)
8423    }
8424
8425    /// List code scanning alerts for an organization
8426    /// 
8427    /// Lists all code scanning alerts for the default branch (usually `main`
8428    /// or `master`) for all eligible repositories in an organization.
8429    /// To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope.
8430    /// 
8431    /// GitHub Apps must have the `security_events` read permission to use this endpoint.
8432    /// 
8433    /// [API method documentation](https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization)
8434    #[allow(clippy::too_many_arguments)]
8435    pub async fn code_scanning_list_alerts_for_org(
8436        &self,
8437        org: &str,
8438        tool_name: ::std::option::Option<&str>,
8439        tool_guid: ::std::option::Option<::std::option::Option<&str>>,
8440        before: ::std::option::Option<&str>,
8441        after: ::std::option::Option<&str>,
8442        page: ::std::option::Option<i64>,
8443        per_page: ::std::option::Option<i64>,
8444        state: ::std::option::Option<&str>,
8445        sort: &crate::types::Sort<'_>,
8446    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8447        let (sort, direction) = sort.extract();
8448        let mut theScheme = AuthScheme::from(&self.config.authentication);
8449
8450        while let Some(auth_step) = theScheme.step()? {
8451            match auth_step {
8452                ::authentic::AuthenticationStep::Request(auth_request) => {
8453                    theScheme.respond(self.client.request(auth_request).await);
8454                }
8455                ::authentic::AuthenticationStep::WaitFor(duration) => {
8456                    (self.sleep)(duration).await;
8457                }
8458            }
8459        }
8460        let theBuilder = crate::v1_1_4::request::code_scanning_list_alerts_for_org::http_builder(
8461            self.config.base_url.as_ref(),
8462            org,
8463            tool_name,
8464            tool_guid,
8465            before,
8466            after,
8467            page,
8468            per_page,
8469            direction,
8470            state,
8471            sort,
8472            self.config.user_agent.as_ref(),
8473            self.config.accept.as_deref(),
8474        )?
8475        .with_authentication(&theScheme)?;
8476
8477        let theRequest =
8478            crate::v1_1_4::request::code_scanning_list_alerts_for_org::hyper_request(theBuilder)?;
8479
8480        ::log::debug!("HTTP request: {:?}", &theRequest);
8481
8482        let theResponse = self.client.request(theRequest).await?;
8483
8484        ::log::debug!("HTTP response: {:?}", &theResponse);
8485
8486        Ok(theResponse)
8487    }
8488
8489    /// List SAML SSO authorizations for an organization
8490    /// 
8491    /// Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).
8492    /// 
8493    /// An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on).
8494    /// 
8495    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-saml-sso-authorizations-for-an-organization)
8496    pub async fn orgs_list_saml_sso_authorizations(
8497        &self,
8498        org: &str,
8499        per_page: ::std::option::Option<i64>,
8500        page: ::std::option::Option<i64>,
8501        login: ::std::option::Option<&str>,
8502    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8503        let mut theScheme = AuthScheme::from(&self.config.authentication);
8504
8505        while let Some(auth_step) = theScheme.step()? {
8506            match auth_step {
8507                ::authentic::AuthenticationStep::Request(auth_request) => {
8508                    theScheme.respond(self.client.request(auth_request).await);
8509                }
8510                ::authentic::AuthenticationStep::WaitFor(duration) => {
8511                    (self.sleep)(duration).await;
8512                }
8513            }
8514        }
8515        let theBuilder = crate::v1_1_4::request::orgs_list_saml_sso_authorizations::http_builder(
8516            self.config.base_url.as_ref(),
8517            org,
8518            per_page,
8519            page,
8520            login,
8521            self.config.user_agent.as_ref(),
8522            self.config.accept.as_deref(),
8523        )?
8524        .with_authentication(&theScheme)?;
8525
8526        let theRequest =
8527            crate::v1_1_4::request::orgs_list_saml_sso_authorizations::hyper_request(theBuilder)?;
8528
8529        ::log::debug!("HTTP request: {:?}", &theRequest);
8530
8531        let theResponse = self.client.request(theRequest).await?;
8532
8533        ::log::debug!("HTTP response: {:?}", &theResponse);
8534
8535        Ok(theResponse)
8536    }
8537
8538    /// Remove a SAML SSO authorization for an organization
8539    /// 
8540    /// Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products).
8541    /// 
8542    /// An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access.
8543    /// 
8544    /// [API method documentation](https://docs.github.com/rest/reference/orgs#remove-a-saml-sso-authorization-for-an-organization)
8545    pub async fn orgs_remove_saml_sso_authorization(
8546        &self,
8547        org: &str,
8548        credential_id: i64,
8549    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8550        let mut theScheme = AuthScheme::from(&self.config.authentication);
8551
8552        while let Some(auth_step) = theScheme.step()? {
8553            match auth_step {
8554                ::authentic::AuthenticationStep::Request(auth_request) => {
8555                    theScheme.respond(self.client.request(auth_request).await);
8556                }
8557                ::authentic::AuthenticationStep::WaitFor(duration) => {
8558                    (self.sleep)(duration).await;
8559                }
8560            }
8561        }
8562        let theBuilder = crate::v1_1_4::request::orgs_remove_saml_sso_authorization::http_builder(
8563            self.config.base_url.as_ref(),
8564            org,
8565            credential_id,
8566            self.config.user_agent.as_ref(),
8567            self.config.accept.as_deref(),
8568        )?
8569        .with_authentication(&theScheme)?;
8570
8571        let theRequest =
8572            crate::v1_1_4::request::orgs_remove_saml_sso_authorization::hyper_request(theBuilder)?;
8573
8574        ::log::debug!("HTTP request: {:?}", &theRequest);
8575
8576        let theResponse = self.client.request(theRequest).await?;
8577
8578        ::log::debug!("HTTP response: {:?}", &theResponse);
8579
8580        Ok(theResponse)
8581    }
8582
8583    /// List organization secrets
8584    /// 
8585    /// Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.
8586    /// 
8587    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#list-organization-secrets)
8588    pub async fn dependabot_list_org_secrets(
8589        &self,
8590        org: &str,
8591        per_page: ::std::option::Option<i64>,
8592        page: ::std::option::Option<i64>,
8593    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8594        let mut theScheme = AuthScheme::from(&self.config.authentication);
8595
8596        while let Some(auth_step) = theScheme.step()? {
8597            match auth_step {
8598                ::authentic::AuthenticationStep::Request(auth_request) => {
8599                    theScheme.respond(self.client.request(auth_request).await);
8600                }
8601                ::authentic::AuthenticationStep::WaitFor(duration) => {
8602                    (self.sleep)(duration).await;
8603                }
8604            }
8605        }
8606        let theBuilder = crate::v1_1_4::request::dependabot_list_org_secrets::http_builder(
8607            self.config.base_url.as_ref(),
8608            org,
8609            per_page,
8610            page,
8611            self.config.user_agent.as_ref(),
8612            self.config.accept.as_deref(),
8613        )?
8614        .with_authentication(&theScheme)?;
8615
8616        let theRequest =
8617            crate::v1_1_4::request::dependabot_list_org_secrets::hyper_request(theBuilder)?;
8618
8619        ::log::debug!("HTTP request: {:?}", &theRequest);
8620
8621        let theResponse = self.client.request(theRequest).await?;
8622
8623        ::log::debug!("HTTP response: {:?}", &theResponse);
8624
8625        Ok(theResponse)
8626    }
8627
8628    /// Get an organization public key
8629    /// 
8630    /// Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.
8631    /// 
8632    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key)
8633    pub async fn dependabot_get_org_public_key(
8634        &self,
8635        org: &str,
8636    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8637        let mut theScheme = AuthScheme::from(&self.config.authentication);
8638
8639        while let Some(auth_step) = theScheme.step()? {
8640            match auth_step {
8641                ::authentic::AuthenticationStep::Request(auth_request) => {
8642                    theScheme.respond(self.client.request(auth_request).await);
8643                }
8644                ::authentic::AuthenticationStep::WaitFor(duration) => {
8645                    (self.sleep)(duration).await;
8646                }
8647            }
8648        }
8649        let theBuilder = crate::v1_1_4::request::dependabot_get_org_public_key::http_builder(
8650            self.config.base_url.as_ref(),
8651            org,
8652            self.config.user_agent.as_ref(),
8653            self.config.accept.as_deref(),
8654        )?
8655        .with_authentication(&theScheme)?;
8656
8657        let theRequest =
8658            crate::v1_1_4::request::dependabot_get_org_public_key::hyper_request(theBuilder)?;
8659
8660        ::log::debug!("HTTP request: {:?}", &theRequest);
8661
8662        let theResponse = self.client.request(theRequest).await?;
8663
8664        ::log::debug!("HTTP response: {:?}", &theResponse);
8665
8666        Ok(theResponse)
8667    }
8668
8669    /// Get an organization secret
8670    /// 
8671    /// Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.
8672    /// 
8673    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#get-an-organization-secret)
8674    pub async fn dependabot_get_org_secret(
8675        &self,
8676        org: &str,
8677        secret_name: &str,
8678    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8679        let mut theScheme = AuthScheme::from(&self.config.authentication);
8680
8681        while let Some(auth_step) = theScheme.step()? {
8682            match auth_step {
8683                ::authentic::AuthenticationStep::Request(auth_request) => {
8684                    theScheme.respond(self.client.request(auth_request).await);
8685                }
8686                ::authentic::AuthenticationStep::WaitFor(duration) => {
8687                    (self.sleep)(duration).await;
8688                }
8689            }
8690        }
8691        let theBuilder = crate::v1_1_4::request::dependabot_get_org_secret::http_builder(
8692            self.config.base_url.as_ref(),
8693            org,
8694            secret_name,
8695            self.config.user_agent.as_ref(),
8696            self.config.accept.as_deref(),
8697        )?
8698        .with_authentication(&theScheme)?;
8699
8700        let theRequest =
8701            crate::v1_1_4::request::dependabot_get_org_secret::hyper_request(theBuilder)?;
8702
8703        ::log::debug!("HTTP request: {:?}", &theRequest);
8704
8705        let theResponse = self.client.request(theRequest).await?;
8706
8707        ::log::debug!("HTTP response: {:?}", &theResponse);
8708
8709        Ok(theResponse)
8710    }
8711
8712    /// Create or update an organization secret
8713    /// 
8714    /// Creates or updates an organization secret with an encrypted value. Encrypt your secret using
8715    /// [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
8716    /// token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization
8717    /// permission to use this endpoint.
8718    /// 
8719    /// #### Example encrypting a secret using Node.js
8720    /// 
8721    /// Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
8722    /// 
8723    /// ```text
8724    /// const sodium = require('tweetsodium');
8725    /// 
8726    /// const key = "base64-encoded-public-key";
8727    /// const value = "plain-text-secret";
8728    /// 
8729    /// // Convert the message and key to Uint8Array's (Buffer implements that interface)
8730    /// const messageBytes = Buffer.from(value);
8731    /// const keyBytes = Buffer.from(key, 'base64');
8732    /// 
8733    /// // Encrypt using LibSodium.
8734    /// const encryptedBytes = sodium.seal(messageBytes, keyBytes);
8735    /// 
8736    /// // Base64 the encrypted secret
8737    /// const encrypted = Buffer.from(encryptedBytes).toString('base64');
8738    /// 
8739    /// console.log(encrypted);
8740    /// ```
8741    /// 
8742    /// 
8743    /// #### Example encrypting a secret using Python
8744    /// 
8745    /// Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3.
8746    /// 
8747    /// ```text
8748    /// from base64 import b64encode
8749    /// from nacl import encoding, public
8750    /// 
8751    /// def encrypt(public_key: str, secret_value: str) -> str:
8752    ///   """Encrypt a Unicode string using the public key."""
8753    ///   public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
8754    ///   sealed_box = public.SealedBox(public_key)
8755    ///   encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
8756    ///   return b64encode(encrypted).decode("utf-8")
8757    /// ```
8758    /// 
8759    /// #### Example encrypting a secret using C#
8760    /// 
8761    /// Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
8762    /// 
8763    /// ```text
8764    /// var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
8765    /// var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
8766    /// 
8767    /// var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
8768    /// 
8769    /// Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
8770    /// ```
8771    /// 
8772    /// #### Example encrypting a secret using Ruby
8773    /// 
8774    /// Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
8775    /// 
8776    /// ```ruby
8777    /// require "rbnacl"
8778    /// require "base64"
8779    /// 
8780    /// key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
8781    /// public_key = RbNaCl::PublicKey.new(key)
8782    /// 
8783    /// box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
8784    /// encrypted_secret = box.encrypt("my_secret")
8785    /// 
8786    /// # Print the base64 encoded secret
8787    /// puts Base64.strict_encode64(encrypted_secret)
8788    /// ```
8789    /// 
8790    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret)
8791    ///
8792    /// # Content
8793    ///
8794    /// - [`&v1_1_4::request::dependabot_create_or_update_org_secret::body::Json`](crate::v1_1_4::request::dependabot_create_or_update_org_secret::body::Json)
8795    pub async fn dependabot_create_or_update_org_secret<Content>(
8796        &self,
8797        org: &str,
8798        secret_name: &str,
8799        theContent: Content,
8800    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
8801    where
8802        Content: Copy + TryInto<crate::v1_1_4::request::dependabot_create_or_update_org_secret::Content<::hyper::Body>>,
8803        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::dependabot_create_or_update_org_secret::Content<::hyper::Body>>>::Error>
8804    {
8805        let mut theScheme = AuthScheme::from(&self.config.authentication);
8806
8807        while let Some(auth_step) = theScheme.step()? {
8808            match auth_step {
8809                ::authentic::AuthenticationStep::Request(auth_request) => {
8810                    theScheme.respond(self.client.request(auth_request).await);
8811                }
8812                ::authentic::AuthenticationStep::WaitFor(duration) => {
8813                    (self.sleep)(duration).await;
8814                }
8815            }
8816        }
8817        let theBuilder = crate::v1_1_4::request::dependabot_create_or_update_org_secret::http_builder(
8818            self.config.base_url.as_ref(),
8819            org,
8820            secret_name,
8821            self.config.user_agent.as_ref(),
8822            self.config.accept.as_deref(),
8823        )?
8824        .with_authentication(&theScheme)?;
8825
8826        let theRequest = crate::v1_1_4::request::dependabot_create_or_update_org_secret::hyper_request(
8827            theBuilder,
8828            theContent.try_into()?,
8829        )?;
8830
8831        ::log::debug!("HTTP request: {:?}", &theRequest);
8832
8833        let theResponse = self.client.request(theRequest).await?;
8834
8835        ::log::debug!("HTTP response: {:?}", &theResponse);
8836
8837        Ok(theResponse)
8838    }
8839
8840    /// Delete an organization secret
8841    /// 
8842    /// Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.
8843    /// 
8844    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret)
8845    pub async fn dependabot_delete_org_secret(
8846        &self,
8847        org: &str,
8848        secret_name: &str,
8849    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8850        let mut theScheme = AuthScheme::from(&self.config.authentication);
8851
8852        while let Some(auth_step) = theScheme.step()? {
8853            match auth_step {
8854                ::authentic::AuthenticationStep::Request(auth_request) => {
8855                    theScheme.respond(self.client.request(auth_request).await);
8856                }
8857                ::authentic::AuthenticationStep::WaitFor(duration) => {
8858                    (self.sleep)(duration).await;
8859                }
8860            }
8861        }
8862        let theBuilder = crate::v1_1_4::request::dependabot_delete_org_secret::http_builder(
8863            self.config.base_url.as_ref(),
8864            org,
8865            secret_name,
8866            self.config.user_agent.as_ref(),
8867            self.config.accept.as_deref(),
8868        )?
8869        .with_authentication(&theScheme)?;
8870
8871        let theRequest =
8872            crate::v1_1_4::request::dependabot_delete_org_secret::hyper_request(theBuilder)?;
8873
8874        ::log::debug!("HTTP request: {:?}", &theRequest);
8875
8876        let theResponse = self.client.request(theRequest).await?;
8877
8878        ::log::debug!("HTTP response: {:?}", &theResponse);
8879
8880        Ok(theResponse)
8881    }
8882
8883    /// List selected repositories for an organization secret
8884    /// 
8885    /// Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.
8886    /// 
8887    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret)
8888    pub async fn dependabot_list_selected_repos_for_org_secret(
8889        &self,
8890        org: &str,
8891        secret_name: &str,
8892        page: ::std::option::Option<i64>,
8893        per_page: ::std::option::Option<i64>,
8894    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8895        let mut theScheme = AuthScheme::from(&self.config.authentication);
8896
8897        while let Some(auth_step) = theScheme.step()? {
8898            match auth_step {
8899                ::authentic::AuthenticationStep::Request(auth_request) => {
8900                    theScheme.respond(self.client.request(auth_request).await);
8901                }
8902                ::authentic::AuthenticationStep::WaitFor(duration) => {
8903                    (self.sleep)(duration).await;
8904                }
8905            }
8906        }
8907        let theBuilder = crate::v1_1_4::request::dependabot_list_selected_repos_for_org_secret::http_builder(
8908            self.config.base_url.as_ref(),
8909            org,
8910            secret_name,
8911            page,
8912            per_page,
8913            self.config.user_agent.as_ref(),
8914            self.config.accept.as_deref(),
8915        )?
8916        .with_authentication(&theScheme)?;
8917
8918        let theRequest =
8919            crate::v1_1_4::request::dependabot_list_selected_repos_for_org_secret::hyper_request(theBuilder)?;
8920
8921        ::log::debug!("HTTP request: {:?}", &theRequest);
8922
8923        let theResponse = self.client.request(theRequest).await?;
8924
8925        ::log::debug!("HTTP response: {:?}", &theResponse);
8926
8927        Ok(theResponse)
8928    }
8929
8930    /// Set selected repositories for an organization secret
8931    /// 
8932    /// Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.
8933    /// 
8934    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret)
8935    ///
8936    /// # Content
8937    ///
8938    /// - [`&v1_1_4::request::dependabot_set_selected_repos_for_org_secret::body::Json`](crate::v1_1_4::request::dependabot_set_selected_repos_for_org_secret::body::Json)
8939    pub async fn dependabot_set_selected_repos_for_org_secret<Content>(
8940        &self,
8941        org: &str,
8942        secret_name: &str,
8943        theContent: Content,
8944    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
8945    where
8946        Content: Copy + TryInto<crate::v1_1_4::request::dependabot_set_selected_repos_for_org_secret::Content<::hyper::Body>>,
8947        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::dependabot_set_selected_repos_for_org_secret::Content<::hyper::Body>>>::Error>
8948    {
8949        let mut theScheme = AuthScheme::from(&self.config.authentication);
8950
8951        while let Some(auth_step) = theScheme.step()? {
8952            match auth_step {
8953                ::authentic::AuthenticationStep::Request(auth_request) => {
8954                    theScheme.respond(self.client.request(auth_request).await);
8955                }
8956                ::authentic::AuthenticationStep::WaitFor(duration) => {
8957                    (self.sleep)(duration).await;
8958                }
8959            }
8960        }
8961        let theBuilder = crate::v1_1_4::request::dependabot_set_selected_repos_for_org_secret::http_builder(
8962            self.config.base_url.as_ref(),
8963            org,
8964            secret_name,
8965            self.config.user_agent.as_ref(),
8966            self.config.accept.as_deref(),
8967        )?
8968        .with_authentication(&theScheme)?;
8969
8970        let theRequest = crate::v1_1_4::request::dependabot_set_selected_repos_for_org_secret::hyper_request(
8971            theBuilder,
8972            theContent.try_into()?,
8973        )?;
8974
8975        ::log::debug!("HTTP request: {:?}", &theRequest);
8976
8977        let theResponse = self.client.request(theRequest).await?;
8978
8979        ::log::debug!("HTTP response: {:?}", &theResponse);
8980
8981        Ok(theResponse)
8982    }
8983
8984    /// Add selected repository to an organization secret
8985    /// 
8986    /// Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.
8987    /// 
8988    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret)
8989    pub async fn dependabot_add_selected_repo_to_org_secret(
8990        &self,
8991        org: &str,
8992        secret_name: &str,
8993        repository_id: i64,
8994    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
8995        let mut theScheme = AuthScheme::from(&self.config.authentication);
8996
8997        while let Some(auth_step) = theScheme.step()? {
8998            match auth_step {
8999                ::authentic::AuthenticationStep::Request(auth_request) => {
9000                    theScheme.respond(self.client.request(auth_request).await);
9001                }
9002                ::authentic::AuthenticationStep::WaitFor(duration) => {
9003                    (self.sleep)(duration).await;
9004                }
9005            }
9006        }
9007        let theBuilder = crate::v1_1_4::request::dependabot_add_selected_repo_to_org_secret::http_builder(
9008            self.config.base_url.as_ref(),
9009            org,
9010            secret_name,
9011            repository_id,
9012            self.config.user_agent.as_ref(),
9013            self.config.accept.as_deref(),
9014        )?
9015        .with_authentication(&theScheme)?;
9016
9017        let theRequest =
9018            crate::v1_1_4::request::dependabot_add_selected_repo_to_org_secret::hyper_request(theBuilder)?;
9019
9020        ::log::debug!("HTTP request: {:?}", &theRequest);
9021
9022        let theResponse = self.client.request(theRequest).await?;
9023
9024        ::log::debug!("HTTP response: {:?}", &theResponse);
9025
9026        Ok(theResponse)
9027    }
9028
9029    /// Remove selected repository from an organization secret
9030    /// 
9031    /// Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint.
9032    /// 
9033    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret)
9034    pub async fn dependabot_remove_selected_repo_from_org_secret(
9035        &self,
9036        org: &str,
9037        secret_name: &str,
9038        repository_id: i64,
9039    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9040        let mut theScheme = AuthScheme::from(&self.config.authentication);
9041
9042        while let Some(auth_step) = theScheme.step()? {
9043            match auth_step {
9044                ::authentic::AuthenticationStep::Request(auth_request) => {
9045                    theScheme.respond(self.client.request(auth_request).await);
9046                }
9047                ::authentic::AuthenticationStep::WaitFor(duration) => {
9048                    (self.sleep)(duration).await;
9049                }
9050            }
9051        }
9052        let theBuilder = crate::v1_1_4::request::dependabot_remove_selected_repo_from_org_secret::http_builder(
9053            self.config.base_url.as_ref(),
9054            org,
9055            secret_name,
9056            repository_id,
9057            self.config.user_agent.as_ref(),
9058            self.config.accept.as_deref(),
9059        )?
9060        .with_authentication(&theScheme)?;
9061
9062        let theRequest =
9063            crate::v1_1_4::request::dependabot_remove_selected_repo_from_org_secret::hyper_request(theBuilder)?;
9064
9065        ::log::debug!("HTTP request: {:?}", &theRequest);
9066
9067        let theResponse = self.client.request(theRequest).await?;
9068
9069        ::log::debug!("HTTP response: {:?}", &theResponse);
9070
9071        Ok(theResponse)
9072    }
9073
9074    /// List public organization events
9075    /// 
9076    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-public-organization-events)
9077    pub async fn activity_list_public_org_events(
9078        &self,
9079        org: &str,
9080        per_page: ::std::option::Option<i64>,
9081        page: ::std::option::Option<i64>,
9082    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9083        let mut theScheme = AuthScheme::from(&self.config.authentication);
9084
9085        while let Some(auth_step) = theScheme.step()? {
9086            match auth_step {
9087                ::authentic::AuthenticationStep::Request(auth_request) => {
9088                    theScheme.respond(self.client.request(auth_request).await);
9089                }
9090                ::authentic::AuthenticationStep::WaitFor(duration) => {
9091                    (self.sleep)(duration).await;
9092                }
9093            }
9094        }
9095        let theBuilder = crate::v1_1_4::request::activity_list_public_org_events::http_builder(
9096            self.config.base_url.as_ref(),
9097            org,
9098            per_page,
9099            page,
9100            self.config.user_agent.as_ref(),
9101            self.config.accept.as_deref(),
9102        )?
9103        .with_authentication(&theScheme)?;
9104
9105        let theRequest =
9106            crate::v1_1_4::request::activity_list_public_org_events::hyper_request(theBuilder)?;
9107
9108        ::log::debug!("HTTP request: {:?}", &theRequest);
9109
9110        let theResponse = self.client.request(theRequest).await?;
9111
9112        ::log::debug!("HTTP response: {:?}", &theResponse);
9113
9114        Ok(theResponse)
9115    }
9116
9117    /// Get an external group
9118    /// 
9119    /// Displays information about the specific group's usage.  Provides a list of the group's external members as well as a list of teams that this group is connected to.
9120    /// 
9121    /// You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation.
9122    /// 
9123    /// [API method documentation](https://docs.github.com/rest/reference/teams#external-idp-group-info-for-an-organization)
9124    pub async fn teams_external_idp_group_info_for_org(
9125        &self,
9126        org: &str,
9127        group_id: i64,
9128    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9129        let mut theScheme = AuthScheme::from(&self.config.authentication);
9130
9131        while let Some(auth_step) = theScheme.step()? {
9132            match auth_step {
9133                ::authentic::AuthenticationStep::Request(auth_request) => {
9134                    theScheme.respond(self.client.request(auth_request).await);
9135                }
9136                ::authentic::AuthenticationStep::WaitFor(duration) => {
9137                    (self.sleep)(duration).await;
9138                }
9139            }
9140        }
9141        let theBuilder = crate::v1_1_4::request::teams_external_idp_group_info_for_org::http_builder(
9142            self.config.base_url.as_ref(),
9143            org,
9144            group_id,
9145            self.config.user_agent.as_ref(),
9146            self.config.accept.as_deref(),
9147        )?
9148        .with_authentication(&theScheme)?;
9149
9150        let theRequest =
9151            crate::v1_1_4::request::teams_external_idp_group_info_for_org::hyper_request(theBuilder)?;
9152
9153        ::log::debug!("HTTP request: {:?}", &theRequest);
9154
9155        let theResponse = self.client.request(theRequest).await?;
9156
9157        ::log::debug!("HTTP response: {:?}", &theResponse);
9158
9159        Ok(theResponse)
9160    }
9161
9162    /// List external groups in an organization
9163    /// 
9164    /// Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned.  You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)."
9165    /// 
9166    /// You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation.
9167    /// 
9168    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-external-idp-groups-for-an-organization)
9169    pub async fn teams_list_external_idp_groups_for_org(
9170        &self,
9171        org: &str,
9172        per_page: ::std::option::Option<i64>,
9173        page: ::std::option::Option<i64>,
9174        display_name: ::std::option::Option<&str>,
9175    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9176        let mut theScheme = AuthScheme::from(&self.config.authentication);
9177
9178        while let Some(auth_step) = theScheme.step()? {
9179            match auth_step {
9180                ::authentic::AuthenticationStep::Request(auth_request) => {
9181                    theScheme.respond(self.client.request(auth_request).await);
9182                }
9183                ::authentic::AuthenticationStep::WaitFor(duration) => {
9184                    (self.sleep)(duration).await;
9185                }
9186            }
9187        }
9188        let theBuilder = crate::v1_1_4::request::teams_list_external_idp_groups_for_org::http_builder(
9189            self.config.base_url.as_ref(),
9190            org,
9191            per_page,
9192            page,
9193            display_name,
9194            self.config.user_agent.as_ref(),
9195            self.config.accept.as_deref(),
9196        )?
9197        .with_authentication(&theScheme)?;
9198
9199        let theRequest =
9200            crate::v1_1_4::request::teams_list_external_idp_groups_for_org::hyper_request(theBuilder)?;
9201
9202        ::log::debug!("HTTP request: {:?}", &theRequest);
9203
9204        let theResponse = self.client.request(theRequest).await?;
9205
9206        ::log::debug!("HTTP response: {:?}", &theResponse);
9207
9208        Ok(theResponse)
9209    }
9210
9211    /// List failed organization invitations
9212    /// 
9213    /// The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure.
9214    /// 
9215    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations)
9216    pub async fn orgs_list_failed_invitations(
9217        &self,
9218        org: &str,
9219        per_page: ::std::option::Option<i64>,
9220        page: ::std::option::Option<i64>,
9221    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9222        let mut theScheme = AuthScheme::from(&self.config.authentication);
9223
9224        while let Some(auth_step) = theScheme.step()? {
9225            match auth_step {
9226                ::authentic::AuthenticationStep::Request(auth_request) => {
9227                    theScheme.respond(self.client.request(auth_request).await);
9228                }
9229                ::authentic::AuthenticationStep::WaitFor(duration) => {
9230                    (self.sleep)(duration).await;
9231                }
9232            }
9233        }
9234        let theBuilder = crate::v1_1_4::request::orgs_list_failed_invitations::http_builder(
9235            self.config.base_url.as_ref(),
9236            org,
9237            per_page,
9238            page,
9239            self.config.user_agent.as_ref(),
9240            self.config.accept.as_deref(),
9241        )?
9242        .with_authentication(&theScheme)?;
9243
9244        let theRequest =
9245            crate::v1_1_4::request::orgs_list_failed_invitations::hyper_request(theBuilder)?;
9246
9247        ::log::debug!("HTTP request: {:?}", &theRequest);
9248
9249        let theResponse = self.client.request(theRequest).await?;
9250
9251        ::log::debug!("HTTP response: {:?}", &theResponse);
9252
9253        Ok(theResponse)
9254    }
9255
9256    /// List organization webhooks
9257    /// 
9258    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-organization-webhooks)
9259    pub async fn orgs_list_webhooks(
9260        &self,
9261        org: &str,
9262        per_page: ::std::option::Option<i64>,
9263        page: ::std::option::Option<i64>,
9264    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9265        let mut theScheme = AuthScheme::from(&self.config.authentication);
9266
9267        while let Some(auth_step) = theScheme.step()? {
9268            match auth_step {
9269                ::authentic::AuthenticationStep::Request(auth_request) => {
9270                    theScheme.respond(self.client.request(auth_request).await);
9271                }
9272                ::authentic::AuthenticationStep::WaitFor(duration) => {
9273                    (self.sleep)(duration).await;
9274                }
9275            }
9276        }
9277        let theBuilder = crate::v1_1_4::request::orgs_list_webhooks::http_builder(
9278            self.config.base_url.as_ref(),
9279            org,
9280            per_page,
9281            page,
9282            self.config.user_agent.as_ref(),
9283            self.config.accept.as_deref(),
9284        )?
9285        .with_authentication(&theScheme)?;
9286
9287        let theRequest =
9288            crate::v1_1_4::request::orgs_list_webhooks::hyper_request(theBuilder)?;
9289
9290        ::log::debug!("HTTP request: {:?}", &theRequest);
9291
9292        let theResponse = self.client.request(theRequest).await?;
9293
9294        ::log::debug!("HTTP response: {:?}", &theResponse);
9295
9296        Ok(theResponse)
9297    }
9298
9299    /// Create an organization webhook
9300    /// 
9301    /// Here's how you can create a hook that posts payloads in JSON format:
9302    /// 
9303    /// [API method documentation](https://docs.github.com/rest/reference/orgs#create-an-organization-webhook)
9304    ///
9305    /// # Content
9306    ///
9307    /// - [`&v1_1_4::request::orgs_create_webhook::body::Json`](crate::v1_1_4::request::orgs_create_webhook::body::Json)
9308    pub async fn orgs_create_webhook<Content>(
9309        &self,
9310        org: &str,
9311        theContent: Content,
9312    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
9313    where
9314        Content: Copy + TryInto<crate::v1_1_4::request::orgs_create_webhook::Content<::hyper::Body>>,
9315        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::orgs_create_webhook::Content<::hyper::Body>>>::Error>
9316    {
9317        let mut theScheme = AuthScheme::from(&self.config.authentication);
9318
9319        while let Some(auth_step) = theScheme.step()? {
9320            match auth_step {
9321                ::authentic::AuthenticationStep::Request(auth_request) => {
9322                    theScheme.respond(self.client.request(auth_request).await);
9323                }
9324                ::authentic::AuthenticationStep::WaitFor(duration) => {
9325                    (self.sleep)(duration).await;
9326                }
9327            }
9328        }
9329        let theBuilder = crate::v1_1_4::request::orgs_create_webhook::http_builder(
9330            self.config.base_url.as_ref(),
9331            org,
9332            self.config.user_agent.as_ref(),
9333            self.config.accept.as_deref(),
9334        )?
9335        .with_authentication(&theScheme)?;
9336
9337        let theRequest = crate::v1_1_4::request::orgs_create_webhook::hyper_request(
9338            theBuilder,
9339            theContent.try_into()?,
9340        )?;
9341
9342        ::log::debug!("HTTP request: {:?}", &theRequest);
9343
9344        let theResponse = self.client.request(theRequest).await?;
9345
9346        ::log::debug!("HTTP response: {:?}", &theResponse);
9347
9348        Ok(theResponse)
9349    }
9350
9351    /// Get an organization webhook
9352    /// 
9353    /// Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)."
9354    /// 
9355    /// [API method documentation](https://docs.github.com/rest/reference/orgs#get-an-organization-webhook)
9356    pub async fn orgs_get_webhook(
9357        &self,
9358        org: &str,
9359        hook_id: i64,
9360    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9361        let mut theScheme = AuthScheme::from(&self.config.authentication);
9362
9363        while let Some(auth_step) = theScheme.step()? {
9364            match auth_step {
9365                ::authentic::AuthenticationStep::Request(auth_request) => {
9366                    theScheme.respond(self.client.request(auth_request).await);
9367                }
9368                ::authentic::AuthenticationStep::WaitFor(duration) => {
9369                    (self.sleep)(duration).await;
9370                }
9371            }
9372        }
9373        let theBuilder = crate::v1_1_4::request::orgs_get_webhook::http_builder(
9374            self.config.base_url.as_ref(),
9375            org,
9376            hook_id,
9377            self.config.user_agent.as_ref(),
9378            self.config.accept.as_deref(),
9379        )?
9380        .with_authentication(&theScheme)?;
9381
9382        let theRequest =
9383            crate::v1_1_4::request::orgs_get_webhook::hyper_request(theBuilder)?;
9384
9385        ::log::debug!("HTTP request: {:?}", &theRequest);
9386
9387        let theResponse = self.client.request(theRequest).await?;
9388
9389        ::log::debug!("HTTP response: {:?}", &theResponse);
9390
9391        Ok(theResponse)
9392    }
9393
9394    /// Delete an organization webhook
9395    /// 
9396    /// [API method documentation](https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook)
9397    pub async fn orgs_delete_webhook(
9398        &self,
9399        org: &str,
9400        hook_id: i64,
9401    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9402        let mut theScheme = AuthScheme::from(&self.config.authentication);
9403
9404        while let Some(auth_step) = theScheme.step()? {
9405            match auth_step {
9406                ::authentic::AuthenticationStep::Request(auth_request) => {
9407                    theScheme.respond(self.client.request(auth_request).await);
9408                }
9409                ::authentic::AuthenticationStep::WaitFor(duration) => {
9410                    (self.sleep)(duration).await;
9411                }
9412            }
9413        }
9414        let theBuilder = crate::v1_1_4::request::orgs_delete_webhook::http_builder(
9415            self.config.base_url.as_ref(),
9416            org,
9417            hook_id,
9418            self.config.user_agent.as_ref(),
9419            self.config.accept.as_deref(),
9420        )?
9421        .with_authentication(&theScheme)?;
9422
9423        let theRequest =
9424            crate::v1_1_4::request::orgs_delete_webhook::hyper_request(theBuilder)?;
9425
9426        ::log::debug!("HTTP request: {:?}", &theRequest);
9427
9428        let theResponse = self.client.request(theRequest).await?;
9429
9430        ::log::debug!("HTTP response: {:?}", &theResponse);
9431
9432        Ok(theResponse)
9433    }
9434
9435    /// Update an organization webhook
9436    /// 
9437    /// Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)."
9438    /// 
9439    /// [API method documentation](https://docs.github.com/rest/reference/orgs#update-an-organization-webhook)
9440    ///
9441    /// # Content
9442    ///
9443    /// - [`&v1_1_4::request::orgs_update_webhook::body::Json`](crate::v1_1_4::request::orgs_update_webhook::body::Json)
9444    pub async fn orgs_update_webhook<Content>(
9445        &self,
9446        org: &str,
9447        hook_id: i64,
9448        theContent: Content,
9449    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
9450    where
9451        Content: Copy + TryInto<crate::v1_1_4::request::orgs_update_webhook::Content<::hyper::Body>>,
9452        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::orgs_update_webhook::Content<::hyper::Body>>>::Error>
9453    {
9454        let mut theScheme = AuthScheme::from(&self.config.authentication);
9455
9456        while let Some(auth_step) = theScheme.step()? {
9457            match auth_step {
9458                ::authentic::AuthenticationStep::Request(auth_request) => {
9459                    theScheme.respond(self.client.request(auth_request).await);
9460                }
9461                ::authentic::AuthenticationStep::WaitFor(duration) => {
9462                    (self.sleep)(duration).await;
9463                }
9464            }
9465        }
9466        let theBuilder = crate::v1_1_4::request::orgs_update_webhook::http_builder(
9467            self.config.base_url.as_ref(),
9468            org,
9469            hook_id,
9470            self.config.user_agent.as_ref(),
9471            self.config.accept.as_deref(),
9472        )?
9473        .with_authentication(&theScheme)?;
9474
9475        let theRequest = crate::v1_1_4::request::orgs_update_webhook::hyper_request(
9476            theBuilder,
9477            theContent.try_into()?,
9478        )?;
9479
9480        ::log::debug!("HTTP request: {:?}", &theRequest);
9481
9482        let theResponse = self.client.request(theRequest).await?;
9483
9484        ::log::debug!("HTTP response: {:?}", &theResponse);
9485
9486        Ok(theResponse)
9487    }
9488
9489    /// Get a webhook configuration for an organization
9490    /// 
9491    /// Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)."
9492    /// 
9493    /// Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission.
9494    /// 
9495    /// [API method documentation](https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)
9496    pub async fn orgs_get_webhook_config_for_org(
9497        &self,
9498        org: &str,
9499        hook_id: i64,
9500    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9501        let mut theScheme = AuthScheme::from(&self.config.authentication);
9502
9503        while let Some(auth_step) = theScheme.step()? {
9504            match auth_step {
9505                ::authentic::AuthenticationStep::Request(auth_request) => {
9506                    theScheme.respond(self.client.request(auth_request).await);
9507                }
9508                ::authentic::AuthenticationStep::WaitFor(duration) => {
9509                    (self.sleep)(duration).await;
9510                }
9511            }
9512        }
9513        let theBuilder = crate::v1_1_4::request::orgs_get_webhook_config_for_org::http_builder(
9514            self.config.base_url.as_ref(),
9515            org,
9516            hook_id,
9517            self.config.user_agent.as_ref(),
9518            self.config.accept.as_deref(),
9519        )?
9520        .with_authentication(&theScheme)?;
9521
9522        let theRequest =
9523            crate::v1_1_4::request::orgs_get_webhook_config_for_org::hyper_request(theBuilder)?;
9524
9525        ::log::debug!("HTTP request: {:?}", &theRequest);
9526
9527        let theResponse = self.client.request(theRequest).await?;
9528
9529        ::log::debug!("HTTP response: {:?}", &theResponse);
9530
9531        Ok(theResponse)
9532    }
9533
9534    /// Update a webhook configuration for an organization
9535    /// 
9536    /// Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)."
9537    /// 
9538    /// Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission.
9539    /// 
9540    /// [API method documentation](https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)
9541    ///
9542    /// # Content
9543    ///
9544    /// - [`&v1_1_4::request::orgs_update_webhook_config_for_org::body::Json`](crate::v1_1_4::request::orgs_update_webhook_config_for_org::body::Json)
9545    pub async fn orgs_update_webhook_config_for_org<Content>(
9546        &self,
9547        org: &str,
9548        hook_id: i64,
9549        theContent: Content,
9550    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
9551    where
9552        Content: Copy + TryInto<crate::v1_1_4::request::orgs_update_webhook_config_for_org::Content<::hyper::Body>>,
9553        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::orgs_update_webhook_config_for_org::Content<::hyper::Body>>>::Error>
9554    {
9555        let mut theScheme = AuthScheme::from(&self.config.authentication);
9556
9557        while let Some(auth_step) = theScheme.step()? {
9558            match auth_step {
9559                ::authentic::AuthenticationStep::Request(auth_request) => {
9560                    theScheme.respond(self.client.request(auth_request).await);
9561                }
9562                ::authentic::AuthenticationStep::WaitFor(duration) => {
9563                    (self.sleep)(duration).await;
9564                }
9565            }
9566        }
9567        let theBuilder = crate::v1_1_4::request::orgs_update_webhook_config_for_org::http_builder(
9568            self.config.base_url.as_ref(),
9569            org,
9570            hook_id,
9571            self.config.user_agent.as_ref(),
9572            self.config.accept.as_deref(),
9573        )?
9574        .with_authentication(&theScheme)?;
9575
9576        let theRequest = crate::v1_1_4::request::orgs_update_webhook_config_for_org::hyper_request(
9577            theBuilder,
9578            theContent.try_into()?,
9579        )?;
9580
9581        ::log::debug!("HTTP request: {:?}", &theRequest);
9582
9583        let theResponse = self.client.request(theRequest).await?;
9584
9585        ::log::debug!("HTTP response: {:?}", &theResponse);
9586
9587        Ok(theResponse)
9588    }
9589
9590    /// List deliveries for an organization webhook
9591    /// 
9592    /// Returns a list of webhook deliveries for a webhook configured in an organization.
9593    /// 
9594    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook)
9595    pub async fn orgs_list_webhook_deliveries(
9596        &self,
9597        org: &str,
9598        hook_id: i64,
9599        per_page: ::std::option::Option<i64>,
9600        cursor: ::std::option::Option<&str>,
9601    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9602        let mut theScheme = AuthScheme::from(&self.config.authentication);
9603
9604        while let Some(auth_step) = theScheme.step()? {
9605            match auth_step {
9606                ::authentic::AuthenticationStep::Request(auth_request) => {
9607                    theScheme.respond(self.client.request(auth_request).await);
9608                }
9609                ::authentic::AuthenticationStep::WaitFor(duration) => {
9610                    (self.sleep)(duration).await;
9611                }
9612            }
9613        }
9614        let theBuilder = crate::v1_1_4::request::orgs_list_webhook_deliveries::http_builder(
9615            self.config.base_url.as_ref(),
9616            org,
9617            hook_id,
9618            per_page,
9619            cursor,
9620            self.config.user_agent.as_ref(),
9621            self.config.accept.as_deref(),
9622        )?
9623        .with_authentication(&theScheme)?;
9624
9625        let theRequest =
9626            crate::v1_1_4::request::orgs_list_webhook_deliveries::hyper_request(theBuilder)?;
9627
9628        ::log::debug!("HTTP request: {:?}", &theRequest);
9629
9630        let theResponse = self.client.request(theRequest).await?;
9631
9632        ::log::debug!("HTTP response: {:?}", &theResponse);
9633
9634        Ok(theResponse)
9635    }
9636
9637    /// Get a webhook delivery for an organization webhook
9638    /// 
9639    /// Returns a delivery for a webhook configured in an organization.
9640    /// 
9641    /// [API method documentation](https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook)
9642    pub async fn orgs_get_webhook_delivery(
9643        &self,
9644        org: &str,
9645        hook_id: i64,
9646        delivery_id: i64,
9647    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9648        let mut theScheme = AuthScheme::from(&self.config.authentication);
9649
9650        while let Some(auth_step) = theScheme.step()? {
9651            match auth_step {
9652                ::authentic::AuthenticationStep::Request(auth_request) => {
9653                    theScheme.respond(self.client.request(auth_request).await);
9654                }
9655                ::authentic::AuthenticationStep::WaitFor(duration) => {
9656                    (self.sleep)(duration).await;
9657                }
9658            }
9659        }
9660        let theBuilder = crate::v1_1_4::request::orgs_get_webhook_delivery::http_builder(
9661            self.config.base_url.as_ref(),
9662            org,
9663            hook_id,
9664            delivery_id,
9665            self.config.user_agent.as_ref(),
9666            self.config.accept.as_deref(),
9667        )?
9668        .with_authentication(&theScheme)?;
9669
9670        let theRequest =
9671            crate::v1_1_4::request::orgs_get_webhook_delivery::hyper_request(theBuilder)?;
9672
9673        ::log::debug!("HTTP request: {:?}", &theRequest);
9674
9675        let theResponse = self.client.request(theRequest).await?;
9676
9677        ::log::debug!("HTTP response: {:?}", &theResponse);
9678
9679        Ok(theResponse)
9680    }
9681
9682    /// Redeliver a delivery for an organization webhook
9683    /// 
9684    /// Redeliver a delivery for a webhook configured in an organization.
9685    /// 
9686    /// [API method documentation](https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook)
9687    pub async fn orgs_redeliver_webhook_delivery(
9688        &self,
9689        org: &str,
9690        hook_id: i64,
9691        delivery_id: i64,
9692    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9693        let mut theScheme = AuthScheme::from(&self.config.authentication);
9694
9695        while let Some(auth_step) = theScheme.step()? {
9696            match auth_step {
9697                ::authentic::AuthenticationStep::Request(auth_request) => {
9698                    theScheme.respond(self.client.request(auth_request).await);
9699                }
9700                ::authentic::AuthenticationStep::WaitFor(duration) => {
9701                    (self.sleep)(duration).await;
9702                }
9703            }
9704        }
9705        let theBuilder = crate::v1_1_4::request::orgs_redeliver_webhook_delivery::http_builder(
9706            self.config.base_url.as_ref(),
9707            org,
9708            hook_id,
9709            delivery_id,
9710            self.config.user_agent.as_ref(),
9711            self.config.accept.as_deref(),
9712        )?
9713        .with_authentication(&theScheme)?;
9714
9715        let theRequest =
9716            crate::v1_1_4::request::orgs_redeliver_webhook_delivery::hyper_request(theBuilder)?;
9717
9718        ::log::debug!("HTTP request: {:?}", &theRequest);
9719
9720        let theResponse = self.client.request(theRequest).await?;
9721
9722        ::log::debug!("HTTP response: {:?}", &theResponse);
9723
9724        Ok(theResponse)
9725    }
9726
9727    /// Ping an organization webhook
9728    /// 
9729    /// This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook.
9730    /// 
9731    /// [API method documentation](https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook)
9732    pub async fn orgs_ping_webhook(
9733        &self,
9734        org: &str,
9735        hook_id: i64,
9736    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9737        let mut theScheme = AuthScheme::from(&self.config.authentication);
9738
9739        while let Some(auth_step) = theScheme.step()? {
9740            match auth_step {
9741                ::authentic::AuthenticationStep::Request(auth_request) => {
9742                    theScheme.respond(self.client.request(auth_request).await);
9743                }
9744                ::authentic::AuthenticationStep::WaitFor(duration) => {
9745                    (self.sleep)(duration).await;
9746                }
9747            }
9748        }
9749        let theBuilder = crate::v1_1_4::request::orgs_ping_webhook::http_builder(
9750            self.config.base_url.as_ref(),
9751            org,
9752            hook_id,
9753            self.config.user_agent.as_ref(),
9754            self.config.accept.as_deref(),
9755        )?
9756        .with_authentication(&theScheme)?;
9757
9758        let theRequest =
9759            crate::v1_1_4::request::orgs_ping_webhook::hyper_request(theBuilder)?;
9760
9761        ::log::debug!("HTTP request: {:?}", &theRequest);
9762
9763        let theResponse = self.client.request(theRequest).await?;
9764
9765        ::log::debug!("HTTP response: {:?}", &theResponse);
9766
9767        Ok(theResponse)
9768    }
9769
9770    /// Get an organization installation for the authenticated app
9771    /// 
9772    /// Enables an authenticated GitHub App to find the organization's installation information.
9773    /// 
9774    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
9775    /// 
9776    /// [API method documentation](https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app)
9777    pub async fn apps_get_org_installation(
9778        &self,
9779        org: &str,
9780    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9781        let mut theScheme = AuthScheme::from(&self.config.authentication);
9782
9783        while let Some(auth_step) = theScheme.step()? {
9784            match auth_step {
9785                ::authentic::AuthenticationStep::Request(auth_request) => {
9786                    theScheme.respond(self.client.request(auth_request).await);
9787                }
9788                ::authentic::AuthenticationStep::WaitFor(duration) => {
9789                    (self.sleep)(duration).await;
9790                }
9791            }
9792        }
9793        let theBuilder = crate::v1_1_4::request::apps_get_org_installation::http_builder(
9794            self.config.base_url.as_ref(),
9795            org,
9796            self.config.user_agent.as_ref(),
9797            self.config.accept.as_deref(),
9798        )?
9799        .with_authentication(&theScheme)?;
9800
9801        let theRequest =
9802            crate::v1_1_4::request::apps_get_org_installation::hyper_request(theBuilder)?;
9803
9804        ::log::debug!("HTTP request: {:?}", &theRequest);
9805
9806        let theResponse = self.client.request(theRequest).await?;
9807
9808        ::log::debug!("HTTP response: {:?}", &theResponse);
9809
9810        Ok(theResponse)
9811    }
9812
9813    /// List app installations for an organization
9814    /// 
9815    /// Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint.
9816    /// 
9817    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization)
9818    pub async fn orgs_list_app_installations(
9819        &self,
9820        org: &str,
9821        per_page: ::std::option::Option<i64>,
9822        page: ::std::option::Option<i64>,
9823    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9824        let mut theScheme = AuthScheme::from(&self.config.authentication);
9825
9826        while let Some(auth_step) = theScheme.step()? {
9827            match auth_step {
9828                ::authentic::AuthenticationStep::Request(auth_request) => {
9829                    theScheme.respond(self.client.request(auth_request).await);
9830                }
9831                ::authentic::AuthenticationStep::WaitFor(duration) => {
9832                    (self.sleep)(duration).await;
9833                }
9834            }
9835        }
9836        let theBuilder = crate::v1_1_4::request::orgs_list_app_installations::http_builder(
9837            self.config.base_url.as_ref(),
9838            org,
9839            per_page,
9840            page,
9841            self.config.user_agent.as_ref(),
9842            self.config.accept.as_deref(),
9843        )?
9844        .with_authentication(&theScheme)?;
9845
9846        let theRequest =
9847            crate::v1_1_4::request::orgs_list_app_installations::hyper_request(theBuilder)?;
9848
9849        ::log::debug!("HTTP request: {:?}", &theRequest);
9850
9851        let theResponse = self.client.request(theRequest).await?;
9852
9853        ::log::debug!("HTTP response: {:?}", &theResponse);
9854
9855        Ok(theResponse)
9856    }
9857
9858    /// Get interaction restrictions for an organization
9859    /// 
9860    /// Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response.
9861    /// 
9862    /// [API method documentation](https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization)
9863    pub async fn interactions_get_restrictions_for_org(
9864        &self,
9865        org: &str,
9866    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9867        let mut theScheme = AuthScheme::from(&self.config.authentication);
9868
9869        while let Some(auth_step) = theScheme.step()? {
9870            match auth_step {
9871                ::authentic::AuthenticationStep::Request(auth_request) => {
9872                    theScheme.respond(self.client.request(auth_request).await);
9873                }
9874                ::authentic::AuthenticationStep::WaitFor(duration) => {
9875                    (self.sleep)(duration).await;
9876                }
9877            }
9878        }
9879        let theBuilder = crate::v1_1_4::request::interactions_get_restrictions_for_org::http_builder(
9880            self.config.base_url.as_ref(),
9881            org,
9882            self.config.user_agent.as_ref(),
9883            self.config.accept.as_deref(),
9884        )?
9885        .with_authentication(&theScheme)?;
9886
9887        let theRequest =
9888            crate::v1_1_4::request::interactions_get_restrictions_for_org::hyper_request(theBuilder)?;
9889
9890        ::log::debug!("HTTP request: {:?}", &theRequest);
9891
9892        let theResponse = self.client.request(theRequest).await?;
9893
9894        ::log::debug!("HTTP response: {:?}", &theResponse);
9895
9896        Ok(theResponse)
9897    }
9898
9899    /// Set interaction restrictions for an organization
9900    /// 
9901    /// Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization.
9902    /// 
9903    /// [API method documentation](https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization)
9904    ///
9905    /// # Content
9906    ///
9907    /// - [`&v1_1_4::schema::InteractionLimit`](crate::v1_1_4::schema::InteractionLimit)
9908    pub async fn interactions_set_restrictions_for_org<Content>(
9909        &self,
9910        org: &str,
9911        theContent: Content,
9912    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
9913    where
9914        Content: Copy + TryInto<crate::v1_1_4::request::interactions_set_restrictions_for_org::Content<::hyper::Body>>,
9915        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::interactions_set_restrictions_for_org::Content<::hyper::Body>>>::Error>
9916    {
9917        let mut theScheme = AuthScheme::from(&self.config.authentication);
9918
9919        while let Some(auth_step) = theScheme.step()? {
9920            match auth_step {
9921                ::authentic::AuthenticationStep::Request(auth_request) => {
9922                    theScheme.respond(self.client.request(auth_request).await);
9923                }
9924                ::authentic::AuthenticationStep::WaitFor(duration) => {
9925                    (self.sleep)(duration).await;
9926                }
9927            }
9928        }
9929        let theBuilder = crate::v1_1_4::request::interactions_set_restrictions_for_org::http_builder(
9930            self.config.base_url.as_ref(),
9931            org,
9932            self.config.user_agent.as_ref(),
9933            self.config.accept.as_deref(),
9934        )?
9935        .with_authentication(&theScheme)?;
9936
9937        let theRequest = crate::v1_1_4::request::interactions_set_restrictions_for_org::hyper_request(
9938            theBuilder,
9939            theContent.try_into()?,
9940        )?;
9941
9942        ::log::debug!("HTTP request: {:?}", &theRequest);
9943
9944        let theResponse = self.client.request(theRequest).await?;
9945
9946        ::log::debug!("HTTP response: {:?}", &theResponse);
9947
9948        Ok(theResponse)
9949    }
9950
9951    /// Remove interaction restrictions for an organization
9952    /// 
9953    /// Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions.
9954    /// 
9955    /// [API method documentation](https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization)
9956    pub async fn interactions_remove_restrictions_for_org(
9957        &self,
9958        org: &str,
9959    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
9960        let mut theScheme = AuthScheme::from(&self.config.authentication);
9961
9962        while let Some(auth_step) = theScheme.step()? {
9963            match auth_step {
9964                ::authentic::AuthenticationStep::Request(auth_request) => {
9965                    theScheme.respond(self.client.request(auth_request).await);
9966                }
9967                ::authentic::AuthenticationStep::WaitFor(duration) => {
9968                    (self.sleep)(duration).await;
9969                }
9970            }
9971        }
9972        let theBuilder = crate::v1_1_4::request::interactions_remove_restrictions_for_org::http_builder(
9973            self.config.base_url.as_ref(),
9974            org,
9975            self.config.user_agent.as_ref(),
9976            self.config.accept.as_deref(),
9977        )?
9978        .with_authentication(&theScheme)?;
9979
9980        let theRequest =
9981            crate::v1_1_4::request::interactions_remove_restrictions_for_org::hyper_request(theBuilder)?;
9982
9983        ::log::debug!("HTTP request: {:?}", &theRequest);
9984
9985        let theResponse = self.client.request(theRequest).await?;
9986
9987        ::log::debug!("HTTP response: {:?}", &theResponse);
9988
9989        Ok(theResponse)
9990    }
9991
9992    /// List pending organization invitations
9993    /// 
9994    /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.
9995    /// 
9996    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations)
9997    pub async fn orgs_list_pending_invitations(
9998        &self,
9999        org: &str,
10000        per_page: ::std::option::Option<i64>,
10001        page: ::std::option::Option<i64>,
10002    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10003        let mut theScheme = AuthScheme::from(&self.config.authentication);
10004
10005        while let Some(auth_step) = theScheme.step()? {
10006            match auth_step {
10007                ::authentic::AuthenticationStep::Request(auth_request) => {
10008                    theScheme.respond(self.client.request(auth_request).await);
10009                }
10010                ::authentic::AuthenticationStep::WaitFor(duration) => {
10011                    (self.sleep)(duration).await;
10012                }
10013            }
10014        }
10015        let theBuilder = crate::v1_1_4::request::orgs_list_pending_invitations::http_builder(
10016            self.config.base_url.as_ref(),
10017            org,
10018            per_page,
10019            page,
10020            self.config.user_agent.as_ref(),
10021            self.config.accept.as_deref(),
10022        )?
10023        .with_authentication(&theScheme)?;
10024
10025        let theRequest =
10026            crate::v1_1_4::request::orgs_list_pending_invitations::hyper_request(theBuilder)?;
10027
10028        ::log::debug!("HTTP request: {:?}", &theRequest);
10029
10030        let theResponse = self.client.request(theRequest).await?;
10031
10032        ::log::debug!("HTTP response: {:?}", &theResponse);
10033
10034        Ok(theResponse)
10035    }
10036
10037    /// Create an organization invitation
10038    /// 
10039    /// Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.
10040    /// 
10041    /// This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
10042    /// 
10043    /// [API method documentation](https://docs.github.com/rest/reference/orgs#create-an-organization-invitation)
10044    ///
10045    /// # Content
10046    ///
10047    /// - [`&v1_1_4::request::orgs_create_invitation::body::Json`](crate::v1_1_4::request::orgs_create_invitation::body::Json)
10048    pub async fn orgs_create_invitation<Content>(
10049        &self,
10050        org: &str,
10051        theContent: Content,
10052    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
10053    where
10054        Content: Copy + TryInto<crate::v1_1_4::request::orgs_create_invitation::Content<::hyper::Body>>,
10055        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::orgs_create_invitation::Content<::hyper::Body>>>::Error>
10056    {
10057        let mut theScheme = AuthScheme::from(&self.config.authentication);
10058
10059        while let Some(auth_step) = theScheme.step()? {
10060            match auth_step {
10061                ::authentic::AuthenticationStep::Request(auth_request) => {
10062                    theScheme.respond(self.client.request(auth_request).await);
10063                }
10064                ::authentic::AuthenticationStep::WaitFor(duration) => {
10065                    (self.sleep)(duration).await;
10066                }
10067            }
10068        }
10069        let theBuilder = crate::v1_1_4::request::orgs_create_invitation::http_builder(
10070            self.config.base_url.as_ref(),
10071            org,
10072            self.config.user_agent.as_ref(),
10073            self.config.accept.as_deref(),
10074        )?
10075        .with_authentication(&theScheme)?;
10076
10077        let theRequest = crate::v1_1_4::request::orgs_create_invitation::hyper_request(
10078            theBuilder,
10079            theContent.try_into()?,
10080        )?;
10081
10082        ::log::debug!("HTTP request: {:?}", &theRequest);
10083
10084        let theResponse = self.client.request(theRequest).await?;
10085
10086        ::log::debug!("HTTP response: {:?}", &theResponse);
10087
10088        Ok(theResponse)
10089    }
10090
10091    /// Cancel an organization invitation
10092    /// 
10093    /// Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.
10094    /// 
10095    /// This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications).
10096    /// 
10097    /// [API method documentation](https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation)
10098    pub async fn orgs_cancel_invitation(
10099        &self,
10100        org: &str,
10101        invitation_id: i64,
10102    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10103        let mut theScheme = AuthScheme::from(&self.config.authentication);
10104
10105        while let Some(auth_step) = theScheme.step()? {
10106            match auth_step {
10107                ::authentic::AuthenticationStep::Request(auth_request) => {
10108                    theScheme.respond(self.client.request(auth_request).await);
10109                }
10110                ::authentic::AuthenticationStep::WaitFor(duration) => {
10111                    (self.sleep)(duration).await;
10112                }
10113            }
10114        }
10115        let theBuilder = crate::v1_1_4::request::orgs_cancel_invitation::http_builder(
10116            self.config.base_url.as_ref(),
10117            org,
10118            invitation_id,
10119            self.config.user_agent.as_ref(),
10120            self.config.accept.as_deref(),
10121        )?
10122        .with_authentication(&theScheme)?;
10123
10124        let theRequest =
10125            crate::v1_1_4::request::orgs_cancel_invitation::hyper_request(theBuilder)?;
10126
10127        ::log::debug!("HTTP request: {:?}", &theRequest);
10128
10129        let theResponse = self.client.request(theRequest).await?;
10130
10131        ::log::debug!("HTTP response: {:?}", &theResponse);
10132
10133        Ok(theResponse)
10134    }
10135
10136    /// List organization invitation teams
10137    /// 
10138    /// List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner.
10139    /// 
10140    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams)
10141    pub async fn orgs_list_invitation_teams(
10142        &self,
10143        org: &str,
10144        invitation_id: i64,
10145        per_page: ::std::option::Option<i64>,
10146        page: ::std::option::Option<i64>,
10147    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10148        let mut theScheme = AuthScheme::from(&self.config.authentication);
10149
10150        while let Some(auth_step) = theScheme.step()? {
10151            match auth_step {
10152                ::authentic::AuthenticationStep::Request(auth_request) => {
10153                    theScheme.respond(self.client.request(auth_request).await);
10154                }
10155                ::authentic::AuthenticationStep::WaitFor(duration) => {
10156                    (self.sleep)(duration).await;
10157                }
10158            }
10159        }
10160        let theBuilder = crate::v1_1_4::request::orgs_list_invitation_teams::http_builder(
10161            self.config.base_url.as_ref(),
10162            org,
10163            invitation_id,
10164            per_page,
10165            page,
10166            self.config.user_agent.as_ref(),
10167            self.config.accept.as_deref(),
10168        )?
10169        .with_authentication(&theScheme)?;
10170
10171        let theRequest =
10172            crate::v1_1_4::request::orgs_list_invitation_teams::hyper_request(theBuilder)?;
10173
10174        ::log::debug!("HTTP request: {:?}", &theRequest);
10175
10176        let theResponse = self.client.request(theRequest).await?;
10177
10178        ::log::debug!("HTTP response: {:?}", &theResponse);
10179
10180        Ok(theResponse)
10181    }
10182
10183    /// List organization issues assigned to the authenticated user
10184    /// 
10185    /// List issues in an organization assigned to the authenticated user.
10186    /// 
10187    /// **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
10188    /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
10189    /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
10190    /// request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
10191    /// 
10192    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user)
10193    #[allow(clippy::too_many_arguments)]
10194    pub async fn issues_list_for_org(
10195        &self,
10196        org: &str,
10197        filter: ::std::option::Option<&str>,
10198        state: ::std::option::Option<&str>,
10199        labels: ::std::option::Option<&str>,
10200        sort: &crate::types::Sort<'_>,
10201        since: ::std::option::Option<&str>,
10202        per_page: ::std::option::Option<i64>,
10203        page: ::std::option::Option<i64>,
10204    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10205        let (sort, direction) = sort.extract();
10206        let mut theScheme = AuthScheme::from(&self.config.authentication);
10207
10208        while let Some(auth_step) = theScheme.step()? {
10209            match auth_step {
10210                ::authentic::AuthenticationStep::Request(auth_request) => {
10211                    theScheme.respond(self.client.request(auth_request).await);
10212                }
10213                ::authentic::AuthenticationStep::WaitFor(duration) => {
10214                    (self.sleep)(duration).await;
10215                }
10216            }
10217        }
10218        let theBuilder = crate::v1_1_4::request::issues_list_for_org::http_builder(
10219            self.config.base_url.as_ref(),
10220            org,
10221            filter,
10222            state,
10223            labels,
10224            sort,
10225            direction,
10226            since,
10227            per_page,
10228            page,
10229            self.config.user_agent.as_ref(),
10230            self.config.accept.as_deref(),
10231        )?
10232        .with_authentication(&theScheme)?;
10233
10234        let theRequest =
10235            crate::v1_1_4::request::issues_list_for_org::hyper_request(theBuilder)?;
10236
10237        ::log::debug!("HTTP request: {:?}", &theRequest);
10238
10239        let theResponse = self.client.request(theRequest).await?;
10240
10241        ::log::debug!("HTTP response: {:?}", &theResponse);
10242
10243        Ok(theResponse)
10244    }
10245
10246    /// List organization members
10247    /// 
10248    /// List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned.
10249    /// 
10250    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-organization-members)
10251    pub async fn orgs_list_members(
10252        &self,
10253        org: &str,
10254        filter: ::std::option::Option<&str>,
10255        role: ::std::option::Option<&str>,
10256        per_page: ::std::option::Option<i64>,
10257        page: ::std::option::Option<i64>,
10258    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10259        let mut theScheme = AuthScheme::from(&self.config.authentication);
10260
10261        while let Some(auth_step) = theScheme.step()? {
10262            match auth_step {
10263                ::authentic::AuthenticationStep::Request(auth_request) => {
10264                    theScheme.respond(self.client.request(auth_request).await);
10265                }
10266                ::authentic::AuthenticationStep::WaitFor(duration) => {
10267                    (self.sleep)(duration).await;
10268                }
10269            }
10270        }
10271        let theBuilder = crate::v1_1_4::request::orgs_list_members::http_builder(
10272            self.config.base_url.as_ref(),
10273            org,
10274            filter,
10275            role,
10276            per_page,
10277            page,
10278            self.config.user_agent.as_ref(),
10279            self.config.accept.as_deref(),
10280        )?
10281        .with_authentication(&theScheme)?;
10282
10283        let theRequest =
10284            crate::v1_1_4::request::orgs_list_members::hyper_request(theBuilder)?;
10285
10286        ::log::debug!("HTTP request: {:?}", &theRequest);
10287
10288        let theResponse = self.client.request(theRequest).await?;
10289
10290        ::log::debug!("HTTP response: {:?}", &theResponse);
10291
10292        Ok(theResponse)
10293    }
10294
10295    /// Check organization membership for a user
10296    /// 
10297    /// Check if a user is, publicly or privately, a member of the organization.
10298    /// 
10299    /// [API method documentation](https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user)
10300    pub async fn orgs_check_membership_for_user(
10301        &self,
10302        org: &str,
10303        username: &str,
10304    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10305        let mut theScheme = AuthScheme::from(&self.config.authentication);
10306
10307        while let Some(auth_step) = theScheme.step()? {
10308            match auth_step {
10309                ::authentic::AuthenticationStep::Request(auth_request) => {
10310                    theScheme.respond(self.client.request(auth_request).await);
10311                }
10312                ::authentic::AuthenticationStep::WaitFor(duration) => {
10313                    (self.sleep)(duration).await;
10314                }
10315            }
10316        }
10317        let theBuilder = crate::v1_1_4::request::orgs_check_membership_for_user::http_builder(
10318            self.config.base_url.as_ref(),
10319            org,
10320            username,
10321            self.config.user_agent.as_ref(),
10322            self.config.accept.as_deref(),
10323        )?
10324        .with_authentication(&theScheme)?;
10325
10326        let theRequest =
10327            crate::v1_1_4::request::orgs_check_membership_for_user::hyper_request(theBuilder)?;
10328
10329        ::log::debug!("HTTP request: {:?}", &theRequest);
10330
10331        let theResponse = self.client.request(theRequest).await?;
10332
10333        ::log::debug!("HTTP response: {:?}", &theResponse);
10334
10335        Ok(theResponse)
10336    }
10337
10338    /// Remove an organization member
10339    /// 
10340    /// Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories.
10341    /// 
10342    /// [API method documentation](https://docs.github.com/rest/reference/orgs#remove-an-organization-member)
10343    pub async fn orgs_remove_member(
10344        &self,
10345        org: &str,
10346        username: &str,
10347    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10348        let mut theScheme = AuthScheme::from(&self.config.authentication);
10349
10350        while let Some(auth_step) = theScheme.step()? {
10351            match auth_step {
10352                ::authentic::AuthenticationStep::Request(auth_request) => {
10353                    theScheme.respond(self.client.request(auth_request).await);
10354                }
10355                ::authentic::AuthenticationStep::WaitFor(duration) => {
10356                    (self.sleep)(duration).await;
10357                }
10358            }
10359        }
10360        let theBuilder = crate::v1_1_4::request::orgs_remove_member::http_builder(
10361            self.config.base_url.as_ref(),
10362            org,
10363            username,
10364            self.config.user_agent.as_ref(),
10365            self.config.accept.as_deref(),
10366        )?
10367        .with_authentication(&theScheme)?;
10368
10369        let theRequest =
10370            crate::v1_1_4::request::orgs_remove_member::hyper_request(theBuilder)?;
10371
10372        ::log::debug!("HTTP request: {:?}", &theRequest);
10373
10374        let theResponse = self.client.request(theRequest).await?;
10375
10376        ::log::debug!("HTTP response: {:?}", &theResponse);
10377
10378        Ok(theResponse)
10379    }
10380
10381    /// Get organization membership for a user
10382    /// 
10383    /// In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status.
10384    /// 
10385    /// [API method documentation](https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user)
10386    pub async fn orgs_get_membership_for_user(
10387        &self,
10388        org: &str,
10389        username: &str,
10390    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10391        let mut theScheme = AuthScheme::from(&self.config.authentication);
10392
10393        while let Some(auth_step) = theScheme.step()? {
10394            match auth_step {
10395                ::authentic::AuthenticationStep::Request(auth_request) => {
10396                    theScheme.respond(self.client.request(auth_request).await);
10397                }
10398                ::authentic::AuthenticationStep::WaitFor(duration) => {
10399                    (self.sleep)(duration).await;
10400                }
10401            }
10402        }
10403        let theBuilder = crate::v1_1_4::request::orgs_get_membership_for_user::http_builder(
10404            self.config.base_url.as_ref(),
10405            org,
10406            username,
10407            self.config.user_agent.as_ref(),
10408            self.config.accept.as_deref(),
10409        )?
10410        .with_authentication(&theScheme)?;
10411
10412        let theRequest =
10413            crate::v1_1_4::request::orgs_get_membership_for_user::hyper_request(theBuilder)?;
10414
10415        ::log::debug!("HTTP request: {:?}", &theRequest);
10416
10417        let theResponse = self.client.request(theRequest).await?;
10418
10419        ::log::debug!("HTTP response: {:?}", &theResponse);
10420
10421        Ok(theResponse)
10422    }
10423
10424    /// Set organization membership for a user
10425    /// 
10426    /// Only authenticated organization owners can add a member to the organization or update the member's role.
10427    /// 
10428    /// *   If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) will be `pending` until they accept the invitation.
10429    ///     
10430    /// *   Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent.
10431    /// 
10432    /// **Rate limits**
10433    /// 
10434    /// To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.
10435    /// 
10436    /// [API method documentation](https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user)
10437    ///
10438    /// # Content
10439    ///
10440    /// - [`&v1_1_4::request::orgs_set_membership_for_user::body::Json`](crate::v1_1_4::request::orgs_set_membership_for_user::body::Json)
10441    pub async fn orgs_set_membership_for_user<Content>(
10442        &self,
10443        org: &str,
10444        username: &str,
10445        theContent: Content,
10446    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
10447    where
10448        Content: Copy + TryInto<crate::v1_1_4::request::orgs_set_membership_for_user::Content<::hyper::Body>>,
10449        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::orgs_set_membership_for_user::Content<::hyper::Body>>>::Error>
10450    {
10451        let mut theScheme = AuthScheme::from(&self.config.authentication);
10452
10453        while let Some(auth_step) = theScheme.step()? {
10454            match auth_step {
10455                ::authentic::AuthenticationStep::Request(auth_request) => {
10456                    theScheme.respond(self.client.request(auth_request).await);
10457                }
10458                ::authentic::AuthenticationStep::WaitFor(duration) => {
10459                    (self.sleep)(duration).await;
10460                }
10461            }
10462        }
10463        let theBuilder = crate::v1_1_4::request::orgs_set_membership_for_user::http_builder(
10464            self.config.base_url.as_ref(),
10465            org,
10466            username,
10467            self.config.user_agent.as_ref(),
10468            self.config.accept.as_deref(),
10469        )?
10470        .with_authentication(&theScheme)?;
10471
10472        let theRequest = crate::v1_1_4::request::orgs_set_membership_for_user::hyper_request(
10473            theBuilder,
10474            theContent.try_into()?,
10475        )?;
10476
10477        ::log::debug!("HTTP request: {:?}", &theRequest);
10478
10479        let theResponse = self.client.request(theRequest).await?;
10480
10481        ::log::debug!("HTTP response: {:?}", &theResponse);
10482
10483        Ok(theResponse)
10484    }
10485
10486    /// Remove organization membership for a user
10487    /// 
10488    /// In order to remove a user's membership with an organization, the authenticated user must be an organization owner.
10489    /// 
10490    /// If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases.
10491    /// 
10492    /// [API method documentation](https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user)
10493    pub async fn orgs_remove_membership_for_user(
10494        &self,
10495        org: &str,
10496        username: &str,
10497    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10498        let mut theScheme = AuthScheme::from(&self.config.authentication);
10499
10500        while let Some(auth_step) = theScheme.step()? {
10501            match auth_step {
10502                ::authentic::AuthenticationStep::Request(auth_request) => {
10503                    theScheme.respond(self.client.request(auth_request).await);
10504                }
10505                ::authentic::AuthenticationStep::WaitFor(duration) => {
10506                    (self.sleep)(duration).await;
10507                }
10508            }
10509        }
10510        let theBuilder = crate::v1_1_4::request::orgs_remove_membership_for_user::http_builder(
10511            self.config.base_url.as_ref(),
10512            org,
10513            username,
10514            self.config.user_agent.as_ref(),
10515            self.config.accept.as_deref(),
10516        )?
10517        .with_authentication(&theScheme)?;
10518
10519        let theRequest =
10520            crate::v1_1_4::request::orgs_remove_membership_for_user::hyper_request(theBuilder)?;
10521
10522        ::log::debug!("HTTP request: {:?}", &theRequest);
10523
10524        let theResponse = self.client.request(theRequest).await?;
10525
10526        ::log::debug!("HTTP response: {:?}", &theResponse);
10527
10528        Ok(theResponse)
10529    }
10530
10531    /// List organization migrations
10532    /// 
10533    /// Lists the most recent migrations.
10534    /// 
10535    /// [API method documentation](https://docs.github.com/rest/reference/migrations#list-organization-migrations)
10536    pub async fn migrations_list_for_org(
10537        &self,
10538        org: &str,
10539        per_page: ::std::option::Option<i64>,
10540        page: ::std::option::Option<i64>,
10541        exclude: ::std::option::Option<&[::std::borrow::Cow<'_, str>]>,
10542    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10543        let mut theScheme = AuthScheme::from(&self.config.authentication);
10544
10545        while let Some(auth_step) = theScheme.step()? {
10546            match auth_step {
10547                ::authentic::AuthenticationStep::Request(auth_request) => {
10548                    theScheme.respond(self.client.request(auth_request).await);
10549                }
10550                ::authentic::AuthenticationStep::WaitFor(duration) => {
10551                    (self.sleep)(duration).await;
10552                }
10553            }
10554        }
10555        let theBuilder = crate::v1_1_4::request::migrations_list_for_org::http_builder(
10556            self.config.base_url.as_ref(),
10557            org,
10558            per_page,
10559            page,
10560            exclude,
10561            self.config.user_agent.as_ref(),
10562            self.config.accept.as_deref(),
10563        )?
10564        .with_authentication(&theScheme)?;
10565
10566        let theRequest =
10567            crate::v1_1_4::request::migrations_list_for_org::hyper_request(theBuilder)?;
10568
10569        ::log::debug!("HTTP request: {:?}", &theRequest);
10570
10571        let theResponse = self.client.request(theRequest).await?;
10572
10573        ::log::debug!("HTTP response: {:?}", &theResponse);
10574
10575        Ok(theResponse)
10576    }
10577
10578    /// Start an organization migration
10579    /// 
10580    /// Initiates the generation of a migration archive.
10581    /// 
10582    /// [API method documentation](https://docs.github.com/rest/reference/migrations#start-an-organization-migration)
10583    ///
10584    /// # Content
10585    ///
10586    /// - [`&v1_1_4::request::migrations_start_for_org::body::Json`](crate::v1_1_4::request::migrations_start_for_org::body::Json)
10587    pub async fn migrations_start_for_org<Content>(
10588        &self,
10589        org: &str,
10590        theContent: Content,
10591    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
10592    where
10593        Content: Copy + TryInto<crate::v1_1_4::request::migrations_start_for_org::Content<::hyper::Body>>,
10594        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::migrations_start_for_org::Content<::hyper::Body>>>::Error>
10595    {
10596        let mut theScheme = AuthScheme::from(&self.config.authentication);
10597
10598        while let Some(auth_step) = theScheme.step()? {
10599            match auth_step {
10600                ::authentic::AuthenticationStep::Request(auth_request) => {
10601                    theScheme.respond(self.client.request(auth_request).await);
10602                }
10603                ::authentic::AuthenticationStep::WaitFor(duration) => {
10604                    (self.sleep)(duration).await;
10605                }
10606            }
10607        }
10608        let theBuilder = crate::v1_1_4::request::migrations_start_for_org::http_builder(
10609            self.config.base_url.as_ref(),
10610            org,
10611            self.config.user_agent.as_ref(),
10612            self.config.accept.as_deref(),
10613        )?
10614        .with_authentication(&theScheme)?;
10615
10616        let theRequest = crate::v1_1_4::request::migrations_start_for_org::hyper_request(
10617            theBuilder,
10618            theContent.try_into()?,
10619        )?;
10620
10621        ::log::debug!("HTTP request: {:?}", &theRequest);
10622
10623        let theResponse = self.client.request(theRequest).await?;
10624
10625        ::log::debug!("HTTP response: {:?}", &theResponse);
10626
10627        Ok(theResponse)
10628    }
10629
10630    /// Get an organization migration status
10631    /// 
10632    /// Fetches the status of a migration.
10633    /// 
10634    /// The `state` of a migration can be one of the following values:
10635    /// 
10636    /// *   `pending`, which means the migration hasn't started yet.
10637    /// *   `exporting`, which means the migration is in progress.
10638    /// *   `exported`, which means the migration finished successfully.
10639    /// *   `failed`, which means the migration failed.
10640    /// 
10641    /// [API method documentation](https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status)
10642    pub async fn migrations_get_status_for_org(
10643        &self,
10644        org: &str,
10645        migration_id: i64,
10646        exclude: ::std::option::Option<&[::std::borrow::Cow<'_, str>]>,
10647    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10648        let mut theScheme = AuthScheme::from(&self.config.authentication);
10649
10650        while let Some(auth_step) = theScheme.step()? {
10651            match auth_step {
10652                ::authentic::AuthenticationStep::Request(auth_request) => {
10653                    theScheme.respond(self.client.request(auth_request).await);
10654                }
10655                ::authentic::AuthenticationStep::WaitFor(duration) => {
10656                    (self.sleep)(duration).await;
10657                }
10658            }
10659        }
10660        let theBuilder = crate::v1_1_4::request::migrations_get_status_for_org::http_builder(
10661            self.config.base_url.as_ref(),
10662            org,
10663            migration_id,
10664            exclude,
10665            self.config.user_agent.as_ref(),
10666            self.config.accept.as_deref(),
10667        )?
10668        .with_authentication(&theScheme)?;
10669
10670        let theRequest =
10671            crate::v1_1_4::request::migrations_get_status_for_org::hyper_request(theBuilder)?;
10672
10673        ::log::debug!("HTTP request: {:?}", &theRequest);
10674
10675        let theResponse = self.client.request(theRequest).await?;
10676
10677        ::log::debug!("HTTP response: {:?}", &theResponse);
10678
10679        Ok(theResponse)
10680    }
10681
10682    /// Download an organization migration archive
10683    /// 
10684    /// Fetches the URL to a migration archive.
10685    /// 
10686    /// [API method documentation](https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive)
10687    pub async fn migrations_download_archive_for_org(
10688        &self,
10689        org: &str,
10690        migration_id: i64,
10691    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10692        let mut theScheme = AuthScheme::from(&self.config.authentication);
10693
10694        while let Some(auth_step) = theScheme.step()? {
10695            match auth_step {
10696                ::authentic::AuthenticationStep::Request(auth_request) => {
10697                    theScheme.respond(self.client.request(auth_request).await);
10698                }
10699                ::authentic::AuthenticationStep::WaitFor(duration) => {
10700                    (self.sleep)(duration).await;
10701                }
10702            }
10703        }
10704        let theBuilder = crate::v1_1_4::request::migrations_download_archive_for_org::http_builder(
10705            self.config.base_url.as_ref(),
10706            org,
10707            migration_id,
10708            self.config.user_agent.as_ref(),
10709            self.config.accept.as_deref(),
10710        )?
10711        .with_authentication(&theScheme)?;
10712
10713        let theRequest =
10714            crate::v1_1_4::request::migrations_download_archive_for_org::hyper_request(theBuilder)?;
10715
10716        ::log::debug!("HTTP request: {:?}", &theRequest);
10717
10718        let theResponse = self.client.request(theRequest).await?;
10719
10720        ::log::debug!("HTTP response: {:?}", &theResponse);
10721
10722        Ok(theResponse)
10723    }
10724
10725    /// Delete an organization migration archive
10726    /// 
10727    /// Deletes a previous migration archive. Migration archives are automatically deleted after seven days.
10728    /// 
10729    /// [API method documentation](https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive)
10730    pub async fn migrations_delete_archive_for_org(
10731        &self,
10732        org: &str,
10733        migration_id: i64,
10734    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10735        let mut theScheme = AuthScheme::from(&self.config.authentication);
10736
10737        while let Some(auth_step) = theScheme.step()? {
10738            match auth_step {
10739                ::authentic::AuthenticationStep::Request(auth_request) => {
10740                    theScheme.respond(self.client.request(auth_request).await);
10741                }
10742                ::authentic::AuthenticationStep::WaitFor(duration) => {
10743                    (self.sleep)(duration).await;
10744                }
10745            }
10746        }
10747        let theBuilder = crate::v1_1_4::request::migrations_delete_archive_for_org::http_builder(
10748            self.config.base_url.as_ref(),
10749            org,
10750            migration_id,
10751            self.config.user_agent.as_ref(),
10752            self.config.accept.as_deref(),
10753        )?
10754        .with_authentication(&theScheme)?;
10755
10756        let theRequest =
10757            crate::v1_1_4::request::migrations_delete_archive_for_org::hyper_request(theBuilder)?;
10758
10759        ::log::debug!("HTTP request: {:?}", &theRequest);
10760
10761        let theResponse = self.client.request(theRequest).await?;
10762
10763        ::log::debug!("HTTP response: {:?}", &theResponse);
10764
10765        Ok(theResponse)
10766    }
10767
10768    /// Unlock an organization repository
10769    /// 
10770    /// Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data.
10771    /// 
10772    /// [API method documentation](https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository)
10773    pub async fn migrations_unlock_repo_for_org(
10774        &self,
10775        org: &str,
10776        migration_id: i64,
10777        repo_name: &str,
10778    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10779        let mut theScheme = AuthScheme::from(&self.config.authentication);
10780
10781        while let Some(auth_step) = theScheme.step()? {
10782            match auth_step {
10783                ::authentic::AuthenticationStep::Request(auth_request) => {
10784                    theScheme.respond(self.client.request(auth_request).await);
10785                }
10786                ::authentic::AuthenticationStep::WaitFor(duration) => {
10787                    (self.sleep)(duration).await;
10788                }
10789            }
10790        }
10791        let theBuilder = crate::v1_1_4::request::migrations_unlock_repo_for_org::http_builder(
10792            self.config.base_url.as_ref(),
10793            org,
10794            migration_id,
10795            repo_name,
10796            self.config.user_agent.as_ref(),
10797            self.config.accept.as_deref(),
10798        )?
10799        .with_authentication(&theScheme)?;
10800
10801        let theRequest =
10802            crate::v1_1_4::request::migrations_unlock_repo_for_org::hyper_request(theBuilder)?;
10803
10804        ::log::debug!("HTTP request: {:?}", &theRequest);
10805
10806        let theResponse = self.client.request(theRequest).await?;
10807
10808        ::log::debug!("HTTP response: {:?}", &theResponse);
10809
10810        Ok(theResponse)
10811    }
10812
10813    /// List repositories in an organization migration
10814    /// 
10815    /// List all the repositories for this organization migration.
10816    /// 
10817    /// [API method documentation](https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration)
10818    pub async fn migrations_list_repos_for_org(
10819        &self,
10820        org: &str,
10821        migration_id: i64,
10822        per_page: ::std::option::Option<i64>,
10823        page: ::std::option::Option<i64>,
10824    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10825        let mut theScheme = AuthScheme::from(&self.config.authentication);
10826
10827        while let Some(auth_step) = theScheme.step()? {
10828            match auth_step {
10829                ::authentic::AuthenticationStep::Request(auth_request) => {
10830                    theScheme.respond(self.client.request(auth_request).await);
10831                }
10832                ::authentic::AuthenticationStep::WaitFor(duration) => {
10833                    (self.sleep)(duration).await;
10834                }
10835            }
10836        }
10837        let theBuilder = crate::v1_1_4::request::migrations_list_repos_for_org::http_builder(
10838            self.config.base_url.as_ref(),
10839            org,
10840            migration_id,
10841            per_page,
10842            page,
10843            self.config.user_agent.as_ref(),
10844            self.config.accept.as_deref(),
10845        )?
10846        .with_authentication(&theScheme)?;
10847
10848        let theRequest =
10849            crate::v1_1_4::request::migrations_list_repos_for_org::hyper_request(theBuilder)?;
10850
10851        ::log::debug!("HTTP request: {:?}", &theRequest);
10852
10853        let theResponse = self.client.request(theRequest).await?;
10854
10855        ::log::debug!("HTTP response: {:?}", &theResponse);
10856
10857        Ok(theResponse)
10858    }
10859
10860    /// List outside collaborators for an organization
10861    /// 
10862    /// List all users who are outside collaborators of an organization.
10863    /// 
10864    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization)
10865    pub async fn orgs_list_outside_collaborators(
10866        &self,
10867        org: &str,
10868        filter: ::std::option::Option<&str>,
10869        per_page: ::std::option::Option<i64>,
10870        page: ::std::option::Option<i64>,
10871    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10872        let mut theScheme = AuthScheme::from(&self.config.authentication);
10873
10874        while let Some(auth_step) = theScheme.step()? {
10875            match auth_step {
10876                ::authentic::AuthenticationStep::Request(auth_request) => {
10877                    theScheme.respond(self.client.request(auth_request).await);
10878                }
10879                ::authentic::AuthenticationStep::WaitFor(duration) => {
10880                    (self.sleep)(duration).await;
10881                }
10882            }
10883        }
10884        let theBuilder = crate::v1_1_4::request::orgs_list_outside_collaborators::http_builder(
10885            self.config.base_url.as_ref(),
10886            org,
10887            filter,
10888            per_page,
10889            page,
10890            self.config.user_agent.as_ref(),
10891            self.config.accept.as_deref(),
10892        )?
10893        .with_authentication(&theScheme)?;
10894
10895        let theRequest =
10896            crate::v1_1_4::request::orgs_list_outside_collaborators::hyper_request(theBuilder)?;
10897
10898        ::log::debug!("HTTP request: {:?}", &theRequest);
10899
10900        let theResponse = self.client.request(theRequest).await?;
10901
10902        ::log::debug!("HTTP response: {:?}", &theResponse);
10903
10904        Ok(theResponse)
10905    }
10906
10907    /// Convert an organization member to outside collaborator
10908    /// 
10909    /// When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)."
10910    /// 
10911    /// [API method documentation](https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator)
10912    pub async fn orgs_convert_member_to_outside_collaborator(
10913        &self,
10914        org: &str,
10915        username: &str,
10916    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10917        let mut theScheme = AuthScheme::from(&self.config.authentication);
10918
10919        while let Some(auth_step) = theScheme.step()? {
10920            match auth_step {
10921                ::authentic::AuthenticationStep::Request(auth_request) => {
10922                    theScheme.respond(self.client.request(auth_request).await);
10923                }
10924                ::authentic::AuthenticationStep::WaitFor(duration) => {
10925                    (self.sleep)(duration).await;
10926                }
10927            }
10928        }
10929        let theBuilder = crate::v1_1_4::request::orgs_convert_member_to_outside_collaborator::http_builder(
10930            self.config.base_url.as_ref(),
10931            org,
10932            username,
10933            self.config.user_agent.as_ref(),
10934            self.config.accept.as_deref(),
10935        )?
10936        .with_authentication(&theScheme)?;
10937
10938        let theRequest =
10939            crate::v1_1_4::request::orgs_convert_member_to_outside_collaborator::hyper_request(theBuilder)?;
10940
10941        ::log::debug!("HTTP request: {:?}", &theRequest);
10942
10943        let theResponse = self.client.request(theRequest).await?;
10944
10945        ::log::debug!("HTTP response: {:?}", &theResponse);
10946
10947        Ok(theResponse)
10948    }
10949
10950    /// Remove outside collaborator from an organization
10951    /// 
10952    /// Removing a user from this list will remove them from all the organization's repositories.
10953    /// 
10954    /// [API method documentation](https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization)
10955    pub async fn orgs_remove_outside_collaborator(
10956        &self,
10957        org: &str,
10958        username: &str,
10959    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
10960        let mut theScheme = AuthScheme::from(&self.config.authentication);
10961
10962        while let Some(auth_step) = theScheme.step()? {
10963            match auth_step {
10964                ::authentic::AuthenticationStep::Request(auth_request) => {
10965                    theScheme.respond(self.client.request(auth_request).await);
10966                }
10967                ::authentic::AuthenticationStep::WaitFor(duration) => {
10968                    (self.sleep)(duration).await;
10969                }
10970            }
10971        }
10972        let theBuilder = crate::v1_1_4::request::orgs_remove_outside_collaborator::http_builder(
10973            self.config.base_url.as_ref(),
10974            org,
10975            username,
10976            self.config.user_agent.as_ref(),
10977            self.config.accept.as_deref(),
10978        )?
10979        .with_authentication(&theScheme)?;
10980
10981        let theRequest =
10982            crate::v1_1_4::request::orgs_remove_outside_collaborator::hyper_request(theBuilder)?;
10983
10984        ::log::debug!("HTTP request: {:?}", &theRequest);
10985
10986        let theResponse = self.client.request(theRequest).await?;
10987
10988        ::log::debug!("HTTP response: {:?}", &theResponse);
10989
10990        Ok(theResponse)
10991    }
10992
10993    /// List packages for an organization
10994    /// 
10995    /// Lists all packages in an organization readable by the user.
10996    /// 
10997    /// To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
10998    /// If `package_type` is not `container`, your token must also include the `repo` scope.
10999    /// 
11000    /// [API method documentation](https://docs.github.com/rest/reference/packages#list-packages-for-an-organization)
11001    pub async fn packages_list_packages_for_organization(
11002        &self,
11003        package_type: &str,
11004        org: &str,
11005        visibility: ::std::option::Option<&str>,
11006    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11007        let mut theScheme = AuthScheme::from(&self.config.authentication);
11008
11009        while let Some(auth_step) = theScheme.step()? {
11010            match auth_step {
11011                ::authentic::AuthenticationStep::Request(auth_request) => {
11012                    theScheme.respond(self.client.request(auth_request).await);
11013                }
11014                ::authentic::AuthenticationStep::WaitFor(duration) => {
11015                    (self.sleep)(duration).await;
11016                }
11017            }
11018        }
11019        let theBuilder = crate::v1_1_4::request::packages_list_packages_for_organization::http_builder(
11020            self.config.base_url.as_ref(),
11021            org,
11022            package_type,
11023            visibility,
11024            self.config.user_agent.as_ref(),
11025            self.config.accept.as_deref(),
11026        )?
11027        .with_authentication(&theScheme)?;
11028
11029        let theRequest =
11030            crate::v1_1_4::request::packages_list_packages_for_organization::hyper_request(theBuilder)?;
11031
11032        ::log::debug!("HTTP request: {:?}", &theRequest);
11033
11034        let theResponse = self.client.request(theRequest).await?;
11035
11036        ::log::debug!("HTTP response: {:?}", &theResponse);
11037
11038        Ok(theResponse)
11039    }
11040
11041    /// Get a package for an organization
11042    /// 
11043    /// Gets a specific package in an organization.
11044    /// 
11045    /// To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
11046    /// If `package_type` is not `container`, your token must also include the `repo` scope.
11047    /// 
11048    /// [API method documentation](https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization)
11049    pub async fn packages_get_package_for_organization(
11050        &self,
11051        package_type: &str,
11052        package_name: &str,
11053        org: &str,
11054    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11055        let mut theScheme = AuthScheme::from(&self.config.authentication);
11056
11057        while let Some(auth_step) = theScheme.step()? {
11058            match auth_step {
11059                ::authentic::AuthenticationStep::Request(auth_request) => {
11060                    theScheme.respond(self.client.request(auth_request).await);
11061                }
11062                ::authentic::AuthenticationStep::WaitFor(duration) => {
11063                    (self.sleep)(duration).await;
11064                }
11065            }
11066        }
11067        let theBuilder = crate::v1_1_4::request::packages_get_package_for_organization::http_builder(
11068            self.config.base_url.as_ref(),
11069            package_type,
11070            package_name,
11071            org,
11072            self.config.user_agent.as_ref(),
11073            self.config.accept.as_deref(),
11074        )?
11075        .with_authentication(&theScheme)?;
11076
11077        let theRequest =
11078            crate::v1_1_4::request::packages_get_package_for_organization::hyper_request(theBuilder)?;
11079
11080        ::log::debug!("HTTP request: {:?}", &theRequest);
11081
11082        let theResponse = self.client.request(theRequest).await?;
11083
11084        ::log::debug!("HTTP response: {:?}", &theResponse);
11085
11086        Ok(theResponse)
11087    }
11088
11089    /// Delete a package for an organization
11090    /// 
11091    /// Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
11092    /// 
11093    /// To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition:
11094    /// - If `package_type` is not `container`, your token must also include the `repo` scope.
11095    /// - If `package_type` is `container`, you must also have admin permissions to the container you want to delete.
11096    /// 
11097    /// [API method documentation](https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization)
11098    pub async fn packages_delete_package_for_org(
11099        &self,
11100        package_type: &str,
11101        package_name: &str,
11102        org: &str,
11103    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11104        let mut theScheme = AuthScheme::from(&self.config.authentication);
11105
11106        while let Some(auth_step) = theScheme.step()? {
11107            match auth_step {
11108                ::authentic::AuthenticationStep::Request(auth_request) => {
11109                    theScheme.respond(self.client.request(auth_request).await);
11110                }
11111                ::authentic::AuthenticationStep::WaitFor(duration) => {
11112                    (self.sleep)(duration).await;
11113                }
11114            }
11115        }
11116        let theBuilder = crate::v1_1_4::request::packages_delete_package_for_org::http_builder(
11117            self.config.base_url.as_ref(),
11118            package_type,
11119            package_name,
11120            org,
11121            self.config.user_agent.as_ref(),
11122            self.config.accept.as_deref(),
11123        )?
11124        .with_authentication(&theScheme)?;
11125
11126        let theRequest =
11127            crate::v1_1_4::request::packages_delete_package_for_org::hyper_request(theBuilder)?;
11128
11129        ::log::debug!("HTTP request: {:?}", &theRequest);
11130
11131        let theResponse = self.client.request(theRequest).await?;
11132
11133        ::log::debug!("HTTP response: {:?}", &theResponse);
11134
11135        Ok(theResponse)
11136    }
11137
11138    /// Restore a package for an organization
11139    /// 
11140    /// Restores an entire package in an organization.
11141    /// 
11142    /// You can restore a deleted package under the following conditions:
11143    ///   - The package was deleted within the last 30 days.
11144    ///   - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
11145    /// 
11146    /// To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition:
11147    /// - If `package_type` is not `container`, your token must also include the `repo` scope.
11148    /// - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.
11149    /// 
11150    /// [API method documentation](https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization)
11151    pub async fn packages_restore_package_for_org(
11152        &self,
11153        package_type: &str,
11154        package_name: &str,
11155        org: &str,
11156        token: ::std::option::Option<&str>,
11157    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11158        let mut theScheme = AuthScheme::from(&self.config.authentication);
11159
11160        while let Some(auth_step) = theScheme.step()? {
11161            match auth_step {
11162                ::authentic::AuthenticationStep::Request(auth_request) => {
11163                    theScheme.respond(self.client.request(auth_request).await);
11164                }
11165                ::authentic::AuthenticationStep::WaitFor(duration) => {
11166                    (self.sleep)(duration).await;
11167                }
11168            }
11169        }
11170        let theBuilder = crate::v1_1_4::request::packages_restore_package_for_org::http_builder(
11171            self.config.base_url.as_ref(),
11172            package_type,
11173            package_name,
11174            org,
11175            token,
11176            self.config.user_agent.as_ref(),
11177            self.config.accept.as_deref(),
11178        )?
11179        .with_authentication(&theScheme)?;
11180
11181        let theRequest =
11182            crate::v1_1_4::request::packages_restore_package_for_org::hyper_request(theBuilder)?;
11183
11184        ::log::debug!("HTTP request: {:?}", &theRequest);
11185
11186        let theResponse = self.client.request(theRequest).await?;
11187
11188        ::log::debug!("HTTP response: {:?}", &theResponse);
11189
11190        Ok(theResponse)
11191    }
11192
11193    /// Get all package versions for a package owned by an organization
11194    /// 
11195    /// Returns all package versions for a package owned by an organization.
11196    /// 
11197    /// To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
11198    /// If `package_type` is not `container`, your token must also include the `repo` scope.
11199    /// 
11200    /// [API method documentation](https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-an-organization)
11201    pub async fn packages_get_all_package_versions_for_package_owned_by_org(
11202        &self,
11203        package_type: &str,
11204        package_name: &str,
11205        org: &str,
11206        page: ::std::option::Option<i64>,
11207        per_page: ::std::option::Option<i64>,
11208        state: ::std::option::Option<&str>,
11209    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11210        let mut theScheme = AuthScheme::from(&self.config.authentication);
11211
11212        while let Some(auth_step) = theScheme.step()? {
11213            match auth_step {
11214                ::authentic::AuthenticationStep::Request(auth_request) => {
11215                    theScheme.respond(self.client.request(auth_request).await);
11216                }
11217                ::authentic::AuthenticationStep::WaitFor(duration) => {
11218                    (self.sleep)(duration).await;
11219                }
11220            }
11221        }
11222        let theBuilder = crate::v1_1_4::request::packages_get_all_package_versions_for_package_owned_by_org::http_builder(
11223            self.config.base_url.as_ref(),
11224            package_type,
11225            package_name,
11226            org,
11227            page,
11228            per_page,
11229            state,
11230            self.config.user_agent.as_ref(),
11231            self.config.accept.as_deref(),
11232        )?
11233        .with_authentication(&theScheme)?;
11234
11235        let theRequest =
11236            crate::v1_1_4::request::packages_get_all_package_versions_for_package_owned_by_org::hyper_request(theBuilder)?;
11237
11238        ::log::debug!("HTTP request: {:?}", &theRequest);
11239
11240        let theResponse = self.client.request(theRequest).await?;
11241
11242        ::log::debug!("HTTP response: {:?}", &theResponse);
11243
11244        Ok(theResponse)
11245    }
11246
11247    /// Get a package version for an organization
11248    /// 
11249    /// Gets a specific package version in an organization.
11250    /// 
11251    /// You must authenticate using an access token with the `packages:read` scope.
11252    /// If `package_type` is not `container`, your token must also include the `repo` scope.
11253    /// 
11254    /// [API method documentation](https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization)
11255    pub async fn packages_get_package_version_for_organization(
11256        &self,
11257        package_type: &str,
11258        package_name: &str,
11259        org: &str,
11260        package_version_id: i64,
11261    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11262        let mut theScheme = AuthScheme::from(&self.config.authentication);
11263
11264        while let Some(auth_step) = theScheme.step()? {
11265            match auth_step {
11266                ::authentic::AuthenticationStep::Request(auth_request) => {
11267                    theScheme.respond(self.client.request(auth_request).await);
11268                }
11269                ::authentic::AuthenticationStep::WaitFor(duration) => {
11270                    (self.sleep)(duration).await;
11271                }
11272            }
11273        }
11274        let theBuilder = crate::v1_1_4::request::packages_get_package_version_for_organization::http_builder(
11275            self.config.base_url.as_ref(),
11276            package_type,
11277            package_name,
11278            org,
11279            package_version_id,
11280            self.config.user_agent.as_ref(),
11281            self.config.accept.as_deref(),
11282        )?
11283        .with_authentication(&theScheme)?;
11284
11285        let theRequest =
11286            crate::v1_1_4::request::packages_get_package_version_for_organization::hyper_request(theBuilder)?;
11287
11288        ::log::debug!("HTTP request: {:?}", &theRequest);
11289
11290        let theResponse = self.client.request(theRequest).await?;
11291
11292        ::log::debug!("HTTP response: {:?}", &theResponse);
11293
11294        Ok(theResponse)
11295    }
11296
11297    /// Delete package version for an organization
11298    /// 
11299    /// Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
11300    /// 
11301    /// To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition:
11302    /// - If `package_type` is not `container`, your token must also include the `repo` scope.
11303    /// - If `package_type` is `container`, you must also have admin permissions to the container you want to delete.
11304    /// 
11305    /// [API method documentation](https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization)
11306    pub async fn packages_delete_package_version_for_org(
11307        &self,
11308        package_type: &str,
11309        package_name: &str,
11310        org: &str,
11311        package_version_id: i64,
11312    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11313        let mut theScheme = AuthScheme::from(&self.config.authentication);
11314
11315        while let Some(auth_step) = theScheme.step()? {
11316            match auth_step {
11317                ::authentic::AuthenticationStep::Request(auth_request) => {
11318                    theScheme.respond(self.client.request(auth_request).await);
11319                }
11320                ::authentic::AuthenticationStep::WaitFor(duration) => {
11321                    (self.sleep)(duration).await;
11322                }
11323            }
11324        }
11325        let theBuilder = crate::v1_1_4::request::packages_delete_package_version_for_org::http_builder(
11326            self.config.base_url.as_ref(),
11327            package_type,
11328            package_name,
11329            org,
11330            package_version_id,
11331            self.config.user_agent.as_ref(),
11332            self.config.accept.as_deref(),
11333        )?
11334        .with_authentication(&theScheme)?;
11335
11336        let theRequest =
11337            crate::v1_1_4::request::packages_delete_package_version_for_org::hyper_request(theBuilder)?;
11338
11339        ::log::debug!("HTTP request: {:?}", &theRequest);
11340
11341        let theResponse = self.client.request(theRequest).await?;
11342
11343        ::log::debug!("HTTP response: {:?}", &theResponse);
11344
11345        Ok(theResponse)
11346    }
11347
11348    /// Restore package version for an organization
11349    /// 
11350    /// Restores a specific package version in an organization.
11351    /// 
11352    /// You can restore a deleted package under the following conditions:
11353    ///   - The package was deleted within the last 30 days.
11354    ///   - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
11355    /// 
11356    /// To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition:
11357    /// - If `package_type` is not `container`, your token must also include the `repo` scope.
11358    /// - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.
11359    /// 
11360    /// [API method documentation](https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization)
11361    pub async fn packages_restore_package_version_for_org(
11362        &self,
11363        package_type: &str,
11364        package_name: &str,
11365        org: &str,
11366        package_version_id: i64,
11367    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11368        let mut theScheme = AuthScheme::from(&self.config.authentication);
11369
11370        while let Some(auth_step) = theScheme.step()? {
11371            match auth_step {
11372                ::authentic::AuthenticationStep::Request(auth_request) => {
11373                    theScheme.respond(self.client.request(auth_request).await);
11374                }
11375                ::authentic::AuthenticationStep::WaitFor(duration) => {
11376                    (self.sleep)(duration).await;
11377                }
11378            }
11379        }
11380        let theBuilder = crate::v1_1_4::request::packages_restore_package_version_for_org::http_builder(
11381            self.config.base_url.as_ref(),
11382            package_type,
11383            package_name,
11384            org,
11385            package_version_id,
11386            self.config.user_agent.as_ref(),
11387            self.config.accept.as_deref(),
11388        )?
11389        .with_authentication(&theScheme)?;
11390
11391        let theRequest =
11392            crate::v1_1_4::request::packages_restore_package_version_for_org::hyper_request(theBuilder)?;
11393
11394        ::log::debug!("HTTP request: {:?}", &theRequest);
11395
11396        let theResponse = self.client.request(theRequest).await?;
11397
11398        ::log::debug!("HTTP response: {:?}", &theResponse);
11399
11400        Ok(theResponse)
11401    }
11402
11403    /// List organization projects
11404    /// 
11405    /// Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.
11406    /// 
11407    /// [API method documentation](https://docs.github.com/rest/reference/projects#list-organization-projects)
11408    pub async fn projects_list_for_org(
11409        &self,
11410        org: &str,
11411        state: ::std::option::Option<&str>,
11412        per_page: ::std::option::Option<i64>,
11413        page: ::std::option::Option<i64>,
11414    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11415        let mut theScheme = AuthScheme::from(&self.config.authentication);
11416
11417        while let Some(auth_step) = theScheme.step()? {
11418            match auth_step {
11419                ::authentic::AuthenticationStep::Request(auth_request) => {
11420                    theScheme.respond(self.client.request(auth_request).await);
11421                }
11422                ::authentic::AuthenticationStep::WaitFor(duration) => {
11423                    (self.sleep)(duration).await;
11424                }
11425            }
11426        }
11427        let theBuilder = crate::v1_1_4::request::projects_list_for_org::http_builder(
11428            self.config.base_url.as_ref(),
11429            org,
11430            state,
11431            per_page,
11432            page,
11433            self.config.user_agent.as_ref(),
11434            self.config.accept.as_deref(),
11435        )?
11436        .with_authentication(&theScheme)?;
11437
11438        let theRequest =
11439            crate::v1_1_4::request::projects_list_for_org::hyper_request(theBuilder)?;
11440
11441        ::log::debug!("HTTP request: {:?}", &theRequest);
11442
11443        let theResponse = self.client.request(theRequest).await?;
11444
11445        ::log::debug!("HTTP response: {:?}", &theResponse);
11446
11447        Ok(theResponse)
11448    }
11449
11450    /// Create an organization project
11451    /// 
11452    /// Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.
11453    /// 
11454    /// [API method documentation](https://docs.github.com/rest/reference/projects#create-an-organization-project)
11455    ///
11456    /// # Content
11457    ///
11458    /// - [`&v1_1_4::request::projects_create_for_org::body::Json`](crate::v1_1_4::request::projects_create_for_org::body::Json)
11459    pub async fn projects_create_for_org<Content>(
11460        &self,
11461        org: &str,
11462        theContent: Content,
11463    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
11464    where
11465        Content: Copy + TryInto<crate::v1_1_4::request::projects_create_for_org::Content<::hyper::Body>>,
11466        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::projects_create_for_org::Content<::hyper::Body>>>::Error>
11467    {
11468        let mut theScheme = AuthScheme::from(&self.config.authentication);
11469
11470        while let Some(auth_step) = theScheme.step()? {
11471            match auth_step {
11472                ::authentic::AuthenticationStep::Request(auth_request) => {
11473                    theScheme.respond(self.client.request(auth_request).await);
11474                }
11475                ::authentic::AuthenticationStep::WaitFor(duration) => {
11476                    (self.sleep)(duration).await;
11477                }
11478            }
11479        }
11480        let theBuilder = crate::v1_1_4::request::projects_create_for_org::http_builder(
11481            self.config.base_url.as_ref(),
11482            org,
11483            self.config.user_agent.as_ref(),
11484            self.config.accept.as_deref(),
11485        )?
11486        .with_authentication(&theScheme)?;
11487
11488        let theRequest = crate::v1_1_4::request::projects_create_for_org::hyper_request(
11489            theBuilder,
11490            theContent.try_into()?,
11491        )?;
11492
11493        ::log::debug!("HTTP request: {:?}", &theRequest);
11494
11495        let theResponse = self.client.request(theRequest).await?;
11496
11497        ::log::debug!("HTTP response: {:?}", &theResponse);
11498
11499        Ok(theResponse)
11500    }
11501
11502    /// List public organization members
11503    /// 
11504    /// Members of an organization can choose to have their membership publicized or not.
11505    /// 
11506    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-public-organization-members)
11507    pub async fn orgs_list_public_members(
11508        &self,
11509        org: &str,
11510        per_page: ::std::option::Option<i64>,
11511        page: ::std::option::Option<i64>,
11512    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11513        let mut theScheme = AuthScheme::from(&self.config.authentication);
11514
11515        while let Some(auth_step) = theScheme.step()? {
11516            match auth_step {
11517                ::authentic::AuthenticationStep::Request(auth_request) => {
11518                    theScheme.respond(self.client.request(auth_request).await);
11519                }
11520                ::authentic::AuthenticationStep::WaitFor(duration) => {
11521                    (self.sleep)(duration).await;
11522                }
11523            }
11524        }
11525        let theBuilder = crate::v1_1_4::request::orgs_list_public_members::http_builder(
11526            self.config.base_url.as_ref(),
11527            org,
11528            per_page,
11529            page,
11530            self.config.user_agent.as_ref(),
11531            self.config.accept.as_deref(),
11532        )?
11533        .with_authentication(&theScheme)?;
11534
11535        let theRequest =
11536            crate::v1_1_4::request::orgs_list_public_members::hyper_request(theBuilder)?;
11537
11538        ::log::debug!("HTTP request: {:?}", &theRequest);
11539
11540        let theResponse = self.client.request(theRequest).await?;
11541
11542        ::log::debug!("HTTP response: {:?}", &theResponse);
11543
11544        Ok(theResponse)
11545    }
11546
11547    /// Check public organization membership for a user
11548    /// 
11549    /// [API method documentation](https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user)
11550    pub async fn orgs_check_public_membership_for_user(
11551        &self,
11552        org: &str,
11553        username: &str,
11554    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11555        let mut theScheme = AuthScheme::from(&self.config.authentication);
11556
11557        while let Some(auth_step) = theScheme.step()? {
11558            match auth_step {
11559                ::authentic::AuthenticationStep::Request(auth_request) => {
11560                    theScheme.respond(self.client.request(auth_request).await);
11561                }
11562                ::authentic::AuthenticationStep::WaitFor(duration) => {
11563                    (self.sleep)(duration).await;
11564                }
11565            }
11566        }
11567        let theBuilder = crate::v1_1_4::request::orgs_check_public_membership_for_user::http_builder(
11568            self.config.base_url.as_ref(),
11569            org,
11570            username,
11571            self.config.user_agent.as_ref(),
11572            self.config.accept.as_deref(),
11573        )?
11574        .with_authentication(&theScheme)?;
11575
11576        let theRequest =
11577            crate::v1_1_4::request::orgs_check_public_membership_for_user::hyper_request(theBuilder)?;
11578
11579        ::log::debug!("HTTP request: {:?}", &theRequest);
11580
11581        let theResponse = self.client.request(theRequest).await?;
11582
11583        ::log::debug!("HTTP response: {:?}", &theResponse);
11584
11585        Ok(theResponse)
11586    }
11587
11588    /// Set public organization membership for the authenticated user
11589    /// 
11590    /// The user can publicize their own membership. (A user cannot publicize the membership for another user.)
11591    /// 
11592    /// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
11593    /// 
11594    /// [API method documentation](https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user)
11595    pub async fn orgs_set_public_membership_for_authenticated_user(
11596        &self,
11597        org: &str,
11598        username: &str,
11599    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11600        let mut theScheme = AuthScheme::from(&self.config.authentication);
11601
11602        while let Some(auth_step) = theScheme.step()? {
11603            match auth_step {
11604                ::authentic::AuthenticationStep::Request(auth_request) => {
11605                    theScheme.respond(self.client.request(auth_request).await);
11606                }
11607                ::authentic::AuthenticationStep::WaitFor(duration) => {
11608                    (self.sleep)(duration).await;
11609                }
11610            }
11611        }
11612        let theBuilder = crate::v1_1_4::request::orgs_set_public_membership_for_authenticated_user::http_builder(
11613            self.config.base_url.as_ref(),
11614            org,
11615            username,
11616            self.config.user_agent.as_ref(),
11617            self.config.accept.as_deref(),
11618        )?
11619        .with_authentication(&theScheme)?;
11620
11621        let theRequest =
11622            crate::v1_1_4::request::orgs_set_public_membership_for_authenticated_user::hyper_request(theBuilder)?;
11623
11624        ::log::debug!("HTTP request: {:?}", &theRequest);
11625
11626        let theResponse = self.client.request(theRequest).await?;
11627
11628        ::log::debug!("HTTP response: {:?}", &theResponse);
11629
11630        Ok(theResponse)
11631    }
11632
11633    /// Remove public organization membership for the authenticated user
11634    /// 
11635    /// [API method documentation](https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user)
11636    pub async fn orgs_remove_public_membership_for_authenticated_user(
11637        &self,
11638        org: &str,
11639        username: &str,
11640    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11641        let mut theScheme = AuthScheme::from(&self.config.authentication);
11642
11643        while let Some(auth_step) = theScheme.step()? {
11644            match auth_step {
11645                ::authentic::AuthenticationStep::Request(auth_request) => {
11646                    theScheme.respond(self.client.request(auth_request).await);
11647                }
11648                ::authentic::AuthenticationStep::WaitFor(duration) => {
11649                    (self.sleep)(duration).await;
11650                }
11651            }
11652        }
11653        let theBuilder = crate::v1_1_4::request::orgs_remove_public_membership_for_authenticated_user::http_builder(
11654            self.config.base_url.as_ref(),
11655            org,
11656            username,
11657            self.config.user_agent.as_ref(),
11658            self.config.accept.as_deref(),
11659        )?
11660        .with_authentication(&theScheme)?;
11661
11662        let theRequest =
11663            crate::v1_1_4::request::orgs_remove_public_membership_for_authenticated_user::hyper_request(theBuilder)?;
11664
11665        ::log::debug!("HTTP request: {:?}", &theRequest);
11666
11667        let theResponse = self.client.request(theRequest).await?;
11668
11669        ::log::debug!("HTTP response: {:?}", &theResponse);
11670
11671        Ok(theResponse)
11672    }
11673
11674    /// List organization repositories
11675    /// 
11676    /// Lists repositories for the specified organization.
11677    /// 
11678    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-organization-repositories)
11679    pub async fn repos_list_for_org(
11680        &self,
11681        org: &str,
11682        r#type: ::std::option::Option<&str>,
11683        sort: &crate::types::Sort<'_>,
11684        per_page: ::std::option::Option<i64>,
11685        page: ::std::option::Option<i64>,
11686    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11687        let (sort, direction) = sort.extract();
11688        let mut theScheme = AuthScheme::from(&self.config.authentication);
11689
11690        while let Some(auth_step) = theScheme.step()? {
11691            match auth_step {
11692                ::authentic::AuthenticationStep::Request(auth_request) => {
11693                    theScheme.respond(self.client.request(auth_request).await);
11694                }
11695                ::authentic::AuthenticationStep::WaitFor(duration) => {
11696                    (self.sleep)(duration).await;
11697                }
11698            }
11699        }
11700        let theBuilder = crate::v1_1_4::request::repos_list_for_org::http_builder(
11701            self.config.base_url.as_ref(),
11702            org,
11703            r#type,
11704            sort,
11705            direction,
11706            per_page,
11707            page,
11708            self.config.user_agent.as_ref(),
11709            self.config.accept.as_deref(),
11710        )?
11711        .with_authentication(&theScheme)?;
11712
11713        let theRequest =
11714            crate::v1_1_4::request::repos_list_for_org::hyper_request(theBuilder)?;
11715
11716        ::log::debug!("HTTP request: {:?}", &theRequest);
11717
11718        let theResponse = self.client.request(theRequest).await?;
11719
11720        ::log::debug!("HTTP response: {:?}", &theResponse);
11721
11722        Ok(theResponse)
11723    }
11724
11725    /// Create an organization repository
11726    /// 
11727    /// Creates a new repository in the specified organization. The authenticated user must be a member of the organization.
11728    /// 
11729    /// **OAuth scope requirements**
11730    /// 
11731    /// When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:
11732    /// 
11733    /// *   `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.
11734    /// *   `repo` scope to create a private repository
11735    /// 
11736    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-an-organization-repository)
11737    ///
11738    /// # Content
11739    ///
11740    /// - [`&v1_1_4::request::repos_create_in_org::body::Json`](crate::v1_1_4::request::repos_create_in_org::body::Json)
11741    pub async fn repos_create_in_org<Content>(
11742        &self,
11743        org: &str,
11744        theContent: Content,
11745    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
11746    where
11747        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_in_org::Content<::hyper::Body>>,
11748        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_in_org::Content<::hyper::Body>>>::Error>
11749    {
11750        let mut theScheme = AuthScheme::from(&self.config.authentication);
11751
11752        while let Some(auth_step) = theScheme.step()? {
11753            match auth_step {
11754                ::authentic::AuthenticationStep::Request(auth_request) => {
11755                    theScheme.respond(self.client.request(auth_request).await);
11756                }
11757                ::authentic::AuthenticationStep::WaitFor(duration) => {
11758                    (self.sleep)(duration).await;
11759                }
11760            }
11761        }
11762        let theBuilder = crate::v1_1_4::request::repos_create_in_org::http_builder(
11763            self.config.base_url.as_ref(),
11764            org,
11765            self.config.user_agent.as_ref(),
11766            self.config.accept.as_deref(),
11767        )?
11768        .with_authentication(&theScheme)?;
11769
11770        let theRequest = crate::v1_1_4::request::repos_create_in_org::hyper_request(
11771            theBuilder,
11772            theContent.try_into()?,
11773        )?;
11774
11775        ::log::debug!("HTTP request: {:?}", &theRequest);
11776
11777        let theResponse = self.client.request(theRequest).await?;
11778
11779        ::log::debug!("HTTP response: {:?}", &theResponse);
11780
11781        Ok(theResponse)
11782    }
11783
11784    /// List secret scanning alerts for an organization
11785    /// 
11786    /// Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest.
11787    /// To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope.
11788    /// 
11789    /// GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.
11790    /// 
11791    /// [API method documentation](https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization)
11792    pub async fn secret_scanning_list_alerts_for_org(
11793        &self,
11794        org: &str,
11795        state: ::std::option::Option<&str>,
11796        secret_type: ::std::option::Option<&str>,
11797        resolution: ::std::option::Option<&str>,
11798        page: ::std::option::Option<i64>,
11799        per_page: ::std::option::Option<i64>,
11800    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11801        let mut theScheme = AuthScheme::from(&self.config.authentication);
11802
11803        while let Some(auth_step) = theScheme.step()? {
11804            match auth_step {
11805                ::authentic::AuthenticationStep::Request(auth_request) => {
11806                    theScheme.respond(self.client.request(auth_request).await);
11807                }
11808                ::authentic::AuthenticationStep::WaitFor(duration) => {
11809                    (self.sleep)(duration).await;
11810                }
11811            }
11812        }
11813        let theBuilder = crate::v1_1_4::request::secret_scanning_list_alerts_for_org::http_builder(
11814            self.config.base_url.as_ref(),
11815            org,
11816            state,
11817            secret_type,
11818            resolution,
11819            page,
11820            per_page,
11821            self.config.user_agent.as_ref(),
11822            self.config.accept.as_deref(),
11823        )?
11824        .with_authentication(&theScheme)?;
11825
11826        let theRequest =
11827            crate::v1_1_4::request::secret_scanning_list_alerts_for_org::hyper_request(theBuilder)?;
11828
11829        ::log::debug!("HTTP request: {:?}", &theRequest);
11830
11831        let theResponse = self.client.request(theRequest).await?;
11832
11833        ::log::debug!("HTTP response: {:?}", &theResponse);
11834
11835        Ok(theResponse)
11836    }
11837
11838    /// Get GitHub Actions billing for an organization
11839    /// 
11840    /// Gets the summary of the free and paid GitHub Actions minutes used.
11841    /// 
11842    /// Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
11843    /// 
11844    /// Access tokens must have the `repo` or `admin:org` scope.
11845    /// 
11846    /// [API method documentation](https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization)
11847    pub async fn billing_get_github_actions_billing_org(
11848        &self,
11849        org: &str,
11850    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11851        let mut theScheme = AuthScheme::from(&self.config.authentication);
11852
11853        while let Some(auth_step) = theScheme.step()? {
11854            match auth_step {
11855                ::authentic::AuthenticationStep::Request(auth_request) => {
11856                    theScheme.respond(self.client.request(auth_request).await);
11857                }
11858                ::authentic::AuthenticationStep::WaitFor(duration) => {
11859                    (self.sleep)(duration).await;
11860                }
11861            }
11862        }
11863        let theBuilder = crate::v1_1_4::request::billing_get_github_actions_billing_org::http_builder(
11864            self.config.base_url.as_ref(),
11865            org,
11866            self.config.user_agent.as_ref(),
11867            self.config.accept.as_deref(),
11868        )?
11869        .with_authentication(&theScheme)?;
11870
11871        let theRequest =
11872            crate::v1_1_4::request::billing_get_github_actions_billing_org::hyper_request(theBuilder)?;
11873
11874        ::log::debug!("HTTP request: {:?}", &theRequest);
11875
11876        let theResponse = self.client.request(theRequest).await?;
11877
11878        ::log::debug!("HTTP response: {:?}", &theResponse);
11879
11880        Ok(theResponse)
11881    }
11882
11883    /// Get GitHub Advanced Security active committers for an organization
11884    /// 
11885    /// Gets the GitHub Advanced Security active committers for an organization per repository.
11886    /// Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository.
11887    /// If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level.
11888    /// 
11889    /// [API method documentation](https://docs.github.com/rest/reference/billing#get-github-advanced-security-active-committers-for-an-organization)
11890    pub async fn billing_get_github_advanced_security_billing_org(
11891        &self,
11892        org: &str,
11893        per_page: ::std::option::Option<i64>,
11894        page: ::std::option::Option<i64>,
11895    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11896        let mut theScheme = AuthScheme::from(&self.config.authentication);
11897
11898        while let Some(auth_step) = theScheme.step()? {
11899            match auth_step {
11900                ::authentic::AuthenticationStep::Request(auth_request) => {
11901                    theScheme.respond(self.client.request(auth_request).await);
11902                }
11903                ::authentic::AuthenticationStep::WaitFor(duration) => {
11904                    (self.sleep)(duration).await;
11905                }
11906            }
11907        }
11908        let theBuilder = crate::v1_1_4::request::billing_get_github_advanced_security_billing_org::http_builder(
11909            self.config.base_url.as_ref(),
11910            org,
11911            per_page,
11912            page,
11913            self.config.user_agent.as_ref(),
11914            self.config.accept.as_deref(),
11915        )?
11916        .with_authentication(&theScheme)?;
11917
11918        let theRequest =
11919            crate::v1_1_4::request::billing_get_github_advanced_security_billing_org::hyper_request(theBuilder)?;
11920
11921        ::log::debug!("HTTP request: {:?}", &theRequest);
11922
11923        let theResponse = self.client.request(theRequest).await?;
11924
11925        ::log::debug!("HTTP response: {:?}", &theResponse);
11926
11927        Ok(theResponse)
11928    }
11929
11930    /// Get GitHub Packages billing for an organization
11931    /// 
11932    /// Gets the free and paid storage used for GitHub Packages in gigabytes.
11933    /// 
11934    /// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
11935    /// 
11936    /// Access tokens must have the `repo` or `admin:org` scope.
11937    /// 
11938    /// [API method documentation](https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization)
11939    pub async fn billing_get_github_packages_billing_org(
11940        &self,
11941        org: &str,
11942    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11943        let mut theScheme = AuthScheme::from(&self.config.authentication);
11944
11945        while let Some(auth_step) = theScheme.step()? {
11946            match auth_step {
11947                ::authentic::AuthenticationStep::Request(auth_request) => {
11948                    theScheme.respond(self.client.request(auth_request).await);
11949                }
11950                ::authentic::AuthenticationStep::WaitFor(duration) => {
11951                    (self.sleep)(duration).await;
11952                }
11953            }
11954        }
11955        let theBuilder = crate::v1_1_4::request::billing_get_github_packages_billing_org::http_builder(
11956            self.config.base_url.as_ref(),
11957            org,
11958            self.config.user_agent.as_ref(),
11959            self.config.accept.as_deref(),
11960        )?
11961        .with_authentication(&theScheme)?;
11962
11963        let theRequest =
11964            crate::v1_1_4::request::billing_get_github_packages_billing_org::hyper_request(theBuilder)?;
11965
11966        ::log::debug!("HTTP request: {:?}", &theRequest);
11967
11968        let theResponse = self.client.request(theRequest).await?;
11969
11970        ::log::debug!("HTTP response: {:?}", &theResponse);
11971
11972        Ok(theResponse)
11973    }
11974
11975    /// Get shared storage billing for an organization
11976    /// 
11977    /// Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.
11978    /// 
11979    /// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
11980    /// 
11981    /// Access tokens must have the `repo` or `admin:org` scope.
11982    /// 
11983    /// [API method documentation](https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization)
11984    pub async fn billing_get_shared_storage_billing_org(
11985        &self,
11986        org: &str,
11987    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
11988        let mut theScheme = AuthScheme::from(&self.config.authentication);
11989
11990        while let Some(auth_step) = theScheme.step()? {
11991            match auth_step {
11992                ::authentic::AuthenticationStep::Request(auth_request) => {
11993                    theScheme.respond(self.client.request(auth_request).await);
11994                }
11995                ::authentic::AuthenticationStep::WaitFor(duration) => {
11996                    (self.sleep)(duration).await;
11997                }
11998            }
11999        }
12000        let theBuilder = crate::v1_1_4::request::billing_get_shared_storage_billing_org::http_builder(
12001            self.config.base_url.as_ref(),
12002            org,
12003            self.config.user_agent.as_ref(),
12004            self.config.accept.as_deref(),
12005        )?
12006        .with_authentication(&theScheme)?;
12007
12008        let theRequest =
12009            crate::v1_1_4::request::billing_get_shared_storage_billing_org::hyper_request(theBuilder)?;
12010
12011        ::log::debug!("HTTP request: {:?}", &theRequest);
12012
12013        let theResponse = self.client.request(theRequest).await?;
12014
12015        ::log::debug!("HTTP response: {:?}", &theResponse);
12016
12017        Ok(theResponse)
12018    }
12019
12020    /// List IdP groups for an organization
12021    /// 
12022    /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
12023    /// 
12024    /// List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)."
12025    /// 
12026    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-idp-groups-for-an-organization)
12027    pub async fn teams_list_idp_groups_for_org(
12028        &self,
12029        org: &str,
12030        per_page: ::std::option::Option<i64>,
12031        page: ::std::option::Option<&str>,
12032    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
12033        let mut theScheme = AuthScheme::from(&self.config.authentication);
12034
12035        while let Some(auth_step) = theScheme.step()? {
12036            match auth_step {
12037                ::authentic::AuthenticationStep::Request(auth_request) => {
12038                    theScheme.respond(self.client.request(auth_request).await);
12039                }
12040                ::authentic::AuthenticationStep::WaitFor(duration) => {
12041                    (self.sleep)(duration).await;
12042                }
12043            }
12044        }
12045        let theBuilder = crate::v1_1_4::request::teams_list_idp_groups_for_org::http_builder(
12046            self.config.base_url.as_ref(),
12047            org,
12048            per_page,
12049            page,
12050            self.config.user_agent.as_ref(),
12051            self.config.accept.as_deref(),
12052        )?
12053        .with_authentication(&theScheme)?;
12054
12055        let theRequest =
12056            crate::v1_1_4::request::teams_list_idp_groups_for_org::hyper_request(theBuilder)?;
12057
12058        ::log::debug!("HTTP request: {:?}", &theRequest);
12059
12060        let theResponse = self.client.request(theRequest).await?;
12061
12062        ::log::debug!("HTTP response: {:?}", &theResponse);
12063
12064        Ok(theResponse)
12065    }
12066
12067    /// List teams
12068    /// 
12069    /// Lists all teams in an organization that are visible to the authenticated user.
12070    /// 
12071    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-teams)
12072    pub async fn teams_list(
12073        &self,
12074        org: &str,
12075        per_page: ::std::option::Option<i64>,
12076        page: ::std::option::Option<i64>,
12077    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
12078        let mut theScheme = AuthScheme::from(&self.config.authentication);
12079
12080        while let Some(auth_step) = theScheme.step()? {
12081            match auth_step {
12082                ::authentic::AuthenticationStep::Request(auth_request) => {
12083                    theScheme.respond(self.client.request(auth_request).await);
12084                }
12085                ::authentic::AuthenticationStep::WaitFor(duration) => {
12086                    (self.sleep)(duration).await;
12087                }
12088            }
12089        }
12090        let theBuilder = crate::v1_1_4::request::teams_list::http_builder(
12091            self.config.base_url.as_ref(),
12092            org,
12093            per_page,
12094            page,
12095            self.config.user_agent.as_ref(),
12096            self.config.accept.as_deref(),
12097        )?
12098        .with_authentication(&theScheme)?;
12099
12100        let theRequest =
12101            crate::v1_1_4::request::teams_list::hyper_request(theBuilder)?;
12102
12103        ::log::debug!("HTTP request: {:?}", &theRequest);
12104
12105        let theResponse = self.client.request(theRequest).await?;
12106
12107        ::log::debug!("HTTP response: {:?}", &theResponse);
12108
12109        Ok(theResponse)
12110    }
12111
12112    /// Create a team
12113    /// 
12114    /// To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)."
12115    /// 
12116    /// When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)".
12117    /// 
12118    /// [API method documentation](https://docs.github.com/rest/reference/teams#create-a-team)
12119    ///
12120    /// # Content
12121    ///
12122    /// - [`&v1_1_4::request::teams_create::body::Json`](crate::v1_1_4::request::teams_create::body::Json)
12123    pub async fn teams_create<Content>(
12124        &self,
12125        org: &str,
12126        theContent: Content,
12127    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
12128    where
12129        Content: Copy + TryInto<crate::v1_1_4::request::teams_create::Content<::hyper::Body>>,
12130        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_create::Content<::hyper::Body>>>::Error>
12131    {
12132        let mut theScheme = AuthScheme::from(&self.config.authentication);
12133
12134        while let Some(auth_step) = theScheme.step()? {
12135            match auth_step {
12136                ::authentic::AuthenticationStep::Request(auth_request) => {
12137                    theScheme.respond(self.client.request(auth_request).await);
12138                }
12139                ::authentic::AuthenticationStep::WaitFor(duration) => {
12140                    (self.sleep)(duration).await;
12141                }
12142            }
12143        }
12144        let theBuilder = crate::v1_1_4::request::teams_create::http_builder(
12145            self.config.base_url.as_ref(),
12146            org,
12147            self.config.user_agent.as_ref(),
12148            self.config.accept.as_deref(),
12149        )?
12150        .with_authentication(&theScheme)?;
12151
12152        let theRequest = crate::v1_1_4::request::teams_create::hyper_request(
12153            theBuilder,
12154            theContent.try_into()?,
12155        )?;
12156
12157        ::log::debug!("HTTP request: {:?}", &theRequest);
12158
12159        let theResponse = self.client.request(theRequest).await?;
12160
12161        ::log::debug!("HTTP response: {:?}", &theResponse);
12162
12163        Ok(theResponse)
12164    }
12165
12166    /// Get a team by name
12167    /// 
12168    /// Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`.
12169    /// 
12170    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`.
12171    /// 
12172    /// [API method documentation](https://docs.github.com/rest/reference/teams#get-a-team-by-name)
12173    pub async fn teams_get_by_name(
12174        &self,
12175        org: &str,
12176        team_slug: &str,
12177    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
12178        let mut theScheme = AuthScheme::from(&self.config.authentication);
12179
12180        while let Some(auth_step) = theScheme.step()? {
12181            match auth_step {
12182                ::authentic::AuthenticationStep::Request(auth_request) => {
12183                    theScheme.respond(self.client.request(auth_request).await);
12184                }
12185                ::authentic::AuthenticationStep::WaitFor(duration) => {
12186                    (self.sleep)(duration).await;
12187                }
12188            }
12189        }
12190        let theBuilder = crate::v1_1_4::request::teams_get_by_name::http_builder(
12191            self.config.base_url.as_ref(),
12192            org,
12193            team_slug,
12194            self.config.user_agent.as_ref(),
12195            self.config.accept.as_deref(),
12196        )?
12197        .with_authentication(&theScheme)?;
12198
12199        let theRequest =
12200            crate::v1_1_4::request::teams_get_by_name::hyper_request(theBuilder)?;
12201
12202        ::log::debug!("HTTP request: {:?}", &theRequest);
12203
12204        let theResponse = self.client.request(theRequest).await?;
12205
12206        ::log::debug!("HTTP response: {:?}", &theResponse);
12207
12208        Ok(theResponse)
12209    }
12210
12211    /// Delete a team
12212    /// 
12213    /// To delete a team, the authenticated user must be an organization owner or team maintainer.
12214    /// 
12215    /// If you are an organization owner, deleting a parent team will delete all of its child teams as well.
12216    /// 
12217    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`.
12218    /// 
12219    /// [API method documentation](https://docs.github.com/rest/reference/teams#delete-a-team)
12220    pub async fn teams_delete_in_org(
12221        &self,
12222        org: &str,
12223        team_slug: &str,
12224    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
12225        let mut theScheme = AuthScheme::from(&self.config.authentication);
12226
12227        while let Some(auth_step) = theScheme.step()? {
12228            match auth_step {
12229                ::authentic::AuthenticationStep::Request(auth_request) => {
12230                    theScheme.respond(self.client.request(auth_request).await);
12231                }
12232                ::authentic::AuthenticationStep::WaitFor(duration) => {
12233                    (self.sleep)(duration).await;
12234                }
12235            }
12236        }
12237        let theBuilder = crate::v1_1_4::request::teams_delete_in_org::http_builder(
12238            self.config.base_url.as_ref(),
12239            org,
12240            team_slug,
12241            self.config.user_agent.as_ref(),
12242            self.config.accept.as_deref(),
12243        )?
12244        .with_authentication(&theScheme)?;
12245
12246        let theRequest =
12247            crate::v1_1_4::request::teams_delete_in_org::hyper_request(theBuilder)?;
12248
12249        ::log::debug!("HTTP request: {:?}", &theRequest);
12250
12251        let theResponse = self.client.request(theRequest).await?;
12252
12253        ::log::debug!("HTTP response: {:?}", &theResponse);
12254
12255        Ok(theResponse)
12256    }
12257
12258    /// Update a team
12259    /// 
12260    /// To edit a team, the authenticated user must either be an organization owner or a team maintainer.
12261    /// 
12262    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`.
12263    /// 
12264    /// [API method documentation](https://docs.github.com/rest/reference/teams#update-a-team)
12265    ///
12266    /// # Content
12267    ///
12268    /// - [`&v1_1_4::request::teams_update_in_org::body::Json`](crate::v1_1_4::request::teams_update_in_org::body::Json)
12269    pub async fn teams_update_in_org<Content>(
12270        &self,
12271        org: &str,
12272        team_slug: &str,
12273        theContent: Content,
12274    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
12275    where
12276        Content: Copy + TryInto<crate::v1_1_4::request::teams_update_in_org::Content<::hyper::Body>>,
12277        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_update_in_org::Content<::hyper::Body>>>::Error>
12278    {
12279        let mut theScheme = AuthScheme::from(&self.config.authentication);
12280
12281        while let Some(auth_step) = theScheme.step()? {
12282            match auth_step {
12283                ::authentic::AuthenticationStep::Request(auth_request) => {
12284                    theScheme.respond(self.client.request(auth_request).await);
12285                }
12286                ::authentic::AuthenticationStep::WaitFor(duration) => {
12287                    (self.sleep)(duration).await;
12288                }
12289            }
12290        }
12291        let theBuilder = crate::v1_1_4::request::teams_update_in_org::http_builder(
12292            self.config.base_url.as_ref(),
12293            org,
12294            team_slug,
12295            self.config.user_agent.as_ref(),
12296            self.config.accept.as_deref(),
12297        )?
12298        .with_authentication(&theScheme)?;
12299
12300        let theRequest = crate::v1_1_4::request::teams_update_in_org::hyper_request(
12301            theBuilder,
12302            theContent.try_into()?,
12303        )?;
12304
12305        ::log::debug!("HTTP request: {:?}", &theRequest);
12306
12307        let theResponse = self.client.request(theRequest).await?;
12308
12309        ::log::debug!("HTTP response: {:?}", &theResponse);
12310
12311        Ok(theResponse)
12312    }
12313
12314    /// List discussions
12315    /// 
12316    /// List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
12317    /// 
12318    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`.
12319    /// 
12320    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-discussions)
12321    pub async fn teams_list_discussions_in_org(
12322        &self,
12323        org: &str,
12324        team_slug: &str,
12325        direction: ::std::option::Option<&str>,
12326        per_page: ::std::option::Option<i64>,
12327        page: ::std::option::Option<i64>,
12328        pinned: ::std::option::Option<&str>,
12329    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
12330        let mut theScheme = AuthScheme::from(&self.config.authentication);
12331
12332        while let Some(auth_step) = theScheme.step()? {
12333            match auth_step {
12334                ::authentic::AuthenticationStep::Request(auth_request) => {
12335                    theScheme.respond(self.client.request(auth_request).await);
12336                }
12337                ::authentic::AuthenticationStep::WaitFor(duration) => {
12338                    (self.sleep)(duration).await;
12339                }
12340            }
12341        }
12342        let theBuilder = crate::v1_1_4::request::teams_list_discussions_in_org::http_builder(
12343            self.config.base_url.as_ref(),
12344            org,
12345            team_slug,
12346            direction,
12347            per_page,
12348            page,
12349            pinned,
12350            self.config.user_agent.as_ref(),
12351            self.config.accept.as_deref(),
12352        )?
12353        .with_authentication(&theScheme)?;
12354
12355        let theRequest =
12356            crate::v1_1_4::request::teams_list_discussions_in_org::hyper_request(theBuilder)?;
12357
12358        ::log::debug!("HTTP request: {:?}", &theRequest);
12359
12360        let theResponse = self.client.request(theRequest).await?;
12361
12362        ::log::debug!("HTTP response: {:?}", &theResponse);
12363
12364        Ok(theResponse)
12365    }
12366
12367    /// Create a discussion
12368    /// 
12369    /// Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
12370    /// 
12371    /// This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
12372    /// 
12373    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`.
12374    /// 
12375    /// [API method documentation](https://docs.github.com/rest/reference/teams#create-a-discussion)
12376    ///
12377    /// # Content
12378    ///
12379    /// - [`&v1_1_4::request::teams_create_discussion_in_org::body::Json`](crate::v1_1_4::request::teams_create_discussion_in_org::body::Json)
12380    pub async fn teams_create_discussion_in_org<Content>(
12381        &self,
12382        org: &str,
12383        team_slug: &str,
12384        theContent: Content,
12385    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
12386    where
12387        Content: Copy + TryInto<crate::v1_1_4::request::teams_create_discussion_in_org::Content<::hyper::Body>>,
12388        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_create_discussion_in_org::Content<::hyper::Body>>>::Error>
12389    {
12390        let mut theScheme = AuthScheme::from(&self.config.authentication);
12391
12392        while let Some(auth_step) = theScheme.step()? {
12393            match auth_step {
12394                ::authentic::AuthenticationStep::Request(auth_request) => {
12395                    theScheme.respond(self.client.request(auth_request).await);
12396                }
12397                ::authentic::AuthenticationStep::WaitFor(duration) => {
12398                    (self.sleep)(duration).await;
12399                }
12400            }
12401        }
12402        let theBuilder = crate::v1_1_4::request::teams_create_discussion_in_org::http_builder(
12403            self.config.base_url.as_ref(),
12404            org,
12405            team_slug,
12406            self.config.user_agent.as_ref(),
12407            self.config.accept.as_deref(),
12408        )?
12409        .with_authentication(&theScheme)?;
12410
12411        let theRequest = crate::v1_1_4::request::teams_create_discussion_in_org::hyper_request(
12412            theBuilder,
12413            theContent.try_into()?,
12414        )?;
12415
12416        ::log::debug!("HTTP request: {:?}", &theRequest);
12417
12418        let theResponse = self.client.request(theRequest).await?;
12419
12420        ::log::debug!("HTTP response: {:?}", &theResponse);
12421
12422        Ok(theResponse)
12423    }
12424
12425    /// Get a discussion
12426    /// 
12427    /// Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
12428    /// 
12429    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.
12430    /// 
12431    /// [API method documentation](https://docs.github.com/rest/reference/teams#get-a-discussion)
12432    pub async fn teams_get_discussion_in_org(
12433        &self,
12434        org: &str,
12435        team_slug: &str,
12436        discussion_number: i64,
12437    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
12438        let mut theScheme = AuthScheme::from(&self.config.authentication);
12439
12440        while let Some(auth_step) = theScheme.step()? {
12441            match auth_step {
12442                ::authentic::AuthenticationStep::Request(auth_request) => {
12443                    theScheme.respond(self.client.request(auth_request).await);
12444                }
12445                ::authentic::AuthenticationStep::WaitFor(duration) => {
12446                    (self.sleep)(duration).await;
12447                }
12448            }
12449        }
12450        let theBuilder = crate::v1_1_4::request::teams_get_discussion_in_org::http_builder(
12451            self.config.base_url.as_ref(),
12452            org,
12453            team_slug,
12454            discussion_number,
12455            self.config.user_agent.as_ref(),
12456            self.config.accept.as_deref(),
12457        )?
12458        .with_authentication(&theScheme)?;
12459
12460        let theRequest =
12461            crate::v1_1_4::request::teams_get_discussion_in_org::hyper_request(theBuilder)?;
12462
12463        ::log::debug!("HTTP request: {:?}", &theRequest);
12464
12465        let theResponse = self.client.request(theRequest).await?;
12466
12467        ::log::debug!("HTTP response: {:?}", &theResponse);
12468
12469        Ok(theResponse)
12470    }
12471
12472    /// Delete a discussion
12473    /// 
12474    /// Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
12475    /// 
12476    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.
12477    /// 
12478    /// [API method documentation](https://docs.github.com/rest/reference/teams#delete-a-discussion)
12479    pub async fn teams_delete_discussion_in_org(
12480        &self,
12481        org: &str,
12482        team_slug: &str,
12483        discussion_number: i64,
12484    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
12485        let mut theScheme = AuthScheme::from(&self.config.authentication);
12486
12487        while let Some(auth_step) = theScheme.step()? {
12488            match auth_step {
12489                ::authentic::AuthenticationStep::Request(auth_request) => {
12490                    theScheme.respond(self.client.request(auth_request).await);
12491                }
12492                ::authentic::AuthenticationStep::WaitFor(duration) => {
12493                    (self.sleep)(duration).await;
12494                }
12495            }
12496        }
12497        let theBuilder = crate::v1_1_4::request::teams_delete_discussion_in_org::http_builder(
12498            self.config.base_url.as_ref(),
12499            org,
12500            team_slug,
12501            discussion_number,
12502            self.config.user_agent.as_ref(),
12503            self.config.accept.as_deref(),
12504        )?
12505        .with_authentication(&theScheme)?;
12506
12507        let theRequest =
12508            crate::v1_1_4::request::teams_delete_discussion_in_org::hyper_request(theBuilder)?;
12509
12510        ::log::debug!("HTTP request: {:?}", &theRequest);
12511
12512        let theResponse = self.client.request(theRequest).await?;
12513
12514        ::log::debug!("HTTP response: {:?}", &theResponse);
12515
12516        Ok(theResponse)
12517    }
12518
12519    /// Update a discussion
12520    /// 
12521    /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
12522    /// 
12523    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`.
12524    /// 
12525    /// [API method documentation](https://docs.github.com/rest/reference/teams#update-a-discussion)
12526    ///
12527    /// # Content
12528    ///
12529    /// - [`&v1_1_4::request::teams_update_discussion_in_org::body::Json`](crate::v1_1_4::request::teams_update_discussion_in_org::body::Json)
12530    pub async fn teams_update_discussion_in_org<Content>(
12531        &self,
12532        org: &str,
12533        team_slug: &str,
12534        discussion_number: i64,
12535        theContent: Content,
12536    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
12537    where
12538        Content: Copy + TryInto<crate::v1_1_4::request::teams_update_discussion_in_org::Content<::hyper::Body>>,
12539        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_update_discussion_in_org::Content<::hyper::Body>>>::Error>
12540    {
12541        let mut theScheme = AuthScheme::from(&self.config.authentication);
12542
12543        while let Some(auth_step) = theScheme.step()? {
12544            match auth_step {
12545                ::authentic::AuthenticationStep::Request(auth_request) => {
12546                    theScheme.respond(self.client.request(auth_request).await);
12547                }
12548                ::authentic::AuthenticationStep::WaitFor(duration) => {
12549                    (self.sleep)(duration).await;
12550                }
12551            }
12552        }
12553        let theBuilder = crate::v1_1_4::request::teams_update_discussion_in_org::http_builder(
12554            self.config.base_url.as_ref(),
12555            org,
12556            team_slug,
12557            discussion_number,
12558            self.config.user_agent.as_ref(),
12559            self.config.accept.as_deref(),
12560        )?
12561        .with_authentication(&theScheme)?;
12562
12563        let theRequest = crate::v1_1_4::request::teams_update_discussion_in_org::hyper_request(
12564            theBuilder,
12565            theContent.try_into()?,
12566        )?;
12567
12568        ::log::debug!("HTTP request: {:?}", &theRequest);
12569
12570        let theResponse = self.client.request(theRequest).await?;
12571
12572        ::log::debug!("HTTP response: {:?}", &theResponse);
12573
12574        Ok(theResponse)
12575    }
12576
12577    /// List discussion comments
12578    /// 
12579    /// List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
12580    /// 
12581    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.
12582    /// 
12583    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-discussion-comments)
12584    pub async fn teams_list_discussion_comments_in_org(
12585        &self,
12586        org: &str,
12587        team_slug: &str,
12588        discussion_number: i64,
12589        direction: ::std::option::Option<&str>,
12590        per_page: ::std::option::Option<i64>,
12591        page: ::std::option::Option<i64>,
12592    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
12593        let mut theScheme = AuthScheme::from(&self.config.authentication);
12594
12595        while let Some(auth_step) = theScheme.step()? {
12596            match auth_step {
12597                ::authentic::AuthenticationStep::Request(auth_request) => {
12598                    theScheme.respond(self.client.request(auth_request).await);
12599                }
12600                ::authentic::AuthenticationStep::WaitFor(duration) => {
12601                    (self.sleep)(duration).await;
12602                }
12603            }
12604        }
12605        let theBuilder = crate::v1_1_4::request::teams_list_discussion_comments_in_org::http_builder(
12606            self.config.base_url.as_ref(),
12607            org,
12608            team_slug,
12609            discussion_number,
12610            direction,
12611            per_page,
12612            page,
12613            self.config.user_agent.as_ref(),
12614            self.config.accept.as_deref(),
12615        )?
12616        .with_authentication(&theScheme)?;
12617
12618        let theRequest =
12619            crate::v1_1_4::request::teams_list_discussion_comments_in_org::hyper_request(theBuilder)?;
12620
12621        ::log::debug!("HTTP request: {:?}", &theRequest);
12622
12623        let theResponse = self.client.request(theRequest).await?;
12624
12625        ::log::debug!("HTTP response: {:?}", &theResponse);
12626
12627        Ok(theResponse)
12628    }
12629
12630    /// Create a discussion comment
12631    /// 
12632    /// Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
12633    /// 
12634    /// This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
12635    /// 
12636    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`.
12637    /// 
12638    /// [API method documentation](https://docs.github.com/rest/reference/teams#create-a-discussion-comment)
12639    ///
12640    /// # Content
12641    ///
12642    /// - [`&v1_1_4::request::teams_create_discussion_comment_in_org::body::Json`](crate::v1_1_4::request::teams_create_discussion_comment_in_org::body::Json)
12643    pub async fn teams_create_discussion_comment_in_org<Content>(
12644        &self,
12645        org: &str,
12646        team_slug: &str,
12647        discussion_number: i64,
12648        theContent: Content,
12649    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
12650    where
12651        Content: Copy + TryInto<crate::v1_1_4::request::teams_create_discussion_comment_in_org::Content<::hyper::Body>>,
12652        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_create_discussion_comment_in_org::Content<::hyper::Body>>>::Error>
12653    {
12654        let mut theScheme = AuthScheme::from(&self.config.authentication);
12655
12656        while let Some(auth_step) = theScheme.step()? {
12657            match auth_step {
12658                ::authentic::AuthenticationStep::Request(auth_request) => {
12659                    theScheme.respond(self.client.request(auth_request).await);
12660                }
12661                ::authentic::AuthenticationStep::WaitFor(duration) => {
12662                    (self.sleep)(duration).await;
12663                }
12664            }
12665        }
12666        let theBuilder = crate::v1_1_4::request::teams_create_discussion_comment_in_org::http_builder(
12667            self.config.base_url.as_ref(),
12668            org,
12669            team_slug,
12670            discussion_number,
12671            self.config.user_agent.as_ref(),
12672            self.config.accept.as_deref(),
12673        )?
12674        .with_authentication(&theScheme)?;
12675
12676        let theRequest = crate::v1_1_4::request::teams_create_discussion_comment_in_org::hyper_request(
12677            theBuilder,
12678            theContent.try_into()?,
12679        )?;
12680
12681        ::log::debug!("HTTP request: {:?}", &theRequest);
12682
12683        let theResponse = self.client.request(theRequest).await?;
12684
12685        ::log::debug!("HTTP response: {:?}", &theResponse);
12686
12687        Ok(theResponse)
12688    }
12689
12690    /// Get a discussion comment
12691    /// 
12692    /// Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
12693    /// 
12694    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.
12695    /// 
12696    /// [API method documentation](https://docs.github.com/rest/reference/teams#get-a-discussion-comment)
12697    pub async fn teams_get_discussion_comment_in_org(
12698        &self,
12699        org: &str,
12700        team_slug: &str,
12701        discussion_number: i64,
12702        comment_number: i64,
12703    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
12704        let mut theScheme = AuthScheme::from(&self.config.authentication);
12705
12706        while let Some(auth_step) = theScheme.step()? {
12707            match auth_step {
12708                ::authentic::AuthenticationStep::Request(auth_request) => {
12709                    theScheme.respond(self.client.request(auth_request).await);
12710                }
12711                ::authentic::AuthenticationStep::WaitFor(duration) => {
12712                    (self.sleep)(duration).await;
12713                }
12714            }
12715        }
12716        let theBuilder = crate::v1_1_4::request::teams_get_discussion_comment_in_org::http_builder(
12717            self.config.base_url.as_ref(),
12718            org,
12719            team_slug,
12720            discussion_number,
12721            comment_number,
12722            self.config.user_agent.as_ref(),
12723            self.config.accept.as_deref(),
12724        )?
12725        .with_authentication(&theScheme)?;
12726
12727        let theRequest =
12728            crate::v1_1_4::request::teams_get_discussion_comment_in_org::hyper_request(theBuilder)?;
12729
12730        ::log::debug!("HTTP request: {:?}", &theRequest);
12731
12732        let theResponse = self.client.request(theRequest).await?;
12733
12734        ::log::debug!("HTTP response: {:?}", &theResponse);
12735
12736        Ok(theResponse)
12737    }
12738
12739    /// Delete a discussion comment
12740    /// 
12741    /// Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
12742    /// 
12743    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.
12744    /// 
12745    /// [API method documentation](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment)
12746    pub async fn teams_delete_discussion_comment_in_org(
12747        &self,
12748        org: &str,
12749        team_slug: &str,
12750        discussion_number: i64,
12751        comment_number: i64,
12752    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
12753        let mut theScheme = AuthScheme::from(&self.config.authentication);
12754
12755        while let Some(auth_step) = theScheme.step()? {
12756            match auth_step {
12757                ::authentic::AuthenticationStep::Request(auth_request) => {
12758                    theScheme.respond(self.client.request(auth_request).await);
12759                }
12760                ::authentic::AuthenticationStep::WaitFor(duration) => {
12761                    (self.sleep)(duration).await;
12762                }
12763            }
12764        }
12765        let theBuilder = crate::v1_1_4::request::teams_delete_discussion_comment_in_org::http_builder(
12766            self.config.base_url.as_ref(),
12767            org,
12768            team_slug,
12769            discussion_number,
12770            comment_number,
12771            self.config.user_agent.as_ref(),
12772            self.config.accept.as_deref(),
12773        )?
12774        .with_authentication(&theScheme)?;
12775
12776        let theRequest =
12777            crate::v1_1_4::request::teams_delete_discussion_comment_in_org::hyper_request(theBuilder)?;
12778
12779        ::log::debug!("HTTP request: {:?}", &theRequest);
12780
12781        let theResponse = self.client.request(theRequest).await?;
12782
12783        ::log::debug!("HTTP response: {:?}", &theResponse);
12784
12785        Ok(theResponse)
12786    }
12787
12788    /// Update a discussion comment
12789    /// 
12790    /// Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
12791    /// 
12792    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`.
12793    /// 
12794    /// [API method documentation](https://docs.github.com/rest/reference/teams#update-a-discussion-comment)
12795    ///
12796    /// # Content
12797    ///
12798    /// - [`&v1_1_4::request::teams_update_discussion_comment_in_org::body::Json`](crate::v1_1_4::request::teams_update_discussion_comment_in_org::body::Json)
12799    pub async fn teams_update_discussion_comment_in_org<Content>(
12800        &self,
12801        org: &str,
12802        team_slug: &str,
12803        discussion_number: i64,
12804        comment_number: i64,
12805        theContent: Content,
12806    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
12807    where
12808        Content: Copy + TryInto<crate::v1_1_4::request::teams_update_discussion_comment_in_org::Content<::hyper::Body>>,
12809        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_update_discussion_comment_in_org::Content<::hyper::Body>>>::Error>
12810    {
12811        let mut theScheme = AuthScheme::from(&self.config.authentication);
12812
12813        while let Some(auth_step) = theScheme.step()? {
12814            match auth_step {
12815                ::authentic::AuthenticationStep::Request(auth_request) => {
12816                    theScheme.respond(self.client.request(auth_request).await);
12817                }
12818                ::authentic::AuthenticationStep::WaitFor(duration) => {
12819                    (self.sleep)(duration).await;
12820                }
12821            }
12822        }
12823        let theBuilder = crate::v1_1_4::request::teams_update_discussion_comment_in_org::http_builder(
12824            self.config.base_url.as_ref(),
12825            org,
12826            team_slug,
12827            discussion_number,
12828            comment_number,
12829            self.config.user_agent.as_ref(),
12830            self.config.accept.as_deref(),
12831        )?
12832        .with_authentication(&theScheme)?;
12833
12834        let theRequest = crate::v1_1_4::request::teams_update_discussion_comment_in_org::hyper_request(
12835            theBuilder,
12836            theContent.try_into()?,
12837        )?;
12838
12839        ::log::debug!("HTTP request: {:?}", &theRequest);
12840
12841        let theResponse = self.client.request(theRequest).await?;
12842
12843        ::log::debug!("HTTP response: {:?}", &theResponse);
12844
12845        Ok(theResponse)
12846    }
12847
12848    /// List reactions for a team discussion comment
12849    /// 
12850    /// List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
12851    /// 
12852    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.
12853    /// 
12854    /// [API method documentation](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment)
12855    #[allow(clippy::too_many_arguments)]
12856    pub async fn reactions_list_for_team_discussion_comment_in_org(
12857        &self,
12858        org: &str,
12859        team_slug: &str,
12860        discussion_number: i64,
12861        comment_number: i64,
12862        content: ::std::option::Option<&str>,
12863        per_page: ::std::option::Option<i64>,
12864        page: ::std::option::Option<i64>,
12865    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
12866        let mut theScheme = AuthScheme::from(&self.config.authentication);
12867
12868        while let Some(auth_step) = theScheme.step()? {
12869            match auth_step {
12870                ::authentic::AuthenticationStep::Request(auth_request) => {
12871                    theScheme.respond(self.client.request(auth_request).await);
12872                }
12873                ::authentic::AuthenticationStep::WaitFor(duration) => {
12874                    (self.sleep)(duration).await;
12875                }
12876            }
12877        }
12878        let theBuilder = crate::v1_1_4::request::reactions_list_for_team_discussion_comment_in_org::http_builder(
12879            self.config.base_url.as_ref(),
12880            org,
12881            team_slug,
12882            discussion_number,
12883            comment_number,
12884            content,
12885            per_page,
12886            page,
12887            self.config.user_agent.as_ref(),
12888            self.config.accept.as_deref(),
12889        )?
12890        .with_authentication(&theScheme)?;
12891
12892        let theRequest =
12893            crate::v1_1_4::request::reactions_list_for_team_discussion_comment_in_org::hyper_request(theBuilder)?;
12894
12895        ::log::debug!("HTTP request: {:?}", &theRequest);
12896
12897        let theResponse = self.client.request(theRequest).await?;
12898
12899        ::log::debug!("HTTP response: {:?}", &theResponse);
12900
12901        Ok(theResponse)
12902    }
12903
12904    /// Create reaction for a team discussion comment
12905    /// 
12906    /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.
12907    /// 
12908    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`.
12909    /// 
12910    /// [API method documentation](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)
12911    ///
12912    /// # Content
12913    ///
12914    /// - [`&v1_1_4::request::reactions_create_for_team_discussion_comment_in_org::body::Json`](crate::v1_1_4::request::reactions_create_for_team_discussion_comment_in_org::body::Json)
12915    pub async fn reactions_create_for_team_discussion_comment_in_org<Content>(
12916        &self,
12917        org: &str,
12918        team_slug: &str,
12919        discussion_number: i64,
12920        comment_number: i64,
12921        theContent: Content,
12922    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
12923    where
12924        Content: Copy + TryInto<crate::v1_1_4::request::reactions_create_for_team_discussion_comment_in_org::Content<::hyper::Body>>,
12925        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::reactions_create_for_team_discussion_comment_in_org::Content<::hyper::Body>>>::Error>
12926    {
12927        let mut theScheme = AuthScheme::from(&self.config.authentication);
12928
12929        while let Some(auth_step) = theScheme.step()? {
12930            match auth_step {
12931                ::authentic::AuthenticationStep::Request(auth_request) => {
12932                    theScheme.respond(self.client.request(auth_request).await);
12933                }
12934                ::authentic::AuthenticationStep::WaitFor(duration) => {
12935                    (self.sleep)(duration).await;
12936                }
12937            }
12938        }
12939        let theBuilder = crate::v1_1_4::request::reactions_create_for_team_discussion_comment_in_org::http_builder(
12940            self.config.base_url.as_ref(),
12941            org,
12942            team_slug,
12943            discussion_number,
12944            comment_number,
12945            self.config.user_agent.as_ref(),
12946            self.config.accept.as_deref(),
12947        )?
12948        .with_authentication(&theScheme)?;
12949
12950        let theRequest = crate::v1_1_4::request::reactions_create_for_team_discussion_comment_in_org::hyper_request(
12951            theBuilder,
12952            theContent.try_into()?,
12953        )?;
12954
12955        ::log::debug!("HTTP request: {:?}", &theRequest);
12956
12957        let theResponse = self.client.request(theRequest).await?;
12958
12959        ::log::debug!("HTTP response: {:?}", &theResponse);
12960
12961        Ok(theResponse)
12962    }
12963
12964    /// Delete team discussion comment reaction
12965    /// 
12966    /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`.
12967    /// 
12968    /// Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
12969    /// 
12970    /// [API method documentation](https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction)
12971    pub async fn reactions_delete_for_team_discussion_comment(
12972        &self,
12973        org: &str,
12974        team_slug: &str,
12975        discussion_number: i64,
12976        comment_number: i64,
12977        reaction_id: i64,
12978    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
12979        let mut theScheme = AuthScheme::from(&self.config.authentication);
12980
12981        while let Some(auth_step) = theScheme.step()? {
12982            match auth_step {
12983                ::authentic::AuthenticationStep::Request(auth_request) => {
12984                    theScheme.respond(self.client.request(auth_request).await);
12985                }
12986                ::authentic::AuthenticationStep::WaitFor(duration) => {
12987                    (self.sleep)(duration).await;
12988                }
12989            }
12990        }
12991        let theBuilder = crate::v1_1_4::request::reactions_delete_for_team_discussion_comment::http_builder(
12992            self.config.base_url.as_ref(),
12993            org,
12994            team_slug,
12995            discussion_number,
12996            comment_number,
12997            reaction_id,
12998            self.config.user_agent.as_ref(),
12999            self.config.accept.as_deref(),
13000        )?
13001        .with_authentication(&theScheme)?;
13002
13003        let theRequest =
13004            crate::v1_1_4::request::reactions_delete_for_team_discussion_comment::hyper_request(theBuilder)?;
13005
13006        ::log::debug!("HTTP request: {:?}", &theRequest);
13007
13008        let theResponse = self.client.request(theRequest).await?;
13009
13010        ::log::debug!("HTTP response: {:?}", &theResponse);
13011
13012        Ok(theResponse)
13013    }
13014
13015    /// List reactions for a team discussion
13016    /// 
13017    /// List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
13018    /// 
13019    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.
13020    /// 
13021    /// [API method documentation](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion)
13022    pub async fn reactions_list_for_team_discussion_in_org(
13023        &self,
13024        org: &str,
13025        team_slug: &str,
13026        discussion_number: i64,
13027        content: ::std::option::Option<&str>,
13028        per_page: ::std::option::Option<i64>,
13029        page: ::std::option::Option<i64>,
13030    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13031        let mut theScheme = AuthScheme::from(&self.config.authentication);
13032
13033        while let Some(auth_step) = theScheme.step()? {
13034            match auth_step {
13035                ::authentic::AuthenticationStep::Request(auth_request) => {
13036                    theScheme.respond(self.client.request(auth_request).await);
13037                }
13038                ::authentic::AuthenticationStep::WaitFor(duration) => {
13039                    (self.sleep)(duration).await;
13040                }
13041            }
13042        }
13043        let theBuilder = crate::v1_1_4::request::reactions_list_for_team_discussion_in_org::http_builder(
13044            self.config.base_url.as_ref(),
13045            org,
13046            team_slug,
13047            discussion_number,
13048            content,
13049            per_page,
13050            page,
13051            self.config.user_agent.as_ref(),
13052            self.config.accept.as_deref(),
13053        )?
13054        .with_authentication(&theScheme)?;
13055
13056        let theRequest =
13057            crate::v1_1_4::request::reactions_list_for_team_discussion_in_org::hyper_request(theBuilder)?;
13058
13059        ::log::debug!("HTTP request: {:?}", &theRequest);
13060
13061        let theResponse = self.client.request(theRequest).await?;
13062
13063        ::log::debug!("HTTP response: {:?}", &theResponse);
13064
13065        Ok(theResponse)
13066    }
13067
13068    /// Create reaction for a team discussion
13069    /// 
13070    /// Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion.
13071    /// 
13072    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`.
13073    /// 
13074    /// [API method documentation](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion)
13075    ///
13076    /// # Content
13077    ///
13078    /// - [`&v1_1_4::request::reactions_create_for_team_discussion_in_org::body::Json`](crate::v1_1_4::request::reactions_create_for_team_discussion_in_org::body::Json)
13079    pub async fn reactions_create_for_team_discussion_in_org<Content>(
13080        &self,
13081        org: &str,
13082        team_slug: &str,
13083        discussion_number: i64,
13084        theContent: Content,
13085    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
13086    where
13087        Content: Copy + TryInto<crate::v1_1_4::request::reactions_create_for_team_discussion_in_org::Content<::hyper::Body>>,
13088        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::reactions_create_for_team_discussion_in_org::Content<::hyper::Body>>>::Error>
13089    {
13090        let mut theScheme = AuthScheme::from(&self.config.authentication);
13091
13092        while let Some(auth_step) = theScheme.step()? {
13093            match auth_step {
13094                ::authentic::AuthenticationStep::Request(auth_request) => {
13095                    theScheme.respond(self.client.request(auth_request).await);
13096                }
13097                ::authentic::AuthenticationStep::WaitFor(duration) => {
13098                    (self.sleep)(duration).await;
13099                }
13100            }
13101        }
13102        let theBuilder = crate::v1_1_4::request::reactions_create_for_team_discussion_in_org::http_builder(
13103            self.config.base_url.as_ref(),
13104            org,
13105            team_slug,
13106            discussion_number,
13107            self.config.user_agent.as_ref(),
13108            self.config.accept.as_deref(),
13109        )?
13110        .with_authentication(&theScheme)?;
13111
13112        let theRequest = crate::v1_1_4::request::reactions_create_for_team_discussion_in_org::hyper_request(
13113            theBuilder,
13114            theContent.try_into()?,
13115        )?;
13116
13117        ::log::debug!("HTTP request: {:?}", &theRequest);
13118
13119        let theResponse = self.client.request(theRequest).await?;
13120
13121        ::log::debug!("HTTP response: {:?}", &theResponse);
13122
13123        Ok(theResponse)
13124    }
13125
13126    /// Delete team discussion reaction
13127    /// 
13128    /// **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`.
13129    /// 
13130    /// Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
13131    /// 
13132    /// [API method documentation](https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction)
13133    pub async fn reactions_delete_for_team_discussion(
13134        &self,
13135        org: &str,
13136        team_slug: &str,
13137        discussion_number: i64,
13138        reaction_id: i64,
13139    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13140        let mut theScheme = AuthScheme::from(&self.config.authentication);
13141
13142        while let Some(auth_step) = theScheme.step()? {
13143            match auth_step {
13144                ::authentic::AuthenticationStep::Request(auth_request) => {
13145                    theScheme.respond(self.client.request(auth_request).await);
13146                }
13147                ::authentic::AuthenticationStep::WaitFor(duration) => {
13148                    (self.sleep)(duration).await;
13149                }
13150            }
13151        }
13152        let theBuilder = crate::v1_1_4::request::reactions_delete_for_team_discussion::http_builder(
13153            self.config.base_url.as_ref(),
13154            org,
13155            team_slug,
13156            discussion_number,
13157            reaction_id,
13158            self.config.user_agent.as_ref(),
13159            self.config.accept.as_deref(),
13160        )?
13161        .with_authentication(&theScheme)?;
13162
13163        let theRequest =
13164            crate::v1_1_4::request::reactions_delete_for_team_discussion::hyper_request(theBuilder)?;
13165
13166        ::log::debug!("HTTP request: {:?}", &theRequest);
13167
13168        let theResponse = self.client.request(theRequest).await?;
13169
13170        ::log::debug!("HTTP response: {:?}", &theResponse);
13171
13172        Ok(theResponse)
13173    }
13174
13175    /// List a connection between an external group and a team
13176    /// 
13177    /// Lists a connection between a team and an external group.
13178    /// 
13179    /// You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation.
13180    /// 
13181    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-external-idp-group-team-connection)
13182    pub async fn teams_list_linked_external_idp_groups_to_team_for_org(
13183        &self,
13184        org: &str,
13185        team_slug: &str,
13186    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13187        let mut theScheme = AuthScheme::from(&self.config.authentication);
13188
13189        while let Some(auth_step) = theScheme.step()? {
13190            match auth_step {
13191                ::authentic::AuthenticationStep::Request(auth_request) => {
13192                    theScheme.respond(self.client.request(auth_request).await);
13193                }
13194                ::authentic::AuthenticationStep::WaitFor(duration) => {
13195                    (self.sleep)(duration).await;
13196                }
13197            }
13198        }
13199        let theBuilder = crate::v1_1_4::request::teams_list_linked_external_idp_groups_to_team_for_org::http_builder(
13200            self.config.base_url.as_ref(),
13201            org,
13202            team_slug,
13203            self.config.user_agent.as_ref(),
13204            self.config.accept.as_deref(),
13205        )?
13206        .with_authentication(&theScheme)?;
13207
13208        let theRequest =
13209            crate::v1_1_4::request::teams_list_linked_external_idp_groups_to_team_for_org::hyper_request(theBuilder)?;
13210
13211        ::log::debug!("HTTP request: {:?}", &theRequest);
13212
13213        let theResponse = self.client.request(theRequest).await?;
13214
13215        ::log::debug!("HTTP response: {:?}", &theResponse);
13216
13217        Ok(theResponse)
13218    }
13219
13220    /// Remove the connection between an external group and a team
13221    /// 
13222    /// Deletes a connection between a team and an external group.
13223    /// 
13224    /// You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
13225    /// 
13226    /// [API method documentation](https://docs.github.com/rest/reference/teams#unlink-external-idp-group-team-connection)
13227    pub async fn teams_unlink_external_idp_group_from_team_for_org(
13228        &self,
13229        org: &str,
13230        team_slug: &str,
13231    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13232        let mut theScheme = AuthScheme::from(&self.config.authentication);
13233
13234        while let Some(auth_step) = theScheme.step()? {
13235            match auth_step {
13236                ::authentic::AuthenticationStep::Request(auth_request) => {
13237                    theScheme.respond(self.client.request(auth_request).await);
13238                }
13239                ::authentic::AuthenticationStep::WaitFor(duration) => {
13240                    (self.sleep)(duration).await;
13241                }
13242            }
13243        }
13244        let theBuilder = crate::v1_1_4::request::teams_unlink_external_idp_group_from_team_for_org::http_builder(
13245            self.config.base_url.as_ref(),
13246            org,
13247            team_slug,
13248            self.config.user_agent.as_ref(),
13249            self.config.accept.as_deref(),
13250        )?
13251        .with_authentication(&theScheme)?;
13252
13253        let theRequest =
13254            crate::v1_1_4::request::teams_unlink_external_idp_group_from_team_for_org::hyper_request(theBuilder)?;
13255
13256        ::log::debug!("HTTP request: {:?}", &theRequest);
13257
13258        let theResponse = self.client.request(theRequest).await?;
13259
13260        ::log::debug!("HTTP response: {:?}", &theResponse);
13261
13262        Ok(theResponse)
13263    }
13264
13265    /// Update the connection between an external group and a team
13266    /// 
13267    /// Creates a connection between a team and an external group.  Only one external group can be linked to a team.
13268    /// 
13269    /// You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation.
13270    /// 
13271    /// [API method documentation](https://docs.github.com/rest/reference/teams#link-external-idp-group-team-connection)
13272    ///
13273    /// # Content
13274    ///
13275    /// - [`&v1_1_4::request::teams_link_external_idp_group_to_team_for_org::body::Json`](crate::v1_1_4::request::teams_link_external_idp_group_to_team_for_org::body::Json)
13276    pub async fn teams_link_external_idp_group_to_team_for_org<Content>(
13277        &self,
13278        org: &str,
13279        team_slug: &str,
13280        theContent: Content,
13281    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
13282    where
13283        Content: Copy + TryInto<crate::v1_1_4::request::teams_link_external_idp_group_to_team_for_org::Content<::hyper::Body>>,
13284        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_link_external_idp_group_to_team_for_org::Content<::hyper::Body>>>::Error>
13285    {
13286        let mut theScheme = AuthScheme::from(&self.config.authentication);
13287
13288        while let Some(auth_step) = theScheme.step()? {
13289            match auth_step {
13290                ::authentic::AuthenticationStep::Request(auth_request) => {
13291                    theScheme.respond(self.client.request(auth_request).await);
13292                }
13293                ::authentic::AuthenticationStep::WaitFor(duration) => {
13294                    (self.sleep)(duration).await;
13295                }
13296            }
13297        }
13298        let theBuilder = crate::v1_1_4::request::teams_link_external_idp_group_to_team_for_org::http_builder(
13299            self.config.base_url.as_ref(),
13300            org,
13301            team_slug,
13302            self.config.user_agent.as_ref(),
13303            self.config.accept.as_deref(),
13304        )?
13305        .with_authentication(&theScheme)?;
13306
13307        let theRequest = crate::v1_1_4::request::teams_link_external_idp_group_to_team_for_org::hyper_request(
13308            theBuilder,
13309            theContent.try_into()?,
13310        )?;
13311
13312        ::log::debug!("HTTP request: {:?}", &theRequest);
13313
13314        let theResponse = self.client.request(theRequest).await?;
13315
13316        ::log::debug!("HTTP response: {:?}", &theResponse);
13317
13318        Ok(theResponse)
13319    }
13320
13321    /// List pending team invitations
13322    /// 
13323    /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.
13324    /// 
13325    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`.
13326    /// 
13327    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-pending-team-invitations)
13328    pub async fn teams_list_pending_invitations_in_org(
13329        &self,
13330        org: &str,
13331        team_slug: &str,
13332        per_page: ::std::option::Option<i64>,
13333        page: ::std::option::Option<i64>,
13334    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13335        let mut theScheme = AuthScheme::from(&self.config.authentication);
13336
13337        while let Some(auth_step) = theScheme.step()? {
13338            match auth_step {
13339                ::authentic::AuthenticationStep::Request(auth_request) => {
13340                    theScheme.respond(self.client.request(auth_request).await);
13341                }
13342                ::authentic::AuthenticationStep::WaitFor(duration) => {
13343                    (self.sleep)(duration).await;
13344                }
13345            }
13346        }
13347        let theBuilder = crate::v1_1_4::request::teams_list_pending_invitations_in_org::http_builder(
13348            self.config.base_url.as_ref(),
13349            org,
13350            team_slug,
13351            per_page,
13352            page,
13353            self.config.user_agent.as_ref(),
13354            self.config.accept.as_deref(),
13355        )?
13356        .with_authentication(&theScheme)?;
13357
13358        let theRequest =
13359            crate::v1_1_4::request::teams_list_pending_invitations_in_org::hyper_request(theBuilder)?;
13360
13361        ::log::debug!("HTTP request: {:?}", &theRequest);
13362
13363        let theResponse = self.client.request(theRequest).await?;
13364
13365        ::log::debug!("HTTP response: {:?}", &theResponse);
13366
13367        Ok(theResponse)
13368    }
13369
13370    /// List team members
13371    /// 
13372    /// Team members will include the members of child teams.
13373    /// 
13374    /// To list members in a team, the team must be visible to the authenticated user.
13375    /// 
13376    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-team-members)
13377    pub async fn teams_list_members_in_org(
13378        &self,
13379        org: &str,
13380        team_slug: &str,
13381        role: ::std::option::Option<&str>,
13382        per_page: ::std::option::Option<i64>,
13383        page: ::std::option::Option<i64>,
13384    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13385        let mut theScheme = AuthScheme::from(&self.config.authentication);
13386
13387        while let Some(auth_step) = theScheme.step()? {
13388            match auth_step {
13389                ::authentic::AuthenticationStep::Request(auth_request) => {
13390                    theScheme.respond(self.client.request(auth_request).await);
13391                }
13392                ::authentic::AuthenticationStep::WaitFor(duration) => {
13393                    (self.sleep)(duration).await;
13394                }
13395            }
13396        }
13397        let theBuilder = crate::v1_1_4::request::teams_list_members_in_org::http_builder(
13398            self.config.base_url.as_ref(),
13399            org,
13400            team_slug,
13401            role,
13402            per_page,
13403            page,
13404            self.config.user_agent.as_ref(),
13405            self.config.accept.as_deref(),
13406        )?
13407        .with_authentication(&theScheme)?;
13408
13409        let theRequest =
13410            crate::v1_1_4::request::teams_list_members_in_org::hyper_request(theBuilder)?;
13411
13412        ::log::debug!("HTTP request: {:?}", &theRequest);
13413
13414        let theResponse = self.client.request(theRequest).await?;
13415
13416        ::log::debug!("HTTP response: {:?}", &theResponse);
13417
13418        Ok(theResponse)
13419    }
13420
13421    /// Get team membership for a user
13422    /// 
13423    /// Team members will include the members of child teams.
13424    /// 
13425    /// To get a user's membership with a team, the team must be visible to the authenticated user.
13426    /// 
13427    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`.
13428    /// 
13429    /// **Note:**
13430    /// The response contains the `state` of the membership and the member's `role`.
13431    /// 
13432    /// The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team).
13433    /// 
13434    /// [API method documentation](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user)
13435    pub async fn teams_get_membership_for_user_in_org(
13436        &self,
13437        org: &str,
13438        team_slug: &str,
13439        username: &str,
13440    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13441        let mut theScheme = AuthScheme::from(&self.config.authentication);
13442
13443        while let Some(auth_step) = theScheme.step()? {
13444            match auth_step {
13445                ::authentic::AuthenticationStep::Request(auth_request) => {
13446                    theScheme.respond(self.client.request(auth_request).await);
13447                }
13448                ::authentic::AuthenticationStep::WaitFor(duration) => {
13449                    (self.sleep)(duration).await;
13450                }
13451            }
13452        }
13453        let theBuilder = crate::v1_1_4::request::teams_get_membership_for_user_in_org::http_builder(
13454            self.config.base_url.as_ref(),
13455            org,
13456            team_slug,
13457            username,
13458            self.config.user_agent.as_ref(),
13459            self.config.accept.as_deref(),
13460        )?
13461        .with_authentication(&theScheme)?;
13462
13463        let theRequest =
13464            crate::v1_1_4::request::teams_get_membership_for_user_in_org::hyper_request(theBuilder)?;
13465
13466        ::log::debug!("HTTP request: {:?}", &theRequest);
13467
13468        let theResponse = self.client.request(theRequest).await?;
13469
13470        ::log::debug!("HTTP response: {:?}", &theResponse);
13471
13472        Ok(theResponse)
13473    }
13474
13475    /// Add or update team membership for a user
13476    /// 
13477    /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
13478    /// 
13479    /// Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team.
13480    /// 
13481    /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
13482    /// 
13483    /// An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team.
13484    /// 
13485    /// If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.
13486    /// 
13487    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`.
13488    /// 
13489    /// [API method documentation](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user)
13490    ///
13491    /// # Content
13492    ///
13493    /// - [`&v1_1_4::request::teams_add_or_update_membership_for_user_in_org::body::Json`](crate::v1_1_4::request::teams_add_or_update_membership_for_user_in_org::body::Json)
13494    pub async fn teams_add_or_update_membership_for_user_in_org<Content>(
13495        &self,
13496        org: &str,
13497        team_slug: &str,
13498        username: &str,
13499        theContent: Content,
13500    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
13501    where
13502        Content: Copy + TryInto<crate::v1_1_4::request::teams_add_or_update_membership_for_user_in_org::Content<::hyper::Body>>,
13503        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_add_or_update_membership_for_user_in_org::Content<::hyper::Body>>>::Error>
13504    {
13505        let mut theScheme = AuthScheme::from(&self.config.authentication);
13506
13507        while let Some(auth_step) = theScheme.step()? {
13508            match auth_step {
13509                ::authentic::AuthenticationStep::Request(auth_request) => {
13510                    theScheme.respond(self.client.request(auth_request).await);
13511                }
13512                ::authentic::AuthenticationStep::WaitFor(duration) => {
13513                    (self.sleep)(duration).await;
13514                }
13515            }
13516        }
13517        let theBuilder = crate::v1_1_4::request::teams_add_or_update_membership_for_user_in_org::http_builder(
13518            self.config.base_url.as_ref(),
13519            org,
13520            team_slug,
13521            username,
13522            self.config.user_agent.as_ref(),
13523            self.config.accept.as_deref(),
13524        )?
13525        .with_authentication(&theScheme)?;
13526
13527        let theRequest = crate::v1_1_4::request::teams_add_or_update_membership_for_user_in_org::hyper_request(
13528            theBuilder,
13529            theContent.try_into()?,
13530        )?;
13531
13532        ::log::debug!("HTTP request: {:?}", &theRequest);
13533
13534        let theResponse = self.client.request(theRequest).await?;
13535
13536        ::log::debug!("HTTP response: {:?}", &theResponse);
13537
13538        Ok(theResponse)
13539    }
13540
13541    /// Remove team membership for a user
13542    /// 
13543    /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
13544    /// 
13545    /// To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.
13546    /// 
13547    /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
13548    /// 
13549    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`.
13550    /// 
13551    /// [API method documentation](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user)
13552    pub async fn teams_remove_membership_for_user_in_org(
13553        &self,
13554        org: &str,
13555        team_slug: &str,
13556        username: &str,
13557    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13558        let mut theScheme = AuthScheme::from(&self.config.authentication);
13559
13560        while let Some(auth_step) = theScheme.step()? {
13561            match auth_step {
13562                ::authentic::AuthenticationStep::Request(auth_request) => {
13563                    theScheme.respond(self.client.request(auth_request).await);
13564                }
13565                ::authentic::AuthenticationStep::WaitFor(duration) => {
13566                    (self.sleep)(duration).await;
13567                }
13568            }
13569        }
13570        let theBuilder = crate::v1_1_4::request::teams_remove_membership_for_user_in_org::http_builder(
13571            self.config.base_url.as_ref(),
13572            org,
13573            team_slug,
13574            username,
13575            self.config.user_agent.as_ref(),
13576            self.config.accept.as_deref(),
13577        )?
13578        .with_authentication(&theScheme)?;
13579
13580        let theRequest =
13581            crate::v1_1_4::request::teams_remove_membership_for_user_in_org::hyper_request(theBuilder)?;
13582
13583        ::log::debug!("HTTP request: {:?}", &theRequest);
13584
13585        let theResponse = self.client.request(theRequest).await?;
13586
13587        ::log::debug!("HTTP response: {:?}", &theResponse);
13588
13589        Ok(theResponse)
13590    }
13591
13592    /// List team projects
13593    /// 
13594    /// Lists the organization projects for a team.
13595    /// 
13596    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`.
13597    /// 
13598    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-team-projects)
13599    pub async fn teams_list_projects_in_org(
13600        &self,
13601        org: &str,
13602        team_slug: &str,
13603        per_page: ::std::option::Option<i64>,
13604        page: ::std::option::Option<i64>,
13605    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13606        let mut theScheme = AuthScheme::from(&self.config.authentication);
13607
13608        while let Some(auth_step) = theScheme.step()? {
13609            match auth_step {
13610                ::authentic::AuthenticationStep::Request(auth_request) => {
13611                    theScheme.respond(self.client.request(auth_request).await);
13612                }
13613                ::authentic::AuthenticationStep::WaitFor(duration) => {
13614                    (self.sleep)(duration).await;
13615                }
13616            }
13617        }
13618        let theBuilder = crate::v1_1_4::request::teams_list_projects_in_org::http_builder(
13619            self.config.base_url.as_ref(),
13620            org,
13621            team_slug,
13622            per_page,
13623            page,
13624            self.config.user_agent.as_ref(),
13625            self.config.accept.as_deref(),
13626        )?
13627        .with_authentication(&theScheme)?;
13628
13629        let theRequest =
13630            crate::v1_1_4::request::teams_list_projects_in_org::hyper_request(theBuilder)?;
13631
13632        ::log::debug!("HTTP request: {:?}", &theRequest);
13633
13634        let theResponse = self.client.request(theRequest).await?;
13635
13636        ::log::debug!("HTTP response: {:?}", &theResponse);
13637
13638        Ok(theResponse)
13639    }
13640
13641    /// Check team permissions for a project
13642    /// 
13643    /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.
13644    /// 
13645    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`.
13646    /// 
13647    /// [API method documentation](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project)
13648    pub async fn teams_check_permissions_for_project_in_org(
13649        &self,
13650        org: &str,
13651        team_slug: &str,
13652        project_id: i64,
13653    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13654        let mut theScheme = AuthScheme::from(&self.config.authentication);
13655
13656        while let Some(auth_step) = theScheme.step()? {
13657            match auth_step {
13658                ::authentic::AuthenticationStep::Request(auth_request) => {
13659                    theScheme.respond(self.client.request(auth_request).await);
13660                }
13661                ::authentic::AuthenticationStep::WaitFor(duration) => {
13662                    (self.sleep)(duration).await;
13663                }
13664            }
13665        }
13666        let theBuilder = crate::v1_1_4::request::teams_check_permissions_for_project_in_org::http_builder(
13667            self.config.base_url.as_ref(),
13668            org,
13669            team_slug,
13670            project_id,
13671            self.config.user_agent.as_ref(),
13672            self.config.accept.as_deref(),
13673        )?
13674        .with_authentication(&theScheme)?;
13675
13676        let theRequest =
13677            crate::v1_1_4::request::teams_check_permissions_for_project_in_org::hyper_request(theBuilder)?;
13678
13679        ::log::debug!("HTTP request: {:?}", &theRequest);
13680
13681        let theResponse = self.client.request(theRequest).await?;
13682
13683        ::log::debug!("HTTP response: {:?}", &theResponse);
13684
13685        Ok(theResponse)
13686    }
13687
13688    /// Add or update team project permissions
13689    /// 
13690    /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.
13691    /// 
13692    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`.
13693    /// 
13694    /// [API method documentation](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions)
13695    ///
13696    /// # Content
13697    ///
13698    /// - [`&::std::option::Option<crate::v1_1_4::request::teams_add_or_update_project_permissions_in_org::body::Json>`](crate::v1_1_4::request::teams_add_or_update_project_permissions_in_org::body::Json)
13699    pub async fn teams_add_or_update_project_permissions_in_org<Content>(
13700        &self,
13701        org: &str,
13702        team_slug: &str,
13703        project_id: i64,
13704        theContent: Content,
13705    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
13706    where
13707        Content: Copy + TryInto<crate::v1_1_4::request::teams_add_or_update_project_permissions_in_org::Content<::hyper::Body>>,
13708        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_add_or_update_project_permissions_in_org::Content<::hyper::Body>>>::Error>
13709    {
13710        let mut theScheme = AuthScheme::from(&self.config.authentication);
13711
13712        while let Some(auth_step) = theScheme.step()? {
13713            match auth_step {
13714                ::authentic::AuthenticationStep::Request(auth_request) => {
13715                    theScheme.respond(self.client.request(auth_request).await);
13716                }
13717                ::authentic::AuthenticationStep::WaitFor(duration) => {
13718                    (self.sleep)(duration).await;
13719                }
13720            }
13721        }
13722        let theBuilder = crate::v1_1_4::request::teams_add_or_update_project_permissions_in_org::http_builder(
13723            self.config.base_url.as_ref(),
13724            org,
13725            team_slug,
13726            project_id,
13727            self.config.user_agent.as_ref(),
13728            self.config.accept.as_deref(),
13729        )?
13730        .with_authentication(&theScheme)?;
13731
13732        let theRequest = crate::v1_1_4::request::teams_add_or_update_project_permissions_in_org::hyper_request(
13733            theBuilder,
13734            theContent.try_into()?,
13735        )?;
13736
13737        ::log::debug!("HTTP request: {:?}", &theRequest);
13738
13739        let theResponse = self.client.request(theRequest).await?;
13740
13741        ::log::debug!("HTTP response: {:?}", &theResponse);
13742
13743        Ok(theResponse)
13744    }
13745
13746    /// Remove a project from a team
13747    /// 
13748    /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project.
13749    /// 
13750    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`.
13751    /// 
13752    /// [API method documentation](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team)
13753    pub async fn teams_remove_project_in_org(
13754        &self,
13755        org: &str,
13756        team_slug: &str,
13757        project_id: i64,
13758    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13759        let mut theScheme = AuthScheme::from(&self.config.authentication);
13760
13761        while let Some(auth_step) = theScheme.step()? {
13762            match auth_step {
13763                ::authentic::AuthenticationStep::Request(auth_request) => {
13764                    theScheme.respond(self.client.request(auth_request).await);
13765                }
13766                ::authentic::AuthenticationStep::WaitFor(duration) => {
13767                    (self.sleep)(duration).await;
13768                }
13769            }
13770        }
13771        let theBuilder = crate::v1_1_4::request::teams_remove_project_in_org::http_builder(
13772            self.config.base_url.as_ref(),
13773            org,
13774            team_slug,
13775            project_id,
13776            self.config.user_agent.as_ref(),
13777            self.config.accept.as_deref(),
13778        )?
13779        .with_authentication(&theScheme)?;
13780
13781        let theRequest =
13782            crate::v1_1_4::request::teams_remove_project_in_org::hyper_request(theBuilder)?;
13783
13784        ::log::debug!("HTTP request: {:?}", &theRequest);
13785
13786        let theResponse = self.client.request(theRequest).await?;
13787
13788        ::log::debug!("HTTP response: {:?}", &theResponse);
13789
13790        Ok(theResponse)
13791    }
13792
13793    /// List team repositories
13794    /// 
13795    /// Lists a team's repositories visible to the authenticated user.
13796    /// 
13797    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`.
13798    /// 
13799    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-team-repositories)
13800    pub async fn teams_list_repos_in_org(
13801        &self,
13802        org: &str,
13803        team_slug: &str,
13804        per_page: ::std::option::Option<i64>,
13805        page: ::std::option::Option<i64>,
13806    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13807        let mut theScheme = AuthScheme::from(&self.config.authentication);
13808
13809        while let Some(auth_step) = theScheme.step()? {
13810            match auth_step {
13811                ::authentic::AuthenticationStep::Request(auth_request) => {
13812                    theScheme.respond(self.client.request(auth_request).await);
13813                }
13814                ::authentic::AuthenticationStep::WaitFor(duration) => {
13815                    (self.sleep)(duration).await;
13816                }
13817            }
13818        }
13819        let theBuilder = crate::v1_1_4::request::teams_list_repos_in_org::http_builder(
13820            self.config.base_url.as_ref(),
13821            org,
13822            team_slug,
13823            per_page,
13824            page,
13825            self.config.user_agent.as_ref(),
13826            self.config.accept.as_deref(),
13827        )?
13828        .with_authentication(&theScheme)?;
13829
13830        let theRequest =
13831            crate::v1_1_4::request::teams_list_repos_in_org::hyper_request(theBuilder)?;
13832
13833        ::log::debug!("HTTP request: {:?}", &theRequest);
13834
13835        let theResponse = self.client.request(theRequest).await?;
13836
13837        ::log::debug!("HTTP response: {:?}", &theResponse);
13838
13839        Ok(theResponse)
13840    }
13841
13842    /// Check team permissions for a repository
13843    /// 
13844    /// Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.
13845    /// 
13846    /// You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header.
13847    /// 
13848    /// If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.
13849    /// 
13850    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.
13851    /// 
13852    /// [API method documentation](https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository)
13853    pub async fn teams_check_permissions_for_repo_in_org(
13854        &self,
13855        org: &str,
13856        team_slug: &str,
13857        owner: &str,
13858        repo: &str,
13859    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13860        let mut theScheme = AuthScheme::from(&self.config.authentication);
13861
13862        while let Some(auth_step) = theScheme.step()? {
13863            match auth_step {
13864                ::authentic::AuthenticationStep::Request(auth_request) => {
13865                    theScheme.respond(self.client.request(auth_request).await);
13866                }
13867                ::authentic::AuthenticationStep::WaitFor(duration) => {
13868                    (self.sleep)(duration).await;
13869                }
13870            }
13871        }
13872        let theBuilder = crate::v1_1_4::request::teams_check_permissions_for_repo_in_org::http_builder(
13873            self.config.base_url.as_ref(),
13874            org,
13875            team_slug,
13876            owner,
13877            repo,
13878            self.config.user_agent.as_ref(),
13879            self.config.accept.as_deref(),
13880        )?
13881        .with_authentication(&theScheme)?;
13882
13883        let theRequest =
13884            crate::v1_1_4::request::teams_check_permissions_for_repo_in_org::hyper_request(theBuilder)?;
13885
13886        ::log::debug!("HTTP request: {:?}", &theRequest);
13887
13888        let theResponse = self.client.request(theRequest).await?;
13889
13890        ::log::debug!("HTTP response: {:?}", &theResponse);
13891
13892        Ok(theResponse)
13893    }
13894
13895    /// Add or update team repository permissions
13896    /// 
13897    /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
13898    /// 
13899    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.
13900    /// 
13901    /// For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)".
13902    /// 
13903    /// [API method documentation](https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions)
13904    ///
13905    /// # Content
13906    ///
13907    /// - [`&v1_1_4::request::teams_add_or_update_repo_permissions_in_org::body::Json`](crate::v1_1_4::request::teams_add_or_update_repo_permissions_in_org::body::Json)
13908    pub async fn teams_add_or_update_repo_permissions_in_org<Content>(
13909        &self,
13910        org: &str,
13911        team_slug: &str,
13912        owner: &str,
13913        repo: &str,
13914        theContent: Content,
13915    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
13916    where
13917        Content: Copy + TryInto<crate::v1_1_4::request::teams_add_or_update_repo_permissions_in_org::Content<::hyper::Body>>,
13918        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_add_or_update_repo_permissions_in_org::Content<::hyper::Body>>>::Error>
13919    {
13920        let mut theScheme = AuthScheme::from(&self.config.authentication);
13921
13922        while let Some(auth_step) = theScheme.step()? {
13923            match auth_step {
13924                ::authentic::AuthenticationStep::Request(auth_request) => {
13925                    theScheme.respond(self.client.request(auth_request).await);
13926                }
13927                ::authentic::AuthenticationStep::WaitFor(duration) => {
13928                    (self.sleep)(duration).await;
13929                }
13930            }
13931        }
13932        let theBuilder = crate::v1_1_4::request::teams_add_or_update_repo_permissions_in_org::http_builder(
13933            self.config.base_url.as_ref(),
13934            org,
13935            team_slug,
13936            owner,
13937            repo,
13938            self.config.user_agent.as_ref(),
13939            self.config.accept.as_deref(),
13940        )?
13941        .with_authentication(&theScheme)?;
13942
13943        let theRequest = crate::v1_1_4::request::teams_add_or_update_repo_permissions_in_org::hyper_request(
13944            theBuilder,
13945            theContent.try_into()?,
13946        )?;
13947
13948        ::log::debug!("HTTP request: {:?}", &theRequest);
13949
13950        let theResponse = self.client.request(theRequest).await?;
13951
13952        ::log::debug!("HTTP response: {:?}", &theResponse);
13953
13954        Ok(theResponse)
13955    }
13956
13957    /// Remove a repository from a team
13958    /// 
13959    /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team.
13960    /// 
13961    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.
13962    /// 
13963    /// [API method documentation](https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team)
13964    pub async fn teams_remove_repo_in_org(
13965        &self,
13966        org: &str,
13967        team_slug: &str,
13968        owner: &str,
13969        repo: &str,
13970    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
13971        let mut theScheme = AuthScheme::from(&self.config.authentication);
13972
13973        while let Some(auth_step) = theScheme.step()? {
13974            match auth_step {
13975                ::authentic::AuthenticationStep::Request(auth_request) => {
13976                    theScheme.respond(self.client.request(auth_request).await);
13977                }
13978                ::authentic::AuthenticationStep::WaitFor(duration) => {
13979                    (self.sleep)(duration).await;
13980                }
13981            }
13982        }
13983        let theBuilder = crate::v1_1_4::request::teams_remove_repo_in_org::http_builder(
13984            self.config.base_url.as_ref(),
13985            org,
13986            team_slug,
13987            owner,
13988            repo,
13989            self.config.user_agent.as_ref(),
13990            self.config.accept.as_deref(),
13991        )?
13992        .with_authentication(&theScheme)?;
13993
13994        let theRequest =
13995            crate::v1_1_4::request::teams_remove_repo_in_org::hyper_request(theBuilder)?;
13996
13997        ::log::debug!("HTTP request: {:?}", &theRequest);
13998
13999        let theResponse = self.client.request(theRequest).await?;
14000
14001        ::log::debug!("HTTP response: {:?}", &theResponse);
14002
14003        Ok(theResponse)
14004    }
14005
14006    /// List IdP groups for a team
14007    /// 
14008    /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
14009    /// 
14010    /// List IdP groups connected to a team on GitHub.
14011    /// 
14012    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`.
14013    /// 
14014    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team)
14015    pub async fn teams_list_idp_groups_in_org(
14016        &self,
14017        org: &str,
14018        team_slug: &str,
14019    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
14020        let mut theScheme = AuthScheme::from(&self.config.authentication);
14021
14022        while let Some(auth_step) = theScheme.step()? {
14023            match auth_step {
14024                ::authentic::AuthenticationStep::Request(auth_request) => {
14025                    theScheme.respond(self.client.request(auth_request).await);
14026                }
14027                ::authentic::AuthenticationStep::WaitFor(duration) => {
14028                    (self.sleep)(duration).await;
14029                }
14030            }
14031        }
14032        let theBuilder = crate::v1_1_4::request::teams_list_idp_groups_in_org::http_builder(
14033            self.config.base_url.as_ref(),
14034            org,
14035            team_slug,
14036            self.config.user_agent.as_ref(),
14037            self.config.accept.as_deref(),
14038        )?
14039        .with_authentication(&theScheme)?;
14040
14041        let theRequest =
14042            crate::v1_1_4::request::teams_list_idp_groups_in_org::hyper_request(theBuilder)?;
14043
14044        ::log::debug!("HTTP request: {:?}", &theRequest);
14045
14046        let theResponse = self.client.request(theRequest).await?;
14047
14048        ::log::debug!("HTTP response: {:?}", &theResponse);
14049
14050        Ok(theResponse)
14051    }
14052
14053    /// Create or update IdP group connections
14054    /// 
14055    /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
14056    /// 
14057    /// Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team.
14058    /// 
14059    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`.
14060    /// 
14061    /// [API method documentation](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections)
14062    ///
14063    /// # Content
14064    ///
14065    /// - [`&v1_1_4::request::teams_create_or_update_idp_group_connections_in_org::body::Json`](crate::v1_1_4::request::teams_create_or_update_idp_group_connections_in_org::body::Json)
14066    pub async fn teams_create_or_update_idp_group_connections_in_org<Content>(
14067        &self,
14068        org: &str,
14069        team_slug: &str,
14070        theContent: Content,
14071    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
14072    where
14073        Content: Copy + TryInto<crate::v1_1_4::request::teams_create_or_update_idp_group_connections_in_org::Content<::hyper::Body>>,
14074        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_create_or_update_idp_group_connections_in_org::Content<::hyper::Body>>>::Error>
14075    {
14076        let mut theScheme = AuthScheme::from(&self.config.authentication);
14077
14078        while let Some(auth_step) = theScheme.step()? {
14079            match auth_step {
14080                ::authentic::AuthenticationStep::Request(auth_request) => {
14081                    theScheme.respond(self.client.request(auth_request).await);
14082                }
14083                ::authentic::AuthenticationStep::WaitFor(duration) => {
14084                    (self.sleep)(duration).await;
14085                }
14086            }
14087        }
14088        let theBuilder = crate::v1_1_4::request::teams_create_or_update_idp_group_connections_in_org::http_builder(
14089            self.config.base_url.as_ref(),
14090            org,
14091            team_slug,
14092            self.config.user_agent.as_ref(),
14093            self.config.accept.as_deref(),
14094        )?
14095        .with_authentication(&theScheme)?;
14096
14097        let theRequest = crate::v1_1_4::request::teams_create_or_update_idp_group_connections_in_org::hyper_request(
14098            theBuilder,
14099            theContent.try_into()?,
14100        )?;
14101
14102        ::log::debug!("HTTP request: {:?}", &theRequest);
14103
14104        let theResponse = self.client.request(theRequest).await?;
14105
14106        ::log::debug!("HTTP response: {:?}", &theResponse);
14107
14108        Ok(theResponse)
14109    }
14110
14111    /// List child teams
14112    /// 
14113    /// Lists the child teams of the team specified by `{team_slug}`.
14114    /// 
14115    /// **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`.
14116    /// 
14117    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-child-teams)
14118    pub async fn teams_list_child_in_org(
14119        &self,
14120        org: &str,
14121        team_slug: &str,
14122        per_page: ::std::option::Option<i64>,
14123        page: ::std::option::Option<i64>,
14124    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
14125        let mut theScheme = AuthScheme::from(&self.config.authentication);
14126
14127        while let Some(auth_step) = theScheme.step()? {
14128            match auth_step {
14129                ::authentic::AuthenticationStep::Request(auth_request) => {
14130                    theScheme.respond(self.client.request(auth_request).await);
14131                }
14132                ::authentic::AuthenticationStep::WaitFor(duration) => {
14133                    (self.sleep)(duration).await;
14134                }
14135            }
14136        }
14137        let theBuilder = crate::v1_1_4::request::teams_list_child_in_org::http_builder(
14138            self.config.base_url.as_ref(),
14139            org,
14140            team_slug,
14141            per_page,
14142            page,
14143            self.config.user_agent.as_ref(),
14144            self.config.accept.as_deref(),
14145        )?
14146        .with_authentication(&theScheme)?;
14147
14148        let theRequest =
14149            crate::v1_1_4::request::teams_list_child_in_org::hyper_request(theBuilder)?;
14150
14151        ::log::debug!("HTTP request: {:?}", &theRequest);
14152
14153        let theResponse = self.client.request(theRequest).await?;
14154
14155        ::log::debug!("HTTP response: {:?}", &theResponse);
14156
14157        Ok(theResponse)
14158    }
14159
14160    /// Get a project card
14161    /// 
14162    /// [API method documentation](https://docs.github.com/rest/reference/projects#get-a-project-card)
14163    pub async fn projects_get_card(
14164        &self,
14165        card_id: i64,
14166    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
14167        let mut theScheme = AuthScheme::from(&self.config.authentication);
14168
14169        while let Some(auth_step) = theScheme.step()? {
14170            match auth_step {
14171                ::authentic::AuthenticationStep::Request(auth_request) => {
14172                    theScheme.respond(self.client.request(auth_request).await);
14173                }
14174                ::authentic::AuthenticationStep::WaitFor(duration) => {
14175                    (self.sleep)(duration).await;
14176                }
14177            }
14178        }
14179        let theBuilder = crate::v1_1_4::request::projects_get_card::http_builder(
14180            self.config.base_url.as_ref(),
14181            card_id,
14182            self.config.user_agent.as_ref(),
14183            self.config.accept.as_deref(),
14184        )?
14185        .with_authentication(&theScheme)?;
14186
14187        let theRequest =
14188            crate::v1_1_4::request::projects_get_card::hyper_request(theBuilder)?;
14189
14190        ::log::debug!("HTTP request: {:?}", &theRequest);
14191
14192        let theResponse = self.client.request(theRequest).await?;
14193
14194        ::log::debug!("HTTP response: {:?}", &theResponse);
14195
14196        Ok(theResponse)
14197    }
14198
14199    /// Delete a project card
14200    /// 
14201    /// [API method documentation](https://docs.github.com/rest/reference/projects#delete-a-project-card)
14202    pub async fn projects_delete_card(
14203        &self,
14204        card_id: i64,
14205    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
14206        let mut theScheme = AuthScheme::from(&self.config.authentication);
14207
14208        while let Some(auth_step) = theScheme.step()? {
14209            match auth_step {
14210                ::authentic::AuthenticationStep::Request(auth_request) => {
14211                    theScheme.respond(self.client.request(auth_request).await);
14212                }
14213                ::authentic::AuthenticationStep::WaitFor(duration) => {
14214                    (self.sleep)(duration).await;
14215                }
14216            }
14217        }
14218        let theBuilder = crate::v1_1_4::request::projects_delete_card::http_builder(
14219            self.config.base_url.as_ref(),
14220            card_id,
14221            self.config.user_agent.as_ref(),
14222            self.config.accept.as_deref(),
14223        )?
14224        .with_authentication(&theScheme)?;
14225
14226        let theRequest =
14227            crate::v1_1_4::request::projects_delete_card::hyper_request(theBuilder)?;
14228
14229        ::log::debug!("HTTP request: {:?}", &theRequest);
14230
14231        let theResponse = self.client.request(theRequest).await?;
14232
14233        ::log::debug!("HTTP response: {:?}", &theResponse);
14234
14235        Ok(theResponse)
14236    }
14237
14238    /// Update an existing project card
14239    /// 
14240    /// [API method documentation](https://docs.github.com/rest/reference/projects#update-a-project-card)
14241    ///
14242    /// # Content
14243    ///
14244    /// - [`&v1_1_4::request::projects_update_card::body::Json`](crate::v1_1_4::request::projects_update_card::body::Json)
14245    pub async fn projects_update_card<Content>(
14246        &self,
14247        card_id: i64,
14248        theContent: Content,
14249    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
14250    where
14251        Content: Copy + TryInto<crate::v1_1_4::request::projects_update_card::Content<::hyper::Body>>,
14252        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::projects_update_card::Content<::hyper::Body>>>::Error>
14253    {
14254        let mut theScheme = AuthScheme::from(&self.config.authentication);
14255
14256        while let Some(auth_step) = theScheme.step()? {
14257            match auth_step {
14258                ::authentic::AuthenticationStep::Request(auth_request) => {
14259                    theScheme.respond(self.client.request(auth_request).await);
14260                }
14261                ::authentic::AuthenticationStep::WaitFor(duration) => {
14262                    (self.sleep)(duration).await;
14263                }
14264            }
14265        }
14266        let theBuilder = crate::v1_1_4::request::projects_update_card::http_builder(
14267            self.config.base_url.as_ref(),
14268            card_id,
14269            self.config.user_agent.as_ref(),
14270            self.config.accept.as_deref(),
14271        )?
14272        .with_authentication(&theScheme)?;
14273
14274        let theRequest = crate::v1_1_4::request::projects_update_card::hyper_request(
14275            theBuilder,
14276            theContent.try_into()?,
14277        )?;
14278
14279        ::log::debug!("HTTP request: {:?}", &theRequest);
14280
14281        let theResponse = self.client.request(theRequest).await?;
14282
14283        ::log::debug!("HTTP response: {:?}", &theResponse);
14284
14285        Ok(theResponse)
14286    }
14287
14288    /// Move a project card
14289    /// 
14290    /// [API method documentation](https://docs.github.com/rest/reference/projects#move-a-project-card)
14291    ///
14292    /// # Content
14293    ///
14294    /// - [`&v1_1_4::request::projects_move_card::body::Json`](crate::v1_1_4::request::projects_move_card::body::Json)
14295    pub async fn projects_move_card<Content>(
14296        &self,
14297        card_id: i64,
14298        theContent: Content,
14299    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
14300    where
14301        Content: Copy + TryInto<crate::v1_1_4::request::projects_move_card::Content<::hyper::Body>>,
14302        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::projects_move_card::Content<::hyper::Body>>>::Error>
14303    {
14304        let mut theScheme = AuthScheme::from(&self.config.authentication);
14305
14306        while let Some(auth_step) = theScheme.step()? {
14307            match auth_step {
14308                ::authentic::AuthenticationStep::Request(auth_request) => {
14309                    theScheme.respond(self.client.request(auth_request).await);
14310                }
14311                ::authentic::AuthenticationStep::WaitFor(duration) => {
14312                    (self.sleep)(duration).await;
14313                }
14314            }
14315        }
14316        let theBuilder = crate::v1_1_4::request::projects_move_card::http_builder(
14317            self.config.base_url.as_ref(),
14318            card_id,
14319            self.config.user_agent.as_ref(),
14320            self.config.accept.as_deref(),
14321        )?
14322        .with_authentication(&theScheme)?;
14323
14324        let theRequest = crate::v1_1_4::request::projects_move_card::hyper_request(
14325            theBuilder,
14326            theContent.try_into()?,
14327        )?;
14328
14329        ::log::debug!("HTTP request: {:?}", &theRequest);
14330
14331        let theResponse = self.client.request(theRequest).await?;
14332
14333        ::log::debug!("HTTP response: {:?}", &theResponse);
14334
14335        Ok(theResponse)
14336    }
14337
14338    /// Get a project column
14339    /// 
14340    /// [API method documentation](https://docs.github.com/rest/reference/projects#get-a-project-column)
14341    pub async fn projects_get_column(
14342        &self,
14343        column_id: i64,
14344    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
14345        let mut theScheme = AuthScheme::from(&self.config.authentication);
14346
14347        while let Some(auth_step) = theScheme.step()? {
14348            match auth_step {
14349                ::authentic::AuthenticationStep::Request(auth_request) => {
14350                    theScheme.respond(self.client.request(auth_request).await);
14351                }
14352                ::authentic::AuthenticationStep::WaitFor(duration) => {
14353                    (self.sleep)(duration).await;
14354                }
14355            }
14356        }
14357        let theBuilder = crate::v1_1_4::request::projects_get_column::http_builder(
14358            self.config.base_url.as_ref(),
14359            column_id,
14360            self.config.user_agent.as_ref(),
14361            self.config.accept.as_deref(),
14362        )?
14363        .with_authentication(&theScheme)?;
14364
14365        let theRequest =
14366            crate::v1_1_4::request::projects_get_column::hyper_request(theBuilder)?;
14367
14368        ::log::debug!("HTTP request: {:?}", &theRequest);
14369
14370        let theResponse = self.client.request(theRequest).await?;
14371
14372        ::log::debug!("HTTP response: {:?}", &theResponse);
14373
14374        Ok(theResponse)
14375    }
14376
14377    /// Delete a project column
14378    /// 
14379    /// [API method documentation](https://docs.github.com/rest/reference/projects#delete-a-project-column)
14380    pub async fn projects_delete_column(
14381        &self,
14382        column_id: i64,
14383    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
14384        let mut theScheme = AuthScheme::from(&self.config.authentication);
14385
14386        while let Some(auth_step) = theScheme.step()? {
14387            match auth_step {
14388                ::authentic::AuthenticationStep::Request(auth_request) => {
14389                    theScheme.respond(self.client.request(auth_request).await);
14390                }
14391                ::authentic::AuthenticationStep::WaitFor(duration) => {
14392                    (self.sleep)(duration).await;
14393                }
14394            }
14395        }
14396        let theBuilder = crate::v1_1_4::request::projects_delete_column::http_builder(
14397            self.config.base_url.as_ref(),
14398            column_id,
14399            self.config.user_agent.as_ref(),
14400            self.config.accept.as_deref(),
14401        )?
14402        .with_authentication(&theScheme)?;
14403
14404        let theRequest =
14405            crate::v1_1_4::request::projects_delete_column::hyper_request(theBuilder)?;
14406
14407        ::log::debug!("HTTP request: {:?}", &theRequest);
14408
14409        let theResponse = self.client.request(theRequest).await?;
14410
14411        ::log::debug!("HTTP response: {:?}", &theResponse);
14412
14413        Ok(theResponse)
14414    }
14415
14416    /// Update an existing project column
14417    /// 
14418    /// [API method documentation](https://docs.github.com/rest/reference/projects#update-a-project-column)
14419    ///
14420    /// # Content
14421    ///
14422    /// - [`&v1_1_4::request::projects_update_column::body::Json`](crate::v1_1_4::request::projects_update_column::body::Json)
14423    pub async fn projects_update_column<Content>(
14424        &self,
14425        column_id: i64,
14426        theContent: Content,
14427    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
14428    where
14429        Content: Copy + TryInto<crate::v1_1_4::request::projects_update_column::Content<::hyper::Body>>,
14430        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::projects_update_column::Content<::hyper::Body>>>::Error>
14431    {
14432        let mut theScheme = AuthScheme::from(&self.config.authentication);
14433
14434        while let Some(auth_step) = theScheme.step()? {
14435            match auth_step {
14436                ::authentic::AuthenticationStep::Request(auth_request) => {
14437                    theScheme.respond(self.client.request(auth_request).await);
14438                }
14439                ::authentic::AuthenticationStep::WaitFor(duration) => {
14440                    (self.sleep)(duration).await;
14441                }
14442            }
14443        }
14444        let theBuilder = crate::v1_1_4::request::projects_update_column::http_builder(
14445            self.config.base_url.as_ref(),
14446            column_id,
14447            self.config.user_agent.as_ref(),
14448            self.config.accept.as_deref(),
14449        )?
14450        .with_authentication(&theScheme)?;
14451
14452        let theRequest = crate::v1_1_4::request::projects_update_column::hyper_request(
14453            theBuilder,
14454            theContent.try_into()?,
14455        )?;
14456
14457        ::log::debug!("HTTP request: {:?}", &theRequest);
14458
14459        let theResponse = self.client.request(theRequest).await?;
14460
14461        ::log::debug!("HTTP response: {:?}", &theResponse);
14462
14463        Ok(theResponse)
14464    }
14465
14466    /// List project cards
14467    /// 
14468    /// [API method documentation](https://docs.github.com/rest/reference/projects#list-project-cards)
14469    pub async fn projects_list_cards(
14470        &self,
14471        column_id: i64,
14472        archived_state: ::std::option::Option<&str>,
14473        per_page: ::std::option::Option<i64>,
14474        page: ::std::option::Option<i64>,
14475    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
14476        let mut theScheme = AuthScheme::from(&self.config.authentication);
14477
14478        while let Some(auth_step) = theScheme.step()? {
14479            match auth_step {
14480                ::authentic::AuthenticationStep::Request(auth_request) => {
14481                    theScheme.respond(self.client.request(auth_request).await);
14482                }
14483                ::authentic::AuthenticationStep::WaitFor(duration) => {
14484                    (self.sleep)(duration).await;
14485                }
14486            }
14487        }
14488        let theBuilder = crate::v1_1_4::request::projects_list_cards::http_builder(
14489            self.config.base_url.as_ref(),
14490            column_id,
14491            archived_state,
14492            per_page,
14493            page,
14494            self.config.user_agent.as_ref(),
14495            self.config.accept.as_deref(),
14496        )?
14497        .with_authentication(&theScheme)?;
14498
14499        let theRequest =
14500            crate::v1_1_4::request::projects_list_cards::hyper_request(theBuilder)?;
14501
14502        ::log::debug!("HTTP request: {:?}", &theRequest);
14503
14504        let theResponse = self.client.request(theRequest).await?;
14505
14506        ::log::debug!("HTTP response: {:?}", &theResponse);
14507
14508        Ok(theResponse)
14509    }
14510
14511    /// Create a project card
14512    /// 
14513    /// [API method documentation](https://docs.github.com/rest/reference/projects#create-a-project-card)
14514    ///
14515    /// # Content
14516    ///
14517    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
14518    pub async fn projects_create_card<Content>(
14519        &self,
14520        column_id: i64,
14521        theContent: Content,
14522    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
14523    where
14524        Content: Copy + TryInto<crate::v1_1_4::request::projects_create_card::Content<::hyper::Body>>,
14525        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::projects_create_card::Content<::hyper::Body>>>::Error>
14526    {
14527        let mut theScheme = AuthScheme::from(&self.config.authentication);
14528
14529        while let Some(auth_step) = theScheme.step()? {
14530            match auth_step {
14531                ::authentic::AuthenticationStep::Request(auth_request) => {
14532                    theScheme.respond(self.client.request(auth_request).await);
14533                }
14534                ::authentic::AuthenticationStep::WaitFor(duration) => {
14535                    (self.sleep)(duration).await;
14536                }
14537            }
14538        }
14539        let theBuilder = crate::v1_1_4::request::projects_create_card::http_builder(
14540            self.config.base_url.as_ref(),
14541            column_id,
14542            self.config.user_agent.as_ref(),
14543            self.config.accept.as_deref(),
14544        )?
14545        .with_authentication(&theScheme)?;
14546
14547        let theRequest = crate::v1_1_4::request::projects_create_card::hyper_request(
14548            theBuilder,
14549            theContent.try_into()?,
14550        )?;
14551
14552        ::log::debug!("HTTP request: {:?}", &theRequest);
14553
14554        let theResponse = self.client.request(theRequest).await?;
14555
14556        ::log::debug!("HTTP response: {:?}", &theResponse);
14557
14558        Ok(theResponse)
14559    }
14560
14561    /// Move a project column
14562    /// 
14563    /// [API method documentation](https://docs.github.com/rest/reference/projects#move-a-project-column)
14564    ///
14565    /// # Content
14566    ///
14567    /// - [`&v1_1_4::request::projects_move_column::body::Json`](crate::v1_1_4::request::projects_move_column::body::Json)
14568    pub async fn projects_move_column<Content>(
14569        &self,
14570        column_id: i64,
14571        theContent: Content,
14572    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
14573    where
14574        Content: Copy + TryInto<crate::v1_1_4::request::projects_move_column::Content<::hyper::Body>>,
14575        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::projects_move_column::Content<::hyper::Body>>>::Error>
14576    {
14577        let mut theScheme = AuthScheme::from(&self.config.authentication);
14578
14579        while let Some(auth_step) = theScheme.step()? {
14580            match auth_step {
14581                ::authentic::AuthenticationStep::Request(auth_request) => {
14582                    theScheme.respond(self.client.request(auth_request).await);
14583                }
14584                ::authentic::AuthenticationStep::WaitFor(duration) => {
14585                    (self.sleep)(duration).await;
14586                }
14587            }
14588        }
14589        let theBuilder = crate::v1_1_4::request::projects_move_column::http_builder(
14590            self.config.base_url.as_ref(),
14591            column_id,
14592            self.config.user_agent.as_ref(),
14593            self.config.accept.as_deref(),
14594        )?
14595        .with_authentication(&theScheme)?;
14596
14597        let theRequest = crate::v1_1_4::request::projects_move_column::hyper_request(
14598            theBuilder,
14599            theContent.try_into()?,
14600        )?;
14601
14602        ::log::debug!("HTTP request: {:?}", &theRequest);
14603
14604        let theResponse = self.client.request(theRequest).await?;
14605
14606        ::log::debug!("HTTP response: {:?}", &theResponse);
14607
14608        Ok(theResponse)
14609    }
14610
14611    /// Get a project
14612    /// 
14613    /// Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.
14614    /// 
14615    /// [API method documentation](https://docs.github.com/rest/reference/projects#get-a-project)
14616    pub async fn projects_get(
14617        &self,
14618        project_id: i64,
14619    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
14620        let mut theScheme = AuthScheme::from(&self.config.authentication);
14621
14622        while let Some(auth_step) = theScheme.step()? {
14623            match auth_step {
14624                ::authentic::AuthenticationStep::Request(auth_request) => {
14625                    theScheme.respond(self.client.request(auth_request).await);
14626                }
14627                ::authentic::AuthenticationStep::WaitFor(duration) => {
14628                    (self.sleep)(duration).await;
14629                }
14630            }
14631        }
14632        let theBuilder = crate::v1_1_4::request::projects_get::http_builder(
14633            self.config.base_url.as_ref(),
14634            project_id,
14635            self.config.user_agent.as_ref(),
14636            self.config.accept.as_deref(),
14637        )?
14638        .with_authentication(&theScheme)?;
14639
14640        let theRequest =
14641            crate::v1_1_4::request::projects_get::hyper_request(theBuilder)?;
14642
14643        ::log::debug!("HTTP request: {:?}", &theRequest);
14644
14645        let theResponse = self.client.request(theRequest).await?;
14646
14647        ::log::debug!("HTTP response: {:?}", &theResponse);
14648
14649        Ok(theResponse)
14650    }
14651
14652    /// Delete a project
14653    /// 
14654    /// Deletes a project board. Returns a `404 Not Found` status if projects are disabled.
14655    /// 
14656    /// [API method documentation](https://docs.github.com/rest/reference/projects#delete-a-project)
14657    pub async fn projects_delete(
14658        &self,
14659        project_id: i64,
14660    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
14661        let mut theScheme = AuthScheme::from(&self.config.authentication);
14662
14663        while let Some(auth_step) = theScheme.step()? {
14664            match auth_step {
14665                ::authentic::AuthenticationStep::Request(auth_request) => {
14666                    theScheme.respond(self.client.request(auth_request).await);
14667                }
14668                ::authentic::AuthenticationStep::WaitFor(duration) => {
14669                    (self.sleep)(duration).await;
14670                }
14671            }
14672        }
14673        let theBuilder = crate::v1_1_4::request::projects_delete::http_builder(
14674            self.config.base_url.as_ref(),
14675            project_id,
14676            self.config.user_agent.as_ref(),
14677            self.config.accept.as_deref(),
14678        )?
14679        .with_authentication(&theScheme)?;
14680
14681        let theRequest =
14682            crate::v1_1_4::request::projects_delete::hyper_request(theBuilder)?;
14683
14684        ::log::debug!("HTTP request: {:?}", &theRequest);
14685
14686        let theResponse = self.client.request(theRequest).await?;
14687
14688        ::log::debug!("HTTP response: {:?}", &theResponse);
14689
14690        Ok(theResponse)
14691    }
14692
14693    /// Update a project
14694    /// 
14695    /// Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.
14696    /// 
14697    /// [API method documentation](https://docs.github.com/rest/reference/projects#update-a-project)
14698    ///
14699    /// # Content
14700    ///
14701    /// - [`&v1_1_4::request::projects_update::body::Json`](crate::v1_1_4::request::projects_update::body::Json)
14702    pub async fn projects_update<Content>(
14703        &self,
14704        project_id: i64,
14705        theContent: Content,
14706    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
14707    where
14708        Content: Copy + TryInto<crate::v1_1_4::request::projects_update::Content<::hyper::Body>>,
14709        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::projects_update::Content<::hyper::Body>>>::Error>
14710    {
14711        let mut theScheme = AuthScheme::from(&self.config.authentication);
14712
14713        while let Some(auth_step) = theScheme.step()? {
14714            match auth_step {
14715                ::authentic::AuthenticationStep::Request(auth_request) => {
14716                    theScheme.respond(self.client.request(auth_request).await);
14717                }
14718                ::authentic::AuthenticationStep::WaitFor(duration) => {
14719                    (self.sleep)(duration).await;
14720                }
14721            }
14722        }
14723        let theBuilder = crate::v1_1_4::request::projects_update::http_builder(
14724            self.config.base_url.as_ref(),
14725            project_id,
14726            self.config.user_agent.as_ref(),
14727            self.config.accept.as_deref(),
14728        )?
14729        .with_authentication(&theScheme)?;
14730
14731        let theRequest = crate::v1_1_4::request::projects_update::hyper_request(
14732            theBuilder,
14733            theContent.try_into()?,
14734        )?;
14735
14736        ::log::debug!("HTTP request: {:?}", &theRequest);
14737
14738        let theResponse = self.client.request(theRequest).await?;
14739
14740        ::log::debug!("HTTP response: {:?}", &theResponse);
14741
14742        Ok(theResponse)
14743    }
14744
14745    /// List project collaborators
14746    /// 
14747    /// Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators.
14748    /// 
14749    /// [API method documentation](https://docs.github.com/rest/reference/projects#list-project-collaborators)
14750    pub async fn projects_list_collaborators(
14751        &self,
14752        project_id: i64,
14753        affiliation: ::std::option::Option<&str>,
14754        per_page: ::std::option::Option<i64>,
14755        page: ::std::option::Option<i64>,
14756    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
14757        let mut theScheme = AuthScheme::from(&self.config.authentication);
14758
14759        while let Some(auth_step) = theScheme.step()? {
14760            match auth_step {
14761                ::authentic::AuthenticationStep::Request(auth_request) => {
14762                    theScheme.respond(self.client.request(auth_request).await);
14763                }
14764                ::authentic::AuthenticationStep::WaitFor(duration) => {
14765                    (self.sleep)(duration).await;
14766                }
14767            }
14768        }
14769        let theBuilder = crate::v1_1_4::request::projects_list_collaborators::http_builder(
14770            self.config.base_url.as_ref(),
14771            project_id,
14772            affiliation,
14773            per_page,
14774            page,
14775            self.config.user_agent.as_ref(),
14776            self.config.accept.as_deref(),
14777        )?
14778        .with_authentication(&theScheme)?;
14779
14780        let theRequest =
14781            crate::v1_1_4::request::projects_list_collaborators::hyper_request(theBuilder)?;
14782
14783        ::log::debug!("HTTP request: {:?}", &theRequest);
14784
14785        let theResponse = self.client.request(theRequest).await?;
14786
14787        ::log::debug!("HTTP response: {:?}", &theResponse);
14788
14789        Ok(theResponse)
14790    }
14791
14792    /// Add project collaborator
14793    /// 
14794    /// Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator.
14795    /// 
14796    /// [API method documentation](https://docs.github.com/rest/reference/projects#add-project-collaborator)
14797    ///
14798    /// # Content
14799    ///
14800    /// - [`&::std::option::Option<crate::v1_1_4::request::projects_add_collaborator::body::Json>`](crate::v1_1_4::request::projects_add_collaborator::body::Json)
14801    pub async fn projects_add_collaborator<Content>(
14802        &self,
14803        project_id: i64,
14804        username: &str,
14805        theContent: Content,
14806    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
14807    where
14808        Content: Copy + TryInto<crate::v1_1_4::request::projects_add_collaborator::Content<::hyper::Body>>,
14809        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::projects_add_collaborator::Content<::hyper::Body>>>::Error>
14810    {
14811        let mut theScheme = AuthScheme::from(&self.config.authentication);
14812
14813        while let Some(auth_step) = theScheme.step()? {
14814            match auth_step {
14815                ::authentic::AuthenticationStep::Request(auth_request) => {
14816                    theScheme.respond(self.client.request(auth_request).await);
14817                }
14818                ::authentic::AuthenticationStep::WaitFor(duration) => {
14819                    (self.sleep)(duration).await;
14820                }
14821            }
14822        }
14823        let theBuilder = crate::v1_1_4::request::projects_add_collaborator::http_builder(
14824            self.config.base_url.as_ref(),
14825            project_id,
14826            username,
14827            self.config.user_agent.as_ref(),
14828            self.config.accept.as_deref(),
14829        )?
14830        .with_authentication(&theScheme)?;
14831
14832        let theRequest = crate::v1_1_4::request::projects_add_collaborator::hyper_request(
14833            theBuilder,
14834            theContent.try_into()?,
14835        )?;
14836
14837        ::log::debug!("HTTP request: {:?}", &theRequest);
14838
14839        let theResponse = self.client.request(theRequest).await?;
14840
14841        ::log::debug!("HTTP response: {:?}", &theResponse);
14842
14843        Ok(theResponse)
14844    }
14845
14846    /// Remove user as a collaborator
14847    /// 
14848    /// Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator.
14849    /// 
14850    /// [API method documentation](https://docs.github.com/rest/reference/projects#remove-project-collaborator)
14851    pub async fn projects_remove_collaborator(
14852        &self,
14853        project_id: i64,
14854        username: &str,
14855    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
14856        let mut theScheme = AuthScheme::from(&self.config.authentication);
14857
14858        while let Some(auth_step) = theScheme.step()? {
14859            match auth_step {
14860                ::authentic::AuthenticationStep::Request(auth_request) => {
14861                    theScheme.respond(self.client.request(auth_request).await);
14862                }
14863                ::authentic::AuthenticationStep::WaitFor(duration) => {
14864                    (self.sleep)(duration).await;
14865                }
14866            }
14867        }
14868        let theBuilder = crate::v1_1_4::request::projects_remove_collaborator::http_builder(
14869            self.config.base_url.as_ref(),
14870            project_id,
14871            username,
14872            self.config.user_agent.as_ref(),
14873            self.config.accept.as_deref(),
14874        )?
14875        .with_authentication(&theScheme)?;
14876
14877        let theRequest =
14878            crate::v1_1_4::request::projects_remove_collaborator::hyper_request(theBuilder)?;
14879
14880        ::log::debug!("HTTP request: {:?}", &theRequest);
14881
14882        let theResponse = self.client.request(theRequest).await?;
14883
14884        ::log::debug!("HTTP response: {:?}", &theResponse);
14885
14886        Ok(theResponse)
14887    }
14888
14889    /// Get project permission for a user
14890    /// 
14891    /// Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level.
14892    /// 
14893    /// [API method documentation](https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user)
14894    pub async fn projects_get_permission_for_user(
14895        &self,
14896        project_id: i64,
14897        username: &str,
14898    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
14899        let mut theScheme = AuthScheme::from(&self.config.authentication);
14900
14901        while let Some(auth_step) = theScheme.step()? {
14902            match auth_step {
14903                ::authentic::AuthenticationStep::Request(auth_request) => {
14904                    theScheme.respond(self.client.request(auth_request).await);
14905                }
14906                ::authentic::AuthenticationStep::WaitFor(duration) => {
14907                    (self.sleep)(duration).await;
14908                }
14909            }
14910        }
14911        let theBuilder = crate::v1_1_4::request::projects_get_permission_for_user::http_builder(
14912            self.config.base_url.as_ref(),
14913            project_id,
14914            username,
14915            self.config.user_agent.as_ref(),
14916            self.config.accept.as_deref(),
14917        )?
14918        .with_authentication(&theScheme)?;
14919
14920        let theRequest =
14921            crate::v1_1_4::request::projects_get_permission_for_user::hyper_request(theBuilder)?;
14922
14923        ::log::debug!("HTTP request: {:?}", &theRequest);
14924
14925        let theResponse = self.client.request(theRequest).await?;
14926
14927        ::log::debug!("HTTP response: {:?}", &theResponse);
14928
14929        Ok(theResponse)
14930    }
14931
14932    /// List project columns
14933    /// 
14934    /// [API method documentation](https://docs.github.com/rest/reference/projects#list-project-columns)
14935    pub async fn projects_list_columns(
14936        &self,
14937        project_id: i64,
14938        per_page: ::std::option::Option<i64>,
14939        page: ::std::option::Option<i64>,
14940    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
14941        let mut theScheme = AuthScheme::from(&self.config.authentication);
14942
14943        while let Some(auth_step) = theScheme.step()? {
14944            match auth_step {
14945                ::authentic::AuthenticationStep::Request(auth_request) => {
14946                    theScheme.respond(self.client.request(auth_request).await);
14947                }
14948                ::authentic::AuthenticationStep::WaitFor(duration) => {
14949                    (self.sleep)(duration).await;
14950                }
14951            }
14952        }
14953        let theBuilder = crate::v1_1_4::request::projects_list_columns::http_builder(
14954            self.config.base_url.as_ref(),
14955            project_id,
14956            per_page,
14957            page,
14958            self.config.user_agent.as_ref(),
14959            self.config.accept.as_deref(),
14960        )?
14961        .with_authentication(&theScheme)?;
14962
14963        let theRequest =
14964            crate::v1_1_4::request::projects_list_columns::hyper_request(theBuilder)?;
14965
14966        ::log::debug!("HTTP request: {:?}", &theRequest);
14967
14968        let theResponse = self.client.request(theRequest).await?;
14969
14970        ::log::debug!("HTTP response: {:?}", &theResponse);
14971
14972        Ok(theResponse)
14973    }
14974
14975    /// Create a project column
14976    /// 
14977    /// [API method documentation](https://docs.github.com/rest/reference/projects#create-a-project-column)
14978    ///
14979    /// # Content
14980    ///
14981    /// - [`&v1_1_4::request::projects_create_column::body::Json`](crate::v1_1_4::request::projects_create_column::body::Json)
14982    pub async fn projects_create_column<Content>(
14983        &self,
14984        project_id: i64,
14985        theContent: Content,
14986    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
14987    where
14988        Content: Copy + TryInto<crate::v1_1_4::request::projects_create_column::Content<::hyper::Body>>,
14989        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::projects_create_column::Content<::hyper::Body>>>::Error>
14990    {
14991        let mut theScheme = AuthScheme::from(&self.config.authentication);
14992
14993        while let Some(auth_step) = theScheme.step()? {
14994            match auth_step {
14995                ::authentic::AuthenticationStep::Request(auth_request) => {
14996                    theScheme.respond(self.client.request(auth_request).await);
14997                }
14998                ::authentic::AuthenticationStep::WaitFor(duration) => {
14999                    (self.sleep)(duration).await;
15000                }
15001            }
15002        }
15003        let theBuilder = crate::v1_1_4::request::projects_create_column::http_builder(
15004            self.config.base_url.as_ref(),
15005            project_id,
15006            self.config.user_agent.as_ref(),
15007            self.config.accept.as_deref(),
15008        )?
15009        .with_authentication(&theScheme)?;
15010
15011        let theRequest = crate::v1_1_4::request::projects_create_column::hyper_request(
15012            theBuilder,
15013            theContent.try_into()?,
15014        )?;
15015
15016        ::log::debug!("HTTP request: {:?}", &theRequest);
15017
15018        let theResponse = self.client.request(theRequest).await?;
15019
15020        ::log::debug!("HTTP response: {:?}", &theResponse);
15021
15022        Ok(theResponse)
15023    }
15024
15025    /// Get rate limit status for the authenticated user
15026    /// 
15027    /// **Note:** Accessing this endpoint does not count against your REST API rate limit.
15028    /// 
15029    /// **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object.
15030    /// 
15031    /// [API method documentation](https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user)
15032    pub async fn rate_limit_get(
15033        &self,
15034    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15035        let mut theScheme = AuthScheme::from(&self.config.authentication);
15036
15037        while let Some(auth_step) = theScheme.step()? {
15038            match auth_step {
15039                ::authentic::AuthenticationStep::Request(auth_request) => {
15040                    theScheme.respond(self.client.request(auth_request).await);
15041                }
15042                ::authentic::AuthenticationStep::WaitFor(duration) => {
15043                    (self.sleep)(duration).await;
15044                }
15045            }
15046        }
15047        let theBuilder = crate::v1_1_4::request::rate_limit_get::http_builder(
15048            self.config.base_url.as_ref(),
15049            self.config.user_agent.as_ref(),
15050            self.config.accept.as_deref(),
15051        )?
15052        .with_authentication(&theScheme)?;
15053
15054        let theRequest =
15055            crate::v1_1_4::request::rate_limit_get::hyper_request(theBuilder)?;
15056
15057        ::log::debug!("HTTP request: {:?}", &theRequest);
15058
15059        let theResponse = self.client.request(theRequest).await?;
15060
15061        ::log::debug!("HTTP response: {:?}", &theResponse);
15062
15063        Ok(theResponse)
15064    }
15065
15066    /// Get a repository
15067    /// 
15068    /// The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.
15069    /// 
15070    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-repository)
15071    pub async fn repos_get(
15072        &self,
15073        owner: &str,
15074        repo: &str,
15075    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15076        let mut theScheme = AuthScheme::from(&self.config.authentication);
15077
15078        while let Some(auth_step) = theScheme.step()? {
15079            match auth_step {
15080                ::authentic::AuthenticationStep::Request(auth_request) => {
15081                    theScheme.respond(self.client.request(auth_request).await);
15082                }
15083                ::authentic::AuthenticationStep::WaitFor(duration) => {
15084                    (self.sleep)(duration).await;
15085                }
15086            }
15087        }
15088        let theBuilder = crate::v1_1_4::request::repos_get::http_builder(
15089            self.config.base_url.as_ref(),
15090            owner,
15091            repo,
15092            self.config.user_agent.as_ref(),
15093            self.config.accept.as_deref(),
15094        )?
15095        .with_authentication(&theScheme)?;
15096
15097        let theRequest =
15098            crate::v1_1_4::request::repos_get::hyper_request(theBuilder)?;
15099
15100        ::log::debug!("HTTP request: {:?}", &theRequest);
15101
15102        let theResponse = self.client.request(theRequest).await?;
15103
15104        ::log::debug!("HTTP response: {:?}", &theResponse);
15105
15106        Ok(theResponse)
15107    }
15108
15109    /// Delete a repository
15110    /// 
15111    /// Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.
15112    /// 
15113    /// If an organization owner has configured the organization to prevent members from deleting organization-owned
15114    /// repositories, you will get a `403 Forbidden` response.
15115    /// 
15116    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-a-repository)
15117    pub async fn repos_delete(
15118        &self,
15119        owner: &str,
15120        repo: &str,
15121    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15122        let mut theScheme = AuthScheme::from(&self.config.authentication);
15123
15124        while let Some(auth_step) = theScheme.step()? {
15125            match auth_step {
15126                ::authentic::AuthenticationStep::Request(auth_request) => {
15127                    theScheme.respond(self.client.request(auth_request).await);
15128                }
15129                ::authentic::AuthenticationStep::WaitFor(duration) => {
15130                    (self.sleep)(duration).await;
15131                }
15132            }
15133        }
15134        let theBuilder = crate::v1_1_4::request::repos_delete::http_builder(
15135            self.config.base_url.as_ref(),
15136            owner,
15137            repo,
15138            self.config.user_agent.as_ref(),
15139            self.config.accept.as_deref(),
15140        )?
15141        .with_authentication(&theScheme)?;
15142
15143        let theRequest =
15144            crate::v1_1_4::request::repos_delete::hyper_request(theBuilder)?;
15145
15146        ::log::debug!("HTTP request: {:?}", &theRequest);
15147
15148        let theResponse = self.client.request(theRequest).await?;
15149
15150        ::log::debug!("HTTP response: {:?}", &theResponse);
15151
15152        Ok(theResponse)
15153    }
15154
15155    /// Update a repository
15156    /// 
15157    /// **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint.
15158    /// 
15159    /// [API method documentation](https://docs.github.com/rest/reference/repos/#update-a-repository)
15160    ///
15161    /// # Content
15162    ///
15163    /// - [`&v1_1_4::request::repos_update::body::Json`](crate::v1_1_4::request::repos_update::body::Json)
15164    pub async fn repos_update<Content>(
15165        &self,
15166        owner: &str,
15167        repo: &str,
15168        theContent: Content,
15169    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
15170    where
15171        Content: Copy + TryInto<crate::v1_1_4::request::repos_update::Content<::hyper::Body>>,
15172        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_update::Content<::hyper::Body>>>::Error>
15173    {
15174        let mut theScheme = AuthScheme::from(&self.config.authentication);
15175
15176        while let Some(auth_step) = theScheme.step()? {
15177            match auth_step {
15178                ::authentic::AuthenticationStep::Request(auth_request) => {
15179                    theScheme.respond(self.client.request(auth_request).await);
15180                }
15181                ::authentic::AuthenticationStep::WaitFor(duration) => {
15182                    (self.sleep)(duration).await;
15183                }
15184            }
15185        }
15186        let theBuilder = crate::v1_1_4::request::repos_update::http_builder(
15187            self.config.base_url.as_ref(),
15188            owner,
15189            repo,
15190            self.config.user_agent.as_ref(),
15191            self.config.accept.as_deref(),
15192        )?
15193        .with_authentication(&theScheme)?;
15194
15195        let theRequest = crate::v1_1_4::request::repos_update::hyper_request(
15196            theBuilder,
15197            theContent.try_into()?,
15198        )?;
15199
15200        ::log::debug!("HTTP request: {:?}", &theRequest);
15201
15202        let theResponse = self.client.request(theRequest).await?;
15203
15204        ::log::debug!("HTTP response: {:?}", &theResponse);
15205
15206        Ok(theResponse)
15207    }
15208
15209    /// List artifacts for a repository
15210    /// 
15211    /// Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
15212    /// 
15213    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository)
15214    pub async fn actions_list_artifacts_for_repo(
15215        &self,
15216        owner: &str,
15217        repo: &str,
15218        per_page: ::std::option::Option<i64>,
15219        page: ::std::option::Option<i64>,
15220    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15221        let mut theScheme = AuthScheme::from(&self.config.authentication);
15222
15223        while let Some(auth_step) = theScheme.step()? {
15224            match auth_step {
15225                ::authentic::AuthenticationStep::Request(auth_request) => {
15226                    theScheme.respond(self.client.request(auth_request).await);
15227                }
15228                ::authentic::AuthenticationStep::WaitFor(duration) => {
15229                    (self.sleep)(duration).await;
15230                }
15231            }
15232        }
15233        let theBuilder = crate::v1_1_4::request::actions_list_artifacts_for_repo::http_builder(
15234            self.config.base_url.as_ref(),
15235            owner,
15236            repo,
15237            per_page,
15238            page,
15239            self.config.user_agent.as_ref(),
15240            self.config.accept.as_deref(),
15241        )?
15242        .with_authentication(&theScheme)?;
15243
15244        let theRequest =
15245            crate::v1_1_4::request::actions_list_artifacts_for_repo::hyper_request(theBuilder)?;
15246
15247        ::log::debug!("HTTP request: {:?}", &theRequest);
15248
15249        let theResponse = self.client.request(theRequest).await?;
15250
15251        ::log::debug!("HTTP response: {:?}", &theResponse);
15252
15253        Ok(theResponse)
15254    }
15255
15256    /// Get an artifact
15257    /// 
15258    /// Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
15259    /// 
15260    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-an-artifact)
15261    pub async fn actions_get_artifact(
15262        &self,
15263        owner: &str,
15264        repo: &str,
15265        artifact_id: i64,
15266    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15267        let mut theScheme = AuthScheme::from(&self.config.authentication);
15268
15269        while let Some(auth_step) = theScheme.step()? {
15270            match auth_step {
15271                ::authentic::AuthenticationStep::Request(auth_request) => {
15272                    theScheme.respond(self.client.request(auth_request).await);
15273                }
15274                ::authentic::AuthenticationStep::WaitFor(duration) => {
15275                    (self.sleep)(duration).await;
15276                }
15277            }
15278        }
15279        let theBuilder = crate::v1_1_4::request::actions_get_artifact::http_builder(
15280            self.config.base_url.as_ref(),
15281            owner,
15282            repo,
15283            artifact_id,
15284            self.config.user_agent.as_ref(),
15285            self.config.accept.as_deref(),
15286        )?
15287        .with_authentication(&theScheme)?;
15288
15289        let theRequest =
15290            crate::v1_1_4::request::actions_get_artifact::hyper_request(theBuilder)?;
15291
15292        ::log::debug!("HTTP request: {:?}", &theRequest);
15293
15294        let theResponse = self.client.request(theRequest).await?;
15295
15296        ::log::debug!("HTTP response: {:?}", &theResponse);
15297
15298        Ok(theResponse)
15299    }
15300
15301    /// Delete an artifact
15302    /// 
15303    /// Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
15304    /// 
15305    /// [API method documentation](https://docs.github.com/rest/reference/actions#delete-an-artifact)
15306    pub async fn actions_delete_artifact(
15307        &self,
15308        owner: &str,
15309        repo: &str,
15310        artifact_id: i64,
15311    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15312        let mut theScheme = AuthScheme::from(&self.config.authentication);
15313
15314        while let Some(auth_step) = theScheme.step()? {
15315            match auth_step {
15316                ::authentic::AuthenticationStep::Request(auth_request) => {
15317                    theScheme.respond(self.client.request(auth_request).await);
15318                }
15319                ::authentic::AuthenticationStep::WaitFor(duration) => {
15320                    (self.sleep)(duration).await;
15321                }
15322            }
15323        }
15324        let theBuilder = crate::v1_1_4::request::actions_delete_artifact::http_builder(
15325            self.config.base_url.as_ref(),
15326            owner,
15327            repo,
15328            artifact_id,
15329            self.config.user_agent.as_ref(),
15330            self.config.accept.as_deref(),
15331        )?
15332        .with_authentication(&theScheme)?;
15333
15334        let theRequest =
15335            crate::v1_1_4::request::actions_delete_artifact::hyper_request(theBuilder)?;
15336
15337        ::log::debug!("HTTP request: {:?}", &theRequest);
15338
15339        let theResponse = self.client.request(theRequest).await?;
15340
15341        ::log::debug!("HTTP response: {:?}", &theResponse);
15342
15343        Ok(theResponse)
15344    }
15345
15346    /// Download an artifact
15347    /// 
15348    /// Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in
15349    /// the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to
15350    /// the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.
15351    /// GitHub Apps must have the `actions:read` permission to use this endpoint.
15352    /// 
15353    /// [API method documentation](https://docs.github.com/rest/reference/actions#download-an-artifact)
15354    pub async fn actions_download_artifact(
15355        &self,
15356        owner: &str,
15357        repo: &str,
15358        artifact_id: i64,
15359        archive_format: &str,
15360    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15361        let mut theScheme = AuthScheme::from(&self.config.authentication);
15362
15363        while let Some(auth_step) = theScheme.step()? {
15364            match auth_step {
15365                ::authentic::AuthenticationStep::Request(auth_request) => {
15366                    theScheme.respond(self.client.request(auth_request).await);
15367                }
15368                ::authentic::AuthenticationStep::WaitFor(duration) => {
15369                    (self.sleep)(duration).await;
15370                }
15371            }
15372        }
15373        let theBuilder = crate::v1_1_4::request::actions_download_artifact::http_builder(
15374            self.config.base_url.as_ref(),
15375            owner,
15376            repo,
15377            artifact_id,
15378            archive_format,
15379            self.config.user_agent.as_ref(),
15380            self.config.accept.as_deref(),
15381        )?
15382        .with_authentication(&theScheme)?;
15383
15384        let theRequest =
15385            crate::v1_1_4::request::actions_download_artifact::hyper_request(theBuilder)?;
15386
15387        ::log::debug!("HTTP request: {:?}", &theRequest);
15388
15389        let theResponse = self.client.request(theRequest).await?;
15390
15391        ::log::debug!("HTTP response: {:?}", &theResponse);
15392
15393        Ok(theResponse)
15394    }
15395
15396    /// Get GitHub Actions cache usage for a repository
15397    /// 
15398    /// Gets GitHub Actions cache usage for a repository.
15399    /// The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.
15400    /// Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
15401    /// 
15402    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository)
15403    pub async fn actions_get_actions_cache_usage(
15404        &self,
15405        owner: &str,
15406        repo: &str,
15407    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15408        let mut theScheme = AuthScheme::from(&self.config.authentication);
15409
15410        while let Some(auth_step) = theScheme.step()? {
15411            match auth_step {
15412                ::authentic::AuthenticationStep::Request(auth_request) => {
15413                    theScheme.respond(self.client.request(auth_request).await);
15414                }
15415                ::authentic::AuthenticationStep::WaitFor(duration) => {
15416                    (self.sleep)(duration).await;
15417                }
15418            }
15419        }
15420        let theBuilder = crate::v1_1_4::request::actions_get_actions_cache_usage::http_builder(
15421            self.config.base_url.as_ref(),
15422            owner,
15423            repo,
15424            self.config.user_agent.as_ref(),
15425            self.config.accept.as_deref(),
15426        )?
15427        .with_authentication(&theScheme)?;
15428
15429        let theRequest =
15430            crate::v1_1_4::request::actions_get_actions_cache_usage::hyper_request(theBuilder)?;
15431
15432        ::log::debug!("HTTP request: {:?}", &theRequest);
15433
15434        let theResponse = self.client.request(theRequest).await?;
15435
15436        ::log::debug!("HTTP response: {:?}", &theResponse);
15437
15438        Ok(theResponse)
15439    }
15440
15441    /// Get a job for a workflow run
15442    /// 
15443    /// Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
15444    /// 
15445    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run)
15446    pub async fn actions_get_job_for_workflow_run(
15447        &self,
15448        owner: &str,
15449        repo: &str,
15450        job_id: i64,
15451    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15452        let mut theScheme = AuthScheme::from(&self.config.authentication);
15453
15454        while let Some(auth_step) = theScheme.step()? {
15455            match auth_step {
15456                ::authentic::AuthenticationStep::Request(auth_request) => {
15457                    theScheme.respond(self.client.request(auth_request).await);
15458                }
15459                ::authentic::AuthenticationStep::WaitFor(duration) => {
15460                    (self.sleep)(duration).await;
15461                }
15462            }
15463        }
15464        let theBuilder = crate::v1_1_4::request::actions_get_job_for_workflow_run::http_builder(
15465            self.config.base_url.as_ref(),
15466            owner,
15467            repo,
15468            job_id,
15469            self.config.user_agent.as_ref(),
15470            self.config.accept.as_deref(),
15471        )?
15472        .with_authentication(&theScheme)?;
15473
15474        let theRequest =
15475            crate::v1_1_4::request::actions_get_job_for_workflow_run::hyper_request(theBuilder)?;
15476
15477        ::log::debug!("HTTP request: {:?}", &theRequest);
15478
15479        let theResponse = self.client.request(theRequest).await?;
15480
15481        ::log::debug!("HTTP response: {:?}", &theResponse);
15482
15483        Ok(theResponse)
15484    }
15485
15486    /// Download job logs for a workflow run
15487    /// 
15488    /// Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look
15489    /// for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can
15490    /// use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must
15491    /// have the `actions:read` permission to use this endpoint.
15492    /// 
15493    /// [API method documentation](https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run)
15494    pub async fn actions_download_job_logs_for_workflow_run(
15495        &self,
15496        owner: &str,
15497        repo: &str,
15498        job_id: i64,
15499    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15500        let mut theScheme = AuthScheme::from(&self.config.authentication);
15501
15502        while let Some(auth_step) = theScheme.step()? {
15503            match auth_step {
15504                ::authentic::AuthenticationStep::Request(auth_request) => {
15505                    theScheme.respond(self.client.request(auth_request).await);
15506                }
15507                ::authentic::AuthenticationStep::WaitFor(duration) => {
15508                    (self.sleep)(duration).await;
15509                }
15510            }
15511        }
15512        let theBuilder = crate::v1_1_4::request::actions_download_job_logs_for_workflow_run::http_builder(
15513            self.config.base_url.as_ref(),
15514            owner,
15515            repo,
15516            job_id,
15517            self.config.user_agent.as_ref(),
15518            self.config.accept.as_deref(),
15519        )?
15520        .with_authentication(&theScheme)?;
15521
15522        let theRequest =
15523            crate::v1_1_4::request::actions_download_job_logs_for_workflow_run::hyper_request(theBuilder)?;
15524
15525        ::log::debug!("HTTP request: {:?}", &theRequest);
15526
15527        let theResponse = self.client.request(theRequest).await?;
15528
15529        ::log::debug!("HTTP response: {:?}", &theResponse);
15530
15531        Ok(theResponse)
15532    }
15533
15534    /// Re-run a job from a workflow run
15535    /// 
15536    /// Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
15537    /// 
15538    /// [API method documentation](https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run)
15539    pub async fn actions_re_run_job_for_workflow_run(
15540        &self,
15541        owner: &str,
15542        repo: &str,
15543        job_id: i64,
15544    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15545        let mut theScheme = AuthScheme::from(&self.config.authentication);
15546
15547        while let Some(auth_step) = theScheme.step()? {
15548            match auth_step {
15549                ::authentic::AuthenticationStep::Request(auth_request) => {
15550                    theScheme.respond(self.client.request(auth_request).await);
15551                }
15552                ::authentic::AuthenticationStep::WaitFor(duration) => {
15553                    (self.sleep)(duration).await;
15554                }
15555            }
15556        }
15557        let theBuilder = crate::v1_1_4::request::actions_re_run_job_for_workflow_run::http_builder(
15558            self.config.base_url.as_ref(),
15559            owner,
15560            repo,
15561            job_id,
15562            self.config.user_agent.as_ref(),
15563            self.config.accept.as_deref(),
15564        )?
15565        .with_authentication(&theScheme)?;
15566
15567        let theRequest =
15568            crate::v1_1_4::request::actions_re_run_job_for_workflow_run::hyper_request(theBuilder)?;
15569
15570        ::log::debug!("HTTP request: {:?}", &theRequest);
15571
15572        let theResponse = self.client.request(theRequest).await?;
15573
15574        ::log::debug!("HTTP response: {:?}", &theResponse);
15575
15576        Ok(theResponse)
15577    }
15578
15579    /// Get GitHub Actions permissions for a repository
15580    /// 
15581    /// Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository.
15582    /// 
15583    /// You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.
15584    /// 
15585    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository)
15586    pub async fn actions_get_github_actions_permissions_repository(
15587        &self,
15588        owner: &str,
15589        repo: &str,
15590    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15591        let mut theScheme = AuthScheme::from(&self.config.authentication);
15592
15593        while let Some(auth_step) = theScheme.step()? {
15594            match auth_step {
15595                ::authentic::AuthenticationStep::Request(auth_request) => {
15596                    theScheme.respond(self.client.request(auth_request).await);
15597                }
15598                ::authentic::AuthenticationStep::WaitFor(duration) => {
15599                    (self.sleep)(duration).await;
15600                }
15601            }
15602        }
15603        let theBuilder = crate::v1_1_4::request::actions_get_github_actions_permissions_repository::http_builder(
15604            self.config.base_url.as_ref(),
15605            owner,
15606            repo,
15607            self.config.user_agent.as_ref(),
15608            self.config.accept.as_deref(),
15609        )?
15610        .with_authentication(&theScheme)?;
15611
15612        let theRequest =
15613            crate::v1_1_4::request::actions_get_github_actions_permissions_repository::hyper_request(theBuilder)?;
15614
15615        ::log::debug!("HTTP request: {:?}", &theRequest);
15616
15617        let theResponse = self.client.request(theRequest).await?;
15618
15619        ::log::debug!("HTTP response: {:?}", &theResponse);
15620
15621        Ok(theResponse)
15622    }
15623
15624    /// Set GitHub Actions permissions for a repository
15625    /// 
15626    /// Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository.
15627    /// 
15628    /// If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as `allowed_actions` to `selected` actions and reusable workflows, then you cannot override them for the repository.
15629    /// 
15630    /// You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.
15631    /// 
15632    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository)
15633    ///
15634    /// # Content
15635    ///
15636    /// - [`&v1_1_4::request::actions_set_github_actions_permissions_repository::body::Json`](crate::v1_1_4::request::actions_set_github_actions_permissions_repository::body::Json)
15637    pub async fn actions_set_github_actions_permissions_repository<Content>(
15638        &self,
15639        owner: &str,
15640        repo: &str,
15641        theContent: Content,
15642    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
15643    where
15644        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_github_actions_permissions_repository::Content<::hyper::Body>>,
15645        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_github_actions_permissions_repository::Content<::hyper::Body>>>::Error>
15646    {
15647        let mut theScheme = AuthScheme::from(&self.config.authentication);
15648
15649        while let Some(auth_step) = theScheme.step()? {
15650            match auth_step {
15651                ::authentic::AuthenticationStep::Request(auth_request) => {
15652                    theScheme.respond(self.client.request(auth_request).await);
15653                }
15654                ::authentic::AuthenticationStep::WaitFor(duration) => {
15655                    (self.sleep)(duration).await;
15656                }
15657            }
15658        }
15659        let theBuilder = crate::v1_1_4::request::actions_set_github_actions_permissions_repository::http_builder(
15660            self.config.base_url.as_ref(),
15661            owner,
15662            repo,
15663            self.config.user_agent.as_ref(),
15664            self.config.accept.as_deref(),
15665        )?
15666        .with_authentication(&theScheme)?;
15667
15668        let theRequest = crate::v1_1_4::request::actions_set_github_actions_permissions_repository::hyper_request(
15669            theBuilder,
15670            theContent.try_into()?,
15671        )?;
15672
15673        ::log::debug!("HTTP request: {:?}", &theRequest);
15674
15675        let theResponse = self.client.request(theRequest).await?;
15676
15677        ::log::debug!("HTTP response: {:?}", &theResponse);
15678
15679        Ok(theResponse)
15680    }
15681
15682    /// Get the level of access for workflows outside of the repository
15683    /// 
15684    /// Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.
15685    /// This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)."
15686    /// 
15687    /// You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the
15688    /// repository `administration` permission to use this endpoint.
15689    /// 
15690    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository)
15691    pub async fn actions_get_workflow_access_to_repository(
15692        &self,
15693        owner: &str,
15694        repo: &str,
15695    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15696        let mut theScheme = AuthScheme::from(&self.config.authentication);
15697
15698        while let Some(auth_step) = theScheme.step()? {
15699            match auth_step {
15700                ::authentic::AuthenticationStep::Request(auth_request) => {
15701                    theScheme.respond(self.client.request(auth_request).await);
15702                }
15703                ::authentic::AuthenticationStep::WaitFor(duration) => {
15704                    (self.sleep)(duration).await;
15705                }
15706            }
15707        }
15708        let theBuilder = crate::v1_1_4::request::actions_get_workflow_access_to_repository::http_builder(
15709            self.config.base_url.as_ref(),
15710            owner,
15711            repo,
15712            self.config.user_agent.as_ref(),
15713            self.config.accept.as_deref(),
15714        )?
15715        .with_authentication(&theScheme)?;
15716
15717        let theRequest =
15718            crate::v1_1_4::request::actions_get_workflow_access_to_repository::hyper_request(theBuilder)?;
15719
15720        ::log::debug!("HTTP request: {:?}", &theRequest);
15721
15722        let theResponse = self.client.request(theRequest).await?;
15723
15724        ::log::debug!("HTTP response: {:?}", &theResponse);
15725
15726        Ok(theResponse)
15727    }
15728
15729    /// Set the level of access for workflows outside of the repository
15730    /// 
15731    /// Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository.
15732    /// This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)."
15733    /// 
15734    /// You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the
15735    /// repository `administration` permission to use this endpoint.
15736    /// 
15737    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository)
15738    ///
15739    /// # Content
15740    ///
15741    /// - [`&v1_1_4::schema::ActionsWorkflowAccessToRepository`](crate::v1_1_4::schema::ActionsWorkflowAccessToRepository)
15742    pub async fn actions_set_workflow_access_to_repository<Content>(
15743        &self,
15744        owner: &str,
15745        repo: &str,
15746        theContent: Content,
15747    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
15748    where
15749        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_workflow_access_to_repository::Content<::hyper::Body>>,
15750        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_workflow_access_to_repository::Content<::hyper::Body>>>::Error>
15751    {
15752        let mut theScheme = AuthScheme::from(&self.config.authentication);
15753
15754        while let Some(auth_step) = theScheme.step()? {
15755            match auth_step {
15756                ::authentic::AuthenticationStep::Request(auth_request) => {
15757                    theScheme.respond(self.client.request(auth_request).await);
15758                }
15759                ::authentic::AuthenticationStep::WaitFor(duration) => {
15760                    (self.sleep)(duration).await;
15761                }
15762            }
15763        }
15764        let theBuilder = crate::v1_1_4::request::actions_set_workflow_access_to_repository::http_builder(
15765            self.config.base_url.as_ref(),
15766            owner,
15767            repo,
15768            self.config.user_agent.as_ref(),
15769            self.config.accept.as_deref(),
15770        )?
15771        .with_authentication(&theScheme)?;
15772
15773        let theRequest = crate::v1_1_4::request::actions_set_workflow_access_to_repository::hyper_request(
15774            theBuilder,
15775            theContent.try_into()?,
15776        )?;
15777
15778        ::log::debug!("HTTP request: {:?}", &theRequest);
15779
15780        let theResponse = self.client.request(theRequest).await?;
15781
15782        ::log::debug!("HTTP response: {:?}", &theResponse);
15783
15784        Ok(theResponse)
15785    }
15786
15787    /// Get allowed actions and reusable workflows for a repository
15788    /// 
15789    /// Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."
15790    /// 
15791    /// You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.
15792    /// 
15793    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository)
15794    pub async fn actions_get_allowed_actions_repository(
15795        &self,
15796        owner: &str,
15797        repo: &str,
15798    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15799        let mut theScheme = AuthScheme::from(&self.config.authentication);
15800
15801        while let Some(auth_step) = theScheme.step()? {
15802            match auth_step {
15803                ::authentic::AuthenticationStep::Request(auth_request) => {
15804                    theScheme.respond(self.client.request(auth_request).await);
15805                }
15806                ::authentic::AuthenticationStep::WaitFor(duration) => {
15807                    (self.sleep)(duration).await;
15808                }
15809            }
15810        }
15811        let theBuilder = crate::v1_1_4::request::actions_get_allowed_actions_repository::http_builder(
15812            self.config.base_url.as_ref(),
15813            owner,
15814            repo,
15815            self.config.user_agent.as_ref(),
15816            self.config.accept.as_deref(),
15817        )?
15818        .with_authentication(&theScheme)?;
15819
15820        let theRequest =
15821            crate::v1_1_4::request::actions_get_allowed_actions_repository::hyper_request(theBuilder)?;
15822
15823        ::log::debug!("HTTP request: {:?}", &theRequest);
15824
15825        let theResponse = self.client.request(theRequest).await?;
15826
15827        ::log::debug!("HTTP response: {:?}", &theResponse);
15828
15829        Ok(theResponse)
15830    }
15831
15832    /// Set allowed actions and reusable workflows for a repository
15833    /// 
15834    /// Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."
15835    /// 
15836    /// If the repository belongs to an organization or enterprise that has `selected` actions and reusable workflows set at the organization or enterprise levels, then you cannot override any of the allowed actions and reusable workflows settings.
15837    /// 
15838    /// To use the `patterns_allowed` setting for private repositories, the repository must belong to an enterprise. If the repository does not belong to an enterprise, then the `patterns_allowed` setting only applies to public repositories.
15839    /// 
15840    /// You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API.
15841    /// 
15842    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository)
15843    ///
15844    /// # Content
15845    ///
15846    /// - [`&v1_1_4::schema::SelectedActions`](crate::v1_1_4::schema::SelectedActions)
15847    pub async fn actions_set_allowed_actions_repository<Content>(
15848        &self,
15849        owner: &str,
15850        repo: &str,
15851        theContent: Content,
15852    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
15853    where
15854        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_allowed_actions_repository::Content<::hyper::Body>>,
15855        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_allowed_actions_repository::Content<::hyper::Body>>>::Error>
15856    {
15857        let mut theScheme = AuthScheme::from(&self.config.authentication);
15858
15859        while let Some(auth_step) = theScheme.step()? {
15860            match auth_step {
15861                ::authentic::AuthenticationStep::Request(auth_request) => {
15862                    theScheme.respond(self.client.request(auth_request).await);
15863                }
15864                ::authentic::AuthenticationStep::WaitFor(duration) => {
15865                    (self.sleep)(duration).await;
15866                }
15867            }
15868        }
15869        let theBuilder = crate::v1_1_4::request::actions_set_allowed_actions_repository::http_builder(
15870            self.config.base_url.as_ref(),
15871            owner,
15872            repo,
15873            self.config.user_agent.as_ref(),
15874            self.config.accept.as_deref(),
15875        )?
15876        .with_authentication(&theScheme)?;
15877
15878        let theRequest = crate::v1_1_4::request::actions_set_allowed_actions_repository::hyper_request(
15879            theBuilder,
15880            theContent.try_into()?,
15881        )?;
15882
15883        ::log::debug!("HTTP request: {:?}", &theRequest);
15884
15885        let theResponse = self.client.request(theRequest).await?;
15886
15887        ::log::debug!("HTTP response: {:?}", &theResponse);
15888
15889        Ok(theResponse)
15890    }
15891
15892    /// Get default workflow permissions for a repository
15893    /// 
15894    /// Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository,
15895    /// as well as if GitHub Actions can submit approving pull request reviews.
15896    /// For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)."
15897    /// 
15898    /// You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API.
15899    /// 
15900    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository)
15901    pub async fn actions_get_github_actions_default_workflow_permissions_repository(
15902        &self,
15903        owner: &str,
15904        repo: &str,
15905    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
15906        let mut theScheme = AuthScheme::from(&self.config.authentication);
15907
15908        while let Some(auth_step) = theScheme.step()? {
15909            match auth_step {
15910                ::authentic::AuthenticationStep::Request(auth_request) => {
15911                    theScheme.respond(self.client.request(auth_request).await);
15912                }
15913                ::authentic::AuthenticationStep::WaitFor(duration) => {
15914                    (self.sleep)(duration).await;
15915                }
15916            }
15917        }
15918        let theBuilder = crate::v1_1_4::request::actions_get_github_actions_default_workflow_permissions_repository::http_builder(
15919            self.config.base_url.as_ref(),
15920            owner,
15921            repo,
15922            self.config.user_agent.as_ref(),
15923            self.config.accept.as_deref(),
15924        )?
15925        .with_authentication(&theScheme)?;
15926
15927        let theRequest =
15928            crate::v1_1_4::request::actions_get_github_actions_default_workflow_permissions_repository::hyper_request(theBuilder)?;
15929
15930        ::log::debug!("HTTP request: {:?}", &theRequest);
15931
15932        let theResponse = self.client.request(theRequest).await?;
15933
15934        ::log::debug!("HTTP response: {:?}", &theResponse);
15935
15936        Ok(theResponse)
15937    }
15938
15939    /// Set default workflow permissions for a repository
15940    /// 
15941    /// Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions
15942    /// can submit approving pull request reviews.
15943    /// For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)."
15944    /// 
15945    /// You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API.
15946    /// 
15947    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository)
15948    ///
15949    /// # Content
15950    ///
15951    /// - [`&v1_1_4::schema::ActionsSetDefaultWorkflowPermissions`](crate::v1_1_4::schema::ActionsSetDefaultWorkflowPermissions)
15952    pub async fn actions_set_github_actions_default_workflow_permissions_repository<Content>(
15953        &self,
15954        owner: &str,
15955        repo: &str,
15956        theContent: Content,
15957    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
15958    where
15959        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_github_actions_default_workflow_permissions_repository::Content<::hyper::Body>>,
15960        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_github_actions_default_workflow_permissions_repository::Content<::hyper::Body>>>::Error>
15961    {
15962        let mut theScheme = AuthScheme::from(&self.config.authentication);
15963
15964        while let Some(auth_step) = theScheme.step()? {
15965            match auth_step {
15966                ::authentic::AuthenticationStep::Request(auth_request) => {
15967                    theScheme.respond(self.client.request(auth_request).await);
15968                }
15969                ::authentic::AuthenticationStep::WaitFor(duration) => {
15970                    (self.sleep)(duration).await;
15971                }
15972            }
15973        }
15974        let theBuilder = crate::v1_1_4::request::actions_set_github_actions_default_workflow_permissions_repository::http_builder(
15975            self.config.base_url.as_ref(),
15976            owner,
15977            repo,
15978            self.config.user_agent.as_ref(),
15979            self.config.accept.as_deref(),
15980        )?
15981        .with_authentication(&theScheme)?;
15982
15983        let theRequest = crate::v1_1_4::request::actions_set_github_actions_default_workflow_permissions_repository::hyper_request(
15984            theBuilder,
15985            theContent.try_into()?,
15986        )?;
15987
15988        ::log::debug!("HTTP request: {:?}", &theRequest);
15989
15990        let theResponse = self.client.request(theRequest).await?;
15991
15992        ::log::debug!("HTTP response: {:?}", &theResponse);
15993
15994        Ok(theResponse)
15995    }
15996
15997    /// List self-hosted runners for a repository
15998    /// 
15999    /// Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint.
16000    /// 
16001    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository)
16002    pub async fn actions_list_self_hosted_runners_for_repo(
16003        &self,
16004        owner: &str,
16005        repo: &str,
16006        per_page: ::std::option::Option<i64>,
16007        page: ::std::option::Option<i64>,
16008    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16009        let mut theScheme = AuthScheme::from(&self.config.authentication);
16010
16011        while let Some(auth_step) = theScheme.step()? {
16012            match auth_step {
16013                ::authentic::AuthenticationStep::Request(auth_request) => {
16014                    theScheme.respond(self.client.request(auth_request).await);
16015                }
16016                ::authentic::AuthenticationStep::WaitFor(duration) => {
16017                    (self.sleep)(duration).await;
16018                }
16019            }
16020        }
16021        let theBuilder = crate::v1_1_4::request::actions_list_self_hosted_runners_for_repo::http_builder(
16022            self.config.base_url.as_ref(),
16023            owner,
16024            repo,
16025            per_page,
16026            page,
16027            self.config.user_agent.as_ref(),
16028            self.config.accept.as_deref(),
16029        )?
16030        .with_authentication(&theScheme)?;
16031
16032        let theRequest =
16033            crate::v1_1_4::request::actions_list_self_hosted_runners_for_repo::hyper_request(theBuilder)?;
16034
16035        ::log::debug!("HTTP request: {:?}", &theRequest);
16036
16037        let theResponse = self.client.request(theRequest).await?;
16038
16039        ::log::debug!("HTTP response: {:?}", &theResponse);
16040
16041        Ok(theResponse)
16042    }
16043
16044    /// List runner applications for a repository
16045    /// 
16046    /// Lists binaries for the runner application that you can download and run.
16047    /// 
16048    /// You must authenticate using an access token with the `repo` scope to use this endpoint.
16049    /// 
16050    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository)
16051    pub async fn actions_list_runner_applications_for_repo(
16052        &self,
16053        owner: &str,
16054        repo: &str,
16055    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16056        let mut theScheme = AuthScheme::from(&self.config.authentication);
16057
16058        while let Some(auth_step) = theScheme.step()? {
16059            match auth_step {
16060                ::authentic::AuthenticationStep::Request(auth_request) => {
16061                    theScheme.respond(self.client.request(auth_request).await);
16062                }
16063                ::authentic::AuthenticationStep::WaitFor(duration) => {
16064                    (self.sleep)(duration).await;
16065                }
16066            }
16067        }
16068        let theBuilder = crate::v1_1_4::request::actions_list_runner_applications_for_repo::http_builder(
16069            self.config.base_url.as_ref(),
16070            owner,
16071            repo,
16072            self.config.user_agent.as_ref(),
16073            self.config.accept.as_deref(),
16074        )?
16075        .with_authentication(&theScheme)?;
16076
16077        let theRequest =
16078            crate::v1_1_4::request::actions_list_runner_applications_for_repo::hyper_request(theBuilder)?;
16079
16080        ::log::debug!("HTTP request: {:?}", &theRequest);
16081
16082        let theResponse = self.client.request(theRequest).await?;
16083
16084        ::log::debug!("HTTP response: {:?}", &theResponse);
16085
16086        Ok(theResponse)
16087    }
16088
16089    /// Create a registration token for a repository
16090    /// 
16091    /// Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate
16092    /// using an access token with the `repo` scope to use this endpoint.
16093    /// 
16094    /// #### Example using registration token
16095    ///  
16096    /// Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint.
16097    /// 
16098    /// ```text
16099    /// ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN
16100    /// ```
16101    /// 
16102    /// [API method documentation](https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository)
16103    pub async fn actions_create_registration_token_for_repo(
16104        &self,
16105        owner: &str,
16106        repo: &str,
16107    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16108        let mut theScheme = AuthScheme::from(&self.config.authentication);
16109
16110        while let Some(auth_step) = theScheme.step()? {
16111            match auth_step {
16112                ::authentic::AuthenticationStep::Request(auth_request) => {
16113                    theScheme.respond(self.client.request(auth_request).await);
16114                }
16115                ::authentic::AuthenticationStep::WaitFor(duration) => {
16116                    (self.sleep)(duration).await;
16117                }
16118            }
16119        }
16120        let theBuilder = crate::v1_1_4::request::actions_create_registration_token_for_repo::http_builder(
16121            self.config.base_url.as_ref(),
16122            owner,
16123            repo,
16124            self.config.user_agent.as_ref(),
16125            self.config.accept.as_deref(),
16126        )?
16127        .with_authentication(&theScheme)?;
16128
16129        let theRequest =
16130            crate::v1_1_4::request::actions_create_registration_token_for_repo::hyper_request(theBuilder)?;
16131
16132        ::log::debug!("HTTP request: {:?}", &theRequest);
16133
16134        let theResponse = self.client.request(theRequest).await?;
16135
16136        ::log::debug!("HTTP response: {:?}", &theResponse);
16137
16138        Ok(theResponse)
16139    }
16140
16141    /// Create a remove token for a repository
16142    /// 
16143    /// Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour.
16144    /// You must authenticate using an access token with the `repo` scope to use this endpoint.
16145    /// 
16146    /// #### Example using remove token
16147    ///  
16148    /// To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint.
16149    /// 
16150    /// ```text
16151    /// ./config.sh remove --token TOKEN
16152    /// ```
16153    /// 
16154    /// [API method documentation](https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository)
16155    pub async fn actions_create_remove_token_for_repo(
16156        &self,
16157        owner: &str,
16158        repo: &str,
16159    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16160        let mut theScheme = AuthScheme::from(&self.config.authentication);
16161
16162        while let Some(auth_step) = theScheme.step()? {
16163            match auth_step {
16164                ::authentic::AuthenticationStep::Request(auth_request) => {
16165                    theScheme.respond(self.client.request(auth_request).await);
16166                }
16167                ::authentic::AuthenticationStep::WaitFor(duration) => {
16168                    (self.sleep)(duration).await;
16169                }
16170            }
16171        }
16172        let theBuilder = crate::v1_1_4::request::actions_create_remove_token_for_repo::http_builder(
16173            self.config.base_url.as_ref(),
16174            owner,
16175            repo,
16176            self.config.user_agent.as_ref(),
16177            self.config.accept.as_deref(),
16178        )?
16179        .with_authentication(&theScheme)?;
16180
16181        let theRequest =
16182            crate::v1_1_4::request::actions_create_remove_token_for_repo::hyper_request(theBuilder)?;
16183
16184        ::log::debug!("HTTP request: {:?}", &theRequest);
16185
16186        let theResponse = self.client.request(theRequest).await?;
16187
16188        ::log::debug!("HTTP response: {:?}", &theResponse);
16189
16190        Ok(theResponse)
16191    }
16192
16193    /// Get a self-hosted runner for a repository
16194    /// 
16195    /// Gets a specific self-hosted runner configured in a repository.
16196    /// 
16197    /// You must authenticate using an access token with the `repo` scope to use this
16198    /// endpoint.
16199    /// 
16200    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository)
16201    pub async fn actions_get_self_hosted_runner_for_repo(
16202        &self,
16203        owner: &str,
16204        repo: &str,
16205        runner_id: i64,
16206    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16207        let mut theScheme = AuthScheme::from(&self.config.authentication);
16208
16209        while let Some(auth_step) = theScheme.step()? {
16210            match auth_step {
16211                ::authentic::AuthenticationStep::Request(auth_request) => {
16212                    theScheme.respond(self.client.request(auth_request).await);
16213                }
16214                ::authentic::AuthenticationStep::WaitFor(duration) => {
16215                    (self.sleep)(duration).await;
16216                }
16217            }
16218        }
16219        let theBuilder = crate::v1_1_4::request::actions_get_self_hosted_runner_for_repo::http_builder(
16220            self.config.base_url.as_ref(),
16221            owner,
16222            repo,
16223            runner_id,
16224            self.config.user_agent.as_ref(),
16225            self.config.accept.as_deref(),
16226        )?
16227        .with_authentication(&theScheme)?;
16228
16229        let theRequest =
16230            crate::v1_1_4::request::actions_get_self_hosted_runner_for_repo::hyper_request(theBuilder)?;
16231
16232        ::log::debug!("HTTP request: {:?}", &theRequest);
16233
16234        let theResponse = self.client.request(theRequest).await?;
16235
16236        ::log::debug!("HTTP response: {:?}", &theResponse);
16237
16238        Ok(theResponse)
16239    }
16240
16241    /// Delete a self-hosted runner from a repository
16242    /// 
16243    /// Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.
16244    /// 
16245    /// You must authenticate using an access token with the `repo`
16246    /// scope to use this endpoint.
16247    /// 
16248    /// [API method documentation](https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository)
16249    pub async fn actions_delete_self_hosted_runner_from_repo(
16250        &self,
16251        owner: &str,
16252        repo: &str,
16253        runner_id: i64,
16254    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16255        let mut theScheme = AuthScheme::from(&self.config.authentication);
16256
16257        while let Some(auth_step) = theScheme.step()? {
16258            match auth_step {
16259                ::authentic::AuthenticationStep::Request(auth_request) => {
16260                    theScheme.respond(self.client.request(auth_request).await);
16261                }
16262                ::authentic::AuthenticationStep::WaitFor(duration) => {
16263                    (self.sleep)(duration).await;
16264                }
16265            }
16266        }
16267        let theBuilder = crate::v1_1_4::request::actions_delete_self_hosted_runner_from_repo::http_builder(
16268            self.config.base_url.as_ref(),
16269            owner,
16270            repo,
16271            runner_id,
16272            self.config.user_agent.as_ref(),
16273            self.config.accept.as_deref(),
16274        )?
16275        .with_authentication(&theScheme)?;
16276
16277        let theRequest =
16278            crate::v1_1_4::request::actions_delete_self_hosted_runner_from_repo::hyper_request(theBuilder)?;
16279
16280        ::log::debug!("HTTP request: {:?}", &theRequest);
16281
16282        let theResponse = self.client.request(theRequest).await?;
16283
16284        ::log::debug!("HTTP response: {:?}", &theResponse);
16285
16286        Ok(theResponse)
16287    }
16288
16289    /// List labels for a self-hosted runner for a repository
16290    /// 
16291    /// Lists all labels for a self-hosted runner configured in a repository.
16292    /// 
16293    /// You must authenticate using an access token with the `repo` scope to use this
16294    /// endpoint.
16295    /// 
16296    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository)
16297    pub async fn actions_list_labels_for_self_hosted_runner_for_repo(
16298        &self,
16299        owner: &str,
16300        repo: &str,
16301        runner_id: i64,
16302    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16303        let mut theScheme = AuthScheme::from(&self.config.authentication);
16304
16305        while let Some(auth_step) = theScheme.step()? {
16306            match auth_step {
16307                ::authentic::AuthenticationStep::Request(auth_request) => {
16308                    theScheme.respond(self.client.request(auth_request).await);
16309                }
16310                ::authentic::AuthenticationStep::WaitFor(duration) => {
16311                    (self.sleep)(duration).await;
16312                }
16313            }
16314        }
16315        let theBuilder = crate::v1_1_4::request::actions_list_labels_for_self_hosted_runner_for_repo::http_builder(
16316            self.config.base_url.as_ref(),
16317            owner,
16318            repo,
16319            runner_id,
16320            self.config.user_agent.as_ref(),
16321            self.config.accept.as_deref(),
16322        )?
16323        .with_authentication(&theScheme)?;
16324
16325        let theRequest =
16326            crate::v1_1_4::request::actions_list_labels_for_self_hosted_runner_for_repo::hyper_request(theBuilder)?;
16327
16328        ::log::debug!("HTTP request: {:?}", &theRequest);
16329
16330        let theResponse = self.client.request(theRequest).await?;
16331
16332        ::log::debug!("HTTP response: {:?}", &theResponse);
16333
16334        Ok(theResponse)
16335    }
16336
16337    /// Set custom labels for a self-hosted runner for a repository
16338    /// 
16339    /// Remove all previous custom labels and set the new custom labels for a specific
16340    /// self-hosted runner configured in a repository.
16341    /// 
16342    /// You must authenticate using an access token with the `repo` scope to use this
16343    /// endpoint.
16344    /// 
16345    /// [API method documentation](https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository)
16346    ///
16347    /// # Content
16348    ///
16349    /// - [`&v1_1_4::request::actions_set_custom_labels_for_self_hosted_runner_for_repo::body::Json`](crate::v1_1_4::request::actions_set_custom_labels_for_self_hosted_runner_for_repo::body::Json)
16350    pub async fn actions_set_custom_labels_for_self_hosted_runner_for_repo<Content>(
16351        &self,
16352        owner: &str,
16353        repo: &str,
16354        runner_id: i64,
16355        theContent: Content,
16356    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
16357    where
16358        Content: Copy + TryInto<crate::v1_1_4::request::actions_set_custom_labels_for_self_hosted_runner_for_repo::Content<::hyper::Body>>,
16359        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_set_custom_labels_for_self_hosted_runner_for_repo::Content<::hyper::Body>>>::Error>
16360    {
16361        let mut theScheme = AuthScheme::from(&self.config.authentication);
16362
16363        while let Some(auth_step) = theScheme.step()? {
16364            match auth_step {
16365                ::authentic::AuthenticationStep::Request(auth_request) => {
16366                    theScheme.respond(self.client.request(auth_request).await);
16367                }
16368                ::authentic::AuthenticationStep::WaitFor(duration) => {
16369                    (self.sleep)(duration).await;
16370                }
16371            }
16372        }
16373        let theBuilder = crate::v1_1_4::request::actions_set_custom_labels_for_self_hosted_runner_for_repo::http_builder(
16374            self.config.base_url.as_ref(),
16375            owner,
16376            repo,
16377            runner_id,
16378            self.config.user_agent.as_ref(),
16379            self.config.accept.as_deref(),
16380        )?
16381        .with_authentication(&theScheme)?;
16382
16383        let theRequest = crate::v1_1_4::request::actions_set_custom_labels_for_self_hosted_runner_for_repo::hyper_request(
16384            theBuilder,
16385            theContent.try_into()?,
16386        )?;
16387
16388        ::log::debug!("HTTP request: {:?}", &theRequest);
16389
16390        let theResponse = self.client.request(theRequest).await?;
16391
16392        ::log::debug!("HTTP response: {:?}", &theResponse);
16393
16394        Ok(theResponse)
16395    }
16396
16397    /// Add custom labels to a self-hosted runner for a repository
16398    /// 
16399    /// Add custom labels to a self-hosted runner configured in a repository.
16400    /// 
16401    /// You must authenticate using an access token with the `repo` scope to use this
16402    /// endpoint.
16403    /// 
16404    /// [API method documentation](https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository)
16405    ///
16406    /// # Content
16407    ///
16408    /// - [`&v1_1_4::request::actions_add_custom_labels_to_self_hosted_runner_for_repo::body::Json`](crate::v1_1_4::request::actions_add_custom_labels_to_self_hosted_runner_for_repo::body::Json)
16409    pub async fn actions_add_custom_labels_to_self_hosted_runner_for_repo<Content>(
16410        &self,
16411        owner: &str,
16412        repo: &str,
16413        runner_id: i64,
16414        theContent: Content,
16415    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
16416    where
16417        Content: Copy + TryInto<crate::v1_1_4::request::actions_add_custom_labels_to_self_hosted_runner_for_repo::Content<::hyper::Body>>,
16418        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_add_custom_labels_to_self_hosted_runner_for_repo::Content<::hyper::Body>>>::Error>
16419    {
16420        let mut theScheme = AuthScheme::from(&self.config.authentication);
16421
16422        while let Some(auth_step) = theScheme.step()? {
16423            match auth_step {
16424                ::authentic::AuthenticationStep::Request(auth_request) => {
16425                    theScheme.respond(self.client.request(auth_request).await);
16426                }
16427                ::authentic::AuthenticationStep::WaitFor(duration) => {
16428                    (self.sleep)(duration).await;
16429                }
16430            }
16431        }
16432        let theBuilder = crate::v1_1_4::request::actions_add_custom_labels_to_self_hosted_runner_for_repo::http_builder(
16433            self.config.base_url.as_ref(),
16434            owner,
16435            repo,
16436            runner_id,
16437            self.config.user_agent.as_ref(),
16438            self.config.accept.as_deref(),
16439        )?
16440        .with_authentication(&theScheme)?;
16441
16442        let theRequest = crate::v1_1_4::request::actions_add_custom_labels_to_self_hosted_runner_for_repo::hyper_request(
16443            theBuilder,
16444            theContent.try_into()?,
16445        )?;
16446
16447        ::log::debug!("HTTP request: {:?}", &theRequest);
16448
16449        let theResponse = self.client.request(theRequest).await?;
16450
16451        ::log::debug!("HTTP response: {:?}", &theResponse);
16452
16453        Ok(theResponse)
16454    }
16455
16456    /// Remove all custom labels from a self-hosted runner for a repository
16457    /// 
16458    /// Remove all custom labels from a self-hosted runner configured in a
16459    /// repository. Returns the remaining read-only labels from the runner.
16460    /// 
16461    /// You must authenticate using an access token with the `repo` scope to use this
16462    /// endpoint.
16463    /// 
16464    /// [API method documentation](https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository)
16465    pub async fn actions_remove_all_custom_labels_from_self_hosted_runner_for_repo(
16466        &self,
16467        owner: &str,
16468        repo: &str,
16469        runner_id: i64,
16470    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16471        let mut theScheme = AuthScheme::from(&self.config.authentication);
16472
16473        while let Some(auth_step) = theScheme.step()? {
16474            match auth_step {
16475                ::authentic::AuthenticationStep::Request(auth_request) => {
16476                    theScheme.respond(self.client.request(auth_request).await);
16477                }
16478                ::authentic::AuthenticationStep::WaitFor(duration) => {
16479                    (self.sleep)(duration).await;
16480                }
16481            }
16482        }
16483        let theBuilder = crate::v1_1_4::request::actions_remove_all_custom_labels_from_self_hosted_runner_for_repo::http_builder(
16484            self.config.base_url.as_ref(),
16485            owner,
16486            repo,
16487            runner_id,
16488            self.config.user_agent.as_ref(),
16489            self.config.accept.as_deref(),
16490        )?
16491        .with_authentication(&theScheme)?;
16492
16493        let theRequest =
16494            crate::v1_1_4::request::actions_remove_all_custom_labels_from_self_hosted_runner_for_repo::hyper_request(theBuilder)?;
16495
16496        ::log::debug!("HTTP request: {:?}", &theRequest);
16497
16498        let theResponse = self.client.request(theRequest).await?;
16499
16500        ::log::debug!("HTTP response: {:?}", &theResponse);
16501
16502        Ok(theResponse)
16503    }
16504
16505    /// Remove a custom label from a self-hosted runner for a repository
16506    /// 
16507    /// Remove a custom label from a self-hosted runner configured
16508    /// in a repository. Returns the remaining labels from the runner.
16509    /// 
16510    /// This endpoint returns a `404 Not Found` status if the custom label is not
16511    /// present on the runner.
16512    /// 
16513    /// You must authenticate using an access token with the `repo` scope to use this
16514    /// endpoint.
16515    /// 
16516    /// [API method documentation](https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository)
16517    pub async fn actions_remove_custom_label_from_self_hosted_runner_for_repo(
16518        &self,
16519        owner: &str,
16520        repo: &str,
16521        runner_id: i64,
16522        name: &str,
16523    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16524        let mut theScheme = AuthScheme::from(&self.config.authentication);
16525
16526        while let Some(auth_step) = theScheme.step()? {
16527            match auth_step {
16528                ::authentic::AuthenticationStep::Request(auth_request) => {
16529                    theScheme.respond(self.client.request(auth_request).await);
16530                }
16531                ::authentic::AuthenticationStep::WaitFor(duration) => {
16532                    (self.sleep)(duration).await;
16533                }
16534            }
16535        }
16536        let theBuilder = crate::v1_1_4::request::actions_remove_custom_label_from_self_hosted_runner_for_repo::http_builder(
16537            self.config.base_url.as_ref(),
16538            owner,
16539            repo,
16540            runner_id,
16541            name,
16542            self.config.user_agent.as_ref(),
16543            self.config.accept.as_deref(),
16544        )?
16545        .with_authentication(&theScheme)?;
16546
16547        let theRequest =
16548            crate::v1_1_4::request::actions_remove_custom_label_from_self_hosted_runner_for_repo::hyper_request(theBuilder)?;
16549
16550        ::log::debug!("HTTP request: {:?}", &theRequest);
16551
16552        let theResponse = self.client.request(theRequest).await?;
16553
16554        ::log::debug!("HTTP response: {:?}", &theResponse);
16555
16556        Ok(theResponse)
16557    }
16558
16559    /// List workflow runs for a repository
16560    /// 
16561    /// 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/rest/overview/resources-in-the-rest-api#parameters).
16562    /// 
16563    /// Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
16564    /// 
16565    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository)
16566    #[allow(clippy::too_many_arguments)]
16567    pub async fn actions_list_workflow_runs_for_repo(
16568        &self,
16569        owner: &str,
16570        repo: &str,
16571        actor: ::std::option::Option<&str>,
16572        branch: ::std::option::Option<&str>,
16573        event: ::std::option::Option<&str>,
16574        status: ::std::option::Option<&str>,
16575        per_page: ::std::option::Option<i64>,
16576        page: ::std::option::Option<i64>,
16577        created: ::std::option::Option<&str>,
16578        exclude_pull_requests: ::std::option::Option<bool>,
16579        check_suite_id: ::std::option::Option<i64>,
16580    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16581        let mut theScheme = AuthScheme::from(&self.config.authentication);
16582
16583        while let Some(auth_step) = theScheme.step()? {
16584            match auth_step {
16585                ::authentic::AuthenticationStep::Request(auth_request) => {
16586                    theScheme.respond(self.client.request(auth_request).await);
16587                }
16588                ::authentic::AuthenticationStep::WaitFor(duration) => {
16589                    (self.sleep)(duration).await;
16590                }
16591            }
16592        }
16593        let theBuilder = crate::v1_1_4::request::actions_list_workflow_runs_for_repo::http_builder(
16594            self.config.base_url.as_ref(),
16595            owner,
16596            repo,
16597            actor,
16598            branch,
16599            event,
16600            status,
16601            per_page,
16602            page,
16603            created,
16604            exclude_pull_requests,
16605            check_suite_id,
16606            self.config.user_agent.as_ref(),
16607            self.config.accept.as_deref(),
16608        )?
16609        .with_authentication(&theScheme)?;
16610
16611        let theRequest =
16612            crate::v1_1_4::request::actions_list_workflow_runs_for_repo::hyper_request(theBuilder)?;
16613
16614        ::log::debug!("HTTP request: {:?}", &theRequest);
16615
16616        let theResponse = self.client.request(theRequest).await?;
16617
16618        ::log::debug!("HTTP response: {:?}", &theResponse);
16619
16620        Ok(theResponse)
16621    }
16622
16623    /// Get a workflow run
16624    /// 
16625    /// Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
16626    /// 
16627    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-a-workflow-run)
16628    pub async fn actions_get_workflow_run(
16629        &self,
16630        owner: &str,
16631        repo: &str,
16632        run_id: i64,
16633        exclude_pull_requests: ::std::option::Option<bool>,
16634    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16635        let mut theScheme = AuthScheme::from(&self.config.authentication);
16636
16637        while let Some(auth_step) = theScheme.step()? {
16638            match auth_step {
16639                ::authentic::AuthenticationStep::Request(auth_request) => {
16640                    theScheme.respond(self.client.request(auth_request).await);
16641                }
16642                ::authentic::AuthenticationStep::WaitFor(duration) => {
16643                    (self.sleep)(duration).await;
16644                }
16645            }
16646        }
16647        let theBuilder = crate::v1_1_4::request::actions_get_workflow_run::http_builder(
16648            self.config.base_url.as_ref(),
16649            owner,
16650            repo,
16651            run_id,
16652            exclude_pull_requests,
16653            self.config.user_agent.as_ref(),
16654            self.config.accept.as_deref(),
16655        )?
16656        .with_authentication(&theScheme)?;
16657
16658        let theRequest =
16659            crate::v1_1_4::request::actions_get_workflow_run::hyper_request(theBuilder)?;
16660
16661        ::log::debug!("HTTP request: {:?}", &theRequest);
16662
16663        let theResponse = self.client.request(theRequest).await?;
16664
16665        ::log::debug!("HTTP response: {:?}", &theResponse);
16666
16667        Ok(theResponse)
16668    }
16669
16670    /// Delete a workflow run
16671    /// 
16672    /// Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is
16673    /// private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use
16674    /// this endpoint.
16675    /// 
16676    /// [API method documentation](https://docs.github.com/rest/reference/actions#delete-a-workflow-run)
16677    pub async fn actions_delete_workflow_run(
16678        &self,
16679        owner: &str,
16680        repo: &str,
16681        run_id: i64,
16682    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16683        let mut theScheme = AuthScheme::from(&self.config.authentication);
16684
16685        while let Some(auth_step) = theScheme.step()? {
16686            match auth_step {
16687                ::authentic::AuthenticationStep::Request(auth_request) => {
16688                    theScheme.respond(self.client.request(auth_request).await);
16689                }
16690                ::authentic::AuthenticationStep::WaitFor(duration) => {
16691                    (self.sleep)(duration).await;
16692                }
16693            }
16694        }
16695        let theBuilder = crate::v1_1_4::request::actions_delete_workflow_run::http_builder(
16696            self.config.base_url.as_ref(),
16697            owner,
16698            repo,
16699            run_id,
16700            self.config.user_agent.as_ref(),
16701            self.config.accept.as_deref(),
16702        )?
16703        .with_authentication(&theScheme)?;
16704
16705        let theRequest =
16706            crate::v1_1_4::request::actions_delete_workflow_run::hyper_request(theBuilder)?;
16707
16708        ::log::debug!("HTTP request: {:?}", &theRequest);
16709
16710        let theResponse = self.client.request(theRequest).await?;
16711
16712        ::log::debug!("HTTP response: {:?}", &theResponse);
16713
16714        Ok(theResponse)
16715    }
16716
16717    /// Get the review history for a workflow run
16718    /// 
16719    /// Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
16720    /// 
16721    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run)
16722    pub async fn actions_get_reviews_for_run(
16723        &self,
16724        owner: &str,
16725        repo: &str,
16726        run_id: i64,
16727    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16728        let mut theScheme = AuthScheme::from(&self.config.authentication);
16729
16730        while let Some(auth_step) = theScheme.step()? {
16731            match auth_step {
16732                ::authentic::AuthenticationStep::Request(auth_request) => {
16733                    theScheme.respond(self.client.request(auth_request).await);
16734                }
16735                ::authentic::AuthenticationStep::WaitFor(duration) => {
16736                    (self.sleep)(duration).await;
16737                }
16738            }
16739        }
16740        let theBuilder = crate::v1_1_4::request::actions_get_reviews_for_run::http_builder(
16741            self.config.base_url.as_ref(),
16742            owner,
16743            repo,
16744            run_id,
16745            self.config.user_agent.as_ref(),
16746            self.config.accept.as_deref(),
16747        )?
16748        .with_authentication(&theScheme)?;
16749
16750        let theRequest =
16751            crate::v1_1_4::request::actions_get_reviews_for_run::hyper_request(theBuilder)?;
16752
16753        ::log::debug!("HTTP request: {:?}", &theRequest);
16754
16755        let theResponse = self.client.request(theRequest).await?;
16756
16757        ::log::debug!("HTTP response: {:?}", &theResponse);
16758
16759        Ok(theResponse)
16760    }
16761
16762    /// Approve a workflow run for a fork pull request
16763    /// 
16764    /// Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)."
16765    /// 
16766    /// You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
16767    /// 
16768    /// [API method documentation](https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request)
16769    pub async fn actions_approve_workflow_run(
16770        &self,
16771        owner: &str,
16772        repo: &str,
16773        run_id: i64,
16774    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16775        let mut theScheme = AuthScheme::from(&self.config.authentication);
16776
16777        while let Some(auth_step) = theScheme.step()? {
16778            match auth_step {
16779                ::authentic::AuthenticationStep::Request(auth_request) => {
16780                    theScheme.respond(self.client.request(auth_request).await);
16781                }
16782                ::authentic::AuthenticationStep::WaitFor(duration) => {
16783                    (self.sleep)(duration).await;
16784                }
16785            }
16786        }
16787        let theBuilder = crate::v1_1_4::request::actions_approve_workflow_run::http_builder(
16788            self.config.base_url.as_ref(),
16789            owner,
16790            repo,
16791            run_id,
16792            self.config.user_agent.as_ref(),
16793            self.config.accept.as_deref(),
16794        )?
16795        .with_authentication(&theScheme)?;
16796
16797        let theRequest =
16798            crate::v1_1_4::request::actions_approve_workflow_run::hyper_request(theBuilder)?;
16799
16800        ::log::debug!("HTTP request: {:?}", &theRequest);
16801
16802        let theResponse = self.client.request(theRequest).await?;
16803
16804        ::log::debug!("HTTP response: {:?}", &theResponse);
16805
16806        Ok(theResponse)
16807    }
16808
16809    /// List workflow run artifacts
16810    /// 
16811    /// Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
16812    /// 
16813    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts)
16814    pub async fn actions_list_workflow_run_artifacts(
16815        &self,
16816        owner: &str,
16817        repo: &str,
16818        run_id: i64,
16819        per_page: ::std::option::Option<i64>,
16820        page: ::std::option::Option<i64>,
16821    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16822        let mut theScheme = AuthScheme::from(&self.config.authentication);
16823
16824        while let Some(auth_step) = theScheme.step()? {
16825            match auth_step {
16826                ::authentic::AuthenticationStep::Request(auth_request) => {
16827                    theScheme.respond(self.client.request(auth_request).await);
16828                }
16829                ::authentic::AuthenticationStep::WaitFor(duration) => {
16830                    (self.sleep)(duration).await;
16831                }
16832            }
16833        }
16834        let theBuilder = crate::v1_1_4::request::actions_list_workflow_run_artifacts::http_builder(
16835            self.config.base_url.as_ref(),
16836            owner,
16837            repo,
16838            run_id,
16839            per_page,
16840            page,
16841            self.config.user_agent.as_ref(),
16842            self.config.accept.as_deref(),
16843        )?
16844        .with_authentication(&theScheme)?;
16845
16846        let theRequest =
16847            crate::v1_1_4::request::actions_list_workflow_run_artifacts::hyper_request(theBuilder)?;
16848
16849        ::log::debug!("HTTP request: {:?}", &theRequest);
16850
16851        let theResponse = self.client.request(theRequest).await?;
16852
16853        ::log::debug!("HTTP response: {:?}", &theResponse);
16854
16855        Ok(theResponse)
16856    }
16857
16858    /// Get a workflow run attempt
16859    /// 
16860    /// Gets a specific workflow run attempt. Anyone with read access to the repository
16861    /// can use this endpoint. If the repository is private you must use an access token
16862    /// with the `repo` scope. GitHub Apps must have the `actions:read` permission to
16863    /// use this endpoint.
16864    /// 
16865    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt)
16866    pub async fn actions_get_workflow_run_attempt(
16867        &self,
16868        owner: &str,
16869        repo: &str,
16870        run_id: i64,
16871        attempt_number: i64,
16872        exclude_pull_requests: ::std::option::Option<bool>,
16873    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16874        let mut theScheme = AuthScheme::from(&self.config.authentication);
16875
16876        while let Some(auth_step) = theScheme.step()? {
16877            match auth_step {
16878                ::authentic::AuthenticationStep::Request(auth_request) => {
16879                    theScheme.respond(self.client.request(auth_request).await);
16880                }
16881                ::authentic::AuthenticationStep::WaitFor(duration) => {
16882                    (self.sleep)(duration).await;
16883                }
16884            }
16885        }
16886        let theBuilder = crate::v1_1_4::request::actions_get_workflow_run_attempt::http_builder(
16887            self.config.base_url.as_ref(),
16888            owner,
16889            repo,
16890            run_id,
16891            attempt_number,
16892            exclude_pull_requests,
16893            self.config.user_agent.as_ref(),
16894            self.config.accept.as_deref(),
16895        )?
16896        .with_authentication(&theScheme)?;
16897
16898        let theRequest =
16899            crate::v1_1_4::request::actions_get_workflow_run_attempt::hyper_request(theBuilder)?;
16900
16901        ::log::debug!("HTTP request: {:?}", &theRequest);
16902
16903        let theResponse = self.client.request(theRequest).await?;
16904
16905        ::log::debug!("HTTP response: {:?}", &theResponse);
16906
16907        Ok(theResponse)
16908    }
16909
16910    /// List jobs for a workflow run attempt
16911    /// 
16912    /// Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).
16913    /// 
16914    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt)
16915    pub async fn actions_list_jobs_for_workflow_run_attempt(
16916        &self,
16917        owner: &str,
16918        repo: &str,
16919        run_id: i64,
16920        attempt_number: i64,
16921        per_page: ::std::option::Option<i64>,
16922        page: ::std::option::Option<i64>,
16923    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16924        let mut theScheme = AuthScheme::from(&self.config.authentication);
16925
16926        while let Some(auth_step) = theScheme.step()? {
16927            match auth_step {
16928                ::authentic::AuthenticationStep::Request(auth_request) => {
16929                    theScheme.respond(self.client.request(auth_request).await);
16930                }
16931                ::authentic::AuthenticationStep::WaitFor(duration) => {
16932                    (self.sleep)(duration).await;
16933                }
16934            }
16935        }
16936        let theBuilder = crate::v1_1_4::request::actions_list_jobs_for_workflow_run_attempt::http_builder(
16937            self.config.base_url.as_ref(),
16938            owner,
16939            repo,
16940            run_id,
16941            attempt_number,
16942            per_page,
16943            page,
16944            self.config.user_agent.as_ref(),
16945            self.config.accept.as_deref(),
16946        )?
16947        .with_authentication(&theScheme)?;
16948
16949        let theRequest =
16950            crate::v1_1_4::request::actions_list_jobs_for_workflow_run_attempt::hyper_request(theBuilder)?;
16951
16952        ::log::debug!("HTTP request: {:?}", &theRequest);
16953
16954        let theResponse = self.client.request(theRequest).await?;
16955
16956        ::log::debug!("HTTP response: {:?}", &theResponse);
16957
16958        Ok(theResponse)
16959    }
16960
16961    /// Download workflow run attempt logs
16962    /// 
16963    /// Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after
16964    /// 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to
16965    /// the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.
16966    /// GitHub Apps must have the `actions:read` permission to use this endpoint.
16967    /// 
16968    /// [API method documentation](https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs)
16969    pub async fn actions_download_workflow_run_attempt_logs(
16970        &self,
16971        owner: &str,
16972        repo: &str,
16973        run_id: i64,
16974        attempt_number: i64,
16975    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
16976        let mut theScheme = AuthScheme::from(&self.config.authentication);
16977
16978        while let Some(auth_step) = theScheme.step()? {
16979            match auth_step {
16980                ::authentic::AuthenticationStep::Request(auth_request) => {
16981                    theScheme.respond(self.client.request(auth_request).await);
16982                }
16983                ::authentic::AuthenticationStep::WaitFor(duration) => {
16984                    (self.sleep)(duration).await;
16985                }
16986            }
16987        }
16988        let theBuilder = crate::v1_1_4::request::actions_download_workflow_run_attempt_logs::http_builder(
16989            self.config.base_url.as_ref(),
16990            owner,
16991            repo,
16992            run_id,
16993            attempt_number,
16994            self.config.user_agent.as_ref(),
16995            self.config.accept.as_deref(),
16996        )?
16997        .with_authentication(&theScheme)?;
16998
16999        let theRequest =
17000            crate::v1_1_4::request::actions_download_workflow_run_attempt_logs::hyper_request(theBuilder)?;
17001
17002        ::log::debug!("HTTP request: {:?}", &theRequest);
17003
17004        let theResponse = self.client.request(theRequest).await?;
17005
17006        ::log::debug!("HTTP response: {:?}", &theResponse);
17007
17008        Ok(theResponse)
17009    }
17010
17011    /// Cancel a workflow run
17012    /// 
17013    /// Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
17014    /// 
17015    /// [API method documentation](https://docs.github.com/rest/reference/actions#cancel-a-workflow-run)
17016    pub async fn actions_cancel_workflow_run(
17017        &self,
17018        owner: &str,
17019        repo: &str,
17020        run_id: i64,
17021    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17022        let mut theScheme = AuthScheme::from(&self.config.authentication);
17023
17024        while let Some(auth_step) = theScheme.step()? {
17025            match auth_step {
17026                ::authentic::AuthenticationStep::Request(auth_request) => {
17027                    theScheme.respond(self.client.request(auth_request).await);
17028                }
17029                ::authentic::AuthenticationStep::WaitFor(duration) => {
17030                    (self.sleep)(duration).await;
17031                }
17032            }
17033        }
17034        let theBuilder = crate::v1_1_4::request::actions_cancel_workflow_run::http_builder(
17035            self.config.base_url.as_ref(),
17036            owner,
17037            repo,
17038            run_id,
17039            self.config.user_agent.as_ref(),
17040            self.config.accept.as_deref(),
17041        )?
17042        .with_authentication(&theScheme)?;
17043
17044        let theRequest =
17045            crate::v1_1_4::request::actions_cancel_workflow_run::hyper_request(theBuilder)?;
17046
17047        ::log::debug!("HTTP request: {:?}", &theRequest);
17048
17049        let theResponse = self.client.request(theRequest).await?;
17050
17051        ::log::debug!("HTTP response: {:?}", &theResponse);
17052
17053        Ok(theResponse)
17054    }
17055
17056    /// List jobs for a workflow run
17057    /// 
17058    /// Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters).
17059    /// 
17060    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run)
17061    pub async fn actions_list_jobs_for_workflow_run(
17062        &self,
17063        owner: &str,
17064        repo: &str,
17065        run_id: i64,
17066        filter: ::std::option::Option<&str>,
17067        per_page: ::std::option::Option<i64>,
17068        page: ::std::option::Option<i64>,
17069    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17070        let mut theScheme = AuthScheme::from(&self.config.authentication);
17071
17072        while let Some(auth_step) = theScheme.step()? {
17073            match auth_step {
17074                ::authentic::AuthenticationStep::Request(auth_request) => {
17075                    theScheme.respond(self.client.request(auth_request).await);
17076                }
17077                ::authentic::AuthenticationStep::WaitFor(duration) => {
17078                    (self.sleep)(duration).await;
17079                }
17080            }
17081        }
17082        let theBuilder = crate::v1_1_4::request::actions_list_jobs_for_workflow_run::http_builder(
17083            self.config.base_url.as_ref(),
17084            owner,
17085            repo,
17086            run_id,
17087            filter,
17088            per_page,
17089            page,
17090            self.config.user_agent.as_ref(),
17091            self.config.accept.as_deref(),
17092        )?
17093        .with_authentication(&theScheme)?;
17094
17095        let theRequest =
17096            crate::v1_1_4::request::actions_list_jobs_for_workflow_run::hyper_request(theBuilder)?;
17097
17098        ::log::debug!("HTTP request: {:?}", &theRequest);
17099
17100        let theResponse = self.client.request(theRequest).await?;
17101
17102        ::log::debug!("HTTP response: {:?}", &theResponse);
17103
17104        Ok(theResponse)
17105    }
17106
17107    /// Download workflow run logs
17108    /// 
17109    /// Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for
17110    /// `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use
17111    /// this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have
17112    /// the `actions:read` permission to use this endpoint.
17113    /// 
17114    /// [API method documentation](https://docs.github.com/rest/reference/actions#download-workflow-run-logs)
17115    pub async fn actions_download_workflow_run_logs(
17116        &self,
17117        owner: &str,
17118        repo: &str,
17119        run_id: i64,
17120    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17121        let mut theScheme = AuthScheme::from(&self.config.authentication);
17122
17123        while let Some(auth_step) = theScheme.step()? {
17124            match auth_step {
17125                ::authentic::AuthenticationStep::Request(auth_request) => {
17126                    theScheme.respond(self.client.request(auth_request).await);
17127                }
17128                ::authentic::AuthenticationStep::WaitFor(duration) => {
17129                    (self.sleep)(duration).await;
17130                }
17131            }
17132        }
17133        let theBuilder = crate::v1_1_4::request::actions_download_workflow_run_logs::http_builder(
17134            self.config.base_url.as_ref(),
17135            owner,
17136            repo,
17137            run_id,
17138            self.config.user_agent.as_ref(),
17139            self.config.accept.as_deref(),
17140        )?
17141        .with_authentication(&theScheme)?;
17142
17143        let theRequest =
17144            crate::v1_1_4::request::actions_download_workflow_run_logs::hyper_request(theBuilder)?;
17145
17146        ::log::debug!("HTTP request: {:?}", &theRequest);
17147
17148        let theResponse = self.client.request(theRequest).await?;
17149
17150        ::log::debug!("HTTP response: {:?}", &theResponse);
17151
17152        Ok(theResponse)
17153    }
17154
17155    /// Delete workflow run logs
17156    /// 
17157    /// Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
17158    /// 
17159    /// [API method documentation](https://docs.github.com/rest/reference/actions#delete-workflow-run-logs)
17160    pub async fn actions_delete_workflow_run_logs(
17161        &self,
17162        owner: &str,
17163        repo: &str,
17164        run_id: i64,
17165    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17166        let mut theScheme = AuthScheme::from(&self.config.authentication);
17167
17168        while let Some(auth_step) = theScheme.step()? {
17169            match auth_step {
17170                ::authentic::AuthenticationStep::Request(auth_request) => {
17171                    theScheme.respond(self.client.request(auth_request).await);
17172                }
17173                ::authentic::AuthenticationStep::WaitFor(duration) => {
17174                    (self.sleep)(duration).await;
17175                }
17176            }
17177        }
17178        let theBuilder = crate::v1_1_4::request::actions_delete_workflow_run_logs::http_builder(
17179            self.config.base_url.as_ref(),
17180            owner,
17181            repo,
17182            run_id,
17183            self.config.user_agent.as_ref(),
17184            self.config.accept.as_deref(),
17185        )?
17186        .with_authentication(&theScheme)?;
17187
17188        let theRequest =
17189            crate::v1_1_4::request::actions_delete_workflow_run_logs::hyper_request(theBuilder)?;
17190
17191        ::log::debug!("HTTP request: {:?}", &theRequest);
17192
17193        let theResponse = self.client.request(theRequest).await?;
17194
17195        ::log::debug!("HTTP response: {:?}", &theResponse);
17196
17197        Ok(theResponse)
17198    }
17199
17200    /// Get pending deployments for a workflow run
17201    /// 
17202    /// Get all deployment environments for a workflow run that are waiting for protection rules to pass.
17203    /// 
17204    /// Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
17205    /// 
17206    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run)
17207    pub async fn actions_get_pending_deployments_for_run(
17208        &self,
17209        owner: &str,
17210        repo: &str,
17211        run_id: i64,
17212    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17213        let mut theScheme = AuthScheme::from(&self.config.authentication);
17214
17215        while let Some(auth_step) = theScheme.step()? {
17216            match auth_step {
17217                ::authentic::AuthenticationStep::Request(auth_request) => {
17218                    theScheme.respond(self.client.request(auth_request).await);
17219                }
17220                ::authentic::AuthenticationStep::WaitFor(duration) => {
17221                    (self.sleep)(duration).await;
17222                }
17223            }
17224        }
17225        let theBuilder = crate::v1_1_4::request::actions_get_pending_deployments_for_run::http_builder(
17226            self.config.base_url.as_ref(),
17227            owner,
17228            repo,
17229            run_id,
17230            self.config.user_agent.as_ref(),
17231            self.config.accept.as_deref(),
17232        )?
17233        .with_authentication(&theScheme)?;
17234
17235        let theRequest =
17236            crate::v1_1_4::request::actions_get_pending_deployments_for_run::hyper_request(theBuilder)?;
17237
17238        ::log::debug!("HTTP request: {:?}", &theRequest);
17239
17240        let theResponse = self.client.request(theRequest).await?;
17241
17242        ::log::debug!("HTTP response: {:?}", &theResponse);
17243
17244        Ok(theResponse)
17245    }
17246
17247    /// Review pending deployments for a workflow run
17248    /// 
17249    /// Approve or reject pending deployments that are waiting on approval by a required reviewer.
17250    /// 
17251    /// Anyone with read access to the repository contents and deployments can use this endpoint.
17252    /// 
17253    /// [API method documentation](https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run)
17254    ///
17255    /// # Content
17256    ///
17257    /// - [`&v1_1_4::request::actions_review_pending_deployments_for_run::body::Json`](crate::v1_1_4::request::actions_review_pending_deployments_for_run::body::Json)
17258    pub async fn actions_review_pending_deployments_for_run<Content>(
17259        &self,
17260        owner: &str,
17261        repo: &str,
17262        run_id: i64,
17263        theContent: Content,
17264    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
17265    where
17266        Content: Copy + TryInto<crate::v1_1_4::request::actions_review_pending_deployments_for_run::Content<::hyper::Body>>,
17267        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_review_pending_deployments_for_run::Content<::hyper::Body>>>::Error>
17268    {
17269        let mut theScheme = AuthScheme::from(&self.config.authentication);
17270
17271        while let Some(auth_step) = theScheme.step()? {
17272            match auth_step {
17273                ::authentic::AuthenticationStep::Request(auth_request) => {
17274                    theScheme.respond(self.client.request(auth_request).await);
17275                }
17276                ::authentic::AuthenticationStep::WaitFor(duration) => {
17277                    (self.sleep)(duration).await;
17278                }
17279            }
17280        }
17281        let theBuilder = crate::v1_1_4::request::actions_review_pending_deployments_for_run::http_builder(
17282            self.config.base_url.as_ref(),
17283            owner,
17284            repo,
17285            run_id,
17286            self.config.user_agent.as_ref(),
17287            self.config.accept.as_deref(),
17288        )?
17289        .with_authentication(&theScheme)?;
17290
17291        let theRequest = crate::v1_1_4::request::actions_review_pending_deployments_for_run::hyper_request(
17292            theBuilder,
17293            theContent.try_into()?,
17294        )?;
17295
17296        ::log::debug!("HTTP request: {:?}", &theRequest);
17297
17298        let theResponse = self.client.request(theRequest).await?;
17299
17300        ::log::debug!("HTTP response: {:?}", &theResponse);
17301
17302        Ok(theResponse)
17303    }
17304
17305    /// Re-run a workflow
17306    /// 
17307    /// Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
17308    /// 
17309    /// [API method documentation](https://docs.github.com/rest/reference/actions#re-run-a-workflow)
17310    pub async fn actions_re_run_workflow(
17311        &self,
17312        owner: &str,
17313        repo: &str,
17314        run_id: i64,
17315    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17316        let mut theScheme = AuthScheme::from(&self.config.authentication);
17317
17318        while let Some(auth_step) = theScheme.step()? {
17319            match auth_step {
17320                ::authentic::AuthenticationStep::Request(auth_request) => {
17321                    theScheme.respond(self.client.request(auth_request).await);
17322                }
17323                ::authentic::AuthenticationStep::WaitFor(duration) => {
17324                    (self.sleep)(duration).await;
17325                }
17326            }
17327        }
17328        let theBuilder = crate::v1_1_4::request::actions_re_run_workflow::http_builder(
17329            self.config.base_url.as_ref(),
17330            owner,
17331            repo,
17332            run_id,
17333            self.config.user_agent.as_ref(),
17334            self.config.accept.as_deref(),
17335        )?
17336        .with_authentication(&theScheme)?;
17337
17338        let theRequest =
17339            crate::v1_1_4::request::actions_re_run_workflow::hyper_request(theBuilder)?;
17340
17341        ::log::debug!("HTTP request: {:?}", &theRequest);
17342
17343        let theResponse = self.client.request(theRequest).await?;
17344
17345        ::log::debug!("HTTP response: {:?}", &theResponse);
17346
17347        Ok(theResponse)
17348    }
17349
17350    /// Re-run failed jobs from a workflow run
17351    /// 
17352    /// Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint.
17353    /// 
17354    /// [API method documentation](https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs)
17355    pub async fn actions_re_run_workflow_failed_jobs(
17356        &self,
17357        owner: &str,
17358        repo: &str,
17359        run_id: i64,
17360    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17361        let mut theScheme = AuthScheme::from(&self.config.authentication);
17362
17363        while let Some(auth_step) = theScheme.step()? {
17364            match auth_step {
17365                ::authentic::AuthenticationStep::Request(auth_request) => {
17366                    theScheme.respond(self.client.request(auth_request).await);
17367                }
17368                ::authentic::AuthenticationStep::WaitFor(duration) => {
17369                    (self.sleep)(duration).await;
17370                }
17371            }
17372        }
17373        let theBuilder = crate::v1_1_4::request::actions_re_run_workflow_failed_jobs::http_builder(
17374            self.config.base_url.as_ref(),
17375            owner,
17376            repo,
17377            run_id,
17378            self.config.user_agent.as_ref(),
17379            self.config.accept.as_deref(),
17380        )?
17381        .with_authentication(&theScheme)?;
17382
17383        let theRequest =
17384            crate::v1_1_4::request::actions_re_run_workflow_failed_jobs::hyper_request(theBuilder)?;
17385
17386        ::log::debug!("HTTP request: {:?}", &theRequest);
17387
17388        let theResponse = self.client.request(theRequest).await?;
17389
17390        ::log::debug!("HTTP response: {:?}", &theResponse);
17391
17392        Ok(theResponse)
17393    }
17394
17395    /// Get workflow run usage
17396    /// 
17397    /// Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
17398    /// 
17399    /// Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
17400    /// 
17401    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-workflow-run-usage)
17402    pub async fn actions_get_workflow_run_usage(
17403        &self,
17404        owner: &str,
17405        repo: &str,
17406        run_id: i64,
17407    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17408        let mut theScheme = AuthScheme::from(&self.config.authentication);
17409
17410        while let Some(auth_step) = theScheme.step()? {
17411            match auth_step {
17412                ::authentic::AuthenticationStep::Request(auth_request) => {
17413                    theScheme.respond(self.client.request(auth_request).await);
17414                }
17415                ::authentic::AuthenticationStep::WaitFor(duration) => {
17416                    (self.sleep)(duration).await;
17417                }
17418            }
17419        }
17420        let theBuilder = crate::v1_1_4::request::actions_get_workflow_run_usage::http_builder(
17421            self.config.base_url.as_ref(),
17422            owner,
17423            repo,
17424            run_id,
17425            self.config.user_agent.as_ref(),
17426            self.config.accept.as_deref(),
17427        )?
17428        .with_authentication(&theScheme)?;
17429
17430        let theRequest =
17431            crate::v1_1_4::request::actions_get_workflow_run_usage::hyper_request(theBuilder)?;
17432
17433        ::log::debug!("HTTP request: {:?}", &theRequest);
17434
17435        let theResponse = self.client.request(theRequest).await?;
17436
17437        ::log::debug!("HTTP response: {:?}", &theResponse);
17438
17439        Ok(theResponse)
17440    }
17441
17442    /// List repository secrets
17443    /// 
17444    /// Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.
17445    /// 
17446    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-repository-secrets)
17447    pub async fn actions_list_repo_secrets(
17448        &self,
17449        owner: &str,
17450        repo: &str,
17451        per_page: ::std::option::Option<i64>,
17452        page: ::std::option::Option<i64>,
17453    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17454        let mut theScheme = AuthScheme::from(&self.config.authentication);
17455
17456        while let Some(auth_step) = theScheme.step()? {
17457            match auth_step {
17458                ::authentic::AuthenticationStep::Request(auth_request) => {
17459                    theScheme.respond(self.client.request(auth_request).await);
17460                }
17461                ::authentic::AuthenticationStep::WaitFor(duration) => {
17462                    (self.sleep)(duration).await;
17463                }
17464            }
17465        }
17466        let theBuilder = crate::v1_1_4::request::actions_list_repo_secrets::http_builder(
17467            self.config.base_url.as_ref(),
17468            owner,
17469            repo,
17470            per_page,
17471            page,
17472            self.config.user_agent.as_ref(),
17473            self.config.accept.as_deref(),
17474        )?
17475        .with_authentication(&theScheme)?;
17476
17477        let theRequest =
17478            crate::v1_1_4::request::actions_list_repo_secrets::hyper_request(theBuilder)?;
17479
17480        ::log::debug!("HTTP request: {:?}", &theRequest);
17481
17482        let theResponse = self.client.request(theRequest).await?;
17483
17484        ::log::debug!("HTTP response: {:?}", &theResponse);
17485
17486        Ok(theResponse)
17487    }
17488
17489    /// Get a repository public key
17490    /// 
17491    /// Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint.
17492    /// 
17493    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-a-repository-public-key)
17494    pub async fn actions_get_repo_public_key(
17495        &self,
17496        owner: &str,
17497        repo: &str,
17498    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17499        let mut theScheme = AuthScheme::from(&self.config.authentication);
17500
17501        while let Some(auth_step) = theScheme.step()? {
17502            match auth_step {
17503                ::authentic::AuthenticationStep::Request(auth_request) => {
17504                    theScheme.respond(self.client.request(auth_request).await);
17505                }
17506                ::authentic::AuthenticationStep::WaitFor(duration) => {
17507                    (self.sleep)(duration).await;
17508                }
17509            }
17510        }
17511        let theBuilder = crate::v1_1_4::request::actions_get_repo_public_key::http_builder(
17512            self.config.base_url.as_ref(),
17513            owner,
17514            repo,
17515            self.config.user_agent.as_ref(),
17516            self.config.accept.as_deref(),
17517        )?
17518        .with_authentication(&theScheme)?;
17519
17520        let theRequest =
17521            crate::v1_1_4::request::actions_get_repo_public_key::hyper_request(theBuilder)?;
17522
17523        ::log::debug!("HTTP request: {:?}", &theRequest);
17524
17525        let theResponse = self.client.request(theRequest).await?;
17526
17527        ::log::debug!("HTTP response: {:?}", &theResponse);
17528
17529        Ok(theResponse)
17530    }
17531
17532    /// Get a repository secret
17533    /// 
17534    /// Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.
17535    /// 
17536    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-a-repository-secret)
17537    pub async fn actions_get_repo_secret(
17538        &self,
17539        owner: &str,
17540        repo: &str,
17541        secret_name: &str,
17542    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17543        let mut theScheme = AuthScheme::from(&self.config.authentication);
17544
17545        while let Some(auth_step) = theScheme.step()? {
17546            match auth_step {
17547                ::authentic::AuthenticationStep::Request(auth_request) => {
17548                    theScheme.respond(self.client.request(auth_request).await);
17549                }
17550                ::authentic::AuthenticationStep::WaitFor(duration) => {
17551                    (self.sleep)(duration).await;
17552                }
17553            }
17554        }
17555        let theBuilder = crate::v1_1_4::request::actions_get_repo_secret::http_builder(
17556            self.config.base_url.as_ref(),
17557            owner,
17558            repo,
17559            secret_name,
17560            self.config.user_agent.as_ref(),
17561            self.config.accept.as_deref(),
17562        )?
17563        .with_authentication(&theScheme)?;
17564
17565        let theRequest =
17566            crate::v1_1_4::request::actions_get_repo_secret::hyper_request(theBuilder)?;
17567
17568        ::log::debug!("HTTP request: {:?}", &theRequest);
17569
17570        let theResponse = self.client.request(theRequest).await?;
17571
17572        ::log::debug!("HTTP response: {:?}", &theResponse);
17573
17574        Ok(theResponse)
17575    }
17576
17577    /// Create or update a repository secret
17578    /// 
17579    /// Creates or updates a repository secret with an encrypted value. Encrypt your secret using
17580    /// [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
17581    /// token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use
17582    /// this endpoint.
17583    /// 
17584    /// #### Example encrypting a secret using Node.js
17585    /// 
17586    /// Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
17587    /// 
17588    /// ```text
17589    /// const sodium = require('tweetsodium');
17590    /// 
17591    /// const key = "base64-encoded-public-key";
17592    /// const value = "plain-text-secret";
17593    /// 
17594    /// // Convert the message and key to Uint8Array's (Buffer implements that interface)
17595    /// const messageBytes = Buffer.from(value);
17596    /// const keyBytes = Buffer.from(key, 'base64');
17597    /// 
17598    /// // Encrypt using LibSodium.
17599    /// const encryptedBytes = sodium.seal(messageBytes, keyBytes);
17600    /// 
17601    /// // Base64 the encrypted secret
17602    /// const encrypted = Buffer.from(encryptedBytes).toString('base64');
17603    /// 
17604    /// console.log(encrypted);
17605    /// ```
17606    /// 
17607    /// 
17608    /// #### Example encrypting a secret using Python
17609    /// 
17610    /// Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3.
17611    /// 
17612    /// ```text
17613    /// from base64 import b64encode
17614    /// from nacl import encoding, public
17615    /// 
17616    /// def encrypt(public_key: str, secret_value: str) -> str:
17617    ///   """Encrypt a Unicode string using the public key."""
17618    ///   public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
17619    ///   sealed_box = public.SealedBox(public_key)
17620    ///   encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
17621    ///   return b64encode(encrypted).decode("utf-8")
17622    /// ```
17623    /// 
17624    /// #### Example encrypting a secret using C#
17625    /// 
17626    /// Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
17627    /// 
17628    /// ```text
17629    /// var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
17630    /// var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
17631    /// 
17632    /// var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
17633    /// 
17634    /// Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
17635    /// ```
17636    /// 
17637    /// #### Example encrypting a secret using Ruby
17638    /// 
17639    /// Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
17640    /// 
17641    /// ```ruby
17642    /// require "rbnacl"
17643    /// require "base64"
17644    /// 
17645    /// key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
17646    /// public_key = RbNaCl::PublicKey.new(key)
17647    /// 
17648    /// box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
17649    /// encrypted_secret = box.encrypt("my_secret")
17650    /// 
17651    /// # Print the base64 encoded secret
17652    /// puts Base64.strict_encode64(encrypted_secret)
17653    /// ```
17654    /// 
17655    /// [API method documentation](https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret)
17656    ///
17657    /// # Content
17658    ///
17659    /// - [`&v1_1_4::request::actions_create_or_update_repo_secret::body::Json`](crate::v1_1_4::request::actions_create_or_update_repo_secret::body::Json)
17660    pub async fn actions_create_or_update_repo_secret<Content>(
17661        &self,
17662        owner: &str,
17663        repo: &str,
17664        secret_name: &str,
17665        theContent: Content,
17666    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
17667    where
17668        Content: Copy + TryInto<crate::v1_1_4::request::actions_create_or_update_repo_secret::Content<::hyper::Body>>,
17669        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_create_or_update_repo_secret::Content<::hyper::Body>>>::Error>
17670    {
17671        let mut theScheme = AuthScheme::from(&self.config.authentication);
17672
17673        while let Some(auth_step) = theScheme.step()? {
17674            match auth_step {
17675                ::authentic::AuthenticationStep::Request(auth_request) => {
17676                    theScheme.respond(self.client.request(auth_request).await);
17677                }
17678                ::authentic::AuthenticationStep::WaitFor(duration) => {
17679                    (self.sleep)(duration).await;
17680                }
17681            }
17682        }
17683        let theBuilder = crate::v1_1_4::request::actions_create_or_update_repo_secret::http_builder(
17684            self.config.base_url.as_ref(),
17685            owner,
17686            repo,
17687            secret_name,
17688            self.config.user_agent.as_ref(),
17689            self.config.accept.as_deref(),
17690        )?
17691        .with_authentication(&theScheme)?;
17692
17693        let theRequest = crate::v1_1_4::request::actions_create_or_update_repo_secret::hyper_request(
17694            theBuilder,
17695            theContent.try_into()?,
17696        )?;
17697
17698        ::log::debug!("HTTP request: {:?}", &theRequest);
17699
17700        let theResponse = self.client.request(theRequest).await?;
17701
17702        ::log::debug!("HTTP response: {:?}", &theResponse);
17703
17704        Ok(theResponse)
17705    }
17706
17707    /// Delete a repository secret
17708    /// 
17709    /// Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.
17710    /// 
17711    /// [API method documentation](https://docs.github.com/rest/reference/actions#delete-a-repository-secret)
17712    pub async fn actions_delete_repo_secret(
17713        &self,
17714        owner: &str,
17715        repo: &str,
17716        secret_name: &str,
17717    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17718        let mut theScheme = AuthScheme::from(&self.config.authentication);
17719
17720        while let Some(auth_step) = theScheme.step()? {
17721            match auth_step {
17722                ::authentic::AuthenticationStep::Request(auth_request) => {
17723                    theScheme.respond(self.client.request(auth_request).await);
17724                }
17725                ::authentic::AuthenticationStep::WaitFor(duration) => {
17726                    (self.sleep)(duration).await;
17727                }
17728            }
17729        }
17730        let theBuilder = crate::v1_1_4::request::actions_delete_repo_secret::http_builder(
17731            self.config.base_url.as_ref(),
17732            owner,
17733            repo,
17734            secret_name,
17735            self.config.user_agent.as_ref(),
17736            self.config.accept.as_deref(),
17737        )?
17738        .with_authentication(&theScheme)?;
17739
17740        let theRequest =
17741            crate::v1_1_4::request::actions_delete_repo_secret::hyper_request(theBuilder)?;
17742
17743        ::log::debug!("HTTP request: {:?}", &theRequest);
17744
17745        let theResponse = self.client.request(theRequest).await?;
17746
17747        ::log::debug!("HTTP response: {:?}", &theResponse);
17748
17749        Ok(theResponse)
17750    }
17751
17752    /// List repository workflows
17753    /// 
17754    /// Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
17755    /// 
17756    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-repository-workflows)
17757    pub async fn actions_list_repo_workflows(
17758        &self,
17759        owner: &str,
17760        repo: &str,
17761        per_page: ::std::option::Option<i64>,
17762        page: ::std::option::Option<i64>,
17763    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17764        let mut theScheme = AuthScheme::from(&self.config.authentication);
17765
17766        while let Some(auth_step) = theScheme.step()? {
17767            match auth_step {
17768                ::authentic::AuthenticationStep::Request(auth_request) => {
17769                    theScheme.respond(self.client.request(auth_request).await);
17770                }
17771                ::authentic::AuthenticationStep::WaitFor(duration) => {
17772                    (self.sleep)(duration).await;
17773                }
17774            }
17775        }
17776        let theBuilder = crate::v1_1_4::request::actions_list_repo_workflows::http_builder(
17777            self.config.base_url.as_ref(),
17778            owner,
17779            repo,
17780            per_page,
17781            page,
17782            self.config.user_agent.as_ref(),
17783            self.config.accept.as_deref(),
17784        )?
17785        .with_authentication(&theScheme)?;
17786
17787        let theRequest =
17788            crate::v1_1_4::request::actions_list_repo_workflows::hyper_request(theBuilder)?;
17789
17790        ::log::debug!("HTTP request: {:?}", &theRequest);
17791
17792        let theResponse = self.client.request(theRequest).await?;
17793
17794        ::log::debug!("HTTP response: {:?}", &theResponse);
17795
17796        Ok(theResponse)
17797    }
17798
17799    /// Get a workflow
17800    /// 
17801    /// Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
17802    /// 
17803    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-a-workflow)
17804    pub async fn actions_get_workflow(
17805        &self,
17806        owner: &str,
17807        repo: &str,
17808        workflow_id: &::serde_json::value::Value,
17809    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17810        let mut theScheme = AuthScheme::from(&self.config.authentication);
17811
17812        while let Some(auth_step) = theScheme.step()? {
17813            match auth_step {
17814                ::authentic::AuthenticationStep::Request(auth_request) => {
17815                    theScheme.respond(self.client.request(auth_request).await);
17816                }
17817                ::authentic::AuthenticationStep::WaitFor(duration) => {
17818                    (self.sleep)(duration).await;
17819                }
17820            }
17821        }
17822        let theBuilder = crate::v1_1_4::request::actions_get_workflow::http_builder(
17823            self.config.base_url.as_ref(),
17824            owner,
17825            repo,
17826            workflow_id,
17827            self.config.user_agent.as_ref(),
17828            self.config.accept.as_deref(),
17829        )?
17830        .with_authentication(&theScheme)?;
17831
17832        let theRequest =
17833            crate::v1_1_4::request::actions_get_workflow::hyper_request(theBuilder)?;
17834
17835        ::log::debug!("HTTP request: {:?}", &theRequest);
17836
17837        let theResponse = self.client.request(theRequest).await?;
17838
17839        ::log::debug!("HTTP response: {:?}", &theResponse);
17840
17841        Ok(theResponse)
17842    }
17843
17844    /// Disable a workflow
17845    /// 
17846    /// Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.
17847    /// 
17848    /// You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
17849    /// 
17850    /// [API method documentation](https://docs.github.com/rest/reference/actions#disable-a-workflow)
17851    pub async fn actions_disable_workflow(
17852        &self,
17853        owner: &str,
17854        repo: &str,
17855        workflow_id: &::serde_json::value::Value,
17856    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17857        let mut theScheme = AuthScheme::from(&self.config.authentication);
17858
17859        while let Some(auth_step) = theScheme.step()? {
17860            match auth_step {
17861                ::authentic::AuthenticationStep::Request(auth_request) => {
17862                    theScheme.respond(self.client.request(auth_request).await);
17863                }
17864                ::authentic::AuthenticationStep::WaitFor(duration) => {
17865                    (self.sleep)(duration).await;
17866                }
17867            }
17868        }
17869        let theBuilder = crate::v1_1_4::request::actions_disable_workflow::http_builder(
17870            self.config.base_url.as_ref(),
17871            owner,
17872            repo,
17873            workflow_id,
17874            self.config.user_agent.as_ref(),
17875            self.config.accept.as_deref(),
17876        )?
17877        .with_authentication(&theScheme)?;
17878
17879        let theRequest =
17880            crate::v1_1_4::request::actions_disable_workflow::hyper_request(theBuilder)?;
17881
17882        ::log::debug!("HTTP request: {:?}", &theRequest);
17883
17884        let theResponse = self.client.request(theRequest).await?;
17885
17886        ::log::debug!("HTTP response: {:?}", &theResponse);
17887
17888        Ok(theResponse)
17889    }
17890
17891    /// Create a workflow dispatch event
17892    /// 
17893    /// You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.
17894    /// 
17895    /// You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)."
17896    /// 
17897    /// You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)."
17898    /// 
17899    /// [API method documentation](https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event)
17900    ///
17901    /// # Content
17902    ///
17903    /// - [`&v1_1_4::request::actions_create_workflow_dispatch::body::Json`](crate::v1_1_4::request::actions_create_workflow_dispatch::body::Json)
17904    pub async fn actions_create_workflow_dispatch<Content>(
17905        &self,
17906        owner: &str,
17907        repo: &str,
17908        workflow_id: &::serde_json::value::Value,
17909        theContent: Content,
17910    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
17911    where
17912        Content: Copy + TryInto<crate::v1_1_4::request::actions_create_workflow_dispatch::Content<::hyper::Body>>,
17913        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_create_workflow_dispatch::Content<::hyper::Body>>>::Error>
17914    {
17915        let mut theScheme = AuthScheme::from(&self.config.authentication);
17916
17917        while let Some(auth_step) = theScheme.step()? {
17918            match auth_step {
17919                ::authentic::AuthenticationStep::Request(auth_request) => {
17920                    theScheme.respond(self.client.request(auth_request).await);
17921                }
17922                ::authentic::AuthenticationStep::WaitFor(duration) => {
17923                    (self.sleep)(duration).await;
17924                }
17925            }
17926        }
17927        let theBuilder = crate::v1_1_4::request::actions_create_workflow_dispatch::http_builder(
17928            self.config.base_url.as_ref(),
17929            owner,
17930            repo,
17931            workflow_id,
17932            self.config.user_agent.as_ref(),
17933            self.config.accept.as_deref(),
17934        )?
17935        .with_authentication(&theScheme)?;
17936
17937        let theRequest = crate::v1_1_4::request::actions_create_workflow_dispatch::hyper_request(
17938            theBuilder,
17939            theContent.try_into()?,
17940        )?;
17941
17942        ::log::debug!("HTTP request: {:?}", &theRequest);
17943
17944        let theResponse = self.client.request(theRequest).await?;
17945
17946        ::log::debug!("HTTP response: {:?}", &theResponse);
17947
17948        Ok(theResponse)
17949    }
17950
17951    /// Enable a workflow
17952    /// 
17953    /// Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.
17954    /// 
17955    /// You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint.
17956    /// 
17957    /// [API method documentation](https://docs.github.com/rest/reference/actions#enable-a-workflow)
17958    pub async fn actions_enable_workflow(
17959        &self,
17960        owner: &str,
17961        repo: &str,
17962        workflow_id: &::serde_json::value::Value,
17963    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
17964        let mut theScheme = AuthScheme::from(&self.config.authentication);
17965
17966        while let Some(auth_step) = theScheme.step()? {
17967            match auth_step {
17968                ::authentic::AuthenticationStep::Request(auth_request) => {
17969                    theScheme.respond(self.client.request(auth_request).await);
17970                }
17971                ::authentic::AuthenticationStep::WaitFor(duration) => {
17972                    (self.sleep)(duration).await;
17973                }
17974            }
17975        }
17976        let theBuilder = crate::v1_1_4::request::actions_enable_workflow::http_builder(
17977            self.config.base_url.as_ref(),
17978            owner,
17979            repo,
17980            workflow_id,
17981            self.config.user_agent.as_ref(),
17982            self.config.accept.as_deref(),
17983        )?
17984        .with_authentication(&theScheme)?;
17985
17986        let theRequest =
17987            crate::v1_1_4::request::actions_enable_workflow::hyper_request(theBuilder)?;
17988
17989        ::log::debug!("HTTP request: {:?}", &theRequest);
17990
17991        let theResponse = self.client.request(theRequest).await?;
17992
17993        ::log::debug!("HTTP response: {:?}", &theResponse);
17994
17995        Ok(theResponse)
17996    }
17997
17998    /// List workflow runs
17999    /// 
18000    /// 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/rest/overview/resources-in-the-rest-api#parameters).
18001    /// 
18002    /// Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope.
18003    /// 
18004    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-workflow-runs)
18005    #[allow(clippy::too_many_arguments)]
18006    pub async fn actions_list_workflow_runs(
18007        &self,
18008        owner: &str,
18009        repo: &str,
18010        workflow_id: &::serde_json::value::Value,
18011        actor: ::std::option::Option<&str>,
18012        branch: ::std::option::Option<&str>,
18013        event: ::std::option::Option<&str>,
18014        status: ::std::option::Option<&str>,
18015        per_page: ::std::option::Option<i64>,
18016        page: ::std::option::Option<i64>,
18017        created: ::std::option::Option<&str>,
18018        exclude_pull_requests: ::std::option::Option<bool>,
18019        check_suite_id: ::std::option::Option<i64>,
18020    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18021        let mut theScheme = AuthScheme::from(&self.config.authentication);
18022
18023        while let Some(auth_step) = theScheme.step()? {
18024            match auth_step {
18025                ::authentic::AuthenticationStep::Request(auth_request) => {
18026                    theScheme.respond(self.client.request(auth_request).await);
18027                }
18028                ::authentic::AuthenticationStep::WaitFor(duration) => {
18029                    (self.sleep)(duration).await;
18030                }
18031            }
18032        }
18033        let theBuilder = crate::v1_1_4::request::actions_list_workflow_runs::http_builder(
18034            self.config.base_url.as_ref(),
18035            owner,
18036            repo,
18037            workflow_id,
18038            actor,
18039            branch,
18040            event,
18041            status,
18042            per_page,
18043            page,
18044            created,
18045            exclude_pull_requests,
18046            check_suite_id,
18047            self.config.user_agent.as_ref(),
18048            self.config.accept.as_deref(),
18049        )?
18050        .with_authentication(&theScheme)?;
18051
18052        let theRequest =
18053            crate::v1_1_4::request::actions_list_workflow_runs::hyper_request(theBuilder)?;
18054
18055        ::log::debug!("HTTP request: {:?}", &theRequest);
18056
18057        let theResponse = self.client.request(theRequest).await?;
18058
18059        ::log::debug!("HTTP response: {:?}", &theResponse);
18060
18061        Ok(theResponse)
18062    }
18063
18064    /// Get workflow usage
18065    /// 
18066    /// Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
18067    /// 
18068    /// You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
18069    /// 
18070    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-workflow-usage)
18071    pub async fn actions_get_workflow_usage(
18072        &self,
18073        owner: &str,
18074        repo: &str,
18075        workflow_id: &::serde_json::value::Value,
18076    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18077        let mut theScheme = AuthScheme::from(&self.config.authentication);
18078
18079        while let Some(auth_step) = theScheme.step()? {
18080            match auth_step {
18081                ::authentic::AuthenticationStep::Request(auth_request) => {
18082                    theScheme.respond(self.client.request(auth_request).await);
18083                }
18084                ::authentic::AuthenticationStep::WaitFor(duration) => {
18085                    (self.sleep)(duration).await;
18086                }
18087            }
18088        }
18089        let theBuilder = crate::v1_1_4::request::actions_get_workflow_usage::http_builder(
18090            self.config.base_url.as_ref(),
18091            owner,
18092            repo,
18093            workflow_id,
18094            self.config.user_agent.as_ref(),
18095            self.config.accept.as_deref(),
18096        )?
18097        .with_authentication(&theScheme)?;
18098
18099        let theRequest =
18100            crate::v1_1_4::request::actions_get_workflow_usage::hyper_request(theBuilder)?;
18101
18102        ::log::debug!("HTTP request: {:?}", &theRequest);
18103
18104        let theResponse = self.client.request(theRequest).await?;
18105
18106        ::log::debug!("HTTP response: {:?}", &theResponse);
18107
18108        Ok(theResponse)
18109    }
18110
18111    /// List assignees
18112    /// 
18113    /// Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository.
18114    /// 
18115    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-assignees)
18116    pub async fn issues_list_assignees(
18117        &self,
18118        owner: &str,
18119        repo: &str,
18120        per_page: ::std::option::Option<i64>,
18121        page: ::std::option::Option<i64>,
18122    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18123        let mut theScheme = AuthScheme::from(&self.config.authentication);
18124
18125        while let Some(auth_step) = theScheme.step()? {
18126            match auth_step {
18127                ::authentic::AuthenticationStep::Request(auth_request) => {
18128                    theScheme.respond(self.client.request(auth_request).await);
18129                }
18130                ::authentic::AuthenticationStep::WaitFor(duration) => {
18131                    (self.sleep)(duration).await;
18132                }
18133            }
18134        }
18135        let theBuilder = crate::v1_1_4::request::issues_list_assignees::http_builder(
18136            self.config.base_url.as_ref(),
18137            owner,
18138            repo,
18139            per_page,
18140            page,
18141            self.config.user_agent.as_ref(),
18142            self.config.accept.as_deref(),
18143        )?
18144        .with_authentication(&theScheme)?;
18145
18146        let theRequest =
18147            crate::v1_1_4::request::issues_list_assignees::hyper_request(theBuilder)?;
18148
18149        ::log::debug!("HTTP request: {:?}", &theRequest);
18150
18151        let theResponse = self.client.request(theRequest).await?;
18152
18153        ::log::debug!("HTTP response: {:?}", &theResponse);
18154
18155        Ok(theResponse)
18156    }
18157
18158    /// Check if a user can be assigned
18159    /// 
18160    /// Checks if a user has permission to be assigned to an issue in this repository.
18161    /// 
18162    /// If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned.
18163    /// 
18164    /// Otherwise a `404` status code is returned.
18165    /// 
18166    /// [API method documentation](https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned)
18167    pub async fn issues_check_user_can_be_assigned(
18168        &self,
18169        owner: &str,
18170        repo: &str,
18171        assignee: &str,
18172    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18173        let mut theScheme = AuthScheme::from(&self.config.authentication);
18174
18175        while let Some(auth_step) = theScheme.step()? {
18176            match auth_step {
18177                ::authentic::AuthenticationStep::Request(auth_request) => {
18178                    theScheme.respond(self.client.request(auth_request).await);
18179                }
18180                ::authentic::AuthenticationStep::WaitFor(duration) => {
18181                    (self.sleep)(duration).await;
18182                }
18183            }
18184        }
18185        let theBuilder = crate::v1_1_4::request::issues_check_user_can_be_assigned::http_builder(
18186            self.config.base_url.as_ref(),
18187            owner,
18188            repo,
18189            assignee,
18190            self.config.user_agent.as_ref(),
18191            self.config.accept.as_deref(),
18192        )?
18193        .with_authentication(&theScheme)?;
18194
18195        let theRequest =
18196            crate::v1_1_4::request::issues_check_user_can_be_assigned::hyper_request(theBuilder)?;
18197
18198        ::log::debug!("HTTP request: {:?}", &theRequest);
18199
18200        let theResponse = self.client.request(theRequest).await?;
18201
18202        ::log::debug!("HTTP response: {:?}", &theResponse);
18203
18204        Ok(theResponse)
18205    }
18206
18207    /// List all autolinks of a repository
18208    /// 
18209    /// This returns a list of autolinks configured for the given repository.
18210    /// 
18211    /// Information about autolinks are only available to repository administrators.
18212    /// 
18213    /// [API method documentation](https://docs.github.com/v3/repos#list-autolinks)
18214    pub async fn repos_list_autolinks(
18215        &self,
18216        owner: &str,
18217        repo: &str,
18218        page: ::std::option::Option<i64>,
18219    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18220        let mut theScheme = AuthScheme::from(&self.config.authentication);
18221
18222        while let Some(auth_step) = theScheme.step()? {
18223            match auth_step {
18224                ::authentic::AuthenticationStep::Request(auth_request) => {
18225                    theScheme.respond(self.client.request(auth_request).await);
18226                }
18227                ::authentic::AuthenticationStep::WaitFor(duration) => {
18228                    (self.sleep)(duration).await;
18229                }
18230            }
18231        }
18232        let theBuilder = crate::v1_1_4::request::repos_list_autolinks::http_builder(
18233            self.config.base_url.as_ref(),
18234            owner,
18235            repo,
18236            page,
18237            self.config.user_agent.as_ref(),
18238            self.config.accept.as_deref(),
18239        )?
18240        .with_authentication(&theScheme)?;
18241
18242        let theRequest =
18243            crate::v1_1_4::request::repos_list_autolinks::hyper_request(theBuilder)?;
18244
18245        ::log::debug!("HTTP request: {:?}", &theRequest);
18246
18247        let theResponse = self.client.request(theRequest).await?;
18248
18249        ::log::debug!("HTTP response: {:?}", &theResponse);
18250
18251        Ok(theResponse)
18252    }
18253
18254    /// Create an autolink reference for a repository
18255    /// 
18256    /// Users with admin access to the repository can create an autolink.
18257    /// 
18258    /// [API method documentation](https://docs.github.com/v3/repos#create-an-autolink)
18259    ///
18260    /// # Content
18261    ///
18262    /// - [`&v1_1_4::request::repos_create_autolink::body::Json`](crate::v1_1_4::request::repos_create_autolink::body::Json)
18263    pub async fn repos_create_autolink<Content>(
18264        &self,
18265        owner: &str,
18266        repo: &str,
18267        theContent: Content,
18268    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
18269    where
18270        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_autolink::Content<::hyper::Body>>,
18271        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_autolink::Content<::hyper::Body>>>::Error>
18272    {
18273        let mut theScheme = AuthScheme::from(&self.config.authentication);
18274
18275        while let Some(auth_step) = theScheme.step()? {
18276            match auth_step {
18277                ::authentic::AuthenticationStep::Request(auth_request) => {
18278                    theScheme.respond(self.client.request(auth_request).await);
18279                }
18280                ::authentic::AuthenticationStep::WaitFor(duration) => {
18281                    (self.sleep)(duration).await;
18282                }
18283            }
18284        }
18285        let theBuilder = crate::v1_1_4::request::repos_create_autolink::http_builder(
18286            self.config.base_url.as_ref(),
18287            owner,
18288            repo,
18289            self.config.user_agent.as_ref(),
18290            self.config.accept.as_deref(),
18291        )?
18292        .with_authentication(&theScheme)?;
18293
18294        let theRequest = crate::v1_1_4::request::repos_create_autolink::hyper_request(
18295            theBuilder,
18296            theContent.try_into()?,
18297        )?;
18298
18299        ::log::debug!("HTTP request: {:?}", &theRequest);
18300
18301        let theResponse = self.client.request(theRequest).await?;
18302
18303        ::log::debug!("HTTP response: {:?}", &theResponse);
18304
18305        Ok(theResponse)
18306    }
18307
18308    /// Get an autolink reference of a repository
18309    /// 
18310    /// This returns a single autolink reference by ID that was configured for the given repository.
18311    /// 
18312    /// Information about autolinks are only available to repository administrators.
18313    /// 
18314    /// [API method documentation](https://docs.github.com/v3/repos#get-autolink)
18315    pub async fn repos_get_autolink(
18316        &self,
18317        owner: &str,
18318        repo: &str,
18319        autolink_id: i64,
18320    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18321        let mut theScheme = AuthScheme::from(&self.config.authentication);
18322
18323        while let Some(auth_step) = theScheme.step()? {
18324            match auth_step {
18325                ::authentic::AuthenticationStep::Request(auth_request) => {
18326                    theScheme.respond(self.client.request(auth_request).await);
18327                }
18328                ::authentic::AuthenticationStep::WaitFor(duration) => {
18329                    (self.sleep)(duration).await;
18330                }
18331            }
18332        }
18333        let theBuilder = crate::v1_1_4::request::repos_get_autolink::http_builder(
18334            self.config.base_url.as_ref(),
18335            owner,
18336            repo,
18337            autolink_id,
18338            self.config.user_agent.as_ref(),
18339            self.config.accept.as_deref(),
18340        )?
18341        .with_authentication(&theScheme)?;
18342
18343        let theRequest =
18344            crate::v1_1_4::request::repos_get_autolink::hyper_request(theBuilder)?;
18345
18346        ::log::debug!("HTTP request: {:?}", &theRequest);
18347
18348        let theResponse = self.client.request(theRequest).await?;
18349
18350        ::log::debug!("HTTP response: {:?}", &theResponse);
18351
18352        Ok(theResponse)
18353    }
18354
18355    /// Delete an autolink reference from a repository
18356    /// 
18357    /// This deletes a single autolink reference by ID that was configured for the given repository.
18358    /// 
18359    /// Information about autolinks are only available to repository administrators.
18360    /// 
18361    /// [API method documentation](https://docs.github.com/v3/repos#delete-autolink)
18362    pub async fn repos_delete_autolink(
18363        &self,
18364        owner: &str,
18365        repo: &str,
18366        autolink_id: i64,
18367    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18368        let mut theScheme = AuthScheme::from(&self.config.authentication);
18369
18370        while let Some(auth_step) = theScheme.step()? {
18371            match auth_step {
18372                ::authentic::AuthenticationStep::Request(auth_request) => {
18373                    theScheme.respond(self.client.request(auth_request).await);
18374                }
18375                ::authentic::AuthenticationStep::WaitFor(duration) => {
18376                    (self.sleep)(duration).await;
18377                }
18378            }
18379        }
18380        let theBuilder = crate::v1_1_4::request::repos_delete_autolink::http_builder(
18381            self.config.base_url.as_ref(),
18382            owner,
18383            repo,
18384            autolink_id,
18385            self.config.user_agent.as_ref(),
18386            self.config.accept.as_deref(),
18387        )?
18388        .with_authentication(&theScheme)?;
18389
18390        let theRequest =
18391            crate::v1_1_4::request::repos_delete_autolink::hyper_request(theBuilder)?;
18392
18393        ::log::debug!("HTTP request: {:?}", &theRequest);
18394
18395        let theResponse = self.client.request(theRequest).await?;
18396
18397        ::log::debug!("HTTP response: {:?}", &theResponse);
18398
18399        Ok(theResponse)
18400    }
18401
18402    /// Enable automated security fixes
18403    /// 
18404    /// Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)".
18405    /// 
18406    /// [API method documentation](https://docs.github.com/rest/reference/repos#enable-automated-security-fixes)
18407    pub async fn repos_enable_automated_security_fixes(
18408        &self,
18409        owner: &str,
18410        repo: &str,
18411    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18412        let mut theScheme = AuthScheme::from(&self.config.authentication);
18413
18414        while let Some(auth_step) = theScheme.step()? {
18415            match auth_step {
18416                ::authentic::AuthenticationStep::Request(auth_request) => {
18417                    theScheme.respond(self.client.request(auth_request).await);
18418                }
18419                ::authentic::AuthenticationStep::WaitFor(duration) => {
18420                    (self.sleep)(duration).await;
18421                }
18422            }
18423        }
18424        let theBuilder = crate::v1_1_4::request::repos_enable_automated_security_fixes::http_builder(
18425            self.config.base_url.as_ref(),
18426            owner,
18427            repo,
18428            self.config.user_agent.as_ref(),
18429            self.config.accept.as_deref(),
18430        )?
18431        .with_authentication(&theScheme)?;
18432
18433        let theRequest =
18434            crate::v1_1_4::request::repos_enable_automated_security_fixes::hyper_request(theBuilder)?;
18435
18436        ::log::debug!("HTTP request: {:?}", &theRequest);
18437
18438        let theResponse = self.client.request(theRequest).await?;
18439
18440        ::log::debug!("HTTP response: {:?}", &theResponse);
18441
18442        Ok(theResponse)
18443    }
18444
18445    /// Disable automated security fixes
18446    /// 
18447    /// Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)".
18448    /// 
18449    /// [API method documentation](https://docs.github.com/rest/reference/repos#disable-automated-security-fixes)
18450    pub async fn repos_disable_automated_security_fixes(
18451        &self,
18452        owner: &str,
18453        repo: &str,
18454    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18455        let mut theScheme = AuthScheme::from(&self.config.authentication);
18456
18457        while let Some(auth_step) = theScheme.step()? {
18458            match auth_step {
18459                ::authentic::AuthenticationStep::Request(auth_request) => {
18460                    theScheme.respond(self.client.request(auth_request).await);
18461                }
18462                ::authentic::AuthenticationStep::WaitFor(duration) => {
18463                    (self.sleep)(duration).await;
18464                }
18465            }
18466        }
18467        let theBuilder = crate::v1_1_4::request::repos_disable_automated_security_fixes::http_builder(
18468            self.config.base_url.as_ref(),
18469            owner,
18470            repo,
18471            self.config.user_agent.as_ref(),
18472            self.config.accept.as_deref(),
18473        )?
18474        .with_authentication(&theScheme)?;
18475
18476        let theRequest =
18477            crate::v1_1_4::request::repos_disable_automated_security_fixes::hyper_request(theBuilder)?;
18478
18479        ::log::debug!("HTTP request: {:?}", &theRequest);
18480
18481        let theResponse = self.client.request(theRequest).await?;
18482
18483        ::log::debug!("HTTP response: {:?}", &theResponse);
18484
18485        Ok(theResponse)
18486    }
18487
18488    /// List branches
18489    /// 
18490    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-branches)
18491    pub async fn repos_list_branches(
18492        &self,
18493        owner: &str,
18494        repo: &str,
18495        protected: ::std::option::Option<bool>,
18496        per_page: ::std::option::Option<i64>,
18497        page: ::std::option::Option<i64>,
18498    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18499        let mut theScheme = AuthScheme::from(&self.config.authentication);
18500
18501        while let Some(auth_step) = theScheme.step()? {
18502            match auth_step {
18503                ::authentic::AuthenticationStep::Request(auth_request) => {
18504                    theScheme.respond(self.client.request(auth_request).await);
18505                }
18506                ::authentic::AuthenticationStep::WaitFor(duration) => {
18507                    (self.sleep)(duration).await;
18508                }
18509            }
18510        }
18511        let theBuilder = crate::v1_1_4::request::repos_list_branches::http_builder(
18512            self.config.base_url.as_ref(),
18513            owner,
18514            repo,
18515            protected,
18516            per_page,
18517            page,
18518            self.config.user_agent.as_ref(),
18519            self.config.accept.as_deref(),
18520        )?
18521        .with_authentication(&theScheme)?;
18522
18523        let theRequest =
18524            crate::v1_1_4::request::repos_list_branches::hyper_request(theBuilder)?;
18525
18526        ::log::debug!("HTTP request: {:?}", &theRequest);
18527
18528        let theResponse = self.client.request(theRequest).await?;
18529
18530        ::log::debug!("HTTP response: {:?}", &theResponse);
18531
18532        Ok(theResponse)
18533    }
18534
18535    /// Get a branch
18536    /// 
18537    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-branch)
18538    pub async fn repos_get_branch(
18539        &self,
18540        owner: &str,
18541        repo: &str,
18542        branch: &str,
18543    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18544        let mut theScheme = AuthScheme::from(&self.config.authentication);
18545
18546        while let Some(auth_step) = theScheme.step()? {
18547            match auth_step {
18548                ::authentic::AuthenticationStep::Request(auth_request) => {
18549                    theScheme.respond(self.client.request(auth_request).await);
18550                }
18551                ::authentic::AuthenticationStep::WaitFor(duration) => {
18552                    (self.sleep)(duration).await;
18553                }
18554            }
18555        }
18556        let theBuilder = crate::v1_1_4::request::repos_get_branch::http_builder(
18557            self.config.base_url.as_ref(),
18558            owner,
18559            repo,
18560            branch,
18561            self.config.user_agent.as_ref(),
18562            self.config.accept.as_deref(),
18563        )?
18564        .with_authentication(&theScheme)?;
18565
18566        let theRequest =
18567            crate::v1_1_4::request::repos_get_branch::hyper_request(theBuilder)?;
18568
18569        ::log::debug!("HTTP request: {:?}", &theRequest);
18570
18571        let theResponse = self.client.request(theRequest).await?;
18572
18573        ::log::debug!("HTTP response: {:?}", &theResponse);
18574
18575        Ok(theResponse)
18576    }
18577
18578    /// Get branch protection
18579    /// 
18580    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
18581    /// 
18582    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-branch-protection)
18583    pub async fn repos_get_branch_protection(
18584        &self,
18585        owner: &str,
18586        repo: &str,
18587        branch: &str,
18588    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18589        let mut theScheme = AuthScheme::from(&self.config.authentication);
18590
18591        while let Some(auth_step) = theScheme.step()? {
18592            match auth_step {
18593                ::authentic::AuthenticationStep::Request(auth_request) => {
18594                    theScheme.respond(self.client.request(auth_request).await);
18595                }
18596                ::authentic::AuthenticationStep::WaitFor(duration) => {
18597                    (self.sleep)(duration).await;
18598                }
18599            }
18600        }
18601        let theBuilder = crate::v1_1_4::request::repos_get_branch_protection::http_builder(
18602            self.config.base_url.as_ref(),
18603            owner,
18604            repo,
18605            branch,
18606            self.config.user_agent.as_ref(),
18607            self.config.accept.as_deref(),
18608        )?
18609        .with_authentication(&theScheme)?;
18610
18611        let theRequest =
18612            crate::v1_1_4::request::repos_get_branch_protection::hyper_request(theBuilder)?;
18613
18614        ::log::debug!("HTTP request: {:?}", &theRequest);
18615
18616        let theResponse = self.client.request(theRequest).await?;
18617
18618        ::log::debug!("HTTP response: {:?}", &theResponse);
18619
18620        Ok(theResponse)
18621    }
18622
18623    /// Update branch protection
18624    /// 
18625    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
18626    /// 
18627    /// Protecting a branch requires admin or owner permissions to the repository.
18628    /// 
18629    /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values.
18630    /// 
18631    /// **Note**: The list of users, apps, and teams in total is limited to 100 items.
18632    /// 
18633    /// [API method documentation](https://docs.github.com/rest/reference/repos#update-branch-protection)
18634    ///
18635    /// # Content
18636    ///
18637    /// - [`&v1_1_4::request::repos_update_branch_protection::body::Json`](crate::v1_1_4::request::repos_update_branch_protection::body::Json)
18638    pub async fn repos_update_branch_protection<Content>(
18639        &self,
18640        owner: &str,
18641        repo: &str,
18642        branch: &str,
18643        theContent: Content,
18644    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
18645    where
18646        Content: Copy + TryInto<crate::v1_1_4::request::repos_update_branch_protection::Content<::hyper::Body>>,
18647        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_update_branch_protection::Content<::hyper::Body>>>::Error>
18648    {
18649        let mut theScheme = AuthScheme::from(&self.config.authentication);
18650
18651        while let Some(auth_step) = theScheme.step()? {
18652            match auth_step {
18653                ::authentic::AuthenticationStep::Request(auth_request) => {
18654                    theScheme.respond(self.client.request(auth_request).await);
18655                }
18656                ::authentic::AuthenticationStep::WaitFor(duration) => {
18657                    (self.sleep)(duration).await;
18658                }
18659            }
18660        }
18661        let theBuilder = crate::v1_1_4::request::repos_update_branch_protection::http_builder(
18662            self.config.base_url.as_ref(),
18663            owner,
18664            repo,
18665            branch,
18666            self.config.user_agent.as_ref(),
18667            self.config.accept.as_deref(),
18668        )?
18669        .with_authentication(&theScheme)?;
18670
18671        let theRequest = crate::v1_1_4::request::repos_update_branch_protection::hyper_request(
18672            theBuilder,
18673            theContent.try_into()?,
18674        )?;
18675
18676        ::log::debug!("HTTP request: {:?}", &theRequest);
18677
18678        let theResponse = self.client.request(theRequest).await?;
18679
18680        ::log::debug!("HTTP response: {:?}", &theResponse);
18681
18682        Ok(theResponse)
18683    }
18684
18685    /// Delete branch protection
18686    /// 
18687    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
18688    /// 
18689    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-branch-protection)
18690    pub async fn repos_delete_branch_protection(
18691        &self,
18692        owner: &str,
18693        repo: &str,
18694        branch: &str,
18695    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18696        let mut theScheme = AuthScheme::from(&self.config.authentication);
18697
18698        while let Some(auth_step) = theScheme.step()? {
18699            match auth_step {
18700                ::authentic::AuthenticationStep::Request(auth_request) => {
18701                    theScheme.respond(self.client.request(auth_request).await);
18702                }
18703                ::authentic::AuthenticationStep::WaitFor(duration) => {
18704                    (self.sleep)(duration).await;
18705                }
18706            }
18707        }
18708        let theBuilder = crate::v1_1_4::request::repos_delete_branch_protection::http_builder(
18709            self.config.base_url.as_ref(),
18710            owner,
18711            repo,
18712            branch,
18713            self.config.user_agent.as_ref(),
18714            self.config.accept.as_deref(),
18715        )?
18716        .with_authentication(&theScheme)?;
18717
18718        let theRequest =
18719            crate::v1_1_4::request::repos_delete_branch_protection::hyper_request(theBuilder)?;
18720
18721        ::log::debug!("HTTP request: {:?}", &theRequest);
18722
18723        let theResponse = self.client.request(theRequest).await?;
18724
18725        ::log::debug!("HTTP response: {:?}", &theResponse);
18726
18727        Ok(theResponse)
18728    }
18729
18730    /// Get admin branch protection
18731    /// 
18732    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
18733    /// 
18734    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-admin-branch-protection)
18735    pub async fn repos_get_admin_branch_protection(
18736        &self,
18737        owner: &str,
18738        repo: &str,
18739        branch: &str,
18740    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18741        let mut theScheme = AuthScheme::from(&self.config.authentication);
18742
18743        while let Some(auth_step) = theScheme.step()? {
18744            match auth_step {
18745                ::authentic::AuthenticationStep::Request(auth_request) => {
18746                    theScheme.respond(self.client.request(auth_request).await);
18747                }
18748                ::authentic::AuthenticationStep::WaitFor(duration) => {
18749                    (self.sleep)(duration).await;
18750                }
18751            }
18752        }
18753        let theBuilder = crate::v1_1_4::request::repos_get_admin_branch_protection::http_builder(
18754            self.config.base_url.as_ref(),
18755            owner,
18756            repo,
18757            branch,
18758            self.config.user_agent.as_ref(),
18759            self.config.accept.as_deref(),
18760        )?
18761        .with_authentication(&theScheme)?;
18762
18763        let theRequest =
18764            crate::v1_1_4::request::repos_get_admin_branch_protection::hyper_request(theBuilder)?;
18765
18766        ::log::debug!("HTTP request: {:?}", &theRequest);
18767
18768        let theResponse = self.client.request(theRequest).await?;
18769
18770        ::log::debug!("HTTP response: {:?}", &theResponse);
18771
18772        Ok(theResponse)
18773    }
18774
18775    /// Set admin branch protection
18776    /// 
18777    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
18778    /// 
18779    /// Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
18780    /// 
18781    /// [API method documentation](https://docs.github.com/rest/reference/repos#set-admin-branch-protection)
18782    pub async fn repos_set_admin_branch_protection(
18783        &self,
18784        owner: &str,
18785        repo: &str,
18786        branch: &str,
18787    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18788        let mut theScheme = AuthScheme::from(&self.config.authentication);
18789
18790        while let Some(auth_step) = theScheme.step()? {
18791            match auth_step {
18792                ::authentic::AuthenticationStep::Request(auth_request) => {
18793                    theScheme.respond(self.client.request(auth_request).await);
18794                }
18795                ::authentic::AuthenticationStep::WaitFor(duration) => {
18796                    (self.sleep)(duration).await;
18797                }
18798            }
18799        }
18800        let theBuilder = crate::v1_1_4::request::repos_set_admin_branch_protection::http_builder(
18801            self.config.base_url.as_ref(),
18802            owner,
18803            repo,
18804            branch,
18805            self.config.user_agent.as_ref(),
18806            self.config.accept.as_deref(),
18807        )?
18808        .with_authentication(&theScheme)?;
18809
18810        let theRequest =
18811            crate::v1_1_4::request::repos_set_admin_branch_protection::hyper_request(theBuilder)?;
18812
18813        ::log::debug!("HTTP request: {:?}", &theRequest);
18814
18815        let theResponse = self.client.request(theRequest).await?;
18816
18817        ::log::debug!("HTTP response: {:?}", &theResponse);
18818
18819        Ok(theResponse)
18820    }
18821
18822    /// Delete admin branch protection
18823    /// 
18824    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
18825    /// 
18826    /// Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
18827    /// 
18828    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-admin-branch-protection)
18829    pub async fn repos_delete_admin_branch_protection(
18830        &self,
18831        owner: &str,
18832        repo: &str,
18833        branch: &str,
18834    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18835        let mut theScheme = AuthScheme::from(&self.config.authentication);
18836
18837        while let Some(auth_step) = theScheme.step()? {
18838            match auth_step {
18839                ::authentic::AuthenticationStep::Request(auth_request) => {
18840                    theScheme.respond(self.client.request(auth_request).await);
18841                }
18842                ::authentic::AuthenticationStep::WaitFor(duration) => {
18843                    (self.sleep)(duration).await;
18844                }
18845            }
18846        }
18847        let theBuilder = crate::v1_1_4::request::repos_delete_admin_branch_protection::http_builder(
18848            self.config.base_url.as_ref(),
18849            owner,
18850            repo,
18851            branch,
18852            self.config.user_agent.as_ref(),
18853            self.config.accept.as_deref(),
18854        )?
18855        .with_authentication(&theScheme)?;
18856
18857        let theRequest =
18858            crate::v1_1_4::request::repos_delete_admin_branch_protection::hyper_request(theBuilder)?;
18859
18860        ::log::debug!("HTTP request: {:?}", &theRequest);
18861
18862        let theResponse = self.client.request(theRequest).await?;
18863
18864        ::log::debug!("HTTP response: {:?}", &theResponse);
18865
18866        Ok(theResponse)
18867    }
18868
18869    /// Get pull request review protection
18870    /// 
18871    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
18872    /// 
18873    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-pull-request-review-protection)
18874    pub async fn repos_get_pull_request_review_protection(
18875        &self,
18876        owner: &str,
18877        repo: &str,
18878        branch: &str,
18879    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18880        let mut theScheme = AuthScheme::from(&self.config.authentication);
18881
18882        while let Some(auth_step) = theScheme.step()? {
18883            match auth_step {
18884                ::authentic::AuthenticationStep::Request(auth_request) => {
18885                    theScheme.respond(self.client.request(auth_request).await);
18886                }
18887                ::authentic::AuthenticationStep::WaitFor(duration) => {
18888                    (self.sleep)(duration).await;
18889                }
18890            }
18891        }
18892        let theBuilder = crate::v1_1_4::request::repos_get_pull_request_review_protection::http_builder(
18893            self.config.base_url.as_ref(),
18894            owner,
18895            repo,
18896            branch,
18897            self.config.user_agent.as_ref(),
18898            self.config.accept.as_deref(),
18899        )?
18900        .with_authentication(&theScheme)?;
18901
18902        let theRequest =
18903            crate::v1_1_4::request::repos_get_pull_request_review_protection::hyper_request(theBuilder)?;
18904
18905        ::log::debug!("HTTP request: {:?}", &theRequest);
18906
18907        let theResponse = self.client.request(theRequest).await?;
18908
18909        ::log::debug!("HTTP response: {:?}", &theResponse);
18910
18911        Ok(theResponse)
18912    }
18913
18914    /// Delete pull request review protection
18915    /// 
18916    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
18917    /// 
18918    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-pull-request-review-protection)
18919    pub async fn repos_delete_pull_request_review_protection(
18920        &self,
18921        owner: &str,
18922        repo: &str,
18923        branch: &str,
18924    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
18925        let mut theScheme = AuthScheme::from(&self.config.authentication);
18926
18927        while let Some(auth_step) = theScheme.step()? {
18928            match auth_step {
18929                ::authentic::AuthenticationStep::Request(auth_request) => {
18930                    theScheme.respond(self.client.request(auth_request).await);
18931                }
18932                ::authentic::AuthenticationStep::WaitFor(duration) => {
18933                    (self.sleep)(duration).await;
18934                }
18935            }
18936        }
18937        let theBuilder = crate::v1_1_4::request::repos_delete_pull_request_review_protection::http_builder(
18938            self.config.base_url.as_ref(),
18939            owner,
18940            repo,
18941            branch,
18942            self.config.user_agent.as_ref(),
18943            self.config.accept.as_deref(),
18944        )?
18945        .with_authentication(&theScheme)?;
18946
18947        let theRequest =
18948            crate::v1_1_4::request::repos_delete_pull_request_review_protection::hyper_request(theBuilder)?;
18949
18950        ::log::debug!("HTTP request: {:?}", &theRequest);
18951
18952        let theResponse = self.client.request(theRequest).await?;
18953
18954        ::log::debug!("HTTP response: {:?}", &theResponse);
18955
18956        Ok(theResponse)
18957    }
18958
18959    /// Update pull request review protection
18960    /// 
18961    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
18962    /// 
18963    /// Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
18964    /// 
18965    /// **Note**: Passing new arrays of `users` and `teams` replaces their previous values.
18966    /// 
18967    /// [API method documentation](https://docs.github.com/rest/reference/repos#update-pull-request-review-protection)
18968    ///
18969    /// # Content
18970    ///
18971    /// - [`&v1_1_4::request::repos_update_pull_request_review_protection::body::Json`](crate::v1_1_4::request::repos_update_pull_request_review_protection::body::Json)
18972    pub async fn repos_update_pull_request_review_protection<Content>(
18973        &self,
18974        owner: &str,
18975        repo: &str,
18976        branch: &str,
18977        theContent: Content,
18978    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
18979    where
18980        Content: Copy + TryInto<crate::v1_1_4::request::repos_update_pull_request_review_protection::Content<::hyper::Body>>,
18981        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_update_pull_request_review_protection::Content<::hyper::Body>>>::Error>
18982    {
18983        let mut theScheme = AuthScheme::from(&self.config.authentication);
18984
18985        while let Some(auth_step) = theScheme.step()? {
18986            match auth_step {
18987                ::authentic::AuthenticationStep::Request(auth_request) => {
18988                    theScheme.respond(self.client.request(auth_request).await);
18989                }
18990                ::authentic::AuthenticationStep::WaitFor(duration) => {
18991                    (self.sleep)(duration).await;
18992                }
18993            }
18994        }
18995        let theBuilder = crate::v1_1_4::request::repos_update_pull_request_review_protection::http_builder(
18996            self.config.base_url.as_ref(),
18997            owner,
18998            repo,
18999            branch,
19000            self.config.user_agent.as_ref(),
19001            self.config.accept.as_deref(),
19002        )?
19003        .with_authentication(&theScheme)?;
19004
19005        let theRequest = crate::v1_1_4::request::repos_update_pull_request_review_protection::hyper_request(
19006            theBuilder,
19007            theContent.try_into()?,
19008        )?;
19009
19010        ::log::debug!("HTTP request: {:?}", &theRequest);
19011
19012        let theResponse = self.client.request(theRequest).await?;
19013
19014        ::log::debug!("HTTP response: {:?}", &theResponse);
19015
19016        Ok(theResponse)
19017    }
19018
19019    /// Get commit signature protection
19020    /// 
19021    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19022    /// 
19023    /// When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help.
19024    /// 
19025    /// **Note**: You must enable branch protection to require signed commits.
19026    /// 
19027    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-commit-signature-protection)
19028    pub async fn repos_get_commit_signature_protection(
19029        &self,
19030        owner: &str,
19031        repo: &str,
19032        branch: &str,
19033    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
19034        let mut theScheme = AuthScheme::from(&self.config.authentication);
19035
19036        while let Some(auth_step) = theScheme.step()? {
19037            match auth_step {
19038                ::authentic::AuthenticationStep::Request(auth_request) => {
19039                    theScheme.respond(self.client.request(auth_request).await);
19040                }
19041                ::authentic::AuthenticationStep::WaitFor(duration) => {
19042                    (self.sleep)(duration).await;
19043                }
19044            }
19045        }
19046        let theBuilder = crate::v1_1_4::request::repos_get_commit_signature_protection::http_builder(
19047            self.config.base_url.as_ref(),
19048            owner,
19049            repo,
19050            branch,
19051            self.config.user_agent.as_ref(),
19052            self.config.accept.as_deref(),
19053        )?
19054        .with_authentication(&theScheme)?;
19055
19056        let theRequest =
19057            crate::v1_1_4::request::repos_get_commit_signature_protection::hyper_request(theBuilder)?;
19058
19059        ::log::debug!("HTTP request: {:?}", &theRequest);
19060
19061        let theResponse = self.client.request(theRequest).await?;
19062
19063        ::log::debug!("HTTP response: {:?}", &theResponse);
19064
19065        Ok(theResponse)
19066    }
19067
19068    /// Create commit signature protection
19069    /// 
19070    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19071    /// 
19072    /// When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.
19073    /// 
19074    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-commit-signature-protection)
19075    pub async fn repos_create_commit_signature_protection(
19076        &self,
19077        owner: &str,
19078        repo: &str,
19079        branch: &str,
19080    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
19081        let mut theScheme = AuthScheme::from(&self.config.authentication);
19082
19083        while let Some(auth_step) = theScheme.step()? {
19084            match auth_step {
19085                ::authentic::AuthenticationStep::Request(auth_request) => {
19086                    theScheme.respond(self.client.request(auth_request).await);
19087                }
19088                ::authentic::AuthenticationStep::WaitFor(duration) => {
19089                    (self.sleep)(duration).await;
19090                }
19091            }
19092        }
19093        let theBuilder = crate::v1_1_4::request::repos_create_commit_signature_protection::http_builder(
19094            self.config.base_url.as_ref(),
19095            owner,
19096            repo,
19097            branch,
19098            self.config.user_agent.as_ref(),
19099            self.config.accept.as_deref(),
19100        )?
19101        .with_authentication(&theScheme)?;
19102
19103        let theRequest =
19104            crate::v1_1_4::request::repos_create_commit_signature_protection::hyper_request(theBuilder)?;
19105
19106        ::log::debug!("HTTP request: {:?}", &theRequest);
19107
19108        let theResponse = self.client.request(theRequest).await?;
19109
19110        ::log::debug!("HTTP response: {:?}", &theResponse);
19111
19112        Ok(theResponse)
19113    }
19114
19115    /// Delete commit signature protection
19116    /// 
19117    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19118    /// 
19119    /// When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits.
19120    /// 
19121    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-commit-signature-protection)
19122    pub async fn repos_delete_commit_signature_protection(
19123        &self,
19124        owner: &str,
19125        repo: &str,
19126        branch: &str,
19127    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
19128        let mut theScheme = AuthScheme::from(&self.config.authentication);
19129
19130        while let Some(auth_step) = theScheme.step()? {
19131            match auth_step {
19132                ::authentic::AuthenticationStep::Request(auth_request) => {
19133                    theScheme.respond(self.client.request(auth_request).await);
19134                }
19135                ::authentic::AuthenticationStep::WaitFor(duration) => {
19136                    (self.sleep)(duration).await;
19137                }
19138            }
19139        }
19140        let theBuilder = crate::v1_1_4::request::repos_delete_commit_signature_protection::http_builder(
19141            self.config.base_url.as_ref(),
19142            owner,
19143            repo,
19144            branch,
19145            self.config.user_agent.as_ref(),
19146            self.config.accept.as_deref(),
19147        )?
19148        .with_authentication(&theScheme)?;
19149
19150        let theRequest =
19151            crate::v1_1_4::request::repos_delete_commit_signature_protection::hyper_request(theBuilder)?;
19152
19153        ::log::debug!("HTTP request: {:?}", &theRequest);
19154
19155        let theResponse = self.client.request(theRequest).await?;
19156
19157        ::log::debug!("HTTP response: {:?}", &theResponse);
19158
19159        Ok(theResponse)
19160    }
19161
19162    /// Get status checks protection
19163    /// 
19164    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19165    /// 
19166    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-status-checks-protection)
19167    pub async fn repos_get_status_checks_protection(
19168        &self,
19169        owner: &str,
19170        repo: &str,
19171        branch: &str,
19172    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
19173        let mut theScheme = AuthScheme::from(&self.config.authentication);
19174
19175        while let Some(auth_step) = theScheme.step()? {
19176            match auth_step {
19177                ::authentic::AuthenticationStep::Request(auth_request) => {
19178                    theScheme.respond(self.client.request(auth_request).await);
19179                }
19180                ::authentic::AuthenticationStep::WaitFor(duration) => {
19181                    (self.sleep)(duration).await;
19182                }
19183            }
19184        }
19185        let theBuilder = crate::v1_1_4::request::repos_get_status_checks_protection::http_builder(
19186            self.config.base_url.as_ref(),
19187            owner,
19188            repo,
19189            branch,
19190            self.config.user_agent.as_ref(),
19191            self.config.accept.as_deref(),
19192        )?
19193        .with_authentication(&theScheme)?;
19194
19195        let theRequest =
19196            crate::v1_1_4::request::repos_get_status_checks_protection::hyper_request(theBuilder)?;
19197
19198        ::log::debug!("HTTP request: {:?}", &theRequest);
19199
19200        let theResponse = self.client.request(theRequest).await?;
19201
19202        ::log::debug!("HTTP response: {:?}", &theResponse);
19203
19204        Ok(theResponse)
19205    }
19206
19207    /// Remove status check protection
19208    /// 
19209    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19210    /// 
19211    /// [API method documentation](https://docs.github.com/rest/reference/repos#remove-status-check-protection)
19212    pub async fn repos_remove_status_check_protection(
19213        &self,
19214        owner: &str,
19215        repo: &str,
19216        branch: &str,
19217    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
19218        let mut theScheme = AuthScheme::from(&self.config.authentication);
19219
19220        while let Some(auth_step) = theScheme.step()? {
19221            match auth_step {
19222                ::authentic::AuthenticationStep::Request(auth_request) => {
19223                    theScheme.respond(self.client.request(auth_request).await);
19224                }
19225                ::authentic::AuthenticationStep::WaitFor(duration) => {
19226                    (self.sleep)(duration).await;
19227                }
19228            }
19229        }
19230        let theBuilder = crate::v1_1_4::request::repos_remove_status_check_protection::http_builder(
19231            self.config.base_url.as_ref(),
19232            owner,
19233            repo,
19234            branch,
19235            self.config.user_agent.as_ref(),
19236            self.config.accept.as_deref(),
19237        )?
19238        .with_authentication(&theScheme)?;
19239
19240        let theRequest =
19241            crate::v1_1_4::request::repos_remove_status_check_protection::hyper_request(theBuilder)?;
19242
19243        ::log::debug!("HTTP request: {:?}", &theRequest);
19244
19245        let theResponse = self.client.request(theRequest).await?;
19246
19247        ::log::debug!("HTTP response: {:?}", &theResponse);
19248
19249        Ok(theResponse)
19250    }
19251
19252    /// Update status check protection
19253    /// 
19254    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19255    /// 
19256    /// Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.
19257    /// 
19258    /// [API method documentation](https://docs.github.com/rest/reference/repos#update-status-check-protection)
19259    ///
19260    /// # Content
19261    ///
19262    /// - [`&v1_1_4::request::repos_update_status_check_protection::body::Json`](crate::v1_1_4::request::repos_update_status_check_protection::body::Json)
19263    pub async fn repos_update_status_check_protection<Content>(
19264        &self,
19265        owner: &str,
19266        repo: &str,
19267        branch: &str,
19268        theContent: Content,
19269    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
19270    where
19271        Content: Copy + TryInto<crate::v1_1_4::request::repos_update_status_check_protection::Content<::hyper::Body>>,
19272        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_update_status_check_protection::Content<::hyper::Body>>>::Error>
19273    {
19274        let mut theScheme = AuthScheme::from(&self.config.authentication);
19275
19276        while let Some(auth_step) = theScheme.step()? {
19277            match auth_step {
19278                ::authentic::AuthenticationStep::Request(auth_request) => {
19279                    theScheme.respond(self.client.request(auth_request).await);
19280                }
19281                ::authentic::AuthenticationStep::WaitFor(duration) => {
19282                    (self.sleep)(duration).await;
19283                }
19284            }
19285        }
19286        let theBuilder = crate::v1_1_4::request::repos_update_status_check_protection::http_builder(
19287            self.config.base_url.as_ref(),
19288            owner,
19289            repo,
19290            branch,
19291            self.config.user_agent.as_ref(),
19292            self.config.accept.as_deref(),
19293        )?
19294        .with_authentication(&theScheme)?;
19295
19296        let theRequest = crate::v1_1_4::request::repos_update_status_check_protection::hyper_request(
19297            theBuilder,
19298            theContent.try_into()?,
19299        )?;
19300
19301        ::log::debug!("HTTP request: {:?}", &theRequest);
19302
19303        let theResponse = self.client.request(theRequest).await?;
19304
19305        ::log::debug!("HTTP response: {:?}", &theResponse);
19306
19307        Ok(theResponse)
19308    }
19309
19310    /// Get all status check contexts
19311    /// 
19312    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19313    /// 
19314    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-all-status-check-contexts)
19315    pub async fn repos_get_all_status_check_contexts(
19316        &self,
19317        owner: &str,
19318        repo: &str,
19319        branch: &str,
19320    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
19321        let mut theScheme = AuthScheme::from(&self.config.authentication);
19322
19323        while let Some(auth_step) = theScheme.step()? {
19324            match auth_step {
19325                ::authentic::AuthenticationStep::Request(auth_request) => {
19326                    theScheme.respond(self.client.request(auth_request).await);
19327                }
19328                ::authentic::AuthenticationStep::WaitFor(duration) => {
19329                    (self.sleep)(duration).await;
19330                }
19331            }
19332        }
19333        let theBuilder = crate::v1_1_4::request::repos_get_all_status_check_contexts::http_builder(
19334            self.config.base_url.as_ref(),
19335            owner,
19336            repo,
19337            branch,
19338            self.config.user_agent.as_ref(),
19339            self.config.accept.as_deref(),
19340        )?
19341        .with_authentication(&theScheme)?;
19342
19343        let theRequest =
19344            crate::v1_1_4::request::repos_get_all_status_check_contexts::hyper_request(theBuilder)?;
19345
19346        ::log::debug!("HTTP request: {:?}", &theRequest);
19347
19348        let theResponse = self.client.request(theRequest).await?;
19349
19350        ::log::debug!("HTTP response: {:?}", &theResponse);
19351
19352        Ok(theResponse)
19353    }
19354
19355    /// Set status check contexts
19356    /// 
19357    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19358    /// 
19359    /// [API method documentation](https://docs.github.com/rest/reference/repos#set-status-check-contexts)
19360    ///
19361    /// # Content
19362    ///
19363    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
19364    pub async fn repos_set_status_check_contexts<Content>(
19365        &self,
19366        owner: &str,
19367        repo: &str,
19368        branch: &str,
19369        theContent: Content,
19370    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
19371    where
19372        Content: Copy + TryInto<crate::v1_1_4::request::repos_set_status_check_contexts::Content<::hyper::Body>>,
19373        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_set_status_check_contexts::Content<::hyper::Body>>>::Error>
19374    {
19375        let mut theScheme = AuthScheme::from(&self.config.authentication);
19376
19377        while let Some(auth_step) = theScheme.step()? {
19378            match auth_step {
19379                ::authentic::AuthenticationStep::Request(auth_request) => {
19380                    theScheme.respond(self.client.request(auth_request).await);
19381                }
19382                ::authentic::AuthenticationStep::WaitFor(duration) => {
19383                    (self.sleep)(duration).await;
19384                }
19385            }
19386        }
19387        let theBuilder = crate::v1_1_4::request::repos_set_status_check_contexts::http_builder(
19388            self.config.base_url.as_ref(),
19389            owner,
19390            repo,
19391            branch,
19392            self.config.user_agent.as_ref(),
19393            self.config.accept.as_deref(),
19394        )?
19395        .with_authentication(&theScheme)?;
19396
19397        let theRequest = crate::v1_1_4::request::repos_set_status_check_contexts::hyper_request(
19398            theBuilder,
19399            theContent.try_into()?,
19400        )?;
19401
19402        ::log::debug!("HTTP request: {:?}", &theRequest);
19403
19404        let theResponse = self.client.request(theRequest).await?;
19405
19406        ::log::debug!("HTTP response: {:?}", &theResponse);
19407
19408        Ok(theResponse)
19409    }
19410
19411    /// Add status check contexts
19412    /// 
19413    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19414    /// 
19415    /// [API method documentation](https://docs.github.com/rest/reference/repos#add-status-check-contexts)
19416    ///
19417    /// # Content
19418    ///
19419    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
19420    pub async fn repos_add_status_check_contexts<Content>(
19421        &self,
19422        owner: &str,
19423        repo: &str,
19424        branch: &str,
19425        theContent: Content,
19426    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
19427    where
19428        Content: Copy + TryInto<crate::v1_1_4::request::repos_add_status_check_contexts::Content<::hyper::Body>>,
19429        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_add_status_check_contexts::Content<::hyper::Body>>>::Error>
19430    {
19431        let mut theScheme = AuthScheme::from(&self.config.authentication);
19432
19433        while let Some(auth_step) = theScheme.step()? {
19434            match auth_step {
19435                ::authentic::AuthenticationStep::Request(auth_request) => {
19436                    theScheme.respond(self.client.request(auth_request).await);
19437                }
19438                ::authentic::AuthenticationStep::WaitFor(duration) => {
19439                    (self.sleep)(duration).await;
19440                }
19441            }
19442        }
19443        let theBuilder = crate::v1_1_4::request::repos_add_status_check_contexts::http_builder(
19444            self.config.base_url.as_ref(),
19445            owner,
19446            repo,
19447            branch,
19448            self.config.user_agent.as_ref(),
19449            self.config.accept.as_deref(),
19450        )?
19451        .with_authentication(&theScheme)?;
19452
19453        let theRequest = crate::v1_1_4::request::repos_add_status_check_contexts::hyper_request(
19454            theBuilder,
19455            theContent.try_into()?,
19456        )?;
19457
19458        ::log::debug!("HTTP request: {:?}", &theRequest);
19459
19460        let theResponse = self.client.request(theRequest).await?;
19461
19462        ::log::debug!("HTTP response: {:?}", &theResponse);
19463
19464        Ok(theResponse)
19465    }
19466
19467    /// Remove status check contexts
19468    /// 
19469    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19470    /// 
19471    /// [API method documentation](https://docs.github.com/rest/reference/repos#remove-status-check-contexts)
19472    ///
19473    /// # Content
19474    ///
19475    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
19476    pub async fn repos_remove_status_check_contexts<Content>(
19477        &self,
19478        owner: &str,
19479        repo: &str,
19480        branch: &str,
19481        theContent: Content,
19482    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
19483    where
19484        Content: Copy + TryInto<crate::v1_1_4::request::repos_remove_status_check_contexts::Content<::hyper::Body>>,
19485        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_remove_status_check_contexts::Content<::hyper::Body>>>::Error>
19486    {
19487        let mut theScheme = AuthScheme::from(&self.config.authentication);
19488
19489        while let Some(auth_step) = theScheme.step()? {
19490            match auth_step {
19491                ::authentic::AuthenticationStep::Request(auth_request) => {
19492                    theScheme.respond(self.client.request(auth_request).await);
19493                }
19494                ::authentic::AuthenticationStep::WaitFor(duration) => {
19495                    (self.sleep)(duration).await;
19496                }
19497            }
19498        }
19499        let theBuilder = crate::v1_1_4::request::repos_remove_status_check_contexts::http_builder(
19500            self.config.base_url.as_ref(),
19501            owner,
19502            repo,
19503            branch,
19504            self.config.user_agent.as_ref(),
19505            self.config.accept.as_deref(),
19506        )?
19507        .with_authentication(&theScheme)?;
19508
19509        let theRequest = crate::v1_1_4::request::repos_remove_status_check_contexts::hyper_request(
19510            theBuilder,
19511            theContent.try_into()?,
19512        )?;
19513
19514        ::log::debug!("HTTP request: {:?}", &theRequest);
19515
19516        let theResponse = self.client.request(theRequest).await?;
19517
19518        ::log::debug!("HTTP response: {:?}", &theResponse);
19519
19520        Ok(theResponse)
19521    }
19522
19523    /// Get access restrictions
19524    /// 
19525    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19526    /// 
19527    /// Lists who has access to this protected branch.
19528    /// 
19529    /// **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories.
19530    /// 
19531    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-access-restrictions)
19532    pub async fn repos_get_access_restrictions(
19533        &self,
19534        owner: &str,
19535        repo: &str,
19536        branch: &str,
19537    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
19538        let mut theScheme = AuthScheme::from(&self.config.authentication);
19539
19540        while let Some(auth_step) = theScheme.step()? {
19541            match auth_step {
19542                ::authentic::AuthenticationStep::Request(auth_request) => {
19543                    theScheme.respond(self.client.request(auth_request).await);
19544                }
19545                ::authentic::AuthenticationStep::WaitFor(duration) => {
19546                    (self.sleep)(duration).await;
19547                }
19548            }
19549        }
19550        let theBuilder = crate::v1_1_4::request::repos_get_access_restrictions::http_builder(
19551            self.config.base_url.as_ref(),
19552            owner,
19553            repo,
19554            branch,
19555            self.config.user_agent.as_ref(),
19556            self.config.accept.as_deref(),
19557        )?
19558        .with_authentication(&theScheme)?;
19559
19560        let theRequest =
19561            crate::v1_1_4::request::repos_get_access_restrictions::hyper_request(theBuilder)?;
19562
19563        ::log::debug!("HTTP request: {:?}", &theRequest);
19564
19565        let theResponse = self.client.request(theRequest).await?;
19566
19567        ::log::debug!("HTTP response: {:?}", &theResponse);
19568
19569        Ok(theResponse)
19570    }
19571
19572    /// Delete access restrictions
19573    /// 
19574    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19575    /// 
19576    /// Disables the ability to restrict who can push to this branch.
19577    /// 
19578    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-access-restrictions)
19579    pub async fn repos_delete_access_restrictions(
19580        &self,
19581        owner: &str,
19582        repo: &str,
19583        branch: &str,
19584    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
19585        let mut theScheme = AuthScheme::from(&self.config.authentication);
19586
19587        while let Some(auth_step) = theScheme.step()? {
19588            match auth_step {
19589                ::authentic::AuthenticationStep::Request(auth_request) => {
19590                    theScheme.respond(self.client.request(auth_request).await);
19591                }
19592                ::authentic::AuthenticationStep::WaitFor(duration) => {
19593                    (self.sleep)(duration).await;
19594                }
19595            }
19596        }
19597        let theBuilder = crate::v1_1_4::request::repos_delete_access_restrictions::http_builder(
19598            self.config.base_url.as_ref(),
19599            owner,
19600            repo,
19601            branch,
19602            self.config.user_agent.as_ref(),
19603            self.config.accept.as_deref(),
19604        )?
19605        .with_authentication(&theScheme)?;
19606
19607        let theRequest =
19608            crate::v1_1_4::request::repos_delete_access_restrictions::hyper_request(theBuilder)?;
19609
19610        ::log::debug!("HTTP request: {:?}", &theRequest);
19611
19612        let theResponse = self.client.request(theRequest).await?;
19613
19614        ::log::debug!("HTTP response: {:?}", &theResponse);
19615
19616        Ok(theResponse)
19617    }
19618
19619    /// Get apps with access to the protected branch
19620    /// 
19621    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19622    /// 
19623    /// Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch.
19624    /// 
19625    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-apps-with-access-to-the-protected-branch)
19626    pub async fn repos_get_apps_with_access_to_protected_branch(
19627        &self,
19628        owner: &str,
19629        repo: &str,
19630        branch: &str,
19631    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
19632        let mut theScheme = AuthScheme::from(&self.config.authentication);
19633
19634        while let Some(auth_step) = theScheme.step()? {
19635            match auth_step {
19636                ::authentic::AuthenticationStep::Request(auth_request) => {
19637                    theScheme.respond(self.client.request(auth_request).await);
19638                }
19639                ::authentic::AuthenticationStep::WaitFor(duration) => {
19640                    (self.sleep)(duration).await;
19641                }
19642            }
19643        }
19644        let theBuilder = crate::v1_1_4::request::repos_get_apps_with_access_to_protected_branch::http_builder(
19645            self.config.base_url.as_ref(),
19646            owner,
19647            repo,
19648            branch,
19649            self.config.user_agent.as_ref(),
19650            self.config.accept.as_deref(),
19651        )?
19652        .with_authentication(&theScheme)?;
19653
19654        let theRequest =
19655            crate::v1_1_4::request::repos_get_apps_with_access_to_protected_branch::hyper_request(theBuilder)?;
19656
19657        ::log::debug!("HTTP request: {:?}", &theRequest);
19658
19659        let theResponse = self.client.request(theRequest).await?;
19660
19661        ::log::debug!("HTTP response: {:?}", &theResponse);
19662
19663        Ok(theResponse)
19664    }
19665
19666    /// Set app access restrictions
19667    /// 
19668    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19669    /// 
19670    /// Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch.
19671    /// 
19672    /// | Type    | Description                                                                                                                                                |
19673    /// | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
19674    /// | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
19675    /// 
19676    /// [API method documentation](https://docs.github.com/rest/reference/repos#set-app-access-restrictions)
19677    ///
19678    /// # Content
19679    ///
19680    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
19681    pub async fn repos_set_app_access_restrictions<Content>(
19682        &self,
19683        owner: &str,
19684        repo: &str,
19685        branch: &str,
19686        theContent: Content,
19687    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
19688    where
19689        Content: Copy + TryInto<crate::v1_1_4::request::repos_set_app_access_restrictions::Content<::hyper::Body>>,
19690        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_set_app_access_restrictions::Content<::hyper::Body>>>::Error>
19691    {
19692        let mut theScheme = AuthScheme::from(&self.config.authentication);
19693
19694        while let Some(auth_step) = theScheme.step()? {
19695            match auth_step {
19696                ::authentic::AuthenticationStep::Request(auth_request) => {
19697                    theScheme.respond(self.client.request(auth_request).await);
19698                }
19699                ::authentic::AuthenticationStep::WaitFor(duration) => {
19700                    (self.sleep)(duration).await;
19701                }
19702            }
19703        }
19704        let theBuilder = crate::v1_1_4::request::repos_set_app_access_restrictions::http_builder(
19705            self.config.base_url.as_ref(),
19706            owner,
19707            repo,
19708            branch,
19709            self.config.user_agent.as_ref(),
19710            self.config.accept.as_deref(),
19711        )?
19712        .with_authentication(&theScheme)?;
19713
19714        let theRequest = crate::v1_1_4::request::repos_set_app_access_restrictions::hyper_request(
19715            theBuilder,
19716            theContent.try_into()?,
19717        )?;
19718
19719        ::log::debug!("HTTP request: {:?}", &theRequest);
19720
19721        let theResponse = self.client.request(theRequest).await?;
19722
19723        ::log::debug!("HTTP response: {:?}", &theResponse);
19724
19725        Ok(theResponse)
19726    }
19727
19728    /// Add app access restrictions
19729    /// 
19730    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19731    /// 
19732    /// Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch.
19733    /// 
19734    /// | Type    | Description                                                                                                                                                |
19735    /// | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
19736    /// | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
19737    /// 
19738    /// [API method documentation](https://docs.github.com/rest/reference/repos#add-app-access-restrictions)
19739    ///
19740    /// # Content
19741    ///
19742    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
19743    pub async fn repos_add_app_access_restrictions<Content>(
19744        &self,
19745        owner: &str,
19746        repo: &str,
19747        branch: &str,
19748        theContent: Content,
19749    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
19750    where
19751        Content: Copy + TryInto<crate::v1_1_4::request::repos_add_app_access_restrictions::Content<::hyper::Body>>,
19752        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_add_app_access_restrictions::Content<::hyper::Body>>>::Error>
19753    {
19754        let mut theScheme = AuthScheme::from(&self.config.authentication);
19755
19756        while let Some(auth_step) = theScheme.step()? {
19757            match auth_step {
19758                ::authentic::AuthenticationStep::Request(auth_request) => {
19759                    theScheme.respond(self.client.request(auth_request).await);
19760                }
19761                ::authentic::AuthenticationStep::WaitFor(duration) => {
19762                    (self.sleep)(duration).await;
19763                }
19764            }
19765        }
19766        let theBuilder = crate::v1_1_4::request::repos_add_app_access_restrictions::http_builder(
19767            self.config.base_url.as_ref(),
19768            owner,
19769            repo,
19770            branch,
19771            self.config.user_agent.as_ref(),
19772            self.config.accept.as_deref(),
19773        )?
19774        .with_authentication(&theScheme)?;
19775
19776        let theRequest = crate::v1_1_4::request::repos_add_app_access_restrictions::hyper_request(
19777            theBuilder,
19778            theContent.try_into()?,
19779        )?;
19780
19781        ::log::debug!("HTTP request: {:?}", &theRequest);
19782
19783        let theResponse = self.client.request(theRequest).await?;
19784
19785        ::log::debug!("HTTP response: {:?}", &theResponse);
19786
19787        Ok(theResponse)
19788    }
19789
19790    /// Remove app access restrictions
19791    /// 
19792    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19793    /// 
19794    /// Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch.
19795    /// 
19796    /// | Type    | Description                                                                                                                                                |
19797    /// | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
19798    /// | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
19799    /// 
19800    /// [API method documentation](https://docs.github.com/rest/reference/repos#remove-app-access-restrictions)
19801    ///
19802    /// # Content
19803    ///
19804    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
19805    pub async fn repos_remove_app_access_restrictions<Content>(
19806        &self,
19807        owner: &str,
19808        repo: &str,
19809        branch: &str,
19810        theContent: Content,
19811    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
19812    where
19813        Content: Copy + TryInto<crate::v1_1_4::request::repos_remove_app_access_restrictions::Content<::hyper::Body>>,
19814        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_remove_app_access_restrictions::Content<::hyper::Body>>>::Error>
19815    {
19816        let mut theScheme = AuthScheme::from(&self.config.authentication);
19817
19818        while let Some(auth_step) = theScheme.step()? {
19819            match auth_step {
19820                ::authentic::AuthenticationStep::Request(auth_request) => {
19821                    theScheme.respond(self.client.request(auth_request).await);
19822                }
19823                ::authentic::AuthenticationStep::WaitFor(duration) => {
19824                    (self.sleep)(duration).await;
19825                }
19826            }
19827        }
19828        let theBuilder = crate::v1_1_4::request::repos_remove_app_access_restrictions::http_builder(
19829            self.config.base_url.as_ref(),
19830            owner,
19831            repo,
19832            branch,
19833            self.config.user_agent.as_ref(),
19834            self.config.accept.as_deref(),
19835        )?
19836        .with_authentication(&theScheme)?;
19837
19838        let theRequest = crate::v1_1_4::request::repos_remove_app_access_restrictions::hyper_request(
19839            theBuilder,
19840            theContent.try_into()?,
19841        )?;
19842
19843        ::log::debug!("HTTP request: {:?}", &theRequest);
19844
19845        let theResponse = self.client.request(theRequest).await?;
19846
19847        ::log::debug!("HTTP response: {:?}", &theResponse);
19848
19849        Ok(theResponse)
19850    }
19851
19852    /// Get teams with access to the protected branch
19853    /// 
19854    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19855    /// 
19856    /// Lists the teams who have push access to this branch. The list includes child teams.
19857    /// 
19858    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-teams-with-access-to-the-protected-branch)
19859    pub async fn repos_get_teams_with_access_to_protected_branch(
19860        &self,
19861        owner: &str,
19862        repo: &str,
19863        branch: &str,
19864    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
19865        let mut theScheme = AuthScheme::from(&self.config.authentication);
19866
19867        while let Some(auth_step) = theScheme.step()? {
19868            match auth_step {
19869                ::authentic::AuthenticationStep::Request(auth_request) => {
19870                    theScheme.respond(self.client.request(auth_request).await);
19871                }
19872                ::authentic::AuthenticationStep::WaitFor(duration) => {
19873                    (self.sleep)(duration).await;
19874                }
19875            }
19876        }
19877        let theBuilder = crate::v1_1_4::request::repos_get_teams_with_access_to_protected_branch::http_builder(
19878            self.config.base_url.as_ref(),
19879            owner,
19880            repo,
19881            branch,
19882            self.config.user_agent.as_ref(),
19883            self.config.accept.as_deref(),
19884        )?
19885        .with_authentication(&theScheme)?;
19886
19887        let theRequest =
19888            crate::v1_1_4::request::repos_get_teams_with_access_to_protected_branch::hyper_request(theBuilder)?;
19889
19890        ::log::debug!("HTTP request: {:?}", &theRequest);
19891
19892        let theResponse = self.client.request(theRequest).await?;
19893
19894        ::log::debug!("HTTP response: {:?}", &theResponse);
19895
19896        Ok(theResponse)
19897    }
19898
19899    /// Set team access restrictions
19900    /// 
19901    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19902    /// 
19903    /// Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.
19904    /// 
19905    /// | Type    | Description                                                                                                                                |
19906    /// | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
19907    /// | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
19908    /// 
19909    /// [API method documentation](https://docs.github.com/rest/reference/repos#set-team-access-restrictions)
19910    ///
19911    /// # Content
19912    ///
19913    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
19914    pub async fn repos_set_team_access_restrictions<Content>(
19915        &self,
19916        owner: &str,
19917        repo: &str,
19918        branch: &str,
19919        theContent: Content,
19920    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
19921    where
19922        Content: Copy + TryInto<crate::v1_1_4::request::repos_set_team_access_restrictions::Content<::hyper::Body>>,
19923        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_set_team_access_restrictions::Content<::hyper::Body>>>::Error>
19924    {
19925        let mut theScheme = AuthScheme::from(&self.config.authentication);
19926
19927        while let Some(auth_step) = theScheme.step()? {
19928            match auth_step {
19929                ::authentic::AuthenticationStep::Request(auth_request) => {
19930                    theScheme.respond(self.client.request(auth_request).await);
19931                }
19932                ::authentic::AuthenticationStep::WaitFor(duration) => {
19933                    (self.sleep)(duration).await;
19934                }
19935            }
19936        }
19937        let theBuilder = crate::v1_1_4::request::repos_set_team_access_restrictions::http_builder(
19938            self.config.base_url.as_ref(),
19939            owner,
19940            repo,
19941            branch,
19942            self.config.user_agent.as_ref(),
19943            self.config.accept.as_deref(),
19944        )?
19945        .with_authentication(&theScheme)?;
19946
19947        let theRequest = crate::v1_1_4::request::repos_set_team_access_restrictions::hyper_request(
19948            theBuilder,
19949            theContent.try_into()?,
19950        )?;
19951
19952        ::log::debug!("HTTP request: {:?}", &theRequest);
19953
19954        let theResponse = self.client.request(theRequest).await?;
19955
19956        ::log::debug!("HTTP response: {:?}", &theResponse);
19957
19958        Ok(theResponse)
19959    }
19960
19961    /// Add team access restrictions
19962    /// 
19963    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
19964    /// 
19965    /// Grants the specified teams push access for this branch. You can also give push access to child teams.
19966    /// 
19967    /// | Type    | Description                                                                                                                                |
19968    /// | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
19969    /// | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
19970    /// 
19971    /// [API method documentation](https://docs.github.com/rest/reference/repos#add-team-access-restrictions)
19972    ///
19973    /// # Content
19974    ///
19975    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
19976    pub async fn repos_add_team_access_restrictions<Content>(
19977        &self,
19978        owner: &str,
19979        repo: &str,
19980        branch: &str,
19981        theContent: Content,
19982    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
19983    where
19984        Content: Copy + TryInto<crate::v1_1_4::request::repos_add_team_access_restrictions::Content<::hyper::Body>>,
19985        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_add_team_access_restrictions::Content<::hyper::Body>>>::Error>
19986    {
19987        let mut theScheme = AuthScheme::from(&self.config.authentication);
19988
19989        while let Some(auth_step) = theScheme.step()? {
19990            match auth_step {
19991                ::authentic::AuthenticationStep::Request(auth_request) => {
19992                    theScheme.respond(self.client.request(auth_request).await);
19993                }
19994                ::authentic::AuthenticationStep::WaitFor(duration) => {
19995                    (self.sleep)(duration).await;
19996                }
19997            }
19998        }
19999        let theBuilder = crate::v1_1_4::request::repos_add_team_access_restrictions::http_builder(
20000            self.config.base_url.as_ref(),
20001            owner,
20002            repo,
20003            branch,
20004            self.config.user_agent.as_ref(),
20005            self.config.accept.as_deref(),
20006        )?
20007        .with_authentication(&theScheme)?;
20008
20009        let theRequest = crate::v1_1_4::request::repos_add_team_access_restrictions::hyper_request(
20010            theBuilder,
20011            theContent.try_into()?,
20012        )?;
20013
20014        ::log::debug!("HTTP request: {:?}", &theRequest);
20015
20016        let theResponse = self.client.request(theRequest).await?;
20017
20018        ::log::debug!("HTTP response: {:?}", &theResponse);
20019
20020        Ok(theResponse)
20021    }
20022
20023    /// Remove team access restrictions
20024    /// 
20025    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20026    /// 
20027    /// Removes the ability of a team to push to this branch. You can also remove push access for child teams.
20028    /// 
20029    /// | Type    | Description                                                                                                                                         |
20030    /// | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
20031    /// | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
20032    /// 
20033    /// [API method documentation](https://docs.github.com/rest/reference/repos#remove-team-access-restrictions)
20034    ///
20035    /// # Content
20036    ///
20037    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
20038    pub async fn repos_remove_team_access_restrictions<Content>(
20039        &self,
20040        owner: &str,
20041        repo: &str,
20042        branch: &str,
20043        theContent: Content,
20044    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
20045    where
20046        Content: Copy + TryInto<crate::v1_1_4::request::repos_remove_team_access_restrictions::Content<::hyper::Body>>,
20047        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_remove_team_access_restrictions::Content<::hyper::Body>>>::Error>
20048    {
20049        let mut theScheme = AuthScheme::from(&self.config.authentication);
20050
20051        while let Some(auth_step) = theScheme.step()? {
20052            match auth_step {
20053                ::authentic::AuthenticationStep::Request(auth_request) => {
20054                    theScheme.respond(self.client.request(auth_request).await);
20055                }
20056                ::authentic::AuthenticationStep::WaitFor(duration) => {
20057                    (self.sleep)(duration).await;
20058                }
20059            }
20060        }
20061        let theBuilder = crate::v1_1_4::request::repos_remove_team_access_restrictions::http_builder(
20062            self.config.base_url.as_ref(),
20063            owner,
20064            repo,
20065            branch,
20066            self.config.user_agent.as_ref(),
20067            self.config.accept.as_deref(),
20068        )?
20069        .with_authentication(&theScheme)?;
20070
20071        let theRequest = crate::v1_1_4::request::repos_remove_team_access_restrictions::hyper_request(
20072            theBuilder,
20073            theContent.try_into()?,
20074        )?;
20075
20076        ::log::debug!("HTTP request: {:?}", &theRequest);
20077
20078        let theResponse = self.client.request(theRequest).await?;
20079
20080        ::log::debug!("HTTP response: {:?}", &theResponse);
20081
20082        Ok(theResponse)
20083    }
20084
20085    /// Get users with access to the protected branch
20086    /// 
20087    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20088    /// 
20089    /// Lists the people who have push access to this branch.
20090    /// 
20091    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-users-with-access-to-the-protected-branch)
20092    pub async fn repos_get_users_with_access_to_protected_branch(
20093        &self,
20094        owner: &str,
20095        repo: &str,
20096        branch: &str,
20097    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
20098        let mut theScheme = AuthScheme::from(&self.config.authentication);
20099
20100        while let Some(auth_step) = theScheme.step()? {
20101            match auth_step {
20102                ::authentic::AuthenticationStep::Request(auth_request) => {
20103                    theScheme.respond(self.client.request(auth_request).await);
20104                }
20105                ::authentic::AuthenticationStep::WaitFor(duration) => {
20106                    (self.sleep)(duration).await;
20107                }
20108            }
20109        }
20110        let theBuilder = crate::v1_1_4::request::repos_get_users_with_access_to_protected_branch::http_builder(
20111            self.config.base_url.as_ref(),
20112            owner,
20113            repo,
20114            branch,
20115            self.config.user_agent.as_ref(),
20116            self.config.accept.as_deref(),
20117        )?
20118        .with_authentication(&theScheme)?;
20119
20120        let theRequest =
20121            crate::v1_1_4::request::repos_get_users_with_access_to_protected_branch::hyper_request(theBuilder)?;
20122
20123        ::log::debug!("HTTP request: {:?}", &theRequest);
20124
20125        let theResponse = self.client.request(theRequest).await?;
20126
20127        ::log::debug!("HTTP response: {:?}", &theResponse);
20128
20129        Ok(theResponse)
20130    }
20131
20132    /// Set user access restrictions
20133    /// 
20134    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20135    /// 
20136    /// Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.
20137    /// 
20138    /// | Type    | Description                                                                                                                   |
20139    /// | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
20140    /// | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
20141    /// 
20142    /// [API method documentation](https://docs.github.com/rest/reference/repos#set-user-access-restrictions)
20143    ///
20144    /// # Content
20145    ///
20146    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
20147    pub async fn repos_set_user_access_restrictions<Content>(
20148        &self,
20149        owner: &str,
20150        repo: &str,
20151        branch: &str,
20152        theContent: Content,
20153    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
20154    where
20155        Content: Copy + TryInto<crate::v1_1_4::request::repos_set_user_access_restrictions::Content<::hyper::Body>>,
20156        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_set_user_access_restrictions::Content<::hyper::Body>>>::Error>
20157    {
20158        let mut theScheme = AuthScheme::from(&self.config.authentication);
20159
20160        while let Some(auth_step) = theScheme.step()? {
20161            match auth_step {
20162                ::authentic::AuthenticationStep::Request(auth_request) => {
20163                    theScheme.respond(self.client.request(auth_request).await);
20164                }
20165                ::authentic::AuthenticationStep::WaitFor(duration) => {
20166                    (self.sleep)(duration).await;
20167                }
20168            }
20169        }
20170        let theBuilder = crate::v1_1_4::request::repos_set_user_access_restrictions::http_builder(
20171            self.config.base_url.as_ref(),
20172            owner,
20173            repo,
20174            branch,
20175            self.config.user_agent.as_ref(),
20176            self.config.accept.as_deref(),
20177        )?
20178        .with_authentication(&theScheme)?;
20179
20180        let theRequest = crate::v1_1_4::request::repos_set_user_access_restrictions::hyper_request(
20181            theBuilder,
20182            theContent.try_into()?,
20183        )?;
20184
20185        ::log::debug!("HTTP request: {:?}", &theRequest);
20186
20187        let theResponse = self.client.request(theRequest).await?;
20188
20189        ::log::debug!("HTTP response: {:?}", &theResponse);
20190
20191        Ok(theResponse)
20192    }
20193
20194    /// Add user access restrictions
20195    /// 
20196    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20197    /// 
20198    /// Grants the specified people push access for this branch.
20199    /// 
20200    /// | Type    | Description                                                                                                                   |
20201    /// | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
20202    /// | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
20203    /// 
20204    /// [API method documentation](https://docs.github.com/rest/reference/repos#add-user-access-restrictions)
20205    ///
20206    /// # Content
20207    ///
20208    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
20209    pub async fn repos_add_user_access_restrictions<Content>(
20210        &self,
20211        owner: &str,
20212        repo: &str,
20213        branch: &str,
20214        theContent: Content,
20215    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
20216    where
20217        Content: Copy + TryInto<crate::v1_1_4::request::repos_add_user_access_restrictions::Content<::hyper::Body>>,
20218        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_add_user_access_restrictions::Content<::hyper::Body>>>::Error>
20219    {
20220        let mut theScheme = AuthScheme::from(&self.config.authentication);
20221
20222        while let Some(auth_step) = theScheme.step()? {
20223            match auth_step {
20224                ::authentic::AuthenticationStep::Request(auth_request) => {
20225                    theScheme.respond(self.client.request(auth_request).await);
20226                }
20227                ::authentic::AuthenticationStep::WaitFor(duration) => {
20228                    (self.sleep)(duration).await;
20229                }
20230            }
20231        }
20232        let theBuilder = crate::v1_1_4::request::repos_add_user_access_restrictions::http_builder(
20233            self.config.base_url.as_ref(),
20234            owner,
20235            repo,
20236            branch,
20237            self.config.user_agent.as_ref(),
20238            self.config.accept.as_deref(),
20239        )?
20240        .with_authentication(&theScheme)?;
20241
20242        let theRequest = crate::v1_1_4::request::repos_add_user_access_restrictions::hyper_request(
20243            theBuilder,
20244            theContent.try_into()?,
20245        )?;
20246
20247        ::log::debug!("HTTP request: {:?}", &theRequest);
20248
20249        let theResponse = self.client.request(theRequest).await?;
20250
20251        ::log::debug!("HTTP response: {:?}", &theResponse);
20252
20253        Ok(theResponse)
20254    }
20255
20256    /// Remove user access restrictions
20257    /// 
20258    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
20259    /// 
20260    /// Removes the ability of a user to push to this branch.
20261    /// 
20262    /// | Type    | Description                                                                                                                                   |
20263    /// | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
20264    /// | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
20265    /// 
20266    /// [API method documentation](https://docs.github.com/rest/reference/repos#remove-user-access-restrictions)
20267    ///
20268    /// # Content
20269    ///
20270    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
20271    pub async fn repos_remove_user_access_restrictions<Content>(
20272        &self,
20273        owner: &str,
20274        repo: &str,
20275        branch: &str,
20276        theContent: Content,
20277    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
20278    where
20279        Content: Copy + TryInto<crate::v1_1_4::request::repos_remove_user_access_restrictions::Content<::hyper::Body>>,
20280        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_remove_user_access_restrictions::Content<::hyper::Body>>>::Error>
20281    {
20282        let mut theScheme = AuthScheme::from(&self.config.authentication);
20283
20284        while let Some(auth_step) = theScheme.step()? {
20285            match auth_step {
20286                ::authentic::AuthenticationStep::Request(auth_request) => {
20287                    theScheme.respond(self.client.request(auth_request).await);
20288                }
20289                ::authentic::AuthenticationStep::WaitFor(duration) => {
20290                    (self.sleep)(duration).await;
20291                }
20292            }
20293        }
20294        let theBuilder = crate::v1_1_4::request::repos_remove_user_access_restrictions::http_builder(
20295            self.config.base_url.as_ref(),
20296            owner,
20297            repo,
20298            branch,
20299            self.config.user_agent.as_ref(),
20300            self.config.accept.as_deref(),
20301        )?
20302        .with_authentication(&theScheme)?;
20303
20304        let theRequest = crate::v1_1_4::request::repos_remove_user_access_restrictions::hyper_request(
20305            theBuilder,
20306            theContent.try_into()?,
20307        )?;
20308
20309        ::log::debug!("HTTP request: {:?}", &theRequest);
20310
20311        let theResponse = self.client.request(theRequest).await?;
20312
20313        ::log::debug!("HTTP response: {:?}", &theResponse);
20314
20315        Ok(theResponse)
20316    }
20317
20318    /// Rename a branch
20319    /// 
20320    /// Renames a branch in a repository.
20321    /// 
20322    /// **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)".
20323    /// 
20324    /// The permissions required to use this endpoint depends on whether you are renaming the default branch.
20325    /// 
20326    /// To rename a non-default branch:
20327    /// 
20328    /// * Users must have push access.
20329    /// * GitHub Apps must have the `contents:write` repository permission.
20330    /// 
20331    /// To rename the default branch:
20332    /// 
20333    /// * Users must have admin or owner permissions.
20334    /// * GitHub Apps must have the `administration:write` repository permission.
20335    /// 
20336    /// [API method documentation](https://docs.github.com/rest/reference/repos#rename-a-branch)
20337    ///
20338    /// # Content
20339    ///
20340    /// - [`&v1_1_4::request::repos_rename_branch::body::Json`](crate::v1_1_4::request::repos_rename_branch::body::Json)
20341    pub async fn repos_rename_branch<Content>(
20342        &self,
20343        owner: &str,
20344        repo: &str,
20345        branch: &str,
20346        theContent: Content,
20347    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
20348    where
20349        Content: Copy + TryInto<crate::v1_1_4::request::repos_rename_branch::Content<::hyper::Body>>,
20350        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_rename_branch::Content<::hyper::Body>>>::Error>
20351    {
20352        let mut theScheme = AuthScheme::from(&self.config.authentication);
20353
20354        while let Some(auth_step) = theScheme.step()? {
20355            match auth_step {
20356                ::authentic::AuthenticationStep::Request(auth_request) => {
20357                    theScheme.respond(self.client.request(auth_request).await);
20358                }
20359                ::authentic::AuthenticationStep::WaitFor(duration) => {
20360                    (self.sleep)(duration).await;
20361                }
20362            }
20363        }
20364        let theBuilder = crate::v1_1_4::request::repos_rename_branch::http_builder(
20365            self.config.base_url.as_ref(),
20366            owner,
20367            repo,
20368            branch,
20369            self.config.user_agent.as_ref(),
20370            self.config.accept.as_deref(),
20371        )?
20372        .with_authentication(&theScheme)?;
20373
20374        let theRequest = crate::v1_1_4::request::repos_rename_branch::hyper_request(
20375            theBuilder,
20376            theContent.try_into()?,
20377        )?;
20378
20379        ::log::debug!("HTTP request: {:?}", &theRequest);
20380
20381        let theResponse = self.client.request(theRequest).await?;
20382
20383        ::log::debug!("HTTP response: {:?}", &theResponse);
20384
20385        Ok(theResponse)
20386    }
20387
20388    /// Create a check run
20389    /// 
20390    /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
20391    /// 
20392    /// Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs.
20393    /// 
20394    /// In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs.
20395    /// 
20396    /// [API method documentation](https://docs.github.com/rest/reference/checks#create-a-check-run)
20397    ///
20398    /// # Content
20399    ///
20400    /// - [`&v1_1_4::request::checks_create::body::Json`](crate::v1_1_4::request::checks_create::body::Json)
20401    pub async fn checks_create<Content>(
20402        &self,
20403        owner: &str,
20404        repo: &str,
20405        theContent: Content,
20406    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
20407    where
20408        Content: Copy + TryInto<crate::v1_1_4::request::checks_create::Content<::hyper::Body>>,
20409        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::checks_create::Content<::hyper::Body>>>::Error>
20410    {
20411        let mut theScheme = AuthScheme::from(&self.config.authentication);
20412
20413        while let Some(auth_step) = theScheme.step()? {
20414            match auth_step {
20415                ::authentic::AuthenticationStep::Request(auth_request) => {
20416                    theScheme.respond(self.client.request(auth_request).await);
20417                }
20418                ::authentic::AuthenticationStep::WaitFor(duration) => {
20419                    (self.sleep)(duration).await;
20420                }
20421            }
20422        }
20423        let theBuilder = crate::v1_1_4::request::checks_create::http_builder(
20424            self.config.base_url.as_ref(),
20425            owner,
20426            repo,
20427            self.config.user_agent.as_ref(),
20428            self.config.accept.as_deref(),
20429        )?
20430        .with_authentication(&theScheme)?;
20431
20432        let theRequest = crate::v1_1_4::request::checks_create::hyper_request(
20433            theBuilder,
20434            theContent.try_into()?,
20435        )?;
20436
20437        ::log::debug!("HTTP request: {:?}", &theRequest);
20438
20439        let theResponse = self.client.request(theRequest).await?;
20440
20441        ::log::debug!("HTTP response: {:?}", &theResponse);
20442
20443        Ok(theResponse)
20444    }
20445
20446    /// Get a check run
20447    /// 
20448    /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
20449    /// 
20450    /// Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository.
20451    /// 
20452    /// [API method documentation](https://docs.github.com/rest/reference/checks#get-a-check-run)
20453    pub async fn checks_get(
20454        &self,
20455        owner: &str,
20456        repo: &str,
20457        check_run_id: i64,
20458    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
20459        let mut theScheme = AuthScheme::from(&self.config.authentication);
20460
20461        while let Some(auth_step) = theScheme.step()? {
20462            match auth_step {
20463                ::authentic::AuthenticationStep::Request(auth_request) => {
20464                    theScheme.respond(self.client.request(auth_request).await);
20465                }
20466                ::authentic::AuthenticationStep::WaitFor(duration) => {
20467                    (self.sleep)(duration).await;
20468                }
20469            }
20470        }
20471        let theBuilder = crate::v1_1_4::request::checks_get::http_builder(
20472            self.config.base_url.as_ref(),
20473            owner,
20474            repo,
20475            check_run_id,
20476            self.config.user_agent.as_ref(),
20477            self.config.accept.as_deref(),
20478        )?
20479        .with_authentication(&theScheme)?;
20480
20481        let theRequest =
20482            crate::v1_1_4::request::checks_get::hyper_request(theBuilder)?;
20483
20484        ::log::debug!("HTTP request: {:?}", &theRequest);
20485
20486        let theResponse = self.client.request(theRequest).await?;
20487
20488        ::log::debug!("HTTP response: {:?}", &theResponse);
20489
20490        Ok(theResponse)
20491    }
20492
20493    /// Update a check run
20494    /// 
20495    /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
20496    /// 
20497    /// Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs.
20498    /// 
20499    /// [API method documentation](https://docs.github.com/rest/reference/checks#update-a-check-run)
20500    ///
20501    /// # Content
20502    ///
20503    /// - [`&v1_1_4::request::checks_update::body::Json`](crate::v1_1_4::request::checks_update::body::Json)
20504    pub async fn checks_update<Content>(
20505        &self,
20506        owner: &str,
20507        repo: &str,
20508        check_run_id: i64,
20509        theContent: Content,
20510    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
20511    where
20512        Content: Copy + TryInto<crate::v1_1_4::request::checks_update::Content<::hyper::Body>>,
20513        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::checks_update::Content<::hyper::Body>>>::Error>
20514    {
20515        let mut theScheme = AuthScheme::from(&self.config.authentication);
20516
20517        while let Some(auth_step) = theScheme.step()? {
20518            match auth_step {
20519                ::authentic::AuthenticationStep::Request(auth_request) => {
20520                    theScheme.respond(self.client.request(auth_request).await);
20521                }
20522                ::authentic::AuthenticationStep::WaitFor(duration) => {
20523                    (self.sleep)(duration).await;
20524                }
20525            }
20526        }
20527        let theBuilder = crate::v1_1_4::request::checks_update::http_builder(
20528            self.config.base_url.as_ref(),
20529            owner,
20530            repo,
20531            check_run_id,
20532            self.config.user_agent.as_ref(),
20533            self.config.accept.as_deref(),
20534        )?
20535        .with_authentication(&theScheme)?;
20536
20537        let theRequest = crate::v1_1_4::request::checks_update::hyper_request(
20538            theBuilder,
20539            theContent.try_into()?,
20540        )?;
20541
20542        ::log::debug!("HTTP request: {:?}", &theRequest);
20543
20544        let theResponse = self.client.request(theRequest).await?;
20545
20546        ::log::debug!("HTTP response: {:?}", &theResponse);
20547
20548        Ok(theResponse)
20549    }
20550
20551    /// List check run annotations
20552    /// 
20553    /// Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository.
20554    /// 
20555    /// [API method documentation](https://docs.github.com/rest/reference/checks#list-check-run-annotations)
20556    pub async fn checks_list_annotations(
20557        &self,
20558        owner: &str,
20559        repo: &str,
20560        check_run_id: i64,
20561        per_page: ::std::option::Option<i64>,
20562        page: ::std::option::Option<i64>,
20563    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
20564        let mut theScheme = AuthScheme::from(&self.config.authentication);
20565
20566        while let Some(auth_step) = theScheme.step()? {
20567            match auth_step {
20568                ::authentic::AuthenticationStep::Request(auth_request) => {
20569                    theScheme.respond(self.client.request(auth_request).await);
20570                }
20571                ::authentic::AuthenticationStep::WaitFor(duration) => {
20572                    (self.sleep)(duration).await;
20573                }
20574            }
20575        }
20576        let theBuilder = crate::v1_1_4::request::checks_list_annotations::http_builder(
20577            self.config.base_url.as_ref(),
20578            owner,
20579            repo,
20580            check_run_id,
20581            per_page,
20582            page,
20583            self.config.user_agent.as_ref(),
20584            self.config.accept.as_deref(),
20585        )?
20586        .with_authentication(&theScheme)?;
20587
20588        let theRequest =
20589            crate::v1_1_4::request::checks_list_annotations::hyper_request(theBuilder)?;
20590
20591        ::log::debug!("HTTP request: {:?}", &theRequest);
20592
20593        let theResponse = self.client.request(theRequest).await?;
20594
20595        ::log::debug!("HTTP response: {:?}", &theResponse);
20596
20597        Ok(theResponse)
20598    }
20599
20600    /// Rerequest a check run
20601    /// 
20602    /// Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared.
20603    /// 
20604    /// To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository.
20605    /// 
20606    /// [API method documentation](https://docs.github.com/rest/reference/checks#rerequest-a-check-run)
20607    pub async fn checks_rerequest_run(
20608        &self,
20609        owner: &str,
20610        repo: &str,
20611        check_run_id: i64,
20612    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
20613        let mut theScheme = AuthScheme::from(&self.config.authentication);
20614
20615        while let Some(auth_step) = theScheme.step()? {
20616            match auth_step {
20617                ::authentic::AuthenticationStep::Request(auth_request) => {
20618                    theScheme.respond(self.client.request(auth_request).await);
20619                }
20620                ::authentic::AuthenticationStep::WaitFor(duration) => {
20621                    (self.sleep)(duration).await;
20622                }
20623            }
20624        }
20625        let theBuilder = crate::v1_1_4::request::checks_rerequest_run::http_builder(
20626            self.config.base_url.as_ref(),
20627            owner,
20628            repo,
20629            check_run_id,
20630            self.config.user_agent.as_ref(),
20631            self.config.accept.as_deref(),
20632        )?
20633        .with_authentication(&theScheme)?;
20634
20635        let theRequest =
20636            crate::v1_1_4::request::checks_rerequest_run::hyper_request(theBuilder)?;
20637
20638        ::log::debug!("HTTP request: {:?}", &theRequest);
20639
20640        let theResponse = self.client.request(theRequest).await?;
20641
20642        ::log::debug!("HTTP response: {:?}", &theResponse);
20643
20644        Ok(theResponse)
20645    }
20646
20647    /// Create a check suite
20648    /// 
20649    /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.
20650    /// 
20651    /// By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites.
20652    /// 
20653    /// [API method documentation](https://docs.github.com/rest/reference/checks#create-a-check-suite)
20654    ///
20655    /// # Content
20656    ///
20657    /// - [`&v1_1_4::request::checks_create_suite::body::Json`](crate::v1_1_4::request::checks_create_suite::body::Json)
20658    pub async fn checks_create_suite<Content>(
20659        &self,
20660        owner: &str,
20661        repo: &str,
20662        theContent: Content,
20663    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
20664    where
20665        Content: Copy + TryInto<crate::v1_1_4::request::checks_create_suite::Content<::hyper::Body>>,
20666        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::checks_create_suite::Content<::hyper::Body>>>::Error>
20667    {
20668        let mut theScheme = AuthScheme::from(&self.config.authentication);
20669
20670        while let Some(auth_step) = theScheme.step()? {
20671            match auth_step {
20672                ::authentic::AuthenticationStep::Request(auth_request) => {
20673                    theScheme.respond(self.client.request(auth_request).await);
20674                }
20675                ::authentic::AuthenticationStep::WaitFor(duration) => {
20676                    (self.sleep)(duration).await;
20677                }
20678            }
20679        }
20680        let theBuilder = crate::v1_1_4::request::checks_create_suite::http_builder(
20681            self.config.base_url.as_ref(),
20682            owner,
20683            repo,
20684            self.config.user_agent.as_ref(),
20685            self.config.accept.as_deref(),
20686        )?
20687        .with_authentication(&theScheme)?;
20688
20689        let theRequest = crate::v1_1_4::request::checks_create_suite::hyper_request(
20690            theBuilder,
20691            theContent.try_into()?,
20692        )?;
20693
20694        ::log::debug!("HTTP request: {:?}", &theRequest);
20695
20696        let theResponse = self.client.request(theRequest).await?;
20697
20698        ::log::debug!("HTTP response: {:?}", &theResponse);
20699
20700        Ok(theResponse)
20701    }
20702
20703    /// Update repository preferences for check suites
20704    /// 
20705    /// Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites.
20706    /// 
20707    /// [API method documentation](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)
20708    ///
20709    /// # Content
20710    ///
20711    /// - [`&v1_1_4::request::checks_set_suites_preferences::body::Json`](crate::v1_1_4::request::checks_set_suites_preferences::body::Json)
20712    pub async fn checks_set_suites_preferences<Content>(
20713        &self,
20714        owner: &str,
20715        repo: &str,
20716        theContent: Content,
20717    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
20718    where
20719        Content: Copy + TryInto<crate::v1_1_4::request::checks_set_suites_preferences::Content<::hyper::Body>>,
20720        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::checks_set_suites_preferences::Content<::hyper::Body>>>::Error>
20721    {
20722        let mut theScheme = AuthScheme::from(&self.config.authentication);
20723
20724        while let Some(auth_step) = theScheme.step()? {
20725            match auth_step {
20726                ::authentic::AuthenticationStep::Request(auth_request) => {
20727                    theScheme.respond(self.client.request(auth_request).await);
20728                }
20729                ::authentic::AuthenticationStep::WaitFor(duration) => {
20730                    (self.sleep)(duration).await;
20731                }
20732            }
20733        }
20734        let theBuilder = crate::v1_1_4::request::checks_set_suites_preferences::http_builder(
20735            self.config.base_url.as_ref(),
20736            owner,
20737            repo,
20738            self.config.user_agent.as_ref(),
20739            self.config.accept.as_deref(),
20740        )?
20741        .with_authentication(&theScheme)?;
20742
20743        let theRequest = crate::v1_1_4::request::checks_set_suites_preferences::hyper_request(
20744            theBuilder,
20745            theContent.try_into()?,
20746        )?;
20747
20748        ::log::debug!("HTTP request: {:?}", &theRequest);
20749
20750        let theResponse = self.client.request(theRequest).await?;
20751
20752        ::log::debug!("HTTP response: {:?}", &theResponse);
20753
20754        Ok(theResponse)
20755    }
20756
20757    /// Get a check suite
20758    /// 
20759    /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.
20760    /// 
20761    /// Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository.
20762    /// 
20763    /// [API method documentation](https://docs.github.com/rest/reference/checks#get-a-check-suite)
20764    pub async fn checks_get_suite(
20765        &self,
20766        owner: &str,
20767        repo: &str,
20768        check_suite_id: i64,
20769    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
20770        let mut theScheme = AuthScheme::from(&self.config.authentication);
20771
20772        while let Some(auth_step) = theScheme.step()? {
20773            match auth_step {
20774                ::authentic::AuthenticationStep::Request(auth_request) => {
20775                    theScheme.respond(self.client.request(auth_request).await);
20776                }
20777                ::authentic::AuthenticationStep::WaitFor(duration) => {
20778                    (self.sleep)(duration).await;
20779                }
20780            }
20781        }
20782        let theBuilder = crate::v1_1_4::request::checks_get_suite::http_builder(
20783            self.config.base_url.as_ref(),
20784            owner,
20785            repo,
20786            check_suite_id,
20787            self.config.user_agent.as_ref(),
20788            self.config.accept.as_deref(),
20789        )?
20790        .with_authentication(&theScheme)?;
20791
20792        let theRequest =
20793            crate::v1_1_4::request::checks_get_suite::hyper_request(theBuilder)?;
20794
20795        ::log::debug!("HTTP request: {:?}", &theRequest);
20796
20797        let theResponse = self.client.request(theRequest).await?;
20798
20799        ::log::debug!("HTTP response: {:?}", &theResponse);
20800
20801        Ok(theResponse)
20802    }
20803
20804    /// List check runs in a check suite
20805    /// 
20806    /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
20807    /// 
20808    /// Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository.
20809    /// 
20810    /// [API method documentation](https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite)
20811    #[allow(clippy::too_many_arguments)]
20812    pub async fn checks_list_for_suite(
20813        &self,
20814        owner: &str,
20815        repo: &str,
20816        check_suite_id: i64,
20817        check_name: ::std::option::Option<&str>,
20818        status: ::std::option::Option<&str>,
20819        filter: ::std::option::Option<&str>,
20820        per_page: ::std::option::Option<i64>,
20821        page: ::std::option::Option<i64>,
20822    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
20823        let mut theScheme = AuthScheme::from(&self.config.authentication);
20824
20825        while let Some(auth_step) = theScheme.step()? {
20826            match auth_step {
20827                ::authentic::AuthenticationStep::Request(auth_request) => {
20828                    theScheme.respond(self.client.request(auth_request).await);
20829                }
20830                ::authentic::AuthenticationStep::WaitFor(duration) => {
20831                    (self.sleep)(duration).await;
20832                }
20833            }
20834        }
20835        let theBuilder = crate::v1_1_4::request::checks_list_for_suite::http_builder(
20836            self.config.base_url.as_ref(),
20837            owner,
20838            repo,
20839            check_suite_id,
20840            check_name,
20841            status,
20842            filter,
20843            per_page,
20844            page,
20845            self.config.user_agent.as_ref(),
20846            self.config.accept.as_deref(),
20847        )?
20848        .with_authentication(&theScheme)?;
20849
20850        let theRequest =
20851            crate::v1_1_4::request::checks_list_for_suite::hyper_request(theBuilder)?;
20852
20853        ::log::debug!("HTTP request: {:?}", &theRequest);
20854
20855        let theResponse = self.client.request(theRequest).await?;
20856
20857        ::log::debug!("HTTP response: {:?}", &theResponse);
20858
20859        Ok(theResponse)
20860    }
20861
20862    /// Rerequest a check suite
20863    /// 
20864    /// Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared.
20865    /// 
20866    /// To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository.
20867    /// 
20868    /// [API method documentation](https://docs.github.com/rest/reference/checks#rerequest-a-check-suite)
20869    pub async fn checks_rerequest_suite(
20870        &self,
20871        owner: &str,
20872        repo: &str,
20873        check_suite_id: i64,
20874    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
20875        let mut theScheme = AuthScheme::from(&self.config.authentication);
20876
20877        while let Some(auth_step) = theScheme.step()? {
20878            match auth_step {
20879                ::authentic::AuthenticationStep::Request(auth_request) => {
20880                    theScheme.respond(self.client.request(auth_request).await);
20881                }
20882                ::authentic::AuthenticationStep::WaitFor(duration) => {
20883                    (self.sleep)(duration).await;
20884                }
20885            }
20886        }
20887        let theBuilder = crate::v1_1_4::request::checks_rerequest_suite::http_builder(
20888            self.config.base_url.as_ref(),
20889            owner,
20890            repo,
20891            check_suite_id,
20892            self.config.user_agent.as_ref(),
20893            self.config.accept.as_deref(),
20894        )?
20895        .with_authentication(&theScheme)?;
20896
20897        let theRequest =
20898            crate::v1_1_4::request::checks_rerequest_suite::hyper_request(theBuilder)?;
20899
20900        ::log::debug!("HTTP request: {:?}", &theRequest);
20901
20902        let theResponse = self.client.request(theRequest).await?;
20903
20904        ::log::debug!("HTTP response: {:?}", &theResponse);
20905
20906        Ok(theResponse)
20907    }
20908
20909    /// List code scanning alerts for a repository
20910    /// 
20911    /// Lists all open code scanning alerts for the default branch (usually `main`
20912    /// or `master`). You must use an access token with the `security_events` scope to use
20913    /// this endpoint with private repos, the `public_repo` scope also grants permission to read
20914    /// security events on public repos only. GitHub Apps must have the `security_events` read
20915    /// permission to use this endpoint.
20916    /// 
20917    /// The response includes a `most_recent_instance` object.
20918    /// This provides details of the most recent instance of this alert
20919    /// for the default branch or for the specified Git reference
20920    /// (if you used `ref` in the request).
20921    /// 
20922    /// [API method documentation](https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository)
20923    #[allow(clippy::too_many_arguments)]
20924    pub async fn code_scanning_list_alerts_for_repo(
20925        &self,
20926        owner: &str,
20927        repo: &str,
20928        tool_name: ::std::option::Option<&str>,
20929        tool_guid: ::std::option::Option<::std::option::Option<&str>>,
20930        page: ::std::option::Option<i64>,
20931        per_page: ::std::option::Option<i64>,
20932        r#ref: ::std::option::Option<&str>,
20933        sort: &crate::types::Sort<'_>,
20934        state: ::std::option::Option<&str>,
20935    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
20936        let (sort, direction) = sort.extract();
20937        let mut theScheme = AuthScheme::from(&self.config.authentication);
20938
20939        while let Some(auth_step) = theScheme.step()? {
20940            match auth_step {
20941                ::authentic::AuthenticationStep::Request(auth_request) => {
20942                    theScheme.respond(self.client.request(auth_request).await);
20943                }
20944                ::authentic::AuthenticationStep::WaitFor(duration) => {
20945                    (self.sleep)(duration).await;
20946                }
20947            }
20948        }
20949        let theBuilder = crate::v1_1_4::request::code_scanning_list_alerts_for_repo::http_builder(
20950            self.config.base_url.as_ref(),
20951            owner,
20952            repo,
20953            tool_name,
20954            tool_guid,
20955            page,
20956            per_page,
20957            r#ref,
20958            direction,
20959            sort,
20960            state,
20961            self.config.user_agent.as_ref(),
20962            self.config.accept.as_deref(),
20963        )?
20964        .with_authentication(&theScheme)?;
20965
20966        let theRequest =
20967            crate::v1_1_4::request::code_scanning_list_alerts_for_repo::hyper_request(theBuilder)?;
20968
20969        ::log::debug!("HTTP request: {:?}", &theRequest);
20970
20971        let theResponse = self.client.request(theRequest).await?;
20972
20973        ::log::debug!("HTTP response: {:?}", &theResponse);
20974
20975        Ok(theResponse)
20976    }
20977
20978    /// Get a code scanning alert
20979    /// 
20980    /// Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint.
20981    /// 
20982    /// **Deprecation notice**:
20983    /// The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`.
20984    /// 
20985    /// [API method documentation](https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert)
20986    pub async fn code_scanning_get_alert(
20987        &self,
20988        owner: &str,
20989        repo: &str,
20990        alert_number: i64,
20991    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
20992        let mut theScheme = AuthScheme::from(&self.config.authentication);
20993
20994        while let Some(auth_step) = theScheme.step()? {
20995            match auth_step {
20996                ::authentic::AuthenticationStep::Request(auth_request) => {
20997                    theScheme.respond(self.client.request(auth_request).await);
20998                }
20999                ::authentic::AuthenticationStep::WaitFor(duration) => {
21000                    (self.sleep)(duration).await;
21001                }
21002            }
21003        }
21004        let theBuilder = crate::v1_1_4::request::code_scanning_get_alert::http_builder(
21005            self.config.base_url.as_ref(),
21006            owner,
21007            repo,
21008            alert_number,
21009            self.config.user_agent.as_ref(),
21010            self.config.accept.as_deref(),
21011        )?
21012        .with_authentication(&theScheme)?;
21013
21014        let theRequest =
21015            crate::v1_1_4::request::code_scanning_get_alert::hyper_request(theBuilder)?;
21016
21017        ::log::debug!("HTTP request: {:?}", &theRequest);
21018
21019        let theResponse = self.client.request(theRequest).await?;
21020
21021        ::log::debug!("HTTP response: {:?}", &theResponse);
21022
21023        Ok(theResponse)
21024    }
21025
21026    /// Update a code scanning alert
21027    /// 
21028    /// Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint.
21029    /// 
21030    /// [API method documentation](https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert)
21031    ///
21032    /// # Content
21033    ///
21034    /// - [`&v1_1_4::request::code_scanning_update_alert::body::Json`](crate::v1_1_4::request::code_scanning_update_alert::body::Json)
21035    pub async fn code_scanning_update_alert<Content>(
21036        &self,
21037        owner: &str,
21038        repo: &str,
21039        alert_number: i64,
21040        theContent: Content,
21041    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
21042    where
21043        Content: Copy + TryInto<crate::v1_1_4::request::code_scanning_update_alert::Content<::hyper::Body>>,
21044        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::code_scanning_update_alert::Content<::hyper::Body>>>::Error>
21045    {
21046        let mut theScheme = AuthScheme::from(&self.config.authentication);
21047
21048        while let Some(auth_step) = theScheme.step()? {
21049            match auth_step {
21050                ::authentic::AuthenticationStep::Request(auth_request) => {
21051                    theScheme.respond(self.client.request(auth_request).await);
21052                }
21053                ::authentic::AuthenticationStep::WaitFor(duration) => {
21054                    (self.sleep)(duration).await;
21055                }
21056            }
21057        }
21058        let theBuilder = crate::v1_1_4::request::code_scanning_update_alert::http_builder(
21059            self.config.base_url.as_ref(),
21060            owner,
21061            repo,
21062            alert_number,
21063            self.config.user_agent.as_ref(),
21064            self.config.accept.as_deref(),
21065        )?
21066        .with_authentication(&theScheme)?;
21067
21068        let theRequest = crate::v1_1_4::request::code_scanning_update_alert::hyper_request(
21069            theBuilder,
21070            theContent.try_into()?,
21071        )?;
21072
21073        ::log::debug!("HTTP request: {:?}", &theRequest);
21074
21075        let theResponse = self.client.request(theRequest).await?;
21076
21077        ::log::debug!("HTTP response: {:?}", &theResponse);
21078
21079        Ok(theResponse)
21080    }
21081
21082    /// List instances of a code scanning alert
21083    /// 
21084    /// Lists all instances of the specified code scanning alert.
21085    /// You must use an access token with the `security_events` scope to use this endpoint with private repos,
21086    /// the `public_repo` scope also grants permission to read security events on public repos only.
21087    /// GitHub Apps must have the `security_events` read permission to use this endpoint.
21088    /// 
21089    /// [API method documentation](https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert)
21090    pub async fn code_scanning_list_alert_instances(
21091        &self,
21092        owner: &str,
21093        repo: &str,
21094        alert_number: i64,
21095        page: ::std::option::Option<i64>,
21096        per_page: ::std::option::Option<i64>,
21097        r#ref: ::std::option::Option<&str>,
21098    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
21099        let mut theScheme = AuthScheme::from(&self.config.authentication);
21100
21101        while let Some(auth_step) = theScheme.step()? {
21102            match auth_step {
21103                ::authentic::AuthenticationStep::Request(auth_request) => {
21104                    theScheme.respond(self.client.request(auth_request).await);
21105                }
21106                ::authentic::AuthenticationStep::WaitFor(duration) => {
21107                    (self.sleep)(duration).await;
21108                }
21109            }
21110        }
21111        let theBuilder = crate::v1_1_4::request::code_scanning_list_alert_instances::http_builder(
21112            self.config.base_url.as_ref(),
21113            owner,
21114            repo,
21115            alert_number,
21116            page,
21117            per_page,
21118            r#ref,
21119            self.config.user_agent.as_ref(),
21120            self.config.accept.as_deref(),
21121        )?
21122        .with_authentication(&theScheme)?;
21123
21124        let theRequest =
21125            crate::v1_1_4::request::code_scanning_list_alert_instances::hyper_request(theBuilder)?;
21126
21127        ::log::debug!("HTTP request: {:?}", &theRequest);
21128
21129        let theResponse = self.client.request(theRequest).await?;
21130
21131        ::log::debug!("HTTP response: {:?}", &theResponse);
21132
21133        Ok(theResponse)
21134    }
21135
21136    /// List code scanning analyses for a repository
21137    /// 
21138    /// Lists the details of all code scanning analyses for a repository,
21139    /// starting with the most recent.
21140    /// The response is paginated and you can use the `page` and `per_page` parameters
21141    /// to list the analyses you're interested in.
21142    /// By default 30 analyses are listed per page.
21143    /// 
21144    /// The `rules_count` field in the response give the number of rules
21145    /// that were run in the analysis.
21146    /// For very old analyses this data is not available,
21147    /// and `0` is returned in this field.
21148    /// 
21149    /// You must use an access token with the `security_events` scope to use this endpoint with private repos,
21150    /// the `public_repo` scope also grants permission to read security events on public repos only.
21151    /// GitHub Apps must have the `security_events` read permission to use this endpoint.
21152    /// 
21153    /// **Deprecation notice**:
21154    /// The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field.
21155    /// 
21156    /// [API method documentation](https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository)
21157    #[allow(clippy::too_many_arguments)]
21158    pub async fn code_scanning_list_recent_analyses(
21159        &self,
21160        owner: &str,
21161        repo: &str,
21162        tool_name: ::std::option::Option<&str>,
21163        tool_guid: ::std::option::Option<::std::option::Option<&str>>,
21164        page: ::std::option::Option<i64>,
21165        per_page: ::std::option::Option<i64>,
21166        r#ref: ::std::option::Option<&str>,
21167        sarif_id: ::std::option::Option<&str>,
21168    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
21169        let mut theScheme = AuthScheme::from(&self.config.authentication);
21170
21171        while let Some(auth_step) = theScheme.step()? {
21172            match auth_step {
21173                ::authentic::AuthenticationStep::Request(auth_request) => {
21174                    theScheme.respond(self.client.request(auth_request).await);
21175                }
21176                ::authentic::AuthenticationStep::WaitFor(duration) => {
21177                    (self.sleep)(duration).await;
21178                }
21179            }
21180        }
21181        let theBuilder = crate::v1_1_4::request::code_scanning_list_recent_analyses::http_builder(
21182            self.config.base_url.as_ref(),
21183            owner,
21184            repo,
21185            tool_name,
21186            tool_guid,
21187            page,
21188            per_page,
21189            r#ref,
21190            sarif_id,
21191            self.config.user_agent.as_ref(),
21192            self.config.accept.as_deref(),
21193        )?
21194        .with_authentication(&theScheme)?;
21195
21196        let theRequest =
21197            crate::v1_1_4::request::code_scanning_list_recent_analyses::hyper_request(theBuilder)?;
21198
21199        ::log::debug!("HTTP request: {:?}", &theRequest);
21200
21201        let theResponse = self.client.request(theRequest).await?;
21202
21203        ::log::debug!("HTTP response: {:?}", &theResponse);
21204
21205        Ok(theResponse)
21206    }
21207
21208    /// Get a code scanning analysis for a repository
21209    /// 
21210    /// Gets a specified code scanning analysis for a repository.
21211    /// You must use an access token with the `security_events` scope to use this endpoint with private repos,
21212    /// the `public_repo` scope also grants permission to read security events on public repos only.
21213    /// GitHub Apps must have the `security_events` read permission to use this endpoint.
21214    /// 
21215    /// The default JSON response contains fields that describe the analysis.
21216    /// This includes the Git reference and commit SHA to which the analysis relates,
21217    /// the datetime of the analysis, the name of the code scanning tool,
21218    /// and the number of alerts.
21219    /// 
21220    /// The `rules_count` field in the default response give the number of rules
21221    /// that were run in the analysis.
21222    /// For very old analyses this data is not available,
21223    /// and `0` is returned in this field.
21224    /// 
21225    /// If you use the Accept header `application/sarif+json`,
21226    /// the response contains the analysis data that was uploaded.
21227    /// This is formatted as
21228    /// [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html).
21229    /// 
21230    /// [API method documentation](https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)
21231    pub async fn code_scanning_get_analysis(
21232        &self,
21233        owner: &str,
21234        repo: &str,
21235        analysis_id: i64,
21236    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
21237        let mut theScheme = AuthScheme::from(&self.config.authentication);
21238
21239        while let Some(auth_step) = theScheme.step()? {
21240            match auth_step {
21241                ::authentic::AuthenticationStep::Request(auth_request) => {
21242                    theScheme.respond(self.client.request(auth_request).await);
21243                }
21244                ::authentic::AuthenticationStep::WaitFor(duration) => {
21245                    (self.sleep)(duration).await;
21246                }
21247            }
21248        }
21249        let theBuilder = crate::v1_1_4::request::code_scanning_get_analysis::http_builder(
21250            self.config.base_url.as_ref(),
21251            owner,
21252            repo,
21253            analysis_id,
21254            self.config.user_agent.as_ref(),
21255            self.config.accept.as_deref(),
21256        )?
21257        .with_authentication(&theScheme)?;
21258
21259        let theRequest =
21260            crate::v1_1_4::request::code_scanning_get_analysis::hyper_request(theBuilder)?;
21261
21262        ::log::debug!("HTTP request: {:?}", &theRequest);
21263
21264        let theResponse = self.client.request(theRequest).await?;
21265
21266        ::log::debug!("HTTP response: {:?}", &theResponse);
21267
21268        Ok(theResponse)
21269    }
21270
21271    /// Delete a code scanning analysis from a repository
21272    /// 
21273    /// Deletes a specified code scanning analysis from a repository. For
21274    /// private repositories, you must use an access token with the `repo` scope. For public repositories,
21275    /// you must use an access token with `public_repo` scope.
21276    /// GitHub Apps must have the `security_events` write permission to use this endpoint.
21277    /// 
21278    /// You can delete one analysis at a time.
21279    /// To delete a series of analyses, start with the most recent analysis and work backwards.
21280    /// Conceptually, the process is similar to the undo function in a text editor.
21281    /// 
21282    /// When you list the analyses for a repository,
21283    /// one or more will be identified as deletable in the response:
21284    /// 
21285    /// ```text
21286    /// "deletable": true
21287    /// ```
21288    /// 
21289    /// An analysis is deletable when it's the most recent in a set of analyses.
21290    /// Typically, a repository will have multiple sets of analyses
21291    /// for each enabled code scanning tool,
21292    /// where a set is determined by a unique combination of analysis values:
21293    /// 
21294    /// * `ref`
21295    /// * `tool`
21296    /// * `analysis_key`
21297    /// * `environment`
21298    /// 
21299    /// If you attempt to delete an analysis that is not the most recent in a set,
21300    /// you'll get a 400 response with the message:
21301    /// 
21302    /// ```text
21303    /// Analysis specified is not deletable.
21304    /// ```
21305    /// 
21306    /// The response from a successful `DELETE` operation provides you with
21307    /// two alternative URLs for deleting the next analysis in the set:
21308    /// `next_analysis_url` and `confirm_delete_url`.
21309    /// Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis
21310    /// in a set. This is a useful option if you want to preserve at least one analysis
21311    /// for the specified tool in your repository.
21312    /// Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool.
21313    /// When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url`
21314    /// in the 200 response is `null`.
21315    /// 
21316    /// As an example of the deletion process,
21317    /// let's imagine that you added a workflow that configured a particular code scanning tool
21318    /// to analyze the code in a repository. This tool has added 15 analyses:
21319    /// 10 on the default branch, and another 5 on a topic branch.
21320    /// You therefore have two separate sets of analyses for this tool.
21321    /// You've now decided that you want to remove all of the analyses for the tool.
21322    /// To do this you must make 15 separate deletion requests.
21323    /// To start, you must find an analysis that's identified as deletable.
21324    /// Each set of analyses always has one that's identified as deletable.
21325    /// Having found the deletable analysis for one of the two sets,
21326    /// delete this analysis and then continue deleting the next analysis in the set until they're all deleted.
21327    /// Then repeat the process for the second set.
21328    /// The procedure therefore consists of a nested loop:
21329    /// 
21330    /// **Outer loop**:
21331    /// * List the analyses for the repository, filtered by tool.
21332    /// * Parse this list to find a deletable analysis. If found:
21333    /// 
21334    ///   **Inner loop**:
21335    ///   * Delete the identified analysis.
21336    ///   * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration.
21337    /// 
21338    /// The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely.
21339    /// 
21340    /// [API method documentation](https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository)
21341    pub async fn code_scanning_delete_analysis(
21342        &self,
21343        owner: &str,
21344        repo: &str,
21345        analysis_id: i64,
21346        confirm_delete: ::std::option::Option<::std::option::Option<&str>>,
21347    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
21348        let mut theScheme = AuthScheme::from(&self.config.authentication);
21349
21350        while let Some(auth_step) = theScheme.step()? {
21351            match auth_step {
21352                ::authentic::AuthenticationStep::Request(auth_request) => {
21353                    theScheme.respond(self.client.request(auth_request).await);
21354                }
21355                ::authentic::AuthenticationStep::WaitFor(duration) => {
21356                    (self.sleep)(duration).await;
21357                }
21358            }
21359        }
21360        let theBuilder = crate::v1_1_4::request::code_scanning_delete_analysis::http_builder(
21361            self.config.base_url.as_ref(),
21362            owner,
21363            repo,
21364            analysis_id,
21365            confirm_delete,
21366            self.config.user_agent.as_ref(),
21367            self.config.accept.as_deref(),
21368        )?
21369        .with_authentication(&theScheme)?;
21370
21371        let theRequest =
21372            crate::v1_1_4::request::code_scanning_delete_analysis::hyper_request(theBuilder)?;
21373
21374        ::log::debug!("HTTP request: {:?}", &theRequest);
21375
21376        let theResponse = self.client.request(theRequest).await?;
21377
21378        ::log::debug!("HTTP response: {:?}", &theResponse);
21379
21380        Ok(theResponse)
21381    }
21382
21383    /// Upload an analysis as SARIF data
21384    /// 
21385    /// Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint.
21386    /// 
21387    /// There are two places where you can upload code scanning results.
21388    ///  - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
21389    ///  - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)."
21390    /// 
21391    /// You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example:
21392    /// 
21393    /// ```text
21394    /// gzip -c analysis-data.sarif | base64 -w0
21395    /// ```
21396    /// 
21397    /// SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries.
21398    /// 
21399    /// The `202 Accepted`, response includes an `id` value.
21400    /// You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint.
21401    /// For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)."
21402    /// 
21403    /// [API method documentation](https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file)
21404    ///
21405    /// # Content
21406    ///
21407    /// - [`&v1_1_4::request::code_scanning_upload_sarif::body::Json`](crate::v1_1_4::request::code_scanning_upload_sarif::body::Json)
21408    pub async fn code_scanning_upload_sarif<Content>(
21409        &self,
21410        owner: &str,
21411        repo: &str,
21412        theContent: Content,
21413    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
21414    where
21415        Content: Copy + TryInto<crate::v1_1_4::request::code_scanning_upload_sarif::Content<::hyper::Body>>,
21416        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::code_scanning_upload_sarif::Content<::hyper::Body>>>::Error>
21417    {
21418        let mut theScheme = AuthScheme::from(&self.config.authentication);
21419
21420        while let Some(auth_step) = theScheme.step()? {
21421            match auth_step {
21422                ::authentic::AuthenticationStep::Request(auth_request) => {
21423                    theScheme.respond(self.client.request(auth_request).await);
21424                }
21425                ::authentic::AuthenticationStep::WaitFor(duration) => {
21426                    (self.sleep)(duration).await;
21427                }
21428            }
21429        }
21430        let theBuilder = crate::v1_1_4::request::code_scanning_upload_sarif::http_builder(
21431            self.config.base_url.as_ref(),
21432            owner,
21433            repo,
21434            self.config.user_agent.as_ref(),
21435            self.config.accept.as_deref(),
21436        )?
21437        .with_authentication(&theScheme)?;
21438
21439        let theRequest = crate::v1_1_4::request::code_scanning_upload_sarif::hyper_request(
21440            theBuilder,
21441            theContent.try_into()?,
21442        )?;
21443
21444        ::log::debug!("HTTP request: {:?}", &theRequest);
21445
21446        let theResponse = self.client.request(theRequest).await?;
21447
21448        ::log::debug!("HTTP response: {:?}", &theResponse);
21449
21450        Ok(theResponse)
21451    }
21452
21453    /// Get information about a SARIF upload
21454    /// 
21455    /// Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint.
21456    /// 
21457    /// [API method documentation](https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository)
21458    pub async fn code_scanning_get_sarif(
21459        &self,
21460        owner: &str,
21461        repo: &str,
21462        sarif_id: &str,
21463    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
21464        let mut theScheme = AuthScheme::from(&self.config.authentication);
21465
21466        while let Some(auth_step) = theScheme.step()? {
21467            match auth_step {
21468                ::authentic::AuthenticationStep::Request(auth_request) => {
21469                    theScheme.respond(self.client.request(auth_request).await);
21470                }
21471                ::authentic::AuthenticationStep::WaitFor(duration) => {
21472                    (self.sleep)(duration).await;
21473                }
21474            }
21475        }
21476        let theBuilder = crate::v1_1_4::request::code_scanning_get_sarif::http_builder(
21477            self.config.base_url.as_ref(),
21478            owner,
21479            repo,
21480            sarif_id,
21481            self.config.user_agent.as_ref(),
21482            self.config.accept.as_deref(),
21483        )?
21484        .with_authentication(&theScheme)?;
21485
21486        let theRequest =
21487            crate::v1_1_4::request::code_scanning_get_sarif::hyper_request(theBuilder)?;
21488
21489        ::log::debug!("HTTP request: {:?}", &theRequest);
21490
21491        let theResponse = self.client.request(theRequest).await?;
21492
21493        ::log::debug!("HTTP response: {:?}", &theResponse);
21494
21495        Ok(theResponse)
21496    }
21497
21498    /// List CODEOWNERS errors
21499    /// 
21500    /// List any syntax errors that are detected in the CODEOWNERS
21501    /// file.
21502    /// 
21503    /// For more information about the correct CODEOWNERS syntax,
21504    /// see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)."
21505    /// 
21506    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-codeowners-errors)
21507    pub async fn repos_codeowners_errors(
21508        &self,
21509        owner: &str,
21510        repo: &str,
21511        r#ref: ::std::option::Option<&str>,
21512    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
21513        let mut theScheme = AuthScheme::from(&self.config.authentication);
21514
21515        while let Some(auth_step) = theScheme.step()? {
21516            match auth_step {
21517                ::authentic::AuthenticationStep::Request(auth_request) => {
21518                    theScheme.respond(self.client.request(auth_request).await);
21519                }
21520                ::authentic::AuthenticationStep::WaitFor(duration) => {
21521                    (self.sleep)(duration).await;
21522                }
21523            }
21524        }
21525        let theBuilder = crate::v1_1_4::request::repos_codeowners_errors::http_builder(
21526            self.config.base_url.as_ref(),
21527            owner,
21528            repo,
21529            r#ref,
21530            self.config.user_agent.as_ref(),
21531            self.config.accept.as_deref(),
21532        )?
21533        .with_authentication(&theScheme)?;
21534
21535        let theRequest =
21536            crate::v1_1_4::request::repos_codeowners_errors::hyper_request(theBuilder)?;
21537
21538        ::log::debug!("HTTP request: {:?}", &theRequest);
21539
21540        let theResponse = self.client.request(theRequest).await?;
21541
21542        ::log::debug!("HTTP response: {:?}", &theResponse);
21543
21544        Ok(theResponse)
21545    }
21546
21547    /// List codespaces in a repository for the authenticated user
21548    /// 
21549    /// Lists the codespaces associated to a specified repository and the authenticated user.
21550    /// 
21551    /// You must authenticate using an access token with the `codespace` scope to use this endpoint.
21552    /// 
21553    /// GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint.
21554    /// 
21555    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user)
21556    pub async fn codespaces_list_in_repository_for_authenticated_user(
21557        &self,
21558        per_page: ::std::option::Option<i64>,
21559        page: ::std::option::Option<i64>,
21560        owner: &str,
21561        repo: &str,
21562    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
21563        let mut theScheme = AuthScheme::from(&self.config.authentication);
21564
21565        while let Some(auth_step) = theScheme.step()? {
21566            match auth_step {
21567                ::authentic::AuthenticationStep::Request(auth_request) => {
21568                    theScheme.respond(self.client.request(auth_request).await);
21569                }
21570                ::authentic::AuthenticationStep::WaitFor(duration) => {
21571                    (self.sleep)(duration).await;
21572                }
21573            }
21574        }
21575        let theBuilder = crate::v1_1_4::request::codespaces_list_in_repository_for_authenticated_user::http_builder(
21576            self.config.base_url.as_ref(),
21577            owner,
21578            repo,
21579            per_page,
21580            page,
21581            self.config.user_agent.as_ref(),
21582            self.config.accept.as_deref(),
21583        )?
21584        .with_authentication(&theScheme)?;
21585
21586        let theRequest =
21587            crate::v1_1_4::request::codespaces_list_in_repository_for_authenticated_user::hyper_request(theBuilder)?;
21588
21589        ::log::debug!("HTTP request: {:?}", &theRequest);
21590
21591        let theResponse = self.client.request(theRequest).await?;
21592
21593        ::log::debug!("HTTP response: {:?}", &theResponse);
21594
21595        Ok(theResponse)
21596    }
21597
21598    /// Create a codespace in a repository
21599    /// 
21600    /// Creates a codespace owned by the authenticated user in the specified repository.
21601    /// 
21602    /// You must authenticate using an access token with the `codespace` scope to use this endpoint.
21603    /// 
21604    /// GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint.
21605    /// 
21606    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository)
21607    ///
21608    /// # Content
21609    ///
21610    /// - [`&::std::option::Option<crate::v1_1_4::request::codespaces_create_with_repo_for_authenticated_user::body::Json>`](crate::v1_1_4::request::codespaces_create_with_repo_for_authenticated_user::body::Json)
21611    pub async fn codespaces_create_with_repo_for_authenticated_user<Content>(
21612        &self,
21613        owner: &str,
21614        repo: &str,
21615        theContent: Content,
21616    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
21617    where
21618        Content: Copy + TryInto<crate::v1_1_4::request::codespaces_create_with_repo_for_authenticated_user::Content<::hyper::Body>>,
21619        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::codespaces_create_with_repo_for_authenticated_user::Content<::hyper::Body>>>::Error>
21620    {
21621        let mut theScheme = AuthScheme::from(&self.config.authentication);
21622
21623        while let Some(auth_step) = theScheme.step()? {
21624            match auth_step {
21625                ::authentic::AuthenticationStep::Request(auth_request) => {
21626                    theScheme.respond(self.client.request(auth_request).await);
21627                }
21628                ::authentic::AuthenticationStep::WaitFor(duration) => {
21629                    (self.sleep)(duration).await;
21630                }
21631            }
21632        }
21633        let theBuilder = crate::v1_1_4::request::codespaces_create_with_repo_for_authenticated_user::http_builder(
21634            self.config.base_url.as_ref(),
21635            owner,
21636            repo,
21637            self.config.user_agent.as_ref(),
21638            self.config.accept.as_deref(),
21639        )?
21640        .with_authentication(&theScheme)?;
21641
21642        let theRequest = crate::v1_1_4::request::codespaces_create_with_repo_for_authenticated_user::hyper_request(
21643            theBuilder,
21644            theContent.try_into()?,
21645        )?;
21646
21647        ::log::debug!("HTTP request: {:?}", &theRequest);
21648
21649        let theResponse = self.client.request(theRequest).await?;
21650
21651        ::log::debug!("HTTP response: {:?}", &theResponse);
21652
21653        Ok(theResponse)
21654    }
21655
21656    /// List available machine types for a repository
21657    /// 
21658    /// List the machine types available for a given repository based on its configuration.
21659    /// 
21660    /// You must authenticate using an access token with the `codespace` scope to use this endpoint.
21661    /// 
21662    /// GitHub Apps must have write access to the `codespaces_metadata` repository permission to use this endpoint.
21663    /// 
21664    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository)
21665    pub async fn codespaces_repo_machines_for_authenticated_user(
21666        &self,
21667        owner: &str,
21668        repo: &str,
21669        location: ::std::option::Option<&str>,
21670    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
21671        let mut theScheme = AuthScheme::from(&self.config.authentication);
21672
21673        while let Some(auth_step) = theScheme.step()? {
21674            match auth_step {
21675                ::authentic::AuthenticationStep::Request(auth_request) => {
21676                    theScheme.respond(self.client.request(auth_request).await);
21677                }
21678                ::authentic::AuthenticationStep::WaitFor(duration) => {
21679                    (self.sleep)(duration).await;
21680                }
21681            }
21682        }
21683        let theBuilder = crate::v1_1_4::request::codespaces_repo_machines_for_authenticated_user::http_builder(
21684            self.config.base_url.as_ref(),
21685            owner,
21686            repo,
21687            location,
21688            self.config.user_agent.as_ref(),
21689            self.config.accept.as_deref(),
21690        )?
21691        .with_authentication(&theScheme)?;
21692
21693        let theRequest =
21694            crate::v1_1_4::request::codespaces_repo_machines_for_authenticated_user::hyper_request(theBuilder)?;
21695
21696        ::log::debug!("HTTP request: {:?}", &theRequest);
21697
21698        let theResponse = self.client.request(theRequest).await?;
21699
21700        ::log::debug!("HTTP response: {:?}", &theResponse);
21701
21702        Ok(theResponse)
21703    }
21704
21705    /// List repository secrets
21706    /// 
21707    /// Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint.
21708    /// 
21709    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#list-repository-secrets)
21710    pub async fn codespaces_list_repo_secrets(
21711        &self,
21712        owner: &str,
21713        repo: &str,
21714        per_page: ::std::option::Option<i64>,
21715        page: ::std::option::Option<i64>,
21716    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
21717        let mut theScheme = AuthScheme::from(&self.config.authentication);
21718
21719        while let Some(auth_step) = theScheme.step()? {
21720            match auth_step {
21721                ::authentic::AuthenticationStep::Request(auth_request) => {
21722                    theScheme.respond(self.client.request(auth_request).await);
21723                }
21724                ::authentic::AuthenticationStep::WaitFor(duration) => {
21725                    (self.sleep)(duration).await;
21726                }
21727            }
21728        }
21729        let theBuilder = crate::v1_1_4::request::codespaces_list_repo_secrets::http_builder(
21730            self.config.base_url.as_ref(),
21731            owner,
21732            repo,
21733            per_page,
21734            page,
21735            self.config.user_agent.as_ref(),
21736            self.config.accept.as_deref(),
21737        )?
21738        .with_authentication(&theScheme)?;
21739
21740        let theRequest =
21741            crate::v1_1_4::request::codespaces_list_repo_secrets::hyper_request(theBuilder)?;
21742
21743        ::log::debug!("HTTP request: {:?}", &theRequest);
21744
21745        let theResponse = self.client.request(theRequest).await?;
21746
21747        ::log::debug!("HTTP response: {:?}", &theResponse);
21748
21749        Ok(theResponse)
21750    }
21751
21752    /// Get a repository public key
21753    /// 
21754    /// Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint.
21755    /// 
21756    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key)
21757    pub async fn codespaces_get_repo_public_key(
21758        &self,
21759        owner: &str,
21760        repo: &str,
21761    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
21762        let mut theScheme = AuthScheme::from(&self.config.authentication);
21763
21764        while let Some(auth_step) = theScheme.step()? {
21765            match auth_step {
21766                ::authentic::AuthenticationStep::Request(auth_request) => {
21767                    theScheme.respond(self.client.request(auth_request).await);
21768                }
21769                ::authentic::AuthenticationStep::WaitFor(duration) => {
21770                    (self.sleep)(duration).await;
21771                }
21772            }
21773        }
21774        let theBuilder = crate::v1_1_4::request::codespaces_get_repo_public_key::http_builder(
21775            self.config.base_url.as_ref(),
21776            owner,
21777            repo,
21778            self.config.user_agent.as_ref(),
21779            self.config.accept.as_deref(),
21780        )?
21781        .with_authentication(&theScheme)?;
21782
21783        let theRequest =
21784            crate::v1_1_4::request::codespaces_get_repo_public_key::hyper_request(theBuilder)?;
21785
21786        ::log::debug!("HTTP request: {:?}", &theRequest);
21787
21788        let theResponse = self.client.request(theRequest).await?;
21789
21790        ::log::debug!("HTTP response: {:?}", &theResponse);
21791
21792        Ok(theResponse)
21793    }
21794
21795    /// Get a repository secret
21796    /// 
21797    /// Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint.
21798    /// 
21799    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#get-a-repository-secret)
21800    pub async fn codespaces_get_repo_secret(
21801        &self,
21802        owner: &str,
21803        repo: &str,
21804        secret_name: &str,
21805    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
21806        let mut theScheme = AuthScheme::from(&self.config.authentication);
21807
21808        while let Some(auth_step) = theScheme.step()? {
21809            match auth_step {
21810                ::authentic::AuthenticationStep::Request(auth_request) => {
21811                    theScheme.respond(self.client.request(auth_request).await);
21812                }
21813                ::authentic::AuthenticationStep::WaitFor(duration) => {
21814                    (self.sleep)(duration).await;
21815                }
21816            }
21817        }
21818        let theBuilder = crate::v1_1_4::request::codespaces_get_repo_secret::http_builder(
21819            self.config.base_url.as_ref(),
21820            owner,
21821            repo,
21822            secret_name,
21823            self.config.user_agent.as_ref(),
21824            self.config.accept.as_deref(),
21825        )?
21826        .with_authentication(&theScheme)?;
21827
21828        let theRequest =
21829            crate::v1_1_4::request::codespaces_get_repo_secret::hyper_request(theBuilder)?;
21830
21831        ::log::debug!("HTTP request: {:?}", &theRequest);
21832
21833        let theResponse = self.client.request(theRequest).await?;
21834
21835        ::log::debug!("HTTP response: {:?}", &theResponse);
21836
21837        Ok(theResponse)
21838    }
21839
21840    /// Create or update a repository secret
21841    /// 
21842    /// Creates or updates a repository secret with an encrypted value. Encrypt your secret using
21843    /// [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
21844    /// token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository
21845    /// permission to use this endpoint.
21846    /// 
21847    /// #### Example of encrypting a secret using Node.js
21848    /// 
21849    /// Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
21850    /// 
21851    /// ```text
21852    /// const sodium = require('tweetsodium');
21853    /// 
21854    /// const key = "base64-encoded-public-key";
21855    /// const value = "plain-text-secret";
21856    /// 
21857    /// // Convert the message and key to Uint8Array's (Buffer implements that interface)
21858    /// const messageBytes = Buffer.from(value);
21859    /// const keyBytes = Buffer.from(key, 'base64');
21860    /// 
21861    /// // Encrypt using LibSodium.
21862    /// const encryptedBytes = sodium.seal(messageBytes, keyBytes);
21863    /// 
21864    /// // Base64 the encrypted secret
21865    /// const encrypted = Buffer.from(encryptedBytes).toString('base64');
21866    /// 
21867    /// console.log(encrypted);
21868    /// ```
21869    /// 
21870    /// 
21871    /// #### Example of encrypting a secret using Python
21872    /// 
21873    /// Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3.
21874    /// 
21875    /// ```text
21876    /// from base64 import b64encode
21877    /// from nacl import encoding, public
21878    /// 
21879    /// def encrypt(public_key: str, secret_value: str) -> str:
21880    ///   """Encrypt a Unicode string using the public key."""
21881    ///   public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
21882    ///   sealed_box = public.SealedBox(public_key)
21883    ///   encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
21884    ///   return b64encode(encrypted).decode("utf-8")
21885    /// ```
21886    /// 
21887    /// #### Example of encrypting a secret using C#
21888    /// 
21889    /// Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
21890    /// 
21891    /// ```text
21892    /// var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
21893    /// var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
21894    /// 
21895    /// var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
21896    /// 
21897    /// Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
21898    /// ```
21899    /// 
21900    /// #### Example of encrypting a secret using Ruby
21901    /// 
21902    /// Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
21903    /// 
21904    /// ```ruby
21905    /// require "rbnacl"
21906    /// require "base64"
21907    /// 
21908    /// key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
21909    /// public_key = RbNaCl::PublicKey.new(key)
21910    /// 
21911    /// box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
21912    /// encrypted_secret = box.encrypt("my_secret")
21913    /// 
21914    /// # Print the base64 encoded secret
21915    /// puts Base64.strict_encode64(encrypted_secret)
21916    /// ```
21917    /// 
21918    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret)
21919    ///
21920    /// # Content
21921    ///
21922    /// - [`&v1_1_4::request::codespaces_create_or_update_repo_secret::body::Json`](crate::v1_1_4::request::codespaces_create_or_update_repo_secret::body::Json)
21923    pub async fn codespaces_create_or_update_repo_secret<Content>(
21924        &self,
21925        owner: &str,
21926        repo: &str,
21927        secret_name: &str,
21928        theContent: Content,
21929    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
21930    where
21931        Content: Copy + TryInto<crate::v1_1_4::request::codespaces_create_or_update_repo_secret::Content<::hyper::Body>>,
21932        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::codespaces_create_or_update_repo_secret::Content<::hyper::Body>>>::Error>
21933    {
21934        let mut theScheme = AuthScheme::from(&self.config.authentication);
21935
21936        while let Some(auth_step) = theScheme.step()? {
21937            match auth_step {
21938                ::authentic::AuthenticationStep::Request(auth_request) => {
21939                    theScheme.respond(self.client.request(auth_request).await);
21940                }
21941                ::authentic::AuthenticationStep::WaitFor(duration) => {
21942                    (self.sleep)(duration).await;
21943                }
21944            }
21945        }
21946        let theBuilder = crate::v1_1_4::request::codespaces_create_or_update_repo_secret::http_builder(
21947            self.config.base_url.as_ref(),
21948            owner,
21949            repo,
21950            secret_name,
21951            self.config.user_agent.as_ref(),
21952            self.config.accept.as_deref(),
21953        )?
21954        .with_authentication(&theScheme)?;
21955
21956        let theRequest = crate::v1_1_4::request::codespaces_create_or_update_repo_secret::hyper_request(
21957            theBuilder,
21958            theContent.try_into()?,
21959        )?;
21960
21961        ::log::debug!("HTTP request: {:?}", &theRequest);
21962
21963        let theResponse = self.client.request(theRequest).await?;
21964
21965        ::log::debug!("HTTP response: {:?}", &theResponse);
21966
21967        Ok(theResponse)
21968    }
21969
21970    /// Delete a repository secret
21971    /// 
21972    /// Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint.
21973    /// 
21974    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret)
21975    pub async fn codespaces_delete_repo_secret(
21976        &self,
21977        owner: &str,
21978        repo: &str,
21979        secret_name: &str,
21980    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
21981        let mut theScheme = AuthScheme::from(&self.config.authentication);
21982
21983        while let Some(auth_step) = theScheme.step()? {
21984            match auth_step {
21985                ::authentic::AuthenticationStep::Request(auth_request) => {
21986                    theScheme.respond(self.client.request(auth_request).await);
21987                }
21988                ::authentic::AuthenticationStep::WaitFor(duration) => {
21989                    (self.sleep)(duration).await;
21990                }
21991            }
21992        }
21993        let theBuilder = crate::v1_1_4::request::codespaces_delete_repo_secret::http_builder(
21994            self.config.base_url.as_ref(),
21995            owner,
21996            repo,
21997            secret_name,
21998            self.config.user_agent.as_ref(),
21999            self.config.accept.as_deref(),
22000        )?
22001        .with_authentication(&theScheme)?;
22002
22003        let theRequest =
22004            crate::v1_1_4::request::codespaces_delete_repo_secret::hyper_request(theBuilder)?;
22005
22006        ::log::debug!("HTTP request: {:?}", &theRequest);
22007
22008        let theResponse = self.client.request(theRequest).await?;
22009
22010        ::log::debug!("HTTP response: {:?}", &theResponse);
22011
22012        Ok(theResponse)
22013    }
22014
22015    /// List repository collaborators
22016    /// 
22017    /// For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.
22018    /// Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint.
22019    /// 
22020    /// Team members will include the members of child teams.
22021    /// 
22022    /// You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this
22023    /// endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this
22024    /// endpoint.
22025    /// 
22026    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-repository-collaborators)
22027    pub async fn repos_list_collaborators(
22028        &self,
22029        owner: &str,
22030        repo: &str,
22031        affiliation: ::std::option::Option<&str>,
22032        per_page: ::std::option::Option<i64>,
22033        page: ::std::option::Option<i64>,
22034    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22035        let mut theScheme = AuthScheme::from(&self.config.authentication);
22036
22037        while let Some(auth_step) = theScheme.step()? {
22038            match auth_step {
22039                ::authentic::AuthenticationStep::Request(auth_request) => {
22040                    theScheme.respond(self.client.request(auth_request).await);
22041                }
22042                ::authentic::AuthenticationStep::WaitFor(duration) => {
22043                    (self.sleep)(duration).await;
22044                }
22045            }
22046        }
22047        let theBuilder = crate::v1_1_4::request::repos_list_collaborators::http_builder(
22048            self.config.base_url.as_ref(),
22049            owner,
22050            repo,
22051            affiliation,
22052            per_page,
22053            page,
22054            self.config.user_agent.as_ref(),
22055            self.config.accept.as_deref(),
22056        )?
22057        .with_authentication(&theScheme)?;
22058
22059        let theRequest =
22060            crate::v1_1_4::request::repos_list_collaborators::hyper_request(theBuilder)?;
22061
22062        ::log::debug!("HTTP request: {:?}", &theRequest);
22063
22064        let theResponse = self.client.request(theRequest).await?;
22065
22066        ::log::debug!("HTTP response: {:?}", &theResponse);
22067
22068        Ok(theResponse)
22069    }
22070
22071    /// Check if a user is a repository collaborator
22072    /// 
22073    /// For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.
22074    /// 
22075    /// Team members will include the members of child teams.
22076    /// 
22077    /// You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this
22078    /// endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this
22079    /// endpoint.
22080    /// 
22081    /// [API method documentation](https://docs.github.com/rest/reference/repos#check-if-a-user-is-a-repository-collaborator)
22082    pub async fn repos_check_collaborator(
22083        &self,
22084        owner: &str,
22085        repo: &str,
22086        username: &str,
22087    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22088        let mut theScheme = AuthScheme::from(&self.config.authentication);
22089
22090        while let Some(auth_step) = theScheme.step()? {
22091            match auth_step {
22092                ::authentic::AuthenticationStep::Request(auth_request) => {
22093                    theScheme.respond(self.client.request(auth_request).await);
22094                }
22095                ::authentic::AuthenticationStep::WaitFor(duration) => {
22096                    (self.sleep)(duration).await;
22097                }
22098            }
22099        }
22100        let theBuilder = crate::v1_1_4::request::repos_check_collaborator::http_builder(
22101            self.config.base_url.as_ref(),
22102            owner,
22103            repo,
22104            username,
22105            self.config.user_agent.as_ref(),
22106            self.config.accept.as_deref(),
22107        )?
22108        .with_authentication(&theScheme)?;
22109
22110        let theRequest =
22111            crate::v1_1_4::request::repos_check_collaborator::hyper_request(theBuilder)?;
22112
22113        ::log::debug!("HTTP request: {:?}", &theRequest);
22114
22115        let theResponse = self.client.request(theRequest).await?;
22116
22117        ::log::debug!("HTTP response: {:?}", &theResponse);
22118
22119        Ok(theResponse)
22120    }
22121
22122    /// Add a repository collaborator
22123    /// 
22124    /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
22125    /// 
22126    /// Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)."
22127    /// 
22128    /// For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:
22129    /// 
22130    /// ```text
22131    /// Cannot assign {member} permission of {role name}
22132    /// ```
22133    /// 
22134    /// Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
22135    /// 
22136    /// The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations).
22137    /// 
22138    /// **Updating an existing collaborator's permission level**
22139    /// 
22140    /// The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed.
22141    /// 
22142    /// **Rate limits**
22143    /// 
22144    /// You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.
22145    /// 
22146    /// [API method documentation](https://docs.github.com/rest/reference/repos#add-a-repository-collaborator)
22147    ///
22148    /// # Content
22149    ///
22150    /// - [`&v1_1_4::request::repos_add_collaborator::body::Json`](crate::v1_1_4::request::repos_add_collaborator::body::Json)
22151    pub async fn repos_add_collaborator<Content>(
22152        &self,
22153        owner: &str,
22154        repo: &str,
22155        username: &str,
22156        theContent: Content,
22157    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
22158    where
22159        Content: Copy + TryInto<crate::v1_1_4::request::repos_add_collaborator::Content<::hyper::Body>>,
22160        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_add_collaborator::Content<::hyper::Body>>>::Error>
22161    {
22162        let mut theScheme = AuthScheme::from(&self.config.authentication);
22163
22164        while let Some(auth_step) = theScheme.step()? {
22165            match auth_step {
22166                ::authentic::AuthenticationStep::Request(auth_request) => {
22167                    theScheme.respond(self.client.request(auth_request).await);
22168                }
22169                ::authentic::AuthenticationStep::WaitFor(duration) => {
22170                    (self.sleep)(duration).await;
22171                }
22172            }
22173        }
22174        let theBuilder = crate::v1_1_4::request::repos_add_collaborator::http_builder(
22175            self.config.base_url.as_ref(),
22176            owner,
22177            repo,
22178            username,
22179            self.config.user_agent.as_ref(),
22180            self.config.accept.as_deref(),
22181        )?
22182        .with_authentication(&theScheme)?;
22183
22184        let theRequest = crate::v1_1_4::request::repos_add_collaborator::hyper_request(
22185            theBuilder,
22186            theContent.try_into()?,
22187        )?;
22188
22189        ::log::debug!("HTTP request: {:?}", &theRequest);
22190
22191        let theResponse = self.client.request(theRequest).await?;
22192
22193        ::log::debug!("HTTP response: {:?}", &theResponse);
22194
22195        Ok(theResponse)
22196    }
22197
22198    /// Remove a repository collaborator
22199    /// 
22200    /// [API method documentation](https://docs.github.com/rest/reference/repos#remove-a-repository-collaborator)
22201    pub async fn repos_remove_collaborator(
22202        &self,
22203        owner: &str,
22204        repo: &str,
22205        username: &str,
22206    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22207        let mut theScheme = AuthScheme::from(&self.config.authentication);
22208
22209        while let Some(auth_step) = theScheme.step()? {
22210            match auth_step {
22211                ::authentic::AuthenticationStep::Request(auth_request) => {
22212                    theScheme.respond(self.client.request(auth_request).await);
22213                }
22214                ::authentic::AuthenticationStep::WaitFor(duration) => {
22215                    (self.sleep)(duration).await;
22216                }
22217            }
22218        }
22219        let theBuilder = crate::v1_1_4::request::repos_remove_collaborator::http_builder(
22220            self.config.base_url.as_ref(),
22221            owner,
22222            repo,
22223            username,
22224            self.config.user_agent.as_ref(),
22225            self.config.accept.as_deref(),
22226        )?
22227        .with_authentication(&theScheme)?;
22228
22229        let theRequest =
22230            crate::v1_1_4::request::repos_remove_collaborator::hyper_request(theBuilder)?;
22231
22232        ::log::debug!("HTTP request: {:?}", &theRequest);
22233
22234        let theResponse = self.client.request(theRequest).await?;
22235
22236        ::log::debug!("HTTP response: {:?}", &theResponse);
22237
22238        Ok(theResponse)
22239    }
22240
22241    /// Get repository permissions for a user
22242    /// 
22243    /// Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`.
22244    /// 
22245    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-repository-permissions-for-a-user)
22246    pub async fn repos_get_collaborator_permission_level(
22247        &self,
22248        owner: &str,
22249        repo: &str,
22250        username: &str,
22251    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22252        let mut theScheme = AuthScheme::from(&self.config.authentication);
22253
22254        while let Some(auth_step) = theScheme.step()? {
22255            match auth_step {
22256                ::authentic::AuthenticationStep::Request(auth_request) => {
22257                    theScheme.respond(self.client.request(auth_request).await);
22258                }
22259                ::authentic::AuthenticationStep::WaitFor(duration) => {
22260                    (self.sleep)(duration).await;
22261                }
22262            }
22263        }
22264        let theBuilder = crate::v1_1_4::request::repos_get_collaborator_permission_level::http_builder(
22265            self.config.base_url.as_ref(),
22266            owner,
22267            repo,
22268            username,
22269            self.config.user_agent.as_ref(),
22270            self.config.accept.as_deref(),
22271        )?
22272        .with_authentication(&theScheme)?;
22273
22274        let theRequest =
22275            crate::v1_1_4::request::repos_get_collaborator_permission_level::hyper_request(theBuilder)?;
22276
22277        ::log::debug!("HTTP request: {:?}", &theRequest);
22278
22279        let theResponse = self.client.request(theRequest).await?;
22280
22281        ::log::debug!("HTTP response: {:?}", &theResponse);
22282
22283        Ok(theResponse)
22284    }
22285
22286    /// List commit comments for a repository
22287    /// 
22288    /// Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/).
22289    /// 
22290    /// Comments are ordered by ascending ID.
22291    /// 
22292    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-commit-comments-for-a-repository)
22293    pub async fn repos_list_commit_comments_for_repo(
22294        &self,
22295        owner: &str,
22296        repo: &str,
22297        per_page: ::std::option::Option<i64>,
22298        page: ::std::option::Option<i64>,
22299    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22300        let mut theScheme = AuthScheme::from(&self.config.authentication);
22301
22302        while let Some(auth_step) = theScheme.step()? {
22303            match auth_step {
22304                ::authentic::AuthenticationStep::Request(auth_request) => {
22305                    theScheme.respond(self.client.request(auth_request).await);
22306                }
22307                ::authentic::AuthenticationStep::WaitFor(duration) => {
22308                    (self.sleep)(duration).await;
22309                }
22310            }
22311        }
22312        let theBuilder = crate::v1_1_4::request::repos_list_commit_comments_for_repo::http_builder(
22313            self.config.base_url.as_ref(),
22314            owner,
22315            repo,
22316            per_page,
22317            page,
22318            self.config.user_agent.as_ref(),
22319            self.config.accept.as_deref(),
22320        )?
22321        .with_authentication(&theScheme)?;
22322
22323        let theRequest =
22324            crate::v1_1_4::request::repos_list_commit_comments_for_repo::hyper_request(theBuilder)?;
22325
22326        ::log::debug!("HTTP request: {:?}", &theRequest);
22327
22328        let theResponse = self.client.request(theRequest).await?;
22329
22330        ::log::debug!("HTTP response: {:?}", &theResponse);
22331
22332        Ok(theResponse)
22333    }
22334
22335    /// Get a commit comment
22336    /// 
22337    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-commit-comment)
22338    pub async fn repos_get_commit_comment(
22339        &self,
22340        owner: &str,
22341        repo: &str,
22342        comment_id: i64,
22343    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22344        let mut theScheme = AuthScheme::from(&self.config.authentication);
22345
22346        while let Some(auth_step) = theScheme.step()? {
22347            match auth_step {
22348                ::authentic::AuthenticationStep::Request(auth_request) => {
22349                    theScheme.respond(self.client.request(auth_request).await);
22350                }
22351                ::authentic::AuthenticationStep::WaitFor(duration) => {
22352                    (self.sleep)(duration).await;
22353                }
22354            }
22355        }
22356        let theBuilder = crate::v1_1_4::request::repos_get_commit_comment::http_builder(
22357            self.config.base_url.as_ref(),
22358            owner,
22359            repo,
22360            comment_id,
22361            self.config.user_agent.as_ref(),
22362            self.config.accept.as_deref(),
22363        )?
22364        .with_authentication(&theScheme)?;
22365
22366        let theRequest =
22367            crate::v1_1_4::request::repos_get_commit_comment::hyper_request(theBuilder)?;
22368
22369        ::log::debug!("HTTP request: {:?}", &theRequest);
22370
22371        let theResponse = self.client.request(theRequest).await?;
22372
22373        ::log::debug!("HTTP response: {:?}", &theResponse);
22374
22375        Ok(theResponse)
22376    }
22377
22378    /// Delete a commit comment
22379    /// 
22380    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-a-commit-comment)
22381    pub async fn repos_delete_commit_comment(
22382        &self,
22383        owner: &str,
22384        repo: &str,
22385        comment_id: i64,
22386    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22387        let mut theScheme = AuthScheme::from(&self.config.authentication);
22388
22389        while let Some(auth_step) = theScheme.step()? {
22390            match auth_step {
22391                ::authentic::AuthenticationStep::Request(auth_request) => {
22392                    theScheme.respond(self.client.request(auth_request).await);
22393                }
22394                ::authentic::AuthenticationStep::WaitFor(duration) => {
22395                    (self.sleep)(duration).await;
22396                }
22397            }
22398        }
22399        let theBuilder = crate::v1_1_4::request::repos_delete_commit_comment::http_builder(
22400            self.config.base_url.as_ref(),
22401            owner,
22402            repo,
22403            comment_id,
22404            self.config.user_agent.as_ref(),
22405            self.config.accept.as_deref(),
22406        )?
22407        .with_authentication(&theScheme)?;
22408
22409        let theRequest =
22410            crate::v1_1_4::request::repos_delete_commit_comment::hyper_request(theBuilder)?;
22411
22412        ::log::debug!("HTTP request: {:?}", &theRequest);
22413
22414        let theResponse = self.client.request(theRequest).await?;
22415
22416        ::log::debug!("HTTP response: {:?}", &theResponse);
22417
22418        Ok(theResponse)
22419    }
22420
22421    /// Update a commit comment
22422    /// 
22423    /// [API method documentation](https://docs.github.com/rest/reference/repos#update-a-commit-comment)
22424    ///
22425    /// # Content
22426    ///
22427    /// - [`&v1_1_4::request::repos_update_commit_comment::body::Json`](crate::v1_1_4::request::repos_update_commit_comment::body::Json)
22428    pub async fn repos_update_commit_comment<Content>(
22429        &self,
22430        owner: &str,
22431        repo: &str,
22432        comment_id: i64,
22433        theContent: Content,
22434    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
22435    where
22436        Content: Copy + TryInto<crate::v1_1_4::request::repos_update_commit_comment::Content<::hyper::Body>>,
22437        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_update_commit_comment::Content<::hyper::Body>>>::Error>
22438    {
22439        let mut theScheme = AuthScheme::from(&self.config.authentication);
22440
22441        while let Some(auth_step) = theScheme.step()? {
22442            match auth_step {
22443                ::authentic::AuthenticationStep::Request(auth_request) => {
22444                    theScheme.respond(self.client.request(auth_request).await);
22445                }
22446                ::authentic::AuthenticationStep::WaitFor(duration) => {
22447                    (self.sleep)(duration).await;
22448                }
22449            }
22450        }
22451        let theBuilder = crate::v1_1_4::request::repos_update_commit_comment::http_builder(
22452            self.config.base_url.as_ref(),
22453            owner,
22454            repo,
22455            comment_id,
22456            self.config.user_agent.as_ref(),
22457            self.config.accept.as_deref(),
22458        )?
22459        .with_authentication(&theScheme)?;
22460
22461        let theRequest = crate::v1_1_4::request::repos_update_commit_comment::hyper_request(
22462            theBuilder,
22463            theContent.try_into()?,
22464        )?;
22465
22466        ::log::debug!("HTTP request: {:?}", &theRequest);
22467
22468        let theResponse = self.client.request(theRequest).await?;
22469
22470        ::log::debug!("HTTP response: {:?}", &theResponse);
22471
22472        Ok(theResponse)
22473    }
22474
22475    /// List reactions for a commit comment
22476    /// 
22477    /// List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments).
22478    /// 
22479    /// [API method documentation](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment)
22480    pub async fn reactions_list_for_commit_comment(
22481        &self,
22482        owner: &str,
22483        repo: &str,
22484        comment_id: i64,
22485        content: ::std::option::Option<&str>,
22486        per_page: ::std::option::Option<i64>,
22487        page: ::std::option::Option<i64>,
22488    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22489        let mut theScheme = AuthScheme::from(&self.config.authentication);
22490
22491        while let Some(auth_step) = theScheme.step()? {
22492            match auth_step {
22493                ::authentic::AuthenticationStep::Request(auth_request) => {
22494                    theScheme.respond(self.client.request(auth_request).await);
22495                }
22496                ::authentic::AuthenticationStep::WaitFor(duration) => {
22497                    (self.sleep)(duration).await;
22498                }
22499            }
22500        }
22501        let theBuilder = crate::v1_1_4::request::reactions_list_for_commit_comment::http_builder(
22502            self.config.base_url.as_ref(),
22503            owner,
22504            repo,
22505            comment_id,
22506            content,
22507            per_page,
22508            page,
22509            self.config.user_agent.as_ref(),
22510            self.config.accept.as_deref(),
22511        )?
22512        .with_authentication(&theScheme)?;
22513
22514        let theRequest =
22515            crate::v1_1_4::request::reactions_list_for_commit_comment::hyper_request(theBuilder)?;
22516
22517        ::log::debug!("HTTP request: {:?}", &theRequest);
22518
22519        let theResponse = self.client.request(theRequest).await?;
22520
22521        ::log::debug!("HTTP response: {:?}", &theResponse);
22522
22523        Ok(theResponse)
22524    }
22525
22526    /// Create reaction for a commit comment
22527    /// 
22528    /// Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment.
22529    /// 
22530    /// [API method documentation](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment)
22531    ///
22532    /// # Content
22533    ///
22534    /// - [`&v1_1_4::request::reactions_create_for_commit_comment::body::Json`](crate::v1_1_4::request::reactions_create_for_commit_comment::body::Json)
22535    pub async fn reactions_create_for_commit_comment<Content>(
22536        &self,
22537        owner: &str,
22538        repo: &str,
22539        comment_id: i64,
22540        theContent: Content,
22541    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
22542    where
22543        Content: Copy + TryInto<crate::v1_1_4::request::reactions_create_for_commit_comment::Content<::hyper::Body>>,
22544        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::reactions_create_for_commit_comment::Content<::hyper::Body>>>::Error>
22545    {
22546        let mut theScheme = AuthScheme::from(&self.config.authentication);
22547
22548        while let Some(auth_step) = theScheme.step()? {
22549            match auth_step {
22550                ::authentic::AuthenticationStep::Request(auth_request) => {
22551                    theScheme.respond(self.client.request(auth_request).await);
22552                }
22553                ::authentic::AuthenticationStep::WaitFor(duration) => {
22554                    (self.sleep)(duration).await;
22555                }
22556            }
22557        }
22558        let theBuilder = crate::v1_1_4::request::reactions_create_for_commit_comment::http_builder(
22559            self.config.base_url.as_ref(),
22560            owner,
22561            repo,
22562            comment_id,
22563            self.config.user_agent.as_ref(),
22564            self.config.accept.as_deref(),
22565        )?
22566        .with_authentication(&theScheme)?;
22567
22568        let theRequest = crate::v1_1_4::request::reactions_create_for_commit_comment::hyper_request(
22569            theBuilder,
22570            theContent.try_into()?,
22571        )?;
22572
22573        ::log::debug!("HTTP request: {:?}", &theRequest);
22574
22575        let theResponse = self.client.request(theRequest).await?;
22576
22577        ::log::debug!("HTTP response: {:?}", &theResponse);
22578
22579        Ok(theResponse)
22580    }
22581
22582    /// Delete a commit comment reaction
22583    /// 
22584    /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`.
22585    /// 
22586    /// Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments).
22587    /// 
22588    /// [API method documentation](https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction)
22589    pub async fn reactions_delete_for_commit_comment(
22590        &self,
22591        owner: &str,
22592        repo: &str,
22593        comment_id: i64,
22594        reaction_id: i64,
22595    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22596        let mut theScheme = AuthScheme::from(&self.config.authentication);
22597
22598        while let Some(auth_step) = theScheme.step()? {
22599            match auth_step {
22600                ::authentic::AuthenticationStep::Request(auth_request) => {
22601                    theScheme.respond(self.client.request(auth_request).await);
22602                }
22603                ::authentic::AuthenticationStep::WaitFor(duration) => {
22604                    (self.sleep)(duration).await;
22605                }
22606            }
22607        }
22608        let theBuilder = crate::v1_1_4::request::reactions_delete_for_commit_comment::http_builder(
22609            self.config.base_url.as_ref(),
22610            owner,
22611            repo,
22612            comment_id,
22613            reaction_id,
22614            self.config.user_agent.as_ref(),
22615            self.config.accept.as_deref(),
22616        )?
22617        .with_authentication(&theScheme)?;
22618
22619        let theRequest =
22620            crate::v1_1_4::request::reactions_delete_for_commit_comment::hyper_request(theBuilder)?;
22621
22622        ::log::debug!("HTTP request: {:?}", &theRequest);
22623
22624        let theResponse = self.client.request(theRequest).await?;
22625
22626        ::log::debug!("HTTP response: {:?}", &theResponse);
22627
22628        Ok(theResponse)
22629    }
22630
22631    /// List commits
22632    /// 
22633    /// **Signature verification object**
22634    /// 
22635    /// 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:
22636    /// 
22637    /// | Name | Type | Description |
22638    /// | ---- | ---- | ----------- |
22639    /// | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
22640    /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
22641    /// | `signature` | `string` | The signature that was extracted from the commit. |
22642    /// | `payload` | `string` | The value that was signed. |
22643    /// 
22644    /// These are the possible values for `reason` in the `verification` object:
22645    /// 
22646    /// | Value | Description |
22647    /// | ----- | ----------- |
22648    /// | `expired_key` | The key that made the signature is expired. |
22649    /// | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
22650    /// | `gpgverify_error` | There was an error communicating with the signature verification service. |
22651    /// | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
22652    /// | `unsigned` | The object does not include a signature. |
22653    /// | `unknown_signature_type` | A non-PGP signature was found in the commit. |
22654    /// | `no_user` | No user was associated with the `committer` email address in the commit. |
22655    /// | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
22656    /// | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
22657    /// | `unknown_key` | The key that made the signature has not been registered with any user's account. |
22658    /// | `malformed_signature` | There was an error parsing the signature. |
22659    /// | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
22660    /// | `valid` | None of the above errors applied, so the signature is considered to be verified. |
22661    /// 
22662    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-commits)
22663    #[allow(clippy::too_many_arguments)]
22664    pub async fn repos_list_commits(
22665        &self,
22666        owner: &str,
22667        repo: &str,
22668        sha: ::std::option::Option<&str>,
22669        path: ::std::option::Option<&str>,
22670        author: ::std::option::Option<&str>,
22671        since: ::std::option::Option<&str>,
22672        until: ::std::option::Option<&str>,
22673        per_page: ::std::option::Option<i64>,
22674        page: ::std::option::Option<i64>,
22675    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22676        let mut theScheme = AuthScheme::from(&self.config.authentication);
22677
22678        while let Some(auth_step) = theScheme.step()? {
22679            match auth_step {
22680                ::authentic::AuthenticationStep::Request(auth_request) => {
22681                    theScheme.respond(self.client.request(auth_request).await);
22682                }
22683                ::authentic::AuthenticationStep::WaitFor(duration) => {
22684                    (self.sleep)(duration).await;
22685                }
22686            }
22687        }
22688        let theBuilder = crate::v1_1_4::request::repos_list_commits::http_builder(
22689            self.config.base_url.as_ref(),
22690            owner,
22691            repo,
22692            sha,
22693            path,
22694            author,
22695            since,
22696            until,
22697            per_page,
22698            page,
22699            self.config.user_agent.as_ref(),
22700            self.config.accept.as_deref(),
22701        )?
22702        .with_authentication(&theScheme)?;
22703
22704        let theRequest =
22705            crate::v1_1_4::request::repos_list_commits::hyper_request(theBuilder)?;
22706
22707        ::log::debug!("HTTP request: {:?}", &theRequest);
22708
22709        let theResponse = self.client.request(theRequest).await?;
22710
22711        ::log::debug!("HTTP response: {:?}", &theResponse);
22712
22713        Ok(theResponse)
22714    }
22715
22716    /// List branches for HEAD commit
22717    /// 
22718    /// Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
22719    /// 
22720    /// Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch.
22721    /// 
22722    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-branches-for-head-commit)
22723    pub async fn repos_list_branches_for_head_commit(
22724        &self,
22725        owner: &str,
22726        repo: &str,
22727        commit_sha: &str,
22728    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22729        let mut theScheme = AuthScheme::from(&self.config.authentication);
22730
22731        while let Some(auth_step) = theScheme.step()? {
22732            match auth_step {
22733                ::authentic::AuthenticationStep::Request(auth_request) => {
22734                    theScheme.respond(self.client.request(auth_request).await);
22735                }
22736                ::authentic::AuthenticationStep::WaitFor(duration) => {
22737                    (self.sleep)(duration).await;
22738                }
22739            }
22740        }
22741        let theBuilder = crate::v1_1_4::request::repos_list_branches_for_head_commit::http_builder(
22742            self.config.base_url.as_ref(),
22743            owner,
22744            repo,
22745            commit_sha,
22746            self.config.user_agent.as_ref(),
22747            self.config.accept.as_deref(),
22748        )?
22749        .with_authentication(&theScheme)?;
22750
22751        let theRequest =
22752            crate::v1_1_4::request::repos_list_branches_for_head_commit::hyper_request(theBuilder)?;
22753
22754        ::log::debug!("HTTP request: {:?}", &theRequest);
22755
22756        let theResponse = self.client.request(theRequest).await?;
22757
22758        ::log::debug!("HTTP response: {:?}", &theResponse);
22759
22760        Ok(theResponse)
22761    }
22762
22763    /// List commit comments
22764    /// 
22765    /// Use the `:commit_sha` to specify the commit that will have its comments listed.
22766    /// 
22767    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-commit-comments)
22768    pub async fn repos_list_comments_for_commit(
22769        &self,
22770        owner: &str,
22771        repo: &str,
22772        commit_sha: &str,
22773        per_page: ::std::option::Option<i64>,
22774        page: ::std::option::Option<i64>,
22775    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22776        let mut theScheme = AuthScheme::from(&self.config.authentication);
22777
22778        while let Some(auth_step) = theScheme.step()? {
22779            match auth_step {
22780                ::authentic::AuthenticationStep::Request(auth_request) => {
22781                    theScheme.respond(self.client.request(auth_request).await);
22782                }
22783                ::authentic::AuthenticationStep::WaitFor(duration) => {
22784                    (self.sleep)(duration).await;
22785                }
22786            }
22787        }
22788        let theBuilder = crate::v1_1_4::request::repos_list_comments_for_commit::http_builder(
22789            self.config.base_url.as_ref(),
22790            owner,
22791            repo,
22792            commit_sha,
22793            per_page,
22794            page,
22795            self.config.user_agent.as_ref(),
22796            self.config.accept.as_deref(),
22797        )?
22798        .with_authentication(&theScheme)?;
22799
22800        let theRequest =
22801            crate::v1_1_4::request::repos_list_comments_for_commit::hyper_request(theBuilder)?;
22802
22803        ::log::debug!("HTTP request: {:?}", &theRequest);
22804
22805        let theResponse = self.client.request(theRequest).await?;
22806
22807        ::log::debug!("HTTP response: {:?}", &theResponse);
22808
22809        Ok(theResponse)
22810    }
22811
22812    /// Create a commit comment
22813    /// 
22814    /// Create a comment for a commit using its `:commit_sha`.
22815    /// 
22816    /// This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
22817    /// 
22818    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-a-commit-comment)
22819    ///
22820    /// # Content
22821    ///
22822    /// - [`&v1_1_4::request::repos_create_commit_comment::body::Json`](crate::v1_1_4::request::repos_create_commit_comment::body::Json)
22823    pub async fn repos_create_commit_comment<Content>(
22824        &self,
22825        owner: &str,
22826        repo: &str,
22827        commit_sha: &str,
22828        theContent: Content,
22829    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
22830    where
22831        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_commit_comment::Content<::hyper::Body>>,
22832        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_commit_comment::Content<::hyper::Body>>>::Error>
22833    {
22834        let mut theScheme = AuthScheme::from(&self.config.authentication);
22835
22836        while let Some(auth_step) = theScheme.step()? {
22837            match auth_step {
22838                ::authentic::AuthenticationStep::Request(auth_request) => {
22839                    theScheme.respond(self.client.request(auth_request).await);
22840                }
22841                ::authentic::AuthenticationStep::WaitFor(duration) => {
22842                    (self.sleep)(duration).await;
22843                }
22844            }
22845        }
22846        let theBuilder = crate::v1_1_4::request::repos_create_commit_comment::http_builder(
22847            self.config.base_url.as_ref(),
22848            owner,
22849            repo,
22850            commit_sha,
22851            self.config.user_agent.as_ref(),
22852            self.config.accept.as_deref(),
22853        )?
22854        .with_authentication(&theScheme)?;
22855
22856        let theRequest = crate::v1_1_4::request::repos_create_commit_comment::hyper_request(
22857            theBuilder,
22858            theContent.try_into()?,
22859        )?;
22860
22861        ::log::debug!("HTTP request: {:?}", &theRequest);
22862
22863        let theResponse = self.client.request(theRequest).await?;
22864
22865        ::log::debug!("HTTP response: {:?}", &theResponse);
22866
22867        Ok(theResponse)
22868    }
22869
22870    /// List pull requests associated with a commit
22871    /// 
22872    /// Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests.
22873    /// 
22874    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-pull-requests-associated-with-a-commit)
22875    pub async fn repos_list_pull_requests_associated_with_commit(
22876        &self,
22877        owner: &str,
22878        repo: &str,
22879        commit_sha: &str,
22880        per_page: ::std::option::Option<i64>,
22881        page: ::std::option::Option<i64>,
22882    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22883        let mut theScheme = AuthScheme::from(&self.config.authentication);
22884
22885        while let Some(auth_step) = theScheme.step()? {
22886            match auth_step {
22887                ::authentic::AuthenticationStep::Request(auth_request) => {
22888                    theScheme.respond(self.client.request(auth_request).await);
22889                }
22890                ::authentic::AuthenticationStep::WaitFor(duration) => {
22891                    (self.sleep)(duration).await;
22892                }
22893            }
22894        }
22895        let theBuilder = crate::v1_1_4::request::repos_list_pull_requests_associated_with_commit::http_builder(
22896            self.config.base_url.as_ref(),
22897            owner,
22898            repo,
22899            commit_sha,
22900            per_page,
22901            page,
22902            self.config.user_agent.as_ref(),
22903            self.config.accept.as_deref(),
22904        )?
22905        .with_authentication(&theScheme)?;
22906
22907        let theRequest =
22908            crate::v1_1_4::request::repos_list_pull_requests_associated_with_commit::hyper_request(theBuilder)?;
22909
22910        ::log::debug!("HTTP request: {:?}", &theRequest);
22911
22912        let theResponse = self.client.request(theRequest).await?;
22913
22914        ::log::debug!("HTTP response: {:?}", &theResponse);
22915
22916        Ok(theResponse)
22917    }
22918
22919    /// Get a commit
22920    /// 
22921    /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.
22922    /// 
22923    /// **Note:** If there are more than 300 files in the commit diff, 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.
22924    /// 
22925    /// You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to  fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property.
22926    /// 
22927    /// To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. 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.
22928    /// 
22929    /// **Signature verification object**
22930    /// 
22931    /// 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:
22932    /// 
22933    /// | Name | Type | Description |
22934    /// | ---- | ---- | ----------- |
22935    /// | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
22936    /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
22937    /// | `signature` | `string` | The signature that was extracted from the commit. |
22938    /// | `payload` | `string` | The value that was signed. |
22939    /// 
22940    /// These are the possible values for `reason` in the `verification` object:
22941    /// 
22942    /// | Value | Description |
22943    /// | ----- | ----------- |
22944    /// | `expired_key` | The key that made the signature is expired. |
22945    /// | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
22946    /// | `gpgverify_error` | There was an error communicating with the signature verification service. |
22947    /// | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
22948    /// | `unsigned` | The object does not include a signature. |
22949    /// | `unknown_signature_type` | A non-PGP signature was found in the commit. |
22950    /// | `no_user` | No user was associated with the `committer` email address in the commit. |
22951    /// | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
22952    /// | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
22953    /// | `unknown_key` | The key that made the signature has not been registered with any user's account. |
22954    /// | `malformed_signature` | There was an error parsing the signature. |
22955    /// | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
22956    /// | `valid` | None of the above errors applied, so the signature is considered to be verified. |
22957    /// 
22958    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-commit)
22959    pub async fn repos_get_commit(
22960        &self,
22961        owner: &str,
22962        repo: &str,
22963        page: ::std::option::Option<i64>,
22964        per_page: ::std::option::Option<i64>,
22965        r#ref: &str,
22966    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
22967        let mut theScheme = AuthScheme::from(&self.config.authentication);
22968
22969        while let Some(auth_step) = theScheme.step()? {
22970            match auth_step {
22971                ::authentic::AuthenticationStep::Request(auth_request) => {
22972                    theScheme.respond(self.client.request(auth_request).await);
22973                }
22974                ::authentic::AuthenticationStep::WaitFor(duration) => {
22975                    (self.sleep)(duration).await;
22976                }
22977            }
22978        }
22979        let theBuilder = crate::v1_1_4::request::repos_get_commit::http_builder(
22980            self.config.base_url.as_ref(),
22981            owner,
22982            repo,
22983            r#ref,
22984            page,
22985            per_page,
22986            self.config.user_agent.as_ref(),
22987            self.config.accept.as_deref(),
22988        )?
22989        .with_authentication(&theScheme)?;
22990
22991        let theRequest =
22992            crate::v1_1_4::request::repos_get_commit::hyper_request(theBuilder)?;
22993
22994        ::log::debug!("HTTP request: {:?}", &theRequest);
22995
22996        let theResponse = self.client.request(theRequest).await?;
22997
22998        ::log::debug!("HTTP response: {:?}", &theResponse);
22999
23000        Ok(theResponse)
23001    }
23002
23003    /// List check runs for a Git reference
23004    /// 
23005    /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
23006    /// 
23007    /// Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository.
23008    /// 
23009    /// [API method documentation](https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference)
23010    #[allow(clippy::too_many_arguments)]
23011    pub async fn checks_list_for_ref(
23012        &self,
23013        owner: &str,
23014        repo: &str,
23015        r#ref: &str,
23016        check_name: ::std::option::Option<&str>,
23017        status: ::std::option::Option<&str>,
23018        filter: ::std::option::Option<&str>,
23019        per_page: ::std::option::Option<i64>,
23020        page: ::std::option::Option<i64>,
23021        app_id: ::std::option::Option<i64>,
23022    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23023        let mut theScheme = AuthScheme::from(&self.config.authentication);
23024
23025        while let Some(auth_step) = theScheme.step()? {
23026            match auth_step {
23027                ::authentic::AuthenticationStep::Request(auth_request) => {
23028                    theScheme.respond(self.client.request(auth_request).await);
23029                }
23030                ::authentic::AuthenticationStep::WaitFor(duration) => {
23031                    (self.sleep)(duration).await;
23032                }
23033            }
23034        }
23035        let theBuilder = crate::v1_1_4::request::checks_list_for_ref::http_builder(
23036            self.config.base_url.as_ref(),
23037            owner,
23038            repo,
23039            r#ref,
23040            check_name,
23041            status,
23042            filter,
23043            per_page,
23044            page,
23045            app_id,
23046            self.config.user_agent.as_ref(),
23047            self.config.accept.as_deref(),
23048        )?
23049        .with_authentication(&theScheme)?;
23050
23051        let theRequest =
23052            crate::v1_1_4::request::checks_list_for_ref::hyper_request(theBuilder)?;
23053
23054        ::log::debug!("HTTP request: {:?}", &theRequest);
23055
23056        let theResponse = self.client.request(theRequest).await?;
23057
23058        ::log::debug!("HTTP response: {:?}", &theResponse);
23059
23060        Ok(theResponse)
23061    }
23062
23063    /// List check suites for a Git reference
23064    /// 
23065    /// **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`.
23066    /// 
23067    /// Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository.
23068    /// 
23069    /// [API method documentation](https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference)
23070    #[allow(clippy::too_many_arguments)]
23071    pub async fn checks_list_suites_for_ref(
23072        &self,
23073        owner: &str,
23074        repo: &str,
23075        r#ref: &str,
23076        app_id: ::std::option::Option<i64>,
23077        check_name: ::std::option::Option<&str>,
23078        per_page: ::std::option::Option<i64>,
23079        page: ::std::option::Option<i64>,
23080    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23081        let mut theScheme = AuthScheme::from(&self.config.authentication);
23082
23083        while let Some(auth_step) = theScheme.step()? {
23084            match auth_step {
23085                ::authentic::AuthenticationStep::Request(auth_request) => {
23086                    theScheme.respond(self.client.request(auth_request).await);
23087                }
23088                ::authentic::AuthenticationStep::WaitFor(duration) => {
23089                    (self.sleep)(duration).await;
23090                }
23091            }
23092        }
23093        let theBuilder = crate::v1_1_4::request::checks_list_suites_for_ref::http_builder(
23094            self.config.base_url.as_ref(),
23095            owner,
23096            repo,
23097            r#ref,
23098            app_id,
23099            check_name,
23100            per_page,
23101            page,
23102            self.config.user_agent.as_ref(),
23103            self.config.accept.as_deref(),
23104        )?
23105        .with_authentication(&theScheme)?;
23106
23107        let theRequest =
23108            crate::v1_1_4::request::checks_list_suites_for_ref::hyper_request(theBuilder)?;
23109
23110        ::log::debug!("HTTP request: {:?}", &theRequest);
23111
23112        let theResponse = self.client.request(theRequest).await?;
23113
23114        ::log::debug!("HTTP response: {:?}", &theResponse);
23115
23116        Ok(theResponse)
23117    }
23118
23119    /// Get the combined status for a specific reference
23120    /// 
23121    /// Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.
23122    /// 
23123    /// 
23124    /// Additionally, a combined `state` is returned. The `state` is one of:
23125    /// 
23126    /// *   **failure** if any of the contexts report as `error` or `failure`
23127    /// *   **pending** if there are no statuses or a context is `pending`
23128    /// *   **success** if the latest status for all contexts is `success`
23129    /// 
23130    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-the-combined-status-for-a-specific-reference)
23131    pub async fn repos_get_combined_status_for_ref(
23132        &self,
23133        owner: &str,
23134        repo: &str,
23135        r#ref: &str,
23136        per_page: ::std::option::Option<i64>,
23137        page: ::std::option::Option<i64>,
23138    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23139        let mut theScheme = AuthScheme::from(&self.config.authentication);
23140
23141        while let Some(auth_step) = theScheme.step()? {
23142            match auth_step {
23143                ::authentic::AuthenticationStep::Request(auth_request) => {
23144                    theScheme.respond(self.client.request(auth_request).await);
23145                }
23146                ::authentic::AuthenticationStep::WaitFor(duration) => {
23147                    (self.sleep)(duration).await;
23148                }
23149            }
23150        }
23151        let theBuilder = crate::v1_1_4::request::repos_get_combined_status_for_ref::http_builder(
23152            self.config.base_url.as_ref(),
23153            owner,
23154            repo,
23155            r#ref,
23156            per_page,
23157            page,
23158            self.config.user_agent.as_ref(),
23159            self.config.accept.as_deref(),
23160        )?
23161        .with_authentication(&theScheme)?;
23162
23163        let theRequest =
23164            crate::v1_1_4::request::repos_get_combined_status_for_ref::hyper_request(theBuilder)?;
23165
23166        ::log::debug!("HTTP request: {:?}", &theRequest);
23167
23168        let theResponse = self.client.request(theRequest).await?;
23169
23170        ::log::debug!("HTTP response: {:?}", &theResponse);
23171
23172        Ok(theResponse)
23173    }
23174
23175    /// List commit statuses for a reference
23176    /// 
23177    /// Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.
23178    /// 
23179    /// This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`.
23180    /// 
23181    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-commit-statuses-for-a-reference)
23182    pub async fn repos_list_commit_statuses_for_ref(
23183        &self,
23184        owner: &str,
23185        repo: &str,
23186        r#ref: &str,
23187        per_page: ::std::option::Option<i64>,
23188        page: ::std::option::Option<i64>,
23189    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23190        let mut theScheme = AuthScheme::from(&self.config.authentication);
23191
23192        while let Some(auth_step) = theScheme.step()? {
23193            match auth_step {
23194                ::authentic::AuthenticationStep::Request(auth_request) => {
23195                    theScheme.respond(self.client.request(auth_request).await);
23196                }
23197                ::authentic::AuthenticationStep::WaitFor(duration) => {
23198                    (self.sleep)(duration).await;
23199                }
23200            }
23201        }
23202        let theBuilder = crate::v1_1_4::request::repos_list_commit_statuses_for_ref::http_builder(
23203            self.config.base_url.as_ref(),
23204            owner,
23205            repo,
23206            r#ref,
23207            per_page,
23208            page,
23209            self.config.user_agent.as_ref(),
23210            self.config.accept.as_deref(),
23211        )?
23212        .with_authentication(&theScheme)?;
23213
23214        let theRequest =
23215            crate::v1_1_4::request::repos_list_commit_statuses_for_ref::hyper_request(theBuilder)?;
23216
23217        ::log::debug!("HTTP request: {:?}", &theRequest);
23218
23219        let theResponse = self.client.request(theRequest).await?;
23220
23221        ::log::debug!("HTTP response: {:?}", &theResponse);
23222
23223        Ok(theResponse)
23224    }
23225
23226    /// Get community profile metrics
23227    /// 
23228    /// This endpoint will return all community profile metrics, including an
23229    /// overall health score, repository description, the presence of documentation, detected
23230    /// code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE,
23231    /// README, and CONTRIBUTING files.
23232    /// 
23233    /// The `health_percentage` score is defined as a percentage of how many of
23234    /// these four documents are present: README, CONTRIBUTING, LICENSE, and
23235    /// CODE_OF_CONDUCT. For example, if all four documents are present, then
23236    /// the `health_percentage` is `100`. If only one is present, then the
23237    /// `health_percentage` is `25`.
23238    /// 
23239    /// `content_reports_enabled` is only returned for organization-owned repositories.
23240    /// 
23241    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-community-profile-metrics)
23242    pub async fn repos_get_community_profile_metrics(
23243        &self,
23244        owner: &str,
23245        repo: &str,
23246    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23247        let mut theScheme = AuthScheme::from(&self.config.authentication);
23248
23249        while let Some(auth_step) = theScheme.step()? {
23250            match auth_step {
23251                ::authentic::AuthenticationStep::Request(auth_request) => {
23252                    theScheme.respond(self.client.request(auth_request).await);
23253                }
23254                ::authentic::AuthenticationStep::WaitFor(duration) => {
23255                    (self.sleep)(duration).await;
23256                }
23257            }
23258        }
23259        let theBuilder = crate::v1_1_4::request::repos_get_community_profile_metrics::http_builder(
23260            self.config.base_url.as_ref(),
23261            owner,
23262            repo,
23263            self.config.user_agent.as_ref(),
23264            self.config.accept.as_deref(),
23265        )?
23266        .with_authentication(&theScheme)?;
23267
23268        let theRequest =
23269            crate::v1_1_4::request::repos_get_community_profile_metrics::hyper_request(theBuilder)?;
23270
23271        ::log::debug!("HTTP request: {:?}", &theRequest);
23272
23273        let theResponse = self.client.request(theRequest).await?;
23274
23275        ::log::debug!("HTTP response: {:?}", &theResponse);
23276
23277        Ok(theResponse)
23278    }
23279
23280    /// Compare two commits
23281    /// 
23282    /// The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `<USERNAME>:branch`.
23283    /// 
23284    /// The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.
23285    /// 
23286    /// The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, 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.
23287    /// 
23288    /// **Working with large comparisons**
23289    /// 
23290    /// To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)."
23291    /// 
23292    /// When calling this API without any paging parameters (`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. When a paging parameter is specified, the first commit in the returned list of each page is the earliest.
23293    /// 
23294    /// **Signature verification object**
23295    /// 
23296    /// 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:
23297    /// 
23298    /// | Name | Type | Description |
23299    /// | ---- | ---- | ----------- |
23300    /// | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
23301    /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
23302    /// | `signature` | `string` | The signature that was extracted from the commit. |
23303    /// | `payload` | `string` | The value that was signed. |
23304    /// 
23305    /// These are the possible values for `reason` in the `verification` object:
23306    /// 
23307    /// | Value | Description |
23308    /// | ----- | ----------- |
23309    /// | `expired_key` | The key that made the signature is expired. |
23310    /// | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
23311    /// | `gpgverify_error` | There was an error communicating with the signature verification service. |
23312    /// | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
23313    /// | `unsigned` | The object does not include a signature. |
23314    /// | `unknown_signature_type` | A non-PGP signature was found in the commit. |
23315    /// | `no_user` | No user was associated with the `committer` email address in the commit. |
23316    /// | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
23317    /// | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
23318    /// | `unknown_key` | The key that made the signature has not been registered with any user's account. |
23319    /// | `malformed_signature` | There was an error parsing the signature. |
23320    /// | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
23321    /// | `valid` | None of the above errors applied, so the signature is considered to be verified. |
23322    /// 
23323    /// [API method documentation](https://docs.github.com/rest/reference/repos#compare-two-commits)
23324    pub async fn repos_compare_commits(
23325        &self,
23326        owner: &str,
23327        repo: &str,
23328        page: ::std::option::Option<i64>,
23329        per_page: ::std::option::Option<i64>,
23330        basehead: &str,
23331    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23332        let mut theScheme = AuthScheme::from(&self.config.authentication);
23333
23334        while let Some(auth_step) = theScheme.step()? {
23335            match auth_step {
23336                ::authentic::AuthenticationStep::Request(auth_request) => {
23337                    theScheme.respond(self.client.request(auth_request).await);
23338                }
23339                ::authentic::AuthenticationStep::WaitFor(duration) => {
23340                    (self.sleep)(duration).await;
23341                }
23342            }
23343        }
23344        let theBuilder = crate::v1_1_4::request::repos_compare_commits::http_builder(
23345            self.config.base_url.as_ref(),
23346            owner,
23347            repo,
23348            basehead,
23349            page,
23350            per_page,
23351            self.config.user_agent.as_ref(),
23352            self.config.accept.as_deref(),
23353        )?
23354        .with_authentication(&theScheme)?;
23355
23356        let theRequest =
23357            crate::v1_1_4::request::repos_compare_commits::hyper_request(theBuilder)?;
23358
23359        ::log::debug!("HTTP request: {:?}", &theRequest);
23360
23361        let theResponse = self.client.request(theRequest).await?;
23362
23363        ::log::debug!("HTTP response: {:?}", &theResponse);
23364
23365        Ok(theResponse)
23366    }
23367
23368    /// Get repository content
23369    /// 
23370    /// Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit
23371    /// `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. 
23372    /// 
23373    /// Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for
23374    /// retrieving the raw content or rendered HTML (when supported). All content types support [a custom media
23375    /// type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent
23376    /// object format.
23377    /// 
23378    /// **Note**:
23379    /// *   To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees).
23380    /// *   This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees
23381    /// API](https://docs.github.com/rest/reference/git#get-a-tree).
23382    /// *   This API supports files up to 1 megabyte in size.
23383    /// 
23384    /// #### If the content is a directory
23385    /// The response will be an array of objects, one object for each item in the directory.
23386    /// When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value
23387    /// _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW).
23388    /// In the next major version of the API, the type will be returned as "submodule".
23389    /// 
23390    /// #### If the content is a symlink 
23391    /// If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the
23392    /// API responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object 
23393    /// describing the symlink itself.
23394    /// 
23395    /// #### If the content is a submodule
23396    /// The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific
23397    /// commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out
23398    /// the submodule at that specific commit.
23399    /// 
23400    /// If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the
23401    /// github.com URLs (`html_url` and `_links["html"]`) will have null values.
23402    /// 
23403    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-repository-content)
23404    pub async fn repos_get_content(
23405        &self,
23406        owner: &str,
23407        repo: &str,
23408        path: &str,
23409        r#ref: ::std::option::Option<&str>,
23410    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23411        let mut theScheme = AuthScheme::from(&self.config.authentication);
23412
23413        while let Some(auth_step) = theScheme.step()? {
23414            match auth_step {
23415                ::authentic::AuthenticationStep::Request(auth_request) => {
23416                    theScheme.respond(self.client.request(auth_request).await);
23417                }
23418                ::authentic::AuthenticationStep::WaitFor(duration) => {
23419                    (self.sleep)(duration).await;
23420                }
23421            }
23422        }
23423        let theBuilder = crate::v1_1_4::request::repos_get_content::http_builder(
23424            self.config.base_url.as_ref(),
23425            owner,
23426            repo,
23427            path,
23428            r#ref,
23429            self.config.user_agent.as_ref(),
23430            self.config.accept.as_deref(),
23431        )?
23432        .with_authentication(&theScheme)?;
23433
23434        let theRequest =
23435            crate::v1_1_4::request::repos_get_content::hyper_request(theBuilder)?;
23436
23437        ::log::debug!("HTTP request: {:?}", &theRequest);
23438
23439        let theResponse = self.client.request(theRequest).await?;
23440
23441        ::log::debug!("HTTP response: {:?}", &theResponse);
23442
23443        Ok(theResponse)
23444    }
23445
23446    /// Create or update file contents
23447    /// 
23448    /// Creates a new file or replaces an existing file in a repository.
23449    /// 
23450    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-or-update-file-contents)
23451    ///
23452    /// # Content
23453    ///
23454    /// - [`&v1_1_4::request::repos_create_or_update_file_contents::body::Json`](crate::v1_1_4::request::repos_create_or_update_file_contents::body::Json)
23455    pub async fn repos_create_or_update_file_contents<Content>(
23456        &self,
23457        owner: &str,
23458        repo: &str,
23459        path: &str,
23460        theContent: Content,
23461    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
23462    where
23463        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_or_update_file_contents::Content<::hyper::Body>>,
23464        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_or_update_file_contents::Content<::hyper::Body>>>::Error>
23465    {
23466        let mut theScheme = AuthScheme::from(&self.config.authentication);
23467
23468        while let Some(auth_step) = theScheme.step()? {
23469            match auth_step {
23470                ::authentic::AuthenticationStep::Request(auth_request) => {
23471                    theScheme.respond(self.client.request(auth_request).await);
23472                }
23473                ::authentic::AuthenticationStep::WaitFor(duration) => {
23474                    (self.sleep)(duration).await;
23475                }
23476            }
23477        }
23478        let theBuilder = crate::v1_1_4::request::repos_create_or_update_file_contents::http_builder(
23479            self.config.base_url.as_ref(),
23480            owner,
23481            repo,
23482            path,
23483            self.config.user_agent.as_ref(),
23484            self.config.accept.as_deref(),
23485        )?
23486        .with_authentication(&theScheme)?;
23487
23488        let theRequest = crate::v1_1_4::request::repos_create_or_update_file_contents::hyper_request(
23489            theBuilder,
23490            theContent.try_into()?,
23491        )?;
23492
23493        ::log::debug!("HTTP request: {:?}", &theRequest);
23494
23495        let theResponse = self.client.request(theRequest).await?;
23496
23497        ::log::debug!("HTTP response: {:?}", &theResponse);
23498
23499        Ok(theResponse)
23500    }
23501
23502    /// Delete a file
23503    /// 
23504    /// Deletes a file in a repository.
23505    /// 
23506    /// You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author.
23507    /// 
23508    /// The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used.
23509    /// 
23510    /// You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.
23511    /// 
23512    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-a-file)
23513    ///
23514    /// # Content
23515    ///
23516    /// - [`&v1_1_4::request::repos_delete_file::body::Json`](crate::v1_1_4::request::repos_delete_file::body::Json)
23517    pub async fn repos_delete_file<Content>(
23518        &self,
23519        owner: &str,
23520        repo: &str,
23521        path: &str,
23522        theContent: Content,
23523    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
23524    where
23525        Content: Copy + TryInto<crate::v1_1_4::request::repos_delete_file::Content<::hyper::Body>>,
23526        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_delete_file::Content<::hyper::Body>>>::Error>
23527    {
23528        let mut theScheme = AuthScheme::from(&self.config.authentication);
23529
23530        while let Some(auth_step) = theScheme.step()? {
23531            match auth_step {
23532                ::authentic::AuthenticationStep::Request(auth_request) => {
23533                    theScheme.respond(self.client.request(auth_request).await);
23534                }
23535                ::authentic::AuthenticationStep::WaitFor(duration) => {
23536                    (self.sleep)(duration).await;
23537                }
23538            }
23539        }
23540        let theBuilder = crate::v1_1_4::request::repos_delete_file::http_builder(
23541            self.config.base_url.as_ref(),
23542            owner,
23543            repo,
23544            path,
23545            self.config.user_agent.as_ref(),
23546            self.config.accept.as_deref(),
23547        )?
23548        .with_authentication(&theScheme)?;
23549
23550        let theRequest = crate::v1_1_4::request::repos_delete_file::hyper_request(
23551            theBuilder,
23552            theContent.try_into()?,
23553        )?;
23554
23555        ::log::debug!("HTTP request: {:?}", &theRequest);
23556
23557        let theResponse = self.client.request(theRequest).await?;
23558
23559        ::log::debug!("HTTP response: {:?}", &theResponse);
23560
23561        Ok(theResponse)
23562    }
23563
23564    /// List repository contributors
23565    /// 
23566    /// Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance.
23567    /// 
23568    /// GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information.
23569    /// 
23570    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-repository-contributors)
23571    pub async fn repos_list_contributors(
23572        &self,
23573        owner: &str,
23574        repo: &str,
23575        anon: ::std::option::Option<&str>,
23576        per_page: ::std::option::Option<i64>,
23577        page: ::std::option::Option<i64>,
23578    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23579        let mut theScheme = AuthScheme::from(&self.config.authentication);
23580
23581        while let Some(auth_step) = theScheme.step()? {
23582            match auth_step {
23583                ::authentic::AuthenticationStep::Request(auth_request) => {
23584                    theScheme.respond(self.client.request(auth_request).await);
23585                }
23586                ::authentic::AuthenticationStep::WaitFor(duration) => {
23587                    (self.sleep)(duration).await;
23588                }
23589            }
23590        }
23591        let theBuilder = crate::v1_1_4::request::repos_list_contributors::http_builder(
23592            self.config.base_url.as_ref(),
23593            owner,
23594            repo,
23595            anon,
23596            per_page,
23597            page,
23598            self.config.user_agent.as_ref(),
23599            self.config.accept.as_deref(),
23600        )?
23601        .with_authentication(&theScheme)?;
23602
23603        let theRequest =
23604            crate::v1_1_4::request::repos_list_contributors::hyper_request(theBuilder)?;
23605
23606        ::log::debug!("HTTP request: {:?}", &theRequest);
23607
23608        let theResponse = self.client.request(theRequest).await?;
23609
23610        ::log::debug!("HTTP response: {:?}", &theResponse);
23611
23612        Ok(theResponse)
23613    }
23614
23615    /// List repository secrets
23616    /// 
23617    /// Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint.
23618    /// 
23619    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#list-repository-secrets)
23620    pub async fn dependabot_list_repo_secrets(
23621        &self,
23622        owner: &str,
23623        repo: &str,
23624        per_page: ::std::option::Option<i64>,
23625        page: ::std::option::Option<i64>,
23626    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23627        let mut theScheme = AuthScheme::from(&self.config.authentication);
23628
23629        while let Some(auth_step) = theScheme.step()? {
23630            match auth_step {
23631                ::authentic::AuthenticationStep::Request(auth_request) => {
23632                    theScheme.respond(self.client.request(auth_request).await);
23633                }
23634                ::authentic::AuthenticationStep::WaitFor(duration) => {
23635                    (self.sleep)(duration).await;
23636                }
23637            }
23638        }
23639        let theBuilder = crate::v1_1_4::request::dependabot_list_repo_secrets::http_builder(
23640            self.config.base_url.as_ref(),
23641            owner,
23642            repo,
23643            per_page,
23644            page,
23645            self.config.user_agent.as_ref(),
23646            self.config.accept.as_deref(),
23647        )?
23648        .with_authentication(&theScheme)?;
23649
23650        let theRequest =
23651            crate::v1_1_4::request::dependabot_list_repo_secrets::hyper_request(theBuilder)?;
23652
23653        ::log::debug!("HTTP request: {:?}", &theRequest);
23654
23655        let theResponse = self.client.request(theRequest).await?;
23656
23657        ::log::debug!("HTTP response: {:?}", &theResponse);
23658
23659        Ok(theResponse)
23660    }
23661
23662    /// Get a repository public key
23663    /// 
23664    /// Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint.
23665    /// 
23666    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key)
23667    pub async fn dependabot_get_repo_public_key(
23668        &self,
23669        owner: &str,
23670        repo: &str,
23671    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23672        let mut theScheme = AuthScheme::from(&self.config.authentication);
23673
23674        while let Some(auth_step) = theScheme.step()? {
23675            match auth_step {
23676                ::authentic::AuthenticationStep::Request(auth_request) => {
23677                    theScheme.respond(self.client.request(auth_request).await);
23678                }
23679                ::authentic::AuthenticationStep::WaitFor(duration) => {
23680                    (self.sleep)(duration).await;
23681                }
23682            }
23683        }
23684        let theBuilder = crate::v1_1_4::request::dependabot_get_repo_public_key::http_builder(
23685            self.config.base_url.as_ref(),
23686            owner,
23687            repo,
23688            self.config.user_agent.as_ref(),
23689            self.config.accept.as_deref(),
23690        )?
23691        .with_authentication(&theScheme)?;
23692
23693        let theRequest =
23694            crate::v1_1_4::request::dependabot_get_repo_public_key::hyper_request(theBuilder)?;
23695
23696        ::log::debug!("HTTP request: {:?}", &theRequest);
23697
23698        let theResponse = self.client.request(theRequest).await?;
23699
23700        ::log::debug!("HTTP response: {:?}", &theResponse);
23701
23702        Ok(theResponse)
23703    }
23704
23705    /// Get a repository secret
23706    /// 
23707    /// Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint.
23708    /// 
23709    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#get-a-repository-secret)
23710    pub async fn dependabot_get_repo_secret(
23711        &self,
23712        owner: &str,
23713        repo: &str,
23714        secret_name: &str,
23715    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23716        let mut theScheme = AuthScheme::from(&self.config.authentication);
23717
23718        while let Some(auth_step) = theScheme.step()? {
23719            match auth_step {
23720                ::authentic::AuthenticationStep::Request(auth_request) => {
23721                    theScheme.respond(self.client.request(auth_request).await);
23722                }
23723                ::authentic::AuthenticationStep::WaitFor(duration) => {
23724                    (self.sleep)(duration).await;
23725                }
23726            }
23727        }
23728        let theBuilder = crate::v1_1_4::request::dependabot_get_repo_secret::http_builder(
23729            self.config.base_url.as_ref(),
23730            owner,
23731            repo,
23732            secret_name,
23733            self.config.user_agent.as_ref(),
23734            self.config.accept.as_deref(),
23735        )?
23736        .with_authentication(&theScheme)?;
23737
23738        let theRequest =
23739            crate::v1_1_4::request::dependabot_get_repo_secret::hyper_request(theBuilder)?;
23740
23741        ::log::debug!("HTTP request: {:?}", &theRequest);
23742
23743        let theResponse = self.client.request(theRequest).await?;
23744
23745        ::log::debug!("HTTP response: {:?}", &theResponse);
23746
23747        Ok(theResponse)
23748    }
23749
23750    /// Create or update a repository secret
23751    /// 
23752    /// Creates or updates a repository secret with an encrypted value. Encrypt your secret using
23753    /// [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
23754    /// token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository
23755    /// permission to use this endpoint.
23756    /// 
23757    /// #### Example encrypting a secret using Node.js
23758    /// 
23759    /// Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
23760    /// 
23761    /// ```text
23762    /// const sodium = require('tweetsodium');
23763    /// 
23764    /// const key = "base64-encoded-public-key";
23765    /// const value = "plain-text-secret";
23766    /// 
23767    /// // Convert the message and key to Uint8Array's (Buffer implements that interface)
23768    /// const messageBytes = Buffer.from(value);
23769    /// const keyBytes = Buffer.from(key, 'base64');
23770    /// 
23771    /// // Encrypt using LibSodium.
23772    /// const encryptedBytes = sodium.seal(messageBytes, keyBytes);
23773    /// 
23774    /// // Base64 the encrypted secret
23775    /// const encrypted = Buffer.from(encryptedBytes).toString('base64');
23776    /// 
23777    /// console.log(encrypted);
23778    /// ```
23779    /// 
23780    /// 
23781    /// #### Example encrypting a secret using Python
23782    /// 
23783    /// Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3.
23784    /// 
23785    /// ```text
23786    /// from base64 import b64encode
23787    /// from nacl import encoding, public
23788    /// 
23789    /// def encrypt(public_key: str, secret_value: str) -> str:
23790    ///   """Encrypt a Unicode string using the public key."""
23791    ///   public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
23792    ///   sealed_box = public.SealedBox(public_key)
23793    ///   encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
23794    ///   return b64encode(encrypted).decode("utf-8")
23795    /// ```
23796    /// 
23797    /// #### Example encrypting a secret using C#
23798    /// 
23799    /// Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
23800    /// 
23801    /// ```text
23802    /// var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
23803    /// var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
23804    /// 
23805    /// var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
23806    /// 
23807    /// Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
23808    /// ```
23809    /// 
23810    /// #### Example encrypting a secret using Ruby
23811    /// 
23812    /// Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
23813    /// 
23814    /// ```ruby
23815    /// require "rbnacl"
23816    /// require "base64"
23817    /// 
23818    /// key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
23819    /// public_key = RbNaCl::PublicKey.new(key)
23820    /// 
23821    /// box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
23822    /// encrypted_secret = box.encrypt("my_secret")
23823    /// 
23824    /// # Print the base64 encoded secret
23825    /// puts Base64.strict_encode64(encrypted_secret)
23826    /// ```
23827    /// 
23828    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret)
23829    ///
23830    /// # Content
23831    ///
23832    /// - [`&v1_1_4::request::dependabot_create_or_update_repo_secret::body::Json`](crate::v1_1_4::request::dependabot_create_or_update_repo_secret::body::Json)
23833    pub async fn dependabot_create_or_update_repo_secret<Content>(
23834        &self,
23835        owner: &str,
23836        repo: &str,
23837        secret_name: &str,
23838        theContent: Content,
23839    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
23840    where
23841        Content: Copy + TryInto<crate::v1_1_4::request::dependabot_create_or_update_repo_secret::Content<::hyper::Body>>,
23842        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::dependabot_create_or_update_repo_secret::Content<::hyper::Body>>>::Error>
23843    {
23844        let mut theScheme = AuthScheme::from(&self.config.authentication);
23845
23846        while let Some(auth_step) = theScheme.step()? {
23847            match auth_step {
23848                ::authentic::AuthenticationStep::Request(auth_request) => {
23849                    theScheme.respond(self.client.request(auth_request).await);
23850                }
23851                ::authentic::AuthenticationStep::WaitFor(duration) => {
23852                    (self.sleep)(duration).await;
23853                }
23854            }
23855        }
23856        let theBuilder = crate::v1_1_4::request::dependabot_create_or_update_repo_secret::http_builder(
23857            self.config.base_url.as_ref(),
23858            owner,
23859            repo,
23860            secret_name,
23861            self.config.user_agent.as_ref(),
23862            self.config.accept.as_deref(),
23863        )?
23864        .with_authentication(&theScheme)?;
23865
23866        let theRequest = crate::v1_1_4::request::dependabot_create_or_update_repo_secret::hyper_request(
23867            theBuilder,
23868            theContent.try_into()?,
23869        )?;
23870
23871        ::log::debug!("HTTP request: {:?}", &theRequest);
23872
23873        let theResponse = self.client.request(theRequest).await?;
23874
23875        ::log::debug!("HTTP response: {:?}", &theResponse);
23876
23877        Ok(theResponse)
23878    }
23879
23880    /// Delete a repository secret
23881    /// 
23882    /// Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint.
23883    /// 
23884    /// [API method documentation](https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret)
23885    pub async fn dependabot_delete_repo_secret(
23886        &self,
23887        owner: &str,
23888        repo: &str,
23889        secret_name: &str,
23890    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23891        let mut theScheme = AuthScheme::from(&self.config.authentication);
23892
23893        while let Some(auth_step) = theScheme.step()? {
23894            match auth_step {
23895                ::authentic::AuthenticationStep::Request(auth_request) => {
23896                    theScheme.respond(self.client.request(auth_request).await);
23897                }
23898                ::authentic::AuthenticationStep::WaitFor(duration) => {
23899                    (self.sleep)(duration).await;
23900                }
23901            }
23902        }
23903        let theBuilder = crate::v1_1_4::request::dependabot_delete_repo_secret::http_builder(
23904            self.config.base_url.as_ref(),
23905            owner,
23906            repo,
23907            secret_name,
23908            self.config.user_agent.as_ref(),
23909            self.config.accept.as_deref(),
23910        )?
23911        .with_authentication(&theScheme)?;
23912
23913        let theRequest =
23914            crate::v1_1_4::request::dependabot_delete_repo_secret::hyper_request(theBuilder)?;
23915
23916        ::log::debug!("HTTP request: {:?}", &theRequest);
23917
23918        let theResponse = self.client.request(theRequest).await?;
23919
23920        ::log::debug!("HTTP response: {:?}", &theResponse);
23921
23922        Ok(theResponse)
23923    }
23924
23925    /// Get a diff of the dependencies between commits
23926    /// 
23927    /// Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits.
23928    /// 
23929    /// [API method documentation](https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits)
23930    pub async fn dependency_graph_diff_range(
23931        &self,
23932        owner: &str,
23933        repo: &str,
23934        basehead: &str,
23935        name: ::std::option::Option<&str>,
23936    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23937        let mut theScheme = AuthScheme::from(&self.config.authentication);
23938
23939        while let Some(auth_step) = theScheme.step()? {
23940            match auth_step {
23941                ::authentic::AuthenticationStep::Request(auth_request) => {
23942                    theScheme.respond(self.client.request(auth_request).await);
23943                }
23944                ::authentic::AuthenticationStep::WaitFor(duration) => {
23945                    (self.sleep)(duration).await;
23946                }
23947            }
23948        }
23949        let theBuilder = crate::v1_1_4::request::dependency_graph_diff_range::http_builder(
23950            self.config.base_url.as_ref(),
23951            owner,
23952            repo,
23953            basehead,
23954            name,
23955            self.config.user_agent.as_ref(),
23956            self.config.accept.as_deref(),
23957        )?
23958        .with_authentication(&theScheme)?;
23959
23960        let theRequest =
23961            crate::v1_1_4::request::dependency_graph_diff_range::hyper_request(theBuilder)?;
23962
23963        ::log::debug!("HTTP request: {:?}", &theRequest);
23964
23965        let theResponse = self.client.request(theRequest).await?;
23966
23967        ::log::debug!("HTTP response: {:?}", &theResponse);
23968
23969        Ok(theResponse)
23970    }
23971
23972    /// List deployments
23973    /// 
23974    /// Simple filtering of deployments is available via query parameters:
23975    /// 
23976    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-deployments)
23977    #[allow(clippy::too_many_arguments)]
23978    pub async fn repos_list_deployments(
23979        &self,
23980        owner: &str,
23981        repo: &str,
23982        sha: ::std::option::Option<&str>,
23983        r#ref: ::std::option::Option<&str>,
23984        task: ::std::option::Option<&str>,
23985        environment: ::std::option::Option<::std::option::Option<&str>>,
23986        per_page: ::std::option::Option<i64>,
23987        page: ::std::option::Option<i64>,
23988    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
23989        let mut theScheme = AuthScheme::from(&self.config.authentication);
23990
23991        while let Some(auth_step) = theScheme.step()? {
23992            match auth_step {
23993                ::authentic::AuthenticationStep::Request(auth_request) => {
23994                    theScheme.respond(self.client.request(auth_request).await);
23995                }
23996                ::authentic::AuthenticationStep::WaitFor(duration) => {
23997                    (self.sleep)(duration).await;
23998                }
23999            }
24000        }
24001        let theBuilder = crate::v1_1_4::request::repos_list_deployments::http_builder(
24002            self.config.base_url.as_ref(),
24003            owner,
24004            repo,
24005            sha,
24006            r#ref,
24007            task,
24008            environment,
24009            per_page,
24010            page,
24011            self.config.user_agent.as_ref(),
24012            self.config.accept.as_deref(),
24013        )?
24014        .with_authentication(&theScheme)?;
24015
24016        let theRequest =
24017            crate::v1_1_4::request::repos_list_deployments::hyper_request(theBuilder)?;
24018
24019        ::log::debug!("HTTP request: {:?}", &theRequest);
24020
24021        let theResponse = self.client.request(theRequest).await?;
24022
24023        ::log::debug!("HTTP response: {:?}", &theResponse);
24024
24025        Ok(theResponse)
24026    }
24027
24028    /// Create a deployment
24029    /// 
24030    /// Deployments offer a few configurable parameters with certain defaults.
24031    /// 
24032    /// The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them
24033    /// before we merge a pull request.
24034    /// 
24035    /// The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have
24036    /// multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter
24037    /// makes it easier to track which environments have requested deployments. The default environment is `production`.
24038    /// 
24039    /// The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If
24040    /// the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,
24041    /// the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will
24042    /// return a failure response.
24043    /// 
24044    /// By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success`
24045    /// state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to
24046    /// specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do
24047    /// not require any contexts or create any commit statuses, the deployment will always succeed.
24048    /// 
24049    /// The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text
24050    /// field that will be passed on when a deployment event is dispatched.
24051    /// 
24052    /// The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might
24053    /// be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an
24054    /// application with debugging enabled.
24055    /// 
24056    /// Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref.
24057    /// 
24058    /// #### Merged branch response
24059    /// You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating
24060    /// a deployment. This auto-merge happens when:
24061    /// *   Auto-merge option is enabled in the repository
24062    /// *   Topic branch does not include the latest changes on the base branch, which is `master` in the response example
24063    /// *   There are no merge conflicts
24064    /// 
24065    /// If there are no new commits in the base branch, a new request to create a deployment should give a successful
24066    /// response.
24067    /// 
24068    /// #### Merge conflict response
24069    /// This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't
24070    /// be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.
24071    /// 
24072    /// #### Failed commit status checks
24073    /// This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`
24074    /// status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.
24075    /// 
24076    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-a-deployment)
24077    ///
24078    /// # Content
24079    ///
24080    /// - [`&v1_1_4::request::repos_create_deployment::body::Json`](crate::v1_1_4::request::repos_create_deployment::body::Json)
24081    pub async fn repos_create_deployment<Content>(
24082        &self,
24083        owner: &str,
24084        repo: &str,
24085        theContent: Content,
24086    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
24087    where
24088        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_deployment::Content<::hyper::Body>>,
24089        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_deployment::Content<::hyper::Body>>>::Error>
24090    {
24091        let mut theScheme = AuthScheme::from(&self.config.authentication);
24092
24093        while let Some(auth_step) = theScheme.step()? {
24094            match auth_step {
24095                ::authentic::AuthenticationStep::Request(auth_request) => {
24096                    theScheme.respond(self.client.request(auth_request).await);
24097                }
24098                ::authentic::AuthenticationStep::WaitFor(duration) => {
24099                    (self.sleep)(duration).await;
24100                }
24101            }
24102        }
24103        let theBuilder = crate::v1_1_4::request::repos_create_deployment::http_builder(
24104            self.config.base_url.as_ref(),
24105            owner,
24106            repo,
24107            self.config.user_agent.as_ref(),
24108            self.config.accept.as_deref(),
24109        )?
24110        .with_authentication(&theScheme)?;
24111
24112        let theRequest = crate::v1_1_4::request::repos_create_deployment::hyper_request(
24113            theBuilder,
24114            theContent.try_into()?,
24115        )?;
24116
24117        ::log::debug!("HTTP request: {:?}", &theRequest);
24118
24119        let theResponse = self.client.request(theRequest).await?;
24120
24121        ::log::debug!("HTTP response: {:?}", &theResponse);
24122
24123        Ok(theResponse)
24124    }
24125
24126    /// Get a deployment
24127    /// 
24128    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-deployment)
24129    pub async fn repos_get_deployment(
24130        &self,
24131        owner: &str,
24132        repo: &str,
24133        deployment_id: i64,
24134    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
24135        let mut theScheme = AuthScheme::from(&self.config.authentication);
24136
24137        while let Some(auth_step) = theScheme.step()? {
24138            match auth_step {
24139                ::authentic::AuthenticationStep::Request(auth_request) => {
24140                    theScheme.respond(self.client.request(auth_request).await);
24141                }
24142                ::authentic::AuthenticationStep::WaitFor(duration) => {
24143                    (self.sleep)(duration).await;
24144                }
24145            }
24146        }
24147        let theBuilder = crate::v1_1_4::request::repos_get_deployment::http_builder(
24148            self.config.base_url.as_ref(),
24149            owner,
24150            repo,
24151            deployment_id,
24152            self.config.user_agent.as_ref(),
24153            self.config.accept.as_deref(),
24154        )?
24155        .with_authentication(&theScheme)?;
24156
24157        let theRequest =
24158            crate::v1_1_4::request::repos_get_deployment::hyper_request(theBuilder)?;
24159
24160        ::log::debug!("HTTP request: {:?}", &theRequest);
24161
24162        let theResponse = self.client.request(theRequest).await?;
24163
24164        ::log::debug!("HTTP response: {:?}", &theResponse);
24165
24166        Ok(theResponse)
24167    }
24168
24169    /// Delete a deployment
24170    /// 
24171    /// If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment.
24172    /// 
24173    /// To set a deployment as inactive, you must:
24174    /// 
24175    /// *   Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment.
24176    /// *   Mark the active deployment as inactive by adding any non-successful deployment status.
24177    /// 
24178    /// For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)."
24179    /// 
24180    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-a-deployment)
24181    pub async fn repos_delete_deployment(
24182        &self,
24183        owner: &str,
24184        repo: &str,
24185        deployment_id: i64,
24186    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
24187        let mut theScheme = AuthScheme::from(&self.config.authentication);
24188
24189        while let Some(auth_step) = theScheme.step()? {
24190            match auth_step {
24191                ::authentic::AuthenticationStep::Request(auth_request) => {
24192                    theScheme.respond(self.client.request(auth_request).await);
24193                }
24194                ::authentic::AuthenticationStep::WaitFor(duration) => {
24195                    (self.sleep)(duration).await;
24196                }
24197            }
24198        }
24199        let theBuilder = crate::v1_1_4::request::repos_delete_deployment::http_builder(
24200            self.config.base_url.as_ref(),
24201            owner,
24202            repo,
24203            deployment_id,
24204            self.config.user_agent.as_ref(),
24205            self.config.accept.as_deref(),
24206        )?
24207        .with_authentication(&theScheme)?;
24208
24209        let theRequest =
24210            crate::v1_1_4::request::repos_delete_deployment::hyper_request(theBuilder)?;
24211
24212        ::log::debug!("HTTP request: {:?}", &theRequest);
24213
24214        let theResponse = self.client.request(theRequest).await?;
24215
24216        ::log::debug!("HTTP response: {:?}", &theResponse);
24217
24218        Ok(theResponse)
24219    }
24220
24221    /// List deployment statuses
24222    /// 
24223    /// Users with pull access can view deployment statuses for a deployment:
24224    /// 
24225    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-deployment-statuses)
24226    pub async fn repos_list_deployment_statuses(
24227        &self,
24228        owner: &str,
24229        repo: &str,
24230        deployment_id: i64,
24231        per_page: ::std::option::Option<i64>,
24232        page: ::std::option::Option<i64>,
24233    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
24234        let mut theScheme = AuthScheme::from(&self.config.authentication);
24235
24236        while let Some(auth_step) = theScheme.step()? {
24237            match auth_step {
24238                ::authentic::AuthenticationStep::Request(auth_request) => {
24239                    theScheme.respond(self.client.request(auth_request).await);
24240                }
24241                ::authentic::AuthenticationStep::WaitFor(duration) => {
24242                    (self.sleep)(duration).await;
24243                }
24244            }
24245        }
24246        let theBuilder = crate::v1_1_4::request::repos_list_deployment_statuses::http_builder(
24247            self.config.base_url.as_ref(),
24248            owner,
24249            repo,
24250            deployment_id,
24251            per_page,
24252            page,
24253            self.config.user_agent.as_ref(),
24254            self.config.accept.as_deref(),
24255        )?
24256        .with_authentication(&theScheme)?;
24257
24258        let theRequest =
24259            crate::v1_1_4::request::repos_list_deployment_statuses::hyper_request(theBuilder)?;
24260
24261        ::log::debug!("HTTP request: {:?}", &theRequest);
24262
24263        let theResponse = self.client.request(theRequest).await?;
24264
24265        ::log::debug!("HTTP response: {:?}", &theResponse);
24266
24267        Ok(theResponse)
24268    }
24269
24270    /// Create a deployment status
24271    /// 
24272    /// Users with `push` access can create deployment statuses for a given deployment.
24273    /// 
24274    /// GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope.
24275    /// 
24276    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-a-deployment-status)
24277    ///
24278    /// # Content
24279    ///
24280    /// - [`&v1_1_4::request::repos_create_deployment_status::body::Json`](crate::v1_1_4::request::repos_create_deployment_status::body::Json)
24281    pub async fn repos_create_deployment_status<Content>(
24282        &self,
24283        owner: &str,
24284        repo: &str,
24285        deployment_id: i64,
24286        theContent: Content,
24287    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
24288    where
24289        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_deployment_status::Content<::hyper::Body>>,
24290        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_deployment_status::Content<::hyper::Body>>>::Error>
24291    {
24292        let mut theScheme = AuthScheme::from(&self.config.authentication);
24293
24294        while let Some(auth_step) = theScheme.step()? {
24295            match auth_step {
24296                ::authentic::AuthenticationStep::Request(auth_request) => {
24297                    theScheme.respond(self.client.request(auth_request).await);
24298                }
24299                ::authentic::AuthenticationStep::WaitFor(duration) => {
24300                    (self.sleep)(duration).await;
24301                }
24302            }
24303        }
24304        let theBuilder = crate::v1_1_4::request::repos_create_deployment_status::http_builder(
24305            self.config.base_url.as_ref(),
24306            owner,
24307            repo,
24308            deployment_id,
24309            self.config.user_agent.as_ref(),
24310            self.config.accept.as_deref(),
24311        )?
24312        .with_authentication(&theScheme)?;
24313
24314        let theRequest = crate::v1_1_4::request::repos_create_deployment_status::hyper_request(
24315            theBuilder,
24316            theContent.try_into()?,
24317        )?;
24318
24319        ::log::debug!("HTTP request: {:?}", &theRequest);
24320
24321        let theResponse = self.client.request(theRequest).await?;
24322
24323        ::log::debug!("HTTP response: {:?}", &theResponse);
24324
24325        Ok(theResponse)
24326    }
24327
24328    /// Get a deployment status
24329    /// 
24330    /// Users with pull access can view a deployment status for a deployment:
24331    /// 
24332    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-deployment-status)
24333    pub async fn repos_get_deployment_status(
24334        &self,
24335        owner: &str,
24336        repo: &str,
24337        deployment_id: i64,
24338        status_id: i64,
24339    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
24340        let mut theScheme = AuthScheme::from(&self.config.authentication);
24341
24342        while let Some(auth_step) = theScheme.step()? {
24343            match auth_step {
24344                ::authentic::AuthenticationStep::Request(auth_request) => {
24345                    theScheme.respond(self.client.request(auth_request).await);
24346                }
24347                ::authentic::AuthenticationStep::WaitFor(duration) => {
24348                    (self.sleep)(duration).await;
24349                }
24350            }
24351        }
24352        let theBuilder = crate::v1_1_4::request::repos_get_deployment_status::http_builder(
24353            self.config.base_url.as_ref(),
24354            owner,
24355            repo,
24356            deployment_id,
24357            status_id,
24358            self.config.user_agent.as_ref(),
24359            self.config.accept.as_deref(),
24360        )?
24361        .with_authentication(&theScheme)?;
24362
24363        let theRequest =
24364            crate::v1_1_4::request::repos_get_deployment_status::hyper_request(theBuilder)?;
24365
24366        ::log::debug!("HTTP request: {:?}", &theRequest);
24367
24368        let theResponse = self.client.request(theRequest).await?;
24369
24370        ::log::debug!("HTTP response: {:?}", &theResponse);
24371
24372        Ok(theResponse)
24373    }
24374
24375    /// Create a repository dispatch event
24376    /// 
24377    /// You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)."
24378    /// 
24379    /// The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow.
24380    /// 
24381    /// This endpoint requires write access to the repository by providing either:
24382    /// 
24383    ///   - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation.
24384    ///   - GitHub Apps with both `metadata:read` and `contents:read&write` permissions.
24385    /// 
24386    /// This input example shows how you can use the `client_payload` as a test to debug your workflow.
24387    /// 
24388    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event)
24389    ///
24390    /// # Content
24391    ///
24392    /// - [`&v1_1_4::request::repos_create_dispatch_event::body::Json`](crate::v1_1_4::request::repos_create_dispatch_event::body::Json)
24393    pub async fn repos_create_dispatch_event<Content>(
24394        &self,
24395        owner: &str,
24396        repo: &str,
24397        theContent: Content,
24398    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
24399    where
24400        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_dispatch_event::Content<::hyper::Body>>,
24401        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_dispatch_event::Content<::hyper::Body>>>::Error>
24402    {
24403        let mut theScheme = AuthScheme::from(&self.config.authentication);
24404
24405        while let Some(auth_step) = theScheme.step()? {
24406            match auth_step {
24407                ::authentic::AuthenticationStep::Request(auth_request) => {
24408                    theScheme.respond(self.client.request(auth_request).await);
24409                }
24410                ::authentic::AuthenticationStep::WaitFor(duration) => {
24411                    (self.sleep)(duration).await;
24412                }
24413            }
24414        }
24415        let theBuilder = crate::v1_1_4::request::repos_create_dispatch_event::http_builder(
24416            self.config.base_url.as_ref(),
24417            owner,
24418            repo,
24419            self.config.user_agent.as_ref(),
24420            self.config.accept.as_deref(),
24421        )?
24422        .with_authentication(&theScheme)?;
24423
24424        let theRequest = crate::v1_1_4::request::repos_create_dispatch_event::hyper_request(
24425            theBuilder,
24426            theContent.try_into()?,
24427        )?;
24428
24429        ::log::debug!("HTTP request: {:?}", &theRequest);
24430
24431        let theResponse = self.client.request(theRequest).await?;
24432
24433        ::log::debug!("HTTP response: {:?}", &theResponse);
24434
24435        Ok(theResponse)
24436    }
24437
24438    /// Get all environments
24439    /// 
24440    /// Get all environments for a repository.
24441    /// 
24442    /// Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
24443    /// 
24444    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-all-environments)
24445    pub async fn repos_get_all_environments(
24446        &self,
24447        owner: &str,
24448        repo: &str,
24449        per_page: ::std::option::Option<i64>,
24450        page: ::std::option::Option<i64>,
24451    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
24452        let mut theScheme = AuthScheme::from(&self.config.authentication);
24453
24454        while let Some(auth_step) = theScheme.step()? {
24455            match auth_step {
24456                ::authentic::AuthenticationStep::Request(auth_request) => {
24457                    theScheme.respond(self.client.request(auth_request).await);
24458                }
24459                ::authentic::AuthenticationStep::WaitFor(duration) => {
24460                    (self.sleep)(duration).await;
24461                }
24462            }
24463        }
24464        let theBuilder = crate::v1_1_4::request::repos_get_all_environments::http_builder(
24465            self.config.base_url.as_ref(),
24466            owner,
24467            repo,
24468            per_page,
24469            page,
24470            self.config.user_agent.as_ref(),
24471            self.config.accept.as_deref(),
24472        )?
24473        .with_authentication(&theScheme)?;
24474
24475        let theRequest =
24476            crate::v1_1_4::request::repos_get_all_environments::hyper_request(theBuilder)?;
24477
24478        ::log::debug!("HTTP request: {:?}", &theRequest);
24479
24480        let theResponse = self.client.request(theRequest).await?;
24481
24482        ::log::debug!("HTTP response: {:?}", &theResponse);
24483
24484        Ok(theResponse)
24485    }
24486
24487    /// Get an environment
24488    /// 
24489    /// Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint.
24490    /// 
24491    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-an-environment)
24492    pub async fn repos_get_environment(
24493        &self,
24494        owner: &str,
24495        repo: &str,
24496        environment_name: &str,
24497    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
24498        let mut theScheme = AuthScheme::from(&self.config.authentication);
24499
24500        while let Some(auth_step) = theScheme.step()? {
24501            match auth_step {
24502                ::authentic::AuthenticationStep::Request(auth_request) => {
24503                    theScheme.respond(self.client.request(auth_request).await);
24504                }
24505                ::authentic::AuthenticationStep::WaitFor(duration) => {
24506                    (self.sleep)(duration).await;
24507                }
24508            }
24509        }
24510        let theBuilder = crate::v1_1_4::request::repos_get_environment::http_builder(
24511            self.config.base_url.as_ref(),
24512            owner,
24513            repo,
24514            environment_name,
24515            self.config.user_agent.as_ref(),
24516            self.config.accept.as_deref(),
24517        )?
24518        .with_authentication(&theScheme)?;
24519
24520        let theRequest =
24521            crate::v1_1_4::request::repos_get_environment::hyper_request(theBuilder)?;
24522
24523        ::log::debug!("HTTP request: {:?}", &theRequest);
24524
24525        let theResponse = self.client.request(theRequest).await?;
24526
24527        ::log::debug!("HTTP response: {:?}", &theResponse);
24528
24529        Ok(theResponse)
24530    }
24531
24532    /// Create or update an environment
24533    /// 
24534    /// Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)."
24535    /// 
24536    /// **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)."
24537    /// 
24538    /// **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)."
24539    /// 
24540    /// You must authenticate using an access token with the repo scope to use this endpoint.
24541    /// 
24542    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-or-update-an-environment)
24543    ///
24544    /// # Content
24545    ///
24546    /// - [`&::std::option::Option<crate::v1_1_4::request::repos_create_or_update_environment::body::Json>`](crate::v1_1_4::request::repos_create_or_update_environment::body::Json)
24547    pub async fn repos_create_or_update_environment<Content>(
24548        &self,
24549        owner: &str,
24550        repo: &str,
24551        environment_name: &str,
24552        theContent: Content,
24553    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
24554    where
24555        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_or_update_environment::Content<::hyper::Body>>,
24556        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_or_update_environment::Content<::hyper::Body>>>::Error>
24557    {
24558        let mut theScheme = AuthScheme::from(&self.config.authentication);
24559
24560        while let Some(auth_step) = theScheme.step()? {
24561            match auth_step {
24562                ::authentic::AuthenticationStep::Request(auth_request) => {
24563                    theScheme.respond(self.client.request(auth_request).await);
24564                }
24565                ::authentic::AuthenticationStep::WaitFor(duration) => {
24566                    (self.sleep)(duration).await;
24567                }
24568            }
24569        }
24570        let theBuilder = crate::v1_1_4::request::repos_create_or_update_environment::http_builder(
24571            self.config.base_url.as_ref(),
24572            owner,
24573            repo,
24574            environment_name,
24575            self.config.user_agent.as_ref(),
24576            self.config.accept.as_deref(),
24577        )?
24578        .with_authentication(&theScheme)?;
24579
24580        let theRequest = crate::v1_1_4::request::repos_create_or_update_environment::hyper_request(
24581            theBuilder,
24582            theContent.try_into()?,
24583        )?;
24584
24585        ::log::debug!("HTTP request: {:?}", &theRequest);
24586
24587        let theResponse = self.client.request(theRequest).await?;
24588
24589        ::log::debug!("HTTP response: {:?}", &theResponse);
24590
24591        Ok(theResponse)
24592    }
24593
24594    /// Delete an environment
24595    /// 
24596    /// You must authenticate using an access token with the repo scope to use this endpoint.
24597    /// 
24598    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-an-environment)
24599    pub async fn repos_delete_an_environment(
24600        &self,
24601        owner: &str,
24602        repo: &str,
24603        environment_name: &str,
24604    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
24605        let mut theScheme = AuthScheme::from(&self.config.authentication);
24606
24607        while let Some(auth_step) = theScheme.step()? {
24608            match auth_step {
24609                ::authentic::AuthenticationStep::Request(auth_request) => {
24610                    theScheme.respond(self.client.request(auth_request).await);
24611                }
24612                ::authentic::AuthenticationStep::WaitFor(duration) => {
24613                    (self.sleep)(duration).await;
24614                }
24615            }
24616        }
24617        let theBuilder = crate::v1_1_4::request::repos_delete_an_environment::http_builder(
24618            self.config.base_url.as_ref(),
24619            owner,
24620            repo,
24621            environment_name,
24622            self.config.user_agent.as_ref(),
24623            self.config.accept.as_deref(),
24624        )?
24625        .with_authentication(&theScheme)?;
24626
24627        let theRequest =
24628            crate::v1_1_4::request::repos_delete_an_environment::hyper_request(theBuilder)?;
24629
24630        ::log::debug!("HTTP request: {:?}", &theRequest);
24631
24632        let theResponse = self.client.request(theRequest).await?;
24633
24634        ::log::debug!("HTTP response: {:?}", &theResponse);
24635
24636        Ok(theResponse)
24637    }
24638
24639    /// List repository events
24640    /// 
24641    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-repository-events)
24642    pub async fn activity_list_repo_events(
24643        &self,
24644        owner: &str,
24645        repo: &str,
24646        per_page: ::std::option::Option<i64>,
24647        page: ::std::option::Option<i64>,
24648    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
24649        let mut theScheme = AuthScheme::from(&self.config.authentication);
24650
24651        while let Some(auth_step) = theScheme.step()? {
24652            match auth_step {
24653                ::authentic::AuthenticationStep::Request(auth_request) => {
24654                    theScheme.respond(self.client.request(auth_request).await);
24655                }
24656                ::authentic::AuthenticationStep::WaitFor(duration) => {
24657                    (self.sleep)(duration).await;
24658                }
24659            }
24660        }
24661        let theBuilder = crate::v1_1_4::request::activity_list_repo_events::http_builder(
24662            self.config.base_url.as_ref(),
24663            owner,
24664            repo,
24665            per_page,
24666            page,
24667            self.config.user_agent.as_ref(),
24668            self.config.accept.as_deref(),
24669        )?
24670        .with_authentication(&theScheme)?;
24671
24672        let theRequest =
24673            crate::v1_1_4::request::activity_list_repo_events::hyper_request(theBuilder)?;
24674
24675        ::log::debug!("HTTP request: {:?}", &theRequest);
24676
24677        let theResponse = self.client.request(theRequest).await?;
24678
24679        ::log::debug!("HTTP response: {:?}", &theResponse);
24680
24681        Ok(theResponse)
24682    }
24683
24684    /// List forks
24685    /// 
24686    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-forks)
24687    pub async fn repos_list_forks(
24688        &self,
24689        owner: &str,
24690        repo: &str,
24691        sort: ::std::option::Option<&str>,
24692        per_page: ::std::option::Option<i64>,
24693        page: ::std::option::Option<i64>,
24694    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
24695        let mut theScheme = AuthScheme::from(&self.config.authentication);
24696
24697        while let Some(auth_step) = theScheme.step()? {
24698            match auth_step {
24699                ::authentic::AuthenticationStep::Request(auth_request) => {
24700                    theScheme.respond(self.client.request(auth_request).await);
24701                }
24702                ::authentic::AuthenticationStep::WaitFor(duration) => {
24703                    (self.sleep)(duration).await;
24704                }
24705            }
24706        }
24707        let theBuilder = crate::v1_1_4::request::repos_list_forks::http_builder(
24708            self.config.base_url.as_ref(),
24709            owner,
24710            repo,
24711            sort,
24712            per_page,
24713            page,
24714            self.config.user_agent.as_ref(),
24715            self.config.accept.as_deref(),
24716        )?
24717        .with_authentication(&theScheme)?;
24718
24719        let theRequest =
24720            crate::v1_1_4::request::repos_list_forks::hyper_request(theBuilder)?;
24721
24722        ::log::debug!("HTTP request: {:?}", &theRequest);
24723
24724        let theResponse = self.client.request(theRequest).await?;
24725
24726        ::log::debug!("HTTP response: {:?}", &theResponse);
24727
24728        Ok(theResponse)
24729    }
24730
24731    /// Create a fork
24732    /// 
24733    /// Create a fork for the authenticated user.
24734    /// 
24735    /// **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api).
24736    /// 
24737    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-a-fork)
24738    ///
24739    /// # Content
24740    ///
24741    /// - [`&::std::option::Option<crate::v1_1_4::request::repos_create_fork::body::Json>`](crate::v1_1_4::request::repos_create_fork::body::Json)
24742    pub async fn repos_create_fork<Content>(
24743        &self,
24744        owner: &str,
24745        repo: &str,
24746        theContent: Content,
24747    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
24748    where
24749        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_fork::Content<::hyper::Body>>,
24750        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_fork::Content<::hyper::Body>>>::Error>
24751    {
24752        let mut theScheme = AuthScheme::from(&self.config.authentication);
24753
24754        while let Some(auth_step) = theScheme.step()? {
24755            match auth_step {
24756                ::authentic::AuthenticationStep::Request(auth_request) => {
24757                    theScheme.respond(self.client.request(auth_request).await);
24758                }
24759                ::authentic::AuthenticationStep::WaitFor(duration) => {
24760                    (self.sleep)(duration).await;
24761                }
24762            }
24763        }
24764        let theBuilder = crate::v1_1_4::request::repos_create_fork::http_builder(
24765            self.config.base_url.as_ref(),
24766            owner,
24767            repo,
24768            self.config.user_agent.as_ref(),
24769            self.config.accept.as_deref(),
24770        )?
24771        .with_authentication(&theScheme)?;
24772
24773        let theRequest = crate::v1_1_4::request::repos_create_fork::hyper_request(
24774            theBuilder,
24775            theContent.try_into()?,
24776        )?;
24777
24778        ::log::debug!("HTTP request: {:?}", &theRequest);
24779
24780        let theResponse = self.client.request(theRequest).await?;
24781
24782        ::log::debug!("HTTP response: {:?}", &theResponse);
24783
24784        Ok(theResponse)
24785    }
24786
24787    /// Create a blob
24788    /// 
24789    /// [API method documentation](https://docs.github.com/rest/reference/git#create-a-blob)
24790    ///
24791    /// # Content
24792    ///
24793    /// - [`&v1_1_4::request::git_create_blob::body::Json`](crate::v1_1_4::request::git_create_blob::body::Json)
24794    pub async fn git_create_blob<Content>(
24795        &self,
24796        owner: &str,
24797        repo: &str,
24798        theContent: Content,
24799    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
24800    where
24801        Content: Copy + TryInto<crate::v1_1_4::request::git_create_blob::Content<::hyper::Body>>,
24802        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::git_create_blob::Content<::hyper::Body>>>::Error>
24803    {
24804        let mut theScheme = AuthScheme::from(&self.config.authentication);
24805
24806        while let Some(auth_step) = theScheme.step()? {
24807            match auth_step {
24808                ::authentic::AuthenticationStep::Request(auth_request) => {
24809                    theScheme.respond(self.client.request(auth_request).await);
24810                }
24811                ::authentic::AuthenticationStep::WaitFor(duration) => {
24812                    (self.sleep)(duration).await;
24813                }
24814            }
24815        }
24816        let theBuilder = crate::v1_1_4::request::git_create_blob::http_builder(
24817            self.config.base_url.as_ref(),
24818            owner,
24819            repo,
24820            self.config.user_agent.as_ref(),
24821            self.config.accept.as_deref(),
24822        )?
24823        .with_authentication(&theScheme)?;
24824
24825        let theRequest = crate::v1_1_4::request::git_create_blob::hyper_request(
24826            theBuilder,
24827            theContent.try_into()?,
24828        )?;
24829
24830        ::log::debug!("HTTP request: {:?}", &theRequest);
24831
24832        let theResponse = self.client.request(theRequest).await?;
24833
24834        ::log::debug!("HTTP response: {:?}", &theResponse);
24835
24836        Ok(theResponse)
24837    }
24838
24839    /// Get a blob
24840    /// 
24841    /// The `content` in the response will always be Base64 encoded.
24842    /// 
24843    /// _Note_: This API supports blobs up to 100 megabytes in size.
24844    /// 
24845    /// [API method documentation](https://docs.github.com/rest/reference/git#get-a-blob)
24846    pub async fn git_get_blob(
24847        &self,
24848        owner: &str,
24849        repo: &str,
24850        file_sha: &str,
24851    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
24852        let mut theScheme = AuthScheme::from(&self.config.authentication);
24853
24854        while let Some(auth_step) = theScheme.step()? {
24855            match auth_step {
24856                ::authentic::AuthenticationStep::Request(auth_request) => {
24857                    theScheme.respond(self.client.request(auth_request).await);
24858                }
24859                ::authentic::AuthenticationStep::WaitFor(duration) => {
24860                    (self.sleep)(duration).await;
24861                }
24862            }
24863        }
24864        let theBuilder = crate::v1_1_4::request::git_get_blob::http_builder(
24865            self.config.base_url.as_ref(),
24866            owner,
24867            repo,
24868            file_sha,
24869            self.config.user_agent.as_ref(),
24870            self.config.accept.as_deref(),
24871        )?
24872        .with_authentication(&theScheme)?;
24873
24874        let theRequest =
24875            crate::v1_1_4::request::git_get_blob::hyper_request(theBuilder)?;
24876
24877        ::log::debug!("HTTP request: {:?}", &theRequest);
24878
24879        let theResponse = self.client.request(theRequest).await?;
24880
24881        ::log::debug!("HTTP response: {:?}", &theResponse);
24882
24883        Ok(theResponse)
24884    }
24885
24886    /// Create a commit
24887    /// 
24888    /// Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects).
24889    /// 
24890    /// **Signature verification object**
24891    /// 
24892    /// 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:
24893    /// 
24894    /// | Name | Type | Description |
24895    /// | ---- | ---- | ----------- |
24896    /// | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
24897    /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. |
24898    /// | `signature` | `string` | The signature that was extracted from the commit. |
24899    /// | `payload` | `string` | The value that was signed. |
24900    /// 
24901    /// These are the possible values for `reason` in the `verification` object:
24902    /// 
24903    /// | Value | Description |
24904    /// | ----- | ----------- |
24905    /// | `expired_key` | The key that made the signature is expired. |
24906    /// | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
24907    /// | `gpgverify_error` | There was an error communicating with the signature verification service. |
24908    /// | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
24909    /// | `unsigned` | The object does not include a signature. |
24910    /// | `unknown_signature_type` | A non-PGP signature was found in the commit. |
24911    /// | `no_user` | No user was associated with the `committer` email address in the commit. |
24912    /// | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
24913    /// | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
24914    /// | `unknown_key` | The key that made the signature has not been registered with any user's account. |
24915    /// | `malformed_signature` | There was an error parsing the signature. |
24916    /// | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
24917    /// | `valid` | None of the above errors applied, so the signature is considered to be verified. |
24918    /// 
24919    /// [API method documentation](https://docs.github.com/rest/reference/git#create-a-commit)
24920    ///
24921    /// # Content
24922    ///
24923    /// - [`&v1_1_4::request::git_create_commit::body::Json`](crate::v1_1_4::request::git_create_commit::body::Json)
24924    pub async fn git_create_commit<Content>(
24925        &self,
24926        owner: &str,
24927        repo: &str,
24928        theContent: Content,
24929    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
24930    where
24931        Content: Copy + TryInto<crate::v1_1_4::request::git_create_commit::Content<::hyper::Body>>,
24932        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::git_create_commit::Content<::hyper::Body>>>::Error>
24933    {
24934        let mut theScheme = AuthScheme::from(&self.config.authentication);
24935
24936        while let Some(auth_step) = theScheme.step()? {
24937            match auth_step {
24938                ::authentic::AuthenticationStep::Request(auth_request) => {
24939                    theScheme.respond(self.client.request(auth_request).await);
24940                }
24941                ::authentic::AuthenticationStep::WaitFor(duration) => {
24942                    (self.sleep)(duration).await;
24943                }
24944            }
24945        }
24946        let theBuilder = crate::v1_1_4::request::git_create_commit::http_builder(
24947            self.config.base_url.as_ref(),
24948            owner,
24949            repo,
24950            self.config.user_agent.as_ref(),
24951            self.config.accept.as_deref(),
24952        )?
24953        .with_authentication(&theScheme)?;
24954
24955        let theRequest = crate::v1_1_4::request::git_create_commit::hyper_request(
24956            theBuilder,
24957            theContent.try_into()?,
24958        )?;
24959
24960        ::log::debug!("HTTP request: {:?}", &theRequest);
24961
24962        let theResponse = self.client.request(theRequest).await?;
24963
24964        ::log::debug!("HTTP response: {:?}", &theResponse);
24965
24966        Ok(theResponse)
24967    }
24968
24969    /// Get a commit
24970    /// 
24971    /// Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects).
24972    /// 
24973    /// **Signature verification object**
24974    /// 
24975    /// 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:
24976    /// 
24977    /// | Name | Type | Description |
24978    /// | ---- | ---- | ----------- |
24979    /// | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
24980    /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. |
24981    /// | `signature` | `string` | The signature that was extracted from the commit. |
24982    /// | `payload` | `string` | The value that was signed. |
24983    /// 
24984    /// These are the possible values for `reason` in the `verification` object:
24985    /// 
24986    /// | Value | Description |
24987    /// | ----- | ----------- |
24988    /// | `expired_key` | The key that made the signature is expired. |
24989    /// | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
24990    /// | `gpgverify_error` | There was an error communicating with the signature verification service. |
24991    /// | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
24992    /// | `unsigned` | The object does not include a signature. |
24993    /// | `unknown_signature_type` | A non-PGP signature was found in the commit. |
24994    /// | `no_user` | No user was associated with the `committer` email address in the commit. |
24995    /// | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
24996    /// | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
24997    /// | `unknown_key` | The key that made the signature has not been registered with any user's account. |
24998    /// | `malformed_signature` | There was an error parsing the signature. |
24999    /// | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
25000    /// | `valid` | None of the above errors applied, so the signature is considered to be verified. |
25001    /// 
25002    /// [API method documentation](https://docs.github.com/rest/reference/git#get-a-commit)
25003    pub async fn git_get_commit(
25004        &self,
25005        owner: &str,
25006        repo: &str,
25007        commit_sha: &str,
25008    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
25009        let mut theScheme = AuthScheme::from(&self.config.authentication);
25010
25011        while let Some(auth_step) = theScheme.step()? {
25012            match auth_step {
25013                ::authentic::AuthenticationStep::Request(auth_request) => {
25014                    theScheme.respond(self.client.request(auth_request).await);
25015                }
25016                ::authentic::AuthenticationStep::WaitFor(duration) => {
25017                    (self.sleep)(duration).await;
25018                }
25019            }
25020        }
25021        let theBuilder = crate::v1_1_4::request::git_get_commit::http_builder(
25022            self.config.base_url.as_ref(),
25023            owner,
25024            repo,
25025            commit_sha,
25026            self.config.user_agent.as_ref(),
25027            self.config.accept.as_deref(),
25028        )?
25029        .with_authentication(&theScheme)?;
25030
25031        let theRequest =
25032            crate::v1_1_4::request::git_get_commit::hyper_request(theBuilder)?;
25033
25034        ::log::debug!("HTTP request: {:?}", &theRequest);
25035
25036        let theResponse = self.client.request(theRequest).await?;
25037
25038        ::log::debug!("HTTP response: {:?}", &theResponse);
25039
25040        Ok(theResponse)
25041    }
25042
25043    /// List matching references
25044    /// 
25045    /// Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array.
25046    /// 
25047    /// When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`.
25048    /// 
25049    /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".
25050    /// 
25051    /// If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`.
25052    /// 
25053    /// [API method documentation](https://docs.github.com/rest/reference/git#list-matching-references)
25054    pub async fn git_list_matching_refs(
25055        &self,
25056        owner: &str,
25057        repo: &str,
25058        r#ref: &str,
25059        per_page: ::std::option::Option<i64>,
25060        page: ::std::option::Option<i64>,
25061    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
25062        let mut theScheme = AuthScheme::from(&self.config.authentication);
25063
25064        while let Some(auth_step) = theScheme.step()? {
25065            match auth_step {
25066                ::authentic::AuthenticationStep::Request(auth_request) => {
25067                    theScheme.respond(self.client.request(auth_request).await);
25068                }
25069                ::authentic::AuthenticationStep::WaitFor(duration) => {
25070                    (self.sleep)(duration).await;
25071                }
25072            }
25073        }
25074        let theBuilder = crate::v1_1_4::request::git_list_matching_refs::http_builder(
25075            self.config.base_url.as_ref(),
25076            owner,
25077            repo,
25078            r#ref,
25079            per_page,
25080            page,
25081            self.config.user_agent.as_ref(),
25082            self.config.accept.as_deref(),
25083        )?
25084        .with_authentication(&theScheme)?;
25085
25086        let theRequest =
25087            crate::v1_1_4::request::git_list_matching_refs::hyper_request(theBuilder)?;
25088
25089        ::log::debug!("HTTP request: {:?}", &theRequest);
25090
25091        let theResponse = self.client.request(theRequest).await?;
25092
25093        ::log::debug!("HTTP response: {:?}", &theResponse);
25094
25095        Ok(theResponse)
25096    }
25097
25098    /// Get a reference
25099    /// 
25100    /// Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/<branch name>` for branches and `tags/<tag name>` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned.
25101    /// 
25102    /// **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".
25103    /// 
25104    /// [API method documentation](https://docs.github.com/rest/reference/git#get-a-reference)
25105    pub async fn git_get_ref(
25106        &self,
25107        owner: &str,
25108        repo: &str,
25109        r#ref: &str,
25110    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
25111        let mut theScheme = AuthScheme::from(&self.config.authentication);
25112
25113        while let Some(auth_step) = theScheme.step()? {
25114            match auth_step {
25115                ::authentic::AuthenticationStep::Request(auth_request) => {
25116                    theScheme.respond(self.client.request(auth_request).await);
25117                }
25118                ::authentic::AuthenticationStep::WaitFor(duration) => {
25119                    (self.sleep)(duration).await;
25120                }
25121            }
25122        }
25123        let theBuilder = crate::v1_1_4::request::git_get_ref::http_builder(
25124            self.config.base_url.as_ref(),
25125            owner,
25126            repo,
25127            r#ref,
25128            self.config.user_agent.as_ref(),
25129            self.config.accept.as_deref(),
25130        )?
25131        .with_authentication(&theScheme)?;
25132
25133        let theRequest =
25134            crate::v1_1_4::request::git_get_ref::hyper_request(theBuilder)?;
25135
25136        ::log::debug!("HTTP request: {:?}", &theRequest);
25137
25138        let theResponse = self.client.request(theRequest).await?;
25139
25140        ::log::debug!("HTTP response: {:?}", &theResponse);
25141
25142        Ok(theResponse)
25143    }
25144
25145    /// Create a reference
25146    /// 
25147    /// Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches.
25148    /// 
25149    /// [API method documentation](https://docs.github.com/rest/reference/git#create-a-reference)
25150    ///
25151    /// # Content
25152    ///
25153    /// - [`&v1_1_4::request::git_create_ref::body::Json`](crate::v1_1_4::request::git_create_ref::body::Json)
25154    pub async fn git_create_ref<Content>(
25155        &self,
25156        owner: &str,
25157        repo: &str,
25158        theContent: Content,
25159    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
25160    where
25161        Content: Copy + TryInto<crate::v1_1_4::request::git_create_ref::Content<::hyper::Body>>,
25162        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::git_create_ref::Content<::hyper::Body>>>::Error>
25163    {
25164        let mut theScheme = AuthScheme::from(&self.config.authentication);
25165
25166        while let Some(auth_step) = theScheme.step()? {
25167            match auth_step {
25168                ::authentic::AuthenticationStep::Request(auth_request) => {
25169                    theScheme.respond(self.client.request(auth_request).await);
25170                }
25171                ::authentic::AuthenticationStep::WaitFor(duration) => {
25172                    (self.sleep)(duration).await;
25173                }
25174            }
25175        }
25176        let theBuilder = crate::v1_1_4::request::git_create_ref::http_builder(
25177            self.config.base_url.as_ref(),
25178            owner,
25179            repo,
25180            self.config.user_agent.as_ref(),
25181            self.config.accept.as_deref(),
25182        )?
25183        .with_authentication(&theScheme)?;
25184
25185        let theRequest = crate::v1_1_4::request::git_create_ref::hyper_request(
25186            theBuilder,
25187            theContent.try_into()?,
25188        )?;
25189
25190        ::log::debug!("HTTP request: {:?}", &theRequest);
25191
25192        let theResponse = self.client.request(theRequest).await?;
25193
25194        ::log::debug!("HTTP response: {:?}", &theResponse);
25195
25196        Ok(theResponse)
25197    }
25198
25199    /// Delete a reference
25200    /// 
25201    /// [API method documentation](https://docs.github.com/rest/reference/git#delete-a-reference)
25202    pub async fn git_delete_ref(
25203        &self,
25204        owner: &str,
25205        repo: &str,
25206        r#ref: &str,
25207    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
25208        let mut theScheme = AuthScheme::from(&self.config.authentication);
25209
25210        while let Some(auth_step) = theScheme.step()? {
25211            match auth_step {
25212                ::authentic::AuthenticationStep::Request(auth_request) => {
25213                    theScheme.respond(self.client.request(auth_request).await);
25214                }
25215                ::authentic::AuthenticationStep::WaitFor(duration) => {
25216                    (self.sleep)(duration).await;
25217                }
25218            }
25219        }
25220        let theBuilder = crate::v1_1_4::request::git_delete_ref::http_builder(
25221            self.config.base_url.as_ref(),
25222            owner,
25223            repo,
25224            r#ref,
25225            self.config.user_agent.as_ref(),
25226            self.config.accept.as_deref(),
25227        )?
25228        .with_authentication(&theScheme)?;
25229
25230        let theRequest =
25231            crate::v1_1_4::request::git_delete_ref::hyper_request(theBuilder)?;
25232
25233        ::log::debug!("HTTP request: {:?}", &theRequest);
25234
25235        let theResponse = self.client.request(theRequest).await?;
25236
25237        ::log::debug!("HTTP response: {:?}", &theResponse);
25238
25239        Ok(theResponse)
25240    }
25241
25242    /// Update a reference
25243    /// 
25244    /// [API method documentation](https://docs.github.com/rest/reference/git#update-a-reference)
25245    ///
25246    /// # Content
25247    ///
25248    /// - [`&v1_1_4::request::git_update_ref::body::Json`](crate::v1_1_4::request::git_update_ref::body::Json)
25249    pub async fn git_update_ref<Content>(
25250        &self,
25251        owner: &str,
25252        repo: &str,
25253        r#ref: &str,
25254        theContent: Content,
25255    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
25256    where
25257        Content: Copy + TryInto<crate::v1_1_4::request::git_update_ref::Content<::hyper::Body>>,
25258        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::git_update_ref::Content<::hyper::Body>>>::Error>
25259    {
25260        let mut theScheme = AuthScheme::from(&self.config.authentication);
25261
25262        while let Some(auth_step) = theScheme.step()? {
25263            match auth_step {
25264                ::authentic::AuthenticationStep::Request(auth_request) => {
25265                    theScheme.respond(self.client.request(auth_request).await);
25266                }
25267                ::authentic::AuthenticationStep::WaitFor(duration) => {
25268                    (self.sleep)(duration).await;
25269                }
25270            }
25271        }
25272        let theBuilder = crate::v1_1_4::request::git_update_ref::http_builder(
25273            self.config.base_url.as_ref(),
25274            owner,
25275            repo,
25276            r#ref,
25277            self.config.user_agent.as_ref(),
25278            self.config.accept.as_deref(),
25279        )?
25280        .with_authentication(&theScheme)?;
25281
25282        let theRequest = crate::v1_1_4::request::git_update_ref::hyper_request(
25283            theBuilder,
25284            theContent.try_into()?,
25285        )?;
25286
25287        ::log::debug!("HTTP request: {:?}", &theRequest);
25288
25289        let theResponse = self.client.request(theRequest).await?;
25290
25291        ::log::debug!("HTTP response: {:?}", &theResponse);
25292
25293        Ok(theResponse)
25294    }
25295
25296    /// Create a tag object
25297    /// 
25298    /// 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/rest/reference/git#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/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary.
25299    /// 
25300    /// **Signature verification object**
25301    /// 
25302    /// 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:
25303    /// 
25304    /// | Name | Type | Description |
25305    /// | ---- | ---- | ----------- |
25306    /// | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
25307    /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
25308    /// | `signature` | `string` | The signature that was extracted from the commit. |
25309    /// | `payload` | `string` | The value that was signed. |
25310    /// 
25311    /// These are the possible values for `reason` in the `verification` object:
25312    /// 
25313    /// | Value | Description |
25314    /// | ----- | ----------- |
25315    /// | `expired_key` | The key that made the signature is expired. |
25316    /// | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
25317    /// | `gpgverify_error` | There was an error communicating with the signature verification service. |
25318    /// | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
25319    /// | `unsigned` | The object does not include a signature. |
25320    /// | `unknown_signature_type` | A non-PGP signature was found in the commit. |
25321    /// | `no_user` | No user was associated with the `committer` email address in the commit. |
25322    /// | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
25323    /// | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
25324    /// | `unknown_key` | The key that made the signature has not been registered with any user's account. |
25325    /// | `malformed_signature` | There was an error parsing the signature. |
25326    /// | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
25327    /// | `valid` | None of the above errors applied, so the signature is considered to be verified. |
25328    /// 
25329    /// [API method documentation](https://docs.github.com/rest/reference/git#create-a-tag-object)
25330    ///
25331    /// # Content
25332    ///
25333    /// - [`&v1_1_4::request::git_create_tag::body::Json`](crate::v1_1_4::request::git_create_tag::body::Json)
25334    pub async fn git_create_tag<Content>(
25335        &self,
25336        owner: &str,
25337        repo: &str,
25338        theContent: Content,
25339    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
25340    where
25341        Content: Copy + TryInto<crate::v1_1_4::request::git_create_tag::Content<::hyper::Body>>,
25342        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::git_create_tag::Content<::hyper::Body>>>::Error>
25343    {
25344        let mut theScheme = AuthScheme::from(&self.config.authentication);
25345
25346        while let Some(auth_step) = theScheme.step()? {
25347            match auth_step {
25348                ::authentic::AuthenticationStep::Request(auth_request) => {
25349                    theScheme.respond(self.client.request(auth_request).await);
25350                }
25351                ::authentic::AuthenticationStep::WaitFor(duration) => {
25352                    (self.sleep)(duration).await;
25353                }
25354            }
25355        }
25356        let theBuilder = crate::v1_1_4::request::git_create_tag::http_builder(
25357            self.config.base_url.as_ref(),
25358            owner,
25359            repo,
25360            self.config.user_agent.as_ref(),
25361            self.config.accept.as_deref(),
25362        )?
25363        .with_authentication(&theScheme)?;
25364
25365        let theRequest = crate::v1_1_4::request::git_create_tag::hyper_request(
25366            theBuilder,
25367            theContent.try_into()?,
25368        )?;
25369
25370        ::log::debug!("HTTP request: {:?}", &theRequest);
25371
25372        let theResponse = self.client.request(theRequest).await?;
25373
25374        ::log::debug!("HTTP response: {:?}", &theResponse);
25375
25376        Ok(theResponse)
25377    }
25378
25379    /// Get a tag
25380    /// 
25381    /// **Signature verification object**
25382    /// 
25383    /// 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:
25384    /// 
25385    /// | Name | Type | Description |
25386    /// | ---- | ---- | ----------- |
25387    /// | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. |
25388    /// | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. |
25389    /// | `signature` | `string` | The signature that was extracted from the commit. |
25390    /// | `payload` | `string` | The value that was signed. |
25391    /// 
25392    /// These are the possible values for `reason` in the `verification` object:
25393    /// 
25394    /// | Value | Description |
25395    /// | ----- | ----------- |
25396    /// | `expired_key` | The key that made the signature is expired. |
25397    /// | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. |
25398    /// | `gpgverify_error` | There was an error communicating with the signature verification service. |
25399    /// | `gpgverify_unavailable` | The signature verification service is currently unavailable. |
25400    /// | `unsigned` | The object does not include a signature. |
25401    /// | `unknown_signature_type` | A non-PGP signature was found in the commit. |
25402    /// | `no_user` | No user was associated with the `committer` email address in the commit. |
25403    /// | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
25404    /// | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. |
25405    /// | `unknown_key` | The key that made the signature has not been registered with any user's account. |
25406    /// | `malformed_signature` | There was an error parsing the signature. |
25407    /// | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. |
25408    /// | `valid` | None of the above errors applied, so the signature is considered to be verified. |
25409    /// 
25410    /// [API method documentation](https://docs.github.com/rest/reference/git#get-a-tag)
25411    pub async fn git_get_tag(
25412        &self,
25413        owner: &str,
25414        repo: &str,
25415        tag_sha: &str,
25416    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
25417        let mut theScheme = AuthScheme::from(&self.config.authentication);
25418
25419        while let Some(auth_step) = theScheme.step()? {
25420            match auth_step {
25421                ::authentic::AuthenticationStep::Request(auth_request) => {
25422                    theScheme.respond(self.client.request(auth_request).await);
25423                }
25424                ::authentic::AuthenticationStep::WaitFor(duration) => {
25425                    (self.sleep)(duration).await;
25426                }
25427            }
25428        }
25429        let theBuilder = crate::v1_1_4::request::git_get_tag::http_builder(
25430            self.config.base_url.as_ref(),
25431            owner,
25432            repo,
25433            tag_sha,
25434            self.config.user_agent.as_ref(),
25435            self.config.accept.as_deref(),
25436        )?
25437        .with_authentication(&theScheme)?;
25438
25439        let theRequest =
25440            crate::v1_1_4::request::git_get_tag::hyper_request(theBuilder)?;
25441
25442        ::log::debug!("HTTP request: {:?}", &theRequest);
25443
25444        let theResponse = self.client.request(theRequest).await?;
25445
25446        ::log::debug!("HTTP response: {:?}", &theResponse);
25447
25448        Ok(theResponse)
25449    }
25450
25451    /// Create a tree
25452    /// 
25453    /// The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure.
25454    /// 
25455    /// If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)."
25456    /// 
25457    /// [API method documentation](https://docs.github.com/rest/reference/git#create-a-tree)
25458    ///
25459    /// # Content
25460    ///
25461    /// - [`&v1_1_4::request::git_create_tree::body::Json`](crate::v1_1_4::request::git_create_tree::body::Json)
25462    pub async fn git_create_tree<Content>(
25463        &self,
25464        owner: &str,
25465        repo: &str,
25466        theContent: Content,
25467    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
25468    where
25469        Content: Copy + TryInto<crate::v1_1_4::request::git_create_tree::Content<::hyper::Body>>,
25470        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::git_create_tree::Content<::hyper::Body>>>::Error>
25471    {
25472        let mut theScheme = AuthScheme::from(&self.config.authentication);
25473
25474        while let Some(auth_step) = theScheme.step()? {
25475            match auth_step {
25476                ::authentic::AuthenticationStep::Request(auth_request) => {
25477                    theScheme.respond(self.client.request(auth_request).await);
25478                }
25479                ::authentic::AuthenticationStep::WaitFor(duration) => {
25480                    (self.sleep)(duration).await;
25481                }
25482            }
25483        }
25484        let theBuilder = crate::v1_1_4::request::git_create_tree::http_builder(
25485            self.config.base_url.as_ref(),
25486            owner,
25487            repo,
25488            self.config.user_agent.as_ref(),
25489            self.config.accept.as_deref(),
25490        )?
25491        .with_authentication(&theScheme)?;
25492
25493        let theRequest = crate::v1_1_4::request::git_create_tree::hyper_request(
25494            theBuilder,
25495            theContent.try_into()?,
25496        )?;
25497
25498        ::log::debug!("HTTP request: {:?}", &theRequest);
25499
25500        let theResponse = self.client.request(theRequest).await?;
25501
25502        ::log::debug!("HTTP response: {:?}", &theResponse);
25503
25504        Ok(theResponse)
25505    }
25506
25507    /// Get a tree
25508    /// 
25509    /// Returns a single tree using the SHA1 value for that tree.
25510    /// 
25511    /// If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.
25512    /// 
25513    /// [API method documentation](https://docs.github.com/rest/reference/git#get-a-tree)
25514    pub async fn git_get_tree(
25515        &self,
25516        owner: &str,
25517        repo: &str,
25518        tree_sha: &str,
25519        recursive: ::std::option::Option<&str>,
25520    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
25521        let mut theScheme = AuthScheme::from(&self.config.authentication);
25522
25523        while let Some(auth_step) = theScheme.step()? {
25524            match auth_step {
25525                ::authentic::AuthenticationStep::Request(auth_request) => {
25526                    theScheme.respond(self.client.request(auth_request).await);
25527                }
25528                ::authentic::AuthenticationStep::WaitFor(duration) => {
25529                    (self.sleep)(duration).await;
25530                }
25531            }
25532        }
25533        let theBuilder = crate::v1_1_4::request::git_get_tree::http_builder(
25534            self.config.base_url.as_ref(),
25535            owner,
25536            repo,
25537            tree_sha,
25538            recursive,
25539            self.config.user_agent.as_ref(),
25540            self.config.accept.as_deref(),
25541        )?
25542        .with_authentication(&theScheme)?;
25543
25544        let theRequest =
25545            crate::v1_1_4::request::git_get_tree::hyper_request(theBuilder)?;
25546
25547        ::log::debug!("HTTP request: {:?}", &theRequest);
25548
25549        let theResponse = self.client.request(theRequest).await?;
25550
25551        ::log::debug!("HTTP response: {:?}", &theResponse);
25552
25553        Ok(theResponse)
25554    }
25555
25556    /// List repository webhooks
25557    /// 
25558    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-repository-webhooks)
25559    pub async fn repos_list_webhooks(
25560        &self,
25561        owner: &str,
25562        repo: &str,
25563        per_page: ::std::option::Option<i64>,
25564        page: ::std::option::Option<i64>,
25565    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
25566        let mut theScheme = AuthScheme::from(&self.config.authentication);
25567
25568        while let Some(auth_step) = theScheme.step()? {
25569            match auth_step {
25570                ::authentic::AuthenticationStep::Request(auth_request) => {
25571                    theScheme.respond(self.client.request(auth_request).await);
25572                }
25573                ::authentic::AuthenticationStep::WaitFor(duration) => {
25574                    (self.sleep)(duration).await;
25575                }
25576            }
25577        }
25578        let theBuilder = crate::v1_1_4::request::repos_list_webhooks::http_builder(
25579            self.config.base_url.as_ref(),
25580            owner,
25581            repo,
25582            per_page,
25583            page,
25584            self.config.user_agent.as_ref(),
25585            self.config.accept.as_deref(),
25586        )?
25587        .with_authentication(&theScheme)?;
25588
25589        let theRequest =
25590            crate::v1_1_4::request::repos_list_webhooks::hyper_request(theBuilder)?;
25591
25592        ::log::debug!("HTTP request: {:?}", &theRequest);
25593
25594        let theResponse = self.client.request(theRequest).await?;
25595
25596        ::log::debug!("HTTP response: {:?}", &theResponse);
25597
25598        Ok(theResponse)
25599    }
25600
25601    /// Create a repository webhook
25602    /// 
25603    /// Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can
25604    /// share the same `config` as long as those webhooks do not have any `events` that overlap.
25605    /// 
25606    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-a-repository-webhook)
25607    ///
25608    /// # Content
25609    ///
25610    /// - [`&::std::option::Option<crate::v1_1_4::request::repos_create_webhook::body::Json>`](crate::v1_1_4::request::repos_create_webhook::body::Json)
25611    pub async fn repos_create_webhook<Content>(
25612        &self,
25613        owner: &str,
25614        repo: &str,
25615        theContent: Content,
25616    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
25617    where
25618        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_webhook::Content<::hyper::Body>>,
25619        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_webhook::Content<::hyper::Body>>>::Error>
25620    {
25621        let mut theScheme = AuthScheme::from(&self.config.authentication);
25622
25623        while let Some(auth_step) = theScheme.step()? {
25624            match auth_step {
25625                ::authentic::AuthenticationStep::Request(auth_request) => {
25626                    theScheme.respond(self.client.request(auth_request).await);
25627                }
25628                ::authentic::AuthenticationStep::WaitFor(duration) => {
25629                    (self.sleep)(duration).await;
25630                }
25631            }
25632        }
25633        let theBuilder = crate::v1_1_4::request::repos_create_webhook::http_builder(
25634            self.config.base_url.as_ref(),
25635            owner,
25636            repo,
25637            self.config.user_agent.as_ref(),
25638            self.config.accept.as_deref(),
25639        )?
25640        .with_authentication(&theScheme)?;
25641
25642        let theRequest = crate::v1_1_4::request::repos_create_webhook::hyper_request(
25643            theBuilder,
25644            theContent.try_into()?,
25645        )?;
25646
25647        ::log::debug!("HTTP request: {:?}", &theRequest);
25648
25649        let theResponse = self.client.request(theRequest).await?;
25650
25651        ::log::debug!("HTTP response: {:?}", &theResponse);
25652
25653        Ok(theResponse)
25654    }
25655
25656    /// Get a repository webhook
25657    /// 
25658    /// Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)."
25659    /// 
25660    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-repository-webhook)
25661    pub async fn repos_get_webhook(
25662        &self,
25663        owner: &str,
25664        repo: &str,
25665        hook_id: i64,
25666    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
25667        let mut theScheme = AuthScheme::from(&self.config.authentication);
25668
25669        while let Some(auth_step) = theScheme.step()? {
25670            match auth_step {
25671                ::authentic::AuthenticationStep::Request(auth_request) => {
25672                    theScheme.respond(self.client.request(auth_request).await);
25673                }
25674                ::authentic::AuthenticationStep::WaitFor(duration) => {
25675                    (self.sleep)(duration).await;
25676                }
25677            }
25678        }
25679        let theBuilder = crate::v1_1_4::request::repos_get_webhook::http_builder(
25680            self.config.base_url.as_ref(),
25681            owner,
25682            repo,
25683            hook_id,
25684            self.config.user_agent.as_ref(),
25685            self.config.accept.as_deref(),
25686        )?
25687        .with_authentication(&theScheme)?;
25688
25689        let theRequest =
25690            crate::v1_1_4::request::repos_get_webhook::hyper_request(theBuilder)?;
25691
25692        ::log::debug!("HTTP request: {:?}", &theRequest);
25693
25694        let theResponse = self.client.request(theRequest).await?;
25695
25696        ::log::debug!("HTTP response: {:?}", &theResponse);
25697
25698        Ok(theResponse)
25699    }
25700
25701    /// Delete a repository webhook
25702    /// 
25703    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-a-repository-webhook)
25704    pub async fn repos_delete_webhook(
25705        &self,
25706        owner: &str,
25707        repo: &str,
25708        hook_id: i64,
25709    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
25710        let mut theScheme = AuthScheme::from(&self.config.authentication);
25711
25712        while let Some(auth_step) = theScheme.step()? {
25713            match auth_step {
25714                ::authentic::AuthenticationStep::Request(auth_request) => {
25715                    theScheme.respond(self.client.request(auth_request).await);
25716                }
25717                ::authentic::AuthenticationStep::WaitFor(duration) => {
25718                    (self.sleep)(duration).await;
25719                }
25720            }
25721        }
25722        let theBuilder = crate::v1_1_4::request::repos_delete_webhook::http_builder(
25723            self.config.base_url.as_ref(),
25724            owner,
25725            repo,
25726            hook_id,
25727            self.config.user_agent.as_ref(),
25728            self.config.accept.as_deref(),
25729        )?
25730        .with_authentication(&theScheme)?;
25731
25732        let theRequest =
25733            crate::v1_1_4::request::repos_delete_webhook::hyper_request(theBuilder)?;
25734
25735        ::log::debug!("HTTP request: {:?}", &theRequest);
25736
25737        let theResponse = self.client.request(theRequest).await?;
25738
25739        ::log::debug!("HTTP response: {:?}", &theResponse);
25740
25741        Ok(theResponse)
25742    }
25743
25744    /// Update a repository webhook
25745    /// 
25746    /// Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)."
25747    /// 
25748    /// [API method documentation](https://docs.github.com/rest/reference/repos#update-a-repository-webhook)
25749    ///
25750    /// # Content
25751    ///
25752    /// - [`&v1_1_4::request::repos_update_webhook::body::Json`](crate::v1_1_4::request::repos_update_webhook::body::Json)
25753    pub async fn repos_update_webhook<Content>(
25754        &self,
25755        owner: &str,
25756        repo: &str,
25757        hook_id: i64,
25758        theContent: Content,
25759    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
25760    where
25761        Content: Copy + TryInto<crate::v1_1_4::request::repos_update_webhook::Content<::hyper::Body>>,
25762        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_update_webhook::Content<::hyper::Body>>>::Error>
25763    {
25764        let mut theScheme = AuthScheme::from(&self.config.authentication);
25765
25766        while let Some(auth_step) = theScheme.step()? {
25767            match auth_step {
25768                ::authentic::AuthenticationStep::Request(auth_request) => {
25769                    theScheme.respond(self.client.request(auth_request).await);
25770                }
25771                ::authentic::AuthenticationStep::WaitFor(duration) => {
25772                    (self.sleep)(duration).await;
25773                }
25774            }
25775        }
25776        let theBuilder = crate::v1_1_4::request::repos_update_webhook::http_builder(
25777            self.config.base_url.as_ref(),
25778            owner,
25779            repo,
25780            hook_id,
25781            self.config.user_agent.as_ref(),
25782            self.config.accept.as_deref(),
25783        )?
25784        .with_authentication(&theScheme)?;
25785
25786        let theRequest = crate::v1_1_4::request::repos_update_webhook::hyper_request(
25787            theBuilder,
25788            theContent.try_into()?,
25789        )?;
25790
25791        ::log::debug!("HTTP request: {:?}", &theRequest);
25792
25793        let theResponse = self.client.request(theRequest).await?;
25794
25795        ::log::debug!("HTTP response: {:?}", &theResponse);
25796
25797        Ok(theResponse)
25798    }
25799
25800    /// Get a webhook configuration for a repository
25801    /// 
25802    /// Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)."
25803    /// 
25804    /// Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission.
25805    /// 
25806    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-webhook-configuration-for-a-repository)
25807    pub async fn repos_get_webhook_config_for_repo(
25808        &self,
25809        owner: &str,
25810        repo: &str,
25811        hook_id: i64,
25812    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
25813        let mut theScheme = AuthScheme::from(&self.config.authentication);
25814
25815        while let Some(auth_step) = theScheme.step()? {
25816            match auth_step {
25817                ::authentic::AuthenticationStep::Request(auth_request) => {
25818                    theScheme.respond(self.client.request(auth_request).await);
25819                }
25820                ::authentic::AuthenticationStep::WaitFor(duration) => {
25821                    (self.sleep)(duration).await;
25822                }
25823            }
25824        }
25825        let theBuilder = crate::v1_1_4::request::repos_get_webhook_config_for_repo::http_builder(
25826            self.config.base_url.as_ref(),
25827            owner,
25828            repo,
25829            hook_id,
25830            self.config.user_agent.as_ref(),
25831            self.config.accept.as_deref(),
25832        )?
25833        .with_authentication(&theScheme)?;
25834
25835        let theRequest =
25836            crate::v1_1_4::request::repos_get_webhook_config_for_repo::hyper_request(theBuilder)?;
25837
25838        ::log::debug!("HTTP request: {:?}", &theRequest);
25839
25840        let theResponse = self.client.request(theRequest).await?;
25841
25842        ::log::debug!("HTTP response: {:?}", &theResponse);
25843
25844        Ok(theResponse)
25845    }
25846
25847    /// Update a webhook configuration for a repository
25848    /// 
25849    /// Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)."
25850    /// 
25851    /// Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission.
25852    /// 
25853    /// [API method documentation](https://docs.github.com/rest/reference/repos#update-a-webhook-configuration-for-a-repository)
25854    ///
25855    /// # Content
25856    ///
25857    /// - [`&v1_1_4::request::repos_update_webhook_config_for_repo::body::Json`](crate::v1_1_4::request::repos_update_webhook_config_for_repo::body::Json)
25858    pub async fn repos_update_webhook_config_for_repo<Content>(
25859        &self,
25860        owner: &str,
25861        repo: &str,
25862        hook_id: i64,
25863        theContent: Content,
25864    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
25865    where
25866        Content: Copy + TryInto<crate::v1_1_4::request::repos_update_webhook_config_for_repo::Content<::hyper::Body>>,
25867        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_update_webhook_config_for_repo::Content<::hyper::Body>>>::Error>
25868    {
25869        let mut theScheme = AuthScheme::from(&self.config.authentication);
25870
25871        while let Some(auth_step) = theScheme.step()? {
25872            match auth_step {
25873                ::authentic::AuthenticationStep::Request(auth_request) => {
25874                    theScheme.respond(self.client.request(auth_request).await);
25875                }
25876                ::authentic::AuthenticationStep::WaitFor(duration) => {
25877                    (self.sleep)(duration).await;
25878                }
25879            }
25880        }
25881        let theBuilder = crate::v1_1_4::request::repos_update_webhook_config_for_repo::http_builder(
25882            self.config.base_url.as_ref(),
25883            owner,
25884            repo,
25885            hook_id,
25886            self.config.user_agent.as_ref(),
25887            self.config.accept.as_deref(),
25888        )?
25889        .with_authentication(&theScheme)?;
25890
25891        let theRequest = crate::v1_1_4::request::repos_update_webhook_config_for_repo::hyper_request(
25892            theBuilder,
25893            theContent.try_into()?,
25894        )?;
25895
25896        ::log::debug!("HTTP request: {:?}", &theRequest);
25897
25898        let theResponse = self.client.request(theRequest).await?;
25899
25900        ::log::debug!("HTTP response: {:?}", &theResponse);
25901
25902        Ok(theResponse)
25903    }
25904
25905    /// List deliveries for a repository webhook
25906    /// 
25907    /// Returns a list of webhook deliveries for a webhook configured in a repository.
25908    /// 
25909    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-deliveries-for-a-repository-webhook)
25910    pub async fn repos_list_webhook_deliveries(
25911        &self,
25912        owner: &str,
25913        repo: &str,
25914        hook_id: i64,
25915        per_page: ::std::option::Option<i64>,
25916        cursor: ::std::option::Option<&str>,
25917    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
25918        let mut theScheme = AuthScheme::from(&self.config.authentication);
25919
25920        while let Some(auth_step) = theScheme.step()? {
25921            match auth_step {
25922                ::authentic::AuthenticationStep::Request(auth_request) => {
25923                    theScheme.respond(self.client.request(auth_request).await);
25924                }
25925                ::authentic::AuthenticationStep::WaitFor(duration) => {
25926                    (self.sleep)(duration).await;
25927                }
25928            }
25929        }
25930        let theBuilder = crate::v1_1_4::request::repos_list_webhook_deliveries::http_builder(
25931            self.config.base_url.as_ref(),
25932            owner,
25933            repo,
25934            hook_id,
25935            per_page,
25936            cursor,
25937            self.config.user_agent.as_ref(),
25938            self.config.accept.as_deref(),
25939        )?
25940        .with_authentication(&theScheme)?;
25941
25942        let theRequest =
25943            crate::v1_1_4::request::repos_list_webhook_deliveries::hyper_request(theBuilder)?;
25944
25945        ::log::debug!("HTTP request: {:?}", &theRequest);
25946
25947        let theResponse = self.client.request(theRequest).await?;
25948
25949        ::log::debug!("HTTP response: {:?}", &theResponse);
25950
25951        Ok(theResponse)
25952    }
25953
25954    /// Get a delivery for a repository webhook
25955    /// 
25956    /// Returns a delivery for a webhook configured in a repository.
25957    /// 
25958    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-delivery-for-a-repository-webhook)
25959    pub async fn repos_get_webhook_delivery(
25960        &self,
25961        owner: &str,
25962        repo: &str,
25963        hook_id: i64,
25964        delivery_id: i64,
25965    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
25966        let mut theScheme = AuthScheme::from(&self.config.authentication);
25967
25968        while let Some(auth_step) = theScheme.step()? {
25969            match auth_step {
25970                ::authentic::AuthenticationStep::Request(auth_request) => {
25971                    theScheme.respond(self.client.request(auth_request).await);
25972                }
25973                ::authentic::AuthenticationStep::WaitFor(duration) => {
25974                    (self.sleep)(duration).await;
25975                }
25976            }
25977        }
25978        let theBuilder = crate::v1_1_4::request::repos_get_webhook_delivery::http_builder(
25979            self.config.base_url.as_ref(),
25980            owner,
25981            repo,
25982            hook_id,
25983            delivery_id,
25984            self.config.user_agent.as_ref(),
25985            self.config.accept.as_deref(),
25986        )?
25987        .with_authentication(&theScheme)?;
25988
25989        let theRequest =
25990            crate::v1_1_4::request::repos_get_webhook_delivery::hyper_request(theBuilder)?;
25991
25992        ::log::debug!("HTTP request: {:?}", &theRequest);
25993
25994        let theResponse = self.client.request(theRequest).await?;
25995
25996        ::log::debug!("HTTP response: {:?}", &theResponse);
25997
25998        Ok(theResponse)
25999    }
26000
26001    /// Redeliver a delivery for a repository webhook
26002    /// 
26003    /// Redeliver a webhook delivery for a webhook configured in a repository.
26004    /// 
26005    /// [API method documentation](https://docs.github.com/rest/reference/repos#redeliver-a-delivery-for-a-repository-webhook)
26006    pub async fn repos_redeliver_webhook_delivery(
26007        &self,
26008        owner: &str,
26009        repo: &str,
26010        hook_id: i64,
26011        delivery_id: i64,
26012    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
26013        let mut theScheme = AuthScheme::from(&self.config.authentication);
26014
26015        while let Some(auth_step) = theScheme.step()? {
26016            match auth_step {
26017                ::authentic::AuthenticationStep::Request(auth_request) => {
26018                    theScheme.respond(self.client.request(auth_request).await);
26019                }
26020                ::authentic::AuthenticationStep::WaitFor(duration) => {
26021                    (self.sleep)(duration).await;
26022                }
26023            }
26024        }
26025        let theBuilder = crate::v1_1_4::request::repos_redeliver_webhook_delivery::http_builder(
26026            self.config.base_url.as_ref(),
26027            owner,
26028            repo,
26029            hook_id,
26030            delivery_id,
26031            self.config.user_agent.as_ref(),
26032            self.config.accept.as_deref(),
26033        )?
26034        .with_authentication(&theScheme)?;
26035
26036        let theRequest =
26037            crate::v1_1_4::request::repos_redeliver_webhook_delivery::hyper_request(theBuilder)?;
26038
26039        ::log::debug!("HTTP request: {:?}", &theRequest);
26040
26041        let theResponse = self.client.request(theRequest).await?;
26042
26043        ::log::debug!("HTTP response: {:?}", &theResponse);
26044
26045        Ok(theResponse)
26046    }
26047
26048    /// Ping a repository webhook
26049    /// 
26050    /// This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook.
26051    /// 
26052    /// [API method documentation](https://docs.github.com/rest/reference/repos#ping-a-repository-webhook)
26053    pub async fn repos_ping_webhook(
26054        &self,
26055        owner: &str,
26056        repo: &str,
26057        hook_id: i64,
26058    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
26059        let mut theScheme = AuthScheme::from(&self.config.authentication);
26060
26061        while let Some(auth_step) = theScheme.step()? {
26062            match auth_step {
26063                ::authentic::AuthenticationStep::Request(auth_request) => {
26064                    theScheme.respond(self.client.request(auth_request).await);
26065                }
26066                ::authentic::AuthenticationStep::WaitFor(duration) => {
26067                    (self.sleep)(duration).await;
26068                }
26069            }
26070        }
26071        let theBuilder = crate::v1_1_4::request::repos_ping_webhook::http_builder(
26072            self.config.base_url.as_ref(),
26073            owner,
26074            repo,
26075            hook_id,
26076            self.config.user_agent.as_ref(),
26077            self.config.accept.as_deref(),
26078        )?
26079        .with_authentication(&theScheme)?;
26080
26081        let theRequest =
26082            crate::v1_1_4::request::repos_ping_webhook::hyper_request(theBuilder)?;
26083
26084        ::log::debug!("HTTP request: {:?}", &theRequest);
26085
26086        let theResponse = self.client.request(theRequest).await?;
26087
26088        ::log::debug!("HTTP response: {:?}", &theResponse);
26089
26090        Ok(theResponse)
26091    }
26092
26093    /// Test the push repository webhook
26094    /// 
26095    /// This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated.
26096    /// 
26097    /// **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test`
26098    /// 
26099    /// [API method documentation](https://docs.github.com/rest/reference/repos#test-the-push-repository-webhook)
26100    pub async fn repos_test_push_webhook(
26101        &self,
26102        owner: &str,
26103        repo: &str,
26104        hook_id: i64,
26105    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
26106        let mut theScheme = AuthScheme::from(&self.config.authentication);
26107
26108        while let Some(auth_step) = theScheme.step()? {
26109            match auth_step {
26110                ::authentic::AuthenticationStep::Request(auth_request) => {
26111                    theScheme.respond(self.client.request(auth_request).await);
26112                }
26113                ::authentic::AuthenticationStep::WaitFor(duration) => {
26114                    (self.sleep)(duration).await;
26115                }
26116            }
26117        }
26118        let theBuilder = crate::v1_1_4::request::repos_test_push_webhook::http_builder(
26119            self.config.base_url.as_ref(),
26120            owner,
26121            repo,
26122            hook_id,
26123            self.config.user_agent.as_ref(),
26124            self.config.accept.as_deref(),
26125        )?
26126        .with_authentication(&theScheme)?;
26127
26128        let theRequest =
26129            crate::v1_1_4::request::repos_test_push_webhook::hyper_request(theBuilder)?;
26130
26131        ::log::debug!("HTTP request: {:?}", &theRequest);
26132
26133        let theResponse = self.client.request(theRequest).await?;
26134
26135        ::log::debug!("HTTP response: {:?}", &theResponse);
26136
26137        Ok(theResponse)
26138    }
26139
26140    /// Get an import status
26141    /// 
26142    /// View the progress of an import.
26143    /// 
26144    /// **Import status**
26145    /// 
26146    /// This section includes details about the possible values of the `status` field of the Import Progress response.
26147    /// 
26148    /// An import that does not have errors will progress through these steps:
26149    /// 
26150    /// *   `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL.
26151    /// *   `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import).
26152    /// *   `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information.
26153    /// *   `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects".
26154    /// *   `complete` - the import is complete, and the repository is ready on GitHub.
26155    /// 
26156    /// If there are problems, you will see one of these in the `status` field:
26157    /// 
26158    /// *   `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section.
26159    /// *   `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information.
26160    /// *   `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section.
26161    /// *   `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL.
26162    /// *   `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section.
26163    /// 
26164    /// **The project_choices field**
26165    /// 
26166    /// When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type.
26167    /// 
26168    /// **Git LFS related fields**
26169    /// 
26170    /// This section includes details about Git LFS related fields that may be present in the Import Progress response.
26171    /// 
26172    /// *   `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken.
26173    /// *   `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step.
26174    /// *   `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository.
26175    /// *   `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request.
26176    /// 
26177    /// [API method documentation](https://docs.github.com/rest/reference/migrations#get-an-import-status)
26178    pub async fn migrations_get_import_status(
26179        &self,
26180        owner: &str,
26181        repo: &str,
26182    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
26183        let mut theScheme = AuthScheme::from(&self.config.authentication);
26184
26185        while let Some(auth_step) = theScheme.step()? {
26186            match auth_step {
26187                ::authentic::AuthenticationStep::Request(auth_request) => {
26188                    theScheme.respond(self.client.request(auth_request).await);
26189                }
26190                ::authentic::AuthenticationStep::WaitFor(duration) => {
26191                    (self.sleep)(duration).await;
26192                }
26193            }
26194        }
26195        let theBuilder = crate::v1_1_4::request::migrations_get_import_status::http_builder(
26196            self.config.base_url.as_ref(),
26197            owner,
26198            repo,
26199            self.config.user_agent.as_ref(),
26200            self.config.accept.as_deref(),
26201        )?
26202        .with_authentication(&theScheme)?;
26203
26204        let theRequest =
26205            crate::v1_1_4::request::migrations_get_import_status::hyper_request(theBuilder)?;
26206
26207        ::log::debug!("HTTP request: {:?}", &theRequest);
26208
26209        let theResponse = self.client.request(theRequest).await?;
26210
26211        ::log::debug!("HTTP response: {:?}", &theResponse);
26212
26213        Ok(theResponse)
26214    }
26215
26216    /// Start an import
26217    /// 
26218    /// Start a source import to a GitHub repository using GitHub Importer.
26219    /// 
26220    /// [API method documentation](https://docs.github.com/rest/reference/migrations#start-an-import)
26221    ///
26222    /// # Content
26223    ///
26224    /// - [`&v1_1_4::request::migrations_start_import::body::Json`](crate::v1_1_4::request::migrations_start_import::body::Json)
26225    pub async fn migrations_start_import<Content>(
26226        &self,
26227        owner: &str,
26228        repo: &str,
26229        theContent: Content,
26230    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
26231    where
26232        Content: Copy + TryInto<crate::v1_1_4::request::migrations_start_import::Content<::hyper::Body>>,
26233        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::migrations_start_import::Content<::hyper::Body>>>::Error>
26234    {
26235        let mut theScheme = AuthScheme::from(&self.config.authentication);
26236
26237        while let Some(auth_step) = theScheme.step()? {
26238            match auth_step {
26239                ::authentic::AuthenticationStep::Request(auth_request) => {
26240                    theScheme.respond(self.client.request(auth_request).await);
26241                }
26242                ::authentic::AuthenticationStep::WaitFor(duration) => {
26243                    (self.sleep)(duration).await;
26244                }
26245            }
26246        }
26247        let theBuilder = crate::v1_1_4::request::migrations_start_import::http_builder(
26248            self.config.base_url.as_ref(),
26249            owner,
26250            repo,
26251            self.config.user_agent.as_ref(),
26252            self.config.accept.as_deref(),
26253        )?
26254        .with_authentication(&theScheme)?;
26255
26256        let theRequest = crate::v1_1_4::request::migrations_start_import::hyper_request(
26257            theBuilder,
26258            theContent.try_into()?,
26259        )?;
26260
26261        ::log::debug!("HTTP request: {:?}", &theRequest);
26262
26263        let theResponse = self.client.request(theRequest).await?;
26264
26265        ::log::debug!("HTTP response: {:?}", &theResponse);
26266
26267        Ok(theResponse)
26268    }
26269
26270    /// Cancel an import
26271    /// 
26272    /// Stop an import for a repository.
26273    /// 
26274    /// [API method documentation](https://docs.github.com/rest/reference/migrations#cancel-an-import)
26275    pub async fn migrations_cancel_import(
26276        &self,
26277        owner: &str,
26278        repo: &str,
26279    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
26280        let mut theScheme = AuthScheme::from(&self.config.authentication);
26281
26282        while let Some(auth_step) = theScheme.step()? {
26283            match auth_step {
26284                ::authentic::AuthenticationStep::Request(auth_request) => {
26285                    theScheme.respond(self.client.request(auth_request).await);
26286                }
26287                ::authentic::AuthenticationStep::WaitFor(duration) => {
26288                    (self.sleep)(duration).await;
26289                }
26290            }
26291        }
26292        let theBuilder = crate::v1_1_4::request::migrations_cancel_import::http_builder(
26293            self.config.base_url.as_ref(),
26294            owner,
26295            repo,
26296            self.config.user_agent.as_ref(),
26297            self.config.accept.as_deref(),
26298        )?
26299        .with_authentication(&theScheme)?;
26300
26301        let theRequest =
26302            crate::v1_1_4::request::migrations_cancel_import::hyper_request(theBuilder)?;
26303
26304        ::log::debug!("HTTP request: {:?}", &theRequest);
26305
26306        let theResponse = self.client.request(theRequest).await?;
26307
26308        ::log::debug!("HTTP response: {:?}", &theResponse);
26309
26310        Ok(theResponse)
26311    }
26312
26313    /// Update an import
26314    /// 
26315    /// An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API
26316    /// request. If no parameters are provided, the import will be restarted.
26317    /// 
26318    /// Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will
26319    /// have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array.
26320    /// You can select the project to import by providing one of the objects in the `project_choices` array in the update request.
26321    /// 
26322    /// [API method documentation](https://docs.github.com/rest/reference/migrations#update-an-import)
26323    ///
26324    /// # Content
26325    ///
26326    /// - [`&::std::option::Option<crate::v1_1_4::request::migrations_update_import::body::Json>`](crate::v1_1_4::request::migrations_update_import::body::Json)
26327    pub async fn migrations_update_import<Content>(
26328        &self,
26329        owner: &str,
26330        repo: &str,
26331        theContent: Content,
26332    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
26333    where
26334        Content: Copy + TryInto<crate::v1_1_4::request::migrations_update_import::Content<::hyper::Body>>,
26335        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::migrations_update_import::Content<::hyper::Body>>>::Error>
26336    {
26337        let mut theScheme = AuthScheme::from(&self.config.authentication);
26338
26339        while let Some(auth_step) = theScheme.step()? {
26340            match auth_step {
26341                ::authentic::AuthenticationStep::Request(auth_request) => {
26342                    theScheme.respond(self.client.request(auth_request).await);
26343                }
26344                ::authentic::AuthenticationStep::WaitFor(duration) => {
26345                    (self.sleep)(duration).await;
26346                }
26347            }
26348        }
26349        let theBuilder = crate::v1_1_4::request::migrations_update_import::http_builder(
26350            self.config.base_url.as_ref(),
26351            owner,
26352            repo,
26353            self.config.user_agent.as_ref(),
26354            self.config.accept.as_deref(),
26355        )?
26356        .with_authentication(&theScheme)?;
26357
26358        let theRequest = crate::v1_1_4::request::migrations_update_import::hyper_request(
26359            theBuilder,
26360            theContent.try_into()?,
26361        )?;
26362
26363        ::log::debug!("HTTP request: {:?}", &theRequest);
26364
26365        let theResponse = self.client.request(theRequest).await?;
26366
26367        ::log::debug!("HTTP response: {:?}", &theResponse);
26368
26369        Ok(theResponse)
26370    }
26371
26372    /// Get commit authors
26373    /// 
26374    /// Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot <hubot@12341234-abab-fefe-8787-fedcba987654>`.
26375    /// 
26376    /// This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information.
26377    /// 
26378    /// [API method documentation](https://docs.github.com/rest/reference/migrations#get-commit-authors)
26379    pub async fn migrations_get_commit_authors(
26380        &self,
26381        owner: &str,
26382        repo: &str,
26383        since: ::std::option::Option<i64>,
26384    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
26385        let mut theScheme = AuthScheme::from(&self.config.authentication);
26386
26387        while let Some(auth_step) = theScheme.step()? {
26388            match auth_step {
26389                ::authentic::AuthenticationStep::Request(auth_request) => {
26390                    theScheme.respond(self.client.request(auth_request).await);
26391                }
26392                ::authentic::AuthenticationStep::WaitFor(duration) => {
26393                    (self.sleep)(duration).await;
26394                }
26395            }
26396        }
26397        let theBuilder = crate::v1_1_4::request::migrations_get_commit_authors::http_builder(
26398            self.config.base_url.as_ref(),
26399            owner,
26400            repo,
26401            since,
26402            self.config.user_agent.as_ref(),
26403            self.config.accept.as_deref(),
26404        )?
26405        .with_authentication(&theScheme)?;
26406
26407        let theRequest =
26408            crate::v1_1_4::request::migrations_get_commit_authors::hyper_request(theBuilder)?;
26409
26410        ::log::debug!("HTTP request: {:?}", &theRequest);
26411
26412        let theResponse = self.client.request(theRequest).await?;
26413
26414        ::log::debug!("HTTP response: {:?}", &theResponse);
26415
26416        Ok(theResponse)
26417    }
26418
26419    /// Map a commit author
26420    /// 
26421    /// Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository.
26422    /// 
26423    /// [API method documentation](https://docs.github.com/rest/reference/migrations#map-a-commit-author)
26424    ///
26425    /// # Content
26426    ///
26427    /// - [`&v1_1_4::request::migrations_map_commit_author::body::Json`](crate::v1_1_4::request::migrations_map_commit_author::body::Json)
26428    pub async fn migrations_map_commit_author<Content>(
26429        &self,
26430        owner: &str,
26431        repo: &str,
26432        author_id: i64,
26433        theContent: Content,
26434    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
26435    where
26436        Content: Copy + TryInto<crate::v1_1_4::request::migrations_map_commit_author::Content<::hyper::Body>>,
26437        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::migrations_map_commit_author::Content<::hyper::Body>>>::Error>
26438    {
26439        let mut theScheme = AuthScheme::from(&self.config.authentication);
26440
26441        while let Some(auth_step) = theScheme.step()? {
26442            match auth_step {
26443                ::authentic::AuthenticationStep::Request(auth_request) => {
26444                    theScheme.respond(self.client.request(auth_request).await);
26445                }
26446                ::authentic::AuthenticationStep::WaitFor(duration) => {
26447                    (self.sleep)(duration).await;
26448                }
26449            }
26450        }
26451        let theBuilder = crate::v1_1_4::request::migrations_map_commit_author::http_builder(
26452            self.config.base_url.as_ref(),
26453            owner,
26454            repo,
26455            author_id,
26456            self.config.user_agent.as_ref(),
26457            self.config.accept.as_deref(),
26458        )?
26459        .with_authentication(&theScheme)?;
26460
26461        let theRequest = crate::v1_1_4::request::migrations_map_commit_author::hyper_request(
26462            theBuilder,
26463            theContent.try_into()?,
26464        )?;
26465
26466        ::log::debug!("HTTP request: {:?}", &theRequest);
26467
26468        let theResponse = self.client.request(theRequest).await?;
26469
26470        ::log::debug!("HTTP response: {:?}", &theResponse);
26471
26472        Ok(theResponse)
26473    }
26474
26475    /// Get large files
26476    /// 
26477    /// List files larger than 100MB found during the import
26478    /// 
26479    /// [API method documentation](https://docs.github.com/rest/reference/migrations#get-large-files)
26480    pub async fn migrations_get_large_files(
26481        &self,
26482        owner: &str,
26483        repo: &str,
26484    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
26485        let mut theScheme = AuthScheme::from(&self.config.authentication);
26486
26487        while let Some(auth_step) = theScheme.step()? {
26488            match auth_step {
26489                ::authentic::AuthenticationStep::Request(auth_request) => {
26490                    theScheme.respond(self.client.request(auth_request).await);
26491                }
26492                ::authentic::AuthenticationStep::WaitFor(duration) => {
26493                    (self.sleep)(duration).await;
26494                }
26495            }
26496        }
26497        let theBuilder = crate::v1_1_4::request::migrations_get_large_files::http_builder(
26498            self.config.base_url.as_ref(),
26499            owner,
26500            repo,
26501            self.config.user_agent.as_ref(),
26502            self.config.accept.as_deref(),
26503        )?
26504        .with_authentication(&theScheme)?;
26505
26506        let theRequest =
26507            crate::v1_1_4::request::migrations_get_large_files::hyper_request(theBuilder)?;
26508
26509        ::log::debug!("HTTP request: {:?}", &theRequest);
26510
26511        let theResponse = self.client.request(theRequest).await?;
26512
26513        ::log::debug!("HTTP response: {:?}", &theResponse);
26514
26515        Ok(theResponse)
26516    }
26517
26518    /// Update Git LFS preference
26519    /// 
26520    /// You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/).
26521    /// 
26522    /// [API method documentation](https://docs.github.com/rest/reference/migrations#update-git-lfs-preference)
26523    ///
26524    /// # Content
26525    ///
26526    /// - [`&v1_1_4::request::migrations_set_lfs_preference::body::Json`](crate::v1_1_4::request::migrations_set_lfs_preference::body::Json)
26527    pub async fn migrations_set_lfs_preference<Content>(
26528        &self,
26529        owner: &str,
26530        repo: &str,
26531        theContent: Content,
26532    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
26533    where
26534        Content: Copy + TryInto<crate::v1_1_4::request::migrations_set_lfs_preference::Content<::hyper::Body>>,
26535        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::migrations_set_lfs_preference::Content<::hyper::Body>>>::Error>
26536    {
26537        let mut theScheme = AuthScheme::from(&self.config.authentication);
26538
26539        while let Some(auth_step) = theScheme.step()? {
26540            match auth_step {
26541                ::authentic::AuthenticationStep::Request(auth_request) => {
26542                    theScheme.respond(self.client.request(auth_request).await);
26543                }
26544                ::authentic::AuthenticationStep::WaitFor(duration) => {
26545                    (self.sleep)(duration).await;
26546                }
26547            }
26548        }
26549        let theBuilder = crate::v1_1_4::request::migrations_set_lfs_preference::http_builder(
26550            self.config.base_url.as_ref(),
26551            owner,
26552            repo,
26553            self.config.user_agent.as_ref(),
26554            self.config.accept.as_deref(),
26555        )?
26556        .with_authentication(&theScheme)?;
26557
26558        let theRequest = crate::v1_1_4::request::migrations_set_lfs_preference::hyper_request(
26559            theBuilder,
26560            theContent.try_into()?,
26561        )?;
26562
26563        ::log::debug!("HTTP request: {:?}", &theRequest);
26564
26565        let theResponse = self.client.request(theRequest).await?;
26566
26567        ::log::debug!("HTTP response: {:?}", &theResponse);
26568
26569        Ok(theResponse)
26570    }
26571
26572    /// Get a repository installation for the authenticated app
26573    /// 
26574    /// Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to.
26575    /// 
26576    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
26577    /// 
26578    /// [API method documentation](https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app)
26579    pub async fn apps_get_repo_installation(
26580        &self,
26581        owner: &str,
26582        repo: &str,
26583    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
26584        let mut theScheme = AuthScheme::from(&self.config.authentication);
26585
26586        while let Some(auth_step) = theScheme.step()? {
26587            match auth_step {
26588                ::authentic::AuthenticationStep::Request(auth_request) => {
26589                    theScheme.respond(self.client.request(auth_request).await);
26590                }
26591                ::authentic::AuthenticationStep::WaitFor(duration) => {
26592                    (self.sleep)(duration).await;
26593                }
26594            }
26595        }
26596        let theBuilder = crate::v1_1_4::request::apps_get_repo_installation::http_builder(
26597            self.config.base_url.as_ref(),
26598            owner,
26599            repo,
26600            self.config.user_agent.as_ref(),
26601            self.config.accept.as_deref(),
26602        )?
26603        .with_authentication(&theScheme)?;
26604
26605        let theRequest =
26606            crate::v1_1_4::request::apps_get_repo_installation::hyper_request(theBuilder)?;
26607
26608        ::log::debug!("HTTP request: {:?}", &theRequest);
26609
26610        let theResponse = self.client.request(theRequest).await?;
26611
26612        ::log::debug!("HTTP response: {:?}", &theResponse);
26613
26614        Ok(theResponse)
26615    }
26616
26617    /// Get interaction restrictions for a repository
26618    /// 
26619    /// Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response.
26620    /// 
26621    /// [API method documentation](https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository)
26622    pub async fn interactions_get_restrictions_for_repo(
26623        &self,
26624        owner: &str,
26625        repo: &str,
26626    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
26627        let mut theScheme = AuthScheme::from(&self.config.authentication);
26628
26629        while let Some(auth_step) = theScheme.step()? {
26630            match auth_step {
26631                ::authentic::AuthenticationStep::Request(auth_request) => {
26632                    theScheme.respond(self.client.request(auth_request).await);
26633                }
26634                ::authentic::AuthenticationStep::WaitFor(duration) => {
26635                    (self.sleep)(duration).await;
26636                }
26637            }
26638        }
26639        let theBuilder = crate::v1_1_4::request::interactions_get_restrictions_for_repo::http_builder(
26640            self.config.base_url.as_ref(),
26641            owner,
26642            repo,
26643            self.config.user_agent.as_ref(),
26644            self.config.accept.as_deref(),
26645        )?
26646        .with_authentication(&theScheme)?;
26647
26648        let theRequest =
26649            crate::v1_1_4::request::interactions_get_restrictions_for_repo::hyper_request(theBuilder)?;
26650
26651        ::log::debug!("HTTP request: {:?}", &theRequest);
26652
26653        let theResponse = self.client.request(theRequest).await?;
26654
26655        ::log::debug!("HTTP response: {:?}", &theResponse);
26656
26657        Ok(theResponse)
26658    }
26659
26660    /// Set interaction restrictions for a repository
26661    /// 
26662    /// Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository.
26663    /// 
26664    /// [API method documentation](https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository)
26665    ///
26666    /// # Content
26667    ///
26668    /// - [`&v1_1_4::schema::InteractionLimit`](crate::v1_1_4::schema::InteractionLimit)
26669    pub async fn interactions_set_restrictions_for_repo<Content>(
26670        &self,
26671        owner: &str,
26672        repo: &str,
26673        theContent: Content,
26674    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
26675    where
26676        Content: Copy + TryInto<crate::v1_1_4::request::interactions_set_restrictions_for_repo::Content<::hyper::Body>>,
26677        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::interactions_set_restrictions_for_repo::Content<::hyper::Body>>>::Error>
26678    {
26679        let mut theScheme = AuthScheme::from(&self.config.authentication);
26680
26681        while let Some(auth_step) = theScheme.step()? {
26682            match auth_step {
26683                ::authentic::AuthenticationStep::Request(auth_request) => {
26684                    theScheme.respond(self.client.request(auth_request).await);
26685                }
26686                ::authentic::AuthenticationStep::WaitFor(duration) => {
26687                    (self.sleep)(duration).await;
26688                }
26689            }
26690        }
26691        let theBuilder = crate::v1_1_4::request::interactions_set_restrictions_for_repo::http_builder(
26692            self.config.base_url.as_ref(),
26693            owner,
26694            repo,
26695            self.config.user_agent.as_ref(),
26696            self.config.accept.as_deref(),
26697        )?
26698        .with_authentication(&theScheme)?;
26699
26700        let theRequest = crate::v1_1_4::request::interactions_set_restrictions_for_repo::hyper_request(
26701            theBuilder,
26702            theContent.try_into()?,
26703        )?;
26704
26705        ::log::debug!("HTTP request: {:?}", &theRequest);
26706
26707        let theResponse = self.client.request(theRequest).await?;
26708
26709        ::log::debug!("HTTP response: {:?}", &theResponse);
26710
26711        Ok(theResponse)
26712    }
26713
26714    /// Remove interaction restrictions for a repository
26715    /// 
26716    /// Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository.
26717    /// 
26718    /// [API method documentation](https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository)
26719    pub async fn interactions_remove_restrictions_for_repo(
26720        &self,
26721        owner: &str,
26722        repo: &str,
26723    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
26724        let mut theScheme = AuthScheme::from(&self.config.authentication);
26725
26726        while let Some(auth_step) = theScheme.step()? {
26727            match auth_step {
26728                ::authentic::AuthenticationStep::Request(auth_request) => {
26729                    theScheme.respond(self.client.request(auth_request).await);
26730                }
26731                ::authentic::AuthenticationStep::WaitFor(duration) => {
26732                    (self.sleep)(duration).await;
26733                }
26734            }
26735        }
26736        let theBuilder = crate::v1_1_4::request::interactions_remove_restrictions_for_repo::http_builder(
26737            self.config.base_url.as_ref(),
26738            owner,
26739            repo,
26740            self.config.user_agent.as_ref(),
26741            self.config.accept.as_deref(),
26742        )?
26743        .with_authentication(&theScheme)?;
26744
26745        let theRequest =
26746            crate::v1_1_4::request::interactions_remove_restrictions_for_repo::hyper_request(theBuilder)?;
26747
26748        ::log::debug!("HTTP request: {:?}", &theRequest);
26749
26750        let theResponse = self.client.request(theRequest).await?;
26751
26752        ::log::debug!("HTTP response: {:?}", &theResponse);
26753
26754        Ok(theResponse)
26755    }
26756
26757    /// List repository invitations
26758    /// 
26759    /// When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.
26760    /// 
26761    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-repository-invitations)
26762    pub async fn repos_list_invitations(
26763        &self,
26764        owner: &str,
26765        repo: &str,
26766        per_page: ::std::option::Option<i64>,
26767        page: ::std::option::Option<i64>,
26768    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
26769        let mut theScheme = AuthScheme::from(&self.config.authentication);
26770
26771        while let Some(auth_step) = theScheme.step()? {
26772            match auth_step {
26773                ::authentic::AuthenticationStep::Request(auth_request) => {
26774                    theScheme.respond(self.client.request(auth_request).await);
26775                }
26776                ::authentic::AuthenticationStep::WaitFor(duration) => {
26777                    (self.sleep)(duration).await;
26778                }
26779            }
26780        }
26781        let theBuilder = crate::v1_1_4::request::repos_list_invitations::http_builder(
26782            self.config.base_url.as_ref(),
26783            owner,
26784            repo,
26785            per_page,
26786            page,
26787            self.config.user_agent.as_ref(),
26788            self.config.accept.as_deref(),
26789        )?
26790        .with_authentication(&theScheme)?;
26791
26792        let theRequest =
26793            crate::v1_1_4::request::repos_list_invitations::hyper_request(theBuilder)?;
26794
26795        ::log::debug!("HTTP request: {:?}", &theRequest);
26796
26797        let theResponse = self.client.request(theRequest).await?;
26798
26799        ::log::debug!("HTTP response: {:?}", &theResponse);
26800
26801        Ok(theResponse)
26802    }
26803
26804    /// Delete a repository invitation
26805    /// 
26806    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-a-repository-invitation)
26807    pub async fn repos_delete_invitation(
26808        &self,
26809        owner: &str,
26810        repo: &str,
26811        invitation_id: i64,
26812    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
26813        let mut theScheme = AuthScheme::from(&self.config.authentication);
26814
26815        while let Some(auth_step) = theScheme.step()? {
26816            match auth_step {
26817                ::authentic::AuthenticationStep::Request(auth_request) => {
26818                    theScheme.respond(self.client.request(auth_request).await);
26819                }
26820                ::authentic::AuthenticationStep::WaitFor(duration) => {
26821                    (self.sleep)(duration).await;
26822                }
26823            }
26824        }
26825        let theBuilder = crate::v1_1_4::request::repos_delete_invitation::http_builder(
26826            self.config.base_url.as_ref(),
26827            owner,
26828            repo,
26829            invitation_id,
26830            self.config.user_agent.as_ref(),
26831            self.config.accept.as_deref(),
26832        )?
26833        .with_authentication(&theScheme)?;
26834
26835        let theRequest =
26836            crate::v1_1_4::request::repos_delete_invitation::hyper_request(theBuilder)?;
26837
26838        ::log::debug!("HTTP request: {:?}", &theRequest);
26839
26840        let theResponse = self.client.request(theRequest).await?;
26841
26842        ::log::debug!("HTTP response: {:?}", &theResponse);
26843
26844        Ok(theResponse)
26845    }
26846
26847    /// Update a repository invitation
26848    /// 
26849    /// [API method documentation](https://docs.github.com/rest/reference/repos#update-a-repository-invitation)
26850    ///
26851    /// # Content
26852    ///
26853    /// - [`&v1_1_4::request::repos_update_invitation::body::Json`](crate::v1_1_4::request::repos_update_invitation::body::Json)
26854    pub async fn repos_update_invitation<Content>(
26855        &self,
26856        owner: &str,
26857        repo: &str,
26858        invitation_id: i64,
26859        theContent: Content,
26860    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
26861    where
26862        Content: Copy + TryInto<crate::v1_1_4::request::repos_update_invitation::Content<::hyper::Body>>,
26863        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_update_invitation::Content<::hyper::Body>>>::Error>
26864    {
26865        let mut theScheme = AuthScheme::from(&self.config.authentication);
26866
26867        while let Some(auth_step) = theScheme.step()? {
26868            match auth_step {
26869                ::authentic::AuthenticationStep::Request(auth_request) => {
26870                    theScheme.respond(self.client.request(auth_request).await);
26871                }
26872                ::authentic::AuthenticationStep::WaitFor(duration) => {
26873                    (self.sleep)(duration).await;
26874                }
26875            }
26876        }
26877        let theBuilder = crate::v1_1_4::request::repos_update_invitation::http_builder(
26878            self.config.base_url.as_ref(),
26879            owner,
26880            repo,
26881            invitation_id,
26882            self.config.user_agent.as_ref(),
26883            self.config.accept.as_deref(),
26884        )?
26885        .with_authentication(&theScheme)?;
26886
26887        let theRequest = crate::v1_1_4::request::repos_update_invitation::hyper_request(
26888            theBuilder,
26889            theContent.try_into()?,
26890        )?;
26891
26892        ::log::debug!("HTTP request: {:?}", &theRequest);
26893
26894        let theResponse = self.client.request(theRequest).await?;
26895
26896        ::log::debug!("HTTP response: {:?}", &theResponse);
26897
26898        Ok(theResponse)
26899    }
26900
26901    /// List repository issues
26902    /// 
26903    /// List issues in a repository.
26904    /// 
26905    /// **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
26906    /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
26907    /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
26908    /// request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
26909    /// 
26910    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-repository-issues)
26911    #[allow(clippy::too_many_arguments)]
26912    pub async fn issues_list_for_repo(
26913        &self,
26914        owner: &str,
26915        repo: &str,
26916        milestone: ::std::option::Option<&str>,
26917        state: ::std::option::Option<&str>,
26918        assignee: ::std::option::Option<&str>,
26919        creator: ::std::option::Option<&str>,
26920        mentioned: ::std::option::Option<&str>,
26921        labels: ::std::option::Option<&str>,
26922        sort: &crate::types::Sort<'_>,
26923        since: ::std::option::Option<&str>,
26924        per_page: ::std::option::Option<i64>,
26925        page: ::std::option::Option<i64>,
26926    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
26927        let (sort, direction) = sort.extract();
26928        let mut theScheme = AuthScheme::from(&self.config.authentication);
26929
26930        while let Some(auth_step) = theScheme.step()? {
26931            match auth_step {
26932                ::authentic::AuthenticationStep::Request(auth_request) => {
26933                    theScheme.respond(self.client.request(auth_request).await);
26934                }
26935                ::authentic::AuthenticationStep::WaitFor(duration) => {
26936                    (self.sleep)(duration).await;
26937                }
26938            }
26939        }
26940        let theBuilder = crate::v1_1_4::request::issues_list_for_repo::http_builder(
26941            self.config.base_url.as_ref(),
26942            owner,
26943            repo,
26944            milestone,
26945            state,
26946            assignee,
26947            creator,
26948            mentioned,
26949            labels,
26950            sort,
26951            direction,
26952            since,
26953            per_page,
26954            page,
26955            self.config.user_agent.as_ref(),
26956            self.config.accept.as_deref(),
26957        )?
26958        .with_authentication(&theScheme)?;
26959
26960        let theRequest =
26961            crate::v1_1_4::request::issues_list_for_repo::hyper_request(theBuilder)?;
26962
26963        ::log::debug!("HTTP request: {:?}", &theRequest);
26964
26965        let theResponse = self.client.request(theRequest).await?;
26966
26967        ::log::debug!("HTTP response: {:?}", &theResponse);
26968
26969        Ok(theResponse)
26970    }
26971
26972    /// Create an issue
26973    /// 
26974    /// Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.
26975    /// 
26976    /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
26977    /// 
26978    /// [API method documentation](https://docs.github.com/rest/reference/issues#create-an-issue)
26979    ///
26980    /// # Content
26981    ///
26982    /// - [`&v1_1_4::request::issues_create::body::Json`](crate::v1_1_4::request::issues_create::body::Json)
26983    pub async fn issues_create<Content>(
26984        &self,
26985        owner: &str,
26986        repo: &str,
26987        theContent: Content,
26988    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
26989    where
26990        Content: Copy + TryInto<crate::v1_1_4::request::issues_create::Content<::hyper::Body>>,
26991        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::issues_create::Content<::hyper::Body>>>::Error>
26992    {
26993        let mut theScheme = AuthScheme::from(&self.config.authentication);
26994
26995        while let Some(auth_step) = theScheme.step()? {
26996            match auth_step {
26997                ::authentic::AuthenticationStep::Request(auth_request) => {
26998                    theScheme.respond(self.client.request(auth_request).await);
26999                }
27000                ::authentic::AuthenticationStep::WaitFor(duration) => {
27001                    (self.sleep)(duration).await;
27002                }
27003            }
27004        }
27005        let theBuilder = crate::v1_1_4::request::issues_create::http_builder(
27006            self.config.base_url.as_ref(),
27007            owner,
27008            repo,
27009            self.config.user_agent.as_ref(),
27010            self.config.accept.as_deref(),
27011        )?
27012        .with_authentication(&theScheme)?;
27013
27014        let theRequest = crate::v1_1_4::request::issues_create::hyper_request(
27015            theBuilder,
27016            theContent.try_into()?,
27017        )?;
27018
27019        ::log::debug!("HTTP request: {:?}", &theRequest);
27020
27021        let theResponse = self.client.request(theRequest).await?;
27022
27023        ::log::debug!("HTTP response: {:?}", &theResponse);
27024
27025        Ok(theResponse)
27026    }
27027
27028    /// List issue comments for a repository
27029    /// 
27030    /// By default, Issue Comments are ordered by ascending ID.
27031    /// 
27032    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository)
27033    pub async fn issues_list_comments_for_repo(
27034        &self,
27035        owner: &str,
27036        repo: &str,
27037        sort: &crate::types::Sort<'_>,
27038        since: ::std::option::Option<&str>,
27039        per_page: ::std::option::Option<i64>,
27040        page: ::std::option::Option<i64>,
27041    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
27042        let (sort, direction) = sort.extract();
27043        let mut theScheme = AuthScheme::from(&self.config.authentication);
27044
27045        while let Some(auth_step) = theScheme.step()? {
27046            match auth_step {
27047                ::authentic::AuthenticationStep::Request(auth_request) => {
27048                    theScheme.respond(self.client.request(auth_request).await);
27049                }
27050                ::authentic::AuthenticationStep::WaitFor(duration) => {
27051                    (self.sleep)(duration).await;
27052                }
27053            }
27054        }
27055        let theBuilder = crate::v1_1_4::request::issues_list_comments_for_repo::http_builder(
27056            self.config.base_url.as_ref(),
27057            owner,
27058            repo,
27059            sort,
27060            direction,
27061            since,
27062            per_page,
27063            page,
27064            self.config.user_agent.as_ref(),
27065            self.config.accept.as_deref(),
27066        )?
27067        .with_authentication(&theScheme)?;
27068
27069        let theRequest =
27070            crate::v1_1_4::request::issues_list_comments_for_repo::hyper_request(theBuilder)?;
27071
27072        ::log::debug!("HTTP request: {:?}", &theRequest);
27073
27074        let theResponse = self.client.request(theRequest).await?;
27075
27076        ::log::debug!("HTTP response: {:?}", &theResponse);
27077
27078        Ok(theResponse)
27079    }
27080
27081    /// Get an issue comment
27082    /// 
27083    /// [API method documentation](https://docs.github.com/rest/reference/issues#get-an-issue-comment)
27084    pub async fn issues_get_comment(
27085        &self,
27086        owner: &str,
27087        repo: &str,
27088        comment_id: i64,
27089    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
27090        let mut theScheme = AuthScheme::from(&self.config.authentication);
27091
27092        while let Some(auth_step) = theScheme.step()? {
27093            match auth_step {
27094                ::authentic::AuthenticationStep::Request(auth_request) => {
27095                    theScheme.respond(self.client.request(auth_request).await);
27096                }
27097                ::authentic::AuthenticationStep::WaitFor(duration) => {
27098                    (self.sleep)(duration).await;
27099                }
27100            }
27101        }
27102        let theBuilder = crate::v1_1_4::request::issues_get_comment::http_builder(
27103            self.config.base_url.as_ref(),
27104            owner,
27105            repo,
27106            comment_id,
27107            self.config.user_agent.as_ref(),
27108            self.config.accept.as_deref(),
27109        )?
27110        .with_authentication(&theScheme)?;
27111
27112        let theRequest =
27113            crate::v1_1_4::request::issues_get_comment::hyper_request(theBuilder)?;
27114
27115        ::log::debug!("HTTP request: {:?}", &theRequest);
27116
27117        let theResponse = self.client.request(theRequest).await?;
27118
27119        ::log::debug!("HTTP response: {:?}", &theResponse);
27120
27121        Ok(theResponse)
27122    }
27123
27124    /// Delete an issue comment
27125    /// 
27126    /// [API method documentation](https://docs.github.com/rest/reference/issues#delete-an-issue-comment)
27127    pub async fn issues_delete_comment(
27128        &self,
27129        owner: &str,
27130        repo: &str,
27131        comment_id: i64,
27132    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
27133        let mut theScheme = AuthScheme::from(&self.config.authentication);
27134
27135        while let Some(auth_step) = theScheme.step()? {
27136            match auth_step {
27137                ::authentic::AuthenticationStep::Request(auth_request) => {
27138                    theScheme.respond(self.client.request(auth_request).await);
27139                }
27140                ::authentic::AuthenticationStep::WaitFor(duration) => {
27141                    (self.sleep)(duration).await;
27142                }
27143            }
27144        }
27145        let theBuilder = crate::v1_1_4::request::issues_delete_comment::http_builder(
27146            self.config.base_url.as_ref(),
27147            owner,
27148            repo,
27149            comment_id,
27150            self.config.user_agent.as_ref(),
27151            self.config.accept.as_deref(),
27152        )?
27153        .with_authentication(&theScheme)?;
27154
27155        let theRequest =
27156            crate::v1_1_4::request::issues_delete_comment::hyper_request(theBuilder)?;
27157
27158        ::log::debug!("HTTP request: {:?}", &theRequest);
27159
27160        let theResponse = self.client.request(theRequest).await?;
27161
27162        ::log::debug!("HTTP response: {:?}", &theResponse);
27163
27164        Ok(theResponse)
27165    }
27166
27167    /// Update an issue comment
27168    /// 
27169    /// [API method documentation](https://docs.github.com/rest/reference/issues#update-an-issue-comment)
27170    ///
27171    /// # Content
27172    ///
27173    /// - [`&v1_1_4::request::issues_update_comment::body::Json`](crate::v1_1_4::request::issues_update_comment::body::Json)
27174    pub async fn issues_update_comment<Content>(
27175        &self,
27176        owner: &str,
27177        repo: &str,
27178        comment_id: i64,
27179        theContent: Content,
27180    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
27181    where
27182        Content: Copy + TryInto<crate::v1_1_4::request::issues_update_comment::Content<::hyper::Body>>,
27183        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::issues_update_comment::Content<::hyper::Body>>>::Error>
27184    {
27185        let mut theScheme = AuthScheme::from(&self.config.authentication);
27186
27187        while let Some(auth_step) = theScheme.step()? {
27188            match auth_step {
27189                ::authentic::AuthenticationStep::Request(auth_request) => {
27190                    theScheme.respond(self.client.request(auth_request).await);
27191                }
27192                ::authentic::AuthenticationStep::WaitFor(duration) => {
27193                    (self.sleep)(duration).await;
27194                }
27195            }
27196        }
27197        let theBuilder = crate::v1_1_4::request::issues_update_comment::http_builder(
27198            self.config.base_url.as_ref(),
27199            owner,
27200            repo,
27201            comment_id,
27202            self.config.user_agent.as_ref(),
27203            self.config.accept.as_deref(),
27204        )?
27205        .with_authentication(&theScheme)?;
27206
27207        let theRequest = crate::v1_1_4::request::issues_update_comment::hyper_request(
27208            theBuilder,
27209            theContent.try_into()?,
27210        )?;
27211
27212        ::log::debug!("HTTP request: {:?}", &theRequest);
27213
27214        let theResponse = self.client.request(theRequest).await?;
27215
27216        ::log::debug!("HTTP response: {:?}", &theResponse);
27217
27218        Ok(theResponse)
27219    }
27220
27221    /// List reactions for an issue comment
27222    /// 
27223    /// List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments).
27224    /// 
27225    /// [API method documentation](https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment)
27226    pub async fn reactions_list_for_issue_comment(
27227        &self,
27228        owner: &str,
27229        repo: &str,
27230        comment_id: i64,
27231        content: ::std::option::Option<&str>,
27232        per_page: ::std::option::Option<i64>,
27233        page: ::std::option::Option<i64>,
27234    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
27235        let mut theScheme = AuthScheme::from(&self.config.authentication);
27236
27237        while let Some(auth_step) = theScheme.step()? {
27238            match auth_step {
27239                ::authentic::AuthenticationStep::Request(auth_request) => {
27240                    theScheme.respond(self.client.request(auth_request).await);
27241                }
27242                ::authentic::AuthenticationStep::WaitFor(duration) => {
27243                    (self.sleep)(duration).await;
27244                }
27245            }
27246        }
27247        let theBuilder = crate::v1_1_4::request::reactions_list_for_issue_comment::http_builder(
27248            self.config.base_url.as_ref(),
27249            owner,
27250            repo,
27251            comment_id,
27252            content,
27253            per_page,
27254            page,
27255            self.config.user_agent.as_ref(),
27256            self.config.accept.as_deref(),
27257        )?
27258        .with_authentication(&theScheme)?;
27259
27260        let theRequest =
27261            crate::v1_1_4::request::reactions_list_for_issue_comment::hyper_request(theBuilder)?;
27262
27263        ::log::debug!("HTTP request: {:?}", &theRequest);
27264
27265        let theResponse = self.client.request(theRequest).await?;
27266
27267        ::log::debug!("HTTP response: {:?}", &theResponse);
27268
27269        Ok(theResponse)
27270    }
27271
27272    /// Create reaction for an issue comment
27273    /// 
27274    /// Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment.
27275    /// 
27276    /// [API method documentation](https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment)
27277    ///
27278    /// # Content
27279    ///
27280    /// - [`&v1_1_4::request::reactions_create_for_issue_comment::body::Json`](crate::v1_1_4::request::reactions_create_for_issue_comment::body::Json)
27281    pub async fn reactions_create_for_issue_comment<Content>(
27282        &self,
27283        owner: &str,
27284        repo: &str,
27285        comment_id: i64,
27286        theContent: Content,
27287    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
27288    where
27289        Content: Copy + TryInto<crate::v1_1_4::request::reactions_create_for_issue_comment::Content<::hyper::Body>>,
27290        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::reactions_create_for_issue_comment::Content<::hyper::Body>>>::Error>
27291    {
27292        let mut theScheme = AuthScheme::from(&self.config.authentication);
27293
27294        while let Some(auth_step) = theScheme.step()? {
27295            match auth_step {
27296                ::authentic::AuthenticationStep::Request(auth_request) => {
27297                    theScheme.respond(self.client.request(auth_request).await);
27298                }
27299                ::authentic::AuthenticationStep::WaitFor(duration) => {
27300                    (self.sleep)(duration).await;
27301                }
27302            }
27303        }
27304        let theBuilder = crate::v1_1_4::request::reactions_create_for_issue_comment::http_builder(
27305            self.config.base_url.as_ref(),
27306            owner,
27307            repo,
27308            comment_id,
27309            self.config.user_agent.as_ref(),
27310            self.config.accept.as_deref(),
27311        )?
27312        .with_authentication(&theScheme)?;
27313
27314        let theRequest = crate::v1_1_4::request::reactions_create_for_issue_comment::hyper_request(
27315            theBuilder,
27316            theContent.try_into()?,
27317        )?;
27318
27319        ::log::debug!("HTTP request: {:?}", &theRequest);
27320
27321        let theResponse = self.client.request(theRequest).await?;
27322
27323        ::log::debug!("HTTP response: {:?}", &theResponse);
27324
27325        Ok(theResponse)
27326    }
27327
27328    /// Delete an issue comment reaction
27329    /// 
27330    /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`.
27331    /// 
27332    /// Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments).
27333    /// 
27334    /// [API method documentation](https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction)
27335    pub async fn reactions_delete_for_issue_comment(
27336        &self,
27337        owner: &str,
27338        repo: &str,
27339        comment_id: i64,
27340        reaction_id: i64,
27341    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
27342        let mut theScheme = AuthScheme::from(&self.config.authentication);
27343
27344        while let Some(auth_step) = theScheme.step()? {
27345            match auth_step {
27346                ::authentic::AuthenticationStep::Request(auth_request) => {
27347                    theScheme.respond(self.client.request(auth_request).await);
27348                }
27349                ::authentic::AuthenticationStep::WaitFor(duration) => {
27350                    (self.sleep)(duration).await;
27351                }
27352            }
27353        }
27354        let theBuilder = crate::v1_1_4::request::reactions_delete_for_issue_comment::http_builder(
27355            self.config.base_url.as_ref(),
27356            owner,
27357            repo,
27358            comment_id,
27359            reaction_id,
27360            self.config.user_agent.as_ref(),
27361            self.config.accept.as_deref(),
27362        )?
27363        .with_authentication(&theScheme)?;
27364
27365        let theRequest =
27366            crate::v1_1_4::request::reactions_delete_for_issue_comment::hyper_request(theBuilder)?;
27367
27368        ::log::debug!("HTTP request: {:?}", &theRequest);
27369
27370        let theResponse = self.client.request(theRequest).await?;
27371
27372        ::log::debug!("HTTP response: {:?}", &theResponse);
27373
27374        Ok(theResponse)
27375    }
27376
27377    /// List issue events for a repository
27378    /// 
27379    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository)
27380    pub async fn issues_list_events_for_repo(
27381        &self,
27382        owner: &str,
27383        repo: &str,
27384        per_page: ::std::option::Option<i64>,
27385        page: ::std::option::Option<i64>,
27386    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
27387        let mut theScheme = AuthScheme::from(&self.config.authentication);
27388
27389        while let Some(auth_step) = theScheme.step()? {
27390            match auth_step {
27391                ::authentic::AuthenticationStep::Request(auth_request) => {
27392                    theScheme.respond(self.client.request(auth_request).await);
27393                }
27394                ::authentic::AuthenticationStep::WaitFor(duration) => {
27395                    (self.sleep)(duration).await;
27396                }
27397            }
27398        }
27399        let theBuilder = crate::v1_1_4::request::issues_list_events_for_repo::http_builder(
27400            self.config.base_url.as_ref(),
27401            owner,
27402            repo,
27403            per_page,
27404            page,
27405            self.config.user_agent.as_ref(),
27406            self.config.accept.as_deref(),
27407        )?
27408        .with_authentication(&theScheme)?;
27409
27410        let theRequest =
27411            crate::v1_1_4::request::issues_list_events_for_repo::hyper_request(theBuilder)?;
27412
27413        ::log::debug!("HTTP request: {:?}", &theRequest);
27414
27415        let theResponse = self.client.request(theRequest).await?;
27416
27417        ::log::debug!("HTTP response: {:?}", &theResponse);
27418
27419        Ok(theResponse)
27420    }
27421
27422    /// Get an issue event
27423    /// 
27424    /// [API method documentation](https://docs.github.com/rest/reference/issues#get-an-issue-event)
27425    pub async fn issues_get_event(
27426        &self,
27427        owner: &str,
27428        repo: &str,
27429        event_id: i64,
27430    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
27431        let mut theScheme = AuthScheme::from(&self.config.authentication);
27432
27433        while let Some(auth_step) = theScheme.step()? {
27434            match auth_step {
27435                ::authentic::AuthenticationStep::Request(auth_request) => {
27436                    theScheme.respond(self.client.request(auth_request).await);
27437                }
27438                ::authentic::AuthenticationStep::WaitFor(duration) => {
27439                    (self.sleep)(duration).await;
27440                }
27441            }
27442        }
27443        let theBuilder = crate::v1_1_4::request::issues_get_event::http_builder(
27444            self.config.base_url.as_ref(),
27445            owner,
27446            repo,
27447            event_id,
27448            self.config.user_agent.as_ref(),
27449            self.config.accept.as_deref(),
27450        )?
27451        .with_authentication(&theScheme)?;
27452
27453        let theRequest =
27454            crate::v1_1_4::request::issues_get_event::hyper_request(theBuilder)?;
27455
27456        ::log::debug!("HTTP request: {:?}", &theRequest);
27457
27458        let theResponse = self.client.request(theRequest).await?;
27459
27460        ::log::debug!("HTTP response: {:?}", &theResponse);
27461
27462        Ok(theResponse)
27463    }
27464
27465    /// Get an issue
27466    /// 
27467    /// The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was
27468    /// [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If
27469    /// the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API
27470    /// returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read
27471    /// access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe
27472    /// to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook.
27473    /// 
27474    /// **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
27475    /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
27476    /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
27477    /// request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
27478    /// 
27479    /// [API method documentation](https://docs.github.com/rest/reference/issues#get-an-issue)
27480    pub async fn issues_get(
27481        &self,
27482        owner: &str,
27483        repo: &str,
27484        issue_number: i64,
27485    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
27486        let mut theScheme = AuthScheme::from(&self.config.authentication);
27487
27488        while let Some(auth_step) = theScheme.step()? {
27489            match auth_step {
27490                ::authentic::AuthenticationStep::Request(auth_request) => {
27491                    theScheme.respond(self.client.request(auth_request).await);
27492                }
27493                ::authentic::AuthenticationStep::WaitFor(duration) => {
27494                    (self.sleep)(duration).await;
27495                }
27496            }
27497        }
27498        let theBuilder = crate::v1_1_4::request::issues_get::http_builder(
27499            self.config.base_url.as_ref(),
27500            owner,
27501            repo,
27502            issue_number,
27503            self.config.user_agent.as_ref(),
27504            self.config.accept.as_deref(),
27505        )?
27506        .with_authentication(&theScheme)?;
27507
27508        let theRequest =
27509            crate::v1_1_4::request::issues_get::hyper_request(theBuilder)?;
27510
27511        ::log::debug!("HTTP request: {:?}", &theRequest);
27512
27513        let theResponse = self.client.request(theRequest).await?;
27514
27515        ::log::debug!("HTTP response: {:?}", &theResponse);
27516
27517        Ok(theResponse)
27518    }
27519
27520    /// Update an issue
27521    /// 
27522    /// Issue owners and users with push access can edit an issue.
27523    /// 
27524    /// [API method documentation](https://docs.github.com/rest/reference/issues/#update-an-issue)
27525    ///
27526    /// # Content
27527    ///
27528    /// - [`&v1_1_4::request::issues_update::body::Json`](crate::v1_1_4::request::issues_update::body::Json)
27529    pub async fn issues_update<Content>(
27530        &self,
27531        owner: &str,
27532        repo: &str,
27533        issue_number: i64,
27534        theContent: Content,
27535    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
27536    where
27537        Content: Copy + TryInto<crate::v1_1_4::request::issues_update::Content<::hyper::Body>>,
27538        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::issues_update::Content<::hyper::Body>>>::Error>
27539    {
27540        let mut theScheme = AuthScheme::from(&self.config.authentication);
27541
27542        while let Some(auth_step) = theScheme.step()? {
27543            match auth_step {
27544                ::authentic::AuthenticationStep::Request(auth_request) => {
27545                    theScheme.respond(self.client.request(auth_request).await);
27546                }
27547                ::authentic::AuthenticationStep::WaitFor(duration) => {
27548                    (self.sleep)(duration).await;
27549                }
27550            }
27551        }
27552        let theBuilder = crate::v1_1_4::request::issues_update::http_builder(
27553            self.config.base_url.as_ref(),
27554            owner,
27555            repo,
27556            issue_number,
27557            self.config.user_agent.as_ref(),
27558            self.config.accept.as_deref(),
27559        )?
27560        .with_authentication(&theScheme)?;
27561
27562        let theRequest = crate::v1_1_4::request::issues_update::hyper_request(
27563            theBuilder,
27564            theContent.try_into()?,
27565        )?;
27566
27567        ::log::debug!("HTTP request: {:?}", &theRequest);
27568
27569        let theResponse = self.client.request(theRequest).await?;
27570
27571        ::log::debug!("HTTP response: {:?}", &theResponse);
27572
27573        Ok(theResponse)
27574    }
27575
27576    /// Add assignees to an issue
27577    /// 
27578    /// Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.
27579    /// 
27580    /// [API method documentation](https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue)
27581    ///
27582    /// # Content
27583    ///
27584    /// - [`&v1_1_4::request::issues_add_assignees::body::Json`](crate::v1_1_4::request::issues_add_assignees::body::Json)
27585    pub async fn issues_add_assignees<Content>(
27586        &self,
27587        owner: &str,
27588        repo: &str,
27589        issue_number: i64,
27590        theContent: Content,
27591    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
27592    where
27593        Content: Copy + TryInto<crate::v1_1_4::request::issues_add_assignees::Content<::hyper::Body>>,
27594        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::issues_add_assignees::Content<::hyper::Body>>>::Error>
27595    {
27596        let mut theScheme = AuthScheme::from(&self.config.authentication);
27597
27598        while let Some(auth_step) = theScheme.step()? {
27599            match auth_step {
27600                ::authentic::AuthenticationStep::Request(auth_request) => {
27601                    theScheme.respond(self.client.request(auth_request).await);
27602                }
27603                ::authentic::AuthenticationStep::WaitFor(duration) => {
27604                    (self.sleep)(duration).await;
27605                }
27606            }
27607        }
27608        let theBuilder = crate::v1_1_4::request::issues_add_assignees::http_builder(
27609            self.config.base_url.as_ref(),
27610            owner,
27611            repo,
27612            issue_number,
27613            self.config.user_agent.as_ref(),
27614            self.config.accept.as_deref(),
27615        )?
27616        .with_authentication(&theScheme)?;
27617
27618        let theRequest = crate::v1_1_4::request::issues_add_assignees::hyper_request(
27619            theBuilder,
27620            theContent.try_into()?,
27621        )?;
27622
27623        ::log::debug!("HTTP request: {:?}", &theRequest);
27624
27625        let theResponse = self.client.request(theRequest).await?;
27626
27627        ::log::debug!("HTTP response: {:?}", &theResponse);
27628
27629        Ok(theResponse)
27630    }
27631
27632    /// Remove assignees from an issue
27633    /// 
27634    /// Removes one or more assignees from an issue.
27635    /// 
27636    /// [API method documentation](https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue)
27637    ///
27638    /// # Content
27639    ///
27640    /// - [`&v1_1_4::request::issues_remove_assignees::body::Json`](crate::v1_1_4::request::issues_remove_assignees::body::Json)
27641    pub async fn issues_remove_assignees<Content>(
27642        &self,
27643        owner: &str,
27644        repo: &str,
27645        issue_number: i64,
27646        theContent: Content,
27647    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
27648    where
27649        Content: Copy + TryInto<crate::v1_1_4::request::issues_remove_assignees::Content<::hyper::Body>>,
27650        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::issues_remove_assignees::Content<::hyper::Body>>>::Error>
27651    {
27652        let mut theScheme = AuthScheme::from(&self.config.authentication);
27653
27654        while let Some(auth_step) = theScheme.step()? {
27655            match auth_step {
27656                ::authentic::AuthenticationStep::Request(auth_request) => {
27657                    theScheme.respond(self.client.request(auth_request).await);
27658                }
27659                ::authentic::AuthenticationStep::WaitFor(duration) => {
27660                    (self.sleep)(duration).await;
27661                }
27662            }
27663        }
27664        let theBuilder = crate::v1_1_4::request::issues_remove_assignees::http_builder(
27665            self.config.base_url.as_ref(),
27666            owner,
27667            repo,
27668            issue_number,
27669            self.config.user_agent.as_ref(),
27670            self.config.accept.as_deref(),
27671        )?
27672        .with_authentication(&theScheme)?;
27673
27674        let theRequest = crate::v1_1_4::request::issues_remove_assignees::hyper_request(
27675            theBuilder,
27676            theContent.try_into()?,
27677        )?;
27678
27679        ::log::debug!("HTTP request: {:?}", &theRequest);
27680
27681        let theResponse = self.client.request(theRequest).await?;
27682
27683        ::log::debug!("HTTP response: {:?}", &theResponse);
27684
27685        Ok(theResponse)
27686    }
27687
27688    /// List issue comments
27689    /// 
27690    /// Issue Comments are ordered by ascending ID.
27691    /// 
27692    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-issue-comments)
27693    pub async fn issues_list_comments(
27694        &self,
27695        owner: &str,
27696        repo: &str,
27697        issue_number: i64,
27698        since: ::std::option::Option<&str>,
27699        per_page: ::std::option::Option<i64>,
27700        page: ::std::option::Option<i64>,
27701    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
27702        let mut theScheme = AuthScheme::from(&self.config.authentication);
27703
27704        while let Some(auth_step) = theScheme.step()? {
27705            match auth_step {
27706                ::authentic::AuthenticationStep::Request(auth_request) => {
27707                    theScheme.respond(self.client.request(auth_request).await);
27708                }
27709                ::authentic::AuthenticationStep::WaitFor(duration) => {
27710                    (self.sleep)(duration).await;
27711                }
27712            }
27713        }
27714        let theBuilder = crate::v1_1_4::request::issues_list_comments::http_builder(
27715            self.config.base_url.as_ref(),
27716            owner,
27717            repo,
27718            issue_number,
27719            since,
27720            per_page,
27721            page,
27722            self.config.user_agent.as_ref(),
27723            self.config.accept.as_deref(),
27724        )?
27725        .with_authentication(&theScheme)?;
27726
27727        let theRequest =
27728            crate::v1_1_4::request::issues_list_comments::hyper_request(theBuilder)?;
27729
27730        ::log::debug!("HTTP request: {:?}", &theRequest);
27731
27732        let theResponse = self.client.request(theRequest).await?;
27733
27734        ::log::debug!("HTTP response: {:?}", &theResponse);
27735
27736        Ok(theResponse)
27737    }
27738
27739    /// Create an issue comment
27740    /// 
27741    /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
27742    /// 
27743    /// [API method documentation](https://docs.github.com/rest/reference/issues#create-an-issue-comment)
27744    ///
27745    /// # Content
27746    ///
27747    /// - [`&v1_1_4::request::issues_create_comment::body::Json`](crate::v1_1_4::request::issues_create_comment::body::Json)
27748    pub async fn issues_create_comment<Content>(
27749        &self,
27750        owner: &str,
27751        repo: &str,
27752        issue_number: i64,
27753        theContent: Content,
27754    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
27755    where
27756        Content: Copy + TryInto<crate::v1_1_4::request::issues_create_comment::Content<::hyper::Body>>,
27757        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::issues_create_comment::Content<::hyper::Body>>>::Error>
27758    {
27759        let mut theScheme = AuthScheme::from(&self.config.authentication);
27760
27761        while let Some(auth_step) = theScheme.step()? {
27762            match auth_step {
27763                ::authentic::AuthenticationStep::Request(auth_request) => {
27764                    theScheme.respond(self.client.request(auth_request).await);
27765                }
27766                ::authentic::AuthenticationStep::WaitFor(duration) => {
27767                    (self.sleep)(duration).await;
27768                }
27769            }
27770        }
27771        let theBuilder = crate::v1_1_4::request::issues_create_comment::http_builder(
27772            self.config.base_url.as_ref(),
27773            owner,
27774            repo,
27775            issue_number,
27776            self.config.user_agent.as_ref(),
27777            self.config.accept.as_deref(),
27778        )?
27779        .with_authentication(&theScheme)?;
27780
27781        let theRequest = crate::v1_1_4::request::issues_create_comment::hyper_request(
27782            theBuilder,
27783            theContent.try_into()?,
27784        )?;
27785
27786        ::log::debug!("HTTP request: {:?}", &theRequest);
27787
27788        let theResponse = self.client.request(theRequest).await?;
27789
27790        ::log::debug!("HTTP response: {:?}", &theResponse);
27791
27792        Ok(theResponse)
27793    }
27794
27795    /// List issue events
27796    /// 
27797    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-issue-events)
27798    pub async fn issues_list_events(
27799        &self,
27800        owner: &str,
27801        repo: &str,
27802        issue_number: i64,
27803        per_page: ::std::option::Option<i64>,
27804        page: ::std::option::Option<i64>,
27805    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
27806        let mut theScheme = AuthScheme::from(&self.config.authentication);
27807
27808        while let Some(auth_step) = theScheme.step()? {
27809            match auth_step {
27810                ::authentic::AuthenticationStep::Request(auth_request) => {
27811                    theScheme.respond(self.client.request(auth_request).await);
27812                }
27813                ::authentic::AuthenticationStep::WaitFor(duration) => {
27814                    (self.sleep)(duration).await;
27815                }
27816            }
27817        }
27818        let theBuilder = crate::v1_1_4::request::issues_list_events::http_builder(
27819            self.config.base_url.as_ref(),
27820            owner,
27821            repo,
27822            issue_number,
27823            per_page,
27824            page,
27825            self.config.user_agent.as_ref(),
27826            self.config.accept.as_deref(),
27827        )?
27828        .with_authentication(&theScheme)?;
27829
27830        let theRequest =
27831            crate::v1_1_4::request::issues_list_events::hyper_request(theBuilder)?;
27832
27833        ::log::debug!("HTTP request: {:?}", &theRequest);
27834
27835        let theResponse = self.client.request(theRequest).await?;
27836
27837        ::log::debug!("HTTP response: {:?}", &theResponse);
27838
27839        Ok(theResponse)
27840    }
27841
27842    /// List labels for an issue
27843    /// 
27844    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-labels-for-an-issue)
27845    pub async fn issues_list_labels_on_issue(
27846        &self,
27847        owner: &str,
27848        repo: &str,
27849        issue_number: i64,
27850        per_page: ::std::option::Option<i64>,
27851        page: ::std::option::Option<i64>,
27852    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
27853        let mut theScheme = AuthScheme::from(&self.config.authentication);
27854
27855        while let Some(auth_step) = theScheme.step()? {
27856            match auth_step {
27857                ::authentic::AuthenticationStep::Request(auth_request) => {
27858                    theScheme.respond(self.client.request(auth_request).await);
27859                }
27860                ::authentic::AuthenticationStep::WaitFor(duration) => {
27861                    (self.sleep)(duration).await;
27862                }
27863            }
27864        }
27865        let theBuilder = crate::v1_1_4::request::issues_list_labels_on_issue::http_builder(
27866            self.config.base_url.as_ref(),
27867            owner,
27868            repo,
27869            issue_number,
27870            per_page,
27871            page,
27872            self.config.user_agent.as_ref(),
27873            self.config.accept.as_deref(),
27874        )?
27875        .with_authentication(&theScheme)?;
27876
27877        let theRequest =
27878            crate::v1_1_4::request::issues_list_labels_on_issue::hyper_request(theBuilder)?;
27879
27880        ::log::debug!("HTTP request: {:?}", &theRequest);
27881
27882        let theResponse = self.client.request(theRequest).await?;
27883
27884        ::log::debug!("HTTP response: {:?}", &theResponse);
27885
27886        Ok(theResponse)
27887    }
27888
27889    /// Set labels for an issue
27890    /// 
27891    /// Removes any previous labels and sets the new labels for an issue.
27892    /// 
27893    /// [API method documentation](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)
27894    ///
27895    /// # Content
27896    ///
27897    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
27898    pub async fn issues_set_labels<Content>(
27899        &self,
27900        owner: &str,
27901        repo: &str,
27902        issue_number: i64,
27903        theContent: Content,
27904    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
27905    where
27906        Content: Copy + TryInto<crate::v1_1_4::request::issues_set_labels::Content<::hyper::Body>>,
27907        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::issues_set_labels::Content<::hyper::Body>>>::Error>
27908    {
27909        let mut theScheme = AuthScheme::from(&self.config.authentication);
27910
27911        while let Some(auth_step) = theScheme.step()? {
27912            match auth_step {
27913                ::authentic::AuthenticationStep::Request(auth_request) => {
27914                    theScheme.respond(self.client.request(auth_request).await);
27915                }
27916                ::authentic::AuthenticationStep::WaitFor(duration) => {
27917                    (self.sleep)(duration).await;
27918                }
27919            }
27920        }
27921        let theBuilder = crate::v1_1_4::request::issues_set_labels::http_builder(
27922            self.config.base_url.as_ref(),
27923            owner,
27924            repo,
27925            issue_number,
27926            self.config.user_agent.as_ref(),
27927            self.config.accept.as_deref(),
27928        )?
27929        .with_authentication(&theScheme)?;
27930
27931        let theRequest = crate::v1_1_4::request::issues_set_labels::hyper_request(
27932            theBuilder,
27933            theContent.try_into()?,
27934        )?;
27935
27936        ::log::debug!("HTTP request: {:?}", &theRequest);
27937
27938        let theResponse = self.client.request(theRequest).await?;
27939
27940        ::log::debug!("HTTP response: {:?}", &theResponse);
27941
27942        Ok(theResponse)
27943    }
27944
27945    /// Add labels to an issue
27946    /// 
27947    /// [API method documentation](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)
27948    ///
27949    /// # Content
27950    ///
27951    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
27952    pub async fn issues_add_labels<Content>(
27953        &self,
27954        owner: &str,
27955        repo: &str,
27956        issue_number: i64,
27957        theContent: Content,
27958    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
27959    where
27960        Content: Copy + TryInto<crate::v1_1_4::request::issues_add_labels::Content<::hyper::Body>>,
27961        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::issues_add_labels::Content<::hyper::Body>>>::Error>
27962    {
27963        let mut theScheme = AuthScheme::from(&self.config.authentication);
27964
27965        while let Some(auth_step) = theScheme.step()? {
27966            match auth_step {
27967                ::authentic::AuthenticationStep::Request(auth_request) => {
27968                    theScheme.respond(self.client.request(auth_request).await);
27969                }
27970                ::authentic::AuthenticationStep::WaitFor(duration) => {
27971                    (self.sleep)(duration).await;
27972                }
27973            }
27974        }
27975        let theBuilder = crate::v1_1_4::request::issues_add_labels::http_builder(
27976            self.config.base_url.as_ref(),
27977            owner,
27978            repo,
27979            issue_number,
27980            self.config.user_agent.as_ref(),
27981            self.config.accept.as_deref(),
27982        )?
27983        .with_authentication(&theScheme)?;
27984
27985        let theRequest = crate::v1_1_4::request::issues_add_labels::hyper_request(
27986            theBuilder,
27987            theContent.try_into()?,
27988        )?;
27989
27990        ::log::debug!("HTTP request: {:?}", &theRequest);
27991
27992        let theResponse = self.client.request(theRequest).await?;
27993
27994        ::log::debug!("HTTP response: {:?}", &theResponse);
27995
27996        Ok(theResponse)
27997    }
27998
27999    /// Remove all labels from an issue
28000    /// 
28001    /// [API method documentation](https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue)
28002    pub async fn issues_remove_all_labels(
28003        &self,
28004        owner: &str,
28005        repo: &str,
28006        issue_number: i64,
28007    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28008        let mut theScheme = AuthScheme::from(&self.config.authentication);
28009
28010        while let Some(auth_step) = theScheme.step()? {
28011            match auth_step {
28012                ::authentic::AuthenticationStep::Request(auth_request) => {
28013                    theScheme.respond(self.client.request(auth_request).await);
28014                }
28015                ::authentic::AuthenticationStep::WaitFor(duration) => {
28016                    (self.sleep)(duration).await;
28017                }
28018            }
28019        }
28020        let theBuilder = crate::v1_1_4::request::issues_remove_all_labels::http_builder(
28021            self.config.base_url.as_ref(),
28022            owner,
28023            repo,
28024            issue_number,
28025            self.config.user_agent.as_ref(),
28026            self.config.accept.as_deref(),
28027        )?
28028        .with_authentication(&theScheme)?;
28029
28030        let theRequest =
28031            crate::v1_1_4::request::issues_remove_all_labels::hyper_request(theBuilder)?;
28032
28033        ::log::debug!("HTTP request: {:?}", &theRequest);
28034
28035        let theResponse = self.client.request(theRequest).await?;
28036
28037        ::log::debug!("HTTP response: {:?}", &theResponse);
28038
28039        Ok(theResponse)
28040    }
28041
28042    /// Remove a label from an issue
28043    /// 
28044    /// Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist.
28045    /// 
28046    /// [API method documentation](https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue)
28047    pub async fn issues_remove_label(
28048        &self,
28049        owner: &str,
28050        repo: &str,
28051        issue_number: i64,
28052        name: &str,
28053    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28054        let mut theScheme = AuthScheme::from(&self.config.authentication);
28055
28056        while let Some(auth_step) = theScheme.step()? {
28057            match auth_step {
28058                ::authentic::AuthenticationStep::Request(auth_request) => {
28059                    theScheme.respond(self.client.request(auth_request).await);
28060                }
28061                ::authentic::AuthenticationStep::WaitFor(duration) => {
28062                    (self.sleep)(duration).await;
28063                }
28064            }
28065        }
28066        let theBuilder = crate::v1_1_4::request::issues_remove_label::http_builder(
28067            self.config.base_url.as_ref(),
28068            owner,
28069            repo,
28070            issue_number,
28071            name,
28072            self.config.user_agent.as_ref(),
28073            self.config.accept.as_deref(),
28074        )?
28075        .with_authentication(&theScheme)?;
28076
28077        let theRequest =
28078            crate::v1_1_4::request::issues_remove_label::hyper_request(theBuilder)?;
28079
28080        ::log::debug!("HTTP request: {:?}", &theRequest);
28081
28082        let theResponse = self.client.request(theRequest).await?;
28083
28084        ::log::debug!("HTTP response: {:?}", &theResponse);
28085
28086        Ok(theResponse)
28087    }
28088
28089    /// Lock an issue
28090    /// 
28091    /// Users with push access can lock an issue or pull request's conversation.
28092    /// 
28093    /// Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
28094    /// 
28095    /// [API method documentation](https://docs.github.com/rest/reference/issues#lock-an-issue)
28096    ///
28097    /// # Content
28098    ///
28099    /// - [`&::std::option::Option<crate::v1_1_4::request::issues_lock::body::Json>`](crate::v1_1_4::request::issues_lock::body::Json)
28100    pub async fn issues_lock<Content>(
28101        &self,
28102        owner: &str,
28103        repo: &str,
28104        issue_number: i64,
28105        theContent: Content,
28106    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
28107    where
28108        Content: Copy + TryInto<crate::v1_1_4::request::issues_lock::Content<::hyper::Body>>,
28109        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::issues_lock::Content<::hyper::Body>>>::Error>
28110    {
28111        let mut theScheme = AuthScheme::from(&self.config.authentication);
28112
28113        while let Some(auth_step) = theScheme.step()? {
28114            match auth_step {
28115                ::authentic::AuthenticationStep::Request(auth_request) => {
28116                    theScheme.respond(self.client.request(auth_request).await);
28117                }
28118                ::authentic::AuthenticationStep::WaitFor(duration) => {
28119                    (self.sleep)(duration).await;
28120                }
28121            }
28122        }
28123        let theBuilder = crate::v1_1_4::request::issues_lock::http_builder(
28124            self.config.base_url.as_ref(),
28125            owner,
28126            repo,
28127            issue_number,
28128            self.config.user_agent.as_ref(),
28129            self.config.accept.as_deref(),
28130        )?
28131        .with_authentication(&theScheme)?;
28132
28133        let theRequest = crate::v1_1_4::request::issues_lock::hyper_request(
28134            theBuilder,
28135            theContent.try_into()?,
28136        )?;
28137
28138        ::log::debug!("HTTP request: {:?}", &theRequest);
28139
28140        let theResponse = self.client.request(theRequest).await?;
28141
28142        ::log::debug!("HTTP response: {:?}", &theResponse);
28143
28144        Ok(theResponse)
28145    }
28146
28147    /// Unlock an issue
28148    /// 
28149    /// Users with push access can unlock an issue's conversation.
28150    /// 
28151    /// [API method documentation](https://docs.github.com/rest/reference/issues#unlock-an-issue)
28152    pub async fn issues_unlock(
28153        &self,
28154        owner: &str,
28155        repo: &str,
28156        issue_number: i64,
28157    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28158        let mut theScheme = AuthScheme::from(&self.config.authentication);
28159
28160        while let Some(auth_step) = theScheme.step()? {
28161            match auth_step {
28162                ::authentic::AuthenticationStep::Request(auth_request) => {
28163                    theScheme.respond(self.client.request(auth_request).await);
28164                }
28165                ::authentic::AuthenticationStep::WaitFor(duration) => {
28166                    (self.sleep)(duration).await;
28167                }
28168            }
28169        }
28170        let theBuilder = crate::v1_1_4::request::issues_unlock::http_builder(
28171            self.config.base_url.as_ref(),
28172            owner,
28173            repo,
28174            issue_number,
28175            self.config.user_agent.as_ref(),
28176            self.config.accept.as_deref(),
28177        )?
28178        .with_authentication(&theScheme)?;
28179
28180        let theRequest =
28181            crate::v1_1_4::request::issues_unlock::hyper_request(theBuilder)?;
28182
28183        ::log::debug!("HTTP request: {:?}", &theRequest);
28184
28185        let theResponse = self.client.request(theRequest).await?;
28186
28187        ::log::debug!("HTTP response: {:?}", &theResponse);
28188
28189        Ok(theResponse)
28190    }
28191
28192    /// List reactions for an issue
28193    /// 
28194    /// List the reactions to an [issue](https://docs.github.com/rest/reference/issues).
28195    /// 
28196    /// [API method documentation](https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue)
28197    pub async fn reactions_list_for_issue(
28198        &self,
28199        owner: &str,
28200        repo: &str,
28201        issue_number: i64,
28202        content: ::std::option::Option<&str>,
28203        per_page: ::std::option::Option<i64>,
28204        page: ::std::option::Option<i64>,
28205    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28206        let mut theScheme = AuthScheme::from(&self.config.authentication);
28207
28208        while let Some(auth_step) = theScheme.step()? {
28209            match auth_step {
28210                ::authentic::AuthenticationStep::Request(auth_request) => {
28211                    theScheme.respond(self.client.request(auth_request).await);
28212                }
28213                ::authentic::AuthenticationStep::WaitFor(duration) => {
28214                    (self.sleep)(duration).await;
28215                }
28216            }
28217        }
28218        let theBuilder = crate::v1_1_4::request::reactions_list_for_issue::http_builder(
28219            self.config.base_url.as_ref(),
28220            owner,
28221            repo,
28222            issue_number,
28223            content,
28224            per_page,
28225            page,
28226            self.config.user_agent.as_ref(),
28227            self.config.accept.as_deref(),
28228        )?
28229        .with_authentication(&theScheme)?;
28230
28231        let theRequest =
28232            crate::v1_1_4::request::reactions_list_for_issue::hyper_request(theBuilder)?;
28233
28234        ::log::debug!("HTTP request: {:?}", &theRequest);
28235
28236        let theResponse = self.client.request(theRequest).await?;
28237
28238        ::log::debug!("HTTP response: {:?}", &theResponse);
28239
28240        Ok(theResponse)
28241    }
28242
28243    /// Create reaction for an issue
28244    /// 
28245    /// Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue.
28246    /// 
28247    /// [API method documentation](https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue)
28248    ///
28249    /// # Content
28250    ///
28251    /// - [`&v1_1_4::request::reactions_create_for_issue::body::Json`](crate::v1_1_4::request::reactions_create_for_issue::body::Json)
28252    pub async fn reactions_create_for_issue<Content>(
28253        &self,
28254        owner: &str,
28255        repo: &str,
28256        issue_number: i64,
28257        theContent: Content,
28258    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
28259    where
28260        Content: Copy + TryInto<crate::v1_1_4::request::reactions_create_for_issue::Content<::hyper::Body>>,
28261        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::reactions_create_for_issue::Content<::hyper::Body>>>::Error>
28262    {
28263        let mut theScheme = AuthScheme::from(&self.config.authentication);
28264
28265        while let Some(auth_step) = theScheme.step()? {
28266            match auth_step {
28267                ::authentic::AuthenticationStep::Request(auth_request) => {
28268                    theScheme.respond(self.client.request(auth_request).await);
28269                }
28270                ::authentic::AuthenticationStep::WaitFor(duration) => {
28271                    (self.sleep)(duration).await;
28272                }
28273            }
28274        }
28275        let theBuilder = crate::v1_1_4::request::reactions_create_for_issue::http_builder(
28276            self.config.base_url.as_ref(),
28277            owner,
28278            repo,
28279            issue_number,
28280            self.config.user_agent.as_ref(),
28281            self.config.accept.as_deref(),
28282        )?
28283        .with_authentication(&theScheme)?;
28284
28285        let theRequest = crate::v1_1_4::request::reactions_create_for_issue::hyper_request(
28286            theBuilder,
28287            theContent.try_into()?,
28288        )?;
28289
28290        ::log::debug!("HTTP request: {:?}", &theRequest);
28291
28292        let theResponse = self.client.request(theRequest).await?;
28293
28294        ::log::debug!("HTTP response: {:?}", &theResponse);
28295
28296        Ok(theResponse)
28297    }
28298
28299    /// Delete an issue reaction
28300    /// 
28301    /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`.
28302    /// 
28303    /// Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/).
28304    /// 
28305    /// [API method documentation](https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction)
28306    pub async fn reactions_delete_for_issue(
28307        &self,
28308        owner: &str,
28309        repo: &str,
28310        issue_number: i64,
28311        reaction_id: i64,
28312    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28313        let mut theScheme = AuthScheme::from(&self.config.authentication);
28314
28315        while let Some(auth_step) = theScheme.step()? {
28316            match auth_step {
28317                ::authentic::AuthenticationStep::Request(auth_request) => {
28318                    theScheme.respond(self.client.request(auth_request).await);
28319                }
28320                ::authentic::AuthenticationStep::WaitFor(duration) => {
28321                    (self.sleep)(duration).await;
28322                }
28323            }
28324        }
28325        let theBuilder = crate::v1_1_4::request::reactions_delete_for_issue::http_builder(
28326            self.config.base_url.as_ref(),
28327            owner,
28328            repo,
28329            issue_number,
28330            reaction_id,
28331            self.config.user_agent.as_ref(),
28332            self.config.accept.as_deref(),
28333        )?
28334        .with_authentication(&theScheme)?;
28335
28336        let theRequest =
28337            crate::v1_1_4::request::reactions_delete_for_issue::hyper_request(theBuilder)?;
28338
28339        ::log::debug!("HTTP request: {:?}", &theRequest);
28340
28341        let theResponse = self.client.request(theRequest).await?;
28342
28343        ::log::debug!("HTTP response: {:?}", &theResponse);
28344
28345        Ok(theResponse)
28346    }
28347
28348    /// List timeline events for an issue
28349    /// 
28350    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue)
28351    pub async fn issues_list_events_for_timeline(
28352        &self,
28353        owner: &str,
28354        repo: &str,
28355        issue_number: i64,
28356        per_page: ::std::option::Option<i64>,
28357        page: ::std::option::Option<i64>,
28358    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28359        let mut theScheme = AuthScheme::from(&self.config.authentication);
28360
28361        while let Some(auth_step) = theScheme.step()? {
28362            match auth_step {
28363                ::authentic::AuthenticationStep::Request(auth_request) => {
28364                    theScheme.respond(self.client.request(auth_request).await);
28365                }
28366                ::authentic::AuthenticationStep::WaitFor(duration) => {
28367                    (self.sleep)(duration).await;
28368                }
28369            }
28370        }
28371        let theBuilder = crate::v1_1_4::request::issues_list_events_for_timeline::http_builder(
28372            self.config.base_url.as_ref(),
28373            owner,
28374            repo,
28375            issue_number,
28376            per_page,
28377            page,
28378            self.config.user_agent.as_ref(),
28379            self.config.accept.as_deref(),
28380        )?
28381        .with_authentication(&theScheme)?;
28382
28383        let theRequest =
28384            crate::v1_1_4::request::issues_list_events_for_timeline::hyper_request(theBuilder)?;
28385
28386        ::log::debug!("HTTP request: {:?}", &theRequest);
28387
28388        let theResponse = self.client.request(theRequest).await?;
28389
28390        ::log::debug!("HTTP response: {:?}", &theResponse);
28391
28392        Ok(theResponse)
28393    }
28394
28395    /// List deploy keys
28396    /// 
28397    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-deploy-keys)
28398    pub async fn repos_list_deploy_keys(
28399        &self,
28400        owner: &str,
28401        repo: &str,
28402        per_page: ::std::option::Option<i64>,
28403        page: ::std::option::Option<i64>,
28404    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28405        let mut theScheme = AuthScheme::from(&self.config.authentication);
28406
28407        while let Some(auth_step) = theScheme.step()? {
28408            match auth_step {
28409                ::authentic::AuthenticationStep::Request(auth_request) => {
28410                    theScheme.respond(self.client.request(auth_request).await);
28411                }
28412                ::authentic::AuthenticationStep::WaitFor(duration) => {
28413                    (self.sleep)(duration).await;
28414                }
28415            }
28416        }
28417        let theBuilder = crate::v1_1_4::request::repos_list_deploy_keys::http_builder(
28418            self.config.base_url.as_ref(),
28419            owner,
28420            repo,
28421            per_page,
28422            page,
28423            self.config.user_agent.as_ref(),
28424            self.config.accept.as_deref(),
28425        )?
28426        .with_authentication(&theScheme)?;
28427
28428        let theRequest =
28429            crate::v1_1_4::request::repos_list_deploy_keys::hyper_request(theBuilder)?;
28430
28431        ::log::debug!("HTTP request: {:?}", &theRequest);
28432
28433        let theResponse = self.client.request(theRequest).await?;
28434
28435        ::log::debug!("HTTP response: {:?}", &theResponse);
28436
28437        Ok(theResponse)
28438    }
28439
28440    /// Create a deploy key
28441    /// 
28442    /// You can create a read-only deploy key.
28443    /// 
28444    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-a-deploy-key)
28445    ///
28446    /// # Content
28447    ///
28448    /// - [`&v1_1_4::request::repos_create_deploy_key::body::Json`](crate::v1_1_4::request::repos_create_deploy_key::body::Json)
28449    pub async fn repos_create_deploy_key<Content>(
28450        &self,
28451        owner: &str,
28452        repo: &str,
28453        theContent: Content,
28454    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
28455    where
28456        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_deploy_key::Content<::hyper::Body>>,
28457        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_deploy_key::Content<::hyper::Body>>>::Error>
28458    {
28459        let mut theScheme = AuthScheme::from(&self.config.authentication);
28460
28461        while let Some(auth_step) = theScheme.step()? {
28462            match auth_step {
28463                ::authentic::AuthenticationStep::Request(auth_request) => {
28464                    theScheme.respond(self.client.request(auth_request).await);
28465                }
28466                ::authentic::AuthenticationStep::WaitFor(duration) => {
28467                    (self.sleep)(duration).await;
28468                }
28469            }
28470        }
28471        let theBuilder = crate::v1_1_4::request::repos_create_deploy_key::http_builder(
28472            self.config.base_url.as_ref(),
28473            owner,
28474            repo,
28475            self.config.user_agent.as_ref(),
28476            self.config.accept.as_deref(),
28477        )?
28478        .with_authentication(&theScheme)?;
28479
28480        let theRequest = crate::v1_1_4::request::repos_create_deploy_key::hyper_request(
28481            theBuilder,
28482            theContent.try_into()?,
28483        )?;
28484
28485        ::log::debug!("HTTP request: {:?}", &theRequest);
28486
28487        let theResponse = self.client.request(theRequest).await?;
28488
28489        ::log::debug!("HTTP response: {:?}", &theResponse);
28490
28491        Ok(theResponse)
28492    }
28493
28494    /// Get a deploy key
28495    /// 
28496    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-deploy-key)
28497    pub async fn repos_get_deploy_key(
28498        &self,
28499        owner: &str,
28500        repo: &str,
28501        key_id: i64,
28502    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28503        let mut theScheme = AuthScheme::from(&self.config.authentication);
28504
28505        while let Some(auth_step) = theScheme.step()? {
28506            match auth_step {
28507                ::authentic::AuthenticationStep::Request(auth_request) => {
28508                    theScheme.respond(self.client.request(auth_request).await);
28509                }
28510                ::authentic::AuthenticationStep::WaitFor(duration) => {
28511                    (self.sleep)(duration).await;
28512                }
28513            }
28514        }
28515        let theBuilder = crate::v1_1_4::request::repos_get_deploy_key::http_builder(
28516            self.config.base_url.as_ref(),
28517            owner,
28518            repo,
28519            key_id,
28520            self.config.user_agent.as_ref(),
28521            self.config.accept.as_deref(),
28522        )?
28523        .with_authentication(&theScheme)?;
28524
28525        let theRequest =
28526            crate::v1_1_4::request::repos_get_deploy_key::hyper_request(theBuilder)?;
28527
28528        ::log::debug!("HTTP request: {:?}", &theRequest);
28529
28530        let theResponse = self.client.request(theRequest).await?;
28531
28532        ::log::debug!("HTTP response: {:?}", &theResponse);
28533
28534        Ok(theResponse)
28535    }
28536
28537    /// Delete a deploy key
28538    /// 
28539    /// Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead.
28540    /// 
28541    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-a-deploy-key)
28542    pub async fn repos_delete_deploy_key(
28543        &self,
28544        owner: &str,
28545        repo: &str,
28546        key_id: i64,
28547    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28548        let mut theScheme = AuthScheme::from(&self.config.authentication);
28549
28550        while let Some(auth_step) = theScheme.step()? {
28551            match auth_step {
28552                ::authentic::AuthenticationStep::Request(auth_request) => {
28553                    theScheme.respond(self.client.request(auth_request).await);
28554                }
28555                ::authentic::AuthenticationStep::WaitFor(duration) => {
28556                    (self.sleep)(duration).await;
28557                }
28558            }
28559        }
28560        let theBuilder = crate::v1_1_4::request::repos_delete_deploy_key::http_builder(
28561            self.config.base_url.as_ref(),
28562            owner,
28563            repo,
28564            key_id,
28565            self.config.user_agent.as_ref(),
28566            self.config.accept.as_deref(),
28567        )?
28568        .with_authentication(&theScheme)?;
28569
28570        let theRequest =
28571            crate::v1_1_4::request::repos_delete_deploy_key::hyper_request(theBuilder)?;
28572
28573        ::log::debug!("HTTP request: {:?}", &theRequest);
28574
28575        let theResponse = self.client.request(theRequest).await?;
28576
28577        ::log::debug!("HTTP response: {:?}", &theResponse);
28578
28579        Ok(theResponse)
28580    }
28581
28582    /// List labels for a repository
28583    /// 
28584    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-labels-for-a-repository)
28585    pub async fn issues_list_labels_for_repo(
28586        &self,
28587        owner: &str,
28588        repo: &str,
28589        per_page: ::std::option::Option<i64>,
28590        page: ::std::option::Option<i64>,
28591    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28592        let mut theScheme = AuthScheme::from(&self.config.authentication);
28593
28594        while let Some(auth_step) = theScheme.step()? {
28595            match auth_step {
28596                ::authentic::AuthenticationStep::Request(auth_request) => {
28597                    theScheme.respond(self.client.request(auth_request).await);
28598                }
28599                ::authentic::AuthenticationStep::WaitFor(duration) => {
28600                    (self.sleep)(duration).await;
28601                }
28602            }
28603        }
28604        let theBuilder = crate::v1_1_4::request::issues_list_labels_for_repo::http_builder(
28605            self.config.base_url.as_ref(),
28606            owner,
28607            repo,
28608            per_page,
28609            page,
28610            self.config.user_agent.as_ref(),
28611            self.config.accept.as_deref(),
28612        )?
28613        .with_authentication(&theScheme)?;
28614
28615        let theRequest =
28616            crate::v1_1_4::request::issues_list_labels_for_repo::hyper_request(theBuilder)?;
28617
28618        ::log::debug!("HTTP request: {:?}", &theRequest);
28619
28620        let theResponse = self.client.request(theRequest).await?;
28621
28622        ::log::debug!("HTTP response: {:?}", &theResponse);
28623
28624        Ok(theResponse)
28625    }
28626
28627    /// Create a label
28628    /// 
28629    /// [API method documentation](https://docs.github.com/rest/reference/issues#create-a-label)
28630    ///
28631    /// # Content
28632    ///
28633    /// - [`&v1_1_4::request::issues_create_label::body::Json`](crate::v1_1_4::request::issues_create_label::body::Json)
28634    pub async fn issues_create_label<Content>(
28635        &self,
28636        owner: &str,
28637        repo: &str,
28638        theContent: Content,
28639    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
28640    where
28641        Content: Copy + TryInto<crate::v1_1_4::request::issues_create_label::Content<::hyper::Body>>,
28642        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::issues_create_label::Content<::hyper::Body>>>::Error>
28643    {
28644        let mut theScheme = AuthScheme::from(&self.config.authentication);
28645
28646        while let Some(auth_step) = theScheme.step()? {
28647            match auth_step {
28648                ::authentic::AuthenticationStep::Request(auth_request) => {
28649                    theScheme.respond(self.client.request(auth_request).await);
28650                }
28651                ::authentic::AuthenticationStep::WaitFor(duration) => {
28652                    (self.sleep)(duration).await;
28653                }
28654            }
28655        }
28656        let theBuilder = crate::v1_1_4::request::issues_create_label::http_builder(
28657            self.config.base_url.as_ref(),
28658            owner,
28659            repo,
28660            self.config.user_agent.as_ref(),
28661            self.config.accept.as_deref(),
28662        )?
28663        .with_authentication(&theScheme)?;
28664
28665        let theRequest = crate::v1_1_4::request::issues_create_label::hyper_request(
28666            theBuilder,
28667            theContent.try_into()?,
28668        )?;
28669
28670        ::log::debug!("HTTP request: {:?}", &theRequest);
28671
28672        let theResponse = self.client.request(theRequest).await?;
28673
28674        ::log::debug!("HTTP response: {:?}", &theResponse);
28675
28676        Ok(theResponse)
28677    }
28678
28679    /// Get a label
28680    /// 
28681    /// [API method documentation](https://docs.github.com/rest/reference/issues#get-a-label)
28682    pub async fn issues_get_label(
28683        &self,
28684        owner: &str,
28685        repo: &str,
28686        name: &str,
28687    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28688        let mut theScheme = AuthScheme::from(&self.config.authentication);
28689
28690        while let Some(auth_step) = theScheme.step()? {
28691            match auth_step {
28692                ::authentic::AuthenticationStep::Request(auth_request) => {
28693                    theScheme.respond(self.client.request(auth_request).await);
28694                }
28695                ::authentic::AuthenticationStep::WaitFor(duration) => {
28696                    (self.sleep)(duration).await;
28697                }
28698            }
28699        }
28700        let theBuilder = crate::v1_1_4::request::issues_get_label::http_builder(
28701            self.config.base_url.as_ref(),
28702            owner,
28703            repo,
28704            name,
28705            self.config.user_agent.as_ref(),
28706            self.config.accept.as_deref(),
28707        )?
28708        .with_authentication(&theScheme)?;
28709
28710        let theRequest =
28711            crate::v1_1_4::request::issues_get_label::hyper_request(theBuilder)?;
28712
28713        ::log::debug!("HTTP request: {:?}", &theRequest);
28714
28715        let theResponse = self.client.request(theRequest).await?;
28716
28717        ::log::debug!("HTTP response: {:?}", &theResponse);
28718
28719        Ok(theResponse)
28720    }
28721
28722    /// Delete a label
28723    /// 
28724    /// [API method documentation](https://docs.github.com/rest/reference/issues#delete-a-label)
28725    pub async fn issues_delete_label(
28726        &self,
28727        owner: &str,
28728        repo: &str,
28729        name: &str,
28730    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28731        let mut theScheme = AuthScheme::from(&self.config.authentication);
28732
28733        while let Some(auth_step) = theScheme.step()? {
28734            match auth_step {
28735                ::authentic::AuthenticationStep::Request(auth_request) => {
28736                    theScheme.respond(self.client.request(auth_request).await);
28737                }
28738                ::authentic::AuthenticationStep::WaitFor(duration) => {
28739                    (self.sleep)(duration).await;
28740                }
28741            }
28742        }
28743        let theBuilder = crate::v1_1_4::request::issues_delete_label::http_builder(
28744            self.config.base_url.as_ref(),
28745            owner,
28746            repo,
28747            name,
28748            self.config.user_agent.as_ref(),
28749            self.config.accept.as_deref(),
28750        )?
28751        .with_authentication(&theScheme)?;
28752
28753        let theRequest =
28754            crate::v1_1_4::request::issues_delete_label::hyper_request(theBuilder)?;
28755
28756        ::log::debug!("HTTP request: {:?}", &theRequest);
28757
28758        let theResponse = self.client.request(theRequest).await?;
28759
28760        ::log::debug!("HTTP response: {:?}", &theResponse);
28761
28762        Ok(theResponse)
28763    }
28764
28765    /// Update a label
28766    /// 
28767    /// [API method documentation](https://docs.github.com/rest/reference/issues#update-a-label)
28768    ///
28769    /// # Content
28770    ///
28771    /// - [`&v1_1_4::request::issues_update_label::body::Json`](crate::v1_1_4::request::issues_update_label::body::Json)
28772    pub async fn issues_update_label<Content>(
28773        &self,
28774        owner: &str,
28775        repo: &str,
28776        name: &str,
28777        theContent: Content,
28778    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
28779    where
28780        Content: Copy + TryInto<crate::v1_1_4::request::issues_update_label::Content<::hyper::Body>>,
28781        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::issues_update_label::Content<::hyper::Body>>>::Error>
28782    {
28783        let mut theScheme = AuthScheme::from(&self.config.authentication);
28784
28785        while let Some(auth_step) = theScheme.step()? {
28786            match auth_step {
28787                ::authentic::AuthenticationStep::Request(auth_request) => {
28788                    theScheme.respond(self.client.request(auth_request).await);
28789                }
28790                ::authentic::AuthenticationStep::WaitFor(duration) => {
28791                    (self.sleep)(duration).await;
28792                }
28793            }
28794        }
28795        let theBuilder = crate::v1_1_4::request::issues_update_label::http_builder(
28796            self.config.base_url.as_ref(),
28797            owner,
28798            repo,
28799            name,
28800            self.config.user_agent.as_ref(),
28801            self.config.accept.as_deref(),
28802        )?
28803        .with_authentication(&theScheme)?;
28804
28805        let theRequest = crate::v1_1_4::request::issues_update_label::hyper_request(
28806            theBuilder,
28807            theContent.try_into()?,
28808        )?;
28809
28810        ::log::debug!("HTTP request: {:?}", &theRequest);
28811
28812        let theResponse = self.client.request(theRequest).await?;
28813
28814        ::log::debug!("HTTP response: {:?}", &theResponse);
28815
28816        Ok(theResponse)
28817    }
28818
28819    /// List repository languages
28820    /// 
28821    /// Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language.
28822    /// 
28823    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-repository-languages)
28824    pub async fn repos_list_languages(
28825        &self,
28826        owner: &str,
28827        repo: &str,
28828    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28829        let mut theScheme = AuthScheme::from(&self.config.authentication);
28830
28831        while let Some(auth_step) = theScheme.step()? {
28832            match auth_step {
28833                ::authentic::AuthenticationStep::Request(auth_request) => {
28834                    theScheme.respond(self.client.request(auth_request).await);
28835                }
28836                ::authentic::AuthenticationStep::WaitFor(duration) => {
28837                    (self.sleep)(duration).await;
28838                }
28839            }
28840        }
28841        let theBuilder = crate::v1_1_4::request::repos_list_languages::http_builder(
28842            self.config.base_url.as_ref(),
28843            owner,
28844            repo,
28845            self.config.user_agent.as_ref(),
28846            self.config.accept.as_deref(),
28847        )?
28848        .with_authentication(&theScheme)?;
28849
28850        let theRequest =
28851            crate::v1_1_4::request::repos_list_languages::hyper_request(theBuilder)?;
28852
28853        ::log::debug!("HTTP request: {:?}", &theRequest);
28854
28855        let theResponse = self.client.request(theRequest).await?;
28856
28857        ::log::debug!("HTTP response: {:?}", &theResponse);
28858
28859        Ok(theResponse)
28860    }
28861
28862    /// Enable Git LFS for a repository
28863    /// 
28864    /// [API method documentation](https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository)
28865    pub async fn repos_enable_lfs_for_repo(
28866        &self,
28867        owner: &str,
28868        repo: &str,
28869    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28870        let mut theScheme = AuthScheme::from(&self.config.authentication);
28871
28872        while let Some(auth_step) = theScheme.step()? {
28873            match auth_step {
28874                ::authentic::AuthenticationStep::Request(auth_request) => {
28875                    theScheme.respond(self.client.request(auth_request).await);
28876                }
28877                ::authentic::AuthenticationStep::WaitFor(duration) => {
28878                    (self.sleep)(duration).await;
28879                }
28880            }
28881        }
28882        let theBuilder = crate::v1_1_4::request::repos_enable_lfs_for_repo::http_builder(
28883            self.config.base_url.as_ref(),
28884            owner,
28885            repo,
28886            self.config.user_agent.as_ref(),
28887            self.config.accept.as_deref(),
28888        )?
28889        .with_authentication(&theScheme)?;
28890
28891        let theRequest =
28892            crate::v1_1_4::request::repos_enable_lfs_for_repo::hyper_request(theBuilder)?;
28893
28894        ::log::debug!("HTTP request: {:?}", &theRequest);
28895
28896        let theResponse = self.client.request(theRequest).await?;
28897
28898        ::log::debug!("HTTP response: {:?}", &theResponse);
28899
28900        Ok(theResponse)
28901    }
28902
28903    /// Disable Git LFS for a repository
28904    /// 
28905    /// [API method documentation](https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository)
28906    pub async fn repos_disable_lfs_for_repo(
28907        &self,
28908        owner: &str,
28909        repo: &str,
28910    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28911        let mut theScheme = AuthScheme::from(&self.config.authentication);
28912
28913        while let Some(auth_step) = theScheme.step()? {
28914            match auth_step {
28915                ::authentic::AuthenticationStep::Request(auth_request) => {
28916                    theScheme.respond(self.client.request(auth_request).await);
28917                }
28918                ::authentic::AuthenticationStep::WaitFor(duration) => {
28919                    (self.sleep)(duration).await;
28920                }
28921            }
28922        }
28923        let theBuilder = crate::v1_1_4::request::repos_disable_lfs_for_repo::http_builder(
28924            self.config.base_url.as_ref(),
28925            owner,
28926            repo,
28927            self.config.user_agent.as_ref(),
28928            self.config.accept.as_deref(),
28929        )?
28930        .with_authentication(&theScheme)?;
28931
28932        let theRequest =
28933            crate::v1_1_4::request::repos_disable_lfs_for_repo::hyper_request(theBuilder)?;
28934
28935        ::log::debug!("HTTP request: {:?}", &theRequest);
28936
28937        let theResponse = self.client.request(theRequest).await?;
28938
28939        ::log::debug!("HTTP response: {:?}", &theResponse);
28940
28941        Ok(theResponse)
28942    }
28943
28944    /// Get the license for a repository
28945    /// 
28946    /// This method returns the contents of the repository's license file, if one is detected.
28947    /// 
28948    /// Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML.
28949    /// 
28950    /// [API method documentation](https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository)
28951    pub async fn licenses_get_for_repo(
28952        &self,
28953        owner: &str,
28954        repo: &str,
28955    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
28956        let mut theScheme = AuthScheme::from(&self.config.authentication);
28957
28958        while let Some(auth_step) = theScheme.step()? {
28959            match auth_step {
28960                ::authentic::AuthenticationStep::Request(auth_request) => {
28961                    theScheme.respond(self.client.request(auth_request).await);
28962                }
28963                ::authentic::AuthenticationStep::WaitFor(duration) => {
28964                    (self.sleep)(duration).await;
28965                }
28966            }
28967        }
28968        let theBuilder = crate::v1_1_4::request::licenses_get_for_repo::http_builder(
28969            self.config.base_url.as_ref(),
28970            owner,
28971            repo,
28972            self.config.user_agent.as_ref(),
28973            self.config.accept.as_deref(),
28974        )?
28975        .with_authentication(&theScheme)?;
28976
28977        let theRequest =
28978            crate::v1_1_4::request::licenses_get_for_repo::hyper_request(theBuilder)?;
28979
28980        ::log::debug!("HTTP request: {:?}", &theRequest);
28981
28982        let theResponse = self.client.request(theRequest).await?;
28983
28984        ::log::debug!("HTTP response: {:?}", &theResponse);
28985
28986        Ok(theResponse)
28987    }
28988
28989    /// Sync a fork branch with the upstream repository
28990    /// 
28991    /// Sync a branch of a forked repository to keep it up-to-date with the upstream repository.
28992    /// 
28993    /// [API method documentation](https://docs.github.com/rest/reference/repos#sync-a-fork-branch-with-the-upstream-repository)
28994    ///
28995    /// # Content
28996    ///
28997    /// - [`&v1_1_4::request::repos_merge_upstream::body::Json`](crate::v1_1_4::request::repos_merge_upstream::body::Json)
28998    pub async fn repos_merge_upstream<Content>(
28999        &self,
29000        owner: &str,
29001        repo: &str,
29002        theContent: Content,
29003    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
29004    where
29005        Content: Copy + TryInto<crate::v1_1_4::request::repos_merge_upstream::Content<::hyper::Body>>,
29006        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_merge_upstream::Content<::hyper::Body>>>::Error>
29007    {
29008        let mut theScheme = AuthScheme::from(&self.config.authentication);
29009
29010        while let Some(auth_step) = theScheme.step()? {
29011            match auth_step {
29012                ::authentic::AuthenticationStep::Request(auth_request) => {
29013                    theScheme.respond(self.client.request(auth_request).await);
29014                }
29015                ::authentic::AuthenticationStep::WaitFor(duration) => {
29016                    (self.sleep)(duration).await;
29017                }
29018            }
29019        }
29020        let theBuilder = crate::v1_1_4::request::repos_merge_upstream::http_builder(
29021            self.config.base_url.as_ref(),
29022            owner,
29023            repo,
29024            self.config.user_agent.as_ref(),
29025            self.config.accept.as_deref(),
29026        )?
29027        .with_authentication(&theScheme)?;
29028
29029        let theRequest = crate::v1_1_4::request::repos_merge_upstream::hyper_request(
29030            theBuilder,
29031            theContent.try_into()?,
29032        )?;
29033
29034        ::log::debug!("HTTP request: {:?}", &theRequest);
29035
29036        let theResponse = self.client.request(theRequest).await?;
29037
29038        ::log::debug!("HTTP response: {:?}", &theResponse);
29039
29040        Ok(theResponse)
29041    }
29042
29043    /// Merge a branch
29044    /// 
29045    /// [API method documentation](https://docs.github.com/rest/reference/repos#merge-a-branch)
29046    ///
29047    /// # Content
29048    ///
29049    /// - [`&v1_1_4::request::repos_merge::body::Json`](crate::v1_1_4::request::repos_merge::body::Json)
29050    pub async fn repos_merge<Content>(
29051        &self,
29052        owner: &str,
29053        repo: &str,
29054        theContent: Content,
29055    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
29056    where
29057        Content: Copy + TryInto<crate::v1_1_4::request::repos_merge::Content<::hyper::Body>>,
29058        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_merge::Content<::hyper::Body>>>::Error>
29059    {
29060        let mut theScheme = AuthScheme::from(&self.config.authentication);
29061
29062        while let Some(auth_step) = theScheme.step()? {
29063            match auth_step {
29064                ::authentic::AuthenticationStep::Request(auth_request) => {
29065                    theScheme.respond(self.client.request(auth_request).await);
29066                }
29067                ::authentic::AuthenticationStep::WaitFor(duration) => {
29068                    (self.sleep)(duration).await;
29069                }
29070            }
29071        }
29072        let theBuilder = crate::v1_1_4::request::repos_merge::http_builder(
29073            self.config.base_url.as_ref(),
29074            owner,
29075            repo,
29076            self.config.user_agent.as_ref(),
29077            self.config.accept.as_deref(),
29078        )?
29079        .with_authentication(&theScheme)?;
29080
29081        let theRequest = crate::v1_1_4::request::repos_merge::hyper_request(
29082            theBuilder,
29083            theContent.try_into()?,
29084        )?;
29085
29086        ::log::debug!("HTTP request: {:?}", &theRequest);
29087
29088        let theResponse = self.client.request(theRequest).await?;
29089
29090        ::log::debug!("HTTP response: {:?}", &theResponse);
29091
29092        Ok(theResponse)
29093    }
29094
29095    /// List milestones
29096    /// 
29097    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-milestones)
29098    pub async fn issues_list_milestones(
29099        &self,
29100        owner: &str,
29101        repo: &str,
29102        state: ::std::option::Option<&str>,
29103        sort: &crate::types::Sort<'_>,
29104        per_page: ::std::option::Option<i64>,
29105        page: ::std::option::Option<i64>,
29106    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
29107        let (sort, direction) = sort.extract();
29108        let mut theScheme = AuthScheme::from(&self.config.authentication);
29109
29110        while let Some(auth_step) = theScheme.step()? {
29111            match auth_step {
29112                ::authentic::AuthenticationStep::Request(auth_request) => {
29113                    theScheme.respond(self.client.request(auth_request).await);
29114                }
29115                ::authentic::AuthenticationStep::WaitFor(duration) => {
29116                    (self.sleep)(duration).await;
29117                }
29118            }
29119        }
29120        let theBuilder = crate::v1_1_4::request::issues_list_milestones::http_builder(
29121            self.config.base_url.as_ref(),
29122            owner,
29123            repo,
29124            state,
29125            sort,
29126            direction,
29127            per_page,
29128            page,
29129            self.config.user_agent.as_ref(),
29130            self.config.accept.as_deref(),
29131        )?
29132        .with_authentication(&theScheme)?;
29133
29134        let theRequest =
29135            crate::v1_1_4::request::issues_list_milestones::hyper_request(theBuilder)?;
29136
29137        ::log::debug!("HTTP request: {:?}", &theRequest);
29138
29139        let theResponse = self.client.request(theRequest).await?;
29140
29141        ::log::debug!("HTTP response: {:?}", &theResponse);
29142
29143        Ok(theResponse)
29144    }
29145
29146    /// Create a milestone
29147    /// 
29148    /// [API method documentation](https://docs.github.com/rest/reference/issues#create-a-milestone)
29149    ///
29150    /// # Content
29151    ///
29152    /// - [`&v1_1_4::request::issues_create_milestone::body::Json`](crate::v1_1_4::request::issues_create_milestone::body::Json)
29153    pub async fn issues_create_milestone<Content>(
29154        &self,
29155        owner: &str,
29156        repo: &str,
29157        theContent: Content,
29158    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
29159    where
29160        Content: Copy + TryInto<crate::v1_1_4::request::issues_create_milestone::Content<::hyper::Body>>,
29161        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::issues_create_milestone::Content<::hyper::Body>>>::Error>
29162    {
29163        let mut theScheme = AuthScheme::from(&self.config.authentication);
29164
29165        while let Some(auth_step) = theScheme.step()? {
29166            match auth_step {
29167                ::authentic::AuthenticationStep::Request(auth_request) => {
29168                    theScheme.respond(self.client.request(auth_request).await);
29169                }
29170                ::authentic::AuthenticationStep::WaitFor(duration) => {
29171                    (self.sleep)(duration).await;
29172                }
29173            }
29174        }
29175        let theBuilder = crate::v1_1_4::request::issues_create_milestone::http_builder(
29176            self.config.base_url.as_ref(),
29177            owner,
29178            repo,
29179            self.config.user_agent.as_ref(),
29180            self.config.accept.as_deref(),
29181        )?
29182        .with_authentication(&theScheme)?;
29183
29184        let theRequest = crate::v1_1_4::request::issues_create_milestone::hyper_request(
29185            theBuilder,
29186            theContent.try_into()?,
29187        )?;
29188
29189        ::log::debug!("HTTP request: {:?}", &theRequest);
29190
29191        let theResponse = self.client.request(theRequest).await?;
29192
29193        ::log::debug!("HTTP response: {:?}", &theResponse);
29194
29195        Ok(theResponse)
29196    }
29197
29198    /// Get a milestone
29199    /// 
29200    /// [API method documentation](https://docs.github.com/rest/reference/issues#get-a-milestone)
29201    pub async fn issues_get_milestone(
29202        &self,
29203        owner: &str,
29204        repo: &str,
29205        milestone_number: i64,
29206    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
29207        let mut theScheme = AuthScheme::from(&self.config.authentication);
29208
29209        while let Some(auth_step) = theScheme.step()? {
29210            match auth_step {
29211                ::authentic::AuthenticationStep::Request(auth_request) => {
29212                    theScheme.respond(self.client.request(auth_request).await);
29213                }
29214                ::authentic::AuthenticationStep::WaitFor(duration) => {
29215                    (self.sleep)(duration).await;
29216                }
29217            }
29218        }
29219        let theBuilder = crate::v1_1_4::request::issues_get_milestone::http_builder(
29220            self.config.base_url.as_ref(),
29221            owner,
29222            repo,
29223            milestone_number,
29224            self.config.user_agent.as_ref(),
29225            self.config.accept.as_deref(),
29226        )?
29227        .with_authentication(&theScheme)?;
29228
29229        let theRequest =
29230            crate::v1_1_4::request::issues_get_milestone::hyper_request(theBuilder)?;
29231
29232        ::log::debug!("HTTP request: {:?}", &theRequest);
29233
29234        let theResponse = self.client.request(theRequest).await?;
29235
29236        ::log::debug!("HTTP response: {:?}", &theResponse);
29237
29238        Ok(theResponse)
29239    }
29240
29241    /// Delete a milestone
29242    /// 
29243    /// [API method documentation](https://docs.github.com/rest/reference/issues#delete-a-milestone)
29244    pub async fn issues_delete_milestone(
29245        &self,
29246        owner: &str,
29247        repo: &str,
29248        milestone_number: i64,
29249    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
29250        let mut theScheme = AuthScheme::from(&self.config.authentication);
29251
29252        while let Some(auth_step) = theScheme.step()? {
29253            match auth_step {
29254                ::authentic::AuthenticationStep::Request(auth_request) => {
29255                    theScheme.respond(self.client.request(auth_request).await);
29256                }
29257                ::authentic::AuthenticationStep::WaitFor(duration) => {
29258                    (self.sleep)(duration).await;
29259                }
29260            }
29261        }
29262        let theBuilder = crate::v1_1_4::request::issues_delete_milestone::http_builder(
29263            self.config.base_url.as_ref(),
29264            owner,
29265            repo,
29266            milestone_number,
29267            self.config.user_agent.as_ref(),
29268            self.config.accept.as_deref(),
29269        )?
29270        .with_authentication(&theScheme)?;
29271
29272        let theRequest =
29273            crate::v1_1_4::request::issues_delete_milestone::hyper_request(theBuilder)?;
29274
29275        ::log::debug!("HTTP request: {:?}", &theRequest);
29276
29277        let theResponse = self.client.request(theRequest).await?;
29278
29279        ::log::debug!("HTTP response: {:?}", &theResponse);
29280
29281        Ok(theResponse)
29282    }
29283
29284    /// Update a milestone
29285    /// 
29286    /// [API method documentation](https://docs.github.com/rest/reference/issues#update-a-milestone)
29287    ///
29288    /// # Content
29289    ///
29290    /// - [`&v1_1_4::request::issues_update_milestone::body::Json`](crate::v1_1_4::request::issues_update_milestone::body::Json)
29291    pub async fn issues_update_milestone<Content>(
29292        &self,
29293        owner: &str,
29294        repo: &str,
29295        milestone_number: i64,
29296        theContent: Content,
29297    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
29298    where
29299        Content: Copy + TryInto<crate::v1_1_4::request::issues_update_milestone::Content<::hyper::Body>>,
29300        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::issues_update_milestone::Content<::hyper::Body>>>::Error>
29301    {
29302        let mut theScheme = AuthScheme::from(&self.config.authentication);
29303
29304        while let Some(auth_step) = theScheme.step()? {
29305            match auth_step {
29306                ::authentic::AuthenticationStep::Request(auth_request) => {
29307                    theScheme.respond(self.client.request(auth_request).await);
29308                }
29309                ::authentic::AuthenticationStep::WaitFor(duration) => {
29310                    (self.sleep)(duration).await;
29311                }
29312            }
29313        }
29314        let theBuilder = crate::v1_1_4::request::issues_update_milestone::http_builder(
29315            self.config.base_url.as_ref(),
29316            owner,
29317            repo,
29318            milestone_number,
29319            self.config.user_agent.as_ref(),
29320            self.config.accept.as_deref(),
29321        )?
29322        .with_authentication(&theScheme)?;
29323
29324        let theRequest = crate::v1_1_4::request::issues_update_milestone::hyper_request(
29325            theBuilder,
29326            theContent.try_into()?,
29327        )?;
29328
29329        ::log::debug!("HTTP request: {:?}", &theRequest);
29330
29331        let theResponse = self.client.request(theRequest).await?;
29332
29333        ::log::debug!("HTTP response: {:?}", &theResponse);
29334
29335        Ok(theResponse)
29336    }
29337
29338    /// List labels for issues in a milestone
29339    /// 
29340    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone)
29341    pub async fn issues_list_labels_for_milestone(
29342        &self,
29343        owner: &str,
29344        repo: &str,
29345        milestone_number: i64,
29346        per_page: ::std::option::Option<i64>,
29347        page: ::std::option::Option<i64>,
29348    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
29349        let mut theScheme = AuthScheme::from(&self.config.authentication);
29350
29351        while let Some(auth_step) = theScheme.step()? {
29352            match auth_step {
29353                ::authentic::AuthenticationStep::Request(auth_request) => {
29354                    theScheme.respond(self.client.request(auth_request).await);
29355                }
29356                ::authentic::AuthenticationStep::WaitFor(duration) => {
29357                    (self.sleep)(duration).await;
29358                }
29359            }
29360        }
29361        let theBuilder = crate::v1_1_4::request::issues_list_labels_for_milestone::http_builder(
29362            self.config.base_url.as_ref(),
29363            owner,
29364            repo,
29365            milestone_number,
29366            per_page,
29367            page,
29368            self.config.user_agent.as_ref(),
29369            self.config.accept.as_deref(),
29370        )?
29371        .with_authentication(&theScheme)?;
29372
29373        let theRequest =
29374            crate::v1_1_4::request::issues_list_labels_for_milestone::hyper_request(theBuilder)?;
29375
29376        ::log::debug!("HTTP request: {:?}", &theRequest);
29377
29378        let theResponse = self.client.request(theRequest).await?;
29379
29380        ::log::debug!("HTTP response: {:?}", &theResponse);
29381
29382        Ok(theResponse)
29383    }
29384
29385    /// List repository notifications for the authenticated user
29386    /// 
29387    /// List all notifications for the current user.
29388    /// 
29389    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user)
29390    #[allow(clippy::too_many_arguments)]
29391    pub async fn activity_list_repo_notifications_for_authenticated_user(
29392        &self,
29393        owner: &str,
29394        repo: &str,
29395        all: ::std::option::Option<bool>,
29396        participating: ::std::option::Option<bool>,
29397        since: ::std::option::Option<&str>,
29398        before: ::std::option::Option<&str>,
29399        per_page: ::std::option::Option<i64>,
29400        page: ::std::option::Option<i64>,
29401    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
29402        let mut theScheme = AuthScheme::from(&self.config.authentication);
29403
29404        while let Some(auth_step) = theScheme.step()? {
29405            match auth_step {
29406                ::authentic::AuthenticationStep::Request(auth_request) => {
29407                    theScheme.respond(self.client.request(auth_request).await);
29408                }
29409                ::authentic::AuthenticationStep::WaitFor(duration) => {
29410                    (self.sleep)(duration).await;
29411                }
29412            }
29413        }
29414        let theBuilder = crate::v1_1_4::request::activity_list_repo_notifications_for_authenticated_user::http_builder(
29415            self.config.base_url.as_ref(),
29416            owner,
29417            repo,
29418            all,
29419            participating,
29420            since,
29421            before,
29422            per_page,
29423            page,
29424            self.config.user_agent.as_ref(),
29425            self.config.accept.as_deref(),
29426        )?
29427        .with_authentication(&theScheme)?;
29428
29429        let theRequest =
29430            crate::v1_1_4::request::activity_list_repo_notifications_for_authenticated_user::hyper_request(theBuilder)?;
29431
29432        ::log::debug!("HTTP request: {:?}", &theRequest);
29433
29434        let theResponse = self.client.request(theRequest).await?;
29435
29436        ::log::debug!("HTTP response: {:?}", &theResponse);
29437
29438        Ok(theResponse)
29439    }
29440
29441    /// Mark repository notifications as read
29442    /// 
29443    /// Marks all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`.
29444    /// 
29445    /// [API method documentation](https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read)
29446    ///
29447    /// # Content
29448    ///
29449    /// - [`&v1_1_4::request::activity_mark_repo_notifications_as_read::body::Json`](crate::v1_1_4::request::activity_mark_repo_notifications_as_read::body::Json)
29450    pub async fn activity_mark_repo_notifications_as_read<Content>(
29451        &self,
29452        owner: &str,
29453        repo: &str,
29454        theContent: Content,
29455    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
29456    where
29457        Content: Copy + TryInto<crate::v1_1_4::request::activity_mark_repo_notifications_as_read::Content<::hyper::Body>>,
29458        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::activity_mark_repo_notifications_as_read::Content<::hyper::Body>>>::Error>
29459    {
29460        let mut theScheme = AuthScheme::from(&self.config.authentication);
29461
29462        while let Some(auth_step) = theScheme.step()? {
29463            match auth_step {
29464                ::authentic::AuthenticationStep::Request(auth_request) => {
29465                    theScheme.respond(self.client.request(auth_request).await);
29466                }
29467                ::authentic::AuthenticationStep::WaitFor(duration) => {
29468                    (self.sleep)(duration).await;
29469                }
29470            }
29471        }
29472        let theBuilder = crate::v1_1_4::request::activity_mark_repo_notifications_as_read::http_builder(
29473            self.config.base_url.as_ref(),
29474            owner,
29475            repo,
29476            self.config.user_agent.as_ref(),
29477            self.config.accept.as_deref(),
29478        )?
29479        .with_authentication(&theScheme)?;
29480
29481        let theRequest = crate::v1_1_4::request::activity_mark_repo_notifications_as_read::hyper_request(
29482            theBuilder,
29483            theContent.try_into()?,
29484        )?;
29485
29486        ::log::debug!("HTTP request: {:?}", &theRequest);
29487
29488        let theResponse = self.client.request(theRequest).await?;
29489
29490        ::log::debug!("HTTP response: {:?}", &theResponse);
29491
29492        Ok(theResponse)
29493    }
29494
29495    /// Get a GitHub Pages site
29496    /// 
29497    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-github-pages-site)
29498    pub async fn repos_get_pages(
29499        &self,
29500        owner: &str,
29501        repo: &str,
29502    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
29503        let mut theScheme = AuthScheme::from(&self.config.authentication);
29504
29505        while let Some(auth_step) = theScheme.step()? {
29506            match auth_step {
29507                ::authentic::AuthenticationStep::Request(auth_request) => {
29508                    theScheme.respond(self.client.request(auth_request).await);
29509                }
29510                ::authentic::AuthenticationStep::WaitFor(duration) => {
29511                    (self.sleep)(duration).await;
29512                }
29513            }
29514        }
29515        let theBuilder = crate::v1_1_4::request::repos_get_pages::http_builder(
29516            self.config.base_url.as_ref(),
29517            owner,
29518            repo,
29519            self.config.user_agent.as_ref(),
29520            self.config.accept.as_deref(),
29521        )?
29522        .with_authentication(&theScheme)?;
29523
29524        let theRequest =
29525            crate::v1_1_4::request::repos_get_pages::hyper_request(theBuilder)?;
29526
29527        ::log::debug!("HTTP request: {:?}", &theRequest);
29528
29529        let theResponse = self.client.request(theRequest).await?;
29530
29531        ::log::debug!("HTTP response: {:?}", &theResponse);
29532
29533        Ok(theResponse)
29534    }
29535
29536    /// Update information about a GitHub Pages site
29537    /// 
29538    /// Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages).
29539    /// 
29540    /// [API method documentation](https://docs.github.com/rest/reference/repos#update-information-about-a-github-pages-site)
29541    ///
29542    /// # Content
29543    ///
29544    /// - [`&v1_1_4::request::repos_update_information_about_pages_site::body::Json`](crate::v1_1_4::request::repos_update_information_about_pages_site::body::Json)
29545    pub async fn repos_update_information_about_pages_site<Content>(
29546        &self,
29547        owner: &str,
29548        repo: &str,
29549        theContent: Content,
29550    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
29551    where
29552        Content: Copy + TryInto<crate::v1_1_4::request::repos_update_information_about_pages_site::Content<::hyper::Body>>,
29553        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_update_information_about_pages_site::Content<::hyper::Body>>>::Error>
29554    {
29555        let mut theScheme = AuthScheme::from(&self.config.authentication);
29556
29557        while let Some(auth_step) = theScheme.step()? {
29558            match auth_step {
29559                ::authentic::AuthenticationStep::Request(auth_request) => {
29560                    theScheme.respond(self.client.request(auth_request).await);
29561                }
29562                ::authentic::AuthenticationStep::WaitFor(duration) => {
29563                    (self.sleep)(duration).await;
29564                }
29565            }
29566        }
29567        let theBuilder = crate::v1_1_4::request::repos_update_information_about_pages_site::http_builder(
29568            self.config.base_url.as_ref(),
29569            owner,
29570            repo,
29571            self.config.user_agent.as_ref(),
29572            self.config.accept.as_deref(),
29573        )?
29574        .with_authentication(&theScheme)?;
29575
29576        let theRequest = crate::v1_1_4::request::repos_update_information_about_pages_site::hyper_request(
29577            theBuilder,
29578            theContent.try_into()?,
29579        )?;
29580
29581        ::log::debug!("HTTP request: {:?}", &theRequest);
29582
29583        let theResponse = self.client.request(theRequest).await?;
29584
29585        ::log::debug!("HTTP response: {:?}", &theResponse);
29586
29587        Ok(theResponse)
29588    }
29589
29590    /// Create a GitHub Pages site
29591    /// 
29592    /// Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)."
29593    /// 
29594    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-a-github-pages-site)
29595    ///
29596    /// # Content
29597    ///
29598    /// - [`&::std::option::Option<crate::v1_1_4::request::repos_create_pages_site::body::Json>`](crate::v1_1_4::request::repos_create_pages_site::body::Json)
29599    pub async fn repos_create_pages_site<Content>(
29600        &self,
29601        owner: &str,
29602        repo: &str,
29603        theContent: Content,
29604    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
29605    where
29606        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_pages_site::Content<::hyper::Body>>,
29607        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_pages_site::Content<::hyper::Body>>>::Error>
29608    {
29609        let mut theScheme = AuthScheme::from(&self.config.authentication);
29610
29611        while let Some(auth_step) = theScheme.step()? {
29612            match auth_step {
29613                ::authentic::AuthenticationStep::Request(auth_request) => {
29614                    theScheme.respond(self.client.request(auth_request).await);
29615                }
29616                ::authentic::AuthenticationStep::WaitFor(duration) => {
29617                    (self.sleep)(duration).await;
29618                }
29619            }
29620        }
29621        let theBuilder = crate::v1_1_4::request::repos_create_pages_site::http_builder(
29622            self.config.base_url.as_ref(),
29623            owner,
29624            repo,
29625            self.config.user_agent.as_ref(),
29626            self.config.accept.as_deref(),
29627        )?
29628        .with_authentication(&theScheme)?;
29629
29630        let theRequest = crate::v1_1_4::request::repos_create_pages_site::hyper_request(
29631            theBuilder,
29632            theContent.try_into()?,
29633        )?;
29634
29635        ::log::debug!("HTTP request: {:?}", &theRequest);
29636
29637        let theResponse = self.client.request(theRequest).await?;
29638
29639        ::log::debug!("HTTP response: {:?}", &theResponse);
29640
29641        Ok(theResponse)
29642    }
29643
29644    /// Delete a GitHub Pages site
29645    /// 
29646    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-a-github-pages-site)
29647    pub async fn repos_delete_pages_site(
29648        &self,
29649        owner: &str,
29650        repo: &str,
29651    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
29652        let mut theScheme = AuthScheme::from(&self.config.authentication);
29653
29654        while let Some(auth_step) = theScheme.step()? {
29655            match auth_step {
29656                ::authentic::AuthenticationStep::Request(auth_request) => {
29657                    theScheme.respond(self.client.request(auth_request).await);
29658                }
29659                ::authentic::AuthenticationStep::WaitFor(duration) => {
29660                    (self.sleep)(duration).await;
29661                }
29662            }
29663        }
29664        let theBuilder = crate::v1_1_4::request::repos_delete_pages_site::http_builder(
29665            self.config.base_url.as_ref(),
29666            owner,
29667            repo,
29668            self.config.user_agent.as_ref(),
29669            self.config.accept.as_deref(),
29670        )?
29671        .with_authentication(&theScheme)?;
29672
29673        let theRequest =
29674            crate::v1_1_4::request::repos_delete_pages_site::hyper_request(theBuilder)?;
29675
29676        ::log::debug!("HTTP request: {:?}", &theRequest);
29677
29678        let theResponse = self.client.request(theRequest).await?;
29679
29680        ::log::debug!("HTTP response: {:?}", &theResponse);
29681
29682        Ok(theResponse)
29683    }
29684
29685    /// List GitHub Pages builds
29686    /// 
29687    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-github-pages-builds)
29688    pub async fn repos_list_pages_builds(
29689        &self,
29690        owner: &str,
29691        repo: &str,
29692        per_page: ::std::option::Option<i64>,
29693        page: ::std::option::Option<i64>,
29694    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
29695        let mut theScheme = AuthScheme::from(&self.config.authentication);
29696
29697        while let Some(auth_step) = theScheme.step()? {
29698            match auth_step {
29699                ::authentic::AuthenticationStep::Request(auth_request) => {
29700                    theScheme.respond(self.client.request(auth_request).await);
29701                }
29702                ::authentic::AuthenticationStep::WaitFor(duration) => {
29703                    (self.sleep)(duration).await;
29704                }
29705            }
29706        }
29707        let theBuilder = crate::v1_1_4::request::repos_list_pages_builds::http_builder(
29708            self.config.base_url.as_ref(),
29709            owner,
29710            repo,
29711            per_page,
29712            page,
29713            self.config.user_agent.as_ref(),
29714            self.config.accept.as_deref(),
29715        )?
29716        .with_authentication(&theScheme)?;
29717
29718        let theRequest =
29719            crate::v1_1_4::request::repos_list_pages_builds::hyper_request(theBuilder)?;
29720
29721        ::log::debug!("HTTP request: {:?}", &theRequest);
29722
29723        let theResponse = self.client.request(theRequest).await?;
29724
29725        ::log::debug!("HTTP response: {:?}", &theResponse);
29726
29727        Ok(theResponse)
29728    }
29729
29730    /// Request a GitHub Pages build
29731    /// 
29732    /// You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.
29733    /// 
29734    /// Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes.
29735    /// 
29736    /// [API method documentation](https://docs.github.com/rest/reference/repos#request-a-github-pages-build)
29737    pub async fn repos_request_pages_build(
29738        &self,
29739        owner: &str,
29740        repo: &str,
29741    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
29742        let mut theScheme = AuthScheme::from(&self.config.authentication);
29743
29744        while let Some(auth_step) = theScheme.step()? {
29745            match auth_step {
29746                ::authentic::AuthenticationStep::Request(auth_request) => {
29747                    theScheme.respond(self.client.request(auth_request).await);
29748                }
29749                ::authentic::AuthenticationStep::WaitFor(duration) => {
29750                    (self.sleep)(duration).await;
29751                }
29752            }
29753        }
29754        let theBuilder = crate::v1_1_4::request::repos_request_pages_build::http_builder(
29755            self.config.base_url.as_ref(),
29756            owner,
29757            repo,
29758            self.config.user_agent.as_ref(),
29759            self.config.accept.as_deref(),
29760        )?
29761        .with_authentication(&theScheme)?;
29762
29763        let theRequest =
29764            crate::v1_1_4::request::repos_request_pages_build::hyper_request(theBuilder)?;
29765
29766        ::log::debug!("HTTP request: {:?}", &theRequest);
29767
29768        let theResponse = self.client.request(theRequest).await?;
29769
29770        ::log::debug!("HTTP response: {:?}", &theResponse);
29771
29772        Ok(theResponse)
29773    }
29774
29775    /// Get latest Pages build
29776    /// 
29777    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-latest-pages-build)
29778    pub async fn repos_get_latest_pages_build(
29779        &self,
29780        owner: &str,
29781        repo: &str,
29782    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
29783        let mut theScheme = AuthScheme::from(&self.config.authentication);
29784
29785        while let Some(auth_step) = theScheme.step()? {
29786            match auth_step {
29787                ::authentic::AuthenticationStep::Request(auth_request) => {
29788                    theScheme.respond(self.client.request(auth_request).await);
29789                }
29790                ::authentic::AuthenticationStep::WaitFor(duration) => {
29791                    (self.sleep)(duration).await;
29792                }
29793            }
29794        }
29795        let theBuilder = crate::v1_1_4::request::repos_get_latest_pages_build::http_builder(
29796            self.config.base_url.as_ref(),
29797            owner,
29798            repo,
29799            self.config.user_agent.as_ref(),
29800            self.config.accept.as_deref(),
29801        )?
29802        .with_authentication(&theScheme)?;
29803
29804        let theRequest =
29805            crate::v1_1_4::request::repos_get_latest_pages_build::hyper_request(theBuilder)?;
29806
29807        ::log::debug!("HTTP request: {:?}", &theRequest);
29808
29809        let theResponse = self.client.request(theRequest).await?;
29810
29811        ::log::debug!("HTTP response: {:?}", &theResponse);
29812
29813        Ok(theResponse)
29814    }
29815
29816    /// Get GitHub Pages build
29817    /// 
29818    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-github-pages-build)
29819    pub async fn repos_get_pages_build(
29820        &self,
29821        owner: &str,
29822        repo: &str,
29823        build_id: i64,
29824    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
29825        let mut theScheme = AuthScheme::from(&self.config.authentication);
29826
29827        while let Some(auth_step) = theScheme.step()? {
29828            match auth_step {
29829                ::authentic::AuthenticationStep::Request(auth_request) => {
29830                    theScheme.respond(self.client.request(auth_request).await);
29831                }
29832                ::authentic::AuthenticationStep::WaitFor(duration) => {
29833                    (self.sleep)(duration).await;
29834                }
29835            }
29836        }
29837        let theBuilder = crate::v1_1_4::request::repos_get_pages_build::http_builder(
29838            self.config.base_url.as_ref(),
29839            owner,
29840            repo,
29841            build_id,
29842            self.config.user_agent.as_ref(),
29843            self.config.accept.as_deref(),
29844        )?
29845        .with_authentication(&theScheme)?;
29846
29847        let theRequest =
29848            crate::v1_1_4::request::repos_get_pages_build::hyper_request(theBuilder)?;
29849
29850        ::log::debug!("HTTP request: {:?}", &theRequest);
29851
29852        let theResponse = self.client.request(theRequest).await?;
29853
29854        ::log::debug!("HTTP response: {:?}", &theResponse);
29855
29856        Ok(theResponse)
29857    }
29858
29859    /// Get a DNS health check for GitHub Pages
29860    /// 
29861    /// Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages.
29862    /// 
29863    /// The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response.
29864    /// 
29865    /// Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint.
29866    /// 
29867    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-dns-health-check-for-github-pages)
29868    pub async fn repos_get_pages_health_check(
29869        &self,
29870        owner: &str,
29871        repo: &str,
29872    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
29873        let mut theScheme = AuthScheme::from(&self.config.authentication);
29874
29875        while let Some(auth_step) = theScheme.step()? {
29876            match auth_step {
29877                ::authentic::AuthenticationStep::Request(auth_request) => {
29878                    theScheme.respond(self.client.request(auth_request).await);
29879                }
29880                ::authentic::AuthenticationStep::WaitFor(duration) => {
29881                    (self.sleep)(duration).await;
29882                }
29883            }
29884        }
29885        let theBuilder = crate::v1_1_4::request::repos_get_pages_health_check::http_builder(
29886            self.config.base_url.as_ref(),
29887            owner,
29888            repo,
29889            self.config.user_agent.as_ref(),
29890            self.config.accept.as_deref(),
29891        )?
29892        .with_authentication(&theScheme)?;
29893
29894        let theRequest =
29895            crate::v1_1_4::request::repos_get_pages_health_check::hyper_request(theBuilder)?;
29896
29897        ::log::debug!("HTTP request: {:?}", &theRequest);
29898
29899        let theResponse = self.client.request(theRequest).await?;
29900
29901        ::log::debug!("HTTP response: {:?}", &theResponse);
29902
29903        Ok(theResponse)
29904    }
29905
29906    /// List repository projects
29907    /// 
29908    /// Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.
29909    /// 
29910    /// [API method documentation](https://docs.github.com/rest/reference/projects#list-repository-projects)
29911    pub async fn projects_list_for_repo(
29912        &self,
29913        owner: &str,
29914        repo: &str,
29915        state: ::std::option::Option<&str>,
29916        per_page: ::std::option::Option<i64>,
29917        page: ::std::option::Option<i64>,
29918    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
29919        let mut theScheme = AuthScheme::from(&self.config.authentication);
29920
29921        while let Some(auth_step) = theScheme.step()? {
29922            match auth_step {
29923                ::authentic::AuthenticationStep::Request(auth_request) => {
29924                    theScheme.respond(self.client.request(auth_request).await);
29925                }
29926                ::authentic::AuthenticationStep::WaitFor(duration) => {
29927                    (self.sleep)(duration).await;
29928                }
29929            }
29930        }
29931        let theBuilder = crate::v1_1_4::request::projects_list_for_repo::http_builder(
29932            self.config.base_url.as_ref(),
29933            owner,
29934            repo,
29935            state,
29936            per_page,
29937            page,
29938            self.config.user_agent.as_ref(),
29939            self.config.accept.as_deref(),
29940        )?
29941        .with_authentication(&theScheme)?;
29942
29943        let theRequest =
29944            crate::v1_1_4::request::projects_list_for_repo::hyper_request(theBuilder)?;
29945
29946        ::log::debug!("HTTP request: {:?}", &theRequest);
29947
29948        let theResponse = self.client.request(theRequest).await?;
29949
29950        ::log::debug!("HTTP response: {:?}", &theResponse);
29951
29952        Ok(theResponse)
29953    }
29954
29955    /// Create a repository project
29956    /// 
29957    /// Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.
29958    /// 
29959    /// [API method documentation](https://docs.github.com/rest/reference/projects#create-a-repository-project)
29960    ///
29961    /// # Content
29962    ///
29963    /// - [`&v1_1_4::request::projects_create_for_repo::body::Json`](crate::v1_1_4::request::projects_create_for_repo::body::Json)
29964    pub async fn projects_create_for_repo<Content>(
29965        &self,
29966        owner: &str,
29967        repo: &str,
29968        theContent: Content,
29969    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
29970    where
29971        Content: Copy + TryInto<crate::v1_1_4::request::projects_create_for_repo::Content<::hyper::Body>>,
29972        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::projects_create_for_repo::Content<::hyper::Body>>>::Error>
29973    {
29974        let mut theScheme = AuthScheme::from(&self.config.authentication);
29975
29976        while let Some(auth_step) = theScheme.step()? {
29977            match auth_step {
29978                ::authentic::AuthenticationStep::Request(auth_request) => {
29979                    theScheme.respond(self.client.request(auth_request).await);
29980                }
29981                ::authentic::AuthenticationStep::WaitFor(duration) => {
29982                    (self.sleep)(duration).await;
29983                }
29984            }
29985        }
29986        let theBuilder = crate::v1_1_4::request::projects_create_for_repo::http_builder(
29987            self.config.base_url.as_ref(),
29988            owner,
29989            repo,
29990            self.config.user_agent.as_ref(),
29991            self.config.accept.as_deref(),
29992        )?
29993        .with_authentication(&theScheme)?;
29994
29995        let theRequest = crate::v1_1_4::request::projects_create_for_repo::hyper_request(
29996            theBuilder,
29997            theContent.try_into()?,
29998        )?;
29999
30000        ::log::debug!("HTTP request: {:?}", &theRequest);
30001
30002        let theResponse = self.client.request(theRequest).await?;
30003
30004        ::log::debug!("HTTP response: {:?}", &theResponse);
30005
30006        Ok(theResponse)
30007    }
30008
30009    /// List pull requests
30010    /// 
30011    /// Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
30012    /// 
30013    /// [API method documentation](https://docs.github.com/rest/reference/pulls#list-pull-requests)
30014    #[allow(clippy::too_many_arguments)]
30015    pub async fn pulls_list(
30016        &self,
30017        owner: &str,
30018        repo: &str,
30019        state: ::std::option::Option<&str>,
30020        head: ::std::option::Option<&str>,
30021        base: ::std::option::Option<&str>,
30022        sort: &crate::types::Sort<'_>,
30023        per_page: ::std::option::Option<i64>,
30024        page: ::std::option::Option<i64>,
30025    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
30026        let (sort, direction) = sort.extract();
30027        let mut theScheme = AuthScheme::from(&self.config.authentication);
30028
30029        while let Some(auth_step) = theScheme.step()? {
30030            match auth_step {
30031                ::authentic::AuthenticationStep::Request(auth_request) => {
30032                    theScheme.respond(self.client.request(auth_request).await);
30033                }
30034                ::authentic::AuthenticationStep::WaitFor(duration) => {
30035                    (self.sleep)(duration).await;
30036                }
30037            }
30038        }
30039        let theBuilder = crate::v1_1_4::request::pulls_list::http_builder(
30040            self.config.base_url.as_ref(),
30041            owner,
30042            repo,
30043            state,
30044            head,
30045            base,
30046            sort,
30047            direction,
30048            per_page,
30049            page,
30050            self.config.user_agent.as_ref(),
30051            self.config.accept.as_deref(),
30052        )?
30053        .with_authentication(&theScheme)?;
30054
30055        let theRequest =
30056            crate::v1_1_4::request::pulls_list::hyper_request(theBuilder)?;
30057
30058        ::log::debug!("HTTP request: {:?}", &theRequest);
30059
30060        let theResponse = self.client.request(theRequest).await?;
30061
30062        ::log::debug!("HTTP response: {:?}", &theResponse);
30063
30064        Ok(theResponse)
30065    }
30066
30067    /// Create a pull request
30068    /// 
30069    /// Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
30070    /// 
30071    /// To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.
30072    /// 
30073    /// You can create a new pull request.
30074    /// 
30075    /// This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details.
30076    /// 
30077    /// [API method documentation](https://docs.github.com/rest/reference/pulls#create-a-pull-request)
30078    ///
30079    /// # Content
30080    ///
30081    /// - [`&v1_1_4::request::pulls_create::body::Json`](crate::v1_1_4::request::pulls_create::body::Json)
30082    pub async fn pulls_create<Content>(
30083        &self,
30084        owner: &str,
30085        repo: &str,
30086        theContent: Content,
30087    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
30088    where
30089        Content: Copy + TryInto<crate::v1_1_4::request::pulls_create::Content<::hyper::Body>>,
30090        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::pulls_create::Content<::hyper::Body>>>::Error>
30091    {
30092        let mut theScheme = AuthScheme::from(&self.config.authentication);
30093
30094        while let Some(auth_step) = theScheme.step()? {
30095            match auth_step {
30096                ::authentic::AuthenticationStep::Request(auth_request) => {
30097                    theScheme.respond(self.client.request(auth_request).await);
30098                }
30099                ::authentic::AuthenticationStep::WaitFor(duration) => {
30100                    (self.sleep)(duration).await;
30101                }
30102            }
30103        }
30104        let theBuilder = crate::v1_1_4::request::pulls_create::http_builder(
30105            self.config.base_url.as_ref(),
30106            owner,
30107            repo,
30108            self.config.user_agent.as_ref(),
30109            self.config.accept.as_deref(),
30110        )?
30111        .with_authentication(&theScheme)?;
30112
30113        let theRequest = crate::v1_1_4::request::pulls_create::hyper_request(
30114            theBuilder,
30115            theContent.try_into()?,
30116        )?;
30117
30118        ::log::debug!("HTTP request: {:?}", &theRequest);
30119
30120        let theResponse = self.client.request(theRequest).await?;
30121
30122        ::log::debug!("HTTP response: {:?}", &theResponse);
30123
30124        Ok(theResponse)
30125    }
30126
30127    /// List review comments in a repository
30128    /// 
30129    /// Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID.
30130    /// 
30131    /// [API method documentation](https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository)
30132    pub async fn pulls_list_review_comments_for_repo(
30133        &self,
30134        owner: &str,
30135        repo: &str,
30136        sort: &crate::types::Sort<'_>,
30137        since: ::std::option::Option<&str>,
30138        per_page: ::std::option::Option<i64>,
30139        page: ::std::option::Option<i64>,
30140    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
30141        let (sort, direction) = sort.extract();
30142        let mut theScheme = AuthScheme::from(&self.config.authentication);
30143
30144        while let Some(auth_step) = theScheme.step()? {
30145            match auth_step {
30146                ::authentic::AuthenticationStep::Request(auth_request) => {
30147                    theScheme.respond(self.client.request(auth_request).await);
30148                }
30149                ::authentic::AuthenticationStep::WaitFor(duration) => {
30150                    (self.sleep)(duration).await;
30151                }
30152            }
30153        }
30154        let theBuilder = crate::v1_1_4::request::pulls_list_review_comments_for_repo::http_builder(
30155            self.config.base_url.as_ref(),
30156            owner,
30157            repo,
30158            sort,
30159            direction,
30160            since,
30161            per_page,
30162            page,
30163            self.config.user_agent.as_ref(),
30164            self.config.accept.as_deref(),
30165        )?
30166        .with_authentication(&theScheme)?;
30167
30168        let theRequest =
30169            crate::v1_1_4::request::pulls_list_review_comments_for_repo::hyper_request(theBuilder)?;
30170
30171        ::log::debug!("HTTP request: {:?}", &theRequest);
30172
30173        let theResponse = self.client.request(theRequest).await?;
30174
30175        ::log::debug!("HTTP response: {:?}", &theResponse);
30176
30177        Ok(theResponse)
30178    }
30179
30180    /// Get a review comment for a pull request
30181    /// 
30182    /// Provides details for a review comment.
30183    /// 
30184    /// [API method documentation](https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request)
30185    pub async fn pulls_get_review_comment(
30186        &self,
30187        owner: &str,
30188        repo: &str,
30189        comment_id: i64,
30190    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
30191        let mut theScheme = AuthScheme::from(&self.config.authentication);
30192
30193        while let Some(auth_step) = theScheme.step()? {
30194            match auth_step {
30195                ::authentic::AuthenticationStep::Request(auth_request) => {
30196                    theScheme.respond(self.client.request(auth_request).await);
30197                }
30198                ::authentic::AuthenticationStep::WaitFor(duration) => {
30199                    (self.sleep)(duration).await;
30200                }
30201            }
30202        }
30203        let theBuilder = crate::v1_1_4::request::pulls_get_review_comment::http_builder(
30204            self.config.base_url.as_ref(),
30205            owner,
30206            repo,
30207            comment_id,
30208            self.config.user_agent.as_ref(),
30209            self.config.accept.as_deref(),
30210        )?
30211        .with_authentication(&theScheme)?;
30212
30213        let theRequest =
30214            crate::v1_1_4::request::pulls_get_review_comment::hyper_request(theBuilder)?;
30215
30216        ::log::debug!("HTTP request: {:?}", &theRequest);
30217
30218        let theResponse = self.client.request(theRequest).await?;
30219
30220        ::log::debug!("HTTP response: {:?}", &theResponse);
30221
30222        Ok(theResponse)
30223    }
30224
30225    /// Delete a review comment for a pull request
30226    /// 
30227    /// Deletes a review comment.
30228    /// 
30229    /// [API method documentation](https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request)
30230    pub async fn pulls_delete_review_comment(
30231        &self,
30232        owner: &str,
30233        repo: &str,
30234        comment_id: i64,
30235    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
30236        let mut theScheme = AuthScheme::from(&self.config.authentication);
30237
30238        while let Some(auth_step) = theScheme.step()? {
30239            match auth_step {
30240                ::authentic::AuthenticationStep::Request(auth_request) => {
30241                    theScheme.respond(self.client.request(auth_request).await);
30242                }
30243                ::authentic::AuthenticationStep::WaitFor(duration) => {
30244                    (self.sleep)(duration).await;
30245                }
30246            }
30247        }
30248        let theBuilder = crate::v1_1_4::request::pulls_delete_review_comment::http_builder(
30249            self.config.base_url.as_ref(),
30250            owner,
30251            repo,
30252            comment_id,
30253            self.config.user_agent.as_ref(),
30254            self.config.accept.as_deref(),
30255        )?
30256        .with_authentication(&theScheme)?;
30257
30258        let theRequest =
30259            crate::v1_1_4::request::pulls_delete_review_comment::hyper_request(theBuilder)?;
30260
30261        ::log::debug!("HTTP request: {:?}", &theRequest);
30262
30263        let theResponse = self.client.request(theRequest).await?;
30264
30265        ::log::debug!("HTTP response: {:?}", &theResponse);
30266
30267        Ok(theResponse)
30268    }
30269
30270    /// Update a review comment for a pull request
30271    /// 
30272    /// Enables you to edit a review comment.
30273    /// 
30274    /// [API method documentation](https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request)
30275    ///
30276    /// # Content
30277    ///
30278    /// - [`&v1_1_4::request::pulls_update_review_comment::body::Json`](crate::v1_1_4::request::pulls_update_review_comment::body::Json)
30279    pub async fn pulls_update_review_comment<Content>(
30280        &self,
30281        owner: &str,
30282        repo: &str,
30283        comment_id: i64,
30284        theContent: Content,
30285    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
30286    where
30287        Content: Copy + TryInto<crate::v1_1_4::request::pulls_update_review_comment::Content<::hyper::Body>>,
30288        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::pulls_update_review_comment::Content<::hyper::Body>>>::Error>
30289    {
30290        let mut theScheme = AuthScheme::from(&self.config.authentication);
30291
30292        while let Some(auth_step) = theScheme.step()? {
30293            match auth_step {
30294                ::authentic::AuthenticationStep::Request(auth_request) => {
30295                    theScheme.respond(self.client.request(auth_request).await);
30296                }
30297                ::authentic::AuthenticationStep::WaitFor(duration) => {
30298                    (self.sleep)(duration).await;
30299                }
30300            }
30301        }
30302        let theBuilder = crate::v1_1_4::request::pulls_update_review_comment::http_builder(
30303            self.config.base_url.as_ref(),
30304            owner,
30305            repo,
30306            comment_id,
30307            self.config.user_agent.as_ref(),
30308            self.config.accept.as_deref(),
30309        )?
30310        .with_authentication(&theScheme)?;
30311
30312        let theRequest = crate::v1_1_4::request::pulls_update_review_comment::hyper_request(
30313            theBuilder,
30314            theContent.try_into()?,
30315        )?;
30316
30317        ::log::debug!("HTTP request: {:?}", &theRequest);
30318
30319        let theResponse = self.client.request(theRequest).await?;
30320
30321        ::log::debug!("HTTP response: {:?}", &theResponse);
30322
30323        Ok(theResponse)
30324    }
30325
30326    /// List reactions for a pull request review comment
30327    /// 
30328    /// List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments).
30329    /// 
30330    /// [API method documentation](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment)
30331    pub async fn reactions_list_for_pull_request_review_comment(
30332        &self,
30333        owner: &str,
30334        repo: &str,
30335        comment_id: i64,
30336        content: ::std::option::Option<&str>,
30337        per_page: ::std::option::Option<i64>,
30338        page: ::std::option::Option<i64>,
30339    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
30340        let mut theScheme = AuthScheme::from(&self.config.authentication);
30341
30342        while let Some(auth_step) = theScheme.step()? {
30343            match auth_step {
30344                ::authentic::AuthenticationStep::Request(auth_request) => {
30345                    theScheme.respond(self.client.request(auth_request).await);
30346                }
30347                ::authentic::AuthenticationStep::WaitFor(duration) => {
30348                    (self.sleep)(duration).await;
30349                }
30350            }
30351        }
30352        let theBuilder = crate::v1_1_4::request::reactions_list_for_pull_request_review_comment::http_builder(
30353            self.config.base_url.as_ref(),
30354            owner,
30355            repo,
30356            comment_id,
30357            content,
30358            per_page,
30359            page,
30360            self.config.user_agent.as_ref(),
30361            self.config.accept.as_deref(),
30362        )?
30363        .with_authentication(&theScheme)?;
30364
30365        let theRequest =
30366            crate::v1_1_4::request::reactions_list_for_pull_request_review_comment::hyper_request(theBuilder)?;
30367
30368        ::log::debug!("HTTP request: {:?}", &theRequest);
30369
30370        let theResponse = self.client.request(theRequest).await?;
30371
30372        ::log::debug!("HTTP response: {:?}", &theResponse);
30373
30374        Ok(theResponse)
30375    }
30376
30377    /// Create reaction for a pull request review comment
30378    /// 
30379    /// Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment.
30380    /// 
30381    /// [API method documentation](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment)
30382    ///
30383    /// # Content
30384    ///
30385    /// - [`&v1_1_4::request::reactions_create_for_pull_request_review_comment::body::Json`](crate::v1_1_4::request::reactions_create_for_pull_request_review_comment::body::Json)
30386    pub async fn reactions_create_for_pull_request_review_comment<Content>(
30387        &self,
30388        owner: &str,
30389        repo: &str,
30390        comment_id: i64,
30391        theContent: Content,
30392    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
30393    where
30394        Content: Copy + TryInto<crate::v1_1_4::request::reactions_create_for_pull_request_review_comment::Content<::hyper::Body>>,
30395        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::reactions_create_for_pull_request_review_comment::Content<::hyper::Body>>>::Error>
30396    {
30397        let mut theScheme = AuthScheme::from(&self.config.authentication);
30398
30399        while let Some(auth_step) = theScheme.step()? {
30400            match auth_step {
30401                ::authentic::AuthenticationStep::Request(auth_request) => {
30402                    theScheme.respond(self.client.request(auth_request).await);
30403                }
30404                ::authentic::AuthenticationStep::WaitFor(duration) => {
30405                    (self.sleep)(duration).await;
30406                }
30407            }
30408        }
30409        let theBuilder = crate::v1_1_4::request::reactions_create_for_pull_request_review_comment::http_builder(
30410            self.config.base_url.as_ref(),
30411            owner,
30412            repo,
30413            comment_id,
30414            self.config.user_agent.as_ref(),
30415            self.config.accept.as_deref(),
30416        )?
30417        .with_authentication(&theScheme)?;
30418
30419        let theRequest = crate::v1_1_4::request::reactions_create_for_pull_request_review_comment::hyper_request(
30420            theBuilder,
30421            theContent.try_into()?,
30422        )?;
30423
30424        ::log::debug!("HTTP request: {:?}", &theRequest);
30425
30426        let theResponse = self.client.request(theRequest).await?;
30427
30428        ::log::debug!("HTTP response: {:?}", &theResponse);
30429
30430        Ok(theResponse)
30431    }
30432
30433    /// Delete a pull request comment reaction
30434    /// 
30435    /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.`
30436    /// 
30437    /// Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments).
30438    /// 
30439    /// [API method documentation](https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction)
30440    pub async fn reactions_delete_for_pull_request_comment(
30441        &self,
30442        owner: &str,
30443        repo: &str,
30444        comment_id: i64,
30445        reaction_id: i64,
30446    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
30447        let mut theScheme = AuthScheme::from(&self.config.authentication);
30448
30449        while let Some(auth_step) = theScheme.step()? {
30450            match auth_step {
30451                ::authentic::AuthenticationStep::Request(auth_request) => {
30452                    theScheme.respond(self.client.request(auth_request).await);
30453                }
30454                ::authentic::AuthenticationStep::WaitFor(duration) => {
30455                    (self.sleep)(duration).await;
30456                }
30457            }
30458        }
30459        let theBuilder = crate::v1_1_4::request::reactions_delete_for_pull_request_comment::http_builder(
30460            self.config.base_url.as_ref(),
30461            owner,
30462            repo,
30463            comment_id,
30464            reaction_id,
30465            self.config.user_agent.as_ref(),
30466            self.config.accept.as_deref(),
30467        )?
30468        .with_authentication(&theScheme)?;
30469
30470        let theRequest =
30471            crate::v1_1_4::request::reactions_delete_for_pull_request_comment::hyper_request(theBuilder)?;
30472
30473        ::log::debug!("HTTP request: {:?}", &theRequest);
30474
30475        let theResponse = self.client.request(theRequest).await?;
30476
30477        ::log::debug!("HTTP response: {:?}", &theResponse);
30478
30479        Ok(theResponse)
30480    }
30481
30482    /// Get a pull request
30483    /// 
30484    /// Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
30485    /// 
30486    /// Lists details of a pull request by providing its number.
30487    /// 
30488    /// When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".
30489    /// 
30490    /// The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.
30491    /// 
30492    /// The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:
30493    /// 
30494    /// *   If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.
30495    /// *   If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.
30496    /// *   If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.
30497    /// 
30498    /// Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.
30499    /// 
30500    /// [API method documentation](https://docs.github.com/rest/reference/pulls#get-a-pull-request)
30501    pub async fn pulls_get(
30502        &self,
30503        owner: &str,
30504        repo: &str,
30505        pull_number: i64,
30506    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
30507        let mut theScheme = AuthScheme::from(&self.config.authentication);
30508
30509        while let Some(auth_step) = theScheme.step()? {
30510            match auth_step {
30511                ::authentic::AuthenticationStep::Request(auth_request) => {
30512                    theScheme.respond(self.client.request(auth_request).await);
30513                }
30514                ::authentic::AuthenticationStep::WaitFor(duration) => {
30515                    (self.sleep)(duration).await;
30516                }
30517            }
30518        }
30519        let theBuilder = crate::v1_1_4::request::pulls_get::http_builder(
30520            self.config.base_url.as_ref(),
30521            owner,
30522            repo,
30523            pull_number,
30524            self.config.user_agent.as_ref(),
30525            self.config.accept.as_deref(),
30526        )?
30527        .with_authentication(&theScheme)?;
30528
30529        let theRequest =
30530            crate::v1_1_4::request::pulls_get::hyper_request(theBuilder)?;
30531
30532        ::log::debug!("HTTP request: {:?}", &theRequest);
30533
30534        let theResponse = self.client.request(theRequest).await?;
30535
30536        ::log::debug!("HTTP response: {:?}", &theResponse);
30537
30538        Ok(theResponse)
30539    }
30540
30541    /// Update a pull request
30542    /// 
30543    /// Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
30544    /// 
30545    /// To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.
30546    /// 
30547    /// [API method documentation](https://docs.github.com/rest/reference/pulls/#update-a-pull-request)
30548    ///
30549    /// # Content
30550    ///
30551    /// - [`&v1_1_4::request::pulls_update::body::Json`](crate::v1_1_4::request::pulls_update::body::Json)
30552    pub async fn pulls_update<Content>(
30553        &self,
30554        owner: &str,
30555        repo: &str,
30556        pull_number: i64,
30557        theContent: Content,
30558    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
30559    where
30560        Content: Copy + TryInto<crate::v1_1_4::request::pulls_update::Content<::hyper::Body>>,
30561        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::pulls_update::Content<::hyper::Body>>>::Error>
30562    {
30563        let mut theScheme = AuthScheme::from(&self.config.authentication);
30564
30565        while let Some(auth_step) = theScheme.step()? {
30566            match auth_step {
30567                ::authentic::AuthenticationStep::Request(auth_request) => {
30568                    theScheme.respond(self.client.request(auth_request).await);
30569                }
30570                ::authentic::AuthenticationStep::WaitFor(duration) => {
30571                    (self.sleep)(duration).await;
30572                }
30573            }
30574        }
30575        let theBuilder = crate::v1_1_4::request::pulls_update::http_builder(
30576            self.config.base_url.as_ref(),
30577            owner,
30578            repo,
30579            pull_number,
30580            self.config.user_agent.as_ref(),
30581            self.config.accept.as_deref(),
30582        )?
30583        .with_authentication(&theScheme)?;
30584
30585        let theRequest = crate::v1_1_4::request::pulls_update::hyper_request(
30586            theBuilder,
30587            theContent.try_into()?,
30588        )?;
30589
30590        ::log::debug!("HTTP request: {:?}", &theRequest);
30591
30592        let theResponse = self.client.request(theRequest).await?;
30593
30594        ::log::debug!("HTTP response: {:?}", &theResponse);
30595
30596        Ok(theResponse)
30597    }
30598
30599    /// Create a codespace from a pull request
30600    /// 
30601    /// Creates a codespace owned by the authenticated user for the specified pull request.
30602    /// 
30603    /// You must authenticate using an access token with the `codespace` scope to use this endpoint.
30604    /// 
30605    /// GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint.
30606    /// 
30607    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request)
30608    ///
30609    /// # Content
30610    ///
30611    /// - [`&::std::option::Option<crate::v1_1_4::request::codespaces_create_with_pr_for_authenticated_user::body::Json>`](crate::v1_1_4::request::codespaces_create_with_pr_for_authenticated_user::body::Json)
30612    pub async fn codespaces_create_with_pr_for_authenticated_user<Content>(
30613        &self,
30614        owner: &str,
30615        repo: &str,
30616        pull_number: i64,
30617        theContent: Content,
30618    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
30619    where
30620        Content: Copy + TryInto<crate::v1_1_4::request::codespaces_create_with_pr_for_authenticated_user::Content<::hyper::Body>>,
30621        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::codespaces_create_with_pr_for_authenticated_user::Content<::hyper::Body>>>::Error>
30622    {
30623        let mut theScheme = AuthScheme::from(&self.config.authentication);
30624
30625        while let Some(auth_step) = theScheme.step()? {
30626            match auth_step {
30627                ::authentic::AuthenticationStep::Request(auth_request) => {
30628                    theScheme.respond(self.client.request(auth_request).await);
30629                }
30630                ::authentic::AuthenticationStep::WaitFor(duration) => {
30631                    (self.sleep)(duration).await;
30632                }
30633            }
30634        }
30635        let theBuilder = crate::v1_1_4::request::codespaces_create_with_pr_for_authenticated_user::http_builder(
30636            self.config.base_url.as_ref(),
30637            owner,
30638            repo,
30639            pull_number,
30640            self.config.user_agent.as_ref(),
30641            self.config.accept.as_deref(),
30642        )?
30643        .with_authentication(&theScheme)?;
30644
30645        let theRequest = crate::v1_1_4::request::codespaces_create_with_pr_for_authenticated_user::hyper_request(
30646            theBuilder,
30647            theContent.try_into()?,
30648        )?;
30649
30650        ::log::debug!("HTTP request: {:?}", &theRequest);
30651
30652        let theResponse = self.client.request(theRequest).await?;
30653
30654        ::log::debug!("HTTP response: {:?}", &theResponse);
30655
30656        Ok(theResponse)
30657    }
30658
30659    /// List review comments on a pull request
30660    /// 
30661    /// Lists all review comments for a pull request. By default, review comments are in ascending order by ID.
30662    /// 
30663    /// [API method documentation](https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request)
30664    #[allow(clippy::too_many_arguments)]
30665    pub async fn pulls_list_review_comments(
30666        &self,
30667        owner: &str,
30668        repo: &str,
30669        pull_number: i64,
30670        sort: &crate::types::Sort<'_>,
30671        since: ::std::option::Option<&str>,
30672        per_page: ::std::option::Option<i64>,
30673        page: ::std::option::Option<i64>,
30674    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
30675        let (sort, direction) = sort.extract();
30676        let mut theScheme = AuthScheme::from(&self.config.authentication);
30677
30678        while let Some(auth_step) = theScheme.step()? {
30679            match auth_step {
30680                ::authentic::AuthenticationStep::Request(auth_request) => {
30681                    theScheme.respond(self.client.request(auth_request).await);
30682                }
30683                ::authentic::AuthenticationStep::WaitFor(duration) => {
30684                    (self.sleep)(duration).await;
30685                }
30686            }
30687        }
30688        let theBuilder = crate::v1_1_4::request::pulls_list_review_comments::http_builder(
30689            self.config.base_url.as_ref(),
30690            owner,
30691            repo,
30692            pull_number,
30693            sort,
30694            direction,
30695            since,
30696            per_page,
30697            page,
30698            self.config.user_agent.as_ref(),
30699            self.config.accept.as_deref(),
30700        )?
30701        .with_authentication(&theScheme)?;
30702
30703        let theRequest =
30704            crate::v1_1_4::request::pulls_list_review_comments::hyper_request(theBuilder)?;
30705
30706        ::log::debug!("HTTP request: {:?}", &theRequest);
30707
30708        let theResponse = self.client.request(theRequest).await?;
30709
30710        ::log::debug!("HTTP response: {:?}", &theResponse);
30711
30712        Ok(theResponse)
30713    }
30714
30715    /// Create a review comment for a pull request
30716    /// 
30717    /// Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff.
30718    /// 
30719    /// The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required.
30720    /// 
30721    /// **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
30722    /// 
30723    /// This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
30724    /// 
30725    /// [API method documentation](https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request)
30726    ///
30727    /// # Content
30728    ///
30729    /// - [`&v1_1_4::request::pulls_create_review_comment::body::Json`](crate::v1_1_4::request::pulls_create_review_comment::body::Json)
30730    pub async fn pulls_create_review_comment<Content>(
30731        &self,
30732        owner: &str,
30733        repo: &str,
30734        pull_number: i64,
30735        theContent: Content,
30736    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
30737    where
30738        Content: Copy + TryInto<crate::v1_1_4::request::pulls_create_review_comment::Content<::hyper::Body>>,
30739        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::pulls_create_review_comment::Content<::hyper::Body>>>::Error>
30740    {
30741        let mut theScheme = AuthScheme::from(&self.config.authentication);
30742
30743        while let Some(auth_step) = theScheme.step()? {
30744            match auth_step {
30745                ::authentic::AuthenticationStep::Request(auth_request) => {
30746                    theScheme.respond(self.client.request(auth_request).await);
30747                }
30748                ::authentic::AuthenticationStep::WaitFor(duration) => {
30749                    (self.sleep)(duration).await;
30750                }
30751            }
30752        }
30753        let theBuilder = crate::v1_1_4::request::pulls_create_review_comment::http_builder(
30754            self.config.base_url.as_ref(),
30755            owner,
30756            repo,
30757            pull_number,
30758            self.config.user_agent.as_ref(),
30759            self.config.accept.as_deref(),
30760        )?
30761        .with_authentication(&theScheme)?;
30762
30763        let theRequest = crate::v1_1_4::request::pulls_create_review_comment::hyper_request(
30764            theBuilder,
30765            theContent.try_into()?,
30766        )?;
30767
30768        ::log::debug!("HTTP request: {:?}", &theRequest);
30769
30770        let theResponse = self.client.request(theRequest).await?;
30771
30772        ::log::debug!("HTTP response: {:?}", &theResponse);
30773
30774        Ok(theResponse)
30775    }
30776
30777    /// Create a reply for a review comment
30778    /// 
30779    /// Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.
30780    /// 
30781    /// This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
30782    /// 
30783    /// [API method documentation](https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment)
30784    ///
30785    /// # Content
30786    ///
30787    /// - [`&v1_1_4::request::pulls_create_reply_for_review_comment::body::Json`](crate::v1_1_4::request::pulls_create_reply_for_review_comment::body::Json)
30788    pub async fn pulls_create_reply_for_review_comment<Content>(
30789        &self,
30790        owner: &str,
30791        repo: &str,
30792        pull_number: i64,
30793        comment_id: i64,
30794        theContent: Content,
30795    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
30796    where
30797        Content: Copy + TryInto<crate::v1_1_4::request::pulls_create_reply_for_review_comment::Content<::hyper::Body>>,
30798        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::pulls_create_reply_for_review_comment::Content<::hyper::Body>>>::Error>
30799    {
30800        let mut theScheme = AuthScheme::from(&self.config.authentication);
30801
30802        while let Some(auth_step) = theScheme.step()? {
30803            match auth_step {
30804                ::authentic::AuthenticationStep::Request(auth_request) => {
30805                    theScheme.respond(self.client.request(auth_request).await);
30806                }
30807                ::authentic::AuthenticationStep::WaitFor(duration) => {
30808                    (self.sleep)(duration).await;
30809                }
30810            }
30811        }
30812        let theBuilder = crate::v1_1_4::request::pulls_create_reply_for_review_comment::http_builder(
30813            self.config.base_url.as_ref(),
30814            owner,
30815            repo,
30816            pull_number,
30817            comment_id,
30818            self.config.user_agent.as_ref(),
30819            self.config.accept.as_deref(),
30820        )?
30821        .with_authentication(&theScheme)?;
30822
30823        let theRequest = crate::v1_1_4::request::pulls_create_reply_for_review_comment::hyper_request(
30824            theBuilder,
30825            theContent.try_into()?,
30826        )?;
30827
30828        ::log::debug!("HTTP request: {:?}", &theRequest);
30829
30830        let theResponse = self.client.request(theRequest).await?;
30831
30832        ::log::debug!("HTTP response: {:?}", &theResponse);
30833
30834        Ok(theResponse)
30835    }
30836
30837    /// List commits on a pull request
30838    /// 
30839    /// Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint.
30840    /// 
30841    /// [API method documentation](https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request)
30842    pub async fn pulls_list_commits(
30843        &self,
30844        owner: &str,
30845        repo: &str,
30846        pull_number: i64,
30847        per_page: ::std::option::Option<i64>,
30848        page: ::std::option::Option<i64>,
30849    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
30850        let mut theScheme = AuthScheme::from(&self.config.authentication);
30851
30852        while let Some(auth_step) = theScheme.step()? {
30853            match auth_step {
30854                ::authentic::AuthenticationStep::Request(auth_request) => {
30855                    theScheme.respond(self.client.request(auth_request).await);
30856                }
30857                ::authentic::AuthenticationStep::WaitFor(duration) => {
30858                    (self.sleep)(duration).await;
30859                }
30860            }
30861        }
30862        let theBuilder = crate::v1_1_4::request::pulls_list_commits::http_builder(
30863            self.config.base_url.as_ref(),
30864            owner,
30865            repo,
30866            pull_number,
30867            per_page,
30868            page,
30869            self.config.user_agent.as_ref(),
30870            self.config.accept.as_deref(),
30871        )?
30872        .with_authentication(&theScheme)?;
30873
30874        let theRequest =
30875            crate::v1_1_4::request::pulls_list_commits::hyper_request(theBuilder)?;
30876
30877        ::log::debug!("HTTP request: {:?}", &theRequest);
30878
30879        let theResponse = self.client.request(theRequest).await?;
30880
30881        ::log::debug!("HTTP response: {:?}", &theResponse);
30882
30883        Ok(theResponse)
30884    }
30885
30886    /// List pull requests files
30887    /// 
30888    /// **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.
30889    /// 
30890    /// [API method documentation](https://docs.github.com/rest/reference/pulls#list-pull-requests-files)
30891    pub async fn pulls_list_files(
30892        &self,
30893        owner: &str,
30894        repo: &str,
30895        pull_number: i64,
30896        per_page: ::std::option::Option<i64>,
30897        page: ::std::option::Option<i64>,
30898    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
30899        let mut theScheme = AuthScheme::from(&self.config.authentication);
30900
30901        while let Some(auth_step) = theScheme.step()? {
30902            match auth_step {
30903                ::authentic::AuthenticationStep::Request(auth_request) => {
30904                    theScheme.respond(self.client.request(auth_request).await);
30905                }
30906                ::authentic::AuthenticationStep::WaitFor(duration) => {
30907                    (self.sleep)(duration).await;
30908                }
30909            }
30910        }
30911        let theBuilder = crate::v1_1_4::request::pulls_list_files::http_builder(
30912            self.config.base_url.as_ref(),
30913            owner,
30914            repo,
30915            pull_number,
30916            per_page,
30917            page,
30918            self.config.user_agent.as_ref(),
30919            self.config.accept.as_deref(),
30920        )?
30921        .with_authentication(&theScheme)?;
30922
30923        let theRequest =
30924            crate::v1_1_4::request::pulls_list_files::hyper_request(theBuilder)?;
30925
30926        ::log::debug!("HTTP request: {:?}", &theRequest);
30927
30928        let theResponse = self.client.request(theRequest).await?;
30929
30930        ::log::debug!("HTTP response: {:?}", &theResponse);
30931
30932        Ok(theResponse)
30933    }
30934
30935    /// Check if a pull request has been merged
30936    /// 
30937    /// [API method documentation](https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged)
30938    pub async fn pulls_check_if_merged(
30939        &self,
30940        owner: &str,
30941        repo: &str,
30942        pull_number: i64,
30943    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
30944        let mut theScheme = AuthScheme::from(&self.config.authentication);
30945
30946        while let Some(auth_step) = theScheme.step()? {
30947            match auth_step {
30948                ::authentic::AuthenticationStep::Request(auth_request) => {
30949                    theScheme.respond(self.client.request(auth_request).await);
30950                }
30951                ::authentic::AuthenticationStep::WaitFor(duration) => {
30952                    (self.sleep)(duration).await;
30953                }
30954            }
30955        }
30956        let theBuilder = crate::v1_1_4::request::pulls_check_if_merged::http_builder(
30957            self.config.base_url.as_ref(),
30958            owner,
30959            repo,
30960            pull_number,
30961            self.config.user_agent.as_ref(),
30962            self.config.accept.as_deref(),
30963        )?
30964        .with_authentication(&theScheme)?;
30965
30966        let theRequest =
30967            crate::v1_1_4::request::pulls_check_if_merged::hyper_request(theBuilder)?;
30968
30969        ::log::debug!("HTTP request: {:?}", &theRequest);
30970
30971        let theResponse = self.client.request(theRequest).await?;
30972
30973        ::log::debug!("HTTP response: {:?}", &theResponse);
30974
30975        Ok(theResponse)
30976    }
30977
30978    /// Merge a pull request
30979    /// 
30980    /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
30981    /// 
30982    /// [API method documentation](https://docs.github.com/rest/reference/pulls#merge-a-pull-request)
30983    ///
30984    /// # Content
30985    ///
30986    /// - [`&::std::option::Option<crate::v1_1_4::request::pulls_merge::body::Json>`](crate::v1_1_4::request::pulls_merge::body::Json)
30987    pub async fn pulls_merge<Content>(
30988        &self,
30989        owner: &str,
30990        repo: &str,
30991        pull_number: i64,
30992        theContent: Content,
30993    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
30994    where
30995        Content: Copy + TryInto<crate::v1_1_4::request::pulls_merge::Content<::hyper::Body>>,
30996        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::pulls_merge::Content<::hyper::Body>>>::Error>
30997    {
30998        let mut theScheme = AuthScheme::from(&self.config.authentication);
30999
31000        while let Some(auth_step) = theScheme.step()? {
31001            match auth_step {
31002                ::authentic::AuthenticationStep::Request(auth_request) => {
31003                    theScheme.respond(self.client.request(auth_request).await);
31004                }
31005                ::authentic::AuthenticationStep::WaitFor(duration) => {
31006                    (self.sleep)(duration).await;
31007                }
31008            }
31009        }
31010        let theBuilder = crate::v1_1_4::request::pulls_merge::http_builder(
31011            self.config.base_url.as_ref(),
31012            owner,
31013            repo,
31014            pull_number,
31015            self.config.user_agent.as_ref(),
31016            self.config.accept.as_deref(),
31017        )?
31018        .with_authentication(&theScheme)?;
31019
31020        let theRequest = crate::v1_1_4::request::pulls_merge::hyper_request(
31021            theBuilder,
31022            theContent.try_into()?,
31023        )?;
31024
31025        ::log::debug!("HTTP request: {:?}", &theRequest);
31026
31027        let theResponse = self.client.request(theRequest).await?;
31028
31029        ::log::debug!("HTTP response: {:?}", &theResponse);
31030
31031        Ok(theResponse)
31032    }
31033
31034    /// List requested reviewers for a pull request
31035    /// 
31036    /// [API method documentation](https://docs.github.com/rest/reference/pulls#list-requested-reviewers-for-a-pull-request)
31037    pub async fn pulls_list_requested_reviewers(
31038        &self,
31039        owner: &str,
31040        repo: &str,
31041        pull_number: i64,
31042        per_page: ::std::option::Option<i64>,
31043        page: ::std::option::Option<i64>,
31044    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
31045        let mut theScheme = AuthScheme::from(&self.config.authentication);
31046
31047        while let Some(auth_step) = theScheme.step()? {
31048            match auth_step {
31049                ::authentic::AuthenticationStep::Request(auth_request) => {
31050                    theScheme.respond(self.client.request(auth_request).await);
31051                }
31052                ::authentic::AuthenticationStep::WaitFor(duration) => {
31053                    (self.sleep)(duration).await;
31054                }
31055            }
31056        }
31057        let theBuilder = crate::v1_1_4::request::pulls_list_requested_reviewers::http_builder(
31058            self.config.base_url.as_ref(),
31059            owner,
31060            repo,
31061            pull_number,
31062            per_page,
31063            page,
31064            self.config.user_agent.as_ref(),
31065            self.config.accept.as_deref(),
31066        )?
31067        .with_authentication(&theScheme)?;
31068
31069        let theRequest =
31070            crate::v1_1_4::request::pulls_list_requested_reviewers::hyper_request(theBuilder)?;
31071
31072        ::log::debug!("HTTP request: {:?}", &theRequest);
31073
31074        let theResponse = self.client.request(theRequest).await?;
31075
31076        ::log::debug!("HTTP response: {:?}", &theResponse);
31077
31078        Ok(theResponse)
31079    }
31080
31081    /// Request reviewers for a pull request
31082    /// 
31083    /// This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
31084    /// 
31085    /// [API method documentation](https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request)
31086    ///
31087    /// # Content
31088    ///
31089    /// - [`&v1_1_4::request::pulls_request_reviewers::body::Json`](crate::v1_1_4::request::pulls_request_reviewers::body::Json)
31090    pub async fn pulls_request_reviewers<Content>(
31091        &self,
31092        owner: &str,
31093        repo: &str,
31094        pull_number: i64,
31095        theContent: Content,
31096    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
31097    where
31098        Content: Copy + TryInto<crate::v1_1_4::request::pulls_request_reviewers::Content<::hyper::Body>>,
31099        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::pulls_request_reviewers::Content<::hyper::Body>>>::Error>
31100    {
31101        let mut theScheme = AuthScheme::from(&self.config.authentication);
31102
31103        while let Some(auth_step) = theScheme.step()? {
31104            match auth_step {
31105                ::authentic::AuthenticationStep::Request(auth_request) => {
31106                    theScheme.respond(self.client.request(auth_request).await);
31107                }
31108                ::authentic::AuthenticationStep::WaitFor(duration) => {
31109                    (self.sleep)(duration).await;
31110                }
31111            }
31112        }
31113        let theBuilder = crate::v1_1_4::request::pulls_request_reviewers::http_builder(
31114            self.config.base_url.as_ref(),
31115            owner,
31116            repo,
31117            pull_number,
31118            self.config.user_agent.as_ref(),
31119            self.config.accept.as_deref(),
31120        )?
31121        .with_authentication(&theScheme)?;
31122
31123        let theRequest = crate::v1_1_4::request::pulls_request_reviewers::hyper_request(
31124            theBuilder,
31125            theContent.try_into()?,
31126        )?;
31127
31128        ::log::debug!("HTTP request: {:?}", &theRequest);
31129
31130        let theResponse = self.client.request(theRequest).await?;
31131
31132        ::log::debug!("HTTP response: {:?}", &theResponse);
31133
31134        Ok(theResponse)
31135    }
31136
31137    /// Remove requested reviewers from a pull request
31138    /// 
31139    /// [API method documentation](https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request)
31140    ///
31141    /// # Content
31142    ///
31143    /// - [`&v1_1_4::request::pulls_remove_requested_reviewers::body::Json`](crate::v1_1_4::request::pulls_remove_requested_reviewers::body::Json)
31144    pub async fn pulls_remove_requested_reviewers<Content>(
31145        &self,
31146        owner: &str,
31147        repo: &str,
31148        pull_number: i64,
31149        theContent: Content,
31150    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
31151    where
31152        Content: Copy + TryInto<crate::v1_1_4::request::pulls_remove_requested_reviewers::Content<::hyper::Body>>,
31153        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::pulls_remove_requested_reviewers::Content<::hyper::Body>>>::Error>
31154    {
31155        let mut theScheme = AuthScheme::from(&self.config.authentication);
31156
31157        while let Some(auth_step) = theScheme.step()? {
31158            match auth_step {
31159                ::authentic::AuthenticationStep::Request(auth_request) => {
31160                    theScheme.respond(self.client.request(auth_request).await);
31161                }
31162                ::authentic::AuthenticationStep::WaitFor(duration) => {
31163                    (self.sleep)(duration).await;
31164                }
31165            }
31166        }
31167        let theBuilder = crate::v1_1_4::request::pulls_remove_requested_reviewers::http_builder(
31168            self.config.base_url.as_ref(),
31169            owner,
31170            repo,
31171            pull_number,
31172            self.config.user_agent.as_ref(),
31173            self.config.accept.as_deref(),
31174        )?
31175        .with_authentication(&theScheme)?;
31176
31177        let theRequest = crate::v1_1_4::request::pulls_remove_requested_reviewers::hyper_request(
31178            theBuilder,
31179            theContent.try_into()?,
31180        )?;
31181
31182        ::log::debug!("HTTP request: {:?}", &theRequest);
31183
31184        let theResponse = self.client.request(theRequest).await?;
31185
31186        ::log::debug!("HTTP response: {:?}", &theResponse);
31187
31188        Ok(theResponse)
31189    }
31190
31191    /// List reviews for a pull request
31192    /// 
31193    /// The list of reviews returns in chronological order.
31194    /// 
31195    /// [API method documentation](https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request)
31196    pub async fn pulls_list_reviews(
31197        &self,
31198        owner: &str,
31199        repo: &str,
31200        pull_number: i64,
31201        per_page: ::std::option::Option<i64>,
31202        page: ::std::option::Option<i64>,
31203    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
31204        let mut theScheme = AuthScheme::from(&self.config.authentication);
31205
31206        while let Some(auth_step) = theScheme.step()? {
31207            match auth_step {
31208                ::authentic::AuthenticationStep::Request(auth_request) => {
31209                    theScheme.respond(self.client.request(auth_request).await);
31210                }
31211                ::authentic::AuthenticationStep::WaitFor(duration) => {
31212                    (self.sleep)(duration).await;
31213                }
31214            }
31215        }
31216        let theBuilder = crate::v1_1_4::request::pulls_list_reviews::http_builder(
31217            self.config.base_url.as_ref(),
31218            owner,
31219            repo,
31220            pull_number,
31221            per_page,
31222            page,
31223            self.config.user_agent.as_ref(),
31224            self.config.accept.as_deref(),
31225        )?
31226        .with_authentication(&theScheme)?;
31227
31228        let theRequest =
31229            crate::v1_1_4::request::pulls_list_reviews::hyper_request(theBuilder)?;
31230
31231        ::log::debug!("HTTP request: {:?}", &theRequest);
31232
31233        let theResponse = self.client.request(theRequest).await?;
31234
31235        ::log::debug!("HTTP response: {:?}", &theResponse);
31236
31237        Ok(theResponse)
31238    }
31239
31240    /// Create a review for a pull request
31241    /// 
31242    /// This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
31243    /// 
31244    /// Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response.
31245    /// 
31246    /// **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint.
31247    /// 
31248    /// The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
31249    /// 
31250    /// [API method documentation](https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request)
31251    ///
31252    /// # Content
31253    ///
31254    /// - [`&v1_1_4::request::pulls_create_review::body::Json`](crate::v1_1_4::request::pulls_create_review::body::Json)
31255    pub async fn pulls_create_review<Content>(
31256        &self,
31257        owner: &str,
31258        repo: &str,
31259        pull_number: i64,
31260        theContent: Content,
31261    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
31262    where
31263        Content: Copy + TryInto<crate::v1_1_4::request::pulls_create_review::Content<::hyper::Body>>,
31264        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::pulls_create_review::Content<::hyper::Body>>>::Error>
31265    {
31266        let mut theScheme = AuthScheme::from(&self.config.authentication);
31267
31268        while let Some(auth_step) = theScheme.step()? {
31269            match auth_step {
31270                ::authentic::AuthenticationStep::Request(auth_request) => {
31271                    theScheme.respond(self.client.request(auth_request).await);
31272                }
31273                ::authentic::AuthenticationStep::WaitFor(duration) => {
31274                    (self.sleep)(duration).await;
31275                }
31276            }
31277        }
31278        let theBuilder = crate::v1_1_4::request::pulls_create_review::http_builder(
31279            self.config.base_url.as_ref(),
31280            owner,
31281            repo,
31282            pull_number,
31283            self.config.user_agent.as_ref(),
31284            self.config.accept.as_deref(),
31285        )?
31286        .with_authentication(&theScheme)?;
31287
31288        let theRequest = crate::v1_1_4::request::pulls_create_review::hyper_request(
31289            theBuilder,
31290            theContent.try_into()?,
31291        )?;
31292
31293        ::log::debug!("HTTP request: {:?}", &theRequest);
31294
31295        let theResponse = self.client.request(theRequest).await?;
31296
31297        ::log::debug!("HTTP response: {:?}", &theResponse);
31298
31299        Ok(theResponse)
31300    }
31301
31302    /// Get a review for a pull request
31303    /// 
31304    /// [API method documentation](https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request)
31305    pub async fn pulls_get_review(
31306        &self,
31307        owner: &str,
31308        repo: &str,
31309        pull_number: i64,
31310        review_id: i64,
31311    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
31312        let mut theScheme = AuthScheme::from(&self.config.authentication);
31313
31314        while let Some(auth_step) = theScheme.step()? {
31315            match auth_step {
31316                ::authentic::AuthenticationStep::Request(auth_request) => {
31317                    theScheme.respond(self.client.request(auth_request).await);
31318                }
31319                ::authentic::AuthenticationStep::WaitFor(duration) => {
31320                    (self.sleep)(duration).await;
31321                }
31322            }
31323        }
31324        let theBuilder = crate::v1_1_4::request::pulls_get_review::http_builder(
31325            self.config.base_url.as_ref(),
31326            owner,
31327            repo,
31328            pull_number,
31329            review_id,
31330            self.config.user_agent.as_ref(),
31331            self.config.accept.as_deref(),
31332        )?
31333        .with_authentication(&theScheme)?;
31334
31335        let theRequest =
31336            crate::v1_1_4::request::pulls_get_review::hyper_request(theBuilder)?;
31337
31338        ::log::debug!("HTTP request: {:?}", &theRequest);
31339
31340        let theResponse = self.client.request(theRequest).await?;
31341
31342        ::log::debug!("HTTP response: {:?}", &theResponse);
31343
31344        Ok(theResponse)
31345    }
31346
31347    /// Update a review for a pull request
31348    /// 
31349    /// Update the review summary comment with new text.
31350    /// 
31351    /// [API method documentation](https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request)
31352    ///
31353    /// # Content
31354    ///
31355    /// - [`&v1_1_4::request::pulls_update_review::body::Json`](crate::v1_1_4::request::pulls_update_review::body::Json)
31356    pub async fn pulls_update_review<Content>(
31357        &self,
31358        owner: &str,
31359        repo: &str,
31360        pull_number: i64,
31361        review_id: i64,
31362        theContent: Content,
31363    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
31364    where
31365        Content: Copy + TryInto<crate::v1_1_4::request::pulls_update_review::Content<::hyper::Body>>,
31366        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::pulls_update_review::Content<::hyper::Body>>>::Error>
31367    {
31368        let mut theScheme = AuthScheme::from(&self.config.authentication);
31369
31370        while let Some(auth_step) = theScheme.step()? {
31371            match auth_step {
31372                ::authentic::AuthenticationStep::Request(auth_request) => {
31373                    theScheme.respond(self.client.request(auth_request).await);
31374                }
31375                ::authentic::AuthenticationStep::WaitFor(duration) => {
31376                    (self.sleep)(duration).await;
31377                }
31378            }
31379        }
31380        let theBuilder = crate::v1_1_4::request::pulls_update_review::http_builder(
31381            self.config.base_url.as_ref(),
31382            owner,
31383            repo,
31384            pull_number,
31385            review_id,
31386            self.config.user_agent.as_ref(),
31387            self.config.accept.as_deref(),
31388        )?
31389        .with_authentication(&theScheme)?;
31390
31391        let theRequest = crate::v1_1_4::request::pulls_update_review::hyper_request(
31392            theBuilder,
31393            theContent.try_into()?,
31394        )?;
31395
31396        ::log::debug!("HTTP request: {:?}", &theRequest);
31397
31398        let theResponse = self.client.request(theRequest).await?;
31399
31400        ::log::debug!("HTTP response: {:?}", &theResponse);
31401
31402        Ok(theResponse)
31403    }
31404
31405    /// Delete a pending review for a pull request
31406    /// 
31407    /// [API method documentation](https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request)
31408    pub async fn pulls_delete_pending_review(
31409        &self,
31410        owner: &str,
31411        repo: &str,
31412        pull_number: i64,
31413        review_id: i64,
31414    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
31415        let mut theScheme = AuthScheme::from(&self.config.authentication);
31416
31417        while let Some(auth_step) = theScheme.step()? {
31418            match auth_step {
31419                ::authentic::AuthenticationStep::Request(auth_request) => {
31420                    theScheme.respond(self.client.request(auth_request).await);
31421                }
31422                ::authentic::AuthenticationStep::WaitFor(duration) => {
31423                    (self.sleep)(duration).await;
31424                }
31425            }
31426        }
31427        let theBuilder = crate::v1_1_4::request::pulls_delete_pending_review::http_builder(
31428            self.config.base_url.as_ref(),
31429            owner,
31430            repo,
31431            pull_number,
31432            review_id,
31433            self.config.user_agent.as_ref(),
31434            self.config.accept.as_deref(),
31435        )?
31436        .with_authentication(&theScheme)?;
31437
31438        let theRequest =
31439            crate::v1_1_4::request::pulls_delete_pending_review::hyper_request(theBuilder)?;
31440
31441        ::log::debug!("HTTP request: {:?}", &theRequest);
31442
31443        let theResponse = self.client.request(theRequest).await?;
31444
31445        ::log::debug!("HTTP response: {:?}", &theResponse);
31446
31447        Ok(theResponse)
31448    }
31449
31450    /// List comments for a pull request review
31451    /// 
31452    /// List comments for a specific pull request review.
31453    /// 
31454    /// [API method documentation](https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review)
31455    pub async fn pulls_list_comments_for_review(
31456        &self,
31457        owner: &str,
31458        repo: &str,
31459        pull_number: i64,
31460        review_id: i64,
31461        per_page: ::std::option::Option<i64>,
31462        page: ::std::option::Option<i64>,
31463    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
31464        let mut theScheme = AuthScheme::from(&self.config.authentication);
31465
31466        while let Some(auth_step) = theScheme.step()? {
31467            match auth_step {
31468                ::authentic::AuthenticationStep::Request(auth_request) => {
31469                    theScheme.respond(self.client.request(auth_request).await);
31470                }
31471                ::authentic::AuthenticationStep::WaitFor(duration) => {
31472                    (self.sleep)(duration).await;
31473                }
31474            }
31475        }
31476        let theBuilder = crate::v1_1_4::request::pulls_list_comments_for_review::http_builder(
31477            self.config.base_url.as_ref(),
31478            owner,
31479            repo,
31480            pull_number,
31481            review_id,
31482            per_page,
31483            page,
31484            self.config.user_agent.as_ref(),
31485            self.config.accept.as_deref(),
31486        )?
31487        .with_authentication(&theScheme)?;
31488
31489        let theRequest =
31490            crate::v1_1_4::request::pulls_list_comments_for_review::hyper_request(theBuilder)?;
31491
31492        ::log::debug!("HTTP request: {:?}", &theRequest);
31493
31494        let theResponse = self.client.request(theRequest).await?;
31495
31496        ::log::debug!("HTTP response: {:?}", &theResponse);
31497
31498        Ok(theResponse)
31499    }
31500
31501    /// Dismiss a review for a pull request
31502    /// 
31503    /// **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews.
31504    /// 
31505    /// [API method documentation](https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request)
31506    ///
31507    /// # Content
31508    ///
31509    /// - [`&v1_1_4::request::pulls_dismiss_review::body::Json`](crate::v1_1_4::request::pulls_dismiss_review::body::Json)
31510    pub async fn pulls_dismiss_review<Content>(
31511        &self,
31512        owner: &str,
31513        repo: &str,
31514        pull_number: i64,
31515        review_id: i64,
31516        theContent: Content,
31517    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
31518    where
31519        Content: Copy + TryInto<crate::v1_1_4::request::pulls_dismiss_review::Content<::hyper::Body>>,
31520        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::pulls_dismiss_review::Content<::hyper::Body>>>::Error>
31521    {
31522        let mut theScheme = AuthScheme::from(&self.config.authentication);
31523
31524        while let Some(auth_step) = theScheme.step()? {
31525            match auth_step {
31526                ::authentic::AuthenticationStep::Request(auth_request) => {
31527                    theScheme.respond(self.client.request(auth_request).await);
31528                }
31529                ::authentic::AuthenticationStep::WaitFor(duration) => {
31530                    (self.sleep)(duration).await;
31531                }
31532            }
31533        }
31534        let theBuilder = crate::v1_1_4::request::pulls_dismiss_review::http_builder(
31535            self.config.base_url.as_ref(),
31536            owner,
31537            repo,
31538            pull_number,
31539            review_id,
31540            self.config.user_agent.as_ref(),
31541            self.config.accept.as_deref(),
31542        )?
31543        .with_authentication(&theScheme)?;
31544
31545        let theRequest = crate::v1_1_4::request::pulls_dismiss_review::hyper_request(
31546            theBuilder,
31547            theContent.try_into()?,
31548        )?;
31549
31550        ::log::debug!("HTTP request: {:?}", &theRequest);
31551
31552        let theResponse = self.client.request(theRequest).await?;
31553
31554        ::log::debug!("HTTP response: {:?}", &theResponse);
31555
31556        Ok(theResponse)
31557    }
31558
31559    /// Submit a review for a pull request
31560    /// 
31561    /// [API method documentation](https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request)
31562    ///
31563    /// # Content
31564    ///
31565    /// - [`&v1_1_4::request::pulls_submit_review::body::Json`](crate::v1_1_4::request::pulls_submit_review::body::Json)
31566    pub async fn pulls_submit_review<Content>(
31567        &self,
31568        owner: &str,
31569        repo: &str,
31570        pull_number: i64,
31571        review_id: i64,
31572        theContent: Content,
31573    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
31574    where
31575        Content: Copy + TryInto<crate::v1_1_4::request::pulls_submit_review::Content<::hyper::Body>>,
31576        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::pulls_submit_review::Content<::hyper::Body>>>::Error>
31577    {
31578        let mut theScheme = AuthScheme::from(&self.config.authentication);
31579
31580        while let Some(auth_step) = theScheme.step()? {
31581            match auth_step {
31582                ::authentic::AuthenticationStep::Request(auth_request) => {
31583                    theScheme.respond(self.client.request(auth_request).await);
31584                }
31585                ::authentic::AuthenticationStep::WaitFor(duration) => {
31586                    (self.sleep)(duration).await;
31587                }
31588            }
31589        }
31590        let theBuilder = crate::v1_1_4::request::pulls_submit_review::http_builder(
31591            self.config.base_url.as_ref(),
31592            owner,
31593            repo,
31594            pull_number,
31595            review_id,
31596            self.config.user_agent.as_ref(),
31597            self.config.accept.as_deref(),
31598        )?
31599        .with_authentication(&theScheme)?;
31600
31601        let theRequest = crate::v1_1_4::request::pulls_submit_review::hyper_request(
31602            theBuilder,
31603            theContent.try_into()?,
31604        )?;
31605
31606        ::log::debug!("HTTP request: {:?}", &theRequest);
31607
31608        let theResponse = self.client.request(theRequest).await?;
31609
31610        ::log::debug!("HTTP response: {:?}", &theResponse);
31611
31612        Ok(theResponse)
31613    }
31614
31615    /// Update a pull request branch
31616    /// 
31617    /// Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.
31618    /// 
31619    /// [API method documentation](https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch)
31620    ///
31621    /// # Content
31622    ///
31623    /// - [`&::std::option::Option<crate::v1_1_4::request::pulls_update_branch::body::Json>`](crate::v1_1_4::request::pulls_update_branch::body::Json)
31624    pub async fn pulls_update_branch<Content>(
31625        &self,
31626        owner: &str,
31627        repo: &str,
31628        pull_number: i64,
31629        theContent: Content,
31630    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
31631    where
31632        Content: Copy + TryInto<crate::v1_1_4::request::pulls_update_branch::Content<::hyper::Body>>,
31633        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::pulls_update_branch::Content<::hyper::Body>>>::Error>
31634    {
31635        let mut theScheme = AuthScheme::from(&self.config.authentication);
31636
31637        while let Some(auth_step) = theScheme.step()? {
31638            match auth_step {
31639                ::authentic::AuthenticationStep::Request(auth_request) => {
31640                    theScheme.respond(self.client.request(auth_request).await);
31641                }
31642                ::authentic::AuthenticationStep::WaitFor(duration) => {
31643                    (self.sleep)(duration).await;
31644                }
31645            }
31646        }
31647        let theBuilder = crate::v1_1_4::request::pulls_update_branch::http_builder(
31648            self.config.base_url.as_ref(),
31649            owner,
31650            repo,
31651            pull_number,
31652            self.config.user_agent.as_ref(),
31653            self.config.accept.as_deref(),
31654        )?
31655        .with_authentication(&theScheme)?;
31656
31657        let theRequest = crate::v1_1_4::request::pulls_update_branch::hyper_request(
31658            theBuilder,
31659            theContent.try_into()?,
31660        )?;
31661
31662        ::log::debug!("HTTP request: {:?}", &theRequest);
31663
31664        let theResponse = self.client.request(theRequest).await?;
31665
31666        ::log::debug!("HTTP response: {:?}", &theResponse);
31667
31668        Ok(theResponse)
31669    }
31670
31671    /// Get a repository README
31672    /// 
31673    /// Gets the preferred README for a repository.
31674    /// 
31675    /// READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML.
31676    /// 
31677    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-repository-readme)
31678    pub async fn repos_get_readme(
31679        &self,
31680        owner: &str,
31681        repo: &str,
31682        r#ref: ::std::option::Option<&str>,
31683    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
31684        let mut theScheme = AuthScheme::from(&self.config.authentication);
31685
31686        while let Some(auth_step) = theScheme.step()? {
31687            match auth_step {
31688                ::authentic::AuthenticationStep::Request(auth_request) => {
31689                    theScheme.respond(self.client.request(auth_request).await);
31690                }
31691                ::authentic::AuthenticationStep::WaitFor(duration) => {
31692                    (self.sleep)(duration).await;
31693                }
31694            }
31695        }
31696        let theBuilder = crate::v1_1_4::request::repos_get_readme::http_builder(
31697            self.config.base_url.as_ref(),
31698            owner,
31699            repo,
31700            r#ref,
31701            self.config.user_agent.as_ref(),
31702            self.config.accept.as_deref(),
31703        )?
31704        .with_authentication(&theScheme)?;
31705
31706        let theRequest =
31707            crate::v1_1_4::request::repos_get_readme::hyper_request(theBuilder)?;
31708
31709        ::log::debug!("HTTP request: {:?}", &theRequest);
31710
31711        let theResponse = self.client.request(theRequest).await?;
31712
31713        ::log::debug!("HTTP response: {:?}", &theResponse);
31714
31715        Ok(theResponse)
31716    }
31717
31718    /// Get a repository README for a directory
31719    /// 
31720    /// Gets the README from a repository directory.
31721    /// 
31722    /// READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML.
31723    /// 
31724    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme)
31725    pub async fn repos_get_readme_in_directory(
31726        &self,
31727        owner: &str,
31728        repo: &str,
31729        dir: &str,
31730        r#ref: ::std::option::Option<&str>,
31731    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
31732        let mut theScheme = AuthScheme::from(&self.config.authentication);
31733
31734        while let Some(auth_step) = theScheme.step()? {
31735            match auth_step {
31736                ::authentic::AuthenticationStep::Request(auth_request) => {
31737                    theScheme.respond(self.client.request(auth_request).await);
31738                }
31739                ::authentic::AuthenticationStep::WaitFor(duration) => {
31740                    (self.sleep)(duration).await;
31741                }
31742            }
31743        }
31744        let theBuilder = crate::v1_1_4::request::repos_get_readme_in_directory::http_builder(
31745            self.config.base_url.as_ref(),
31746            owner,
31747            repo,
31748            dir,
31749            r#ref,
31750            self.config.user_agent.as_ref(),
31751            self.config.accept.as_deref(),
31752        )?
31753        .with_authentication(&theScheme)?;
31754
31755        let theRequest =
31756            crate::v1_1_4::request::repos_get_readme_in_directory::hyper_request(theBuilder)?;
31757
31758        ::log::debug!("HTTP request: {:?}", &theRequest);
31759
31760        let theResponse = self.client.request(theRequest).await?;
31761
31762        ::log::debug!("HTTP response: {:?}", &theResponse);
31763
31764        Ok(theResponse)
31765    }
31766
31767    /// List releases
31768    /// 
31769    /// This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/reference/repos#list-repository-tags).
31770    /// 
31771    /// Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.
31772    /// 
31773    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-releases)
31774    pub async fn repos_list_releases(
31775        &self,
31776        owner: &str,
31777        repo: &str,
31778        per_page: ::std::option::Option<i64>,
31779        page: ::std::option::Option<i64>,
31780    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
31781        let mut theScheme = AuthScheme::from(&self.config.authentication);
31782
31783        while let Some(auth_step) = theScheme.step()? {
31784            match auth_step {
31785                ::authentic::AuthenticationStep::Request(auth_request) => {
31786                    theScheme.respond(self.client.request(auth_request).await);
31787                }
31788                ::authentic::AuthenticationStep::WaitFor(duration) => {
31789                    (self.sleep)(duration).await;
31790                }
31791            }
31792        }
31793        let theBuilder = crate::v1_1_4::request::repos_list_releases::http_builder(
31794            self.config.base_url.as_ref(),
31795            owner,
31796            repo,
31797            per_page,
31798            page,
31799            self.config.user_agent.as_ref(),
31800            self.config.accept.as_deref(),
31801        )?
31802        .with_authentication(&theScheme)?;
31803
31804        let theRequest =
31805            crate::v1_1_4::request::repos_list_releases::hyper_request(theBuilder)?;
31806
31807        ::log::debug!("HTTP request: {:?}", &theRequest);
31808
31809        let theResponse = self.client.request(theRequest).await?;
31810
31811        ::log::debug!("HTTP response: {:?}", &theResponse);
31812
31813        Ok(theResponse)
31814    }
31815
31816    /// Create a release
31817    /// 
31818    /// Users with push access to the repository can create a release.
31819    /// 
31820    /// This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
31821    /// 
31822    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-a-release)
31823    ///
31824    /// # Content
31825    ///
31826    /// - [`&v1_1_4::request::repos_create_release::body::Json`](crate::v1_1_4::request::repos_create_release::body::Json)
31827    pub async fn repos_create_release<Content>(
31828        &self,
31829        owner: &str,
31830        repo: &str,
31831        theContent: Content,
31832    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
31833    where
31834        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_release::Content<::hyper::Body>>,
31835        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_release::Content<::hyper::Body>>>::Error>
31836    {
31837        let mut theScheme = AuthScheme::from(&self.config.authentication);
31838
31839        while let Some(auth_step) = theScheme.step()? {
31840            match auth_step {
31841                ::authentic::AuthenticationStep::Request(auth_request) => {
31842                    theScheme.respond(self.client.request(auth_request).await);
31843                }
31844                ::authentic::AuthenticationStep::WaitFor(duration) => {
31845                    (self.sleep)(duration).await;
31846                }
31847            }
31848        }
31849        let theBuilder = crate::v1_1_4::request::repos_create_release::http_builder(
31850            self.config.base_url.as_ref(),
31851            owner,
31852            repo,
31853            self.config.user_agent.as_ref(),
31854            self.config.accept.as_deref(),
31855        )?
31856        .with_authentication(&theScheme)?;
31857
31858        let theRequest = crate::v1_1_4::request::repos_create_release::hyper_request(
31859            theBuilder,
31860            theContent.try_into()?,
31861        )?;
31862
31863        ::log::debug!("HTTP request: {:?}", &theRequest);
31864
31865        let theResponse = self.client.request(theRequest).await?;
31866
31867        ::log::debug!("HTTP response: {:?}", &theResponse);
31868
31869        Ok(theResponse)
31870    }
31871
31872    /// Get a release asset
31873    /// 
31874    /// To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/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.
31875    /// 
31876    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-release-asset)
31877    pub async fn repos_get_release_asset(
31878        &self,
31879        owner: &str,
31880        repo: &str,
31881        asset_id: i64,
31882    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
31883        let mut theScheme = AuthScheme::from(&self.config.authentication);
31884
31885        while let Some(auth_step) = theScheme.step()? {
31886            match auth_step {
31887                ::authentic::AuthenticationStep::Request(auth_request) => {
31888                    theScheme.respond(self.client.request(auth_request).await);
31889                }
31890                ::authentic::AuthenticationStep::WaitFor(duration) => {
31891                    (self.sleep)(duration).await;
31892                }
31893            }
31894        }
31895        let theBuilder = crate::v1_1_4::request::repos_get_release_asset::http_builder(
31896            self.config.base_url.as_ref(),
31897            owner,
31898            repo,
31899            asset_id,
31900            self.config.user_agent.as_ref(),
31901            self.config.accept.as_deref(),
31902        )?
31903        .with_authentication(&theScheme)?;
31904
31905        let theRequest =
31906            crate::v1_1_4::request::repos_get_release_asset::hyper_request(theBuilder)?;
31907
31908        ::log::debug!("HTTP request: {:?}", &theRequest);
31909
31910        let theResponse = self.client.request(theRequest).await?;
31911
31912        ::log::debug!("HTTP response: {:?}", &theResponse);
31913
31914        Ok(theResponse)
31915    }
31916
31917    /// Delete a release asset
31918    /// 
31919    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-a-release-asset)
31920    pub async fn repos_delete_release_asset(
31921        &self,
31922        owner: &str,
31923        repo: &str,
31924        asset_id: i64,
31925    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
31926        let mut theScheme = AuthScheme::from(&self.config.authentication);
31927
31928        while let Some(auth_step) = theScheme.step()? {
31929            match auth_step {
31930                ::authentic::AuthenticationStep::Request(auth_request) => {
31931                    theScheme.respond(self.client.request(auth_request).await);
31932                }
31933                ::authentic::AuthenticationStep::WaitFor(duration) => {
31934                    (self.sleep)(duration).await;
31935                }
31936            }
31937        }
31938        let theBuilder = crate::v1_1_4::request::repos_delete_release_asset::http_builder(
31939            self.config.base_url.as_ref(),
31940            owner,
31941            repo,
31942            asset_id,
31943            self.config.user_agent.as_ref(),
31944            self.config.accept.as_deref(),
31945        )?
31946        .with_authentication(&theScheme)?;
31947
31948        let theRequest =
31949            crate::v1_1_4::request::repos_delete_release_asset::hyper_request(theBuilder)?;
31950
31951        ::log::debug!("HTTP request: {:?}", &theRequest);
31952
31953        let theResponse = self.client.request(theRequest).await?;
31954
31955        ::log::debug!("HTTP response: {:?}", &theResponse);
31956
31957        Ok(theResponse)
31958    }
31959
31960    /// Update a release asset
31961    /// 
31962    /// Users with push access to the repository can edit a release asset.
31963    /// 
31964    /// [API method documentation](https://docs.github.com/rest/reference/repos#update-a-release-asset)
31965    ///
31966    /// # Content
31967    ///
31968    /// - [`&v1_1_4::request::repos_update_release_asset::body::Json`](crate::v1_1_4::request::repos_update_release_asset::body::Json)
31969    pub async fn repos_update_release_asset<Content>(
31970        &self,
31971        owner: &str,
31972        repo: &str,
31973        asset_id: i64,
31974        theContent: Content,
31975    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
31976    where
31977        Content: Copy + TryInto<crate::v1_1_4::request::repos_update_release_asset::Content<::hyper::Body>>,
31978        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_update_release_asset::Content<::hyper::Body>>>::Error>
31979    {
31980        let mut theScheme = AuthScheme::from(&self.config.authentication);
31981
31982        while let Some(auth_step) = theScheme.step()? {
31983            match auth_step {
31984                ::authentic::AuthenticationStep::Request(auth_request) => {
31985                    theScheme.respond(self.client.request(auth_request).await);
31986                }
31987                ::authentic::AuthenticationStep::WaitFor(duration) => {
31988                    (self.sleep)(duration).await;
31989                }
31990            }
31991        }
31992        let theBuilder = crate::v1_1_4::request::repos_update_release_asset::http_builder(
31993            self.config.base_url.as_ref(),
31994            owner,
31995            repo,
31996            asset_id,
31997            self.config.user_agent.as_ref(),
31998            self.config.accept.as_deref(),
31999        )?
32000        .with_authentication(&theScheme)?;
32001
32002        let theRequest = crate::v1_1_4::request::repos_update_release_asset::hyper_request(
32003            theBuilder,
32004            theContent.try_into()?,
32005        )?;
32006
32007        ::log::debug!("HTTP request: {:?}", &theRequest);
32008
32009        let theResponse = self.client.request(theRequest).await?;
32010
32011        ::log::debug!("HTTP response: {:?}", &theResponse);
32012
32013        Ok(theResponse)
32014    }
32015
32016    /// Generate release notes content for a release
32017    /// 
32018    /// Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release.
32019    /// 
32020    /// [API method documentation](https://docs.github.com/rest/reference/repos#generate-release-notes)
32021    ///
32022    /// # Content
32023    ///
32024    /// - [`&v1_1_4::request::repos_generate_release_notes::body::Json`](crate::v1_1_4::request::repos_generate_release_notes::body::Json)
32025    pub async fn repos_generate_release_notes<Content>(
32026        &self,
32027        owner: &str,
32028        repo: &str,
32029        theContent: Content,
32030    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
32031    where
32032        Content: Copy + TryInto<crate::v1_1_4::request::repos_generate_release_notes::Content<::hyper::Body>>,
32033        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_generate_release_notes::Content<::hyper::Body>>>::Error>
32034    {
32035        let mut theScheme = AuthScheme::from(&self.config.authentication);
32036
32037        while let Some(auth_step) = theScheme.step()? {
32038            match auth_step {
32039                ::authentic::AuthenticationStep::Request(auth_request) => {
32040                    theScheme.respond(self.client.request(auth_request).await);
32041                }
32042                ::authentic::AuthenticationStep::WaitFor(duration) => {
32043                    (self.sleep)(duration).await;
32044                }
32045            }
32046        }
32047        let theBuilder = crate::v1_1_4::request::repos_generate_release_notes::http_builder(
32048            self.config.base_url.as_ref(),
32049            owner,
32050            repo,
32051            self.config.user_agent.as_ref(),
32052            self.config.accept.as_deref(),
32053        )?
32054        .with_authentication(&theScheme)?;
32055
32056        let theRequest = crate::v1_1_4::request::repos_generate_release_notes::hyper_request(
32057            theBuilder,
32058            theContent.try_into()?,
32059        )?;
32060
32061        ::log::debug!("HTTP request: {:?}", &theRequest);
32062
32063        let theResponse = self.client.request(theRequest).await?;
32064
32065        ::log::debug!("HTTP response: {:?}", &theResponse);
32066
32067        Ok(theResponse)
32068    }
32069
32070    /// Get the latest release
32071    /// 
32072    /// View the latest published full release for the repository.
32073    /// 
32074    /// The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published.
32075    /// 
32076    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-the-latest-release)
32077    pub async fn repos_get_latest_release(
32078        &self,
32079        owner: &str,
32080        repo: &str,
32081    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32082        let mut theScheme = AuthScheme::from(&self.config.authentication);
32083
32084        while let Some(auth_step) = theScheme.step()? {
32085            match auth_step {
32086                ::authentic::AuthenticationStep::Request(auth_request) => {
32087                    theScheme.respond(self.client.request(auth_request).await);
32088                }
32089                ::authentic::AuthenticationStep::WaitFor(duration) => {
32090                    (self.sleep)(duration).await;
32091                }
32092            }
32093        }
32094        let theBuilder = crate::v1_1_4::request::repos_get_latest_release::http_builder(
32095            self.config.base_url.as_ref(),
32096            owner,
32097            repo,
32098            self.config.user_agent.as_ref(),
32099            self.config.accept.as_deref(),
32100        )?
32101        .with_authentication(&theScheme)?;
32102
32103        let theRequest =
32104            crate::v1_1_4::request::repos_get_latest_release::hyper_request(theBuilder)?;
32105
32106        ::log::debug!("HTTP request: {:?}", &theRequest);
32107
32108        let theResponse = self.client.request(theRequest).await?;
32109
32110        ::log::debug!("HTTP response: {:?}", &theResponse);
32111
32112        Ok(theResponse)
32113    }
32114
32115    /// Get a release by tag name
32116    /// 
32117    /// Get a published release with the specified tag.
32118    /// 
32119    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name)
32120    pub async fn repos_get_release_by_tag(
32121        &self,
32122        owner: &str,
32123        repo: &str,
32124        tag: &str,
32125    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32126        let mut theScheme = AuthScheme::from(&self.config.authentication);
32127
32128        while let Some(auth_step) = theScheme.step()? {
32129            match auth_step {
32130                ::authentic::AuthenticationStep::Request(auth_request) => {
32131                    theScheme.respond(self.client.request(auth_request).await);
32132                }
32133                ::authentic::AuthenticationStep::WaitFor(duration) => {
32134                    (self.sleep)(duration).await;
32135                }
32136            }
32137        }
32138        let theBuilder = crate::v1_1_4::request::repos_get_release_by_tag::http_builder(
32139            self.config.base_url.as_ref(),
32140            owner,
32141            repo,
32142            tag,
32143            self.config.user_agent.as_ref(),
32144            self.config.accept.as_deref(),
32145        )?
32146        .with_authentication(&theScheme)?;
32147
32148        let theRequest =
32149            crate::v1_1_4::request::repos_get_release_by_tag::hyper_request(theBuilder)?;
32150
32151        ::log::debug!("HTTP request: {:?}", &theRequest);
32152
32153        let theResponse = self.client.request(theRequest).await?;
32154
32155        ::log::debug!("HTTP response: {:?}", &theResponse);
32156
32157        Ok(theResponse)
32158    }
32159
32160    /// Get a release
32161    /// 
32162    /// **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia).
32163    /// 
32164    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-a-release)
32165    pub async fn repos_get_release(
32166        &self,
32167        owner: &str,
32168        repo: &str,
32169        release_id: i64,
32170    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32171        let mut theScheme = AuthScheme::from(&self.config.authentication);
32172
32173        while let Some(auth_step) = theScheme.step()? {
32174            match auth_step {
32175                ::authentic::AuthenticationStep::Request(auth_request) => {
32176                    theScheme.respond(self.client.request(auth_request).await);
32177                }
32178                ::authentic::AuthenticationStep::WaitFor(duration) => {
32179                    (self.sleep)(duration).await;
32180                }
32181            }
32182        }
32183        let theBuilder = crate::v1_1_4::request::repos_get_release::http_builder(
32184            self.config.base_url.as_ref(),
32185            owner,
32186            repo,
32187            release_id,
32188            self.config.user_agent.as_ref(),
32189            self.config.accept.as_deref(),
32190        )?
32191        .with_authentication(&theScheme)?;
32192
32193        let theRequest =
32194            crate::v1_1_4::request::repos_get_release::hyper_request(theBuilder)?;
32195
32196        ::log::debug!("HTTP request: {:?}", &theRequest);
32197
32198        let theResponse = self.client.request(theRequest).await?;
32199
32200        ::log::debug!("HTTP response: {:?}", &theResponse);
32201
32202        Ok(theResponse)
32203    }
32204
32205    /// Delete a release
32206    /// 
32207    /// Users with push access to the repository can delete a release.
32208    /// 
32209    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-a-release)
32210    pub async fn repos_delete_release(
32211        &self,
32212        owner: &str,
32213        repo: &str,
32214        release_id: i64,
32215    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32216        let mut theScheme = AuthScheme::from(&self.config.authentication);
32217
32218        while let Some(auth_step) = theScheme.step()? {
32219            match auth_step {
32220                ::authentic::AuthenticationStep::Request(auth_request) => {
32221                    theScheme.respond(self.client.request(auth_request).await);
32222                }
32223                ::authentic::AuthenticationStep::WaitFor(duration) => {
32224                    (self.sleep)(duration).await;
32225                }
32226            }
32227        }
32228        let theBuilder = crate::v1_1_4::request::repos_delete_release::http_builder(
32229            self.config.base_url.as_ref(),
32230            owner,
32231            repo,
32232            release_id,
32233            self.config.user_agent.as_ref(),
32234            self.config.accept.as_deref(),
32235        )?
32236        .with_authentication(&theScheme)?;
32237
32238        let theRequest =
32239            crate::v1_1_4::request::repos_delete_release::hyper_request(theBuilder)?;
32240
32241        ::log::debug!("HTTP request: {:?}", &theRequest);
32242
32243        let theResponse = self.client.request(theRequest).await?;
32244
32245        ::log::debug!("HTTP response: {:?}", &theResponse);
32246
32247        Ok(theResponse)
32248    }
32249
32250    /// Update a release
32251    /// 
32252    /// Users with push access to the repository can edit a release.
32253    /// 
32254    /// [API method documentation](https://docs.github.com/rest/reference/repos#update-a-release)
32255    ///
32256    /// # Content
32257    ///
32258    /// - [`&v1_1_4::request::repos_update_release::body::Json`](crate::v1_1_4::request::repos_update_release::body::Json)
32259    pub async fn repos_update_release<Content>(
32260        &self,
32261        owner: &str,
32262        repo: &str,
32263        release_id: i64,
32264        theContent: Content,
32265    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
32266    where
32267        Content: Copy + TryInto<crate::v1_1_4::request::repos_update_release::Content<::hyper::Body>>,
32268        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_update_release::Content<::hyper::Body>>>::Error>
32269    {
32270        let mut theScheme = AuthScheme::from(&self.config.authentication);
32271
32272        while let Some(auth_step) = theScheme.step()? {
32273            match auth_step {
32274                ::authentic::AuthenticationStep::Request(auth_request) => {
32275                    theScheme.respond(self.client.request(auth_request).await);
32276                }
32277                ::authentic::AuthenticationStep::WaitFor(duration) => {
32278                    (self.sleep)(duration).await;
32279                }
32280            }
32281        }
32282        let theBuilder = crate::v1_1_4::request::repos_update_release::http_builder(
32283            self.config.base_url.as_ref(),
32284            owner,
32285            repo,
32286            release_id,
32287            self.config.user_agent.as_ref(),
32288            self.config.accept.as_deref(),
32289        )?
32290        .with_authentication(&theScheme)?;
32291
32292        let theRequest = crate::v1_1_4::request::repos_update_release::hyper_request(
32293            theBuilder,
32294            theContent.try_into()?,
32295        )?;
32296
32297        ::log::debug!("HTTP request: {:?}", &theRequest);
32298
32299        let theResponse = self.client.request(theRequest).await?;
32300
32301        ::log::debug!("HTTP response: {:?}", &theResponse);
32302
32303        Ok(theResponse)
32304    }
32305
32306    /// List release assets
32307    /// 
32308    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-release-assets)
32309    pub async fn repos_list_release_assets(
32310        &self,
32311        owner: &str,
32312        repo: &str,
32313        release_id: i64,
32314        per_page: ::std::option::Option<i64>,
32315        page: ::std::option::Option<i64>,
32316    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32317        let mut theScheme = AuthScheme::from(&self.config.authentication);
32318
32319        while let Some(auth_step) = theScheme.step()? {
32320            match auth_step {
32321                ::authentic::AuthenticationStep::Request(auth_request) => {
32322                    theScheme.respond(self.client.request(auth_request).await);
32323                }
32324                ::authentic::AuthenticationStep::WaitFor(duration) => {
32325                    (self.sleep)(duration).await;
32326                }
32327            }
32328        }
32329        let theBuilder = crate::v1_1_4::request::repos_list_release_assets::http_builder(
32330            self.config.base_url.as_ref(),
32331            owner,
32332            repo,
32333            release_id,
32334            per_page,
32335            page,
32336            self.config.user_agent.as_ref(),
32337            self.config.accept.as_deref(),
32338        )?
32339        .with_authentication(&theScheme)?;
32340
32341        let theRequest =
32342            crate::v1_1_4::request::repos_list_release_assets::hyper_request(theBuilder)?;
32343
32344        ::log::debug!("HTTP request: {:?}", &theRequest);
32345
32346        let theResponse = self.client.request(theRequest).await?;
32347
32348        ::log::debug!("HTTP response: {:?}", &theResponse);
32349
32350        Ok(theResponse)
32351    }
32352
32353    /// Upload a release asset
32354    /// 
32355    /// This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in
32356    /// the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset.
32357    /// 
32358    /// You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint.
32359    /// 
32360    /// Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: 
32361    /// 
32362    /// `application/zip`
32363    /// 
32364    /// GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,
32365    /// you'll still need to pass your authentication to be able to upload an asset.
32366    /// 
32367    /// When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted.
32368    /// 
32369    /// **Notes:**
32370    /// *   GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)"
32371    /// endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api).
32372    /// *   If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset.
32373    /// 
32374    /// [API method documentation](https://docs.github.com/rest/reference/repos#upload-a-release-asset)
32375    pub async fn repos_upload_release_asset<Content>(
32376        &self,
32377        owner: &str,
32378        repo: &str,
32379        release_id: i64,
32380        name: &str,
32381        label: ::std::option::Option<&str>,
32382        theContent: Content,
32383    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
32384    where
32385        Content: Copy + TryInto<crate::v1_1_4::request::repos_upload_release_asset::Content<::hyper::Body>>,
32386        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_upload_release_asset::Content<::hyper::Body>>>::Error>
32387    {
32388        let mut theScheme = AuthScheme::from(&self.config.authentication);
32389
32390        while let Some(auth_step) = theScheme.step()? {
32391            match auth_step {
32392                ::authentic::AuthenticationStep::Request(auth_request) => {
32393                    theScheme.respond(self.client.request(auth_request).await);
32394                }
32395                ::authentic::AuthenticationStep::WaitFor(duration) => {
32396                    (self.sleep)(duration).await;
32397                }
32398            }
32399        }
32400        let theBuilder = crate::v1_1_4::request::repos_upload_release_asset::http_builder(
32401            self.config.base_url.as_ref(),
32402            owner,
32403            repo,
32404            release_id,
32405            name,
32406            label,
32407            self.config.user_agent.as_ref(),
32408            self.config.accept.as_deref(),
32409        )?
32410        .with_authentication(&theScheme)?;
32411
32412        let theRequest = crate::v1_1_4::request::repos_upload_release_asset::hyper_request(
32413            theBuilder,
32414            theContent.try_into()?,
32415        )?;
32416
32417        ::log::debug!("HTTP request: {:?}", &theRequest);
32418
32419        let theResponse = self.client.request(theRequest).await?;
32420
32421        ::log::debug!("HTTP response: {:?}", &theResponse);
32422
32423        Ok(theResponse)
32424    }
32425
32426    /// List reactions for a release
32427    /// 
32428    /// List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases).
32429    /// 
32430    /// [API method documentation](https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release)
32431    pub async fn reactions_list_for_release(
32432        &self,
32433        owner: &str,
32434        repo: &str,
32435        release_id: i64,
32436        content: ::std::option::Option<&str>,
32437        per_page: ::std::option::Option<i64>,
32438        page: ::std::option::Option<i64>,
32439    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32440        let mut theScheme = AuthScheme::from(&self.config.authentication);
32441
32442        while let Some(auth_step) = theScheme.step()? {
32443            match auth_step {
32444                ::authentic::AuthenticationStep::Request(auth_request) => {
32445                    theScheme.respond(self.client.request(auth_request).await);
32446                }
32447                ::authentic::AuthenticationStep::WaitFor(duration) => {
32448                    (self.sleep)(duration).await;
32449                }
32450            }
32451        }
32452        let theBuilder = crate::v1_1_4::request::reactions_list_for_release::http_builder(
32453            self.config.base_url.as_ref(),
32454            owner,
32455            repo,
32456            release_id,
32457            content,
32458            per_page,
32459            page,
32460            self.config.user_agent.as_ref(),
32461            self.config.accept.as_deref(),
32462        )?
32463        .with_authentication(&theScheme)?;
32464
32465        let theRequest =
32466            crate::v1_1_4::request::reactions_list_for_release::hyper_request(theBuilder)?;
32467
32468        ::log::debug!("HTTP request: {:?}", &theRequest);
32469
32470        let theResponse = self.client.request(theRequest).await?;
32471
32472        ::log::debug!("HTTP response: {:?}", &theResponse);
32473
32474        Ok(theResponse)
32475    }
32476
32477    /// Create reaction for a release
32478    /// 
32479    /// Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release.
32480    /// 
32481    /// [API method documentation](https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release)
32482    ///
32483    /// # Content
32484    ///
32485    /// - [`&v1_1_4::request::reactions_create_for_release::body::Json`](crate::v1_1_4::request::reactions_create_for_release::body::Json)
32486    pub async fn reactions_create_for_release<Content>(
32487        &self,
32488        owner: &str,
32489        repo: &str,
32490        release_id: i64,
32491        theContent: Content,
32492    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
32493    where
32494        Content: Copy + TryInto<crate::v1_1_4::request::reactions_create_for_release::Content<::hyper::Body>>,
32495        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::reactions_create_for_release::Content<::hyper::Body>>>::Error>
32496    {
32497        let mut theScheme = AuthScheme::from(&self.config.authentication);
32498
32499        while let Some(auth_step) = theScheme.step()? {
32500            match auth_step {
32501                ::authentic::AuthenticationStep::Request(auth_request) => {
32502                    theScheme.respond(self.client.request(auth_request).await);
32503                }
32504                ::authentic::AuthenticationStep::WaitFor(duration) => {
32505                    (self.sleep)(duration).await;
32506                }
32507            }
32508        }
32509        let theBuilder = crate::v1_1_4::request::reactions_create_for_release::http_builder(
32510            self.config.base_url.as_ref(),
32511            owner,
32512            repo,
32513            release_id,
32514            self.config.user_agent.as_ref(),
32515            self.config.accept.as_deref(),
32516        )?
32517        .with_authentication(&theScheme)?;
32518
32519        let theRequest = crate::v1_1_4::request::reactions_create_for_release::hyper_request(
32520            theBuilder,
32521            theContent.try_into()?,
32522        )?;
32523
32524        ::log::debug!("HTTP request: {:?}", &theRequest);
32525
32526        let theResponse = self.client.request(theRequest).await?;
32527
32528        ::log::debug!("HTTP response: {:?}", &theResponse);
32529
32530        Ok(theResponse)
32531    }
32532
32533    /// Delete a release reaction
32534    /// 
32535    /// **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`.
32536    /// 
32537    /// Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases).
32538    /// 
32539    /// [API method documentation](https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction)
32540    pub async fn reactions_delete_for_release(
32541        &self,
32542        owner: &str,
32543        repo: &str,
32544        release_id: i64,
32545        reaction_id: i64,
32546    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32547        let mut theScheme = AuthScheme::from(&self.config.authentication);
32548
32549        while let Some(auth_step) = theScheme.step()? {
32550            match auth_step {
32551                ::authentic::AuthenticationStep::Request(auth_request) => {
32552                    theScheme.respond(self.client.request(auth_request).await);
32553                }
32554                ::authentic::AuthenticationStep::WaitFor(duration) => {
32555                    (self.sleep)(duration).await;
32556                }
32557            }
32558        }
32559        let theBuilder = crate::v1_1_4::request::reactions_delete_for_release::http_builder(
32560            self.config.base_url.as_ref(),
32561            owner,
32562            repo,
32563            release_id,
32564            reaction_id,
32565            self.config.user_agent.as_ref(),
32566            self.config.accept.as_deref(),
32567        )?
32568        .with_authentication(&theScheme)?;
32569
32570        let theRequest =
32571            crate::v1_1_4::request::reactions_delete_for_release::hyper_request(theBuilder)?;
32572
32573        ::log::debug!("HTTP request: {:?}", &theRequest);
32574
32575        let theResponse = self.client.request(theRequest).await?;
32576
32577        ::log::debug!("HTTP response: {:?}", &theResponse);
32578
32579        Ok(theResponse)
32580    }
32581
32582    /// List secret scanning alerts for a repository
32583    /// 
32584    /// Lists secret scanning alerts for an eligible repository, from newest to oldest.
32585    /// To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope.
32586    /// For public repositories, you may instead use the `public_repo` scope.
32587    /// 
32588    /// GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.
32589    /// 
32590    /// [API method documentation](https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository)
32591    #[allow(clippy::too_many_arguments)]
32592    pub async fn secret_scanning_list_alerts_for_repo(
32593        &self,
32594        owner: &str,
32595        repo: &str,
32596        state: ::std::option::Option<&str>,
32597        secret_type: ::std::option::Option<&str>,
32598        resolution: ::std::option::Option<&str>,
32599        page: ::std::option::Option<i64>,
32600        per_page: ::std::option::Option<i64>,
32601    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32602        let mut theScheme = AuthScheme::from(&self.config.authentication);
32603
32604        while let Some(auth_step) = theScheme.step()? {
32605            match auth_step {
32606                ::authentic::AuthenticationStep::Request(auth_request) => {
32607                    theScheme.respond(self.client.request(auth_request).await);
32608                }
32609                ::authentic::AuthenticationStep::WaitFor(duration) => {
32610                    (self.sleep)(duration).await;
32611                }
32612            }
32613        }
32614        let theBuilder = crate::v1_1_4::request::secret_scanning_list_alerts_for_repo::http_builder(
32615            self.config.base_url.as_ref(),
32616            owner,
32617            repo,
32618            state,
32619            secret_type,
32620            resolution,
32621            page,
32622            per_page,
32623            self.config.user_agent.as_ref(),
32624            self.config.accept.as_deref(),
32625        )?
32626        .with_authentication(&theScheme)?;
32627
32628        let theRequest =
32629            crate::v1_1_4::request::secret_scanning_list_alerts_for_repo::hyper_request(theBuilder)?;
32630
32631        ::log::debug!("HTTP request: {:?}", &theRequest);
32632
32633        let theResponse = self.client.request(theRequest).await?;
32634
32635        ::log::debug!("HTTP response: {:?}", &theResponse);
32636
32637        Ok(theResponse)
32638    }
32639
32640    /// Get a secret scanning alert
32641    /// 
32642    /// Gets a single secret scanning alert detected in an eligible repository.
32643    /// To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope.
32644    /// For public repositories, you may instead use the `public_repo` scope.
32645    /// 
32646    /// GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.
32647    /// 
32648    /// [API method documentation](https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert)
32649    pub async fn secret_scanning_get_alert(
32650        &self,
32651        owner: &str,
32652        repo: &str,
32653        alert_number: i64,
32654    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32655        let mut theScheme = AuthScheme::from(&self.config.authentication);
32656
32657        while let Some(auth_step) = theScheme.step()? {
32658            match auth_step {
32659                ::authentic::AuthenticationStep::Request(auth_request) => {
32660                    theScheme.respond(self.client.request(auth_request).await);
32661                }
32662                ::authentic::AuthenticationStep::WaitFor(duration) => {
32663                    (self.sleep)(duration).await;
32664                }
32665            }
32666        }
32667        let theBuilder = crate::v1_1_4::request::secret_scanning_get_alert::http_builder(
32668            self.config.base_url.as_ref(),
32669            owner,
32670            repo,
32671            alert_number,
32672            self.config.user_agent.as_ref(),
32673            self.config.accept.as_deref(),
32674        )?
32675        .with_authentication(&theScheme)?;
32676
32677        let theRequest =
32678            crate::v1_1_4::request::secret_scanning_get_alert::hyper_request(theBuilder)?;
32679
32680        ::log::debug!("HTTP request: {:?}", &theRequest);
32681
32682        let theResponse = self.client.request(theRequest).await?;
32683
32684        ::log::debug!("HTTP response: {:?}", &theResponse);
32685
32686        Ok(theResponse)
32687    }
32688
32689    /// Update a secret scanning alert
32690    /// 
32691    /// Updates the status of a secret scanning alert in an eligible repository.
32692    /// To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope.
32693    /// For public repositories, you may instead use the `public_repo` scope.
32694    /// 
32695    /// GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint.
32696    /// 
32697    /// [API method documentation](https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert)
32698    ///
32699    /// # Content
32700    ///
32701    /// - [`&v1_1_4::request::secret_scanning_update_alert::body::Json`](crate::v1_1_4::request::secret_scanning_update_alert::body::Json)
32702    pub async fn secret_scanning_update_alert<Content>(
32703        &self,
32704        owner: &str,
32705        repo: &str,
32706        alert_number: i64,
32707        theContent: Content,
32708    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
32709    where
32710        Content: Copy + TryInto<crate::v1_1_4::request::secret_scanning_update_alert::Content<::hyper::Body>>,
32711        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::secret_scanning_update_alert::Content<::hyper::Body>>>::Error>
32712    {
32713        let mut theScheme = AuthScheme::from(&self.config.authentication);
32714
32715        while let Some(auth_step) = theScheme.step()? {
32716            match auth_step {
32717                ::authentic::AuthenticationStep::Request(auth_request) => {
32718                    theScheme.respond(self.client.request(auth_request).await);
32719                }
32720                ::authentic::AuthenticationStep::WaitFor(duration) => {
32721                    (self.sleep)(duration).await;
32722                }
32723            }
32724        }
32725        let theBuilder = crate::v1_1_4::request::secret_scanning_update_alert::http_builder(
32726            self.config.base_url.as_ref(),
32727            owner,
32728            repo,
32729            alert_number,
32730            self.config.user_agent.as_ref(),
32731            self.config.accept.as_deref(),
32732        )?
32733        .with_authentication(&theScheme)?;
32734
32735        let theRequest = crate::v1_1_4::request::secret_scanning_update_alert::hyper_request(
32736            theBuilder,
32737            theContent.try_into()?,
32738        )?;
32739
32740        ::log::debug!("HTTP request: {:?}", &theRequest);
32741
32742        let theResponse = self.client.request(theRequest).await?;
32743
32744        ::log::debug!("HTTP response: {:?}", &theResponse);
32745
32746        Ok(theResponse)
32747    }
32748
32749    /// List locations for a secret scanning alert
32750    /// 
32751    /// Lists all locations for a given secret scanning alert for an eligible repository.
32752    /// To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope.
32753    /// For public repositories, you may instead use the `public_repo` scope.
32754    /// 
32755    /// GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint.
32756    /// 
32757    /// [API method documentation](https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert)
32758    pub async fn secret_scanning_list_locations_for_alert(
32759        &self,
32760        owner: &str,
32761        repo: &str,
32762        alert_number: i64,
32763        page: ::std::option::Option<i64>,
32764        per_page: ::std::option::Option<i64>,
32765    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32766        let mut theScheme = AuthScheme::from(&self.config.authentication);
32767
32768        while let Some(auth_step) = theScheme.step()? {
32769            match auth_step {
32770                ::authentic::AuthenticationStep::Request(auth_request) => {
32771                    theScheme.respond(self.client.request(auth_request).await);
32772                }
32773                ::authentic::AuthenticationStep::WaitFor(duration) => {
32774                    (self.sleep)(duration).await;
32775                }
32776            }
32777        }
32778        let theBuilder = crate::v1_1_4::request::secret_scanning_list_locations_for_alert::http_builder(
32779            self.config.base_url.as_ref(),
32780            owner,
32781            repo,
32782            alert_number,
32783            page,
32784            per_page,
32785            self.config.user_agent.as_ref(),
32786            self.config.accept.as_deref(),
32787        )?
32788        .with_authentication(&theScheme)?;
32789
32790        let theRequest =
32791            crate::v1_1_4::request::secret_scanning_list_locations_for_alert::hyper_request(theBuilder)?;
32792
32793        ::log::debug!("HTTP request: {:?}", &theRequest);
32794
32795        let theResponse = self.client.request(theRequest).await?;
32796
32797        ::log::debug!("HTTP response: {:?}", &theResponse);
32798
32799        Ok(theResponse)
32800    }
32801
32802    /// List stargazers
32803    /// 
32804    /// Lists the people that have starred the repository.
32805    /// 
32806    /// You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:
32807    /// 
32808    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-stargazers)
32809    pub async fn activity_list_stargazers_for_repo(
32810        &self,
32811        owner: &str,
32812        repo: &str,
32813        per_page: ::std::option::Option<i64>,
32814        page: ::std::option::Option<i64>,
32815    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32816        let mut theScheme = AuthScheme::from(&self.config.authentication);
32817
32818        while let Some(auth_step) = theScheme.step()? {
32819            match auth_step {
32820                ::authentic::AuthenticationStep::Request(auth_request) => {
32821                    theScheme.respond(self.client.request(auth_request).await);
32822                }
32823                ::authentic::AuthenticationStep::WaitFor(duration) => {
32824                    (self.sleep)(duration).await;
32825                }
32826            }
32827        }
32828        let theBuilder = crate::v1_1_4::request::activity_list_stargazers_for_repo::http_builder(
32829            self.config.base_url.as_ref(),
32830            owner,
32831            repo,
32832            per_page,
32833            page,
32834            self.config.user_agent.as_ref(),
32835            self.config.accept.as_deref(),
32836        )?
32837        .with_authentication(&theScheme)?;
32838
32839        let theRequest =
32840            crate::v1_1_4::request::activity_list_stargazers_for_repo::hyper_request(theBuilder)?;
32841
32842        ::log::debug!("HTTP request: {:?}", &theRequest);
32843
32844        let theResponse = self.client.request(theRequest).await?;
32845
32846        ::log::debug!("HTTP response: {:?}", &theResponse);
32847
32848        Ok(theResponse)
32849    }
32850
32851    /// Get the weekly commit activity
32852    /// 
32853    /// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
32854    /// 
32855    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-the-weekly-commit-activity)
32856    pub async fn repos_get_code_frequency_stats(
32857        &self,
32858        owner: &str,
32859        repo: &str,
32860    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32861        let mut theScheme = AuthScheme::from(&self.config.authentication);
32862
32863        while let Some(auth_step) = theScheme.step()? {
32864            match auth_step {
32865                ::authentic::AuthenticationStep::Request(auth_request) => {
32866                    theScheme.respond(self.client.request(auth_request).await);
32867                }
32868                ::authentic::AuthenticationStep::WaitFor(duration) => {
32869                    (self.sleep)(duration).await;
32870                }
32871            }
32872        }
32873        let theBuilder = crate::v1_1_4::request::repos_get_code_frequency_stats::http_builder(
32874            self.config.base_url.as_ref(),
32875            owner,
32876            repo,
32877            self.config.user_agent.as_ref(),
32878            self.config.accept.as_deref(),
32879        )?
32880        .with_authentication(&theScheme)?;
32881
32882        let theRequest =
32883            crate::v1_1_4::request::repos_get_code_frequency_stats::hyper_request(theBuilder)?;
32884
32885        ::log::debug!("HTTP request: {:?}", &theRequest);
32886
32887        let theResponse = self.client.request(theRequest).await?;
32888
32889        ::log::debug!("HTTP response: {:?}", &theResponse);
32890
32891        Ok(theResponse)
32892    }
32893
32894    /// Get the last year of commit activity
32895    /// 
32896    /// Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`.
32897    /// 
32898    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-the-last-year-of-commit-activity)
32899    pub async fn repos_get_commit_activity_stats(
32900        &self,
32901        owner: &str,
32902        repo: &str,
32903    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32904        let mut theScheme = AuthScheme::from(&self.config.authentication);
32905
32906        while let Some(auth_step) = theScheme.step()? {
32907            match auth_step {
32908                ::authentic::AuthenticationStep::Request(auth_request) => {
32909                    theScheme.respond(self.client.request(auth_request).await);
32910                }
32911                ::authentic::AuthenticationStep::WaitFor(duration) => {
32912                    (self.sleep)(duration).await;
32913                }
32914            }
32915        }
32916        let theBuilder = crate::v1_1_4::request::repos_get_commit_activity_stats::http_builder(
32917            self.config.base_url.as_ref(),
32918            owner,
32919            repo,
32920            self.config.user_agent.as_ref(),
32921            self.config.accept.as_deref(),
32922        )?
32923        .with_authentication(&theScheme)?;
32924
32925        let theRequest =
32926            crate::v1_1_4::request::repos_get_commit_activity_stats::hyper_request(theBuilder)?;
32927
32928        ::log::debug!("HTTP request: {:?}", &theRequest);
32929
32930        let theResponse = self.client.request(theRequest).await?;
32931
32932        ::log::debug!("HTTP response: {:?}", &theResponse);
32933
32934        Ok(theResponse)
32935    }
32936
32937    /// Get all contributor commit activity
32938    /// 
32939    /// Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information:
32940    /// 
32941    /// *   `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time).
32942    /// *   `a` - Number of additions
32943    /// *   `d` - Number of deletions
32944    /// *   `c` - Number of commits
32945    /// 
32946    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-all-contributor-commit-activity)
32947    pub async fn repos_get_contributors_stats(
32948        &self,
32949        owner: &str,
32950        repo: &str,
32951    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32952        let mut theScheme = AuthScheme::from(&self.config.authentication);
32953
32954        while let Some(auth_step) = theScheme.step()? {
32955            match auth_step {
32956                ::authentic::AuthenticationStep::Request(auth_request) => {
32957                    theScheme.respond(self.client.request(auth_request).await);
32958                }
32959                ::authentic::AuthenticationStep::WaitFor(duration) => {
32960                    (self.sleep)(duration).await;
32961                }
32962            }
32963        }
32964        let theBuilder = crate::v1_1_4::request::repos_get_contributors_stats::http_builder(
32965            self.config.base_url.as_ref(),
32966            owner,
32967            repo,
32968            self.config.user_agent.as_ref(),
32969            self.config.accept.as_deref(),
32970        )?
32971        .with_authentication(&theScheme)?;
32972
32973        let theRequest =
32974            crate::v1_1_4::request::repos_get_contributors_stats::hyper_request(theBuilder)?;
32975
32976        ::log::debug!("HTTP request: {:?}", &theRequest);
32977
32978        let theResponse = self.client.request(theRequest).await?;
32979
32980        ::log::debug!("HTTP response: {:?}", &theResponse);
32981
32982        Ok(theResponse)
32983    }
32984
32985    /// Get the weekly commit count
32986    /// 
32987    /// Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`.
32988    /// 
32989    /// The array order is oldest week (index 0) to most recent week.
32990    /// 
32991    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-the-weekly-commit-count)
32992    pub async fn repos_get_participation_stats(
32993        &self,
32994        owner: &str,
32995        repo: &str,
32996    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
32997        let mut theScheme = AuthScheme::from(&self.config.authentication);
32998
32999        while let Some(auth_step) = theScheme.step()? {
33000            match auth_step {
33001                ::authentic::AuthenticationStep::Request(auth_request) => {
33002                    theScheme.respond(self.client.request(auth_request).await);
33003                }
33004                ::authentic::AuthenticationStep::WaitFor(duration) => {
33005                    (self.sleep)(duration).await;
33006                }
33007            }
33008        }
33009        let theBuilder = crate::v1_1_4::request::repos_get_participation_stats::http_builder(
33010            self.config.base_url.as_ref(),
33011            owner,
33012            repo,
33013            self.config.user_agent.as_ref(),
33014            self.config.accept.as_deref(),
33015        )?
33016        .with_authentication(&theScheme)?;
33017
33018        let theRequest =
33019            crate::v1_1_4::request::repos_get_participation_stats::hyper_request(theBuilder)?;
33020
33021        ::log::debug!("HTTP request: {:?}", &theRequest);
33022
33023        let theResponse = self.client.request(theRequest).await?;
33024
33025        ::log::debug!("HTTP response: {:?}", &theResponse);
33026
33027        Ok(theResponse)
33028    }
33029
33030    /// Get the hourly commit count for each day
33031    /// 
33032    /// Each array contains the day number, hour number, and number of commits:
33033    /// 
33034    /// *   `0-6`: Sunday - Saturday
33035    /// *   `0-23`: Hour of day
33036    /// *   Number of commits
33037    /// 
33038    /// For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits.
33039    /// 
33040    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-the-hourly-commit-count-for-each-day)
33041    pub async fn repos_get_punch_card_stats(
33042        &self,
33043        owner: &str,
33044        repo: &str,
33045    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33046        let mut theScheme = AuthScheme::from(&self.config.authentication);
33047
33048        while let Some(auth_step) = theScheme.step()? {
33049            match auth_step {
33050                ::authentic::AuthenticationStep::Request(auth_request) => {
33051                    theScheme.respond(self.client.request(auth_request).await);
33052                }
33053                ::authentic::AuthenticationStep::WaitFor(duration) => {
33054                    (self.sleep)(duration).await;
33055                }
33056            }
33057        }
33058        let theBuilder = crate::v1_1_4::request::repos_get_punch_card_stats::http_builder(
33059            self.config.base_url.as_ref(),
33060            owner,
33061            repo,
33062            self.config.user_agent.as_ref(),
33063            self.config.accept.as_deref(),
33064        )?
33065        .with_authentication(&theScheme)?;
33066
33067        let theRequest =
33068            crate::v1_1_4::request::repos_get_punch_card_stats::hyper_request(theBuilder)?;
33069
33070        ::log::debug!("HTTP request: {:?}", &theRequest);
33071
33072        let theResponse = self.client.request(theRequest).await?;
33073
33074        ::log::debug!("HTTP response: {:?}", &theResponse);
33075
33076        Ok(theResponse)
33077    }
33078
33079    /// Create a commit status
33080    /// 
33081    /// Users with push access in a repository can create commit statuses for a given SHA.
33082    /// 
33083    /// Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error.
33084    /// 
33085    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-a-commit-status)
33086    ///
33087    /// # Content
33088    ///
33089    /// - [`&v1_1_4::request::repos_create_commit_status::body::Json`](crate::v1_1_4::request::repos_create_commit_status::body::Json)
33090    pub async fn repos_create_commit_status<Content>(
33091        &self,
33092        owner: &str,
33093        repo: &str,
33094        sha: &str,
33095        theContent: Content,
33096    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
33097    where
33098        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_commit_status::Content<::hyper::Body>>,
33099        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_commit_status::Content<::hyper::Body>>>::Error>
33100    {
33101        let mut theScheme = AuthScheme::from(&self.config.authentication);
33102
33103        while let Some(auth_step) = theScheme.step()? {
33104            match auth_step {
33105                ::authentic::AuthenticationStep::Request(auth_request) => {
33106                    theScheme.respond(self.client.request(auth_request).await);
33107                }
33108                ::authentic::AuthenticationStep::WaitFor(duration) => {
33109                    (self.sleep)(duration).await;
33110                }
33111            }
33112        }
33113        let theBuilder = crate::v1_1_4::request::repos_create_commit_status::http_builder(
33114            self.config.base_url.as_ref(),
33115            owner,
33116            repo,
33117            sha,
33118            self.config.user_agent.as_ref(),
33119            self.config.accept.as_deref(),
33120        )?
33121        .with_authentication(&theScheme)?;
33122
33123        let theRequest = crate::v1_1_4::request::repos_create_commit_status::hyper_request(
33124            theBuilder,
33125            theContent.try_into()?,
33126        )?;
33127
33128        ::log::debug!("HTTP request: {:?}", &theRequest);
33129
33130        let theResponse = self.client.request(theRequest).await?;
33131
33132        ::log::debug!("HTTP response: {:?}", &theResponse);
33133
33134        Ok(theResponse)
33135    }
33136
33137    /// List watchers
33138    /// 
33139    /// Lists the people watching the specified repository.
33140    /// 
33141    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-watchers)
33142    pub async fn activity_list_watchers_for_repo(
33143        &self,
33144        owner: &str,
33145        repo: &str,
33146        per_page: ::std::option::Option<i64>,
33147        page: ::std::option::Option<i64>,
33148    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33149        let mut theScheme = AuthScheme::from(&self.config.authentication);
33150
33151        while let Some(auth_step) = theScheme.step()? {
33152            match auth_step {
33153                ::authentic::AuthenticationStep::Request(auth_request) => {
33154                    theScheme.respond(self.client.request(auth_request).await);
33155                }
33156                ::authentic::AuthenticationStep::WaitFor(duration) => {
33157                    (self.sleep)(duration).await;
33158                }
33159            }
33160        }
33161        let theBuilder = crate::v1_1_4::request::activity_list_watchers_for_repo::http_builder(
33162            self.config.base_url.as_ref(),
33163            owner,
33164            repo,
33165            per_page,
33166            page,
33167            self.config.user_agent.as_ref(),
33168            self.config.accept.as_deref(),
33169        )?
33170        .with_authentication(&theScheme)?;
33171
33172        let theRequest =
33173            crate::v1_1_4::request::activity_list_watchers_for_repo::hyper_request(theBuilder)?;
33174
33175        ::log::debug!("HTTP request: {:?}", &theRequest);
33176
33177        let theResponse = self.client.request(theRequest).await?;
33178
33179        ::log::debug!("HTTP response: {:?}", &theResponse);
33180
33181        Ok(theResponse)
33182    }
33183
33184    /// Get a repository subscription
33185    /// 
33186    /// [API method documentation](https://docs.github.com/rest/reference/activity#get-a-repository-subscription)
33187    pub async fn activity_get_repo_subscription(
33188        &self,
33189        owner: &str,
33190        repo: &str,
33191    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33192        let mut theScheme = AuthScheme::from(&self.config.authentication);
33193
33194        while let Some(auth_step) = theScheme.step()? {
33195            match auth_step {
33196                ::authentic::AuthenticationStep::Request(auth_request) => {
33197                    theScheme.respond(self.client.request(auth_request).await);
33198                }
33199                ::authentic::AuthenticationStep::WaitFor(duration) => {
33200                    (self.sleep)(duration).await;
33201                }
33202            }
33203        }
33204        let theBuilder = crate::v1_1_4::request::activity_get_repo_subscription::http_builder(
33205            self.config.base_url.as_ref(),
33206            owner,
33207            repo,
33208            self.config.user_agent.as_ref(),
33209            self.config.accept.as_deref(),
33210        )?
33211        .with_authentication(&theScheme)?;
33212
33213        let theRequest =
33214            crate::v1_1_4::request::activity_get_repo_subscription::hyper_request(theBuilder)?;
33215
33216        ::log::debug!("HTTP request: {:?}", &theRequest);
33217
33218        let theResponse = self.client.request(theRequest).await?;
33219
33220        ::log::debug!("HTTP response: {:?}", &theResponse);
33221
33222        Ok(theResponse)
33223    }
33224
33225    /// Set a repository subscription
33226    /// 
33227    /// If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely.
33228    /// 
33229    /// [API method documentation](https://docs.github.com/rest/reference/activity#set-a-repository-subscription)
33230    ///
33231    /// # Content
33232    ///
33233    /// - [`&v1_1_4::request::activity_set_repo_subscription::body::Json`](crate::v1_1_4::request::activity_set_repo_subscription::body::Json)
33234    pub async fn activity_set_repo_subscription<Content>(
33235        &self,
33236        owner: &str,
33237        repo: &str,
33238        theContent: Content,
33239    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
33240    where
33241        Content: Copy + TryInto<crate::v1_1_4::request::activity_set_repo_subscription::Content<::hyper::Body>>,
33242        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::activity_set_repo_subscription::Content<::hyper::Body>>>::Error>
33243    {
33244        let mut theScheme = AuthScheme::from(&self.config.authentication);
33245
33246        while let Some(auth_step) = theScheme.step()? {
33247            match auth_step {
33248                ::authentic::AuthenticationStep::Request(auth_request) => {
33249                    theScheme.respond(self.client.request(auth_request).await);
33250                }
33251                ::authentic::AuthenticationStep::WaitFor(duration) => {
33252                    (self.sleep)(duration).await;
33253                }
33254            }
33255        }
33256        let theBuilder = crate::v1_1_4::request::activity_set_repo_subscription::http_builder(
33257            self.config.base_url.as_ref(),
33258            owner,
33259            repo,
33260            self.config.user_agent.as_ref(),
33261            self.config.accept.as_deref(),
33262        )?
33263        .with_authentication(&theScheme)?;
33264
33265        let theRequest = crate::v1_1_4::request::activity_set_repo_subscription::hyper_request(
33266            theBuilder,
33267            theContent.try_into()?,
33268        )?;
33269
33270        ::log::debug!("HTTP request: {:?}", &theRequest);
33271
33272        let theResponse = self.client.request(theRequest).await?;
33273
33274        ::log::debug!("HTTP response: {:?}", &theResponse);
33275
33276        Ok(theResponse)
33277    }
33278
33279    /// Delete a repository subscription
33280    /// 
33281    /// This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/reference/activity#set-a-repository-subscription).
33282    /// 
33283    /// [API method documentation](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription)
33284    pub async fn activity_delete_repo_subscription(
33285        &self,
33286        owner: &str,
33287        repo: &str,
33288    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33289        let mut theScheme = AuthScheme::from(&self.config.authentication);
33290
33291        while let Some(auth_step) = theScheme.step()? {
33292            match auth_step {
33293                ::authentic::AuthenticationStep::Request(auth_request) => {
33294                    theScheme.respond(self.client.request(auth_request).await);
33295                }
33296                ::authentic::AuthenticationStep::WaitFor(duration) => {
33297                    (self.sleep)(duration).await;
33298                }
33299            }
33300        }
33301        let theBuilder = crate::v1_1_4::request::activity_delete_repo_subscription::http_builder(
33302            self.config.base_url.as_ref(),
33303            owner,
33304            repo,
33305            self.config.user_agent.as_ref(),
33306            self.config.accept.as_deref(),
33307        )?
33308        .with_authentication(&theScheme)?;
33309
33310        let theRequest =
33311            crate::v1_1_4::request::activity_delete_repo_subscription::hyper_request(theBuilder)?;
33312
33313        ::log::debug!("HTTP request: {:?}", &theRequest);
33314
33315        let theResponse = self.client.request(theRequest).await?;
33316
33317        ::log::debug!("HTTP response: {:?}", &theResponse);
33318
33319        Ok(theResponse)
33320    }
33321
33322    /// List repository tags
33323    /// 
33324    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-repository-tags)
33325    pub async fn repos_list_tags(
33326        &self,
33327        owner: &str,
33328        repo: &str,
33329        per_page: ::std::option::Option<i64>,
33330        page: ::std::option::Option<i64>,
33331    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33332        let mut theScheme = AuthScheme::from(&self.config.authentication);
33333
33334        while let Some(auth_step) = theScheme.step()? {
33335            match auth_step {
33336                ::authentic::AuthenticationStep::Request(auth_request) => {
33337                    theScheme.respond(self.client.request(auth_request).await);
33338                }
33339                ::authentic::AuthenticationStep::WaitFor(duration) => {
33340                    (self.sleep)(duration).await;
33341                }
33342            }
33343        }
33344        let theBuilder = crate::v1_1_4::request::repos_list_tags::http_builder(
33345            self.config.base_url.as_ref(),
33346            owner,
33347            repo,
33348            per_page,
33349            page,
33350            self.config.user_agent.as_ref(),
33351            self.config.accept.as_deref(),
33352        )?
33353        .with_authentication(&theScheme)?;
33354
33355        let theRequest =
33356            crate::v1_1_4::request::repos_list_tags::hyper_request(theBuilder)?;
33357
33358        ::log::debug!("HTTP request: {:?}", &theRequest);
33359
33360        let theResponse = self.client.request(theRequest).await?;
33361
33362        ::log::debug!("HTTP response: {:?}", &theResponse);
33363
33364        Ok(theResponse)
33365    }
33366
33367    /// List tag protection states for a repository
33368    /// 
33369    /// This returns the tag protection states of a repository.
33370    /// 
33371    /// This information is only available to repository administrators.
33372    /// 
33373    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository)
33374    pub async fn repos_list_tag_protection(
33375        &self,
33376        owner: &str,
33377        repo: &str,
33378    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33379        let mut theScheme = AuthScheme::from(&self.config.authentication);
33380
33381        while let Some(auth_step) = theScheme.step()? {
33382            match auth_step {
33383                ::authentic::AuthenticationStep::Request(auth_request) => {
33384                    theScheme.respond(self.client.request(auth_request).await);
33385                }
33386                ::authentic::AuthenticationStep::WaitFor(duration) => {
33387                    (self.sleep)(duration).await;
33388                }
33389            }
33390        }
33391        let theBuilder = crate::v1_1_4::request::repos_list_tag_protection::http_builder(
33392            self.config.base_url.as_ref(),
33393            owner,
33394            repo,
33395            self.config.user_agent.as_ref(),
33396            self.config.accept.as_deref(),
33397        )?
33398        .with_authentication(&theScheme)?;
33399
33400        let theRequest =
33401            crate::v1_1_4::request::repos_list_tag_protection::hyper_request(theBuilder)?;
33402
33403        ::log::debug!("HTTP request: {:?}", &theRequest);
33404
33405        let theResponse = self.client.request(theRequest).await?;
33406
33407        ::log::debug!("HTTP response: {:?}", &theResponse);
33408
33409        Ok(theResponse)
33410    }
33411
33412    /// Create a tag protection state for a repository
33413    /// 
33414    /// This creates a tag protection state for a repository.
33415    /// This endpoint is only available to repository administrators.
33416    /// 
33417    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository)
33418    ///
33419    /// # Content
33420    ///
33421    /// - [`&v1_1_4::request::repos_create_tag_protection::body::Json`](crate::v1_1_4::request::repos_create_tag_protection::body::Json)
33422    pub async fn repos_create_tag_protection<Content>(
33423        &self,
33424        owner: &str,
33425        repo: &str,
33426        theContent: Content,
33427    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
33428    where
33429        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_tag_protection::Content<::hyper::Body>>,
33430        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_tag_protection::Content<::hyper::Body>>>::Error>
33431    {
33432        let mut theScheme = AuthScheme::from(&self.config.authentication);
33433
33434        while let Some(auth_step) = theScheme.step()? {
33435            match auth_step {
33436                ::authentic::AuthenticationStep::Request(auth_request) => {
33437                    theScheme.respond(self.client.request(auth_request).await);
33438                }
33439                ::authentic::AuthenticationStep::WaitFor(duration) => {
33440                    (self.sleep)(duration).await;
33441                }
33442            }
33443        }
33444        let theBuilder = crate::v1_1_4::request::repos_create_tag_protection::http_builder(
33445            self.config.base_url.as_ref(),
33446            owner,
33447            repo,
33448            self.config.user_agent.as_ref(),
33449            self.config.accept.as_deref(),
33450        )?
33451        .with_authentication(&theScheme)?;
33452
33453        let theRequest = crate::v1_1_4::request::repos_create_tag_protection::hyper_request(
33454            theBuilder,
33455            theContent.try_into()?,
33456        )?;
33457
33458        ::log::debug!("HTTP request: {:?}", &theRequest);
33459
33460        let theResponse = self.client.request(theRequest).await?;
33461
33462        ::log::debug!("HTTP response: {:?}", &theResponse);
33463
33464        Ok(theResponse)
33465    }
33466
33467    /// Delete a tag protection state for a repository
33468    /// 
33469    /// This deletes a tag protection state for a repository.
33470    /// This endpoint is only available to repository administrators.
33471    /// 
33472    /// [API method documentation](https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository)
33473    pub async fn repos_delete_tag_protection(
33474        &self,
33475        owner: &str,
33476        repo: &str,
33477        tag_protection_id: i64,
33478    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33479        let mut theScheme = AuthScheme::from(&self.config.authentication);
33480
33481        while let Some(auth_step) = theScheme.step()? {
33482            match auth_step {
33483                ::authentic::AuthenticationStep::Request(auth_request) => {
33484                    theScheme.respond(self.client.request(auth_request).await);
33485                }
33486                ::authentic::AuthenticationStep::WaitFor(duration) => {
33487                    (self.sleep)(duration).await;
33488                }
33489            }
33490        }
33491        let theBuilder = crate::v1_1_4::request::repos_delete_tag_protection::http_builder(
33492            self.config.base_url.as_ref(),
33493            owner,
33494            repo,
33495            tag_protection_id,
33496            self.config.user_agent.as_ref(),
33497            self.config.accept.as_deref(),
33498        )?
33499        .with_authentication(&theScheme)?;
33500
33501        let theRequest =
33502            crate::v1_1_4::request::repos_delete_tag_protection::hyper_request(theBuilder)?;
33503
33504        ::log::debug!("HTTP request: {:?}", &theRequest);
33505
33506        let theResponse = self.client.request(theRequest).await?;
33507
33508        ::log::debug!("HTTP response: {:?}", &theResponse);
33509
33510        Ok(theResponse)
33511    }
33512
33513    /// Download a repository archive (tar)
33514    /// 
33515    /// Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually
33516    /// `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use
33517    /// the `Location` header to make a second `GET` request.
33518    /// **Note**: For private repositories, these links are temporary and expire after five minutes.
33519    /// 
33520    /// [API method documentation](https://docs.github.com/rest/reference/repos#download-a-repository-archive)
33521    pub async fn repos_download_tarball_archive(
33522        &self,
33523        owner: &str,
33524        repo: &str,
33525        r#ref: &str,
33526    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33527        let mut theScheme = AuthScheme::from(&self.config.authentication);
33528
33529        while let Some(auth_step) = theScheme.step()? {
33530            match auth_step {
33531                ::authentic::AuthenticationStep::Request(auth_request) => {
33532                    theScheme.respond(self.client.request(auth_request).await);
33533                }
33534                ::authentic::AuthenticationStep::WaitFor(duration) => {
33535                    (self.sleep)(duration).await;
33536                }
33537            }
33538        }
33539        let theBuilder = crate::v1_1_4::request::repos_download_tarball_archive::http_builder(
33540            self.config.base_url.as_ref(),
33541            owner,
33542            repo,
33543            r#ref,
33544            self.config.user_agent.as_ref(),
33545            self.config.accept.as_deref(),
33546        )?
33547        .with_authentication(&theScheme)?;
33548
33549        let theRequest =
33550            crate::v1_1_4::request::repos_download_tarball_archive::hyper_request(theBuilder)?;
33551
33552        ::log::debug!("HTTP request: {:?}", &theRequest);
33553
33554        let theResponse = self.client.request(theRequest).await?;
33555
33556        ::log::debug!("HTTP response: {:?}", &theResponse);
33557
33558        Ok(theResponse)
33559    }
33560
33561    /// List repository teams
33562    /// 
33563    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-repository-teams)
33564    pub async fn repos_list_teams(
33565        &self,
33566        owner: &str,
33567        repo: &str,
33568        per_page: ::std::option::Option<i64>,
33569        page: ::std::option::Option<i64>,
33570    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33571        let mut theScheme = AuthScheme::from(&self.config.authentication);
33572
33573        while let Some(auth_step) = theScheme.step()? {
33574            match auth_step {
33575                ::authentic::AuthenticationStep::Request(auth_request) => {
33576                    theScheme.respond(self.client.request(auth_request).await);
33577                }
33578                ::authentic::AuthenticationStep::WaitFor(duration) => {
33579                    (self.sleep)(duration).await;
33580                }
33581            }
33582        }
33583        let theBuilder = crate::v1_1_4::request::repos_list_teams::http_builder(
33584            self.config.base_url.as_ref(),
33585            owner,
33586            repo,
33587            per_page,
33588            page,
33589            self.config.user_agent.as_ref(),
33590            self.config.accept.as_deref(),
33591        )?
33592        .with_authentication(&theScheme)?;
33593
33594        let theRequest =
33595            crate::v1_1_4::request::repos_list_teams::hyper_request(theBuilder)?;
33596
33597        ::log::debug!("HTTP request: {:?}", &theRequest);
33598
33599        let theResponse = self.client.request(theRequest).await?;
33600
33601        ::log::debug!("HTTP response: {:?}", &theResponse);
33602
33603        Ok(theResponse)
33604    }
33605
33606    /// Get all repository topics
33607    /// 
33608    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-all-repository-topics)
33609    pub async fn repos_get_all_topics(
33610        &self,
33611        owner: &str,
33612        repo: &str,
33613        page: ::std::option::Option<i64>,
33614        per_page: ::std::option::Option<i64>,
33615    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33616        let mut theScheme = AuthScheme::from(&self.config.authentication);
33617
33618        while let Some(auth_step) = theScheme.step()? {
33619            match auth_step {
33620                ::authentic::AuthenticationStep::Request(auth_request) => {
33621                    theScheme.respond(self.client.request(auth_request).await);
33622                }
33623                ::authentic::AuthenticationStep::WaitFor(duration) => {
33624                    (self.sleep)(duration).await;
33625                }
33626            }
33627        }
33628        let theBuilder = crate::v1_1_4::request::repos_get_all_topics::http_builder(
33629            self.config.base_url.as_ref(),
33630            owner,
33631            repo,
33632            page,
33633            per_page,
33634            self.config.user_agent.as_ref(),
33635            self.config.accept.as_deref(),
33636        )?
33637        .with_authentication(&theScheme)?;
33638
33639        let theRequest =
33640            crate::v1_1_4::request::repos_get_all_topics::hyper_request(theBuilder)?;
33641
33642        ::log::debug!("HTTP request: {:?}", &theRequest);
33643
33644        let theResponse = self.client.request(theRequest).await?;
33645
33646        ::log::debug!("HTTP response: {:?}", &theResponse);
33647
33648        Ok(theResponse)
33649    }
33650
33651    /// Replace all repository topics
33652    /// 
33653    /// [API method documentation](https://docs.github.com/rest/reference/repos#replace-all-repository-topics)
33654    ///
33655    /// # Content
33656    ///
33657    /// - [`&v1_1_4::request::repos_replace_all_topics::body::Json`](crate::v1_1_4::request::repos_replace_all_topics::body::Json)
33658    pub async fn repos_replace_all_topics<Content>(
33659        &self,
33660        owner: &str,
33661        repo: &str,
33662        theContent: Content,
33663    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
33664    where
33665        Content: Copy + TryInto<crate::v1_1_4::request::repos_replace_all_topics::Content<::hyper::Body>>,
33666        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_replace_all_topics::Content<::hyper::Body>>>::Error>
33667    {
33668        let mut theScheme = AuthScheme::from(&self.config.authentication);
33669
33670        while let Some(auth_step) = theScheme.step()? {
33671            match auth_step {
33672                ::authentic::AuthenticationStep::Request(auth_request) => {
33673                    theScheme.respond(self.client.request(auth_request).await);
33674                }
33675                ::authentic::AuthenticationStep::WaitFor(duration) => {
33676                    (self.sleep)(duration).await;
33677                }
33678            }
33679        }
33680        let theBuilder = crate::v1_1_4::request::repos_replace_all_topics::http_builder(
33681            self.config.base_url.as_ref(),
33682            owner,
33683            repo,
33684            self.config.user_agent.as_ref(),
33685            self.config.accept.as_deref(),
33686        )?
33687        .with_authentication(&theScheme)?;
33688
33689        let theRequest = crate::v1_1_4::request::repos_replace_all_topics::hyper_request(
33690            theBuilder,
33691            theContent.try_into()?,
33692        )?;
33693
33694        ::log::debug!("HTTP request: {:?}", &theRequest);
33695
33696        let theResponse = self.client.request(theRequest).await?;
33697
33698        ::log::debug!("HTTP response: {:?}", &theResponse);
33699
33700        Ok(theResponse)
33701    }
33702
33703    /// Get repository clones
33704    /// 
33705    /// Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.
33706    /// 
33707    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-repository-clones)
33708    pub async fn repos_get_clones(
33709        &self,
33710        owner: &str,
33711        repo: &str,
33712        per: ::std::option::Option<&str>,
33713    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33714        let mut theScheme = AuthScheme::from(&self.config.authentication);
33715
33716        while let Some(auth_step) = theScheme.step()? {
33717            match auth_step {
33718                ::authentic::AuthenticationStep::Request(auth_request) => {
33719                    theScheme.respond(self.client.request(auth_request).await);
33720                }
33721                ::authentic::AuthenticationStep::WaitFor(duration) => {
33722                    (self.sleep)(duration).await;
33723                }
33724            }
33725        }
33726        let theBuilder = crate::v1_1_4::request::repos_get_clones::http_builder(
33727            self.config.base_url.as_ref(),
33728            owner,
33729            repo,
33730            per,
33731            self.config.user_agent.as_ref(),
33732            self.config.accept.as_deref(),
33733        )?
33734        .with_authentication(&theScheme)?;
33735
33736        let theRequest =
33737            crate::v1_1_4::request::repos_get_clones::hyper_request(theBuilder)?;
33738
33739        ::log::debug!("HTTP request: {:?}", &theRequest);
33740
33741        let theResponse = self.client.request(theRequest).await?;
33742
33743        ::log::debug!("HTTP response: {:?}", &theResponse);
33744
33745        Ok(theResponse)
33746    }
33747
33748    /// Get top referral paths
33749    /// 
33750    /// Get the top 10 popular contents over the last 14 days.
33751    /// 
33752    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-top-referral-paths)
33753    pub async fn repos_get_top_paths(
33754        &self,
33755        owner: &str,
33756        repo: &str,
33757    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33758        let mut theScheme = AuthScheme::from(&self.config.authentication);
33759
33760        while let Some(auth_step) = theScheme.step()? {
33761            match auth_step {
33762                ::authentic::AuthenticationStep::Request(auth_request) => {
33763                    theScheme.respond(self.client.request(auth_request).await);
33764                }
33765                ::authentic::AuthenticationStep::WaitFor(duration) => {
33766                    (self.sleep)(duration).await;
33767                }
33768            }
33769        }
33770        let theBuilder = crate::v1_1_4::request::repos_get_top_paths::http_builder(
33771            self.config.base_url.as_ref(),
33772            owner,
33773            repo,
33774            self.config.user_agent.as_ref(),
33775            self.config.accept.as_deref(),
33776        )?
33777        .with_authentication(&theScheme)?;
33778
33779        let theRequest =
33780            crate::v1_1_4::request::repos_get_top_paths::hyper_request(theBuilder)?;
33781
33782        ::log::debug!("HTTP request: {:?}", &theRequest);
33783
33784        let theResponse = self.client.request(theRequest).await?;
33785
33786        ::log::debug!("HTTP response: {:?}", &theResponse);
33787
33788        Ok(theResponse)
33789    }
33790
33791    /// Get top referral sources
33792    /// 
33793    /// Get the top 10 referrers over the last 14 days.
33794    /// 
33795    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-top-referral-sources)
33796    pub async fn repos_get_top_referrers(
33797        &self,
33798        owner: &str,
33799        repo: &str,
33800    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33801        let mut theScheme = AuthScheme::from(&self.config.authentication);
33802
33803        while let Some(auth_step) = theScheme.step()? {
33804            match auth_step {
33805                ::authentic::AuthenticationStep::Request(auth_request) => {
33806                    theScheme.respond(self.client.request(auth_request).await);
33807                }
33808                ::authentic::AuthenticationStep::WaitFor(duration) => {
33809                    (self.sleep)(duration).await;
33810                }
33811            }
33812        }
33813        let theBuilder = crate::v1_1_4::request::repos_get_top_referrers::http_builder(
33814            self.config.base_url.as_ref(),
33815            owner,
33816            repo,
33817            self.config.user_agent.as_ref(),
33818            self.config.accept.as_deref(),
33819        )?
33820        .with_authentication(&theScheme)?;
33821
33822        let theRequest =
33823            crate::v1_1_4::request::repos_get_top_referrers::hyper_request(theBuilder)?;
33824
33825        ::log::debug!("HTTP request: {:?}", &theRequest);
33826
33827        let theResponse = self.client.request(theRequest).await?;
33828
33829        ::log::debug!("HTTP response: {:?}", &theResponse);
33830
33831        Ok(theResponse)
33832    }
33833
33834    /// Get page views
33835    /// 
33836    /// Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday.
33837    /// 
33838    /// [API method documentation](https://docs.github.com/rest/reference/repos#get-page-views)
33839    pub async fn repos_get_views(
33840        &self,
33841        owner: &str,
33842        repo: &str,
33843        per: ::std::option::Option<&str>,
33844    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33845        let mut theScheme = AuthScheme::from(&self.config.authentication);
33846
33847        while let Some(auth_step) = theScheme.step()? {
33848            match auth_step {
33849                ::authentic::AuthenticationStep::Request(auth_request) => {
33850                    theScheme.respond(self.client.request(auth_request).await);
33851                }
33852                ::authentic::AuthenticationStep::WaitFor(duration) => {
33853                    (self.sleep)(duration).await;
33854                }
33855            }
33856        }
33857        let theBuilder = crate::v1_1_4::request::repos_get_views::http_builder(
33858            self.config.base_url.as_ref(),
33859            owner,
33860            repo,
33861            per,
33862            self.config.user_agent.as_ref(),
33863            self.config.accept.as_deref(),
33864        )?
33865        .with_authentication(&theScheme)?;
33866
33867        let theRequest =
33868            crate::v1_1_4::request::repos_get_views::hyper_request(theBuilder)?;
33869
33870        ::log::debug!("HTTP request: {:?}", &theRequest);
33871
33872        let theResponse = self.client.request(theRequest).await?;
33873
33874        ::log::debug!("HTTP response: {:?}", &theResponse);
33875
33876        Ok(theResponse)
33877    }
33878
33879    /// Transfer a repository
33880    /// 
33881    /// A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/).
33882    /// 
33883    /// [API method documentation](https://docs.github.com/rest/reference/repos#transfer-a-repository)
33884    ///
33885    /// # Content
33886    ///
33887    /// - [`&v1_1_4::request::repos_transfer::body::Json`](crate::v1_1_4::request::repos_transfer::body::Json)
33888    pub async fn repos_transfer<Content>(
33889        &self,
33890        owner: &str,
33891        repo: &str,
33892        theContent: Content,
33893    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
33894    where
33895        Content: Copy + TryInto<crate::v1_1_4::request::repos_transfer::Content<::hyper::Body>>,
33896        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_transfer::Content<::hyper::Body>>>::Error>
33897    {
33898        let mut theScheme = AuthScheme::from(&self.config.authentication);
33899
33900        while let Some(auth_step) = theScheme.step()? {
33901            match auth_step {
33902                ::authentic::AuthenticationStep::Request(auth_request) => {
33903                    theScheme.respond(self.client.request(auth_request).await);
33904                }
33905                ::authentic::AuthenticationStep::WaitFor(duration) => {
33906                    (self.sleep)(duration).await;
33907                }
33908            }
33909        }
33910        let theBuilder = crate::v1_1_4::request::repos_transfer::http_builder(
33911            self.config.base_url.as_ref(),
33912            owner,
33913            repo,
33914            self.config.user_agent.as_ref(),
33915            self.config.accept.as_deref(),
33916        )?
33917        .with_authentication(&theScheme)?;
33918
33919        let theRequest = crate::v1_1_4::request::repos_transfer::hyper_request(
33920            theBuilder,
33921            theContent.try_into()?,
33922        )?;
33923
33924        ::log::debug!("HTTP request: {:?}", &theRequest);
33925
33926        let theResponse = self.client.request(theRequest).await?;
33927
33928        ::log::debug!("HTTP response: {:?}", &theResponse);
33929
33930        Ok(theResponse)
33931    }
33932
33933    /// Check if vulnerability alerts are enabled for a repository
33934    /// 
33935    /// Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)".
33936    /// 
33937    /// [API method documentation](https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository)
33938    pub async fn repos_check_vulnerability_alerts(
33939        &self,
33940        owner: &str,
33941        repo: &str,
33942    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33943        let mut theScheme = AuthScheme::from(&self.config.authentication);
33944
33945        while let Some(auth_step) = theScheme.step()? {
33946            match auth_step {
33947                ::authentic::AuthenticationStep::Request(auth_request) => {
33948                    theScheme.respond(self.client.request(auth_request).await);
33949                }
33950                ::authentic::AuthenticationStep::WaitFor(duration) => {
33951                    (self.sleep)(duration).await;
33952                }
33953            }
33954        }
33955        let theBuilder = crate::v1_1_4::request::repos_check_vulnerability_alerts::http_builder(
33956            self.config.base_url.as_ref(),
33957            owner,
33958            repo,
33959            self.config.user_agent.as_ref(),
33960            self.config.accept.as_deref(),
33961        )?
33962        .with_authentication(&theScheme)?;
33963
33964        let theRequest =
33965            crate::v1_1_4::request::repos_check_vulnerability_alerts::hyper_request(theBuilder)?;
33966
33967        ::log::debug!("HTTP request: {:?}", &theRequest);
33968
33969        let theResponse = self.client.request(theRequest).await?;
33970
33971        ::log::debug!("HTTP response: {:?}", &theResponse);
33972
33973        Ok(theResponse)
33974    }
33975
33976    /// Enable vulnerability alerts
33977    /// 
33978    /// Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)".
33979    /// 
33980    /// [API method documentation](https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts)
33981    pub async fn repos_enable_vulnerability_alerts(
33982        &self,
33983        owner: &str,
33984        repo: &str,
33985    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
33986        let mut theScheme = AuthScheme::from(&self.config.authentication);
33987
33988        while let Some(auth_step) = theScheme.step()? {
33989            match auth_step {
33990                ::authentic::AuthenticationStep::Request(auth_request) => {
33991                    theScheme.respond(self.client.request(auth_request).await);
33992                }
33993                ::authentic::AuthenticationStep::WaitFor(duration) => {
33994                    (self.sleep)(duration).await;
33995                }
33996            }
33997        }
33998        let theBuilder = crate::v1_1_4::request::repos_enable_vulnerability_alerts::http_builder(
33999            self.config.base_url.as_ref(),
34000            owner,
34001            repo,
34002            self.config.user_agent.as_ref(),
34003            self.config.accept.as_deref(),
34004        )?
34005        .with_authentication(&theScheme)?;
34006
34007        let theRequest =
34008            crate::v1_1_4::request::repos_enable_vulnerability_alerts::hyper_request(theBuilder)?;
34009
34010        ::log::debug!("HTTP request: {:?}", &theRequest);
34011
34012        let theResponse = self.client.request(theRequest).await?;
34013
34014        ::log::debug!("HTTP response: {:?}", &theResponse);
34015
34016        Ok(theResponse)
34017    }
34018
34019    /// Disable vulnerability alerts
34020    /// 
34021    /// Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)".
34022    /// 
34023    /// [API method documentation](https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts)
34024    pub async fn repos_disable_vulnerability_alerts(
34025        &self,
34026        owner: &str,
34027        repo: &str,
34028    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
34029        let mut theScheme = AuthScheme::from(&self.config.authentication);
34030
34031        while let Some(auth_step) = theScheme.step()? {
34032            match auth_step {
34033                ::authentic::AuthenticationStep::Request(auth_request) => {
34034                    theScheme.respond(self.client.request(auth_request).await);
34035                }
34036                ::authentic::AuthenticationStep::WaitFor(duration) => {
34037                    (self.sleep)(duration).await;
34038                }
34039            }
34040        }
34041        let theBuilder = crate::v1_1_4::request::repos_disable_vulnerability_alerts::http_builder(
34042            self.config.base_url.as_ref(),
34043            owner,
34044            repo,
34045            self.config.user_agent.as_ref(),
34046            self.config.accept.as_deref(),
34047        )?
34048        .with_authentication(&theScheme)?;
34049
34050        let theRequest =
34051            crate::v1_1_4::request::repos_disable_vulnerability_alerts::hyper_request(theBuilder)?;
34052
34053        ::log::debug!("HTTP request: {:?}", &theRequest);
34054
34055        let theResponse = self.client.request(theRequest).await?;
34056
34057        ::log::debug!("HTTP response: {:?}", &theResponse);
34058
34059        Ok(theResponse)
34060    }
34061
34062    /// Download a repository archive (zip)
34063    /// 
34064    /// Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually
34065    /// `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use
34066    /// the `Location` header to make a second `GET` request.
34067    /// **Note**: For private repositories, these links are temporary and expire after five minutes.
34068    /// 
34069    /// [API method documentation](https://docs.github.com/rest/reference/repos#download-a-repository-archive)
34070    pub async fn repos_download_zipball_archive(
34071        &self,
34072        owner: &str,
34073        repo: &str,
34074        r#ref: &str,
34075    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
34076        let mut theScheme = AuthScheme::from(&self.config.authentication);
34077
34078        while let Some(auth_step) = theScheme.step()? {
34079            match auth_step {
34080                ::authentic::AuthenticationStep::Request(auth_request) => {
34081                    theScheme.respond(self.client.request(auth_request).await);
34082                }
34083                ::authentic::AuthenticationStep::WaitFor(duration) => {
34084                    (self.sleep)(duration).await;
34085                }
34086            }
34087        }
34088        let theBuilder = crate::v1_1_4::request::repos_download_zipball_archive::http_builder(
34089            self.config.base_url.as_ref(),
34090            owner,
34091            repo,
34092            r#ref,
34093            self.config.user_agent.as_ref(),
34094            self.config.accept.as_deref(),
34095        )?
34096        .with_authentication(&theScheme)?;
34097
34098        let theRequest =
34099            crate::v1_1_4::request::repos_download_zipball_archive::hyper_request(theBuilder)?;
34100
34101        ::log::debug!("HTTP request: {:?}", &theRequest);
34102
34103        let theResponse = self.client.request(theRequest).await?;
34104
34105        ::log::debug!("HTTP response: {:?}", &theResponse);
34106
34107        Ok(theResponse)
34108    }
34109
34110    /// Create a repository using a template
34111    /// 
34112    /// Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`.
34113    /// 
34114    /// **OAuth scope requirements**
34115    /// 
34116    /// When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:
34117    /// 
34118    /// *   `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.
34119    /// *   `repo` scope to create a private repository
34120    /// 
34121    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template)
34122    ///
34123    /// # Content
34124    ///
34125    /// - [`&v1_1_4::request::repos_create_using_template::body::Json`](crate::v1_1_4::request::repos_create_using_template::body::Json)
34126    pub async fn repos_create_using_template<Content>(
34127        &self,
34128        template_owner: &str,
34129        template_repo: &str,
34130        theContent: Content,
34131    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
34132    where
34133        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_using_template::Content<::hyper::Body>>,
34134        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_using_template::Content<::hyper::Body>>>::Error>
34135    {
34136        let mut theScheme = AuthScheme::from(&self.config.authentication);
34137
34138        while let Some(auth_step) = theScheme.step()? {
34139            match auth_step {
34140                ::authentic::AuthenticationStep::Request(auth_request) => {
34141                    theScheme.respond(self.client.request(auth_request).await);
34142                }
34143                ::authentic::AuthenticationStep::WaitFor(duration) => {
34144                    (self.sleep)(duration).await;
34145                }
34146            }
34147        }
34148        let theBuilder = crate::v1_1_4::request::repos_create_using_template::http_builder(
34149            self.config.base_url.as_ref(),
34150            template_owner,
34151            template_repo,
34152            self.config.user_agent.as_ref(),
34153            self.config.accept.as_deref(),
34154        )?
34155        .with_authentication(&theScheme)?;
34156
34157        let theRequest = crate::v1_1_4::request::repos_create_using_template::hyper_request(
34158            theBuilder,
34159            theContent.try_into()?,
34160        )?;
34161
34162        ::log::debug!("HTTP request: {:?}", &theRequest);
34163
34164        let theResponse = self.client.request(theRequest).await?;
34165
34166        ::log::debug!("HTTP response: {:?}", &theResponse);
34167
34168        Ok(theResponse)
34169    }
34170
34171    /// List public repositories
34172    /// 
34173    /// Lists all public repositories in the order that they were created.
34174    /// 
34175    /// Note:
34176    /// - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise.
34177    /// - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories.
34178    /// 
34179    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-public-repositories)
34180    pub async fn repos_list_public(
34181        &self,
34182        since: ::std::option::Option<i64>,
34183    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
34184        let mut theScheme = AuthScheme::from(&self.config.authentication);
34185
34186        while let Some(auth_step) = theScheme.step()? {
34187            match auth_step {
34188                ::authentic::AuthenticationStep::Request(auth_request) => {
34189                    theScheme.respond(self.client.request(auth_request).await);
34190                }
34191                ::authentic::AuthenticationStep::WaitFor(duration) => {
34192                    (self.sleep)(duration).await;
34193                }
34194            }
34195        }
34196        let theBuilder = crate::v1_1_4::request::repos_list_public::http_builder(
34197            self.config.base_url.as_ref(),
34198            since,
34199            self.config.user_agent.as_ref(),
34200            self.config.accept.as_deref(),
34201        )?
34202        .with_authentication(&theScheme)?;
34203
34204        let theRequest =
34205            crate::v1_1_4::request::repos_list_public::hyper_request(theBuilder)?;
34206
34207        ::log::debug!("HTTP request: {:?}", &theRequest);
34208
34209        let theResponse = self.client.request(theRequest).await?;
34210
34211        ::log::debug!("HTTP response: {:?}", &theResponse);
34212
34213        Ok(theResponse)
34214    }
34215
34216    /// List environment secrets
34217    /// 
34218    /// Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.
34219    /// 
34220    /// [API method documentation](https://docs.github.com/rest/reference/actions#list-environment-secrets)
34221    pub async fn actions_list_environment_secrets(
34222        &self,
34223        repository_id: i64,
34224        environment_name: &str,
34225        per_page: ::std::option::Option<i64>,
34226        page: ::std::option::Option<i64>,
34227    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
34228        let mut theScheme = AuthScheme::from(&self.config.authentication);
34229
34230        while let Some(auth_step) = theScheme.step()? {
34231            match auth_step {
34232                ::authentic::AuthenticationStep::Request(auth_request) => {
34233                    theScheme.respond(self.client.request(auth_request).await);
34234                }
34235                ::authentic::AuthenticationStep::WaitFor(duration) => {
34236                    (self.sleep)(duration).await;
34237                }
34238            }
34239        }
34240        let theBuilder = crate::v1_1_4::request::actions_list_environment_secrets::http_builder(
34241            self.config.base_url.as_ref(),
34242            repository_id,
34243            environment_name,
34244            per_page,
34245            page,
34246            self.config.user_agent.as_ref(),
34247            self.config.accept.as_deref(),
34248        )?
34249        .with_authentication(&theScheme)?;
34250
34251        let theRequest =
34252            crate::v1_1_4::request::actions_list_environment_secrets::hyper_request(theBuilder)?;
34253
34254        ::log::debug!("HTTP request: {:?}", &theRequest);
34255
34256        let theResponse = self.client.request(theRequest).await?;
34257
34258        ::log::debug!("HTTP response: {:?}", &theResponse);
34259
34260        Ok(theResponse)
34261    }
34262
34263    /// Get an environment public key
34264    /// 
34265    /// Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint.
34266    /// 
34267    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-an-environment-public-key)
34268    pub async fn actions_get_environment_public_key(
34269        &self,
34270        repository_id: i64,
34271        environment_name: &str,
34272    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
34273        let mut theScheme = AuthScheme::from(&self.config.authentication);
34274
34275        while let Some(auth_step) = theScheme.step()? {
34276            match auth_step {
34277                ::authentic::AuthenticationStep::Request(auth_request) => {
34278                    theScheme.respond(self.client.request(auth_request).await);
34279                }
34280                ::authentic::AuthenticationStep::WaitFor(duration) => {
34281                    (self.sleep)(duration).await;
34282                }
34283            }
34284        }
34285        let theBuilder = crate::v1_1_4::request::actions_get_environment_public_key::http_builder(
34286            self.config.base_url.as_ref(),
34287            repository_id,
34288            environment_name,
34289            self.config.user_agent.as_ref(),
34290            self.config.accept.as_deref(),
34291        )?
34292        .with_authentication(&theScheme)?;
34293
34294        let theRequest =
34295            crate::v1_1_4::request::actions_get_environment_public_key::hyper_request(theBuilder)?;
34296
34297        ::log::debug!("HTTP request: {:?}", &theRequest);
34298
34299        let theResponse = self.client.request(theRequest).await?;
34300
34301        ::log::debug!("HTTP response: {:?}", &theResponse);
34302
34303        Ok(theResponse)
34304    }
34305
34306    /// Get an environment secret
34307    /// 
34308    /// Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.
34309    /// 
34310    /// [API method documentation](https://docs.github.com/rest/reference/actions#get-an-environment-secret)
34311    pub async fn actions_get_environment_secret(
34312        &self,
34313        repository_id: i64,
34314        environment_name: &str,
34315        secret_name: &str,
34316    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
34317        let mut theScheme = AuthScheme::from(&self.config.authentication);
34318
34319        while let Some(auth_step) = theScheme.step()? {
34320            match auth_step {
34321                ::authentic::AuthenticationStep::Request(auth_request) => {
34322                    theScheme.respond(self.client.request(auth_request).await);
34323                }
34324                ::authentic::AuthenticationStep::WaitFor(duration) => {
34325                    (self.sleep)(duration).await;
34326                }
34327            }
34328        }
34329        let theBuilder = crate::v1_1_4::request::actions_get_environment_secret::http_builder(
34330            self.config.base_url.as_ref(),
34331            repository_id,
34332            environment_name,
34333            secret_name,
34334            self.config.user_agent.as_ref(),
34335            self.config.accept.as_deref(),
34336        )?
34337        .with_authentication(&theScheme)?;
34338
34339        let theRequest =
34340            crate::v1_1_4::request::actions_get_environment_secret::hyper_request(theBuilder)?;
34341
34342        ::log::debug!("HTTP request: {:?}", &theRequest);
34343
34344        let theResponse = self.client.request(theRequest).await?;
34345
34346        ::log::debug!("HTTP response: {:?}", &theResponse);
34347
34348        Ok(theResponse)
34349    }
34350
34351    /// Create or update an environment secret
34352    /// 
34353    /// Creates or updates an environment secret with an encrypted value. Encrypt your secret using
34354    /// [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access
34355    /// token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use
34356    /// this endpoint.
34357    /// 
34358    /// #### Example encrypting a secret using Node.js
34359    /// 
34360    /// Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
34361    /// 
34362    /// ```text
34363    /// const sodium = require('tweetsodium');
34364    /// 
34365    /// const key = "base64-encoded-public-key";
34366    /// const value = "plain-text-secret";
34367    /// 
34368    /// // Convert the message and key to Uint8Array's (Buffer implements that interface)
34369    /// const messageBytes = Buffer.from(value);
34370    /// const keyBytes = Buffer.from(key, 'base64');
34371    /// 
34372    /// // Encrypt using LibSodium.
34373    /// const encryptedBytes = sodium.seal(messageBytes, keyBytes);
34374    /// 
34375    /// // Base64 the encrypted secret
34376    /// const encrypted = Buffer.from(encryptedBytes).toString('base64');
34377    /// 
34378    /// console.log(encrypted);
34379    /// ```
34380    /// 
34381    /// 
34382    /// #### Example encrypting a secret using Python
34383    /// 
34384    /// Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3.
34385    /// 
34386    /// ```text
34387    /// from base64 import b64encode
34388    /// from nacl import encoding, public
34389    /// 
34390    /// def encrypt(public_key: str, secret_value: str) -> str:
34391    ///   """Encrypt a Unicode string using the public key."""
34392    ///   public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
34393    ///   sealed_box = public.SealedBox(public_key)
34394    ///   encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
34395    ///   return b64encode(encrypted).decode("utf-8")
34396    /// ```
34397    /// 
34398    /// #### Example encrypting a secret using C#
34399    /// 
34400    /// Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
34401    /// 
34402    /// ```text
34403    /// var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
34404    /// var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
34405    /// 
34406    /// var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
34407    /// 
34408    /// Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
34409    /// ```
34410    /// 
34411    /// #### Example encrypting a secret using Ruby
34412    /// 
34413    /// Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
34414    /// 
34415    /// ```ruby
34416    /// require "rbnacl"
34417    /// require "base64"
34418    /// 
34419    /// key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
34420    /// public_key = RbNaCl::PublicKey.new(key)
34421    /// 
34422    /// box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
34423    /// encrypted_secret = box.encrypt("my_secret")
34424    /// 
34425    /// # Print the base64 encoded secret
34426    /// puts Base64.strict_encode64(encrypted_secret)
34427    /// ```
34428    /// 
34429    /// [API method documentation](https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret)
34430    ///
34431    /// # Content
34432    ///
34433    /// - [`&v1_1_4::request::actions_create_or_update_environment_secret::body::Json`](crate::v1_1_4::request::actions_create_or_update_environment_secret::body::Json)
34434    pub async fn actions_create_or_update_environment_secret<Content>(
34435        &self,
34436        repository_id: i64,
34437        environment_name: &str,
34438        secret_name: &str,
34439        theContent: Content,
34440    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
34441    where
34442        Content: Copy + TryInto<crate::v1_1_4::request::actions_create_or_update_environment_secret::Content<::hyper::Body>>,
34443        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::actions_create_or_update_environment_secret::Content<::hyper::Body>>>::Error>
34444    {
34445        let mut theScheme = AuthScheme::from(&self.config.authentication);
34446
34447        while let Some(auth_step) = theScheme.step()? {
34448            match auth_step {
34449                ::authentic::AuthenticationStep::Request(auth_request) => {
34450                    theScheme.respond(self.client.request(auth_request).await);
34451                }
34452                ::authentic::AuthenticationStep::WaitFor(duration) => {
34453                    (self.sleep)(duration).await;
34454                }
34455            }
34456        }
34457        let theBuilder = crate::v1_1_4::request::actions_create_or_update_environment_secret::http_builder(
34458            self.config.base_url.as_ref(),
34459            repository_id,
34460            environment_name,
34461            secret_name,
34462            self.config.user_agent.as_ref(),
34463            self.config.accept.as_deref(),
34464        )?
34465        .with_authentication(&theScheme)?;
34466
34467        let theRequest = crate::v1_1_4::request::actions_create_or_update_environment_secret::hyper_request(
34468            theBuilder,
34469            theContent.try_into()?,
34470        )?;
34471
34472        ::log::debug!("HTTP request: {:?}", &theRequest);
34473
34474        let theResponse = self.client.request(theRequest).await?;
34475
34476        ::log::debug!("HTTP response: {:?}", &theResponse);
34477
34478        Ok(theResponse)
34479    }
34480
34481    /// Delete an environment secret
34482    /// 
34483    /// Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.
34484    /// 
34485    /// [API method documentation](https://docs.github.com/rest/reference/actions#delete-an-environment-secret)
34486    pub async fn actions_delete_environment_secret(
34487        &self,
34488        repository_id: i64,
34489        environment_name: &str,
34490        secret_name: &str,
34491    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
34492        let mut theScheme = AuthScheme::from(&self.config.authentication);
34493
34494        while let Some(auth_step) = theScheme.step()? {
34495            match auth_step {
34496                ::authentic::AuthenticationStep::Request(auth_request) => {
34497                    theScheme.respond(self.client.request(auth_request).await);
34498                }
34499                ::authentic::AuthenticationStep::WaitFor(duration) => {
34500                    (self.sleep)(duration).await;
34501                }
34502            }
34503        }
34504        let theBuilder = crate::v1_1_4::request::actions_delete_environment_secret::http_builder(
34505            self.config.base_url.as_ref(),
34506            repository_id,
34507            environment_name,
34508            secret_name,
34509            self.config.user_agent.as_ref(),
34510            self.config.accept.as_deref(),
34511        )?
34512        .with_authentication(&theScheme)?;
34513
34514        let theRequest =
34515            crate::v1_1_4::request::actions_delete_environment_secret::hyper_request(theBuilder)?;
34516
34517        ::log::debug!("HTTP request: {:?}", &theRequest);
34518
34519        let theResponse = self.client.request(theRequest).await?;
34520
34521        ::log::debug!("HTTP response: {:?}", &theResponse);
34522
34523        Ok(theResponse)
34524    }
34525
34526    /// List provisioned SCIM groups for an enterprise
34527    /// 
34528    /// **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
34529    /// 
34530    /// [API method documentation](https://docs.github.com/rest/reference/enterprise-admin#list-provisioned-scim-groups-for-an-enterprise)
34531    pub async fn enterprise_admin_list_provisioned_groups_enterprise(
34532        &self,
34533        enterprise: &str,
34534        start_index: ::std::option::Option<i64>,
34535        count: ::std::option::Option<i64>,
34536        filter: ::std::option::Option<&str>,
34537        excluded_attributes: ::std::option::Option<&str>,
34538    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
34539        let mut theScheme = AuthScheme::from(&self.config.authentication);
34540
34541        while let Some(auth_step) = theScheme.step()? {
34542            match auth_step {
34543                ::authentic::AuthenticationStep::Request(auth_request) => {
34544                    theScheme.respond(self.client.request(auth_request).await);
34545                }
34546                ::authentic::AuthenticationStep::WaitFor(duration) => {
34547                    (self.sleep)(duration).await;
34548                }
34549            }
34550        }
34551        let theBuilder = crate::v1_1_4::request::enterprise_admin_list_provisioned_groups_enterprise::http_builder(
34552            self.config.base_url.as_ref(),
34553            enterprise,
34554            start_index,
34555            count,
34556            filter,
34557            excluded_attributes,
34558            self.config.user_agent.as_ref(),
34559            self.config.accept.as_deref(),
34560        )?
34561        .with_authentication(&theScheme)?;
34562
34563        let theRequest =
34564            crate::v1_1_4::request::enterprise_admin_list_provisioned_groups_enterprise::hyper_request(theBuilder)?;
34565
34566        ::log::debug!("HTTP request: {:?}", &theRequest);
34567
34568        let theResponse = self.client.request(theRequest).await?;
34569
34570        ::log::debug!("HTTP response: {:?}", &theResponse);
34571
34572        Ok(theResponse)
34573    }
34574
34575    /// Provision a SCIM enterprise group and invite users
34576    /// 
34577    /// **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
34578    /// 
34579    /// Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to.
34580    /// 
34581    /// [API method documentation](https://docs.github.com/rest/reference/enterprise-admin#provision-a-scim-enterprise-group-and-invite-users)
34582    ///
34583    /// # Content
34584    ///
34585    /// - [`&v1_1_4::request::enterprise_admin_provision_and_invite_enterprise_group::body::Json`](crate::v1_1_4::request::enterprise_admin_provision_and_invite_enterprise_group::body::Json)
34586    pub async fn enterprise_admin_provision_and_invite_enterprise_group<Content>(
34587        &self,
34588        enterprise: &str,
34589        theContent: Content,
34590    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
34591    where
34592        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_provision_and_invite_enterprise_group::Content<::hyper::Body>>,
34593        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_provision_and_invite_enterprise_group::Content<::hyper::Body>>>::Error>
34594    {
34595        let mut theScheme = AuthScheme::from(&self.config.authentication);
34596
34597        while let Some(auth_step) = theScheme.step()? {
34598            match auth_step {
34599                ::authentic::AuthenticationStep::Request(auth_request) => {
34600                    theScheme.respond(self.client.request(auth_request).await);
34601                }
34602                ::authentic::AuthenticationStep::WaitFor(duration) => {
34603                    (self.sleep)(duration).await;
34604                }
34605            }
34606        }
34607        let theBuilder = crate::v1_1_4::request::enterprise_admin_provision_and_invite_enterprise_group::http_builder(
34608            self.config.base_url.as_ref(),
34609            enterprise,
34610            self.config.user_agent.as_ref(),
34611            self.config.accept.as_deref(),
34612        )?
34613        .with_authentication(&theScheme)?;
34614
34615        let theRequest = crate::v1_1_4::request::enterprise_admin_provision_and_invite_enterprise_group::hyper_request(
34616            theBuilder,
34617            theContent.try_into()?,
34618        )?;
34619
34620        ::log::debug!("HTTP request: {:?}", &theRequest);
34621
34622        let theResponse = self.client.request(theRequest).await?;
34623
34624        ::log::debug!("HTTP response: {:?}", &theResponse);
34625
34626        Ok(theResponse)
34627    }
34628
34629    /// Get SCIM provisioning information for an enterprise group
34630    /// 
34631    /// **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
34632    /// 
34633    /// [API method documentation](https://docs.github.com/rest/reference/enterprise-admin#get-scim-provisioning-information-for-an-enterprise-group)
34634    pub async fn enterprise_admin_get_provisioning_information_for_enterprise_group(
34635        &self,
34636        enterprise: &str,
34637        scim_group_id: &str,
34638        excluded_attributes: ::std::option::Option<&str>,
34639    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
34640        let mut theScheme = AuthScheme::from(&self.config.authentication);
34641
34642        while let Some(auth_step) = theScheme.step()? {
34643            match auth_step {
34644                ::authentic::AuthenticationStep::Request(auth_request) => {
34645                    theScheme.respond(self.client.request(auth_request).await);
34646                }
34647                ::authentic::AuthenticationStep::WaitFor(duration) => {
34648                    (self.sleep)(duration).await;
34649                }
34650            }
34651        }
34652        let theBuilder = crate::v1_1_4::request::enterprise_admin_get_provisioning_information_for_enterprise_group::http_builder(
34653            self.config.base_url.as_ref(),
34654            enterprise,
34655            scim_group_id,
34656            excluded_attributes,
34657            self.config.user_agent.as_ref(),
34658            self.config.accept.as_deref(),
34659        )?
34660        .with_authentication(&theScheme)?;
34661
34662        let theRequest =
34663            crate::v1_1_4::request::enterprise_admin_get_provisioning_information_for_enterprise_group::hyper_request(theBuilder)?;
34664
34665        ::log::debug!("HTTP request: {:?}", &theRequest);
34666
34667        let theResponse = self.client.request(theRequest).await?;
34668
34669        ::log::debug!("HTTP response: {:?}", &theResponse);
34670
34671        Ok(theResponse)
34672    }
34673
34674    /// Set SCIM information for a provisioned enterprise group
34675    /// 
34676    /// **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
34677    /// 
34678    /// 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.
34679    /// 
34680    /// [API method documentation](https://docs.github.com/rest/reference/enterprise-admin#set-scim-information-for-a-provisioned-enterprise-group)
34681    ///
34682    /// # Content
34683    ///
34684    /// - [`&v1_1_4::request::enterprise_admin_set_information_for_provisioned_enterprise_group::body::Json`](crate::v1_1_4::request::enterprise_admin_set_information_for_provisioned_enterprise_group::body::Json)
34685    pub async fn enterprise_admin_set_information_for_provisioned_enterprise_group<Content>(
34686        &self,
34687        enterprise: &str,
34688        scim_group_id: &str,
34689        theContent: Content,
34690    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
34691    where
34692        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_set_information_for_provisioned_enterprise_group::Content<::hyper::Body>>,
34693        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_set_information_for_provisioned_enterprise_group::Content<::hyper::Body>>>::Error>
34694    {
34695        let mut theScheme = AuthScheme::from(&self.config.authentication);
34696
34697        while let Some(auth_step) = theScheme.step()? {
34698            match auth_step {
34699                ::authentic::AuthenticationStep::Request(auth_request) => {
34700                    theScheme.respond(self.client.request(auth_request).await);
34701                }
34702                ::authentic::AuthenticationStep::WaitFor(duration) => {
34703                    (self.sleep)(duration).await;
34704                }
34705            }
34706        }
34707        let theBuilder = crate::v1_1_4::request::enterprise_admin_set_information_for_provisioned_enterprise_group::http_builder(
34708            self.config.base_url.as_ref(),
34709            enterprise,
34710            scim_group_id,
34711            self.config.user_agent.as_ref(),
34712            self.config.accept.as_deref(),
34713        )?
34714        .with_authentication(&theScheme)?;
34715
34716        let theRequest = crate::v1_1_4::request::enterprise_admin_set_information_for_provisioned_enterprise_group::hyper_request(
34717            theBuilder,
34718            theContent.try_into()?,
34719        )?;
34720
34721        ::log::debug!("HTTP request: {:?}", &theRequest);
34722
34723        let theResponse = self.client.request(theRequest).await?;
34724
34725        ::log::debug!("HTTP response: {:?}", &theResponse);
34726
34727        Ok(theResponse)
34728    }
34729
34730    /// Delete a SCIM group from an enterprise
34731    /// 
34732    /// **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
34733    /// 
34734    /// [API method documentation](https://docs.github.com/rest/reference/enterprise-admin#delete-a-scim-group-from-an-enterprise)
34735    pub async fn enterprise_admin_delete_scim_group_from_enterprise(
34736        &self,
34737        enterprise: &str,
34738        scim_group_id: &str,
34739    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
34740        let mut theScheme = AuthScheme::from(&self.config.authentication);
34741
34742        while let Some(auth_step) = theScheme.step()? {
34743            match auth_step {
34744                ::authentic::AuthenticationStep::Request(auth_request) => {
34745                    theScheme.respond(self.client.request(auth_request).await);
34746                }
34747                ::authentic::AuthenticationStep::WaitFor(duration) => {
34748                    (self.sleep)(duration).await;
34749                }
34750            }
34751        }
34752        let theBuilder = crate::v1_1_4::request::enterprise_admin_delete_scim_group_from_enterprise::http_builder(
34753            self.config.base_url.as_ref(),
34754            enterprise,
34755            scim_group_id,
34756            self.config.user_agent.as_ref(),
34757            self.config.accept.as_deref(),
34758        )?
34759        .with_authentication(&theScheme)?;
34760
34761        let theRequest =
34762            crate::v1_1_4::request::enterprise_admin_delete_scim_group_from_enterprise::hyper_request(theBuilder)?;
34763
34764        ::log::debug!("HTTP request: {:?}", &theRequest);
34765
34766        let theResponse = self.client.request(theRequest).await?;
34767
34768        ::log::debug!("HTTP response: {:?}", &theResponse);
34769
34770        Ok(theResponse)
34771    }
34772
34773    /// Update an attribute for a SCIM enterprise group
34774    /// 
34775    /// **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
34776    /// 
34777    /// Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).
34778    /// 
34779    /// [API method documentation](https://docs.github.com/rest/reference/enterprise-admin#update-an-attribute-for-a-scim-enterprise-group)
34780    ///
34781    /// # Content
34782    ///
34783    /// - [`&v1_1_4::request::enterprise_admin_update_attribute_for_enterprise_group::body::Json`](crate::v1_1_4::request::enterprise_admin_update_attribute_for_enterprise_group::body::Json)
34784    pub async fn enterprise_admin_update_attribute_for_enterprise_group<Content>(
34785        &self,
34786        enterprise: &str,
34787        scim_group_id: &str,
34788        theContent: Content,
34789    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
34790    where
34791        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_update_attribute_for_enterprise_group::Content<::hyper::Body>>,
34792        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_update_attribute_for_enterprise_group::Content<::hyper::Body>>>::Error>
34793    {
34794        let mut theScheme = AuthScheme::from(&self.config.authentication);
34795
34796        while let Some(auth_step) = theScheme.step()? {
34797            match auth_step {
34798                ::authentic::AuthenticationStep::Request(auth_request) => {
34799                    theScheme.respond(self.client.request(auth_request).await);
34800                }
34801                ::authentic::AuthenticationStep::WaitFor(duration) => {
34802                    (self.sleep)(duration).await;
34803                }
34804            }
34805        }
34806        let theBuilder = crate::v1_1_4::request::enterprise_admin_update_attribute_for_enterprise_group::http_builder(
34807            self.config.base_url.as_ref(),
34808            enterprise,
34809            scim_group_id,
34810            self.config.user_agent.as_ref(),
34811            self.config.accept.as_deref(),
34812        )?
34813        .with_authentication(&theScheme)?;
34814
34815        let theRequest = crate::v1_1_4::request::enterprise_admin_update_attribute_for_enterprise_group::hyper_request(
34816            theBuilder,
34817            theContent.try_into()?,
34818        )?;
34819
34820        ::log::debug!("HTTP request: {:?}", &theRequest);
34821
34822        let theResponse = self.client.request(theRequest).await?;
34823
34824        ::log::debug!("HTTP response: {:?}", &theResponse);
34825
34826        Ok(theResponse)
34827    }
34828
34829    /// List SCIM provisioned identities for an enterprise
34830    /// 
34831    /// **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
34832    /// 
34833    /// Retrieves a paginated list of all provisioned enterprise members, including pending invitations.
34834    /// 
34835    /// When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member:
34836    ///   - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future.
34837    ///   - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted).
34838    ///   - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO.
34839    /// 
34840    /// The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO:
34841    /// 
34842    /// 1. The user is granted access by the IdP and is not a member of the GitHub enterprise.
34843    /// 
34844    /// 1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account.
34845    /// 
34846    /// 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account:
34847    ///    - If the user signs in, their GitHub account is linked to this entry.
34848    ///    - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place.
34849    /// 
34850    /// [API method documentation](https://docs.github.com/rest/reference/enterprise-admin#list-scim-provisioned-identities-for-an-enterprise)
34851    pub async fn enterprise_admin_list_provisioned_identities_enterprise(
34852        &self,
34853        enterprise: &str,
34854        start_index: ::std::option::Option<i64>,
34855        count: ::std::option::Option<i64>,
34856        filter: ::std::option::Option<&str>,
34857    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
34858        let mut theScheme = AuthScheme::from(&self.config.authentication);
34859
34860        while let Some(auth_step) = theScheme.step()? {
34861            match auth_step {
34862                ::authentic::AuthenticationStep::Request(auth_request) => {
34863                    theScheme.respond(self.client.request(auth_request).await);
34864                }
34865                ::authentic::AuthenticationStep::WaitFor(duration) => {
34866                    (self.sleep)(duration).await;
34867                }
34868            }
34869        }
34870        let theBuilder = crate::v1_1_4::request::enterprise_admin_list_provisioned_identities_enterprise::http_builder(
34871            self.config.base_url.as_ref(),
34872            enterprise,
34873            start_index,
34874            count,
34875            filter,
34876            self.config.user_agent.as_ref(),
34877            self.config.accept.as_deref(),
34878        )?
34879        .with_authentication(&theScheme)?;
34880
34881        let theRequest =
34882            crate::v1_1_4::request::enterprise_admin_list_provisioned_identities_enterprise::hyper_request(theBuilder)?;
34883
34884        ::log::debug!("HTTP request: {:?}", &theRequest);
34885
34886        let theResponse = self.client.request(theRequest).await?;
34887
34888        ::log::debug!("HTTP response: {:?}", &theResponse);
34889
34890        Ok(theResponse)
34891    }
34892
34893    /// Provision and invite a SCIM enterprise user
34894    /// 
34895    /// **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
34896    /// 
34897    /// Provision enterprise membership for a user, and send organization invitation emails to the email address.
34898    /// 
34899    /// You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent.
34900    /// 
34901    /// [API method documentation](https://docs.github.com/rest/reference/enterprise-admin#provision-and-invite-a-scim-enterprise-user)
34902    ///
34903    /// # Content
34904    ///
34905    /// - [`&v1_1_4::request::enterprise_admin_provision_and_invite_enterprise_user::body::Json`](crate::v1_1_4::request::enterprise_admin_provision_and_invite_enterprise_user::body::Json)
34906    pub async fn enterprise_admin_provision_and_invite_enterprise_user<Content>(
34907        &self,
34908        enterprise: &str,
34909        theContent: Content,
34910    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
34911    where
34912        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_provision_and_invite_enterprise_user::Content<::hyper::Body>>,
34913        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_provision_and_invite_enterprise_user::Content<::hyper::Body>>>::Error>
34914    {
34915        let mut theScheme = AuthScheme::from(&self.config.authentication);
34916
34917        while let Some(auth_step) = theScheme.step()? {
34918            match auth_step {
34919                ::authentic::AuthenticationStep::Request(auth_request) => {
34920                    theScheme.respond(self.client.request(auth_request).await);
34921                }
34922                ::authentic::AuthenticationStep::WaitFor(duration) => {
34923                    (self.sleep)(duration).await;
34924                }
34925            }
34926        }
34927        let theBuilder = crate::v1_1_4::request::enterprise_admin_provision_and_invite_enterprise_user::http_builder(
34928            self.config.base_url.as_ref(),
34929            enterprise,
34930            self.config.user_agent.as_ref(),
34931            self.config.accept.as_deref(),
34932        )?
34933        .with_authentication(&theScheme)?;
34934
34935        let theRequest = crate::v1_1_4::request::enterprise_admin_provision_and_invite_enterprise_user::hyper_request(
34936            theBuilder,
34937            theContent.try_into()?,
34938        )?;
34939
34940        ::log::debug!("HTTP request: {:?}", &theRequest);
34941
34942        let theResponse = self.client.request(theRequest).await?;
34943
34944        ::log::debug!("HTTP response: {:?}", &theResponse);
34945
34946        Ok(theResponse)
34947    }
34948
34949    /// Get SCIM provisioning information for an enterprise user
34950    /// 
34951    /// **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
34952    /// 
34953    /// [API method documentation](https://docs.github.com/rest/reference/enterprise-admin#get-scim-provisioning-information-for-an-enterprise-user)
34954    pub async fn enterprise_admin_get_provisioning_information_for_enterprise_user(
34955        &self,
34956        enterprise: &str,
34957        scim_user_id: &str,
34958    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
34959        let mut theScheme = AuthScheme::from(&self.config.authentication);
34960
34961        while let Some(auth_step) = theScheme.step()? {
34962            match auth_step {
34963                ::authentic::AuthenticationStep::Request(auth_request) => {
34964                    theScheme.respond(self.client.request(auth_request).await);
34965                }
34966                ::authentic::AuthenticationStep::WaitFor(duration) => {
34967                    (self.sleep)(duration).await;
34968                }
34969            }
34970        }
34971        let theBuilder = crate::v1_1_4::request::enterprise_admin_get_provisioning_information_for_enterprise_user::http_builder(
34972            self.config.base_url.as_ref(),
34973            enterprise,
34974            scim_user_id,
34975            self.config.user_agent.as_ref(),
34976            self.config.accept.as_deref(),
34977        )?
34978        .with_authentication(&theScheme)?;
34979
34980        let theRequest =
34981            crate::v1_1_4::request::enterprise_admin_get_provisioning_information_for_enterprise_user::hyper_request(theBuilder)?;
34982
34983        ::log::debug!("HTTP request: {:?}", &theRequest);
34984
34985        let theResponse = self.client.request(theRequest).await?;
34986
34987        ::log::debug!("HTTP response: {:?}", &theResponse);
34988
34989        Ok(theResponse)
34990    }
34991
34992    /// Set SCIM information for a provisioned enterprise user
34993    /// 
34994    /// **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
34995    /// 
34996    /// Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead.
34997    /// 
34998    /// You must at least provide the required values for the user: `userName`, `name`, and `emails`.
34999    /// 
35000    /// **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`.
35001    /// 
35002    /// [API method documentation](https://docs.github.com/rest/reference/enterprise-admin#set-scim-information-for-a-provisioned-enterprise-user)
35003    ///
35004    /// # Content
35005    ///
35006    /// - [`&v1_1_4::request::enterprise_admin_set_information_for_provisioned_enterprise_user::body::Json`](crate::v1_1_4::request::enterprise_admin_set_information_for_provisioned_enterprise_user::body::Json)
35007    pub async fn enterprise_admin_set_information_for_provisioned_enterprise_user<Content>(
35008        &self,
35009        enterprise: &str,
35010        scim_user_id: &str,
35011        theContent: Content,
35012    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
35013    where
35014        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_set_information_for_provisioned_enterprise_user::Content<::hyper::Body>>,
35015        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_set_information_for_provisioned_enterprise_user::Content<::hyper::Body>>>::Error>
35016    {
35017        let mut theScheme = AuthScheme::from(&self.config.authentication);
35018
35019        while let Some(auth_step) = theScheme.step()? {
35020            match auth_step {
35021                ::authentic::AuthenticationStep::Request(auth_request) => {
35022                    theScheme.respond(self.client.request(auth_request).await);
35023                }
35024                ::authentic::AuthenticationStep::WaitFor(duration) => {
35025                    (self.sleep)(duration).await;
35026                }
35027            }
35028        }
35029        let theBuilder = crate::v1_1_4::request::enterprise_admin_set_information_for_provisioned_enterprise_user::http_builder(
35030            self.config.base_url.as_ref(),
35031            enterprise,
35032            scim_user_id,
35033            self.config.user_agent.as_ref(),
35034            self.config.accept.as_deref(),
35035        )?
35036        .with_authentication(&theScheme)?;
35037
35038        let theRequest = crate::v1_1_4::request::enterprise_admin_set_information_for_provisioned_enterprise_user::hyper_request(
35039            theBuilder,
35040            theContent.try_into()?,
35041        )?;
35042
35043        ::log::debug!("HTTP request: {:?}", &theRequest);
35044
35045        let theResponse = self.client.request(theRequest).await?;
35046
35047        ::log::debug!("HTTP response: {:?}", &theResponse);
35048
35049        Ok(theResponse)
35050    }
35051
35052    /// Delete a SCIM user from an enterprise
35053    /// 
35054    /// **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
35055    /// 
35056    /// [API method documentation](https://docs.github.com/rest/reference/enterprise-admin#delete-a-scim-user-from-an-enterprise)
35057    pub async fn enterprise_admin_delete_user_from_enterprise(
35058        &self,
35059        enterprise: &str,
35060        scim_user_id: &str,
35061    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
35062        let mut theScheme = AuthScheme::from(&self.config.authentication);
35063
35064        while let Some(auth_step) = theScheme.step()? {
35065            match auth_step {
35066                ::authentic::AuthenticationStep::Request(auth_request) => {
35067                    theScheme.respond(self.client.request(auth_request).await);
35068                }
35069                ::authentic::AuthenticationStep::WaitFor(duration) => {
35070                    (self.sleep)(duration).await;
35071                }
35072            }
35073        }
35074        let theBuilder = crate::v1_1_4::request::enterprise_admin_delete_user_from_enterprise::http_builder(
35075            self.config.base_url.as_ref(),
35076            enterprise,
35077            scim_user_id,
35078            self.config.user_agent.as_ref(),
35079            self.config.accept.as_deref(),
35080        )?
35081        .with_authentication(&theScheme)?;
35082
35083        let theRequest =
35084            crate::v1_1_4::request::enterprise_admin_delete_user_from_enterprise::hyper_request(theBuilder)?;
35085
35086        ::log::debug!("HTTP request: {:?}", &theRequest);
35087
35088        let theResponse = self.client.request(theRequest).await?;
35089
35090        ::log::debug!("HTTP response: {:?}", &theResponse);
35091
35092        Ok(theResponse)
35093    }
35094
35095    /// Update an attribute for a SCIM enterprise user
35096    /// 
35097    /// **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change.
35098    /// 
35099    /// Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).
35100    /// 
35101    /// **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work.
35102    /// 
35103    /// **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`.
35104    /// 
35105    /// ```text
35106    /// {
35107    ///   "Operations":[{
35108    ///     "op":"replace",
35109    ///     "value":{
35110    ///       "active":false
35111    ///     }
35112    ///   }]
35113    /// }
35114    /// ```
35115    /// 
35116    /// [API method documentation](https://docs.github.com/rest/reference/enterprise-admin#update-an-attribute-for-a-scim-enterprise-user)
35117    ///
35118    /// # Content
35119    ///
35120    /// - [`&v1_1_4::request::enterprise_admin_update_attribute_for_enterprise_user::body::Json`](crate::v1_1_4::request::enterprise_admin_update_attribute_for_enterprise_user::body::Json)
35121    pub async fn enterprise_admin_update_attribute_for_enterprise_user<Content>(
35122        &self,
35123        enterprise: &str,
35124        scim_user_id: &str,
35125        theContent: Content,
35126    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
35127    where
35128        Content: Copy + TryInto<crate::v1_1_4::request::enterprise_admin_update_attribute_for_enterprise_user::Content<::hyper::Body>>,
35129        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::enterprise_admin_update_attribute_for_enterprise_user::Content<::hyper::Body>>>::Error>
35130    {
35131        let mut theScheme = AuthScheme::from(&self.config.authentication);
35132
35133        while let Some(auth_step) = theScheme.step()? {
35134            match auth_step {
35135                ::authentic::AuthenticationStep::Request(auth_request) => {
35136                    theScheme.respond(self.client.request(auth_request).await);
35137                }
35138                ::authentic::AuthenticationStep::WaitFor(duration) => {
35139                    (self.sleep)(duration).await;
35140                }
35141            }
35142        }
35143        let theBuilder = crate::v1_1_4::request::enterprise_admin_update_attribute_for_enterprise_user::http_builder(
35144            self.config.base_url.as_ref(),
35145            enterprise,
35146            scim_user_id,
35147            self.config.user_agent.as_ref(),
35148            self.config.accept.as_deref(),
35149        )?
35150        .with_authentication(&theScheme)?;
35151
35152        let theRequest = crate::v1_1_4::request::enterprise_admin_update_attribute_for_enterprise_user::hyper_request(
35153            theBuilder,
35154            theContent.try_into()?,
35155        )?;
35156
35157        ::log::debug!("HTTP request: {:?}", &theRequest);
35158
35159        let theResponse = self.client.request(theRequest).await?;
35160
35161        ::log::debug!("HTTP response: {:?}", &theResponse);
35162
35163        Ok(theResponse)
35164    }
35165
35166    /// List SCIM provisioned identities
35167    /// 
35168    /// Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned.
35169    /// 
35170    /// When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member:
35171    ///   - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future.
35172    ///   - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted).
35173    ///   - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO.
35174    /// 
35175    /// The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO:
35176    /// 
35177    /// 1. The user is granted access by the IdP and is not a member of the GitHub organization.
35178    /// 
35179    /// 1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account.
35180    /// 
35181    /// 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account:
35182    ///    - If the user signs in, their GitHub account is linked to this entry.
35183    ///    - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place.
35184    /// 
35185    /// [API method documentation](https://docs.github.com/rest/reference/scim#list-scim-provisioned-identities)
35186    pub async fn scim_list_provisioned_identities(
35187        &self,
35188        org: &str,
35189        start_index: ::std::option::Option<i64>,
35190        count: ::std::option::Option<i64>,
35191        filter: ::std::option::Option<&str>,
35192    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
35193        let mut theScheme = AuthScheme::from(&self.config.authentication);
35194
35195        while let Some(auth_step) = theScheme.step()? {
35196            match auth_step {
35197                ::authentic::AuthenticationStep::Request(auth_request) => {
35198                    theScheme.respond(self.client.request(auth_request).await);
35199                }
35200                ::authentic::AuthenticationStep::WaitFor(duration) => {
35201                    (self.sleep)(duration).await;
35202                }
35203            }
35204        }
35205        let theBuilder = crate::v1_1_4::request::scim_list_provisioned_identities::http_builder(
35206            self.config.base_url.as_ref(),
35207            org,
35208            start_index,
35209            count,
35210            filter,
35211            self.config.user_agent.as_ref(),
35212            self.config.accept.as_deref(),
35213        )?
35214        .with_authentication(&theScheme)?;
35215
35216        let theRequest =
35217            crate::v1_1_4::request::scim_list_provisioned_identities::hyper_request(theBuilder)?;
35218
35219        ::log::debug!("HTTP request: {:?}", &theRequest);
35220
35221        let theResponse = self.client.request(theRequest).await?;
35222
35223        ::log::debug!("HTTP response: {:?}", &theResponse);
35224
35225        Ok(theResponse)
35226    }
35227
35228    /// Provision and invite a SCIM user
35229    /// 
35230    /// Provision organization membership for a user, and send an activation email to the email address.
35231    /// 
35232    /// [API method documentation](https://docs.github.com/rest/reference/scim#provision-and-invite-a-scim-user)
35233    ///
35234    /// # Content
35235    ///
35236    /// - [`&v1_1_4::request::scim_provision_and_invite_user::body::Json`](crate::v1_1_4::request::scim_provision_and_invite_user::body::Json)
35237    pub async fn scim_provision_and_invite_user<Content>(
35238        &self,
35239        org: &str,
35240        theContent: Content,
35241    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
35242    where
35243        Content: Copy + TryInto<crate::v1_1_4::request::scim_provision_and_invite_user::Content<::hyper::Body>>,
35244        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::scim_provision_and_invite_user::Content<::hyper::Body>>>::Error>
35245    {
35246        let mut theScheme = AuthScheme::from(&self.config.authentication);
35247
35248        while let Some(auth_step) = theScheme.step()? {
35249            match auth_step {
35250                ::authentic::AuthenticationStep::Request(auth_request) => {
35251                    theScheme.respond(self.client.request(auth_request).await);
35252                }
35253                ::authentic::AuthenticationStep::WaitFor(duration) => {
35254                    (self.sleep)(duration).await;
35255                }
35256            }
35257        }
35258        let theBuilder = crate::v1_1_4::request::scim_provision_and_invite_user::http_builder(
35259            self.config.base_url.as_ref(),
35260            org,
35261            self.config.user_agent.as_ref(),
35262            self.config.accept.as_deref(),
35263        )?
35264        .with_authentication(&theScheme)?;
35265
35266        let theRequest = crate::v1_1_4::request::scim_provision_and_invite_user::hyper_request(
35267            theBuilder,
35268            theContent.try_into()?,
35269        )?;
35270
35271        ::log::debug!("HTTP request: {:?}", &theRequest);
35272
35273        let theResponse = self.client.request(theRequest).await?;
35274
35275        ::log::debug!("HTTP response: {:?}", &theResponse);
35276
35277        Ok(theResponse)
35278    }
35279
35280    /// Get SCIM provisioning information for a user
35281    /// 
35282    /// [API method documentation](https://docs.github.com/rest/reference/scim#get-scim-provisioning-information-for-a-user)
35283    pub async fn scim_get_provisioning_information_for_user(
35284        &self,
35285        org: &str,
35286        scim_user_id: &str,
35287    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
35288        let mut theScheme = AuthScheme::from(&self.config.authentication);
35289
35290        while let Some(auth_step) = theScheme.step()? {
35291            match auth_step {
35292                ::authentic::AuthenticationStep::Request(auth_request) => {
35293                    theScheme.respond(self.client.request(auth_request).await);
35294                }
35295                ::authentic::AuthenticationStep::WaitFor(duration) => {
35296                    (self.sleep)(duration).await;
35297                }
35298            }
35299        }
35300        let theBuilder = crate::v1_1_4::request::scim_get_provisioning_information_for_user::http_builder(
35301            self.config.base_url.as_ref(),
35302            org,
35303            scim_user_id,
35304            self.config.user_agent.as_ref(),
35305            self.config.accept.as_deref(),
35306        )?
35307        .with_authentication(&theScheme)?;
35308
35309        let theRequest =
35310            crate::v1_1_4::request::scim_get_provisioning_information_for_user::hyper_request(theBuilder)?;
35311
35312        ::log::debug!("HTTP request: {:?}", &theRequest);
35313
35314        let theResponse = self.client.request(theRequest).await?;
35315
35316        ::log::debug!("HTTP response: {:?}", &theResponse);
35317
35318        Ok(theResponse)
35319    }
35320
35321    /// Update a provisioned organization membership
35322    /// 
35323    /// Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead.
35324    /// 
35325    /// You must at least provide the required values for the user: `userName`, `name`, and `emails`.
35326    /// 
35327    /// **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`.
35328    /// 
35329    /// [API method documentation](https://docs.github.com/rest/reference/scim#set-scim-information-for-a-provisioned-user)
35330    ///
35331    /// # Content
35332    ///
35333    /// - [`&v1_1_4::request::scim_set_information_for_provisioned_user::body::Json`](crate::v1_1_4::request::scim_set_information_for_provisioned_user::body::Json)
35334    pub async fn scim_set_information_for_provisioned_user<Content>(
35335        &self,
35336        org: &str,
35337        scim_user_id: &str,
35338        theContent: Content,
35339    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
35340    where
35341        Content: Copy + TryInto<crate::v1_1_4::request::scim_set_information_for_provisioned_user::Content<::hyper::Body>>,
35342        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::scim_set_information_for_provisioned_user::Content<::hyper::Body>>>::Error>
35343    {
35344        let mut theScheme = AuthScheme::from(&self.config.authentication);
35345
35346        while let Some(auth_step) = theScheme.step()? {
35347            match auth_step {
35348                ::authentic::AuthenticationStep::Request(auth_request) => {
35349                    theScheme.respond(self.client.request(auth_request).await);
35350                }
35351                ::authentic::AuthenticationStep::WaitFor(duration) => {
35352                    (self.sleep)(duration).await;
35353                }
35354            }
35355        }
35356        let theBuilder = crate::v1_1_4::request::scim_set_information_for_provisioned_user::http_builder(
35357            self.config.base_url.as_ref(),
35358            org,
35359            scim_user_id,
35360            self.config.user_agent.as_ref(),
35361            self.config.accept.as_deref(),
35362        )?
35363        .with_authentication(&theScheme)?;
35364
35365        let theRequest = crate::v1_1_4::request::scim_set_information_for_provisioned_user::hyper_request(
35366            theBuilder,
35367            theContent.try_into()?,
35368        )?;
35369
35370        ::log::debug!("HTTP request: {:?}", &theRequest);
35371
35372        let theResponse = self.client.request(theRequest).await?;
35373
35374        ::log::debug!("HTTP response: {:?}", &theResponse);
35375
35376        Ok(theResponse)
35377    }
35378
35379    /// Delete a SCIM user from an organization
35380    /// 
35381    /// [API method documentation](https://docs.github.com/rest/reference/scim#delete-a-scim-user-from-an-organization)
35382    pub async fn scim_delete_user_from_org(
35383        &self,
35384        org: &str,
35385        scim_user_id: &str,
35386    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
35387        let mut theScheme = AuthScheme::from(&self.config.authentication);
35388
35389        while let Some(auth_step) = theScheme.step()? {
35390            match auth_step {
35391                ::authentic::AuthenticationStep::Request(auth_request) => {
35392                    theScheme.respond(self.client.request(auth_request).await);
35393                }
35394                ::authentic::AuthenticationStep::WaitFor(duration) => {
35395                    (self.sleep)(duration).await;
35396                }
35397            }
35398        }
35399        let theBuilder = crate::v1_1_4::request::scim_delete_user_from_org::http_builder(
35400            self.config.base_url.as_ref(),
35401            org,
35402            scim_user_id,
35403            self.config.user_agent.as_ref(),
35404            self.config.accept.as_deref(),
35405        )?
35406        .with_authentication(&theScheme)?;
35407
35408        let theRequest =
35409            crate::v1_1_4::request::scim_delete_user_from_org::hyper_request(theBuilder)?;
35410
35411        ::log::debug!("HTTP request: {:?}", &theRequest);
35412
35413        let theResponse = self.client.request(theRequest).await?;
35414
35415        ::log::debug!("HTTP response: {:?}", &theResponse);
35416
35417        Ok(theResponse)
35418    }
35419
35420    /// Update an attribute for a SCIM user
35421    /// 
35422    /// Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).
35423    /// 
35424    /// **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work.
35425    /// 
35426    /// **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`.
35427    /// 
35428    /// ```text
35429    /// {
35430    ///   "Operations":[{
35431    ///     "op":"replace",
35432    ///     "value":{
35433    ///       "active":false
35434    ///     }
35435    ///   }]
35436    /// }
35437    /// ```
35438    /// 
35439    /// [API method documentation](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user)
35440    ///
35441    /// # Content
35442    ///
35443    /// - [`&v1_1_4::request::scim_update_attribute_for_user::body::Json`](crate::v1_1_4::request::scim_update_attribute_for_user::body::Json)
35444    pub async fn scim_update_attribute_for_user<Content>(
35445        &self,
35446        org: &str,
35447        scim_user_id: &str,
35448        theContent: Content,
35449    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
35450    where
35451        Content: Copy + TryInto<crate::v1_1_4::request::scim_update_attribute_for_user::Content<::hyper::Body>>,
35452        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::scim_update_attribute_for_user::Content<::hyper::Body>>>::Error>
35453    {
35454        let mut theScheme = AuthScheme::from(&self.config.authentication);
35455
35456        while let Some(auth_step) = theScheme.step()? {
35457            match auth_step {
35458                ::authentic::AuthenticationStep::Request(auth_request) => {
35459                    theScheme.respond(self.client.request(auth_request).await);
35460                }
35461                ::authentic::AuthenticationStep::WaitFor(duration) => {
35462                    (self.sleep)(duration).await;
35463                }
35464            }
35465        }
35466        let theBuilder = crate::v1_1_4::request::scim_update_attribute_for_user::http_builder(
35467            self.config.base_url.as_ref(),
35468            org,
35469            scim_user_id,
35470            self.config.user_agent.as_ref(),
35471            self.config.accept.as_deref(),
35472        )?
35473        .with_authentication(&theScheme)?;
35474
35475        let theRequest = crate::v1_1_4::request::scim_update_attribute_for_user::hyper_request(
35476            theBuilder,
35477            theContent.try_into()?,
35478        )?;
35479
35480        ::log::debug!("HTTP request: {:?}", &theRequest);
35481
35482        let theResponse = self.client.request(theRequest).await?;
35483
35484        ::log::debug!("HTTP response: {:?}", &theResponse);
35485
35486        Ok(theResponse)
35487    }
35488
35489    /// Search code
35490    /// 
35491    /// Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
35492    /// 
35493    /// When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
35494    /// 
35495    /// For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this:
35496    /// 
35497    /// `q=addClass+in:file+language:js+repo:jquery/jquery`
35498    /// 
35499    /// This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository.
35500    /// 
35501    /// #### Considerations for code search
35502    /// 
35503    /// Due to the complexity of searching code, there are a few restrictions on how searches are performed:
35504    /// 
35505    /// *   Only the _default branch_ is considered. In most cases, this will be the `master` branch.
35506    /// *   Only files smaller than 384 KB are searchable.
35507    /// *   You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing
35508    /// language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is.
35509    /// 
35510    /// [API method documentation](https://docs.github.com/rest/reference/search#search-code)
35511    pub async fn search_code(
35512        &self,
35513        q: &str,
35514        sort: ::std::option::Option<&str>,
35515        order: ::std::option::Option<&str>,
35516        per_page: ::std::option::Option<i64>,
35517        page: ::std::option::Option<i64>,
35518    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
35519        let mut theScheme = AuthScheme::from(&self.config.authentication);
35520
35521        while let Some(auth_step) = theScheme.step()? {
35522            match auth_step {
35523                ::authentic::AuthenticationStep::Request(auth_request) => {
35524                    theScheme.respond(self.client.request(auth_request).await);
35525                }
35526                ::authentic::AuthenticationStep::WaitFor(duration) => {
35527                    (self.sleep)(duration).await;
35528                }
35529            }
35530        }
35531        let theBuilder = crate::v1_1_4::request::search_code::http_builder(
35532            self.config.base_url.as_ref(),
35533            q,
35534            sort,
35535            order,
35536            per_page,
35537            page,
35538            self.config.user_agent.as_ref(),
35539            self.config.accept.as_deref(),
35540        )?
35541        .with_authentication(&theScheme)?;
35542
35543        let theRequest =
35544            crate::v1_1_4::request::search_code::hyper_request(theBuilder)?;
35545
35546        ::log::debug!("HTTP request: {:?}", &theRequest);
35547
35548        let theResponse = self.client.request(theRequest).await?;
35549
35550        ::log::debug!("HTTP response: {:?}", &theResponse);
35551
35552        Ok(theResponse)
35553    }
35554
35555    /// Search commits
35556    /// 
35557    /// Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
35558    /// 
35559    /// When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match
35560    /// metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
35561    /// 
35562    /// For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this:
35563    /// 
35564    /// `q=repo:octocat/Spoon-Knife+css`
35565    /// 
35566    /// [API method documentation](https://docs.github.com/rest/reference/search#search-commits)
35567    pub async fn search_commits(
35568        &self,
35569        q: &str,
35570        sort: ::std::option::Option<&str>,
35571        order: ::std::option::Option<&str>,
35572        per_page: ::std::option::Option<i64>,
35573        page: ::std::option::Option<i64>,
35574    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
35575        let mut theScheme = AuthScheme::from(&self.config.authentication);
35576
35577        while let Some(auth_step) = theScheme.step()? {
35578            match auth_step {
35579                ::authentic::AuthenticationStep::Request(auth_request) => {
35580                    theScheme.respond(self.client.request(auth_request).await);
35581                }
35582                ::authentic::AuthenticationStep::WaitFor(duration) => {
35583                    (self.sleep)(duration).await;
35584                }
35585            }
35586        }
35587        let theBuilder = crate::v1_1_4::request::search_commits::http_builder(
35588            self.config.base_url.as_ref(),
35589            q,
35590            sort,
35591            order,
35592            per_page,
35593            page,
35594            self.config.user_agent.as_ref(),
35595            self.config.accept.as_deref(),
35596        )?
35597        .with_authentication(&theScheme)?;
35598
35599        let theRequest =
35600            crate::v1_1_4::request::search_commits::hyper_request(theBuilder)?;
35601
35602        ::log::debug!("HTTP request: {:?}", &theRequest);
35603
35604        let theResponse = self.client.request(theRequest).await?;
35605
35606        ::log::debug!("HTTP response: {:?}", &theResponse);
35607
35608        Ok(theResponse)
35609    }
35610
35611    /// Search issues and pull requests
35612    /// 
35613    /// Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
35614    /// 
35615    /// When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted
35616    /// search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
35617    /// 
35618    /// For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.
35619    /// 
35620    /// `q=windows+label:bug+language:python+state:open&sort=created&order=asc`
35621    /// 
35622    /// This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.
35623    /// 
35624    /// **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)."
35625    /// 
35626    /// [API method documentation](https://docs.github.com/rest/reference/search#search-issues-and-pull-requests)
35627    pub async fn search_issues_and_pull_requests(
35628        &self,
35629        q: &str,
35630        sort: ::std::option::Option<&str>,
35631        order: ::std::option::Option<&str>,
35632        per_page: ::std::option::Option<i64>,
35633        page: ::std::option::Option<i64>,
35634    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
35635        let mut theScheme = AuthScheme::from(&self.config.authentication);
35636
35637        while let Some(auth_step) = theScheme.step()? {
35638            match auth_step {
35639                ::authentic::AuthenticationStep::Request(auth_request) => {
35640                    theScheme.respond(self.client.request(auth_request).await);
35641                }
35642                ::authentic::AuthenticationStep::WaitFor(duration) => {
35643                    (self.sleep)(duration).await;
35644                }
35645            }
35646        }
35647        let theBuilder = crate::v1_1_4::request::search_issues_and_pull_requests::http_builder(
35648            self.config.base_url.as_ref(),
35649            q,
35650            sort,
35651            order,
35652            per_page,
35653            page,
35654            self.config.user_agent.as_ref(),
35655            self.config.accept.as_deref(),
35656        )?
35657        .with_authentication(&theScheme)?;
35658
35659        let theRequest =
35660            crate::v1_1_4::request::search_issues_and_pull_requests::hyper_request(theBuilder)?;
35661
35662        ::log::debug!("HTTP request: {:?}", &theRequest);
35663
35664        let theResponse = self.client.request(theRequest).await?;
35665
35666        ::log::debug!("HTTP response: {:?}", &theResponse);
35667
35668        Ok(theResponse)
35669    }
35670
35671    /// Search labels
35672    /// 
35673    /// Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
35674    /// 
35675    /// When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
35676    /// 
35677    /// For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this:
35678    /// 
35679    /// `q=bug+defect+enhancement&repository_id=64778136`
35680    /// 
35681    /// The labels that best match the query appear first in the search results.
35682    /// 
35683    /// [API method documentation](https://docs.github.com/rest/reference/search#search-labels)
35684    pub async fn search_labels(
35685        &self,
35686        repository_id: i64,
35687        q: &str,
35688        sort: ::std::option::Option<&str>,
35689        order: ::std::option::Option<&str>,
35690        per_page: ::std::option::Option<i64>,
35691        page: ::std::option::Option<i64>,
35692    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
35693        let mut theScheme = AuthScheme::from(&self.config.authentication);
35694
35695        while let Some(auth_step) = theScheme.step()? {
35696            match auth_step {
35697                ::authentic::AuthenticationStep::Request(auth_request) => {
35698                    theScheme.respond(self.client.request(auth_request).await);
35699                }
35700                ::authentic::AuthenticationStep::WaitFor(duration) => {
35701                    (self.sleep)(duration).await;
35702                }
35703            }
35704        }
35705        let theBuilder = crate::v1_1_4::request::search_labels::http_builder(
35706            self.config.base_url.as_ref(),
35707            repository_id,
35708            q,
35709            sort,
35710            order,
35711            per_page,
35712            page,
35713            self.config.user_agent.as_ref(),
35714            self.config.accept.as_deref(),
35715        )?
35716        .with_authentication(&theScheme)?;
35717
35718        let theRequest =
35719            crate::v1_1_4::request::search_labels::hyper_request(theBuilder)?;
35720
35721        ::log::debug!("HTTP request: {:?}", &theRequest);
35722
35723        let theResponse = self.client.request(theRequest).await?;
35724
35725        ::log::debug!("HTTP response: {:?}", &theResponse);
35726
35727        Ok(theResponse)
35728    }
35729
35730    /// Search repositories
35731    /// 
35732    /// Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
35733    /// 
35734    /// When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
35735    /// 
35736    /// For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this:
35737    /// 
35738    /// `q=tetris+language:assembly&sort=stars&order=desc`
35739    /// 
35740    /// This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results.
35741    /// 
35742    /// [API method documentation](https://docs.github.com/rest/reference/search#search-repositories)
35743    pub async fn search_repos(
35744        &self,
35745        q: &str,
35746        sort: ::std::option::Option<&str>,
35747        order: ::std::option::Option<&str>,
35748        per_page: ::std::option::Option<i64>,
35749        page: ::std::option::Option<i64>,
35750    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
35751        let mut theScheme = AuthScheme::from(&self.config.authentication);
35752
35753        while let Some(auth_step) = theScheme.step()? {
35754            match auth_step {
35755                ::authentic::AuthenticationStep::Request(auth_request) => {
35756                    theScheme.respond(self.client.request(auth_request).await);
35757                }
35758                ::authentic::AuthenticationStep::WaitFor(duration) => {
35759                    (self.sleep)(duration).await;
35760                }
35761            }
35762        }
35763        let theBuilder = crate::v1_1_4::request::search_repos::http_builder(
35764            self.config.base_url.as_ref(),
35765            q,
35766            sort,
35767            order,
35768            per_page,
35769            page,
35770            self.config.user_agent.as_ref(),
35771            self.config.accept.as_deref(),
35772        )?
35773        .with_authentication(&theScheme)?;
35774
35775        let theRequest =
35776            crate::v1_1_4::request::search_repos::hyper_request(theBuilder)?;
35777
35778        ::log::debug!("HTTP request: {:?}", &theRequest);
35779
35780        let theResponse = self.client.request(theRequest).await?;
35781
35782        ::log::debug!("HTTP response: {:?}", &theResponse);
35783
35784        Ok(theResponse)
35785    }
35786
35787    /// Search topics
35788    /// 
35789    /// Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers.
35790    /// 
35791    /// When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
35792    /// 
35793    /// For example, if you want to search for topics related to Ruby that are featured on <https://github.com/topics> your query might look like this:
35794    /// 
35795    /// `q=ruby+is:featured`
35796    /// 
35797    /// This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results.
35798    /// 
35799    /// [API method documentation](https://docs.github.com/rest/reference/search#search-topics)
35800    pub async fn search_topics(
35801        &self,
35802        q: &str,
35803        per_page: ::std::option::Option<i64>,
35804        page: ::std::option::Option<i64>,
35805    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
35806        let mut theScheme = AuthScheme::from(&self.config.authentication);
35807
35808        while let Some(auth_step) = theScheme.step()? {
35809            match auth_step {
35810                ::authentic::AuthenticationStep::Request(auth_request) => {
35811                    theScheme.respond(self.client.request(auth_request).await);
35812                }
35813                ::authentic::AuthenticationStep::WaitFor(duration) => {
35814                    (self.sleep)(duration).await;
35815                }
35816            }
35817        }
35818        let theBuilder = crate::v1_1_4::request::search_topics::http_builder(
35819            self.config.base_url.as_ref(),
35820            q,
35821            per_page,
35822            page,
35823            self.config.user_agent.as_ref(),
35824            self.config.accept.as_deref(),
35825        )?
35826        .with_authentication(&theScheme)?;
35827
35828        let theRequest =
35829            crate::v1_1_4::request::search_topics::hyper_request(theBuilder)?;
35830
35831        ::log::debug!("HTTP request: {:?}", &theRequest);
35832
35833        let theResponse = self.client.request(theRequest).await?;
35834
35835        ::log::debug!("HTTP response: {:?}", &theResponse);
35836
35837        Ok(theResponse)
35838    }
35839
35840    /// Search users
35841    /// 
35842    /// Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination).
35843    /// 
35844    /// When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata).
35845    /// 
35846    /// For example, if you're looking for a list of popular users, you might try this query:
35847    /// 
35848    /// `q=tom+repos:%3E42+followers:%3E1000`
35849    /// 
35850    /// This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers.
35851    /// 
35852    /// [API method documentation](https://docs.github.com/rest/reference/search#search-users)
35853    pub async fn search_users(
35854        &self,
35855        q: &str,
35856        sort: ::std::option::Option<&str>,
35857        order: ::std::option::Option<&str>,
35858        per_page: ::std::option::Option<i64>,
35859        page: ::std::option::Option<i64>,
35860    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
35861        let mut theScheme = AuthScheme::from(&self.config.authentication);
35862
35863        while let Some(auth_step) = theScheme.step()? {
35864            match auth_step {
35865                ::authentic::AuthenticationStep::Request(auth_request) => {
35866                    theScheme.respond(self.client.request(auth_request).await);
35867                }
35868                ::authentic::AuthenticationStep::WaitFor(duration) => {
35869                    (self.sleep)(duration).await;
35870                }
35871            }
35872        }
35873        let theBuilder = crate::v1_1_4::request::search_users::http_builder(
35874            self.config.base_url.as_ref(),
35875            q,
35876            sort,
35877            order,
35878            per_page,
35879            page,
35880            self.config.user_agent.as_ref(),
35881            self.config.accept.as_deref(),
35882        )?
35883        .with_authentication(&theScheme)?;
35884
35885        let theRequest =
35886            crate::v1_1_4::request::search_users::hyper_request(theBuilder)?;
35887
35888        ::log::debug!("HTTP request: {:?}", &theRequest);
35889
35890        let theResponse = self.client.request(theRequest).await?;
35891
35892        ::log::debug!("HTTP response: {:?}", &theResponse);
35893
35894        Ok(theResponse)
35895    }
35896
35897    /// Get a team (Legacy)
35898    /// 
35899    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint.
35900    /// 
35901    /// [API method documentation](https://docs.github.com/rest/reference/teams/#get-a-team-legacy)
35902    pub async fn teams_get_legacy(
35903        &self,
35904        team_id: i64,
35905    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
35906        let mut theScheme = AuthScheme::from(&self.config.authentication);
35907
35908        while let Some(auth_step) = theScheme.step()? {
35909            match auth_step {
35910                ::authentic::AuthenticationStep::Request(auth_request) => {
35911                    theScheme.respond(self.client.request(auth_request).await);
35912                }
35913                ::authentic::AuthenticationStep::WaitFor(duration) => {
35914                    (self.sleep)(duration).await;
35915                }
35916            }
35917        }
35918        let theBuilder = crate::v1_1_4::request::teams_get_legacy::http_builder(
35919            self.config.base_url.as_ref(),
35920            team_id,
35921            self.config.user_agent.as_ref(),
35922            self.config.accept.as_deref(),
35923        )?
35924        .with_authentication(&theScheme)?;
35925
35926        let theRequest =
35927            crate::v1_1_4::request::teams_get_legacy::hyper_request(theBuilder)?;
35928
35929        ::log::debug!("HTTP request: {:?}", &theRequest);
35930
35931        let theResponse = self.client.request(theRequest).await?;
35932
35933        ::log::debug!("HTTP response: {:?}", &theResponse);
35934
35935        Ok(theResponse)
35936    }
35937
35938    /// Delete a team (Legacy)
35939    /// 
35940    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint.
35941    /// 
35942    /// To delete a team, the authenticated user must be an organization owner or team maintainer.
35943    /// 
35944    /// If you are an organization owner, deleting a parent team will delete all of its child teams as well.
35945    /// 
35946    /// [API method documentation](https://docs.github.com/rest/reference/teams/#delete-a-team-legacy)
35947    pub async fn teams_delete_legacy(
35948        &self,
35949        team_id: i64,
35950    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
35951        let mut theScheme = AuthScheme::from(&self.config.authentication);
35952
35953        while let Some(auth_step) = theScheme.step()? {
35954            match auth_step {
35955                ::authentic::AuthenticationStep::Request(auth_request) => {
35956                    theScheme.respond(self.client.request(auth_request).await);
35957                }
35958                ::authentic::AuthenticationStep::WaitFor(duration) => {
35959                    (self.sleep)(duration).await;
35960                }
35961            }
35962        }
35963        let theBuilder = crate::v1_1_4::request::teams_delete_legacy::http_builder(
35964            self.config.base_url.as_ref(),
35965            team_id,
35966            self.config.user_agent.as_ref(),
35967            self.config.accept.as_deref(),
35968        )?
35969        .with_authentication(&theScheme)?;
35970
35971        let theRequest =
35972            crate::v1_1_4::request::teams_delete_legacy::hyper_request(theBuilder)?;
35973
35974        ::log::debug!("HTTP request: {:?}", &theRequest);
35975
35976        let theResponse = self.client.request(theRequest).await?;
35977
35978        ::log::debug!("HTTP response: {:?}", &theResponse);
35979
35980        Ok(theResponse)
35981    }
35982
35983    /// Update a team (Legacy)
35984    /// 
35985    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint.
35986    /// 
35987    /// To edit a team, the authenticated user must either be an organization owner or a team maintainer.
35988    /// 
35989    /// **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`.
35990    /// 
35991    /// [API method documentation](https://docs.github.com/rest/reference/teams/#update-a-team-legacy)
35992    ///
35993    /// # Content
35994    ///
35995    /// - [`&v1_1_4::request::teams_update_legacy::body::Json`](crate::v1_1_4::request::teams_update_legacy::body::Json)
35996    pub async fn teams_update_legacy<Content>(
35997        &self,
35998        team_id: i64,
35999        theContent: Content,
36000    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
36001    where
36002        Content: Copy + TryInto<crate::v1_1_4::request::teams_update_legacy::Content<::hyper::Body>>,
36003        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_update_legacy::Content<::hyper::Body>>>::Error>
36004    {
36005        let mut theScheme = AuthScheme::from(&self.config.authentication);
36006
36007        while let Some(auth_step) = theScheme.step()? {
36008            match auth_step {
36009                ::authentic::AuthenticationStep::Request(auth_request) => {
36010                    theScheme.respond(self.client.request(auth_request).await);
36011                }
36012                ::authentic::AuthenticationStep::WaitFor(duration) => {
36013                    (self.sleep)(duration).await;
36014                }
36015            }
36016        }
36017        let theBuilder = crate::v1_1_4::request::teams_update_legacy::http_builder(
36018            self.config.base_url.as_ref(),
36019            team_id,
36020            self.config.user_agent.as_ref(),
36021            self.config.accept.as_deref(),
36022        )?
36023        .with_authentication(&theScheme)?;
36024
36025        let theRequest = crate::v1_1_4::request::teams_update_legacy::hyper_request(
36026            theBuilder,
36027            theContent.try_into()?,
36028        )?;
36029
36030        ::log::debug!("HTTP request: {:?}", &theRequest);
36031
36032        let theResponse = self.client.request(theRequest).await?;
36033
36034        ::log::debug!("HTTP response: {:?}", &theResponse);
36035
36036        Ok(theResponse)
36037    }
36038
36039    /// List discussions (Legacy)
36040    /// 
36041    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint.
36042    /// 
36043    /// List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
36044    /// 
36045    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-discussions-legacy)
36046    pub async fn teams_list_discussions_legacy(
36047        &self,
36048        team_id: i64,
36049        direction: ::std::option::Option<&str>,
36050        per_page: ::std::option::Option<i64>,
36051        page: ::std::option::Option<i64>,
36052    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
36053        let mut theScheme = AuthScheme::from(&self.config.authentication);
36054
36055        while let Some(auth_step) = theScheme.step()? {
36056            match auth_step {
36057                ::authentic::AuthenticationStep::Request(auth_request) => {
36058                    theScheme.respond(self.client.request(auth_request).await);
36059                }
36060                ::authentic::AuthenticationStep::WaitFor(duration) => {
36061                    (self.sleep)(duration).await;
36062                }
36063            }
36064        }
36065        let theBuilder = crate::v1_1_4::request::teams_list_discussions_legacy::http_builder(
36066            self.config.base_url.as_ref(),
36067            team_id,
36068            direction,
36069            per_page,
36070            page,
36071            self.config.user_agent.as_ref(),
36072            self.config.accept.as_deref(),
36073        )?
36074        .with_authentication(&theScheme)?;
36075
36076        let theRequest =
36077            crate::v1_1_4::request::teams_list_discussions_legacy::hyper_request(theBuilder)?;
36078
36079        ::log::debug!("HTTP request: {:?}", &theRequest);
36080
36081        let theResponse = self.client.request(theRequest).await?;
36082
36083        ::log::debug!("HTTP response: {:?}", &theResponse);
36084
36085        Ok(theResponse)
36086    }
36087
36088    /// Create a discussion (Legacy)
36089    /// 
36090    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint.
36091    /// 
36092    /// Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
36093    /// 
36094    /// This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
36095    /// 
36096    /// [API method documentation](https://docs.github.com/rest/reference/teams#create-a-discussion-legacy)
36097    ///
36098    /// # Content
36099    ///
36100    /// - [`&v1_1_4::request::teams_create_discussion_legacy::body::Json`](crate::v1_1_4::request::teams_create_discussion_legacy::body::Json)
36101    pub async fn teams_create_discussion_legacy<Content>(
36102        &self,
36103        team_id: i64,
36104        theContent: Content,
36105    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
36106    where
36107        Content: Copy + TryInto<crate::v1_1_4::request::teams_create_discussion_legacy::Content<::hyper::Body>>,
36108        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_create_discussion_legacy::Content<::hyper::Body>>>::Error>
36109    {
36110        let mut theScheme = AuthScheme::from(&self.config.authentication);
36111
36112        while let Some(auth_step) = theScheme.step()? {
36113            match auth_step {
36114                ::authentic::AuthenticationStep::Request(auth_request) => {
36115                    theScheme.respond(self.client.request(auth_request).await);
36116                }
36117                ::authentic::AuthenticationStep::WaitFor(duration) => {
36118                    (self.sleep)(duration).await;
36119                }
36120            }
36121        }
36122        let theBuilder = crate::v1_1_4::request::teams_create_discussion_legacy::http_builder(
36123            self.config.base_url.as_ref(),
36124            team_id,
36125            self.config.user_agent.as_ref(),
36126            self.config.accept.as_deref(),
36127        )?
36128        .with_authentication(&theScheme)?;
36129
36130        let theRequest = crate::v1_1_4::request::teams_create_discussion_legacy::hyper_request(
36131            theBuilder,
36132            theContent.try_into()?,
36133        )?;
36134
36135        ::log::debug!("HTTP request: {:?}", &theRequest);
36136
36137        let theResponse = self.client.request(theRequest).await?;
36138
36139        ::log::debug!("HTTP response: {:?}", &theResponse);
36140
36141        Ok(theResponse)
36142    }
36143
36144    /// Get a discussion (Legacy)
36145    /// 
36146    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint.
36147    /// 
36148    /// Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
36149    /// 
36150    /// [API method documentation](https://docs.github.com/rest/reference/teams#get-a-discussion-legacy)
36151    pub async fn teams_get_discussion_legacy(
36152        &self,
36153        team_id: i64,
36154        discussion_number: i64,
36155    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
36156        let mut theScheme = AuthScheme::from(&self.config.authentication);
36157
36158        while let Some(auth_step) = theScheme.step()? {
36159            match auth_step {
36160                ::authentic::AuthenticationStep::Request(auth_request) => {
36161                    theScheme.respond(self.client.request(auth_request).await);
36162                }
36163                ::authentic::AuthenticationStep::WaitFor(duration) => {
36164                    (self.sleep)(duration).await;
36165                }
36166            }
36167        }
36168        let theBuilder = crate::v1_1_4::request::teams_get_discussion_legacy::http_builder(
36169            self.config.base_url.as_ref(),
36170            team_id,
36171            discussion_number,
36172            self.config.user_agent.as_ref(),
36173            self.config.accept.as_deref(),
36174        )?
36175        .with_authentication(&theScheme)?;
36176
36177        let theRequest =
36178            crate::v1_1_4::request::teams_get_discussion_legacy::hyper_request(theBuilder)?;
36179
36180        ::log::debug!("HTTP request: {:?}", &theRequest);
36181
36182        let theResponse = self.client.request(theRequest).await?;
36183
36184        ::log::debug!("HTTP response: {:?}", &theResponse);
36185
36186        Ok(theResponse)
36187    }
36188
36189    /// Delete a discussion (Legacy)
36190    /// 
36191    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint.
36192    /// 
36193    /// Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
36194    /// 
36195    /// [API method documentation](https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy)
36196    pub async fn teams_delete_discussion_legacy(
36197        &self,
36198        team_id: i64,
36199        discussion_number: i64,
36200    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
36201        let mut theScheme = AuthScheme::from(&self.config.authentication);
36202
36203        while let Some(auth_step) = theScheme.step()? {
36204            match auth_step {
36205                ::authentic::AuthenticationStep::Request(auth_request) => {
36206                    theScheme.respond(self.client.request(auth_request).await);
36207                }
36208                ::authentic::AuthenticationStep::WaitFor(duration) => {
36209                    (self.sleep)(duration).await;
36210                }
36211            }
36212        }
36213        let theBuilder = crate::v1_1_4::request::teams_delete_discussion_legacy::http_builder(
36214            self.config.base_url.as_ref(),
36215            team_id,
36216            discussion_number,
36217            self.config.user_agent.as_ref(),
36218            self.config.accept.as_deref(),
36219        )?
36220        .with_authentication(&theScheme)?;
36221
36222        let theRequest =
36223            crate::v1_1_4::request::teams_delete_discussion_legacy::hyper_request(theBuilder)?;
36224
36225        ::log::debug!("HTTP request: {:?}", &theRequest);
36226
36227        let theResponse = self.client.request(theRequest).await?;
36228
36229        ::log::debug!("HTTP response: {:?}", &theResponse);
36230
36231        Ok(theResponse)
36232    }
36233
36234    /// Update a discussion (Legacy)
36235    /// 
36236    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) endpoint.
36237    /// 
36238    /// Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
36239    /// 
36240    /// [API method documentation](https://docs.github.com/rest/reference/teams#update-a-discussion-legacy)
36241    ///
36242    /// # Content
36243    ///
36244    /// - [`&v1_1_4::request::teams_update_discussion_legacy::body::Json`](crate::v1_1_4::request::teams_update_discussion_legacy::body::Json)
36245    pub async fn teams_update_discussion_legacy<Content>(
36246        &self,
36247        team_id: i64,
36248        discussion_number: i64,
36249        theContent: Content,
36250    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
36251    where
36252        Content: Copy + TryInto<crate::v1_1_4::request::teams_update_discussion_legacy::Content<::hyper::Body>>,
36253        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_update_discussion_legacy::Content<::hyper::Body>>>::Error>
36254    {
36255        let mut theScheme = AuthScheme::from(&self.config.authentication);
36256
36257        while let Some(auth_step) = theScheme.step()? {
36258            match auth_step {
36259                ::authentic::AuthenticationStep::Request(auth_request) => {
36260                    theScheme.respond(self.client.request(auth_request).await);
36261                }
36262                ::authentic::AuthenticationStep::WaitFor(duration) => {
36263                    (self.sleep)(duration).await;
36264                }
36265            }
36266        }
36267        let theBuilder = crate::v1_1_4::request::teams_update_discussion_legacy::http_builder(
36268            self.config.base_url.as_ref(),
36269            team_id,
36270            discussion_number,
36271            self.config.user_agent.as_ref(),
36272            self.config.accept.as_deref(),
36273        )?
36274        .with_authentication(&theScheme)?;
36275
36276        let theRequest = crate::v1_1_4::request::teams_update_discussion_legacy::hyper_request(
36277            theBuilder,
36278            theContent.try_into()?,
36279        )?;
36280
36281        ::log::debug!("HTTP request: {:?}", &theRequest);
36282
36283        let theResponse = self.client.request(theRequest).await?;
36284
36285        ::log::debug!("HTTP response: {:?}", &theResponse);
36286
36287        Ok(theResponse)
36288    }
36289
36290    /// List discussion comments (Legacy)
36291    /// 
36292    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint.
36293    /// 
36294    /// List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
36295    /// 
36296    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy)
36297    pub async fn teams_list_discussion_comments_legacy(
36298        &self,
36299        team_id: i64,
36300        discussion_number: i64,
36301        direction: ::std::option::Option<&str>,
36302        per_page: ::std::option::Option<i64>,
36303        page: ::std::option::Option<i64>,
36304    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
36305        let mut theScheme = AuthScheme::from(&self.config.authentication);
36306
36307        while let Some(auth_step) = theScheme.step()? {
36308            match auth_step {
36309                ::authentic::AuthenticationStep::Request(auth_request) => {
36310                    theScheme.respond(self.client.request(auth_request).await);
36311                }
36312                ::authentic::AuthenticationStep::WaitFor(duration) => {
36313                    (self.sleep)(duration).await;
36314                }
36315            }
36316        }
36317        let theBuilder = crate::v1_1_4::request::teams_list_discussion_comments_legacy::http_builder(
36318            self.config.base_url.as_ref(),
36319            team_id,
36320            discussion_number,
36321            direction,
36322            per_page,
36323            page,
36324            self.config.user_agent.as_ref(),
36325            self.config.accept.as_deref(),
36326        )?
36327        .with_authentication(&theScheme)?;
36328
36329        let theRequest =
36330            crate::v1_1_4::request::teams_list_discussion_comments_legacy::hyper_request(theBuilder)?;
36331
36332        ::log::debug!("HTTP request: {:?}", &theRequest);
36333
36334        let theResponse = self.client.request(theRequest).await?;
36335
36336        ::log::debug!("HTTP response: {:?}", &theResponse);
36337
36338        Ok(theResponse)
36339    }
36340
36341    /// Create a discussion comment (Legacy)
36342    /// 
36343    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint.
36344    /// 
36345    /// Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
36346    /// 
36347    /// This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.
36348    /// 
36349    /// [API method documentation](https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy)
36350    ///
36351    /// # Content
36352    ///
36353    /// - [`&v1_1_4::request::teams_create_discussion_comment_legacy::body::Json`](crate::v1_1_4::request::teams_create_discussion_comment_legacy::body::Json)
36354    pub async fn teams_create_discussion_comment_legacy<Content>(
36355        &self,
36356        team_id: i64,
36357        discussion_number: i64,
36358        theContent: Content,
36359    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
36360    where
36361        Content: Copy + TryInto<crate::v1_1_4::request::teams_create_discussion_comment_legacy::Content<::hyper::Body>>,
36362        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_create_discussion_comment_legacy::Content<::hyper::Body>>>::Error>
36363    {
36364        let mut theScheme = AuthScheme::from(&self.config.authentication);
36365
36366        while let Some(auth_step) = theScheme.step()? {
36367            match auth_step {
36368                ::authentic::AuthenticationStep::Request(auth_request) => {
36369                    theScheme.respond(self.client.request(auth_request).await);
36370                }
36371                ::authentic::AuthenticationStep::WaitFor(duration) => {
36372                    (self.sleep)(duration).await;
36373                }
36374            }
36375        }
36376        let theBuilder = crate::v1_1_4::request::teams_create_discussion_comment_legacy::http_builder(
36377            self.config.base_url.as_ref(),
36378            team_id,
36379            discussion_number,
36380            self.config.user_agent.as_ref(),
36381            self.config.accept.as_deref(),
36382        )?
36383        .with_authentication(&theScheme)?;
36384
36385        let theRequest = crate::v1_1_4::request::teams_create_discussion_comment_legacy::hyper_request(
36386            theBuilder,
36387            theContent.try_into()?,
36388        )?;
36389
36390        ::log::debug!("HTTP request: {:?}", &theRequest);
36391
36392        let theResponse = self.client.request(theRequest).await?;
36393
36394        ::log::debug!("HTTP response: {:?}", &theResponse);
36395
36396        Ok(theResponse)
36397    }
36398
36399    /// Get a discussion comment (Legacy)
36400    /// 
36401    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint.
36402    /// 
36403    /// Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
36404    /// 
36405    /// [API method documentation](https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy)
36406    pub async fn teams_get_discussion_comment_legacy(
36407        &self,
36408        team_id: i64,
36409        discussion_number: i64,
36410        comment_number: i64,
36411    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
36412        let mut theScheme = AuthScheme::from(&self.config.authentication);
36413
36414        while let Some(auth_step) = theScheme.step()? {
36415            match auth_step {
36416                ::authentic::AuthenticationStep::Request(auth_request) => {
36417                    theScheme.respond(self.client.request(auth_request).await);
36418                }
36419                ::authentic::AuthenticationStep::WaitFor(duration) => {
36420                    (self.sleep)(duration).await;
36421                }
36422            }
36423        }
36424        let theBuilder = crate::v1_1_4::request::teams_get_discussion_comment_legacy::http_builder(
36425            self.config.base_url.as_ref(),
36426            team_id,
36427            discussion_number,
36428            comment_number,
36429            self.config.user_agent.as_ref(),
36430            self.config.accept.as_deref(),
36431        )?
36432        .with_authentication(&theScheme)?;
36433
36434        let theRequest =
36435            crate::v1_1_4::request::teams_get_discussion_comment_legacy::hyper_request(theBuilder)?;
36436
36437        ::log::debug!("HTTP request: {:?}", &theRequest);
36438
36439        let theResponse = self.client.request(theRequest).await?;
36440
36441        ::log::debug!("HTTP response: {:?}", &theResponse);
36442
36443        Ok(theResponse)
36444    }
36445
36446    /// Delete a discussion comment (Legacy)
36447    /// 
36448    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint.
36449    /// 
36450    /// Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
36451    /// 
36452    /// [API method documentation](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy)
36453    pub async fn teams_delete_discussion_comment_legacy(
36454        &self,
36455        team_id: i64,
36456        discussion_number: i64,
36457        comment_number: i64,
36458    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
36459        let mut theScheme = AuthScheme::from(&self.config.authentication);
36460
36461        while let Some(auth_step) = theScheme.step()? {
36462            match auth_step {
36463                ::authentic::AuthenticationStep::Request(auth_request) => {
36464                    theScheme.respond(self.client.request(auth_request).await);
36465                }
36466                ::authentic::AuthenticationStep::WaitFor(duration) => {
36467                    (self.sleep)(duration).await;
36468                }
36469            }
36470        }
36471        let theBuilder = crate::v1_1_4::request::teams_delete_discussion_comment_legacy::http_builder(
36472            self.config.base_url.as_ref(),
36473            team_id,
36474            discussion_number,
36475            comment_number,
36476            self.config.user_agent.as_ref(),
36477            self.config.accept.as_deref(),
36478        )?
36479        .with_authentication(&theScheme)?;
36480
36481        let theRequest =
36482            crate::v1_1_4::request::teams_delete_discussion_comment_legacy::hyper_request(theBuilder)?;
36483
36484        ::log::debug!("HTTP request: {:?}", &theRequest);
36485
36486        let theResponse = self.client.request(theRequest).await?;
36487
36488        ::log::debug!("HTTP response: {:?}", &theResponse);
36489
36490        Ok(theResponse)
36491    }
36492
36493    /// Update a discussion comment (Legacy)
36494    /// 
36495    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint.
36496    /// 
36497    /// Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
36498    /// 
36499    /// [API method documentation](https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy)
36500    ///
36501    /// # Content
36502    ///
36503    /// - [`&v1_1_4::request::teams_update_discussion_comment_legacy::body::Json`](crate::v1_1_4::request::teams_update_discussion_comment_legacy::body::Json)
36504    pub async fn teams_update_discussion_comment_legacy<Content>(
36505        &self,
36506        team_id: i64,
36507        discussion_number: i64,
36508        comment_number: i64,
36509        theContent: Content,
36510    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
36511    where
36512        Content: Copy + TryInto<crate::v1_1_4::request::teams_update_discussion_comment_legacy::Content<::hyper::Body>>,
36513        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_update_discussion_comment_legacy::Content<::hyper::Body>>>::Error>
36514    {
36515        let mut theScheme = AuthScheme::from(&self.config.authentication);
36516
36517        while let Some(auth_step) = theScheme.step()? {
36518            match auth_step {
36519                ::authentic::AuthenticationStep::Request(auth_request) => {
36520                    theScheme.respond(self.client.request(auth_request).await);
36521                }
36522                ::authentic::AuthenticationStep::WaitFor(duration) => {
36523                    (self.sleep)(duration).await;
36524                }
36525            }
36526        }
36527        let theBuilder = crate::v1_1_4::request::teams_update_discussion_comment_legacy::http_builder(
36528            self.config.base_url.as_ref(),
36529            team_id,
36530            discussion_number,
36531            comment_number,
36532            self.config.user_agent.as_ref(),
36533            self.config.accept.as_deref(),
36534        )?
36535        .with_authentication(&theScheme)?;
36536
36537        let theRequest = crate::v1_1_4::request::teams_update_discussion_comment_legacy::hyper_request(
36538            theBuilder,
36539            theContent.try_into()?,
36540        )?;
36541
36542        ::log::debug!("HTTP request: {:?}", &theRequest);
36543
36544        let theResponse = self.client.request(theRequest).await?;
36545
36546        ::log::debug!("HTTP response: {:?}", &theResponse);
36547
36548        Ok(theResponse)
36549    }
36550
36551    /// List reactions for a team discussion comment (Legacy)
36552    /// 
36553    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint.
36554    /// 
36555    /// List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
36556    /// 
36557    /// [API method documentation](https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy)
36558    pub async fn reactions_list_for_team_discussion_comment_legacy(
36559        &self,
36560        team_id: i64,
36561        discussion_number: i64,
36562        comment_number: i64,
36563        content: ::std::option::Option<&str>,
36564        per_page: ::std::option::Option<i64>,
36565        page: ::std::option::Option<i64>,
36566    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
36567        let mut theScheme = AuthScheme::from(&self.config.authentication);
36568
36569        while let Some(auth_step) = theScheme.step()? {
36570            match auth_step {
36571                ::authentic::AuthenticationStep::Request(auth_request) => {
36572                    theScheme.respond(self.client.request(auth_request).await);
36573                }
36574                ::authentic::AuthenticationStep::WaitFor(duration) => {
36575                    (self.sleep)(duration).await;
36576                }
36577            }
36578        }
36579        let theBuilder = crate::v1_1_4::request::reactions_list_for_team_discussion_comment_legacy::http_builder(
36580            self.config.base_url.as_ref(),
36581            team_id,
36582            discussion_number,
36583            comment_number,
36584            content,
36585            per_page,
36586            page,
36587            self.config.user_agent.as_ref(),
36588            self.config.accept.as_deref(),
36589        )?
36590        .with_authentication(&theScheme)?;
36591
36592        let theRequest =
36593            crate::v1_1_4::request::reactions_list_for_team_discussion_comment_legacy::hyper_request(theBuilder)?;
36594
36595        ::log::debug!("HTTP request: {:?}", &theRequest);
36596
36597        let theResponse = self.client.request(theRequest).await?;
36598
36599        ::log::debug!("HTTP response: {:?}", &theResponse);
36600
36601        Ok(theResponse)
36602    }
36603
36604    /// Create reaction for a team discussion comment (Legacy)
36605    /// 
36606    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint.
36607    /// 
36608    /// Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment.
36609    /// 
36610    /// [API method documentation](https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy)
36611    ///
36612    /// # Content
36613    ///
36614    /// - [`&v1_1_4::request::reactions_create_for_team_discussion_comment_legacy::body::Json`](crate::v1_1_4::request::reactions_create_for_team_discussion_comment_legacy::body::Json)
36615    pub async fn reactions_create_for_team_discussion_comment_legacy<Content>(
36616        &self,
36617        team_id: i64,
36618        discussion_number: i64,
36619        comment_number: i64,
36620        theContent: Content,
36621    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
36622    where
36623        Content: Copy + TryInto<crate::v1_1_4::request::reactions_create_for_team_discussion_comment_legacy::Content<::hyper::Body>>,
36624        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::reactions_create_for_team_discussion_comment_legacy::Content<::hyper::Body>>>::Error>
36625    {
36626        let mut theScheme = AuthScheme::from(&self.config.authentication);
36627
36628        while let Some(auth_step) = theScheme.step()? {
36629            match auth_step {
36630                ::authentic::AuthenticationStep::Request(auth_request) => {
36631                    theScheme.respond(self.client.request(auth_request).await);
36632                }
36633                ::authentic::AuthenticationStep::WaitFor(duration) => {
36634                    (self.sleep)(duration).await;
36635                }
36636            }
36637        }
36638        let theBuilder = crate::v1_1_4::request::reactions_create_for_team_discussion_comment_legacy::http_builder(
36639            self.config.base_url.as_ref(),
36640            team_id,
36641            discussion_number,
36642            comment_number,
36643            self.config.user_agent.as_ref(),
36644            self.config.accept.as_deref(),
36645        )?
36646        .with_authentication(&theScheme)?;
36647
36648        let theRequest = crate::v1_1_4::request::reactions_create_for_team_discussion_comment_legacy::hyper_request(
36649            theBuilder,
36650            theContent.try_into()?,
36651        )?;
36652
36653        ::log::debug!("HTTP request: {:?}", &theRequest);
36654
36655        let theResponse = self.client.request(theRequest).await?;
36656
36657        ::log::debug!("HTTP response: {:?}", &theResponse);
36658
36659        Ok(theResponse)
36660    }
36661
36662    /// List reactions for a team discussion (Legacy)
36663    /// 
36664    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint.
36665    /// 
36666    /// List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
36667    /// 
36668    /// [API method documentation](https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy)
36669    pub async fn reactions_list_for_team_discussion_legacy(
36670        &self,
36671        team_id: i64,
36672        discussion_number: i64,
36673        content: ::std::option::Option<&str>,
36674        per_page: ::std::option::Option<i64>,
36675        page: ::std::option::Option<i64>,
36676    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
36677        let mut theScheme = AuthScheme::from(&self.config.authentication);
36678
36679        while let Some(auth_step) = theScheme.step()? {
36680            match auth_step {
36681                ::authentic::AuthenticationStep::Request(auth_request) => {
36682                    theScheme.respond(self.client.request(auth_request).await);
36683                }
36684                ::authentic::AuthenticationStep::WaitFor(duration) => {
36685                    (self.sleep)(duration).await;
36686                }
36687            }
36688        }
36689        let theBuilder = crate::v1_1_4::request::reactions_list_for_team_discussion_legacy::http_builder(
36690            self.config.base_url.as_ref(),
36691            team_id,
36692            discussion_number,
36693            content,
36694            per_page,
36695            page,
36696            self.config.user_agent.as_ref(),
36697            self.config.accept.as_deref(),
36698        )?
36699        .with_authentication(&theScheme)?;
36700
36701        let theRequest =
36702            crate::v1_1_4::request::reactions_list_for_team_discussion_legacy::hyper_request(theBuilder)?;
36703
36704        ::log::debug!("HTTP request: {:?}", &theRequest);
36705
36706        let theResponse = self.client.request(theRequest).await?;
36707
36708        ::log::debug!("HTTP response: {:?}", &theResponse);
36709
36710        Ok(theResponse)
36711    }
36712
36713    /// Create reaction for a team discussion (Legacy)
36714    /// 
36715    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint.
36716    /// 
36717    /// Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion.
36718    /// 
36719    /// [API method documentation](https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy)
36720    ///
36721    /// # Content
36722    ///
36723    /// - [`&v1_1_4::request::reactions_create_for_team_discussion_legacy::body::Json`](crate::v1_1_4::request::reactions_create_for_team_discussion_legacy::body::Json)
36724    pub async fn reactions_create_for_team_discussion_legacy<Content>(
36725        &self,
36726        team_id: i64,
36727        discussion_number: i64,
36728        theContent: Content,
36729    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
36730    where
36731        Content: Copy + TryInto<crate::v1_1_4::request::reactions_create_for_team_discussion_legacy::Content<::hyper::Body>>,
36732        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::reactions_create_for_team_discussion_legacy::Content<::hyper::Body>>>::Error>
36733    {
36734        let mut theScheme = AuthScheme::from(&self.config.authentication);
36735
36736        while let Some(auth_step) = theScheme.step()? {
36737            match auth_step {
36738                ::authentic::AuthenticationStep::Request(auth_request) => {
36739                    theScheme.respond(self.client.request(auth_request).await);
36740                }
36741                ::authentic::AuthenticationStep::WaitFor(duration) => {
36742                    (self.sleep)(duration).await;
36743                }
36744            }
36745        }
36746        let theBuilder = crate::v1_1_4::request::reactions_create_for_team_discussion_legacy::http_builder(
36747            self.config.base_url.as_ref(),
36748            team_id,
36749            discussion_number,
36750            self.config.user_agent.as_ref(),
36751            self.config.accept.as_deref(),
36752        )?
36753        .with_authentication(&theScheme)?;
36754
36755        let theRequest = crate::v1_1_4::request::reactions_create_for_team_discussion_legacy::hyper_request(
36756            theBuilder,
36757            theContent.try_into()?,
36758        )?;
36759
36760        ::log::debug!("HTTP request: {:?}", &theRequest);
36761
36762        let theResponse = self.client.request(theRequest).await?;
36763
36764        ::log::debug!("HTTP response: {:?}", &theResponse);
36765
36766        Ok(theResponse)
36767    }
36768
36769    /// List pending team invitations (Legacy)
36770    /// 
36771    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint.
36772    /// 
36773    /// The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.
36774    /// 
36775    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy)
36776    pub async fn teams_list_pending_invitations_legacy(
36777        &self,
36778        team_id: i64,
36779        per_page: ::std::option::Option<i64>,
36780        page: ::std::option::Option<i64>,
36781    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
36782        let mut theScheme = AuthScheme::from(&self.config.authentication);
36783
36784        while let Some(auth_step) = theScheme.step()? {
36785            match auth_step {
36786                ::authentic::AuthenticationStep::Request(auth_request) => {
36787                    theScheme.respond(self.client.request(auth_request).await);
36788                }
36789                ::authentic::AuthenticationStep::WaitFor(duration) => {
36790                    (self.sleep)(duration).await;
36791                }
36792            }
36793        }
36794        let theBuilder = crate::v1_1_4::request::teams_list_pending_invitations_legacy::http_builder(
36795            self.config.base_url.as_ref(),
36796            team_id,
36797            per_page,
36798            page,
36799            self.config.user_agent.as_ref(),
36800            self.config.accept.as_deref(),
36801        )?
36802        .with_authentication(&theScheme)?;
36803
36804        let theRequest =
36805            crate::v1_1_4::request::teams_list_pending_invitations_legacy::hyper_request(theBuilder)?;
36806
36807        ::log::debug!("HTTP request: {:?}", &theRequest);
36808
36809        let theResponse = self.client.request(theRequest).await?;
36810
36811        ::log::debug!("HTTP response: {:?}", &theResponse);
36812
36813        Ok(theResponse)
36814    }
36815
36816    /// List team members (Legacy)
36817    /// 
36818    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint.
36819    /// 
36820    /// Team members will include the members of child teams.
36821    /// 
36822    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-team-members-legacy)
36823    pub async fn teams_list_members_legacy(
36824        &self,
36825        team_id: i64,
36826        role: ::std::option::Option<&str>,
36827        per_page: ::std::option::Option<i64>,
36828        page: ::std::option::Option<i64>,
36829    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
36830        let mut theScheme = AuthScheme::from(&self.config.authentication);
36831
36832        while let Some(auth_step) = theScheme.step()? {
36833            match auth_step {
36834                ::authentic::AuthenticationStep::Request(auth_request) => {
36835                    theScheme.respond(self.client.request(auth_request).await);
36836                }
36837                ::authentic::AuthenticationStep::WaitFor(duration) => {
36838                    (self.sleep)(duration).await;
36839                }
36840            }
36841        }
36842        let theBuilder = crate::v1_1_4::request::teams_list_members_legacy::http_builder(
36843            self.config.base_url.as_ref(),
36844            team_id,
36845            role,
36846            per_page,
36847            page,
36848            self.config.user_agent.as_ref(),
36849            self.config.accept.as_deref(),
36850        )?
36851        .with_authentication(&theScheme)?;
36852
36853        let theRequest =
36854            crate::v1_1_4::request::teams_list_members_legacy::hyper_request(theBuilder)?;
36855
36856        ::log::debug!("HTTP request: {:?}", &theRequest);
36857
36858        let theResponse = self.client.request(theRequest).await?;
36859
36860        ::log::debug!("HTTP response: {:?}", &theResponse);
36861
36862        Ok(theResponse)
36863    }
36864
36865    /// Get team member (Legacy)
36866    /// 
36867    /// The "Get team member" endpoint (described below) is deprecated.
36868    /// 
36869    /// We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships.
36870    /// 
36871    /// To list members in a team, the team must be visible to the authenticated user.
36872    /// 
36873    /// [API method documentation](https://docs.github.com/rest/reference/teams#get-team-member-legacy)
36874    pub async fn teams_get_member_legacy(
36875        &self,
36876        team_id: i64,
36877        username: &str,
36878    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
36879        let mut theScheme = AuthScheme::from(&self.config.authentication);
36880
36881        while let Some(auth_step) = theScheme.step()? {
36882            match auth_step {
36883                ::authentic::AuthenticationStep::Request(auth_request) => {
36884                    theScheme.respond(self.client.request(auth_request).await);
36885                }
36886                ::authentic::AuthenticationStep::WaitFor(duration) => {
36887                    (self.sleep)(duration).await;
36888                }
36889            }
36890        }
36891        let theBuilder = crate::v1_1_4::request::teams_get_member_legacy::http_builder(
36892            self.config.base_url.as_ref(),
36893            team_id,
36894            username,
36895            self.config.user_agent.as_ref(),
36896            self.config.accept.as_deref(),
36897        )?
36898        .with_authentication(&theScheme)?;
36899
36900        let theRequest =
36901            crate::v1_1_4::request::teams_get_member_legacy::hyper_request(theBuilder)?;
36902
36903        ::log::debug!("HTTP request: {:?}", &theRequest);
36904
36905        let theResponse = self.client.request(theRequest).await?;
36906
36907        ::log::debug!("HTTP response: {:?}", &theResponse);
36908
36909        Ok(theResponse)
36910    }
36911
36912    /// Add team member (Legacy)
36913    /// 
36914    /// The "Add team member" endpoint (described below) is deprecated.
36915    /// 
36916    /// We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams.
36917    /// 
36918    /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
36919    /// 
36920    /// To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization.
36921    /// 
36922    /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
36923    /// 
36924    /// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
36925    /// 
36926    /// [API method documentation](https://docs.github.com/rest/reference/teams#add-team-member-legacy)
36927    pub async fn teams_add_member_legacy(
36928        &self,
36929        team_id: i64,
36930        username: &str,
36931    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
36932        let mut theScheme = AuthScheme::from(&self.config.authentication);
36933
36934        while let Some(auth_step) = theScheme.step()? {
36935            match auth_step {
36936                ::authentic::AuthenticationStep::Request(auth_request) => {
36937                    theScheme.respond(self.client.request(auth_request).await);
36938                }
36939                ::authentic::AuthenticationStep::WaitFor(duration) => {
36940                    (self.sleep)(duration).await;
36941                }
36942            }
36943        }
36944        let theBuilder = crate::v1_1_4::request::teams_add_member_legacy::http_builder(
36945            self.config.base_url.as_ref(),
36946            team_id,
36947            username,
36948            self.config.user_agent.as_ref(),
36949            self.config.accept.as_deref(),
36950        )?
36951        .with_authentication(&theScheme)?;
36952
36953        let theRequest =
36954            crate::v1_1_4::request::teams_add_member_legacy::hyper_request(theBuilder)?;
36955
36956        ::log::debug!("HTTP request: {:?}", &theRequest);
36957
36958        let theResponse = self.client.request(theRequest).await?;
36959
36960        ::log::debug!("HTTP response: {:?}", &theResponse);
36961
36962        Ok(theResponse)
36963    }
36964
36965    /// Remove team member (Legacy)
36966    /// 
36967    /// The "Remove team member" endpoint (described below) is deprecated.
36968    /// 
36969    /// We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships.
36970    /// 
36971    /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
36972    /// 
36973    /// To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team.
36974    /// 
36975    /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
36976    /// 
36977    /// [API method documentation](https://docs.github.com/rest/reference/teams#remove-team-member-legacy)
36978    pub async fn teams_remove_member_legacy(
36979        &self,
36980        team_id: i64,
36981        username: &str,
36982    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
36983        let mut theScheme = AuthScheme::from(&self.config.authentication);
36984
36985        while let Some(auth_step) = theScheme.step()? {
36986            match auth_step {
36987                ::authentic::AuthenticationStep::Request(auth_request) => {
36988                    theScheme.respond(self.client.request(auth_request).await);
36989                }
36990                ::authentic::AuthenticationStep::WaitFor(duration) => {
36991                    (self.sleep)(duration).await;
36992                }
36993            }
36994        }
36995        let theBuilder = crate::v1_1_4::request::teams_remove_member_legacy::http_builder(
36996            self.config.base_url.as_ref(),
36997            team_id,
36998            username,
36999            self.config.user_agent.as_ref(),
37000            self.config.accept.as_deref(),
37001        )?
37002        .with_authentication(&theScheme)?;
37003
37004        let theRequest =
37005            crate::v1_1_4::request::teams_remove_member_legacy::hyper_request(theBuilder)?;
37006
37007        ::log::debug!("HTTP request: {:?}", &theRequest);
37008
37009        let theResponse = self.client.request(theRequest).await?;
37010
37011        ::log::debug!("HTTP response: {:?}", &theResponse);
37012
37013        Ok(theResponse)
37014    }
37015
37016    /// Get team membership for a user (Legacy)
37017    /// 
37018    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint.
37019    /// 
37020    /// Team members will include the members of child teams.
37021    /// 
37022    /// To get a user's membership with a team, the team must be visible to the authenticated user.
37023    /// 
37024    /// **Note:**
37025    /// The response contains the `state` of the membership and the member's `role`.
37026    /// 
37027    /// The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team).
37028    /// 
37029    /// [API method documentation](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy)
37030    pub async fn teams_get_membership_for_user_legacy(
37031        &self,
37032        team_id: i64,
37033        username: &str,
37034    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37035        let mut theScheme = AuthScheme::from(&self.config.authentication);
37036
37037        while let Some(auth_step) = theScheme.step()? {
37038            match auth_step {
37039                ::authentic::AuthenticationStep::Request(auth_request) => {
37040                    theScheme.respond(self.client.request(auth_request).await);
37041                }
37042                ::authentic::AuthenticationStep::WaitFor(duration) => {
37043                    (self.sleep)(duration).await;
37044                }
37045            }
37046        }
37047        let theBuilder = crate::v1_1_4::request::teams_get_membership_for_user_legacy::http_builder(
37048            self.config.base_url.as_ref(),
37049            team_id,
37050            username,
37051            self.config.user_agent.as_ref(),
37052            self.config.accept.as_deref(),
37053        )?
37054        .with_authentication(&theScheme)?;
37055
37056        let theRequest =
37057            crate::v1_1_4::request::teams_get_membership_for_user_legacy::hyper_request(theBuilder)?;
37058
37059        ::log::debug!("HTTP request: {:?}", &theRequest);
37060
37061        let theResponse = self.client.request(theRequest).await?;
37062
37063        ::log::debug!("HTTP response: {:?}", &theResponse);
37064
37065        Ok(theResponse)
37066    }
37067
37068    /// Add or update team membership for a user (Legacy)
37069    /// 
37070    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint.
37071    /// 
37072    /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
37073    /// 
37074    /// If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer.
37075    /// 
37076    /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
37077    /// 
37078    /// If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner.
37079    /// 
37080    /// If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.
37081    /// 
37082    /// [API method documentation](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy)
37083    ///
37084    /// # Content
37085    ///
37086    /// - [`&v1_1_4::request::teams_add_or_update_membership_for_user_legacy::body::Json`](crate::v1_1_4::request::teams_add_or_update_membership_for_user_legacy::body::Json)
37087    pub async fn teams_add_or_update_membership_for_user_legacy<Content>(
37088        &self,
37089        team_id: i64,
37090        username: &str,
37091        theContent: Content,
37092    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
37093    where
37094        Content: Copy + TryInto<crate::v1_1_4::request::teams_add_or_update_membership_for_user_legacy::Content<::hyper::Body>>,
37095        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_add_or_update_membership_for_user_legacy::Content<::hyper::Body>>>::Error>
37096    {
37097        let mut theScheme = AuthScheme::from(&self.config.authentication);
37098
37099        while let Some(auth_step) = theScheme.step()? {
37100            match auth_step {
37101                ::authentic::AuthenticationStep::Request(auth_request) => {
37102                    theScheme.respond(self.client.request(auth_request).await);
37103                }
37104                ::authentic::AuthenticationStep::WaitFor(duration) => {
37105                    (self.sleep)(duration).await;
37106                }
37107            }
37108        }
37109        let theBuilder = crate::v1_1_4::request::teams_add_or_update_membership_for_user_legacy::http_builder(
37110            self.config.base_url.as_ref(),
37111            team_id,
37112            username,
37113            self.config.user_agent.as_ref(),
37114            self.config.accept.as_deref(),
37115        )?
37116        .with_authentication(&theScheme)?;
37117
37118        let theRequest = crate::v1_1_4::request::teams_add_or_update_membership_for_user_legacy::hyper_request(
37119            theBuilder,
37120            theContent.try_into()?,
37121        )?;
37122
37123        ::log::debug!("HTTP request: {:?}", &theRequest);
37124
37125        let theResponse = self.client.request(theRequest).await?;
37126
37127        ::log::debug!("HTTP response: {:?}", &theResponse);
37128
37129        Ok(theResponse)
37130    }
37131
37132    /// Remove team membership for a user (Legacy)
37133    /// 
37134    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint.
37135    /// 
37136    /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
37137    /// 
37138    /// To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.
37139    /// 
37140    /// **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."
37141    /// 
37142    /// [API method documentation](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy)
37143    pub async fn teams_remove_membership_for_user_legacy(
37144        &self,
37145        team_id: i64,
37146        username: &str,
37147    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37148        let mut theScheme = AuthScheme::from(&self.config.authentication);
37149
37150        while let Some(auth_step) = theScheme.step()? {
37151            match auth_step {
37152                ::authentic::AuthenticationStep::Request(auth_request) => {
37153                    theScheme.respond(self.client.request(auth_request).await);
37154                }
37155                ::authentic::AuthenticationStep::WaitFor(duration) => {
37156                    (self.sleep)(duration).await;
37157                }
37158            }
37159        }
37160        let theBuilder = crate::v1_1_4::request::teams_remove_membership_for_user_legacy::http_builder(
37161            self.config.base_url.as_ref(),
37162            team_id,
37163            username,
37164            self.config.user_agent.as_ref(),
37165            self.config.accept.as_deref(),
37166        )?
37167        .with_authentication(&theScheme)?;
37168
37169        let theRequest =
37170            crate::v1_1_4::request::teams_remove_membership_for_user_legacy::hyper_request(theBuilder)?;
37171
37172        ::log::debug!("HTTP request: {:?}", &theRequest);
37173
37174        let theResponse = self.client.request(theRequest).await?;
37175
37176        ::log::debug!("HTTP response: {:?}", &theResponse);
37177
37178        Ok(theResponse)
37179    }
37180
37181    /// List team projects (Legacy)
37182    /// 
37183    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint.
37184    /// 
37185    /// Lists the organization projects for a team.
37186    /// 
37187    /// [API method documentation](https://docs.github.com/rest/reference/teams/#list-team-projects-legacy)
37188    pub async fn teams_list_projects_legacy(
37189        &self,
37190        team_id: i64,
37191        per_page: ::std::option::Option<i64>,
37192        page: ::std::option::Option<i64>,
37193    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37194        let mut theScheme = AuthScheme::from(&self.config.authentication);
37195
37196        while let Some(auth_step) = theScheme.step()? {
37197            match auth_step {
37198                ::authentic::AuthenticationStep::Request(auth_request) => {
37199                    theScheme.respond(self.client.request(auth_request).await);
37200                }
37201                ::authentic::AuthenticationStep::WaitFor(duration) => {
37202                    (self.sleep)(duration).await;
37203                }
37204            }
37205        }
37206        let theBuilder = crate::v1_1_4::request::teams_list_projects_legacy::http_builder(
37207            self.config.base_url.as_ref(),
37208            team_id,
37209            per_page,
37210            page,
37211            self.config.user_agent.as_ref(),
37212            self.config.accept.as_deref(),
37213        )?
37214        .with_authentication(&theScheme)?;
37215
37216        let theRequest =
37217            crate::v1_1_4::request::teams_list_projects_legacy::hyper_request(theBuilder)?;
37218
37219        ::log::debug!("HTTP request: {:?}", &theRequest);
37220
37221        let theResponse = self.client.request(theRequest).await?;
37222
37223        ::log::debug!("HTTP response: {:?}", &theResponse);
37224
37225        Ok(theResponse)
37226    }
37227
37228    /// Check team permissions for a project (Legacy)
37229    /// 
37230    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint.
37231    /// 
37232    /// Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.
37233    /// 
37234    /// [API method documentation](https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy)
37235    pub async fn teams_check_permissions_for_project_legacy(
37236        &self,
37237        team_id: i64,
37238        project_id: i64,
37239    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37240        let mut theScheme = AuthScheme::from(&self.config.authentication);
37241
37242        while let Some(auth_step) = theScheme.step()? {
37243            match auth_step {
37244                ::authentic::AuthenticationStep::Request(auth_request) => {
37245                    theScheme.respond(self.client.request(auth_request).await);
37246                }
37247                ::authentic::AuthenticationStep::WaitFor(duration) => {
37248                    (self.sleep)(duration).await;
37249                }
37250            }
37251        }
37252        let theBuilder = crate::v1_1_4::request::teams_check_permissions_for_project_legacy::http_builder(
37253            self.config.base_url.as_ref(),
37254            team_id,
37255            project_id,
37256            self.config.user_agent.as_ref(),
37257            self.config.accept.as_deref(),
37258        )?
37259        .with_authentication(&theScheme)?;
37260
37261        let theRequest =
37262            crate::v1_1_4::request::teams_check_permissions_for_project_legacy::hyper_request(theBuilder)?;
37263
37264        ::log::debug!("HTTP request: {:?}", &theRequest);
37265
37266        let theResponse = self.client.request(theRequest).await?;
37267
37268        ::log::debug!("HTTP response: {:?}", &theResponse);
37269
37270        Ok(theResponse)
37271    }
37272
37273    /// Add or update team project permissions (Legacy)
37274    /// 
37275    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint.
37276    /// 
37277    /// Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.
37278    /// 
37279    /// [API method documentation](https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy)
37280    ///
37281    /// # Content
37282    ///
37283    /// - [`&v1_1_4::request::teams_add_or_update_project_permissions_legacy::body::Json`](crate::v1_1_4::request::teams_add_or_update_project_permissions_legacy::body::Json)
37284    pub async fn teams_add_or_update_project_permissions_legacy<Content>(
37285        &self,
37286        team_id: i64,
37287        project_id: i64,
37288        theContent: Content,
37289    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
37290    where
37291        Content: Copy + TryInto<crate::v1_1_4::request::teams_add_or_update_project_permissions_legacy::Content<::hyper::Body>>,
37292        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_add_or_update_project_permissions_legacy::Content<::hyper::Body>>>::Error>
37293    {
37294        let mut theScheme = AuthScheme::from(&self.config.authentication);
37295
37296        while let Some(auth_step) = theScheme.step()? {
37297            match auth_step {
37298                ::authentic::AuthenticationStep::Request(auth_request) => {
37299                    theScheme.respond(self.client.request(auth_request).await);
37300                }
37301                ::authentic::AuthenticationStep::WaitFor(duration) => {
37302                    (self.sleep)(duration).await;
37303                }
37304            }
37305        }
37306        let theBuilder = crate::v1_1_4::request::teams_add_or_update_project_permissions_legacy::http_builder(
37307            self.config.base_url.as_ref(),
37308            team_id,
37309            project_id,
37310            self.config.user_agent.as_ref(),
37311            self.config.accept.as_deref(),
37312        )?
37313        .with_authentication(&theScheme)?;
37314
37315        let theRequest = crate::v1_1_4::request::teams_add_or_update_project_permissions_legacy::hyper_request(
37316            theBuilder,
37317            theContent.try_into()?,
37318        )?;
37319
37320        ::log::debug!("HTTP request: {:?}", &theRequest);
37321
37322        let theResponse = self.client.request(theRequest).await?;
37323
37324        ::log::debug!("HTTP response: {:?}", &theResponse);
37325
37326        Ok(theResponse)
37327    }
37328
37329    /// Remove a project from a team (Legacy)
37330    /// 
37331    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) endpoint.
37332    /// 
37333    /// Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it.
37334    /// 
37335    /// [API method documentation](https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy)
37336    pub async fn teams_remove_project_legacy(
37337        &self,
37338        team_id: i64,
37339        project_id: i64,
37340    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37341        let mut theScheme = AuthScheme::from(&self.config.authentication);
37342
37343        while let Some(auth_step) = theScheme.step()? {
37344            match auth_step {
37345                ::authentic::AuthenticationStep::Request(auth_request) => {
37346                    theScheme.respond(self.client.request(auth_request).await);
37347                }
37348                ::authentic::AuthenticationStep::WaitFor(duration) => {
37349                    (self.sleep)(duration).await;
37350                }
37351            }
37352        }
37353        let theBuilder = crate::v1_1_4::request::teams_remove_project_legacy::http_builder(
37354            self.config.base_url.as_ref(),
37355            team_id,
37356            project_id,
37357            self.config.user_agent.as_ref(),
37358            self.config.accept.as_deref(),
37359        )?
37360        .with_authentication(&theScheme)?;
37361
37362        let theRequest =
37363            crate::v1_1_4::request::teams_remove_project_legacy::hyper_request(theBuilder)?;
37364
37365        ::log::debug!("HTTP request: {:?}", &theRequest);
37366
37367        let theResponse = self.client.request(theRequest).await?;
37368
37369        ::log::debug!("HTTP response: {:?}", &theResponse);
37370
37371        Ok(theResponse)
37372    }
37373
37374    /// List team repositories (Legacy)
37375    /// 
37376    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint.
37377    /// 
37378    /// [API method documentation](https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy)
37379    pub async fn teams_list_repos_legacy(
37380        &self,
37381        team_id: i64,
37382        per_page: ::std::option::Option<i64>,
37383        page: ::std::option::Option<i64>,
37384    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37385        let mut theScheme = AuthScheme::from(&self.config.authentication);
37386
37387        while let Some(auth_step) = theScheme.step()? {
37388            match auth_step {
37389                ::authentic::AuthenticationStep::Request(auth_request) => {
37390                    theScheme.respond(self.client.request(auth_request).await);
37391                }
37392                ::authentic::AuthenticationStep::WaitFor(duration) => {
37393                    (self.sleep)(duration).await;
37394                }
37395            }
37396        }
37397        let theBuilder = crate::v1_1_4::request::teams_list_repos_legacy::http_builder(
37398            self.config.base_url.as_ref(),
37399            team_id,
37400            per_page,
37401            page,
37402            self.config.user_agent.as_ref(),
37403            self.config.accept.as_deref(),
37404        )?
37405        .with_authentication(&theScheme)?;
37406
37407        let theRequest =
37408            crate::v1_1_4::request::teams_list_repos_legacy::hyper_request(theBuilder)?;
37409
37410        ::log::debug!("HTTP request: {:?}", &theRequest);
37411
37412        let theResponse = self.client.request(theRequest).await?;
37413
37414        ::log::debug!("HTTP response: {:?}", &theResponse);
37415
37416        Ok(theResponse)
37417    }
37418
37419    /// Check team permissions for a repository (Legacy)
37420    /// 
37421    /// **Note**: Repositories inherited through a parent team will also be checked.
37422    /// 
37423    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint.
37424    /// 
37425    /// You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:
37426    /// 
37427    /// [API method documentation](https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy)
37428    pub async fn teams_check_permissions_for_repo_legacy(
37429        &self,
37430        team_id: i64,
37431        owner: &str,
37432        repo: &str,
37433    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37434        let mut theScheme = AuthScheme::from(&self.config.authentication);
37435
37436        while let Some(auth_step) = theScheme.step()? {
37437            match auth_step {
37438                ::authentic::AuthenticationStep::Request(auth_request) => {
37439                    theScheme.respond(self.client.request(auth_request).await);
37440                }
37441                ::authentic::AuthenticationStep::WaitFor(duration) => {
37442                    (self.sleep)(duration).await;
37443                }
37444            }
37445        }
37446        let theBuilder = crate::v1_1_4::request::teams_check_permissions_for_repo_legacy::http_builder(
37447            self.config.base_url.as_ref(),
37448            team_id,
37449            owner,
37450            repo,
37451            self.config.user_agent.as_ref(),
37452            self.config.accept.as_deref(),
37453        )?
37454        .with_authentication(&theScheme)?;
37455
37456        let theRequest =
37457            crate::v1_1_4::request::teams_check_permissions_for_repo_legacy::hyper_request(theBuilder)?;
37458
37459        ::log::debug!("HTTP request: {:?}", &theRequest);
37460
37461        let theResponse = self.client.request(theRequest).await?;
37462
37463        ::log::debug!("HTTP response: {:?}", &theResponse);
37464
37465        Ok(theResponse)
37466    }
37467
37468    /// Add or update team repository permissions (Legacy)
37469    /// 
37470    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint.
37471    /// 
37472    /// To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization.
37473    /// 
37474    /// Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
37475    /// 
37476    /// [API method documentation](https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions-legacy)
37477    ///
37478    /// # Content
37479    ///
37480    /// - [`&v1_1_4::request::teams_add_or_update_repo_permissions_legacy::body::Json`](crate::v1_1_4::request::teams_add_or_update_repo_permissions_legacy::body::Json)
37481    pub async fn teams_add_or_update_repo_permissions_legacy<Content>(
37482        &self,
37483        team_id: i64,
37484        owner: &str,
37485        repo: &str,
37486        theContent: Content,
37487    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
37488    where
37489        Content: Copy + TryInto<crate::v1_1_4::request::teams_add_or_update_repo_permissions_legacy::Content<::hyper::Body>>,
37490        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_add_or_update_repo_permissions_legacy::Content<::hyper::Body>>>::Error>
37491    {
37492        let mut theScheme = AuthScheme::from(&self.config.authentication);
37493
37494        while let Some(auth_step) = theScheme.step()? {
37495            match auth_step {
37496                ::authentic::AuthenticationStep::Request(auth_request) => {
37497                    theScheme.respond(self.client.request(auth_request).await);
37498                }
37499                ::authentic::AuthenticationStep::WaitFor(duration) => {
37500                    (self.sleep)(duration).await;
37501                }
37502            }
37503        }
37504        let theBuilder = crate::v1_1_4::request::teams_add_or_update_repo_permissions_legacy::http_builder(
37505            self.config.base_url.as_ref(),
37506            team_id,
37507            owner,
37508            repo,
37509            self.config.user_agent.as_ref(),
37510            self.config.accept.as_deref(),
37511        )?
37512        .with_authentication(&theScheme)?;
37513
37514        let theRequest = crate::v1_1_4::request::teams_add_or_update_repo_permissions_legacy::hyper_request(
37515            theBuilder,
37516            theContent.try_into()?,
37517        )?;
37518
37519        ::log::debug!("HTTP request: {:?}", &theRequest);
37520
37521        let theResponse = self.client.request(theRequest).await?;
37522
37523        ::log::debug!("HTTP response: {:?}", &theResponse);
37524
37525        Ok(theResponse)
37526    }
37527
37528    /// Remove a repository from a team (Legacy)
37529    /// 
37530    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) endpoint.
37531    /// 
37532    /// If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team.
37533    /// 
37534    /// [API method documentation](https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy)
37535    pub async fn teams_remove_repo_legacy(
37536        &self,
37537        team_id: i64,
37538        owner: &str,
37539        repo: &str,
37540    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37541        let mut theScheme = AuthScheme::from(&self.config.authentication);
37542
37543        while let Some(auth_step) = theScheme.step()? {
37544            match auth_step {
37545                ::authentic::AuthenticationStep::Request(auth_request) => {
37546                    theScheme.respond(self.client.request(auth_request).await);
37547                }
37548                ::authentic::AuthenticationStep::WaitFor(duration) => {
37549                    (self.sleep)(duration).await;
37550                }
37551            }
37552        }
37553        let theBuilder = crate::v1_1_4::request::teams_remove_repo_legacy::http_builder(
37554            self.config.base_url.as_ref(),
37555            team_id,
37556            owner,
37557            repo,
37558            self.config.user_agent.as_ref(),
37559            self.config.accept.as_deref(),
37560        )?
37561        .with_authentication(&theScheme)?;
37562
37563        let theRequest =
37564            crate::v1_1_4::request::teams_remove_repo_legacy::hyper_request(theBuilder)?;
37565
37566        ::log::debug!("HTTP request: {:?}", &theRequest);
37567
37568        let theResponse = self.client.request(theRequest).await?;
37569
37570        ::log::debug!("HTTP response: {:?}", &theResponse);
37571
37572        Ok(theResponse)
37573    }
37574
37575    /// List IdP groups for a team (Legacy)
37576    /// 
37577    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint.
37578    /// 
37579    /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
37580    /// 
37581    /// List IdP groups connected to a team on GitHub.
37582    /// 
37583    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team-legacy)
37584    pub async fn teams_list_idp_groups_for_legacy(
37585        &self,
37586        team_id: i64,
37587    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37588        let mut theScheme = AuthScheme::from(&self.config.authentication);
37589
37590        while let Some(auth_step) = theScheme.step()? {
37591            match auth_step {
37592                ::authentic::AuthenticationStep::Request(auth_request) => {
37593                    theScheme.respond(self.client.request(auth_request).await);
37594                }
37595                ::authentic::AuthenticationStep::WaitFor(duration) => {
37596                    (self.sleep)(duration).await;
37597                }
37598            }
37599        }
37600        let theBuilder = crate::v1_1_4::request::teams_list_idp_groups_for_legacy::http_builder(
37601            self.config.base_url.as_ref(),
37602            team_id,
37603            self.config.user_agent.as_ref(),
37604            self.config.accept.as_deref(),
37605        )?
37606        .with_authentication(&theScheme)?;
37607
37608        let theRequest =
37609            crate::v1_1_4::request::teams_list_idp_groups_for_legacy::hyper_request(theBuilder)?;
37610
37611        ::log::debug!("HTTP request: {:?}", &theRequest);
37612
37613        let theResponse = self.client.request(theRequest).await?;
37614
37615        ::log::debug!("HTTP response: {:?}", &theResponse);
37616
37617        Ok(theResponse)
37618    }
37619
37620    /// Create or update IdP group connections (Legacy)
37621    /// 
37622    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint.
37623    /// 
37624    /// Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
37625    /// 
37626    /// Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team.
37627    /// 
37628    /// [API method documentation](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections-legacy)
37629    ///
37630    /// # Content
37631    ///
37632    /// - [`&v1_1_4::request::teams_create_or_update_idp_group_connections_legacy::body::Json`](crate::v1_1_4::request::teams_create_or_update_idp_group_connections_legacy::body::Json)
37633    pub async fn teams_create_or_update_idp_group_connections_legacy<Content>(
37634        &self,
37635        team_id: i64,
37636        theContent: Content,
37637    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
37638    where
37639        Content: Copy + TryInto<crate::v1_1_4::request::teams_create_or_update_idp_group_connections_legacy::Content<::hyper::Body>>,
37640        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::teams_create_or_update_idp_group_connections_legacy::Content<::hyper::Body>>>::Error>
37641    {
37642        let mut theScheme = AuthScheme::from(&self.config.authentication);
37643
37644        while let Some(auth_step) = theScheme.step()? {
37645            match auth_step {
37646                ::authentic::AuthenticationStep::Request(auth_request) => {
37647                    theScheme.respond(self.client.request(auth_request).await);
37648                }
37649                ::authentic::AuthenticationStep::WaitFor(duration) => {
37650                    (self.sleep)(duration).await;
37651                }
37652            }
37653        }
37654        let theBuilder = crate::v1_1_4::request::teams_create_or_update_idp_group_connections_legacy::http_builder(
37655            self.config.base_url.as_ref(),
37656            team_id,
37657            self.config.user_agent.as_ref(),
37658            self.config.accept.as_deref(),
37659        )?
37660        .with_authentication(&theScheme)?;
37661
37662        let theRequest = crate::v1_1_4::request::teams_create_or_update_idp_group_connections_legacy::hyper_request(
37663            theBuilder,
37664            theContent.try_into()?,
37665        )?;
37666
37667        ::log::debug!("HTTP request: {:?}", &theRequest);
37668
37669        let theResponse = self.client.request(theRequest).await?;
37670
37671        ::log::debug!("HTTP response: {:?}", &theResponse);
37672
37673        Ok(theResponse)
37674    }
37675
37676    /// List child teams (Legacy)
37677    /// 
37678    /// **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint.
37679    /// 
37680    /// [API method documentation](https://docs.github.com/rest/reference/teams/#list-child-teams-legacy)
37681    pub async fn teams_list_child_legacy(
37682        &self,
37683        team_id: i64,
37684        per_page: ::std::option::Option<i64>,
37685        page: ::std::option::Option<i64>,
37686    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37687        let mut theScheme = AuthScheme::from(&self.config.authentication);
37688
37689        while let Some(auth_step) = theScheme.step()? {
37690            match auth_step {
37691                ::authentic::AuthenticationStep::Request(auth_request) => {
37692                    theScheme.respond(self.client.request(auth_request).await);
37693                }
37694                ::authentic::AuthenticationStep::WaitFor(duration) => {
37695                    (self.sleep)(duration).await;
37696                }
37697            }
37698        }
37699        let theBuilder = crate::v1_1_4::request::teams_list_child_legacy::http_builder(
37700            self.config.base_url.as_ref(),
37701            team_id,
37702            per_page,
37703            page,
37704            self.config.user_agent.as_ref(),
37705            self.config.accept.as_deref(),
37706        )?
37707        .with_authentication(&theScheme)?;
37708
37709        let theRequest =
37710            crate::v1_1_4::request::teams_list_child_legacy::hyper_request(theBuilder)?;
37711
37712        ::log::debug!("HTTP request: {:?}", &theRequest);
37713
37714        let theResponse = self.client.request(theRequest).await?;
37715
37716        ::log::debug!("HTTP response: {:?}", &theResponse);
37717
37718        Ok(theResponse)
37719    }
37720
37721    /// Get the authenticated user
37722    /// 
37723    /// If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information.
37724    /// 
37725    /// If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information.
37726    /// 
37727    /// [API method documentation](https://docs.github.com/rest/reference/users#get-the-authenticated-user)
37728    pub async fn users_get_authenticated(
37729        &self,
37730    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37731        let mut theScheme = AuthScheme::from(&self.config.authentication);
37732
37733        while let Some(auth_step) = theScheme.step()? {
37734            match auth_step {
37735                ::authentic::AuthenticationStep::Request(auth_request) => {
37736                    theScheme.respond(self.client.request(auth_request).await);
37737                }
37738                ::authentic::AuthenticationStep::WaitFor(duration) => {
37739                    (self.sleep)(duration).await;
37740                }
37741            }
37742        }
37743        let theBuilder = crate::v1_1_4::request::users_get_authenticated::http_builder(
37744            self.config.base_url.as_ref(),
37745            self.config.user_agent.as_ref(),
37746            self.config.accept.as_deref(),
37747        )?
37748        .with_authentication(&theScheme)?;
37749
37750        let theRequest =
37751            crate::v1_1_4::request::users_get_authenticated::hyper_request(theBuilder)?;
37752
37753        ::log::debug!("HTTP request: {:?}", &theRequest);
37754
37755        let theResponse = self.client.request(theRequest).await?;
37756
37757        ::log::debug!("HTTP response: {:?}", &theResponse);
37758
37759        Ok(theResponse)
37760    }
37761
37762    /// Update the authenticated user
37763    /// 
37764    /// **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API.
37765    /// 
37766    /// [API method documentation](https://docs.github.com/rest/reference/users/#update-the-authenticated-user)
37767    ///
37768    /// # Content
37769    ///
37770    /// - [`&v1_1_4::request::users_update_authenticated::body::Json`](crate::v1_1_4::request::users_update_authenticated::body::Json)
37771    pub async fn users_update_authenticated<Content>(
37772        &self,
37773        theContent: Content,
37774    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
37775    where
37776        Content: Copy + TryInto<crate::v1_1_4::request::users_update_authenticated::Content<::hyper::Body>>,
37777        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::users_update_authenticated::Content<::hyper::Body>>>::Error>
37778    {
37779        let mut theScheme = AuthScheme::from(&self.config.authentication);
37780
37781        while let Some(auth_step) = theScheme.step()? {
37782            match auth_step {
37783                ::authentic::AuthenticationStep::Request(auth_request) => {
37784                    theScheme.respond(self.client.request(auth_request).await);
37785                }
37786                ::authentic::AuthenticationStep::WaitFor(duration) => {
37787                    (self.sleep)(duration).await;
37788                }
37789            }
37790        }
37791        let theBuilder = crate::v1_1_4::request::users_update_authenticated::http_builder(
37792            self.config.base_url.as_ref(),
37793            self.config.user_agent.as_ref(),
37794            self.config.accept.as_deref(),
37795        )?
37796        .with_authentication(&theScheme)?;
37797
37798        let theRequest = crate::v1_1_4::request::users_update_authenticated::hyper_request(
37799            theBuilder,
37800            theContent.try_into()?,
37801        )?;
37802
37803        ::log::debug!("HTTP request: {:?}", &theRequest);
37804
37805        let theResponse = self.client.request(theRequest).await?;
37806
37807        ::log::debug!("HTTP response: {:?}", &theResponse);
37808
37809        Ok(theResponse)
37810    }
37811
37812    /// List users blocked by the authenticated user
37813    /// 
37814    /// List the users you've blocked on your personal account.
37815    /// 
37816    /// [API method documentation](https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user)
37817    pub async fn users_list_blocked_by_authenticated_user(
37818        &self,
37819    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37820        let mut theScheme = AuthScheme::from(&self.config.authentication);
37821
37822        while let Some(auth_step) = theScheme.step()? {
37823            match auth_step {
37824                ::authentic::AuthenticationStep::Request(auth_request) => {
37825                    theScheme.respond(self.client.request(auth_request).await);
37826                }
37827                ::authentic::AuthenticationStep::WaitFor(duration) => {
37828                    (self.sleep)(duration).await;
37829                }
37830            }
37831        }
37832        let theBuilder = crate::v1_1_4::request::users_list_blocked_by_authenticated_user::http_builder(
37833            self.config.base_url.as_ref(),
37834            self.config.user_agent.as_ref(),
37835            self.config.accept.as_deref(),
37836        )?
37837        .with_authentication(&theScheme)?;
37838
37839        let theRequest =
37840            crate::v1_1_4::request::users_list_blocked_by_authenticated_user::hyper_request(theBuilder)?;
37841
37842        ::log::debug!("HTTP request: {:?}", &theRequest);
37843
37844        let theResponse = self.client.request(theRequest).await?;
37845
37846        ::log::debug!("HTTP response: {:?}", &theResponse);
37847
37848        Ok(theResponse)
37849    }
37850
37851    /// Check if a user is blocked by the authenticated user
37852    /// 
37853    /// [API method documentation](https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user)
37854    pub async fn users_check_blocked(
37855        &self,
37856        username: &str,
37857    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37858        let mut theScheme = AuthScheme::from(&self.config.authentication);
37859
37860        while let Some(auth_step) = theScheme.step()? {
37861            match auth_step {
37862                ::authentic::AuthenticationStep::Request(auth_request) => {
37863                    theScheme.respond(self.client.request(auth_request).await);
37864                }
37865                ::authentic::AuthenticationStep::WaitFor(duration) => {
37866                    (self.sleep)(duration).await;
37867                }
37868            }
37869        }
37870        let theBuilder = crate::v1_1_4::request::users_check_blocked::http_builder(
37871            self.config.base_url.as_ref(),
37872            username,
37873            self.config.user_agent.as_ref(),
37874            self.config.accept.as_deref(),
37875        )?
37876        .with_authentication(&theScheme)?;
37877
37878        let theRequest =
37879            crate::v1_1_4::request::users_check_blocked::hyper_request(theBuilder)?;
37880
37881        ::log::debug!("HTTP request: {:?}", &theRequest);
37882
37883        let theResponse = self.client.request(theRequest).await?;
37884
37885        ::log::debug!("HTTP response: {:?}", &theResponse);
37886
37887        Ok(theResponse)
37888    }
37889
37890    /// Block a user
37891    /// 
37892    /// [API method documentation](https://docs.github.com/rest/reference/users#block-a-user)
37893    pub async fn users_block(
37894        &self,
37895        username: &str,
37896    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37897        let mut theScheme = AuthScheme::from(&self.config.authentication);
37898
37899        while let Some(auth_step) = theScheme.step()? {
37900            match auth_step {
37901                ::authentic::AuthenticationStep::Request(auth_request) => {
37902                    theScheme.respond(self.client.request(auth_request).await);
37903                }
37904                ::authentic::AuthenticationStep::WaitFor(duration) => {
37905                    (self.sleep)(duration).await;
37906                }
37907            }
37908        }
37909        let theBuilder = crate::v1_1_4::request::users_block::http_builder(
37910            self.config.base_url.as_ref(),
37911            username,
37912            self.config.user_agent.as_ref(),
37913            self.config.accept.as_deref(),
37914        )?
37915        .with_authentication(&theScheme)?;
37916
37917        let theRequest =
37918            crate::v1_1_4::request::users_block::hyper_request(theBuilder)?;
37919
37920        ::log::debug!("HTTP request: {:?}", &theRequest);
37921
37922        let theResponse = self.client.request(theRequest).await?;
37923
37924        ::log::debug!("HTTP response: {:?}", &theResponse);
37925
37926        Ok(theResponse)
37927    }
37928
37929    /// Unblock a user
37930    /// 
37931    /// [API method documentation](https://docs.github.com/rest/reference/users#unblock-a-user)
37932    pub async fn users_unblock(
37933        &self,
37934        username: &str,
37935    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37936        let mut theScheme = AuthScheme::from(&self.config.authentication);
37937
37938        while let Some(auth_step) = theScheme.step()? {
37939            match auth_step {
37940                ::authentic::AuthenticationStep::Request(auth_request) => {
37941                    theScheme.respond(self.client.request(auth_request).await);
37942                }
37943                ::authentic::AuthenticationStep::WaitFor(duration) => {
37944                    (self.sleep)(duration).await;
37945                }
37946            }
37947        }
37948        let theBuilder = crate::v1_1_4::request::users_unblock::http_builder(
37949            self.config.base_url.as_ref(),
37950            username,
37951            self.config.user_agent.as_ref(),
37952            self.config.accept.as_deref(),
37953        )?
37954        .with_authentication(&theScheme)?;
37955
37956        let theRequest =
37957            crate::v1_1_4::request::users_unblock::hyper_request(theBuilder)?;
37958
37959        ::log::debug!("HTTP request: {:?}", &theRequest);
37960
37961        let theResponse = self.client.request(theRequest).await?;
37962
37963        ::log::debug!("HTTP response: {:?}", &theResponse);
37964
37965        Ok(theResponse)
37966    }
37967
37968    /// List codespaces for the authenticated user
37969    /// 
37970    /// Lists the authenticated user's codespaces.
37971    /// 
37972    /// You must authenticate using an access token with the `codespace` scope to use this endpoint.
37973    /// 
37974    /// GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint.
37975    /// 
37976    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user)
37977    pub async fn codespaces_list_for_authenticated_user(
37978        &self,
37979        per_page: ::std::option::Option<i64>,
37980        page: ::std::option::Option<i64>,
37981        repository_id: ::std::option::Option<i64>,
37982    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
37983        let mut theScheme = AuthScheme::from(&self.config.authentication);
37984
37985        while let Some(auth_step) = theScheme.step()? {
37986            match auth_step {
37987                ::authentic::AuthenticationStep::Request(auth_request) => {
37988                    theScheme.respond(self.client.request(auth_request).await);
37989                }
37990                ::authentic::AuthenticationStep::WaitFor(duration) => {
37991                    (self.sleep)(duration).await;
37992                }
37993            }
37994        }
37995        let theBuilder = crate::v1_1_4::request::codespaces_list_for_authenticated_user::http_builder(
37996            self.config.base_url.as_ref(),
37997            per_page,
37998            page,
37999            repository_id,
38000            self.config.user_agent.as_ref(),
38001            self.config.accept.as_deref(),
38002        )?
38003        .with_authentication(&theScheme)?;
38004
38005        let theRequest =
38006            crate::v1_1_4::request::codespaces_list_for_authenticated_user::hyper_request(theBuilder)?;
38007
38008        ::log::debug!("HTTP request: {:?}", &theRequest);
38009
38010        let theResponse = self.client.request(theRequest).await?;
38011
38012        ::log::debug!("HTTP response: {:?}", &theResponse);
38013
38014        Ok(theResponse)
38015    }
38016
38017    /// Create a codespace for the authenticated user
38018    /// 
38019    /// Creates a new codespace, owned by the authenticated user.
38020    /// 
38021    /// This endpoint requires either a `repository_id` OR a `pull_request` but not both.
38022    /// 
38023    /// You must authenticate using an access token with the `codespace` scope to use this endpoint.
38024    /// 
38025    /// GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint.
38026    /// 
38027    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user)
38028    ///
38029    /// # Content
38030    ///
38031    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
38032    pub async fn codespaces_create_for_authenticated_user<Content>(
38033        &self,
38034        theContent: Content,
38035    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
38036    where
38037        Content: Copy + TryInto<crate::v1_1_4::request::codespaces_create_for_authenticated_user::Content<::hyper::Body>>,
38038        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::codespaces_create_for_authenticated_user::Content<::hyper::Body>>>::Error>
38039    {
38040        let mut theScheme = AuthScheme::from(&self.config.authentication);
38041
38042        while let Some(auth_step) = theScheme.step()? {
38043            match auth_step {
38044                ::authentic::AuthenticationStep::Request(auth_request) => {
38045                    theScheme.respond(self.client.request(auth_request).await);
38046                }
38047                ::authentic::AuthenticationStep::WaitFor(duration) => {
38048                    (self.sleep)(duration).await;
38049                }
38050            }
38051        }
38052        let theBuilder = crate::v1_1_4::request::codespaces_create_for_authenticated_user::http_builder(
38053            self.config.base_url.as_ref(),
38054            self.config.user_agent.as_ref(),
38055            self.config.accept.as_deref(),
38056        )?
38057        .with_authentication(&theScheme)?;
38058
38059        let theRequest = crate::v1_1_4::request::codespaces_create_for_authenticated_user::hyper_request(
38060            theBuilder,
38061            theContent.try_into()?,
38062        )?;
38063
38064        ::log::debug!("HTTP request: {:?}", &theRequest);
38065
38066        let theResponse = self.client.request(theRequest).await?;
38067
38068        ::log::debug!("HTTP response: {:?}", &theResponse);
38069
38070        Ok(theResponse)
38071    }
38072
38073    /// List secrets for the authenticated user
38074    /// 
38075    /// Lists all secrets available for a user's Codespaces without revealing their
38076    /// encrypted values.
38077    /// 
38078    /// You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint.
38079    /// 
38080    /// GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint.
38081    /// 
38082    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user)
38083    pub async fn codespaces_list_secrets_for_authenticated_user(
38084        &self,
38085        per_page: ::std::option::Option<i64>,
38086        page: ::std::option::Option<i64>,
38087    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38088        let mut theScheme = AuthScheme::from(&self.config.authentication);
38089
38090        while let Some(auth_step) = theScheme.step()? {
38091            match auth_step {
38092                ::authentic::AuthenticationStep::Request(auth_request) => {
38093                    theScheme.respond(self.client.request(auth_request).await);
38094                }
38095                ::authentic::AuthenticationStep::WaitFor(duration) => {
38096                    (self.sleep)(duration).await;
38097                }
38098            }
38099        }
38100        let theBuilder = crate::v1_1_4::request::codespaces_list_secrets_for_authenticated_user::http_builder(
38101            self.config.base_url.as_ref(),
38102            per_page,
38103            page,
38104            self.config.user_agent.as_ref(),
38105            self.config.accept.as_deref(),
38106        )?
38107        .with_authentication(&theScheme)?;
38108
38109        let theRequest =
38110            crate::v1_1_4::request::codespaces_list_secrets_for_authenticated_user::hyper_request(theBuilder)?;
38111
38112        ::log::debug!("HTTP request: {:?}", &theRequest);
38113
38114        let theResponse = self.client.request(theRequest).await?;
38115
38116        ::log::debug!("HTTP response: {:?}", &theResponse);
38117
38118        Ok(theResponse)
38119    }
38120
38121    /// Get public key for the authenticated user
38122    /// 
38123    /// Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets.
38124    /// 
38125    /// You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint.
38126    /// 
38127    /// GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint.
38128    /// 
38129    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user)
38130    pub async fn codespaces_get_public_key_for_authenticated_user(
38131        &self,
38132    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38133        let mut theScheme = AuthScheme::from(&self.config.authentication);
38134
38135        while let Some(auth_step) = theScheme.step()? {
38136            match auth_step {
38137                ::authentic::AuthenticationStep::Request(auth_request) => {
38138                    theScheme.respond(self.client.request(auth_request).await);
38139                }
38140                ::authentic::AuthenticationStep::WaitFor(duration) => {
38141                    (self.sleep)(duration).await;
38142                }
38143            }
38144        }
38145        let theBuilder = crate::v1_1_4::request::codespaces_get_public_key_for_authenticated_user::http_builder(
38146            self.config.base_url.as_ref(),
38147            self.config.user_agent.as_ref(),
38148            self.config.accept.as_deref(),
38149        )?
38150        .with_authentication(&theScheme)?;
38151
38152        let theRequest =
38153            crate::v1_1_4::request::codespaces_get_public_key_for_authenticated_user::hyper_request(theBuilder)?;
38154
38155        ::log::debug!("HTTP request: {:?}", &theRequest);
38156
38157        let theResponse = self.client.request(theRequest).await?;
38158
38159        ::log::debug!("HTTP response: {:?}", &theResponse);
38160
38161        Ok(theResponse)
38162    }
38163
38164    /// Get a secret for the authenticated user
38165    /// 
38166    /// Gets a secret available to a user's codespaces without revealing its encrypted value.
38167    /// 
38168    /// You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint.
38169    /// 
38170    /// GitHub Apps must have read access to the `codespaces_user_secrets` user permission to use this endpoint.
38171    /// 
38172    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user)
38173    pub async fn codespaces_get_secret_for_authenticated_user(
38174        &self,
38175        secret_name: &str,
38176    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38177        let mut theScheme = AuthScheme::from(&self.config.authentication);
38178
38179        while let Some(auth_step) = theScheme.step()? {
38180            match auth_step {
38181                ::authentic::AuthenticationStep::Request(auth_request) => {
38182                    theScheme.respond(self.client.request(auth_request).await);
38183                }
38184                ::authentic::AuthenticationStep::WaitFor(duration) => {
38185                    (self.sleep)(duration).await;
38186                }
38187            }
38188        }
38189        let theBuilder = crate::v1_1_4::request::codespaces_get_secret_for_authenticated_user::http_builder(
38190            self.config.base_url.as_ref(),
38191            secret_name,
38192            self.config.user_agent.as_ref(),
38193            self.config.accept.as_deref(),
38194        )?
38195        .with_authentication(&theScheme)?;
38196
38197        let theRequest =
38198            crate::v1_1_4::request::codespaces_get_secret_for_authenticated_user::hyper_request(theBuilder)?;
38199
38200        ::log::debug!("HTTP request: {:?}", &theRequest);
38201
38202        let theResponse = self.client.request(theRequest).await?;
38203
38204        ::log::debug!("HTTP response: {:?}", &theResponse);
38205
38206        Ok(theResponse)
38207    }
38208
38209    /// Create or update a secret for the authenticated user
38210    /// 
38211    /// Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using
38212    /// [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages).
38213    /// 
38214    /// You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must also have Codespaces access to use this endpoint.
38215    /// 
38216    /// GitHub Apps must have read access to the `codespaces_user_secrets` user permission and `codespaces_secrets` repository permission on all referenced repositories to use this endpoint.
38217    /// 
38218    /// #### Example encrypting a secret using Node.js
38219    /// 
38220    /// Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library.
38221    /// 
38222    /// ```text
38223    /// const sodium = require('tweetsodium');
38224    /// 
38225    /// const key = "base64-encoded-public-key";
38226    /// const value = "plain-text-secret";
38227    /// 
38228    /// // Convert the message and key to Uint8Array's (Buffer implements that interface)
38229    /// const messageBytes = Buffer.from(value);
38230    /// const keyBytes = Buffer.from(key, 'base64');
38231    /// 
38232    /// // Encrypt using LibSodium.
38233    /// const encryptedBytes = sodium.seal(messageBytes, keyBytes);
38234    /// 
38235    /// // Base64 the encrypted secret
38236    /// const encrypted = Buffer.from(encryptedBytes).toString('base64');
38237    /// 
38238    /// console.log(encrypted);
38239    /// ```
38240    /// 
38241    /// 
38242    /// #### Example encrypting a secret using Python
38243    /// 
38244    /// Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3.
38245    /// 
38246    /// ```text
38247    /// from base64 import b64encode
38248    /// from nacl import encoding, public
38249    /// 
38250    /// def encrypt(public_key: str, secret_value: str) -> str:
38251    ///   """Encrypt a Unicode string using the public key."""
38252    ///   public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder())
38253    ///   sealed_box = public.SealedBox(public_key)
38254    ///   encrypted = sealed_box.encrypt(secret_value.encode("utf-8"))
38255    ///   return b64encode(encrypted).decode("utf-8")
38256    /// ```
38257    /// 
38258    /// #### Example encrypting a secret using C#
38259    /// 
38260    /// Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package.
38261    /// 
38262    /// ```text
38263    /// var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret");
38264    /// var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU=");
38265    /// 
38266    /// var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey);
38267    /// 
38268    /// Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox));
38269    /// ```
38270    /// 
38271    /// #### Example encrypting a secret using Ruby
38272    /// 
38273    /// Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem.
38274    /// 
38275    /// ```ruby
38276    /// require "rbnacl"
38277    /// require "base64"
38278    /// 
38279    /// key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=")
38280    /// public_key = RbNaCl::PublicKey.new(key)
38281    /// 
38282    /// box = RbNaCl::Boxes::Sealed.from_public_key(public_key)
38283    /// encrypted_secret = box.encrypt("my_secret")
38284    /// 
38285    /// # Print the base64 encoded secret
38286    /// puts Base64.strict_encode64(encrypted_secret)
38287    /// ```
38288    /// 
38289    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user)
38290    ///
38291    /// # Content
38292    ///
38293    /// - [`&v1_1_4::request::codespaces_create_or_update_secret_for_authenticated_user::body::Json`](crate::v1_1_4::request::codespaces_create_or_update_secret_for_authenticated_user::body::Json)
38294    pub async fn codespaces_create_or_update_secret_for_authenticated_user<Content>(
38295        &self,
38296        secret_name: &str,
38297        theContent: Content,
38298    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
38299    where
38300        Content: Copy + TryInto<crate::v1_1_4::request::codespaces_create_or_update_secret_for_authenticated_user::Content<::hyper::Body>>,
38301        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::codespaces_create_or_update_secret_for_authenticated_user::Content<::hyper::Body>>>::Error>
38302    {
38303        let mut theScheme = AuthScheme::from(&self.config.authentication);
38304
38305        while let Some(auth_step) = theScheme.step()? {
38306            match auth_step {
38307                ::authentic::AuthenticationStep::Request(auth_request) => {
38308                    theScheme.respond(self.client.request(auth_request).await);
38309                }
38310                ::authentic::AuthenticationStep::WaitFor(duration) => {
38311                    (self.sleep)(duration).await;
38312                }
38313            }
38314        }
38315        let theBuilder = crate::v1_1_4::request::codespaces_create_or_update_secret_for_authenticated_user::http_builder(
38316            self.config.base_url.as_ref(),
38317            secret_name,
38318            self.config.user_agent.as_ref(),
38319            self.config.accept.as_deref(),
38320        )?
38321        .with_authentication(&theScheme)?;
38322
38323        let theRequest = crate::v1_1_4::request::codespaces_create_or_update_secret_for_authenticated_user::hyper_request(
38324            theBuilder,
38325            theContent.try_into()?,
38326        )?;
38327
38328        ::log::debug!("HTTP request: {:?}", &theRequest);
38329
38330        let theResponse = self.client.request(theRequest).await?;
38331
38332        ::log::debug!("HTTP response: {:?}", &theResponse);
38333
38334        Ok(theResponse)
38335    }
38336
38337    /// Delete a secret for the authenticated user
38338    /// 
38339    /// Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret.
38340    /// 
38341    /// You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint.
38342    /// 
38343    /// GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint.
38344    /// 
38345    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user)
38346    pub async fn codespaces_delete_secret_for_authenticated_user(
38347        &self,
38348        secret_name: &str,
38349    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38350        let mut theScheme = AuthScheme::from(&self.config.authentication);
38351
38352        while let Some(auth_step) = theScheme.step()? {
38353            match auth_step {
38354                ::authentic::AuthenticationStep::Request(auth_request) => {
38355                    theScheme.respond(self.client.request(auth_request).await);
38356                }
38357                ::authentic::AuthenticationStep::WaitFor(duration) => {
38358                    (self.sleep)(duration).await;
38359                }
38360            }
38361        }
38362        let theBuilder = crate::v1_1_4::request::codespaces_delete_secret_for_authenticated_user::http_builder(
38363            self.config.base_url.as_ref(),
38364            secret_name,
38365            self.config.user_agent.as_ref(),
38366            self.config.accept.as_deref(),
38367        )?
38368        .with_authentication(&theScheme)?;
38369
38370        let theRequest =
38371            crate::v1_1_4::request::codespaces_delete_secret_for_authenticated_user::hyper_request(theBuilder)?;
38372
38373        ::log::debug!("HTTP request: {:?}", &theRequest);
38374
38375        let theResponse = self.client.request(theRequest).await?;
38376
38377        ::log::debug!("HTTP response: {:?}", &theResponse);
38378
38379        Ok(theResponse)
38380    }
38381
38382    /// List selected repositories for a user secret
38383    /// 
38384    /// List the repositories that have been granted the ability to use a user's codespace secret.
38385    /// 
38386    /// You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint.
38387    /// 
38388    /// GitHub Apps must have read access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint.
38389    /// 
38390    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret)
38391    pub async fn codespaces_list_repositories_for_secret_for_authenticated_user(
38392        &self,
38393        secret_name: &str,
38394    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38395        let mut theScheme = AuthScheme::from(&self.config.authentication);
38396
38397        while let Some(auth_step) = theScheme.step()? {
38398            match auth_step {
38399                ::authentic::AuthenticationStep::Request(auth_request) => {
38400                    theScheme.respond(self.client.request(auth_request).await);
38401                }
38402                ::authentic::AuthenticationStep::WaitFor(duration) => {
38403                    (self.sleep)(duration).await;
38404                }
38405            }
38406        }
38407        let theBuilder = crate::v1_1_4::request::codespaces_list_repositories_for_secret_for_authenticated_user::http_builder(
38408            self.config.base_url.as_ref(),
38409            secret_name,
38410            self.config.user_agent.as_ref(),
38411            self.config.accept.as_deref(),
38412        )?
38413        .with_authentication(&theScheme)?;
38414
38415        let theRequest =
38416            crate::v1_1_4::request::codespaces_list_repositories_for_secret_for_authenticated_user::hyper_request(theBuilder)?;
38417
38418        ::log::debug!("HTTP request: {:?}", &theRequest);
38419
38420        let theResponse = self.client.request(theRequest).await?;
38421
38422        ::log::debug!("HTTP response: {:?}", &theResponse);
38423
38424        Ok(theResponse)
38425    }
38426
38427    /// Set selected repositories for a user secret
38428    /// 
38429    /// Select the repositories that will use a user's codespace secret.
38430    /// 
38431    /// You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint.
38432    /// 
38433    /// GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on all referenced repositories to use this endpoint.
38434    /// 
38435    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret)
38436    ///
38437    /// # Content
38438    ///
38439    /// - [`&v1_1_4::request::codespaces_set_repositories_for_secret_for_authenticated_user::body::Json`](crate::v1_1_4::request::codespaces_set_repositories_for_secret_for_authenticated_user::body::Json)
38440    pub async fn codespaces_set_repositories_for_secret_for_authenticated_user<Content>(
38441        &self,
38442        secret_name: &str,
38443        theContent: Content,
38444    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
38445    where
38446        Content: Copy + TryInto<crate::v1_1_4::request::codespaces_set_repositories_for_secret_for_authenticated_user::Content<::hyper::Body>>,
38447        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::codespaces_set_repositories_for_secret_for_authenticated_user::Content<::hyper::Body>>>::Error>
38448    {
38449        let mut theScheme = AuthScheme::from(&self.config.authentication);
38450
38451        while let Some(auth_step) = theScheme.step()? {
38452            match auth_step {
38453                ::authentic::AuthenticationStep::Request(auth_request) => {
38454                    theScheme.respond(self.client.request(auth_request).await);
38455                }
38456                ::authentic::AuthenticationStep::WaitFor(duration) => {
38457                    (self.sleep)(duration).await;
38458                }
38459            }
38460        }
38461        let theBuilder = crate::v1_1_4::request::codespaces_set_repositories_for_secret_for_authenticated_user::http_builder(
38462            self.config.base_url.as_ref(),
38463            secret_name,
38464            self.config.user_agent.as_ref(),
38465            self.config.accept.as_deref(),
38466        )?
38467        .with_authentication(&theScheme)?;
38468
38469        let theRequest = crate::v1_1_4::request::codespaces_set_repositories_for_secret_for_authenticated_user::hyper_request(
38470            theBuilder,
38471            theContent.try_into()?,
38472        )?;
38473
38474        ::log::debug!("HTTP request: {:?}", &theRequest);
38475
38476        let theResponse = self.client.request(theRequest).await?;
38477
38478        ::log::debug!("HTTP response: {:?}", &theResponse);
38479
38480        Ok(theResponse)
38481    }
38482
38483    /// Add a selected repository to a user secret
38484    /// 
38485    /// Adds a repository to the selected repositories for a user's codespace secret.
38486    /// You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint.
38487    /// GitHub Apps must have write access to the `codespaces_user_secrets` user permission and write access to the `codespaces_secrets` repository permission on the referenced repository to use this endpoint.
38488    /// 
38489    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret)
38490    pub async fn codespaces_add_repository_for_secret_for_authenticated_user(
38491        &self,
38492        secret_name: &str,
38493        repository_id: i64,
38494    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38495        let mut theScheme = AuthScheme::from(&self.config.authentication);
38496
38497        while let Some(auth_step) = theScheme.step()? {
38498            match auth_step {
38499                ::authentic::AuthenticationStep::Request(auth_request) => {
38500                    theScheme.respond(self.client.request(auth_request).await);
38501                }
38502                ::authentic::AuthenticationStep::WaitFor(duration) => {
38503                    (self.sleep)(duration).await;
38504                }
38505            }
38506        }
38507        let theBuilder = crate::v1_1_4::request::codespaces_add_repository_for_secret_for_authenticated_user::http_builder(
38508            self.config.base_url.as_ref(),
38509            secret_name,
38510            repository_id,
38511            self.config.user_agent.as_ref(),
38512            self.config.accept.as_deref(),
38513        )?
38514        .with_authentication(&theScheme)?;
38515
38516        let theRequest =
38517            crate::v1_1_4::request::codespaces_add_repository_for_secret_for_authenticated_user::hyper_request(theBuilder)?;
38518
38519        ::log::debug!("HTTP request: {:?}", &theRequest);
38520
38521        let theResponse = self.client.request(theRequest).await?;
38522
38523        ::log::debug!("HTTP response: {:?}", &theResponse);
38524
38525        Ok(theResponse)
38526    }
38527
38528    /// Remove a selected repository from a user secret
38529    /// 
38530    /// Removes a repository from the selected repositories for a user's codespace secret.
38531    /// You must authenticate using an access token with the `codespace` or `codespace:secrets` scope to use this endpoint. User must have Codespaces access to use this endpoint.
38532    /// GitHub Apps must have write access to the `codespaces_user_secrets` user permission to use this endpoint.
38533    /// 
38534    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret)
38535    pub async fn codespaces_remove_repository_for_secret_for_authenticated_user(
38536        &self,
38537        secret_name: &str,
38538        repository_id: i64,
38539    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38540        let mut theScheme = AuthScheme::from(&self.config.authentication);
38541
38542        while let Some(auth_step) = theScheme.step()? {
38543            match auth_step {
38544                ::authentic::AuthenticationStep::Request(auth_request) => {
38545                    theScheme.respond(self.client.request(auth_request).await);
38546                }
38547                ::authentic::AuthenticationStep::WaitFor(duration) => {
38548                    (self.sleep)(duration).await;
38549                }
38550            }
38551        }
38552        let theBuilder = crate::v1_1_4::request::codespaces_remove_repository_for_secret_for_authenticated_user::http_builder(
38553            self.config.base_url.as_ref(),
38554            secret_name,
38555            repository_id,
38556            self.config.user_agent.as_ref(),
38557            self.config.accept.as_deref(),
38558        )?
38559        .with_authentication(&theScheme)?;
38560
38561        let theRequest =
38562            crate::v1_1_4::request::codespaces_remove_repository_for_secret_for_authenticated_user::hyper_request(theBuilder)?;
38563
38564        ::log::debug!("HTTP request: {:?}", &theRequest);
38565
38566        let theResponse = self.client.request(theRequest).await?;
38567
38568        ::log::debug!("HTTP response: {:?}", &theResponse);
38569
38570        Ok(theResponse)
38571    }
38572
38573    /// Get a codespace for the authenticated user
38574    /// 
38575    /// Gets information about a user's codespace.
38576    /// 
38577    /// You must authenticate using an access token with the `codespace` scope to use this endpoint.
38578    /// 
38579    /// GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint.
38580    /// 
38581    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user)
38582    pub async fn codespaces_get_for_authenticated_user(
38583        &self,
38584        codespace_name: &str,
38585    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38586        let mut theScheme = AuthScheme::from(&self.config.authentication);
38587
38588        while let Some(auth_step) = theScheme.step()? {
38589            match auth_step {
38590                ::authentic::AuthenticationStep::Request(auth_request) => {
38591                    theScheme.respond(self.client.request(auth_request).await);
38592                }
38593                ::authentic::AuthenticationStep::WaitFor(duration) => {
38594                    (self.sleep)(duration).await;
38595                }
38596            }
38597        }
38598        let theBuilder = crate::v1_1_4::request::codespaces_get_for_authenticated_user::http_builder(
38599            self.config.base_url.as_ref(),
38600            codespace_name,
38601            self.config.user_agent.as_ref(),
38602            self.config.accept.as_deref(),
38603        )?
38604        .with_authentication(&theScheme)?;
38605
38606        let theRequest =
38607            crate::v1_1_4::request::codespaces_get_for_authenticated_user::hyper_request(theBuilder)?;
38608
38609        ::log::debug!("HTTP request: {:?}", &theRequest);
38610
38611        let theResponse = self.client.request(theRequest).await?;
38612
38613        ::log::debug!("HTTP response: {:?}", &theResponse);
38614
38615        Ok(theResponse)
38616    }
38617
38618    /// Delete a codespace for the authenticated user
38619    /// 
38620    /// Deletes a user's codespace.
38621    /// 
38622    /// You must authenticate using an access token with the `codespace` scope to use this endpoint.
38623    /// 
38624    /// GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint.
38625    /// 
38626    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user)
38627    pub async fn codespaces_delete_for_authenticated_user(
38628        &self,
38629        codespace_name: &str,
38630    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38631        let mut theScheme = AuthScheme::from(&self.config.authentication);
38632
38633        while let Some(auth_step) = theScheme.step()? {
38634            match auth_step {
38635                ::authentic::AuthenticationStep::Request(auth_request) => {
38636                    theScheme.respond(self.client.request(auth_request).await);
38637                }
38638                ::authentic::AuthenticationStep::WaitFor(duration) => {
38639                    (self.sleep)(duration).await;
38640                }
38641            }
38642        }
38643        let theBuilder = crate::v1_1_4::request::codespaces_delete_for_authenticated_user::http_builder(
38644            self.config.base_url.as_ref(),
38645            codespace_name,
38646            self.config.user_agent.as_ref(),
38647            self.config.accept.as_deref(),
38648        )?
38649        .with_authentication(&theScheme)?;
38650
38651        let theRequest =
38652            crate::v1_1_4::request::codespaces_delete_for_authenticated_user::hyper_request(theBuilder)?;
38653
38654        ::log::debug!("HTTP request: {:?}", &theRequest);
38655
38656        let theResponse = self.client.request(theRequest).await?;
38657
38658        ::log::debug!("HTTP response: {:?}", &theResponse);
38659
38660        Ok(theResponse)
38661    }
38662
38663    /// Update a codespace for the authenticated user
38664    /// 
38665    /// Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint.
38666    /// 
38667    /// If you specify a new machine type it will be applied the next time your codespace is started.
38668    /// 
38669    /// You must authenticate using an access token with the `codespace` scope to use this endpoint.
38670    /// 
38671    /// GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint.
38672    /// 
38673    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user)
38674    ///
38675    /// # Content
38676    ///
38677    /// - [`&v1_1_4::request::codespaces_update_for_authenticated_user::body::Json`](crate::v1_1_4::request::codespaces_update_for_authenticated_user::body::Json)
38678    pub async fn codespaces_update_for_authenticated_user<Content>(
38679        &self,
38680        codespace_name: &str,
38681        theContent: Content,
38682    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
38683    where
38684        Content: Copy + TryInto<crate::v1_1_4::request::codespaces_update_for_authenticated_user::Content<::hyper::Body>>,
38685        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::codespaces_update_for_authenticated_user::Content<::hyper::Body>>>::Error>
38686    {
38687        let mut theScheme = AuthScheme::from(&self.config.authentication);
38688
38689        while let Some(auth_step) = theScheme.step()? {
38690            match auth_step {
38691                ::authentic::AuthenticationStep::Request(auth_request) => {
38692                    theScheme.respond(self.client.request(auth_request).await);
38693                }
38694                ::authentic::AuthenticationStep::WaitFor(duration) => {
38695                    (self.sleep)(duration).await;
38696                }
38697            }
38698        }
38699        let theBuilder = crate::v1_1_4::request::codespaces_update_for_authenticated_user::http_builder(
38700            self.config.base_url.as_ref(),
38701            codespace_name,
38702            self.config.user_agent.as_ref(),
38703            self.config.accept.as_deref(),
38704        )?
38705        .with_authentication(&theScheme)?;
38706
38707        let theRequest = crate::v1_1_4::request::codespaces_update_for_authenticated_user::hyper_request(
38708            theBuilder,
38709            theContent.try_into()?,
38710        )?;
38711
38712        ::log::debug!("HTTP request: {:?}", &theRequest);
38713
38714        let theResponse = self.client.request(theRequest).await?;
38715
38716        ::log::debug!("HTTP response: {:?}", &theResponse);
38717
38718        Ok(theResponse)
38719    }
38720
38721    /// Export a codespace for the authenticated user
38722    /// 
38723    /// Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored.
38724    /// 
38725    /// You must authenticate using a personal access token with the `codespace` scope to use this endpoint.
38726    /// 
38727    /// GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint.
38728    pub async fn codespaces_export_for_authenticated_user(
38729        &self,
38730        codespace_name: &str,
38731    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38732        let mut theScheme = AuthScheme::from(&self.config.authentication);
38733
38734        while let Some(auth_step) = theScheme.step()? {
38735            match auth_step {
38736                ::authentic::AuthenticationStep::Request(auth_request) => {
38737                    theScheme.respond(self.client.request(auth_request).await);
38738                }
38739                ::authentic::AuthenticationStep::WaitFor(duration) => {
38740                    (self.sleep)(duration).await;
38741                }
38742            }
38743        }
38744        let theBuilder = crate::v1_1_4::request::codespaces_export_for_authenticated_user::http_builder(
38745            self.config.base_url.as_ref(),
38746            codespace_name,
38747            self.config.user_agent.as_ref(),
38748            self.config.accept.as_deref(),
38749        )?
38750        .with_authentication(&theScheme)?;
38751
38752        let theRequest =
38753            crate::v1_1_4::request::codespaces_export_for_authenticated_user::hyper_request(theBuilder)?;
38754
38755        ::log::debug!("HTTP request: {:?}", &theRequest);
38756
38757        let theResponse = self.client.request(theRequest).await?;
38758
38759        ::log::debug!("HTTP response: {:?}", &theResponse);
38760
38761        Ok(theResponse)
38762    }
38763
38764    /// Get details about a codespace export
38765    /// 
38766    /// Gets information about an export of a codespace.
38767    /// 
38768    /// You must authenticate using a personal access token with the `codespace` scope to use this endpoint.
38769    /// 
38770    /// GitHub Apps must have read access to the `codespaces_lifecycle_admin` repository permission to use this endpoint.
38771    pub async fn codespaces_get_export_details_for_authenticated_user(
38772        &self,
38773        codespace_name: &str,
38774        export_id: &str,
38775    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38776        let mut theScheme = AuthScheme::from(&self.config.authentication);
38777
38778        while let Some(auth_step) = theScheme.step()? {
38779            match auth_step {
38780                ::authentic::AuthenticationStep::Request(auth_request) => {
38781                    theScheme.respond(self.client.request(auth_request).await);
38782                }
38783                ::authentic::AuthenticationStep::WaitFor(duration) => {
38784                    (self.sleep)(duration).await;
38785                }
38786            }
38787        }
38788        let theBuilder = crate::v1_1_4::request::codespaces_get_export_details_for_authenticated_user::http_builder(
38789            self.config.base_url.as_ref(),
38790            codespace_name,
38791            export_id,
38792            self.config.user_agent.as_ref(),
38793            self.config.accept.as_deref(),
38794        )?
38795        .with_authentication(&theScheme)?;
38796
38797        let theRequest =
38798            crate::v1_1_4::request::codespaces_get_export_details_for_authenticated_user::hyper_request(theBuilder)?;
38799
38800        ::log::debug!("HTTP request: {:?}", &theRequest);
38801
38802        let theResponse = self.client.request(theRequest).await?;
38803
38804        ::log::debug!("HTTP response: {:?}", &theResponse);
38805
38806        Ok(theResponse)
38807    }
38808
38809    /// List machine types for a codespace
38810    /// 
38811    /// List the machine types a codespace can transition to use.
38812    /// 
38813    /// You must authenticate using an access token with the `codespace` scope to use this endpoint.
38814    /// 
38815    /// GitHub Apps must have read access to the `codespaces_metadata` repository permission to use this endpoint.
38816    /// 
38817    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace)
38818    pub async fn codespaces_codespace_machines_for_authenticated_user(
38819        &self,
38820        codespace_name: &str,
38821    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38822        let mut theScheme = AuthScheme::from(&self.config.authentication);
38823
38824        while let Some(auth_step) = theScheme.step()? {
38825            match auth_step {
38826                ::authentic::AuthenticationStep::Request(auth_request) => {
38827                    theScheme.respond(self.client.request(auth_request).await);
38828                }
38829                ::authentic::AuthenticationStep::WaitFor(duration) => {
38830                    (self.sleep)(duration).await;
38831                }
38832            }
38833        }
38834        let theBuilder = crate::v1_1_4::request::codespaces_codespace_machines_for_authenticated_user::http_builder(
38835            self.config.base_url.as_ref(),
38836            codespace_name,
38837            self.config.user_agent.as_ref(),
38838            self.config.accept.as_deref(),
38839        )?
38840        .with_authentication(&theScheme)?;
38841
38842        let theRequest =
38843            crate::v1_1_4::request::codespaces_codespace_machines_for_authenticated_user::hyper_request(theBuilder)?;
38844
38845        ::log::debug!("HTTP request: {:?}", &theRequest);
38846
38847        let theResponse = self.client.request(theRequest).await?;
38848
38849        ::log::debug!("HTTP response: {:?}", &theResponse);
38850
38851        Ok(theResponse)
38852    }
38853
38854    /// Start a codespace for the authenticated user
38855    /// 
38856    /// Starts a user's codespace.
38857    /// 
38858    /// You must authenticate using an access token with the `codespace` scope to use this endpoint.
38859    /// 
38860    /// GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint.
38861    /// 
38862    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user)
38863    pub async fn codespaces_start_for_authenticated_user(
38864        &self,
38865        codespace_name: &str,
38866    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38867        let mut theScheme = AuthScheme::from(&self.config.authentication);
38868
38869        while let Some(auth_step) = theScheme.step()? {
38870            match auth_step {
38871                ::authentic::AuthenticationStep::Request(auth_request) => {
38872                    theScheme.respond(self.client.request(auth_request).await);
38873                }
38874                ::authentic::AuthenticationStep::WaitFor(duration) => {
38875                    (self.sleep)(duration).await;
38876                }
38877            }
38878        }
38879        let theBuilder = crate::v1_1_4::request::codespaces_start_for_authenticated_user::http_builder(
38880            self.config.base_url.as_ref(),
38881            codespace_name,
38882            self.config.user_agent.as_ref(),
38883            self.config.accept.as_deref(),
38884        )?
38885        .with_authentication(&theScheme)?;
38886
38887        let theRequest =
38888            crate::v1_1_4::request::codespaces_start_for_authenticated_user::hyper_request(theBuilder)?;
38889
38890        ::log::debug!("HTTP request: {:?}", &theRequest);
38891
38892        let theResponse = self.client.request(theRequest).await?;
38893
38894        ::log::debug!("HTTP response: {:?}", &theResponse);
38895
38896        Ok(theResponse)
38897    }
38898
38899    /// Stop a codespace for the authenticated user
38900    /// 
38901    /// Stops a user's codespace.
38902    /// 
38903    /// You must authenticate using an access token with the `codespace` scope to use this endpoint.
38904    /// 
38905    /// GitHub Apps must have write access to the `codespaces_lifecycle_admin` repository permission to use this endpoint.
38906    /// 
38907    /// [API method documentation](https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user)
38908    pub async fn codespaces_stop_for_authenticated_user(
38909        &self,
38910        codespace_name: &str,
38911    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
38912        let mut theScheme = AuthScheme::from(&self.config.authentication);
38913
38914        while let Some(auth_step) = theScheme.step()? {
38915            match auth_step {
38916                ::authentic::AuthenticationStep::Request(auth_request) => {
38917                    theScheme.respond(self.client.request(auth_request).await);
38918                }
38919                ::authentic::AuthenticationStep::WaitFor(duration) => {
38920                    (self.sleep)(duration).await;
38921                }
38922            }
38923        }
38924        let theBuilder = crate::v1_1_4::request::codespaces_stop_for_authenticated_user::http_builder(
38925            self.config.base_url.as_ref(),
38926            codespace_name,
38927            self.config.user_agent.as_ref(),
38928            self.config.accept.as_deref(),
38929        )?
38930        .with_authentication(&theScheme)?;
38931
38932        let theRequest =
38933            crate::v1_1_4::request::codespaces_stop_for_authenticated_user::hyper_request(theBuilder)?;
38934
38935        ::log::debug!("HTTP request: {:?}", &theRequest);
38936
38937        let theResponse = self.client.request(theRequest).await?;
38938
38939        ::log::debug!("HTTP response: {:?}", &theResponse);
38940
38941        Ok(theResponse)
38942    }
38943
38944    /// Set primary email visibility for the authenticated user
38945    /// 
38946    /// Sets the visibility for your primary email addresses.
38947    /// 
38948    /// [API method documentation](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user)
38949    ///
38950    /// # Content
38951    ///
38952    /// - [`&v1_1_4::request::users_set_primary_email_visibility_for_authenticated_user::body::Json`](crate::v1_1_4::request::users_set_primary_email_visibility_for_authenticated_user::body::Json)
38953    pub async fn users_set_primary_email_visibility_for_authenticated_user<Content>(
38954        &self,
38955        theContent: Content,
38956    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
38957    where
38958        Content: Copy + TryInto<crate::v1_1_4::request::users_set_primary_email_visibility_for_authenticated_user::Content<::hyper::Body>>,
38959        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::users_set_primary_email_visibility_for_authenticated_user::Content<::hyper::Body>>>::Error>
38960    {
38961        let mut theScheme = AuthScheme::from(&self.config.authentication);
38962
38963        while let Some(auth_step) = theScheme.step()? {
38964            match auth_step {
38965                ::authentic::AuthenticationStep::Request(auth_request) => {
38966                    theScheme.respond(self.client.request(auth_request).await);
38967                }
38968                ::authentic::AuthenticationStep::WaitFor(duration) => {
38969                    (self.sleep)(duration).await;
38970                }
38971            }
38972        }
38973        let theBuilder = crate::v1_1_4::request::users_set_primary_email_visibility_for_authenticated_user::http_builder(
38974            self.config.base_url.as_ref(),
38975            self.config.user_agent.as_ref(),
38976            self.config.accept.as_deref(),
38977        )?
38978        .with_authentication(&theScheme)?;
38979
38980        let theRequest = crate::v1_1_4::request::users_set_primary_email_visibility_for_authenticated_user::hyper_request(
38981            theBuilder,
38982            theContent.try_into()?,
38983        )?;
38984
38985        ::log::debug!("HTTP request: {:?}", &theRequest);
38986
38987        let theResponse = self.client.request(theRequest).await?;
38988
38989        ::log::debug!("HTTP response: {:?}", &theResponse);
38990
38991        Ok(theResponse)
38992    }
38993
38994    /// List email addresses for the authenticated user
38995    /// 
38996    /// Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope.
38997    /// 
38998    /// [API method documentation](https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user)
38999    pub async fn users_list_emails_for_authenticated_user(
39000        &self,
39001        per_page: ::std::option::Option<i64>,
39002        page: ::std::option::Option<i64>,
39003    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39004        let mut theScheme = AuthScheme::from(&self.config.authentication);
39005
39006        while let Some(auth_step) = theScheme.step()? {
39007            match auth_step {
39008                ::authentic::AuthenticationStep::Request(auth_request) => {
39009                    theScheme.respond(self.client.request(auth_request).await);
39010                }
39011                ::authentic::AuthenticationStep::WaitFor(duration) => {
39012                    (self.sleep)(duration).await;
39013                }
39014            }
39015        }
39016        let theBuilder = crate::v1_1_4::request::users_list_emails_for_authenticated_user::http_builder(
39017            self.config.base_url.as_ref(),
39018            per_page,
39019            page,
39020            self.config.user_agent.as_ref(),
39021            self.config.accept.as_deref(),
39022        )?
39023        .with_authentication(&theScheme)?;
39024
39025        let theRequest =
39026            crate::v1_1_4::request::users_list_emails_for_authenticated_user::hyper_request(theBuilder)?;
39027
39028        ::log::debug!("HTTP request: {:?}", &theRequest);
39029
39030        let theResponse = self.client.request(theRequest).await?;
39031
39032        ::log::debug!("HTTP response: {:?}", &theResponse);
39033
39034        Ok(theResponse)
39035    }
39036
39037    /// Add an email address for the authenticated user
39038    /// 
39039    /// This endpoint is accessible with the `user` scope.
39040    /// 
39041    /// [API method documentation](https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user)
39042    ///
39043    /// # Content
39044    ///
39045    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
39046    pub async fn users_add_email_for_authenticated_user<Content>(
39047        &self,
39048        theContent: Content,
39049    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
39050    where
39051        Content: Copy + TryInto<crate::v1_1_4::request::users_add_email_for_authenticated_user::Content<::hyper::Body>>,
39052        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::users_add_email_for_authenticated_user::Content<::hyper::Body>>>::Error>
39053    {
39054        let mut theScheme = AuthScheme::from(&self.config.authentication);
39055
39056        while let Some(auth_step) = theScheme.step()? {
39057            match auth_step {
39058                ::authentic::AuthenticationStep::Request(auth_request) => {
39059                    theScheme.respond(self.client.request(auth_request).await);
39060                }
39061                ::authentic::AuthenticationStep::WaitFor(duration) => {
39062                    (self.sleep)(duration).await;
39063                }
39064            }
39065        }
39066        let theBuilder = crate::v1_1_4::request::users_add_email_for_authenticated_user::http_builder(
39067            self.config.base_url.as_ref(),
39068            self.config.user_agent.as_ref(),
39069            self.config.accept.as_deref(),
39070        )?
39071        .with_authentication(&theScheme)?;
39072
39073        let theRequest = crate::v1_1_4::request::users_add_email_for_authenticated_user::hyper_request(
39074            theBuilder,
39075            theContent.try_into()?,
39076        )?;
39077
39078        ::log::debug!("HTTP request: {:?}", &theRequest);
39079
39080        let theResponse = self.client.request(theRequest).await?;
39081
39082        ::log::debug!("HTTP response: {:?}", &theResponse);
39083
39084        Ok(theResponse)
39085    }
39086
39087    /// Delete an email address for the authenticated user
39088    /// 
39089    /// This endpoint is accessible with the `user` scope.
39090    /// 
39091    /// [API method documentation](https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user)
39092    ///
39093    /// # Content
39094    ///
39095    /// - [`&::serde_json::value::Value`](::serde_json::value::Value)
39096    pub async fn users_delete_email_for_authenticated_user<Content>(
39097        &self,
39098        theContent: Content,
39099    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
39100    where
39101        Content: Copy + TryInto<crate::v1_1_4::request::users_delete_email_for_authenticated_user::Content<::hyper::Body>>,
39102        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::users_delete_email_for_authenticated_user::Content<::hyper::Body>>>::Error>
39103    {
39104        let mut theScheme = AuthScheme::from(&self.config.authentication);
39105
39106        while let Some(auth_step) = theScheme.step()? {
39107            match auth_step {
39108                ::authentic::AuthenticationStep::Request(auth_request) => {
39109                    theScheme.respond(self.client.request(auth_request).await);
39110                }
39111                ::authentic::AuthenticationStep::WaitFor(duration) => {
39112                    (self.sleep)(duration).await;
39113                }
39114            }
39115        }
39116        let theBuilder = crate::v1_1_4::request::users_delete_email_for_authenticated_user::http_builder(
39117            self.config.base_url.as_ref(),
39118            self.config.user_agent.as_ref(),
39119            self.config.accept.as_deref(),
39120        )?
39121        .with_authentication(&theScheme)?;
39122
39123        let theRequest = crate::v1_1_4::request::users_delete_email_for_authenticated_user::hyper_request(
39124            theBuilder,
39125            theContent.try_into()?,
39126        )?;
39127
39128        ::log::debug!("HTTP request: {:?}", &theRequest);
39129
39130        let theResponse = self.client.request(theRequest).await?;
39131
39132        ::log::debug!("HTTP response: {:?}", &theResponse);
39133
39134        Ok(theResponse)
39135    }
39136
39137    /// List followers of the authenticated user
39138    /// 
39139    /// Lists the people following the authenticated user.
39140    /// 
39141    /// [API method documentation](https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user)
39142    pub async fn users_list_followers_for_authenticated_user(
39143        &self,
39144        per_page: ::std::option::Option<i64>,
39145        page: ::std::option::Option<i64>,
39146    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39147        let mut theScheme = AuthScheme::from(&self.config.authentication);
39148
39149        while let Some(auth_step) = theScheme.step()? {
39150            match auth_step {
39151                ::authentic::AuthenticationStep::Request(auth_request) => {
39152                    theScheme.respond(self.client.request(auth_request).await);
39153                }
39154                ::authentic::AuthenticationStep::WaitFor(duration) => {
39155                    (self.sleep)(duration).await;
39156                }
39157            }
39158        }
39159        let theBuilder = crate::v1_1_4::request::users_list_followers_for_authenticated_user::http_builder(
39160            self.config.base_url.as_ref(),
39161            per_page,
39162            page,
39163            self.config.user_agent.as_ref(),
39164            self.config.accept.as_deref(),
39165        )?
39166        .with_authentication(&theScheme)?;
39167
39168        let theRequest =
39169            crate::v1_1_4::request::users_list_followers_for_authenticated_user::hyper_request(theBuilder)?;
39170
39171        ::log::debug!("HTTP request: {:?}", &theRequest);
39172
39173        let theResponse = self.client.request(theRequest).await?;
39174
39175        ::log::debug!("HTTP response: {:?}", &theResponse);
39176
39177        Ok(theResponse)
39178    }
39179
39180    /// List the people the authenticated user follows
39181    /// 
39182    /// Lists the people who the authenticated user follows.
39183    /// 
39184    /// [API method documentation](https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows)
39185    pub async fn users_list_followed_by_authenticated_user(
39186        &self,
39187        per_page: ::std::option::Option<i64>,
39188        page: ::std::option::Option<i64>,
39189    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39190        let mut theScheme = AuthScheme::from(&self.config.authentication);
39191
39192        while let Some(auth_step) = theScheme.step()? {
39193            match auth_step {
39194                ::authentic::AuthenticationStep::Request(auth_request) => {
39195                    theScheme.respond(self.client.request(auth_request).await);
39196                }
39197                ::authentic::AuthenticationStep::WaitFor(duration) => {
39198                    (self.sleep)(duration).await;
39199                }
39200            }
39201        }
39202        let theBuilder = crate::v1_1_4::request::users_list_followed_by_authenticated_user::http_builder(
39203            self.config.base_url.as_ref(),
39204            per_page,
39205            page,
39206            self.config.user_agent.as_ref(),
39207            self.config.accept.as_deref(),
39208        )?
39209        .with_authentication(&theScheme)?;
39210
39211        let theRequest =
39212            crate::v1_1_4::request::users_list_followed_by_authenticated_user::hyper_request(theBuilder)?;
39213
39214        ::log::debug!("HTTP request: {:?}", &theRequest);
39215
39216        let theResponse = self.client.request(theRequest).await?;
39217
39218        ::log::debug!("HTTP response: {:?}", &theResponse);
39219
39220        Ok(theResponse)
39221    }
39222
39223    /// Check if a person is followed by the authenticated user
39224    /// 
39225    /// [API method documentation](https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user)
39226    pub async fn users_check_person_is_followed_by_authenticated(
39227        &self,
39228        username: &str,
39229    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39230        let mut theScheme = AuthScheme::from(&self.config.authentication);
39231
39232        while let Some(auth_step) = theScheme.step()? {
39233            match auth_step {
39234                ::authentic::AuthenticationStep::Request(auth_request) => {
39235                    theScheme.respond(self.client.request(auth_request).await);
39236                }
39237                ::authentic::AuthenticationStep::WaitFor(duration) => {
39238                    (self.sleep)(duration).await;
39239                }
39240            }
39241        }
39242        let theBuilder = crate::v1_1_4::request::users_check_person_is_followed_by_authenticated::http_builder(
39243            self.config.base_url.as_ref(),
39244            username,
39245            self.config.user_agent.as_ref(),
39246            self.config.accept.as_deref(),
39247        )?
39248        .with_authentication(&theScheme)?;
39249
39250        let theRequest =
39251            crate::v1_1_4::request::users_check_person_is_followed_by_authenticated::hyper_request(theBuilder)?;
39252
39253        ::log::debug!("HTTP request: {:?}", &theRequest);
39254
39255        let theResponse = self.client.request(theRequest).await?;
39256
39257        ::log::debug!("HTTP response: {:?}", &theResponse);
39258
39259        Ok(theResponse)
39260    }
39261
39262    /// Follow a user
39263    /// 
39264    /// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
39265    /// 
39266    /// Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope.
39267    /// 
39268    /// [API method documentation](https://docs.github.com/rest/reference/users#follow-a-user)
39269    pub async fn users_follow(
39270        &self,
39271        username: &str,
39272    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39273        let mut theScheme = AuthScheme::from(&self.config.authentication);
39274
39275        while let Some(auth_step) = theScheme.step()? {
39276            match auth_step {
39277                ::authentic::AuthenticationStep::Request(auth_request) => {
39278                    theScheme.respond(self.client.request(auth_request).await);
39279                }
39280                ::authentic::AuthenticationStep::WaitFor(duration) => {
39281                    (self.sleep)(duration).await;
39282                }
39283            }
39284        }
39285        let theBuilder = crate::v1_1_4::request::users_follow::http_builder(
39286            self.config.base_url.as_ref(),
39287            username,
39288            self.config.user_agent.as_ref(),
39289            self.config.accept.as_deref(),
39290        )?
39291        .with_authentication(&theScheme)?;
39292
39293        let theRequest =
39294            crate::v1_1_4::request::users_follow::hyper_request(theBuilder)?;
39295
39296        ::log::debug!("HTTP request: {:?}", &theRequest);
39297
39298        let theResponse = self.client.request(theRequest).await?;
39299
39300        ::log::debug!("HTTP response: {:?}", &theResponse);
39301
39302        Ok(theResponse)
39303    }
39304
39305    /// Unfollow a user
39306    /// 
39307    /// Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope.
39308    /// 
39309    /// [API method documentation](https://docs.github.com/rest/reference/users#unfollow-a-user)
39310    pub async fn users_unfollow(
39311        &self,
39312        username: &str,
39313    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39314        let mut theScheme = AuthScheme::from(&self.config.authentication);
39315
39316        while let Some(auth_step) = theScheme.step()? {
39317            match auth_step {
39318                ::authentic::AuthenticationStep::Request(auth_request) => {
39319                    theScheme.respond(self.client.request(auth_request).await);
39320                }
39321                ::authentic::AuthenticationStep::WaitFor(duration) => {
39322                    (self.sleep)(duration).await;
39323                }
39324            }
39325        }
39326        let theBuilder = crate::v1_1_4::request::users_unfollow::http_builder(
39327            self.config.base_url.as_ref(),
39328            username,
39329            self.config.user_agent.as_ref(),
39330            self.config.accept.as_deref(),
39331        )?
39332        .with_authentication(&theScheme)?;
39333
39334        let theRequest =
39335            crate::v1_1_4::request::users_unfollow::hyper_request(theBuilder)?;
39336
39337        ::log::debug!("HTTP request: {:?}", &theRequest);
39338
39339        let theResponse = self.client.request(theRequest).await?;
39340
39341        ::log::debug!("HTTP response: {:?}", &theResponse);
39342
39343        Ok(theResponse)
39344    }
39345
39346    /// List GPG keys for the authenticated user
39347    /// 
39348    /// Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
39349    /// 
39350    /// [API method documentation](https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user)
39351    pub async fn users_list_gpg_keys_for_authenticated_user(
39352        &self,
39353        per_page: ::std::option::Option<i64>,
39354        page: ::std::option::Option<i64>,
39355    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39356        let mut theScheme = AuthScheme::from(&self.config.authentication);
39357
39358        while let Some(auth_step) = theScheme.step()? {
39359            match auth_step {
39360                ::authentic::AuthenticationStep::Request(auth_request) => {
39361                    theScheme.respond(self.client.request(auth_request).await);
39362                }
39363                ::authentic::AuthenticationStep::WaitFor(duration) => {
39364                    (self.sleep)(duration).await;
39365                }
39366            }
39367        }
39368        let theBuilder = crate::v1_1_4::request::users_list_gpg_keys_for_authenticated_user::http_builder(
39369            self.config.base_url.as_ref(),
39370            per_page,
39371            page,
39372            self.config.user_agent.as_ref(),
39373            self.config.accept.as_deref(),
39374        )?
39375        .with_authentication(&theScheme)?;
39376
39377        let theRequest =
39378            crate::v1_1_4::request::users_list_gpg_keys_for_authenticated_user::hyper_request(theBuilder)?;
39379
39380        ::log::debug!("HTTP request: {:?}", &theRequest);
39381
39382        let theResponse = self.client.request(theRequest).await?;
39383
39384        ::log::debug!("HTTP response: {:?}", &theResponse);
39385
39386        Ok(theResponse)
39387    }
39388
39389    /// Create a GPG key for the authenticated user
39390    /// 
39391    /// Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
39392    /// 
39393    /// [API method documentation](https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user)
39394    ///
39395    /// # Content
39396    ///
39397    /// - [`&v1_1_4::request::users_create_gpg_key_for_authenticated_user::body::Json`](crate::v1_1_4::request::users_create_gpg_key_for_authenticated_user::body::Json)
39398    pub async fn users_create_gpg_key_for_authenticated_user<Content>(
39399        &self,
39400        theContent: Content,
39401    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
39402    where
39403        Content: Copy + TryInto<crate::v1_1_4::request::users_create_gpg_key_for_authenticated_user::Content<::hyper::Body>>,
39404        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::users_create_gpg_key_for_authenticated_user::Content<::hyper::Body>>>::Error>
39405    {
39406        let mut theScheme = AuthScheme::from(&self.config.authentication);
39407
39408        while let Some(auth_step) = theScheme.step()? {
39409            match auth_step {
39410                ::authentic::AuthenticationStep::Request(auth_request) => {
39411                    theScheme.respond(self.client.request(auth_request).await);
39412                }
39413                ::authentic::AuthenticationStep::WaitFor(duration) => {
39414                    (self.sleep)(duration).await;
39415                }
39416            }
39417        }
39418        let theBuilder = crate::v1_1_4::request::users_create_gpg_key_for_authenticated_user::http_builder(
39419            self.config.base_url.as_ref(),
39420            self.config.user_agent.as_ref(),
39421            self.config.accept.as_deref(),
39422        )?
39423        .with_authentication(&theScheme)?;
39424
39425        let theRequest = crate::v1_1_4::request::users_create_gpg_key_for_authenticated_user::hyper_request(
39426            theBuilder,
39427            theContent.try_into()?,
39428        )?;
39429
39430        ::log::debug!("HTTP request: {:?}", &theRequest);
39431
39432        let theResponse = self.client.request(theRequest).await?;
39433
39434        ::log::debug!("HTTP response: {:?}", &theResponse);
39435
39436        Ok(theResponse)
39437    }
39438
39439    /// Get a GPG key for the authenticated user
39440    /// 
39441    /// View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
39442    /// 
39443    /// [API method documentation](https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user)
39444    pub async fn users_get_gpg_key_for_authenticated_user(
39445        &self,
39446        gpg_key_id: i64,
39447    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39448        let mut theScheme = AuthScheme::from(&self.config.authentication);
39449
39450        while let Some(auth_step) = theScheme.step()? {
39451            match auth_step {
39452                ::authentic::AuthenticationStep::Request(auth_request) => {
39453                    theScheme.respond(self.client.request(auth_request).await);
39454                }
39455                ::authentic::AuthenticationStep::WaitFor(duration) => {
39456                    (self.sleep)(duration).await;
39457                }
39458            }
39459        }
39460        let theBuilder = crate::v1_1_4::request::users_get_gpg_key_for_authenticated_user::http_builder(
39461            self.config.base_url.as_ref(),
39462            gpg_key_id,
39463            self.config.user_agent.as_ref(),
39464            self.config.accept.as_deref(),
39465        )?
39466        .with_authentication(&theScheme)?;
39467
39468        let theRequest =
39469            crate::v1_1_4::request::users_get_gpg_key_for_authenticated_user::hyper_request(theBuilder)?;
39470
39471        ::log::debug!("HTTP request: {:?}", &theRequest);
39472
39473        let theResponse = self.client.request(theRequest).await?;
39474
39475        ::log::debug!("HTTP response: {:?}", &theResponse);
39476
39477        Ok(theResponse)
39478    }
39479
39480    /// Delete a GPG key for the authenticated user
39481    /// 
39482    /// Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
39483    /// 
39484    /// [API method documentation](https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user)
39485    pub async fn users_delete_gpg_key_for_authenticated_user(
39486        &self,
39487        gpg_key_id: i64,
39488    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39489        let mut theScheme = AuthScheme::from(&self.config.authentication);
39490
39491        while let Some(auth_step) = theScheme.step()? {
39492            match auth_step {
39493                ::authentic::AuthenticationStep::Request(auth_request) => {
39494                    theScheme.respond(self.client.request(auth_request).await);
39495                }
39496                ::authentic::AuthenticationStep::WaitFor(duration) => {
39497                    (self.sleep)(duration).await;
39498                }
39499            }
39500        }
39501        let theBuilder = crate::v1_1_4::request::users_delete_gpg_key_for_authenticated_user::http_builder(
39502            self.config.base_url.as_ref(),
39503            gpg_key_id,
39504            self.config.user_agent.as_ref(),
39505            self.config.accept.as_deref(),
39506        )?
39507        .with_authentication(&theScheme)?;
39508
39509        let theRequest =
39510            crate::v1_1_4::request::users_delete_gpg_key_for_authenticated_user::hyper_request(theBuilder)?;
39511
39512        ::log::debug!("HTTP request: {:?}", &theRequest);
39513
39514        let theResponse = self.client.request(theRequest).await?;
39515
39516        ::log::debug!("HTTP response: {:?}", &theResponse);
39517
39518        Ok(theResponse)
39519    }
39520
39521    /// List app installations accessible to the user access token
39522    /// 
39523    /// Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.
39524    /// 
39525    /// You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint.
39526    /// 
39527    /// The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
39528    /// 
39529    /// You can find the permissions for the installation under the `permissions` key.
39530    /// 
39531    /// [API method documentation](https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token)
39532    pub async fn apps_list_installations_for_authenticated_user(
39533        &self,
39534        per_page: ::std::option::Option<i64>,
39535        page: ::std::option::Option<i64>,
39536    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39537        let mut theScheme = AuthScheme::from(&self.config.authentication);
39538
39539        while let Some(auth_step) = theScheme.step()? {
39540            match auth_step {
39541                ::authentic::AuthenticationStep::Request(auth_request) => {
39542                    theScheme.respond(self.client.request(auth_request).await);
39543                }
39544                ::authentic::AuthenticationStep::WaitFor(duration) => {
39545                    (self.sleep)(duration).await;
39546                }
39547            }
39548        }
39549        let theBuilder = crate::v1_1_4::request::apps_list_installations_for_authenticated_user::http_builder(
39550            self.config.base_url.as_ref(),
39551            per_page,
39552            page,
39553            self.config.user_agent.as_ref(),
39554            self.config.accept.as_deref(),
39555        )?
39556        .with_authentication(&theScheme)?;
39557
39558        let theRequest =
39559            crate::v1_1_4::request::apps_list_installations_for_authenticated_user::hyper_request(theBuilder)?;
39560
39561        ::log::debug!("HTTP request: {:?}", &theRequest);
39562
39563        let theResponse = self.client.request(theRequest).await?;
39564
39565        ::log::debug!("HTTP response: {:?}", &theResponse);
39566
39567        Ok(theResponse)
39568    }
39569
39570    /// List repositories accessible to the user access token
39571    /// 
39572    /// List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation.
39573    /// 
39574    /// The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
39575    /// 
39576    /// You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint.
39577    /// 
39578    /// The access the user has to each repository is included in the hash under the `permissions` key.
39579    /// 
39580    /// [API method documentation](https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token)
39581    pub async fn apps_list_installation_repos_for_authenticated_user(
39582        &self,
39583        installation_id: i64,
39584        per_page: ::std::option::Option<i64>,
39585        page: ::std::option::Option<i64>,
39586    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39587        let mut theScheme = AuthScheme::from(&self.config.authentication);
39588
39589        while let Some(auth_step) = theScheme.step()? {
39590            match auth_step {
39591                ::authentic::AuthenticationStep::Request(auth_request) => {
39592                    theScheme.respond(self.client.request(auth_request).await);
39593                }
39594                ::authentic::AuthenticationStep::WaitFor(duration) => {
39595                    (self.sleep)(duration).await;
39596                }
39597            }
39598        }
39599        let theBuilder = crate::v1_1_4::request::apps_list_installation_repos_for_authenticated_user::http_builder(
39600            self.config.base_url.as_ref(),
39601            installation_id,
39602            per_page,
39603            page,
39604            self.config.user_agent.as_ref(),
39605            self.config.accept.as_deref(),
39606        )?
39607        .with_authentication(&theScheme)?;
39608
39609        let theRequest =
39610            crate::v1_1_4::request::apps_list_installation_repos_for_authenticated_user::hyper_request(theBuilder)?;
39611
39612        ::log::debug!("HTTP request: {:?}", &theRequest);
39613
39614        let theResponse = self.client.request(theRequest).await?;
39615
39616        ::log::debug!("HTTP response: {:?}", &theResponse);
39617
39618        Ok(theResponse)
39619    }
39620
39621    /// Add a repository to an app installation
39622    /// 
39623    /// Add a single repository to an installation. The authenticated user must have admin access to the repository.
39624    /// 
39625    /// You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint.
39626    /// 
39627    /// [API method documentation](https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation)
39628    pub async fn apps_add_repo_to_installation_for_authenticated_user(
39629        &self,
39630        installation_id: i64,
39631        repository_id: i64,
39632    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39633        let mut theScheme = AuthScheme::from(&self.config.authentication);
39634
39635        while let Some(auth_step) = theScheme.step()? {
39636            match auth_step {
39637                ::authentic::AuthenticationStep::Request(auth_request) => {
39638                    theScheme.respond(self.client.request(auth_request).await);
39639                }
39640                ::authentic::AuthenticationStep::WaitFor(duration) => {
39641                    (self.sleep)(duration).await;
39642                }
39643            }
39644        }
39645        let theBuilder = crate::v1_1_4::request::apps_add_repo_to_installation_for_authenticated_user::http_builder(
39646            self.config.base_url.as_ref(),
39647            installation_id,
39648            repository_id,
39649            self.config.user_agent.as_ref(),
39650            self.config.accept.as_deref(),
39651        )?
39652        .with_authentication(&theScheme)?;
39653
39654        let theRequest =
39655            crate::v1_1_4::request::apps_add_repo_to_installation_for_authenticated_user::hyper_request(theBuilder)?;
39656
39657        ::log::debug!("HTTP request: {:?}", &theRequest);
39658
39659        let theResponse = self.client.request(theRequest).await?;
39660
39661        ::log::debug!("HTTP response: {:?}", &theResponse);
39662
39663        Ok(theResponse)
39664    }
39665
39666    /// Remove a repository from an app installation
39667    /// 
39668    /// Remove a single repository from an installation. The authenticated user must have admin access to the repository.
39669    /// 
39670    /// You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint.
39671    /// 
39672    /// [API method documentation](https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation)
39673    pub async fn apps_remove_repo_from_installation_for_authenticated_user(
39674        &self,
39675        installation_id: i64,
39676        repository_id: i64,
39677    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39678        let mut theScheme = AuthScheme::from(&self.config.authentication);
39679
39680        while let Some(auth_step) = theScheme.step()? {
39681            match auth_step {
39682                ::authentic::AuthenticationStep::Request(auth_request) => {
39683                    theScheme.respond(self.client.request(auth_request).await);
39684                }
39685                ::authentic::AuthenticationStep::WaitFor(duration) => {
39686                    (self.sleep)(duration).await;
39687                }
39688            }
39689        }
39690        let theBuilder = crate::v1_1_4::request::apps_remove_repo_from_installation_for_authenticated_user::http_builder(
39691            self.config.base_url.as_ref(),
39692            installation_id,
39693            repository_id,
39694            self.config.user_agent.as_ref(),
39695            self.config.accept.as_deref(),
39696        )?
39697        .with_authentication(&theScheme)?;
39698
39699        let theRequest =
39700            crate::v1_1_4::request::apps_remove_repo_from_installation_for_authenticated_user::hyper_request(theBuilder)?;
39701
39702        ::log::debug!("HTTP request: {:?}", &theRequest);
39703
39704        let theResponse = self.client.request(theRequest).await?;
39705
39706        ::log::debug!("HTTP response: {:?}", &theResponse);
39707
39708        Ok(theResponse)
39709    }
39710
39711    /// Get interaction restrictions for your public repositories
39712    /// 
39713    /// Shows which type of GitHub user can interact with your public repositories and when the restriction expires.
39714    /// 
39715    /// [API method documentation](https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories)
39716    pub async fn interactions_get_restrictions_for_authenticated_user(
39717        &self,
39718    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39719        let mut theScheme = AuthScheme::from(&self.config.authentication);
39720
39721        while let Some(auth_step) = theScheme.step()? {
39722            match auth_step {
39723                ::authentic::AuthenticationStep::Request(auth_request) => {
39724                    theScheme.respond(self.client.request(auth_request).await);
39725                }
39726                ::authentic::AuthenticationStep::WaitFor(duration) => {
39727                    (self.sleep)(duration).await;
39728                }
39729            }
39730        }
39731        let theBuilder = crate::v1_1_4::request::interactions_get_restrictions_for_authenticated_user::http_builder(
39732            self.config.base_url.as_ref(),
39733            self.config.user_agent.as_ref(),
39734            self.config.accept.as_deref(),
39735        )?
39736        .with_authentication(&theScheme)?;
39737
39738        let theRequest =
39739            crate::v1_1_4::request::interactions_get_restrictions_for_authenticated_user::hyper_request(theBuilder)?;
39740
39741        ::log::debug!("HTTP request: {:?}", &theRequest);
39742
39743        let theResponse = self.client.request(theRequest).await?;
39744
39745        ::log::debug!("HTTP response: {:?}", &theResponse);
39746
39747        Ok(theResponse)
39748    }
39749
39750    /// Set interaction restrictions for your public repositories
39751    /// 
39752    /// Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user.
39753    /// 
39754    /// [API method documentation](https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories)
39755    ///
39756    /// # Content
39757    ///
39758    /// - [`&v1_1_4::schema::InteractionLimit`](crate::v1_1_4::schema::InteractionLimit)
39759    pub async fn interactions_set_restrictions_for_authenticated_user<Content>(
39760        &self,
39761        theContent: Content,
39762    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
39763    where
39764        Content: Copy + TryInto<crate::v1_1_4::request::interactions_set_restrictions_for_authenticated_user::Content<::hyper::Body>>,
39765        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::interactions_set_restrictions_for_authenticated_user::Content<::hyper::Body>>>::Error>
39766    {
39767        let mut theScheme = AuthScheme::from(&self.config.authentication);
39768
39769        while let Some(auth_step) = theScheme.step()? {
39770            match auth_step {
39771                ::authentic::AuthenticationStep::Request(auth_request) => {
39772                    theScheme.respond(self.client.request(auth_request).await);
39773                }
39774                ::authentic::AuthenticationStep::WaitFor(duration) => {
39775                    (self.sleep)(duration).await;
39776                }
39777            }
39778        }
39779        let theBuilder = crate::v1_1_4::request::interactions_set_restrictions_for_authenticated_user::http_builder(
39780            self.config.base_url.as_ref(),
39781            self.config.user_agent.as_ref(),
39782            self.config.accept.as_deref(),
39783        )?
39784        .with_authentication(&theScheme)?;
39785
39786        let theRequest = crate::v1_1_4::request::interactions_set_restrictions_for_authenticated_user::hyper_request(
39787            theBuilder,
39788            theContent.try_into()?,
39789        )?;
39790
39791        ::log::debug!("HTTP request: {:?}", &theRequest);
39792
39793        let theResponse = self.client.request(theRequest).await?;
39794
39795        ::log::debug!("HTTP response: {:?}", &theResponse);
39796
39797        Ok(theResponse)
39798    }
39799
39800    /// Remove interaction restrictions from your public repositories
39801    /// 
39802    /// Removes any interaction restrictions from your public repositories.
39803    /// 
39804    /// [API method documentation](https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories)
39805    pub async fn interactions_remove_restrictions_for_authenticated_user(
39806        &self,
39807    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39808        let mut theScheme = AuthScheme::from(&self.config.authentication);
39809
39810        while let Some(auth_step) = theScheme.step()? {
39811            match auth_step {
39812                ::authentic::AuthenticationStep::Request(auth_request) => {
39813                    theScheme.respond(self.client.request(auth_request).await);
39814                }
39815                ::authentic::AuthenticationStep::WaitFor(duration) => {
39816                    (self.sleep)(duration).await;
39817                }
39818            }
39819        }
39820        let theBuilder = crate::v1_1_4::request::interactions_remove_restrictions_for_authenticated_user::http_builder(
39821            self.config.base_url.as_ref(),
39822            self.config.user_agent.as_ref(),
39823            self.config.accept.as_deref(),
39824        )?
39825        .with_authentication(&theScheme)?;
39826
39827        let theRequest =
39828            crate::v1_1_4::request::interactions_remove_restrictions_for_authenticated_user::hyper_request(theBuilder)?;
39829
39830        ::log::debug!("HTTP request: {:?}", &theRequest);
39831
39832        let theResponse = self.client.request(theRequest).await?;
39833
39834        ::log::debug!("HTTP response: {:?}", &theResponse);
39835
39836        Ok(theResponse)
39837    }
39838
39839    /// List user account issues assigned to the authenticated user
39840    /// 
39841    /// List issues across owned and member repositories assigned to the authenticated user.
39842    /// 
39843    /// **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this
39844    /// reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by
39845    /// the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull
39846    /// request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint.
39847    /// 
39848    /// [API method documentation](https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user)
39849    pub async fn issues_list_for_authenticated_user(
39850        &self,
39851        filter: &crate::types::IssueFilter<'_>,
39852        sort: &crate::types::Sort<'_>,
39853        per_page: ::std::option::Option<i64>,
39854        page: ::std::option::Option<i64>,
39855    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39856        let (sort, direction) = sort.extract();
39857        let mut theScheme = AuthScheme::from(&self.config.authentication);
39858
39859        while let Some(auth_step) = theScheme.step()? {
39860            match auth_step {
39861                ::authentic::AuthenticationStep::Request(auth_request) => {
39862                    theScheme.respond(self.client.request(auth_request).await);
39863                }
39864                ::authentic::AuthenticationStep::WaitFor(duration) => {
39865                    (self.sleep)(duration).await;
39866                }
39867            }
39868        }
39869        let theBuilder = crate::v1_1_4::request::issues_list_for_authenticated_user::http_builder(
39870            self.config.base_url.as_ref(),
39871            filter.filter,
39872            filter.state,
39873            filter.labels,
39874            sort,
39875            direction,
39876            filter.since,
39877            per_page,
39878            page,
39879            self.config.user_agent.as_ref(),
39880            self.config.accept.as_deref(),
39881        )?
39882        .with_authentication(&theScheme)?;
39883
39884        let theRequest =
39885            crate::v1_1_4::request::issues_list_for_authenticated_user::hyper_request(theBuilder)?;
39886
39887        ::log::debug!("HTTP request: {:?}", &theRequest);
39888
39889        let theResponse = self.client.request(theRequest).await?;
39890
39891        ::log::debug!("HTTP response: {:?}", &theResponse);
39892
39893        Ok(theResponse)
39894    }
39895
39896    /// List public SSH keys for the authenticated user
39897    /// 
39898    /// Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
39899    /// 
39900    /// [API method documentation](https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user)
39901    pub async fn users_list_public_ssh_keys_for_authenticated_user(
39902        &self,
39903        per_page: ::std::option::Option<i64>,
39904        page: ::std::option::Option<i64>,
39905    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39906        let mut theScheme = AuthScheme::from(&self.config.authentication);
39907
39908        while let Some(auth_step) = theScheme.step()? {
39909            match auth_step {
39910                ::authentic::AuthenticationStep::Request(auth_request) => {
39911                    theScheme.respond(self.client.request(auth_request).await);
39912                }
39913                ::authentic::AuthenticationStep::WaitFor(duration) => {
39914                    (self.sleep)(duration).await;
39915                }
39916            }
39917        }
39918        let theBuilder = crate::v1_1_4::request::users_list_public_ssh_keys_for_authenticated_user::http_builder(
39919            self.config.base_url.as_ref(),
39920            per_page,
39921            page,
39922            self.config.user_agent.as_ref(),
39923            self.config.accept.as_deref(),
39924        )?
39925        .with_authentication(&theScheme)?;
39926
39927        let theRequest =
39928            crate::v1_1_4::request::users_list_public_ssh_keys_for_authenticated_user::hyper_request(theBuilder)?;
39929
39930        ::log::debug!("HTTP request: {:?}", &theRequest);
39931
39932        let theResponse = self.client.request(theRequest).await?;
39933
39934        ::log::debug!("HTTP response: {:?}", &theResponse);
39935
39936        Ok(theResponse)
39937    }
39938
39939    /// Create a public SSH key for the authenticated user
39940    /// 
39941    /// Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
39942    /// 
39943    /// [API method documentation](https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user)
39944    ///
39945    /// # Content
39946    ///
39947    /// - [`&v1_1_4::request::users_create_public_ssh_key_for_authenticated_user::body::Json`](crate::v1_1_4::request::users_create_public_ssh_key_for_authenticated_user::body::Json)
39948    pub async fn users_create_public_ssh_key_for_authenticated_user<Content>(
39949        &self,
39950        theContent: Content,
39951    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
39952    where
39953        Content: Copy + TryInto<crate::v1_1_4::request::users_create_public_ssh_key_for_authenticated_user::Content<::hyper::Body>>,
39954        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::users_create_public_ssh_key_for_authenticated_user::Content<::hyper::Body>>>::Error>
39955    {
39956        let mut theScheme = AuthScheme::from(&self.config.authentication);
39957
39958        while let Some(auth_step) = theScheme.step()? {
39959            match auth_step {
39960                ::authentic::AuthenticationStep::Request(auth_request) => {
39961                    theScheme.respond(self.client.request(auth_request).await);
39962                }
39963                ::authentic::AuthenticationStep::WaitFor(duration) => {
39964                    (self.sleep)(duration).await;
39965                }
39966            }
39967        }
39968        let theBuilder = crate::v1_1_4::request::users_create_public_ssh_key_for_authenticated_user::http_builder(
39969            self.config.base_url.as_ref(),
39970            self.config.user_agent.as_ref(),
39971            self.config.accept.as_deref(),
39972        )?
39973        .with_authentication(&theScheme)?;
39974
39975        let theRequest = crate::v1_1_4::request::users_create_public_ssh_key_for_authenticated_user::hyper_request(
39976            theBuilder,
39977            theContent.try_into()?,
39978        )?;
39979
39980        ::log::debug!("HTTP request: {:?}", &theRequest);
39981
39982        let theResponse = self.client.request(theRequest).await?;
39983
39984        ::log::debug!("HTTP response: {:?}", &theResponse);
39985
39986        Ok(theResponse)
39987    }
39988
39989    /// Get a public SSH key for the authenticated user
39990    /// 
39991    /// View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
39992    /// 
39993    /// [API method documentation](https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user)
39994    pub async fn users_get_public_ssh_key_for_authenticated_user(
39995        &self,
39996        key_id: i64,
39997    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
39998        let mut theScheme = AuthScheme::from(&self.config.authentication);
39999
40000        while let Some(auth_step) = theScheme.step()? {
40001            match auth_step {
40002                ::authentic::AuthenticationStep::Request(auth_request) => {
40003                    theScheme.respond(self.client.request(auth_request).await);
40004                }
40005                ::authentic::AuthenticationStep::WaitFor(duration) => {
40006                    (self.sleep)(duration).await;
40007                }
40008            }
40009        }
40010        let theBuilder = crate::v1_1_4::request::users_get_public_ssh_key_for_authenticated_user::http_builder(
40011            self.config.base_url.as_ref(),
40012            key_id,
40013            self.config.user_agent.as_ref(),
40014            self.config.accept.as_deref(),
40015        )?
40016        .with_authentication(&theScheme)?;
40017
40018        let theRequest =
40019            crate::v1_1_4::request::users_get_public_ssh_key_for_authenticated_user::hyper_request(theBuilder)?;
40020
40021        ::log::debug!("HTTP request: {:?}", &theRequest);
40022
40023        let theResponse = self.client.request(theRequest).await?;
40024
40025        ::log::debug!("HTTP response: {:?}", &theResponse);
40026
40027        Ok(theResponse)
40028    }
40029
40030    /// Delete a public SSH key for the authenticated user
40031    /// 
40032    /// Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).
40033    /// 
40034    /// [API method documentation](https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user)
40035    pub async fn users_delete_public_ssh_key_for_authenticated_user(
40036        &self,
40037        key_id: i64,
40038    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40039        let mut theScheme = AuthScheme::from(&self.config.authentication);
40040
40041        while let Some(auth_step) = theScheme.step()? {
40042            match auth_step {
40043                ::authentic::AuthenticationStep::Request(auth_request) => {
40044                    theScheme.respond(self.client.request(auth_request).await);
40045                }
40046                ::authentic::AuthenticationStep::WaitFor(duration) => {
40047                    (self.sleep)(duration).await;
40048                }
40049            }
40050        }
40051        let theBuilder = crate::v1_1_4::request::users_delete_public_ssh_key_for_authenticated_user::http_builder(
40052            self.config.base_url.as_ref(),
40053            key_id,
40054            self.config.user_agent.as_ref(),
40055            self.config.accept.as_deref(),
40056        )?
40057        .with_authentication(&theScheme)?;
40058
40059        let theRequest =
40060            crate::v1_1_4::request::users_delete_public_ssh_key_for_authenticated_user::hyper_request(theBuilder)?;
40061
40062        ::log::debug!("HTTP request: {:?}", &theRequest);
40063
40064        let theResponse = self.client.request(theRequest).await?;
40065
40066        ::log::debug!("HTTP response: {:?}", &theResponse);
40067
40068        Ok(theResponse)
40069    }
40070
40071    /// List subscriptions for the authenticated user
40072    /// 
40073    /// Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/).
40074    /// 
40075    /// [API method documentation](https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user)
40076    pub async fn apps_list_subscriptions_for_authenticated_user(
40077        &self,
40078        per_page: ::std::option::Option<i64>,
40079        page: ::std::option::Option<i64>,
40080    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40081        let mut theScheme = AuthScheme::from(&self.config.authentication);
40082
40083        while let Some(auth_step) = theScheme.step()? {
40084            match auth_step {
40085                ::authentic::AuthenticationStep::Request(auth_request) => {
40086                    theScheme.respond(self.client.request(auth_request).await);
40087                }
40088                ::authentic::AuthenticationStep::WaitFor(duration) => {
40089                    (self.sleep)(duration).await;
40090                }
40091            }
40092        }
40093        let theBuilder = crate::v1_1_4::request::apps_list_subscriptions_for_authenticated_user::http_builder(
40094            self.config.base_url.as_ref(),
40095            per_page,
40096            page,
40097            self.config.user_agent.as_ref(),
40098            self.config.accept.as_deref(),
40099        )?
40100        .with_authentication(&theScheme)?;
40101
40102        let theRequest =
40103            crate::v1_1_4::request::apps_list_subscriptions_for_authenticated_user::hyper_request(theBuilder)?;
40104
40105        ::log::debug!("HTTP request: {:?}", &theRequest);
40106
40107        let theResponse = self.client.request(theRequest).await?;
40108
40109        ::log::debug!("HTTP response: {:?}", &theResponse);
40110
40111        Ok(theResponse)
40112    }
40113
40114    /// List subscriptions for the authenticated user (stubbed)
40115    /// 
40116    /// Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/).
40117    /// 
40118    /// [API method documentation](https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed)
40119    pub async fn apps_list_subscriptions_for_authenticated_user_stubbed(
40120        &self,
40121        per_page: ::std::option::Option<i64>,
40122        page: ::std::option::Option<i64>,
40123    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40124        let mut theScheme = AuthScheme::from(&self.config.authentication);
40125
40126        while let Some(auth_step) = theScheme.step()? {
40127            match auth_step {
40128                ::authentic::AuthenticationStep::Request(auth_request) => {
40129                    theScheme.respond(self.client.request(auth_request).await);
40130                }
40131                ::authentic::AuthenticationStep::WaitFor(duration) => {
40132                    (self.sleep)(duration).await;
40133                }
40134            }
40135        }
40136        let theBuilder = crate::v1_1_4::request::apps_list_subscriptions_for_authenticated_user_stubbed::http_builder(
40137            self.config.base_url.as_ref(),
40138            per_page,
40139            page,
40140            self.config.user_agent.as_ref(),
40141            self.config.accept.as_deref(),
40142        )?
40143        .with_authentication(&theScheme)?;
40144
40145        let theRequest =
40146            crate::v1_1_4::request::apps_list_subscriptions_for_authenticated_user_stubbed::hyper_request(theBuilder)?;
40147
40148        ::log::debug!("HTTP request: {:?}", &theRequest);
40149
40150        let theResponse = self.client.request(theRequest).await?;
40151
40152        ::log::debug!("HTTP response: {:?}", &theResponse);
40153
40154        Ok(theResponse)
40155    }
40156
40157    /// List organization memberships for the authenticated user
40158    /// 
40159    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user)
40160    pub async fn orgs_list_memberships_for_authenticated_user(
40161        &self,
40162        state: ::std::option::Option<&str>,
40163        per_page: ::std::option::Option<i64>,
40164        page: ::std::option::Option<i64>,
40165    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40166        let mut theScheme = AuthScheme::from(&self.config.authentication);
40167
40168        while let Some(auth_step) = theScheme.step()? {
40169            match auth_step {
40170                ::authentic::AuthenticationStep::Request(auth_request) => {
40171                    theScheme.respond(self.client.request(auth_request).await);
40172                }
40173                ::authentic::AuthenticationStep::WaitFor(duration) => {
40174                    (self.sleep)(duration).await;
40175                }
40176            }
40177        }
40178        let theBuilder = crate::v1_1_4::request::orgs_list_memberships_for_authenticated_user::http_builder(
40179            self.config.base_url.as_ref(),
40180            state,
40181            per_page,
40182            page,
40183            self.config.user_agent.as_ref(),
40184            self.config.accept.as_deref(),
40185        )?
40186        .with_authentication(&theScheme)?;
40187
40188        let theRequest =
40189            crate::v1_1_4::request::orgs_list_memberships_for_authenticated_user::hyper_request(theBuilder)?;
40190
40191        ::log::debug!("HTTP request: {:?}", &theRequest);
40192
40193        let theResponse = self.client.request(theRequest).await?;
40194
40195        ::log::debug!("HTTP response: {:?}", &theResponse);
40196
40197        Ok(theResponse)
40198    }
40199
40200    /// Get an organization membership for the authenticated user
40201    /// 
40202    /// [API method documentation](https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user)
40203    pub async fn orgs_get_membership_for_authenticated_user(
40204        &self,
40205        org: &str,
40206    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40207        let mut theScheme = AuthScheme::from(&self.config.authentication);
40208
40209        while let Some(auth_step) = theScheme.step()? {
40210            match auth_step {
40211                ::authentic::AuthenticationStep::Request(auth_request) => {
40212                    theScheme.respond(self.client.request(auth_request).await);
40213                }
40214                ::authentic::AuthenticationStep::WaitFor(duration) => {
40215                    (self.sleep)(duration).await;
40216                }
40217            }
40218        }
40219        let theBuilder = crate::v1_1_4::request::orgs_get_membership_for_authenticated_user::http_builder(
40220            self.config.base_url.as_ref(),
40221            org,
40222            self.config.user_agent.as_ref(),
40223            self.config.accept.as_deref(),
40224        )?
40225        .with_authentication(&theScheme)?;
40226
40227        let theRequest =
40228            crate::v1_1_4::request::orgs_get_membership_for_authenticated_user::hyper_request(theBuilder)?;
40229
40230        ::log::debug!("HTTP request: {:?}", &theRequest);
40231
40232        let theResponse = self.client.request(theRequest).await?;
40233
40234        ::log::debug!("HTTP response: {:?}", &theResponse);
40235
40236        Ok(theResponse)
40237    }
40238
40239    /// Update an organization membership for the authenticated user
40240    /// 
40241    /// [API method documentation](https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user)
40242    ///
40243    /// # Content
40244    ///
40245    /// - [`&v1_1_4::request::orgs_update_membership_for_authenticated_user::body::Json`](crate::v1_1_4::request::orgs_update_membership_for_authenticated_user::body::Json)
40246    pub async fn orgs_update_membership_for_authenticated_user<Content>(
40247        &self,
40248        org: &str,
40249        theContent: Content,
40250    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
40251    where
40252        Content: Copy + TryInto<crate::v1_1_4::request::orgs_update_membership_for_authenticated_user::Content<::hyper::Body>>,
40253        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::orgs_update_membership_for_authenticated_user::Content<::hyper::Body>>>::Error>
40254    {
40255        let mut theScheme = AuthScheme::from(&self.config.authentication);
40256
40257        while let Some(auth_step) = theScheme.step()? {
40258            match auth_step {
40259                ::authentic::AuthenticationStep::Request(auth_request) => {
40260                    theScheme.respond(self.client.request(auth_request).await);
40261                }
40262                ::authentic::AuthenticationStep::WaitFor(duration) => {
40263                    (self.sleep)(duration).await;
40264                }
40265            }
40266        }
40267        let theBuilder = crate::v1_1_4::request::orgs_update_membership_for_authenticated_user::http_builder(
40268            self.config.base_url.as_ref(),
40269            org,
40270            self.config.user_agent.as_ref(),
40271            self.config.accept.as_deref(),
40272        )?
40273        .with_authentication(&theScheme)?;
40274
40275        let theRequest = crate::v1_1_4::request::orgs_update_membership_for_authenticated_user::hyper_request(
40276            theBuilder,
40277            theContent.try_into()?,
40278        )?;
40279
40280        ::log::debug!("HTTP request: {:?}", &theRequest);
40281
40282        let theResponse = self.client.request(theRequest).await?;
40283
40284        ::log::debug!("HTTP response: {:?}", &theResponse);
40285
40286        Ok(theResponse)
40287    }
40288
40289    /// List user migrations
40290    /// 
40291    /// Lists all migrations a user has started.
40292    /// 
40293    /// [API method documentation](https://docs.github.com/rest/reference/migrations#list-user-migrations)
40294    pub async fn migrations_list_for_authenticated_user(
40295        &self,
40296        per_page: ::std::option::Option<i64>,
40297        page: ::std::option::Option<i64>,
40298    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40299        let mut theScheme = AuthScheme::from(&self.config.authentication);
40300
40301        while let Some(auth_step) = theScheme.step()? {
40302            match auth_step {
40303                ::authentic::AuthenticationStep::Request(auth_request) => {
40304                    theScheme.respond(self.client.request(auth_request).await);
40305                }
40306                ::authentic::AuthenticationStep::WaitFor(duration) => {
40307                    (self.sleep)(duration).await;
40308                }
40309            }
40310        }
40311        let theBuilder = crate::v1_1_4::request::migrations_list_for_authenticated_user::http_builder(
40312            self.config.base_url.as_ref(),
40313            per_page,
40314            page,
40315            self.config.user_agent.as_ref(),
40316            self.config.accept.as_deref(),
40317        )?
40318        .with_authentication(&theScheme)?;
40319
40320        let theRequest =
40321            crate::v1_1_4::request::migrations_list_for_authenticated_user::hyper_request(theBuilder)?;
40322
40323        ::log::debug!("HTTP request: {:?}", &theRequest);
40324
40325        let theResponse = self.client.request(theRequest).await?;
40326
40327        ::log::debug!("HTTP response: {:?}", &theResponse);
40328
40329        Ok(theResponse)
40330    }
40331
40332    /// Start a user migration
40333    /// 
40334    /// Initiates the generation of a user migration archive.
40335    /// 
40336    /// [API method documentation](https://docs.github.com/rest/reference/migrations#start-a-user-migration)
40337    ///
40338    /// # Content
40339    ///
40340    /// - [`&v1_1_4::request::migrations_start_for_authenticated_user::body::Json`](crate::v1_1_4::request::migrations_start_for_authenticated_user::body::Json)
40341    pub async fn migrations_start_for_authenticated_user<Content>(
40342        &self,
40343        theContent: Content,
40344    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
40345    where
40346        Content: Copy + TryInto<crate::v1_1_4::request::migrations_start_for_authenticated_user::Content<::hyper::Body>>,
40347        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::migrations_start_for_authenticated_user::Content<::hyper::Body>>>::Error>
40348    {
40349        let mut theScheme = AuthScheme::from(&self.config.authentication);
40350
40351        while let Some(auth_step) = theScheme.step()? {
40352            match auth_step {
40353                ::authentic::AuthenticationStep::Request(auth_request) => {
40354                    theScheme.respond(self.client.request(auth_request).await);
40355                }
40356                ::authentic::AuthenticationStep::WaitFor(duration) => {
40357                    (self.sleep)(duration).await;
40358                }
40359            }
40360        }
40361        let theBuilder = crate::v1_1_4::request::migrations_start_for_authenticated_user::http_builder(
40362            self.config.base_url.as_ref(),
40363            self.config.user_agent.as_ref(),
40364            self.config.accept.as_deref(),
40365        )?
40366        .with_authentication(&theScheme)?;
40367
40368        let theRequest = crate::v1_1_4::request::migrations_start_for_authenticated_user::hyper_request(
40369            theBuilder,
40370            theContent.try_into()?,
40371        )?;
40372
40373        ::log::debug!("HTTP request: {:?}", &theRequest);
40374
40375        let theResponse = self.client.request(theRequest).await?;
40376
40377        ::log::debug!("HTTP response: {:?}", &theResponse);
40378
40379        Ok(theResponse)
40380    }
40381
40382    /// Get a user migration status
40383    /// 
40384    /// Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values:
40385    /// 
40386    /// *   `pending` - the migration hasn't started yet.
40387    /// *   `exporting` - the migration is in progress.
40388    /// *   `exported` - the migration finished successfully.
40389    /// *   `failed` - the migration failed.
40390    /// 
40391    /// Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive).
40392    /// 
40393    /// [API method documentation](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status)
40394    pub async fn migrations_get_status_for_authenticated_user(
40395        &self,
40396        migration_id: i64,
40397        exclude: ::std::option::Option<&[::std::borrow::Cow<'_, str>]>,
40398    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40399        let mut theScheme = AuthScheme::from(&self.config.authentication);
40400
40401        while let Some(auth_step) = theScheme.step()? {
40402            match auth_step {
40403                ::authentic::AuthenticationStep::Request(auth_request) => {
40404                    theScheme.respond(self.client.request(auth_request).await);
40405                }
40406                ::authentic::AuthenticationStep::WaitFor(duration) => {
40407                    (self.sleep)(duration).await;
40408                }
40409            }
40410        }
40411        let theBuilder = crate::v1_1_4::request::migrations_get_status_for_authenticated_user::http_builder(
40412            self.config.base_url.as_ref(),
40413            migration_id,
40414            exclude,
40415            self.config.user_agent.as_ref(),
40416            self.config.accept.as_deref(),
40417        )?
40418        .with_authentication(&theScheme)?;
40419
40420        let theRequest =
40421            crate::v1_1_4::request::migrations_get_status_for_authenticated_user::hyper_request(theBuilder)?;
40422
40423        ::log::debug!("HTTP request: {:?}", &theRequest);
40424
40425        let theResponse = self.client.request(theRequest).await?;
40426
40427        ::log::debug!("HTTP response: {:?}", &theResponse);
40428
40429        Ok(theResponse)
40430    }
40431
40432    /// Download a user migration archive
40433    /// 
40434    /// Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects:
40435    /// 
40436    /// *   attachments
40437    /// *   bases
40438    /// *   commit\_comments
40439    /// *   issue\_comments
40440    /// *   issue\_events
40441    /// *   issues
40442    /// *   milestones
40443    /// *   organizations
40444    /// *   projects
40445    /// *   protected\_branches
40446    /// *   pull\_request\_reviews
40447    /// *   pull\_requests
40448    /// *   releases
40449    /// *   repositories
40450    /// *   review\_comments
40451    /// *   schema
40452    /// *   users
40453    /// 
40454    /// The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data.
40455    /// 
40456    /// [API method documentation](https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive)
40457    pub async fn migrations_get_archive_for_authenticated_user(
40458        &self,
40459        migration_id: i64,
40460    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40461        let mut theScheme = AuthScheme::from(&self.config.authentication);
40462
40463        while let Some(auth_step) = theScheme.step()? {
40464            match auth_step {
40465                ::authentic::AuthenticationStep::Request(auth_request) => {
40466                    theScheme.respond(self.client.request(auth_request).await);
40467                }
40468                ::authentic::AuthenticationStep::WaitFor(duration) => {
40469                    (self.sleep)(duration).await;
40470                }
40471            }
40472        }
40473        let theBuilder = crate::v1_1_4::request::migrations_get_archive_for_authenticated_user::http_builder(
40474            self.config.base_url.as_ref(),
40475            migration_id,
40476            self.config.user_agent.as_ref(),
40477            self.config.accept.as_deref(),
40478        )?
40479        .with_authentication(&theScheme)?;
40480
40481        let theRequest =
40482            crate::v1_1_4::request::migrations_get_archive_for_authenticated_user::hyper_request(theBuilder)?;
40483
40484        ::log::debug!("HTTP request: {:?}", &theRequest);
40485
40486        let theResponse = self.client.request(theRequest).await?;
40487
40488        ::log::debug!("HTTP response: {:?}", &theResponse);
40489
40490        Ok(theResponse)
40491    }
40492
40493    /// Delete a user migration archive
40494    /// 
40495    /// Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted.
40496    /// 
40497    /// [API method documentation](https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive)
40498    pub async fn migrations_delete_archive_for_authenticated_user(
40499        &self,
40500        migration_id: i64,
40501    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40502        let mut theScheme = AuthScheme::from(&self.config.authentication);
40503
40504        while let Some(auth_step) = theScheme.step()? {
40505            match auth_step {
40506                ::authentic::AuthenticationStep::Request(auth_request) => {
40507                    theScheme.respond(self.client.request(auth_request).await);
40508                }
40509                ::authentic::AuthenticationStep::WaitFor(duration) => {
40510                    (self.sleep)(duration).await;
40511                }
40512            }
40513        }
40514        let theBuilder = crate::v1_1_4::request::migrations_delete_archive_for_authenticated_user::http_builder(
40515            self.config.base_url.as_ref(),
40516            migration_id,
40517            self.config.user_agent.as_ref(),
40518            self.config.accept.as_deref(),
40519        )?
40520        .with_authentication(&theScheme)?;
40521
40522        let theRequest =
40523            crate::v1_1_4::request::migrations_delete_archive_for_authenticated_user::hyper_request(theBuilder)?;
40524
40525        ::log::debug!("HTTP request: {:?}", &theRequest);
40526
40527        let theResponse = self.client.request(theRequest).await?;
40528
40529        ::log::debug!("HTTP response: {:?}", &theResponse);
40530
40531        Ok(theResponse)
40532    }
40533
40534    /// Unlock a user repository
40535    /// 
40536    /// Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked.
40537    /// 
40538    /// [API method documentation](https://docs.github.com/rest/reference/migrations#unlock-a-user-repository)
40539    pub async fn migrations_unlock_repo_for_authenticated_user(
40540        &self,
40541        migration_id: i64,
40542        repo_name: &str,
40543    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40544        let mut theScheme = AuthScheme::from(&self.config.authentication);
40545
40546        while let Some(auth_step) = theScheme.step()? {
40547            match auth_step {
40548                ::authentic::AuthenticationStep::Request(auth_request) => {
40549                    theScheme.respond(self.client.request(auth_request).await);
40550                }
40551                ::authentic::AuthenticationStep::WaitFor(duration) => {
40552                    (self.sleep)(duration).await;
40553                }
40554            }
40555        }
40556        let theBuilder = crate::v1_1_4::request::migrations_unlock_repo_for_authenticated_user::http_builder(
40557            self.config.base_url.as_ref(),
40558            migration_id,
40559            repo_name,
40560            self.config.user_agent.as_ref(),
40561            self.config.accept.as_deref(),
40562        )?
40563        .with_authentication(&theScheme)?;
40564
40565        let theRequest =
40566            crate::v1_1_4::request::migrations_unlock_repo_for_authenticated_user::hyper_request(theBuilder)?;
40567
40568        ::log::debug!("HTTP request: {:?}", &theRequest);
40569
40570        let theResponse = self.client.request(theRequest).await?;
40571
40572        ::log::debug!("HTTP response: {:?}", &theResponse);
40573
40574        Ok(theResponse)
40575    }
40576
40577    /// List repositories for a user migration
40578    /// 
40579    /// Lists all the repositories for this user migration.
40580    /// 
40581    /// [API method documentation](https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration)
40582    pub async fn migrations_list_repos_for_authenticated_user(
40583        &self,
40584        migration_id: i64,
40585        per_page: ::std::option::Option<i64>,
40586        page: ::std::option::Option<i64>,
40587    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40588        let mut theScheme = AuthScheme::from(&self.config.authentication);
40589
40590        while let Some(auth_step) = theScheme.step()? {
40591            match auth_step {
40592                ::authentic::AuthenticationStep::Request(auth_request) => {
40593                    theScheme.respond(self.client.request(auth_request).await);
40594                }
40595                ::authentic::AuthenticationStep::WaitFor(duration) => {
40596                    (self.sleep)(duration).await;
40597                }
40598            }
40599        }
40600        let theBuilder = crate::v1_1_4::request::migrations_list_repos_for_authenticated_user::http_builder(
40601            self.config.base_url.as_ref(),
40602            migration_id,
40603            per_page,
40604            page,
40605            self.config.user_agent.as_ref(),
40606            self.config.accept.as_deref(),
40607        )?
40608        .with_authentication(&theScheme)?;
40609
40610        let theRequest =
40611            crate::v1_1_4::request::migrations_list_repos_for_authenticated_user::hyper_request(theBuilder)?;
40612
40613        ::log::debug!("HTTP request: {:?}", &theRequest);
40614
40615        let theResponse = self.client.request(theRequest).await?;
40616
40617        ::log::debug!("HTTP response: {:?}", &theResponse);
40618
40619        Ok(theResponse)
40620    }
40621
40622    /// List organizations for the authenticated user
40623    /// 
40624    /// List organizations for the authenticated user.
40625    /// 
40626    /// **OAuth scope requirements**
40627    /// 
40628    /// This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response.
40629    /// 
40630    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user)
40631    pub async fn orgs_list_for_authenticated_user(
40632        &self,
40633        per_page: ::std::option::Option<i64>,
40634        page: ::std::option::Option<i64>,
40635    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40636        let mut theScheme = AuthScheme::from(&self.config.authentication);
40637
40638        while let Some(auth_step) = theScheme.step()? {
40639            match auth_step {
40640                ::authentic::AuthenticationStep::Request(auth_request) => {
40641                    theScheme.respond(self.client.request(auth_request).await);
40642                }
40643                ::authentic::AuthenticationStep::WaitFor(duration) => {
40644                    (self.sleep)(duration).await;
40645                }
40646            }
40647        }
40648        let theBuilder = crate::v1_1_4::request::orgs_list_for_authenticated_user::http_builder(
40649            self.config.base_url.as_ref(),
40650            per_page,
40651            page,
40652            self.config.user_agent.as_ref(),
40653            self.config.accept.as_deref(),
40654        )?
40655        .with_authentication(&theScheme)?;
40656
40657        let theRequest =
40658            crate::v1_1_4::request::orgs_list_for_authenticated_user::hyper_request(theBuilder)?;
40659
40660        ::log::debug!("HTTP request: {:?}", &theRequest);
40661
40662        let theResponse = self.client.request(theRequest).await?;
40663
40664        ::log::debug!("HTTP response: {:?}", &theResponse);
40665
40666        Ok(theResponse)
40667    }
40668
40669    /// List packages for the authenticated user's namespace
40670    /// 
40671    /// Lists packages owned by the authenticated user within the user's namespace.
40672    /// 
40673    /// To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
40674    /// If `package_type` is not `container`, your token must also include the `repo` scope.
40675    /// 
40676    /// [API method documentation](https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user)
40677    pub async fn packages_list_packages_for_authenticated_user(
40678        &self,
40679        package_type: &str,
40680        visibility: ::std::option::Option<&str>,
40681    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40682        let mut theScheme = AuthScheme::from(&self.config.authentication);
40683
40684        while let Some(auth_step) = theScheme.step()? {
40685            match auth_step {
40686                ::authentic::AuthenticationStep::Request(auth_request) => {
40687                    theScheme.respond(self.client.request(auth_request).await);
40688                }
40689                ::authentic::AuthenticationStep::WaitFor(duration) => {
40690                    (self.sleep)(duration).await;
40691                }
40692            }
40693        }
40694        let theBuilder = crate::v1_1_4::request::packages_list_packages_for_authenticated_user::http_builder(
40695            self.config.base_url.as_ref(),
40696            package_type,
40697            visibility,
40698            self.config.user_agent.as_ref(),
40699            self.config.accept.as_deref(),
40700        )?
40701        .with_authentication(&theScheme)?;
40702
40703        let theRequest =
40704            crate::v1_1_4::request::packages_list_packages_for_authenticated_user::hyper_request(theBuilder)?;
40705
40706        ::log::debug!("HTTP request: {:?}", &theRequest);
40707
40708        let theResponse = self.client.request(theRequest).await?;
40709
40710        ::log::debug!("HTTP response: {:?}", &theResponse);
40711
40712        Ok(theResponse)
40713    }
40714
40715    /// Get a package for the authenticated user
40716    /// 
40717    /// Gets a specific package for a package owned by the authenticated user.
40718    /// 
40719    /// To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
40720    /// If `package_type` is not `container`, your token must also include the `repo` scope.
40721    /// 
40722    /// [API method documentation](https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user)
40723    pub async fn packages_get_package_for_authenticated_user(
40724        &self,
40725        package_type: &str,
40726        package_name: &str,
40727    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40728        let mut theScheme = AuthScheme::from(&self.config.authentication);
40729
40730        while let Some(auth_step) = theScheme.step()? {
40731            match auth_step {
40732                ::authentic::AuthenticationStep::Request(auth_request) => {
40733                    theScheme.respond(self.client.request(auth_request).await);
40734                }
40735                ::authentic::AuthenticationStep::WaitFor(duration) => {
40736                    (self.sleep)(duration).await;
40737                }
40738            }
40739        }
40740        let theBuilder = crate::v1_1_4::request::packages_get_package_for_authenticated_user::http_builder(
40741            self.config.base_url.as_ref(),
40742            package_type,
40743            package_name,
40744            self.config.user_agent.as_ref(),
40745            self.config.accept.as_deref(),
40746        )?
40747        .with_authentication(&theScheme)?;
40748
40749        let theRequest =
40750            crate::v1_1_4::request::packages_get_package_for_authenticated_user::hyper_request(theBuilder)?;
40751
40752        ::log::debug!("HTTP request: {:?}", &theRequest);
40753
40754        let theResponse = self.client.request(theRequest).await?;
40755
40756        ::log::debug!("HTTP response: {:?}", &theResponse);
40757
40758        Ok(theResponse)
40759    }
40760
40761    /// Delete a package for the authenticated user
40762    /// 
40763    /// Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
40764    /// 
40765    /// To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes.
40766    /// If `package_type` is not `container`, your token must also include the `repo` scope.
40767    /// 
40768    /// [API method documentation](https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user)
40769    pub async fn packages_delete_package_for_authenticated_user(
40770        &self,
40771        package_type: &str,
40772        package_name: &str,
40773    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40774        let mut theScheme = AuthScheme::from(&self.config.authentication);
40775
40776        while let Some(auth_step) = theScheme.step()? {
40777            match auth_step {
40778                ::authentic::AuthenticationStep::Request(auth_request) => {
40779                    theScheme.respond(self.client.request(auth_request).await);
40780                }
40781                ::authentic::AuthenticationStep::WaitFor(duration) => {
40782                    (self.sleep)(duration).await;
40783                }
40784            }
40785        }
40786        let theBuilder = crate::v1_1_4::request::packages_delete_package_for_authenticated_user::http_builder(
40787            self.config.base_url.as_ref(),
40788            package_type,
40789            package_name,
40790            self.config.user_agent.as_ref(),
40791            self.config.accept.as_deref(),
40792        )?
40793        .with_authentication(&theScheme)?;
40794
40795        let theRequest =
40796            crate::v1_1_4::request::packages_delete_package_for_authenticated_user::hyper_request(theBuilder)?;
40797
40798        ::log::debug!("HTTP request: {:?}", &theRequest);
40799
40800        let theResponse = self.client.request(theRequest).await?;
40801
40802        ::log::debug!("HTTP response: {:?}", &theResponse);
40803
40804        Ok(theResponse)
40805    }
40806
40807    /// Restore a package for the authenticated user
40808    /// 
40809    /// Restores a package owned by the authenticated user.
40810    /// 
40811    /// You can restore a deleted package under the following conditions:
40812    ///   - The package was deleted within the last 30 days.
40813    ///   - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
40814    /// 
40815    /// To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope.
40816    /// 
40817    /// [API method documentation](https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user)
40818    pub async fn packages_restore_package_for_authenticated_user(
40819        &self,
40820        package_type: &str,
40821        package_name: &str,
40822        token: ::std::option::Option<&str>,
40823    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40824        let mut theScheme = AuthScheme::from(&self.config.authentication);
40825
40826        while let Some(auth_step) = theScheme.step()? {
40827            match auth_step {
40828                ::authentic::AuthenticationStep::Request(auth_request) => {
40829                    theScheme.respond(self.client.request(auth_request).await);
40830                }
40831                ::authentic::AuthenticationStep::WaitFor(duration) => {
40832                    (self.sleep)(duration).await;
40833                }
40834            }
40835        }
40836        let theBuilder = crate::v1_1_4::request::packages_restore_package_for_authenticated_user::http_builder(
40837            self.config.base_url.as_ref(),
40838            package_type,
40839            package_name,
40840            token,
40841            self.config.user_agent.as_ref(),
40842            self.config.accept.as_deref(),
40843        )?
40844        .with_authentication(&theScheme)?;
40845
40846        let theRequest =
40847            crate::v1_1_4::request::packages_restore_package_for_authenticated_user::hyper_request(theBuilder)?;
40848
40849        ::log::debug!("HTTP request: {:?}", &theRequest);
40850
40851        let theResponse = self.client.request(theRequest).await?;
40852
40853        ::log::debug!("HTTP response: {:?}", &theResponse);
40854
40855        Ok(theResponse)
40856    }
40857
40858    /// Get all package versions for a package owned by the authenticated user
40859    /// 
40860    /// Returns all package versions for a package owned by the authenticated user.
40861    /// 
40862    /// To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
40863    /// If `package_type` is not `container`, your token must also include the `repo` scope.
40864    /// 
40865    /// [API method documentation](https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user)
40866    pub async fn packages_get_all_package_versions_for_package_owned_by_authenticated_user(
40867        &self,
40868        package_type: &str,
40869        package_name: &str,
40870        page: ::std::option::Option<i64>,
40871        per_page: ::std::option::Option<i64>,
40872        state: ::std::option::Option<&str>,
40873    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40874        let mut theScheme = AuthScheme::from(&self.config.authentication);
40875
40876        while let Some(auth_step) = theScheme.step()? {
40877            match auth_step {
40878                ::authentic::AuthenticationStep::Request(auth_request) => {
40879                    theScheme.respond(self.client.request(auth_request).await);
40880                }
40881                ::authentic::AuthenticationStep::WaitFor(duration) => {
40882                    (self.sleep)(duration).await;
40883                }
40884            }
40885        }
40886        let theBuilder = crate::v1_1_4::request::packages_get_all_package_versions_for_package_owned_by_authenticated_user::http_builder(
40887            self.config.base_url.as_ref(),
40888            package_type,
40889            package_name,
40890            page,
40891            per_page,
40892            state,
40893            self.config.user_agent.as_ref(),
40894            self.config.accept.as_deref(),
40895        )?
40896        .with_authentication(&theScheme)?;
40897
40898        let theRequest =
40899            crate::v1_1_4::request::packages_get_all_package_versions_for_package_owned_by_authenticated_user::hyper_request(theBuilder)?;
40900
40901        ::log::debug!("HTTP request: {:?}", &theRequest);
40902
40903        let theResponse = self.client.request(theRequest).await?;
40904
40905        ::log::debug!("HTTP response: {:?}", &theResponse);
40906
40907        Ok(theResponse)
40908    }
40909
40910    /// Get a package version for the authenticated user
40911    /// 
40912    /// Gets a specific package version for a package owned by the authenticated user.
40913    /// 
40914    /// To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
40915    /// If `package_type` is not `container`, your token must also include the `repo` scope.
40916    /// 
40917    /// [API method documentation](https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user)
40918    pub async fn packages_get_package_version_for_authenticated_user(
40919        &self,
40920        package_type: &str,
40921        package_name: &str,
40922        package_version_id: i64,
40923    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40924        let mut theScheme = AuthScheme::from(&self.config.authentication);
40925
40926        while let Some(auth_step) = theScheme.step()? {
40927            match auth_step {
40928                ::authentic::AuthenticationStep::Request(auth_request) => {
40929                    theScheme.respond(self.client.request(auth_request).await);
40930                }
40931                ::authentic::AuthenticationStep::WaitFor(duration) => {
40932                    (self.sleep)(duration).await;
40933                }
40934            }
40935        }
40936        let theBuilder = crate::v1_1_4::request::packages_get_package_version_for_authenticated_user::http_builder(
40937            self.config.base_url.as_ref(),
40938            package_type,
40939            package_name,
40940            package_version_id,
40941            self.config.user_agent.as_ref(),
40942            self.config.accept.as_deref(),
40943        )?
40944        .with_authentication(&theScheme)?;
40945
40946        let theRequest =
40947            crate::v1_1_4::request::packages_get_package_version_for_authenticated_user::hyper_request(theBuilder)?;
40948
40949        ::log::debug!("HTTP request: {:?}", &theRequest);
40950
40951        let theResponse = self.client.request(theRequest).await?;
40952
40953        ::log::debug!("HTTP response: {:?}", &theResponse);
40954
40955        Ok(theResponse)
40956    }
40957
40958    /// Delete a package version for the authenticated user
40959    /// 
40960    /// Deletes a specific package version for a package owned by the authenticated user.  If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
40961    /// 
40962    /// To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes.
40963    /// If `package_type` is not `container`, your token must also include the `repo` scope.
40964    /// 
40965    /// [API method documentation](https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user)
40966    pub async fn packages_delete_package_version_for_authenticated_user(
40967        &self,
40968        package_type: &str,
40969        package_name: &str,
40970        package_version_id: i64,
40971    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
40972        let mut theScheme = AuthScheme::from(&self.config.authentication);
40973
40974        while let Some(auth_step) = theScheme.step()? {
40975            match auth_step {
40976                ::authentic::AuthenticationStep::Request(auth_request) => {
40977                    theScheme.respond(self.client.request(auth_request).await);
40978                }
40979                ::authentic::AuthenticationStep::WaitFor(duration) => {
40980                    (self.sleep)(duration).await;
40981                }
40982            }
40983        }
40984        let theBuilder = crate::v1_1_4::request::packages_delete_package_version_for_authenticated_user::http_builder(
40985            self.config.base_url.as_ref(),
40986            package_type,
40987            package_name,
40988            package_version_id,
40989            self.config.user_agent.as_ref(),
40990            self.config.accept.as_deref(),
40991        )?
40992        .with_authentication(&theScheme)?;
40993
40994        let theRequest =
40995            crate::v1_1_4::request::packages_delete_package_version_for_authenticated_user::hyper_request(theBuilder)?;
40996
40997        ::log::debug!("HTTP request: {:?}", &theRequest);
40998
40999        let theResponse = self.client.request(theRequest).await?;
41000
41001        ::log::debug!("HTTP response: {:?}", &theResponse);
41002
41003        Ok(theResponse)
41004    }
41005
41006    /// Restore a package version for the authenticated user
41007    /// 
41008    /// Restores a package version owned by the authenticated user.
41009    /// 
41010    /// You can restore a deleted package version under the following conditions:
41011    ///   - The package was deleted within the last 30 days.
41012    ///   - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
41013    /// 
41014    /// To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope.
41015    /// 
41016    /// [API method documentation](https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user)
41017    pub async fn packages_restore_package_version_for_authenticated_user(
41018        &self,
41019        package_type: &str,
41020        package_name: &str,
41021        package_version_id: i64,
41022    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41023        let mut theScheme = AuthScheme::from(&self.config.authentication);
41024
41025        while let Some(auth_step) = theScheme.step()? {
41026            match auth_step {
41027                ::authentic::AuthenticationStep::Request(auth_request) => {
41028                    theScheme.respond(self.client.request(auth_request).await);
41029                }
41030                ::authentic::AuthenticationStep::WaitFor(duration) => {
41031                    (self.sleep)(duration).await;
41032                }
41033            }
41034        }
41035        let theBuilder = crate::v1_1_4::request::packages_restore_package_version_for_authenticated_user::http_builder(
41036            self.config.base_url.as_ref(),
41037            package_type,
41038            package_name,
41039            package_version_id,
41040            self.config.user_agent.as_ref(),
41041            self.config.accept.as_deref(),
41042        )?
41043        .with_authentication(&theScheme)?;
41044
41045        let theRequest =
41046            crate::v1_1_4::request::packages_restore_package_version_for_authenticated_user::hyper_request(theBuilder)?;
41047
41048        ::log::debug!("HTTP request: {:?}", &theRequest);
41049
41050        let theResponse = self.client.request(theRequest).await?;
41051
41052        ::log::debug!("HTTP response: {:?}", &theResponse);
41053
41054        Ok(theResponse)
41055    }
41056
41057    /// Create a user project
41058    /// 
41059    /// [API method documentation](https://docs.github.com/rest/reference/projects#create-a-user-project)
41060    ///
41061    /// # Content
41062    ///
41063    /// - [`&v1_1_4::request::projects_create_for_authenticated_user::body::Json`](crate::v1_1_4::request::projects_create_for_authenticated_user::body::Json)
41064    pub async fn projects_create_for_authenticated_user<Content>(
41065        &self,
41066        theContent: Content,
41067    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
41068    where
41069        Content: Copy + TryInto<crate::v1_1_4::request::projects_create_for_authenticated_user::Content<::hyper::Body>>,
41070        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::projects_create_for_authenticated_user::Content<::hyper::Body>>>::Error>
41071    {
41072        let mut theScheme = AuthScheme::from(&self.config.authentication);
41073
41074        while let Some(auth_step) = theScheme.step()? {
41075            match auth_step {
41076                ::authentic::AuthenticationStep::Request(auth_request) => {
41077                    theScheme.respond(self.client.request(auth_request).await);
41078                }
41079                ::authentic::AuthenticationStep::WaitFor(duration) => {
41080                    (self.sleep)(duration).await;
41081                }
41082            }
41083        }
41084        let theBuilder = crate::v1_1_4::request::projects_create_for_authenticated_user::http_builder(
41085            self.config.base_url.as_ref(),
41086            self.config.user_agent.as_ref(),
41087            self.config.accept.as_deref(),
41088        )?
41089        .with_authentication(&theScheme)?;
41090
41091        let theRequest = crate::v1_1_4::request::projects_create_for_authenticated_user::hyper_request(
41092            theBuilder,
41093            theContent.try_into()?,
41094        )?;
41095
41096        ::log::debug!("HTTP request: {:?}", &theRequest);
41097
41098        let theResponse = self.client.request(theRequest).await?;
41099
41100        ::log::debug!("HTTP response: {:?}", &theResponse);
41101
41102        Ok(theResponse)
41103    }
41104
41105    /// List public email addresses for the authenticated user
41106    /// 
41107    /// Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope.
41108    /// 
41109    /// [API method documentation](https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user)
41110    pub async fn users_list_public_emails_for_authenticated_user(
41111        &self,
41112        per_page: ::std::option::Option<i64>,
41113        page: ::std::option::Option<i64>,
41114    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41115        let mut theScheme = AuthScheme::from(&self.config.authentication);
41116
41117        while let Some(auth_step) = theScheme.step()? {
41118            match auth_step {
41119                ::authentic::AuthenticationStep::Request(auth_request) => {
41120                    theScheme.respond(self.client.request(auth_request).await);
41121                }
41122                ::authentic::AuthenticationStep::WaitFor(duration) => {
41123                    (self.sleep)(duration).await;
41124                }
41125            }
41126        }
41127        let theBuilder = crate::v1_1_4::request::users_list_public_emails_for_authenticated_user::http_builder(
41128            self.config.base_url.as_ref(),
41129            per_page,
41130            page,
41131            self.config.user_agent.as_ref(),
41132            self.config.accept.as_deref(),
41133        )?
41134        .with_authentication(&theScheme)?;
41135
41136        let theRequest =
41137            crate::v1_1_4::request::users_list_public_emails_for_authenticated_user::hyper_request(theBuilder)?;
41138
41139        ::log::debug!("HTTP request: {:?}", &theRequest);
41140
41141        let theResponse = self.client.request(theRequest).await?;
41142
41143        ::log::debug!("HTTP response: {:?}", &theResponse);
41144
41145        Ok(theResponse)
41146    }
41147
41148    /// List repositories for the authenticated user
41149    /// 
41150    /// Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.
41151    /// 
41152    /// The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
41153    /// 
41154    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user)
41155    #[allow(clippy::too_many_arguments)]
41156    pub async fn repos_list_for_authenticated_user(
41157        &self,
41158        visibility: ::std::option::Option<&str>,
41159        affiliation: ::std::option::Option<&str>,
41160        r#type: ::std::option::Option<&str>,
41161        sort: &crate::types::Sort<'_>,
41162        per_page: ::std::option::Option<i64>,
41163        page: ::std::option::Option<i64>,
41164        since: ::std::option::Option<&str>,
41165        before: ::std::option::Option<&str>,
41166    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41167        let (sort, direction) = sort.extract();
41168        let mut theScheme = AuthScheme::from(&self.config.authentication);
41169
41170        while let Some(auth_step) = theScheme.step()? {
41171            match auth_step {
41172                ::authentic::AuthenticationStep::Request(auth_request) => {
41173                    theScheme.respond(self.client.request(auth_request).await);
41174                }
41175                ::authentic::AuthenticationStep::WaitFor(duration) => {
41176                    (self.sleep)(duration).await;
41177                }
41178            }
41179        }
41180        let theBuilder = crate::v1_1_4::request::repos_list_for_authenticated_user::http_builder(
41181            self.config.base_url.as_ref(),
41182            visibility,
41183            affiliation,
41184            r#type,
41185            sort,
41186            direction,
41187            per_page,
41188            page,
41189            since,
41190            before,
41191            self.config.user_agent.as_ref(),
41192            self.config.accept.as_deref(),
41193        )?
41194        .with_authentication(&theScheme)?;
41195
41196        let theRequest =
41197            crate::v1_1_4::request::repos_list_for_authenticated_user::hyper_request(theBuilder)?;
41198
41199        ::log::debug!("HTTP request: {:?}", &theRequest);
41200
41201        let theResponse = self.client.request(theRequest).await?;
41202
41203        ::log::debug!("HTTP response: {:?}", &theResponse);
41204
41205        Ok(theResponse)
41206    }
41207
41208    /// Create a repository for the authenticated user
41209    /// 
41210    /// Creates a new repository for the authenticated user.
41211    /// 
41212    /// **OAuth scope requirements**
41213    /// 
41214    /// When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:
41215    /// 
41216    /// *   `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository.
41217    /// *   `repo` scope to create a private repository.
41218    /// 
41219    /// [API method documentation](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user)
41220    ///
41221    /// # Content
41222    ///
41223    /// - [`&v1_1_4::request::repos_create_for_authenticated_user::body::Json`](crate::v1_1_4::request::repos_create_for_authenticated_user::body::Json)
41224    pub async fn repos_create_for_authenticated_user<Content>(
41225        &self,
41226        theContent: Content,
41227    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError>
41228    where
41229        Content: Copy + TryInto<crate::v1_1_4::request::repos_create_for_authenticated_user::Content<::hyper::Body>>,
41230        crate::v1_1_4::ApiError: From<<Content as TryInto<crate::v1_1_4::request::repos_create_for_authenticated_user::Content<::hyper::Body>>>::Error>
41231    {
41232        let mut theScheme = AuthScheme::from(&self.config.authentication);
41233
41234        while let Some(auth_step) = theScheme.step()? {
41235            match auth_step {
41236                ::authentic::AuthenticationStep::Request(auth_request) => {
41237                    theScheme.respond(self.client.request(auth_request).await);
41238                }
41239                ::authentic::AuthenticationStep::WaitFor(duration) => {
41240                    (self.sleep)(duration).await;
41241                }
41242            }
41243        }
41244        let theBuilder = crate::v1_1_4::request::repos_create_for_authenticated_user::http_builder(
41245            self.config.base_url.as_ref(),
41246            self.config.user_agent.as_ref(),
41247            self.config.accept.as_deref(),
41248        )?
41249        .with_authentication(&theScheme)?;
41250
41251        let theRequest = crate::v1_1_4::request::repos_create_for_authenticated_user::hyper_request(
41252            theBuilder,
41253            theContent.try_into()?,
41254        )?;
41255
41256        ::log::debug!("HTTP request: {:?}", &theRequest);
41257
41258        let theResponse = self.client.request(theRequest).await?;
41259
41260        ::log::debug!("HTTP response: {:?}", &theResponse);
41261
41262        Ok(theResponse)
41263    }
41264
41265    /// List repository invitations for the authenticated user
41266    /// 
41267    /// When authenticating as a user, this endpoint will list all currently open repository invitations for that user.
41268    /// 
41269    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-repository-invitations-for-the-authenticated-user)
41270    pub async fn repos_list_invitations_for_authenticated_user(
41271        &self,
41272        per_page: ::std::option::Option<i64>,
41273        page: ::std::option::Option<i64>,
41274    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41275        let mut theScheme = AuthScheme::from(&self.config.authentication);
41276
41277        while let Some(auth_step) = theScheme.step()? {
41278            match auth_step {
41279                ::authentic::AuthenticationStep::Request(auth_request) => {
41280                    theScheme.respond(self.client.request(auth_request).await);
41281                }
41282                ::authentic::AuthenticationStep::WaitFor(duration) => {
41283                    (self.sleep)(duration).await;
41284                }
41285            }
41286        }
41287        let theBuilder = crate::v1_1_4::request::repos_list_invitations_for_authenticated_user::http_builder(
41288            self.config.base_url.as_ref(),
41289            per_page,
41290            page,
41291            self.config.user_agent.as_ref(),
41292            self.config.accept.as_deref(),
41293        )?
41294        .with_authentication(&theScheme)?;
41295
41296        let theRequest =
41297            crate::v1_1_4::request::repos_list_invitations_for_authenticated_user::hyper_request(theBuilder)?;
41298
41299        ::log::debug!("HTTP request: {:?}", &theRequest);
41300
41301        let theResponse = self.client.request(theRequest).await?;
41302
41303        ::log::debug!("HTTP response: {:?}", &theResponse);
41304
41305        Ok(theResponse)
41306    }
41307
41308    /// Decline a repository invitation
41309    /// 
41310    /// [API method documentation](https://docs.github.com/rest/reference/repos#decline-a-repository-invitation)
41311    pub async fn repos_decline_invitation_for_authenticated_user(
41312        &self,
41313        invitation_id: i64,
41314    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41315        let mut theScheme = AuthScheme::from(&self.config.authentication);
41316
41317        while let Some(auth_step) = theScheme.step()? {
41318            match auth_step {
41319                ::authentic::AuthenticationStep::Request(auth_request) => {
41320                    theScheme.respond(self.client.request(auth_request).await);
41321                }
41322                ::authentic::AuthenticationStep::WaitFor(duration) => {
41323                    (self.sleep)(duration).await;
41324                }
41325            }
41326        }
41327        let theBuilder = crate::v1_1_4::request::repos_decline_invitation_for_authenticated_user::http_builder(
41328            self.config.base_url.as_ref(),
41329            invitation_id,
41330            self.config.user_agent.as_ref(),
41331            self.config.accept.as_deref(),
41332        )?
41333        .with_authentication(&theScheme)?;
41334
41335        let theRequest =
41336            crate::v1_1_4::request::repos_decline_invitation_for_authenticated_user::hyper_request(theBuilder)?;
41337
41338        ::log::debug!("HTTP request: {:?}", &theRequest);
41339
41340        let theResponse = self.client.request(theRequest).await?;
41341
41342        ::log::debug!("HTTP response: {:?}", &theResponse);
41343
41344        Ok(theResponse)
41345    }
41346
41347    /// Accept a repository invitation
41348    /// 
41349    /// [API method documentation](https://docs.github.com/rest/reference/repos#accept-a-repository-invitation)
41350    pub async fn repos_accept_invitation_for_authenticated_user(
41351        &self,
41352        invitation_id: i64,
41353    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41354        let mut theScheme = AuthScheme::from(&self.config.authentication);
41355
41356        while let Some(auth_step) = theScheme.step()? {
41357            match auth_step {
41358                ::authentic::AuthenticationStep::Request(auth_request) => {
41359                    theScheme.respond(self.client.request(auth_request).await);
41360                }
41361                ::authentic::AuthenticationStep::WaitFor(duration) => {
41362                    (self.sleep)(duration).await;
41363                }
41364            }
41365        }
41366        let theBuilder = crate::v1_1_4::request::repos_accept_invitation_for_authenticated_user::http_builder(
41367            self.config.base_url.as_ref(),
41368            invitation_id,
41369            self.config.user_agent.as_ref(),
41370            self.config.accept.as_deref(),
41371        )?
41372        .with_authentication(&theScheme)?;
41373
41374        let theRequest =
41375            crate::v1_1_4::request::repos_accept_invitation_for_authenticated_user::hyper_request(theBuilder)?;
41376
41377        ::log::debug!("HTTP request: {:?}", &theRequest);
41378
41379        let theResponse = self.client.request(theRequest).await?;
41380
41381        ::log::debug!("HTTP response: {:?}", &theResponse);
41382
41383        Ok(theResponse)
41384    }
41385
41386    /// List repositories starred by the authenticated user
41387    /// 
41388    /// Lists repositories the authenticated user has starred.
41389    /// 
41390    /// You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:
41391    /// 
41392    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user)
41393    pub async fn activity_list_repos_starred_by_authenticated_user(
41394        &self,
41395        sort: &crate::types::Sort<'_>,
41396        per_page: ::std::option::Option<i64>,
41397        page: ::std::option::Option<i64>,
41398    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41399        let (sort, direction) = sort.extract();
41400        let mut theScheme = AuthScheme::from(&self.config.authentication);
41401
41402        while let Some(auth_step) = theScheme.step()? {
41403            match auth_step {
41404                ::authentic::AuthenticationStep::Request(auth_request) => {
41405                    theScheme.respond(self.client.request(auth_request).await);
41406                }
41407                ::authentic::AuthenticationStep::WaitFor(duration) => {
41408                    (self.sleep)(duration).await;
41409                }
41410            }
41411        }
41412        let theBuilder = crate::v1_1_4::request::activity_list_repos_starred_by_authenticated_user::http_builder(
41413            self.config.base_url.as_ref(),
41414            sort,
41415            direction,
41416            per_page,
41417            page,
41418            self.config.user_agent.as_ref(),
41419            self.config.accept.as_deref(),
41420        )?
41421        .with_authentication(&theScheme)?;
41422
41423        let theRequest =
41424            crate::v1_1_4::request::activity_list_repos_starred_by_authenticated_user::hyper_request(theBuilder)?;
41425
41426        ::log::debug!("HTTP request: {:?}", &theRequest);
41427
41428        let theResponse = self.client.request(theRequest).await?;
41429
41430        ::log::debug!("HTTP response: {:?}", &theResponse);
41431
41432        Ok(theResponse)
41433    }
41434
41435    /// Check if a repository is starred by the authenticated user
41436    /// 
41437    /// [API method documentation](https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user)
41438    pub async fn activity_check_repo_is_starred_by_authenticated_user(
41439        &self,
41440        owner: &str,
41441        repo: &str,
41442    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41443        let mut theScheme = AuthScheme::from(&self.config.authentication);
41444
41445        while let Some(auth_step) = theScheme.step()? {
41446            match auth_step {
41447                ::authentic::AuthenticationStep::Request(auth_request) => {
41448                    theScheme.respond(self.client.request(auth_request).await);
41449                }
41450                ::authentic::AuthenticationStep::WaitFor(duration) => {
41451                    (self.sleep)(duration).await;
41452                }
41453            }
41454        }
41455        let theBuilder = crate::v1_1_4::request::activity_check_repo_is_starred_by_authenticated_user::http_builder(
41456            self.config.base_url.as_ref(),
41457            owner,
41458            repo,
41459            self.config.user_agent.as_ref(),
41460            self.config.accept.as_deref(),
41461        )?
41462        .with_authentication(&theScheme)?;
41463
41464        let theRequest =
41465            crate::v1_1_4::request::activity_check_repo_is_starred_by_authenticated_user::hyper_request(theBuilder)?;
41466
41467        ::log::debug!("HTTP request: {:?}", &theRequest);
41468
41469        let theResponse = self.client.request(theRequest).await?;
41470
41471        ::log::debug!("HTTP response: {:?}", &theResponse);
41472
41473        Ok(theResponse)
41474    }
41475
41476    /// Star a repository for the authenticated user
41477    /// 
41478    /// Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)."
41479    /// 
41480    /// [API method documentation](https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user)
41481    pub async fn activity_star_repo_for_authenticated_user(
41482        &self,
41483        owner: &str,
41484        repo: &str,
41485    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41486        let mut theScheme = AuthScheme::from(&self.config.authentication);
41487
41488        while let Some(auth_step) = theScheme.step()? {
41489            match auth_step {
41490                ::authentic::AuthenticationStep::Request(auth_request) => {
41491                    theScheme.respond(self.client.request(auth_request).await);
41492                }
41493                ::authentic::AuthenticationStep::WaitFor(duration) => {
41494                    (self.sleep)(duration).await;
41495                }
41496            }
41497        }
41498        let theBuilder = crate::v1_1_4::request::activity_star_repo_for_authenticated_user::http_builder(
41499            self.config.base_url.as_ref(),
41500            owner,
41501            repo,
41502            self.config.user_agent.as_ref(),
41503            self.config.accept.as_deref(),
41504        )?
41505        .with_authentication(&theScheme)?;
41506
41507        let theRequest =
41508            crate::v1_1_4::request::activity_star_repo_for_authenticated_user::hyper_request(theBuilder)?;
41509
41510        ::log::debug!("HTTP request: {:?}", &theRequest);
41511
41512        let theResponse = self.client.request(theRequest).await?;
41513
41514        ::log::debug!("HTTP response: {:?}", &theResponse);
41515
41516        Ok(theResponse)
41517    }
41518
41519    /// Unstar a repository for the authenticated user
41520    /// 
41521    /// [API method documentation](https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user)
41522    pub async fn activity_unstar_repo_for_authenticated_user(
41523        &self,
41524        owner: &str,
41525        repo: &str,
41526    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41527        let mut theScheme = AuthScheme::from(&self.config.authentication);
41528
41529        while let Some(auth_step) = theScheme.step()? {
41530            match auth_step {
41531                ::authentic::AuthenticationStep::Request(auth_request) => {
41532                    theScheme.respond(self.client.request(auth_request).await);
41533                }
41534                ::authentic::AuthenticationStep::WaitFor(duration) => {
41535                    (self.sleep)(duration).await;
41536                }
41537            }
41538        }
41539        let theBuilder = crate::v1_1_4::request::activity_unstar_repo_for_authenticated_user::http_builder(
41540            self.config.base_url.as_ref(),
41541            owner,
41542            repo,
41543            self.config.user_agent.as_ref(),
41544            self.config.accept.as_deref(),
41545        )?
41546        .with_authentication(&theScheme)?;
41547
41548        let theRequest =
41549            crate::v1_1_4::request::activity_unstar_repo_for_authenticated_user::hyper_request(theBuilder)?;
41550
41551        ::log::debug!("HTTP request: {:?}", &theRequest);
41552
41553        let theResponse = self.client.request(theRequest).await?;
41554
41555        ::log::debug!("HTTP response: {:?}", &theResponse);
41556
41557        Ok(theResponse)
41558    }
41559
41560    /// List repositories watched by the authenticated user
41561    /// 
41562    /// Lists repositories the authenticated user is watching.
41563    /// 
41564    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user)
41565    pub async fn activity_list_watched_repos_for_authenticated_user(
41566        &self,
41567        per_page: ::std::option::Option<i64>,
41568        page: ::std::option::Option<i64>,
41569    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41570        let mut theScheme = AuthScheme::from(&self.config.authentication);
41571
41572        while let Some(auth_step) = theScheme.step()? {
41573            match auth_step {
41574                ::authentic::AuthenticationStep::Request(auth_request) => {
41575                    theScheme.respond(self.client.request(auth_request).await);
41576                }
41577                ::authentic::AuthenticationStep::WaitFor(duration) => {
41578                    (self.sleep)(duration).await;
41579                }
41580            }
41581        }
41582        let theBuilder = crate::v1_1_4::request::activity_list_watched_repos_for_authenticated_user::http_builder(
41583            self.config.base_url.as_ref(),
41584            per_page,
41585            page,
41586            self.config.user_agent.as_ref(),
41587            self.config.accept.as_deref(),
41588        )?
41589        .with_authentication(&theScheme)?;
41590
41591        let theRequest =
41592            crate::v1_1_4::request::activity_list_watched_repos_for_authenticated_user::hyper_request(theBuilder)?;
41593
41594        ::log::debug!("HTTP request: {:?}", &theRequest);
41595
41596        let theResponse = self.client.request(theRequest).await?;
41597
41598        ::log::debug!("HTTP response: {:?}", &theResponse);
41599
41600        Ok(theResponse)
41601    }
41602
41603    /// List teams for the authenticated user
41604    /// 
41605    /// List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/).
41606    /// 
41607    /// [API method documentation](https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user)
41608    pub async fn teams_list_for_authenticated_user(
41609        &self,
41610        per_page: ::std::option::Option<i64>,
41611        page: ::std::option::Option<i64>,
41612    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41613        let mut theScheme = AuthScheme::from(&self.config.authentication);
41614
41615        while let Some(auth_step) = theScheme.step()? {
41616            match auth_step {
41617                ::authentic::AuthenticationStep::Request(auth_request) => {
41618                    theScheme.respond(self.client.request(auth_request).await);
41619                }
41620                ::authentic::AuthenticationStep::WaitFor(duration) => {
41621                    (self.sleep)(duration).await;
41622                }
41623            }
41624        }
41625        let theBuilder = crate::v1_1_4::request::teams_list_for_authenticated_user::http_builder(
41626            self.config.base_url.as_ref(),
41627            per_page,
41628            page,
41629            self.config.user_agent.as_ref(),
41630            self.config.accept.as_deref(),
41631        )?
41632        .with_authentication(&theScheme)?;
41633
41634        let theRequest =
41635            crate::v1_1_4::request::teams_list_for_authenticated_user::hyper_request(theBuilder)?;
41636
41637        ::log::debug!("HTTP request: {:?}", &theRequest);
41638
41639        let theResponse = self.client.request(theRequest).await?;
41640
41641        ::log::debug!("HTTP response: {:?}", &theResponse);
41642
41643        Ok(theResponse)
41644    }
41645
41646    /// List users
41647    /// 
41648    /// Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts.
41649    /// 
41650    /// Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users.
41651    /// 
41652    /// [API method documentation](https://docs.github.com/rest/reference/users#list-users)
41653    pub async fn users_list(
41654        &self,
41655        since: ::std::option::Option<i64>,
41656        per_page: ::std::option::Option<i64>,
41657    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41658        let mut theScheme = AuthScheme::from(&self.config.authentication);
41659
41660        while let Some(auth_step) = theScheme.step()? {
41661            match auth_step {
41662                ::authentic::AuthenticationStep::Request(auth_request) => {
41663                    theScheme.respond(self.client.request(auth_request).await);
41664                }
41665                ::authentic::AuthenticationStep::WaitFor(duration) => {
41666                    (self.sleep)(duration).await;
41667                }
41668            }
41669        }
41670        let theBuilder = crate::v1_1_4::request::users_list::http_builder(
41671            self.config.base_url.as_ref(),
41672            since,
41673            per_page,
41674            self.config.user_agent.as_ref(),
41675            self.config.accept.as_deref(),
41676        )?
41677        .with_authentication(&theScheme)?;
41678
41679        let theRequest =
41680            crate::v1_1_4::request::users_list::hyper_request(theBuilder)?;
41681
41682        ::log::debug!("HTTP request: {:?}", &theRequest);
41683
41684        let theResponse = self.client.request(theRequest).await?;
41685
41686        ::log::debug!("HTTP response: {:?}", &theResponse);
41687
41688        Ok(theResponse)
41689    }
41690
41691    /// Get a user
41692    /// 
41693    /// Provides publicly available information about someone with a GitHub account.
41694    /// 
41695    /// GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub plan information' below"
41696    /// 
41697    /// The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/overview/resources-in-the-rest-api#authentication).
41698    /// 
41699    /// The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/reference/users#emails)".
41700    /// 
41701    /// [API method documentation](https://docs.github.com/rest/reference/users#get-a-user)
41702    pub async fn users_get_by_username(
41703        &self,
41704        username: &str,
41705    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41706        let mut theScheme = AuthScheme::from(&self.config.authentication);
41707
41708        while let Some(auth_step) = theScheme.step()? {
41709            match auth_step {
41710                ::authentic::AuthenticationStep::Request(auth_request) => {
41711                    theScheme.respond(self.client.request(auth_request).await);
41712                }
41713                ::authentic::AuthenticationStep::WaitFor(duration) => {
41714                    (self.sleep)(duration).await;
41715                }
41716            }
41717        }
41718        let theBuilder = crate::v1_1_4::request::users_get_by_username::http_builder(
41719            self.config.base_url.as_ref(),
41720            username,
41721            self.config.user_agent.as_ref(),
41722            self.config.accept.as_deref(),
41723        )?
41724        .with_authentication(&theScheme)?;
41725
41726        let theRequest =
41727            crate::v1_1_4::request::users_get_by_username::hyper_request(theBuilder)?;
41728
41729        ::log::debug!("HTTP request: {:?}", &theRequest);
41730
41731        let theResponse = self.client.request(theRequest).await?;
41732
41733        ::log::debug!("HTTP response: {:?}", &theResponse);
41734
41735        Ok(theResponse)
41736    }
41737
41738    /// List events for the authenticated user
41739    /// 
41740    /// If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.
41741    /// 
41742    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user)
41743    pub async fn activity_list_events_for_authenticated_user(
41744        &self,
41745        username: &str,
41746        per_page: ::std::option::Option<i64>,
41747        page: ::std::option::Option<i64>,
41748    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41749        let mut theScheme = AuthScheme::from(&self.config.authentication);
41750
41751        while let Some(auth_step) = theScheme.step()? {
41752            match auth_step {
41753                ::authentic::AuthenticationStep::Request(auth_request) => {
41754                    theScheme.respond(self.client.request(auth_request).await);
41755                }
41756                ::authentic::AuthenticationStep::WaitFor(duration) => {
41757                    (self.sleep)(duration).await;
41758                }
41759            }
41760        }
41761        let theBuilder = crate::v1_1_4::request::activity_list_events_for_authenticated_user::http_builder(
41762            self.config.base_url.as_ref(),
41763            username,
41764            per_page,
41765            page,
41766            self.config.user_agent.as_ref(),
41767            self.config.accept.as_deref(),
41768        )?
41769        .with_authentication(&theScheme)?;
41770
41771        let theRequest =
41772            crate::v1_1_4::request::activity_list_events_for_authenticated_user::hyper_request(theBuilder)?;
41773
41774        ::log::debug!("HTTP request: {:?}", &theRequest);
41775
41776        let theResponse = self.client.request(theRequest).await?;
41777
41778        ::log::debug!("HTTP response: {:?}", &theResponse);
41779
41780        Ok(theResponse)
41781    }
41782
41783    /// List organization events for the authenticated user
41784    /// 
41785    /// This is the user's organization dashboard. You must be authenticated as the user to view this.
41786    /// 
41787    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user)
41788    pub async fn activity_list_org_events_for_authenticated_user(
41789        &self,
41790        username: &str,
41791        org: &str,
41792        per_page: ::std::option::Option<i64>,
41793        page: ::std::option::Option<i64>,
41794    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41795        let mut theScheme = AuthScheme::from(&self.config.authentication);
41796
41797        while let Some(auth_step) = theScheme.step()? {
41798            match auth_step {
41799                ::authentic::AuthenticationStep::Request(auth_request) => {
41800                    theScheme.respond(self.client.request(auth_request).await);
41801                }
41802                ::authentic::AuthenticationStep::WaitFor(duration) => {
41803                    (self.sleep)(duration).await;
41804                }
41805            }
41806        }
41807        let theBuilder = crate::v1_1_4::request::activity_list_org_events_for_authenticated_user::http_builder(
41808            self.config.base_url.as_ref(),
41809            username,
41810            org,
41811            per_page,
41812            page,
41813            self.config.user_agent.as_ref(),
41814            self.config.accept.as_deref(),
41815        )?
41816        .with_authentication(&theScheme)?;
41817
41818        let theRequest =
41819            crate::v1_1_4::request::activity_list_org_events_for_authenticated_user::hyper_request(theBuilder)?;
41820
41821        ::log::debug!("HTTP request: {:?}", &theRequest);
41822
41823        let theResponse = self.client.request(theRequest).await?;
41824
41825        ::log::debug!("HTTP response: {:?}", &theResponse);
41826
41827        Ok(theResponse)
41828    }
41829
41830    /// List public events for a user
41831    /// 
41832    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-public-events-for-a-user)
41833    pub async fn activity_list_public_events_for_user(
41834        &self,
41835        username: &str,
41836        per_page: ::std::option::Option<i64>,
41837        page: ::std::option::Option<i64>,
41838    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41839        let mut theScheme = AuthScheme::from(&self.config.authentication);
41840
41841        while let Some(auth_step) = theScheme.step()? {
41842            match auth_step {
41843                ::authentic::AuthenticationStep::Request(auth_request) => {
41844                    theScheme.respond(self.client.request(auth_request).await);
41845                }
41846                ::authentic::AuthenticationStep::WaitFor(duration) => {
41847                    (self.sleep)(duration).await;
41848                }
41849            }
41850        }
41851        let theBuilder = crate::v1_1_4::request::activity_list_public_events_for_user::http_builder(
41852            self.config.base_url.as_ref(),
41853            username,
41854            per_page,
41855            page,
41856            self.config.user_agent.as_ref(),
41857            self.config.accept.as_deref(),
41858        )?
41859        .with_authentication(&theScheme)?;
41860
41861        let theRequest =
41862            crate::v1_1_4::request::activity_list_public_events_for_user::hyper_request(theBuilder)?;
41863
41864        ::log::debug!("HTTP request: {:?}", &theRequest);
41865
41866        let theResponse = self.client.request(theRequest).await?;
41867
41868        ::log::debug!("HTTP response: {:?}", &theResponse);
41869
41870        Ok(theResponse)
41871    }
41872
41873    /// List followers of a user
41874    /// 
41875    /// Lists the people following the specified user.
41876    /// 
41877    /// [API method documentation](https://docs.github.com/rest/reference/users#list-followers-of-a-user)
41878    pub async fn users_list_followers_for_user(
41879        &self,
41880        username: &str,
41881        per_page: ::std::option::Option<i64>,
41882        page: ::std::option::Option<i64>,
41883    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41884        let mut theScheme = AuthScheme::from(&self.config.authentication);
41885
41886        while let Some(auth_step) = theScheme.step()? {
41887            match auth_step {
41888                ::authentic::AuthenticationStep::Request(auth_request) => {
41889                    theScheme.respond(self.client.request(auth_request).await);
41890                }
41891                ::authentic::AuthenticationStep::WaitFor(duration) => {
41892                    (self.sleep)(duration).await;
41893                }
41894            }
41895        }
41896        let theBuilder = crate::v1_1_4::request::users_list_followers_for_user::http_builder(
41897            self.config.base_url.as_ref(),
41898            username,
41899            per_page,
41900            page,
41901            self.config.user_agent.as_ref(),
41902            self.config.accept.as_deref(),
41903        )?
41904        .with_authentication(&theScheme)?;
41905
41906        let theRequest =
41907            crate::v1_1_4::request::users_list_followers_for_user::hyper_request(theBuilder)?;
41908
41909        ::log::debug!("HTTP request: {:?}", &theRequest);
41910
41911        let theResponse = self.client.request(theRequest).await?;
41912
41913        ::log::debug!("HTTP response: {:?}", &theResponse);
41914
41915        Ok(theResponse)
41916    }
41917
41918    /// List the people a user follows
41919    /// 
41920    /// Lists the people who the specified user follows.
41921    /// 
41922    /// [API method documentation](https://docs.github.com/rest/reference/users#list-the-people-a-user-follows)
41923    pub async fn users_list_following_for_user(
41924        &self,
41925        username: &str,
41926        per_page: ::std::option::Option<i64>,
41927        page: ::std::option::Option<i64>,
41928    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41929        let mut theScheme = AuthScheme::from(&self.config.authentication);
41930
41931        while let Some(auth_step) = theScheme.step()? {
41932            match auth_step {
41933                ::authentic::AuthenticationStep::Request(auth_request) => {
41934                    theScheme.respond(self.client.request(auth_request).await);
41935                }
41936                ::authentic::AuthenticationStep::WaitFor(duration) => {
41937                    (self.sleep)(duration).await;
41938                }
41939            }
41940        }
41941        let theBuilder = crate::v1_1_4::request::users_list_following_for_user::http_builder(
41942            self.config.base_url.as_ref(),
41943            username,
41944            per_page,
41945            page,
41946            self.config.user_agent.as_ref(),
41947            self.config.accept.as_deref(),
41948        )?
41949        .with_authentication(&theScheme)?;
41950
41951        let theRequest =
41952            crate::v1_1_4::request::users_list_following_for_user::hyper_request(theBuilder)?;
41953
41954        ::log::debug!("HTTP request: {:?}", &theRequest);
41955
41956        let theResponse = self.client.request(theRequest).await?;
41957
41958        ::log::debug!("HTTP response: {:?}", &theResponse);
41959
41960        Ok(theResponse)
41961    }
41962
41963    /// Check if a user follows another user
41964    /// 
41965    /// [API method documentation](https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user)
41966    pub async fn users_check_following_for_user(
41967        &self,
41968        username: &str,
41969        target_user: &str,
41970    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
41971        let mut theScheme = AuthScheme::from(&self.config.authentication);
41972
41973        while let Some(auth_step) = theScheme.step()? {
41974            match auth_step {
41975                ::authentic::AuthenticationStep::Request(auth_request) => {
41976                    theScheme.respond(self.client.request(auth_request).await);
41977                }
41978                ::authentic::AuthenticationStep::WaitFor(duration) => {
41979                    (self.sleep)(duration).await;
41980                }
41981            }
41982        }
41983        let theBuilder = crate::v1_1_4::request::users_check_following_for_user::http_builder(
41984            self.config.base_url.as_ref(),
41985            username,
41986            target_user,
41987            self.config.user_agent.as_ref(),
41988            self.config.accept.as_deref(),
41989        )?
41990        .with_authentication(&theScheme)?;
41991
41992        let theRequest =
41993            crate::v1_1_4::request::users_check_following_for_user::hyper_request(theBuilder)?;
41994
41995        ::log::debug!("HTTP request: {:?}", &theRequest);
41996
41997        let theResponse = self.client.request(theRequest).await?;
41998
41999        ::log::debug!("HTTP response: {:?}", &theResponse);
42000
42001        Ok(theResponse)
42002    }
42003
42004    /// List gists for a user
42005    /// 
42006    /// Lists public gists for the specified user:
42007    /// 
42008    /// [API method documentation](https://docs.github.com/rest/reference/gists#list-gists-for-a-user)
42009    pub async fn gists_list_for_user(
42010        &self,
42011        username: &str,
42012        since: ::std::option::Option<&str>,
42013        per_page: ::std::option::Option<i64>,
42014        page: ::std::option::Option<i64>,
42015    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42016        let mut theScheme = AuthScheme::from(&self.config.authentication);
42017
42018        while let Some(auth_step) = theScheme.step()? {
42019            match auth_step {
42020                ::authentic::AuthenticationStep::Request(auth_request) => {
42021                    theScheme.respond(self.client.request(auth_request).await);
42022                }
42023                ::authentic::AuthenticationStep::WaitFor(duration) => {
42024                    (self.sleep)(duration).await;
42025                }
42026            }
42027        }
42028        let theBuilder = crate::v1_1_4::request::gists_list_for_user::http_builder(
42029            self.config.base_url.as_ref(),
42030            username,
42031            since,
42032            per_page,
42033            page,
42034            self.config.user_agent.as_ref(),
42035            self.config.accept.as_deref(),
42036        )?
42037        .with_authentication(&theScheme)?;
42038
42039        let theRequest =
42040            crate::v1_1_4::request::gists_list_for_user::hyper_request(theBuilder)?;
42041
42042        ::log::debug!("HTTP request: {:?}", &theRequest);
42043
42044        let theResponse = self.client.request(theRequest).await?;
42045
42046        ::log::debug!("HTTP response: {:?}", &theResponse);
42047
42048        Ok(theResponse)
42049    }
42050
42051    /// List GPG keys for a user
42052    /// 
42053    /// Lists the GPG keys for a user. This information is accessible by anyone.
42054    /// 
42055    /// [API method documentation](https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user)
42056    pub async fn users_list_gpg_keys_for_user(
42057        &self,
42058        username: &str,
42059        per_page: ::std::option::Option<i64>,
42060        page: ::std::option::Option<i64>,
42061    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42062        let mut theScheme = AuthScheme::from(&self.config.authentication);
42063
42064        while let Some(auth_step) = theScheme.step()? {
42065            match auth_step {
42066                ::authentic::AuthenticationStep::Request(auth_request) => {
42067                    theScheme.respond(self.client.request(auth_request).await);
42068                }
42069                ::authentic::AuthenticationStep::WaitFor(duration) => {
42070                    (self.sleep)(duration).await;
42071                }
42072            }
42073        }
42074        let theBuilder = crate::v1_1_4::request::users_list_gpg_keys_for_user::http_builder(
42075            self.config.base_url.as_ref(),
42076            username,
42077            per_page,
42078            page,
42079            self.config.user_agent.as_ref(),
42080            self.config.accept.as_deref(),
42081        )?
42082        .with_authentication(&theScheme)?;
42083
42084        let theRequest =
42085            crate::v1_1_4::request::users_list_gpg_keys_for_user::hyper_request(theBuilder)?;
42086
42087        ::log::debug!("HTTP request: {:?}", &theRequest);
42088
42089        let theResponse = self.client.request(theRequest).await?;
42090
42091        ::log::debug!("HTTP response: {:?}", &theResponse);
42092
42093        Ok(theResponse)
42094    }
42095
42096    /// Get contextual information for a user
42097    /// 
42098    /// Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.
42099    /// 
42100    /// The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this:
42101    /// 
42102    /// ```shell
42103    ///  curl -u username:token
42104    ///   https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192
42105    /// ```
42106    /// 
42107    /// [API method documentation](https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user)
42108    pub async fn users_get_context_for_user(
42109        &self,
42110        username: &str,
42111        subject_type: ::std::option::Option<&str>,
42112        subject_id: ::std::option::Option<&str>,
42113    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42114        let mut theScheme = AuthScheme::from(&self.config.authentication);
42115
42116        while let Some(auth_step) = theScheme.step()? {
42117            match auth_step {
42118                ::authentic::AuthenticationStep::Request(auth_request) => {
42119                    theScheme.respond(self.client.request(auth_request).await);
42120                }
42121                ::authentic::AuthenticationStep::WaitFor(duration) => {
42122                    (self.sleep)(duration).await;
42123                }
42124            }
42125        }
42126        let theBuilder = crate::v1_1_4::request::users_get_context_for_user::http_builder(
42127            self.config.base_url.as_ref(),
42128            username,
42129            subject_type,
42130            subject_id,
42131            self.config.user_agent.as_ref(),
42132            self.config.accept.as_deref(),
42133        )?
42134        .with_authentication(&theScheme)?;
42135
42136        let theRequest =
42137            crate::v1_1_4::request::users_get_context_for_user::hyper_request(theBuilder)?;
42138
42139        ::log::debug!("HTTP request: {:?}", &theRequest);
42140
42141        let theResponse = self.client.request(theRequest).await?;
42142
42143        ::log::debug!("HTTP response: {:?}", &theResponse);
42144
42145        Ok(theResponse)
42146    }
42147
42148    /// Get a user installation for the authenticated app
42149    /// 
42150    /// Enables an authenticated GitHub App to find the user’s installation information.
42151    /// 
42152    /// You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.
42153    /// 
42154    /// [API method documentation](https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app)
42155    pub async fn apps_get_user_installation(
42156        &self,
42157        username: &str,
42158    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42159        let mut theScheme = AuthScheme::from(&self.config.authentication);
42160
42161        while let Some(auth_step) = theScheme.step()? {
42162            match auth_step {
42163                ::authentic::AuthenticationStep::Request(auth_request) => {
42164                    theScheme.respond(self.client.request(auth_request).await);
42165                }
42166                ::authentic::AuthenticationStep::WaitFor(duration) => {
42167                    (self.sleep)(duration).await;
42168                }
42169            }
42170        }
42171        let theBuilder = crate::v1_1_4::request::apps_get_user_installation::http_builder(
42172            self.config.base_url.as_ref(),
42173            username,
42174            self.config.user_agent.as_ref(),
42175            self.config.accept.as_deref(),
42176        )?
42177        .with_authentication(&theScheme)?;
42178
42179        let theRequest =
42180            crate::v1_1_4::request::apps_get_user_installation::hyper_request(theBuilder)?;
42181
42182        ::log::debug!("HTTP request: {:?}", &theRequest);
42183
42184        let theResponse = self.client.request(theRequest).await?;
42185
42186        ::log::debug!("HTTP response: {:?}", &theResponse);
42187
42188        Ok(theResponse)
42189    }
42190
42191    /// List public keys for a user
42192    /// 
42193    /// Lists the _verified_ public SSH keys for a user. This is accessible by anyone.
42194    /// 
42195    /// [API method documentation](https://docs.github.com/rest/reference/users#list-public-keys-for-a-user)
42196    pub async fn users_list_public_keys_for_user(
42197        &self,
42198        username: &str,
42199        per_page: ::std::option::Option<i64>,
42200        page: ::std::option::Option<i64>,
42201    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42202        let mut theScheme = AuthScheme::from(&self.config.authentication);
42203
42204        while let Some(auth_step) = theScheme.step()? {
42205            match auth_step {
42206                ::authentic::AuthenticationStep::Request(auth_request) => {
42207                    theScheme.respond(self.client.request(auth_request).await);
42208                }
42209                ::authentic::AuthenticationStep::WaitFor(duration) => {
42210                    (self.sleep)(duration).await;
42211                }
42212            }
42213        }
42214        let theBuilder = crate::v1_1_4::request::users_list_public_keys_for_user::http_builder(
42215            self.config.base_url.as_ref(),
42216            username,
42217            per_page,
42218            page,
42219            self.config.user_agent.as_ref(),
42220            self.config.accept.as_deref(),
42221        )?
42222        .with_authentication(&theScheme)?;
42223
42224        let theRequest =
42225            crate::v1_1_4::request::users_list_public_keys_for_user::hyper_request(theBuilder)?;
42226
42227        ::log::debug!("HTTP request: {:?}", &theRequest);
42228
42229        let theResponse = self.client.request(theRequest).await?;
42230
42231        ::log::debug!("HTTP response: {:?}", &theResponse);
42232
42233        Ok(theResponse)
42234    }
42235
42236    /// List organizations for a user
42237    /// 
42238    /// List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user.
42239    /// 
42240    /// This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead.
42241    /// 
42242    /// [API method documentation](https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user)
42243    pub async fn orgs_list_for_user(
42244        &self,
42245        username: &str,
42246        per_page: ::std::option::Option<i64>,
42247        page: ::std::option::Option<i64>,
42248    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42249        let mut theScheme = AuthScheme::from(&self.config.authentication);
42250
42251        while let Some(auth_step) = theScheme.step()? {
42252            match auth_step {
42253                ::authentic::AuthenticationStep::Request(auth_request) => {
42254                    theScheme.respond(self.client.request(auth_request).await);
42255                }
42256                ::authentic::AuthenticationStep::WaitFor(duration) => {
42257                    (self.sleep)(duration).await;
42258                }
42259            }
42260        }
42261        let theBuilder = crate::v1_1_4::request::orgs_list_for_user::http_builder(
42262            self.config.base_url.as_ref(),
42263            username,
42264            per_page,
42265            page,
42266            self.config.user_agent.as_ref(),
42267            self.config.accept.as_deref(),
42268        )?
42269        .with_authentication(&theScheme)?;
42270
42271        let theRequest =
42272            crate::v1_1_4::request::orgs_list_for_user::hyper_request(theBuilder)?;
42273
42274        ::log::debug!("HTTP request: {:?}", &theRequest);
42275
42276        let theResponse = self.client.request(theRequest).await?;
42277
42278        ::log::debug!("HTTP response: {:?}", &theResponse);
42279
42280        Ok(theResponse)
42281    }
42282
42283    /// List packages for a user
42284    /// 
42285    /// Lists all packages in a user's namespace for which the requesting user has access.
42286    /// 
42287    /// To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
42288    /// If `package_type` is not `container`, your token must also include the `repo` scope.
42289    /// 
42290    /// [API method documentation](https://docs.github.com/rest/reference/packages#list-packages-for-user)
42291    pub async fn packages_list_packages_for_user(
42292        &self,
42293        package_type: &str,
42294        visibility: ::std::option::Option<&str>,
42295        username: &str,
42296    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42297        let mut theScheme = AuthScheme::from(&self.config.authentication);
42298
42299        while let Some(auth_step) = theScheme.step()? {
42300            match auth_step {
42301                ::authentic::AuthenticationStep::Request(auth_request) => {
42302                    theScheme.respond(self.client.request(auth_request).await);
42303                }
42304                ::authentic::AuthenticationStep::WaitFor(duration) => {
42305                    (self.sleep)(duration).await;
42306                }
42307            }
42308        }
42309        let theBuilder = crate::v1_1_4::request::packages_list_packages_for_user::http_builder(
42310            self.config.base_url.as_ref(),
42311            username,
42312            package_type,
42313            visibility,
42314            self.config.user_agent.as_ref(),
42315            self.config.accept.as_deref(),
42316        )?
42317        .with_authentication(&theScheme)?;
42318
42319        let theRequest =
42320            crate::v1_1_4::request::packages_list_packages_for_user::hyper_request(theBuilder)?;
42321
42322        ::log::debug!("HTTP request: {:?}", &theRequest);
42323
42324        let theResponse = self.client.request(theRequest).await?;
42325
42326        ::log::debug!("HTTP response: {:?}", &theResponse);
42327
42328        Ok(theResponse)
42329    }
42330
42331    /// Get a package for a user
42332    /// 
42333    /// Gets a specific package metadata for a public package owned by a user.
42334    /// 
42335    /// To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
42336    /// If `package_type` is not `container`, your token must also include the `repo` scope.
42337    /// 
42338    /// [API method documentation](https://docs.github.com/rest/reference/packages#get-a-package-for-a-user)
42339    pub async fn packages_get_package_for_user(
42340        &self,
42341        package_type: &str,
42342        package_name: &str,
42343        username: &str,
42344    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42345        let mut theScheme = AuthScheme::from(&self.config.authentication);
42346
42347        while let Some(auth_step) = theScheme.step()? {
42348            match auth_step {
42349                ::authentic::AuthenticationStep::Request(auth_request) => {
42350                    theScheme.respond(self.client.request(auth_request).await);
42351                }
42352                ::authentic::AuthenticationStep::WaitFor(duration) => {
42353                    (self.sleep)(duration).await;
42354                }
42355            }
42356        }
42357        let theBuilder = crate::v1_1_4::request::packages_get_package_for_user::http_builder(
42358            self.config.base_url.as_ref(),
42359            package_type,
42360            package_name,
42361            username,
42362            self.config.user_agent.as_ref(),
42363            self.config.accept.as_deref(),
42364        )?
42365        .with_authentication(&theScheme)?;
42366
42367        let theRequest =
42368            crate::v1_1_4::request::packages_get_package_for_user::hyper_request(theBuilder)?;
42369
42370        ::log::debug!("HTTP request: {:?}", &theRequest);
42371
42372        let theResponse = self.client.request(theRequest).await?;
42373
42374        ::log::debug!("HTTP response: {:?}", &theResponse);
42375
42376        Ok(theResponse)
42377    }
42378
42379    /// Delete a package for a user
42380    /// 
42381    /// Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
42382    /// 
42383    /// To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition:
42384    /// - If `package_type` is not `container`, your token must also include the `repo` scope.
42385    /// - If `package_type` is `container`, you must also have admin permissions to the container you want to delete.
42386    /// 
42387    /// [API method documentation](https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user)
42388    pub async fn packages_delete_package_for_user(
42389        &self,
42390        package_type: &str,
42391        package_name: &str,
42392        username: &str,
42393    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42394        let mut theScheme = AuthScheme::from(&self.config.authentication);
42395
42396        while let Some(auth_step) = theScheme.step()? {
42397            match auth_step {
42398                ::authentic::AuthenticationStep::Request(auth_request) => {
42399                    theScheme.respond(self.client.request(auth_request).await);
42400                }
42401                ::authentic::AuthenticationStep::WaitFor(duration) => {
42402                    (self.sleep)(duration).await;
42403                }
42404            }
42405        }
42406        let theBuilder = crate::v1_1_4::request::packages_delete_package_for_user::http_builder(
42407            self.config.base_url.as_ref(),
42408            package_type,
42409            package_name,
42410            username,
42411            self.config.user_agent.as_ref(),
42412            self.config.accept.as_deref(),
42413        )?
42414        .with_authentication(&theScheme)?;
42415
42416        let theRequest =
42417            crate::v1_1_4::request::packages_delete_package_for_user::hyper_request(theBuilder)?;
42418
42419        ::log::debug!("HTTP request: {:?}", &theRequest);
42420
42421        let theResponse = self.client.request(theRequest).await?;
42422
42423        ::log::debug!("HTTP response: {:?}", &theResponse);
42424
42425        Ok(theResponse)
42426    }
42427
42428    /// Restore a package for a user
42429    /// 
42430    /// Restores an entire package for a user.
42431    /// 
42432    /// You can restore a deleted package under the following conditions:
42433    ///   - The package was deleted within the last 30 days.
42434    ///   - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
42435    /// 
42436    /// To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition:
42437    /// - If `package_type` is not `container`, your token must also include the `repo` scope.
42438    /// - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.
42439    /// 
42440    /// [API method documentation](https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user)
42441    pub async fn packages_restore_package_for_user(
42442        &self,
42443        package_type: &str,
42444        package_name: &str,
42445        username: &str,
42446        token: ::std::option::Option<&str>,
42447    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42448        let mut theScheme = AuthScheme::from(&self.config.authentication);
42449
42450        while let Some(auth_step) = theScheme.step()? {
42451            match auth_step {
42452                ::authentic::AuthenticationStep::Request(auth_request) => {
42453                    theScheme.respond(self.client.request(auth_request).await);
42454                }
42455                ::authentic::AuthenticationStep::WaitFor(duration) => {
42456                    (self.sleep)(duration).await;
42457                }
42458            }
42459        }
42460        let theBuilder = crate::v1_1_4::request::packages_restore_package_for_user::http_builder(
42461            self.config.base_url.as_ref(),
42462            package_type,
42463            package_name,
42464            username,
42465            token,
42466            self.config.user_agent.as_ref(),
42467            self.config.accept.as_deref(),
42468        )?
42469        .with_authentication(&theScheme)?;
42470
42471        let theRequest =
42472            crate::v1_1_4::request::packages_restore_package_for_user::hyper_request(theBuilder)?;
42473
42474        ::log::debug!("HTTP request: {:?}", &theRequest);
42475
42476        let theResponse = self.client.request(theRequest).await?;
42477
42478        ::log::debug!("HTTP response: {:?}", &theResponse);
42479
42480        Ok(theResponse)
42481    }
42482
42483    /// Get all package versions for a package owned by a user
42484    /// 
42485    /// Returns all package versions for a public package owned by a specified user.
42486    /// 
42487    /// To use this endpoint, you must authenticate using an access token with the `packages:read` scope.
42488    /// If `package_type` is not `container`, your token must also include the `repo` scope.
42489    /// 
42490    /// [API method documentation](https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-a-user)
42491    pub async fn packages_get_all_package_versions_for_package_owned_by_user(
42492        &self,
42493        package_type: &str,
42494        package_name: &str,
42495        username: &str,
42496    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42497        let mut theScheme = AuthScheme::from(&self.config.authentication);
42498
42499        while let Some(auth_step) = theScheme.step()? {
42500            match auth_step {
42501                ::authentic::AuthenticationStep::Request(auth_request) => {
42502                    theScheme.respond(self.client.request(auth_request).await);
42503                }
42504                ::authentic::AuthenticationStep::WaitFor(duration) => {
42505                    (self.sleep)(duration).await;
42506                }
42507            }
42508        }
42509        let theBuilder = crate::v1_1_4::request::packages_get_all_package_versions_for_package_owned_by_user::http_builder(
42510            self.config.base_url.as_ref(),
42511            package_type,
42512            package_name,
42513            username,
42514            self.config.user_agent.as_ref(),
42515            self.config.accept.as_deref(),
42516        )?
42517        .with_authentication(&theScheme)?;
42518
42519        let theRequest =
42520            crate::v1_1_4::request::packages_get_all_package_versions_for_package_owned_by_user::hyper_request(theBuilder)?;
42521
42522        ::log::debug!("HTTP request: {:?}", &theRequest);
42523
42524        let theResponse = self.client.request(theRequest).await?;
42525
42526        ::log::debug!("HTTP response: {:?}", &theResponse);
42527
42528        Ok(theResponse)
42529    }
42530
42531    /// Get a package version for a user
42532    /// 
42533    /// Gets a specific package version for a public package owned by a specified user.
42534    /// 
42535    /// At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope.
42536    /// If `package_type` is not `container`, your token must also include the `repo` scope.
42537    /// 
42538    /// [API method documentation](https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user)
42539    pub async fn packages_get_package_version_for_user(
42540        &self,
42541        package_type: &str,
42542        package_name: &str,
42543        package_version_id: i64,
42544        username: &str,
42545    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42546        let mut theScheme = AuthScheme::from(&self.config.authentication);
42547
42548        while let Some(auth_step) = theScheme.step()? {
42549            match auth_step {
42550                ::authentic::AuthenticationStep::Request(auth_request) => {
42551                    theScheme.respond(self.client.request(auth_request).await);
42552                }
42553                ::authentic::AuthenticationStep::WaitFor(duration) => {
42554                    (self.sleep)(duration).await;
42555                }
42556            }
42557        }
42558        let theBuilder = crate::v1_1_4::request::packages_get_package_version_for_user::http_builder(
42559            self.config.base_url.as_ref(),
42560            package_type,
42561            package_name,
42562            package_version_id,
42563            username,
42564            self.config.user_agent.as_ref(),
42565            self.config.accept.as_deref(),
42566        )?
42567        .with_authentication(&theScheme)?;
42568
42569        let theRequest =
42570            crate::v1_1_4::request::packages_get_package_version_for_user::hyper_request(theBuilder)?;
42571
42572        ::log::debug!("HTTP request: {:?}", &theRequest);
42573
42574        let theResponse = self.client.request(theRequest).await?;
42575
42576        ::log::debug!("HTTP response: {:?}", &theResponse);
42577
42578        Ok(theResponse)
42579    }
42580
42581    /// Delete package version for a user
42582    /// 
42583    /// Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
42584    /// 
42585    /// To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition:
42586    /// - If `package_type` is not `container`, your token must also include the `repo` scope.
42587    /// - If `package_type` is `container`, you must also have admin permissions to the container you want to delete.
42588    /// 
42589    /// [API method documentation](https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user)
42590    pub async fn packages_delete_package_version_for_user(
42591        &self,
42592        package_type: &str,
42593        package_name: &str,
42594        username: &str,
42595        package_version_id: i64,
42596    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42597        let mut theScheme = AuthScheme::from(&self.config.authentication);
42598
42599        while let Some(auth_step) = theScheme.step()? {
42600            match auth_step {
42601                ::authentic::AuthenticationStep::Request(auth_request) => {
42602                    theScheme.respond(self.client.request(auth_request).await);
42603                }
42604                ::authentic::AuthenticationStep::WaitFor(duration) => {
42605                    (self.sleep)(duration).await;
42606                }
42607            }
42608        }
42609        let theBuilder = crate::v1_1_4::request::packages_delete_package_version_for_user::http_builder(
42610            self.config.base_url.as_ref(),
42611            package_type,
42612            package_name,
42613            username,
42614            package_version_id,
42615            self.config.user_agent.as_ref(),
42616            self.config.accept.as_deref(),
42617        )?
42618        .with_authentication(&theScheme)?;
42619
42620        let theRequest =
42621            crate::v1_1_4::request::packages_delete_package_version_for_user::hyper_request(theBuilder)?;
42622
42623        ::log::debug!("HTTP request: {:?}", &theRequest);
42624
42625        let theResponse = self.client.request(theRequest).await?;
42626
42627        ::log::debug!("HTTP response: {:?}", &theResponse);
42628
42629        Ok(theResponse)
42630    }
42631
42632    /// Restore package version for a user
42633    /// 
42634    /// Restores a specific package version for a user.
42635    /// 
42636    /// You can restore a deleted package under the following conditions:
42637    ///   - The package was deleted within the last 30 days.
42638    ///   - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.
42639    /// 
42640    /// To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition:
42641    /// - If `package_type` is not `container`, your token must also include the `repo` scope.
42642    /// - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore.
42643    /// 
42644    /// [API method documentation](https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user)
42645    pub async fn packages_restore_package_version_for_user(
42646        &self,
42647        package_type: &str,
42648        package_name: &str,
42649        username: &str,
42650        package_version_id: i64,
42651    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42652        let mut theScheme = AuthScheme::from(&self.config.authentication);
42653
42654        while let Some(auth_step) = theScheme.step()? {
42655            match auth_step {
42656                ::authentic::AuthenticationStep::Request(auth_request) => {
42657                    theScheme.respond(self.client.request(auth_request).await);
42658                }
42659                ::authentic::AuthenticationStep::WaitFor(duration) => {
42660                    (self.sleep)(duration).await;
42661                }
42662            }
42663        }
42664        let theBuilder = crate::v1_1_4::request::packages_restore_package_version_for_user::http_builder(
42665            self.config.base_url.as_ref(),
42666            package_type,
42667            package_name,
42668            username,
42669            package_version_id,
42670            self.config.user_agent.as_ref(),
42671            self.config.accept.as_deref(),
42672        )?
42673        .with_authentication(&theScheme)?;
42674
42675        let theRequest =
42676            crate::v1_1_4::request::packages_restore_package_version_for_user::hyper_request(theBuilder)?;
42677
42678        ::log::debug!("HTTP request: {:?}", &theRequest);
42679
42680        let theResponse = self.client.request(theRequest).await?;
42681
42682        ::log::debug!("HTTP response: {:?}", &theResponse);
42683
42684        Ok(theResponse)
42685    }
42686
42687    /// List user projects
42688    /// 
42689    /// [API method documentation](https://docs.github.com/rest/reference/projects#list-user-projects)
42690    pub async fn projects_list_for_user(
42691        &self,
42692        username: &str,
42693        state: ::std::option::Option<&str>,
42694        per_page: ::std::option::Option<i64>,
42695        page: ::std::option::Option<i64>,
42696    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42697        let mut theScheme = AuthScheme::from(&self.config.authentication);
42698
42699        while let Some(auth_step) = theScheme.step()? {
42700            match auth_step {
42701                ::authentic::AuthenticationStep::Request(auth_request) => {
42702                    theScheme.respond(self.client.request(auth_request).await);
42703                }
42704                ::authentic::AuthenticationStep::WaitFor(duration) => {
42705                    (self.sleep)(duration).await;
42706                }
42707            }
42708        }
42709        let theBuilder = crate::v1_1_4::request::projects_list_for_user::http_builder(
42710            self.config.base_url.as_ref(),
42711            username,
42712            state,
42713            per_page,
42714            page,
42715            self.config.user_agent.as_ref(),
42716            self.config.accept.as_deref(),
42717        )?
42718        .with_authentication(&theScheme)?;
42719
42720        let theRequest =
42721            crate::v1_1_4::request::projects_list_for_user::hyper_request(theBuilder)?;
42722
42723        ::log::debug!("HTTP request: {:?}", &theRequest);
42724
42725        let theResponse = self.client.request(theRequest).await?;
42726
42727        ::log::debug!("HTTP response: {:?}", &theResponse);
42728
42729        Ok(theResponse)
42730    }
42731
42732    /// List events received by the authenticated user
42733    /// 
42734    /// These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events.
42735    /// 
42736    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user)
42737    pub async fn activity_list_received_events_for_user(
42738        &self,
42739        username: &str,
42740        per_page: ::std::option::Option<i64>,
42741        page: ::std::option::Option<i64>,
42742    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42743        let mut theScheme = AuthScheme::from(&self.config.authentication);
42744
42745        while let Some(auth_step) = theScheme.step()? {
42746            match auth_step {
42747                ::authentic::AuthenticationStep::Request(auth_request) => {
42748                    theScheme.respond(self.client.request(auth_request).await);
42749                }
42750                ::authentic::AuthenticationStep::WaitFor(duration) => {
42751                    (self.sleep)(duration).await;
42752                }
42753            }
42754        }
42755        let theBuilder = crate::v1_1_4::request::activity_list_received_events_for_user::http_builder(
42756            self.config.base_url.as_ref(),
42757            username,
42758            per_page,
42759            page,
42760            self.config.user_agent.as_ref(),
42761            self.config.accept.as_deref(),
42762        )?
42763        .with_authentication(&theScheme)?;
42764
42765        let theRequest =
42766            crate::v1_1_4::request::activity_list_received_events_for_user::hyper_request(theBuilder)?;
42767
42768        ::log::debug!("HTTP request: {:?}", &theRequest);
42769
42770        let theResponse = self.client.request(theRequest).await?;
42771
42772        ::log::debug!("HTTP response: {:?}", &theResponse);
42773
42774        Ok(theResponse)
42775    }
42776
42777    /// List public events received by a user
42778    /// 
42779    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user)
42780    pub async fn activity_list_received_public_events_for_user(
42781        &self,
42782        username: &str,
42783        per_page: ::std::option::Option<i64>,
42784        page: ::std::option::Option<i64>,
42785    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42786        let mut theScheme = AuthScheme::from(&self.config.authentication);
42787
42788        while let Some(auth_step) = theScheme.step()? {
42789            match auth_step {
42790                ::authentic::AuthenticationStep::Request(auth_request) => {
42791                    theScheme.respond(self.client.request(auth_request).await);
42792                }
42793                ::authentic::AuthenticationStep::WaitFor(duration) => {
42794                    (self.sleep)(duration).await;
42795                }
42796            }
42797        }
42798        let theBuilder = crate::v1_1_4::request::activity_list_received_public_events_for_user::http_builder(
42799            self.config.base_url.as_ref(),
42800            username,
42801            per_page,
42802            page,
42803            self.config.user_agent.as_ref(),
42804            self.config.accept.as_deref(),
42805        )?
42806        .with_authentication(&theScheme)?;
42807
42808        let theRequest =
42809            crate::v1_1_4::request::activity_list_received_public_events_for_user::hyper_request(theBuilder)?;
42810
42811        ::log::debug!("HTTP request: {:?}", &theRequest);
42812
42813        let theResponse = self.client.request(theRequest).await?;
42814
42815        ::log::debug!("HTTP response: {:?}", &theResponse);
42816
42817        Ok(theResponse)
42818    }
42819
42820    /// List repositories for a user
42821    /// 
42822    /// Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user.
42823    /// 
42824    /// [API method documentation](https://docs.github.com/rest/reference/repos#list-repositories-for-a-user)
42825    pub async fn repos_list_for_user(
42826        &self,
42827        username: &str,
42828        r#type: ::std::option::Option<&str>,
42829        sort: &crate::types::Sort<'_>,
42830        per_page: ::std::option::Option<i64>,
42831        page: ::std::option::Option<i64>,
42832    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42833        let (sort, direction) = sort.extract();
42834        let mut theScheme = AuthScheme::from(&self.config.authentication);
42835
42836        while let Some(auth_step) = theScheme.step()? {
42837            match auth_step {
42838                ::authentic::AuthenticationStep::Request(auth_request) => {
42839                    theScheme.respond(self.client.request(auth_request).await);
42840                }
42841                ::authentic::AuthenticationStep::WaitFor(duration) => {
42842                    (self.sleep)(duration).await;
42843                }
42844            }
42845        }
42846        let theBuilder = crate::v1_1_4::request::repos_list_for_user::http_builder(
42847            self.config.base_url.as_ref(),
42848            username,
42849            r#type,
42850            sort,
42851            direction,
42852            per_page,
42853            page,
42854            self.config.user_agent.as_ref(),
42855            self.config.accept.as_deref(),
42856        )?
42857        .with_authentication(&theScheme)?;
42858
42859        let theRequest =
42860            crate::v1_1_4::request::repos_list_for_user::hyper_request(theBuilder)?;
42861
42862        ::log::debug!("HTTP request: {:?}", &theRequest);
42863
42864        let theResponse = self.client.request(theRequest).await?;
42865
42866        ::log::debug!("HTTP response: {:?}", &theResponse);
42867
42868        Ok(theResponse)
42869    }
42870
42871    /// Get GitHub Actions billing for a user
42872    /// 
42873    /// Gets the summary of the free and paid GitHub Actions minutes used.
42874    /// 
42875    /// Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
42876    /// 
42877    /// Access tokens must have the `user` scope.
42878    /// 
42879    /// [API method documentation](https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user)
42880    pub async fn billing_get_github_actions_billing_user(
42881        &self,
42882        username: &str,
42883    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42884        let mut theScheme = AuthScheme::from(&self.config.authentication);
42885
42886        while let Some(auth_step) = theScheme.step()? {
42887            match auth_step {
42888                ::authentic::AuthenticationStep::Request(auth_request) => {
42889                    theScheme.respond(self.client.request(auth_request).await);
42890                }
42891                ::authentic::AuthenticationStep::WaitFor(duration) => {
42892                    (self.sleep)(duration).await;
42893                }
42894            }
42895        }
42896        let theBuilder = crate::v1_1_4::request::billing_get_github_actions_billing_user::http_builder(
42897            self.config.base_url.as_ref(),
42898            username,
42899            self.config.user_agent.as_ref(),
42900            self.config.accept.as_deref(),
42901        )?
42902        .with_authentication(&theScheme)?;
42903
42904        let theRequest =
42905            crate::v1_1_4::request::billing_get_github_actions_billing_user::hyper_request(theBuilder)?;
42906
42907        ::log::debug!("HTTP request: {:?}", &theRequest);
42908
42909        let theResponse = self.client.request(theRequest).await?;
42910
42911        ::log::debug!("HTTP response: {:?}", &theResponse);
42912
42913        Ok(theResponse)
42914    }
42915
42916    /// Get GitHub Packages billing for a user
42917    /// 
42918    /// Gets the free and paid storage used for GitHub Packages in gigabytes.
42919    /// 
42920    /// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
42921    /// 
42922    /// Access tokens must have the `user` scope.
42923    /// 
42924    /// [API method documentation](https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user)
42925    pub async fn billing_get_github_packages_billing_user(
42926        &self,
42927        username: &str,
42928    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42929        let mut theScheme = AuthScheme::from(&self.config.authentication);
42930
42931        while let Some(auth_step) = theScheme.step()? {
42932            match auth_step {
42933                ::authentic::AuthenticationStep::Request(auth_request) => {
42934                    theScheme.respond(self.client.request(auth_request).await);
42935                }
42936                ::authentic::AuthenticationStep::WaitFor(duration) => {
42937                    (self.sleep)(duration).await;
42938                }
42939            }
42940        }
42941        let theBuilder = crate::v1_1_4::request::billing_get_github_packages_billing_user::http_builder(
42942            self.config.base_url.as_ref(),
42943            username,
42944            self.config.user_agent.as_ref(),
42945            self.config.accept.as_deref(),
42946        )?
42947        .with_authentication(&theScheme)?;
42948
42949        let theRequest =
42950            crate::v1_1_4::request::billing_get_github_packages_billing_user::hyper_request(theBuilder)?;
42951
42952        ::log::debug!("HTTP request: {:?}", &theRequest);
42953
42954        let theResponse = self.client.request(theRequest).await?;
42955
42956        ::log::debug!("HTTP response: {:?}", &theResponse);
42957
42958        Ok(theResponse)
42959    }
42960
42961    /// Get shared storage billing for a user
42962    /// 
42963    /// Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages.
42964    /// 
42965    /// Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)."
42966    /// 
42967    /// Access tokens must have the `user` scope.
42968    /// 
42969    /// [API method documentation](https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user)
42970    pub async fn billing_get_shared_storage_billing_user(
42971        &self,
42972        username: &str,
42973    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
42974        let mut theScheme = AuthScheme::from(&self.config.authentication);
42975
42976        while let Some(auth_step) = theScheme.step()? {
42977            match auth_step {
42978                ::authentic::AuthenticationStep::Request(auth_request) => {
42979                    theScheme.respond(self.client.request(auth_request).await);
42980                }
42981                ::authentic::AuthenticationStep::WaitFor(duration) => {
42982                    (self.sleep)(duration).await;
42983                }
42984            }
42985        }
42986        let theBuilder = crate::v1_1_4::request::billing_get_shared_storage_billing_user::http_builder(
42987            self.config.base_url.as_ref(),
42988            username,
42989            self.config.user_agent.as_ref(),
42990            self.config.accept.as_deref(),
42991        )?
42992        .with_authentication(&theScheme)?;
42993
42994        let theRequest =
42995            crate::v1_1_4::request::billing_get_shared_storage_billing_user::hyper_request(theBuilder)?;
42996
42997        ::log::debug!("HTTP request: {:?}", &theRequest);
42998
42999        let theResponse = self.client.request(theRequest).await?;
43000
43001        ::log::debug!("HTTP response: {:?}", &theResponse);
43002
43003        Ok(theResponse)
43004    }
43005
43006    /// List repositories starred by a user
43007    /// 
43008    /// Lists repositories a user has starred.
43009    /// 
43010    /// You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header:
43011    /// 
43012    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user)
43013    pub async fn activity_list_repos_starred_by_user(
43014        &self,
43015        username: &str,
43016        sort: &crate::types::Sort<'_>,
43017        per_page: ::std::option::Option<i64>,
43018        page: ::std::option::Option<i64>,
43019    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
43020        let (sort, direction) = sort.extract();
43021        let mut theScheme = AuthScheme::from(&self.config.authentication);
43022
43023        while let Some(auth_step) = theScheme.step()? {
43024            match auth_step {
43025                ::authentic::AuthenticationStep::Request(auth_request) => {
43026                    theScheme.respond(self.client.request(auth_request).await);
43027                }
43028                ::authentic::AuthenticationStep::WaitFor(duration) => {
43029                    (self.sleep)(duration).await;
43030                }
43031            }
43032        }
43033        let theBuilder = crate::v1_1_4::request::activity_list_repos_starred_by_user::http_builder(
43034            self.config.base_url.as_ref(),
43035            username,
43036            sort,
43037            direction,
43038            per_page,
43039            page,
43040            self.config.user_agent.as_ref(),
43041            self.config.accept.as_deref(),
43042        )?
43043        .with_authentication(&theScheme)?;
43044
43045        let theRequest =
43046            crate::v1_1_4::request::activity_list_repos_starred_by_user::hyper_request(theBuilder)?;
43047
43048        ::log::debug!("HTTP request: {:?}", &theRequest);
43049
43050        let theResponse = self.client.request(theRequest).await?;
43051
43052        ::log::debug!("HTTP response: {:?}", &theResponse);
43053
43054        Ok(theResponse)
43055    }
43056
43057    /// List repositories watched by a user
43058    /// 
43059    /// Lists repositories a user is watching.
43060    /// 
43061    /// [API method documentation](https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user)
43062    pub async fn activity_list_repos_watched_by_user(
43063        &self,
43064        username: &str,
43065        per_page: ::std::option::Option<i64>,
43066        page: ::std::option::Option<i64>,
43067    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
43068        let mut theScheme = AuthScheme::from(&self.config.authentication);
43069
43070        while let Some(auth_step) = theScheme.step()? {
43071            match auth_step {
43072                ::authentic::AuthenticationStep::Request(auth_request) => {
43073                    theScheme.respond(self.client.request(auth_request).await);
43074                }
43075                ::authentic::AuthenticationStep::WaitFor(duration) => {
43076                    (self.sleep)(duration).await;
43077                }
43078            }
43079        }
43080        let theBuilder = crate::v1_1_4::request::activity_list_repos_watched_by_user::http_builder(
43081            self.config.base_url.as_ref(),
43082            username,
43083            per_page,
43084            page,
43085            self.config.user_agent.as_ref(),
43086            self.config.accept.as_deref(),
43087        )?
43088        .with_authentication(&theScheme)?;
43089
43090        let theRequest =
43091            crate::v1_1_4::request::activity_list_repos_watched_by_user::hyper_request(theBuilder)?;
43092
43093        ::log::debug!("HTTP request: {:?}", &theRequest);
43094
43095        let theResponse = self.client.request(theRequest).await?;
43096
43097        ::log::debug!("HTTP response: {:?}", &theResponse);
43098
43099        Ok(theResponse)
43100    }
43101
43102    /// Get the Zen of GitHub
43103    /// 
43104    /// Get a random sentence from the Zen of GitHub
43105    pub async fn meta_get_zen(
43106        &self,
43107    ) -> Result<::hyper::Response<::hyper::Body>, crate::v1_1_4::ApiError> {
43108        let mut theScheme = AuthScheme::from(&self.config.authentication);
43109
43110        while let Some(auth_step) = theScheme.step()? {
43111            match auth_step {
43112                ::authentic::AuthenticationStep::Request(auth_request) => {
43113                    theScheme.respond(self.client.request(auth_request).await);
43114                }
43115                ::authentic::AuthenticationStep::WaitFor(duration) => {
43116                    (self.sleep)(duration).await;
43117                }
43118            }
43119        }
43120        let theBuilder = crate::v1_1_4::request::meta_get_zen::http_builder(
43121            self.config.base_url.as_ref(),
43122            self.config.user_agent.as_ref(),
43123            self.config.accept.as_deref(),
43124        )?
43125        .with_authentication(&theScheme)?;
43126
43127        let theRequest =
43128            crate::v1_1_4::request::meta_get_zen::hyper_request(theBuilder)?;
43129
43130        ::log::debug!("HTTP request: {:?}", &theRequest);
43131
43132        let theResponse = self.client.request(theRequest).await?;
43133
43134        ::log::debug!("HTTP response: {:?}", &theResponse);
43135
43136        Ok(theResponse)
43137    }
43138}