1use reqwest;
13use serde::{Deserialize, Serialize};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration};
16
17
18#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum ActionsSlashAddCustomLabelsToSelfHostedRunnerForOrgError {
22 Status404(models::BasicError),
23 Status422(models::ValidationErrorSimple),
24 UnknownValue(serde_json::Value),
25}
26
27#[derive(Debug, Clone, Serialize, Deserialize)]
29#[serde(untagged)]
30pub enum ActionsSlashAddCustomLabelsToSelfHostedRunnerForRepoError {
31 Status404(models::BasicError),
32 Status422(models::ValidationErrorSimple),
33 UnknownValue(serde_json::Value),
34}
35
36#[derive(Debug, Clone, Serialize, Deserialize)]
38#[serde(untagged)]
39pub enum ActionsSlashAddSelectedRepoToOrgSecretError {
40 Status409(),
41 UnknownValue(serde_json::Value),
42}
43
44#[derive(Debug, Clone, Serialize, Deserialize)]
46#[serde(untagged)]
47pub enum ActionsSlashAddSelectedRepoToOrgVariableError {
48 Status409(),
49 UnknownValue(serde_json::Value),
50}
51
52#[derive(Debug, Clone, Serialize, Deserialize)]
54#[serde(untagged)]
55pub enum ActionsSlashApproveWorkflowRunError {
56 Status403(models::BasicError),
57 Status404(models::BasicError),
58 UnknownValue(serde_json::Value),
59}
60
61#[derive(Debug, Clone, Serialize, Deserialize)]
63#[serde(untagged)]
64pub enum ActionsSlashCancelWorkflowRunError {
65 Status409(models::BasicError),
66 UnknownValue(serde_json::Value),
67}
68
69#[derive(Debug, Clone, Serialize, Deserialize)]
71#[serde(untagged)]
72pub enum ActionsSlashCreateEnvironmentVariableError {
73 UnknownValue(serde_json::Value),
74}
75
76#[derive(Debug, Clone, Serialize, Deserialize)]
78#[serde(untagged)]
79pub enum ActionsSlashCreateOrUpdateEnvironmentSecretError {
80 UnknownValue(serde_json::Value),
81}
82
83#[derive(Debug, Clone, Serialize, Deserialize)]
85#[serde(untagged)]
86pub enum ActionsSlashCreateOrUpdateOrgSecretError {
87 UnknownValue(serde_json::Value),
88}
89
90#[derive(Debug, Clone, Serialize, Deserialize)]
92#[serde(untagged)]
93pub enum ActionsSlashCreateOrUpdateRepoSecretError {
94 UnknownValue(serde_json::Value),
95}
96
97#[derive(Debug, Clone, Serialize, Deserialize)]
99#[serde(untagged)]
100pub enum ActionsSlashCreateOrgVariableError {
101 UnknownValue(serde_json::Value),
102}
103
104#[derive(Debug, Clone, Serialize, Deserialize)]
106#[serde(untagged)]
107pub enum ActionsSlashCreateRegistrationTokenForOrgError {
108 UnknownValue(serde_json::Value),
109}
110
111#[derive(Debug, Clone, Serialize, Deserialize)]
113#[serde(untagged)]
114pub enum ActionsSlashCreateRegistrationTokenForRepoError {
115 UnknownValue(serde_json::Value),
116}
117
118#[derive(Debug, Clone, Serialize, Deserialize)]
120#[serde(untagged)]
121pub enum ActionsSlashCreateRemoveTokenForOrgError {
122 UnknownValue(serde_json::Value),
123}
124
125#[derive(Debug, Clone, Serialize, Deserialize)]
127#[serde(untagged)]
128pub enum ActionsSlashCreateRemoveTokenForRepoError {
129 UnknownValue(serde_json::Value),
130}
131
132#[derive(Debug, Clone, Serialize, Deserialize)]
134#[serde(untagged)]
135pub enum ActionsSlashCreateRepoVariableError {
136 UnknownValue(serde_json::Value),
137}
138
139#[derive(Debug, Clone, Serialize, Deserialize)]
141#[serde(untagged)]
142pub enum ActionsSlashCreateWorkflowDispatchError {
143 UnknownValue(serde_json::Value),
144}
145
146#[derive(Debug, Clone, Serialize, Deserialize)]
148#[serde(untagged)]
149pub enum ActionsSlashDeleteActionsCacheByIdError {
150 UnknownValue(serde_json::Value),
151}
152
153#[derive(Debug, Clone, Serialize, Deserialize)]
155#[serde(untagged)]
156pub enum ActionsSlashDeleteActionsCacheByKeyError {
157 UnknownValue(serde_json::Value),
158}
159
160#[derive(Debug, Clone, Serialize, Deserialize)]
162#[serde(untagged)]
163pub enum ActionsSlashDeleteArtifactError {
164 UnknownValue(serde_json::Value),
165}
166
167#[derive(Debug, Clone, Serialize, Deserialize)]
169#[serde(untagged)]
170pub enum ActionsSlashDeleteEnvironmentSecretError {
171 UnknownValue(serde_json::Value),
172}
173
174#[derive(Debug, Clone, Serialize, Deserialize)]
176#[serde(untagged)]
177pub enum ActionsSlashDeleteEnvironmentVariableError {
178 UnknownValue(serde_json::Value),
179}
180
181#[derive(Debug, Clone, Serialize, Deserialize)]
183#[serde(untagged)]
184pub enum ActionsSlashDeleteOrgSecretError {
185 UnknownValue(serde_json::Value),
186}
187
188#[derive(Debug, Clone, Serialize, Deserialize)]
190#[serde(untagged)]
191pub enum ActionsSlashDeleteOrgVariableError {
192 UnknownValue(serde_json::Value),
193}
194
195#[derive(Debug, Clone, Serialize, Deserialize)]
197#[serde(untagged)]
198pub enum ActionsSlashDeleteRepoSecretError {
199 UnknownValue(serde_json::Value),
200}
201
202#[derive(Debug, Clone, Serialize, Deserialize)]
204#[serde(untagged)]
205pub enum ActionsSlashDeleteRepoVariableError {
206 UnknownValue(serde_json::Value),
207}
208
209#[derive(Debug, Clone, Serialize, Deserialize)]
211#[serde(untagged)]
212pub enum ActionsSlashDeleteSelfHostedRunnerFromOrgError {
213 UnknownValue(serde_json::Value),
214}
215
216#[derive(Debug, Clone, Serialize, Deserialize)]
218#[serde(untagged)]
219pub enum ActionsSlashDeleteSelfHostedRunnerFromRepoError {
220 UnknownValue(serde_json::Value),
221}
222
223#[derive(Debug, Clone, Serialize, Deserialize)]
225#[serde(untagged)]
226pub enum ActionsSlashDeleteWorkflowRunError {
227 UnknownValue(serde_json::Value),
228}
229
230#[derive(Debug, Clone, Serialize, Deserialize)]
232#[serde(untagged)]
233pub enum ActionsSlashDeleteWorkflowRunLogsError {
234 Status403(models::BasicError),
235 Status500(models::BasicError),
236 UnknownValue(serde_json::Value),
237}
238
239#[derive(Debug, Clone, Serialize, Deserialize)]
241#[serde(untagged)]
242pub enum ActionsSlashDisableSelectedRepositoryGithubActionsOrganizationError {
243 UnknownValue(serde_json::Value),
244}
245
246#[derive(Debug, Clone, Serialize, Deserialize)]
248#[serde(untagged)]
249pub enum ActionsSlashDisableWorkflowError {
250 UnknownValue(serde_json::Value),
251}
252
253#[derive(Debug, Clone, Serialize, Deserialize)]
255#[serde(untagged)]
256pub enum ActionsSlashDownloadArtifactError {
257 Status410(models::BasicError),
258 UnknownValue(serde_json::Value),
259}
260
261#[derive(Debug, Clone, Serialize, Deserialize)]
263#[serde(untagged)]
264pub enum ActionsSlashDownloadJobLogsForWorkflowRunError {
265 UnknownValue(serde_json::Value),
266}
267
268#[derive(Debug, Clone, Serialize, Deserialize)]
270#[serde(untagged)]
271pub enum ActionsSlashDownloadWorkflowRunAttemptLogsError {
272 UnknownValue(serde_json::Value),
273}
274
275#[derive(Debug, Clone, Serialize, Deserialize)]
277#[serde(untagged)]
278pub enum ActionsSlashDownloadWorkflowRunLogsError {
279 UnknownValue(serde_json::Value),
280}
281
282#[derive(Debug, Clone, Serialize, Deserialize)]
284#[serde(untagged)]
285pub enum ActionsSlashEnableSelectedRepositoryGithubActionsOrganizationError {
286 UnknownValue(serde_json::Value),
287}
288
289#[derive(Debug, Clone, Serialize, Deserialize)]
291#[serde(untagged)]
292pub enum ActionsSlashEnableWorkflowError {
293 UnknownValue(serde_json::Value),
294}
295
296#[derive(Debug, Clone, Serialize, Deserialize)]
298#[serde(untagged)]
299pub enum ActionsSlashForceCancelWorkflowRunError {
300 Status409(models::BasicError),
301 UnknownValue(serde_json::Value),
302}
303
304#[derive(Debug, Clone, Serialize, Deserialize)]
306#[serde(untagged)]
307pub enum ActionsSlashGenerateRunnerJitconfigForOrgError {
308 Status404(models::BasicError),
309 Status422(models::ValidationErrorSimple),
310 UnknownValue(serde_json::Value),
311}
312
313#[derive(Debug, Clone, Serialize, Deserialize)]
315#[serde(untagged)]
316pub enum ActionsSlashGenerateRunnerJitconfigForRepoError {
317 Status404(models::BasicError),
318 Status422(models::ValidationErrorSimple),
319 UnknownValue(serde_json::Value),
320}
321
322#[derive(Debug, Clone, Serialize, Deserialize)]
324#[serde(untagged)]
325pub enum ActionsSlashGetActionsCacheListError {
326 UnknownValue(serde_json::Value),
327}
328
329#[derive(Debug, Clone, Serialize, Deserialize)]
331#[serde(untagged)]
332pub enum ActionsSlashGetActionsCacheUsageError {
333 UnknownValue(serde_json::Value),
334}
335
336#[derive(Debug, Clone, Serialize, Deserialize)]
338#[serde(untagged)]
339pub enum ActionsSlashGetActionsCacheUsageByRepoForOrgError {
340 UnknownValue(serde_json::Value),
341}
342
343#[derive(Debug, Clone, Serialize, Deserialize)]
345#[serde(untagged)]
346pub enum ActionsSlashGetActionsCacheUsageForOrgError {
347 UnknownValue(serde_json::Value),
348}
349
350#[derive(Debug, Clone, Serialize, Deserialize)]
352#[serde(untagged)]
353pub enum ActionsSlashGetAllowedActionsOrganizationError {
354 UnknownValue(serde_json::Value),
355}
356
357#[derive(Debug, Clone, Serialize, Deserialize)]
359#[serde(untagged)]
360pub enum ActionsSlashGetAllowedActionsRepositoryError {
361 UnknownValue(serde_json::Value),
362}
363
364#[derive(Debug, Clone, Serialize, Deserialize)]
366#[serde(untagged)]
367pub enum ActionsSlashGetArtifactError {
368 UnknownValue(serde_json::Value),
369}
370
371#[derive(Debug, Clone, Serialize, Deserialize)]
373#[serde(untagged)]
374pub enum ActionsSlashGetCustomOidcSubClaimForRepoError {
375 Status400(models::BasicError),
376 Status404(models::BasicError),
377 UnknownValue(serde_json::Value),
378}
379
380#[derive(Debug, Clone, Serialize, Deserialize)]
382#[serde(untagged)]
383pub enum ActionsSlashGetEnvironmentPublicKeyError {
384 UnknownValue(serde_json::Value),
385}
386
387#[derive(Debug, Clone, Serialize, Deserialize)]
389#[serde(untagged)]
390pub enum ActionsSlashGetEnvironmentSecretError {
391 UnknownValue(serde_json::Value),
392}
393
394#[derive(Debug, Clone, Serialize, Deserialize)]
396#[serde(untagged)]
397pub enum ActionsSlashGetEnvironmentVariableError {
398 UnknownValue(serde_json::Value),
399}
400
401#[derive(Debug, Clone, Serialize, Deserialize)]
403#[serde(untagged)]
404pub enum ActionsSlashGetGithubActionsDefaultWorkflowPermissionsOrganizationError {
405 UnknownValue(serde_json::Value),
406}
407
408#[derive(Debug, Clone, Serialize, Deserialize)]
410#[serde(untagged)]
411pub enum ActionsSlashGetGithubActionsDefaultWorkflowPermissionsRepositoryError {
412 UnknownValue(serde_json::Value),
413}
414
415#[derive(Debug, Clone, Serialize, Deserialize)]
417#[serde(untagged)]
418pub enum ActionsSlashGetGithubActionsPermissionsOrganizationError {
419 UnknownValue(serde_json::Value),
420}
421
422#[derive(Debug, Clone, Serialize, Deserialize)]
424#[serde(untagged)]
425pub enum ActionsSlashGetGithubActionsPermissionsRepositoryError {
426 UnknownValue(serde_json::Value),
427}
428
429#[derive(Debug, Clone, Serialize, Deserialize)]
431#[serde(untagged)]
432pub enum ActionsSlashGetJobForWorkflowRunError {
433 UnknownValue(serde_json::Value),
434}
435
436#[derive(Debug, Clone, Serialize, Deserialize)]
438#[serde(untagged)]
439pub enum ActionsSlashGetOrgPublicKeyError {
440 UnknownValue(serde_json::Value),
441}
442
443#[derive(Debug, Clone, Serialize, Deserialize)]
445#[serde(untagged)]
446pub enum ActionsSlashGetOrgSecretError {
447 UnknownValue(serde_json::Value),
448}
449
450#[derive(Debug, Clone, Serialize, Deserialize)]
452#[serde(untagged)]
453pub enum ActionsSlashGetOrgVariableError {
454 UnknownValue(serde_json::Value),
455}
456
457#[derive(Debug, Clone, Serialize, Deserialize)]
459#[serde(untagged)]
460pub enum ActionsSlashGetPendingDeploymentsForRunError {
461 UnknownValue(serde_json::Value),
462}
463
464#[derive(Debug, Clone, Serialize, Deserialize)]
466#[serde(untagged)]
467pub enum ActionsSlashGetRepoPublicKeyError {
468 UnknownValue(serde_json::Value),
469}
470
471#[derive(Debug, Clone, Serialize, Deserialize)]
473#[serde(untagged)]
474pub enum ActionsSlashGetRepoSecretError {
475 UnknownValue(serde_json::Value),
476}
477
478#[derive(Debug, Clone, Serialize, Deserialize)]
480#[serde(untagged)]
481pub enum ActionsSlashGetRepoVariableError {
482 UnknownValue(serde_json::Value),
483}
484
485#[derive(Debug, Clone, Serialize, Deserialize)]
487#[serde(untagged)]
488pub enum ActionsSlashGetReviewsForRunError {
489 UnknownValue(serde_json::Value),
490}
491
492#[derive(Debug, Clone, Serialize, Deserialize)]
494#[serde(untagged)]
495pub enum ActionsSlashGetSelfHostedRunnerForOrgError {
496 UnknownValue(serde_json::Value),
497}
498
499#[derive(Debug, Clone, Serialize, Deserialize)]
501#[serde(untagged)]
502pub enum ActionsSlashGetSelfHostedRunnerForRepoError {
503 UnknownValue(serde_json::Value),
504}
505
506#[derive(Debug, Clone, Serialize, Deserialize)]
508#[serde(untagged)]
509pub enum ActionsSlashGetWorkflowError {
510 UnknownValue(serde_json::Value),
511}
512
513#[derive(Debug, Clone, Serialize, Deserialize)]
515#[serde(untagged)]
516pub enum ActionsSlashGetWorkflowAccessToRepositoryError {
517 UnknownValue(serde_json::Value),
518}
519
520#[derive(Debug, Clone, Serialize, Deserialize)]
522#[serde(untagged)]
523pub enum ActionsSlashGetWorkflowRunError {
524 UnknownValue(serde_json::Value),
525}
526
527#[derive(Debug, Clone, Serialize, Deserialize)]
529#[serde(untagged)]
530pub enum ActionsSlashGetWorkflowRunAttemptError {
531 UnknownValue(serde_json::Value),
532}
533
534#[derive(Debug, Clone, Serialize, Deserialize)]
536#[serde(untagged)]
537pub enum ActionsSlashGetWorkflowRunUsageError {
538 UnknownValue(serde_json::Value),
539}
540
541#[derive(Debug, Clone, Serialize, Deserialize)]
543#[serde(untagged)]
544pub enum ActionsSlashGetWorkflowUsageError {
545 UnknownValue(serde_json::Value),
546}
547
548#[derive(Debug, Clone, Serialize, Deserialize)]
550#[serde(untagged)]
551pub enum ActionsSlashListArtifactsForRepoError {
552 UnknownValue(serde_json::Value),
553}
554
555#[derive(Debug, Clone, Serialize, Deserialize)]
557#[serde(untagged)]
558pub enum ActionsSlashListEnvironmentSecretsError {
559 UnknownValue(serde_json::Value),
560}
561
562#[derive(Debug, Clone, Serialize, Deserialize)]
564#[serde(untagged)]
565pub enum ActionsSlashListEnvironmentVariablesError {
566 UnknownValue(serde_json::Value),
567}
568
569#[derive(Debug, Clone, Serialize, Deserialize)]
571#[serde(untagged)]
572pub enum ActionsSlashListJobsForWorkflowRunError {
573 UnknownValue(serde_json::Value),
574}
575
576#[derive(Debug, Clone, Serialize, Deserialize)]
578#[serde(untagged)]
579pub enum ActionsSlashListJobsForWorkflowRunAttemptError {
580 Status404(models::BasicError),
581 UnknownValue(serde_json::Value),
582}
583
584#[derive(Debug, Clone, Serialize, Deserialize)]
586#[serde(untagged)]
587pub enum ActionsSlashListLabelsForSelfHostedRunnerForOrgError {
588 Status404(models::BasicError),
589 UnknownValue(serde_json::Value),
590}
591
592#[derive(Debug, Clone, Serialize, Deserialize)]
594#[serde(untagged)]
595pub enum ActionsSlashListLabelsForSelfHostedRunnerForRepoError {
596 Status404(models::BasicError),
597 UnknownValue(serde_json::Value),
598}
599
600#[derive(Debug, Clone, Serialize, Deserialize)]
602#[serde(untagged)]
603pub enum ActionsSlashListOrgSecretsError {
604 UnknownValue(serde_json::Value),
605}
606
607#[derive(Debug, Clone, Serialize, Deserialize)]
609#[serde(untagged)]
610pub enum ActionsSlashListOrgVariablesError {
611 UnknownValue(serde_json::Value),
612}
613
614#[derive(Debug, Clone, Serialize, Deserialize)]
616#[serde(untagged)]
617pub enum ActionsSlashListRepoOrganizationSecretsError {
618 UnknownValue(serde_json::Value),
619}
620
621#[derive(Debug, Clone, Serialize, Deserialize)]
623#[serde(untagged)]
624pub enum ActionsSlashListRepoOrganizationVariablesError {
625 UnknownValue(serde_json::Value),
626}
627
628#[derive(Debug, Clone, Serialize, Deserialize)]
630#[serde(untagged)]
631pub enum ActionsSlashListRepoSecretsError {
632 UnknownValue(serde_json::Value),
633}
634
635#[derive(Debug, Clone, Serialize, Deserialize)]
637#[serde(untagged)]
638pub enum ActionsSlashListRepoVariablesError {
639 UnknownValue(serde_json::Value),
640}
641
642#[derive(Debug, Clone, Serialize, Deserialize)]
644#[serde(untagged)]
645pub enum ActionsSlashListRepoWorkflowsError {
646 UnknownValue(serde_json::Value),
647}
648
649#[derive(Debug, Clone, Serialize, Deserialize)]
651#[serde(untagged)]
652pub enum ActionsSlashListRunnerApplicationsForOrgError {
653 UnknownValue(serde_json::Value),
654}
655
656#[derive(Debug, Clone, Serialize, Deserialize)]
658#[serde(untagged)]
659pub enum ActionsSlashListRunnerApplicationsForRepoError {
660 UnknownValue(serde_json::Value),
661}
662
663#[derive(Debug, Clone, Serialize, Deserialize)]
665#[serde(untagged)]
666pub enum ActionsSlashListSelectedReposForOrgSecretError {
667 UnknownValue(serde_json::Value),
668}
669
670#[derive(Debug, Clone, Serialize, Deserialize)]
672#[serde(untagged)]
673pub enum ActionsSlashListSelectedReposForOrgVariableError {
674 Status409(),
675 UnknownValue(serde_json::Value),
676}
677
678#[derive(Debug, Clone, Serialize, Deserialize)]
680#[serde(untagged)]
681pub enum ActionsSlashListSelectedRepositoriesEnabledGithubActionsOrganizationError {
682 UnknownValue(serde_json::Value),
683}
684
685#[derive(Debug, Clone, Serialize, Deserialize)]
687#[serde(untagged)]
688pub enum ActionsSlashListSelfHostedRunnersForOrgError {
689 UnknownValue(serde_json::Value),
690}
691
692#[derive(Debug, Clone, Serialize, Deserialize)]
694#[serde(untagged)]
695pub enum ActionsSlashListSelfHostedRunnersForRepoError {
696 UnknownValue(serde_json::Value),
697}
698
699#[derive(Debug, Clone, Serialize, Deserialize)]
701#[serde(untagged)]
702pub enum ActionsSlashListWorkflowRunArtifactsError {
703 UnknownValue(serde_json::Value),
704}
705
706#[derive(Debug, Clone, Serialize, Deserialize)]
708#[serde(untagged)]
709pub enum ActionsSlashListWorkflowRunsError {
710 UnknownValue(serde_json::Value),
711}
712
713#[derive(Debug, Clone, Serialize, Deserialize)]
715#[serde(untagged)]
716pub enum ActionsSlashListWorkflowRunsForRepoError {
717 UnknownValue(serde_json::Value),
718}
719
720#[derive(Debug, Clone, Serialize, Deserialize)]
722#[serde(untagged)]
723pub enum ActionsSlashReRunJobForWorkflowRunError {
724 Status403(models::BasicError),
725 UnknownValue(serde_json::Value),
726}
727
728#[derive(Debug, Clone, Serialize, Deserialize)]
730#[serde(untagged)]
731pub enum ActionsSlashReRunWorkflowError {
732 UnknownValue(serde_json::Value),
733}
734
735#[derive(Debug, Clone, Serialize, Deserialize)]
737#[serde(untagged)]
738pub enum ActionsSlashReRunWorkflowFailedJobsError {
739 UnknownValue(serde_json::Value),
740}
741
742#[derive(Debug, Clone, Serialize, Deserialize)]
744#[serde(untagged)]
745pub enum ActionsSlashRemoveAllCustomLabelsFromSelfHostedRunnerForOrgError {
746 Status404(models::BasicError),
747 UnknownValue(serde_json::Value),
748}
749
750#[derive(Debug, Clone, Serialize, Deserialize)]
752#[serde(untagged)]
753pub enum ActionsSlashRemoveAllCustomLabelsFromSelfHostedRunnerForRepoError {
754 Status404(models::BasicError),
755 UnknownValue(serde_json::Value),
756}
757
758#[derive(Debug, Clone, Serialize, Deserialize)]
760#[serde(untagged)]
761pub enum ActionsSlashRemoveCustomLabelFromSelfHostedRunnerForOrgError {
762 Status404(models::BasicError),
763 Status422(models::ValidationErrorSimple),
764 UnknownValue(serde_json::Value),
765}
766
767#[derive(Debug, Clone, Serialize, Deserialize)]
769#[serde(untagged)]
770pub enum ActionsSlashRemoveCustomLabelFromSelfHostedRunnerForRepoError {
771 Status404(models::BasicError),
772 Status422(models::ValidationErrorSimple),
773 UnknownValue(serde_json::Value),
774}
775
776#[derive(Debug, Clone, Serialize, Deserialize)]
778#[serde(untagged)]
779pub enum ActionsSlashRemoveSelectedRepoFromOrgSecretError {
780 Status409(),
781 UnknownValue(serde_json::Value),
782}
783
784#[derive(Debug, Clone, Serialize, Deserialize)]
786#[serde(untagged)]
787pub enum ActionsSlashRemoveSelectedRepoFromOrgVariableError {
788 Status409(),
789 UnknownValue(serde_json::Value),
790}
791
792#[derive(Debug, Clone, Serialize, Deserialize)]
794#[serde(untagged)]
795pub enum ActionsSlashReviewCustomGatesForRunError {
796 UnknownValue(serde_json::Value),
797}
798
799#[derive(Debug, Clone, Serialize, Deserialize)]
801#[serde(untagged)]
802pub enum ActionsSlashReviewPendingDeploymentsForRunError {
803 UnknownValue(serde_json::Value),
804}
805
806#[derive(Debug, Clone, Serialize, Deserialize)]
808#[serde(untagged)]
809pub enum ActionsSlashSetAllowedActionsOrganizationError {
810 UnknownValue(serde_json::Value),
811}
812
813#[derive(Debug, Clone, Serialize, Deserialize)]
815#[serde(untagged)]
816pub enum ActionsSlashSetAllowedActionsRepositoryError {
817 UnknownValue(serde_json::Value),
818}
819
820#[derive(Debug, Clone, Serialize, Deserialize)]
822#[serde(untagged)]
823pub enum ActionsSlashSetCustomLabelsForSelfHostedRunnerForOrgError {
824 Status404(models::BasicError),
825 Status422(models::ValidationErrorSimple),
826 UnknownValue(serde_json::Value),
827}
828
829#[derive(Debug, Clone, Serialize, Deserialize)]
831#[serde(untagged)]
832pub enum ActionsSlashSetCustomLabelsForSelfHostedRunnerForRepoError {
833 Status404(models::BasicError),
834 Status422(models::ValidationErrorSimple),
835 UnknownValue(serde_json::Value),
836}
837
838#[derive(Debug, Clone, Serialize, Deserialize)]
840#[serde(untagged)]
841pub enum ActionsSlashSetCustomOidcSubClaimForRepoError {
842 Status400(models::BasicError),
843 Status404(models::BasicError),
844 Status422(models::ValidationErrorSimple),
845 UnknownValue(serde_json::Value),
846}
847
848#[derive(Debug, Clone, Serialize, Deserialize)]
850#[serde(untagged)]
851pub enum ActionsSlashSetGithubActionsDefaultWorkflowPermissionsOrganizationError {
852 UnknownValue(serde_json::Value),
853}
854
855#[derive(Debug, Clone, Serialize, Deserialize)]
857#[serde(untagged)]
858pub enum ActionsSlashSetGithubActionsDefaultWorkflowPermissionsRepositoryError {
859 Status409(),
860 UnknownValue(serde_json::Value),
861}
862
863#[derive(Debug, Clone, Serialize, Deserialize)]
865#[serde(untagged)]
866pub enum ActionsSlashSetGithubActionsPermissionsOrganizationError {
867 UnknownValue(serde_json::Value),
868}
869
870#[derive(Debug, Clone, Serialize, Deserialize)]
872#[serde(untagged)]
873pub enum ActionsSlashSetGithubActionsPermissionsRepositoryError {
874 UnknownValue(serde_json::Value),
875}
876
877#[derive(Debug, Clone, Serialize, Deserialize)]
879#[serde(untagged)]
880pub enum ActionsSlashSetSelectedReposForOrgSecretError {
881 UnknownValue(serde_json::Value),
882}
883
884#[derive(Debug, Clone, Serialize, Deserialize)]
886#[serde(untagged)]
887pub enum ActionsSlashSetSelectedReposForOrgVariableError {
888 Status409(),
889 UnknownValue(serde_json::Value),
890}
891
892#[derive(Debug, Clone, Serialize, Deserialize)]
894#[serde(untagged)]
895pub enum ActionsSlashSetSelectedRepositoriesEnabledGithubActionsOrganizationError {
896 UnknownValue(serde_json::Value),
897}
898
899#[derive(Debug, Clone, Serialize, Deserialize)]
901#[serde(untagged)]
902pub enum ActionsSlashSetWorkflowAccessToRepositoryError {
903 UnknownValue(serde_json::Value),
904}
905
906#[derive(Debug, Clone, Serialize, Deserialize)]
908#[serde(untagged)]
909pub enum ActionsSlashUpdateEnvironmentVariableError {
910 UnknownValue(serde_json::Value),
911}
912
913#[derive(Debug, Clone, Serialize, Deserialize)]
915#[serde(untagged)]
916pub enum ActionsSlashUpdateOrgVariableError {
917 UnknownValue(serde_json::Value),
918}
919
920#[derive(Debug, Clone, Serialize, Deserialize)]
922#[serde(untagged)]
923pub enum ActionsSlashUpdateRepoVariableError {
924 UnknownValue(serde_json::Value),
925}
926
927
928pub async fn actions_slash_add_custom_labels_to_self_hosted_runner_for_org(configuration: &configuration::Configuration, org: &str, runner_id: i32, actions_add_custom_labels_to_self_hosted_runner_for_org_request: models::ActionsAddCustomLabelsToSelfHostedRunnerForOrgRequest) -> Result<models::ActionsListLabelsForSelfHostedRunnerForOrg200Response, Error<ActionsSlashAddCustomLabelsToSelfHostedRunnerForOrgError>> {
930 let local_var_configuration = configuration;
931
932 let local_var_client = &local_var_configuration.client;
933
934 let local_var_uri_str = format!("{}/orgs/{org}/actions/runners/{runner_id}/labels", local_var_configuration.base_path, org=crate::apis::urlencode(org), runner_id=runner_id);
935 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
936
937 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
938 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
939 }
940 local_var_req_builder = local_var_req_builder.json(&actions_add_custom_labels_to_self_hosted_runner_for_org_request);
941
942 let local_var_req = local_var_req_builder.build()?;
943 let local_var_resp = local_var_client.execute(local_var_req).await?;
944
945 let local_var_status = local_var_resp.status();
946 let local_var_content = local_var_resp.text().await?;
947
948 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
949 serde_json::from_str(&local_var_content).map_err(Error::from)
950 } else {
951 let local_var_entity: Option<ActionsSlashAddCustomLabelsToSelfHostedRunnerForOrgError> = serde_json::from_str(&local_var_content).ok();
952 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
953 Err(Error::ResponseError(local_var_error))
954 }
955}
956
957pub async fn actions_slash_add_custom_labels_to_self_hosted_runner_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str, runner_id: i32, actions_add_custom_labels_to_self_hosted_runner_for_org_request: models::ActionsAddCustomLabelsToSelfHostedRunnerForOrgRequest) -> Result<models::ActionsListLabelsForSelfHostedRunnerForOrg200Response, Error<ActionsSlashAddCustomLabelsToSelfHostedRunnerForRepoError>> {
959 let local_var_configuration = configuration;
960
961 let local_var_client = &local_var_configuration.client;
962
963 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), runner_id=runner_id);
964 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
965
966 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
967 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
968 }
969 local_var_req_builder = local_var_req_builder.json(&actions_add_custom_labels_to_self_hosted_runner_for_org_request);
970
971 let local_var_req = local_var_req_builder.build()?;
972 let local_var_resp = local_var_client.execute(local_var_req).await?;
973
974 let local_var_status = local_var_resp.status();
975 let local_var_content = local_var_resp.text().await?;
976
977 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
978 serde_json::from_str(&local_var_content).map_err(Error::from)
979 } else {
980 let local_var_entity: Option<ActionsSlashAddCustomLabelsToSelfHostedRunnerForRepoError> = serde_json::from_str(&local_var_content).ok();
981 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
982 Err(Error::ResponseError(local_var_error))
983 }
984}
985
986pub async fn actions_slash_add_selected_repo_to_org_secret(configuration: &configuration::Configuration, org: &str, secret_name: &str, repository_id: i32) -> Result<(), Error<ActionsSlashAddSelectedRepoToOrgSecretError>> {
988 let local_var_configuration = configuration;
989
990 let local_var_client = &local_var_configuration.client;
991
992 let local_var_uri_str = format!("{}/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", local_var_configuration.base_path, org=crate::apis::urlencode(org), secret_name=crate::apis::urlencode(secret_name), repository_id=repository_id);
993 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
994
995 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
996 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
997 }
998
999 let local_var_req = local_var_req_builder.build()?;
1000 let local_var_resp = local_var_client.execute(local_var_req).await?;
1001
1002 let local_var_status = local_var_resp.status();
1003 let local_var_content = local_var_resp.text().await?;
1004
1005 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1006 Ok(())
1007 } else {
1008 let local_var_entity: Option<ActionsSlashAddSelectedRepoToOrgSecretError> = serde_json::from_str(&local_var_content).ok();
1009 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1010 Err(Error::ResponseError(local_var_error))
1011 }
1012}
1013
1014pub async fn actions_slash_add_selected_repo_to_org_variable(configuration: &configuration::Configuration, org: &str, name: &str, repository_id: i32) -> Result<(), Error<ActionsSlashAddSelectedRepoToOrgVariableError>> {
1016 let local_var_configuration = configuration;
1017
1018 let local_var_client = &local_var_configuration.client;
1019
1020 let local_var_uri_str = format!("{}/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", local_var_configuration.base_path, org=crate::apis::urlencode(org), name=crate::apis::urlencode(name), repository_id=repository_id);
1021 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1022
1023 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1024 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1025 }
1026
1027 let local_var_req = local_var_req_builder.build()?;
1028 let local_var_resp = local_var_client.execute(local_var_req).await?;
1029
1030 let local_var_status = local_var_resp.status();
1031 let local_var_content = local_var_resp.text().await?;
1032
1033 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1034 Ok(())
1035 } else {
1036 let local_var_entity: Option<ActionsSlashAddSelectedRepoToOrgVariableError> = serde_json::from_str(&local_var_content).ok();
1037 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1038 Err(Error::ResponseError(local_var_error))
1039 }
1040}
1041
1042pub async fn actions_slash_approve_workflow_run(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32) -> Result<serde_json::Value, Error<ActionsSlashApproveWorkflowRunError>> {
1044 let local_var_configuration = configuration;
1045
1046 let local_var_client = &local_var_configuration.client;
1047
1048 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/approve", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
1049 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1050
1051 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1052 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1053 }
1054
1055 let local_var_req = local_var_req_builder.build()?;
1056 let local_var_resp = local_var_client.execute(local_var_req).await?;
1057
1058 let local_var_status = local_var_resp.status();
1059 let local_var_content = local_var_resp.text().await?;
1060
1061 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1062 serde_json::from_str(&local_var_content).map_err(Error::from)
1063 } else {
1064 let local_var_entity: Option<ActionsSlashApproveWorkflowRunError> = serde_json::from_str(&local_var_content).ok();
1065 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1066 Err(Error::ResponseError(local_var_error))
1067 }
1068}
1069
1070pub async fn actions_slash_cancel_workflow_run(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32) -> Result<serde_json::Value, Error<ActionsSlashCancelWorkflowRunError>> {
1072 let local_var_configuration = configuration;
1073
1074 let local_var_client = &local_var_configuration.client;
1075
1076 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
1077 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1078
1079 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1080 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1081 }
1082
1083 let local_var_req = local_var_req_builder.build()?;
1084 let local_var_resp = local_var_client.execute(local_var_req).await?;
1085
1086 let local_var_status = local_var_resp.status();
1087 let local_var_content = local_var_resp.text().await?;
1088
1089 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1090 serde_json::from_str(&local_var_content).map_err(Error::from)
1091 } else {
1092 let local_var_entity: Option<ActionsSlashCancelWorkflowRunError> = serde_json::from_str(&local_var_content).ok();
1093 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1094 Err(Error::ResponseError(local_var_error))
1095 }
1096}
1097
1098pub async fn actions_slash_create_environment_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, environment_name: &str, actions_create_repo_variable_request: models::ActionsCreateRepoVariableRequest) -> Result<serde_json::Value, Error<ActionsSlashCreateEnvironmentVariableError>> {
1100 let local_var_configuration = configuration;
1101
1102 let local_var_client = &local_var_configuration.client;
1103
1104 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/environments/{environment_name}/variables", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), environment_name=crate::apis::urlencode(environment_name));
1105 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1106
1107 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1108 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1109 }
1110 local_var_req_builder = local_var_req_builder.json(&actions_create_repo_variable_request);
1111
1112 let local_var_req = local_var_req_builder.build()?;
1113 let local_var_resp = local_var_client.execute(local_var_req).await?;
1114
1115 let local_var_status = local_var_resp.status();
1116 let local_var_content = local_var_resp.text().await?;
1117
1118 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1119 serde_json::from_str(&local_var_content).map_err(Error::from)
1120 } else {
1121 let local_var_entity: Option<ActionsSlashCreateEnvironmentVariableError> = serde_json::from_str(&local_var_content).ok();
1122 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1123 Err(Error::ResponseError(local_var_error))
1124 }
1125}
1126
1127pub async fn actions_slash_create_or_update_environment_secret(configuration: &configuration::Configuration, owner: &str, repo: &str, environment_name: &str, secret_name: &str, actions_create_or_update_environment_secret_request: models::ActionsCreateOrUpdateEnvironmentSecretRequest) -> Result<serde_json::Value, Error<ActionsSlashCreateOrUpdateEnvironmentSecretError>> {
1129 let local_var_configuration = configuration;
1130
1131 let local_var_client = &local_var_configuration.client;
1132
1133 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), environment_name=crate::apis::urlencode(environment_name), secret_name=crate::apis::urlencode(secret_name));
1134 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1135
1136 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1137 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1138 }
1139 local_var_req_builder = local_var_req_builder.json(&actions_create_or_update_environment_secret_request);
1140
1141 let local_var_req = local_var_req_builder.build()?;
1142 let local_var_resp = local_var_client.execute(local_var_req).await?;
1143
1144 let local_var_status = local_var_resp.status();
1145 let local_var_content = local_var_resp.text().await?;
1146
1147 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1148 serde_json::from_str(&local_var_content).map_err(Error::from)
1149 } else {
1150 let local_var_entity: Option<ActionsSlashCreateOrUpdateEnvironmentSecretError> = serde_json::from_str(&local_var_content).ok();
1151 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1152 Err(Error::ResponseError(local_var_error))
1153 }
1154}
1155
1156pub async fn actions_slash_create_or_update_org_secret(configuration: &configuration::Configuration, org: &str, secret_name: &str, actions_create_or_update_org_secret_request: models::ActionsCreateOrUpdateOrgSecretRequest) -> Result<serde_json::Value, Error<ActionsSlashCreateOrUpdateOrgSecretError>> {
1158 let local_var_configuration = configuration;
1159
1160 let local_var_client = &local_var_configuration.client;
1161
1162 let local_var_uri_str = format!("{}/orgs/{org}/actions/secrets/{secret_name}", local_var_configuration.base_path, org=crate::apis::urlencode(org), secret_name=crate::apis::urlencode(secret_name));
1163 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1164
1165 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1166 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1167 }
1168 local_var_req_builder = local_var_req_builder.json(&actions_create_or_update_org_secret_request);
1169
1170 let local_var_req = local_var_req_builder.build()?;
1171 let local_var_resp = local_var_client.execute(local_var_req).await?;
1172
1173 let local_var_status = local_var_resp.status();
1174 let local_var_content = local_var_resp.text().await?;
1175
1176 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1177 serde_json::from_str(&local_var_content).map_err(Error::from)
1178 } else {
1179 let local_var_entity: Option<ActionsSlashCreateOrUpdateOrgSecretError> = serde_json::from_str(&local_var_content).ok();
1180 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1181 Err(Error::ResponseError(local_var_error))
1182 }
1183}
1184
1185pub async fn actions_slash_create_or_update_repo_secret(configuration: &configuration::Configuration, owner: &str, repo: &str, secret_name: &str, actions_create_or_update_repo_secret_request: models::ActionsCreateOrUpdateRepoSecretRequest) -> Result<serde_json::Value, Error<ActionsSlashCreateOrUpdateRepoSecretError>> {
1187 let local_var_configuration = configuration;
1188
1189 let local_var_client = &local_var_configuration.client;
1190
1191 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/secrets/{secret_name}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), secret_name=crate::apis::urlencode(secret_name));
1192 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1193
1194 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1195 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1196 }
1197 local_var_req_builder = local_var_req_builder.json(&actions_create_or_update_repo_secret_request);
1198
1199 let local_var_req = local_var_req_builder.build()?;
1200 let local_var_resp = local_var_client.execute(local_var_req).await?;
1201
1202 let local_var_status = local_var_resp.status();
1203 let local_var_content = local_var_resp.text().await?;
1204
1205 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1206 serde_json::from_str(&local_var_content).map_err(Error::from)
1207 } else {
1208 let local_var_entity: Option<ActionsSlashCreateOrUpdateRepoSecretError> = serde_json::from_str(&local_var_content).ok();
1209 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1210 Err(Error::ResponseError(local_var_error))
1211 }
1212}
1213
1214pub async fn actions_slash_create_org_variable(configuration: &configuration::Configuration, org: &str, actions_create_org_variable_request: models::ActionsCreateOrgVariableRequest) -> Result<serde_json::Value, Error<ActionsSlashCreateOrgVariableError>> {
1216 let local_var_configuration = configuration;
1217
1218 let local_var_client = &local_var_configuration.client;
1219
1220 let local_var_uri_str = format!("{}/orgs/{org}/actions/variables", local_var_configuration.base_path, org=crate::apis::urlencode(org));
1221 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1222
1223 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1224 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1225 }
1226 local_var_req_builder = local_var_req_builder.json(&actions_create_org_variable_request);
1227
1228 let local_var_req = local_var_req_builder.build()?;
1229 let local_var_resp = local_var_client.execute(local_var_req).await?;
1230
1231 let local_var_status = local_var_resp.status();
1232 let local_var_content = local_var_resp.text().await?;
1233
1234 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1235 serde_json::from_str(&local_var_content).map_err(Error::from)
1236 } else {
1237 let local_var_entity: Option<ActionsSlashCreateOrgVariableError> = serde_json::from_str(&local_var_content).ok();
1238 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1239 Err(Error::ResponseError(local_var_error))
1240 }
1241}
1242
1243pub async fn actions_slash_create_registration_token_for_org(configuration: &configuration::Configuration, org: &str) -> Result<models::AuthenticationToken, Error<ActionsSlashCreateRegistrationTokenForOrgError>> {
1245 let local_var_configuration = configuration;
1246
1247 let local_var_client = &local_var_configuration.client;
1248
1249 let local_var_uri_str = format!("{}/orgs/{org}/actions/runners/registration-token", local_var_configuration.base_path, org=crate::apis::urlencode(org));
1250 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1251
1252 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1253 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1254 }
1255
1256 let local_var_req = local_var_req_builder.build()?;
1257 let local_var_resp = local_var_client.execute(local_var_req).await?;
1258
1259 let local_var_status = local_var_resp.status();
1260 let local_var_content = local_var_resp.text().await?;
1261
1262 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1263 serde_json::from_str(&local_var_content).map_err(Error::from)
1264 } else {
1265 let local_var_entity: Option<ActionsSlashCreateRegistrationTokenForOrgError> = serde_json::from_str(&local_var_content).ok();
1266 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1267 Err(Error::ResponseError(local_var_error))
1268 }
1269}
1270
1271pub async fn actions_slash_create_registration_token_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<models::AuthenticationToken, Error<ActionsSlashCreateRegistrationTokenForRepoError>> {
1273 let local_var_configuration = configuration;
1274
1275 let local_var_client = &local_var_configuration.client;
1276
1277 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/registration-token", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
1278 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1279
1280 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1281 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1282 }
1283
1284 let local_var_req = local_var_req_builder.build()?;
1285 let local_var_resp = local_var_client.execute(local_var_req).await?;
1286
1287 let local_var_status = local_var_resp.status();
1288 let local_var_content = local_var_resp.text().await?;
1289
1290 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1291 serde_json::from_str(&local_var_content).map_err(Error::from)
1292 } else {
1293 let local_var_entity: Option<ActionsSlashCreateRegistrationTokenForRepoError> = serde_json::from_str(&local_var_content).ok();
1294 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1295 Err(Error::ResponseError(local_var_error))
1296 }
1297}
1298
1299pub async fn actions_slash_create_remove_token_for_org(configuration: &configuration::Configuration, org: &str) -> Result<models::AuthenticationToken, Error<ActionsSlashCreateRemoveTokenForOrgError>> {
1301 let local_var_configuration = configuration;
1302
1303 let local_var_client = &local_var_configuration.client;
1304
1305 let local_var_uri_str = format!("{}/orgs/{org}/actions/runners/remove-token", local_var_configuration.base_path, org=crate::apis::urlencode(org));
1306 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1307
1308 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1309 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1310 }
1311
1312 let local_var_req = local_var_req_builder.build()?;
1313 let local_var_resp = local_var_client.execute(local_var_req).await?;
1314
1315 let local_var_status = local_var_resp.status();
1316 let local_var_content = local_var_resp.text().await?;
1317
1318 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1319 serde_json::from_str(&local_var_content).map_err(Error::from)
1320 } else {
1321 let local_var_entity: Option<ActionsSlashCreateRemoveTokenForOrgError> = serde_json::from_str(&local_var_content).ok();
1322 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1323 Err(Error::ResponseError(local_var_error))
1324 }
1325}
1326
1327pub async fn actions_slash_create_remove_token_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<models::AuthenticationToken, Error<ActionsSlashCreateRemoveTokenForRepoError>> {
1329 let local_var_configuration = configuration;
1330
1331 let local_var_client = &local_var_configuration.client;
1332
1333 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/remove-token", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
1334 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1335
1336 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1337 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1338 }
1339
1340 let local_var_req = local_var_req_builder.build()?;
1341 let local_var_resp = local_var_client.execute(local_var_req).await?;
1342
1343 let local_var_status = local_var_resp.status();
1344 let local_var_content = local_var_resp.text().await?;
1345
1346 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1347 serde_json::from_str(&local_var_content).map_err(Error::from)
1348 } else {
1349 let local_var_entity: Option<ActionsSlashCreateRemoveTokenForRepoError> = serde_json::from_str(&local_var_content).ok();
1350 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1351 Err(Error::ResponseError(local_var_error))
1352 }
1353}
1354
1355pub async fn actions_slash_create_repo_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, actions_create_repo_variable_request: models::ActionsCreateRepoVariableRequest) -> Result<serde_json::Value, Error<ActionsSlashCreateRepoVariableError>> {
1357 let local_var_configuration = configuration;
1358
1359 let local_var_client = &local_var_configuration.client;
1360
1361 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/variables", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
1362 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1363
1364 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1365 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1366 }
1367 local_var_req_builder = local_var_req_builder.json(&actions_create_repo_variable_request);
1368
1369 let local_var_req = local_var_req_builder.build()?;
1370 let local_var_resp = local_var_client.execute(local_var_req).await?;
1371
1372 let local_var_status = local_var_resp.status();
1373 let local_var_content = local_var_resp.text().await?;
1374
1375 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1376 serde_json::from_str(&local_var_content).map_err(Error::from)
1377 } else {
1378 let local_var_entity: Option<ActionsSlashCreateRepoVariableError> = serde_json::from_str(&local_var_content).ok();
1379 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1380 Err(Error::ResponseError(local_var_error))
1381 }
1382}
1383
1384pub async fn actions_slash_create_workflow_dispatch(configuration: &configuration::Configuration, owner: &str, repo: &str, workflow_id: models::ActionsGetWorkflowWorkflowIdParameter, actions_create_workflow_dispatch_request: models::ActionsCreateWorkflowDispatchRequest) -> Result<(), Error<ActionsSlashCreateWorkflowDispatchError>> {
1386 let local_var_configuration = configuration;
1387
1388 let local_var_client = &local_var_configuration.client;
1389
1390 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), workflow_id=workflow_id);
1391 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1392
1393 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1394 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1395 }
1396 local_var_req_builder = local_var_req_builder.json(&actions_create_workflow_dispatch_request);
1397
1398 let local_var_req = local_var_req_builder.build()?;
1399 let local_var_resp = local_var_client.execute(local_var_req).await?;
1400
1401 let local_var_status = local_var_resp.status();
1402 let local_var_content = local_var_resp.text().await?;
1403
1404 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1405 Ok(())
1406 } else {
1407 let local_var_entity: Option<ActionsSlashCreateWorkflowDispatchError> = serde_json::from_str(&local_var_content).ok();
1408 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1409 Err(Error::ResponseError(local_var_error))
1410 }
1411}
1412
1413pub async fn actions_slash_delete_actions_cache_by_id(configuration: &configuration::Configuration, owner: &str, repo: &str, cache_id: i32) -> Result<(), Error<ActionsSlashDeleteActionsCacheByIdError>> {
1415 let local_var_configuration = configuration;
1416
1417 let local_var_client = &local_var_configuration.client;
1418
1419 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/caches/{cache_id}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), cache_id=cache_id);
1420 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1421
1422 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1423 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1424 }
1425
1426 let local_var_req = local_var_req_builder.build()?;
1427 let local_var_resp = local_var_client.execute(local_var_req).await?;
1428
1429 let local_var_status = local_var_resp.status();
1430 let local_var_content = local_var_resp.text().await?;
1431
1432 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1433 Ok(())
1434 } else {
1435 let local_var_entity: Option<ActionsSlashDeleteActionsCacheByIdError> = serde_json::from_str(&local_var_content).ok();
1436 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1437 Err(Error::ResponseError(local_var_error))
1438 }
1439}
1440
1441pub async fn actions_slash_delete_actions_cache_by_key(configuration: &configuration::Configuration, owner: &str, repo: &str, key: &str, r#ref: Option<&str>) -> Result<models::ActionsCacheList, Error<ActionsSlashDeleteActionsCacheByKeyError>> {
1443 let local_var_configuration = configuration;
1444
1445 let local_var_client = &local_var_configuration.client;
1446
1447 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/caches", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
1448 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1449
1450 local_var_req_builder = local_var_req_builder.query(&[("key", &key.to_string())]);
1451 if let Some(ref local_var_str) = r#ref {
1452 local_var_req_builder = local_var_req_builder.query(&[("ref", &local_var_str.to_string())]);
1453 }
1454 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1455 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1456 }
1457
1458 let local_var_req = local_var_req_builder.build()?;
1459 let local_var_resp = local_var_client.execute(local_var_req).await?;
1460
1461 let local_var_status = local_var_resp.status();
1462 let local_var_content = local_var_resp.text().await?;
1463
1464 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1465 serde_json::from_str(&local_var_content).map_err(Error::from)
1466 } else {
1467 let local_var_entity: Option<ActionsSlashDeleteActionsCacheByKeyError> = serde_json::from_str(&local_var_content).ok();
1468 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1469 Err(Error::ResponseError(local_var_error))
1470 }
1471}
1472
1473pub async fn actions_slash_delete_artifact(configuration: &configuration::Configuration, owner: &str, repo: &str, artifact_id: i32) -> Result<(), Error<ActionsSlashDeleteArtifactError>> {
1475 let local_var_configuration = configuration;
1476
1477 let local_var_client = &local_var_configuration.client;
1478
1479 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), artifact_id=artifact_id);
1480 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1481
1482 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1483 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1484 }
1485
1486 let local_var_req = local_var_req_builder.build()?;
1487 let local_var_resp = local_var_client.execute(local_var_req).await?;
1488
1489 let local_var_status = local_var_resp.status();
1490 let local_var_content = local_var_resp.text().await?;
1491
1492 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1493 Ok(())
1494 } else {
1495 let local_var_entity: Option<ActionsSlashDeleteArtifactError> = serde_json::from_str(&local_var_content).ok();
1496 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1497 Err(Error::ResponseError(local_var_error))
1498 }
1499}
1500
1501pub async fn actions_slash_delete_environment_secret(configuration: &configuration::Configuration, owner: &str, repo: &str, environment_name: &str, secret_name: &str) -> Result<(), Error<ActionsSlashDeleteEnvironmentSecretError>> {
1503 let local_var_configuration = configuration;
1504
1505 let local_var_client = &local_var_configuration.client;
1506
1507 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), environment_name=crate::apis::urlencode(environment_name), secret_name=crate::apis::urlencode(secret_name));
1508 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1509
1510 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1511 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1512 }
1513
1514 let local_var_req = local_var_req_builder.build()?;
1515 let local_var_resp = local_var_client.execute(local_var_req).await?;
1516
1517 let local_var_status = local_var_resp.status();
1518 let local_var_content = local_var_resp.text().await?;
1519
1520 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1521 Ok(())
1522 } else {
1523 let local_var_entity: Option<ActionsSlashDeleteEnvironmentSecretError> = serde_json::from_str(&local_var_content).ok();
1524 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1525 Err(Error::ResponseError(local_var_error))
1526 }
1527}
1528
1529pub async fn actions_slash_delete_environment_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str, environment_name: &str) -> Result<(), Error<ActionsSlashDeleteEnvironmentVariableError>> {
1531 let local_var_configuration = configuration;
1532
1533 let local_var_client = &local_var_configuration.client;
1534
1535 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/environments/{environment_name}/variables/{name}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), name=crate::apis::urlencode(name), environment_name=crate::apis::urlencode(environment_name));
1536 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1537
1538 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1539 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1540 }
1541
1542 let local_var_req = local_var_req_builder.build()?;
1543 let local_var_resp = local_var_client.execute(local_var_req).await?;
1544
1545 let local_var_status = local_var_resp.status();
1546 let local_var_content = local_var_resp.text().await?;
1547
1548 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1549 Ok(())
1550 } else {
1551 let local_var_entity: Option<ActionsSlashDeleteEnvironmentVariableError> = serde_json::from_str(&local_var_content).ok();
1552 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1553 Err(Error::ResponseError(local_var_error))
1554 }
1555}
1556
1557pub async fn actions_slash_delete_org_secret(configuration: &configuration::Configuration, org: &str, secret_name: &str) -> Result<(), Error<ActionsSlashDeleteOrgSecretError>> {
1559 let local_var_configuration = configuration;
1560
1561 let local_var_client = &local_var_configuration.client;
1562
1563 let local_var_uri_str = format!("{}/orgs/{org}/actions/secrets/{secret_name}", local_var_configuration.base_path, org=crate::apis::urlencode(org), secret_name=crate::apis::urlencode(secret_name));
1564 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1565
1566 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1567 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1568 }
1569
1570 let local_var_req = local_var_req_builder.build()?;
1571 let local_var_resp = local_var_client.execute(local_var_req).await?;
1572
1573 let local_var_status = local_var_resp.status();
1574 let local_var_content = local_var_resp.text().await?;
1575
1576 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1577 Ok(())
1578 } else {
1579 let local_var_entity: Option<ActionsSlashDeleteOrgSecretError> = serde_json::from_str(&local_var_content).ok();
1580 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1581 Err(Error::ResponseError(local_var_error))
1582 }
1583}
1584
1585pub async fn actions_slash_delete_org_variable(configuration: &configuration::Configuration, org: &str, name: &str) -> Result<(), Error<ActionsSlashDeleteOrgVariableError>> {
1587 let local_var_configuration = configuration;
1588
1589 let local_var_client = &local_var_configuration.client;
1590
1591 let local_var_uri_str = format!("{}/orgs/{org}/actions/variables/{name}", local_var_configuration.base_path, org=crate::apis::urlencode(org), name=crate::apis::urlencode(name));
1592 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1593
1594 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1595 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1596 }
1597
1598 let local_var_req = local_var_req_builder.build()?;
1599 let local_var_resp = local_var_client.execute(local_var_req).await?;
1600
1601 let local_var_status = local_var_resp.status();
1602 let local_var_content = local_var_resp.text().await?;
1603
1604 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1605 Ok(())
1606 } else {
1607 let local_var_entity: Option<ActionsSlashDeleteOrgVariableError> = serde_json::from_str(&local_var_content).ok();
1608 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1609 Err(Error::ResponseError(local_var_error))
1610 }
1611}
1612
1613pub async fn actions_slash_delete_repo_secret(configuration: &configuration::Configuration, owner: &str, repo: &str, secret_name: &str) -> Result<(), Error<ActionsSlashDeleteRepoSecretError>> {
1615 let local_var_configuration = configuration;
1616
1617 let local_var_client = &local_var_configuration.client;
1618
1619 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/secrets/{secret_name}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), secret_name=crate::apis::urlencode(secret_name));
1620 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1621
1622 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1623 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1624 }
1625
1626 let local_var_req = local_var_req_builder.build()?;
1627 let local_var_resp = local_var_client.execute(local_var_req).await?;
1628
1629 let local_var_status = local_var_resp.status();
1630 let local_var_content = local_var_resp.text().await?;
1631
1632 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1633 Ok(())
1634 } else {
1635 let local_var_entity: Option<ActionsSlashDeleteRepoSecretError> = serde_json::from_str(&local_var_content).ok();
1636 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1637 Err(Error::ResponseError(local_var_error))
1638 }
1639}
1640
1641pub async fn actions_slash_delete_repo_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str) -> Result<(), Error<ActionsSlashDeleteRepoVariableError>> {
1643 let local_var_configuration = configuration;
1644
1645 let local_var_client = &local_var_configuration.client;
1646
1647 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/variables/{name}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), name=crate::apis::urlencode(name));
1648 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1649
1650 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1651 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1652 }
1653
1654 let local_var_req = local_var_req_builder.build()?;
1655 let local_var_resp = local_var_client.execute(local_var_req).await?;
1656
1657 let local_var_status = local_var_resp.status();
1658 let local_var_content = local_var_resp.text().await?;
1659
1660 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1661 Ok(())
1662 } else {
1663 let local_var_entity: Option<ActionsSlashDeleteRepoVariableError> = serde_json::from_str(&local_var_content).ok();
1664 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1665 Err(Error::ResponseError(local_var_error))
1666 }
1667}
1668
1669pub async fn actions_slash_delete_self_hosted_runner_from_org(configuration: &configuration::Configuration, org: &str, runner_id: i32) -> Result<(), Error<ActionsSlashDeleteSelfHostedRunnerFromOrgError>> {
1671 let local_var_configuration = configuration;
1672
1673 let local_var_client = &local_var_configuration.client;
1674
1675 let local_var_uri_str = format!("{}/orgs/{org}/actions/runners/{runner_id}", local_var_configuration.base_path, org=crate::apis::urlencode(org), runner_id=runner_id);
1676 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1677
1678 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1679 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1680 }
1681
1682 let local_var_req = local_var_req_builder.build()?;
1683 let local_var_resp = local_var_client.execute(local_var_req).await?;
1684
1685 let local_var_status = local_var_resp.status();
1686 let local_var_content = local_var_resp.text().await?;
1687
1688 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1689 Ok(())
1690 } else {
1691 let local_var_entity: Option<ActionsSlashDeleteSelfHostedRunnerFromOrgError> = serde_json::from_str(&local_var_content).ok();
1692 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1693 Err(Error::ResponseError(local_var_error))
1694 }
1695}
1696
1697pub async fn actions_slash_delete_self_hosted_runner_from_repo(configuration: &configuration::Configuration, owner: &str, repo: &str, runner_id: i32) -> Result<(), Error<ActionsSlashDeleteSelfHostedRunnerFromRepoError>> {
1699 let local_var_configuration = configuration;
1700
1701 let local_var_client = &local_var_configuration.client;
1702
1703 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/{runner_id}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), runner_id=runner_id);
1704 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1705
1706 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1707 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1708 }
1709
1710 let local_var_req = local_var_req_builder.build()?;
1711 let local_var_resp = local_var_client.execute(local_var_req).await?;
1712
1713 let local_var_status = local_var_resp.status();
1714 let local_var_content = local_var_resp.text().await?;
1715
1716 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1717 Ok(())
1718 } else {
1719 let local_var_entity: Option<ActionsSlashDeleteSelfHostedRunnerFromRepoError> = serde_json::from_str(&local_var_content).ok();
1720 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1721 Err(Error::ResponseError(local_var_error))
1722 }
1723}
1724
1725pub async fn actions_slash_delete_workflow_run(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32) -> Result<(), Error<ActionsSlashDeleteWorkflowRunError>> {
1727 let local_var_configuration = configuration;
1728
1729 let local_var_client = &local_var_configuration.client;
1730
1731 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
1732 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1733
1734 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1735 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1736 }
1737
1738 let local_var_req = local_var_req_builder.build()?;
1739 let local_var_resp = local_var_client.execute(local_var_req).await?;
1740
1741 let local_var_status = local_var_resp.status();
1742 let local_var_content = local_var_resp.text().await?;
1743
1744 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1745 Ok(())
1746 } else {
1747 let local_var_entity: Option<ActionsSlashDeleteWorkflowRunError> = serde_json::from_str(&local_var_content).ok();
1748 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1749 Err(Error::ResponseError(local_var_error))
1750 }
1751}
1752
1753pub async fn actions_slash_delete_workflow_run_logs(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32) -> Result<(), Error<ActionsSlashDeleteWorkflowRunLogsError>> {
1755 let local_var_configuration = configuration;
1756
1757 let local_var_client = &local_var_configuration.client;
1758
1759 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/logs", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
1760 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1761
1762 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1763 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1764 }
1765
1766 let local_var_req = local_var_req_builder.build()?;
1767 let local_var_resp = local_var_client.execute(local_var_req).await?;
1768
1769 let local_var_status = local_var_resp.status();
1770 let local_var_content = local_var_resp.text().await?;
1771
1772 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1773 Ok(())
1774 } else {
1775 let local_var_entity: Option<ActionsSlashDeleteWorkflowRunLogsError> = serde_json::from_str(&local_var_content).ok();
1776 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1777 Err(Error::ResponseError(local_var_error))
1778 }
1779}
1780
1781pub async fn actions_slash_disable_selected_repository_github_actions_organization(configuration: &configuration::Configuration, org: &str, repository_id: i32) -> Result<(), Error<ActionsSlashDisableSelectedRepositoryGithubActionsOrganizationError>> {
1783 let local_var_configuration = configuration;
1784
1785 let local_var_client = &local_var_configuration.client;
1786
1787 let local_var_uri_str = format!("{}/orgs/{org}/actions/permissions/repositories/{repository_id}", local_var_configuration.base_path, org=crate::apis::urlencode(org), repository_id=repository_id);
1788 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1789
1790 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1791 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1792 }
1793
1794 let local_var_req = local_var_req_builder.build()?;
1795 let local_var_resp = local_var_client.execute(local_var_req).await?;
1796
1797 let local_var_status = local_var_resp.status();
1798 let local_var_content = local_var_resp.text().await?;
1799
1800 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1801 Ok(())
1802 } else {
1803 let local_var_entity: Option<ActionsSlashDisableSelectedRepositoryGithubActionsOrganizationError> = serde_json::from_str(&local_var_content).ok();
1804 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1805 Err(Error::ResponseError(local_var_error))
1806 }
1807}
1808
1809pub async fn actions_slash_disable_workflow(configuration: &configuration::Configuration, owner: &str, repo: &str, workflow_id: models::ActionsGetWorkflowWorkflowIdParameter) -> Result<(), Error<ActionsSlashDisableWorkflowError>> {
1811 let local_var_configuration = configuration;
1812
1813 let local_var_client = &local_var_configuration.client;
1814
1815 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), workflow_id=workflow_id);
1816 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1817
1818 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1819 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1820 }
1821
1822 let local_var_req = local_var_req_builder.build()?;
1823 let local_var_resp = local_var_client.execute(local_var_req).await?;
1824
1825 let local_var_status = local_var_resp.status();
1826 let local_var_content = local_var_resp.text().await?;
1827
1828 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1829 Ok(())
1830 } else {
1831 let local_var_entity: Option<ActionsSlashDisableWorkflowError> = serde_json::from_str(&local_var_content).ok();
1832 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1833 Err(Error::ResponseError(local_var_error))
1834 }
1835}
1836
1837pub async fn actions_slash_download_artifact(configuration: &configuration::Configuration, owner: &str, repo: &str, artifact_id: i32, archive_format: &str) -> Result<(), Error<ActionsSlashDownloadArtifactError>> {
1839 let local_var_configuration = configuration;
1840
1841 let local_var_client = &local_var_configuration.client;
1842
1843 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), artifact_id=artifact_id, archive_format=crate::apis::urlencode(archive_format));
1844 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1845
1846 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1847 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1848 }
1849
1850 let local_var_req = local_var_req_builder.build()?;
1851 let local_var_resp = local_var_client.execute(local_var_req).await?;
1852
1853 let local_var_status = local_var_resp.status();
1854 let local_var_content = local_var_resp.text().await?;
1855
1856 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1857 Ok(())
1858 } else {
1859 let local_var_entity: Option<ActionsSlashDownloadArtifactError> = serde_json::from_str(&local_var_content).ok();
1860 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1861 Err(Error::ResponseError(local_var_error))
1862 }
1863}
1864
1865pub async fn actions_slash_download_job_logs_for_workflow_run(configuration: &configuration::Configuration, owner: &str, repo: &str, job_id: i32) -> Result<(), Error<ActionsSlashDownloadJobLogsForWorkflowRunError>> {
1867 let local_var_configuration = configuration;
1868
1869 let local_var_client = &local_var_configuration.client;
1870
1871 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), job_id=job_id);
1872 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1873
1874 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1875 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1876 }
1877
1878 let local_var_req = local_var_req_builder.build()?;
1879 let local_var_resp = local_var_client.execute(local_var_req).await?;
1880
1881 let local_var_status = local_var_resp.status();
1882 let local_var_content = local_var_resp.text().await?;
1883
1884 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1885 Ok(())
1886 } else {
1887 let local_var_entity: Option<ActionsSlashDownloadJobLogsForWorkflowRunError> = serde_json::from_str(&local_var_content).ok();
1888 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1889 Err(Error::ResponseError(local_var_error))
1890 }
1891}
1892
1893pub async fn actions_slash_download_workflow_run_attempt_logs(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32, attempt_number: i32) -> Result<(), Error<ActionsSlashDownloadWorkflowRunAttemptLogsError>> {
1895 let local_var_configuration = configuration;
1896
1897 let local_var_client = &local_var_configuration.client;
1898
1899 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id, attempt_number=attempt_number);
1900 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1901
1902 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1903 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1904 }
1905
1906 let local_var_req = local_var_req_builder.build()?;
1907 let local_var_resp = local_var_client.execute(local_var_req).await?;
1908
1909 let local_var_status = local_var_resp.status();
1910 let local_var_content = local_var_resp.text().await?;
1911
1912 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1913 Ok(())
1914 } else {
1915 let local_var_entity: Option<ActionsSlashDownloadWorkflowRunAttemptLogsError> = serde_json::from_str(&local_var_content).ok();
1916 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1917 Err(Error::ResponseError(local_var_error))
1918 }
1919}
1920
1921pub async fn actions_slash_download_workflow_run_logs(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32) -> Result<(), Error<ActionsSlashDownloadWorkflowRunLogsError>> {
1923 let local_var_configuration = configuration;
1924
1925 let local_var_client = &local_var_configuration.client;
1926
1927 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/logs", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
1928 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1929
1930 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1931 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1932 }
1933
1934 let local_var_req = local_var_req_builder.build()?;
1935 let local_var_resp = local_var_client.execute(local_var_req).await?;
1936
1937 let local_var_status = local_var_resp.status();
1938 let local_var_content = local_var_resp.text().await?;
1939
1940 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1941 Ok(())
1942 } else {
1943 let local_var_entity: Option<ActionsSlashDownloadWorkflowRunLogsError> = serde_json::from_str(&local_var_content).ok();
1944 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1945 Err(Error::ResponseError(local_var_error))
1946 }
1947}
1948
1949pub async fn actions_slash_enable_selected_repository_github_actions_organization(configuration: &configuration::Configuration, org: &str, repository_id: i32) -> Result<(), Error<ActionsSlashEnableSelectedRepositoryGithubActionsOrganizationError>> {
1951 let local_var_configuration = configuration;
1952
1953 let local_var_client = &local_var_configuration.client;
1954
1955 let local_var_uri_str = format!("{}/orgs/{org}/actions/permissions/repositories/{repository_id}", local_var_configuration.base_path, org=crate::apis::urlencode(org), repository_id=repository_id);
1956 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1957
1958 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1959 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1960 }
1961
1962 let local_var_req = local_var_req_builder.build()?;
1963 let local_var_resp = local_var_client.execute(local_var_req).await?;
1964
1965 let local_var_status = local_var_resp.status();
1966 let local_var_content = local_var_resp.text().await?;
1967
1968 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1969 Ok(())
1970 } else {
1971 let local_var_entity: Option<ActionsSlashEnableSelectedRepositoryGithubActionsOrganizationError> = serde_json::from_str(&local_var_content).ok();
1972 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1973 Err(Error::ResponseError(local_var_error))
1974 }
1975}
1976
1977pub async fn actions_slash_enable_workflow(configuration: &configuration::Configuration, owner: &str, repo: &str, workflow_id: models::ActionsGetWorkflowWorkflowIdParameter) -> Result<(), Error<ActionsSlashEnableWorkflowError>> {
1979 let local_var_configuration = configuration;
1980
1981 let local_var_client = &local_var_configuration.client;
1982
1983 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), workflow_id=workflow_id);
1984 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1985
1986 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1987 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1988 }
1989
1990 let local_var_req = local_var_req_builder.build()?;
1991 let local_var_resp = local_var_client.execute(local_var_req).await?;
1992
1993 let local_var_status = local_var_resp.status();
1994 let local_var_content = local_var_resp.text().await?;
1995
1996 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1997 Ok(())
1998 } else {
1999 let local_var_entity: Option<ActionsSlashEnableWorkflowError> = serde_json::from_str(&local_var_content).ok();
2000 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2001 Err(Error::ResponseError(local_var_error))
2002 }
2003}
2004
2005pub async fn actions_slash_force_cancel_workflow_run(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32) -> Result<serde_json::Value, Error<ActionsSlashForceCancelWorkflowRunError>> {
2007 let local_var_configuration = configuration;
2008
2009 let local_var_client = &local_var_configuration.client;
2010
2011 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
2012 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2013
2014 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2015 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2016 }
2017
2018 let local_var_req = local_var_req_builder.build()?;
2019 let local_var_resp = local_var_client.execute(local_var_req).await?;
2020
2021 let local_var_status = local_var_resp.status();
2022 let local_var_content = local_var_resp.text().await?;
2023
2024 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2025 serde_json::from_str(&local_var_content).map_err(Error::from)
2026 } else {
2027 let local_var_entity: Option<ActionsSlashForceCancelWorkflowRunError> = serde_json::from_str(&local_var_content).ok();
2028 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2029 Err(Error::ResponseError(local_var_error))
2030 }
2031}
2032
2033pub async fn actions_slash_generate_runner_jitconfig_for_org(configuration: &configuration::Configuration, org: &str, actions_generate_runner_jitconfig_for_org_request: models::ActionsGenerateRunnerJitconfigForOrgRequest) -> Result<models::ActionsGenerateRunnerJitconfigForOrg201Response, Error<ActionsSlashGenerateRunnerJitconfigForOrgError>> {
2035 let local_var_configuration = configuration;
2036
2037 let local_var_client = &local_var_configuration.client;
2038
2039 let local_var_uri_str = format!("{}/orgs/{org}/actions/runners/generate-jitconfig", local_var_configuration.base_path, org=crate::apis::urlencode(org));
2040 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2041
2042 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2043 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2044 }
2045 local_var_req_builder = local_var_req_builder.json(&actions_generate_runner_jitconfig_for_org_request);
2046
2047 let local_var_req = local_var_req_builder.build()?;
2048 let local_var_resp = local_var_client.execute(local_var_req).await?;
2049
2050 let local_var_status = local_var_resp.status();
2051 let local_var_content = local_var_resp.text().await?;
2052
2053 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2054 serde_json::from_str(&local_var_content).map_err(Error::from)
2055 } else {
2056 let local_var_entity: Option<ActionsSlashGenerateRunnerJitconfigForOrgError> = serde_json::from_str(&local_var_content).ok();
2057 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2058 Err(Error::ResponseError(local_var_error))
2059 }
2060}
2061
2062pub async fn actions_slash_generate_runner_jitconfig_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str, actions_generate_runner_jitconfig_for_org_request: models::ActionsGenerateRunnerJitconfigForOrgRequest) -> Result<models::ActionsGenerateRunnerJitconfigForOrg201Response, Error<ActionsSlashGenerateRunnerJitconfigForRepoError>> {
2064 let local_var_configuration = configuration;
2065
2066 let local_var_client = &local_var_configuration.client;
2067
2068 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/generate-jitconfig", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
2069 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2070
2071 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2072 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2073 }
2074 local_var_req_builder = local_var_req_builder.json(&actions_generate_runner_jitconfig_for_org_request);
2075
2076 let local_var_req = local_var_req_builder.build()?;
2077 let local_var_resp = local_var_client.execute(local_var_req).await?;
2078
2079 let local_var_status = local_var_resp.status();
2080 let local_var_content = local_var_resp.text().await?;
2081
2082 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2083 serde_json::from_str(&local_var_content).map_err(Error::from)
2084 } else {
2085 let local_var_entity: Option<ActionsSlashGenerateRunnerJitconfigForRepoError> = serde_json::from_str(&local_var_content).ok();
2086 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2087 Err(Error::ResponseError(local_var_error))
2088 }
2089}
2090
2091pub async fn actions_slash_get_actions_cache_list(configuration: &configuration::Configuration, owner: &str, repo: &str, per_page: Option<i32>, page: Option<i32>, r#ref: Option<&str>, key: Option<&str>, sort: Option<&str>, direction: Option<&str>) -> Result<models::ActionsCacheList, Error<ActionsSlashGetActionsCacheListError>> {
2093 let local_var_configuration = configuration;
2094
2095 let local_var_client = &local_var_configuration.client;
2096
2097 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/caches", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
2098 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2099
2100 if let Some(ref local_var_str) = per_page {
2101 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
2102 }
2103 if let Some(ref local_var_str) = page {
2104 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2105 }
2106 if let Some(ref local_var_str) = r#ref {
2107 local_var_req_builder = local_var_req_builder.query(&[("ref", &local_var_str.to_string())]);
2108 }
2109 if let Some(ref local_var_str) = key {
2110 local_var_req_builder = local_var_req_builder.query(&[("key", &local_var_str.to_string())]);
2111 }
2112 if let Some(ref local_var_str) = sort {
2113 local_var_req_builder = local_var_req_builder.query(&[("sort", &local_var_str.to_string())]);
2114 }
2115 if let Some(ref local_var_str) = direction {
2116 local_var_req_builder = local_var_req_builder.query(&[("direction", &local_var_str.to_string())]);
2117 }
2118 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2119 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2120 }
2121
2122 let local_var_req = local_var_req_builder.build()?;
2123 let local_var_resp = local_var_client.execute(local_var_req).await?;
2124
2125 let local_var_status = local_var_resp.status();
2126 let local_var_content = local_var_resp.text().await?;
2127
2128 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2129 serde_json::from_str(&local_var_content).map_err(Error::from)
2130 } else {
2131 let local_var_entity: Option<ActionsSlashGetActionsCacheListError> = serde_json::from_str(&local_var_content).ok();
2132 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2133 Err(Error::ResponseError(local_var_error))
2134 }
2135}
2136
2137pub async fn actions_slash_get_actions_cache_usage(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<models::ActionsCacheUsageByRepository, Error<ActionsSlashGetActionsCacheUsageError>> {
2139 let local_var_configuration = configuration;
2140
2141 let local_var_client = &local_var_configuration.client;
2142
2143 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/cache/usage", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
2144 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2145
2146 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2147 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2148 }
2149
2150 let local_var_req = local_var_req_builder.build()?;
2151 let local_var_resp = local_var_client.execute(local_var_req).await?;
2152
2153 let local_var_status = local_var_resp.status();
2154 let local_var_content = local_var_resp.text().await?;
2155
2156 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2157 serde_json::from_str(&local_var_content).map_err(Error::from)
2158 } else {
2159 let local_var_entity: Option<ActionsSlashGetActionsCacheUsageError> = serde_json::from_str(&local_var_content).ok();
2160 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2161 Err(Error::ResponseError(local_var_error))
2162 }
2163}
2164
2165pub async fn actions_slash_get_actions_cache_usage_by_repo_for_org(configuration: &configuration::Configuration, org: &str, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsGetActionsCacheUsageByRepoForOrg200Response, Error<ActionsSlashGetActionsCacheUsageByRepoForOrgError>> {
2167 let local_var_configuration = configuration;
2168
2169 let local_var_client = &local_var_configuration.client;
2170
2171 let local_var_uri_str = format!("{}/orgs/{org}/actions/cache/usage-by-repository", local_var_configuration.base_path, org=crate::apis::urlencode(org));
2172 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2173
2174 if let Some(ref local_var_str) = per_page {
2175 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
2176 }
2177 if let Some(ref local_var_str) = page {
2178 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2179 }
2180 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2181 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2182 }
2183
2184 let local_var_req = local_var_req_builder.build()?;
2185 let local_var_resp = local_var_client.execute(local_var_req).await?;
2186
2187 let local_var_status = local_var_resp.status();
2188 let local_var_content = local_var_resp.text().await?;
2189
2190 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2191 serde_json::from_str(&local_var_content).map_err(Error::from)
2192 } else {
2193 let local_var_entity: Option<ActionsSlashGetActionsCacheUsageByRepoForOrgError> = serde_json::from_str(&local_var_content).ok();
2194 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2195 Err(Error::ResponseError(local_var_error))
2196 }
2197}
2198
2199pub async fn actions_slash_get_actions_cache_usage_for_org(configuration: &configuration::Configuration, org: &str) -> Result<models::ActionsCacheUsageOrgEnterprise, Error<ActionsSlashGetActionsCacheUsageForOrgError>> {
2201 let local_var_configuration = configuration;
2202
2203 let local_var_client = &local_var_configuration.client;
2204
2205 let local_var_uri_str = format!("{}/orgs/{org}/actions/cache/usage", local_var_configuration.base_path, org=crate::apis::urlencode(org));
2206 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2207
2208 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2209 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2210 }
2211
2212 let local_var_req = local_var_req_builder.build()?;
2213 let local_var_resp = local_var_client.execute(local_var_req).await?;
2214
2215 let local_var_status = local_var_resp.status();
2216 let local_var_content = local_var_resp.text().await?;
2217
2218 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2219 serde_json::from_str(&local_var_content).map_err(Error::from)
2220 } else {
2221 let local_var_entity: Option<ActionsSlashGetActionsCacheUsageForOrgError> = serde_json::from_str(&local_var_content).ok();
2222 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2223 Err(Error::ResponseError(local_var_error))
2224 }
2225}
2226
2227pub async fn actions_slash_get_allowed_actions_organization(configuration: &configuration::Configuration, org: &str) -> Result<models::SelectedActions, Error<ActionsSlashGetAllowedActionsOrganizationError>> {
2229 let local_var_configuration = configuration;
2230
2231 let local_var_client = &local_var_configuration.client;
2232
2233 let local_var_uri_str = format!("{}/orgs/{org}/actions/permissions/selected-actions", local_var_configuration.base_path, org=crate::apis::urlencode(org));
2234 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2235
2236 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2237 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2238 }
2239
2240 let local_var_req = local_var_req_builder.build()?;
2241 let local_var_resp = local_var_client.execute(local_var_req).await?;
2242
2243 let local_var_status = local_var_resp.status();
2244 let local_var_content = local_var_resp.text().await?;
2245
2246 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2247 serde_json::from_str(&local_var_content).map_err(Error::from)
2248 } else {
2249 let local_var_entity: Option<ActionsSlashGetAllowedActionsOrganizationError> = serde_json::from_str(&local_var_content).ok();
2250 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2251 Err(Error::ResponseError(local_var_error))
2252 }
2253}
2254
2255pub async fn actions_slash_get_allowed_actions_repository(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<models::SelectedActions, Error<ActionsSlashGetAllowedActionsRepositoryError>> {
2257 let local_var_configuration = configuration;
2258
2259 let local_var_client = &local_var_configuration.client;
2260
2261 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/permissions/selected-actions", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
2262 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2263
2264 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2265 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2266 }
2267
2268 let local_var_req = local_var_req_builder.build()?;
2269 let local_var_resp = local_var_client.execute(local_var_req).await?;
2270
2271 let local_var_status = local_var_resp.status();
2272 let local_var_content = local_var_resp.text().await?;
2273
2274 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2275 serde_json::from_str(&local_var_content).map_err(Error::from)
2276 } else {
2277 let local_var_entity: Option<ActionsSlashGetAllowedActionsRepositoryError> = serde_json::from_str(&local_var_content).ok();
2278 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2279 Err(Error::ResponseError(local_var_error))
2280 }
2281}
2282
2283pub async fn actions_slash_get_artifact(configuration: &configuration::Configuration, owner: &str, repo: &str, artifact_id: i32) -> Result<models::Artifact, Error<ActionsSlashGetArtifactError>> {
2285 let local_var_configuration = configuration;
2286
2287 let local_var_client = &local_var_configuration.client;
2288
2289 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), artifact_id=artifact_id);
2290 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2291
2292 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2293 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2294 }
2295
2296 let local_var_req = local_var_req_builder.build()?;
2297 let local_var_resp = local_var_client.execute(local_var_req).await?;
2298
2299 let local_var_status = local_var_resp.status();
2300 let local_var_content = local_var_resp.text().await?;
2301
2302 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2303 serde_json::from_str(&local_var_content).map_err(Error::from)
2304 } else {
2305 let local_var_entity: Option<ActionsSlashGetArtifactError> = serde_json::from_str(&local_var_content).ok();
2306 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2307 Err(Error::ResponseError(local_var_error))
2308 }
2309}
2310
2311pub async fn actions_slash_get_custom_oidc_sub_claim_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<models::OidcCustomSubRepo, Error<ActionsSlashGetCustomOidcSubClaimForRepoError>> {
2313 let local_var_configuration = configuration;
2314
2315 let local_var_client = &local_var_configuration.client;
2316
2317 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/oidc/customization/sub", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
2318 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2319
2320 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2321 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2322 }
2323
2324 let local_var_req = local_var_req_builder.build()?;
2325 let local_var_resp = local_var_client.execute(local_var_req).await?;
2326
2327 let local_var_status = local_var_resp.status();
2328 let local_var_content = local_var_resp.text().await?;
2329
2330 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2331 serde_json::from_str(&local_var_content).map_err(Error::from)
2332 } else {
2333 let local_var_entity: Option<ActionsSlashGetCustomOidcSubClaimForRepoError> = serde_json::from_str(&local_var_content).ok();
2334 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2335 Err(Error::ResponseError(local_var_error))
2336 }
2337}
2338
2339pub async fn actions_slash_get_environment_public_key(configuration: &configuration::Configuration, owner: &str, repo: &str, environment_name: &str) -> Result<models::ActionsPublicKey, Error<ActionsSlashGetEnvironmentPublicKeyError>> {
2341 let local_var_configuration = configuration;
2342
2343 let local_var_client = &local_var_configuration.client;
2344
2345 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), environment_name=crate::apis::urlencode(environment_name));
2346 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2347
2348 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2349 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2350 }
2351
2352 let local_var_req = local_var_req_builder.build()?;
2353 let local_var_resp = local_var_client.execute(local_var_req).await?;
2354
2355 let local_var_status = local_var_resp.status();
2356 let local_var_content = local_var_resp.text().await?;
2357
2358 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2359 serde_json::from_str(&local_var_content).map_err(Error::from)
2360 } else {
2361 let local_var_entity: Option<ActionsSlashGetEnvironmentPublicKeyError> = serde_json::from_str(&local_var_content).ok();
2362 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2363 Err(Error::ResponseError(local_var_error))
2364 }
2365}
2366
2367pub async fn actions_slash_get_environment_secret(configuration: &configuration::Configuration, owner: &str, repo: &str, environment_name: &str, secret_name: &str) -> Result<models::ActionsSecret, Error<ActionsSlashGetEnvironmentSecretError>> {
2369 let local_var_configuration = configuration;
2370
2371 let local_var_client = &local_var_configuration.client;
2372
2373 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), environment_name=crate::apis::urlencode(environment_name), secret_name=crate::apis::urlencode(secret_name));
2374 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2375
2376 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2377 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2378 }
2379
2380 let local_var_req = local_var_req_builder.build()?;
2381 let local_var_resp = local_var_client.execute(local_var_req).await?;
2382
2383 let local_var_status = local_var_resp.status();
2384 let local_var_content = local_var_resp.text().await?;
2385
2386 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2387 serde_json::from_str(&local_var_content).map_err(Error::from)
2388 } else {
2389 let local_var_entity: Option<ActionsSlashGetEnvironmentSecretError> = serde_json::from_str(&local_var_content).ok();
2390 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2391 Err(Error::ResponseError(local_var_error))
2392 }
2393}
2394
2395pub async fn actions_slash_get_environment_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, environment_name: &str, name: &str) -> Result<models::ActionsVariable, Error<ActionsSlashGetEnvironmentVariableError>> {
2397 let local_var_configuration = configuration;
2398
2399 let local_var_client = &local_var_configuration.client;
2400
2401 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/environments/{environment_name}/variables/{name}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), environment_name=crate::apis::urlencode(environment_name), name=crate::apis::urlencode(name));
2402 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2403
2404 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2405 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2406 }
2407
2408 let local_var_req = local_var_req_builder.build()?;
2409 let local_var_resp = local_var_client.execute(local_var_req).await?;
2410
2411 let local_var_status = local_var_resp.status();
2412 let local_var_content = local_var_resp.text().await?;
2413
2414 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2415 serde_json::from_str(&local_var_content).map_err(Error::from)
2416 } else {
2417 let local_var_entity: Option<ActionsSlashGetEnvironmentVariableError> = serde_json::from_str(&local_var_content).ok();
2418 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2419 Err(Error::ResponseError(local_var_error))
2420 }
2421}
2422
2423pub async fn actions_slash_get_github_actions_default_workflow_permissions_organization(configuration: &configuration::Configuration, org: &str) -> Result<models::ActionsGetDefaultWorkflowPermissions, Error<ActionsSlashGetGithubActionsDefaultWorkflowPermissionsOrganizationError>> {
2425 let local_var_configuration = configuration;
2426
2427 let local_var_client = &local_var_configuration.client;
2428
2429 let local_var_uri_str = format!("{}/orgs/{org}/actions/permissions/workflow", local_var_configuration.base_path, org=crate::apis::urlencode(org));
2430 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2431
2432 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2433 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2434 }
2435
2436 let local_var_req = local_var_req_builder.build()?;
2437 let local_var_resp = local_var_client.execute(local_var_req).await?;
2438
2439 let local_var_status = local_var_resp.status();
2440 let local_var_content = local_var_resp.text().await?;
2441
2442 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2443 serde_json::from_str(&local_var_content).map_err(Error::from)
2444 } else {
2445 let local_var_entity: Option<ActionsSlashGetGithubActionsDefaultWorkflowPermissionsOrganizationError> = serde_json::from_str(&local_var_content).ok();
2446 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2447 Err(Error::ResponseError(local_var_error))
2448 }
2449}
2450
2451pub async fn actions_slash_get_github_actions_default_workflow_permissions_repository(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<models::ActionsGetDefaultWorkflowPermissions, Error<ActionsSlashGetGithubActionsDefaultWorkflowPermissionsRepositoryError>> {
2453 let local_var_configuration = configuration;
2454
2455 let local_var_client = &local_var_configuration.client;
2456
2457 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/permissions/workflow", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
2458 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2459
2460 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2461 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2462 }
2463
2464 let local_var_req = local_var_req_builder.build()?;
2465 let local_var_resp = local_var_client.execute(local_var_req).await?;
2466
2467 let local_var_status = local_var_resp.status();
2468 let local_var_content = local_var_resp.text().await?;
2469
2470 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2471 serde_json::from_str(&local_var_content).map_err(Error::from)
2472 } else {
2473 let local_var_entity: Option<ActionsSlashGetGithubActionsDefaultWorkflowPermissionsRepositoryError> = serde_json::from_str(&local_var_content).ok();
2474 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2475 Err(Error::ResponseError(local_var_error))
2476 }
2477}
2478
2479pub async fn actions_slash_get_github_actions_permissions_organization(configuration: &configuration::Configuration, org: &str) -> Result<models::ActionsOrganizationPermissions, Error<ActionsSlashGetGithubActionsPermissionsOrganizationError>> {
2481 let local_var_configuration = configuration;
2482
2483 let local_var_client = &local_var_configuration.client;
2484
2485 let local_var_uri_str = format!("{}/orgs/{org}/actions/permissions", local_var_configuration.base_path, org=crate::apis::urlencode(org));
2486 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2487
2488 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2489 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2490 }
2491
2492 let local_var_req = local_var_req_builder.build()?;
2493 let local_var_resp = local_var_client.execute(local_var_req).await?;
2494
2495 let local_var_status = local_var_resp.status();
2496 let local_var_content = local_var_resp.text().await?;
2497
2498 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2499 serde_json::from_str(&local_var_content).map_err(Error::from)
2500 } else {
2501 let local_var_entity: Option<ActionsSlashGetGithubActionsPermissionsOrganizationError> = serde_json::from_str(&local_var_content).ok();
2502 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2503 Err(Error::ResponseError(local_var_error))
2504 }
2505}
2506
2507pub async fn actions_slash_get_github_actions_permissions_repository(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<models::ActionsRepositoryPermissions, Error<ActionsSlashGetGithubActionsPermissionsRepositoryError>> {
2509 let local_var_configuration = configuration;
2510
2511 let local_var_client = &local_var_configuration.client;
2512
2513 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/permissions", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
2514 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2515
2516 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2517 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2518 }
2519
2520 let local_var_req = local_var_req_builder.build()?;
2521 let local_var_resp = local_var_client.execute(local_var_req).await?;
2522
2523 let local_var_status = local_var_resp.status();
2524 let local_var_content = local_var_resp.text().await?;
2525
2526 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2527 serde_json::from_str(&local_var_content).map_err(Error::from)
2528 } else {
2529 let local_var_entity: Option<ActionsSlashGetGithubActionsPermissionsRepositoryError> = serde_json::from_str(&local_var_content).ok();
2530 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2531 Err(Error::ResponseError(local_var_error))
2532 }
2533}
2534
2535pub async fn actions_slash_get_job_for_workflow_run(configuration: &configuration::Configuration, owner: &str, repo: &str, job_id: i32) -> Result<models::Job, Error<ActionsSlashGetJobForWorkflowRunError>> {
2537 let local_var_configuration = configuration;
2538
2539 let local_var_client = &local_var_configuration.client;
2540
2541 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/jobs/{job_id}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), job_id=job_id);
2542 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2543
2544 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2545 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2546 }
2547
2548 let local_var_req = local_var_req_builder.build()?;
2549 let local_var_resp = local_var_client.execute(local_var_req).await?;
2550
2551 let local_var_status = local_var_resp.status();
2552 let local_var_content = local_var_resp.text().await?;
2553
2554 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2555 serde_json::from_str(&local_var_content).map_err(Error::from)
2556 } else {
2557 let local_var_entity: Option<ActionsSlashGetJobForWorkflowRunError> = serde_json::from_str(&local_var_content).ok();
2558 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2559 Err(Error::ResponseError(local_var_error))
2560 }
2561}
2562
2563pub async fn actions_slash_get_org_public_key(configuration: &configuration::Configuration, org: &str) -> Result<models::ActionsPublicKey, Error<ActionsSlashGetOrgPublicKeyError>> {
2565 let local_var_configuration = configuration;
2566
2567 let local_var_client = &local_var_configuration.client;
2568
2569 let local_var_uri_str = format!("{}/orgs/{org}/actions/secrets/public-key", local_var_configuration.base_path, org=crate::apis::urlencode(org));
2570 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2571
2572 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2573 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2574 }
2575
2576 let local_var_req = local_var_req_builder.build()?;
2577 let local_var_resp = local_var_client.execute(local_var_req).await?;
2578
2579 let local_var_status = local_var_resp.status();
2580 let local_var_content = local_var_resp.text().await?;
2581
2582 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2583 serde_json::from_str(&local_var_content).map_err(Error::from)
2584 } else {
2585 let local_var_entity: Option<ActionsSlashGetOrgPublicKeyError> = serde_json::from_str(&local_var_content).ok();
2586 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2587 Err(Error::ResponseError(local_var_error))
2588 }
2589}
2590
2591pub async fn actions_slash_get_org_secret(configuration: &configuration::Configuration, org: &str, secret_name: &str) -> Result<models::OrganizationActionsSecret, Error<ActionsSlashGetOrgSecretError>> {
2593 let local_var_configuration = configuration;
2594
2595 let local_var_client = &local_var_configuration.client;
2596
2597 let local_var_uri_str = format!("{}/orgs/{org}/actions/secrets/{secret_name}", local_var_configuration.base_path, org=crate::apis::urlencode(org), secret_name=crate::apis::urlencode(secret_name));
2598 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2599
2600 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2601 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2602 }
2603
2604 let local_var_req = local_var_req_builder.build()?;
2605 let local_var_resp = local_var_client.execute(local_var_req).await?;
2606
2607 let local_var_status = local_var_resp.status();
2608 let local_var_content = local_var_resp.text().await?;
2609
2610 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2611 serde_json::from_str(&local_var_content).map_err(Error::from)
2612 } else {
2613 let local_var_entity: Option<ActionsSlashGetOrgSecretError> = serde_json::from_str(&local_var_content).ok();
2614 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2615 Err(Error::ResponseError(local_var_error))
2616 }
2617}
2618
2619pub async fn actions_slash_get_org_variable(configuration: &configuration::Configuration, org: &str, name: &str) -> Result<models::OrganizationActionsVariable, Error<ActionsSlashGetOrgVariableError>> {
2621 let local_var_configuration = configuration;
2622
2623 let local_var_client = &local_var_configuration.client;
2624
2625 let local_var_uri_str = format!("{}/orgs/{org}/actions/variables/{name}", local_var_configuration.base_path, org=crate::apis::urlencode(org), name=crate::apis::urlencode(name));
2626 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2627
2628 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2629 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2630 }
2631
2632 let local_var_req = local_var_req_builder.build()?;
2633 let local_var_resp = local_var_client.execute(local_var_req).await?;
2634
2635 let local_var_status = local_var_resp.status();
2636 let local_var_content = local_var_resp.text().await?;
2637
2638 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2639 serde_json::from_str(&local_var_content).map_err(Error::from)
2640 } else {
2641 let local_var_entity: Option<ActionsSlashGetOrgVariableError> = serde_json::from_str(&local_var_content).ok();
2642 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2643 Err(Error::ResponseError(local_var_error))
2644 }
2645}
2646
2647pub async fn actions_slash_get_pending_deployments_for_run(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32) -> Result<Vec<models::PendingDeployment>, Error<ActionsSlashGetPendingDeploymentsForRunError>> {
2649 let local_var_configuration = configuration;
2650
2651 let local_var_client = &local_var_configuration.client;
2652
2653 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
2654 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2655
2656 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2657 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2658 }
2659
2660 let local_var_req = local_var_req_builder.build()?;
2661 let local_var_resp = local_var_client.execute(local_var_req).await?;
2662
2663 let local_var_status = local_var_resp.status();
2664 let local_var_content = local_var_resp.text().await?;
2665
2666 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2667 serde_json::from_str(&local_var_content).map_err(Error::from)
2668 } else {
2669 let local_var_entity: Option<ActionsSlashGetPendingDeploymentsForRunError> = serde_json::from_str(&local_var_content).ok();
2670 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2671 Err(Error::ResponseError(local_var_error))
2672 }
2673}
2674
2675pub async fn actions_slash_get_repo_public_key(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<models::ActionsPublicKey, Error<ActionsSlashGetRepoPublicKeyError>> {
2677 let local_var_configuration = configuration;
2678
2679 let local_var_client = &local_var_configuration.client;
2680
2681 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/secrets/public-key", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
2682 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2683
2684 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2685 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2686 }
2687
2688 let local_var_req = local_var_req_builder.build()?;
2689 let local_var_resp = local_var_client.execute(local_var_req).await?;
2690
2691 let local_var_status = local_var_resp.status();
2692 let local_var_content = local_var_resp.text().await?;
2693
2694 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2695 serde_json::from_str(&local_var_content).map_err(Error::from)
2696 } else {
2697 let local_var_entity: Option<ActionsSlashGetRepoPublicKeyError> = serde_json::from_str(&local_var_content).ok();
2698 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2699 Err(Error::ResponseError(local_var_error))
2700 }
2701}
2702
2703pub async fn actions_slash_get_repo_secret(configuration: &configuration::Configuration, owner: &str, repo: &str, secret_name: &str) -> Result<models::ActionsSecret, Error<ActionsSlashGetRepoSecretError>> {
2705 let local_var_configuration = configuration;
2706
2707 let local_var_client = &local_var_configuration.client;
2708
2709 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/secrets/{secret_name}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), secret_name=crate::apis::urlencode(secret_name));
2710 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2711
2712 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2713 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2714 }
2715
2716 let local_var_req = local_var_req_builder.build()?;
2717 let local_var_resp = local_var_client.execute(local_var_req).await?;
2718
2719 let local_var_status = local_var_resp.status();
2720 let local_var_content = local_var_resp.text().await?;
2721
2722 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2723 serde_json::from_str(&local_var_content).map_err(Error::from)
2724 } else {
2725 let local_var_entity: Option<ActionsSlashGetRepoSecretError> = serde_json::from_str(&local_var_content).ok();
2726 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2727 Err(Error::ResponseError(local_var_error))
2728 }
2729}
2730
2731pub async fn actions_slash_get_repo_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str) -> Result<models::ActionsVariable, Error<ActionsSlashGetRepoVariableError>> {
2733 let local_var_configuration = configuration;
2734
2735 let local_var_client = &local_var_configuration.client;
2736
2737 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/variables/{name}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), name=crate::apis::urlencode(name));
2738 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2739
2740 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2741 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2742 }
2743
2744 let local_var_req = local_var_req_builder.build()?;
2745 let local_var_resp = local_var_client.execute(local_var_req).await?;
2746
2747 let local_var_status = local_var_resp.status();
2748 let local_var_content = local_var_resp.text().await?;
2749
2750 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2751 serde_json::from_str(&local_var_content).map_err(Error::from)
2752 } else {
2753 let local_var_entity: Option<ActionsSlashGetRepoVariableError> = serde_json::from_str(&local_var_content).ok();
2754 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2755 Err(Error::ResponseError(local_var_error))
2756 }
2757}
2758
2759pub async fn actions_slash_get_reviews_for_run(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32) -> Result<Vec<models::EnvironmentApprovals>, Error<ActionsSlashGetReviewsForRunError>> {
2761 let local_var_configuration = configuration;
2762
2763 let local_var_client = &local_var_configuration.client;
2764
2765 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
2766 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2767
2768 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2769 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2770 }
2771
2772 let local_var_req = local_var_req_builder.build()?;
2773 let local_var_resp = local_var_client.execute(local_var_req).await?;
2774
2775 let local_var_status = local_var_resp.status();
2776 let local_var_content = local_var_resp.text().await?;
2777
2778 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2779 serde_json::from_str(&local_var_content).map_err(Error::from)
2780 } else {
2781 let local_var_entity: Option<ActionsSlashGetReviewsForRunError> = serde_json::from_str(&local_var_content).ok();
2782 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2783 Err(Error::ResponseError(local_var_error))
2784 }
2785}
2786
2787pub async fn actions_slash_get_self_hosted_runner_for_org(configuration: &configuration::Configuration, org: &str, runner_id: i32) -> Result<models::Runner, Error<ActionsSlashGetSelfHostedRunnerForOrgError>> {
2789 let local_var_configuration = configuration;
2790
2791 let local_var_client = &local_var_configuration.client;
2792
2793 let local_var_uri_str = format!("{}/orgs/{org}/actions/runners/{runner_id}", local_var_configuration.base_path, org=crate::apis::urlencode(org), runner_id=runner_id);
2794 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2795
2796 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2797 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2798 }
2799
2800 let local_var_req = local_var_req_builder.build()?;
2801 let local_var_resp = local_var_client.execute(local_var_req).await?;
2802
2803 let local_var_status = local_var_resp.status();
2804 let local_var_content = local_var_resp.text().await?;
2805
2806 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2807 serde_json::from_str(&local_var_content).map_err(Error::from)
2808 } else {
2809 let local_var_entity: Option<ActionsSlashGetSelfHostedRunnerForOrgError> = serde_json::from_str(&local_var_content).ok();
2810 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2811 Err(Error::ResponseError(local_var_error))
2812 }
2813}
2814
2815pub async fn actions_slash_get_self_hosted_runner_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str, runner_id: i32) -> Result<models::Runner, Error<ActionsSlashGetSelfHostedRunnerForRepoError>> {
2817 let local_var_configuration = configuration;
2818
2819 let local_var_client = &local_var_configuration.client;
2820
2821 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/{runner_id}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), runner_id=runner_id);
2822 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2823
2824 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2825 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2826 }
2827
2828 let local_var_req = local_var_req_builder.build()?;
2829 let local_var_resp = local_var_client.execute(local_var_req).await?;
2830
2831 let local_var_status = local_var_resp.status();
2832 let local_var_content = local_var_resp.text().await?;
2833
2834 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2835 serde_json::from_str(&local_var_content).map_err(Error::from)
2836 } else {
2837 let local_var_entity: Option<ActionsSlashGetSelfHostedRunnerForRepoError> = serde_json::from_str(&local_var_content).ok();
2838 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2839 Err(Error::ResponseError(local_var_error))
2840 }
2841}
2842
2843pub async fn actions_slash_get_workflow(configuration: &configuration::Configuration, owner: &str, repo: &str, workflow_id: models::ActionsGetWorkflowWorkflowIdParameter) -> Result<models::Workflow, Error<ActionsSlashGetWorkflowError>> {
2845 let local_var_configuration = configuration;
2846
2847 let local_var_client = &local_var_configuration.client;
2848
2849 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/workflows/{workflow_id}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), workflow_id=workflow_id);
2850 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2851
2852 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2853 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2854 }
2855
2856 let local_var_req = local_var_req_builder.build()?;
2857 let local_var_resp = local_var_client.execute(local_var_req).await?;
2858
2859 let local_var_status = local_var_resp.status();
2860 let local_var_content = local_var_resp.text().await?;
2861
2862 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2863 serde_json::from_str(&local_var_content).map_err(Error::from)
2864 } else {
2865 let local_var_entity: Option<ActionsSlashGetWorkflowError> = serde_json::from_str(&local_var_content).ok();
2866 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2867 Err(Error::ResponseError(local_var_error))
2868 }
2869}
2870
2871pub async fn actions_slash_get_workflow_access_to_repository(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<models::ActionsWorkflowAccessToRepository, Error<ActionsSlashGetWorkflowAccessToRepositoryError>> {
2873 let local_var_configuration = configuration;
2874
2875 let local_var_client = &local_var_configuration.client;
2876
2877 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/permissions/access", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
2878 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2879
2880 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2881 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2882 }
2883
2884 let local_var_req = local_var_req_builder.build()?;
2885 let local_var_resp = local_var_client.execute(local_var_req).await?;
2886
2887 let local_var_status = local_var_resp.status();
2888 let local_var_content = local_var_resp.text().await?;
2889
2890 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2891 serde_json::from_str(&local_var_content).map_err(Error::from)
2892 } else {
2893 let local_var_entity: Option<ActionsSlashGetWorkflowAccessToRepositoryError> = serde_json::from_str(&local_var_content).ok();
2894 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2895 Err(Error::ResponseError(local_var_error))
2896 }
2897}
2898
2899pub async fn actions_slash_get_workflow_run(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32, exclude_pull_requests: Option<bool>) -> Result<models::WorkflowRun, Error<ActionsSlashGetWorkflowRunError>> {
2901 let local_var_configuration = configuration;
2902
2903 let local_var_client = &local_var_configuration.client;
2904
2905 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
2906 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2907
2908 if let Some(ref local_var_str) = exclude_pull_requests {
2909 local_var_req_builder = local_var_req_builder.query(&[("exclude_pull_requests", &local_var_str.to_string())]);
2910 }
2911 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2912 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2913 }
2914
2915 let local_var_req = local_var_req_builder.build()?;
2916 let local_var_resp = local_var_client.execute(local_var_req).await?;
2917
2918 let local_var_status = local_var_resp.status();
2919 let local_var_content = local_var_resp.text().await?;
2920
2921 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2922 serde_json::from_str(&local_var_content).map_err(Error::from)
2923 } else {
2924 let local_var_entity: Option<ActionsSlashGetWorkflowRunError> = serde_json::from_str(&local_var_content).ok();
2925 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2926 Err(Error::ResponseError(local_var_error))
2927 }
2928}
2929
2930pub async fn actions_slash_get_workflow_run_attempt(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32, attempt_number: i32, exclude_pull_requests: Option<bool>) -> Result<models::WorkflowRun, Error<ActionsSlashGetWorkflowRunAttemptError>> {
2932 let local_var_configuration = configuration;
2933
2934 let local_var_client = &local_var_configuration.client;
2935
2936 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id, attempt_number=attempt_number);
2937 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2938
2939 if let Some(ref local_var_str) = exclude_pull_requests {
2940 local_var_req_builder = local_var_req_builder.query(&[("exclude_pull_requests", &local_var_str.to_string())]);
2941 }
2942 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2943 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2944 }
2945
2946 let local_var_req = local_var_req_builder.build()?;
2947 let local_var_resp = local_var_client.execute(local_var_req).await?;
2948
2949 let local_var_status = local_var_resp.status();
2950 let local_var_content = local_var_resp.text().await?;
2951
2952 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2953 serde_json::from_str(&local_var_content).map_err(Error::from)
2954 } else {
2955 let local_var_entity: Option<ActionsSlashGetWorkflowRunAttemptError> = serde_json::from_str(&local_var_content).ok();
2956 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2957 Err(Error::ResponseError(local_var_error))
2958 }
2959}
2960
2961pub async fn actions_slash_get_workflow_run_usage(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32) -> Result<models::WorkflowRunUsage, Error<ActionsSlashGetWorkflowRunUsageError>> {
2963 let local_var_configuration = configuration;
2964
2965 let local_var_client = &local_var_configuration.client;
2966
2967 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/timing", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
2968 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2969
2970 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2971 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2972 }
2973
2974 let local_var_req = local_var_req_builder.build()?;
2975 let local_var_resp = local_var_client.execute(local_var_req).await?;
2976
2977 let local_var_status = local_var_resp.status();
2978 let local_var_content = local_var_resp.text().await?;
2979
2980 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2981 serde_json::from_str(&local_var_content).map_err(Error::from)
2982 } else {
2983 let local_var_entity: Option<ActionsSlashGetWorkflowRunUsageError> = serde_json::from_str(&local_var_content).ok();
2984 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2985 Err(Error::ResponseError(local_var_error))
2986 }
2987}
2988
2989pub async fn actions_slash_get_workflow_usage(configuration: &configuration::Configuration, owner: &str, repo: &str, workflow_id: models::ActionsGetWorkflowWorkflowIdParameter) -> Result<models::WorkflowUsage, Error<ActionsSlashGetWorkflowUsageError>> {
2991 let local_var_configuration = configuration;
2992
2993 let local_var_client = &local_var_configuration.client;
2994
2995 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), workflow_id=workflow_id);
2996 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2997
2998 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2999 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3000 }
3001
3002 let local_var_req = local_var_req_builder.build()?;
3003 let local_var_resp = local_var_client.execute(local_var_req).await?;
3004
3005 let local_var_status = local_var_resp.status();
3006 let local_var_content = local_var_resp.text().await?;
3007
3008 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3009 serde_json::from_str(&local_var_content).map_err(Error::from)
3010 } else {
3011 let local_var_entity: Option<ActionsSlashGetWorkflowUsageError> = serde_json::from_str(&local_var_content).ok();
3012 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3013 Err(Error::ResponseError(local_var_error))
3014 }
3015}
3016
3017pub async fn actions_slash_list_artifacts_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str, per_page: Option<i32>, page: Option<i32>, name: Option<&str>) -> Result<models::ActionsListArtifactsForRepo200Response, Error<ActionsSlashListArtifactsForRepoError>> {
3019 let local_var_configuration = configuration;
3020
3021 let local_var_client = &local_var_configuration.client;
3022
3023 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/artifacts", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
3024 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3025
3026 if let Some(ref local_var_str) = per_page {
3027 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3028 }
3029 if let Some(ref local_var_str) = page {
3030 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3031 }
3032 if let Some(ref local_var_str) = name {
3033 local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
3034 }
3035 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3036 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3037 }
3038
3039 let local_var_req = local_var_req_builder.build()?;
3040 let local_var_resp = local_var_client.execute(local_var_req).await?;
3041
3042 let local_var_status = local_var_resp.status();
3043 let local_var_content = local_var_resp.text().await?;
3044
3045 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3046 serde_json::from_str(&local_var_content).map_err(Error::from)
3047 } else {
3048 let local_var_entity: Option<ActionsSlashListArtifactsForRepoError> = serde_json::from_str(&local_var_content).ok();
3049 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3050 Err(Error::ResponseError(local_var_error))
3051 }
3052}
3053
3054pub async fn actions_slash_list_environment_secrets(configuration: &configuration::Configuration, owner: &str, repo: &str, environment_name: &str, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListRepoOrganizationSecrets200Response, Error<ActionsSlashListEnvironmentSecretsError>> {
3056 let local_var_configuration = configuration;
3057
3058 let local_var_client = &local_var_configuration.client;
3059
3060 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/environments/{environment_name}/secrets", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), environment_name=crate::apis::urlencode(environment_name));
3061 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3062
3063 if let Some(ref local_var_str) = per_page {
3064 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3065 }
3066 if let Some(ref local_var_str) = page {
3067 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3068 }
3069 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3070 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3071 }
3072
3073 let local_var_req = local_var_req_builder.build()?;
3074 let local_var_resp = local_var_client.execute(local_var_req).await?;
3075
3076 let local_var_status = local_var_resp.status();
3077 let local_var_content = local_var_resp.text().await?;
3078
3079 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3080 serde_json::from_str(&local_var_content).map_err(Error::from)
3081 } else {
3082 let local_var_entity: Option<ActionsSlashListEnvironmentSecretsError> = serde_json::from_str(&local_var_content).ok();
3083 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3084 Err(Error::ResponseError(local_var_error))
3085 }
3086}
3087
3088pub async fn actions_slash_list_environment_variables(configuration: &configuration::Configuration, owner: &str, repo: &str, environment_name: &str, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListRepoOrganizationVariables200Response, Error<ActionsSlashListEnvironmentVariablesError>> {
3090 let local_var_configuration = configuration;
3091
3092 let local_var_client = &local_var_configuration.client;
3093
3094 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/environments/{environment_name}/variables", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), environment_name=crate::apis::urlencode(environment_name));
3095 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3096
3097 if let Some(ref local_var_str) = per_page {
3098 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3099 }
3100 if let Some(ref local_var_str) = page {
3101 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3102 }
3103 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3104 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3105 }
3106
3107 let local_var_req = local_var_req_builder.build()?;
3108 let local_var_resp = local_var_client.execute(local_var_req).await?;
3109
3110 let local_var_status = local_var_resp.status();
3111 let local_var_content = local_var_resp.text().await?;
3112
3113 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3114 serde_json::from_str(&local_var_content).map_err(Error::from)
3115 } else {
3116 let local_var_entity: Option<ActionsSlashListEnvironmentVariablesError> = serde_json::from_str(&local_var_content).ok();
3117 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3118 Err(Error::ResponseError(local_var_error))
3119 }
3120}
3121
3122pub async fn actions_slash_list_jobs_for_workflow_run(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32, filter: Option<&str>, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListJobsForWorkflowRunAttempt200Response, Error<ActionsSlashListJobsForWorkflowRunError>> {
3124 let local_var_configuration = configuration;
3125
3126 let local_var_client = &local_var_configuration.client;
3127
3128 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
3129 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3130
3131 if let Some(ref local_var_str) = filter {
3132 local_var_req_builder = local_var_req_builder.query(&[("filter", &local_var_str.to_string())]);
3133 }
3134 if let Some(ref local_var_str) = per_page {
3135 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3136 }
3137 if let Some(ref local_var_str) = page {
3138 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3139 }
3140 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3141 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3142 }
3143
3144 let local_var_req = local_var_req_builder.build()?;
3145 let local_var_resp = local_var_client.execute(local_var_req).await?;
3146
3147 let local_var_status = local_var_resp.status();
3148 let local_var_content = local_var_resp.text().await?;
3149
3150 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3151 serde_json::from_str(&local_var_content).map_err(Error::from)
3152 } else {
3153 let local_var_entity: Option<ActionsSlashListJobsForWorkflowRunError> = serde_json::from_str(&local_var_content).ok();
3154 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3155 Err(Error::ResponseError(local_var_error))
3156 }
3157}
3158
3159pub async fn actions_slash_list_jobs_for_workflow_run_attempt(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32, attempt_number: i32, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListJobsForWorkflowRunAttempt200Response, Error<ActionsSlashListJobsForWorkflowRunAttemptError>> {
3161 let local_var_configuration = configuration;
3162
3163 let local_var_client = &local_var_configuration.client;
3164
3165 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id, attempt_number=attempt_number);
3166 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3167
3168 if let Some(ref local_var_str) = per_page {
3169 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3170 }
3171 if let Some(ref local_var_str) = page {
3172 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3173 }
3174 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3175 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3176 }
3177
3178 let local_var_req = local_var_req_builder.build()?;
3179 let local_var_resp = local_var_client.execute(local_var_req).await?;
3180
3181 let local_var_status = local_var_resp.status();
3182 let local_var_content = local_var_resp.text().await?;
3183
3184 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3185 serde_json::from_str(&local_var_content).map_err(Error::from)
3186 } else {
3187 let local_var_entity: Option<ActionsSlashListJobsForWorkflowRunAttemptError> = serde_json::from_str(&local_var_content).ok();
3188 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3189 Err(Error::ResponseError(local_var_error))
3190 }
3191}
3192
3193pub async fn actions_slash_list_labels_for_self_hosted_runner_for_org(configuration: &configuration::Configuration, org: &str, runner_id: i32) -> Result<models::ActionsListLabelsForSelfHostedRunnerForOrg200Response, Error<ActionsSlashListLabelsForSelfHostedRunnerForOrgError>> {
3195 let local_var_configuration = configuration;
3196
3197 let local_var_client = &local_var_configuration.client;
3198
3199 let local_var_uri_str = format!("{}/orgs/{org}/actions/runners/{runner_id}/labels", local_var_configuration.base_path, org=crate::apis::urlencode(org), runner_id=runner_id);
3200 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3201
3202 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3203 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3204 }
3205
3206 let local_var_req = local_var_req_builder.build()?;
3207 let local_var_resp = local_var_client.execute(local_var_req).await?;
3208
3209 let local_var_status = local_var_resp.status();
3210 let local_var_content = local_var_resp.text().await?;
3211
3212 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3213 serde_json::from_str(&local_var_content).map_err(Error::from)
3214 } else {
3215 let local_var_entity: Option<ActionsSlashListLabelsForSelfHostedRunnerForOrgError> = serde_json::from_str(&local_var_content).ok();
3216 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3217 Err(Error::ResponseError(local_var_error))
3218 }
3219}
3220
3221pub async fn actions_slash_list_labels_for_self_hosted_runner_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str, runner_id: i32) -> Result<models::ActionsListLabelsForSelfHostedRunnerForOrg200Response, Error<ActionsSlashListLabelsForSelfHostedRunnerForRepoError>> {
3223 let local_var_configuration = configuration;
3224
3225 let local_var_client = &local_var_configuration.client;
3226
3227 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), runner_id=runner_id);
3228 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3229
3230 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3231 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3232 }
3233
3234 let local_var_req = local_var_req_builder.build()?;
3235 let local_var_resp = local_var_client.execute(local_var_req).await?;
3236
3237 let local_var_status = local_var_resp.status();
3238 let local_var_content = local_var_resp.text().await?;
3239
3240 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3241 serde_json::from_str(&local_var_content).map_err(Error::from)
3242 } else {
3243 let local_var_entity: Option<ActionsSlashListLabelsForSelfHostedRunnerForRepoError> = serde_json::from_str(&local_var_content).ok();
3244 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3245 Err(Error::ResponseError(local_var_error))
3246 }
3247}
3248
3249pub async fn actions_slash_list_org_secrets(configuration: &configuration::Configuration, org: &str, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListOrgSecrets200Response, Error<ActionsSlashListOrgSecretsError>> {
3251 let local_var_configuration = configuration;
3252
3253 let local_var_client = &local_var_configuration.client;
3254
3255 let local_var_uri_str = format!("{}/orgs/{org}/actions/secrets", local_var_configuration.base_path, org=crate::apis::urlencode(org));
3256 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3257
3258 if let Some(ref local_var_str) = per_page {
3259 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3260 }
3261 if let Some(ref local_var_str) = page {
3262 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3263 }
3264 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3265 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3266 }
3267
3268 let local_var_req = local_var_req_builder.build()?;
3269 let local_var_resp = local_var_client.execute(local_var_req).await?;
3270
3271 let local_var_status = local_var_resp.status();
3272 let local_var_content = local_var_resp.text().await?;
3273
3274 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3275 serde_json::from_str(&local_var_content).map_err(Error::from)
3276 } else {
3277 let local_var_entity: Option<ActionsSlashListOrgSecretsError> = serde_json::from_str(&local_var_content).ok();
3278 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3279 Err(Error::ResponseError(local_var_error))
3280 }
3281}
3282
3283pub async fn actions_slash_list_org_variables(configuration: &configuration::Configuration, org: &str, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListOrgVariables200Response, Error<ActionsSlashListOrgVariablesError>> {
3285 let local_var_configuration = configuration;
3286
3287 let local_var_client = &local_var_configuration.client;
3288
3289 let local_var_uri_str = format!("{}/orgs/{org}/actions/variables", local_var_configuration.base_path, org=crate::apis::urlencode(org));
3290 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3291
3292 if let Some(ref local_var_str) = per_page {
3293 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3294 }
3295 if let Some(ref local_var_str) = page {
3296 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3297 }
3298 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3299 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3300 }
3301
3302 let local_var_req = local_var_req_builder.build()?;
3303 let local_var_resp = local_var_client.execute(local_var_req).await?;
3304
3305 let local_var_status = local_var_resp.status();
3306 let local_var_content = local_var_resp.text().await?;
3307
3308 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3309 serde_json::from_str(&local_var_content).map_err(Error::from)
3310 } else {
3311 let local_var_entity: Option<ActionsSlashListOrgVariablesError> = serde_json::from_str(&local_var_content).ok();
3312 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3313 Err(Error::ResponseError(local_var_error))
3314 }
3315}
3316
3317pub async fn actions_slash_list_repo_organization_secrets(configuration: &configuration::Configuration, owner: &str, repo: &str, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListRepoOrganizationSecrets200Response, Error<ActionsSlashListRepoOrganizationSecretsError>> {
3319 let local_var_configuration = configuration;
3320
3321 let local_var_client = &local_var_configuration.client;
3322
3323 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/organization-secrets", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
3324 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3325
3326 if let Some(ref local_var_str) = per_page {
3327 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3328 }
3329 if let Some(ref local_var_str) = page {
3330 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3331 }
3332 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3333 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3334 }
3335
3336 let local_var_req = local_var_req_builder.build()?;
3337 let local_var_resp = local_var_client.execute(local_var_req).await?;
3338
3339 let local_var_status = local_var_resp.status();
3340 let local_var_content = local_var_resp.text().await?;
3341
3342 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3343 serde_json::from_str(&local_var_content).map_err(Error::from)
3344 } else {
3345 let local_var_entity: Option<ActionsSlashListRepoOrganizationSecretsError> = serde_json::from_str(&local_var_content).ok();
3346 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3347 Err(Error::ResponseError(local_var_error))
3348 }
3349}
3350
3351pub async fn actions_slash_list_repo_organization_variables(configuration: &configuration::Configuration, owner: &str, repo: &str, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListRepoOrganizationVariables200Response, Error<ActionsSlashListRepoOrganizationVariablesError>> {
3353 let local_var_configuration = configuration;
3354
3355 let local_var_client = &local_var_configuration.client;
3356
3357 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/organization-variables", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
3358 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3359
3360 if let Some(ref local_var_str) = per_page {
3361 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3362 }
3363 if let Some(ref local_var_str) = page {
3364 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3365 }
3366 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3367 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3368 }
3369
3370 let local_var_req = local_var_req_builder.build()?;
3371 let local_var_resp = local_var_client.execute(local_var_req).await?;
3372
3373 let local_var_status = local_var_resp.status();
3374 let local_var_content = local_var_resp.text().await?;
3375
3376 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3377 serde_json::from_str(&local_var_content).map_err(Error::from)
3378 } else {
3379 let local_var_entity: Option<ActionsSlashListRepoOrganizationVariablesError> = serde_json::from_str(&local_var_content).ok();
3380 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3381 Err(Error::ResponseError(local_var_error))
3382 }
3383}
3384
3385pub async fn actions_slash_list_repo_secrets(configuration: &configuration::Configuration, owner: &str, repo: &str, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListRepoOrganizationSecrets200Response, Error<ActionsSlashListRepoSecretsError>> {
3387 let local_var_configuration = configuration;
3388
3389 let local_var_client = &local_var_configuration.client;
3390
3391 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/secrets", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
3392 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3393
3394 if let Some(ref local_var_str) = per_page {
3395 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3396 }
3397 if let Some(ref local_var_str) = page {
3398 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3399 }
3400 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3401 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3402 }
3403
3404 let local_var_req = local_var_req_builder.build()?;
3405 let local_var_resp = local_var_client.execute(local_var_req).await?;
3406
3407 let local_var_status = local_var_resp.status();
3408 let local_var_content = local_var_resp.text().await?;
3409
3410 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3411 serde_json::from_str(&local_var_content).map_err(Error::from)
3412 } else {
3413 let local_var_entity: Option<ActionsSlashListRepoSecretsError> = serde_json::from_str(&local_var_content).ok();
3414 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3415 Err(Error::ResponseError(local_var_error))
3416 }
3417}
3418
3419pub async fn actions_slash_list_repo_variables(configuration: &configuration::Configuration, owner: &str, repo: &str, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListRepoOrganizationVariables200Response, Error<ActionsSlashListRepoVariablesError>> {
3421 let local_var_configuration = configuration;
3422
3423 let local_var_client = &local_var_configuration.client;
3424
3425 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/variables", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
3426 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3427
3428 if let Some(ref local_var_str) = per_page {
3429 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3430 }
3431 if let Some(ref local_var_str) = page {
3432 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3433 }
3434 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3435 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3436 }
3437
3438 let local_var_req = local_var_req_builder.build()?;
3439 let local_var_resp = local_var_client.execute(local_var_req).await?;
3440
3441 let local_var_status = local_var_resp.status();
3442 let local_var_content = local_var_resp.text().await?;
3443
3444 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3445 serde_json::from_str(&local_var_content).map_err(Error::from)
3446 } else {
3447 let local_var_entity: Option<ActionsSlashListRepoVariablesError> = serde_json::from_str(&local_var_content).ok();
3448 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3449 Err(Error::ResponseError(local_var_error))
3450 }
3451}
3452
3453pub async fn actions_slash_list_repo_workflows(configuration: &configuration::Configuration, owner: &str, repo: &str, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListRepoWorkflows200Response, Error<ActionsSlashListRepoWorkflowsError>> {
3455 let local_var_configuration = configuration;
3456
3457 let local_var_client = &local_var_configuration.client;
3458
3459 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/workflows", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
3460 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3461
3462 if let Some(ref local_var_str) = per_page {
3463 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3464 }
3465 if let Some(ref local_var_str) = page {
3466 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3467 }
3468 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3469 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3470 }
3471
3472 let local_var_req = local_var_req_builder.build()?;
3473 let local_var_resp = local_var_client.execute(local_var_req).await?;
3474
3475 let local_var_status = local_var_resp.status();
3476 let local_var_content = local_var_resp.text().await?;
3477
3478 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3479 serde_json::from_str(&local_var_content).map_err(Error::from)
3480 } else {
3481 let local_var_entity: Option<ActionsSlashListRepoWorkflowsError> = serde_json::from_str(&local_var_content).ok();
3482 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3483 Err(Error::ResponseError(local_var_error))
3484 }
3485}
3486
3487pub async fn actions_slash_list_runner_applications_for_org(configuration: &configuration::Configuration, org: &str) -> Result<Vec<models::RunnerApplication>, Error<ActionsSlashListRunnerApplicationsForOrgError>> {
3489 let local_var_configuration = configuration;
3490
3491 let local_var_client = &local_var_configuration.client;
3492
3493 let local_var_uri_str = format!("{}/orgs/{org}/actions/runners/downloads", local_var_configuration.base_path, org=crate::apis::urlencode(org));
3494 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3495
3496 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3497 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3498 }
3499
3500 let local_var_req = local_var_req_builder.build()?;
3501 let local_var_resp = local_var_client.execute(local_var_req).await?;
3502
3503 let local_var_status = local_var_resp.status();
3504 let local_var_content = local_var_resp.text().await?;
3505
3506 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3507 serde_json::from_str(&local_var_content).map_err(Error::from)
3508 } else {
3509 let local_var_entity: Option<ActionsSlashListRunnerApplicationsForOrgError> = serde_json::from_str(&local_var_content).ok();
3510 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3511 Err(Error::ResponseError(local_var_error))
3512 }
3513}
3514
3515pub async fn actions_slash_list_runner_applications_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str) -> Result<Vec<models::RunnerApplication>, Error<ActionsSlashListRunnerApplicationsForRepoError>> {
3517 let local_var_configuration = configuration;
3518
3519 let local_var_client = &local_var_configuration.client;
3520
3521 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/downloads", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
3522 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3523
3524 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3525 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3526 }
3527
3528 let local_var_req = local_var_req_builder.build()?;
3529 let local_var_resp = local_var_client.execute(local_var_req).await?;
3530
3531 let local_var_status = local_var_resp.status();
3532 let local_var_content = local_var_resp.text().await?;
3533
3534 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3535 serde_json::from_str(&local_var_content).map_err(Error::from)
3536 } else {
3537 let local_var_entity: Option<ActionsSlashListRunnerApplicationsForRepoError> = serde_json::from_str(&local_var_content).ok();
3538 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3539 Err(Error::ResponseError(local_var_error))
3540 }
3541}
3542
3543pub async fn actions_slash_list_selected_repos_for_org_secret(configuration: &configuration::Configuration, org: &str, secret_name: &str, page: Option<i32>, per_page: Option<i32>) -> Result<models::ActionsListSelectedReposForOrgSecret200Response, Error<ActionsSlashListSelectedReposForOrgSecretError>> {
3545 let local_var_configuration = configuration;
3546
3547 let local_var_client = &local_var_configuration.client;
3548
3549 let local_var_uri_str = format!("{}/orgs/{org}/actions/secrets/{secret_name}/repositories", local_var_configuration.base_path, org=crate::apis::urlencode(org), secret_name=crate::apis::urlencode(secret_name));
3550 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3551
3552 if let Some(ref local_var_str) = page {
3553 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3554 }
3555 if let Some(ref local_var_str) = per_page {
3556 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3557 }
3558 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3559 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3560 }
3561
3562 let local_var_req = local_var_req_builder.build()?;
3563 let local_var_resp = local_var_client.execute(local_var_req).await?;
3564
3565 let local_var_status = local_var_resp.status();
3566 let local_var_content = local_var_resp.text().await?;
3567
3568 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3569 serde_json::from_str(&local_var_content).map_err(Error::from)
3570 } else {
3571 let local_var_entity: Option<ActionsSlashListSelectedReposForOrgSecretError> = serde_json::from_str(&local_var_content).ok();
3572 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3573 Err(Error::ResponseError(local_var_error))
3574 }
3575}
3576
3577pub async fn actions_slash_list_selected_repos_for_org_variable(configuration: &configuration::Configuration, org: &str, name: &str, page: Option<i32>, per_page: Option<i32>) -> Result<models::ActionsListSelectedReposForOrgSecret200Response, Error<ActionsSlashListSelectedReposForOrgVariableError>> {
3579 let local_var_configuration = configuration;
3580
3581 let local_var_client = &local_var_configuration.client;
3582
3583 let local_var_uri_str = format!("{}/orgs/{org}/actions/variables/{name}/repositories", local_var_configuration.base_path, org=crate::apis::urlencode(org), name=crate::apis::urlencode(name));
3584 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3585
3586 if let Some(ref local_var_str) = page {
3587 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3588 }
3589 if let Some(ref local_var_str) = per_page {
3590 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3591 }
3592 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3593 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3594 }
3595
3596 let local_var_req = local_var_req_builder.build()?;
3597 let local_var_resp = local_var_client.execute(local_var_req).await?;
3598
3599 let local_var_status = local_var_resp.status();
3600 let local_var_content = local_var_resp.text().await?;
3601
3602 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3603 serde_json::from_str(&local_var_content).map_err(Error::from)
3604 } else {
3605 let local_var_entity: Option<ActionsSlashListSelectedReposForOrgVariableError> = serde_json::from_str(&local_var_content).ok();
3606 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3607 Err(Error::ResponseError(local_var_error))
3608 }
3609}
3610
3611pub async fn actions_slash_list_selected_repositories_enabled_github_actions_organization(configuration: &configuration::Configuration, org: &str, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListSelectedRepositoriesEnabledGithubActionsOrganization200Response, Error<ActionsSlashListSelectedRepositoriesEnabledGithubActionsOrganizationError>> {
3613 let local_var_configuration = configuration;
3614
3615 let local_var_client = &local_var_configuration.client;
3616
3617 let local_var_uri_str = format!("{}/orgs/{org}/actions/permissions/repositories", local_var_configuration.base_path, org=crate::apis::urlencode(org));
3618 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3619
3620 if let Some(ref local_var_str) = per_page {
3621 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3622 }
3623 if let Some(ref local_var_str) = page {
3624 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3625 }
3626 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3627 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3628 }
3629
3630 let local_var_req = local_var_req_builder.build()?;
3631 let local_var_resp = local_var_client.execute(local_var_req).await?;
3632
3633 let local_var_status = local_var_resp.status();
3634 let local_var_content = local_var_resp.text().await?;
3635
3636 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3637 serde_json::from_str(&local_var_content).map_err(Error::from)
3638 } else {
3639 let local_var_entity: Option<ActionsSlashListSelectedRepositoriesEnabledGithubActionsOrganizationError> = serde_json::from_str(&local_var_content).ok();
3640 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3641 Err(Error::ResponseError(local_var_error))
3642 }
3643}
3644
3645pub async fn actions_slash_list_self_hosted_runners_for_org(configuration: &configuration::Configuration, org: &str, name: Option<&str>, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListSelfHostedRunnersForOrg200Response, Error<ActionsSlashListSelfHostedRunnersForOrgError>> {
3647 let local_var_configuration = configuration;
3648
3649 let local_var_client = &local_var_configuration.client;
3650
3651 let local_var_uri_str = format!("{}/orgs/{org}/actions/runners", local_var_configuration.base_path, org=crate::apis::urlencode(org));
3652 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3653
3654 if let Some(ref local_var_str) = name {
3655 local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
3656 }
3657 if let Some(ref local_var_str) = per_page {
3658 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3659 }
3660 if let Some(ref local_var_str) = page {
3661 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3662 }
3663 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3664 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3665 }
3666
3667 let local_var_req = local_var_req_builder.build()?;
3668 let local_var_resp = local_var_client.execute(local_var_req).await?;
3669
3670 let local_var_status = local_var_resp.status();
3671 let local_var_content = local_var_resp.text().await?;
3672
3673 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3674 serde_json::from_str(&local_var_content).map_err(Error::from)
3675 } else {
3676 let local_var_entity: Option<ActionsSlashListSelfHostedRunnersForOrgError> = serde_json::from_str(&local_var_content).ok();
3677 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3678 Err(Error::ResponseError(local_var_error))
3679 }
3680}
3681
3682pub async fn actions_slash_list_self_hosted_runners_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str, name: Option<&str>, per_page: Option<i32>, page: Option<i32>) -> Result<models::ActionsListSelfHostedRunnersForOrg200Response, Error<ActionsSlashListSelfHostedRunnersForRepoError>> {
3684 let local_var_configuration = configuration;
3685
3686 let local_var_client = &local_var_configuration.client;
3687
3688 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runners", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
3689 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3690
3691 if let Some(ref local_var_str) = name {
3692 local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
3693 }
3694 if let Some(ref local_var_str) = per_page {
3695 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3696 }
3697 if let Some(ref local_var_str) = page {
3698 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3699 }
3700 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3701 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3702 }
3703
3704 let local_var_req = local_var_req_builder.build()?;
3705 let local_var_resp = local_var_client.execute(local_var_req).await?;
3706
3707 let local_var_status = local_var_resp.status();
3708 let local_var_content = local_var_resp.text().await?;
3709
3710 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3711 serde_json::from_str(&local_var_content).map_err(Error::from)
3712 } else {
3713 let local_var_entity: Option<ActionsSlashListSelfHostedRunnersForRepoError> = serde_json::from_str(&local_var_content).ok();
3714 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3715 Err(Error::ResponseError(local_var_error))
3716 }
3717}
3718
3719pub async fn actions_slash_list_workflow_run_artifacts(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32, per_page: Option<i32>, page: Option<i32>, name: Option<&str>) -> Result<models::ActionsListArtifactsForRepo200Response, Error<ActionsSlashListWorkflowRunArtifactsError>> {
3721 let local_var_configuration = configuration;
3722
3723 let local_var_client = &local_var_configuration.client;
3724
3725 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
3726 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3727
3728 if let Some(ref local_var_str) = per_page {
3729 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3730 }
3731 if let Some(ref local_var_str) = page {
3732 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3733 }
3734 if let Some(ref local_var_str) = name {
3735 local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
3736 }
3737 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3738 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3739 }
3740
3741 let local_var_req = local_var_req_builder.build()?;
3742 let local_var_resp = local_var_client.execute(local_var_req).await?;
3743
3744 let local_var_status = local_var_resp.status();
3745 let local_var_content = local_var_resp.text().await?;
3746
3747 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3748 serde_json::from_str(&local_var_content).map_err(Error::from)
3749 } else {
3750 let local_var_entity: Option<ActionsSlashListWorkflowRunArtifactsError> = serde_json::from_str(&local_var_content).ok();
3751 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3752 Err(Error::ResponseError(local_var_error))
3753 }
3754}
3755
3756pub async fn actions_slash_list_workflow_runs(configuration: &configuration::Configuration, owner: &str, repo: &str, workflow_id: models::ActionsGetWorkflowWorkflowIdParameter, actor: Option<&str>, branch: Option<&str>, event: Option<&str>, status: Option<&str>, per_page: Option<i32>, page: Option<i32>, created: Option<String>, exclude_pull_requests: Option<bool>, check_suite_id: Option<i32>, head_sha: Option<&str>) -> Result<models::ActionsListWorkflowRunsForRepo200Response, Error<ActionsSlashListWorkflowRunsError>> {
3758 let local_var_configuration = configuration;
3759
3760 let local_var_client = &local_var_configuration.client;
3761
3762 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), workflow_id=workflow_id);
3763 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3764
3765 if let Some(ref local_var_str) = actor {
3766 local_var_req_builder = local_var_req_builder.query(&[("actor", &local_var_str.to_string())]);
3767 }
3768 if let Some(ref local_var_str) = branch {
3769 local_var_req_builder = local_var_req_builder.query(&[("branch", &local_var_str.to_string())]);
3770 }
3771 if let Some(ref local_var_str) = event {
3772 local_var_req_builder = local_var_req_builder.query(&[("event", &local_var_str.to_string())]);
3773 }
3774 if let Some(ref local_var_str) = status {
3775 local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]);
3776 }
3777 if let Some(ref local_var_str) = per_page {
3778 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3779 }
3780 if let Some(ref local_var_str) = page {
3781 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3782 }
3783 if let Some(ref local_var_str) = created {
3784 local_var_req_builder = local_var_req_builder.query(&[("created", &local_var_str.to_string())]);
3785 }
3786 if let Some(ref local_var_str) = exclude_pull_requests {
3787 local_var_req_builder = local_var_req_builder.query(&[("exclude_pull_requests", &local_var_str.to_string())]);
3788 }
3789 if let Some(ref local_var_str) = check_suite_id {
3790 local_var_req_builder = local_var_req_builder.query(&[("check_suite_id", &local_var_str.to_string())]);
3791 }
3792 if let Some(ref local_var_str) = head_sha {
3793 local_var_req_builder = local_var_req_builder.query(&[("head_sha", &local_var_str.to_string())]);
3794 }
3795 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3796 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3797 }
3798
3799 let local_var_req = local_var_req_builder.build()?;
3800 let local_var_resp = local_var_client.execute(local_var_req).await?;
3801
3802 let local_var_status = local_var_resp.status();
3803 let local_var_content = local_var_resp.text().await?;
3804
3805 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3806 serde_json::from_str(&local_var_content).map_err(Error::from)
3807 } else {
3808 let local_var_entity: Option<ActionsSlashListWorkflowRunsError> = serde_json::from_str(&local_var_content).ok();
3809 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3810 Err(Error::ResponseError(local_var_error))
3811 }
3812}
3813
3814pub async fn actions_slash_list_workflow_runs_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str, actor: Option<&str>, branch: Option<&str>, event: Option<&str>, status: Option<&str>, per_page: Option<i32>, page: Option<i32>, created: Option<String>, exclude_pull_requests: Option<bool>, check_suite_id: Option<i32>, head_sha: Option<&str>) -> Result<models::ActionsListWorkflowRunsForRepo200Response, Error<ActionsSlashListWorkflowRunsForRepoError>> {
3816 let local_var_configuration = configuration;
3817
3818 let local_var_client = &local_var_configuration.client;
3819
3820 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
3821 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3822
3823 if let Some(ref local_var_str) = actor {
3824 local_var_req_builder = local_var_req_builder.query(&[("actor", &local_var_str.to_string())]);
3825 }
3826 if let Some(ref local_var_str) = branch {
3827 local_var_req_builder = local_var_req_builder.query(&[("branch", &local_var_str.to_string())]);
3828 }
3829 if let Some(ref local_var_str) = event {
3830 local_var_req_builder = local_var_req_builder.query(&[("event", &local_var_str.to_string())]);
3831 }
3832 if let Some(ref local_var_str) = status {
3833 local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]);
3834 }
3835 if let Some(ref local_var_str) = per_page {
3836 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3837 }
3838 if let Some(ref local_var_str) = page {
3839 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3840 }
3841 if let Some(ref local_var_str) = created {
3842 local_var_req_builder = local_var_req_builder.query(&[("created", &local_var_str.to_string())]);
3843 }
3844 if let Some(ref local_var_str) = exclude_pull_requests {
3845 local_var_req_builder = local_var_req_builder.query(&[("exclude_pull_requests", &local_var_str.to_string())]);
3846 }
3847 if let Some(ref local_var_str) = check_suite_id {
3848 local_var_req_builder = local_var_req_builder.query(&[("check_suite_id", &local_var_str.to_string())]);
3849 }
3850 if let Some(ref local_var_str) = head_sha {
3851 local_var_req_builder = local_var_req_builder.query(&[("head_sha", &local_var_str.to_string())]);
3852 }
3853 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3854 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3855 }
3856
3857 let local_var_req = local_var_req_builder.build()?;
3858 let local_var_resp = local_var_client.execute(local_var_req).await?;
3859
3860 let local_var_status = local_var_resp.status();
3861 let local_var_content = local_var_resp.text().await?;
3862
3863 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3864 serde_json::from_str(&local_var_content).map_err(Error::from)
3865 } else {
3866 let local_var_entity: Option<ActionsSlashListWorkflowRunsForRepoError> = serde_json::from_str(&local_var_content).ok();
3867 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3868 Err(Error::ResponseError(local_var_error))
3869 }
3870}
3871
3872pub async fn actions_slash_re_run_job_for_workflow_run(configuration: &configuration::Configuration, owner: &str, repo: &str, job_id: i32, actions_re_run_job_for_workflow_run_request: Option<models::ActionsReRunJobForWorkflowRunRequest>) -> Result<serde_json::Value, Error<ActionsSlashReRunJobForWorkflowRunError>> {
3874 let local_var_configuration = configuration;
3875
3876 let local_var_client = &local_var_configuration.client;
3877
3878 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), job_id=job_id);
3879 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3880
3881 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3882 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3883 }
3884 local_var_req_builder = local_var_req_builder.json(&actions_re_run_job_for_workflow_run_request);
3885
3886 let local_var_req = local_var_req_builder.build()?;
3887 let local_var_resp = local_var_client.execute(local_var_req).await?;
3888
3889 let local_var_status = local_var_resp.status();
3890 let local_var_content = local_var_resp.text().await?;
3891
3892 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3893 serde_json::from_str(&local_var_content).map_err(Error::from)
3894 } else {
3895 let local_var_entity: Option<ActionsSlashReRunJobForWorkflowRunError> = serde_json::from_str(&local_var_content).ok();
3896 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3897 Err(Error::ResponseError(local_var_error))
3898 }
3899}
3900
3901pub async fn actions_slash_re_run_workflow(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32, actions_re_run_job_for_workflow_run_request: Option<models::ActionsReRunJobForWorkflowRunRequest>) -> Result<serde_json::Value, Error<ActionsSlashReRunWorkflowError>> {
3903 let local_var_configuration = configuration;
3904
3905 let local_var_client = &local_var_configuration.client;
3906
3907 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
3908 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3909
3910 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3911 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3912 }
3913 local_var_req_builder = local_var_req_builder.json(&actions_re_run_job_for_workflow_run_request);
3914
3915 let local_var_req = local_var_req_builder.build()?;
3916 let local_var_resp = local_var_client.execute(local_var_req).await?;
3917
3918 let local_var_status = local_var_resp.status();
3919 let local_var_content = local_var_resp.text().await?;
3920
3921 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3922 serde_json::from_str(&local_var_content).map_err(Error::from)
3923 } else {
3924 let local_var_entity: Option<ActionsSlashReRunWorkflowError> = serde_json::from_str(&local_var_content).ok();
3925 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3926 Err(Error::ResponseError(local_var_error))
3927 }
3928}
3929
3930pub async fn actions_slash_re_run_workflow_failed_jobs(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32, actions_re_run_job_for_workflow_run_request: Option<models::ActionsReRunJobForWorkflowRunRequest>) -> Result<serde_json::Value, Error<ActionsSlashReRunWorkflowFailedJobsError>> {
3932 let local_var_configuration = configuration;
3933
3934 let local_var_client = &local_var_configuration.client;
3935
3936 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
3937 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3938
3939 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3940 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3941 }
3942 local_var_req_builder = local_var_req_builder.json(&actions_re_run_job_for_workflow_run_request);
3943
3944 let local_var_req = local_var_req_builder.build()?;
3945 let local_var_resp = local_var_client.execute(local_var_req).await?;
3946
3947 let local_var_status = local_var_resp.status();
3948 let local_var_content = local_var_resp.text().await?;
3949
3950 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3951 serde_json::from_str(&local_var_content).map_err(Error::from)
3952 } else {
3953 let local_var_entity: Option<ActionsSlashReRunWorkflowFailedJobsError> = serde_json::from_str(&local_var_content).ok();
3954 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3955 Err(Error::ResponseError(local_var_error))
3956 }
3957}
3958
3959pub async fn actions_slash_remove_all_custom_labels_from_self_hosted_runner_for_org(configuration: &configuration::Configuration, org: &str, runner_id: i32) -> Result<models::ActionsListLabelsForSelfHostedRunnerForOrg200Response, Error<ActionsSlashRemoveAllCustomLabelsFromSelfHostedRunnerForOrgError>> {
3961 let local_var_configuration = configuration;
3962
3963 let local_var_client = &local_var_configuration.client;
3964
3965 let local_var_uri_str = format!("{}/orgs/{org}/actions/runners/{runner_id}/labels", local_var_configuration.base_path, org=crate::apis::urlencode(org), runner_id=runner_id);
3966 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
3967
3968 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3969 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3970 }
3971
3972 let local_var_req = local_var_req_builder.build()?;
3973 let local_var_resp = local_var_client.execute(local_var_req).await?;
3974
3975 let local_var_status = local_var_resp.status();
3976 let local_var_content = local_var_resp.text().await?;
3977
3978 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3979 serde_json::from_str(&local_var_content).map_err(Error::from)
3980 } else {
3981 let local_var_entity: Option<ActionsSlashRemoveAllCustomLabelsFromSelfHostedRunnerForOrgError> = serde_json::from_str(&local_var_content).ok();
3982 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3983 Err(Error::ResponseError(local_var_error))
3984 }
3985}
3986
3987pub async fn actions_slash_remove_all_custom_labels_from_self_hosted_runner_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str, runner_id: i32) -> Result<models::ActionsListLabelsForSelfHostedRunnerForOrg200Response, Error<ActionsSlashRemoveAllCustomLabelsFromSelfHostedRunnerForRepoError>> {
3989 let local_var_configuration = configuration;
3990
3991 let local_var_client = &local_var_configuration.client;
3992
3993 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), runner_id=runner_id);
3994 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
3995
3996 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3997 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3998 }
3999
4000 let local_var_req = local_var_req_builder.build()?;
4001 let local_var_resp = local_var_client.execute(local_var_req).await?;
4002
4003 let local_var_status = local_var_resp.status();
4004 let local_var_content = local_var_resp.text().await?;
4005
4006 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4007 serde_json::from_str(&local_var_content).map_err(Error::from)
4008 } else {
4009 let local_var_entity: Option<ActionsSlashRemoveAllCustomLabelsFromSelfHostedRunnerForRepoError> = serde_json::from_str(&local_var_content).ok();
4010 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4011 Err(Error::ResponseError(local_var_error))
4012 }
4013}
4014
4015pub async fn actions_slash_remove_custom_label_from_self_hosted_runner_for_org(configuration: &configuration::Configuration, org: &str, runner_id: i32, name: &str) -> Result<models::ActionsListLabelsForSelfHostedRunnerForOrg200Response, Error<ActionsSlashRemoveCustomLabelFromSelfHostedRunnerForOrgError>> {
4017 let local_var_configuration = configuration;
4018
4019 let local_var_client = &local_var_configuration.client;
4020
4021 let local_var_uri_str = format!("{}/orgs/{org}/actions/runners/{runner_id}/labels/{name}", local_var_configuration.base_path, org=crate::apis::urlencode(org), runner_id=runner_id, name=crate::apis::urlencode(name));
4022 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
4023
4024 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4025 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4026 }
4027
4028 let local_var_req = local_var_req_builder.build()?;
4029 let local_var_resp = local_var_client.execute(local_var_req).await?;
4030
4031 let local_var_status = local_var_resp.status();
4032 let local_var_content = local_var_resp.text().await?;
4033
4034 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4035 serde_json::from_str(&local_var_content).map_err(Error::from)
4036 } else {
4037 let local_var_entity: Option<ActionsSlashRemoveCustomLabelFromSelfHostedRunnerForOrgError> = serde_json::from_str(&local_var_content).ok();
4038 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4039 Err(Error::ResponseError(local_var_error))
4040 }
4041}
4042
4043pub async fn actions_slash_remove_custom_label_from_self_hosted_runner_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str, runner_id: i32, name: &str) -> Result<models::ActionsListLabelsForSelfHostedRunnerForOrg200Response, Error<ActionsSlashRemoveCustomLabelFromSelfHostedRunnerForRepoError>> {
4045 let local_var_configuration = configuration;
4046
4047 let local_var_client = &local_var_configuration.client;
4048
4049 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), runner_id=runner_id, name=crate::apis::urlencode(name));
4050 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
4051
4052 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4053 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4054 }
4055
4056 let local_var_req = local_var_req_builder.build()?;
4057 let local_var_resp = local_var_client.execute(local_var_req).await?;
4058
4059 let local_var_status = local_var_resp.status();
4060 let local_var_content = local_var_resp.text().await?;
4061
4062 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4063 serde_json::from_str(&local_var_content).map_err(Error::from)
4064 } else {
4065 let local_var_entity: Option<ActionsSlashRemoveCustomLabelFromSelfHostedRunnerForRepoError> = serde_json::from_str(&local_var_content).ok();
4066 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4067 Err(Error::ResponseError(local_var_error))
4068 }
4069}
4070
4071pub async fn actions_slash_remove_selected_repo_from_org_secret(configuration: &configuration::Configuration, org: &str, secret_name: &str, repository_id: i32) -> Result<(), Error<ActionsSlashRemoveSelectedRepoFromOrgSecretError>> {
4073 let local_var_configuration = configuration;
4074
4075 let local_var_client = &local_var_configuration.client;
4076
4077 let local_var_uri_str = format!("{}/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", local_var_configuration.base_path, org=crate::apis::urlencode(org), secret_name=crate::apis::urlencode(secret_name), repository_id=repository_id);
4078 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
4079
4080 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4081 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4082 }
4083
4084 let local_var_req = local_var_req_builder.build()?;
4085 let local_var_resp = local_var_client.execute(local_var_req).await?;
4086
4087 let local_var_status = local_var_resp.status();
4088 let local_var_content = local_var_resp.text().await?;
4089
4090 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4091 Ok(())
4092 } else {
4093 let local_var_entity: Option<ActionsSlashRemoveSelectedRepoFromOrgSecretError> = serde_json::from_str(&local_var_content).ok();
4094 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4095 Err(Error::ResponseError(local_var_error))
4096 }
4097}
4098
4099pub async fn actions_slash_remove_selected_repo_from_org_variable(configuration: &configuration::Configuration, org: &str, name: &str, repository_id: i32) -> Result<(), Error<ActionsSlashRemoveSelectedRepoFromOrgVariableError>> {
4101 let local_var_configuration = configuration;
4102
4103 let local_var_client = &local_var_configuration.client;
4104
4105 let local_var_uri_str = format!("{}/orgs/{org}/actions/variables/{name}/repositories/{repository_id}", local_var_configuration.base_path, org=crate::apis::urlencode(org), name=crate::apis::urlencode(name), repository_id=repository_id);
4106 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
4107
4108 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4109 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4110 }
4111
4112 let local_var_req = local_var_req_builder.build()?;
4113 let local_var_resp = local_var_client.execute(local_var_req).await?;
4114
4115 let local_var_status = local_var_resp.status();
4116 let local_var_content = local_var_resp.text().await?;
4117
4118 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4119 Ok(())
4120 } else {
4121 let local_var_entity: Option<ActionsSlashRemoveSelectedRepoFromOrgVariableError> = serde_json::from_str(&local_var_content).ok();
4122 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4123 Err(Error::ResponseError(local_var_error))
4124 }
4125}
4126
4127pub async fn actions_slash_review_custom_gates_for_run(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32, actions_review_custom_gates_for_run_request: models::ActionsReviewCustomGatesForRunRequest) -> Result<(), Error<ActionsSlashReviewCustomGatesForRunError>> {
4129 let local_var_configuration = configuration;
4130
4131 let local_var_client = &local_var_configuration.client;
4132
4133 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
4134 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4135
4136 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4137 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4138 }
4139 local_var_req_builder = local_var_req_builder.json(&actions_review_custom_gates_for_run_request);
4140
4141 let local_var_req = local_var_req_builder.build()?;
4142 let local_var_resp = local_var_client.execute(local_var_req).await?;
4143
4144 let local_var_status = local_var_resp.status();
4145 let local_var_content = local_var_resp.text().await?;
4146
4147 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4148 Ok(())
4149 } else {
4150 let local_var_entity: Option<ActionsSlashReviewCustomGatesForRunError> = serde_json::from_str(&local_var_content).ok();
4151 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4152 Err(Error::ResponseError(local_var_error))
4153 }
4154}
4155
4156pub async fn actions_slash_review_pending_deployments_for_run(configuration: &configuration::Configuration, owner: &str, repo: &str, run_id: i32, actions_review_pending_deployments_for_run_request: models::ActionsReviewPendingDeploymentsForRunRequest) -> Result<Vec<models::Deployment>, Error<ActionsSlashReviewPendingDeploymentsForRunError>> {
4158 let local_var_configuration = configuration;
4159
4160 let local_var_client = &local_var_configuration.client;
4161
4162 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), run_id=run_id);
4163 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4164
4165 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4166 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4167 }
4168 local_var_req_builder = local_var_req_builder.json(&actions_review_pending_deployments_for_run_request);
4169
4170 let local_var_req = local_var_req_builder.build()?;
4171 let local_var_resp = local_var_client.execute(local_var_req).await?;
4172
4173 let local_var_status = local_var_resp.status();
4174 let local_var_content = local_var_resp.text().await?;
4175
4176 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4177 serde_json::from_str(&local_var_content).map_err(Error::from)
4178 } else {
4179 let local_var_entity: Option<ActionsSlashReviewPendingDeploymentsForRunError> = serde_json::from_str(&local_var_content).ok();
4180 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4181 Err(Error::ResponseError(local_var_error))
4182 }
4183}
4184
4185pub async fn actions_slash_set_allowed_actions_organization(configuration: &configuration::Configuration, org: &str, selected_actions: Option<models::SelectedActions>) -> Result<(), Error<ActionsSlashSetAllowedActionsOrganizationError>> {
4187 let local_var_configuration = configuration;
4188
4189 let local_var_client = &local_var_configuration.client;
4190
4191 let local_var_uri_str = format!("{}/orgs/{org}/actions/permissions/selected-actions", local_var_configuration.base_path, org=crate::apis::urlencode(org));
4192 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4193
4194 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4195 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4196 }
4197 local_var_req_builder = local_var_req_builder.json(&selected_actions);
4198
4199 let local_var_req = local_var_req_builder.build()?;
4200 let local_var_resp = local_var_client.execute(local_var_req).await?;
4201
4202 let local_var_status = local_var_resp.status();
4203 let local_var_content = local_var_resp.text().await?;
4204
4205 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4206 Ok(())
4207 } else {
4208 let local_var_entity: Option<ActionsSlashSetAllowedActionsOrganizationError> = serde_json::from_str(&local_var_content).ok();
4209 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4210 Err(Error::ResponseError(local_var_error))
4211 }
4212}
4213
4214pub async fn actions_slash_set_allowed_actions_repository(configuration: &configuration::Configuration, owner: &str, repo: &str, selected_actions: Option<models::SelectedActions>) -> Result<(), Error<ActionsSlashSetAllowedActionsRepositoryError>> {
4216 let local_var_configuration = configuration;
4217
4218 let local_var_client = &local_var_configuration.client;
4219
4220 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/permissions/selected-actions", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
4221 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4222
4223 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4224 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4225 }
4226 local_var_req_builder = local_var_req_builder.json(&selected_actions);
4227
4228 let local_var_req = local_var_req_builder.build()?;
4229 let local_var_resp = local_var_client.execute(local_var_req).await?;
4230
4231 let local_var_status = local_var_resp.status();
4232 let local_var_content = local_var_resp.text().await?;
4233
4234 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4235 Ok(())
4236 } else {
4237 let local_var_entity: Option<ActionsSlashSetAllowedActionsRepositoryError> = serde_json::from_str(&local_var_content).ok();
4238 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4239 Err(Error::ResponseError(local_var_error))
4240 }
4241}
4242
4243pub async fn actions_slash_set_custom_labels_for_self_hosted_runner_for_org(configuration: &configuration::Configuration, org: &str, runner_id: i32, actions_set_custom_labels_for_self_hosted_runner_for_org_request: models::ActionsSetCustomLabelsForSelfHostedRunnerForOrgRequest) -> Result<models::ActionsListLabelsForSelfHostedRunnerForOrg200Response, Error<ActionsSlashSetCustomLabelsForSelfHostedRunnerForOrgError>> {
4245 let local_var_configuration = configuration;
4246
4247 let local_var_client = &local_var_configuration.client;
4248
4249 let local_var_uri_str = format!("{}/orgs/{org}/actions/runners/{runner_id}/labels", local_var_configuration.base_path, org=crate::apis::urlencode(org), runner_id=runner_id);
4250 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4251
4252 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4253 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4254 }
4255 local_var_req_builder = local_var_req_builder.json(&actions_set_custom_labels_for_self_hosted_runner_for_org_request);
4256
4257 let local_var_req = local_var_req_builder.build()?;
4258 let local_var_resp = local_var_client.execute(local_var_req).await?;
4259
4260 let local_var_status = local_var_resp.status();
4261 let local_var_content = local_var_resp.text().await?;
4262
4263 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4264 serde_json::from_str(&local_var_content).map_err(Error::from)
4265 } else {
4266 let local_var_entity: Option<ActionsSlashSetCustomLabelsForSelfHostedRunnerForOrgError> = serde_json::from_str(&local_var_content).ok();
4267 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4268 Err(Error::ResponseError(local_var_error))
4269 }
4270}
4271
4272pub async fn actions_slash_set_custom_labels_for_self_hosted_runner_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str, runner_id: i32, actions_set_custom_labels_for_self_hosted_runner_for_org_request: models::ActionsSetCustomLabelsForSelfHostedRunnerForOrgRequest) -> Result<models::ActionsListLabelsForSelfHostedRunnerForOrg200Response, Error<ActionsSlashSetCustomLabelsForSelfHostedRunnerForRepoError>> {
4274 let local_var_configuration = configuration;
4275
4276 let local_var_client = &local_var_configuration.client;
4277
4278 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), runner_id=runner_id);
4279 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4280
4281 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4282 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4283 }
4284 local_var_req_builder = local_var_req_builder.json(&actions_set_custom_labels_for_self_hosted_runner_for_org_request);
4285
4286 let local_var_req = local_var_req_builder.build()?;
4287 let local_var_resp = local_var_client.execute(local_var_req).await?;
4288
4289 let local_var_status = local_var_resp.status();
4290 let local_var_content = local_var_resp.text().await?;
4291
4292 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4293 serde_json::from_str(&local_var_content).map_err(Error::from)
4294 } else {
4295 let local_var_entity: Option<ActionsSlashSetCustomLabelsForSelfHostedRunnerForRepoError> = serde_json::from_str(&local_var_content).ok();
4296 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4297 Err(Error::ResponseError(local_var_error))
4298 }
4299}
4300
4301pub async fn actions_slash_set_custom_oidc_sub_claim_for_repo(configuration: &configuration::Configuration, owner: &str, repo: &str, actions_oidc_subject_customization_for_a_repository: models::ActionsOidcSubjectCustomizationForARepository) -> Result<serde_json::Value, Error<ActionsSlashSetCustomOidcSubClaimForRepoError>> {
4303 let local_var_configuration = configuration;
4304
4305 let local_var_client = &local_var_configuration.client;
4306
4307 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/oidc/customization/sub", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
4308 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4309
4310 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4311 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4312 }
4313 local_var_req_builder = local_var_req_builder.json(&actions_oidc_subject_customization_for_a_repository);
4314
4315 let local_var_req = local_var_req_builder.build()?;
4316 let local_var_resp = local_var_client.execute(local_var_req).await?;
4317
4318 let local_var_status = local_var_resp.status();
4319 let local_var_content = local_var_resp.text().await?;
4320
4321 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4322 serde_json::from_str(&local_var_content).map_err(Error::from)
4323 } else {
4324 let local_var_entity: Option<ActionsSlashSetCustomOidcSubClaimForRepoError> = serde_json::from_str(&local_var_content).ok();
4325 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4326 Err(Error::ResponseError(local_var_error))
4327 }
4328}
4329
4330pub async fn actions_slash_set_github_actions_default_workflow_permissions_organization(configuration: &configuration::Configuration, org: &str, actions_set_default_workflow_permissions: Option<models::ActionsSetDefaultWorkflowPermissions>) -> Result<(), Error<ActionsSlashSetGithubActionsDefaultWorkflowPermissionsOrganizationError>> {
4332 let local_var_configuration = configuration;
4333
4334 let local_var_client = &local_var_configuration.client;
4335
4336 let local_var_uri_str = format!("{}/orgs/{org}/actions/permissions/workflow", local_var_configuration.base_path, org=crate::apis::urlencode(org));
4337 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4338
4339 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4340 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4341 }
4342 local_var_req_builder = local_var_req_builder.json(&actions_set_default_workflow_permissions);
4343
4344 let local_var_req = local_var_req_builder.build()?;
4345 let local_var_resp = local_var_client.execute(local_var_req).await?;
4346
4347 let local_var_status = local_var_resp.status();
4348 let local_var_content = local_var_resp.text().await?;
4349
4350 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4351 Ok(())
4352 } else {
4353 let local_var_entity: Option<ActionsSlashSetGithubActionsDefaultWorkflowPermissionsOrganizationError> = serde_json::from_str(&local_var_content).ok();
4354 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4355 Err(Error::ResponseError(local_var_error))
4356 }
4357}
4358
4359pub async fn actions_slash_set_github_actions_default_workflow_permissions_repository(configuration: &configuration::Configuration, owner: &str, repo: &str, actions_set_default_workflow_permissions: models::ActionsSetDefaultWorkflowPermissions) -> Result<(), Error<ActionsSlashSetGithubActionsDefaultWorkflowPermissionsRepositoryError>> {
4361 let local_var_configuration = configuration;
4362
4363 let local_var_client = &local_var_configuration.client;
4364
4365 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/permissions/workflow", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
4366 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4367
4368 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4369 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4370 }
4371 local_var_req_builder = local_var_req_builder.json(&actions_set_default_workflow_permissions);
4372
4373 let local_var_req = local_var_req_builder.build()?;
4374 let local_var_resp = local_var_client.execute(local_var_req).await?;
4375
4376 let local_var_status = local_var_resp.status();
4377 let local_var_content = local_var_resp.text().await?;
4378
4379 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4380 Ok(())
4381 } else {
4382 let local_var_entity: Option<ActionsSlashSetGithubActionsDefaultWorkflowPermissionsRepositoryError> = serde_json::from_str(&local_var_content).ok();
4383 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4384 Err(Error::ResponseError(local_var_error))
4385 }
4386}
4387
4388pub async fn actions_slash_set_github_actions_permissions_organization(configuration: &configuration::Configuration, org: &str, actions_set_github_actions_permissions_organization_request: models::ActionsSetGithubActionsPermissionsOrganizationRequest) -> Result<(), Error<ActionsSlashSetGithubActionsPermissionsOrganizationError>> {
4390 let local_var_configuration = configuration;
4391
4392 let local_var_client = &local_var_configuration.client;
4393
4394 let local_var_uri_str = format!("{}/orgs/{org}/actions/permissions", local_var_configuration.base_path, org=crate::apis::urlencode(org));
4395 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4396
4397 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4398 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4399 }
4400 local_var_req_builder = local_var_req_builder.json(&actions_set_github_actions_permissions_organization_request);
4401
4402 let local_var_req = local_var_req_builder.build()?;
4403 let local_var_resp = local_var_client.execute(local_var_req).await?;
4404
4405 let local_var_status = local_var_resp.status();
4406 let local_var_content = local_var_resp.text().await?;
4407
4408 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4409 Ok(())
4410 } else {
4411 let local_var_entity: Option<ActionsSlashSetGithubActionsPermissionsOrganizationError> = serde_json::from_str(&local_var_content).ok();
4412 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4413 Err(Error::ResponseError(local_var_error))
4414 }
4415}
4416
4417pub async fn actions_slash_set_github_actions_permissions_repository(configuration: &configuration::Configuration, owner: &str, repo: &str, actions_set_github_actions_permissions_repository_request: models::ActionsSetGithubActionsPermissionsRepositoryRequest) -> Result<(), Error<ActionsSlashSetGithubActionsPermissionsRepositoryError>> {
4419 let local_var_configuration = configuration;
4420
4421 let local_var_client = &local_var_configuration.client;
4422
4423 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/permissions", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
4424 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4425
4426 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4427 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4428 }
4429 local_var_req_builder = local_var_req_builder.json(&actions_set_github_actions_permissions_repository_request);
4430
4431 let local_var_req = local_var_req_builder.build()?;
4432 let local_var_resp = local_var_client.execute(local_var_req).await?;
4433
4434 let local_var_status = local_var_resp.status();
4435 let local_var_content = local_var_resp.text().await?;
4436
4437 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4438 Ok(())
4439 } else {
4440 let local_var_entity: Option<ActionsSlashSetGithubActionsPermissionsRepositoryError> = serde_json::from_str(&local_var_content).ok();
4441 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4442 Err(Error::ResponseError(local_var_error))
4443 }
4444}
4445
4446pub async fn actions_slash_set_selected_repos_for_org_secret(configuration: &configuration::Configuration, org: &str, secret_name: &str, actions_set_selected_repos_for_org_secret_request: models::ActionsSetSelectedReposForOrgSecretRequest) -> Result<(), Error<ActionsSlashSetSelectedReposForOrgSecretError>> {
4448 let local_var_configuration = configuration;
4449
4450 let local_var_client = &local_var_configuration.client;
4451
4452 let local_var_uri_str = format!("{}/orgs/{org}/actions/secrets/{secret_name}/repositories", local_var_configuration.base_path, org=crate::apis::urlencode(org), secret_name=crate::apis::urlencode(secret_name));
4453 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4454
4455 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4456 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4457 }
4458 local_var_req_builder = local_var_req_builder.json(&actions_set_selected_repos_for_org_secret_request);
4459
4460 let local_var_req = local_var_req_builder.build()?;
4461 let local_var_resp = local_var_client.execute(local_var_req).await?;
4462
4463 let local_var_status = local_var_resp.status();
4464 let local_var_content = local_var_resp.text().await?;
4465
4466 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4467 Ok(())
4468 } else {
4469 let local_var_entity: Option<ActionsSlashSetSelectedReposForOrgSecretError> = serde_json::from_str(&local_var_content).ok();
4470 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4471 Err(Error::ResponseError(local_var_error))
4472 }
4473}
4474
4475pub async fn actions_slash_set_selected_repos_for_org_variable(configuration: &configuration::Configuration, org: &str, name: &str, actions_set_selected_repos_for_org_variable_request: models::ActionsSetSelectedReposForOrgVariableRequest) -> Result<(), Error<ActionsSlashSetSelectedReposForOrgVariableError>> {
4477 let local_var_configuration = configuration;
4478
4479 let local_var_client = &local_var_configuration.client;
4480
4481 let local_var_uri_str = format!("{}/orgs/{org}/actions/variables/{name}/repositories", local_var_configuration.base_path, org=crate::apis::urlencode(org), name=crate::apis::urlencode(name));
4482 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4483
4484 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4485 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4486 }
4487 local_var_req_builder = local_var_req_builder.json(&actions_set_selected_repos_for_org_variable_request);
4488
4489 let local_var_req = local_var_req_builder.build()?;
4490 let local_var_resp = local_var_client.execute(local_var_req).await?;
4491
4492 let local_var_status = local_var_resp.status();
4493 let local_var_content = local_var_resp.text().await?;
4494
4495 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4496 Ok(())
4497 } else {
4498 let local_var_entity: Option<ActionsSlashSetSelectedReposForOrgVariableError> = serde_json::from_str(&local_var_content).ok();
4499 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4500 Err(Error::ResponseError(local_var_error))
4501 }
4502}
4503
4504pub async fn actions_slash_set_selected_repositories_enabled_github_actions_organization(configuration: &configuration::Configuration, org: &str, actions_set_selected_repositories_enabled_github_actions_organization_request: models::ActionsSetSelectedRepositoriesEnabledGithubActionsOrganizationRequest) -> Result<(), Error<ActionsSlashSetSelectedRepositoriesEnabledGithubActionsOrganizationError>> {
4506 let local_var_configuration = configuration;
4507
4508 let local_var_client = &local_var_configuration.client;
4509
4510 let local_var_uri_str = format!("{}/orgs/{org}/actions/permissions/repositories", local_var_configuration.base_path, org=crate::apis::urlencode(org));
4511 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4512
4513 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4514 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4515 }
4516 local_var_req_builder = local_var_req_builder.json(&actions_set_selected_repositories_enabled_github_actions_organization_request);
4517
4518 let local_var_req = local_var_req_builder.build()?;
4519 let local_var_resp = local_var_client.execute(local_var_req).await?;
4520
4521 let local_var_status = local_var_resp.status();
4522 let local_var_content = local_var_resp.text().await?;
4523
4524 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4525 Ok(())
4526 } else {
4527 let local_var_entity: Option<ActionsSlashSetSelectedRepositoriesEnabledGithubActionsOrganizationError> = serde_json::from_str(&local_var_content).ok();
4528 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4529 Err(Error::ResponseError(local_var_error))
4530 }
4531}
4532
4533pub async fn actions_slash_set_workflow_access_to_repository(configuration: &configuration::Configuration, owner: &str, repo: &str, actions_workflow_access_to_repository: models::ActionsWorkflowAccessToRepository) -> Result<(), Error<ActionsSlashSetWorkflowAccessToRepositoryError>> {
4535 let local_var_configuration = configuration;
4536
4537 let local_var_client = &local_var_configuration.client;
4538
4539 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/permissions/access", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo));
4540 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4541
4542 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4543 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4544 }
4545 local_var_req_builder = local_var_req_builder.json(&actions_workflow_access_to_repository);
4546
4547 let local_var_req = local_var_req_builder.build()?;
4548 let local_var_resp = local_var_client.execute(local_var_req).await?;
4549
4550 let local_var_status = local_var_resp.status();
4551 let local_var_content = local_var_resp.text().await?;
4552
4553 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4554 Ok(())
4555 } else {
4556 let local_var_entity: Option<ActionsSlashSetWorkflowAccessToRepositoryError> = serde_json::from_str(&local_var_content).ok();
4557 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4558 Err(Error::ResponseError(local_var_error))
4559 }
4560}
4561
4562pub async fn actions_slash_update_environment_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str, environment_name: &str, actions_update_repo_variable_request: models::ActionsUpdateRepoVariableRequest) -> Result<(), Error<ActionsSlashUpdateEnvironmentVariableError>> {
4564 let local_var_configuration = configuration;
4565
4566 let local_var_client = &local_var_configuration.client;
4567
4568 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/environments/{environment_name}/variables/{name}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), name=crate::apis::urlencode(name), environment_name=crate::apis::urlencode(environment_name));
4569 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
4570
4571 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4572 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4573 }
4574 local_var_req_builder = local_var_req_builder.json(&actions_update_repo_variable_request);
4575
4576 let local_var_req = local_var_req_builder.build()?;
4577 let local_var_resp = local_var_client.execute(local_var_req).await?;
4578
4579 let local_var_status = local_var_resp.status();
4580 let local_var_content = local_var_resp.text().await?;
4581
4582 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4583 Ok(())
4584 } else {
4585 let local_var_entity: Option<ActionsSlashUpdateEnvironmentVariableError> = serde_json::from_str(&local_var_content).ok();
4586 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4587 Err(Error::ResponseError(local_var_error))
4588 }
4589}
4590
4591pub async fn actions_slash_update_org_variable(configuration: &configuration::Configuration, org: &str, name: &str, actions_update_org_variable_request: models::ActionsUpdateOrgVariableRequest) -> Result<(), Error<ActionsSlashUpdateOrgVariableError>> {
4593 let local_var_configuration = configuration;
4594
4595 let local_var_client = &local_var_configuration.client;
4596
4597 let local_var_uri_str = format!("{}/orgs/{org}/actions/variables/{name}", local_var_configuration.base_path, org=crate::apis::urlencode(org), name=crate::apis::urlencode(name));
4598 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
4599
4600 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4601 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4602 }
4603 local_var_req_builder = local_var_req_builder.json(&actions_update_org_variable_request);
4604
4605 let local_var_req = local_var_req_builder.build()?;
4606 let local_var_resp = local_var_client.execute(local_var_req).await?;
4607
4608 let local_var_status = local_var_resp.status();
4609 let local_var_content = local_var_resp.text().await?;
4610
4611 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4612 Ok(())
4613 } else {
4614 let local_var_entity: Option<ActionsSlashUpdateOrgVariableError> = serde_json::from_str(&local_var_content).ok();
4615 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4616 Err(Error::ResponseError(local_var_error))
4617 }
4618}
4619
4620pub async fn actions_slash_update_repo_variable(configuration: &configuration::Configuration, owner: &str, repo: &str, name: &str, actions_update_repo_variable_request: models::ActionsUpdateRepoVariableRequest) -> Result<(), Error<ActionsSlashUpdateRepoVariableError>> {
4622 let local_var_configuration = configuration;
4623
4624 let local_var_client = &local_var_configuration.client;
4625
4626 let local_var_uri_str = format!("{}/repos/{owner}/{repo}/actions/variables/{name}", local_var_configuration.base_path, owner=crate::apis::urlencode(owner), repo=crate::apis::urlencode(repo), name=crate::apis::urlencode(name));
4627 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
4628
4629 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4630 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4631 }
4632 local_var_req_builder = local_var_req_builder.json(&actions_update_repo_variable_request);
4633
4634 let local_var_req = local_var_req_builder.build()?;
4635 let local_var_resp = local_var_client.execute(local_var_req).await?;
4636
4637 let local_var_status = local_var_resp.status();
4638 let local_var_content = local_var_resp.text().await?;
4639
4640 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4641 Ok(())
4642 } else {
4643 let local_var_entity: Option<ActionsSlashUpdateRepoVariableError> = serde_json::from_str(&local_var_content).ok();
4644 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4645 Err(Error::ResponseError(local_var_error))
4646 }
4647}
4648