podman_autogen_api/models/
update_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/// UpdateConfig : Those attributes can be updated at runtime.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct UpdateConfig {
17    #[serde(rename = "BlkioDeviceReadBps", skip_serializing_if = "Option::is_none")]
18    pub blkio_device_read_bps: Option<Vec<models::ThrottleDevice>>,
19    #[serde(
20        rename = "BlkioDeviceReadIOps",
21        skip_serializing_if = "Option::is_none"
22    )]
23    pub blkio_device_read_i_ops: Option<Vec<models::ThrottleDevice>>,
24    #[serde(
25        rename = "BlkioDeviceWriteBps",
26        skip_serializing_if = "Option::is_none"
27    )]
28    pub blkio_device_write_bps: Option<Vec<models::ThrottleDevice>>,
29    #[serde(
30        rename = "BlkioDeviceWriteIOps",
31        skip_serializing_if = "Option::is_none"
32    )]
33    pub blkio_device_write_i_ops: Option<Vec<models::ThrottleDevice>>,
34    #[serde(rename = "BlkioWeight", skip_serializing_if = "Option::is_none")]
35    pub blkio_weight: Option<i32>,
36    #[serde(rename = "BlkioWeightDevice", skip_serializing_if = "Option::is_none")]
37    pub blkio_weight_device: Option<Vec<models::WeightDevice>>,
38    /// Applicable to UNIX platforms
39    #[serde(rename = "CgroupParent", skip_serializing_if = "Option::is_none")]
40    pub cgroup_parent: Option<String>,
41    /// Applicable to Windows
42    #[serde(rename = "CpuCount", skip_serializing_if = "Option::is_none")]
43    pub cpu_count: Option<i64>,
44    #[serde(rename = "CpuPercent", skip_serializing_if = "Option::is_none")]
45    pub cpu_percent: Option<i64>,
46    #[serde(rename = "CpuPeriod", skip_serializing_if = "Option::is_none")]
47    pub cpu_period: Option<i64>,
48    #[serde(rename = "CpuQuota", skip_serializing_if = "Option::is_none")]
49    pub cpu_quota: Option<i64>,
50    #[serde(rename = "CpuRealtimePeriod", skip_serializing_if = "Option::is_none")]
51    pub cpu_realtime_period: Option<i64>,
52    #[serde(rename = "CpuRealtimeRuntime", skip_serializing_if = "Option::is_none")]
53    pub cpu_realtime_runtime: Option<i64>,
54    /// Applicable to all platforms
55    #[serde(rename = "CpuShares", skip_serializing_if = "Option::is_none")]
56    pub cpu_shares: Option<i64>,
57    #[serde(rename = "CpusetCpus", skip_serializing_if = "Option::is_none")]
58    pub cpuset_cpus: Option<String>,
59    #[serde(rename = "CpusetMems", skip_serializing_if = "Option::is_none")]
60    pub cpuset_mems: Option<String>,
61    #[serde(rename = "DeviceCgroupRules", skip_serializing_if = "Option::is_none")]
62    pub device_cgroup_rules: Option<Vec<String>>,
63    #[serde(rename = "DeviceRequests", skip_serializing_if = "Option::is_none")]
64    pub device_requests: Option<Vec<models::DeviceRequest>>,
65    #[serde(rename = "Devices", skip_serializing_if = "Option::is_none")]
66    pub devices: Option<Vec<models::DeviceMapping>>,
67    #[serde(rename = "IOMaximumBandwidth", skip_serializing_if = "Option::is_none")]
68    pub io_maximum_bandwidth: Option<i32>,
69    #[serde(rename = "IOMaximumIOps", skip_serializing_if = "Option::is_none")]
70    pub io_maximum_i_ops: Option<i32>,
71    /// KernelMemory specifies the kernel memory limit (in bytes) for the container. Deprecated: kernel 5.4 deprecated kmem.limit_in_bytes.
72    #[serde(rename = "KernelMemory", skip_serializing_if = "Option::is_none")]
73    pub kernel_memory: Option<i64>,
74    #[serde(rename = "KernelMemoryTCP", skip_serializing_if = "Option::is_none")]
75    pub kernel_memory_tcp: Option<i64>,
76    #[serde(rename = "Memory", skip_serializing_if = "Option::is_none")]
77    pub memory: Option<i64>,
78    #[serde(rename = "MemoryReservation", skip_serializing_if = "Option::is_none")]
79    pub memory_reservation: Option<i64>,
80    #[serde(rename = "MemorySwap", skip_serializing_if = "Option::is_none")]
81    pub memory_swap: Option<i64>,
82    #[serde(rename = "MemorySwappiness", skip_serializing_if = "Option::is_none")]
83    pub memory_swappiness: Option<i64>,
84    #[serde(rename = "NanoCpus", skip_serializing_if = "Option::is_none")]
85    pub nano_cpus: Option<i64>,
86    #[serde(rename = "OomKillDisable", skip_serializing_if = "Option::is_none")]
87    pub oom_kill_disable: Option<bool>,
88    #[serde(rename = "PidsLimit", skip_serializing_if = "Option::is_none")]
89    pub pids_limit: Option<i64>,
90    #[serde(rename = "RestartPolicy", skip_serializing_if = "Option::is_none")]
91    pub restart_policy: Option<Box<models::RestartPolicy>>,
92    #[serde(rename = "Ulimits", skip_serializing_if = "Option::is_none")]
93    pub ulimits: Option<Vec<models::Ulimit>>,
94}
95
96impl UpdateConfig {
97    /// Those attributes can be updated at runtime.
98    pub fn new() -> UpdateConfig {
99        UpdateConfig {
100            blkio_device_read_bps: None,
101            blkio_device_read_i_ops: None,
102            blkio_device_write_bps: None,
103            blkio_device_write_i_ops: None,
104            blkio_weight: None,
105            blkio_weight_device: None,
106            cgroup_parent: None,
107            cpu_count: None,
108            cpu_percent: None,
109            cpu_period: None,
110            cpu_quota: None,
111            cpu_realtime_period: None,
112            cpu_realtime_runtime: None,
113            cpu_shares: None,
114            cpuset_cpus: None,
115            cpuset_mems: None,
116            device_cgroup_rules: None,
117            device_requests: None,
118            devices: None,
119            io_maximum_bandwidth: None,
120            io_maximum_i_ops: None,
121            kernel_memory: None,
122            kernel_memory_tcp: None,
123            memory: None,
124            memory_reservation: None,
125            memory_swap: None,
126            memory_swappiness: None,
127            nano_cpus: None,
128            oom_kill_disable: None,
129            pids_limit: None,
130            restart_policy: None,
131            ulimits: None,
132        }
133    }
134}