podman_autogen_api/models/
inspect_container_data.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/// InspectContainerData : InspectContainerData provides a detailed record of a container's configuration and state as viewed by Libpod. Large portions of this structure are defined such that the output is compatible with `docker inspect` JSON, but additional fields have been added as required to share information not in the original output.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct InspectContainerData {
17    #[serde(rename = "AppArmorProfile", skip_serializing_if = "Option::is_none")]
18    pub app_armor_profile: Option<String>,
19    #[serde(rename = "Args", skip_serializing_if = "Option::is_none")]
20    pub args: Option<Vec<String>>,
21    #[serde(rename = "BoundingCaps", skip_serializing_if = "Option::is_none")]
22    pub bounding_caps: Option<Vec<String>>,
23    #[serde(rename = "Config", skip_serializing_if = "Option::is_none")]
24    pub config: Option<Box<models::InspectContainerConfig>>,
25    #[serde(rename = "ConmonPidFile", skip_serializing_if = "Option::is_none")]
26    pub conmon_pid_file: Option<String>,
27    #[serde(rename = "Created", skip_serializing_if = "Option::is_none")]
28    pub created: Option<String>,
29    #[serde(rename = "Dependencies", skip_serializing_if = "Option::is_none")]
30    pub dependencies: Option<Vec<String>>,
31    #[serde(rename = "Driver", skip_serializing_if = "Option::is_none")]
32    pub driver: Option<String>,
33    #[serde(rename = "EffectiveCaps", skip_serializing_if = "Option::is_none")]
34    pub effective_caps: Option<Vec<String>>,
35    #[serde(rename = "ExecIDs", skip_serializing_if = "Option::is_none")]
36    pub exec_ids: Option<Vec<String>>,
37    #[serde(rename = "GraphDriver", skip_serializing_if = "Option::is_none")]
38    pub graph_driver: Option<Box<models::DriverData>>,
39    #[serde(rename = "HostConfig", skip_serializing_if = "Option::is_none")]
40    pub host_config: Option<Box<models::InspectContainerHostConfig>>,
41    #[serde(rename = "HostnamePath", skip_serializing_if = "Option::is_none")]
42    pub hostname_path: Option<String>,
43    #[serde(rename = "HostsPath", skip_serializing_if = "Option::is_none")]
44    pub hosts_path: Option<String>,
45    #[serde(rename = "Id", skip_serializing_if = "Option::is_none")]
46    pub id: Option<String>,
47    #[serde(rename = "Image", skip_serializing_if = "Option::is_none")]
48    pub image: Option<String>,
49    #[serde(rename = "ImageDigest", skip_serializing_if = "Option::is_none")]
50    pub image_digest: Option<String>,
51    #[serde(rename = "ImageName", skip_serializing_if = "Option::is_none")]
52    pub image_name: Option<String>,
53    #[serde(rename = "IsInfra", skip_serializing_if = "Option::is_none")]
54    pub is_infra: Option<bool>,
55    #[serde(rename = "IsService", skip_serializing_if = "Option::is_none")]
56    pub is_service: Option<bool>,
57    #[serde(
58        rename = "KubeExitCodePropagation",
59        skip_serializing_if = "Option::is_none"
60    )]
61    pub kube_exit_code_propagation: Option<String>,
62    #[serde(rename = "MountLabel", skip_serializing_if = "Option::is_none")]
63    pub mount_label: Option<String>,
64    #[serde(rename = "Mounts", skip_serializing_if = "Option::is_none")]
65    pub mounts: Option<Vec<models::InspectMount>>,
66    #[serde(rename = "Name", skip_serializing_if = "Option::is_none")]
67    pub name: Option<String>,
68    #[serde(rename = "Namespace", skip_serializing_if = "Option::is_none")]
69    pub namespace: Option<String>,
70    #[serde(rename = "NetworkSettings", skip_serializing_if = "Option::is_none")]
71    pub network_settings: Option<Box<models::InspectNetworkSettings>>,
72    #[serde(rename = "OCIConfigPath", skip_serializing_if = "Option::is_none")]
73    pub oci_config_path: Option<String>,
74    #[serde(rename = "OCIRuntime", skip_serializing_if = "Option::is_none")]
75    pub oci_runtime: Option<String>,
76    #[serde(rename = "Path", skip_serializing_if = "Option::is_none")]
77    pub path: Option<String>,
78    #[serde(rename = "PidFile", skip_serializing_if = "Option::is_none")]
79    pub pid_file: Option<String>,
80    #[serde(rename = "Pod", skip_serializing_if = "Option::is_none")]
81    pub pod: Option<String>,
82    #[serde(rename = "ProcessLabel", skip_serializing_if = "Option::is_none")]
83    pub process_label: Option<String>,
84    #[serde(rename = "ResolvConfPath", skip_serializing_if = "Option::is_none")]
85    pub resolv_conf_path: Option<String>,
86    #[serde(rename = "RestartCount", skip_serializing_if = "Option::is_none")]
87    pub restart_count: Option<i32>,
88    #[serde(rename = "Rootfs", skip_serializing_if = "Option::is_none")]
89    pub rootfs: Option<String>,
90    #[serde(rename = "SizeRootFs", skip_serializing_if = "Option::is_none")]
91    pub size_root_fs: Option<i64>,
92    #[serde(rename = "SizeRw", skip_serializing_if = "Option::is_none")]
93    pub size_rw: Option<i64>,
94    #[serde(rename = "State", skip_serializing_if = "Option::is_none")]
95    pub state: Option<Box<models::InspectContainerState>>,
96    #[serde(rename = "StaticDir", skip_serializing_if = "Option::is_none")]
97    pub static_dir: Option<String>,
98    #[serde(rename = "lockNumber", skip_serializing_if = "Option::is_none")]
99    pub lock_number: Option<i32>,
100}
101
102impl InspectContainerData {
103    /// InspectContainerData provides a detailed record of a container's configuration and state as viewed by Libpod. Large portions of this structure are defined such that the output is compatible with `docker inspect` JSON, but additional fields have been added as required to share information not in the original output.
104    pub fn new() -> InspectContainerData {
105        InspectContainerData {
106            app_armor_profile: None,
107            args: None,
108            bounding_caps: None,
109            config: None,
110            conmon_pid_file: None,
111            created: None,
112            dependencies: None,
113            driver: None,
114            effective_caps: None,
115            exec_ids: None,
116            graph_driver: None,
117            host_config: None,
118            hostname_path: None,
119            hosts_path: None,
120            id: None,
121            image: None,
122            image_digest: None,
123            image_name: None,
124            is_infra: None,
125            is_service: None,
126            kube_exit_code_propagation: None,
127            mount_label: None,
128            mounts: None,
129            name: None,
130            namespace: None,
131            network_settings: None,
132            oci_config_path: None,
133            oci_runtime: None,
134            path: None,
135            pid_file: None,
136            pod: None,
137            process_label: None,
138            resolv_conf_path: None,
139            restart_count: None,
140            rootfs: None,
141            size_root_fs: None,
142            size_rw: None,
143            state: None,
144            static_dir: None,
145            lock_number: None,
146        }
147    }
148}