podman_rest_client/v5/models/
list_container.rs

1use serde::{Deserialize, Serialize};
2#[derive(Default, Debug, Serialize, Deserialize)]
3/// ListContainer describes a container suitable for listing
4pub struct ListContainer {
5    /// AutoRemove
6    #[serde(rename = "AutoRemove")]
7    pub auto_remove: Option<bool>,
8    /// CIDFile specified at creation time.
9    #[serde(rename = "CIDFile")]
10    pub cid_file: Option<String>,
11    /// Container command
12    #[serde(rename = "Command")]
13    pub command: Option<Vec<String>>,
14    /// Container creation time
15    #[serde(rename = "Created")]
16    pub created: Option<String>,
17    /// Human-readable container creation time.
18    #[serde(rename = "CreatedAt")]
19    pub created_at: Option<String>,
20    /// If container has exited, the return code from the command
21    #[serde(rename = "ExitCode")]
22    pub exit_code: Option<i32>,
23    /// If container has exited/stopped
24    #[serde(rename = "Exited")]
25    pub exited: Option<bool>,
26    /// Time container exited
27    #[serde(rename = "ExitedAt")]
28    pub exited_at: Option<i64>,
29    /// ExposedPorts contains the ports that are exposed but not forwarded,
30    /// see Ports for forwarded ports.
31    /// The key is the port number and the string slice contains the protocols,
32    /// i.e. "tcp", "udp" and "sctp".
33    #[serde(rename = "ExposedPorts")]
34    pub exposed_ports: Option<serde_json::Value>,
35    /// The unique identifier for the container
36    #[serde(rename = "Id")]
37    pub id: Option<String>,
38    /// Container image
39    #[serde(rename = "Image")]
40    pub image: Option<String>,
41    /// Container image ID
42    #[serde(rename = "ImageID")]
43    pub image_id: Option<String>,
44    /// If this container is a Pod infra container
45    #[serde(rename = "IsInfra")]
46    pub is_infra: Option<bool>,
47    /// Labels for container
48    #[serde(rename = "Labels")]
49    pub labels: Option<std::collections::HashMap<String, String>>,
50    /// User volume mounts
51    #[serde(rename = "Mounts")]
52    pub mounts: Option<Vec<String>>,
53    /// The names assigned to the container
54    #[serde(rename = "Names")]
55    pub names: Option<Vec<String>>,
56    #[serde(rename = "Namespaces")]
57    pub namespaces: Option<crate::v5::models::ListContainerNamespaces>,
58    /// The network names assigned to the container
59    #[serde(rename = "Networks")]
60    pub networks: Option<Vec<String>>,
61    /// The process id of the container
62    #[serde(rename = "Pid")]
63    pub pid: Option<i64>,
64    /// If the container is part of Pod, the Pod ID. Requires the pod
65    /// boolean to be set
66    #[serde(rename = "Pod")]
67    pub pod: Option<String>,
68    /// If the container is part of Pod, the Pod name. Requires the pod
69    /// boolean to be set
70    #[serde(rename = "PodName")]
71    pub pod_name: Option<String>,
72    /// Port mappings
73    #[serde(rename = "Ports")]
74    pub ports: Option<Vec<crate::v5::models::PortMapping>>,
75    /// Restarts is how many times the container was restarted by its
76    /// restart policy. This is NOT incremented by normal container restarts
77    /// (only by restart policy).
78    #[serde(rename = "Restarts")]
79    pub restarts: Option<u64>,
80    #[serde(rename = "Size")]
81    pub size: Option<crate::v5::models::ContainerSize>,
82    /// Time when container started
83    #[serde(rename = "StartedAt")]
84    pub started_at: Option<i64>,
85    /// State of container
86    #[serde(rename = "State")]
87    pub state: Option<String>,
88    /// Status is a human-readable approximation of a duration for json output
89    #[serde(rename = "Status")]
90    pub status: Option<String>,
91}