podman_autogen_api/apis/
images_api.rs

1/*
2 * supports a RESTful API for the Libpod library
3 *
4 * This documentation describes the Podman v2.x+ RESTful API. It consists of a Docker-compatible API and a Libpod API providing support for Podman’s unique features such as pods.  To start the service and keep it running for 5,000 seconds (-t 0 runs forever):  podman system service -t 5000 &  You can then use cURL on the socket using requests documented below.  NOTE: if you install the package podman-docker, it will create a symbolic link for /run/docker.sock to /run/podman/podman.sock  NOTE: Some fields in the API response JSON are encoded as omitempty, which means that if said field has a zero value, they will not be encoded in the API response. This is a feature to help reduce the size of the JSON responses returned via the API.  NOTE: Due to the limitations of [go-swagger](https://github.com/go-swagger/go-swagger), some field values that have a complex type show up as null in the docs as well as in the API responses. This is because the zero value for the field type is null. The field description in the docs will state what type the field is expected to be for such cases.  See podman-system-service(1) for more information.  Quick Examples:  'podman info'  curl --unix-socket /run/podman/podman.sock http://d/v5.0.0/libpod/info  'podman pull quay.io/containers/podman'  curl -XPOST --unix-socket /run/podman/podman.sock -v 'http://d/v5.0.0/images/create?fromImage=quay.io%2Fcontainers%2Fpodman'  'podman list images'  curl --unix-socket /run/podman/podman.sock -v 'http://d/v5.0.0/libpod/images/json' | jq
5 *
6 * The version of the OpenAPI document: 5.0.0
7 * Contact: podman@lists.podman.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use 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 ImagesApiClient<C: Connect>
26where
27    C: Clone + std::marker::Send + Sync + 'static,
28{
29    configuration: Arc<configuration::Configuration<C>>,
30}
31
32impl<C: Connect> ImagesApiClient<C>
33where
34    C: Clone + std::marker::Send + Sync,
35{
36    pub fn new(configuration: Arc<configuration::Configuration<C>>) -> ImagesApiClient<C> {
37        ImagesApiClient { configuration }
38    }
39}
40
41pub trait ImagesApi: Send + Sync {
42    fn image_build_libpod(
43        &self,
44        dockerfile: Option<&str>,
45        t: Option<&str>,
46        allplatforms: Option<bool>,
47        extrahosts: Option<&str>,
48        remote: Option<&str>,
49        q: Option<bool>,
50        nocache: Option<bool>,
51        cachefrom: Option<&str>,
52        pull: Option<bool>,
53        rm: Option<bool>,
54        forcerm: Option<bool>,
55        memory: Option<i32>,
56        memswap: Option<i32>,
57        cpushares: Option<i32>,
58        cpusetcpus: Option<&str>,
59        cpuperiod: Option<i32>,
60        cpuquota: Option<i32>,
61        buildargs: Option<&str>,
62        shmsize: Option<i32>,
63        squash: Option<bool>,
64        labels: Option<&str>,
65        layer_label: Option<Vec<String>>,
66        layers: Option<bool>,
67        networkmode: Option<&str>,
68        platform: Option<&str>,
69        target: Option<&str>,
70        outputs: Option<&str>,
71        httpproxy: Option<bool>,
72        unsetenv: Option<Vec<String>>,
73        unsetlabel: Option<Vec<String>>,
74        volume: Option<Vec<String>>,
75    ) -> Pin<Box<dyn Future<Output = Result<models::ImageBuildLibpod200Response, Error>> + Send>>;
76    fn image_changes_libpod(
77        &self,
78        name: &str,
79        parent: Option<&str>,
80        diff_type: Option<&str>,
81    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
82    fn image_delete_all_libpod(
83        &self,
84        images: Option<Vec<String>>,
85        all: Option<bool>,
86        force: Option<bool>,
87        ignore: Option<bool>,
88        lookup_manifest: Option<bool>,
89    ) -> Pin<Box<dyn Future<Output = Result<models::LibpodImagesRemoveReport, Error>> + Send>>;
90    fn image_delete_libpod(
91        &self,
92        name: &str,
93        force: Option<bool>,
94    ) -> Pin<Box<dyn Future<Output = Result<models::LibpodImagesRemoveReport, Error>> + Send>>;
95    fn image_exists_libpod(
96        &self,
97        name: &str,
98    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
99    fn image_export_libpod(
100        &self,
101        format: Option<&str>,
102        references: Option<Vec<String>>,
103        compress: Option<bool>,
104        oci_accept_uncompressed_layers: Option<bool>,
105    ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>>;
106    fn image_get_libpod(
107        &self,
108        name: &str,
109        format: Option<&str>,
110        compress: Option<bool>,
111    ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>>;
112    fn image_history_libpod(
113        &self,
114        name: &str,
115    ) -> Pin<Box<dyn Future<Output = Result<models::HistoryResponse, Error>> + Send>>;
116    fn image_import_libpod(
117        &self,
118        upload: std::path::PathBuf,
119        content_type: Option<&str>,
120        changes: Option<Vec<String>>,
121        message: Option<&str>,
122        reference: Option<&str>,
123        url: Option<&str>,
124    ) -> Pin<Box<dyn Future<Output = Result<models::ImageImportReport, Error>> + Send>>;
125    fn image_inspect_libpod(
126        &self,
127        name: &str,
128    ) -> Pin<Box<dyn Future<Output = Result<models::ImageData, Error>> + Send>>;
129    fn image_list_libpod(
130        &self,
131        all: Option<bool>,
132        filters: Option<&str>,
133    ) -> Pin<Box<dyn Future<Output = Result<Vec<models::LibpodImageSummary>, Error>> + Send>>;
134    fn image_load_libpod(
135        &self,
136        upload: &str,
137    ) -> Pin<Box<dyn Future<Output = Result<models::ImageLoadReport, Error>> + Send>>;
138    fn image_prune_libpod(
139        &self,
140        all: Option<bool>,
141        external: Option<bool>,
142        filters: Option<&str>,
143    ) -> Pin<Box<dyn Future<Output = Result<Vec<models::PruneReport>, Error>> + Send>>;
144    fn image_pull_libpod(
145        &self,
146        reference: Option<&str>,
147        quiet: Option<bool>,
148        compat_mode: Option<bool>,
149        arch: Option<&str>,
150        os: Option<&str>,
151        variant: Option<&str>,
152        policy: Option<&str>,
153        tls_verify: Option<bool>,
154        all_tags: Option<bool>,
155        x_registry_auth: Option<&str>,
156    ) -> Pin<Box<dyn Future<Output = Result<models::LibpodImagesPullReport, Error>> + Send>>;
157    fn image_push_libpod(
158        &self,
159        name: &str,
160        destination: Option<&str>,
161        force_compression_format: Option<bool>,
162        tls_verify: Option<bool>,
163        quiet: Option<bool>,
164        x_registry_auth: Option<&str>,
165    ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>>;
166    fn image_resolve_libpod(
167        &self,
168        name: &str,
169    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
170    fn image_scp_libpod(
171        &self,
172        name: &str,
173        destination: Option<&str>,
174        quiet: Option<bool>,
175    ) -> Pin<Box<dyn Future<Output = Result<models::ScpReport, Error>> + Send>>;
176    fn image_search_libpod(
177        &self,
178        term: Option<&str>,
179        limit: Option<i32>,
180        filters: Option<&str>,
181        tls_verify: Option<bool>,
182        list_tags: Option<bool>,
183    ) -> Pin<Box<dyn Future<Output = Result<models::ImageSearch200Response, Error>> + Send>>;
184    fn image_tag_libpod(
185        &self,
186        name: &str,
187        repo: Option<&str>,
188        tag: Option<&str>,
189    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
190    fn image_tree_libpod(
191        &self,
192        name: &str,
193        whatrequires: Option<bool>,
194    ) -> Pin<Box<dyn Future<Output = Result<models::ImageTreeReport, Error>> + Send>>;
195    fn image_untag_libpod(
196        &self,
197        name: &str,
198        repo: Option<&str>,
199        tag: Option<&str>,
200    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>;
201}
202
203impl<C: Connect> ImagesApi for ImagesApiClient<C>
204where
205    C: Clone + std::marker::Send + Sync,
206{
207    #[allow(unused_mut)]
208    fn image_build_libpod(
209        &self,
210        dockerfile: Option<&str>,
211        t: Option<&str>,
212        allplatforms: Option<bool>,
213        extrahosts: Option<&str>,
214        remote: Option<&str>,
215        q: Option<bool>,
216        nocache: Option<bool>,
217        cachefrom: Option<&str>,
218        pull: Option<bool>,
219        rm: Option<bool>,
220        forcerm: Option<bool>,
221        memory: Option<i32>,
222        memswap: Option<i32>,
223        cpushares: Option<i32>,
224        cpusetcpus: Option<&str>,
225        cpuperiod: Option<i32>,
226        cpuquota: Option<i32>,
227        buildargs: Option<&str>,
228        shmsize: Option<i32>,
229        squash: Option<bool>,
230        labels: Option<&str>,
231        layer_label: Option<Vec<String>>,
232        layers: Option<bool>,
233        networkmode: Option<&str>,
234        platform: Option<&str>,
235        target: Option<&str>,
236        outputs: Option<&str>,
237        httpproxy: Option<bool>,
238        unsetenv: Option<Vec<String>>,
239        unsetlabel: Option<Vec<String>>,
240        volume: Option<Vec<String>>,
241    ) -> Pin<Box<dyn Future<Output = Result<models::ImageBuildLibpod200Response, Error>> + Send>>
242    {
243        let mut req =
244            __internal_request::Request::new(hyper::Method::POST, "/libpod/build".to_string());
245        if let Some(ref s) = dockerfile {
246            let query_value = s.to_string();
247            req = req.with_query_param("dockerfile".to_string(), query_value);
248        }
249        if let Some(ref s) = t {
250            let query_value = s.to_string();
251            req = req.with_query_param("t".to_string(), query_value);
252        }
253        if let Some(ref s) = allplatforms {
254            let query_value = s.to_string();
255            req = req.with_query_param("allplatforms".to_string(), query_value);
256        }
257        if let Some(ref s) = extrahosts {
258            let query_value = s.to_string();
259            req = req.with_query_param("extrahosts".to_string(), query_value);
260        }
261        if let Some(ref s) = remote {
262            let query_value = s.to_string();
263            req = req.with_query_param("remote".to_string(), query_value);
264        }
265        if let Some(ref s) = q {
266            let query_value = s.to_string();
267            req = req.with_query_param("q".to_string(), query_value);
268        }
269        if let Some(ref s) = nocache {
270            let query_value = s.to_string();
271            req = req.with_query_param("nocache".to_string(), query_value);
272        }
273        if let Some(ref s) = cachefrom {
274            let query_value = s.to_string();
275            req = req.with_query_param("cachefrom".to_string(), query_value);
276        }
277        if let Some(ref s) = pull {
278            let query_value = s.to_string();
279            req = req.with_query_param("pull".to_string(), query_value);
280        }
281        if let Some(ref s) = rm {
282            let query_value = s.to_string();
283            req = req.with_query_param("rm".to_string(), query_value);
284        }
285        if let Some(ref s) = forcerm {
286            let query_value = s.to_string();
287            req = req.with_query_param("forcerm".to_string(), query_value);
288        }
289        if let Some(ref s) = memory {
290            let query_value = s.to_string();
291            req = req.with_query_param("memory".to_string(), query_value);
292        }
293        if let Some(ref s) = memswap {
294            let query_value = s.to_string();
295            req = req.with_query_param("memswap".to_string(), query_value);
296        }
297        if let Some(ref s) = cpushares {
298            let query_value = s.to_string();
299            req = req.with_query_param("cpushares".to_string(), query_value);
300        }
301        if let Some(ref s) = cpusetcpus {
302            let query_value = s.to_string();
303            req = req.with_query_param("cpusetcpus".to_string(), query_value);
304        }
305        if let Some(ref s) = cpuperiod {
306            let query_value = s.to_string();
307            req = req.with_query_param("cpuperiod".to_string(), query_value);
308        }
309        if let Some(ref s) = cpuquota {
310            let query_value = s.to_string();
311            req = req.with_query_param("cpuquota".to_string(), query_value);
312        }
313        if let Some(ref s) = buildargs {
314            let query_value = s.to_string();
315            req = req.with_query_param("buildargs".to_string(), query_value);
316        }
317        if let Some(ref s) = shmsize {
318            let query_value = s.to_string();
319            req = req.with_query_param("shmsize".to_string(), query_value);
320        }
321        if let Some(ref s) = squash {
322            let query_value = s.to_string();
323            req = req.with_query_param("squash".to_string(), query_value);
324        }
325        if let Some(ref s) = labels {
326            let query_value = s.to_string();
327            req = req.with_query_param("labels".to_string(), query_value);
328        }
329        if let Some(ref s) = layer_label {
330            let query_value = s
331                .iter()
332                .map(|s| s.to_string())
333                .collect::<Vec<String>>()
334                .join(",");
335            req = req.with_query_param("layerLabel".to_string(), query_value);
336        }
337        if let Some(ref s) = layers {
338            let query_value = s.to_string();
339            req = req.with_query_param("layers".to_string(), query_value);
340        }
341        if let Some(ref s) = networkmode {
342            let query_value = s.to_string();
343            req = req.with_query_param("networkmode".to_string(), query_value);
344        }
345        if let Some(ref s) = platform {
346            let query_value = s.to_string();
347            req = req.with_query_param("platform".to_string(), query_value);
348        }
349        if let Some(ref s) = target {
350            let query_value = s.to_string();
351            req = req.with_query_param("target".to_string(), query_value);
352        }
353        if let Some(ref s) = outputs {
354            let query_value = s.to_string();
355            req = req.with_query_param("outputs".to_string(), query_value);
356        }
357        if let Some(ref s) = httpproxy {
358            let query_value = s.to_string();
359            req = req.with_query_param("httpproxy".to_string(), query_value);
360        }
361        if let Some(ref s) = unsetenv {
362            let query_value = s
363                .iter()
364                .map(|s| s.to_string())
365                .collect::<Vec<String>>()
366                .join(",");
367            req = req.with_query_param("unsetenv".to_string(), query_value);
368        }
369        if let Some(ref s) = unsetlabel {
370            let query_value = s
371                .iter()
372                .map(|s| s.to_string())
373                .collect::<Vec<String>>()
374                .join(",");
375            req = req.with_query_param("unsetlabel".to_string(), query_value);
376        }
377        if let Some(ref s) = volume {
378            let query_value = s
379                .iter()
380                .map(|s| s.to_string())
381                .collect::<Vec<String>>()
382                .join(",");
383            req = req.with_query_param("volume".to_string(), query_value);
384        }
385
386        req.execute(self.configuration.borrow())
387    }
388
389    #[allow(unused_mut)]
390    fn image_changes_libpod(
391        &self,
392        name: &str,
393        parent: Option<&str>,
394        diff_type: Option<&str>,
395    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
396        let mut req = __internal_request::Request::new(
397            hyper::Method::GET,
398            "/libpod/images/{name}/changes".to_string(),
399        );
400        if let Some(ref s) = parent {
401            let query_value = s.to_string();
402            req = req.with_query_param("parent".to_string(), query_value);
403        }
404        if let Some(ref s) = diff_type {
405            let query_value = s.to_string();
406            req = req.with_query_param("diffType".to_string(), query_value);
407        }
408        req = req.with_path_param("name".to_string(), name.to_string());
409        req = req.returns_nothing();
410
411        req.execute(self.configuration.borrow())
412    }
413
414    #[allow(unused_mut)]
415    fn image_delete_all_libpod(
416        &self,
417        images: Option<Vec<String>>,
418        all: Option<bool>,
419        force: Option<bool>,
420        ignore: Option<bool>,
421        lookup_manifest: Option<bool>,
422    ) -> Pin<Box<dyn Future<Output = Result<models::LibpodImagesRemoveReport, Error>> + Send>> {
423        let mut req = __internal_request::Request::new(
424            hyper::Method::DELETE,
425            "/libpod/images/remove".to_string(),
426        );
427        if let Some(ref s) = images {
428            let query_value = s
429                .iter()
430                .map(|s| s.to_string())
431                .collect::<Vec<String>>()
432                .join(",");
433            req = req.with_query_param("images".to_string(), query_value);
434        }
435        if let Some(ref s) = all {
436            let query_value = s.to_string();
437            req = req.with_query_param("all".to_string(), query_value);
438        }
439        if let Some(ref s) = force {
440            let query_value = s.to_string();
441            req = req.with_query_param("force".to_string(), query_value);
442        }
443        if let Some(ref s) = ignore {
444            let query_value = s.to_string();
445            req = req.with_query_param("ignore".to_string(), query_value);
446        }
447        if let Some(ref s) = lookup_manifest {
448            let query_value = s.to_string();
449            req = req.with_query_param("lookupManifest".to_string(), query_value);
450        }
451
452        req.execute(self.configuration.borrow())
453    }
454
455    #[allow(unused_mut)]
456    fn image_delete_libpod(
457        &self,
458        name: &str,
459        force: Option<bool>,
460    ) -> Pin<Box<dyn Future<Output = Result<models::LibpodImagesRemoveReport, Error>> + Send>> {
461        let mut req = __internal_request::Request::new(
462            hyper::Method::DELETE,
463            "/libpod/images/{name}".to_string(),
464        );
465        if let Some(ref s) = force {
466            let query_value = s.to_string();
467            req = req.with_query_param("force".to_string(), query_value);
468        }
469        req = req.with_path_param("name".to_string(), name.to_string());
470
471        req.execute(self.configuration.borrow())
472    }
473
474    #[allow(unused_mut)]
475    fn image_exists_libpod(
476        &self,
477        name: &str,
478    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
479        let mut req = __internal_request::Request::new(
480            hyper::Method::GET,
481            "/libpod/images/{name}/exists".to_string(),
482        );
483        req = req.with_path_param("name".to_string(), name.to_string());
484        req = req.returns_nothing();
485
486        req.execute(self.configuration.borrow())
487    }
488
489    #[allow(unused_mut)]
490    fn image_export_libpod(
491        &self,
492        format: Option<&str>,
493        references: Option<Vec<String>>,
494        compress: Option<bool>,
495        oci_accept_uncompressed_layers: Option<bool>,
496    ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>> {
497        let mut req = __internal_request::Request::new(
498            hyper::Method::GET,
499            "/libpod/images/export".to_string(),
500        );
501        if let Some(ref s) = format {
502            let query_value = s.to_string();
503            req = req.with_query_param("format".to_string(), query_value);
504        }
505        if let Some(ref s) = references {
506            let query_value = s
507                .iter()
508                .map(|s| s.to_string())
509                .collect::<Vec<String>>()
510                .join(",");
511            req = req.with_query_param("references".to_string(), query_value);
512        }
513        if let Some(ref s) = compress {
514            let query_value = s.to_string();
515            req = req.with_query_param("compress".to_string(), query_value);
516        }
517        if let Some(ref s) = oci_accept_uncompressed_layers {
518            let query_value = s.to_string();
519            req = req.with_query_param("ociAcceptUncompressedLayers".to_string(), query_value);
520        }
521
522        req.execute(self.configuration.borrow())
523    }
524
525    #[allow(unused_mut)]
526    fn image_get_libpod(
527        &self,
528        name: &str,
529        format: Option<&str>,
530        compress: Option<bool>,
531    ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>> {
532        let mut req = __internal_request::Request::new(
533            hyper::Method::GET,
534            "/libpod/images/{name}/get".to_string(),
535        );
536        if let Some(ref s) = format {
537            let query_value = s.to_string();
538            req = req.with_query_param("format".to_string(), query_value);
539        }
540        if let Some(ref s) = compress {
541            let query_value = s.to_string();
542            req = req.with_query_param("compress".to_string(), query_value);
543        }
544        req = req.with_path_param("name".to_string(), name.to_string());
545
546        req.execute(self.configuration.borrow())
547    }
548
549    #[allow(unused_mut)]
550    fn image_history_libpod(
551        &self,
552        name: &str,
553    ) -> Pin<Box<dyn Future<Output = Result<models::HistoryResponse, Error>> + Send>> {
554        let mut req = __internal_request::Request::new(
555            hyper::Method::GET,
556            "/libpod/images/{name}/history".to_string(),
557        );
558        req = req.with_path_param("name".to_string(), name.to_string());
559
560        req.execute(self.configuration.borrow())
561    }
562
563    #[allow(unused_mut)]
564    fn image_import_libpod(
565        &self,
566        upload: std::path::PathBuf,
567        content_type: Option<&str>,
568        changes: Option<Vec<String>>,
569        message: Option<&str>,
570        reference: Option<&str>,
571        url: Option<&str>,
572    ) -> Pin<Box<dyn Future<Output = Result<models::ImageImportReport, Error>> + Send>> {
573        let mut req = __internal_request::Request::new(
574            hyper::Method::POST,
575            "/libpod/images/import".to_string(),
576        );
577        if let Some(ref s) = changes {
578            let query_value = s
579                .iter()
580                .map(|s| s.to_string())
581                .collect::<Vec<String>>()
582                .join(",");
583            req = req.with_query_param("changes".to_string(), query_value);
584        }
585        if let Some(ref s) = message {
586            let query_value = s.to_string();
587            req = req.with_query_param("message".to_string(), query_value);
588        }
589        if let Some(ref s) = reference {
590            let query_value = s.to_string();
591            req = req.with_query_param("reference".to_string(), query_value);
592        }
593        if let Some(ref s) = url {
594            let query_value = s.to_string();
595            req = req.with_query_param("url".to_string(), query_value);
596        }
597        if let Some(param_value) = content_type {
598            req = req.with_header_param("Content-Type".to_string(), param_value.to_string());
599        }
600        req = req.with_body_param(upload);
601
602        req.execute(self.configuration.borrow())
603    }
604
605    #[allow(unused_mut)]
606    fn image_inspect_libpod(
607        &self,
608        name: &str,
609    ) -> Pin<Box<dyn Future<Output = Result<models::ImageData, Error>> + Send>> {
610        let mut req = __internal_request::Request::new(
611            hyper::Method::GET,
612            "/libpod/images/{name}/json".to_string(),
613        );
614        req = req.with_path_param("name".to_string(), name.to_string());
615
616        req.execute(self.configuration.borrow())
617    }
618
619    #[allow(unused_mut)]
620    fn image_list_libpod(
621        &self,
622        all: Option<bool>,
623        filters: Option<&str>,
624    ) -> Pin<Box<dyn Future<Output = Result<Vec<models::LibpodImageSummary>, Error>> + Send>> {
625        let mut req =
626            __internal_request::Request::new(hyper::Method::GET, "/libpod/images/json".to_string());
627        if let Some(ref s) = all {
628            let query_value = s.to_string();
629            req = req.with_query_param("all".to_string(), query_value);
630        }
631        if let Some(ref s) = filters {
632            let query_value = s.to_string();
633            req = req.with_query_param("filters".to_string(), query_value);
634        }
635
636        req.execute(self.configuration.borrow())
637    }
638
639    #[allow(unused_mut)]
640    fn image_load_libpod(
641        &self,
642        upload: &str,
643    ) -> Pin<Box<dyn Future<Output = Result<models::ImageLoadReport, Error>> + Send>> {
644        let mut req = __internal_request::Request::new(
645            hyper::Method::POST,
646            "/libpod/images/load".to_string(),
647        );
648        req = req.with_body_param(upload);
649
650        req.execute(self.configuration.borrow())
651    }
652
653    #[allow(unused_mut)]
654    fn image_prune_libpod(
655        &self,
656        all: Option<bool>,
657        external: Option<bool>,
658        filters: Option<&str>,
659    ) -> Pin<Box<dyn Future<Output = Result<Vec<models::PruneReport>, Error>> + Send>> {
660        let mut req = __internal_request::Request::new(
661            hyper::Method::POST,
662            "/libpod/images/prune".to_string(),
663        );
664        if let Some(ref s) = all {
665            let query_value = s.to_string();
666            req = req.with_query_param("all".to_string(), query_value);
667        }
668        if let Some(ref s) = external {
669            let query_value = s.to_string();
670            req = req.with_query_param("external".to_string(), query_value);
671        }
672        if let Some(ref s) = filters {
673            let query_value = s.to_string();
674            req = req.with_query_param("filters".to_string(), query_value);
675        }
676
677        req.execute(self.configuration.borrow())
678    }
679
680    #[allow(unused_mut)]
681    fn image_pull_libpod(
682        &self,
683        reference: Option<&str>,
684        quiet: Option<bool>,
685        compat_mode: Option<bool>,
686        arch: Option<&str>,
687        os: Option<&str>,
688        variant: Option<&str>,
689        policy: Option<&str>,
690        tls_verify: Option<bool>,
691        all_tags: Option<bool>,
692        x_registry_auth: Option<&str>,
693    ) -> Pin<Box<dyn Future<Output = Result<models::LibpodImagesPullReport, Error>> + Send>> {
694        let mut req = __internal_request::Request::new(
695            hyper::Method::POST,
696            "/libpod/images/pull".to_string(),
697        );
698        if let Some(ref s) = reference {
699            let query_value = s.to_string();
700            req = req.with_query_param("reference".to_string(), query_value);
701        }
702        if let Some(ref s) = quiet {
703            let query_value = s.to_string();
704            req = req.with_query_param("quiet".to_string(), query_value);
705        }
706        if let Some(ref s) = compat_mode {
707            let query_value = s.to_string();
708            req = req.with_query_param("compatMode".to_string(), query_value);
709        }
710        if let Some(ref s) = arch {
711            let query_value = s.to_string();
712            req = req.with_query_param("Arch".to_string(), query_value);
713        }
714        if let Some(ref s) = os {
715            let query_value = s.to_string();
716            req = req.with_query_param("OS".to_string(), query_value);
717        }
718        if let Some(ref s) = variant {
719            let query_value = s.to_string();
720            req = req.with_query_param("Variant".to_string(), query_value);
721        }
722        if let Some(ref s) = policy {
723            let query_value = s.to_string();
724            req = req.with_query_param("policy".to_string(), query_value);
725        }
726        if let Some(ref s) = tls_verify {
727            let query_value = s.to_string();
728            req = req.with_query_param("tlsVerify".to_string(), query_value);
729        }
730        if let Some(ref s) = all_tags {
731            let query_value = s.to_string();
732            req = req.with_query_param("allTags".to_string(), query_value);
733        }
734        if let Some(param_value) = x_registry_auth {
735            req = req.with_header_param("X-Registry-Auth".to_string(), param_value.to_string());
736        }
737
738        req.execute(self.configuration.borrow())
739    }
740
741    #[allow(unused_mut)]
742    fn image_push_libpod(
743        &self,
744        name: &str,
745        destination: Option<&str>,
746        force_compression_format: Option<bool>,
747        tls_verify: Option<bool>,
748        quiet: Option<bool>,
749        x_registry_auth: Option<&str>,
750    ) -> Pin<Box<dyn Future<Output = Result<std::path::PathBuf, Error>> + Send>> {
751        let mut req = __internal_request::Request::new(
752            hyper::Method::POST,
753            "/libpod/images/{name}/push".to_string(),
754        );
755        if let Some(ref s) = destination {
756            let query_value = s.to_string();
757            req = req.with_query_param("destination".to_string(), query_value);
758        }
759        if let Some(ref s) = force_compression_format {
760            let query_value = s.to_string();
761            req = req.with_query_param("forceCompressionFormat".to_string(), query_value);
762        }
763        if let Some(ref s) = tls_verify {
764            let query_value = s.to_string();
765            req = req.with_query_param("tlsVerify".to_string(), query_value);
766        }
767        if let Some(ref s) = quiet {
768            let query_value = s.to_string();
769            req = req.with_query_param("quiet".to_string(), query_value);
770        }
771        req = req.with_path_param("name".to_string(), name.to_string());
772        if let Some(param_value) = x_registry_auth {
773            req = req.with_header_param("X-Registry-Auth".to_string(), param_value.to_string());
774        }
775
776        req.execute(self.configuration.borrow())
777    }
778
779    #[allow(unused_mut)]
780    fn image_resolve_libpod(
781        &self,
782        name: &str,
783    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
784        let mut req = __internal_request::Request::new(
785            hyper::Method::GET,
786            "/libpod/images/{name}/resolve".to_string(),
787        );
788        req = req.with_path_param("name".to_string(), name.to_string());
789        req = req.returns_nothing();
790
791        req.execute(self.configuration.borrow())
792    }
793
794    #[allow(unused_mut)]
795    fn image_scp_libpod(
796        &self,
797        name: &str,
798        destination: Option<&str>,
799        quiet: Option<bool>,
800    ) -> Pin<Box<dyn Future<Output = Result<models::ScpReport, Error>> + Send>> {
801        let mut req = __internal_request::Request::new(
802            hyper::Method::POST,
803            "/libpod/images/scp/{name}".to_string(),
804        );
805        if let Some(ref s) = destination {
806            let query_value = s.to_string();
807            req = req.with_query_param("destination".to_string(), query_value);
808        }
809        if let Some(ref s) = quiet {
810            let query_value = s.to_string();
811            req = req.with_query_param("quiet".to_string(), query_value);
812        }
813        req = req.with_path_param("name".to_string(), name.to_string());
814
815        req.execute(self.configuration.borrow())
816    }
817
818    #[allow(unused_mut)]
819    fn image_search_libpod(
820        &self,
821        term: Option<&str>,
822        limit: Option<i32>,
823        filters: Option<&str>,
824        tls_verify: Option<bool>,
825        list_tags: Option<bool>,
826    ) -> Pin<Box<dyn Future<Output = Result<models::ImageSearch200Response, Error>> + Send>> {
827        let mut req = __internal_request::Request::new(
828            hyper::Method::GET,
829            "/libpod/images/search".to_string(),
830        );
831        if let Some(ref s) = term {
832            let query_value = s.to_string();
833            req = req.with_query_param("term".to_string(), query_value);
834        }
835        if let Some(ref s) = limit {
836            let query_value = s.to_string();
837            req = req.with_query_param("limit".to_string(), query_value);
838        }
839        if let Some(ref s) = filters {
840            let query_value = s.to_string();
841            req = req.with_query_param("filters".to_string(), query_value);
842        }
843        if let Some(ref s) = tls_verify {
844            let query_value = s.to_string();
845            req = req.with_query_param("tlsVerify".to_string(), query_value);
846        }
847        if let Some(ref s) = list_tags {
848            let query_value = s.to_string();
849            req = req.with_query_param("listTags".to_string(), query_value);
850        }
851
852        req.execute(self.configuration.borrow())
853    }
854
855    #[allow(unused_mut)]
856    fn image_tag_libpod(
857        &self,
858        name: &str,
859        repo: Option<&str>,
860        tag: Option<&str>,
861    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
862        let mut req = __internal_request::Request::new(
863            hyper::Method::POST,
864            "/libpod/images/{name}/tag".to_string(),
865        );
866        if let Some(ref s) = repo {
867            let query_value = s.to_string();
868            req = req.with_query_param("repo".to_string(), query_value);
869        }
870        if let Some(ref s) = tag {
871            let query_value = s.to_string();
872            req = req.with_query_param("tag".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 image_tree_libpod(
882        &self,
883        name: &str,
884        whatrequires: Option<bool>,
885    ) -> Pin<Box<dyn Future<Output = Result<models::ImageTreeReport, Error>> + Send>> {
886        let mut req = __internal_request::Request::new(
887            hyper::Method::GET,
888            "/libpod/images/{name}/tree".to_string(),
889        );
890        if let Some(ref s) = whatrequires {
891            let query_value = s.to_string();
892            req = req.with_query_param("whatrequires".to_string(), query_value);
893        }
894        req = req.with_path_param("name".to_string(), name.to_string());
895
896        req.execute(self.configuration.borrow())
897    }
898
899    #[allow(unused_mut)]
900    fn image_untag_libpod(
901        &self,
902        name: &str,
903        repo: Option<&str>,
904        tag: Option<&str>,
905    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {
906        let mut req = __internal_request::Request::new(
907            hyper::Method::POST,
908            "/libpod/images/{name}/untag".to_string(),
909        );
910        if let Some(ref s) = repo {
911            let query_value = s.to_string();
912            req = req.with_query_param("repo".to_string(), query_value);
913        }
914        if let Some(ref s) = tag {
915            let query_value = s.to_string();
916            req = req.with_query_param("tag".to_string(), query_value);
917        }
918        req = req.with_path_param("name".to_string(), name.to_string());
919        req = req.returns_nothing();
920
921        req.execute(self.configuration.borrow())
922    }
923}