podman_autogen_api/models/
pod_create_options.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 crate::models;
12use serde::{Deserialize, Serialize};
13
14/// PodCreateOptions : The JSON tags below are made to match the respective field in ContainerCreateOptions for the purpose of mapping.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PodCreateOptions {
17    #[serde(rename = "cgroup_parent", skip_serializing_if = "Option::is_none")]
18    pub cgroup_parent: Option<String>,
19    #[serde(rename = "container_command", skip_serializing_if = "Option::is_none")]
20    pub container_command: Option<String>,
21    #[serde(
22        rename = "container_conmon_pidfile",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub container_conmon_pidfile: Option<String>,
26    #[serde(rename = "container_name", skip_serializing_if = "Option::is_none")]
27    pub container_name: Option<String>,
28    #[serde(rename = "cpus", skip_serializing_if = "Option::is_none")]
29    pub cpus: Option<f64>,
30    #[serde(rename = "cpuset_cpus", skip_serializing_if = "Option::is_none")]
31    pub cpuset_cpus: Option<String>,
32    #[serde(rename = "create_command", skip_serializing_if = "Option::is_none")]
33    pub create_command: Option<Vec<String>>,
34    #[serde(rename = "device_read_bps", skip_serializing_if = "Option::is_none")]
35    pub device_read_bps: Option<Vec<String>>,
36    #[serde(rename = "devices", skip_serializing_if = "Option::is_none")]
37    pub devices: Option<Vec<String>>,
38    #[serde(rename = "exit_policy", skip_serializing_if = "Option::is_none")]
39    pub exit_policy: Option<String>,
40    #[serde(rename = "hostname", skip_serializing_if = "Option::is_none")]
41    pub hostname: Option<String>,
42    #[serde(rename = "infra", skip_serializing_if = "Option::is_none")]
43    pub infra: Option<bool>,
44    #[serde(rename = "infra_image", skip_serializing_if = "Option::is_none")]
45    pub infra_image: Option<String>,
46    #[serde(rename = "ipc", skip_serializing_if = "Option::is_none")]
47    pub ipc: Option<String>,
48    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
49    pub labels: Option<std::collections::HashMap<String, String>>,
50    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
51    pub name: Option<String>,
52    #[serde(rename = "net", skip_serializing_if = "Option::is_none")]
53    pub net: Option<Box<models::NetOptions>>,
54    #[serde(rename = "pid", skip_serializing_if = "Option::is_none")]
55    pub pid: Option<String>,
56    #[serde(rename = "restart", skip_serializing_if = "Option::is_none")]
57    pub restart: Option<String>,
58    #[serde(rename = "security_opt", skip_serializing_if = "Option::is_none")]
59    pub security_opt: Option<Vec<String>>,
60    #[serde(rename = "share", skip_serializing_if = "Option::is_none")]
61    pub share: Option<Vec<String>>,
62    #[serde(rename = "share_parent", skip_serializing_if = "Option::is_none")]
63    pub share_parent: Option<bool>,
64    #[serde(rename = "sysctl", skip_serializing_if = "Option::is_none")]
65    pub sysctl: Option<Vec<String>>,
66    #[serde(rename = "uts", skip_serializing_if = "Option::is_none")]
67    pub uts: Option<String>,
68    #[serde(rename = "volume", skip_serializing_if = "Option::is_none")]
69    pub volume: Option<Vec<String>>,
70    #[serde(rename = "volumes_from", skip_serializing_if = "Option::is_none")]
71    pub volumes_from: Option<Vec<String>>,
72}
73
74impl PodCreateOptions {
75    /// The JSON tags below are made to match the respective field in ContainerCreateOptions for the purpose of mapping.
76    pub fn new() -> PodCreateOptions {
77        PodCreateOptions {
78            cgroup_parent: None,
79            container_command: None,
80            container_conmon_pidfile: None,
81            container_name: None,
82            cpus: None,
83            cpuset_cpus: None,
84            create_command: None,
85            device_read_bps: None,
86            devices: None,
87            exit_policy: None,
88            hostname: None,
89            infra: None,
90            infra_image: None,
91            ipc: None,
92            labels: None,
93            name: None,
94            net: None,
95            pid: None,
96            restart: None,
97            security_opt: None,
98            share: None,
99            share_parent: None,
100            sysctl: None,
101            uts: None,
102            volume: None,
103            volumes_from: None,
104        }
105    }
106}