1use std::borrow::Borrow;
12#[allow(unused_imports)]
13use std::option::Option;
14use std::pin::Pin;
15use std::sync::Arc;
16
17use futures::Future;
18use hyper;
19use hyper_util::client::legacy::connect::Connect;
20
21use super::request as __internal_request;
22use super::{configuration, Error};
23use crate::models;
24
25pub struct ContainersApiClient<C: Connect>
26where
27 C: Clone + std::marker::Send + Sync + 'static,
28{
29 configuration: Arc<configuration::Configuration<C>>,
30}
31
32impl<C: Connect> ContainersApiClient<C>
33where
34 C: Clone + std::marker::Send + Sync,
35{
36 pub fn new(configuration: Arc<configuration::Configuration<C>>) -> ContainersApiClient<C> {
37 ContainersApiClient { configuration }
38 }
39}
40
41pub trait ContainersApi: Send + Sync {
42 fn container_attach_libpod(
43 &self,
44 name: &str,
45 detach_keys: Option<&str>,
46 logs: Option<bool>,
47 stream: Option<bool>,
48 stdout: Option<bool>,
49 stderr: Option<bool>,
50 stdin: Option<bool>,
51 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
52 fn container_changes_libpod(
53 &self,
54 name: &str,
55 parent: Option<&str>,
56 diff_type: Option<&str>,
57 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
58 fn container_checkpoint_libpod(
59 &self,
60 name: &str,
61 keep: Option<bool>,
62 leave_running: Option<bool>,
63 tcp_established: Option<bool>,
64 export: Option<bool>,
65 ignore_root_fs: Option<bool>,
66 ignore_volumes: Option<bool>,
67 pre_checkpoint: Option<bool>,
68 with_previous: Option<bool>,
69 file_locks: Option<bool>,
70 print_stats: Option<bool>,
71 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
72 fn container_create_libpod(
73 &self,
74 create: models::SpecGenerator,
75 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerCreateResponse, Error>> + Send>>;
76 fn container_delete_libpod(
77 &self,
78 name: &str,
79 depend: Option<bool>,
80 force: Option<bool>,
81 ignore: Option<bool>,
82 timeout: Option<i32>,
83 v: Option<bool>,
84 ) -> Pin<Box<dyn Future<Output = Result<Vec<models::LibpodContainersRmReport>, Error>> + Send>>;
85 fn container_exists_libpod(
86 &self,
87 name: &str,
88 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
89 fn container_export_libpod(
90 &self,
91 name: &str,
92 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
93 fn container_healthcheck_libpod(
94 &self,
95 name: &str,
96 ) -> Pin<Box<dyn Future<Output = Result<models::HealthCheckResults, Error>> + Send>>;
97 fn container_init_libpod(
98 &self,
99 name: &str,
100 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
101 fn container_inspect_libpod(
102 &self,
103 name: &str,
104 size: Option<bool>,
105 ) -> Pin<Box<dyn Future<Output = Result<models::InspectContainerData, Error>> + Send>>;
106 fn container_kill_libpod(
107 &self,
108 name: &str,
109 signal: Option<&str>,
110 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
111 fn container_list_libpod(
112 &self,
113 all: Option<bool>,
114 limit: Option<i32>,
115 namespace: Option<bool>,
116 pod: Option<bool>,
117 size: Option<bool>,
118 sync: Option<bool>,
119 filters: Option<&str>,
120 ) -> Pin<Box<dyn Future<Output = Result<Vec<models::ListContainer>, Error>> + Send>>;
121 fn container_logs_libpod(
122 &self,
123 name: &str,
124 follow: Option<bool>,
125 stdout: Option<bool>,
126 stderr: Option<bool>,
127 since: Option<&str>,
128 until: Option<&str>,
129 timestamps: Option<bool>,
130 tail: Option<&str>,
131 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
132 fn container_mount_libpod(
133 &self,
134 name: &str,
135 ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send>>;
136 fn container_pause_libpod(
137 &self,
138 name: &str,
139 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
140 fn container_prune_libpod(
141 &self,
142 filters: Option<&str>,
143 ) -> Pin<Box<dyn Future<Output = Result<Vec<models::ContainersPruneReportLibpod>, Error>> + Send>>;
144 fn container_rename_libpod(
145 &self,
146 name: &str,
147 name2: &str,
148 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
149 fn container_resize_libpod(
150 &self,
151 name: &str,
152 h: Option<i32>,
153 w: Option<i32>,
154 ) -> Pin<Box<dyn Future<Output = Result<serde_json::Value, Error>> + Send>>;
155 fn container_restart_libpod(
156 &self,
157 name: &str,
158 t: Option<i32>,
159 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
160 fn container_restore_libpod(
161 &self,
162 name: &str,
163 name2: Option<&str>,
164 keep: Option<bool>,
165 tcp_established: Option<bool>,
166 import: Option<bool>,
167 ignore_root_fs: Option<bool>,
168 ignore_volumes: Option<bool>,
169 ignore_static_ip: Option<bool>,
170 ignore_static_mac: Option<bool>,
171 file_locks: Option<bool>,
172 print_stats: Option<bool>,
173 pod: Option<&str>,
174 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
175 fn container_show_mounted_libpod(
176 &self,
177 ) -> Pin<
178 Box<dyn Future<Output = Result<std::collections::HashMap<String, String>, Error>> + Send>,
179 >;
180 fn container_start_libpod(
181 &self,
182 name: &str,
183 detach_keys: Option<&str>,
184 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
185 fn container_stats_libpod(
186 &self,
187 name: &str,
188 stream: Option<bool>,
189 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
190 fn container_stop_libpod(
191 &self,
192 name: &str,
193 timeout: Option<i32>,
194 ignore: Option<bool>,
195 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
196 fn container_top_libpod(
197 &self,
198 name: &str,
199 stream: Option<bool>,
200 delay: Option<i32>,
201 ps_args: Option<Vec<String>>,
202 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerTopOkBody, Error>> + Send>>;
203 fn container_unmount_libpod(
204 &self,
205 name: &str,
206 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
207 fn container_unpause_libpod(
208 &self,
209 name: &str,
210 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
211 fn container_update_libpod(
212 &self,
213 name: &str,
214 restart_policy: Option<&str>,
215 restart_retries: Option<i32>,
216 config: Option<models::UpdateEntities>,
217 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
218 fn container_wait_libpod(
219 &self,
220 name: &str,
221 condition: Option<Vec<String>>,
222 interval: Option<&str>,
223 ) -> Pin<Box<dyn Future<Output = Result<i32, Error>> + Send>>;
224 fn containers_stats_all_libpod(
225 &self,
226 containers: Option<Vec<String>>,
227 stream: Option<bool>,
228 interval: Option<i32>,
229 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerStats, Error>> + Send>>;
230 fn generate_kube_libpod(
231 &self,
232 names: Vec<String>,
233 service: Option<bool>,
234 r#type: Option<&str>,
235 replicas: Option<i32>,
236 no_trunc: Option<bool>,
237 podman_only: Option<bool>,
238 ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>>;
239 fn generate_systemd_libpod(
240 &self,
241 name: &str,
242 use_name: Option<bool>,
243 new: Option<bool>,
244 no_header: Option<bool>,
245 start_timeout: Option<i32>,
246 stop_timeout: Option<i32>,
247 restart_policy: Option<&str>,
248 container_prefix: Option<&str>,
249 pod_prefix: Option<&str>,
250 separator: Option<&str>,
251 restart_sec: Option<i32>,
252 wants: Option<Vec<String>>,
253 after: Option<Vec<String>>,
254 requires: Option<Vec<String>>,
255 additional_env_variables: Option<Vec<String>>,
256 ) -> Pin<
257 Box<dyn Future<Output = Result<std::collections::HashMap<String, String>, Error>> + Send>,
258 >;
259 fn image_commit_libpod(
260 &self,
261 container: &str,
262 author: Option<&str>,
263 changes: Option<Vec<String>>,
264 comment: Option<&str>,
265 format: Option<&str>,
266 pause: Option<bool>,
267 squash: Option<bool>,
268 repo: Option<&str>,
269 stream: Option<bool>,
270 tag: Option<&str>,
271 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
272 fn kube_apply_libpod(
273 &self,
274 ca_cert_file: Option<&str>,
275 kube_config: Option<&str>,
276 namespace: Option<&str>,
277 service: Option<bool>,
278 file: Option<&str>,
279 request: Option<&str>,
280 ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>>;
281 fn play_kube_down_libpod(
282 &self,
283 force: Option<bool>,
284 ) -> Pin<Box<dyn Future<Output = Result<models::PlayKubeReport, Error>> + Send>>;
285 fn play_kube_libpod(
286 &self,
287 annotations: Option<&str>,
288 log_driver: Option<&str>,
289 log_options: Option<Vec<String>>,
290 network: Option<Vec<String>>,
291 no_hosts: Option<bool>,
292 no_trunc: Option<bool>,
293 publish_ports: Option<Vec<String>>,
294 publish_all_ports: Option<bool>,
295 replace: Option<bool>,
296 service_container: Option<bool>,
297 start: Option<bool>,
298 static_ips: Option<Vec<String>>,
299 static_macs: Option<Vec<String>>,
300 tls_verify: Option<bool>,
301 userns: Option<&str>,
302 wait: Option<bool>,
303 request: Option<&str>,
304 ) -> Pin<Box<dyn Future<Output = Result<models::PlayKubeReport, Error>> + Send>>;
305 fn put_container_archive_libpod(
306 &self,
307 name: &str,
308 path: &str,
309 pause: Option<bool>,
310 request: Option<&str>,
311 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
312}
313
314impl<C: Connect> ContainersApi for ContainersApiClient<C>
315where
316 C: Clone + std::marker::Send + Sync,
317{
318 #[allow(unused_mut)]
319 fn container_attach_libpod(
320 &self,
321 name: &str,
322 detach_keys: Option<&str>,
323 logs: Option<bool>,
324 stream: Option<bool>,
325 stdout: Option<bool>,
326 stderr: Option<bool>,
327 stdin: Option<bool>,
328 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
329 let mut req = __internal_request::Request::new(
330 hyper::Method::POST,
331 "/libpod/containers/{name}/attach".to_string(),
332 );
333 if let Some(ref s) = detach_keys {
334 let query_value = s.to_string();
335 req = req.with_query_param("detachKeys".to_string(), query_value);
336 }
337 if let Some(ref s) = logs {
338 let query_value = s.to_string();
339 req = req.with_query_param("logs".to_string(), query_value);
340 }
341 if let Some(ref s) = stream {
342 let query_value = s.to_string();
343 req = req.with_query_param("stream".to_string(), query_value);
344 }
345 if let Some(ref s) = stdout {
346 let query_value = s.to_string();
347 req = req.with_query_param("stdout".to_string(), query_value);
348 }
349 if let Some(ref s) = stderr {
350 let query_value = s.to_string();
351 req = req.with_query_param("stderr".to_string(), query_value);
352 }
353 if let Some(ref s) = stdin {
354 let query_value = s.to_string();
355 req = req.with_query_param("stdin".to_string(), query_value);
356 }
357 req = req.with_path_param("name".to_string(), name.to_string());
358 req = req.returns_nothing();
359
360 req.execute(self.configuration.borrow())
361 }
362
363 #[allow(unused_mut)]
364 fn container_changes_libpod(
365 &self,
366 name: &str,
367 parent: Option<&str>,
368 diff_type: Option<&str>,
369 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
370 let mut req = __internal_request::Request::new(
371 hyper::Method::GET,
372 "/libpod/containers/{name}/changes".to_string(),
373 );
374 if let Some(ref s) = parent {
375 let query_value = s.to_string();
376 req = req.with_query_param("parent".to_string(), query_value);
377 }
378 if let Some(ref s) = diff_type {
379 let query_value = s.to_string();
380 req = req.with_query_param("diffType".to_string(), query_value);
381 }
382 req = req.with_path_param("name".to_string(), name.to_string());
383 req = req.returns_nothing();
384
385 req.execute(self.configuration.borrow())
386 }
387
388 #[allow(unused_mut)]
389 fn container_checkpoint_libpod(
390 &self,
391 name: &str,
392 keep: Option<bool>,
393 leave_running: Option<bool>,
394 tcp_established: Option<bool>,
395 export: Option<bool>,
396 ignore_root_fs: Option<bool>,
397 ignore_volumes: Option<bool>,
398 pre_checkpoint: Option<bool>,
399 with_previous: Option<bool>,
400 file_locks: Option<bool>,
401 print_stats: Option<bool>,
402 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
403 let mut req = __internal_request::Request::new(
404 hyper::Method::POST,
405 "/libpod/containers/{name}/checkpoint".to_string(),
406 );
407 if let Some(ref s) = keep {
408 let query_value = s.to_string();
409 req = req.with_query_param("keep".to_string(), query_value);
410 }
411 if let Some(ref s) = leave_running {
412 let query_value = s.to_string();
413 req = req.with_query_param("leaveRunning".to_string(), query_value);
414 }
415 if let Some(ref s) = tcp_established {
416 let query_value = s.to_string();
417 req = req.with_query_param("tcpEstablished".to_string(), query_value);
418 }
419 if let Some(ref s) = export {
420 let query_value = s.to_string();
421 req = req.with_query_param("export".to_string(), query_value);
422 }
423 if let Some(ref s) = ignore_root_fs {
424 let query_value = s.to_string();
425 req = req.with_query_param("ignoreRootFS".to_string(), query_value);
426 }
427 if let Some(ref s) = ignore_volumes {
428 let query_value = s.to_string();
429 req = req.with_query_param("ignoreVolumes".to_string(), query_value);
430 }
431 if let Some(ref s) = pre_checkpoint {
432 let query_value = s.to_string();
433 req = req.with_query_param("preCheckpoint".to_string(), query_value);
434 }
435 if let Some(ref s) = with_previous {
436 let query_value = s.to_string();
437 req = req.with_query_param("withPrevious".to_string(), query_value);
438 }
439 if let Some(ref s) = file_locks {
440 let query_value = s.to_string();
441 req = req.with_query_param("fileLocks".to_string(), query_value);
442 }
443 if let Some(ref s) = print_stats {
444 let query_value = s.to_string();
445 req = req.with_query_param("printStats".to_string(), query_value);
446 }
447 req = req.with_path_param("name".to_string(), name.to_string());
448 req = req.returns_nothing();
449
450 req.execute(self.configuration.borrow())
451 }
452
453 #[allow(unused_mut)]
454 fn container_create_libpod(
455 &self,
456 create: models::SpecGenerator,
457 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerCreateResponse, Error>> + Send>> {
458 let mut req = __internal_request::Request::new(
459 hyper::Method::POST,
460 "/libpod/containers/create".to_string(),
461 );
462 req = req.with_body_param(create);
463
464 req.execute(self.configuration.borrow())
465 }
466
467 #[allow(unused_mut)]
468 fn container_delete_libpod(
469 &self,
470 name: &str,
471 depend: Option<bool>,
472 force: Option<bool>,
473 ignore: Option<bool>,
474 timeout: Option<i32>,
475 v: Option<bool>,
476 ) -> Pin<Box<dyn Future<Output = Result<Vec<models::LibpodContainersRmReport>, Error>> + Send>>
477 {
478 let mut req = __internal_request::Request::new(
479 hyper::Method::DELETE,
480 "/libpod/containers/{name}".to_string(),
481 );
482 if let Some(ref s) = depend {
483 let query_value = s.to_string();
484 req = req.with_query_param("depend".to_string(), query_value);
485 }
486 if let Some(ref s) = force {
487 let query_value = s.to_string();
488 req = req.with_query_param("force".to_string(), query_value);
489 }
490 if let Some(ref s) = ignore {
491 let query_value = s.to_string();
492 req = req.with_query_param("ignore".to_string(), query_value);
493 }
494 if let Some(ref s) = timeout {
495 let query_value = s.to_string();
496 req = req.with_query_param("timeout".to_string(), query_value);
497 }
498 if let Some(ref s) = v {
499 let query_value = s.to_string();
500 req = req.with_query_param("v".to_string(), query_value);
501 }
502 req = req.with_path_param("name".to_string(), name.to_string());
503
504 req.execute(self.configuration.borrow())
505 }
506
507 #[allow(unused_mut)]
508 fn container_exists_libpod(
509 &self,
510 name: &str,
511 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
512 let mut req = __internal_request::Request::new(
513 hyper::Method::GET,
514 "/libpod/containers/{name}/exists".to_string(),
515 );
516 req = req.with_path_param("name".to_string(), name.to_string());
517 req = req.returns_nothing();
518
519 req.execute(self.configuration.borrow())
520 }
521
522 #[allow(unused_mut)]
523 fn container_export_libpod(
524 &self,
525 name: &str,
526 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
527 let mut req = __internal_request::Request::new(
528 hyper::Method::GET,
529 "/libpod/containers/{name}/export".to_string(),
530 );
531 req = req.with_path_param("name".to_string(), name.to_string());
532 req = req.returns_nothing();
533
534 req.execute(self.configuration.borrow())
535 }
536
537 #[allow(unused_mut)]
538 fn container_healthcheck_libpod(
539 &self,
540 name: &str,
541 ) -> Pin<Box<dyn Future<Output = Result<models::HealthCheckResults, Error>> + Send>> {
542 let mut req = __internal_request::Request::new(
543 hyper::Method::GET,
544 "/libpod/containers/{name}/healthcheck".to_string(),
545 );
546 req = req.with_path_param("name".to_string(), name.to_string());
547
548 req.execute(self.configuration.borrow())
549 }
550
551 #[allow(unused_mut)]
552 fn container_init_libpod(
553 &self,
554 name: &str,
555 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
556 let mut req = __internal_request::Request::new(
557 hyper::Method::POST,
558 "/libpod/containers/{name}/init".to_string(),
559 );
560 req = req.with_path_param("name".to_string(), name.to_string());
561 req = req.returns_nothing();
562
563 req.execute(self.configuration.borrow())
564 }
565
566 #[allow(unused_mut)]
567 fn container_inspect_libpod(
568 &self,
569 name: &str,
570 size: Option<bool>,
571 ) -> Pin<Box<dyn Future<Output = Result<models::InspectContainerData, Error>> + Send>> {
572 let mut req = __internal_request::Request::new(
573 hyper::Method::GET,
574 "/libpod/containers/{name}/json".to_string(),
575 );
576 if let Some(ref s) = size {
577 let query_value = s.to_string();
578 req = req.with_query_param("size".to_string(), query_value);
579 }
580 req = req.with_path_param("name".to_string(), name.to_string());
581
582 req.execute(self.configuration.borrow())
583 }
584
585 #[allow(unused_mut)]
586 fn container_kill_libpod(
587 &self,
588 name: &str,
589 signal: Option<&str>,
590 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
591 let mut req = __internal_request::Request::new(
592 hyper::Method::POST,
593 "/libpod/containers/{name}/kill".to_string(),
594 );
595 if let Some(ref s) = signal {
596 let query_value = s.to_string();
597 req = req.with_query_param("signal".to_string(), query_value);
598 }
599 req = req.with_path_param("name".to_string(), name.to_string());
600 req = req.returns_nothing();
601
602 req.execute(self.configuration.borrow())
603 }
604
605 #[allow(unused_mut)]
606 fn container_list_libpod(
607 &self,
608 all: Option<bool>,
609 limit: Option<i32>,
610 namespace: Option<bool>,
611 pod: Option<bool>,
612 size: Option<bool>,
613 sync: Option<bool>,
614 filters: Option<&str>,
615 ) -> Pin<Box<dyn Future<Output = Result<Vec<models::ListContainer>, Error>> + Send>> {
616 let mut req = __internal_request::Request::new(
617 hyper::Method::GET,
618 "/libpod/containers/json".to_string(),
619 );
620 if let Some(ref s) = all {
621 let query_value = s.to_string();
622 req = req.with_query_param("all".to_string(), query_value);
623 }
624 if let Some(ref s) = limit {
625 let query_value = s.to_string();
626 req = req.with_query_param("limit".to_string(), query_value);
627 }
628 if let Some(ref s) = namespace {
629 let query_value = s.to_string();
630 req = req.with_query_param("namespace".to_string(), query_value);
631 }
632 if let Some(ref s) = pod {
633 let query_value = s.to_string();
634 req = req.with_query_param("pod".to_string(), query_value);
635 }
636 if let Some(ref s) = size {
637 let query_value = s.to_string();
638 req = req.with_query_param("size".to_string(), query_value);
639 }
640 if let Some(ref s) = sync {
641 let query_value = s.to_string();
642 req = req.with_query_param("sync".to_string(), query_value);
643 }
644 if let Some(ref s) = filters {
645 let query_value = s.to_string();
646 req = req.with_query_param("filters".to_string(), query_value);
647 }
648
649 req.execute(self.configuration.borrow())
650 }
651
652 #[allow(unused_mut)]
653 fn container_logs_libpod(
654 &self,
655 name: &str,
656 follow: Option<bool>,
657 stdout: Option<bool>,
658 stderr: Option<bool>,
659 since: Option<&str>,
660 until: Option<&str>,
661 timestamps: Option<bool>,
662 tail: Option<&str>,
663 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
664 let mut req = __internal_request::Request::new(
665 hyper::Method::GET,
666 "/libpod/containers/{name}/logs".to_string(),
667 );
668 if let Some(ref s) = follow {
669 let query_value = s.to_string();
670 req = req.with_query_param("follow".to_string(), query_value);
671 }
672 if let Some(ref s) = stdout {
673 let query_value = s.to_string();
674 req = req.with_query_param("stdout".to_string(), query_value);
675 }
676 if let Some(ref s) = stderr {
677 let query_value = s.to_string();
678 req = req.with_query_param("stderr".to_string(), query_value);
679 }
680 if let Some(ref s) = since {
681 let query_value = s.to_string();
682 req = req.with_query_param("since".to_string(), query_value);
683 }
684 if let Some(ref s) = until {
685 let query_value = s.to_string();
686 req = req.with_query_param("until".to_string(), query_value);
687 }
688 if let Some(ref s) = timestamps {
689 let query_value = s.to_string();
690 req = req.with_query_param("timestamps".to_string(), query_value);
691 }
692 if let Some(ref s) = tail {
693 let query_value = s.to_string();
694 req = req.with_query_param("tail".to_string(), query_value);
695 }
696 req = req.with_path_param("name".to_string(), name.to_string());
697 req = req.returns_nothing();
698
699 req.execute(self.configuration.borrow())
700 }
701
702 #[allow(unused_mut)]
703 fn container_mount_libpod(
704 &self,
705 name: &str,
706 ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send>> {
707 let mut req = __internal_request::Request::new(
708 hyper::Method::POST,
709 "/libpod/containers/{name}/mount".to_string(),
710 );
711 req = req.with_path_param("name".to_string(), name.to_string());
712
713 req.execute(self.configuration.borrow())
714 }
715
716 #[allow(unused_mut)]
717 fn container_pause_libpod(
718 &self,
719 name: &str,
720 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
721 let mut req = __internal_request::Request::new(
722 hyper::Method::POST,
723 "/libpod/containers/{name}/pause".to_string(),
724 );
725 req = req.with_path_param("name".to_string(), name.to_string());
726 req = req.returns_nothing();
727
728 req.execute(self.configuration.borrow())
729 }
730
731 #[allow(unused_mut)]
732 fn container_prune_libpod(
733 &self,
734 filters: Option<&str>,
735 ) -> Pin<Box<dyn Future<Output = Result<Vec<models::ContainersPruneReportLibpod>, Error>> + Send>>
736 {
737 let mut req = __internal_request::Request::new(
738 hyper::Method::POST,
739 "/libpod/containers/prune".to_string(),
740 );
741 if let Some(ref s) = filters {
742 let query_value = s.to_string();
743 req = req.with_query_param("filters".to_string(), query_value);
744 }
745
746 req.execute(self.configuration.borrow())
747 }
748
749 #[allow(unused_mut)]
750 fn container_rename_libpod(
751 &self,
752 name: &str,
753 name2: &str,
754 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
755 let mut req = __internal_request::Request::new(
756 hyper::Method::POST,
757 "/libpod/containers/{name}/rename".to_string(),
758 );
759 req = req.with_query_param("name".to_string(), name2.to_string());
760 req = req.with_path_param("name".to_string(), name.to_string());
761 req = req.returns_nothing();
762
763 req.execute(self.configuration.borrow())
764 }
765
766 #[allow(unused_mut)]
767 fn container_resize_libpod(
768 &self,
769 name: &str,
770 h: Option<i32>,
771 w: Option<i32>,
772 ) -> Pin<Box<dyn Future<Output = Result<serde_json::Value, Error>> + Send>> {
773 let mut req = __internal_request::Request::new(
774 hyper::Method::POST,
775 "/libpod/containers/{name}/resize".to_string(),
776 );
777 if let Some(ref s) = h {
778 let query_value = s.to_string();
779 req = req.with_query_param("h".to_string(), query_value);
780 }
781 if let Some(ref s) = w {
782 let query_value = s.to_string();
783 req = req.with_query_param("w".to_string(), query_value);
784 }
785 req = req.with_path_param("name".to_string(), name.to_string());
786
787 req.execute(self.configuration.borrow())
788 }
789
790 #[allow(unused_mut)]
791 fn container_restart_libpod(
792 &self,
793 name: &str,
794 t: Option<i32>,
795 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
796 let mut req = __internal_request::Request::new(
797 hyper::Method::POST,
798 "/libpod/containers/{name}/restart".to_string(),
799 );
800 if let Some(ref s) = t {
801 let query_value = s.to_string();
802 req = req.with_query_param("t".to_string(), query_value);
803 }
804 req = req.with_path_param("name".to_string(), name.to_string());
805 req = req.returns_nothing();
806
807 req.execute(self.configuration.borrow())
808 }
809
810 #[allow(unused_mut)]
811 fn container_restore_libpod(
812 &self,
813 name: &str,
814 name2: Option<&str>,
815 keep: Option<bool>,
816 tcp_established: Option<bool>,
817 import: Option<bool>,
818 ignore_root_fs: Option<bool>,
819 ignore_volumes: Option<bool>,
820 ignore_static_ip: Option<bool>,
821 ignore_static_mac: Option<bool>,
822 file_locks: Option<bool>,
823 print_stats: Option<bool>,
824 pod: Option<&str>,
825 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
826 let mut req = __internal_request::Request::new(
827 hyper::Method::POST,
828 "/libpod/containers/{name}/restore".to_string(),
829 );
830 if let Some(ref s) = name2 {
831 let query_value = s.to_string();
832 req = req.with_query_param("name".to_string(), query_value);
833 }
834 if let Some(ref s) = keep {
835 let query_value = s.to_string();
836 req = req.with_query_param("keep".to_string(), query_value);
837 }
838 if let Some(ref s) = tcp_established {
839 let query_value = s.to_string();
840 req = req.with_query_param("tcpEstablished".to_string(), query_value);
841 }
842 if let Some(ref s) = import {
843 let query_value = s.to_string();
844 req = req.with_query_param("import".to_string(), query_value);
845 }
846 if let Some(ref s) = ignore_root_fs {
847 let query_value = s.to_string();
848 req = req.with_query_param("ignoreRootFS".to_string(), query_value);
849 }
850 if let Some(ref s) = ignore_volumes {
851 let query_value = s.to_string();
852 req = req.with_query_param("ignoreVolumes".to_string(), query_value);
853 }
854 if let Some(ref s) = ignore_static_ip {
855 let query_value = s.to_string();
856 req = req.with_query_param("ignoreStaticIP".to_string(), query_value);
857 }
858 if let Some(ref s) = ignore_static_mac {
859 let query_value = s.to_string();
860 req = req.with_query_param("ignoreStaticMAC".to_string(), query_value);
861 }
862 if let Some(ref s) = file_locks {
863 let query_value = s.to_string();
864 req = req.with_query_param("fileLocks".to_string(), query_value);
865 }
866 if let Some(ref s) = print_stats {
867 let query_value = s.to_string();
868 req = req.with_query_param("printStats".to_string(), query_value);
869 }
870 if let Some(ref s) = pod {
871 let query_value = s.to_string();
872 req = req.with_query_param("pod".to_string(), query_value);
873 }
874 req = req.with_path_param("name".to_string(), name.to_string());
875 req = req.returns_nothing();
876
877 req.execute(self.configuration.borrow())
878 }
879
880 #[allow(unused_mut)]
881 fn container_show_mounted_libpod(
882 &self,
883 ) -> Pin<
884 Box<dyn Future<Output = Result<std::collections::HashMap<String, String>, Error>> + Send>,
885 > {
886 let mut req = __internal_request::Request::new(
887 hyper::Method::GET,
888 "/libpod/containers/showmounted".to_string(),
889 );
890
891 req.execute(self.configuration.borrow())
892 }
893
894 #[allow(unused_mut)]
895 fn container_start_libpod(
896 &self,
897 name: &str,
898 detach_keys: Option<&str>,
899 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
900 let mut req = __internal_request::Request::new(
901 hyper::Method::POST,
902 "/libpod/containers/{name}/start".to_string(),
903 );
904 if let Some(ref s) = detach_keys {
905 let query_value = s.to_string();
906 req = req.with_query_param("detachKeys".to_string(), query_value);
907 }
908 req = req.with_path_param("name".to_string(), name.to_string());
909 req = req.returns_nothing();
910
911 req.execute(self.configuration.borrow())
912 }
913
914 #[allow(unused_mut)]
915 fn container_stats_libpod(
916 &self,
917 name: &str,
918 stream: Option<bool>,
919 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
920 let mut req = __internal_request::Request::new(
921 hyper::Method::GET,
922 "/libpod/containers/{name}/stats".to_string(),
923 );
924 if let Some(ref s) = stream {
925 let query_value = s.to_string();
926 req = req.with_query_param("stream".to_string(), query_value);
927 }
928 req = req.with_path_param("name".to_string(), name.to_string());
929 req = req.returns_nothing();
930
931 req.execute(self.configuration.borrow())
932 }
933
934 #[allow(unused_mut)]
935 fn container_stop_libpod(
936 &self,
937 name: &str,
938 timeout: Option<i32>,
939 ignore: Option<bool>,
940 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
941 let mut req = __internal_request::Request::new(
942 hyper::Method::POST,
943 "/libpod/containers/{name}/stop".to_string(),
944 );
945 if let Some(ref s) = timeout {
946 let query_value = s.to_string();
947 req = req.with_query_param("timeout".to_string(), query_value);
948 }
949 if let Some(ref s) = ignore {
950 let query_value = s.to_string();
951 req = req.with_query_param("Ignore".to_string(), query_value);
952 }
953 req = req.with_path_param("name".to_string(), name.to_string());
954 req = req.returns_nothing();
955
956 req.execute(self.configuration.borrow())
957 }
958
959 #[allow(unused_mut)]
960 fn container_top_libpod(
961 &self,
962 name: &str,
963 stream: Option<bool>,
964 delay: Option<i32>,
965 ps_args: Option<Vec<String>>,
966 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerTopOkBody, Error>> + Send>> {
967 let mut req = __internal_request::Request::new(
968 hyper::Method::GET,
969 "/libpod/containers/{name}/top".to_string(),
970 );
971 if let Some(ref s) = stream {
972 let query_value = s.to_string();
973 req = req.with_query_param("stream".to_string(), query_value);
974 }
975 if let Some(ref s) = delay {
976 let query_value = s.to_string();
977 req = req.with_query_param("delay".to_string(), query_value);
978 }
979 if let Some(ref s) = ps_args {
980 let query_value = s
981 .iter()
982 .map(|s| s.to_string())
983 .collect::<Vec<String>>()
984 .join(",");
985 req = req.with_query_param("ps_args".to_string(), query_value);
986 }
987 req = req.with_path_param("name".to_string(), name.to_string());
988
989 req.execute(self.configuration.borrow())
990 }
991
992 #[allow(unused_mut)]
993 fn container_unmount_libpod(
994 &self,
995 name: &str,
996 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
997 let mut req = __internal_request::Request::new(
998 hyper::Method::POST,
999 "/libpod/containers/{name}/unmount".to_string(),
1000 );
1001 req = req.with_path_param("name".to_string(), name.to_string());
1002 req = req.returns_nothing();
1003
1004 req.execute(self.configuration.borrow())
1005 }
1006
1007 #[allow(unused_mut)]
1008 fn container_unpause_libpod(
1009 &self,
1010 name: &str,
1011 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
1012 let mut req = __internal_request::Request::new(
1013 hyper::Method::POST,
1014 "/libpod/containers/{name}/unpause".to_string(),
1015 );
1016 req = req.with_path_param("name".to_string(), name.to_string());
1017 req = req.returns_nothing();
1018
1019 req.execute(self.configuration.borrow())
1020 }
1021
1022 #[allow(unused_mut)]
1023 fn container_update_libpod(
1024 &self,
1025 name: &str,
1026 restart_policy: Option<&str>,
1027 restart_retries: Option<i32>,
1028 config: Option<models::UpdateEntities>,
1029 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
1030 let mut req = __internal_request::Request::new(
1031 hyper::Method::POST,
1032 "/libpod/containers/{name}/update".to_string(),
1033 );
1034 if let Some(ref s) = restart_policy {
1035 let query_value = s.to_string();
1036 req = req.with_query_param("restartPolicy".to_string(), query_value);
1037 }
1038 if let Some(ref s) = restart_retries {
1039 let query_value = s.to_string();
1040 req = req.with_query_param("restartRetries".to_string(), query_value);
1041 }
1042 req = req.with_path_param("name".to_string(), name.to_string());
1043 req = req.with_body_param(config);
1044 req = req.returns_nothing();
1045
1046 req.execute(self.configuration.borrow())
1047 }
1048
1049 #[allow(unused_mut)]
1050 fn container_wait_libpod(
1051 &self,
1052 name: &str,
1053 condition: Option<Vec<String>>,
1054 interval: Option<&str>,
1055 ) -> Pin<Box<dyn Future<Output = Result<i32, Error>> + Send>> {
1056 let mut req = __internal_request::Request::new(
1057 hyper::Method::POST,
1058 "/libpod/containers/{name}/wait".to_string(),
1059 );
1060 if let Some(ref s) = condition {
1061 let query_value = s
1062 .iter()
1063 .map(|s| s.to_string())
1064 .collect::<Vec<String>>()
1065 .join(",");
1066 req = req.with_query_param("condition".to_string(), query_value);
1067 }
1068 if let Some(ref s) = interval {
1069 let query_value = s.to_string();
1070 req = req.with_query_param("interval".to_string(), query_value);
1071 }
1072 req = req.with_path_param("name".to_string(), name.to_string());
1073
1074 req.execute(self.configuration.borrow())
1075 }
1076
1077 #[allow(unused_mut)]
1078 fn containers_stats_all_libpod(
1079 &self,
1080 containers: Option<Vec<String>>,
1081 stream: Option<bool>,
1082 interval: Option<i32>,
1083 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerStats, Error>> + Send>> {
1084 let mut req = __internal_request::Request::new(
1085 hyper::Method::GET,
1086 "/libpod/containers/stats".to_string(),
1087 );
1088 if let Some(ref s) = containers {
1089 let query_value = s
1090 .iter()
1091 .map(|s| s.to_string())
1092 .collect::<Vec<String>>()
1093 .join(",");
1094 req = req.with_query_param("containers".to_string(), query_value);
1095 }
1096 if let Some(ref s) = stream {
1097 let query_value = s.to_string();
1098 req = req.with_query_param("stream".to_string(), query_value);
1099 }
1100 if let Some(ref s) = interval {
1101 let query_value = s.to_string();
1102 req = req.with_query_param("interval".to_string(), query_value);
1103 }
1104
1105 req.execute(self.configuration.borrow())
1106 }
1107
1108 #[allow(unused_mut)]
1109 fn generate_kube_libpod(
1110 &self,
1111 names: Vec<String>,
1112 service: Option<bool>,
1113 r#type: Option<&str>,
1114 replicas: Option<i32>,
1115 no_trunc: Option<bool>,
1116 podman_only: Option<bool>,
1117 ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>> {
1118 let mut req = __internal_request::Request::new(
1119 hyper::Method::GET,
1120 "/libpod/generate/kube".to_string(),
1121 );
1122 req = req.with_query_param("names".to_string(), names.join(",").to_string());
1123 if let Some(ref s) = service {
1124 let query_value = s.to_string();
1125 req = req.with_query_param("service".to_string(), query_value);
1126 }
1127 if let Some(ref s) = r#type {
1128 let query_value = s.to_string();
1129 req = req.with_query_param("type".to_string(), query_value);
1130 }
1131 if let Some(ref s) = replicas {
1132 let query_value = s.to_string();
1133 req = req.with_query_param("replicas".to_string(), query_value);
1134 }
1135 if let Some(ref s) = no_trunc {
1136 let query_value = s.to_string();
1137 req = req.with_query_param("noTrunc".to_string(), query_value);
1138 }
1139 if let Some(ref s) = podman_only {
1140 let query_value = s.to_string();
1141 req = req.with_query_param("podmanOnly".to_string(), query_value);
1142 }
1143
1144 req.execute(self.configuration.borrow())
1145 }
1146
1147 #[allow(unused_mut)]
1148 fn generate_systemd_libpod(
1149 &self,
1150 name: &str,
1151 use_name: Option<bool>,
1152 new: Option<bool>,
1153 no_header: Option<bool>,
1154 start_timeout: Option<i32>,
1155 stop_timeout: Option<i32>,
1156 restart_policy: Option<&str>,
1157 container_prefix: Option<&str>,
1158 pod_prefix: Option<&str>,
1159 separator: Option<&str>,
1160 restart_sec: Option<i32>,
1161 wants: Option<Vec<String>>,
1162 after: Option<Vec<String>>,
1163 requires: Option<Vec<String>>,
1164 additional_env_variables: Option<Vec<String>>,
1165 ) -> Pin<
1166 Box<dyn Future<Output = Result<std::collections::HashMap<String, String>, Error>> + Send>,
1167 > {
1168 let mut req = __internal_request::Request::new(
1169 hyper::Method::GET,
1170 "/libpod/generate/{name}/systemd".to_string(),
1171 );
1172 if let Some(ref s) = use_name {
1173 let query_value = s.to_string();
1174 req = req.with_query_param("useName".to_string(), query_value);
1175 }
1176 if let Some(ref s) = new {
1177 let query_value = s.to_string();
1178 req = req.with_query_param("new".to_string(), query_value);
1179 }
1180 if let Some(ref s) = no_header {
1181 let query_value = s.to_string();
1182 req = req.with_query_param("noHeader".to_string(), query_value);
1183 }
1184 if let Some(ref s) = start_timeout {
1185 let query_value = s.to_string();
1186 req = req.with_query_param("startTimeout".to_string(), query_value);
1187 }
1188 if let Some(ref s) = stop_timeout {
1189 let query_value = s.to_string();
1190 req = req.with_query_param("stopTimeout".to_string(), query_value);
1191 }
1192 if let Some(ref s) = restart_policy {
1193 let query_value = s.to_string();
1194 req = req.with_query_param("restartPolicy".to_string(), query_value);
1195 }
1196 if let Some(ref s) = container_prefix {
1197 let query_value = s.to_string();
1198 req = req.with_query_param("containerPrefix".to_string(), query_value);
1199 }
1200 if let Some(ref s) = pod_prefix {
1201 let query_value = s.to_string();
1202 req = req.with_query_param("podPrefix".to_string(), query_value);
1203 }
1204 if let Some(ref s) = separator {
1205 let query_value = s.to_string();
1206 req = req.with_query_param("separator".to_string(), query_value);
1207 }
1208 if let Some(ref s) = restart_sec {
1209 let query_value = s.to_string();
1210 req = req.with_query_param("restartSec".to_string(), query_value);
1211 }
1212 if let Some(ref s) = wants {
1213 let query_value = s
1214 .iter()
1215 .map(|s| s.to_string())
1216 .collect::<Vec<String>>()
1217 .join(",");
1218 req = req.with_query_param("wants".to_string(), query_value);
1219 }
1220 if let Some(ref s) = after {
1221 let query_value = s
1222 .iter()
1223 .map(|s| s.to_string())
1224 .collect::<Vec<String>>()
1225 .join(",");
1226 req = req.with_query_param("after".to_string(), query_value);
1227 }
1228 if let Some(ref s) = requires {
1229 let query_value = s
1230 .iter()
1231 .map(|s| s.to_string())
1232 .collect::<Vec<String>>()
1233 .join(",");
1234 req = req.with_query_param("requires".to_string(), query_value);
1235 }
1236 if let Some(ref s) = additional_env_variables {
1237 let query_value = s
1238 .iter()
1239 .map(|s| s.to_string())
1240 .collect::<Vec<String>>()
1241 .join(",");
1242 req = req.with_query_param("additionalEnvVariables".to_string(), query_value);
1243 }
1244 req = req.with_path_param("name".to_string(), name.to_string());
1245
1246 req.execute(self.configuration.borrow())
1247 }
1248
1249 #[allow(unused_mut)]
1250 fn image_commit_libpod(
1251 &self,
1252 container: &str,
1253 author: Option<&str>,
1254 changes: Option<Vec<String>>,
1255 comment: Option<&str>,
1256 format: Option<&str>,
1257 pause: Option<bool>,
1258 squash: Option<bool>,
1259 repo: Option<&str>,
1260 stream: Option<bool>,
1261 tag: Option<&str>,
1262 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
1263 let mut req =
1264 __internal_request::Request::new(hyper::Method::POST, "/libpod/commit".to_string());
1265 req = req.with_query_param("container".to_string(), container.to_string());
1266 if let Some(ref s) = author {
1267 let query_value = s.to_string();
1268 req = req.with_query_param("author".to_string(), query_value);
1269 }
1270 if let Some(ref s) = changes {
1271 let query_value = s
1272 .iter()
1273 .map(|s| s.to_string())
1274 .collect::<Vec<String>>()
1275 .join(",");
1276 req = req.with_query_param("changes".to_string(), query_value);
1277 }
1278 if let Some(ref s) = comment {
1279 let query_value = s.to_string();
1280 req = req.with_query_param("comment".to_string(), query_value);
1281 }
1282 if let Some(ref s) = format {
1283 let query_value = s.to_string();
1284 req = req.with_query_param("format".to_string(), query_value);
1285 }
1286 if let Some(ref s) = pause {
1287 let query_value = s.to_string();
1288 req = req.with_query_param("pause".to_string(), query_value);
1289 }
1290 if let Some(ref s) = squash {
1291 let query_value = s.to_string();
1292 req = req.with_query_param("squash".to_string(), query_value);
1293 }
1294 if let Some(ref s) = repo {
1295 let query_value = s.to_string();
1296 req = req.with_query_param("repo".to_string(), query_value);
1297 }
1298 if let Some(ref s) = stream {
1299 let query_value = s.to_string();
1300 req = req.with_query_param("stream".to_string(), query_value);
1301 }
1302 if let Some(ref s) = tag {
1303 let query_value = s.to_string();
1304 req = req.with_query_param("tag".to_string(), query_value);
1305 }
1306 req = req.returns_nothing();
1307
1308 req.execute(self.configuration.borrow())
1309 }
1310
1311 #[allow(unused_mut)]
1312 fn kube_apply_libpod(
1313 &self,
1314 ca_cert_file: Option<&str>,
1315 kube_config: Option<&str>,
1316 namespace: Option<&str>,
1317 service: Option<bool>,
1318 file: Option<&str>,
1319 request: Option<&str>,
1320 ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>> {
1321 let mut req =
1322 __internal_request::Request::new(hyper::Method::POST, "/libpod/kube/apply".to_string());
1323 if let Some(ref s) = ca_cert_file {
1324 let query_value = s.to_string();
1325 req = req.with_query_param("caCertFile".to_string(), query_value);
1326 }
1327 if let Some(ref s) = kube_config {
1328 let query_value = s.to_string();
1329 req = req.with_query_param("kubeConfig".to_string(), query_value);
1330 }
1331 if let Some(ref s) = namespace {
1332 let query_value = s.to_string();
1333 req = req.with_query_param("namespace".to_string(), query_value);
1334 }
1335 if let Some(ref s) = service {
1336 let query_value = s.to_string();
1337 req = req.with_query_param("service".to_string(), query_value);
1338 }
1339 if let Some(ref s) = file {
1340 let query_value = s.to_string();
1341 req = req.with_query_param("file".to_string(), query_value);
1342 }
1343 req = req.with_body_param(request);
1344
1345 req.execute(self.configuration.borrow())
1346 }
1347
1348 #[allow(unused_mut)]
1349 fn play_kube_down_libpod(
1350 &self,
1351 force: Option<bool>,
1352 ) -> Pin<Box<dyn Future<Output = Result<models::PlayKubeReport, Error>> + Send>> {
1353 let mut req = __internal_request::Request::new(
1354 hyper::Method::DELETE,
1355 "/libpod/play/kube".to_string(),
1356 );
1357 if let Some(ref s) = force {
1358 let query_value = s.to_string();
1359 req = req.with_query_param("force".to_string(), query_value);
1360 }
1361
1362 req.execute(self.configuration.borrow())
1363 }
1364
1365 #[allow(unused_mut)]
1366 fn play_kube_libpod(
1367 &self,
1368 annotations: Option<&str>,
1369 log_driver: Option<&str>,
1370 log_options: Option<Vec<String>>,
1371 network: Option<Vec<String>>,
1372 no_hosts: Option<bool>,
1373 no_trunc: Option<bool>,
1374 publish_ports: Option<Vec<String>>,
1375 publish_all_ports: Option<bool>,
1376 replace: Option<bool>,
1377 service_container: Option<bool>,
1378 start: Option<bool>,
1379 static_ips: Option<Vec<String>>,
1380 static_macs: Option<Vec<String>>,
1381 tls_verify: Option<bool>,
1382 userns: Option<&str>,
1383 wait: Option<bool>,
1384 request: Option<&str>,
1385 ) -> Pin<Box<dyn Future<Output = Result<models::PlayKubeReport, Error>> + Send>> {
1386 let mut req =
1387 __internal_request::Request::new(hyper::Method::POST, "/libpod/play/kube".to_string());
1388 if let Some(ref s) = annotations {
1389 let query_value = s.to_string();
1390 req = req.with_query_param("annotations".to_string(), query_value);
1391 }
1392 if let Some(ref s) = log_driver {
1393 let query_value = s.to_string();
1394 req = req.with_query_param("logDriver".to_string(), query_value);
1395 }
1396 if let Some(ref s) = log_options {
1397 let query_value = s
1398 .iter()
1399 .map(|s| s.to_string())
1400 .collect::<Vec<String>>()
1401 .join(",");
1402 req = req.with_query_param("logOptions".to_string(), query_value);
1403 }
1404 if let Some(ref s) = network {
1405 let query_value = s
1406 .iter()
1407 .map(|s| s.to_string())
1408 .collect::<Vec<String>>()
1409 .join(",");
1410 req = req.with_query_param("network".to_string(), query_value);
1411 }
1412 if let Some(ref s) = no_hosts {
1413 let query_value = s.to_string();
1414 req = req.with_query_param("noHosts".to_string(), query_value);
1415 }
1416 if let Some(ref s) = no_trunc {
1417 let query_value = s.to_string();
1418 req = req.with_query_param("noTrunc".to_string(), query_value);
1419 }
1420 if let Some(ref s) = publish_ports {
1421 let query_value = s
1422 .iter()
1423 .map(|s| s.to_string())
1424 .collect::<Vec<String>>()
1425 .join(",");
1426 req = req.with_query_param("publishPorts".to_string(), query_value);
1427 }
1428 if let Some(ref s) = publish_all_ports {
1429 let query_value = s.to_string();
1430 req = req.with_query_param("publishAllPorts".to_string(), query_value);
1431 }
1432 if let Some(ref s) = replace {
1433 let query_value = s.to_string();
1434 req = req.with_query_param("replace".to_string(), query_value);
1435 }
1436 if let Some(ref s) = service_container {
1437 let query_value = s.to_string();
1438 req = req.with_query_param("serviceContainer".to_string(), query_value);
1439 }
1440 if let Some(ref s) = start {
1441 let query_value = s.to_string();
1442 req = req.with_query_param("start".to_string(), query_value);
1443 }
1444 if let Some(ref s) = static_ips {
1445 let query_value = s
1446 .iter()
1447 .map(|s| s.to_string())
1448 .collect::<Vec<String>>()
1449 .join(",");
1450 req = req.with_query_param("staticIPs".to_string(), query_value);
1451 }
1452 if let Some(ref s) = static_macs {
1453 let query_value = s
1454 .iter()
1455 .map(|s| s.to_string())
1456 .collect::<Vec<String>>()
1457 .join(",");
1458 req = req.with_query_param("staticMACs".to_string(), query_value);
1459 }
1460 if let Some(ref s) = tls_verify {
1461 let query_value = s.to_string();
1462 req = req.with_query_param("tlsVerify".to_string(), query_value);
1463 }
1464 if let Some(ref s) = userns {
1465 let query_value = s.to_string();
1466 req = req.with_query_param("userns".to_string(), query_value);
1467 }
1468 if let Some(ref s) = wait {
1469 let query_value = s.to_string();
1470 req = req.with_query_param("wait".to_string(), query_value);
1471 }
1472 req = req.with_body_param(request);
1473
1474 req.execute(self.configuration.borrow())
1475 }
1476
1477 #[allow(unused_mut)]
1478 fn put_container_archive_libpod(
1479 &self,
1480 name: &str,
1481 path: &str,
1482 pause: Option<bool>,
1483 request: Option<&str>,
1484 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
1485 let mut req = __internal_request::Request::new(
1486 hyper::Method::PUT,
1487 "/libpod/containers/{name}/archive".to_string(),
1488 );
1489 req = req.with_query_param("path".to_string(), path.to_string());
1490 if let Some(ref s) = pause {
1491 let query_value = s.to_string();
1492 req = req.with_query_param("pause".to_string(), query_value);
1493 }
1494 req = req.with_path_param("name".to_string(), name.to_string());
1495 req = req.with_body_param(request);
1496 req = req.returns_nothing();
1497
1498 req.execute(self.configuration.borrow())
1499 }
1500}