podman_autogen_api/models/
inspect_container_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/// InspectContainerConfig : InspectContainerConfig holds further data about how a container was initially configured.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct InspectContainerConfig {
17    /// Container annotations
18    #[serde(rename = "Annotations", skip_serializing_if = "Option::is_none")]
19    pub annotations: Option<std::collections::HashMap<String, String>>,
20    /// Unused, at present
21    #[serde(rename = "AttachStderr", skip_serializing_if = "Option::is_none")]
22    pub attach_stderr: Option<bool>,
23    /// Unused, at present
24    #[serde(rename = "AttachStdin", skip_serializing_if = "Option::is_none")]
25    pub attach_stdin: Option<bool>,
26    /// Unused, at present
27    #[serde(rename = "AttachStdout", skip_serializing_if = "Option::is_none")]
28    pub attach_stdout: Option<bool>,
29    /// ChrootDirs is an additional set of directories that need to be treated as root directories. Standard bind mounts will be mounted into paths relative to these directories.
30    #[serde(rename = "ChrootDirs", skip_serializing_if = "Option::is_none")]
31    pub chroot_dirs: Option<Vec<String>>,
32    /// Container command
33    #[serde(rename = "Cmd", skip_serializing_if = "Option::is_none")]
34    pub cmd: Option<Vec<String>>,
35    /// CreateCommand is the full command plus arguments of the process the container has been created with.
36    #[serde(rename = "CreateCommand", skip_serializing_if = "Option::is_none")]
37    pub create_command: Option<Vec<String>>,
38    /// Container domain name - unused at present
39    #[serde(rename = "Domainname", skip_serializing_if = "Option::is_none")]
40    pub domainname: Option<String>,
41    /// Container entrypoint
42    #[serde(rename = "Entrypoint", skip_serializing_if = "Option::is_none")]
43    pub entrypoint: Option<Vec<String>>,
44    /// Container environment variables
45    #[serde(rename = "Env", skip_serializing_if = "Option::is_none")]
46    pub env: Option<Vec<String>>,
47    #[serde(rename = "Healthcheck", skip_serializing_if = "Option::is_none")]
48    pub healthcheck: Option<Box<models::Schema2HealthConfig>>,
49    /// HealthcheckOnFailureAction defines an action to take once the container turns unhealthy.
50    #[serde(
51        rename = "HealthcheckOnFailureAction",
52        skip_serializing_if = "Option::is_none"
53    )]
54    pub healthcheck_on_failure_action: Option<String>,
55    /// Container hostname
56    #[serde(rename = "Hostname", skip_serializing_if = "Option::is_none")]
57    pub hostname: Option<String>,
58    /// Container image
59    #[serde(rename = "Image", skip_serializing_if = "Option::is_none")]
60    pub image: Option<String>,
61    /// Container labels
62    #[serde(rename = "Labels", skip_serializing_if = "Option::is_none")]
63    pub labels: Option<std::collections::HashMap<String, String>>,
64    /// On-build arguments - presently unused. More of Buildah's domain.
65    #[serde(rename = "OnBuild", skip_serializing_if = "Option::is_none")]
66    pub on_build: Option<String>,
67    /// Whether the container leaves STDIN open
68    #[serde(rename = "OpenStdin", skip_serializing_if = "Option::is_none")]
69    pub open_stdin: Option<bool>,
70    /// Passwd determines whether or not podman can add entries to /etc/passwd and /etc/group
71    #[serde(rename = "Passwd", skip_serializing_if = "Option::is_none")]
72    pub passwd: Option<bool>,
73    /// Secrets are the secrets mounted in the container
74    #[serde(rename = "Secrets", skip_serializing_if = "Option::is_none")]
75    pub secrets: Option<Vec<models::InspectSecret>>,
76    /// Whether STDIN is only left open once. Presently not supported by Podman, unused.
77    #[serde(rename = "StdinOnce", skip_serializing_if = "Option::is_none")]
78    pub stdin_once: Option<bool>,
79    /// Container stop signal
80    #[serde(rename = "StopSignal", skip_serializing_if = "Option::is_none")]
81    pub stop_signal: Option<String>,
82    /// StopTimeout is time before container is stopped when calling stop
83    #[serde(rename = "StopTimeout", skip_serializing_if = "Option::is_none")]
84    pub stop_timeout: Option<i32>,
85    /// SystemdMode is whether the container is running in systemd mode. In systemd mode, the container configuration is customized to optimize running systemd in the container.
86    #[serde(rename = "SystemdMode", skip_serializing_if = "Option::is_none")]
87    pub systemd_mode: Option<bool>,
88    /// Timeout is time before container is killed by conmon
89    #[serde(rename = "Timeout", skip_serializing_if = "Option::is_none")]
90    pub timeout: Option<i32>,
91    /// Timezone is the timezone inside the container. Local means it has the same timezone as the host machine
92    #[serde(rename = "Timezone", skip_serializing_if = "Option::is_none")]
93    pub timezone: Option<String>,
94    /// Whether the container creates a TTY
95    #[serde(rename = "Tty", skip_serializing_if = "Option::is_none")]
96    pub tty: Option<bool>,
97    /// Umask is the umask inside the container.
98    #[serde(rename = "Umask", skip_serializing_if = "Option::is_none")]
99    pub umask: Option<String>,
100    /// User the container was launched with
101    #[serde(rename = "User", skip_serializing_if = "Option::is_none")]
102    pub user: Option<String>,
103    /// Unused, at present. I've never seen this field populated.
104    #[serde(rename = "Volumes", skip_serializing_if = "Option::is_none")]
105    pub volumes: Option<std::collections::HashMap<String, serde_json::Value>>,
106    /// Container working directory
107    #[serde(rename = "WorkingDir", skip_serializing_if = "Option::is_none")]
108    pub working_dir: Option<String>,
109    /// SdNotifyMode is the sd-notify mode of the container.
110    #[serde(rename = "sdNotifyMode", skip_serializing_if = "Option::is_none")]
111    pub sd_notify_mode: Option<String>,
112    /// SdNotifySocket is the NOTIFY_SOCKET in use by/configured for the container.
113    #[serde(rename = "sdNotifySocket", skip_serializing_if = "Option::is_none")]
114    pub sd_notify_socket: Option<String>,
115}
116
117impl InspectContainerConfig {
118    /// InspectContainerConfig holds further data about how a container was initially configured.
119    pub fn new() -> InspectContainerConfig {
120        InspectContainerConfig {
121            annotations: None,
122            attach_stderr: None,
123            attach_stdin: None,
124            attach_stdout: None,
125            chroot_dirs: None,
126            cmd: None,
127            create_command: None,
128            domainname: None,
129            entrypoint: None,
130            env: None,
131            healthcheck: None,
132            healthcheck_on_failure_action: None,
133            hostname: None,
134            image: None,
135            labels: None,
136            on_build: None,
137            open_stdin: None,
138            passwd: None,
139            secrets: None,
140            stdin_once: None,
141            stop_signal: None,
142            stop_timeout: None,
143            systemd_mode: None,
144            timeout: None,
145            timezone: None,
146            tty: None,
147            umask: None,
148            user: None,
149            volumes: None,
150            working_dir: None,
151            sd_notify_mode: None,
152            sd_notify_socket: None,
153        }
154    }
155}