podman_autogen_api/models/
config.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/// Config : It should hold only portable information about the container. Here, \"portable\" means \"independent from the host we are running on\". Non-portable information *should* appear in HostConfig. All fields added to this struct must be marked `omitempty` to keep getting predictable hashes from the old `v1Compatibility` configuration.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Config {
17    #[serde(rename = "ArgsEscaped", skip_serializing_if = "Option::is_none")]
18    pub args_escaped: Option<bool>,
19    #[serde(rename = "AttachStderr", skip_serializing_if = "Option::is_none")]
20    pub attach_stderr: Option<bool>,
21    #[serde(rename = "AttachStdin", skip_serializing_if = "Option::is_none")]
22    pub attach_stdin: Option<bool>,
23    #[serde(rename = "AttachStdout", skip_serializing_if = "Option::is_none")]
24    pub attach_stdout: Option<bool>,
25    /// We need to override the json decoder to accept both options.
26    #[serde(rename = "Cmd", skip_serializing_if = "Option::is_none")]
27    pub cmd: Option<Vec<String>>,
28    #[serde(rename = "Domainname", skip_serializing_if = "Option::is_none")]
29    pub domainname: Option<String>,
30    /// We need to override the json decoder to accept both options.
31    #[serde(rename = "Entrypoint", skip_serializing_if = "Option::is_none")]
32    pub entrypoint: Option<Vec<String>>,
33    #[serde(rename = "Env", skip_serializing_if = "Option::is_none")]
34    pub env: Option<Vec<String>>,
35    /// PortSet is a collection of structs indexed by Port
36    #[serde(rename = "ExposedPorts", skip_serializing_if = "Option::is_none")]
37    pub exposed_ports: Option<std::collections::HashMap<String, serde_json::Value>>,
38    #[serde(rename = "Healthcheck", skip_serializing_if = "Option::is_none")]
39    pub healthcheck: Option<Box<models::HealthcheckConfig>>,
40    #[serde(rename = "Hostname", skip_serializing_if = "Option::is_none")]
41    pub hostname: Option<String>,
42    #[serde(rename = "Image", skip_serializing_if = "Option::is_none")]
43    pub image: Option<String>,
44    #[serde(rename = "Labels", skip_serializing_if = "Option::is_none")]
45    pub labels: Option<std::collections::HashMap<String, String>>,
46    /// Mac Address of the container.  Deprecated: this field is deprecated since API v1.44. Use EndpointSettings.MacAddress instead.
47    #[serde(rename = "MacAddress", skip_serializing_if = "Option::is_none")]
48    pub mac_address: Option<String>,
49    #[serde(rename = "NetworkDisabled", skip_serializing_if = "Option::is_none")]
50    pub network_disabled: Option<bool>,
51    #[serde(rename = "OnBuild", skip_serializing_if = "Option::is_none")]
52    pub on_build: Option<Vec<String>>,
53    #[serde(rename = "OpenStdin", skip_serializing_if = "Option::is_none")]
54    pub open_stdin: Option<bool>,
55    /// We need to override the json decoder to accept both options.
56    #[serde(rename = "Shell", skip_serializing_if = "Option::is_none")]
57    pub shell: Option<Vec<String>>,
58    #[serde(rename = "StdinOnce", skip_serializing_if = "Option::is_none")]
59    pub stdin_once: Option<bool>,
60    #[serde(rename = "StopSignal", skip_serializing_if = "Option::is_none")]
61    pub stop_signal: Option<String>,
62    #[serde(rename = "StopTimeout", skip_serializing_if = "Option::is_none")]
63    pub stop_timeout: Option<i64>,
64    #[serde(rename = "Tty", skip_serializing_if = "Option::is_none")]
65    pub tty: Option<bool>,
66    #[serde(rename = "User", skip_serializing_if = "Option::is_none")]
67    pub user: Option<String>,
68    #[serde(rename = "Volumes", skip_serializing_if = "Option::is_none")]
69    pub volumes: Option<std::collections::HashMap<String, serde_json::Value>>,
70    #[serde(rename = "WorkingDir", skip_serializing_if = "Option::is_none")]
71    pub working_dir: Option<String>,
72}
73
74impl Config {
75    /// It should hold only portable information about the container. Here, \"portable\" means \"independent from the host we are running on\". Non-portable information *should* appear in HostConfig. All fields added to this struct must be marked `omitempty` to keep getting predictable hashes from the old `v1Compatibility` configuration.
76    pub fn new() -> Config {
77        Config {
78            args_escaped: None,
79            attach_stderr: None,
80            attach_stdin: None,
81            attach_stdout: None,
82            cmd: None,
83            domainname: None,
84            entrypoint: None,
85            env: None,
86            exposed_ports: None,
87            healthcheck: None,
88            hostname: None,
89            image: None,
90            labels: None,
91            mac_address: None,
92            network_disabled: None,
93            on_build: None,
94            open_stdin: None,
95            shell: None,
96            stdin_once: None,
97            stop_signal: None,
98            stop_timeout: None,
99            tty: None,
100            user: None,
101            volumes: None,
102            working_dir: None,
103        }
104    }
105}