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 ContainersCompatApiClient<C: Connect>
26where
27 C: Clone + std::marker::Send + Sync + 'static,
28{
29 configuration: Arc<configuration::Configuration<C>>,
30}
31
32impl<C: Connect> ContainersCompatApiClient<C>
33where
34 C: Clone + std::marker::Send + Sync,
35{
36 pub fn new(
37 configuration: Arc<configuration::Configuration<C>>,
38 ) -> ContainersCompatApiClient<C> {
39 ContainersCompatApiClient { configuration }
40 }
41}
42
43pub trait ContainersCompatApi: Send + Sync {
44 fn container_archive(
45 &self,
46 name: &str,
47 path: &str,
48 ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>>;
49 fn container_archive_libpod(
50 &self,
51 name: &str,
52 path: &str,
53 rename: Option<&str>,
54 ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>>;
55 fn container_attach(
56 &self,
57 name: &str,
58 detach_keys: Option<&str>,
59 logs: Option<bool>,
60 stream: Option<bool>,
61 stdout: Option<bool>,
62 stderr: Option<bool>,
63 stdin: Option<bool>,
64 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
65 fn container_changes_libpod(
66 &self,
67 name: &str,
68 parent: Option<&str>,
69 diff_type: Option<&str>,
70 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
71 fn container_create(
72 &self,
73 body: models::CreateContainerConfig,
74 name: Option<&str>,
75 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerCreateResponse, Error>> + Send>>;
76 fn container_delete(
77 &self,
78 name: &str,
79 force: Option<bool>,
80 v: Option<bool>,
81 link: Option<bool>,
82 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
83 fn container_export(
84 &self,
85 name: &str,
86 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
87 fn container_inspect(
88 &self,
89 name: &str,
90 size: Option<bool>,
91 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerJson, Error>> + Send>>;
92 fn container_kill(
93 &self,
94 name: &str,
95 all: Option<bool>,
96 signal: Option<&str>,
97 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
98 fn container_list(
99 &self,
100 all: Option<bool>,
101 external: Option<bool>,
102 limit: Option<i32>,
103 size: Option<bool>,
104 filters: Option<&str>,
105 ) -> Pin<Box<dyn Future<Output = Result<Vec<models::Container>, Error>> + Send>>;
106 fn container_logs(
107 &self,
108 name: &str,
109 follow: Option<bool>,
110 stdout: Option<bool>,
111 stderr: Option<bool>,
112 since: Option<&str>,
113 until: Option<&str>,
114 timestamps: Option<bool>,
115 tail: Option<&str>,
116 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
117 fn container_pause(
118 &self,
119 name: &str,
120 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
121 fn container_prune(
122 &self,
123 filters: Option<&str>,
124 ) -> Pin<Box<dyn Future<Output = Result<Vec<models::ContainersPruneReport>, Error>> + Send>>;
125 fn container_rename(
126 &self,
127 name: &str,
128 name2: &str,
129 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
130 fn container_resize(
131 &self,
132 name: &str,
133 h: Option<i32>,
134 w: Option<i32>,
135 running: Option<bool>,
136 ) -> Pin<Box<dyn Future<Output = Result<serde_json::Value, Error>> + Send>>;
137 fn container_restart(
138 &self,
139 name: &str,
140 t: Option<i32>,
141 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
142 fn container_start(
143 &self,
144 name: &str,
145 detach_keys: Option<&str>,
146 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
147 fn container_stats(
148 &self,
149 name: &str,
150 stream: Option<bool>,
151 one_shot: Option<bool>,
152 ) -> Pin<Box<dyn Future<Output = Result<serde_json::Value, Error>> + Send>>;
153 fn container_stop(
154 &self,
155 name: &str,
156 t: Option<i32>,
157 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
158 fn container_top(
159 &self,
160 name: &str,
161 ps_args: Option<&str>,
162 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerTopOkBody, Error>> + Send>>;
163 fn container_unpause(
164 &self,
165 name: &str,
166 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
167 fn container_update(
168 &self,
169 name: &str,
170 resources: Option<models::UpdateConfig>,
171 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
172 fn container_wait(
173 &self,
174 name: &str,
175 condition: Option<&str>,
176 interval: Option<&str>,
177 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerWait200Response, Error>> + Send>>;
178 fn image_commit(
179 &self,
180 container: Option<&str>,
181 repo: Option<&str>,
182 tag: Option<&str>,
183 comment: Option<&str>,
184 author: Option<&str>,
185 pause: Option<bool>,
186 changes: Option<&str>,
187 squash: Option<bool>,
188 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
189 fn put_container_archive(
190 &self,
191 name: &str,
192 path: &str,
193 no_overwrite_dir_non_dir: Option<&str>,
194 copy_uidgid: Option<&str>,
195 request: Option<&str>,
196 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
197}
198
199impl<C: Connect> ContainersCompatApi for ContainersCompatApiClient<C>
200where
201 C: Clone + std::marker::Send + Sync,
202{
203 #[allow(unused_mut)]
204 fn container_archive(
205 &self,
206 name: &str,
207 path: &str,
208 ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>> {
209 let mut req = __internal_request::Request::new(
210 hyper::Method::GET,
211 "/containers/{name}/archive".to_string(),
212 );
213 req = req.with_query_param("path".to_string(), path.to_string());
214 req = req.with_path_param("name".to_string(), name.to_string());
215
216 req.execute(self.configuration.borrow())
217 }
218
219 #[allow(unused_mut)]
220 fn container_archive_libpod(
221 &self,
222 name: &str,
223 path: &str,
224 rename: Option<&str>,
225 ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>> {
226 let mut req = __internal_request::Request::new(
227 hyper::Method::GET,
228 "/libpod/containers/{name}/archive".to_string(),
229 );
230 req = req.with_query_param("path".to_string(), path.to_string());
231 if let Some(ref s) = rename {
232 let query_value = s.to_string();
233 req = req.with_query_param("rename".to_string(), query_value);
234 }
235 req = req.with_path_param("name".to_string(), name.to_string());
236
237 req.execute(self.configuration.borrow())
238 }
239
240 #[allow(unused_mut)]
241 fn container_attach(
242 &self,
243 name: &str,
244 detach_keys: Option<&str>,
245 logs: Option<bool>,
246 stream: Option<bool>,
247 stdout: Option<bool>,
248 stderr: Option<bool>,
249 stdin: Option<bool>,
250 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
251 let mut req = __internal_request::Request::new(
252 hyper::Method::POST,
253 "/containers/{name}/attach".to_string(),
254 );
255 if let Some(ref s) = detach_keys {
256 let query_value = s.to_string();
257 req = req.with_query_param("detachKeys".to_string(), query_value);
258 }
259 if let Some(ref s) = logs {
260 let query_value = s.to_string();
261 req = req.with_query_param("logs".to_string(), query_value);
262 }
263 if let Some(ref s) = stream {
264 let query_value = s.to_string();
265 req = req.with_query_param("stream".to_string(), query_value);
266 }
267 if let Some(ref s) = stdout {
268 let query_value = s.to_string();
269 req = req.with_query_param("stdout".to_string(), query_value);
270 }
271 if let Some(ref s) = stderr {
272 let query_value = s.to_string();
273 req = req.with_query_param("stderr".to_string(), query_value);
274 }
275 if let Some(ref s) = stdin {
276 let query_value = s.to_string();
277 req = req.with_query_param("stdin".to_string(), query_value);
278 }
279 req = req.with_path_param("name".to_string(), name.to_string());
280 req = req.returns_nothing();
281
282 req.execute(self.configuration.borrow())
283 }
284
285 #[allow(unused_mut)]
286 fn container_changes_libpod(
287 &self,
288 name: &str,
289 parent: Option<&str>,
290 diff_type: Option<&str>,
291 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
292 let mut req = __internal_request::Request::new(
293 hyper::Method::GET,
294 "/libpod/containers/{name}/changes".to_string(),
295 );
296 if let Some(ref s) = parent {
297 let query_value = s.to_string();
298 req = req.with_query_param("parent".to_string(), query_value);
299 }
300 if let Some(ref s) = diff_type {
301 let query_value = s.to_string();
302 req = req.with_query_param("diffType".to_string(), query_value);
303 }
304 req = req.with_path_param("name".to_string(), name.to_string());
305 req = req.returns_nothing();
306
307 req.execute(self.configuration.borrow())
308 }
309
310 #[allow(unused_mut)]
311 fn container_create(
312 &self,
313 body: models::CreateContainerConfig,
314 name: Option<&str>,
315 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerCreateResponse, Error>> + Send>> {
316 let mut req =
317 __internal_request::Request::new(hyper::Method::POST, "/containers/create".to_string());
318 if let Some(ref s) = name {
319 let query_value = s.to_string();
320 req = req.with_query_param("name".to_string(), query_value);
321 }
322 req = req.with_body_param(body);
323
324 req.execute(self.configuration.borrow())
325 }
326
327 #[allow(unused_mut)]
328 fn container_delete(
329 &self,
330 name: &str,
331 force: Option<bool>,
332 v: Option<bool>,
333 link: Option<bool>,
334 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
335 let mut req = __internal_request::Request::new(
336 hyper::Method::DELETE,
337 "/containers/{name}".to_string(),
338 );
339 if let Some(ref s) = force {
340 let query_value = s.to_string();
341 req = req.with_query_param("force".to_string(), query_value);
342 }
343 if let Some(ref s) = v {
344 let query_value = s.to_string();
345 req = req.with_query_param("v".to_string(), query_value);
346 }
347 if let Some(ref s) = link {
348 let query_value = s.to_string();
349 req = req.with_query_param("link".to_string(), query_value);
350 }
351 req = req.with_path_param("name".to_string(), name.to_string());
352 req = req.returns_nothing();
353
354 req.execute(self.configuration.borrow())
355 }
356
357 #[allow(unused_mut)]
358 fn container_export(
359 &self,
360 name: &str,
361 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
362 let mut req = __internal_request::Request::new(
363 hyper::Method::GET,
364 "/containers/{name}/export".to_string(),
365 );
366 req = req.with_path_param("name".to_string(), name.to_string());
367 req = req.returns_nothing();
368
369 req.execute(self.configuration.borrow())
370 }
371
372 #[allow(unused_mut)]
373 fn container_inspect(
374 &self,
375 name: &str,
376 size: Option<bool>,
377 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerJson, Error>> + Send>> {
378 let mut req = __internal_request::Request::new(
379 hyper::Method::GET,
380 "/containers/{name}/json".to_string(),
381 );
382 if let Some(ref s) = size {
383 let query_value = s.to_string();
384 req = req.with_query_param("size".to_string(), query_value);
385 }
386 req = req.with_path_param("name".to_string(), name.to_string());
387
388 req.execute(self.configuration.borrow())
389 }
390
391 #[allow(unused_mut)]
392 fn container_kill(
393 &self,
394 name: &str,
395 all: Option<bool>,
396 signal: Option<&str>,
397 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
398 let mut req = __internal_request::Request::new(
399 hyper::Method::POST,
400 "/containers/{name}/kill".to_string(),
401 );
402 if let Some(ref s) = all {
403 let query_value = s.to_string();
404 req = req.with_query_param("all".to_string(), query_value);
405 }
406 if let Some(ref s) = signal {
407 let query_value = s.to_string();
408 req = req.with_query_param("signal".to_string(), query_value);
409 }
410 req = req.with_path_param("name".to_string(), name.to_string());
411 req = req.returns_nothing();
412
413 req.execute(self.configuration.borrow())
414 }
415
416 #[allow(unused_mut)]
417 fn container_list(
418 &self,
419 all: Option<bool>,
420 external: Option<bool>,
421 limit: Option<i32>,
422 size: Option<bool>,
423 filters: Option<&str>,
424 ) -> Pin<Box<dyn Future<Output = Result<Vec<models::Container>, Error>> + Send>> {
425 let mut req =
426 __internal_request::Request::new(hyper::Method::GET, "/containers/json".to_string());
427 if let Some(ref s) = all {
428 let query_value = s.to_string();
429 req = req.with_query_param("all".to_string(), query_value);
430 }
431 if let Some(ref s) = external {
432 let query_value = s.to_string();
433 req = req.with_query_param("external".to_string(), query_value);
434 }
435 if let Some(ref s) = limit {
436 let query_value = s.to_string();
437 req = req.with_query_param("limit".to_string(), query_value);
438 }
439 if let Some(ref s) = size {
440 let query_value = s.to_string();
441 req = req.with_query_param("size".to_string(), query_value);
442 }
443 if let Some(ref s) = filters {
444 let query_value = s.to_string();
445 req = req.with_query_param("filters".to_string(), query_value);
446 }
447
448 req.execute(self.configuration.borrow())
449 }
450
451 #[allow(unused_mut)]
452 fn container_logs(
453 &self,
454 name: &str,
455 follow: Option<bool>,
456 stdout: Option<bool>,
457 stderr: Option<bool>,
458 since: Option<&str>,
459 until: Option<&str>,
460 timestamps: Option<bool>,
461 tail: Option<&str>,
462 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
463 let mut req = __internal_request::Request::new(
464 hyper::Method::GET,
465 "/containers/{name}/logs".to_string(),
466 );
467 if let Some(ref s) = follow {
468 let query_value = s.to_string();
469 req = req.with_query_param("follow".to_string(), query_value);
470 }
471 if let Some(ref s) = stdout {
472 let query_value = s.to_string();
473 req = req.with_query_param("stdout".to_string(), query_value);
474 }
475 if let Some(ref s) = stderr {
476 let query_value = s.to_string();
477 req = req.with_query_param("stderr".to_string(), query_value);
478 }
479 if let Some(ref s) = since {
480 let query_value = s.to_string();
481 req = req.with_query_param("since".to_string(), query_value);
482 }
483 if let Some(ref s) = until {
484 let query_value = s.to_string();
485 req = req.with_query_param("until".to_string(), query_value);
486 }
487 if let Some(ref s) = timestamps {
488 let query_value = s.to_string();
489 req = req.with_query_param("timestamps".to_string(), query_value);
490 }
491 if let Some(ref s) = tail {
492 let query_value = s.to_string();
493 req = req.with_query_param("tail".to_string(), query_value);
494 }
495 req = req.with_path_param("name".to_string(), name.to_string());
496 req = req.returns_nothing();
497
498 req.execute(self.configuration.borrow())
499 }
500
501 #[allow(unused_mut)]
502 fn container_pause(
503 &self,
504 name: &str,
505 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
506 let mut req = __internal_request::Request::new(
507 hyper::Method::POST,
508 "/containers/{name}/pause".to_string(),
509 );
510 req = req.with_path_param("name".to_string(), name.to_string());
511 req = req.returns_nothing();
512
513 req.execute(self.configuration.borrow())
514 }
515
516 #[allow(unused_mut)]
517 fn container_prune(
518 &self,
519 filters: Option<&str>,
520 ) -> Pin<Box<dyn Future<Output = Result<Vec<models::ContainersPruneReport>, Error>> + Send>>
521 {
522 let mut req =
523 __internal_request::Request::new(hyper::Method::POST, "/containers/prune".to_string());
524 if let Some(ref s) = filters {
525 let query_value = s.to_string();
526 req = req.with_query_param("filters".to_string(), query_value);
527 }
528
529 req.execute(self.configuration.borrow())
530 }
531
532 #[allow(unused_mut)]
533 fn container_rename(
534 &self,
535 name: &str,
536 name2: &str,
537 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
538 let mut req = __internal_request::Request::new(
539 hyper::Method::POST,
540 "/containers/{name}/rename".to_string(),
541 );
542 req = req.with_query_param("name".to_string(), name2.to_string());
543 req = req.with_path_param("name".to_string(), name.to_string());
544 req = req.returns_nothing();
545
546 req.execute(self.configuration.borrow())
547 }
548
549 #[allow(unused_mut)]
550 fn container_resize(
551 &self,
552 name: &str,
553 h: Option<i32>,
554 w: Option<i32>,
555 running: Option<bool>,
556 ) -> Pin<Box<dyn Future<Output = Result<serde_json::Value, Error>> + Send>> {
557 let mut req = __internal_request::Request::new(
558 hyper::Method::POST,
559 "/containers/{name}/resize".to_string(),
560 );
561 if let Some(ref s) = h {
562 let query_value = s.to_string();
563 req = req.with_query_param("h".to_string(), query_value);
564 }
565 if let Some(ref s) = w {
566 let query_value = s.to_string();
567 req = req.with_query_param("w".to_string(), query_value);
568 }
569 if let Some(ref s) = running {
570 let query_value = s.to_string();
571 req = req.with_query_param("running".to_string(), query_value);
572 }
573 req = req.with_path_param("name".to_string(), name.to_string());
574
575 req.execute(self.configuration.borrow())
576 }
577
578 #[allow(unused_mut)]
579 fn container_restart(
580 &self,
581 name: &str,
582 t: Option<i32>,
583 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
584 let mut req = __internal_request::Request::new(
585 hyper::Method::POST,
586 "/containers/{name}/restart".to_string(),
587 );
588 if let Some(ref s) = t {
589 let query_value = s.to_string();
590 req = req.with_query_param("t".to_string(), query_value);
591 }
592 req = req.with_path_param("name".to_string(), name.to_string());
593 req = req.returns_nothing();
594
595 req.execute(self.configuration.borrow())
596 }
597
598 #[allow(unused_mut)]
599 fn container_start(
600 &self,
601 name: &str,
602 detach_keys: Option<&str>,
603 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
604 let mut req = __internal_request::Request::new(
605 hyper::Method::POST,
606 "/containers/{name}/start".to_string(),
607 );
608 if let Some(ref s) = detach_keys {
609 let query_value = s.to_string();
610 req = req.with_query_param("detachKeys".to_string(), query_value);
611 }
612 req = req.with_path_param("name".to_string(), name.to_string());
613 req = req.returns_nothing();
614
615 req.execute(self.configuration.borrow())
616 }
617
618 #[allow(unused_mut)]
619 fn container_stats(
620 &self,
621 name: &str,
622 stream: Option<bool>,
623 one_shot: Option<bool>,
624 ) -> Pin<Box<dyn Future<Output = Result<serde_json::Value, Error>> + Send>> {
625 let mut req = __internal_request::Request::new(
626 hyper::Method::GET,
627 "/containers/{name}/stats".to_string(),
628 );
629 if let Some(ref s) = stream {
630 let query_value = s.to_string();
631 req = req.with_query_param("stream".to_string(), query_value);
632 }
633 if let Some(ref s) = one_shot {
634 let query_value = s.to_string();
635 req = req.with_query_param("one-shot".to_string(), query_value);
636 }
637 req = req.with_path_param("name".to_string(), name.to_string());
638
639 req.execute(self.configuration.borrow())
640 }
641
642 #[allow(unused_mut)]
643 fn container_stop(
644 &self,
645 name: &str,
646 t: Option<i32>,
647 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
648 let mut req = __internal_request::Request::new(
649 hyper::Method::POST,
650 "/containers/{name}/stop".to_string(),
651 );
652 if let Some(ref s) = t {
653 let query_value = s.to_string();
654 req = req.with_query_param("t".to_string(), query_value);
655 }
656 req = req.with_path_param("name".to_string(), name.to_string());
657 req = req.returns_nothing();
658
659 req.execute(self.configuration.borrow())
660 }
661
662 #[allow(unused_mut)]
663 fn container_top(
664 &self,
665 name: &str,
666 ps_args: Option<&str>,
667 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerTopOkBody, Error>> + Send>> {
668 let mut req = __internal_request::Request::new(
669 hyper::Method::GET,
670 "/containers/{name}/top".to_string(),
671 );
672 if let Some(ref s) = ps_args {
673 let query_value = s.to_string();
674 req = req.with_query_param("ps_args".to_string(), query_value);
675 }
676 req = req.with_path_param("name".to_string(), name.to_string());
677
678 req.execute(self.configuration.borrow())
679 }
680
681 #[allow(unused_mut)]
682 fn container_unpause(
683 &self,
684 name: &str,
685 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
686 let mut req = __internal_request::Request::new(
687 hyper::Method::POST,
688 "/containers/{name}/unpause".to_string(),
689 );
690 req = req.with_path_param("name".to_string(), name.to_string());
691 req = req.returns_nothing();
692
693 req.execute(self.configuration.borrow())
694 }
695
696 #[allow(unused_mut)]
697 fn container_update(
698 &self,
699 name: &str,
700 resources: Option<models::UpdateConfig>,
701 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
702 let mut req = __internal_request::Request::new(
703 hyper::Method::POST,
704 "/containers/{name}/update".to_string(),
705 );
706 req = req.with_path_param("name".to_string(), name.to_string());
707 req = req.with_body_param(resources);
708 req = req.returns_nothing();
709
710 req.execute(self.configuration.borrow())
711 }
712
713 #[allow(unused_mut)]
714 fn container_wait(
715 &self,
716 name: &str,
717 condition: Option<&str>,
718 interval: Option<&str>,
719 ) -> Pin<Box<dyn Future<Output = Result<models::ContainerWait200Response, Error>> + Send>> {
720 let mut req = __internal_request::Request::new(
721 hyper::Method::POST,
722 "/containers/{name}/wait".to_string(),
723 );
724 if let Some(ref s) = condition {
725 let query_value = s.to_string();
726 req = req.with_query_param("condition".to_string(), query_value);
727 }
728 if let Some(ref s) = interval {
729 let query_value = s.to_string();
730 req = req.with_query_param("interval".to_string(), query_value);
731 }
732 req = req.with_path_param("name".to_string(), name.to_string());
733
734 req.execute(self.configuration.borrow())
735 }
736
737 #[allow(unused_mut)]
738 fn image_commit(
739 &self,
740 container: Option<&str>,
741 repo: Option<&str>,
742 tag: Option<&str>,
743 comment: Option<&str>,
744 author: Option<&str>,
745 pause: Option<bool>,
746 changes: Option<&str>,
747 squash: Option<bool>,
748 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
749 let mut req = __internal_request::Request::new(hyper::Method::POST, "/commit".to_string());
750 if let Some(ref s) = container {
751 let query_value = s.to_string();
752 req = req.with_query_param("container".to_string(), query_value);
753 }
754 if let Some(ref s) = repo {
755 let query_value = s.to_string();
756 req = req.with_query_param("repo".to_string(), query_value);
757 }
758 if let Some(ref s) = tag {
759 let query_value = s.to_string();
760 req = req.with_query_param("tag".to_string(), query_value);
761 }
762 if let Some(ref s) = comment {
763 let query_value = s.to_string();
764 req = req.with_query_param("comment".to_string(), query_value);
765 }
766 if let Some(ref s) = author {
767 let query_value = s.to_string();
768 req = req.with_query_param("author".to_string(), query_value);
769 }
770 if let Some(ref s) = pause {
771 let query_value = s.to_string();
772 req = req.with_query_param("pause".to_string(), query_value);
773 }
774 if let Some(ref s) = changes {
775 let query_value = s.to_string();
776 req = req.with_query_param("changes".to_string(), query_value);
777 }
778 if let Some(ref s) = squash {
779 let query_value = s.to_string();
780 req = req.with_query_param("squash".to_string(), query_value);
781 }
782 req = req.returns_nothing();
783
784 req.execute(self.configuration.borrow())
785 }
786
787 #[allow(unused_mut)]
788 fn put_container_archive(
789 &self,
790 name: &str,
791 path: &str,
792 no_overwrite_dir_non_dir: Option<&str>,
793 copy_uidgid: Option<&str>,
794 request: Option<&str>,
795 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
796 let mut req = __internal_request::Request::new(
797 hyper::Method::PUT,
798 "/containers/{name}/archive".to_string(),
799 );
800 req = req.with_query_param("path".to_string(), path.to_string());
801 if let Some(ref s) = no_overwrite_dir_non_dir {
802 let query_value = s.to_string();
803 req = req.with_query_param("noOverwriteDirNonDir".to_string(), query_value);
804 }
805 if let Some(ref s) = copy_uidgid {
806 let query_value = s.to_string();
807 req = req.with_query_param("copyUIDGID".to_string(), query_value);
808 }
809 req = req.with_path_param("name".to_string(), name.to_string());
810 req = req.with_body_param(request);
811 req = req.returns_nothing();
812
813 req.execute(self.configuration.borrow())
814 }
815}