stackify_docker_api_stubs/
models.rs

1#![allow(
2    non_snake_case,
3    clippy::redundant_field_names,
4    clippy::new_without_default,
5    clippy::too_many_arguments
6)]
7
8use serde::{Deserialize, Serialize};
9use serde_json::Value;
10
11use std::collections::HashMap;
12
13use chrono::{DateTime, Utc};
14
15fn deserialize_nonoptional_vec<
16    'de,
17    D: serde::de::Deserializer<'de>,
18    T: serde::de::DeserializeOwned,
19>(
20    d: D,
21) -> Result<Vec<T>, D::Error> {
22    serde::de::Deserialize::deserialize(d).map(|x: Option<_>| x.unwrap_or_default())
23}
24
25fn deserialize_nonoptional_map<
26    'de,
27    D: serde::de::Deserializer<'de>,
28    T: serde::de::DeserializeOwned,
29>(
30    d: D,
31) -> Result<HashMap<String, T>, D::Error> {
32    serde::de::Deserialize::deserialize(d).map(|x: Option<_>| x.unwrap_or_default())
33}
34#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
35/// Address represents an IPv4 or IPv6 IP address.
36pub struct Address {
37    #[serde(rename = "Addr")]
38    #[serde(skip_serializing_if = "Option::is_none")]
39    /// IP address.
40    pub addr: Option<String>,
41    #[serde(rename = "PrefixLen")]
42    #[serde(skip_serializing_if = "Option::is_none")]
43    /// Mask length of the IP address.
44    pub prefix_len: Option<isize>,
45}
46
47#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
48pub struct AuthConfig {
49    #[serde(skip_serializing_if = "Option::is_none")]
50    pub email: Option<String>,
51    #[serde(skip_serializing_if = "Option::is_none")]
52    pub password: Option<String>,
53    #[serde(skip_serializing_if = "Option::is_none")]
54    pub serveraddress: Option<String>,
55    #[serde(skip_serializing_if = "Option::is_none")]
56    pub username: Option<String>,
57}
58
59#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
60/// BuildCache contains information about a build cache record.
61pub struct BuildCache {
62    #[serde(rename = "CreatedAt")]
63    #[serde(skip_serializing_if = "Option::is_none")]
64    /// Date and time at which the build cache was created in
65    /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
66    pub created_at: Option<DateTime<Utc>>,
67    #[serde(rename = "Description")]
68    #[serde(skip_serializing_if = "Option::is_none")]
69    /// Description of the build-step that produced the build cache.
70    pub description: Option<String>,
71    #[serde(rename = "ID")]
72    #[serde(skip_serializing_if = "Option::is_none")]
73    /// Unique ID of the build cache record.
74    pub id: Option<String>,
75    #[serde(rename = "InUse")]
76    #[serde(skip_serializing_if = "Option::is_none")]
77    /// Indicates if the build cache is in use.
78    pub in_use: Option<bool>,
79    #[serde(rename = "LastUsedAt")]
80    #[serde(skip_serializing_if = "Option::is_none")]
81    /// Date and time at which the build cache was last used in
82    /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
83    pub last_used_at: Option<DateTime<Utc>>,
84    #[serde(rename = "Parent")]
85    #[serde(skip_serializing_if = "Option::is_none")]
86    /// ID of the parent build cache record.
87    ///
88    /// > **Deprecated**: This field is deprecated, and omitted if empty.
89    pub parent: Option<String>,
90    #[serde(rename = "Parents")]
91    #[serde(skip_serializing_if = "Option::is_none")]
92    /// List of parent build cache record IDs.
93    pub parents: Option<Vec<String>>,
94    #[serde(rename = "Shared")]
95    #[serde(skip_serializing_if = "Option::is_none")]
96    /// Indicates if the build cache is shared.
97    pub shared: Option<bool>,
98    #[serde(rename = "Size")]
99    #[serde(skip_serializing_if = "Option::is_none")]
100    /// Amount of disk space used by the build cache (in bytes).
101    pub size: Option<isize>,
102    #[serde(rename = "Type")]
103    #[serde(skip_serializing_if = "Option::is_none")]
104    /// Cache record type.
105    pub type_: Option<String>,
106    #[serde(rename = "UsageCount")]
107    #[serde(skip_serializing_if = "Option::is_none")]
108    pub usage_count: Option<isize>,
109}
110
111#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
112/// Cache record type.
113pub enum BuildCacheTypeInlineItem {
114    #[serde(rename = "internal")]
115    Internal,
116    #[serde(rename = "frontend")]
117    Frontend,
118    #[serde(rename = "source.local")]
119    SourceLocal,
120    #[serde(rename = "source.git.checkout")]
121    SourceGitCheckout,
122    #[serde(rename = "exec.cachemount")]
123    ExecCachemount,
124    #[serde(rename = "regular")]
125    Regular,
126}
127
128impl AsRef<str> for BuildCacheTypeInlineItem {
129    fn as_ref(&self) -> &str {
130        match self {
131            BuildCacheTypeInlineItem::Internal => "internal",
132            BuildCacheTypeInlineItem::Frontend => "frontend",
133            BuildCacheTypeInlineItem::SourceLocal => "source.local",
134            BuildCacheTypeInlineItem::SourceGitCheckout => "source.git.checkout",
135            BuildCacheTypeInlineItem::ExecCachemount => "exec.cachemount",
136            BuildCacheTypeInlineItem::Regular => "regular",
137        }
138    }
139}
140
141impl std::fmt::Display for BuildCacheTypeInlineItem {
142    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
143        write!(f, "{}", self.as_ref())
144    }
145}
146
147#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
148pub struct BuildInfo {
149    pub aux: Option<ImageId>,
150    #[serde(skip_serializing_if = "Option::is_none")]
151    pub error: Option<String>,
152    #[serde(rename = "errorDetail")]
153    pub error_detail: Option<ErrorDetail>,
154    #[serde(skip_serializing_if = "Option::is_none")]
155    pub id: Option<String>,
156    #[serde(skip_serializing_if = "Option::is_none")]
157    pub progress: Option<String>,
158    #[serde(rename = "progressDetail")]
159    pub progress_detail: Option<ProgressDetail>,
160    #[serde(skip_serializing_if = "Option::is_none")]
161    pub status: Option<String>,
162    #[serde(skip_serializing_if = "Option::is_none")]
163    pub stream: Option<String>,
164}
165
166#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
167/// No error
168pub struct BuildPrune200Response {
169    #[serde(rename = "CachesDeleted")]
170    #[serde(skip_serializing_if = "Option::is_none")]
171    pub caches_deleted: Option<Vec<String>>,
172    #[serde(rename = "SpaceReclaimed")]
173    #[serde(skip_serializing_if = "Option::is_none")]
174    /// Disk space reclaimed in bytes
175    pub space_reclaimed: Option<i64>,
176}
177
178/// Kind of change
179///
180/// Can be one of:
181///
182/// - `0`: Modified ("C")
183/// - `1`: Added ("A")
184/// - `2`: Deleted ("D")
185pub type ChangeType = u8;
186
187#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
188/// ClusterInfo represents information about the swarm as is returned by the
189/// "/info" endpoint. Join-tokens are not included.
190pub struct ClusterInfo {
191    #[serde(rename = "CreatedAt")]
192    #[serde(skip_serializing_if = "Option::is_none")]
193    /// Date and time at which the swarm was initialised in
194    /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
195    pub created_at: Option<DateTime<Utc>>,
196    #[serde(rename = "DataPathPort")]
197    #[serde(skip_serializing_if = "Option::is_none")]
198    /// DataPathPort specifies the data path port number for data traffic.
199    /// Acceptable port range is 1024 to 49151.
200    /// If no port is set or is set to 0, the default port (4789) is used.
201    pub data_path_port: Option<u32>,
202    #[serde(rename = "DefaultAddrPool")]
203    #[serde(skip_serializing_if = "Option::is_none")]
204    /// Default Address Pool specifies default subnet pools for global scope
205    /// networks.
206    pub default_addr_pool: Option<Vec<String>>,
207    #[serde(rename = "ID")]
208    #[serde(skip_serializing_if = "Option::is_none")]
209    /// The ID of the swarm.
210    pub id: Option<String>,
211    #[serde(rename = "RootRotationInProgress")]
212    #[serde(skip_serializing_if = "Option::is_none")]
213    /// Whether there is currently a root CA rotation in progress for the swarm
214    pub root_rotation_in_progress: Option<bool>,
215    #[serde(rename = "Spec")]
216    pub spec: Option<SwarmSpec>,
217    #[serde(rename = "SubnetSize")]
218    #[serde(skip_serializing_if = "Option::is_none")]
219    /// SubnetSize specifies the subnet size of the networks created from the
220    /// default subnet pool.
221    pub subnet_size: Option<u32>,
222    #[serde(rename = "TLSInfo")]
223    pub tls_info: Option<TlsInfo>,
224    #[serde(rename = "UpdatedAt")]
225    #[serde(skip_serializing_if = "Option::is_none")]
226    /// Date and time at which the swarm was last updated in
227    /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
228    pub updated_at: Option<DateTime<Utc>>,
229    #[serde(rename = "Version")]
230    pub version: Option<ObjectVersion>,
231}
232
233#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
234/// Options and information specific to, and only present on, Swarm CSI
235/// cluster volumes.
236pub struct ClusterVolume {
237    #[serde(rename = "CreatedAt")]
238    #[serde(skip_serializing_if = "Option::is_none")]
239    pub created_at: Option<DateTime<Utc>>,
240    #[serde(rename = "ID")]
241    #[serde(skip_serializing_if = "Option::is_none")]
242    /// The Swarm ID of this volume. Because cluster volumes are Swarm
243    /// objects, they have an ID, unlike non-cluster volumes. This ID can
244    /// be used to refer to the Volume instead of the name.
245    pub id: Option<String>,
246    #[serde(rename = "Info")]
247    #[serde(skip_serializing_if = "Option::is_none")]
248    /// Information about the global status of the volume.
249    pub info: Option<ClusterVolumeInfoInlineItem>,
250    #[serde(rename = "PublishStatus")]
251    #[serde(skip_serializing_if = "Option::is_none")]
252    /// The status of the volume as it pertains to its publishing and use on
253    /// specific nodes
254    pub publish_status: Option<Vec<ClusterVolumePublishStatusInlineItem>>,
255    #[serde(rename = "Spec")]
256    pub spec: Option<ClusterVolumeSpec>,
257    #[serde(rename = "UpdatedAt")]
258    #[serde(skip_serializing_if = "Option::is_none")]
259    pub updated_at: Option<DateTime<Utc>>,
260    #[serde(rename = "Version")]
261    pub version: Option<ObjectVersion>,
262}
263
264#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
265/// Information about the global status of the volume.
266pub struct ClusterVolumeInfoInlineItem {
267    #[serde(rename = "AccessibleTopology")]
268    #[serde(skip_serializing_if = "Option::is_none")]
269    /// The topology this volume is actually accessible from.
270    pub accessible_topology: Option<Vec<Topology>>,
271    #[serde(rename = "CapacityBytes")]
272    #[serde(skip_serializing_if = "Option::is_none")]
273    /// The capacity of the volume in bytes. A value of 0 indicates that
274    /// the capacity is unknown.
275    pub capacity_bytes: Option<i64>,
276    #[serde(rename = "VolumeContext")]
277    #[serde(skip_serializing_if = "Option::is_none")]
278    /// A map of strings to strings returned from the storage plugin when
279    /// the volume is created.
280    pub volume_context: Option<HashMap<String, String>>,
281    #[serde(rename = "VolumeID")]
282    #[serde(skip_serializing_if = "Option::is_none")]
283    /// The ID of the volume as returned by the CSI storage plugin. This
284    /// is distinct from the volume's ID as provided by Docker. This ID
285    /// is never used by the user when communicating with Docker to refer
286    /// to this volume. If the ID is blank, then the Volume has not been
287    /// successfully created in the plugin yet.
288    pub volume_id: Option<String>,
289}
290
291#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
292pub struct ClusterVolumePublishStatusInlineItem {
293    #[serde(rename = "NodeID")]
294    #[serde(skip_serializing_if = "Option::is_none")]
295    /// The ID of the Swarm node the volume is published on.
296    pub node_id: Option<String>,
297    #[serde(rename = "PublishContext")]
298    #[serde(skip_serializing_if = "Option::is_none")]
299    /// A map of strings to strings returned by the CSI controller
300    /// plugin when a volume is published.
301    pub publish_context: Option<HashMap<String, String>>,
302    #[serde(rename = "State")]
303    #[serde(skip_serializing_if = "Option::is_none")]
304    /// The published state of the volume.
305    /// * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed.
306    /// * `published` The volume is published successfully to the node.
307    /// * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so.
308    /// * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller.
309    pub state: Option<String>,
310}
311
312#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
313/// The published state of the volume.
314/// * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed.
315/// * `published` The volume is published successfully to the node.
316/// * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so.
317/// * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller.
318pub enum ClusterVolumePublishStatusInlineItemStateInlineItem {
319    #[serde(rename = "pending-publish")]
320    PendingPublish,
321    #[serde(rename = "published")]
322    Published,
323    #[serde(rename = "pending-node-unpublish")]
324    PendingNodeUnpublish,
325    #[serde(rename = "pending-controller-unpublish")]
326    PendingControllerUnpublish,
327}
328
329impl AsRef<str> for ClusterVolumePublishStatusInlineItemStateInlineItem {
330    fn as_ref(&self) -> &str {
331        match self {
332            ClusterVolumePublishStatusInlineItemStateInlineItem::PendingPublish => {
333                "pending-publish"
334            }
335            ClusterVolumePublishStatusInlineItemStateInlineItem::Published => "published",
336            ClusterVolumePublishStatusInlineItemStateInlineItem::PendingNodeUnpublish => {
337                "pending-node-unpublish"
338            }
339            ClusterVolumePublishStatusInlineItemStateInlineItem::PendingControllerUnpublish => {
340                "pending-controller-unpublish"
341            }
342        }
343    }
344}
345
346impl std::fmt::Display for ClusterVolumePublishStatusInlineItemStateInlineItem {
347    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
348        write!(f, "{}", self.as_ref())
349    }
350}
351
352#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
353/// Cluster-specific options used to create the volume.
354pub struct ClusterVolumeSpec {
355    #[serde(rename = "AccessMode")]
356    #[serde(skip_serializing_if = "Option::is_none")]
357    /// Defines how the volume is used by tasks.
358    pub access_mode: Option<ClusterVolumeSpecAccessModeInlineItem>,
359    #[serde(rename = "Group")]
360    #[serde(skip_serializing_if = "Option::is_none")]
361    /// Group defines the volume group of this volume. Volumes belonging to
362    /// the same group can be referred to by group name when creating
363    /// Services.  Referring to a volume by group instructs Swarm to treat
364    /// volumes in that group interchangeably for the purpose of scheduling.
365    /// Volumes with an empty string for a group technically all belong to
366    /// the same, emptystring group.
367    pub group: Option<String>,
368}
369
370#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
371/// Defines how the volume is used by tasks.
372pub struct ClusterVolumeSpecAccessModeInlineItem {
373    #[serde(rename = "AccessibilityRequirements")]
374    #[serde(skip_serializing_if = "Option::is_none")]
375    /// Requirements for the accessible topology of the volume. These
376    /// fields are optional. For an in-depth description of what these
377    /// fields mean, see the CSI specification.
378    pub accessibility_requirements:
379        Option<ClusterVolumeSpecAccessModeInlineItemAccessibilityRequirementsInlineItem>,
380    #[serde(rename = "Availability")]
381    #[serde(skip_serializing_if = "Option::is_none")]
382    /// The availability of the volume for use in tasks.
383    /// - `active` The volume is fully available for scheduling on the cluster
384    /// - `pause` No new workloads should use the volume, but existing workloads are not stopped.
385    /// - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started.
386    pub availability: Option<String>,
387    #[serde(rename = "CapacityRange")]
388    #[serde(skip_serializing_if = "Option::is_none")]
389    /// The desired capacity that the volume should be created with. If
390    /// empty, the plugin will decide the capacity.
391    pub capacity_range: Option<ClusterVolumeSpecAccessModeInlineItemCapacityRangeInlineItem>,
392    #[serde(rename = "MountVolume")]
393    #[serde(skip_serializing_if = "Option::is_none")]
394    /// Options for using this volume as a Mount-type volume.
395    ///
396    ///     Either MountVolume or BlockVolume, but not both, must be
397    ///     present.
398    ///   properties:
399    ///     FsType:
400    ///       type: "string"
401    ///       description: |
402    ///         Specifies the filesystem type for the mount volume.
403    ///         Optional.
404    ///     MountFlags:
405    ///       type: "array"
406    ///       description: |
407    ///         Flags to pass when mounting the volume. Optional.
408    ///       items:
409    ///         type: "string"
410    /// BlockVolume:
411    ///   type: "object"
412    ///   description: |
413    ///     Options for using this volume as a Block-type volume.
414    ///     Intentionally empty.
415    pub mount_volume: Option<Value>,
416    #[serde(rename = "Scope")]
417    #[serde(skip_serializing_if = "Option::is_none")]
418    /// The set of nodes this volume can be used on at one time.
419    /// - `single` The volume may only be scheduled to one node at a time.
420    /// - `multi` the volume may be scheduled to any supported number of nodes at a time.
421    pub scope: Option<String>,
422    #[serde(rename = "Secrets")]
423    #[serde(skip_serializing_if = "Option::is_none")]
424    /// Swarm Secrets that are passed to the CSI storage plugin when
425    /// operating on this volume.
426    pub secrets: Option<Vec<ClusterVolumeSpecAccessModeInlineItemSecretsInlineItem>>,
427    #[serde(rename = "Sharing")]
428    #[serde(skip_serializing_if = "Option::is_none")]
429    /// The number and way that different tasks can use this volume
430    /// at one time.
431    /// - `none` The volume may only be used by one task at a time.
432    /// - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly
433    /// - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write.
434    /// - `all` The volume may have any number of readers and writers.
435    pub sharing: Option<String>,
436}
437
438#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
439/// Requirements for the accessible topology of the volume. These
440/// fields are optional. For an in-depth description of what these
441/// fields mean, see the CSI specification.
442pub struct ClusterVolumeSpecAccessModeInlineItemAccessibilityRequirementsInlineItem {
443    #[serde(rename = "Preferred")]
444    #[serde(skip_serializing_if = "Option::is_none")]
445    /// A list of topologies that the volume should attempt to be
446    /// provisioned in.
447    pub preferred: Option<Vec<Topology>>,
448    #[serde(rename = "Requisite")]
449    #[serde(skip_serializing_if = "Option::is_none")]
450    /// A list of required topologies, at least one of which the
451    /// volume must be accessible from.
452    pub requisite: Option<Vec<Topology>>,
453}
454
455#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
456/// The availability of the volume for use in tasks.
457/// - `active` The volume is fully available for scheduling on the cluster
458/// - `pause` No new workloads should use the volume, but existing workloads are not stopped.
459/// - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started.
460pub enum ClusterVolumeSpecAccessModeInlineItemAvailabilityInlineItem {
461    #[serde(rename = "active")]
462    Active,
463    #[serde(rename = "pause")]
464    Pause,
465    #[serde(rename = "drain")]
466    Drain,
467}
468
469impl AsRef<str> for ClusterVolumeSpecAccessModeInlineItemAvailabilityInlineItem {
470    fn as_ref(&self) -> &str {
471        match self {
472            ClusterVolumeSpecAccessModeInlineItemAvailabilityInlineItem::Active => "active",
473            ClusterVolumeSpecAccessModeInlineItemAvailabilityInlineItem::Pause => "pause",
474            ClusterVolumeSpecAccessModeInlineItemAvailabilityInlineItem::Drain => "drain",
475        }
476    }
477}
478
479impl std::fmt::Display for ClusterVolumeSpecAccessModeInlineItemAvailabilityInlineItem {
480    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
481        write!(f, "{}", self.as_ref())
482    }
483}
484
485#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
486/// The desired capacity that the volume should be created with. If
487/// empty, the plugin will decide the capacity.
488pub struct ClusterVolumeSpecAccessModeInlineItemCapacityRangeInlineItem {
489    #[serde(rename = "LimitBytes")]
490    #[serde(skip_serializing_if = "Option::is_none")]
491    /// The volume must not be bigger than this. The value of 0
492    /// indicates an unspecified maximum.
493    pub limit_bytes: Option<i64>,
494    #[serde(rename = "RequiredBytes")]
495    #[serde(skip_serializing_if = "Option::is_none")]
496    /// The volume must be at least this big. The value of 0
497    /// indicates an unspecified minimum
498    pub required_bytes: Option<i64>,
499}
500
501#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
502/// The set of nodes this volume can be used on at one time.
503/// - `single` The volume may only be scheduled to one node at a time.
504/// - `multi` the volume may be scheduled to any supported number of nodes at a time.
505pub enum ClusterVolumeSpecAccessModeInlineItemScopeInlineItem {
506    #[serde(rename = "single")]
507    Single,
508    #[serde(rename = "multi")]
509    Multi,
510}
511
512impl AsRef<str> for ClusterVolumeSpecAccessModeInlineItemScopeInlineItem {
513    fn as_ref(&self) -> &str {
514        match self {
515            ClusterVolumeSpecAccessModeInlineItemScopeInlineItem::Single => "single",
516            ClusterVolumeSpecAccessModeInlineItemScopeInlineItem::Multi => "multi",
517        }
518    }
519}
520
521impl std::fmt::Display for ClusterVolumeSpecAccessModeInlineItemScopeInlineItem {
522    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
523        write!(f, "{}", self.as_ref())
524    }
525}
526
527#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
528/// One cluster volume secret entry. Defines a key-value pair that
529/// is passed to the plugin.
530pub struct ClusterVolumeSpecAccessModeInlineItemSecretsInlineItem {
531    #[serde(rename = "Key")]
532    #[serde(skip_serializing_if = "Option::is_none")]
533    /// Key is the name of the key of the key-value pair passed to
534    /// the plugin.
535    pub key: Option<String>,
536    #[serde(rename = "Secret")]
537    #[serde(skip_serializing_if = "Option::is_none")]
538    /// Secret is the swarm Secret object from which to read data.
539    /// This can be a Secret name or ID. The Secret data is
540    /// retrieved by swarm and used as the value of the key-value
541    /// pair passed to the plugin.
542    pub secret: Option<String>,
543}
544
545#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
546/// The number and way that different tasks can use this volume
547/// at one time.
548/// - `none` The volume may only be used by one task at a time.
549/// - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly
550/// - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write.
551/// - `all` The volume may have any number of readers and writers.
552pub enum ClusterVolumeSpecAccessModeInlineItemSharingInlineItem {
553    #[serde(rename = "none")]
554    None,
555    #[serde(rename = "readonly")]
556    Readonly,
557    #[serde(rename = "onewriter")]
558    Onewriter,
559    #[serde(rename = "all")]
560    All,
561}
562
563impl AsRef<str> for ClusterVolumeSpecAccessModeInlineItemSharingInlineItem {
564    fn as_ref(&self) -> &str {
565        match self {
566            ClusterVolumeSpecAccessModeInlineItemSharingInlineItem::None => "none",
567            ClusterVolumeSpecAccessModeInlineItemSharingInlineItem::Readonly => "readonly",
568            ClusterVolumeSpecAccessModeInlineItemSharingInlineItem::Onewriter => "onewriter",
569            ClusterVolumeSpecAccessModeInlineItemSharingInlineItem::All => "all",
570        }
571    }
572}
573
574impl std::fmt::Display for ClusterVolumeSpecAccessModeInlineItemSharingInlineItem {
575    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
576        write!(f, "{}", self.as_ref())
577    }
578}
579
580#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
581/// Commit holds the Git-commit (SHA1) that a binary was built from, as
582/// reported in the version-string of external tools, such as `containerd`,
583/// or `runC`.
584pub struct Commit {
585    #[serde(rename = "Expected")]
586    #[serde(skip_serializing_if = "Option::is_none")]
587    /// Commit ID of external tool expected by dockerd as set at build time.
588    pub expected: Option<String>,
589    #[serde(rename = "ID")]
590    #[serde(skip_serializing_if = "Option::is_none")]
591    /// Actual commit ID of external tool.
592    pub id: Option<String>,
593}
594
595#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
596pub struct ComponentVersion {
597    #[serde(rename = "Details")]
598    #[serde(skip_serializing_if = "Option::is_none")]
599    /// Key/value pairs of strings with additional information about the
600    /// component. These values are intended for informational purposes
601    /// only, and their content is not defined, and not part of the API
602    /// specification.
603    ///
604    /// These messages can be printed by the client as information to the user.
605    pub details: Option<Value>,
606    #[serde(rename = "Name")]
607    /// Name of the component
608    pub name: String,
609    #[serde(rename = "Version")]
610    /// Version of the component
611    pub version: String,
612}
613
614#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
615pub struct Config {
616    #[serde(rename = "CreatedAt")]
617    #[serde(skip_serializing_if = "Option::is_none")]
618    pub created_at: Option<DateTime<Utc>>,
619    #[serde(rename = "ID")]
620    #[serde(skip_serializing_if = "Option::is_none")]
621    pub id: Option<String>,
622    #[serde(rename = "Spec")]
623    pub spec: Option<ConfigSpec>,
624    #[serde(rename = "UpdatedAt")]
625    #[serde(skip_serializing_if = "Option::is_none")]
626    pub updated_at: Option<DateTime<Utc>>,
627    #[serde(rename = "Version")]
628    pub version: Option<ObjectVersion>,
629}
630
631#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
632pub struct ConfigCreateBodyParam {
633    #[serde(rename = "Data")]
634    #[serde(skip_serializing_if = "Option::is_none")]
635    /// Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5))
636    /// config data.
637    pub data: Option<String>,
638    #[serde(rename = "Labels")]
639    #[serde(skip_serializing_if = "Option::is_none")]
640    /// User-defined key/value metadata.
641    pub labels: Option<HashMap<String, String>>,
642    #[serde(rename = "Name")]
643    #[serde(skip_serializing_if = "Option::is_none")]
644    /// User-defined name of the config.
645    pub name: Option<String>,
646    #[serde(rename = "Templating")]
647    pub templating: Option<Driver>,
648}
649
650/// no error
651pub type ConfigList200Response = Vec<Config>;
652
653#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
654pub struct ConfigSpec {
655    #[serde(rename = "Data")]
656    #[serde(skip_serializing_if = "Option::is_none")]
657    /// Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5))
658    /// config data.
659    pub data: Option<String>,
660    #[serde(rename = "Labels")]
661    #[serde(skip_serializing_if = "Option::is_none")]
662    /// User-defined key/value metadata.
663    pub labels: Option<HashMap<String, String>>,
664    #[serde(rename = "Name")]
665    #[serde(skip_serializing_if = "Option::is_none")]
666    /// User-defined name of the config.
667    pub name: Option<String>,
668    #[serde(rename = "Templating")]
669    pub templating: Option<Driver>,
670}
671
672/// The list of changes
673pub type ContainerChanges200Response = Vec<FilesystemChange>;
674
675#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
676/// Configuration for a container that is portable between hosts.
677///
678/// When used as `ContainerConfig` field in an image, `ContainerConfig` is an
679/// optional field containing the configuration of the container that was last
680/// committed when creating the image.
681///
682/// Previous versions of Docker builder used this field to store build cache,
683/// and it is not in active use anymore.
684pub struct ContainerConfig {
685    #[serde(rename = "ArgsEscaped")]
686    #[serde(skip_serializing_if = "Option::is_none")]
687    /// Command is already escaped (Windows only)
688    pub args_escaped: Option<bool>,
689    #[serde(rename = "AttachStderr")]
690    #[serde(skip_serializing_if = "Option::is_none")]
691    /// Whether to attach to `stderr`.
692    pub attach_stderr: Option<bool>,
693    #[serde(rename = "AttachStdin")]
694    #[serde(skip_serializing_if = "Option::is_none")]
695    /// Whether to attach to `stdin`.
696    pub attach_stdin: Option<bool>,
697    #[serde(rename = "AttachStdout")]
698    #[serde(skip_serializing_if = "Option::is_none")]
699    /// Whether to attach to `stdout`.
700    pub attach_stdout: Option<bool>,
701    #[serde(rename = "Cmd")]
702    #[serde(skip_serializing_if = "Option::is_none")]
703    /// Command to run specified as a string or an array of strings.
704    pub cmd: Option<Vec<String>>,
705    #[serde(rename = "Domainname")]
706    #[serde(skip_serializing_if = "Option::is_none")]
707    /// The domain name to use for the container.
708    pub domainname: Option<String>,
709    #[serde(rename = "Entrypoint")]
710    #[serde(skip_serializing_if = "Option::is_none")]
711    /// The entry point for the container as a string or an array of strings.
712    ///
713    /// If the array consists of exactly one empty string (`[""]`) then the
714    /// entry point is reset to system default (i.e., the entry point used by
715    /// docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`).
716    pub entrypoint: Option<Vec<String>>,
717    #[serde(rename = "Env")]
718    #[serde(skip_serializing_if = "Option::is_none")]
719    /// A list of environment variables to set inside the container in the
720    /// form `["VAR=value", ...]`. A variable without `=` is removed from the
721    /// environment, rather than to have an empty value.
722    pub env: Option<Vec<String>>,
723    #[serde(rename = "ExposedPorts")]
724    #[serde(skip_serializing_if = "Option::is_none")]
725    /// An object mapping ports to an empty object in the form:
726    ///
727    /// `{"<port>/<tcp|udp|sctp>": {}}`
728    pub exposed_ports: Option<HashMap<String, Value>>,
729    #[serde(rename = "Healthcheck")]
730    pub healthcheck: Option<HealthConfig>,
731    #[serde(rename = "Hostname")]
732    #[serde(skip_serializing_if = "Option::is_none")]
733    /// The hostname to use for the container, as a valid RFC 1123 hostname.
734    pub hostname: Option<String>,
735    #[serde(rename = "Image")]
736    #[serde(skip_serializing_if = "Option::is_none")]
737    /// The name (or reference) of the image to use when creating the container,
738    /// or which was used when the container was created.
739    pub image: Option<String>,
740    #[serde(rename = "Labels")]
741    #[serde(skip_serializing_if = "Option::is_none")]
742    /// User-defined key/value metadata.
743    pub labels: Option<HashMap<String, String>>,
744    #[serde(rename = "MacAddress")]
745    #[serde(skip_serializing_if = "Option::is_none")]
746    /// MAC address of the container.
747    pub mac_address: Option<String>,
748    #[serde(rename = "NetworkDisabled")]
749    #[serde(skip_serializing_if = "Option::is_none")]
750    /// Disable networking for the container.
751    pub network_disabled: Option<bool>,
752    #[serde(rename = "OnBuild")]
753    #[serde(skip_serializing_if = "Option::is_none")]
754    /// `ONBUILD` metadata that were defined in the image's `Dockerfile`.
755    pub on_build: Option<Vec<String>>,
756    #[serde(rename = "OpenStdin")]
757    #[serde(skip_serializing_if = "Option::is_none")]
758    /// Open `stdin`
759    pub open_stdin: Option<bool>,
760    #[serde(rename = "Shell")]
761    #[serde(skip_serializing_if = "Option::is_none")]
762    /// Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell.
763    pub shell: Option<Vec<String>>,
764    #[serde(rename = "StdinOnce")]
765    #[serde(skip_serializing_if = "Option::is_none")]
766    /// Close `stdin` after one attached client disconnects
767    pub stdin_once: Option<bool>,
768    #[serde(rename = "StopSignal")]
769    #[serde(skip_serializing_if = "Option::is_none")]
770    /// Signal to stop a container as a string or unsigned integer.
771    pub stop_signal: Option<String>,
772    #[serde(rename = "StopTimeout")]
773    #[serde(skip_serializing_if = "Option::is_none")]
774    /// Timeout to stop a container in seconds.
775    pub stop_timeout: Option<isize>,
776    #[serde(rename = "Tty")]
777    #[serde(skip_serializing_if = "Option::is_none")]
778    /// Attach standard streams to a TTY, including `stdin` if it is not closed.
779    pub tty: Option<bool>,
780    #[serde(rename = "User")]
781    #[serde(skip_serializing_if = "Option::is_none")]
782    /// The user that commands are run as inside the container.
783    pub user: Option<String>,
784    #[serde(rename = "Volumes")]
785    #[serde(skip_serializing_if = "Option::is_none")]
786    /// An object mapping mount point paths inside the container to empty
787    /// objects.
788    pub volumes: Option<HashMap<String, Value>>,
789    #[serde(rename = "WorkingDir")]
790    #[serde(skip_serializing_if = "Option::is_none")]
791    /// The working directory for commands to run in.
792    pub working_dir: Option<String>,
793}
794
795#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
796/// Configuration for a container that is portable between hosts.
797///
798/// When used as `ContainerConfig` field in an image, `ContainerConfig` is an
799/// optional field containing the configuration of the container that was last
800/// committed when creating the image.
801///
802/// Previous versions of Docker builder used this field to store build cache,
803/// and it is not in active use anymore.
804pub struct ContainerCreateBodyParam {
805    #[serde(rename = "ArgsEscaped")]
806    #[serde(skip_serializing_if = "Option::is_none")]
807    /// Command is already escaped (Windows only)
808    pub args_escaped: Option<bool>,
809    #[serde(rename = "AttachStderr")]
810    #[serde(skip_serializing_if = "Option::is_none")]
811    /// Whether to attach to `stderr`.
812    pub attach_stderr: Option<bool>,
813    #[serde(rename = "AttachStdin")]
814    #[serde(skip_serializing_if = "Option::is_none")]
815    /// Whether to attach to `stdin`.
816    pub attach_stdin: Option<bool>,
817    #[serde(rename = "AttachStdout")]
818    #[serde(skip_serializing_if = "Option::is_none")]
819    /// Whether to attach to `stdout`.
820    pub attach_stdout: Option<bool>,
821    #[serde(rename = "Cmd")]
822    #[serde(skip_serializing_if = "Option::is_none")]
823    /// Command to run specified as a string or an array of strings.
824    pub cmd: Option<Vec<String>>,
825    #[serde(rename = "Domainname")]
826    #[serde(skip_serializing_if = "Option::is_none")]
827    /// The domain name to use for the container.
828    pub domainname: Option<String>,
829    #[serde(rename = "Entrypoint")]
830    #[serde(skip_serializing_if = "Option::is_none")]
831    /// The entry point for the container as a string or an array of strings.
832    ///
833    /// If the array consists of exactly one empty string (`[""]`) then the
834    /// entry point is reset to system default (i.e., the entry point used by
835    /// docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`).
836    pub entrypoint: Option<Vec<String>>,
837    #[serde(rename = "Env")]
838    #[serde(skip_serializing_if = "Option::is_none")]
839    /// A list of environment variables to set inside the container in the
840    /// form `["VAR=value", ...]`. A variable without `=` is removed from the
841    /// environment, rather than to have an empty value.
842    pub env: Option<Vec<String>>,
843    #[serde(rename = "ExposedPorts")]
844    #[serde(skip_serializing_if = "Option::is_none")]
845    /// An object mapping ports to an empty object in the form:
846    ///
847    /// `{"<port>/<tcp|udp|sctp>": {}}`
848    pub exposed_ports: Option<HashMap<String, Value>>,
849    #[serde(rename = "Healthcheck")]
850    pub healthcheck: Option<HealthConfig>,
851    #[serde(rename = "HostConfig")]
852    pub host_config: Option<Value>,
853    #[serde(rename = "Hostname")]
854    #[serde(skip_serializing_if = "Option::is_none")]
855    /// The hostname to use for the container, as a valid RFC 1123 hostname.
856    pub hostname: Option<String>,
857    #[serde(rename = "Image")]
858    #[serde(skip_serializing_if = "Option::is_none")]
859    /// The name (or reference) of the image to use when creating the container,
860    /// or which was used when the container was created.
861    pub image: Option<String>,
862    #[serde(rename = "Labels")]
863    #[serde(skip_serializing_if = "Option::is_none")]
864    /// User-defined key/value metadata.
865    pub labels: Option<HashMap<String, String>>,
866    #[serde(rename = "MacAddress")]
867    #[serde(skip_serializing_if = "Option::is_none")]
868    /// MAC address of the container.
869    pub mac_address: Option<String>,
870    #[serde(rename = "NetworkDisabled")]
871    #[serde(skip_serializing_if = "Option::is_none")]
872    /// Disable networking for the container.
873    pub network_disabled: Option<bool>,
874    #[serde(rename = "NetworkingConfig")]
875    pub networking_config: Option<NetworkingConfig>,
876    #[serde(rename = "OnBuild")]
877    #[serde(skip_serializing_if = "Option::is_none")]
878    /// `ONBUILD` metadata that were defined in the image's `Dockerfile`.
879    pub on_build: Option<Vec<String>>,
880    #[serde(rename = "OpenStdin")]
881    #[serde(skip_serializing_if = "Option::is_none")]
882    /// Open `stdin`
883    pub open_stdin: Option<bool>,
884    #[serde(rename = "Shell")]
885    #[serde(skip_serializing_if = "Option::is_none")]
886    /// Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell.
887    pub shell: Option<Vec<String>>,
888    #[serde(rename = "StdinOnce")]
889    #[serde(skip_serializing_if = "Option::is_none")]
890    /// Close `stdin` after one attached client disconnects
891    pub stdin_once: Option<bool>,
892    #[serde(rename = "StopSignal")]
893    #[serde(skip_serializing_if = "Option::is_none")]
894    /// Signal to stop a container as a string or unsigned integer.
895    pub stop_signal: Option<String>,
896    #[serde(rename = "StopTimeout")]
897    #[serde(skip_serializing_if = "Option::is_none")]
898    /// Timeout to stop a container in seconds.
899    pub stop_timeout: Option<isize>,
900    #[serde(rename = "Tty")]
901    #[serde(skip_serializing_if = "Option::is_none")]
902    /// Attach standard streams to a TTY, including `stdin` if it is not closed.
903    pub tty: Option<bool>,
904    #[serde(rename = "User")]
905    #[serde(skip_serializing_if = "Option::is_none")]
906    /// The user that commands are run as inside the container.
907    pub user: Option<String>,
908    #[serde(rename = "Volumes")]
909    #[serde(skip_serializing_if = "Option::is_none")]
910    /// An object mapping mount point paths inside the container to empty
911    /// objects.
912    pub volumes: Option<HashMap<String, Value>>,
913    #[serde(rename = "WorkingDir")]
914    #[serde(skip_serializing_if = "Option::is_none")]
915    /// The working directory for commands to run in.
916    pub working_dir: Option<String>,
917}
918
919#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
920/// OK response to ContainerCreate operation
921pub struct ContainerCreateResponse {
922    #[serde(rename = "Id")]
923    /// The ID of the created container
924    pub id: String,
925    #[serde(rename = "Warnings")]
926    #[serde(default)]
927    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
928    /// Warnings encountered when creating the container
929    pub warnings: Vec<String>,
930}
931
932#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
933pub struct ContainerExecExecConfigParam {
934    #[serde(rename = "AttachStderr")]
935    #[serde(skip_serializing_if = "Option::is_none")]
936    /// Attach to `stderr` of the exec command.
937    pub attach_stderr: Option<bool>,
938    #[serde(rename = "AttachStdin")]
939    #[serde(skip_serializing_if = "Option::is_none")]
940    /// Attach to `stdin` of the exec command.
941    pub attach_stdin: Option<bool>,
942    #[serde(rename = "AttachStdout")]
943    #[serde(skip_serializing_if = "Option::is_none")]
944    /// Attach to `stdout` of the exec command.
945    pub attach_stdout: Option<bool>,
946    #[serde(rename = "Cmd")]
947    #[serde(skip_serializing_if = "Option::is_none")]
948    /// Command to run, as a string or array of strings.
949    pub cmd: Option<Vec<String>>,
950    #[serde(rename = "ConsoleSize")]
951    #[serde(skip_serializing_if = "Option::is_none")]
952    /// Initial console size, as an `[height, width]` array.
953    pub console_size: Option<Vec<isize>>,
954    #[serde(rename = "DetachKeys")]
955    #[serde(skip_serializing_if = "Option::is_none")]
956    /// Override the key sequence for detaching a container. Format is
957    /// a single character `[a-Z]` or `ctrl-<value>` where `<value>`
958    /// is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
959    pub detach_keys: Option<String>,
960    #[serde(rename = "Env")]
961    #[serde(skip_serializing_if = "Option::is_none")]
962    /// A list of environment variables in the form `["VAR=value", ...]`.
963    pub env: Option<Vec<String>>,
964    #[serde(rename = "Privileged")]
965    #[serde(skip_serializing_if = "Option::is_none")]
966    /// Runs the exec process with extended privileges.
967    pub privileged: Option<bool>,
968    #[serde(rename = "Tty")]
969    #[serde(skip_serializing_if = "Option::is_none")]
970    /// Allocate a pseudo-TTY.
971    pub tty: Option<bool>,
972    #[serde(rename = "User")]
973    #[serde(skip_serializing_if = "Option::is_none")]
974    /// The user, and optionally, group to run the exec process inside
975    /// the container. Format is one of: `user`, `user:group`, `uid`,
976    /// or `uid:gid`.
977    pub user: Option<String>,
978    #[serde(rename = "WorkingDir")]
979    #[serde(skip_serializing_if = "Option::is_none")]
980    /// The working directory for the exec process inside the container.
981    pub working_dir: Option<String>,
982}
983
984#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
985/// no error
986pub struct ContainerInspect200Response {
987    #[serde(rename = "AppArmorProfile")]
988    #[serde(skip_serializing_if = "Option::is_none")]
989    pub app_armor_profile: Option<String>,
990    #[serde(rename = "Args")]
991    #[serde(skip_serializing_if = "Option::is_none")]
992    /// The arguments to the command being run
993    pub args: Option<Vec<String>>,
994    #[serde(rename = "Config")]
995    pub config: Option<ContainerConfig>,
996    #[serde(rename = "Created")]
997    #[serde(skip_serializing_if = "Option::is_none")]
998    /// The time the container was created
999    pub created: Option<String>,
1000    #[serde(rename = "Driver")]
1001    #[serde(skip_serializing_if = "Option::is_none")]
1002    pub driver: Option<String>,
1003    #[serde(rename = "ExecIDs")]
1004    #[serde(skip_serializing_if = "Option::is_none")]
1005    /// IDs of exec instances that are running in the container.
1006    pub exec_i_ds: Option<Vec<String>>,
1007    #[serde(rename = "GraphDriver")]
1008    pub graph_driver: Option<GraphDriverData>,
1009    #[serde(rename = "HostConfig")]
1010    pub host_config: Option<Value>,
1011    #[serde(rename = "HostnamePath")]
1012    #[serde(skip_serializing_if = "Option::is_none")]
1013    pub hostname_path: Option<String>,
1014    #[serde(rename = "HostsPath")]
1015    #[serde(skip_serializing_if = "Option::is_none")]
1016    pub hosts_path: Option<String>,
1017    #[serde(rename = "Id")]
1018    #[serde(skip_serializing_if = "Option::is_none")]
1019    /// The ID of the container
1020    pub id: Option<String>,
1021    #[serde(rename = "Image")]
1022    #[serde(skip_serializing_if = "Option::is_none")]
1023    /// The container's image ID
1024    pub image: Option<String>,
1025    #[serde(rename = "LogPath")]
1026    #[serde(skip_serializing_if = "Option::is_none")]
1027    pub log_path: Option<String>,
1028    #[serde(rename = "MountLabel")]
1029    #[serde(skip_serializing_if = "Option::is_none")]
1030    pub mount_label: Option<String>,
1031    #[serde(rename = "Mounts")]
1032    #[serde(skip_serializing_if = "Option::is_none")]
1033    pub mounts: Option<Vec<MountPoint>>,
1034    #[serde(rename = "Name")]
1035    #[serde(skip_serializing_if = "Option::is_none")]
1036    pub name: Option<String>,
1037    #[serde(rename = "NetworkSettings")]
1038    pub network_settings: Option<NetworkSettings>,
1039    #[serde(rename = "Path")]
1040    #[serde(skip_serializing_if = "Option::is_none")]
1041    /// The path to the command being run
1042    pub path: Option<String>,
1043    #[serde(rename = "Platform")]
1044    #[serde(skip_serializing_if = "Option::is_none")]
1045    pub platform: Option<String>,
1046    #[serde(rename = "ProcessLabel")]
1047    #[serde(skip_serializing_if = "Option::is_none")]
1048    pub process_label: Option<String>,
1049    #[serde(rename = "ResolvConfPath")]
1050    #[serde(skip_serializing_if = "Option::is_none")]
1051    pub resolv_conf_path: Option<String>,
1052    #[serde(rename = "RestartCount")]
1053    #[serde(skip_serializing_if = "Option::is_none")]
1054    pub restart_count: Option<isize>,
1055    #[serde(rename = "SizeRootFs")]
1056    #[serde(skip_serializing_if = "Option::is_none")]
1057    /// The total size of all the files in this container.
1058    pub size_root_fs: Option<i64>,
1059    #[serde(rename = "SizeRw")]
1060    #[serde(skip_serializing_if = "Option::is_none")]
1061    /// The size of files that have been created or changed by this
1062    /// container.
1063    pub size_rw: Option<i64>,
1064    #[serde(rename = "State")]
1065    pub state: Option<ContainerState>,
1066}
1067
1068/// no error
1069pub type ContainerList200Response = Vec<ContainerSummary>;
1070
1071/// logs returned as a stream in response body.
1072/// For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach).
1073/// Note that unlike the attach endpoint, the logs endpoint does not
1074/// upgrade the connection and does not set Content-Type.
1075pub type ContainerLogs200Response = Vec<u8>;
1076
1077#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1078/// No error
1079pub struct ContainerPrune200Response {
1080    #[serde(rename = "ContainersDeleted")]
1081    #[serde(skip_serializing_if = "Option::is_none")]
1082    /// Container IDs that were deleted
1083    pub containers_deleted: Option<Vec<String>>,
1084    #[serde(rename = "SpaceReclaimed")]
1085    #[serde(skip_serializing_if = "Option::is_none")]
1086    /// Disk space reclaimed in bytes
1087    pub space_reclaimed: Option<i64>,
1088}
1089
1090#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1091/// ContainerState stores container's running state. It's part of ContainerJSONBase
1092/// and will be returned by the "inspect" command.
1093pub struct ContainerState {
1094    #[serde(rename = "Dead")]
1095    #[serde(skip_serializing_if = "Option::is_none")]
1096    pub dead: Option<bool>,
1097    #[serde(rename = "Error")]
1098    #[serde(skip_serializing_if = "Option::is_none")]
1099    pub error: Option<String>,
1100    #[serde(rename = "ExitCode")]
1101    #[serde(skip_serializing_if = "Option::is_none")]
1102    /// The last exit code of this container
1103    pub exit_code: Option<isize>,
1104    #[serde(rename = "FinishedAt")]
1105    #[serde(skip_serializing_if = "Option::is_none")]
1106    /// The time when this container last exited.
1107    pub finished_at: Option<String>,
1108    #[serde(rename = "Health")]
1109    pub health: Option<Health>,
1110    #[serde(rename = "OOMKilled")]
1111    #[serde(skip_serializing_if = "Option::is_none")]
1112    /// Whether a process within this container has been killed because it ran
1113    /// out of memory since the container was last started.
1114    pub oom_killed: Option<bool>,
1115    #[serde(rename = "Paused")]
1116    #[serde(skip_serializing_if = "Option::is_none")]
1117    /// Whether this container is paused.
1118    pub paused: Option<bool>,
1119    #[serde(rename = "Pid")]
1120    #[serde(skip_serializing_if = "Option::is_none")]
1121    /// The process ID of this container
1122    pub pid: Option<isize>,
1123    #[serde(rename = "Restarting")]
1124    #[serde(skip_serializing_if = "Option::is_none")]
1125    /// Whether this container is restarting.
1126    pub restarting: Option<bool>,
1127    #[serde(rename = "Running")]
1128    #[serde(skip_serializing_if = "Option::is_none")]
1129    /// Whether this container is running.
1130    ///
1131    /// Note that a running container can be _paused_. The `Running` and `Paused`
1132    /// booleans are not mutually exclusive:
1133    ///
1134    /// When pausing a container (on Linux), the freezer cgroup is used to suspend
1135    /// all processes in the container. Freezing the process requires the process to
1136    /// be running. As a result, paused containers are both `Running` _and_ `Paused`.
1137    ///
1138    /// Use the `Status` field instead to determine if a container's state is "running".
1139    pub running: Option<bool>,
1140    #[serde(rename = "StartedAt")]
1141    #[serde(skip_serializing_if = "Option::is_none")]
1142    /// The time when this container was last started.
1143    pub started_at: Option<String>,
1144    #[serde(rename = "Status")]
1145    #[serde(skip_serializing_if = "Option::is_none")]
1146    /// String representation of the container state. Can be one of "created",
1147    /// "running", "paused", "restarting", "removing", "exited", or "dead".
1148    pub status: Option<String>,
1149}
1150
1151#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1152/// String representation of the container state. Can be one of "created",
1153/// "running", "paused", "restarting", "removing", "exited", or "dead".
1154pub enum ContainerStateStatusInlineItem {
1155    #[serde(rename = "created")]
1156    Created,
1157    #[serde(rename = "running")]
1158    Running,
1159    #[serde(rename = "paused")]
1160    Paused,
1161    #[serde(rename = "restarting")]
1162    Restarting,
1163    #[serde(rename = "removing")]
1164    Removing,
1165    #[serde(rename = "exited")]
1166    Exited,
1167    #[serde(rename = "dead")]
1168    Dead,
1169}
1170
1171impl AsRef<str> for ContainerStateStatusInlineItem {
1172    fn as_ref(&self) -> &str {
1173        match self {
1174            ContainerStateStatusInlineItem::Created => "created",
1175            ContainerStateStatusInlineItem::Running => "running",
1176            ContainerStateStatusInlineItem::Paused => "paused",
1177            ContainerStateStatusInlineItem::Restarting => "restarting",
1178            ContainerStateStatusInlineItem::Removing => "removing",
1179            ContainerStateStatusInlineItem::Exited => "exited",
1180            ContainerStateStatusInlineItem::Dead => "dead",
1181        }
1182    }
1183}
1184
1185impl std::fmt::Display for ContainerStateStatusInlineItem {
1186    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1187        write!(f, "{}", self.as_ref())
1188    }
1189}
1190
1191/// no error
1192pub type ContainerStats200Response = Value;
1193
1194#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1195pub struct ContainerSummary {
1196    #[serde(rename = "Command")]
1197    #[serde(skip_serializing_if = "Option::is_none")]
1198    /// Command to run when starting the container
1199    pub command: Option<String>,
1200    #[serde(rename = "Created")]
1201    #[serde(skip_serializing_if = "Option::is_none")]
1202    /// When the container was created
1203    pub created: Option<i64>,
1204    #[serde(rename = "HostConfig")]
1205    #[serde(skip_serializing_if = "Option::is_none")]
1206    pub host_config: Option<ContainerSummaryHostConfigInlineItem>,
1207    #[serde(rename = "Id")]
1208    #[serde(skip_serializing_if = "Option::is_none")]
1209    /// The ID of this container
1210    pub id: Option<String>,
1211    #[serde(rename = "Image")]
1212    #[serde(skip_serializing_if = "Option::is_none")]
1213    /// The name of the image used when creating this container
1214    pub image: Option<String>,
1215    #[serde(rename = "ImageID")]
1216    #[serde(skip_serializing_if = "Option::is_none")]
1217    /// The ID of the image that this container was created from
1218    pub image_id: Option<String>,
1219    #[serde(rename = "Labels")]
1220    #[serde(skip_serializing_if = "Option::is_none")]
1221    /// User-defined key/value metadata.
1222    pub labels: Option<HashMap<String, String>>,
1223    #[serde(rename = "Mounts")]
1224    #[serde(skip_serializing_if = "Option::is_none")]
1225    pub mounts: Option<Vec<MountPoint>>,
1226    #[serde(rename = "Names")]
1227    #[serde(skip_serializing_if = "Option::is_none")]
1228    /// The names that this container has been given
1229    pub names: Option<Vec<String>>,
1230    #[serde(rename = "NetworkSettings")]
1231    #[serde(skip_serializing_if = "Option::is_none")]
1232    /// A summary of the container's network settings
1233    pub network_settings: Option<ContainerSummaryNetworkSettingsInlineItem>,
1234    #[serde(rename = "Ports")]
1235    #[serde(skip_serializing_if = "Option::is_none")]
1236    /// The ports exposed by this container
1237    pub ports: Option<Vec<Port>>,
1238    #[serde(rename = "SizeRootFs")]
1239    #[serde(skip_serializing_if = "Option::is_none")]
1240    /// The total size of all the files in this container
1241    pub size_root_fs: Option<i64>,
1242    #[serde(rename = "SizeRw")]
1243    #[serde(skip_serializing_if = "Option::is_none")]
1244    /// The size of files that have been created or changed by this container
1245    pub size_rw: Option<i64>,
1246    #[serde(rename = "State")]
1247    #[serde(skip_serializing_if = "Option::is_none")]
1248    /// The state of this container (e.g. `Exited`)
1249    pub state: Option<String>,
1250    #[serde(rename = "Status")]
1251    #[serde(skip_serializing_if = "Option::is_none")]
1252    /// Additional human-readable status of this container (e.g. `Exit 0`)
1253    pub status: Option<String>,
1254}
1255
1256#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1257pub struct ContainerSummaryHostConfigInlineItem {
1258    #[serde(rename = "NetworkMode")]
1259    #[serde(skip_serializing_if = "Option::is_none")]
1260    pub network_mode: Option<String>,
1261}
1262
1263#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1264/// A summary of the container's network settings
1265pub struct ContainerSummaryNetworkSettingsInlineItem {
1266    #[serde(rename = "Networks")]
1267    #[serde(skip_serializing_if = "Option::is_none")]
1268    pub networks: Option<HashMap<String, EndpointSettings>>,
1269}
1270
1271#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1272/// no error
1273pub struct ContainerTop200Response {
1274    #[serde(rename = "Processes")]
1275    #[serde(skip_serializing_if = "Option::is_none")]
1276    /// Each process running in the container, where each is process
1277    /// is an array of values corresponding to the titles.
1278    pub processes: Option<Vec<Vec<String>>>,
1279    #[serde(rename = "Titles")]
1280    #[serde(skip_serializing_if = "Option::is_none")]
1281    /// The ps column titles
1282    pub titles: Option<Vec<String>>,
1283}
1284
1285#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1286/// The container has been updated.
1287pub struct ContainerUpdate200Response {
1288    #[serde(rename = "Warnings")]
1289    #[serde(skip_serializing_if = "Option::is_none")]
1290    pub warnings: Option<Vec<String>>,
1291}
1292
1293#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1294/// A container's resources (cgroups config, ulimits, etc)
1295pub struct ContainerUpdateUpdateParam {
1296    #[serde(rename = "BlkioDeviceReadBps")]
1297    #[serde(skip_serializing_if = "Option::is_none")]
1298    /// Limit read rate (bytes per second) from a device, in the form:
1299    ///
1300    /// ```
1301    /// [{"Path": "device_path", "Rate": rate}]
1302    /// ```
1303    pub blkio_device_read_bps: Option<Vec<ThrottleDevice>>,
1304    #[serde(rename = "BlkioDeviceReadIOps")]
1305    #[serde(skip_serializing_if = "Option::is_none")]
1306    /// Limit read rate (IO per second) from a device, in the form:
1307    ///
1308    /// ```
1309    /// [{"Path": "device_path", "Rate": rate}]
1310    /// ```
1311    pub blkio_device_read_i_ops: Option<Vec<ThrottleDevice>>,
1312    #[serde(rename = "BlkioDeviceWriteBps")]
1313    #[serde(skip_serializing_if = "Option::is_none")]
1314    /// Limit write rate (bytes per second) to a device, in the form:
1315    ///
1316    /// ```
1317    /// [{"Path": "device_path", "Rate": rate}]
1318    /// ```
1319    pub blkio_device_write_bps: Option<Vec<ThrottleDevice>>,
1320    #[serde(rename = "BlkioDeviceWriteIOps")]
1321    #[serde(skip_serializing_if = "Option::is_none")]
1322    /// Limit write rate (IO per second) to a device, in the form:
1323    ///
1324    /// ```
1325    /// [{"Path": "device_path", "Rate": rate}]
1326    /// ```
1327    pub blkio_device_write_i_ops: Option<Vec<ThrottleDevice>>,
1328    #[serde(rename = "BlkioWeight")]
1329    #[serde(skip_serializing_if = "Option::is_none")]
1330    /// Block IO weight (relative weight).
1331    pub blkio_weight: Option<isize>,
1332    #[serde(rename = "BlkioWeightDevice")]
1333    #[serde(skip_serializing_if = "Option::is_none")]
1334    /// Block IO weight (relative device weight) in the form:
1335    ///
1336    /// ```
1337    /// [{"Path": "device_path", "Weight": weight}]
1338    /// ```
1339    pub blkio_weight_device: Option<Vec<ContainerUpdateUpdateParamBlkioWeightDeviceInlineItem>>,
1340    #[serde(rename = "CgroupParent")]
1341    #[serde(skip_serializing_if = "Option::is_none")]
1342    /// Path to `cgroups` under which the container's `cgroup` is created. If
1343    /// the path is not absolute, the path is considered to be relative to the
1344    /// `cgroups` path of the init process. Cgroups are created if they do not
1345    /// already exist.
1346    pub cgroup_parent: Option<String>,
1347    #[serde(rename = "CpuCount")]
1348    #[serde(skip_serializing_if = "Option::is_none")]
1349    /// The number of usable CPUs (Windows only).
1350    ///
1351    /// On Windows Server containers, the processor resource controls are
1352    /// mutually exclusive. The order of precedence is `CPUCount` first, then
1353    /// `CPUShares`, and `CPUPercent` last.
1354    pub cpu_count: Option<i64>,
1355    #[serde(rename = "CpuPercent")]
1356    #[serde(skip_serializing_if = "Option::is_none")]
1357    /// The usable percentage of the available CPUs (Windows only).
1358    ///
1359    /// On Windows Server containers, the processor resource controls are
1360    /// mutually exclusive. The order of precedence is `CPUCount` first, then
1361    /// `CPUShares`, and `CPUPercent` last.
1362    pub cpu_percent: Option<i64>,
1363    #[serde(rename = "CpuPeriod")]
1364    #[serde(skip_serializing_if = "Option::is_none")]
1365    /// The length of a CPU period in microseconds.
1366    pub cpu_period: Option<i64>,
1367    #[serde(rename = "CpuQuota")]
1368    #[serde(skip_serializing_if = "Option::is_none")]
1369    /// Microseconds of CPU time that the container can get in a CPU period.
1370    pub cpu_quota: Option<i64>,
1371    #[serde(rename = "CpuRealtimePeriod")]
1372    #[serde(skip_serializing_if = "Option::is_none")]
1373    /// The length of a CPU real-time period in microseconds. Set to 0 to
1374    /// allocate no time allocated to real-time tasks.
1375    pub cpu_realtime_period: Option<i64>,
1376    #[serde(rename = "CpuRealtimeRuntime")]
1377    #[serde(skip_serializing_if = "Option::is_none")]
1378    /// The length of a CPU real-time runtime in microseconds. Set to 0 to
1379    /// allocate no time allocated to real-time tasks.
1380    pub cpu_realtime_runtime: Option<i64>,
1381    #[serde(rename = "CpuShares")]
1382    #[serde(skip_serializing_if = "Option::is_none")]
1383    /// An integer value representing this container's relative CPU weight
1384    /// versus other containers.
1385    pub cpu_shares: Option<isize>,
1386    #[serde(rename = "CpusetCpus")]
1387    #[serde(skip_serializing_if = "Option::is_none")]
1388    /// CPUs in which to allow execution (e.g., `0-3`, `0,1`).
1389    pub cpuset_cpus: Option<String>,
1390    #[serde(rename = "CpusetMems")]
1391    #[serde(skip_serializing_if = "Option::is_none")]
1392    /// Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only
1393    /// effective on NUMA systems.
1394    pub cpuset_mems: Option<String>,
1395    #[serde(rename = "DeviceCgroupRules")]
1396    #[serde(skip_serializing_if = "Option::is_none")]
1397    /// a list of cgroup rules to apply to the container
1398    pub device_cgroup_rules: Option<Vec<String>>,
1399    #[serde(rename = "DeviceRequests")]
1400    #[serde(skip_serializing_if = "Option::is_none")]
1401    /// A list of requests for devices to be sent to device drivers.
1402    pub device_requests: Option<Vec<DeviceRequest>>,
1403    #[serde(rename = "Devices")]
1404    #[serde(skip_serializing_if = "Option::is_none")]
1405    /// A list of devices to add to the container.
1406    pub devices: Option<Vec<DeviceMapping>>,
1407    #[serde(rename = "IOMaximumBandwidth")]
1408    #[serde(skip_serializing_if = "Option::is_none")]
1409    /// Maximum IO in bytes per second for the container system drive
1410    /// (Windows only).
1411    pub io_maximum_bandwidth: Option<i64>,
1412    #[serde(rename = "IOMaximumIOps")]
1413    #[serde(skip_serializing_if = "Option::is_none")]
1414    /// Maximum IOps for the container system drive (Windows only)
1415    pub io_maximum_i_ops: Option<i64>,
1416    #[serde(rename = "Init")]
1417    #[serde(skip_serializing_if = "Option::is_none")]
1418    /// Run an init inside the container that forwards signals and reaps
1419    /// processes. This field is omitted if empty, and the default (as
1420    /// configured on the daemon) is used.
1421    pub init: Option<bool>,
1422    #[serde(rename = "KernelMemoryTCP")]
1423    #[serde(skip_serializing_if = "Option::is_none")]
1424    /// Hard limit for kernel TCP buffer memory (in bytes). Depending on the
1425    /// OCI runtime in use, this option may be ignored. It is no longer supported
1426    /// by the default (runc) runtime.
1427    ///
1428    /// This field is omitted when empty.
1429    pub kernel_memory_tcp: Option<i64>,
1430    #[serde(rename = "Memory")]
1431    #[serde(skip_serializing_if = "Option::is_none")]
1432    /// Memory limit in bytes.
1433    pub memory: Option<i64>,
1434    #[serde(rename = "MemoryReservation")]
1435    #[serde(skip_serializing_if = "Option::is_none")]
1436    /// Memory soft limit in bytes.
1437    pub memory_reservation: Option<i64>,
1438    #[serde(rename = "MemorySwap")]
1439    #[serde(skip_serializing_if = "Option::is_none")]
1440    /// Total memory limit (memory + swap). Set as `-1` to enable unlimited
1441    /// swap.
1442    pub memory_swap: Option<i64>,
1443    #[serde(rename = "MemorySwappiness")]
1444    #[serde(skip_serializing_if = "Option::is_none")]
1445    /// Tune a container's memory swappiness behavior. Accepts an integer
1446    /// between 0 and 100.
1447    pub memory_swappiness: Option<i64>,
1448    #[serde(rename = "NanoCpus")]
1449    #[serde(skip_serializing_if = "Option::is_none")]
1450    /// CPU quota in units of 10<sup>-9</sup> CPUs.
1451    pub nano_cpus: Option<i64>,
1452    #[serde(rename = "OomKillDisable")]
1453    #[serde(skip_serializing_if = "Option::is_none")]
1454    /// Disable OOM Killer for the container.
1455    pub oom_kill_disable: Option<bool>,
1456    #[serde(rename = "PidsLimit")]
1457    #[serde(skip_serializing_if = "Option::is_none")]
1458    /// Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null`
1459    /// to not change.
1460    pub pids_limit: Option<i64>,
1461    #[serde(rename = "RestartPolicy")]
1462    pub restart_policy: Option<RestartPolicy>,
1463    #[serde(rename = "Ulimits")]
1464    #[serde(skip_serializing_if = "Option::is_none")]
1465    /// A list of resource limits to set in the container. For example:
1466    ///
1467    /// ```
1468    /// {"Name": "nofile", "Soft": 1024, "Hard": 2048}
1469    /// ```
1470    pub ulimits: Option<Vec<ContainerUpdateUpdateParamUlimitsInlineItem>>,
1471}
1472
1473#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1474pub struct ContainerUpdateUpdateParamBlkioWeightDeviceInlineItem {
1475    #[serde(rename = "Path")]
1476    #[serde(skip_serializing_if = "Option::is_none")]
1477    pub path: Option<String>,
1478    #[serde(rename = "Weight")]
1479    #[serde(skip_serializing_if = "Option::is_none")]
1480    pub weight: Option<isize>,
1481}
1482
1483#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1484pub struct ContainerUpdateUpdateParamUlimitsInlineItem {
1485    #[serde(rename = "Hard")]
1486    #[serde(skip_serializing_if = "Option::is_none")]
1487    /// Hard limit
1488    pub hard: Option<isize>,
1489    #[serde(rename = "Name")]
1490    #[serde(skip_serializing_if = "Option::is_none")]
1491    /// Name of ulimit
1492    pub name: Option<String>,
1493    #[serde(rename = "Soft")]
1494    #[serde(skip_serializing_if = "Option::is_none")]
1495    /// Soft limit
1496    pub soft: Option<isize>,
1497}
1498
1499#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1500/// container waiting error, if any
1501pub struct ContainerWaitExitError {
1502    #[serde(rename = "Message")]
1503    #[serde(skip_serializing_if = "Option::is_none")]
1504    /// Details of an error
1505    pub message: Option<String>,
1506}
1507
1508#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1509/// OK response to ContainerWait operation
1510pub struct ContainerWaitResponse {
1511    #[serde(rename = "Error")]
1512    pub error: Option<ContainerWaitExitError>,
1513    #[serde(rename = "StatusCode")]
1514    /// Exit code of the container
1515    pub status_code: i64,
1516}
1517
1518#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1519pub struct CreateImageInfo {
1520    #[serde(skip_serializing_if = "Option::is_none")]
1521    pub error: Option<String>,
1522    #[serde(rename = "errorDetail")]
1523    pub error_detail: Option<ErrorDetail>,
1524    #[serde(skip_serializing_if = "Option::is_none")]
1525    pub id: Option<String>,
1526    #[serde(skip_serializing_if = "Option::is_none")]
1527    pub progress: Option<String>,
1528    #[serde(rename = "progressDetail")]
1529    pub progress_detail: Option<ProgressDetail>,
1530    #[serde(skip_serializing_if = "Option::is_none")]
1531    pub status: Option<String>,
1532}
1533
1534#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1535/// A device mapping between the host and container
1536pub struct DeviceMapping {
1537    #[serde(rename = "CgroupPermissions")]
1538    #[serde(skip_serializing_if = "Option::is_none")]
1539    pub cgroup_permissions: Option<String>,
1540    #[serde(rename = "PathInContainer")]
1541    #[serde(skip_serializing_if = "Option::is_none")]
1542    pub path_in_container: Option<String>,
1543    #[serde(rename = "PathOnHost")]
1544    #[serde(skip_serializing_if = "Option::is_none")]
1545    pub path_on_host: Option<String>,
1546}
1547
1548#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1549/// A request for devices to be sent to device drivers
1550pub struct DeviceRequest {
1551    #[serde(rename = "Capabilities")]
1552    #[serde(skip_serializing_if = "Option::is_none")]
1553    /// A list of capabilities; an OR list of AND lists of capabilities.
1554    pub capabilities: Option<Vec<Vec<String>>>,
1555    #[serde(rename = "Count")]
1556    #[serde(skip_serializing_if = "Option::is_none")]
1557    pub count: Option<isize>,
1558    #[serde(rename = "DeviceIDs")]
1559    #[serde(skip_serializing_if = "Option::is_none")]
1560    pub device_i_ds: Option<Vec<String>>,
1561    #[serde(rename = "Driver")]
1562    #[serde(skip_serializing_if = "Option::is_none")]
1563    pub driver: Option<String>,
1564    #[serde(rename = "Options")]
1565    #[serde(skip_serializing_if = "Option::is_none")]
1566    /// Driver-specific options, specified as a key/value pairs. These options
1567    /// are passed directly to the driver.
1568    pub options: Option<HashMap<String, String>>,
1569}
1570
1571#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1572/// Describes the result obtained from contacting the registry to retrieve
1573/// image metadata.
1574pub struct DistributionInspect {
1575    #[serde(rename = "Descriptor")]
1576    pub descriptor: OciDescriptor,
1577    #[serde(rename = "Platforms")]
1578    #[serde(default)]
1579    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
1580    /// An array containing all platforms supported by the image.
1581    pub platforms: Vec<OciPlatform>,
1582}
1583
1584#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1585/// Driver represents a driver (network, logging, secrets).
1586pub struct Driver {
1587    #[serde(rename = "Name")]
1588    /// Name of the driver.
1589    pub name: String,
1590    #[serde(rename = "Options")]
1591    #[serde(skip_serializing_if = "Option::is_none")]
1592    /// Key/value map of driver-specific options.
1593    pub options: Option<HashMap<String, String>>,
1594}
1595
1596#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1597/// EndpointIPAMConfig represents an endpoint's IPAM configuration.
1598pub struct EndpointIpamConfig {
1599    #[serde(rename = "IPv4Address")]
1600    #[serde(skip_serializing_if = "Option::is_none")]
1601    pub i_pv_4_address: Option<String>,
1602    #[serde(rename = "IPv6Address")]
1603    #[serde(skip_serializing_if = "Option::is_none")]
1604    pub i_pv_6_address: Option<String>,
1605    #[serde(rename = "LinkLocalIPs")]
1606    #[serde(skip_serializing_if = "Option::is_none")]
1607    pub link_local_i_ps: Option<Vec<String>>,
1608}
1609
1610#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1611pub struct EndpointPortConfig {
1612    #[serde(rename = "Name")]
1613    #[serde(skip_serializing_if = "Option::is_none")]
1614    pub name: Option<String>,
1615    #[serde(rename = "Protocol")]
1616    #[serde(skip_serializing_if = "Option::is_none")]
1617    pub protocol: Option<String>,
1618    #[serde(rename = "PublishMode")]
1619    #[serde(skip_serializing_if = "Option::is_none")]
1620    /// The mode in which port is published.
1621    ///
1622    /// <p><br /></p>
1623    ///
1624    /// - "ingress" makes the target port accessible on every node,
1625    ///   regardless of whether there is a task for the service running on
1626    ///   that node or not.
1627    /// - "host" bypasses the routing mesh and publish the port directly on
1628    ///   the swarm node where that service is running.
1629    pub publish_mode: Option<String>,
1630    #[serde(rename = "PublishedPort")]
1631    #[serde(skip_serializing_if = "Option::is_none")]
1632    /// The port on the swarm hosts.
1633    pub published_port: Option<isize>,
1634    #[serde(rename = "TargetPort")]
1635    #[serde(skip_serializing_if = "Option::is_none")]
1636    /// The port inside the container.
1637    pub target_port: Option<isize>,
1638}
1639
1640#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1641pub enum EndpointPortConfigProtocolInlineItem {
1642    #[serde(rename = "tcp")]
1643    Tcp,
1644    #[serde(rename = "udp")]
1645    Udp,
1646    #[serde(rename = "sctp")]
1647    Sctp,
1648}
1649
1650impl AsRef<str> for EndpointPortConfigProtocolInlineItem {
1651    fn as_ref(&self) -> &str {
1652        match self {
1653            EndpointPortConfigProtocolInlineItem::Tcp => "tcp",
1654            EndpointPortConfigProtocolInlineItem::Udp => "udp",
1655            EndpointPortConfigProtocolInlineItem::Sctp => "sctp",
1656        }
1657    }
1658}
1659
1660impl std::fmt::Display for EndpointPortConfigProtocolInlineItem {
1661    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1662        write!(f, "{}", self.as_ref())
1663    }
1664}
1665
1666#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1667/// The mode in which port is published.
1668///
1669/// <p><br /></p>
1670///
1671/// - "ingress" makes the target port accessible on every node,
1672///   regardless of whether there is a task for the service running on
1673///   that node or not.
1674/// - "host" bypasses the routing mesh and publish the port directly on
1675///   the swarm node where that service is running.
1676pub enum EndpointPortConfigPublishModeInlineItem {
1677    #[serde(rename = "ingress")]
1678    Ingress,
1679    #[serde(rename = "host")]
1680    Host,
1681}
1682
1683impl AsRef<str> for EndpointPortConfigPublishModeInlineItem {
1684    fn as_ref(&self) -> &str {
1685        match self {
1686            EndpointPortConfigPublishModeInlineItem::Ingress => "ingress",
1687            EndpointPortConfigPublishModeInlineItem::Host => "host",
1688        }
1689    }
1690}
1691
1692impl std::fmt::Display for EndpointPortConfigPublishModeInlineItem {
1693    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1694        write!(f, "{}", self.as_ref())
1695    }
1696}
1697
1698#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1699/// Configuration for a network endpoint.
1700pub struct EndpointSettings {
1701    #[serde(rename = "Aliases")]
1702    #[serde(skip_serializing_if = "Option::is_none")]
1703    pub aliases: Option<Vec<String>>,
1704    #[serde(rename = "DriverOpts")]
1705    #[serde(skip_serializing_if = "Option::is_none")]
1706    /// DriverOpts is a mapping of driver options and values. These options
1707    /// are passed directly to the driver and are driver specific.
1708    pub driver_opts: Option<HashMap<String, String>>,
1709    #[serde(rename = "EndpointID")]
1710    #[serde(skip_serializing_if = "Option::is_none")]
1711    /// Unique ID for the service endpoint in a Sandbox.
1712    pub endpoint_id: Option<String>,
1713    #[serde(rename = "Gateway")]
1714    #[serde(skip_serializing_if = "Option::is_none")]
1715    /// Gateway address for this network.
1716    pub gateway: Option<String>,
1717    #[serde(rename = "GlobalIPv6Address")]
1718    #[serde(skip_serializing_if = "Option::is_none")]
1719    /// Global IPv6 address.
1720    pub global_i_pv_6_address: Option<String>,
1721    #[serde(rename = "GlobalIPv6PrefixLen")]
1722    #[serde(skip_serializing_if = "Option::is_none")]
1723    /// Mask length of the global IPv6 address.
1724    pub global_i_pv_6_prefix_len: Option<i64>,
1725    #[serde(rename = "IPAMConfig")]
1726    pub ipam_config: Option<EndpointIpamConfig>,
1727    #[serde(rename = "IPAddress")]
1728    #[serde(skip_serializing_if = "Option::is_none")]
1729    /// IPv4 address.
1730    pub ip_address: Option<String>,
1731    #[serde(rename = "IPPrefixLen")]
1732    #[serde(skip_serializing_if = "Option::is_none")]
1733    /// Mask length of the IPv4 address.
1734    pub ip_prefix_len: Option<isize>,
1735    #[serde(rename = "IPv6Gateway")]
1736    #[serde(skip_serializing_if = "Option::is_none")]
1737    /// IPv6 gateway address.
1738    pub i_pv_6_gateway: Option<String>,
1739    #[serde(rename = "Links")]
1740    #[serde(skip_serializing_if = "Option::is_none")]
1741    pub links: Option<Vec<String>>,
1742    #[serde(rename = "MacAddress")]
1743    #[serde(skip_serializing_if = "Option::is_none")]
1744    /// MAC address for the endpoint on this network.
1745    pub mac_address: Option<String>,
1746    #[serde(rename = "NetworkID")]
1747    #[serde(skip_serializing_if = "Option::is_none")]
1748    /// Unique ID of the network.
1749    pub network_id: Option<String>,
1750}
1751
1752#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1753/// Properties that can be configured to access and load balance a service.
1754pub struct EndpointSpec {
1755    #[serde(rename = "Mode")]
1756    #[serde(skip_serializing_if = "Option::is_none")]
1757    /// The mode of resolution to use for internal load balancing between tasks.
1758    pub mode: Option<String>,
1759    #[serde(rename = "Ports")]
1760    #[serde(skip_serializing_if = "Option::is_none")]
1761    /// List of exposed ports that this service is accessible on from the
1762    /// outside. Ports can only be provided if `vip` resolution mode is used.
1763    pub ports: Option<Vec<EndpointPortConfig>>,
1764}
1765
1766#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1767/// The mode of resolution to use for internal load balancing between tasks.
1768pub enum EndpointSpecModeInlineItem {
1769    #[serde(rename = "vip")]
1770    Vip,
1771    #[serde(rename = "dnsrr")]
1772    Dnsrr,
1773}
1774
1775impl AsRef<str> for EndpointSpecModeInlineItem {
1776    fn as_ref(&self) -> &str {
1777        match self {
1778            EndpointSpecModeInlineItem::Vip => "vip",
1779            EndpointSpecModeInlineItem::Dnsrr => "dnsrr",
1780        }
1781    }
1782}
1783
1784impl std::fmt::Display for EndpointSpecModeInlineItem {
1785    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1786        write!(f, "{}", self.as_ref())
1787    }
1788}
1789
1790#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1791/// EngineDescription provides information about an engine.
1792pub struct EngineDescription {
1793    #[serde(rename = "EngineVersion")]
1794    #[serde(skip_serializing_if = "Option::is_none")]
1795    pub engine_version: Option<String>,
1796    #[serde(rename = "Labels")]
1797    #[serde(skip_serializing_if = "Option::is_none")]
1798    pub labels: Option<HashMap<String, String>>,
1799    #[serde(rename = "Plugins")]
1800    #[serde(skip_serializing_if = "Option::is_none")]
1801    pub plugins: Option<Vec<EngineDescriptionPluginsInlineItem>>,
1802}
1803
1804#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1805pub struct EngineDescriptionPluginsInlineItem {
1806    #[serde(rename = "Name")]
1807    #[serde(skip_serializing_if = "Option::is_none")]
1808    pub name: Option<String>,
1809    #[serde(rename = "Type")]
1810    #[serde(skip_serializing_if = "Option::is_none")]
1811    pub type_: Option<String>,
1812}
1813
1814#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1815pub struct ErrorDetail {
1816    #[serde(skip_serializing_if = "Option::is_none")]
1817    pub code: Option<isize>,
1818    #[serde(skip_serializing_if = "Option::is_none")]
1819    pub message: Option<String>,
1820}
1821
1822#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1823/// Represents an error.
1824pub struct ErrorResponse {
1825    /// The error message.
1826    pub message: String,
1827}
1828
1829#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1830/// Actor describes something that generates events, like a container, network,
1831/// or a volume.
1832pub struct EventActor {
1833    #[serde(rename = "Attributes")]
1834    #[serde(skip_serializing_if = "Option::is_none")]
1835    /// Various key/value attributes of the object, depending on its type.
1836    pub attributes: Option<HashMap<String, String>>,
1837    #[serde(rename = "ID")]
1838    #[serde(skip_serializing_if = "Option::is_none")]
1839    /// The ID of the object emitting the event
1840    pub id: Option<String>,
1841}
1842
1843#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1844/// EventMessage represents the information an event contains.
1845pub struct EventMessage {
1846    #[serde(rename = "Action")]
1847    #[serde(skip_serializing_if = "Option::is_none")]
1848    /// The type of event
1849    pub action: Option<String>,
1850    #[serde(rename = "Actor")]
1851    pub actor: Option<EventActor>,
1852    #[serde(rename = "Type")]
1853    #[serde(skip_serializing_if = "Option::is_none")]
1854    /// The type of object emitting the event
1855    pub type_: Option<String>,
1856    #[serde(skip_serializing_if = "Option::is_none")]
1857    /// Scope of the event. Engine events are `local` scope. Cluster (Swarm)
1858    /// events are `swarm` scope.
1859    pub scope: Option<String>,
1860    #[serde(skip_serializing_if = "Option::is_none")]
1861    /// Timestamp of event
1862    pub time: Option<i64>,
1863    #[serde(rename = "timeNano")]
1864    #[serde(skip_serializing_if = "Option::is_none")]
1865    /// Timestamp of event, with nanosecond accuracy
1866    pub time_nano: Option<i64>,
1867}
1868
1869#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1870/// The type of object emitting the event
1871pub enum EventMessageTypeInlineItem {
1872    #[serde(rename = "builder")]
1873    Builder,
1874    #[serde(rename = "config")]
1875    Config,
1876    #[serde(rename = "container")]
1877    Container,
1878    #[serde(rename = "daemon")]
1879    Daemon,
1880    #[serde(rename = "image")]
1881    Image,
1882    #[serde(rename = "network")]
1883    Network,
1884    #[serde(rename = "node")]
1885    Node,
1886    #[serde(rename = "plugin")]
1887    Plugin,
1888    #[serde(rename = "secret")]
1889    Secret,
1890    #[serde(rename = "service")]
1891    Service,
1892    #[serde(rename = "volume")]
1893    Volume,
1894}
1895
1896impl AsRef<str> for EventMessageTypeInlineItem {
1897    fn as_ref(&self) -> &str {
1898        match self {
1899            EventMessageTypeInlineItem::Builder => "builder",
1900            EventMessageTypeInlineItem::Config => "config",
1901            EventMessageTypeInlineItem::Container => "container",
1902            EventMessageTypeInlineItem::Daemon => "daemon",
1903            EventMessageTypeInlineItem::Image => "image",
1904            EventMessageTypeInlineItem::Network => "network",
1905            EventMessageTypeInlineItem::Node => "node",
1906            EventMessageTypeInlineItem::Plugin => "plugin",
1907            EventMessageTypeInlineItem::Secret => "secret",
1908            EventMessageTypeInlineItem::Service => "service",
1909            EventMessageTypeInlineItem::Volume => "volume",
1910        }
1911    }
1912}
1913
1914impl std::fmt::Display for EventMessageTypeInlineItem {
1915    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1916        write!(f, "{}", self.as_ref())
1917    }
1918}
1919
1920#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1921/// Scope of the event. Engine events are `local` scope. Cluster (Swarm)
1922/// events are `swarm` scope.
1923pub enum EventMessagescopeInlineItem {
1924    #[serde(rename = "local")]
1925    Local,
1926    #[serde(rename = "swarm")]
1927    Swarm,
1928}
1929
1930impl AsRef<str> for EventMessagescopeInlineItem {
1931    fn as_ref(&self) -> &str {
1932        match self {
1933            EventMessagescopeInlineItem::Local => "local",
1934            EventMessagescopeInlineItem::Swarm => "swarm",
1935        }
1936    }
1937}
1938
1939impl std::fmt::Display for EventMessagescopeInlineItem {
1940    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1941        write!(f, "{}", self.as_ref())
1942    }
1943}
1944
1945#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1946/// No error
1947pub struct ExecInspect200Response {
1948    #[serde(rename = "CanRemove")]
1949    #[serde(skip_serializing_if = "Option::is_none")]
1950    pub can_remove: Option<bool>,
1951    #[serde(rename = "ContainerID")]
1952    #[serde(skip_serializing_if = "Option::is_none")]
1953    pub container_id: Option<String>,
1954    #[serde(rename = "DetachKeys")]
1955    #[serde(skip_serializing_if = "Option::is_none")]
1956    pub detach_keys: Option<String>,
1957    #[serde(rename = "ExitCode")]
1958    #[serde(skip_serializing_if = "Option::is_none")]
1959    pub exit_code: Option<isize>,
1960    #[serde(rename = "ID")]
1961    #[serde(skip_serializing_if = "Option::is_none")]
1962    pub id: Option<String>,
1963    #[serde(rename = "OpenStderr")]
1964    #[serde(skip_serializing_if = "Option::is_none")]
1965    pub open_stderr: Option<bool>,
1966    #[serde(rename = "OpenStdin")]
1967    #[serde(skip_serializing_if = "Option::is_none")]
1968    pub open_stdin: Option<bool>,
1969    #[serde(rename = "OpenStdout")]
1970    #[serde(skip_serializing_if = "Option::is_none")]
1971    pub open_stdout: Option<bool>,
1972    #[serde(rename = "Pid")]
1973    #[serde(skip_serializing_if = "Option::is_none")]
1974    /// The system process ID for the exec process.
1975    pub pid: Option<isize>,
1976    #[serde(rename = "ProcessConfig")]
1977    pub process_config: Option<ProcessConfig>,
1978    #[serde(rename = "Running")]
1979    #[serde(skip_serializing_if = "Option::is_none")]
1980    pub running: Option<bool>,
1981}
1982
1983#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
1984pub struct ExecStartExecStartConfigParam {
1985    #[serde(rename = "ConsoleSize")]
1986    #[serde(skip_serializing_if = "Option::is_none")]
1987    /// Initial console size, as an `[height, width]` array.
1988    pub console_size: Option<Vec<isize>>,
1989    #[serde(rename = "Detach")]
1990    #[serde(skip_serializing_if = "Option::is_none")]
1991    /// Detach from the command.
1992    pub detach: Option<bool>,
1993    #[serde(rename = "Tty")]
1994    #[serde(skip_serializing_if = "Option::is_none")]
1995    /// Allocate a pseudo-TTY.
1996    pub tty: Option<bool>,
1997}
1998
1999#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2000/// Change in the container's filesystem.
2001pub struct FilesystemChange {
2002    #[serde(rename = "Kind")]
2003    pub kind: u8,
2004    #[serde(rename = "Path")]
2005    /// Path to file or directory that has changed.
2006    pub path: String,
2007}
2008
2009/// User-defined resources can be either Integer resources (e.g, `SSD=3`) or
2010/// String resources (e.g, `GPU=UUID1`).
2011pub type GenericResources = Vec<GenericResourcesInlineItem>;
2012
2013#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2014pub struct GenericResourcesInlineItem {
2015    #[serde(rename = "DiscreteResourceSpec")]
2016    #[serde(skip_serializing_if = "Option::is_none")]
2017    pub discrete_resource_spec: Option<GenericResourcesInlineItemDiscreteResourceSpecInlineItem>,
2018    #[serde(rename = "NamedResourceSpec")]
2019    #[serde(skip_serializing_if = "Option::is_none")]
2020    pub named_resource_spec: Option<GenericResourcesInlineItemNamedResourceSpecInlineItem>,
2021}
2022
2023#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2024pub struct GenericResourcesInlineItemDiscreteResourceSpecInlineItem {
2025    #[serde(rename = "Kind")]
2026    #[serde(skip_serializing_if = "Option::is_none")]
2027    pub kind: Option<String>,
2028    #[serde(rename = "Value")]
2029    #[serde(skip_serializing_if = "Option::is_none")]
2030    pub value: Option<i64>,
2031}
2032
2033#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2034pub struct GenericResourcesInlineItemNamedResourceSpecInlineItem {
2035    #[serde(rename = "Kind")]
2036    #[serde(skip_serializing_if = "Option::is_none")]
2037    pub kind: Option<String>,
2038    #[serde(rename = "Value")]
2039    #[serde(skip_serializing_if = "Option::is_none")]
2040    pub value: Option<String>,
2041}
2042
2043/// no error
2044pub type GetPluginPrivileges200Response = Vec<PluginPrivilege>;
2045
2046#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2047/// Information about the storage driver used to store the container's and
2048/// image's filesystem.
2049pub struct GraphDriverData {
2050    #[serde(rename = "Data")]
2051    #[serde(default)]
2052    #[serde(deserialize_with = "deserialize_nonoptional_map")]
2053    /// Low-level storage metadata, provided as key/value pairs.
2054    ///
2055    /// This information is driver-specific, and depends on the storage-driver
2056    /// in use, and should be used for informational purposes only.
2057    pub data: HashMap<String, String>,
2058    #[serde(rename = "Name")]
2059    /// Name of the storage driver.
2060    pub name: String,
2061}
2062
2063#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2064/// Health stores information about the container's healthcheck results.
2065pub struct Health {
2066    #[serde(rename = "FailingStreak")]
2067    #[serde(skip_serializing_if = "Option::is_none")]
2068    /// FailingStreak is the number of consecutive failures
2069    pub failing_streak: Option<isize>,
2070    #[serde(rename = "Log")]
2071    #[serde(skip_serializing_if = "Option::is_none")]
2072    /// Log contains the last few results (oldest first)
2073    pub log: Option<Vec<HealthcheckResult>>,
2074    #[serde(rename = "Status")]
2075    #[serde(skip_serializing_if = "Option::is_none")]
2076    /// Status is one of `none`, `starting`, `healthy` or `unhealthy`
2077    ///
2078    /// - "none"      Indicates there is no healthcheck
2079    /// - "starting"  Starting indicates that the container is not yet ready
2080    /// - "healthy"   Healthy indicates that the container is running correctly
2081    /// - "unhealthy" Unhealthy indicates that the container has a problem
2082    pub status: Option<String>,
2083}
2084
2085#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2086/// A test to perform to check that the container is healthy.
2087pub struct HealthConfig {
2088    #[serde(rename = "Interval")]
2089    #[serde(skip_serializing_if = "Option::is_none")]
2090    /// The time to wait between checks in nanoseconds. It should be 0 or at
2091    /// least 1000000 (1 ms). 0 means inherit.
2092    pub interval: Option<i64>,
2093    #[serde(rename = "Retries")]
2094    #[serde(skip_serializing_if = "Option::is_none")]
2095    /// The number of consecutive failures needed to consider a container as
2096    /// unhealthy. 0 means inherit.
2097    pub retries: Option<isize>,
2098    #[serde(rename = "StartPeriod")]
2099    #[serde(skip_serializing_if = "Option::is_none")]
2100    /// Start period for the container to initialize before starting
2101    /// health-retries countdown in nanoseconds. It should be 0 or at least
2102    /// 1000000 (1 ms). 0 means inherit.
2103    pub start_period: Option<i64>,
2104    #[serde(rename = "Test")]
2105    #[serde(skip_serializing_if = "Option::is_none")]
2106    /// The test to perform. Possible values are:
2107    ///
2108    /// - `[]` inherit healthcheck from image or parent image
2109    /// - `["NONE"]` disable healthcheck
2110    /// - `["CMD", args...]` exec arguments directly
2111    /// - `["CMD-SHELL", command]` run command with system's default shell
2112    pub test: Option<Vec<String>>,
2113    #[serde(rename = "Timeout")]
2114    #[serde(skip_serializing_if = "Option::is_none")]
2115    /// The time to wait before considering the check to have hung. It should
2116    /// be 0 or at least 1000000 (1 ms). 0 means inherit.
2117    pub timeout: Option<i64>,
2118}
2119
2120#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2121/// Status is one of `none`, `starting`, `healthy` or `unhealthy`
2122///
2123/// - "none"      Indicates there is no healthcheck
2124/// - "starting"  Starting indicates that the container is not yet ready
2125/// - "healthy"   Healthy indicates that the container is running correctly
2126/// - "unhealthy" Unhealthy indicates that the container has a problem
2127pub enum HealthStatusInlineItem {
2128    #[serde(rename = "none")]
2129    None,
2130    #[serde(rename = "starting")]
2131    Starting,
2132    #[serde(rename = "healthy")]
2133    Healthy,
2134    #[serde(rename = "unhealthy")]
2135    Unhealthy,
2136}
2137
2138impl AsRef<str> for HealthStatusInlineItem {
2139    fn as_ref(&self) -> &str {
2140        match self {
2141            HealthStatusInlineItem::None => "none",
2142            HealthStatusInlineItem::Starting => "starting",
2143            HealthStatusInlineItem::Healthy => "healthy",
2144            HealthStatusInlineItem::Unhealthy => "unhealthy",
2145        }
2146    }
2147}
2148
2149impl std::fmt::Display for HealthStatusInlineItem {
2150    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2151        write!(f, "{}", self.as_ref())
2152    }
2153}
2154
2155#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2156/// HealthcheckResult stores information about a single run of a healthcheck probe
2157pub struct HealthcheckResult {
2158    #[serde(rename = "End")]
2159    #[serde(skip_serializing_if = "Option::is_none")]
2160    /// Date and time at which this check ended in
2161    /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
2162    pub end: Option<DateTime<Utc>>,
2163    #[serde(rename = "ExitCode")]
2164    #[serde(skip_serializing_if = "Option::is_none")]
2165    /// ExitCode meanings:
2166    ///
2167    /// - `0` healthy
2168    /// - `1` unhealthy
2169    /// - `2` reserved (considered unhealthy)
2170    /// - other values: error running probe
2171    pub exit_code: Option<isize>,
2172    #[serde(rename = "Output")]
2173    #[serde(skip_serializing_if = "Option::is_none")]
2174    /// Output from last check
2175    pub output: Option<String>,
2176    #[serde(rename = "Start")]
2177    #[serde(skip_serializing_if = "Option::is_none")]
2178    /// Date and time at which this check started in
2179    /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
2180    pub start: Option<DateTime<Utc>>,
2181}
2182
2183#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2184/// individual image layer information in response to ImageHistory operation
2185pub struct HistoryResponseItem {
2186    #[serde(rename = "Comment")]
2187    pub comment: String,
2188    #[serde(rename = "Created")]
2189    pub created: i64,
2190    #[serde(rename = "CreatedBy")]
2191    pub created_by: String,
2192    #[serde(rename = "Id")]
2193    pub id: String,
2194    #[serde(rename = "Size")]
2195    pub size: i64,
2196    #[serde(rename = "Tags")]
2197    #[serde(default)]
2198    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
2199    pub tags: Vec<String>,
2200}
2201
2202#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2203/// Container configuration that depends on the host we are running on
2204pub struct HostConfig {
2205    #[serde(rename = "Annotations")]
2206    #[serde(skip_serializing_if = "Option::is_none")]
2207    /// Arbitrary non-identifying metadata attached to container and
2208    /// provided to the runtime when the container is started.
2209    pub annotations: Option<HashMap<String, String>>,
2210    #[serde(rename = "AutoRemove")]
2211    #[serde(skip_serializing_if = "Option::is_none")]
2212    /// Automatically remove the container when the container's process
2213    /// exits. This has no effect if `RestartPolicy` is set.
2214    pub auto_remove: Option<bool>,
2215    #[serde(rename = "Binds")]
2216    #[serde(skip_serializing_if = "Option::is_none")]
2217    /// A list of volume bindings for this container. Each volume binding
2218    /// is a string in one of these forms:
2219    ///
2220    /// - `host-src:container-dest[:options]` to bind-mount a host path
2221    ///   into the container. Both `host-src`, and `container-dest` must
2222    ///   be an _absolute_ path.
2223    /// - `volume-name:container-dest[:options]` to bind-mount a volume
2224    ///   managed by a volume driver into the container. `container-dest`
2225    ///   must be an _absolute_ path.
2226    ///
2227    /// `options` is an optional, comma-delimited list of:
2228    ///
2229    /// - `nocopy` disables automatic copying of data from the container
2230    ///   path to the volume. The `nocopy` flag only applies to named volumes.
2231    /// - `[ro|rw]` mounts a volume read-only or read-write, respectively.
2232    ///   If omitted or set to `rw`, volumes are mounted read-write.
2233    /// - `[z|Z]` applies SELinux labels to allow or deny multiple containers
2234    ///   to read and write to the same volume.
2235    ///     - `z`: a _shared_ content label is applied to the content. This
2236    ///       label indicates that multiple containers can share the volume
2237    ///       content, for both reading and writing.
2238    ///     - `Z`: a _private unshared_ label is applied to the content.
2239    ///       This label indicates that only the current container can use
2240    ///       a private volume. Labeling systems such as SELinux require
2241    ///       proper labels to be placed on volume content that is mounted
2242    ///       into a container. Without a label, the security system can
2243    ///       prevent a container's processes from using the content. By
2244    ///       default, the labels set by the host operating system are not
2245    ///       modified.
2246    /// - `[[r]shared|[r]slave|[r]private]` specifies mount
2247    ///   [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt).
2248    ///   This only applies to bind-mounted volumes, not internal volumes
2249    ///   or named volumes. Mount propagation requires the source mount
2250    ///   point (the location where the source directory is mounted in the
2251    ///   host operating system) to have the correct propagation properties.
2252    ///   For shared volumes, the source mount point must be set to `shared`.
2253    ///   For slave volumes, the mount must be set to either `shared` or
2254    ///   `slave`.
2255    pub binds: Option<Vec<String>>,
2256    #[serde(rename = "BlkioDeviceReadBps")]
2257    #[serde(skip_serializing_if = "Option::is_none")]
2258    /// Limit read rate (bytes per second) from a device, in the form:
2259    ///
2260    /// ```
2261    /// [{"Path": "device_path", "Rate": rate}]
2262    /// ```
2263    pub blkio_device_read_bps: Option<Vec<ThrottleDevice>>,
2264    #[serde(rename = "BlkioDeviceReadIOps")]
2265    #[serde(skip_serializing_if = "Option::is_none")]
2266    /// Limit read rate (IO per second) from a device, in the form:
2267    ///
2268    /// ```
2269    /// [{"Path": "device_path", "Rate": rate}]
2270    /// ```
2271    pub blkio_device_read_i_ops: Option<Vec<ThrottleDevice>>,
2272    #[serde(rename = "BlkioDeviceWriteBps")]
2273    #[serde(skip_serializing_if = "Option::is_none")]
2274    /// Limit write rate (bytes per second) to a device, in the form:
2275    ///
2276    /// ```
2277    /// [{"Path": "device_path", "Rate": rate}]
2278    /// ```
2279    pub blkio_device_write_bps: Option<Vec<ThrottleDevice>>,
2280    #[serde(rename = "BlkioDeviceWriteIOps")]
2281    #[serde(skip_serializing_if = "Option::is_none")]
2282    /// Limit write rate (IO per second) to a device, in the form:
2283    ///
2284    /// ```
2285    /// [{"Path": "device_path", "Rate": rate}]
2286    /// ```
2287    pub blkio_device_write_i_ops: Option<Vec<ThrottleDevice>>,
2288    #[serde(rename = "BlkioWeight")]
2289    #[serde(skip_serializing_if = "Option::is_none")]
2290    /// Block IO weight (relative weight).
2291    pub blkio_weight: Option<isize>,
2292    #[serde(rename = "BlkioWeightDevice")]
2293    #[serde(skip_serializing_if = "Option::is_none")]
2294    /// Block IO weight (relative device weight) in the form:
2295    ///
2296    /// ```
2297    /// [{"Path": "device_path", "Weight": weight}]
2298    /// ```
2299    pub blkio_weight_device: Option<Vec<HostConfigBlkioWeightDeviceInlineItem>>,
2300    #[serde(rename = "CapAdd")]
2301    #[serde(skip_serializing_if = "Option::is_none")]
2302    /// A list of kernel capabilities to add to the container. Conflicts
2303    /// with option 'Capabilities'.
2304    pub cap_add: Option<Vec<String>>,
2305    #[serde(rename = "CapDrop")]
2306    #[serde(skip_serializing_if = "Option::is_none")]
2307    /// A list of kernel capabilities to drop from the container. Conflicts
2308    /// with option 'Capabilities'.
2309    pub cap_drop: Option<Vec<String>>,
2310    #[serde(rename = "Cgroup")]
2311    #[serde(skip_serializing_if = "Option::is_none")]
2312    /// Cgroup to use for the container.
2313    pub cgroup: Option<String>,
2314    #[serde(rename = "CgroupParent")]
2315    #[serde(skip_serializing_if = "Option::is_none")]
2316    /// Path to `cgroups` under which the container's `cgroup` is created. If
2317    /// the path is not absolute, the path is considered to be relative to the
2318    /// `cgroups` path of the init process. Cgroups are created if they do not
2319    /// already exist.
2320    pub cgroup_parent: Option<String>,
2321    #[serde(rename = "CgroupnsMode")]
2322    #[serde(skip_serializing_if = "Option::is_none")]
2323    /// cgroup namespace mode for the container. Possible values are:
2324    ///
2325    /// - `"private"`: the container runs in its own private cgroup namespace
2326    /// - `"host"`: use the host system's cgroup namespace
2327    ///
2328    /// If not specified, the daemon default is used, which can either be `"private"`
2329    /// or `"host"`, depending on daemon version, kernel support and configuration.
2330    pub cgroupns_mode: Option<String>,
2331    #[serde(rename = "ConsoleSize")]
2332    #[serde(skip_serializing_if = "Option::is_none")]
2333    /// Initial console size, as an `[height, width]` array.
2334    pub console_size: Option<Vec<isize>>,
2335    #[serde(rename = "ContainerIDFile")]
2336    #[serde(skip_serializing_if = "Option::is_none")]
2337    /// Path to a file where the container ID is written
2338    pub container_id_file: Option<String>,
2339    #[serde(rename = "CpuCount")]
2340    #[serde(skip_serializing_if = "Option::is_none")]
2341    /// The number of usable CPUs (Windows only).
2342    ///
2343    /// On Windows Server containers, the processor resource controls are
2344    /// mutually exclusive. The order of precedence is `CPUCount` first, then
2345    /// `CPUShares`, and `CPUPercent` last.
2346    pub cpu_count: Option<i64>,
2347    #[serde(rename = "CpuPercent")]
2348    #[serde(skip_serializing_if = "Option::is_none")]
2349    /// The usable percentage of the available CPUs (Windows only).
2350    ///
2351    /// On Windows Server containers, the processor resource controls are
2352    /// mutually exclusive. The order of precedence is `CPUCount` first, then
2353    /// `CPUShares`, and `CPUPercent` last.
2354    pub cpu_percent: Option<i64>,
2355    #[serde(rename = "CpuPeriod")]
2356    #[serde(skip_serializing_if = "Option::is_none")]
2357    /// The length of a CPU period in microseconds.
2358    pub cpu_period: Option<i64>,
2359    #[serde(rename = "CpuQuota")]
2360    #[serde(skip_serializing_if = "Option::is_none")]
2361    /// Microseconds of CPU time that the container can get in a CPU period.
2362    pub cpu_quota: Option<i64>,
2363    #[serde(rename = "CpuRealtimePeriod")]
2364    #[serde(skip_serializing_if = "Option::is_none")]
2365    /// The length of a CPU real-time period in microseconds. Set to 0 to
2366    /// allocate no time allocated to real-time tasks.
2367    pub cpu_realtime_period: Option<i64>,
2368    #[serde(rename = "CpuRealtimeRuntime")]
2369    #[serde(skip_serializing_if = "Option::is_none")]
2370    /// The length of a CPU real-time runtime in microseconds. Set to 0 to
2371    /// allocate no time allocated to real-time tasks.
2372    pub cpu_realtime_runtime: Option<i64>,
2373    #[serde(rename = "CpuShares")]
2374    #[serde(skip_serializing_if = "Option::is_none")]
2375    /// An integer value representing this container's relative CPU weight
2376    /// versus other containers.
2377    pub cpu_shares: Option<isize>,
2378    #[serde(rename = "CpusetCpus")]
2379    #[serde(skip_serializing_if = "Option::is_none")]
2380    /// CPUs in which to allow execution (e.g., `0-3`, `0,1`).
2381    pub cpuset_cpus: Option<String>,
2382    #[serde(rename = "CpusetMems")]
2383    #[serde(skip_serializing_if = "Option::is_none")]
2384    /// Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only
2385    /// effective on NUMA systems.
2386    pub cpuset_mems: Option<String>,
2387    #[serde(rename = "DeviceCgroupRules")]
2388    #[serde(skip_serializing_if = "Option::is_none")]
2389    /// a list of cgroup rules to apply to the container
2390    pub device_cgroup_rules: Option<Vec<String>>,
2391    #[serde(rename = "DeviceRequests")]
2392    #[serde(skip_serializing_if = "Option::is_none")]
2393    /// A list of requests for devices to be sent to device drivers.
2394    pub device_requests: Option<Vec<DeviceRequest>>,
2395    #[serde(rename = "Devices")]
2396    #[serde(skip_serializing_if = "Option::is_none")]
2397    /// A list of devices to add to the container.
2398    pub devices: Option<Vec<DeviceMapping>>,
2399    #[serde(rename = "Dns")]
2400    #[serde(skip_serializing_if = "Option::is_none")]
2401    /// A list of DNS servers for the container to use.
2402    pub dns: Option<Vec<String>>,
2403    #[serde(rename = "DnsOptions")]
2404    #[serde(skip_serializing_if = "Option::is_none")]
2405    /// A list of DNS options.
2406    pub dns_options: Option<Vec<String>>,
2407    #[serde(rename = "DnsSearch")]
2408    #[serde(skip_serializing_if = "Option::is_none")]
2409    /// A list of DNS search domains.
2410    pub dns_search: Option<Vec<String>>,
2411    #[serde(rename = "ExtraHosts")]
2412    #[serde(skip_serializing_if = "Option::is_none")]
2413    /// A list of hostnames/IP mappings to add to the container's `/etc/hosts`
2414    /// file. Specified in the form `["hostname:IP"]`.
2415    pub extra_hosts: Option<Vec<String>>,
2416    #[serde(rename = "GroupAdd")]
2417    #[serde(skip_serializing_if = "Option::is_none")]
2418    /// A list of additional groups that the container process will run as.
2419    pub group_add: Option<Vec<String>>,
2420    #[serde(rename = "IOMaximumBandwidth")]
2421    #[serde(skip_serializing_if = "Option::is_none")]
2422    /// Maximum IO in bytes per second for the container system drive
2423    /// (Windows only).
2424    pub io_maximum_bandwidth: Option<i64>,
2425    #[serde(rename = "IOMaximumIOps")]
2426    #[serde(skip_serializing_if = "Option::is_none")]
2427    /// Maximum IOps for the container system drive (Windows only)
2428    pub io_maximum_i_ops: Option<i64>,
2429    #[serde(rename = "Init")]
2430    #[serde(skip_serializing_if = "Option::is_none")]
2431    /// Run an init inside the container that forwards signals and reaps
2432    /// processes. This field is omitted if empty, and the default (as
2433    /// configured on the daemon) is used.
2434    pub init: Option<bool>,
2435    #[serde(rename = "IpcMode")]
2436    #[serde(skip_serializing_if = "Option::is_none")]
2437    /// IPC sharing mode for the container. Possible values are:
2438    ///
2439    /// - `"none"`: own private IPC namespace, with /dev/shm not mounted
2440    /// - `"private"`: own private IPC namespace
2441    /// - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers
2442    /// - `"container:<name|id>"`: join another (shareable) container's IPC namespace
2443    /// - `"host"`: use the host system's IPC namespace
2444    ///
2445    /// If not specified, daemon default is used, which can either be `"private"`
2446    /// or `"shareable"`, depending on daemon version and configuration.
2447    pub ipc_mode: Option<String>,
2448    #[serde(rename = "Isolation")]
2449    #[serde(skip_serializing_if = "Option::is_none")]
2450    /// Isolation technology of the container. (Windows only)
2451    pub isolation: Option<String>,
2452    #[serde(rename = "KernelMemoryTCP")]
2453    #[serde(skip_serializing_if = "Option::is_none")]
2454    /// Hard limit for kernel TCP buffer memory (in bytes). Depending on the
2455    /// OCI runtime in use, this option may be ignored. It is no longer supported
2456    /// by the default (runc) runtime.
2457    ///
2458    /// This field is omitted when empty.
2459    pub kernel_memory_tcp: Option<i64>,
2460    #[serde(rename = "Links")]
2461    #[serde(skip_serializing_if = "Option::is_none")]
2462    /// A list of links for the container in the form `container_name:alias`.
2463    pub links: Option<Vec<String>>,
2464    #[serde(rename = "LogConfig")]
2465    #[serde(skip_serializing_if = "Option::is_none")]
2466    /// The logging configuration for this container
2467    pub log_config: Option<HostConfigLogConfigInlineItem>,
2468    #[serde(rename = "MaskedPaths")]
2469    #[serde(skip_serializing_if = "Option::is_none")]
2470    /// The list of paths to be masked inside the container (this overrides
2471    /// the default set of paths).
2472    pub masked_paths: Option<Vec<String>>,
2473    #[serde(rename = "Memory")]
2474    #[serde(skip_serializing_if = "Option::is_none")]
2475    /// Memory limit in bytes.
2476    pub memory: Option<i64>,
2477    #[serde(rename = "MemoryReservation")]
2478    #[serde(skip_serializing_if = "Option::is_none")]
2479    /// Memory soft limit in bytes.
2480    pub memory_reservation: Option<i64>,
2481    #[serde(rename = "MemorySwap")]
2482    #[serde(skip_serializing_if = "Option::is_none")]
2483    /// Total memory limit (memory + swap). Set as `-1` to enable unlimited
2484    /// swap.
2485    pub memory_swap: Option<i64>,
2486    #[serde(rename = "MemorySwappiness")]
2487    #[serde(skip_serializing_if = "Option::is_none")]
2488    /// Tune a container's memory swappiness behavior. Accepts an integer
2489    /// between 0 and 100.
2490    pub memory_swappiness: Option<i64>,
2491    #[serde(rename = "Mounts")]
2492    #[serde(skip_serializing_if = "Option::is_none")]
2493    /// Specification for mounts to be added to the container.
2494    pub mounts: Option<Vec<Mount>>,
2495    #[serde(rename = "NanoCpus")]
2496    #[serde(skip_serializing_if = "Option::is_none")]
2497    /// CPU quota in units of 10<sup>-9</sup> CPUs.
2498    pub nano_cpus: Option<i64>,
2499    #[serde(rename = "NetworkMode")]
2500    #[serde(skip_serializing_if = "Option::is_none")]
2501    /// Network mode to use for this container. Supported standard values
2502    /// are: `bridge`, `host`, `none`, and `container:<name|id>`. Any
2503    /// other value is taken as a custom network's name to which this
2504    /// container should connect to.
2505    pub network_mode: Option<String>,
2506    #[serde(rename = "OomKillDisable")]
2507    #[serde(skip_serializing_if = "Option::is_none")]
2508    /// Disable OOM Killer for the container.
2509    pub oom_kill_disable: Option<bool>,
2510    #[serde(rename = "OomScoreAdj")]
2511    #[serde(skip_serializing_if = "Option::is_none")]
2512    /// An integer value containing the score given to the container in
2513    /// order to tune OOM killer preferences.
2514    pub oom_score_adj: Option<isize>,
2515    #[serde(rename = "PidMode")]
2516    #[serde(skip_serializing_if = "Option::is_none")]
2517    /// Set the PID (Process) Namespace mode for the container. It can be
2518    /// either:
2519    ///
2520    /// - `"container:<name|id>"`: joins another container's PID namespace
2521    /// - `"host"`: use the host's PID namespace inside the container
2522    pub pid_mode: Option<String>,
2523    #[serde(rename = "PidsLimit")]
2524    #[serde(skip_serializing_if = "Option::is_none")]
2525    /// Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null`
2526    /// to not change.
2527    pub pids_limit: Option<i64>,
2528    #[serde(rename = "PortBindings")]
2529    pub port_bindings: Option<PortMap>,
2530    #[serde(rename = "Privileged")]
2531    #[serde(skip_serializing_if = "Option::is_none")]
2532    /// Gives the container full access to the host.
2533    pub privileged: Option<bool>,
2534    #[serde(rename = "PublishAllPorts")]
2535    #[serde(skip_serializing_if = "Option::is_none")]
2536    /// Allocates an ephemeral host port for all of a container's
2537    /// exposed ports.
2538    ///
2539    /// Ports are de-allocated when the container stops and allocated when
2540    /// the container starts. The allocated port might be changed when
2541    /// restarting the container.
2542    ///
2543    /// The port is selected from the ephemeral port range that depends on
2544    /// the kernel. For example, on Linux the range is defined by
2545    /// `/proc/sys/net/ipv4/ip_local_port_range`.
2546    pub publish_all_ports: Option<bool>,
2547    #[serde(rename = "ReadonlyPaths")]
2548    #[serde(skip_serializing_if = "Option::is_none")]
2549    /// The list of paths to be set as read-only inside the container
2550    /// (this overrides the default set of paths).
2551    pub readonly_paths: Option<Vec<String>>,
2552    #[serde(rename = "ReadonlyRootfs")]
2553    #[serde(skip_serializing_if = "Option::is_none")]
2554    /// Mount the container's root filesystem as read only.
2555    pub readonly_rootfs: Option<bool>,
2556    #[serde(rename = "RestartPolicy")]
2557    pub restart_policy: Option<RestartPolicy>,
2558    #[serde(rename = "Runtime")]
2559    #[serde(skip_serializing_if = "Option::is_none")]
2560    /// Runtime to use with this container.
2561    pub runtime: Option<String>,
2562    #[serde(rename = "SecurityOpt")]
2563    #[serde(skip_serializing_if = "Option::is_none")]
2564    /// A list of string values to customize labels for MLS systems, such
2565    /// as SELinux.
2566    pub security_opt: Option<Vec<String>>,
2567    #[serde(rename = "ShmSize")]
2568    #[serde(skip_serializing_if = "Option::is_none")]
2569    /// Size of `/dev/shm` in bytes. If omitted, the system uses 64MB.
2570    pub shm_size: Option<i64>,
2571    #[serde(rename = "StorageOpt")]
2572    #[serde(skip_serializing_if = "Option::is_none")]
2573    /// Storage driver options for this container, in the form `{"size": "120G"}`.
2574    pub storage_opt: Option<HashMap<String, String>>,
2575    #[serde(rename = "Sysctls")]
2576    #[serde(skip_serializing_if = "Option::is_none")]
2577    /// A list of kernel parameters (sysctls) to set in the container.
2578    /// For example:
2579    ///
2580    /// ```
2581    /// {"net.ipv4.ip_forward": "1"}
2582    /// ```
2583    pub sysctls: Option<HashMap<String, String>>,
2584    #[serde(rename = "Tmpfs")]
2585    #[serde(skip_serializing_if = "Option::is_none")]
2586    /// A map of container directories which should be replaced by tmpfs
2587    /// mounts, and their corresponding mount options. For example:
2588    ///
2589    /// ```
2590    /// { "/run": "rw,noexec,nosuid,size=65536k" }
2591    /// ```
2592    pub tmpfs: Option<HashMap<String, String>>,
2593    #[serde(rename = "UTSMode")]
2594    #[serde(skip_serializing_if = "Option::is_none")]
2595    /// UTS namespace to use for the container.
2596    pub uts_mode: Option<String>,
2597    #[serde(rename = "Ulimits")]
2598    #[serde(skip_serializing_if = "Option::is_none")]
2599    /// A list of resource limits to set in the container. For example:
2600    ///
2601    /// ```
2602    /// {"Name": "nofile", "Soft": 1024, "Hard": 2048}
2603    /// ```
2604    pub ulimits: Option<Vec<HostConfigUlimitsInlineItem>>,
2605    #[serde(rename = "UsernsMode")]
2606    #[serde(skip_serializing_if = "Option::is_none")]
2607    /// Sets the usernamespace mode for the container when usernamespace
2608    /// remapping option is enabled.
2609    pub userns_mode: Option<String>,
2610    #[serde(rename = "VolumeDriver")]
2611    #[serde(skip_serializing_if = "Option::is_none")]
2612    /// Driver that this container uses to mount volumes.
2613    pub volume_driver: Option<String>,
2614    #[serde(rename = "VolumesFrom")]
2615    #[serde(skip_serializing_if = "Option::is_none")]
2616    /// A list of volumes to inherit from another container, specified in
2617    /// the form `<container name>[:<ro|rw>]`.
2618    pub volumes_from: Option<Vec<String>>,
2619}
2620
2621#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2622pub struct HostConfigBlkioWeightDeviceInlineItem {
2623    #[serde(rename = "Path")]
2624    #[serde(skip_serializing_if = "Option::is_none")]
2625    pub path: Option<String>,
2626    #[serde(rename = "Weight")]
2627    #[serde(skip_serializing_if = "Option::is_none")]
2628    pub weight: Option<isize>,
2629}
2630
2631#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2632/// cgroup namespace mode for the container. Possible values are:
2633///
2634/// - `"private"`: the container runs in its own private cgroup namespace
2635/// - `"host"`: use the host system's cgroup namespace
2636///
2637/// If not specified, the daemon default is used, which can either be `"private"`
2638/// or `"host"`, depending on daemon version, kernel support and configuration.
2639pub enum HostConfigCgroupnsModeInlineItem {
2640    #[serde(rename = "private")]
2641    Private,
2642    #[serde(rename = "host")]
2643    Host,
2644}
2645
2646impl AsRef<str> for HostConfigCgroupnsModeInlineItem {
2647    fn as_ref(&self) -> &str {
2648        match self {
2649            HostConfigCgroupnsModeInlineItem::Private => "private",
2650            HostConfigCgroupnsModeInlineItem::Host => "host",
2651        }
2652    }
2653}
2654
2655impl std::fmt::Display for HostConfigCgroupnsModeInlineItem {
2656    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2657        write!(f, "{}", self.as_ref())
2658    }
2659}
2660
2661#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2662/// Isolation technology of the container. (Windows only)
2663pub enum HostConfigIsolationInlineItem {
2664    #[serde(rename = "default")]
2665    Default,
2666    #[serde(rename = "process")]
2667    Process,
2668    #[serde(rename = "hyperv")]
2669    Hyperv,
2670}
2671
2672impl AsRef<str> for HostConfigIsolationInlineItem {
2673    fn as_ref(&self) -> &str {
2674        match self {
2675            HostConfigIsolationInlineItem::Default => "default",
2676            HostConfigIsolationInlineItem::Process => "process",
2677            HostConfigIsolationInlineItem::Hyperv => "hyperv",
2678        }
2679    }
2680}
2681
2682impl std::fmt::Display for HostConfigIsolationInlineItem {
2683    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2684        write!(f, "{}", self.as_ref())
2685    }
2686}
2687
2688#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2689/// The logging configuration for this container
2690pub struct HostConfigLogConfigInlineItem {
2691    #[serde(rename = "Config")]
2692    #[serde(skip_serializing_if = "Option::is_none")]
2693    pub config: Option<HashMap<String, String>>,
2694    #[serde(rename = "Type")]
2695    #[serde(skip_serializing_if = "Option::is_none")]
2696    pub type_: Option<String>,
2697}
2698
2699#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2700pub enum HostConfigLogConfigInlineItemTypeInlineItem {
2701    #[serde(rename = "json-file")]
2702    JsonFile,
2703    #[serde(rename = "syslog")]
2704    Syslog,
2705    #[serde(rename = "journald")]
2706    Journald,
2707    #[serde(rename = "gelf")]
2708    Gelf,
2709    #[serde(rename = "fluentd")]
2710    Fluentd,
2711    #[serde(rename = "awslogs")]
2712    Awslogs,
2713    #[serde(rename = "splunk")]
2714    Splunk,
2715    #[serde(rename = "etwlogs")]
2716    Etwlogs,
2717    #[serde(rename = "none")]
2718    None,
2719}
2720
2721impl AsRef<str> for HostConfigLogConfigInlineItemTypeInlineItem {
2722    fn as_ref(&self) -> &str {
2723        match self {
2724            HostConfigLogConfigInlineItemTypeInlineItem::JsonFile => "json-file",
2725            HostConfigLogConfigInlineItemTypeInlineItem::Syslog => "syslog",
2726            HostConfigLogConfigInlineItemTypeInlineItem::Journald => "journald",
2727            HostConfigLogConfigInlineItemTypeInlineItem::Gelf => "gelf",
2728            HostConfigLogConfigInlineItemTypeInlineItem::Fluentd => "fluentd",
2729            HostConfigLogConfigInlineItemTypeInlineItem::Awslogs => "awslogs",
2730            HostConfigLogConfigInlineItemTypeInlineItem::Splunk => "splunk",
2731            HostConfigLogConfigInlineItemTypeInlineItem::Etwlogs => "etwlogs",
2732            HostConfigLogConfigInlineItemTypeInlineItem::None => "none",
2733        }
2734    }
2735}
2736
2737impl std::fmt::Display for HostConfigLogConfigInlineItemTypeInlineItem {
2738    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2739        write!(f, "{}", self.as_ref())
2740    }
2741}
2742
2743#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2744pub struct HostConfigUlimitsInlineItem {
2745    #[serde(rename = "Hard")]
2746    #[serde(skip_serializing_if = "Option::is_none")]
2747    /// Hard limit
2748    pub hard: Option<isize>,
2749    #[serde(rename = "Name")]
2750    #[serde(skip_serializing_if = "Option::is_none")]
2751    /// Name of ulimit
2752    pub name: Option<String>,
2753    #[serde(rename = "Soft")]
2754    #[serde(skip_serializing_if = "Option::is_none")]
2755    /// Soft limit
2756    pub soft: Option<isize>,
2757}
2758
2759#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2760pub struct Ipam {
2761    #[serde(rename = "Config")]
2762    #[serde(skip_serializing_if = "Option::is_none")]
2763    /// List of IPAM configuration options, specified as a map:
2764    ///
2765    /// ```
2766    /// {"Subnet": <CIDR>, "IPRange": <CIDR>, "Gateway": <IP address>, "AuxAddress": <device_name:IP address>}
2767    /// ```
2768    pub config: Option<Vec<IpamConfig>>,
2769    #[serde(rename = "Driver")]
2770    #[serde(skip_serializing_if = "Option::is_none")]
2771    /// Name of the IPAM driver to use.
2772    pub driver: Option<String>,
2773    #[serde(rename = "Options")]
2774    #[serde(skip_serializing_if = "Option::is_none")]
2775    /// Driver-specific options, specified as a map.
2776    pub options: Option<HashMap<String, String>>,
2777}
2778
2779#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2780pub struct IpamConfig {
2781    #[serde(rename = "AuxiliaryAddresses")]
2782    #[serde(skip_serializing_if = "Option::is_none")]
2783    pub auxiliary_addresses: Option<HashMap<String, String>>,
2784    #[serde(rename = "Gateway")]
2785    #[serde(skip_serializing_if = "Option::is_none")]
2786    pub gateway: Option<String>,
2787    #[serde(rename = "IPRange")]
2788    #[serde(skip_serializing_if = "Option::is_none")]
2789    pub ip_range: Option<String>,
2790    #[serde(rename = "Subnet")]
2791    #[serde(skip_serializing_if = "Option::is_none")]
2792    pub subnet: Option<String>,
2793}
2794
2795#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2796/// Response to an API call that returns just an Id
2797pub struct IdResponse {
2798    #[serde(rename = "Id")]
2799    /// The id of the newly created object.
2800    pub id: String,
2801}
2802
2803pub type ImageBuildInputStreamParam = Vec<u8>;
2804
2805pub type ImageCreateInputImageParam = String;
2806
2807/// The image was deleted successfully
2808pub type ImageDelete200Response = Vec<ImageDeleteResponseItem>;
2809
2810#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2811pub struct ImageDeleteResponseItem {
2812    #[serde(rename = "Deleted")]
2813    #[serde(skip_serializing_if = "Option::is_none")]
2814    /// The image ID of an image that was deleted
2815    pub deleted: Option<String>,
2816    #[serde(rename = "Untagged")]
2817    #[serde(skip_serializing_if = "Option::is_none")]
2818    /// The image ID of an image that was untagged
2819    pub untagged: Option<String>,
2820}
2821
2822/// no error
2823pub type ImageGet200Response = Vec<u8>;
2824
2825/// no error
2826pub type ImageGetAll200Response = Vec<u8>;
2827
2828/// List of image layers
2829pub type ImageHistory200Response = Vec<HistoryResponseItem>;
2830
2831#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2832/// Image ID or Digest
2833pub struct ImageId {
2834    #[serde(rename = "ID")]
2835    #[serde(skip_serializing_if = "Option::is_none")]
2836    pub id: Option<String>,
2837}
2838
2839#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2840/// Information about an image in the local image cache.
2841pub struct ImageInspect {
2842    #[serde(rename = "Architecture")]
2843    #[serde(skip_serializing_if = "Option::is_none")]
2844    /// Hardware CPU architecture that the image runs on.
2845    pub architecture: Option<String>,
2846    #[serde(rename = "Author")]
2847    #[serde(skip_serializing_if = "Option::is_none")]
2848    /// Name of the author that was specified when committing the image, or as
2849    /// specified through MAINTAINER (deprecated) in the Dockerfile.
2850    pub author: Option<String>,
2851    #[serde(rename = "Comment")]
2852    #[serde(skip_serializing_if = "Option::is_none")]
2853    /// Optional message that was set when committing or importing the image.
2854    pub comment: Option<String>,
2855    #[serde(rename = "Config")]
2856    pub config: Option<ContainerConfig>,
2857    #[serde(rename = "Container")]
2858    #[serde(skip_serializing_if = "Option::is_none")]
2859    /// The ID of the container that was used to create the image.
2860    ///
2861    /// Depending on how the image was created, this field may be empty.
2862    pub container: Option<String>,
2863    #[serde(rename = "ContainerConfig")]
2864    pub container_config: Option<ContainerConfig>,
2865    #[serde(rename = "Created")]
2866    #[serde(skip_serializing_if = "Option::is_none")]
2867    /// Date and time at which the image was created, formatted in
2868    /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
2869    pub created: Option<String>,
2870    #[serde(rename = "DockerVersion")]
2871    #[serde(skip_serializing_if = "Option::is_none")]
2872    /// The version of Docker that was used to build the image.
2873    ///
2874    /// Depending on how the image was created, this field may be empty.
2875    pub docker_version: Option<String>,
2876    #[serde(rename = "GraphDriver")]
2877    pub graph_driver: Option<GraphDriverData>,
2878    #[serde(rename = "Id")]
2879    #[serde(skip_serializing_if = "Option::is_none")]
2880    /// ID is the content-addressable ID of an image.
2881    ///
2882    /// This identifier is a content-addressable digest calculated from the
2883    /// image's configuration (which includes the digests of layers used by
2884    /// the image).
2885    ///
2886    /// Note that this digest differs from the `RepoDigests` below, which
2887    /// holds digests of image manifests that reference the image.
2888    pub id: Option<String>,
2889    #[serde(rename = "Metadata")]
2890    #[serde(skip_serializing_if = "Option::is_none")]
2891    /// Additional metadata of the image in the local cache. This information
2892    /// is local to the daemon, and not part of the image itself.
2893    pub metadata: Option<ImageInspectMetadataInlineItem>,
2894    #[serde(rename = "Os")]
2895    #[serde(skip_serializing_if = "Option::is_none")]
2896    /// Operating System the image is built to run on.
2897    pub os: Option<String>,
2898    #[serde(rename = "OsVersion")]
2899    #[serde(skip_serializing_if = "Option::is_none")]
2900    /// Operating System version the image is built to run on (especially
2901    /// for Windows).
2902    pub os_version: Option<String>,
2903    #[serde(rename = "Parent")]
2904    #[serde(skip_serializing_if = "Option::is_none")]
2905    /// ID of the parent image.
2906    ///
2907    /// Depending on how the image was created, this field may be empty and
2908    /// is only set for images that were built/created locally. This field
2909    /// is empty if the image was pulled from an image registry.
2910    pub parent: Option<String>,
2911    #[serde(rename = "RepoDigests")]
2912    #[serde(skip_serializing_if = "Option::is_none")]
2913    /// List of content-addressable digests of locally available image manifests
2914    /// that the image is referenced from. Multiple manifests can refer to the
2915    /// same image.
2916    ///
2917    /// These digests are usually only available if the image was either pulled
2918    /// from a registry, or if the image was pushed to a registry, which is when
2919    /// the manifest is generated and its digest calculated.
2920    pub repo_digests: Option<Vec<String>>,
2921    #[serde(rename = "RepoTags")]
2922    #[serde(skip_serializing_if = "Option::is_none")]
2923    /// List of image names/tags in the local image cache that reference this
2924    /// image.
2925    ///
2926    /// Multiple image tags can refer to the same image, and this list may be
2927    /// empty if no tags reference the image, in which case the image is
2928    /// "untagged", in which case it can still be referenced by its ID.
2929    pub repo_tags: Option<Vec<String>>,
2930    #[serde(rename = "RootFS")]
2931    #[serde(skip_serializing_if = "Option::is_none")]
2932    /// Information about the image's RootFS, including the layer IDs.
2933    pub root_fs: Option<ImageInspectRootFsInlineItem>,
2934    #[serde(rename = "Size")]
2935    #[serde(skip_serializing_if = "Option::is_none")]
2936    /// Total size of the image including all layers it is composed of.
2937    pub size: Option<i64>,
2938    #[serde(rename = "Variant")]
2939    #[serde(skip_serializing_if = "Option::is_none")]
2940    /// CPU architecture variant (presently ARM-only).
2941    pub variant: Option<String>,
2942    #[serde(rename = "VirtualSize")]
2943    #[serde(skip_serializing_if = "Option::is_none")]
2944    /// Total size of the image including all layers it is composed of.
2945    ///
2946    /// In versions of Docker before v1.10, this field was calculated from
2947    /// the image itself and all of its parent images. Images are now stored
2948    /// self-contained, and no longer use a parent-chain, making this field
2949    /// an equivalent of the Size field.
2950    ///
2951    /// > **Deprecated**: this field is kept for backward compatibility, but
2952    /// > will be removed in API v1.44.
2953    pub virtual_size: Option<i64>,
2954}
2955
2956#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2957/// Additional metadata of the image in the local cache. This information
2958/// is local to the daemon, and not part of the image itself.
2959pub struct ImageInspectMetadataInlineItem {
2960    #[serde(rename = "LastTagTime")]
2961    #[serde(skip_serializing_if = "Option::is_none")]
2962    /// Date and time at which the image was last tagged in
2963    /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
2964    ///
2965    /// This information is only available if the image was tagged locally,
2966    /// and omitted otherwise.
2967    pub last_tag_time: Option<DateTime<Utc>>,
2968}
2969
2970#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2971/// Information about the image's RootFS, including the layer IDs.
2972pub struct ImageInspectRootFsInlineItem {
2973    #[serde(rename = "Layers")]
2974    #[serde(skip_serializing_if = "Option::is_none")]
2975    pub layers: Option<Vec<String>>,
2976    #[serde(rename = "Type")]
2977    pub type_: String,
2978}
2979
2980/// Summary image data for the images matching the query
2981pub type ImageList200Response = Vec<ImageSummary>;
2982
2983pub type ImageLoadImagesTarballParam = Vec<u8>;
2984
2985#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
2986/// No error
2987pub struct ImagePrune200Response {
2988    #[serde(rename = "ImagesDeleted")]
2989    #[serde(skip_serializing_if = "Option::is_none")]
2990    /// Images that were deleted
2991    pub images_deleted: Option<Vec<ImageDeleteResponseItem>>,
2992    #[serde(rename = "SpaceReclaimed")]
2993    #[serde(skip_serializing_if = "Option::is_none")]
2994    /// Disk space reclaimed in bytes
2995    pub space_reclaimed: Option<i64>,
2996}
2997
2998/// No error
2999pub type ImageSearch200Response = Vec<ImageSearchResponseItem>;
3000
3001#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3002pub struct ImageSearchResponseItem {
3003    #[serde(skip_serializing_if = "Option::is_none")]
3004    pub description: Option<String>,
3005    #[serde(skip_serializing_if = "Option::is_none")]
3006    pub is_automated: Option<bool>,
3007    #[serde(skip_serializing_if = "Option::is_none")]
3008    pub is_official: Option<bool>,
3009    #[serde(skip_serializing_if = "Option::is_none")]
3010    pub name: Option<String>,
3011    #[serde(skip_serializing_if = "Option::is_none")]
3012    pub star_count: Option<isize>,
3013}
3014
3015#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3016pub struct ImageSummary {
3017    #[serde(rename = "Containers")]
3018    /// Number of containers using this image. Includes both stopped and running
3019    /// containers.
3020    ///
3021    /// This size is not calculated by default, and depends on which API endpoint
3022    /// is used. `-1` indicates that the value has not been set / calculated.
3023    pub containers: isize,
3024    #[serde(rename = "Created")]
3025    /// Date and time at which the image was created as a Unix timestamp
3026    /// (number of seconds sinds EPOCH).
3027    pub created: isize,
3028    #[serde(rename = "Id")]
3029    /// ID is the content-addressable ID of an image.
3030    ///
3031    /// This identifier is a content-addressable digest calculated from the
3032    /// image's configuration (which includes the digests of layers used by
3033    /// the image).
3034    ///
3035    /// Note that this digest differs from the `RepoDigests` below, which
3036    /// holds digests of image manifests that reference the image.
3037    pub id: String,
3038    #[serde(rename = "Labels")]
3039    #[serde(default)]
3040    #[serde(deserialize_with = "deserialize_nonoptional_map")]
3041    /// User-defined key/value metadata.
3042    pub labels: HashMap<String, String>,
3043    #[serde(rename = "ParentId")]
3044    /// ID of the parent image.
3045    ///
3046    /// Depending on how the image was created, this field may be empty and
3047    /// is only set for images that were built/created locally. This field
3048    /// is empty if the image was pulled from an image registry.
3049    pub parent_id: String,
3050    #[serde(rename = "RepoDigests")]
3051    #[serde(default)]
3052    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
3053    /// List of content-addressable digests of locally available image manifests
3054    /// that the image is referenced from. Multiple manifests can refer to the
3055    /// same image.
3056    ///
3057    /// These digests are usually only available if the image was either pulled
3058    /// from a registry, or if the image was pushed to a registry, which is when
3059    /// the manifest is generated and its digest calculated.
3060    pub repo_digests: Vec<String>,
3061    #[serde(rename = "RepoTags")]
3062    #[serde(default)]
3063    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
3064    /// List of image names/tags in the local image cache that reference this
3065    /// image.
3066    ///
3067    /// Multiple image tags can refer to the same image, and this list may be
3068    /// empty if no tags reference the image, in which case the image is
3069    /// "untagged", in which case it can still be referenced by its ID.
3070    pub repo_tags: Vec<String>,
3071    #[serde(rename = "SharedSize")]
3072    /// Total size of image layers that are shared between this image and other
3073    /// images.
3074    ///
3075    /// This size is not calculated by default. `-1` indicates that the value
3076    /// has not been set / calculated.
3077    pub shared_size: i64,
3078    #[serde(rename = "Size")]
3079    /// Total size of the image including all layers it is composed of.
3080    pub size: i64,
3081    #[serde(rename = "VirtualSize")]
3082    #[serde(skip_serializing_if = "Option::is_none")]
3083    /// Total size of the image including all layers it is composed of.
3084    ///
3085    /// In versions of Docker before v1.10, this field was calculated from
3086    /// the image itself and all of its parent images. Images are now stored
3087    /// self-contained, and no longer use a parent-chain, making this field
3088    /// an equivalent of the Size field.
3089    ///
3090    /// Deprecated: this field is kept for backward compatibility, and will be removed in API v1.44.
3091    pub virtual_size: Option<i64>,
3092}
3093
3094#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3095/// IndexInfo contains information about a registry.
3096pub struct IndexInfo {
3097    #[serde(rename = "Mirrors")]
3098    #[serde(skip_serializing_if = "Option::is_none")]
3099    /// List of mirrors, expressed as URIs.
3100    pub mirrors: Option<Vec<String>>,
3101    #[serde(rename = "Name")]
3102    #[serde(skip_serializing_if = "Option::is_none")]
3103    /// Name of the registry, such as "docker.io".
3104    pub name: Option<String>,
3105    #[serde(rename = "Official")]
3106    #[serde(skip_serializing_if = "Option::is_none")]
3107    /// Indicates whether this is an official registry (i.e., Docker Hub / docker.io)
3108    pub official: Option<bool>,
3109    #[serde(rename = "Secure")]
3110    #[serde(skip_serializing_if = "Option::is_none")]
3111    /// Indicates if the registry is part of the list of insecure
3112    /// registries.
3113    ///
3114    /// If `false`, the registry is insecure. Insecure registries accept
3115    /// un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from
3116    /// unknown CAs) communication.
3117    ///
3118    /// > **Warning**: Insecure registries can be useful when running a local
3119    /// > registry. However, because its use creates security vulnerabilities
3120    /// > it should ONLY be enabled for testing purposes. For increased
3121    /// > security, users should add their CA to their system's list of
3122    /// > trusted CAs instead of enabling this option.
3123    pub secure: Option<bool>,
3124}
3125
3126#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3127/// JoinTokens contains the tokens workers and managers need to join the swarm.
3128pub struct JoinTokens {
3129    #[serde(rename = "Manager")]
3130    #[serde(skip_serializing_if = "Option::is_none")]
3131    /// The token managers can use to join the swarm.
3132    pub manager: Option<String>,
3133    #[serde(rename = "Worker")]
3134    #[serde(skip_serializing_if = "Option::is_none")]
3135    /// The token workers can use to join the swarm.
3136    pub worker: Option<String>,
3137}
3138
3139#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3140/// An object describing a limit on resources which can be requested by a task.
3141pub struct Limit {
3142    #[serde(rename = "MemoryBytes")]
3143    #[serde(skip_serializing_if = "Option::is_none")]
3144    pub memory_bytes: Option<i64>,
3145    #[serde(rename = "NanoCPUs")]
3146    #[serde(skip_serializing_if = "Option::is_none")]
3147    pub nano_cp_us: Option<i64>,
3148    #[serde(rename = "Pids")]
3149    #[serde(skip_serializing_if = "Option::is_none")]
3150    /// Limits the maximum number of PIDs in the container. Set `0` for unlimited.
3151    pub pids: Option<i64>,
3152}
3153
3154#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3155/// Current local status of this node.
3156pub enum LocalNodeState {
3157    #[serde(rename = "")]
3158    Empty,
3159    #[serde(rename = "inactive")]
3160    Inactive,
3161    #[serde(rename = "pending")]
3162    Pending,
3163    #[serde(rename = "active")]
3164    Active,
3165    #[serde(rename = "error")]
3166    Error,
3167    #[serde(rename = "locked")]
3168    Locked,
3169}
3170
3171impl AsRef<str> for LocalNodeState {
3172    fn as_ref(&self) -> &str {
3173        match self {
3174            LocalNodeState::Empty => "",
3175            LocalNodeState::Inactive => "inactive",
3176            LocalNodeState::Pending => "pending",
3177            LocalNodeState::Active => "active",
3178            LocalNodeState::Error => "error",
3179            LocalNodeState::Locked => "locked",
3180        }
3181    }
3182}
3183
3184impl std::fmt::Display for LocalNodeState {
3185    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3186        write!(f, "{}", self.as_ref())
3187    }
3188}
3189
3190#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3191/// ManagerStatus represents the status of a manager.
3192///
3193/// It provides the current status of a node's manager component, if the node
3194/// is a manager.
3195pub struct ManagerStatus {
3196    #[serde(rename = "Addr")]
3197    #[serde(skip_serializing_if = "Option::is_none")]
3198    /// The IP address and port at which the manager is reachable.
3199    pub addr: Option<String>,
3200    #[serde(rename = "Leader")]
3201    #[serde(skip_serializing_if = "Option::is_none")]
3202    pub leader: Option<bool>,
3203    #[serde(rename = "Reachability")]
3204    pub reachability: Option<String>,
3205}
3206
3207#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3208pub struct Mount {
3209    #[serde(rename = "BindOptions")]
3210    #[serde(skip_serializing_if = "Option::is_none")]
3211    /// Optional configuration for the `bind` type.
3212    pub bind_options: Option<MountBindOptionsInlineItem>,
3213    #[serde(rename = "Consistency")]
3214    #[serde(skip_serializing_if = "Option::is_none")]
3215    /// The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`.
3216    pub consistency: Option<String>,
3217    #[serde(rename = "ReadOnly")]
3218    #[serde(skip_serializing_if = "Option::is_none")]
3219    /// Whether the mount should be read-only.
3220    pub read_only: Option<bool>,
3221    #[serde(rename = "Source")]
3222    #[serde(skip_serializing_if = "Option::is_none")]
3223    /// Mount source (e.g. a volume name, a host path).
3224    pub source: Option<String>,
3225    #[serde(rename = "Target")]
3226    #[serde(skip_serializing_if = "Option::is_none")]
3227    /// Container path.
3228    pub target: Option<String>,
3229    #[serde(rename = "TmpfsOptions")]
3230    #[serde(skip_serializing_if = "Option::is_none")]
3231    /// Optional configuration for the `tmpfs` type.
3232    pub tmpfs_options: Option<MountTmpfsOptionsInlineItem>,
3233    #[serde(rename = "Type")]
3234    #[serde(skip_serializing_if = "Option::is_none")]
3235    /// The mount type. Available types:
3236    ///
3237    /// - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container.
3238    /// - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed.
3239    /// - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs.
3240    /// - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container.
3241    /// - `cluster` a Swarm cluster volume
3242    pub type_: Option<String>,
3243    #[serde(rename = "VolumeOptions")]
3244    #[serde(skip_serializing_if = "Option::is_none")]
3245    /// Optional configuration for the `volume` type.
3246    pub volume_options: Option<MountVolumeOptionsInlineItem>,
3247}
3248
3249#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3250/// Optional configuration for the `bind` type.
3251pub struct MountBindOptionsInlineItem {
3252    #[serde(rename = "CreateMountpoint")]
3253    #[serde(skip_serializing_if = "Option::is_none")]
3254    /// Create mount point on host if missing
3255    pub create_mountpoint: Option<bool>,
3256    #[serde(rename = "NonRecursive")]
3257    #[serde(skip_serializing_if = "Option::is_none")]
3258    /// Disable recursive bind mount.
3259    pub non_recursive: Option<bool>,
3260    #[serde(rename = "Propagation")]
3261    #[serde(skip_serializing_if = "Option::is_none")]
3262    /// A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
3263    pub propagation: Option<String>,
3264}
3265
3266#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3267/// A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
3268pub enum MountBindOptionsInlineItemPropagationInlineItem {
3269    #[serde(rename = "private")]
3270    Private,
3271    #[serde(rename = "rprivate")]
3272    Rprivate,
3273    #[serde(rename = "shared")]
3274    Shared,
3275    #[serde(rename = "rshared")]
3276    Rshared,
3277    #[serde(rename = "slave")]
3278    Slave,
3279    #[serde(rename = "rslave")]
3280    Rslave,
3281}
3282
3283impl AsRef<str> for MountBindOptionsInlineItemPropagationInlineItem {
3284    fn as_ref(&self) -> &str {
3285        match self {
3286            MountBindOptionsInlineItemPropagationInlineItem::Private => "private",
3287            MountBindOptionsInlineItemPropagationInlineItem::Rprivate => "rprivate",
3288            MountBindOptionsInlineItemPropagationInlineItem::Shared => "shared",
3289            MountBindOptionsInlineItemPropagationInlineItem::Rshared => "rshared",
3290            MountBindOptionsInlineItemPropagationInlineItem::Slave => "slave",
3291            MountBindOptionsInlineItemPropagationInlineItem::Rslave => "rslave",
3292        }
3293    }
3294}
3295
3296impl std::fmt::Display for MountBindOptionsInlineItemPropagationInlineItem {
3297    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3298        write!(f, "{}", self.as_ref())
3299    }
3300}
3301
3302#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3303/// MountPoint represents a mount point configuration inside the container.
3304/// This is used for reporting the mountpoints in use by a container.
3305pub struct MountPoint {
3306    #[serde(rename = "Destination")]
3307    #[serde(skip_serializing_if = "Option::is_none")]
3308    /// Destination is the path relative to the container root (`/`) where
3309    /// the `Source` is mounted inside the container.
3310    pub destination: Option<String>,
3311    #[serde(rename = "Driver")]
3312    #[serde(skip_serializing_if = "Option::is_none")]
3313    /// Driver is the volume driver used to create the volume (if it is a volume).
3314    pub driver: Option<String>,
3315    #[serde(rename = "Mode")]
3316    #[serde(skip_serializing_if = "Option::is_none")]
3317    /// Mode is a comma separated list of options supplied by the user when
3318    /// creating the bind/volume mount.
3319    ///
3320    /// The default is platform-specific (`"z"` on Linux, empty on Windows).
3321    pub mode: Option<String>,
3322    #[serde(rename = "Name")]
3323    #[serde(skip_serializing_if = "Option::is_none")]
3324    /// Name is the name reference to the underlying data defined by `Source`
3325    /// e.g., the volume name.
3326    pub name: Option<String>,
3327    #[serde(rename = "Propagation")]
3328    #[serde(skip_serializing_if = "Option::is_none")]
3329    /// Propagation describes how mounts are propagated from the host into the
3330    /// mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)
3331    /// for details. This field is not used on Windows.
3332    pub propagation: Option<String>,
3333    #[serde(rename = "RW")]
3334    #[serde(skip_serializing_if = "Option::is_none")]
3335    /// Whether the mount is mounted writable (read-write).
3336    pub rw: Option<bool>,
3337    #[serde(rename = "Source")]
3338    #[serde(skip_serializing_if = "Option::is_none")]
3339    /// Source location of the mount.
3340    ///
3341    /// For volumes, this contains the storage location of the volume (within
3342    /// `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains
3343    /// the source (host) part of the bind-mount. For `tmpfs` mount points, this
3344    /// field is empty.
3345    pub source: Option<String>,
3346    #[serde(rename = "Type")]
3347    #[serde(skip_serializing_if = "Option::is_none")]
3348    /// The mount type:
3349    ///
3350    /// - `bind` a mount of a file or directory from the host into the container.
3351    /// - `volume` a docker volume with the given `Name`.
3352    /// - `tmpfs` a `tmpfs`.
3353    /// - `npipe` a named pipe from the host into the container.
3354    /// - `cluster` a Swarm cluster volume
3355    pub type_: Option<String>,
3356}
3357
3358#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3359/// The mount type:
3360///
3361/// - `bind` a mount of a file or directory from the host into the container.
3362/// - `volume` a docker volume with the given `Name`.
3363/// - `tmpfs` a `tmpfs`.
3364/// - `npipe` a named pipe from the host into the container.
3365/// - `cluster` a Swarm cluster volume
3366pub enum MountPointTypeInlineItem {
3367    #[serde(rename = "bind")]
3368    Bind,
3369    #[serde(rename = "volume")]
3370    Volume,
3371    #[serde(rename = "tmpfs")]
3372    Tmpfs,
3373    #[serde(rename = "npipe")]
3374    Npipe,
3375    #[serde(rename = "cluster")]
3376    Cluster,
3377}
3378
3379impl AsRef<str> for MountPointTypeInlineItem {
3380    fn as_ref(&self) -> &str {
3381        match self {
3382            MountPointTypeInlineItem::Bind => "bind",
3383            MountPointTypeInlineItem::Volume => "volume",
3384            MountPointTypeInlineItem::Tmpfs => "tmpfs",
3385            MountPointTypeInlineItem::Npipe => "npipe",
3386            MountPointTypeInlineItem::Cluster => "cluster",
3387        }
3388    }
3389}
3390
3391impl std::fmt::Display for MountPointTypeInlineItem {
3392    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3393        write!(f, "{}", self.as_ref())
3394    }
3395}
3396
3397#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3398/// Optional configuration for the `tmpfs` type.
3399pub struct MountTmpfsOptionsInlineItem {
3400    #[serde(rename = "Mode")]
3401    #[serde(skip_serializing_if = "Option::is_none")]
3402    /// The permission mode for the tmpfs mount in an integer.
3403    pub mode: Option<isize>,
3404    #[serde(rename = "SizeBytes")]
3405    #[serde(skip_serializing_if = "Option::is_none")]
3406    /// The size for the tmpfs mount in bytes.
3407    pub size_bytes: Option<i64>,
3408}
3409
3410#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3411/// The mount type. Available types:
3412///
3413/// - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container.
3414/// - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed.
3415/// - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs.
3416/// - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container.
3417/// - `cluster` a Swarm cluster volume
3418pub enum MountTypeInlineItem {
3419    #[serde(rename = "bind")]
3420    Bind,
3421    #[serde(rename = "volume")]
3422    Volume,
3423    #[serde(rename = "tmpfs")]
3424    Tmpfs,
3425    #[serde(rename = "npipe")]
3426    Npipe,
3427    #[serde(rename = "cluster")]
3428    Cluster,
3429}
3430
3431impl AsRef<str> for MountTypeInlineItem {
3432    fn as_ref(&self) -> &str {
3433        match self {
3434            MountTypeInlineItem::Bind => "bind",
3435            MountTypeInlineItem::Volume => "volume",
3436            MountTypeInlineItem::Tmpfs => "tmpfs",
3437            MountTypeInlineItem::Npipe => "npipe",
3438            MountTypeInlineItem::Cluster => "cluster",
3439        }
3440    }
3441}
3442
3443impl std::fmt::Display for MountTypeInlineItem {
3444    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3445        write!(f, "{}", self.as_ref())
3446    }
3447}
3448
3449#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3450/// Optional configuration for the `volume` type.
3451pub struct MountVolumeOptionsInlineItem {
3452    #[serde(rename = "DriverConfig")]
3453    #[serde(skip_serializing_if = "Option::is_none")]
3454    /// Map of driver specific options
3455    pub driver_config: Option<MountVolumeOptionsInlineItemDriverConfigInlineItem>,
3456    #[serde(rename = "Labels")]
3457    #[serde(skip_serializing_if = "Option::is_none")]
3458    /// User-defined key/value metadata.
3459    pub labels: Option<HashMap<String, String>>,
3460    #[serde(rename = "NoCopy")]
3461    #[serde(skip_serializing_if = "Option::is_none")]
3462    /// Populate volume with data from the target.
3463    pub no_copy: Option<bool>,
3464}
3465
3466#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3467/// Map of driver specific options
3468pub struct MountVolumeOptionsInlineItemDriverConfigInlineItem {
3469    #[serde(rename = "Name")]
3470    #[serde(skip_serializing_if = "Option::is_none")]
3471    /// Name of the driver to use to create the volume.
3472    pub name: Option<String>,
3473    #[serde(rename = "Options")]
3474    #[serde(skip_serializing_if = "Option::is_none")]
3475    /// key/value map of driver specific options.
3476    pub options: Option<HashMap<String, String>>,
3477}
3478
3479#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3480pub struct Network {
3481    #[serde(rename = "Attachable")]
3482    #[serde(skip_serializing_if = "Option::is_none")]
3483    pub attachable: Option<bool>,
3484    #[serde(rename = "Containers")]
3485    #[serde(skip_serializing_if = "Option::is_none")]
3486    pub containers: Option<HashMap<String, NetworkContainer>>,
3487    #[serde(rename = "Created")]
3488    #[serde(skip_serializing_if = "Option::is_none")]
3489    pub created: Option<DateTime<Utc>>,
3490    #[serde(rename = "Driver")]
3491    #[serde(skip_serializing_if = "Option::is_none")]
3492    pub driver: Option<String>,
3493    #[serde(rename = "EnableIPv6")]
3494    #[serde(skip_serializing_if = "Option::is_none")]
3495    pub enable_i_pv_6: Option<bool>,
3496    #[serde(rename = "IPAM")]
3497    pub ipam: Option<Ipam>,
3498    #[serde(rename = "Id")]
3499    #[serde(skip_serializing_if = "Option::is_none")]
3500    pub id: Option<String>,
3501    #[serde(rename = "Ingress")]
3502    #[serde(skip_serializing_if = "Option::is_none")]
3503    pub ingress: Option<bool>,
3504    #[serde(rename = "Internal")]
3505    #[serde(skip_serializing_if = "Option::is_none")]
3506    pub internal: Option<bool>,
3507    #[serde(rename = "Labels")]
3508    #[serde(skip_serializing_if = "Option::is_none")]
3509    pub labels: Option<HashMap<String, String>>,
3510    #[serde(rename = "Name")]
3511    #[serde(skip_serializing_if = "Option::is_none")]
3512    pub name: Option<String>,
3513    #[serde(rename = "Options")]
3514    #[serde(skip_serializing_if = "Option::is_none")]
3515    pub options: Option<HashMap<String, String>>,
3516    #[serde(rename = "Scope")]
3517    #[serde(skip_serializing_if = "Option::is_none")]
3518    pub scope: Option<String>,
3519}
3520
3521#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3522/// Specifies how a service should be attached to a particular network.
3523pub struct NetworkAttachmentConfig {
3524    #[serde(rename = "Aliases")]
3525    #[serde(skip_serializing_if = "Option::is_none")]
3526    /// Discoverable alternate names for the service on this network.
3527    pub aliases: Option<Vec<String>>,
3528    #[serde(rename = "DriverOpts")]
3529    #[serde(skip_serializing_if = "Option::is_none")]
3530    /// Driver attachment options for the network target.
3531    pub driver_opts: Option<HashMap<String, String>>,
3532    #[serde(rename = "Target")]
3533    #[serde(skip_serializing_if = "Option::is_none")]
3534    /// The target network for attachment. Must be a network name or ID.
3535    pub target: Option<String>,
3536}
3537
3538#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3539pub struct NetworkConnectContainerParam {
3540    #[serde(rename = "Container")]
3541    #[serde(skip_serializing_if = "Option::is_none")]
3542    /// The ID or name of the container to connect to the network.
3543    pub container: Option<String>,
3544    #[serde(rename = "EndpointConfig")]
3545    pub endpoint_config: Option<EndpointSettings>,
3546}
3547
3548#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3549pub struct NetworkContainer {
3550    #[serde(rename = "EndpointID")]
3551    #[serde(skip_serializing_if = "Option::is_none")]
3552    pub endpoint_id: Option<String>,
3553    #[serde(rename = "IPv4Address")]
3554    #[serde(skip_serializing_if = "Option::is_none")]
3555    pub i_pv_4_address: Option<String>,
3556    #[serde(rename = "IPv6Address")]
3557    #[serde(skip_serializing_if = "Option::is_none")]
3558    pub i_pv_6_address: Option<String>,
3559    #[serde(rename = "MacAddress")]
3560    #[serde(skip_serializing_if = "Option::is_none")]
3561    pub mac_address: Option<String>,
3562    #[serde(rename = "Name")]
3563    #[serde(skip_serializing_if = "Option::is_none")]
3564    pub name: Option<String>,
3565}
3566
3567#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3568/// No error
3569pub struct NetworkCreate201Response {
3570    #[serde(rename = "Id")]
3571    #[serde(skip_serializing_if = "Option::is_none")]
3572    /// The ID of the created network.
3573    pub id: Option<String>,
3574    #[serde(rename = "Warning")]
3575    #[serde(skip_serializing_if = "Option::is_none")]
3576    pub warning: Option<String>,
3577}
3578
3579#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3580pub struct NetworkCreateNetworkConfigParam {
3581    #[serde(rename = "Attachable")]
3582    #[serde(skip_serializing_if = "Option::is_none")]
3583    /// Globally scoped network is manually attachable by regular
3584    /// containers from workers in swarm mode.
3585    pub attachable: Option<bool>,
3586    #[serde(rename = "CheckDuplicate")]
3587    #[serde(skip_serializing_if = "Option::is_none")]
3588    /// Check for networks with duplicate names. Since Network is
3589    /// primarily keyed based on a random ID and not on the name, and
3590    /// network name is strictly a user-friendly alias to the network
3591    /// which is uniquely identified using ID, there is no guaranteed
3592    /// way to check for duplicates. CheckDuplicate is there to provide
3593    /// a best effort checking of any networks which has the same name
3594    /// but it is not guaranteed to catch all name collisions.
3595    pub check_duplicate: Option<bool>,
3596    #[serde(rename = "Driver")]
3597    #[serde(skip_serializing_if = "Option::is_none")]
3598    /// Name of the network driver plugin to use.
3599    pub driver: Option<String>,
3600    #[serde(rename = "EnableIPv6")]
3601    #[serde(skip_serializing_if = "Option::is_none")]
3602    /// Enable IPv6 on the network.
3603    pub enable_i_pv_6: Option<bool>,
3604    #[serde(rename = "IPAM")]
3605    pub ipam: Option<Ipam>,
3606    #[serde(rename = "Ingress")]
3607    #[serde(skip_serializing_if = "Option::is_none")]
3608    /// Ingress network is the network which provides the routing-mesh
3609    /// in swarm mode.
3610    pub ingress: Option<bool>,
3611    #[serde(rename = "Internal")]
3612    #[serde(skip_serializing_if = "Option::is_none")]
3613    /// Restrict external access to the network.
3614    pub internal: Option<bool>,
3615    #[serde(rename = "Labels")]
3616    #[serde(skip_serializing_if = "Option::is_none")]
3617    /// User-defined key/value metadata.
3618    pub labels: Option<HashMap<String, String>>,
3619    #[serde(rename = "Name")]
3620    /// The network's name.
3621    pub name: String,
3622    #[serde(rename = "Options")]
3623    #[serde(skip_serializing_if = "Option::is_none")]
3624    /// Network specific options to be used by the drivers.
3625    pub options: Option<HashMap<String, String>>,
3626}
3627
3628#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3629pub struct NetworkDisconnectContainerParam {
3630    #[serde(rename = "Container")]
3631    #[serde(skip_serializing_if = "Option::is_none")]
3632    /// The ID or name of the container to disconnect from the network.
3633    pub container: Option<String>,
3634    #[serde(rename = "Force")]
3635    #[serde(skip_serializing_if = "Option::is_none")]
3636    /// Force the container to disconnect from the network.
3637    pub force: Option<bool>,
3638}
3639
3640/// No error
3641pub type NetworkList200Response = Vec<Network>;
3642
3643#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3644/// No error
3645pub struct NetworkPrune200Response {
3646    #[serde(rename = "NetworksDeleted")]
3647    #[serde(skip_serializing_if = "Option::is_none")]
3648    /// Networks that were deleted
3649    pub networks_deleted: Option<Vec<String>>,
3650}
3651
3652#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3653/// NetworkSettings exposes the network settings in the API
3654pub struct NetworkSettings {
3655    #[serde(rename = "Bridge")]
3656    #[serde(skip_serializing_if = "Option::is_none")]
3657    /// Name of the network's bridge (for example, `docker0`).
3658    pub bridge: Option<String>,
3659    #[serde(rename = "EndpointID")]
3660    #[serde(skip_serializing_if = "Option::is_none")]
3661    /// EndpointID uniquely represents a service endpoint in a Sandbox.
3662    ///
3663    /// <p><br /></p>
3664    ///
3665    /// > **Deprecated**: This field is only propagated when attached to the
3666    /// > default "bridge" network. Use the information from the "bridge"
3667    /// > network inside the `Networks` map instead, which contains the same
3668    /// > information. This field was deprecated in Docker 1.9 and is scheduled
3669    /// > to be removed in Docker 17.12.0
3670    pub endpoint_id: Option<String>,
3671    #[serde(rename = "Gateway")]
3672    #[serde(skip_serializing_if = "Option::is_none")]
3673    /// Gateway address for the default "bridge" network.
3674    ///
3675    /// <p><br /></p>
3676    ///
3677    /// > **Deprecated**: This field is only propagated when attached to the
3678    /// > default "bridge" network. Use the information from the "bridge"
3679    /// > network inside the `Networks` map instead, which contains the same
3680    /// > information. This field was deprecated in Docker 1.9 and is scheduled
3681    /// > to be removed in Docker 17.12.0
3682    pub gateway: Option<String>,
3683    #[serde(rename = "GlobalIPv6Address")]
3684    #[serde(skip_serializing_if = "Option::is_none")]
3685    /// Global IPv6 address for the default "bridge" network.
3686    ///
3687    /// <p><br /></p>
3688    ///
3689    /// > **Deprecated**: This field is only propagated when attached to the
3690    /// > default "bridge" network. Use the information from the "bridge"
3691    /// > network inside the `Networks` map instead, which contains the same
3692    /// > information. This field was deprecated in Docker 1.9 and is scheduled
3693    /// > to be removed in Docker 17.12.0
3694    pub global_i_pv_6_address: Option<String>,
3695    #[serde(rename = "GlobalIPv6PrefixLen")]
3696    #[serde(skip_serializing_if = "Option::is_none")]
3697    /// Mask length of the global IPv6 address.
3698    ///
3699    /// <p><br /></p>
3700    ///
3701    /// > **Deprecated**: This field is only propagated when attached to the
3702    /// > default "bridge" network. Use the information from the "bridge"
3703    /// > network inside the `Networks` map instead, which contains the same
3704    /// > information. This field was deprecated in Docker 1.9 and is scheduled
3705    /// > to be removed in Docker 17.12.0
3706    pub global_i_pv_6_prefix_len: Option<isize>,
3707    #[serde(rename = "HairpinMode")]
3708    #[serde(skip_serializing_if = "Option::is_none")]
3709    /// Indicates if hairpin NAT should be enabled on the virtual interface.
3710    pub hairpin_mode: Option<bool>,
3711    #[serde(rename = "IPAddress")]
3712    #[serde(skip_serializing_if = "Option::is_none")]
3713    /// IPv4 address for the default "bridge" network.
3714    ///
3715    /// <p><br /></p>
3716    ///
3717    /// > **Deprecated**: This field is only propagated when attached to the
3718    /// > default "bridge" network. Use the information from the "bridge"
3719    /// > network inside the `Networks` map instead, which contains the same
3720    /// > information. This field was deprecated in Docker 1.9 and is scheduled
3721    /// > to be removed in Docker 17.12.0
3722    pub ip_address: Option<String>,
3723    #[serde(rename = "IPPrefixLen")]
3724    #[serde(skip_serializing_if = "Option::is_none")]
3725    /// Mask length of the IPv4 address.
3726    ///
3727    /// <p><br /></p>
3728    ///
3729    /// > **Deprecated**: This field is only propagated when attached to the
3730    /// > default "bridge" network. Use the information from the "bridge"
3731    /// > network inside the `Networks` map instead, which contains the same
3732    /// > information. This field was deprecated in Docker 1.9 and is scheduled
3733    /// > to be removed in Docker 17.12.0
3734    pub ip_prefix_len: Option<isize>,
3735    #[serde(rename = "IPv6Gateway")]
3736    #[serde(skip_serializing_if = "Option::is_none")]
3737    /// IPv6 gateway address for this network.
3738    ///
3739    /// <p><br /></p>
3740    ///
3741    /// > **Deprecated**: This field is only propagated when attached to the
3742    /// > default "bridge" network. Use the information from the "bridge"
3743    /// > network inside the `Networks` map instead, which contains the same
3744    /// > information. This field was deprecated in Docker 1.9 and is scheduled
3745    /// > to be removed in Docker 17.12.0
3746    pub i_pv_6_gateway: Option<String>,
3747    #[serde(rename = "LinkLocalIPv6Address")]
3748    #[serde(skip_serializing_if = "Option::is_none")]
3749    /// IPv6 unicast address using the link-local prefix.
3750    pub link_local_i_pv_6_address: Option<String>,
3751    #[serde(rename = "LinkLocalIPv6PrefixLen")]
3752    #[serde(skip_serializing_if = "Option::is_none")]
3753    /// Prefix length of the IPv6 unicast address.
3754    pub link_local_i_pv_6_prefix_len: Option<isize>,
3755    #[serde(rename = "MacAddress")]
3756    #[serde(skip_serializing_if = "Option::is_none")]
3757    /// MAC address for the container on the default "bridge" network.
3758    ///
3759    /// <p><br /></p>
3760    ///
3761    /// > **Deprecated**: This field is only propagated when attached to the
3762    /// > default "bridge" network. Use the information from the "bridge"
3763    /// > network inside the `Networks` map instead, which contains the same
3764    /// > information. This field was deprecated in Docker 1.9 and is scheduled
3765    /// > to be removed in Docker 17.12.0
3766    pub mac_address: Option<String>,
3767    #[serde(rename = "Networks")]
3768    #[serde(skip_serializing_if = "Option::is_none")]
3769    /// Information about all networks that the container is connected to.
3770    pub networks: Option<HashMap<String, EndpointSettings>>,
3771    #[serde(rename = "Ports")]
3772    pub ports: Option<PortMap>,
3773    #[serde(rename = "SandboxID")]
3774    #[serde(skip_serializing_if = "Option::is_none")]
3775    /// SandboxID uniquely represents a container's network stack.
3776    pub sandbox_id: Option<String>,
3777    #[serde(rename = "SandboxKey")]
3778    #[serde(skip_serializing_if = "Option::is_none")]
3779    /// SandboxKey identifies the sandbox
3780    pub sandbox_key: Option<String>,
3781    #[serde(rename = "SecondaryIPAddresses")]
3782    #[serde(skip_serializing_if = "Option::is_none")]
3783    pub secondary_ip_addresses: Option<Vec<Address>>,
3784    #[serde(rename = "SecondaryIPv6Addresses")]
3785    #[serde(skip_serializing_if = "Option::is_none")]
3786    pub secondary_i_pv_6_addresses: Option<Vec<Address>>,
3787}
3788
3789#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3790/// NetworkingConfig represents the container's networking configuration for
3791/// each of its interfaces.
3792/// It is used for the networking configs specified in the `docker create`
3793/// and `docker network connect` commands.
3794pub struct NetworkingConfig {
3795    #[serde(rename = "EndpointsConfig")]
3796    #[serde(skip_serializing_if = "Option::is_none")]
3797    /// A mapping of network name to endpoint configuration for that network.
3798    pub endpoints_config: Option<HashMap<String, EndpointSettings>>,
3799}
3800
3801#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3802pub struct Node {
3803    #[serde(rename = "CreatedAt")]
3804    #[serde(skip_serializing_if = "Option::is_none")]
3805    /// Date and time at which the node was added to the swarm in
3806    /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
3807    pub created_at: Option<DateTime<Utc>>,
3808    #[serde(rename = "Description")]
3809    pub description: Option<NodeDescription>,
3810    #[serde(rename = "ID")]
3811    #[serde(skip_serializing_if = "Option::is_none")]
3812    pub id: Option<String>,
3813    #[serde(rename = "ManagerStatus")]
3814    pub manager_status: Option<ManagerStatus>,
3815    #[serde(rename = "Spec")]
3816    pub spec: Option<NodeSpec>,
3817    #[serde(rename = "Status")]
3818    pub status: Option<NodeStatus>,
3819    #[serde(rename = "UpdatedAt")]
3820    #[serde(skip_serializing_if = "Option::is_none")]
3821    /// Date and time at which the node was last updated in
3822    /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
3823    pub updated_at: Option<DateTime<Utc>>,
3824    #[serde(rename = "Version")]
3825    pub version: Option<ObjectVersion>,
3826}
3827
3828#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3829/// NodeDescription encapsulates the properties of the Node as reported by the
3830/// agent.
3831pub struct NodeDescription {
3832    #[serde(rename = "Engine")]
3833    pub engine: Option<EngineDescription>,
3834    #[serde(rename = "Hostname")]
3835    #[serde(skip_serializing_if = "Option::is_none")]
3836    pub hostname: Option<String>,
3837    #[serde(rename = "Platform")]
3838    pub platform: Option<Platform>,
3839    #[serde(rename = "Resources")]
3840    pub resources: Option<ResourceObject>,
3841    #[serde(rename = "TLSInfo")]
3842    pub tls_info: Option<TlsInfo>,
3843}
3844
3845/// no error
3846pub type NodeList200Response = Vec<Node>;
3847
3848#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3849pub struct NodeSpec {
3850    #[serde(rename = "Availability")]
3851    #[serde(skip_serializing_if = "Option::is_none")]
3852    /// Availability of the node.
3853    pub availability: Option<String>,
3854    #[serde(rename = "Labels")]
3855    #[serde(skip_serializing_if = "Option::is_none")]
3856    /// User-defined key/value metadata.
3857    pub labels: Option<HashMap<String, String>>,
3858    #[serde(rename = "Name")]
3859    #[serde(skip_serializing_if = "Option::is_none")]
3860    /// Name for the node.
3861    pub name: Option<String>,
3862    #[serde(rename = "Role")]
3863    #[serde(skip_serializing_if = "Option::is_none")]
3864    /// Role of the node.
3865    pub role: Option<String>,
3866}
3867
3868#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3869/// Availability of the node.
3870pub enum NodeSpecAvailabilityInlineItem {
3871    #[serde(rename = "active")]
3872    Active,
3873    #[serde(rename = "pause")]
3874    Pause,
3875    #[serde(rename = "drain")]
3876    Drain,
3877}
3878
3879impl AsRef<str> for NodeSpecAvailabilityInlineItem {
3880    fn as_ref(&self) -> &str {
3881        match self {
3882            NodeSpecAvailabilityInlineItem::Active => "active",
3883            NodeSpecAvailabilityInlineItem::Pause => "pause",
3884            NodeSpecAvailabilityInlineItem::Drain => "drain",
3885        }
3886    }
3887}
3888
3889impl std::fmt::Display for NodeSpecAvailabilityInlineItem {
3890    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3891        write!(f, "{}", self.as_ref())
3892    }
3893}
3894
3895#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3896/// Role of the node.
3897pub enum NodeSpecRoleInlineItem {
3898    #[serde(rename = "worker")]
3899    Worker,
3900    #[serde(rename = "manager")]
3901    Manager,
3902}
3903
3904impl AsRef<str> for NodeSpecRoleInlineItem {
3905    fn as_ref(&self) -> &str {
3906        match self {
3907            NodeSpecRoleInlineItem::Worker => "worker",
3908            NodeSpecRoleInlineItem::Manager => "manager",
3909        }
3910    }
3911}
3912
3913impl std::fmt::Display for NodeSpecRoleInlineItem {
3914    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3915        write!(f, "{}", self.as_ref())
3916    }
3917}
3918
3919#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3920/// NodeState represents the state of a node.
3921pub enum NodeState {
3922    #[serde(rename = "unknown")]
3923    Unknown,
3924    #[serde(rename = "down")]
3925    Down,
3926    #[serde(rename = "ready")]
3927    Ready,
3928    #[serde(rename = "disconnected")]
3929    Disconnected,
3930}
3931
3932impl AsRef<str> for NodeState {
3933    fn as_ref(&self) -> &str {
3934        match self {
3935            NodeState::Unknown => "unknown",
3936            NodeState::Down => "down",
3937            NodeState::Ready => "ready",
3938            NodeState::Disconnected => "disconnected",
3939        }
3940    }
3941}
3942
3943impl std::fmt::Display for NodeState {
3944    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3945        write!(f, "{}", self.as_ref())
3946    }
3947}
3948
3949#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3950/// NodeStatus represents the status of a node.
3951///
3952/// It provides the current status of the node, as seen by the manager.
3953pub struct NodeStatus {
3954    #[serde(rename = "Addr")]
3955    #[serde(skip_serializing_if = "Option::is_none")]
3956    /// IP address of the node.
3957    pub addr: Option<String>,
3958    #[serde(rename = "Message")]
3959    #[serde(skip_serializing_if = "Option::is_none")]
3960    pub message: Option<String>,
3961    #[serde(rename = "State")]
3962    pub state: Option<String>,
3963}
3964
3965#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3966/// A descriptor struct containing digest, media type, and size, as defined in
3967/// the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md).
3968pub struct OciDescriptor {
3969    #[serde(skip_serializing_if = "Option::is_none")]
3970    /// The digest of the targeted content.
3971    pub digest: Option<String>,
3972    #[serde(rename = "mediaType")]
3973    #[serde(skip_serializing_if = "Option::is_none")]
3974    /// The media type of the object this schema refers to.
3975    pub media_type: Option<String>,
3976    #[serde(skip_serializing_if = "Option::is_none")]
3977    /// The size in bytes of the blob.
3978    pub size: Option<i64>,
3979}
3980
3981#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3982/// Describes the platform which the image in the manifest runs on, as defined
3983/// in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md).
3984pub struct OciPlatform {
3985    #[serde(skip_serializing_if = "Option::is_none")]
3986    /// The CPU architecture, for example `amd64` or `ppc64`.
3987    pub architecture: Option<String>,
3988    #[serde(skip_serializing_if = "Option::is_none")]
3989    /// The operating system, for example `linux` or `windows`.
3990    pub os: Option<String>,
3991    #[serde(rename = "os.features")]
3992    #[serde(skip_serializing_if = "Option::is_none")]
3993    /// Optional field specifying an array of strings, each listing a required
3994    /// OS feature (for example on Windows `win32k`).
3995    pub os_features: Option<Vec<String>>,
3996    #[serde(rename = "os.version")]
3997    #[serde(skip_serializing_if = "Option::is_none")]
3998    /// Optional field specifying the operating system version, for example on
3999    /// Windows `10.0.19041.1165`.
4000    pub os_version: Option<String>,
4001    #[serde(skip_serializing_if = "Option::is_none")]
4002    /// Optional field specifying a variant of the CPU, for example `v7` to
4003    /// specify ARMv7 when architecture is `arm`.
4004    pub variant: Option<String>,
4005}
4006
4007#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4008/// The version number of the object such as node, service, etc. This is needed
4009/// to avoid conflicting writes. The client must send the version number along
4010/// with the modified specification when updating these objects.
4011///
4012/// This approach ensures safe concurrency and determinism in that the change
4013/// on the object may not be applied if the version number has changed from the
4014/// last read. In other words, if two update requests specify the same base
4015/// version, only one of the requests can succeed. As a result, two separate
4016/// update requests that happen at the same time will not unintentionally
4017/// overwrite each other.
4018pub struct ObjectVersion {
4019    #[serde(rename = "Index")]
4020    #[serde(skip_serializing_if = "Option::is_none")]
4021    pub index: Option<u64>,
4022}
4023
4024#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4025/// Represents a peer-node in the swarm
4026pub struct PeerNode {
4027    #[serde(rename = "Addr")]
4028    #[serde(skip_serializing_if = "Option::is_none")]
4029    /// IP address and ports at which this node can be reached.
4030    pub addr: Option<String>,
4031    #[serde(rename = "NodeID")]
4032    #[serde(skip_serializing_if = "Option::is_none")]
4033    /// Unique identifier of for this node in the swarm.
4034    pub node_id: Option<String>,
4035}
4036
4037#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4038/// Platform represents the platform (Arch/OS).
4039pub struct Platform {
4040    #[serde(rename = "Architecture")]
4041    #[serde(skip_serializing_if = "Option::is_none")]
4042    /// Architecture represents the hardware architecture (for example,
4043    /// `x86_64`).
4044    pub architecture: Option<String>,
4045    #[serde(rename = "OS")]
4046    #[serde(skip_serializing_if = "Option::is_none")]
4047    /// OS represents the Operating System (for example, `linux` or `windows`).
4048    pub os: Option<String>,
4049}
4050
4051#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4052/// A plugin for the Engine API
4053pub struct Plugin {
4054    #[serde(rename = "Config")]
4055    /// The config of a plugin.
4056    pub config: PluginConfigInlineItem,
4057    #[serde(rename = "Enabled")]
4058    /// True if the plugin is running. False if the plugin is not running, only installed.
4059    pub enabled: bool,
4060    #[serde(rename = "Id")]
4061    #[serde(skip_serializing_if = "Option::is_none")]
4062    pub id: Option<String>,
4063    #[serde(rename = "Name")]
4064    pub name: String,
4065    #[serde(rename = "PluginReference")]
4066    #[serde(skip_serializing_if = "Option::is_none")]
4067    /// plugin remote reference used to push/pull the plugin
4068    pub plugin_reference: Option<String>,
4069    #[serde(rename = "Settings")]
4070    /// Settings that can be modified by users.
4071    pub settings: PluginSettingsInlineItem,
4072}
4073
4074#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4075/// The config of a plugin.
4076pub struct PluginConfigInlineItem {
4077    #[serde(rename = "Args")]
4078    pub args: PluginConfigInlineItemArgsInlineItem,
4079    #[serde(rename = "Description")]
4080    pub description: String,
4081    #[serde(rename = "DockerVersion")]
4082    #[serde(skip_serializing_if = "Option::is_none")]
4083    /// Docker Version used to create the plugin
4084    pub docker_version: Option<String>,
4085    #[serde(rename = "Documentation")]
4086    pub documentation: String,
4087    #[serde(rename = "Entrypoint")]
4088    #[serde(default)]
4089    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4090    pub entrypoint: Vec<String>,
4091    #[serde(rename = "Env")]
4092    #[serde(default)]
4093    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4094    pub env: Vec<PluginEnv>,
4095    #[serde(rename = "Interface")]
4096    /// The interface between Docker and the plugin
4097    pub interface: PluginConfigInlineItemInterfaceInlineItem,
4098    #[serde(rename = "IpcHost")]
4099    pub ipc_host: bool,
4100    #[serde(rename = "Linux")]
4101    pub linux: PluginConfigInlineItemLinuxInlineItem,
4102    #[serde(rename = "Mounts")]
4103    #[serde(default)]
4104    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4105    pub mounts: Vec<PluginMount>,
4106    #[serde(rename = "Network")]
4107    pub network: PluginConfigInlineItemNetworkInlineItem,
4108    #[serde(rename = "PidHost")]
4109    pub pid_host: bool,
4110    #[serde(rename = "PropagatedMount")]
4111    pub propagated_mount: String,
4112    #[serde(rename = "User")]
4113    #[serde(skip_serializing_if = "Option::is_none")]
4114    pub user: Option<PluginConfigInlineItemUserInlineItem>,
4115    #[serde(rename = "WorkDir")]
4116    pub work_dir: String,
4117    #[serde(skip_serializing_if = "Option::is_none")]
4118    pub rootfs: Option<PluginConfigInlineItemrootfsInlineItem>,
4119}
4120
4121#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4122pub struct PluginConfigInlineItemArgsInlineItem {
4123    #[serde(rename = "Description")]
4124    pub description: String,
4125    #[serde(rename = "Name")]
4126    pub name: String,
4127    #[serde(rename = "Settable")]
4128    #[serde(default)]
4129    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4130    pub settable: Vec<String>,
4131    #[serde(rename = "Value")]
4132    #[serde(default)]
4133    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4134    pub value: Vec<String>,
4135}
4136
4137#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4138/// The interface between Docker and the plugin
4139pub struct PluginConfigInlineItemInterfaceInlineItem {
4140    #[serde(rename = "ProtocolScheme")]
4141    #[serde(skip_serializing_if = "Option::is_none")]
4142    /// Protocol to use for clients connecting to the plugin.
4143    pub protocol_scheme: Option<String>,
4144    #[serde(rename = "Socket")]
4145    pub socket: String,
4146    #[serde(rename = "Types")]
4147    #[serde(default)]
4148    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4149    pub types: Vec<PluginInterfaceType>,
4150}
4151
4152#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4153/// Protocol to use for clients connecting to the plugin.
4154pub enum PluginConfigInlineItemInterfaceInlineItemProtocolSchemeInlineItem {
4155    #[serde(rename = "")]
4156    Empty,
4157    #[serde(rename = "moby.plugins.http/v1")]
4158    MobyPluginsHttpV1,
4159}
4160
4161impl AsRef<str> for PluginConfigInlineItemInterfaceInlineItemProtocolSchemeInlineItem {
4162    fn as_ref(&self) -> &str {
4163        match self {
4164            PluginConfigInlineItemInterfaceInlineItemProtocolSchemeInlineItem::Empty => "",
4165            PluginConfigInlineItemInterfaceInlineItemProtocolSchemeInlineItem::MobyPluginsHttpV1 => "moby.plugins.http/v1",
4166        }
4167    }
4168}
4169
4170impl std::fmt::Display for PluginConfigInlineItemInterfaceInlineItemProtocolSchemeInlineItem {
4171    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4172        write!(f, "{}", self.as_ref())
4173    }
4174}
4175
4176#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4177pub struct PluginConfigInlineItemLinuxInlineItem {
4178    #[serde(rename = "AllowAllDevices")]
4179    pub allow_all_devices: bool,
4180    #[serde(rename = "Capabilities")]
4181    #[serde(default)]
4182    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4183    pub capabilities: Vec<String>,
4184    #[serde(rename = "Devices")]
4185    #[serde(default)]
4186    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4187    pub devices: Vec<PluginDevice>,
4188}
4189
4190#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4191pub struct PluginConfigInlineItemNetworkInlineItem {
4192    #[serde(rename = "Type")]
4193    pub type_: String,
4194}
4195
4196#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4197pub struct PluginConfigInlineItemUserInlineItem {
4198    #[serde(rename = "GID")]
4199    #[serde(skip_serializing_if = "Option::is_none")]
4200    pub gid: Option<u32>,
4201    #[serde(rename = "UID")]
4202    #[serde(skip_serializing_if = "Option::is_none")]
4203    pub uid: Option<u32>,
4204}
4205
4206#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4207pub struct PluginConfigInlineItemrootfsInlineItem {
4208    #[serde(skip_serializing_if = "Option::is_none")]
4209    pub diff_ids: Option<Vec<String>>,
4210    #[serde(rename = "type")]
4211    #[serde(skip_serializing_if = "Option::is_none")]
4212    pub type_: Option<String>,
4213}
4214
4215pub type PluginCreateTarContextParam = Vec<u8>;
4216
4217#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4218pub struct PluginDevice {
4219    #[serde(rename = "Description")]
4220    pub description: String,
4221    #[serde(rename = "Name")]
4222    pub name: String,
4223    #[serde(rename = "Path")]
4224    pub path: String,
4225    #[serde(rename = "Settable")]
4226    #[serde(default)]
4227    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4228    pub settable: Vec<String>,
4229}
4230
4231#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4232pub struct PluginEnv {
4233    #[serde(rename = "Description")]
4234    pub description: String,
4235    #[serde(rename = "Name")]
4236    pub name: String,
4237    #[serde(rename = "Settable")]
4238    #[serde(default)]
4239    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4240    pub settable: Vec<String>,
4241    #[serde(rename = "Value")]
4242    pub value: String,
4243}
4244
4245#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4246pub struct PluginInterfaceType {
4247    #[serde(rename = "Capability")]
4248    pub capability: String,
4249    #[serde(rename = "Prefix")]
4250    pub prefix: String,
4251    #[serde(rename = "Version")]
4252    pub version: String,
4253}
4254
4255/// No error
4256pub type PluginList200Response = Vec<Plugin>;
4257
4258#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4259pub struct PluginMount {
4260    #[serde(rename = "Description")]
4261    pub description: String,
4262    #[serde(rename = "Destination")]
4263    pub destination: String,
4264    #[serde(rename = "Name")]
4265    pub name: String,
4266    #[serde(rename = "Options")]
4267    #[serde(default)]
4268    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4269    pub options: Vec<String>,
4270    #[serde(rename = "Settable")]
4271    #[serde(default)]
4272    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4273    pub settable: Vec<String>,
4274    #[serde(rename = "Source")]
4275    pub source: String,
4276    #[serde(rename = "Type")]
4277    pub type_: String,
4278}
4279
4280#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4281/// Describes a permission the user has to accept upon installing
4282/// the plugin.
4283pub struct PluginPrivilege {
4284    #[serde(rename = "Description")]
4285    #[serde(skip_serializing_if = "Option::is_none")]
4286    pub description: Option<String>,
4287    #[serde(rename = "Name")]
4288    #[serde(skip_serializing_if = "Option::is_none")]
4289    pub name: Option<String>,
4290    #[serde(rename = "Value")]
4291    #[serde(skip_serializing_if = "Option::is_none")]
4292    pub value: Option<Vec<String>>,
4293}
4294
4295pub type PluginPullBodyParam = Vec<PluginPrivilege>;
4296
4297pub type PluginSetBodyParam = Vec<String>;
4298
4299#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4300/// Settings that can be modified by users.
4301pub struct PluginSettingsInlineItem {
4302    #[serde(rename = "Args")]
4303    #[serde(default)]
4304    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4305    pub args: Vec<String>,
4306    #[serde(rename = "Devices")]
4307    #[serde(default)]
4308    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4309    pub devices: Vec<PluginDevice>,
4310    #[serde(rename = "Env")]
4311    #[serde(default)]
4312    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4313    pub env: Vec<String>,
4314    #[serde(rename = "Mounts")]
4315    #[serde(default)]
4316    #[serde(deserialize_with = "deserialize_nonoptional_vec")]
4317    pub mounts: Vec<PluginMount>,
4318}
4319
4320pub type PluginUpgradeBodyParam = Vec<PluginPrivilege>;
4321
4322#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4323/// Available plugins per type.
4324///
4325/// <p><br /></p>
4326///
4327/// > **Note**: Only unmanaged (V1) plugins are included in this list.
4328/// > V1 plugins are "lazily" loaded, and are not returned in this list
4329/// > if there is no resource using the plugin.
4330pub struct PluginsInfo {
4331    #[serde(rename = "Authorization")]
4332    #[serde(skip_serializing_if = "Option::is_none")]
4333    /// Names of available authorization plugins.
4334    pub authorization: Option<Vec<String>>,
4335    #[serde(rename = "Log")]
4336    #[serde(skip_serializing_if = "Option::is_none")]
4337    /// Names of available logging-drivers, and logging-driver plugins.
4338    pub log: Option<Vec<String>>,
4339    #[serde(rename = "Network")]
4340    #[serde(skip_serializing_if = "Option::is_none")]
4341    /// Names of available network-drivers, and network-driver plugins.
4342    pub network: Option<Vec<String>>,
4343    #[serde(rename = "Volume")]
4344    #[serde(skip_serializing_if = "Option::is_none")]
4345    /// Names of available volume-drivers, and network-driver plugins.
4346    pub volume: Option<Vec<String>>,
4347}
4348
4349#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4350/// An open port on a container
4351pub struct Port {
4352    #[serde(rename = "IP")]
4353    #[serde(skip_serializing_if = "Option::is_none")]
4354    /// Host IP address that the container's port is mapped to
4355    pub ip: Option<String>,
4356    #[serde(rename = "PrivatePort")]
4357    /// Port on the container
4358    pub private_port: u16,
4359    #[serde(rename = "PublicPort")]
4360    #[serde(skip_serializing_if = "Option::is_none")]
4361    /// Port exposed on the host
4362    pub public_port: Option<u16>,
4363    #[serde(rename = "Type")]
4364    pub type_: String,
4365}
4366
4367#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4368/// PortBinding represents a binding between a host IP address and a host
4369/// port.
4370pub struct PortBinding {
4371    #[serde(rename = "HostIp")]
4372    #[serde(skip_serializing_if = "Option::is_none")]
4373    /// Host IP address that the container's port is mapped to.
4374    pub host_ip: Option<String>,
4375    #[serde(rename = "HostPort")]
4376    #[serde(skip_serializing_if = "Option::is_none")]
4377    /// Host port number that the container's port is mapped to.
4378    pub host_port: Option<String>,
4379}
4380
4381/// PortMap describes the mapping of container ports to host ports, using the
4382/// container's port-number and protocol as key in the format `<port>/<protocol>`,
4383/// for example, `80/udp`.
4384///
4385/// If a container's port is mapped for multiple protocols, separate entries
4386/// are added to the mapping table.
4387pub type PortMap = HashMap<String, Option<Vec<PortBinding>>>;
4388
4389#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4390pub enum PortTypeInlineItem {
4391    #[serde(rename = "tcp")]
4392    Tcp,
4393    #[serde(rename = "udp")]
4394    Udp,
4395    #[serde(rename = "sctp")]
4396    Sctp,
4397}
4398
4399impl AsRef<str> for PortTypeInlineItem {
4400    fn as_ref(&self) -> &str {
4401        match self {
4402            PortTypeInlineItem::Tcp => "tcp",
4403            PortTypeInlineItem::Udp => "udp",
4404            PortTypeInlineItem::Sctp => "sctp",
4405        }
4406    }
4407}
4408
4409impl std::fmt::Display for PortTypeInlineItem {
4410    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4411        write!(f, "{}", self.as_ref())
4412    }
4413}
4414
4415#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4416pub struct ProcessConfig {
4417    #[serde(skip_serializing_if = "Option::is_none")]
4418    pub arguments: Option<Vec<String>>,
4419    #[serde(skip_serializing_if = "Option::is_none")]
4420    pub entrypoint: Option<String>,
4421    #[serde(skip_serializing_if = "Option::is_none")]
4422    pub privileged: Option<bool>,
4423    #[serde(skip_serializing_if = "Option::is_none")]
4424    pub tty: Option<bool>,
4425    #[serde(skip_serializing_if = "Option::is_none")]
4426    pub user: Option<String>,
4427}
4428
4429#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4430pub struct ProgressDetail {
4431    #[serde(skip_serializing_if = "Option::is_none")]
4432    pub current: Option<isize>,
4433    #[serde(skip_serializing_if = "Option::is_none")]
4434    pub total: Option<isize>,
4435}
4436
4437#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4438pub struct PushImageInfo {
4439    #[serde(skip_serializing_if = "Option::is_none")]
4440    pub error: Option<String>,
4441    #[serde(skip_serializing_if = "Option::is_none")]
4442    pub progress: Option<String>,
4443    #[serde(rename = "progressDetail")]
4444    pub progress_detail: Option<ProgressDetail>,
4445    #[serde(skip_serializing_if = "Option::is_none")]
4446    pub status: Option<String>,
4447}
4448
4449pub type PutContainerArchiveInputStreamParam = Vec<u8>;
4450
4451#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4452/// Reachability represents the reachability of a node.
4453pub enum Reachability {
4454    #[serde(rename = "unknown")]
4455    Unknown,
4456    #[serde(rename = "unreachable")]
4457    Unreachable,
4458    #[serde(rename = "reachable")]
4459    Reachable,
4460}
4461
4462impl AsRef<str> for Reachability {
4463    fn as_ref(&self) -> &str {
4464        match self {
4465            Reachability::Unknown => "unknown",
4466            Reachability::Unreachable => "unreachable",
4467            Reachability::Reachable => "reachable",
4468        }
4469    }
4470}
4471
4472impl std::fmt::Display for Reachability {
4473    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4474        write!(f, "{}", self.as_ref())
4475    }
4476}
4477
4478#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4479/// RegistryServiceConfig stores daemon registry services configuration.
4480pub struct RegistryServiceConfig {
4481    #[serde(rename = "AllowNondistributableArtifactsCIDRs")]
4482    #[serde(skip_serializing_if = "Option::is_none")]
4483    /// List of IP ranges to which nondistributable artifacts can be pushed,
4484    /// using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632).
4485    ///
4486    /// Some images (for example, Windows base images) contain artifacts
4487    /// whose distribution is restricted by license. When these images are
4488    /// pushed to a registry, restricted artifacts are not included.
4489    ///
4490    /// This configuration override this behavior, and enables the daemon to
4491    /// push nondistributable artifacts to all registries whose resolved IP
4492    /// address is within the subnet described by the CIDR syntax.
4493    ///
4494    /// This option is useful when pushing images containing
4495    /// nondistributable artifacts to a registry on an air-gapped network so
4496    /// hosts on that network can pull the images without connecting to
4497    /// another server.
4498    ///
4499    /// > **Warning**: Nondistributable artifacts typically have restrictions
4500    /// > on how and where they can be distributed and shared. Only use this
4501    /// > feature to push artifacts to private registries and ensure that you
4502    /// > are in compliance with any terms that cover redistributing
4503    /// > nondistributable artifacts.
4504    pub allow_nondistributable_artifacts_cid_rs: Option<Vec<String>>,
4505    #[serde(rename = "AllowNondistributableArtifactsHostnames")]
4506    #[serde(skip_serializing_if = "Option::is_none")]
4507    /// List of registry hostnames to which nondistributable artifacts can be
4508    /// pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`.
4509    ///
4510    /// Some images (for example, Windows base images) contain artifacts
4511    /// whose distribution is restricted by license. When these images are
4512    /// pushed to a registry, restricted artifacts are not included.
4513    ///
4514    /// This configuration override this behavior for the specified
4515    /// registries.
4516    ///
4517    /// This option is useful when pushing images containing
4518    /// nondistributable artifacts to a registry on an air-gapped network so
4519    /// hosts on that network can pull the images without connecting to
4520    /// another server.
4521    ///
4522    /// > **Warning**: Nondistributable artifacts typically have restrictions
4523    /// > on how and where they can be distributed and shared. Only use this
4524    /// > feature to push artifacts to private registries and ensure that you
4525    /// > are in compliance with any terms that cover redistributing
4526    /// > nondistributable artifacts.
4527    pub allow_nondistributable_artifacts_hostnames: Option<Vec<String>>,
4528    #[serde(rename = "IndexConfigs")]
4529    #[serde(skip_serializing_if = "Option::is_none")]
4530    pub index_configs: Option<HashMap<String, IndexInfo>>,
4531    #[serde(rename = "InsecureRegistryCIDRs")]
4532    #[serde(skip_serializing_if = "Option::is_none")]
4533    /// List of IP ranges of insecure registries, using the CIDR syntax
4534    /// ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries
4535    /// accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates
4536    /// from unknown CAs) communication.
4537    ///
4538    /// By default, local registries (`127.0.0.0/8`) are configured as
4539    /// insecure. All other registries are secure. Communicating with an
4540    /// insecure registry is not possible if the daemon assumes that registry
4541    /// is secure.
4542    ///
4543    /// This configuration override this behavior, insecure communication with
4544    /// registries whose resolved IP address is within the subnet described by
4545    /// the CIDR syntax.
4546    ///
4547    /// Registries can also be marked insecure by hostname. Those registries
4548    /// are listed under `IndexConfigs` and have their `Secure` field set to
4549    /// `false`.
4550    ///
4551    /// > **Warning**: Using this option can be useful when running a local
4552    /// > registry, but introduces security vulnerabilities. This option
4553    /// > should therefore ONLY be used for testing purposes. For increased
4554    /// > security, users should add their CA to their system's list of trusted
4555    /// > CAs instead of enabling this option.
4556    pub insecure_registry_cid_rs: Option<Vec<String>>,
4557    #[serde(rename = "Mirrors")]
4558    #[serde(skip_serializing_if = "Option::is_none")]
4559    /// List of registry URLs that act as a mirror for the official
4560    /// (`docker.io`) registry.
4561    pub mirrors: Option<Vec<String>>,
4562}
4563
4564#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4565/// An object describing the resources which can be advertised by a node and
4566/// requested by a task.
4567pub struct ResourceObject {
4568    #[serde(rename = "GenericResources")]
4569    pub generic_resources: Option<GenericResources>,
4570    #[serde(rename = "MemoryBytes")]
4571    #[serde(skip_serializing_if = "Option::is_none")]
4572    pub memory_bytes: Option<i64>,
4573    #[serde(rename = "NanoCPUs")]
4574    #[serde(skip_serializing_if = "Option::is_none")]
4575    pub nano_cp_us: Option<i64>,
4576}
4577
4578#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4579/// A container's resources (cgroups config, ulimits, etc)
4580pub struct Resources {
4581    #[serde(rename = "BlkioDeviceReadBps")]
4582    #[serde(skip_serializing_if = "Option::is_none")]
4583    /// Limit read rate (bytes per second) from a device, in the form:
4584    ///
4585    /// ```
4586    /// [{"Path": "device_path", "Rate": rate}]
4587    /// ```
4588    pub blkio_device_read_bps: Option<Vec<ThrottleDevice>>,
4589    #[serde(rename = "BlkioDeviceReadIOps")]
4590    #[serde(skip_serializing_if = "Option::is_none")]
4591    /// Limit read rate (IO per second) from a device, in the form:
4592    ///
4593    /// ```
4594    /// [{"Path": "device_path", "Rate": rate}]
4595    /// ```
4596    pub blkio_device_read_i_ops: Option<Vec<ThrottleDevice>>,
4597    #[serde(rename = "BlkioDeviceWriteBps")]
4598    #[serde(skip_serializing_if = "Option::is_none")]
4599    /// Limit write rate (bytes per second) to a device, in the form:
4600    ///
4601    /// ```
4602    /// [{"Path": "device_path", "Rate": rate}]
4603    /// ```
4604    pub blkio_device_write_bps: Option<Vec<ThrottleDevice>>,
4605    #[serde(rename = "BlkioDeviceWriteIOps")]
4606    #[serde(skip_serializing_if = "Option::is_none")]
4607    /// Limit write rate (IO per second) to a device, in the form:
4608    ///
4609    /// ```
4610    /// [{"Path": "device_path", "Rate": rate}]
4611    /// ```
4612    pub blkio_device_write_i_ops: Option<Vec<ThrottleDevice>>,
4613    #[serde(rename = "BlkioWeight")]
4614    #[serde(skip_serializing_if = "Option::is_none")]
4615    /// Block IO weight (relative weight).
4616    pub blkio_weight: Option<isize>,
4617    #[serde(rename = "BlkioWeightDevice")]
4618    #[serde(skip_serializing_if = "Option::is_none")]
4619    /// Block IO weight (relative device weight) in the form:
4620    ///
4621    /// ```
4622    /// [{"Path": "device_path", "Weight": weight}]
4623    /// ```
4624    pub blkio_weight_device: Option<Vec<ResourcesBlkioWeightDeviceInlineItem>>,
4625    #[serde(rename = "CgroupParent")]
4626    #[serde(skip_serializing_if = "Option::is_none")]
4627    /// Path to `cgroups` under which the container's `cgroup` is created. If
4628    /// the path is not absolute, the path is considered to be relative to the
4629    /// `cgroups` path of the init process. Cgroups are created if they do not
4630    /// already exist.
4631    pub cgroup_parent: Option<String>,
4632    #[serde(rename = "CpuCount")]
4633    #[serde(skip_serializing_if = "Option::is_none")]
4634    /// The number of usable CPUs (Windows only).
4635    ///
4636    /// On Windows Server containers, the processor resource controls are
4637    /// mutually exclusive. The order of precedence is `CPUCount` first, then
4638    /// `CPUShares`, and `CPUPercent` last.
4639    pub cpu_count: Option<i64>,
4640    #[serde(rename = "CpuPercent")]
4641    #[serde(skip_serializing_if = "Option::is_none")]
4642    /// The usable percentage of the available CPUs (Windows only).
4643    ///
4644    /// On Windows Server containers, the processor resource controls are
4645    /// mutually exclusive. The order of precedence is `CPUCount` first, then
4646    /// `CPUShares`, and `CPUPercent` last.
4647    pub cpu_percent: Option<i64>,
4648    #[serde(rename = "CpuPeriod")]
4649    #[serde(skip_serializing_if = "Option::is_none")]
4650    /// The length of a CPU period in microseconds.
4651    pub cpu_period: Option<i64>,
4652    #[serde(rename = "CpuQuota")]
4653    #[serde(skip_serializing_if = "Option::is_none")]
4654    /// Microseconds of CPU time that the container can get in a CPU period.
4655    pub cpu_quota: Option<i64>,
4656    #[serde(rename = "CpuRealtimePeriod")]
4657    #[serde(skip_serializing_if = "Option::is_none")]
4658    /// The length of a CPU real-time period in microseconds. Set to 0 to
4659    /// allocate no time allocated to real-time tasks.
4660    pub cpu_realtime_period: Option<i64>,
4661    #[serde(rename = "CpuRealtimeRuntime")]
4662    #[serde(skip_serializing_if = "Option::is_none")]
4663    /// The length of a CPU real-time runtime in microseconds. Set to 0 to
4664    /// allocate no time allocated to real-time tasks.
4665    pub cpu_realtime_runtime: Option<i64>,
4666    #[serde(rename = "CpuShares")]
4667    #[serde(skip_serializing_if = "Option::is_none")]
4668    /// An integer value representing this container's relative CPU weight
4669    /// versus other containers.
4670    pub cpu_shares: Option<isize>,
4671    #[serde(rename = "CpusetCpus")]
4672    #[serde(skip_serializing_if = "Option::is_none")]
4673    /// CPUs in which to allow execution (e.g., `0-3`, `0,1`).
4674    pub cpuset_cpus: Option<String>,
4675    #[serde(rename = "CpusetMems")]
4676    #[serde(skip_serializing_if = "Option::is_none")]
4677    /// Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only
4678    /// effective on NUMA systems.
4679    pub cpuset_mems: Option<String>,
4680    #[serde(rename = "DeviceCgroupRules")]
4681    #[serde(skip_serializing_if = "Option::is_none")]
4682    /// a list of cgroup rules to apply to the container
4683    pub device_cgroup_rules: Option<Vec<String>>,
4684    #[serde(rename = "DeviceRequests")]
4685    #[serde(skip_serializing_if = "Option::is_none")]
4686    /// A list of requests for devices to be sent to device drivers.
4687    pub device_requests: Option<Vec<DeviceRequest>>,
4688    #[serde(rename = "Devices")]
4689    #[serde(skip_serializing_if = "Option::is_none")]
4690    /// A list of devices to add to the container.
4691    pub devices: Option<Vec<DeviceMapping>>,
4692    #[serde(rename = "IOMaximumBandwidth")]
4693    #[serde(skip_serializing_if = "Option::is_none")]
4694    /// Maximum IO in bytes per second for the container system drive
4695    /// (Windows only).
4696    pub io_maximum_bandwidth: Option<i64>,
4697    #[serde(rename = "IOMaximumIOps")]
4698    #[serde(skip_serializing_if = "Option::is_none")]
4699    /// Maximum IOps for the container system drive (Windows only)
4700    pub io_maximum_i_ops: Option<i64>,
4701    #[serde(rename = "Init")]
4702    #[serde(skip_serializing_if = "Option::is_none")]
4703    /// Run an init inside the container that forwards signals and reaps
4704    /// processes. This field is omitted if empty, and the default (as
4705    /// configured on the daemon) is used.
4706    pub init: Option<bool>,
4707    #[serde(rename = "KernelMemoryTCP")]
4708    #[serde(skip_serializing_if = "Option::is_none")]
4709    /// Hard limit for kernel TCP buffer memory (in bytes). Depending on the
4710    /// OCI runtime in use, this option may be ignored. It is no longer supported
4711    /// by the default (runc) runtime.
4712    ///
4713    /// This field is omitted when empty.
4714    pub kernel_memory_tcp: Option<i64>,
4715    #[serde(rename = "Memory")]
4716    #[serde(skip_serializing_if = "Option::is_none")]
4717    /// Memory limit in bytes.
4718    pub memory: Option<i64>,
4719    #[serde(rename = "MemoryReservation")]
4720    #[serde(skip_serializing_if = "Option::is_none")]
4721    /// Memory soft limit in bytes.
4722    pub memory_reservation: Option<i64>,
4723    #[serde(rename = "MemorySwap")]
4724    #[serde(skip_serializing_if = "Option::is_none")]
4725    /// Total memory limit (memory + swap). Set as `-1` to enable unlimited
4726    /// swap.
4727    pub memory_swap: Option<i64>,
4728    #[serde(rename = "MemorySwappiness")]
4729    #[serde(skip_serializing_if = "Option::is_none")]
4730    /// Tune a container's memory swappiness behavior. Accepts an integer
4731    /// between 0 and 100.
4732    pub memory_swappiness: Option<i64>,
4733    #[serde(rename = "NanoCpus")]
4734    #[serde(skip_serializing_if = "Option::is_none")]
4735    /// CPU quota in units of 10<sup>-9</sup> CPUs.
4736    pub nano_cpus: Option<i64>,
4737    #[serde(rename = "OomKillDisable")]
4738    #[serde(skip_serializing_if = "Option::is_none")]
4739    /// Disable OOM Killer for the container.
4740    pub oom_kill_disable: Option<bool>,
4741    #[serde(rename = "PidsLimit")]
4742    #[serde(skip_serializing_if = "Option::is_none")]
4743    /// Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null`
4744    /// to not change.
4745    pub pids_limit: Option<i64>,
4746    #[serde(rename = "Ulimits")]
4747    #[serde(skip_serializing_if = "Option::is_none")]
4748    /// A list of resource limits to set in the container. For example:
4749    ///
4750    /// ```
4751    /// {"Name": "nofile", "Soft": 1024, "Hard": 2048}
4752    /// ```
4753    pub ulimits: Option<Vec<ResourcesUlimitsInlineItem>>,
4754}
4755
4756#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4757pub struct ResourcesBlkioWeightDeviceInlineItem {
4758    #[serde(rename = "Path")]
4759    #[serde(skip_serializing_if = "Option::is_none")]
4760    pub path: Option<String>,
4761    #[serde(rename = "Weight")]
4762    #[serde(skip_serializing_if = "Option::is_none")]
4763    pub weight: Option<isize>,
4764}
4765
4766#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4767pub struct ResourcesUlimitsInlineItem {
4768    #[serde(rename = "Hard")]
4769    #[serde(skip_serializing_if = "Option::is_none")]
4770    /// Hard limit
4771    pub hard: Option<isize>,
4772    #[serde(rename = "Name")]
4773    #[serde(skip_serializing_if = "Option::is_none")]
4774    /// Name of ulimit
4775    pub name: Option<String>,
4776    #[serde(rename = "Soft")]
4777    #[serde(skip_serializing_if = "Option::is_none")]
4778    /// Soft limit
4779    pub soft: Option<isize>,
4780}
4781
4782#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4783/// The behavior to apply when the container exits. The default is not to
4784/// restart.
4785///
4786/// An ever increasing delay (double the previous delay, starting at 100ms) is
4787/// added before each restart to prevent flooding the server.
4788pub struct RestartPolicy {
4789    #[serde(rename = "MaximumRetryCount")]
4790    #[serde(skip_serializing_if = "Option::is_none")]
4791    /// If `on-failure` is used, the number of times to retry before giving up.
4792    pub maximum_retry_count: Option<isize>,
4793    #[serde(rename = "Name")]
4794    #[serde(skip_serializing_if = "Option::is_none")]
4795    /// - Empty string means not to restart
4796    /// - `no` Do not automatically restart
4797    /// - `always` Always restart
4798    /// - `unless-stopped` Restart always except when the user has manually stopped the container
4799    /// - `on-failure` Restart only when the container exit code is non-zero
4800    pub name: Option<String>,
4801}
4802
4803#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4804/// - Empty string means not to restart
4805/// - `no` Do not automatically restart
4806/// - `always` Always restart
4807/// - `unless-stopped` Restart always except when the user has manually stopped the container
4808/// - `on-failure` Restart only when the container exit code is non-zero
4809pub enum RestartPolicyNameInlineItem {
4810    #[serde(rename = "")]
4811    Empty,
4812    #[serde(rename = "no")]
4813    No,
4814    #[serde(rename = "always")]
4815    Always,
4816    #[serde(rename = "unless-stopped")]
4817    UnlessStopped,
4818    #[serde(rename = "on-failure")]
4819    OnFailure,
4820}
4821
4822impl AsRef<str> for RestartPolicyNameInlineItem {
4823    fn as_ref(&self) -> &str {
4824        match self {
4825            RestartPolicyNameInlineItem::Empty => "",
4826            RestartPolicyNameInlineItem::No => "no",
4827            RestartPolicyNameInlineItem::Always => "always",
4828            RestartPolicyNameInlineItem::UnlessStopped => "unless-stopped",
4829            RestartPolicyNameInlineItem::OnFailure => "on-failure",
4830        }
4831    }
4832}
4833
4834impl std::fmt::Display for RestartPolicyNameInlineItem {
4835    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4836        write!(f, "{}", self.as_ref())
4837    }
4838}
4839
4840#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4841/// Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec)
4842/// runtime.
4843///
4844/// The runtime is invoked by the daemon via the `containerd` daemon. OCI
4845/// runtimes act as an interface to the Linux kernel namespaces, cgroups,
4846/// and SELinux.
4847pub struct Runtime {
4848    #[serde(skip_serializing_if = "Option::is_none")]
4849    /// Name and, optional, path, of the OCI executable binary.
4850    ///
4851    /// If the path is omitted, the daemon searches the host's `$PATH` for the
4852    /// binary and uses the first result.
4853    pub path: Option<String>,
4854    #[serde(rename = "runtimeArgs")]
4855    #[serde(skip_serializing_if = "Option::is_none")]
4856    /// List of command-line arguments to pass to the runtime when invoked.
4857    pub runtime_args: Option<Vec<String>>,
4858}
4859
4860#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4861pub struct Secret {
4862    #[serde(rename = "CreatedAt")]
4863    #[serde(skip_serializing_if = "Option::is_none")]
4864    pub created_at: Option<DateTime<Utc>>,
4865    #[serde(rename = "ID")]
4866    #[serde(skip_serializing_if = "Option::is_none")]
4867    pub id: Option<String>,
4868    #[serde(rename = "Spec")]
4869    pub spec: Option<SecretSpec>,
4870    #[serde(rename = "UpdatedAt")]
4871    #[serde(skip_serializing_if = "Option::is_none")]
4872    pub updated_at: Option<DateTime<Utc>>,
4873    #[serde(rename = "Version")]
4874    pub version: Option<ObjectVersion>,
4875}
4876
4877#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4878pub struct SecretCreateBodyParam {
4879    #[serde(rename = "Data")]
4880    #[serde(skip_serializing_if = "Option::is_none")]
4881    /// Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5))
4882    /// data to store as secret.
4883    ///
4884    /// This field is only used to _create_ a secret, and is not returned by
4885    /// other endpoints.
4886    pub data: Option<String>,
4887    #[serde(rename = "Driver")]
4888    pub driver: Option<Driver>,
4889    #[serde(rename = "Labels")]
4890    #[serde(skip_serializing_if = "Option::is_none")]
4891    /// User-defined key/value metadata.
4892    pub labels: Option<HashMap<String, String>>,
4893    #[serde(rename = "Name")]
4894    #[serde(skip_serializing_if = "Option::is_none")]
4895    /// User-defined name of the secret.
4896    pub name: Option<String>,
4897    #[serde(rename = "Templating")]
4898    pub templating: Option<Driver>,
4899}
4900
4901/// no error
4902pub type SecretList200Response = Vec<Secret>;
4903
4904#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4905pub struct SecretSpec {
4906    #[serde(rename = "Data")]
4907    #[serde(skip_serializing_if = "Option::is_none")]
4908    /// Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5))
4909    /// data to store as secret.
4910    ///
4911    /// This field is only used to _create_ a secret, and is not returned by
4912    /// other endpoints.
4913    pub data: Option<String>,
4914    #[serde(rename = "Driver")]
4915    pub driver: Option<Driver>,
4916    #[serde(rename = "Labels")]
4917    #[serde(skip_serializing_if = "Option::is_none")]
4918    /// User-defined key/value metadata.
4919    pub labels: Option<HashMap<String, String>>,
4920    #[serde(rename = "Name")]
4921    #[serde(skip_serializing_if = "Option::is_none")]
4922    /// User-defined name of the secret.
4923    pub name: Option<String>,
4924    #[serde(rename = "Templating")]
4925    pub templating: Option<Driver>,
4926}
4927
4928#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4929pub struct Service {
4930    #[serde(rename = "CreatedAt")]
4931    #[serde(skip_serializing_if = "Option::is_none")]
4932    pub created_at: Option<DateTime<Utc>>,
4933    #[serde(rename = "Endpoint")]
4934    #[serde(skip_serializing_if = "Option::is_none")]
4935    pub endpoint: Option<ServiceEndpointInlineItem>,
4936    #[serde(rename = "ID")]
4937    #[serde(skip_serializing_if = "Option::is_none")]
4938    pub id: Option<String>,
4939    #[serde(rename = "JobStatus")]
4940    #[serde(skip_serializing_if = "Option::is_none")]
4941    /// The status of the service when it is in one of ReplicatedJob or
4942    /// GlobalJob modes. Absent on Replicated and Global mode services. The
4943    /// JobIteration is an ObjectVersion, but unlike the Service's version,
4944    /// does not need to be sent with an update request.
4945    pub job_status: Option<ServiceJobStatusInlineItem>,
4946    #[serde(rename = "ServiceStatus")]
4947    #[serde(skip_serializing_if = "Option::is_none")]
4948    /// The status of the service's tasks. Provided only when requested as
4949    /// part of a ServiceList operation.
4950    pub service_status: Option<ServiceServiceStatusInlineItem>,
4951    #[serde(rename = "Spec")]
4952    pub spec: Option<ServiceSpec>,
4953    #[serde(rename = "UpdateStatus")]
4954    #[serde(skip_serializing_if = "Option::is_none")]
4955    /// The status of a service update.
4956    pub update_status: Option<ServiceUpdateStatusInlineItem>,
4957    #[serde(rename = "UpdatedAt")]
4958    #[serde(skip_serializing_if = "Option::is_none")]
4959    pub updated_at: Option<DateTime<Utc>>,
4960    #[serde(rename = "Version")]
4961    pub version: Option<ObjectVersion>,
4962}
4963
4964#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4965/// no error
4966pub struct ServiceCreate201Response {
4967    #[serde(rename = "ID")]
4968    #[serde(skip_serializing_if = "Option::is_none")]
4969    /// The ID of the created service.
4970    pub id: Option<String>,
4971    #[serde(rename = "Warning")]
4972    #[serde(skip_serializing_if = "Option::is_none")]
4973    /// Optional warning message
4974    pub warning: Option<String>,
4975}
4976
4977#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4978/// User modifiable configuration for a service.
4979pub struct ServiceCreateBodyParam {
4980    #[serde(rename = "EndpointSpec")]
4981    pub endpoint_spec: Option<EndpointSpec>,
4982    #[serde(rename = "Labels")]
4983    #[serde(skip_serializing_if = "Option::is_none")]
4984    /// User-defined key/value metadata.
4985    pub labels: Option<HashMap<String, String>>,
4986    #[serde(rename = "Mode")]
4987    #[serde(skip_serializing_if = "Option::is_none")]
4988    /// Scheduling mode for the service.
4989    pub mode: Option<ServiceCreateBodyParamModeInlineItem>,
4990    #[serde(rename = "Name")]
4991    #[serde(skip_serializing_if = "Option::is_none")]
4992    /// Name of the service.
4993    pub name: Option<String>,
4994    #[serde(rename = "Networks")]
4995    #[serde(skip_serializing_if = "Option::is_none")]
4996    /// Specifies which networks the service should attach to.
4997    pub networks: Option<Vec<NetworkAttachmentConfig>>,
4998    #[serde(rename = "RollbackConfig")]
4999    #[serde(skip_serializing_if = "Option::is_none")]
5000    /// Specification for the rollback strategy of the service.
5001    pub rollback_config: Option<ServiceCreateBodyParamRollbackConfigInlineItem>,
5002    #[serde(rename = "TaskTemplate")]
5003    pub task_template: Option<TaskSpec>,
5004    #[serde(rename = "UpdateConfig")]
5005    #[serde(skip_serializing_if = "Option::is_none")]
5006    /// Specification for the update strategy of the service.
5007    pub update_config: Option<ServiceCreateBodyParamUpdateConfigInlineItem>,
5008}
5009
5010#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5011/// Scheduling mode for the service.
5012pub struct ServiceCreateBodyParamModeInlineItem {
5013    #[serde(rename = "Global")]
5014    #[serde(skip_serializing_if = "Option::is_none")]
5015    pub global: Option<Value>,
5016    #[serde(rename = "GlobalJob")]
5017    #[serde(skip_serializing_if = "Option::is_none")]
5018    /// The mode used for services which run a task to the completed state
5019    /// on each valid node.
5020    pub global_job: Option<Value>,
5021    #[serde(rename = "Replicated")]
5022    #[serde(skip_serializing_if = "Option::is_none")]
5023    pub replicated: Option<ServiceCreateBodyParamModeInlineItemReplicatedInlineItem>,
5024    #[serde(rename = "ReplicatedJob")]
5025    #[serde(skip_serializing_if = "Option::is_none")]
5026    /// The mode used for services with a finite number of tasks that run
5027    /// to a completed state.
5028    pub replicated_job: Option<ServiceCreateBodyParamModeInlineItemReplicatedJobInlineItem>,
5029}
5030
5031#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5032pub struct ServiceCreateBodyParamModeInlineItemReplicatedInlineItem {
5033    #[serde(rename = "Replicas")]
5034    #[serde(skip_serializing_if = "Option::is_none")]
5035    pub replicas: Option<i64>,
5036}
5037
5038#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5039/// The mode used for services with a finite number of tasks that run
5040/// to a completed state.
5041pub struct ServiceCreateBodyParamModeInlineItemReplicatedJobInlineItem {
5042    #[serde(rename = "MaxConcurrent")]
5043    #[serde(skip_serializing_if = "Option::is_none")]
5044    /// The maximum number of replicas to run simultaneously.
5045    pub max_concurrent: Option<i64>,
5046    #[serde(rename = "TotalCompletions")]
5047    #[serde(skip_serializing_if = "Option::is_none")]
5048    /// The total number of replicas desired to reach the Completed
5049    /// state. If unset, will default to the value of `MaxConcurrent`
5050    pub total_completions: Option<i64>,
5051}
5052
5053#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5054/// Specification for the rollback strategy of the service.
5055pub struct ServiceCreateBodyParamRollbackConfigInlineItem {
5056    #[serde(rename = "Delay")]
5057    #[serde(skip_serializing_if = "Option::is_none")]
5058    /// Amount of time between rollback iterations, in nanoseconds.
5059    pub delay: Option<i64>,
5060    #[serde(rename = "FailureAction")]
5061    #[serde(skip_serializing_if = "Option::is_none")]
5062    /// Action to take if an rolled back task fails to run, or stops
5063    /// running during the rollback.
5064    pub failure_action: Option<String>,
5065    #[serde(rename = "MaxFailureRatio")]
5066    #[serde(skip_serializing_if = "Option::is_none")]
5067    /// The fraction of tasks that may fail during a rollback before the
5068    /// failure action is invoked, specified as a floating point number
5069    /// between 0 and 1.
5070    pub max_failure_ratio: Option<Value>,
5071    #[serde(rename = "Monitor")]
5072    #[serde(skip_serializing_if = "Option::is_none")]
5073    /// Amount of time to monitor each rolled back task for failures, in
5074    /// nanoseconds.
5075    pub monitor: Option<i64>,
5076    #[serde(rename = "Order")]
5077    #[serde(skip_serializing_if = "Option::is_none")]
5078    /// The order of operations when rolling back a task. Either the old
5079    /// task is shut down before the new task is started, or the new task
5080    /// is started before the old task is shut down.
5081    pub order: Option<String>,
5082    #[serde(rename = "Parallelism")]
5083    #[serde(skip_serializing_if = "Option::is_none")]
5084    /// Maximum number of tasks to be rolled back in one iteration (0 means
5085    /// unlimited parallelism).
5086    pub parallelism: Option<i64>,
5087}
5088
5089#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5090/// Action to take if an rolled back task fails to run, or stops
5091/// running during the rollback.
5092pub enum ServiceCreateBodyParamRollbackConfigInlineItemFailureActionInlineItem {
5093    #[serde(rename = "continue")]
5094    Continue,
5095    #[serde(rename = "pause")]
5096    Pause,
5097}
5098
5099impl AsRef<str> for ServiceCreateBodyParamRollbackConfigInlineItemFailureActionInlineItem {
5100    fn as_ref(&self) -> &str {
5101        match self {
5102            ServiceCreateBodyParamRollbackConfigInlineItemFailureActionInlineItem::Continue => {
5103                "continue"
5104            }
5105            ServiceCreateBodyParamRollbackConfigInlineItemFailureActionInlineItem::Pause => "pause",
5106        }
5107    }
5108}
5109
5110impl std::fmt::Display for ServiceCreateBodyParamRollbackConfigInlineItemFailureActionInlineItem {
5111    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5112        write!(f, "{}", self.as_ref())
5113    }
5114}
5115
5116#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5117/// The order of operations when rolling back a task. Either the old
5118/// task is shut down before the new task is started, or the new task
5119/// is started before the old task is shut down.
5120pub enum ServiceCreateBodyParamRollbackConfigInlineItemOrderInlineItem {
5121    #[serde(rename = "stop-first")]
5122    StopFirst,
5123    #[serde(rename = "start-first")]
5124    StartFirst,
5125}
5126
5127impl AsRef<str> for ServiceCreateBodyParamRollbackConfigInlineItemOrderInlineItem {
5128    fn as_ref(&self) -> &str {
5129        match self {
5130            ServiceCreateBodyParamRollbackConfigInlineItemOrderInlineItem::StopFirst => {
5131                "stop-first"
5132            }
5133            ServiceCreateBodyParamRollbackConfigInlineItemOrderInlineItem::StartFirst => {
5134                "start-first"
5135            }
5136        }
5137    }
5138}
5139
5140impl std::fmt::Display for ServiceCreateBodyParamRollbackConfigInlineItemOrderInlineItem {
5141    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5142        write!(f, "{}", self.as_ref())
5143    }
5144}
5145
5146#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5147/// Specification for the update strategy of the service.
5148pub struct ServiceCreateBodyParamUpdateConfigInlineItem {
5149    #[serde(rename = "Delay")]
5150    #[serde(skip_serializing_if = "Option::is_none")]
5151    /// Amount of time between updates, in nanoseconds.
5152    pub delay: Option<i64>,
5153    #[serde(rename = "FailureAction")]
5154    #[serde(skip_serializing_if = "Option::is_none")]
5155    /// Action to take if an updated task fails to run, or stops running
5156    /// during the update.
5157    pub failure_action: Option<String>,
5158    #[serde(rename = "MaxFailureRatio")]
5159    #[serde(skip_serializing_if = "Option::is_none")]
5160    /// The fraction of tasks that may fail during an update before the
5161    /// failure action is invoked, specified as a floating point number
5162    /// between 0 and 1.
5163    pub max_failure_ratio: Option<Value>,
5164    #[serde(rename = "Monitor")]
5165    #[serde(skip_serializing_if = "Option::is_none")]
5166    /// Amount of time to monitor each updated task for failures, in
5167    /// nanoseconds.
5168    pub monitor: Option<i64>,
5169    #[serde(rename = "Order")]
5170    #[serde(skip_serializing_if = "Option::is_none")]
5171    /// The order of operations when rolling out an updated task. Either
5172    /// the old task is shut down before the new task is started, or the
5173    /// new task is started before the old task is shut down.
5174    pub order: Option<String>,
5175    #[serde(rename = "Parallelism")]
5176    #[serde(skip_serializing_if = "Option::is_none")]
5177    /// Maximum number of tasks to be updated in one iteration (0 means
5178    /// unlimited parallelism).
5179    pub parallelism: Option<i64>,
5180}
5181
5182#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5183/// Action to take if an updated task fails to run, or stops running
5184/// during the update.
5185pub enum ServiceCreateBodyParamUpdateConfigInlineItemFailureActionInlineItem {
5186    #[serde(rename = "continue")]
5187    Continue,
5188    #[serde(rename = "pause")]
5189    Pause,
5190    #[serde(rename = "rollback")]
5191    Rollback,
5192}
5193
5194impl AsRef<str> for ServiceCreateBodyParamUpdateConfigInlineItemFailureActionInlineItem {
5195    fn as_ref(&self) -> &str {
5196        match self {
5197            ServiceCreateBodyParamUpdateConfigInlineItemFailureActionInlineItem::Continue => {
5198                "continue"
5199            }
5200            ServiceCreateBodyParamUpdateConfigInlineItemFailureActionInlineItem::Pause => "pause",
5201            ServiceCreateBodyParamUpdateConfigInlineItemFailureActionInlineItem::Rollback => {
5202                "rollback"
5203            }
5204        }
5205    }
5206}
5207
5208impl std::fmt::Display for ServiceCreateBodyParamUpdateConfigInlineItemFailureActionInlineItem {
5209    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5210        write!(f, "{}", self.as_ref())
5211    }
5212}
5213
5214#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5215/// The order of operations when rolling out an updated task. Either
5216/// the old task is shut down before the new task is started, or the
5217/// new task is started before the old task is shut down.
5218pub enum ServiceCreateBodyParamUpdateConfigInlineItemOrderInlineItem {
5219    #[serde(rename = "stop-first")]
5220    StopFirst,
5221    #[serde(rename = "start-first")]
5222    StartFirst,
5223}
5224
5225impl AsRef<str> for ServiceCreateBodyParamUpdateConfigInlineItemOrderInlineItem {
5226    fn as_ref(&self) -> &str {
5227        match self {
5228            ServiceCreateBodyParamUpdateConfigInlineItemOrderInlineItem::StopFirst => "stop-first",
5229            ServiceCreateBodyParamUpdateConfigInlineItemOrderInlineItem::StartFirst => {
5230                "start-first"
5231            }
5232        }
5233    }
5234}
5235
5236impl std::fmt::Display for ServiceCreateBodyParamUpdateConfigInlineItemOrderInlineItem {
5237    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5238        write!(f, "{}", self.as_ref())
5239    }
5240}
5241
5242#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5243pub struct ServiceEndpointInlineItem {
5244    #[serde(rename = "Ports")]
5245    #[serde(skip_serializing_if = "Option::is_none")]
5246    pub ports: Option<Vec<EndpointPortConfig>>,
5247    #[serde(rename = "Spec")]
5248    pub spec: Option<EndpointSpec>,
5249    #[serde(rename = "VirtualIPs")]
5250    #[serde(skip_serializing_if = "Option::is_none")]
5251    pub virtual_i_ps: Option<Vec<ServiceEndpointInlineItemVirtualIPsInlineItem>>,
5252}
5253
5254#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5255pub struct ServiceEndpointInlineItemVirtualIPsInlineItem {
5256    #[serde(rename = "Addr")]
5257    #[serde(skip_serializing_if = "Option::is_none")]
5258    pub addr: Option<String>,
5259    #[serde(rename = "NetworkID")]
5260    #[serde(skip_serializing_if = "Option::is_none")]
5261    pub network_id: Option<String>,
5262}
5263
5264#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5265/// The status of the service when it is in one of ReplicatedJob or
5266/// GlobalJob modes. Absent on Replicated and Global mode services. The
5267/// JobIteration is an ObjectVersion, but unlike the Service's version,
5268/// does not need to be sent with an update request.
5269pub struct ServiceJobStatusInlineItem {
5270    #[serde(rename = "JobIteration")]
5271    pub job_iteration: Option<ObjectVersion>,
5272    #[serde(rename = "LastExecution")]
5273    #[serde(skip_serializing_if = "Option::is_none")]
5274    /// The last time, as observed by the server, that this job was
5275    /// started.
5276    pub last_execution: Option<DateTime<Utc>>,
5277}
5278
5279/// no error
5280pub type ServiceList200Response = Vec<Service>;
5281
5282/// logs returned as a stream in response body
5283pub type ServiceLogs200Response = Vec<u8>;
5284
5285#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5286/// The status of the service's tasks. Provided only when requested as
5287/// part of a ServiceList operation.
5288pub struct ServiceServiceStatusInlineItem {
5289    #[serde(rename = "CompletedTasks")]
5290    #[serde(skip_serializing_if = "Option::is_none")]
5291    /// The number of tasks for a job that are in the Completed state.
5292    /// This field must be cross-referenced with the service type, as the
5293    /// value of 0 may mean the service is not in a job mode, or it may
5294    /// mean the job-mode service has no tasks yet Completed.
5295    pub completed_tasks: Option<u64>,
5296    #[serde(rename = "DesiredTasks")]
5297    #[serde(skip_serializing_if = "Option::is_none")]
5298    /// The number of tasks for the service desired to be running.
5299    /// For replicated services, this is the replica count from the
5300    /// service spec. For global services, this is computed by taking
5301    /// count of all tasks for the service with a Desired State other
5302    /// than Shutdown.
5303    pub desired_tasks: Option<u64>,
5304    #[serde(rename = "RunningTasks")]
5305    #[serde(skip_serializing_if = "Option::is_none")]
5306    /// The number of tasks for the service currently in the Running state.
5307    pub running_tasks: Option<u64>,
5308}
5309
5310#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5311/// User modifiable configuration for a service.
5312pub struct ServiceSpec {
5313    #[serde(rename = "EndpointSpec")]
5314    pub endpoint_spec: Option<EndpointSpec>,
5315    #[serde(rename = "Labels")]
5316    #[serde(skip_serializing_if = "Option::is_none")]
5317    /// User-defined key/value metadata.
5318    pub labels: Option<HashMap<String, String>>,
5319    #[serde(rename = "Mode")]
5320    #[serde(skip_serializing_if = "Option::is_none")]
5321    /// Scheduling mode for the service.
5322    pub mode: Option<ServiceSpecModeInlineItem>,
5323    #[serde(rename = "Name")]
5324    #[serde(skip_serializing_if = "Option::is_none")]
5325    /// Name of the service.
5326    pub name: Option<String>,
5327    #[serde(rename = "Networks")]
5328    #[serde(skip_serializing_if = "Option::is_none")]
5329    /// Specifies which networks the service should attach to.
5330    pub networks: Option<Vec<NetworkAttachmentConfig>>,
5331    #[serde(rename = "RollbackConfig")]
5332    #[serde(skip_serializing_if = "Option::is_none")]
5333    /// Specification for the rollback strategy of the service.
5334    pub rollback_config: Option<ServiceSpecRollbackConfigInlineItem>,
5335    #[serde(rename = "TaskTemplate")]
5336    pub task_template: Option<TaskSpec>,
5337    #[serde(rename = "UpdateConfig")]
5338    #[serde(skip_serializing_if = "Option::is_none")]
5339    /// Specification for the update strategy of the service.
5340    pub update_config: Option<ServiceSpecUpdateConfigInlineItem>,
5341}
5342
5343#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5344/// Scheduling mode for the service.
5345pub struct ServiceSpecModeInlineItem {
5346    #[serde(rename = "Global")]
5347    #[serde(skip_serializing_if = "Option::is_none")]
5348    pub global: Option<Value>,
5349    #[serde(rename = "GlobalJob")]
5350    #[serde(skip_serializing_if = "Option::is_none")]
5351    /// The mode used for services which run a task to the completed state
5352    /// on each valid node.
5353    pub global_job: Option<Value>,
5354    #[serde(rename = "Replicated")]
5355    #[serde(skip_serializing_if = "Option::is_none")]
5356    pub replicated: Option<ServiceSpecModeInlineItemReplicatedInlineItem>,
5357    #[serde(rename = "ReplicatedJob")]
5358    #[serde(skip_serializing_if = "Option::is_none")]
5359    /// The mode used for services with a finite number of tasks that run
5360    /// to a completed state.
5361    pub replicated_job: Option<ServiceSpecModeInlineItemReplicatedJobInlineItem>,
5362}
5363
5364#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5365pub struct ServiceSpecModeInlineItemReplicatedInlineItem {
5366    #[serde(rename = "Replicas")]
5367    #[serde(skip_serializing_if = "Option::is_none")]
5368    pub replicas: Option<i64>,
5369}
5370
5371#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5372/// The mode used for services with a finite number of tasks that run
5373/// to a completed state.
5374pub struct ServiceSpecModeInlineItemReplicatedJobInlineItem {
5375    #[serde(rename = "MaxConcurrent")]
5376    #[serde(skip_serializing_if = "Option::is_none")]
5377    /// The maximum number of replicas to run simultaneously.
5378    pub max_concurrent: Option<i64>,
5379    #[serde(rename = "TotalCompletions")]
5380    #[serde(skip_serializing_if = "Option::is_none")]
5381    /// The total number of replicas desired to reach the Completed
5382    /// state. If unset, will default to the value of `MaxConcurrent`
5383    pub total_completions: Option<i64>,
5384}
5385
5386#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5387/// Specification for the rollback strategy of the service.
5388pub struct ServiceSpecRollbackConfigInlineItem {
5389    #[serde(rename = "Delay")]
5390    #[serde(skip_serializing_if = "Option::is_none")]
5391    /// Amount of time between rollback iterations, in nanoseconds.
5392    pub delay: Option<i64>,
5393    #[serde(rename = "FailureAction")]
5394    #[serde(skip_serializing_if = "Option::is_none")]
5395    /// Action to take if an rolled back task fails to run, or stops
5396    /// running during the rollback.
5397    pub failure_action: Option<String>,
5398    #[serde(rename = "MaxFailureRatio")]
5399    #[serde(skip_serializing_if = "Option::is_none")]
5400    /// The fraction of tasks that may fail during a rollback before the
5401    /// failure action is invoked, specified as a floating point number
5402    /// between 0 and 1.
5403    pub max_failure_ratio: Option<Value>,
5404    #[serde(rename = "Monitor")]
5405    #[serde(skip_serializing_if = "Option::is_none")]
5406    /// Amount of time to monitor each rolled back task for failures, in
5407    /// nanoseconds.
5408    pub monitor: Option<i64>,
5409    #[serde(rename = "Order")]
5410    #[serde(skip_serializing_if = "Option::is_none")]
5411    /// The order of operations when rolling back a task. Either the old
5412    /// task is shut down before the new task is started, or the new task
5413    /// is started before the old task is shut down.
5414    pub order: Option<String>,
5415    #[serde(rename = "Parallelism")]
5416    #[serde(skip_serializing_if = "Option::is_none")]
5417    /// Maximum number of tasks to be rolled back in one iteration (0 means
5418    /// unlimited parallelism).
5419    pub parallelism: Option<i64>,
5420}
5421
5422#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5423/// Action to take if an rolled back task fails to run, or stops
5424/// running during the rollback.
5425pub enum ServiceSpecRollbackConfigInlineItemFailureActionInlineItem {
5426    #[serde(rename = "continue")]
5427    Continue,
5428    #[serde(rename = "pause")]
5429    Pause,
5430}
5431
5432impl AsRef<str> for ServiceSpecRollbackConfigInlineItemFailureActionInlineItem {
5433    fn as_ref(&self) -> &str {
5434        match self {
5435            ServiceSpecRollbackConfigInlineItemFailureActionInlineItem::Continue => "continue",
5436            ServiceSpecRollbackConfigInlineItemFailureActionInlineItem::Pause => "pause",
5437        }
5438    }
5439}
5440
5441impl std::fmt::Display for ServiceSpecRollbackConfigInlineItemFailureActionInlineItem {
5442    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5443        write!(f, "{}", self.as_ref())
5444    }
5445}
5446
5447#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5448/// The order of operations when rolling back a task. Either the old
5449/// task is shut down before the new task is started, or the new task
5450/// is started before the old task is shut down.
5451pub enum ServiceSpecRollbackConfigInlineItemOrderInlineItem {
5452    #[serde(rename = "stop-first")]
5453    StopFirst,
5454    #[serde(rename = "start-first")]
5455    StartFirst,
5456}
5457
5458impl AsRef<str> for ServiceSpecRollbackConfigInlineItemOrderInlineItem {
5459    fn as_ref(&self) -> &str {
5460        match self {
5461            ServiceSpecRollbackConfigInlineItemOrderInlineItem::StopFirst => "stop-first",
5462            ServiceSpecRollbackConfigInlineItemOrderInlineItem::StartFirst => "start-first",
5463        }
5464    }
5465}
5466
5467impl std::fmt::Display for ServiceSpecRollbackConfigInlineItemOrderInlineItem {
5468    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5469        write!(f, "{}", self.as_ref())
5470    }
5471}
5472
5473#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5474/// Specification for the update strategy of the service.
5475pub struct ServiceSpecUpdateConfigInlineItem {
5476    #[serde(rename = "Delay")]
5477    #[serde(skip_serializing_if = "Option::is_none")]
5478    /// Amount of time between updates, in nanoseconds.
5479    pub delay: Option<i64>,
5480    #[serde(rename = "FailureAction")]
5481    #[serde(skip_serializing_if = "Option::is_none")]
5482    /// Action to take if an updated task fails to run, or stops running
5483    /// during the update.
5484    pub failure_action: Option<String>,
5485    #[serde(rename = "MaxFailureRatio")]
5486    #[serde(skip_serializing_if = "Option::is_none")]
5487    /// The fraction of tasks that may fail during an update before the
5488    /// failure action is invoked, specified as a floating point number
5489    /// between 0 and 1.
5490    pub max_failure_ratio: Option<Value>,
5491    #[serde(rename = "Monitor")]
5492    #[serde(skip_serializing_if = "Option::is_none")]
5493    /// Amount of time to monitor each updated task for failures, in
5494    /// nanoseconds.
5495    pub monitor: Option<i64>,
5496    #[serde(rename = "Order")]
5497    #[serde(skip_serializing_if = "Option::is_none")]
5498    /// The order of operations when rolling out an updated task. Either
5499    /// the old task is shut down before the new task is started, or the
5500    /// new task is started before the old task is shut down.
5501    pub order: Option<String>,
5502    #[serde(rename = "Parallelism")]
5503    #[serde(skip_serializing_if = "Option::is_none")]
5504    /// Maximum number of tasks to be updated in one iteration (0 means
5505    /// unlimited parallelism).
5506    pub parallelism: Option<i64>,
5507}
5508
5509#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5510/// Action to take if an updated task fails to run, or stops running
5511/// during the update.
5512pub enum ServiceSpecUpdateConfigInlineItemFailureActionInlineItem {
5513    #[serde(rename = "continue")]
5514    Continue,
5515    #[serde(rename = "pause")]
5516    Pause,
5517    #[serde(rename = "rollback")]
5518    Rollback,
5519}
5520
5521impl AsRef<str> for ServiceSpecUpdateConfigInlineItemFailureActionInlineItem {
5522    fn as_ref(&self) -> &str {
5523        match self {
5524            ServiceSpecUpdateConfigInlineItemFailureActionInlineItem::Continue => "continue",
5525            ServiceSpecUpdateConfigInlineItemFailureActionInlineItem::Pause => "pause",
5526            ServiceSpecUpdateConfigInlineItemFailureActionInlineItem::Rollback => "rollback",
5527        }
5528    }
5529}
5530
5531impl std::fmt::Display for ServiceSpecUpdateConfigInlineItemFailureActionInlineItem {
5532    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5533        write!(f, "{}", self.as_ref())
5534    }
5535}
5536
5537#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5538/// The order of operations when rolling out an updated task. Either
5539/// the old task is shut down before the new task is started, or the
5540/// new task is started before the old task is shut down.
5541pub enum ServiceSpecUpdateConfigInlineItemOrderInlineItem {
5542    #[serde(rename = "stop-first")]
5543    StopFirst,
5544    #[serde(rename = "start-first")]
5545    StartFirst,
5546}
5547
5548impl AsRef<str> for ServiceSpecUpdateConfigInlineItemOrderInlineItem {
5549    fn as_ref(&self) -> &str {
5550        match self {
5551            ServiceSpecUpdateConfigInlineItemOrderInlineItem::StopFirst => "stop-first",
5552            ServiceSpecUpdateConfigInlineItemOrderInlineItem::StartFirst => "start-first",
5553        }
5554    }
5555}
5556
5557impl std::fmt::Display for ServiceSpecUpdateConfigInlineItemOrderInlineItem {
5558    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5559        write!(f, "{}", self.as_ref())
5560    }
5561}
5562
5563#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5564/// User modifiable configuration for a service.
5565pub struct ServiceUpdateBodyParam {
5566    #[serde(rename = "EndpointSpec")]
5567    pub endpoint_spec: Option<EndpointSpec>,
5568    #[serde(rename = "Labels")]
5569    #[serde(skip_serializing_if = "Option::is_none")]
5570    /// User-defined key/value metadata.
5571    pub labels: Option<HashMap<String, String>>,
5572    #[serde(rename = "Mode")]
5573    #[serde(skip_serializing_if = "Option::is_none")]
5574    /// Scheduling mode for the service.
5575    pub mode: Option<ServiceUpdateBodyParamModeInlineItem>,
5576    #[serde(rename = "Name")]
5577    #[serde(skip_serializing_if = "Option::is_none")]
5578    /// Name of the service.
5579    pub name: Option<String>,
5580    #[serde(rename = "Networks")]
5581    #[serde(skip_serializing_if = "Option::is_none")]
5582    /// Specifies which networks the service should attach to.
5583    pub networks: Option<Vec<NetworkAttachmentConfig>>,
5584    #[serde(rename = "RollbackConfig")]
5585    #[serde(skip_serializing_if = "Option::is_none")]
5586    /// Specification for the rollback strategy of the service.
5587    pub rollback_config: Option<ServiceUpdateBodyParamRollbackConfigInlineItem>,
5588    #[serde(rename = "TaskTemplate")]
5589    pub task_template: Option<TaskSpec>,
5590    #[serde(rename = "UpdateConfig")]
5591    #[serde(skip_serializing_if = "Option::is_none")]
5592    /// Specification for the update strategy of the service.
5593    pub update_config: Option<ServiceUpdateBodyParamUpdateConfigInlineItem>,
5594}
5595
5596#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5597/// Scheduling mode for the service.
5598pub struct ServiceUpdateBodyParamModeInlineItem {
5599    #[serde(rename = "Global")]
5600    #[serde(skip_serializing_if = "Option::is_none")]
5601    pub global: Option<Value>,
5602    #[serde(rename = "GlobalJob")]
5603    #[serde(skip_serializing_if = "Option::is_none")]
5604    /// The mode used for services which run a task to the completed state
5605    /// on each valid node.
5606    pub global_job: Option<Value>,
5607    #[serde(rename = "Replicated")]
5608    #[serde(skip_serializing_if = "Option::is_none")]
5609    pub replicated: Option<ServiceUpdateBodyParamModeInlineItemReplicatedInlineItem>,
5610    #[serde(rename = "ReplicatedJob")]
5611    #[serde(skip_serializing_if = "Option::is_none")]
5612    /// The mode used for services with a finite number of tasks that run
5613    /// to a completed state.
5614    pub replicated_job: Option<ServiceUpdateBodyParamModeInlineItemReplicatedJobInlineItem>,
5615}
5616
5617#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5618pub struct ServiceUpdateBodyParamModeInlineItemReplicatedInlineItem {
5619    #[serde(rename = "Replicas")]
5620    #[serde(skip_serializing_if = "Option::is_none")]
5621    pub replicas: Option<i64>,
5622}
5623
5624#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5625/// The mode used for services with a finite number of tasks that run
5626/// to a completed state.
5627pub struct ServiceUpdateBodyParamModeInlineItemReplicatedJobInlineItem {
5628    #[serde(rename = "MaxConcurrent")]
5629    #[serde(skip_serializing_if = "Option::is_none")]
5630    /// The maximum number of replicas to run simultaneously.
5631    pub max_concurrent: Option<i64>,
5632    #[serde(rename = "TotalCompletions")]
5633    #[serde(skip_serializing_if = "Option::is_none")]
5634    /// The total number of replicas desired to reach the Completed
5635    /// state. If unset, will default to the value of `MaxConcurrent`
5636    pub total_completions: Option<i64>,
5637}
5638
5639#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5640/// Specification for the rollback strategy of the service.
5641pub struct ServiceUpdateBodyParamRollbackConfigInlineItem {
5642    #[serde(rename = "Delay")]
5643    #[serde(skip_serializing_if = "Option::is_none")]
5644    /// Amount of time between rollback iterations, in nanoseconds.
5645    pub delay: Option<i64>,
5646    #[serde(rename = "FailureAction")]
5647    #[serde(skip_serializing_if = "Option::is_none")]
5648    /// Action to take if an rolled back task fails to run, or stops
5649    /// running during the rollback.
5650    pub failure_action: Option<String>,
5651    #[serde(rename = "MaxFailureRatio")]
5652    #[serde(skip_serializing_if = "Option::is_none")]
5653    /// The fraction of tasks that may fail during a rollback before the
5654    /// failure action is invoked, specified as a floating point number
5655    /// between 0 and 1.
5656    pub max_failure_ratio: Option<Value>,
5657    #[serde(rename = "Monitor")]
5658    #[serde(skip_serializing_if = "Option::is_none")]
5659    /// Amount of time to monitor each rolled back task for failures, in
5660    /// nanoseconds.
5661    pub monitor: Option<i64>,
5662    #[serde(rename = "Order")]
5663    #[serde(skip_serializing_if = "Option::is_none")]
5664    /// The order of operations when rolling back a task. Either the old
5665    /// task is shut down before the new task is started, or the new task
5666    /// is started before the old task is shut down.
5667    pub order: Option<String>,
5668    #[serde(rename = "Parallelism")]
5669    #[serde(skip_serializing_if = "Option::is_none")]
5670    /// Maximum number of tasks to be rolled back in one iteration (0 means
5671    /// unlimited parallelism).
5672    pub parallelism: Option<i64>,
5673}
5674
5675#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5676/// Action to take if an rolled back task fails to run, or stops
5677/// running during the rollback.
5678pub enum ServiceUpdateBodyParamRollbackConfigInlineItemFailureActionInlineItem {
5679    #[serde(rename = "continue")]
5680    Continue,
5681    #[serde(rename = "pause")]
5682    Pause,
5683}
5684
5685impl AsRef<str> for ServiceUpdateBodyParamRollbackConfigInlineItemFailureActionInlineItem {
5686    fn as_ref(&self) -> &str {
5687        match self {
5688            ServiceUpdateBodyParamRollbackConfigInlineItemFailureActionInlineItem::Continue => {
5689                "continue"
5690            }
5691            ServiceUpdateBodyParamRollbackConfigInlineItemFailureActionInlineItem::Pause => "pause",
5692        }
5693    }
5694}
5695
5696impl std::fmt::Display for ServiceUpdateBodyParamRollbackConfigInlineItemFailureActionInlineItem {
5697    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5698        write!(f, "{}", self.as_ref())
5699    }
5700}
5701
5702#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5703/// The order of operations when rolling back a task. Either the old
5704/// task is shut down before the new task is started, or the new task
5705/// is started before the old task is shut down.
5706pub enum ServiceUpdateBodyParamRollbackConfigInlineItemOrderInlineItem {
5707    #[serde(rename = "stop-first")]
5708    StopFirst,
5709    #[serde(rename = "start-first")]
5710    StartFirst,
5711}
5712
5713impl AsRef<str> for ServiceUpdateBodyParamRollbackConfigInlineItemOrderInlineItem {
5714    fn as_ref(&self) -> &str {
5715        match self {
5716            ServiceUpdateBodyParamRollbackConfigInlineItemOrderInlineItem::StopFirst => {
5717                "stop-first"
5718            }
5719            ServiceUpdateBodyParamRollbackConfigInlineItemOrderInlineItem::StartFirst => {
5720                "start-first"
5721            }
5722        }
5723    }
5724}
5725
5726impl std::fmt::Display for ServiceUpdateBodyParamRollbackConfigInlineItemOrderInlineItem {
5727    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5728        write!(f, "{}", self.as_ref())
5729    }
5730}
5731
5732#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5733/// Specification for the update strategy of the service.
5734pub struct ServiceUpdateBodyParamUpdateConfigInlineItem {
5735    #[serde(rename = "Delay")]
5736    #[serde(skip_serializing_if = "Option::is_none")]
5737    /// Amount of time between updates, in nanoseconds.
5738    pub delay: Option<i64>,
5739    #[serde(rename = "FailureAction")]
5740    #[serde(skip_serializing_if = "Option::is_none")]
5741    /// Action to take if an updated task fails to run, or stops running
5742    /// during the update.
5743    pub failure_action: Option<String>,
5744    #[serde(rename = "MaxFailureRatio")]
5745    #[serde(skip_serializing_if = "Option::is_none")]
5746    /// The fraction of tasks that may fail during an update before the
5747    /// failure action is invoked, specified as a floating point number
5748    /// between 0 and 1.
5749    pub max_failure_ratio: Option<Value>,
5750    #[serde(rename = "Monitor")]
5751    #[serde(skip_serializing_if = "Option::is_none")]
5752    /// Amount of time to monitor each updated task for failures, in
5753    /// nanoseconds.
5754    pub monitor: Option<i64>,
5755    #[serde(rename = "Order")]
5756    #[serde(skip_serializing_if = "Option::is_none")]
5757    /// The order of operations when rolling out an updated task. Either
5758    /// the old task is shut down before the new task is started, or the
5759    /// new task is started before the old task is shut down.
5760    pub order: Option<String>,
5761    #[serde(rename = "Parallelism")]
5762    #[serde(skip_serializing_if = "Option::is_none")]
5763    /// Maximum number of tasks to be updated in one iteration (0 means
5764    /// unlimited parallelism).
5765    pub parallelism: Option<i64>,
5766}
5767
5768#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5769/// Action to take if an updated task fails to run, or stops running
5770/// during the update.
5771pub enum ServiceUpdateBodyParamUpdateConfigInlineItemFailureActionInlineItem {
5772    #[serde(rename = "continue")]
5773    Continue,
5774    #[serde(rename = "pause")]
5775    Pause,
5776    #[serde(rename = "rollback")]
5777    Rollback,
5778}
5779
5780impl AsRef<str> for ServiceUpdateBodyParamUpdateConfigInlineItemFailureActionInlineItem {
5781    fn as_ref(&self) -> &str {
5782        match self {
5783            ServiceUpdateBodyParamUpdateConfigInlineItemFailureActionInlineItem::Continue => {
5784                "continue"
5785            }
5786            ServiceUpdateBodyParamUpdateConfigInlineItemFailureActionInlineItem::Pause => "pause",
5787            ServiceUpdateBodyParamUpdateConfigInlineItemFailureActionInlineItem::Rollback => {
5788                "rollback"
5789            }
5790        }
5791    }
5792}
5793
5794impl std::fmt::Display for ServiceUpdateBodyParamUpdateConfigInlineItemFailureActionInlineItem {
5795    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5796        write!(f, "{}", self.as_ref())
5797    }
5798}
5799
5800#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5801/// The order of operations when rolling out an updated task. Either
5802/// the old task is shut down before the new task is started, or the
5803/// new task is started before the old task is shut down.
5804pub enum ServiceUpdateBodyParamUpdateConfigInlineItemOrderInlineItem {
5805    #[serde(rename = "stop-first")]
5806    StopFirst,
5807    #[serde(rename = "start-first")]
5808    StartFirst,
5809}
5810
5811impl AsRef<str> for ServiceUpdateBodyParamUpdateConfigInlineItemOrderInlineItem {
5812    fn as_ref(&self) -> &str {
5813        match self {
5814            ServiceUpdateBodyParamUpdateConfigInlineItemOrderInlineItem::StopFirst => "stop-first",
5815            ServiceUpdateBodyParamUpdateConfigInlineItemOrderInlineItem::StartFirst => {
5816                "start-first"
5817            }
5818        }
5819    }
5820}
5821
5822impl std::fmt::Display for ServiceUpdateBodyParamUpdateConfigInlineItemOrderInlineItem {
5823    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5824        write!(f, "{}", self.as_ref())
5825    }
5826}
5827
5828#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5829pub struct ServiceUpdateResponse {
5830    #[serde(rename = "Warnings")]
5831    #[serde(skip_serializing_if = "Option::is_none")]
5832    /// Optional warning messages
5833    pub warnings: Option<Vec<String>>,
5834}
5835
5836#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5837/// The status of a service update.
5838pub struct ServiceUpdateStatusInlineItem {
5839    #[serde(rename = "CompletedAt")]
5840    #[serde(skip_serializing_if = "Option::is_none")]
5841    pub completed_at: Option<DateTime<Utc>>,
5842    #[serde(rename = "Message")]
5843    #[serde(skip_serializing_if = "Option::is_none")]
5844    pub message: Option<String>,
5845    #[serde(rename = "StartedAt")]
5846    #[serde(skip_serializing_if = "Option::is_none")]
5847    pub started_at: Option<DateTime<Utc>>,
5848    #[serde(rename = "State")]
5849    #[serde(skip_serializing_if = "Option::is_none")]
5850    pub state: Option<String>,
5851}
5852
5853#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5854pub enum ServiceUpdateStatusInlineItemStateInlineItem {
5855    #[serde(rename = "updating")]
5856    Updating,
5857    #[serde(rename = "paused")]
5858    Paused,
5859    #[serde(rename = "completed")]
5860    Completed,
5861}
5862
5863impl AsRef<str> for ServiceUpdateStatusInlineItemStateInlineItem {
5864    fn as_ref(&self) -> &str {
5865        match self {
5866            ServiceUpdateStatusInlineItemStateInlineItem::Updating => "updating",
5867            ServiceUpdateStatusInlineItemStateInlineItem::Paused => "paused",
5868            ServiceUpdateStatusInlineItemStateInlineItem::Completed => "completed",
5869        }
5870    }
5871}
5872
5873impl std::fmt::Display for ServiceUpdateStatusInlineItemStateInlineItem {
5874    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5875        write!(f, "{}", self.as_ref())
5876    }
5877}
5878
5879#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5880/// ClusterInfo represents information about the swarm as is returned by the
5881/// "/info" endpoint. Join-tokens are not included.
5882pub struct Swarm {
5883    #[serde(rename = "CreatedAt")]
5884    #[serde(skip_serializing_if = "Option::is_none")]
5885    /// Date and time at which the swarm was initialised in
5886    /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
5887    pub created_at: Option<DateTime<Utc>>,
5888    #[serde(rename = "DataPathPort")]
5889    #[serde(skip_serializing_if = "Option::is_none")]
5890    /// DataPathPort specifies the data path port number for data traffic.
5891    /// Acceptable port range is 1024 to 49151.
5892    /// If no port is set or is set to 0, the default port (4789) is used.
5893    pub data_path_port: Option<u32>,
5894    #[serde(rename = "DefaultAddrPool")]
5895    #[serde(skip_serializing_if = "Option::is_none")]
5896    /// Default Address Pool specifies default subnet pools for global scope
5897    /// networks.
5898    pub default_addr_pool: Option<Vec<String>>,
5899    #[serde(rename = "ID")]
5900    #[serde(skip_serializing_if = "Option::is_none")]
5901    /// The ID of the swarm.
5902    pub id: Option<String>,
5903    #[serde(rename = "JoinTokens")]
5904    pub join_tokens: Option<JoinTokens>,
5905    #[serde(rename = "RootRotationInProgress")]
5906    #[serde(skip_serializing_if = "Option::is_none")]
5907    /// Whether there is currently a root CA rotation in progress for the swarm
5908    pub root_rotation_in_progress: Option<bool>,
5909    #[serde(rename = "Spec")]
5910    pub spec: Option<SwarmSpec>,
5911    #[serde(rename = "SubnetSize")]
5912    #[serde(skip_serializing_if = "Option::is_none")]
5913    /// SubnetSize specifies the subnet size of the networks created from the
5914    /// default subnet pool.
5915    pub subnet_size: Option<u32>,
5916    #[serde(rename = "TLSInfo")]
5917    pub tls_info: Option<TlsInfo>,
5918    #[serde(rename = "UpdatedAt")]
5919    #[serde(skip_serializing_if = "Option::is_none")]
5920    /// Date and time at which the swarm was last updated in
5921    /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
5922    pub updated_at: Option<DateTime<Utc>>,
5923    #[serde(rename = "Version")]
5924    pub version: Option<ObjectVersion>,
5925}
5926
5927#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5928/// Represents generic information about swarm.
5929pub struct SwarmInfo {
5930    #[serde(rename = "Cluster")]
5931    pub cluster: Option<ClusterInfo>,
5932    #[serde(rename = "ControlAvailable")]
5933    #[serde(skip_serializing_if = "Option::is_none")]
5934    pub control_available: Option<bool>,
5935    #[serde(rename = "Error")]
5936    #[serde(skip_serializing_if = "Option::is_none")]
5937    pub error: Option<String>,
5938    #[serde(rename = "LocalNodeState")]
5939    pub local_node_state: Option<String>,
5940    #[serde(rename = "Managers")]
5941    #[serde(skip_serializing_if = "Option::is_none")]
5942    /// Total number of managers in the swarm.
5943    pub managers: Option<isize>,
5944    #[serde(rename = "NodeAddr")]
5945    #[serde(skip_serializing_if = "Option::is_none")]
5946    /// IP address at which this node can be reached by other nodes in the
5947    /// swarm.
5948    pub node_addr: Option<String>,
5949    #[serde(rename = "NodeID")]
5950    #[serde(skip_serializing_if = "Option::is_none")]
5951    /// Unique identifier of for this node in the swarm.
5952    pub node_id: Option<String>,
5953    #[serde(rename = "Nodes")]
5954    #[serde(skip_serializing_if = "Option::is_none")]
5955    /// Total number of nodes in the swarm.
5956    pub nodes: Option<isize>,
5957    #[serde(rename = "RemoteManagers")]
5958    #[serde(skip_serializing_if = "Option::is_none")]
5959    /// List of ID's and addresses of other managers in the swarm.
5960    pub remote_managers: Option<Vec<PeerNode>>,
5961}
5962
5963/// no error
5964pub type SwarmInit200Response = String;
5965
5966#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5967pub struct SwarmInitBodyParam {
5968    #[serde(rename = "AdvertiseAddr")]
5969    #[serde(skip_serializing_if = "Option::is_none")]
5970    /// Externally reachable address advertised to other nodes. This
5971    /// can either be an address/port combination in the form
5972    /// `192.168.1.1:4567`, or an interface followed by a port number,
5973    /// like `eth0:4567`. If the port number is omitted, the port
5974    /// number from the listen address is used. If `AdvertiseAddr` is
5975    /// not specified, it will be automatically detected when possible.
5976    pub advertise_addr: Option<String>,
5977    #[serde(rename = "DataPathAddr")]
5978    #[serde(skip_serializing_if = "Option::is_none")]
5979    /// Address or interface to use for data path traffic (format:
5980    /// `<ip|interface>`), for example,  `192.168.1.1`, or an interface,
5981    /// like `eth0`. If `DataPathAddr` is unspecified, the same address
5982    /// as `AdvertiseAddr` is used.
5983    ///
5984    /// The `DataPathAddr` specifies the address that global scope
5985    /// network drivers will publish towards other  nodes in order to
5986    /// reach the containers running on this node. Using this parameter
5987    /// it is possible to separate the container data traffic from the
5988    /// management traffic of the cluster.
5989    pub data_path_addr: Option<String>,
5990    #[serde(rename = "DataPathPort")]
5991    #[serde(skip_serializing_if = "Option::is_none")]
5992    /// DataPathPort specifies the data path port number for data traffic.
5993    /// Acceptable port range is 1024 to 49151.
5994    /// if no port is set or is set to 0, default port 4789 will be used.
5995    pub data_path_port: Option<u32>,
5996    #[serde(rename = "DefaultAddrPool")]
5997    #[serde(skip_serializing_if = "Option::is_none")]
5998    /// Default Address Pool specifies default subnet pools for global
5999    /// scope networks.
6000    pub default_addr_pool: Option<Vec<String>>,
6001    #[serde(rename = "ForceNewCluster")]
6002    #[serde(skip_serializing_if = "Option::is_none")]
6003    /// Force creation of a new swarm.
6004    pub force_new_cluster: Option<bool>,
6005    #[serde(rename = "ListenAddr")]
6006    #[serde(skip_serializing_if = "Option::is_none")]
6007    /// Listen address used for inter-manager communication, as well
6008    /// as determining the networking interface used for the VXLAN
6009    /// Tunnel Endpoint (VTEP). This can either be an address/port
6010    /// combination in the form `192.168.1.1:4567`, or an interface
6011    /// followed by a port number, like `eth0:4567`. If the port number
6012    /// is omitted, the default swarm listening port is used.
6013    pub listen_addr: Option<String>,
6014    #[serde(rename = "Spec")]
6015    pub spec: Option<SwarmSpec>,
6016    #[serde(rename = "SubnetSize")]
6017    #[serde(skip_serializing_if = "Option::is_none")]
6018    /// SubnetSize specifies the subnet size of the networks created
6019    /// from the default subnet pool.
6020    pub subnet_size: Option<u32>,
6021}
6022
6023#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6024pub struct SwarmJoinBodyParam {
6025    #[serde(rename = "AdvertiseAddr")]
6026    #[serde(skip_serializing_if = "Option::is_none")]
6027    /// Externally reachable address advertised to other nodes. This
6028    /// can either be an address/port combination in the form
6029    /// `192.168.1.1:4567`, or an interface followed by a port number,
6030    /// like `eth0:4567`. If the port number is omitted, the port
6031    /// number from the listen address is used. If `AdvertiseAddr` is
6032    /// not specified, it will be automatically detected when possible.
6033    pub advertise_addr: Option<String>,
6034    #[serde(rename = "DataPathAddr")]
6035    #[serde(skip_serializing_if = "Option::is_none")]
6036    /// Address or interface to use for data path traffic (format:
6037    /// `<ip|interface>`), for example,  `192.168.1.1`, or an interface,
6038    /// like `eth0`. If `DataPathAddr` is unspecified, the same address
6039    /// as `AdvertiseAddr` is used.
6040    ///
6041    /// The `DataPathAddr` specifies the address that global scope
6042    /// network drivers will publish towards other nodes in order to
6043    /// reach the containers running on this node. Using this parameter
6044    /// it is possible to separate the container data traffic from the
6045    /// management traffic of the cluster.
6046    pub data_path_addr: Option<String>,
6047    #[serde(rename = "JoinToken")]
6048    #[serde(skip_serializing_if = "Option::is_none")]
6049    /// Secret token for joining this swarm.
6050    pub join_token: Option<String>,
6051    #[serde(rename = "ListenAddr")]
6052    #[serde(skip_serializing_if = "Option::is_none")]
6053    /// Listen address used for inter-manager communication if the node
6054    /// gets promoted to manager, as well as determining the networking
6055    /// interface used for the VXLAN Tunnel Endpoint (VTEP).
6056    pub listen_addr: Option<String>,
6057    #[serde(rename = "RemoteAddrs")]
6058    #[serde(skip_serializing_if = "Option::is_none")]
6059    /// Addresses of manager nodes already participating in the swarm.
6060    pub remote_addrs: Option<Vec<String>>,
6061}
6062
6063#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6064/// User modifiable swarm configuration.
6065pub struct SwarmSpec {
6066    #[serde(rename = "CAConfig")]
6067    #[serde(skip_serializing_if = "Option::is_none")]
6068    /// CA configuration.
6069    pub ca_config: Option<SwarmSpecCaConfigInlineItem>,
6070    #[serde(rename = "Dispatcher")]
6071    #[serde(skip_serializing_if = "Option::is_none")]
6072    /// Dispatcher configuration.
6073    pub dispatcher: Option<SwarmSpecDispatcherInlineItem>,
6074    #[serde(rename = "EncryptionConfig")]
6075    #[serde(skip_serializing_if = "Option::is_none")]
6076    /// Parameters related to encryption-at-rest.
6077    pub encryption_config: Option<SwarmSpecEncryptionConfigInlineItem>,
6078    #[serde(rename = "Labels")]
6079    #[serde(skip_serializing_if = "Option::is_none")]
6080    /// User-defined key/value metadata.
6081    pub labels: Option<HashMap<String, String>>,
6082    #[serde(rename = "Name")]
6083    #[serde(skip_serializing_if = "Option::is_none")]
6084    /// Name of the swarm.
6085    pub name: Option<String>,
6086    #[serde(rename = "Orchestration")]
6087    #[serde(skip_serializing_if = "Option::is_none")]
6088    /// Orchestration configuration.
6089    pub orchestration: Option<SwarmSpecOrchestrationInlineItem>,
6090    #[serde(rename = "Raft")]
6091    #[serde(skip_serializing_if = "Option::is_none")]
6092    /// Raft configuration.
6093    pub raft: Option<SwarmSpecRaftInlineItem>,
6094    #[serde(rename = "TaskDefaults")]
6095    #[serde(skip_serializing_if = "Option::is_none")]
6096    /// Defaults for creating tasks in this cluster.
6097    pub task_defaults: Option<SwarmSpecTaskDefaultsInlineItem>,
6098}
6099
6100#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6101/// CA configuration.
6102pub struct SwarmSpecCaConfigInlineItem {
6103    #[serde(rename = "ExternalCAs")]
6104    #[serde(skip_serializing_if = "Option::is_none")]
6105    /// Configuration for forwarding signing requests to an external
6106    /// certificate authority.
6107    pub external_c_as: Option<Vec<SwarmSpecCaConfigInlineItemExternalCAsInlineItem>>,
6108    #[serde(rename = "ForceRotate")]
6109    #[serde(skip_serializing_if = "Option::is_none")]
6110    /// An integer whose purpose is to force swarm to generate a new
6111    /// signing CA certificate and key, if none have been specified in
6112    /// `SigningCACert` and `SigningCAKey`
6113    pub force_rotate: Option<u64>,
6114    #[serde(rename = "NodeCertExpiry")]
6115    #[serde(skip_serializing_if = "Option::is_none")]
6116    /// The duration node certificates are issued for.
6117    pub node_cert_expiry: Option<i64>,
6118    #[serde(rename = "SigningCACert")]
6119    #[serde(skip_serializing_if = "Option::is_none")]
6120    /// The desired signing CA certificate for all swarm node TLS leaf
6121    /// certificates, in PEM format.
6122    pub signing_ca_cert: Option<String>,
6123    #[serde(rename = "SigningCAKey")]
6124    #[serde(skip_serializing_if = "Option::is_none")]
6125    /// The desired signing CA key for all swarm node TLS leaf certificates,
6126    /// in PEM format.
6127    pub signing_ca_key: Option<String>,
6128}
6129
6130#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6131pub struct SwarmSpecCaConfigInlineItemExternalCAsInlineItem {
6132    #[serde(rename = "CACert")]
6133    #[serde(skip_serializing_if = "Option::is_none")]
6134    /// The root CA certificate (in PEM format) this external CA uses
6135    /// to issue TLS certificates (assumed to be to the current swarm
6136    /// root CA certificate if not provided).
6137    pub ca_cert: Option<String>,
6138    #[serde(rename = "Options")]
6139    #[serde(skip_serializing_if = "Option::is_none")]
6140    /// An object with key/value pairs that are interpreted as
6141    /// protocol-specific options for the external CA driver.
6142    pub options: Option<HashMap<String, String>>,
6143    #[serde(rename = "Protocol")]
6144    #[serde(skip_serializing_if = "Option::is_none")]
6145    /// Protocol for communication with the external CA (currently
6146    /// only `cfssl` is supported).
6147    pub protocol: Option<String>,
6148    #[serde(rename = "URL")]
6149    #[serde(skip_serializing_if = "Option::is_none")]
6150    /// URL where certificate signing requests should be sent.
6151    pub url: Option<String>,
6152}
6153
6154#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6155/// Protocol for communication with the external CA (currently
6156/// only `cfssl` is supported).
6157pub enum SwarmSpecCaConfigInlineItemExternalCAsInlineItemProtocolInlineItem {
6158    #[serde(rename = "cfssl")]
6159    Cfssl,
6160}
6161
6162impl AsRef<str> for SwarmSpecCaConfigInlineItemExternalCAsInlineItemProtocolInlineItem {
6163    fn as_ref(&self) -> &str {
6164        match self {
6165            SwarmSpecCaConfigInlineItemExternalCAsInlineItemProtocolInlineItem::Cfssl => "cfssl",
6166        }
6167    }
6168}
6169
6170impl std::fmt::Display for SwarmSpecCaConfigInlineItemExternalCAsInlineItemProtocolInlineItem {
6171    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6172        write!(f, "{}", self.as_ref())
6173    }
6174}
6175
6176#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6177/// Dispatcher configuration.
6178pub struct SwarmSpecDispatcherInlineItem {
6179    #[serde(rename = "HeartbeatPeriod")]
6180    #[serde(skip_serializing_if = "Option::is_none")]
6181    /// The delay for an agent to send a heartbeat to the dispatcher.
6182    pub heartbeat_period: Option<i64>,
6183}
6184
6185#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6186/// Parameters related to encryption-at-rest.
6187pub struct SwarmSpecEncryptionConfigInlineItem {
6188    #[serde(rename = "AutoLockManagers")]
6189    #[serde(skip_serializing_if = "Option::is_none")]
6190    /// If set, generate a key and use it to lock data stored on the
6191    /// managers.
6192    pub auto_lock_managers: Option<bool>,
6193}
6194
6195#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6196/// Orchestration configuration.
6197pub struct SwarmSpecOrchestrationInlineItem {
6198    #[serde(rename = "TaskHistoryRetentionLimit")]
6199    #[serde(skip_serializing_if = "Option::is_none")]
6200    /// The number of historic tasks to keep per instance or node. If
6201    /// negative, never remove completed or failed tasks.
6202    pub task_history_retention_limit: Option<i64>,
6203}
6204
6205#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6206/// Raft configuration.
6207pub struct SwarmSpecRaftInlineItem {
6208    #[serde(rename = "ElectionTick")]
6209    #[serde(skip_serializing_if = "Option::is_none")]
6210    /// The number of ticks that a follower will wait for a message from
6211    /// the leader before becoming a candidate and starting an election.
6212    /// `ElectionTick` must be greater than `HeartbeatTick`.
6213    ///
6214    /// A tick currently defaults to one second, so these translate
6215    /// directly to seconds currently, but this is NOT guaranteed.
6216    pub election_tick: Option<isize>,
6217    #[serde(rename = "HeartbeatTick")]
6218    #[serde(skip_serializing_if = "Option::is_none")]
6219    /// The number of ticks between heartbeats. Every HeartbeatTick ticks,
6220    /// the leader will send a heartbeat to the followers.
6221    ///
6222    /// A tick currently defaults to one second, so these translate
6223    /// directly to seconds currently, but this is NOT guaranteed.
6224    pub heartbeat_tick: Option<isize>,
6225    #[serde(rename = "KeepOldSnapshots")]
6226    #[serde(skip_serializing_if = "Option::is_none")]
6227    /// The number of snapshots to keep beyond the current snapshot.
6228    pub keep_old_snapshots: Option<u64>,
6229    #[serde(rename = "LogEntriesForSlowFollowers")]
6230    #[serde(skip_serializing_if = "Option::is_none")]
6231    /// The number of log entries to keep around to sync up slow followers
6232    /// after a snapshot is created.
6233    pub log_entries_for_slow_followers: Option<u64>,
6234    #[serde(rename = "SnapshotInterval")]
6235    #[serde(skip_serializing_if = "Option::is_none")]
6236    /// The number of log entries between snapshots.
6237    pub snapshot_interval: Option<u64>,
6238}
6239
6240#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6241/// Defaults for creating tasks in this cluster.
6242pub struct SwarmSpecTaskDefaultsInlineItem {
6243    #[serde(rename = "LogDriver")]
6244    #[serde(skip_serializing_if = "Option::is_none")]
6245    /// The log driver to use for tasks created in the orchestrator if
6246    /// unspecified by a service.
6247    ///
6248    /// Updating this value only affects new tasks. Existing tasks continue
6249    /// to use their previously configured log driver until recreated.
6250    pub log_driver: Option<SwarmSpecTaskDefaultsInlineItemLogDriverInlineItem>,
6251}
6252
6253#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6254/// The log driver to use for tasks created in the orchestrator if
6255/// unspecified by a service.
6256///
6257/// Updating this value only affects new tasks. Existing tasks continue
6258/// to use their previously configured log driver until recreated.
6259pub struct SwarmSpecTaskDefaultsInlineItemLogDriverInlineItem {
6260    #[serde(rename = "Name")]
6261    #[serde(skip_serializing_if = "Option::is_none")]
6262    /// The log driver to use as a default for new tasks.
6263    pub name: Option<String>,
6264    #[serde(rename = "Options")]
6265    #[serde(skip_serializing_if = "Option::is_none")]
6266    /// Driver-specific options for the selectd log driver, specified
6267    /// as key/value pairs.
6268    pub options: Option<HashMap<String, String>>,
6269}
6270
6271#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6272pub struct SwarmUnlockBodyParam {
6273    #[serde(rename = "UnlockKey")]
6274    #[serde(skip_serializing_if = "Option::is_none")]
6275    /// The swarm's unlock key.
6276    pub unlock_key: Option<String>,
6277}
6278
6279#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6280/// no error
6281pub struct SwarmUnlockkey200Response {
6282    #[serde(rename = "UnlockKey")]
6283    #[serde(skip_serializing_if = "Option::is_none")]
6284    /// The swarm's unlock key.
6285    pub unlock_key: Option<String>,
6286}
6287
6288#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6289/// An identity token was generated successfully.
6290pub struct SystemAuth200Response {
6291    #[serde(rename = "IdentityToken")]
6292    #[serde(skip_serializing_if = "Option::is_none")]
6293    /// An opaque token used to authenticate a user after a successful login
6294    pub identity_token: Option<String>,
6295    #[serde(rename = "Status")]
6296    /// The status of the authentication
6297    pub status: String,
6298}
6299
6300#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6301/// no error
6302pub struct SystemDataUsage200Response {
6303    #[serde(rename = "BuildCache")]
6304    #[serde(skip_serializing_if = "Option::is_none")]
6305    pub build_cache: Option<Vec<BuildCache>>,
6306    #[serde(rename = "Containers")]
6307    #[serde(skip_serializing_if = "Option::is_none")]
6308    pub containers: Option<Vec<ContainerSummary>>,
6309    #[serde(rename = "Images")]
6310    #[serde(skip_serializing_if = "Option::is_none")]
6311    pub images: Option<Vec<ImageSummary>>,
6312    #[serde(rename = "LayersSize")]
6313    #[serde(skip_serializing_if = "Option::is_none")]
6314    pub layers_size: Option<i64>,
6315    #[serde(rename = "Volumes")]
6316    #[serde(skip_serializing_if = "Option::is_none")]
6317    pub volumes: Option<Vec<Volume>>,
6318}
6319
6320#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6321pub struct SystemInfo {
6322    #[serde(rename = "Architecture")]
6323    #[serde(skip_serializing_if = "Option::is_none")]
6324    /// Hardware architecture of the host, as returned by the Go runtime
6325    /// (`GOARCH`).
6326    ///
6327    /// A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).
6328    pub architecture: Option<String>,
6329    #[serde(rename = "BridgeNfIp6tables")]
6330    #[serde(skip_serializing_if = "Option::is_none")]
6331    /// Indicates if `bridge-nf-call-ip6tables` is available on the host.
6332    pub bridge_nf_ip_6_tables: Option<bool>,
6333    #[serde(rename = "BridgeNfIptables")]
6334    #[serde(skip_serializing_if = "Option::is_none")]
6335    /// Indicates if `bridge-nf-call-iptables` is available on the host.
6336    pub bridge_nf_iptables: Option<bool>,
6337    #[serde(rename = "CPUSet")]
6338    #[serde(skip_serializing_if = "Option::is_none")]
6339    /// Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host.
6340    ///
6341    /// See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt)
6342    pub cpu_set: Option<bool>,
6343    #[serde(rename = "CPUShares")]
6344    #[serde(skip_serializing_if = "Option::is_none")]
6345    /// Indicates if CPU Shares limiting is supported by the host.
6346    pub cpu_shares: Option<bool>,
6347    #[serde(rename = "CgroupDriver")]
6348    #[serde(skip_serializing_if = "Option::is_none")]
6349    /// The driver to use for managing cgroups.
6350    pub cgroup_driver: Option<String>,
6351    #[serde(rename = "CgroupVersion")]
6352    #[serde(skip_serializing_if = "Option::is_none")]
6353    /// The version of the cgroup.
6354    pub cgroup_version: Option<String>,
6355    #[serde(rename = "ClusterAdvertise")]
6356    #[serde(skip_serializing_if = "Option::is_none")]
6357    /// The network endpoint that the Engine advertises for the purpose of
6358    /// node discovery. ClusterAdvertise is a `host:port` combination on which
6359    /// the daemon is reachable by other hosts.
6360    ///
6361    /// <p><br /></p>
6362    ///
6363    /// > **Deprecated**: This field is only propagated when using standalone Swarm
6364    /// > mode, and overlay networking using an external k/v store. Overlay
6365    /// > networks with Swarm mode enabled use the built-in raft store, and
6366    /// > this field will be empty.
6367    pub cluster_advertise: Option<String>,
6368    #[serde(rename = "ClusterStore")]
6369    #[serde(skip_serializing_if = "Option::is_none")]
6370    /// URL of the distributed storage backend.
6371    ///
6372    ///
6373    /// The storage backend is used for multihost networking (to store
6374    /// network and endpoint information) and by the node discovery mechanism.
6375    ///
6376    /// <p><br /></p>
6377    ///
6378    /// > **Deprecated**: This field is only propagated when using standalone Swarm
6379    /// > mode, and overlay networking using an external k/v store. Overlay
6380    /// > networks with Swarm mode enabled use the built-in raft store, and
6381    /// > this field will be empty.
6382    pub cluster_store: Option<String>,
6383    #[serde(rename = "ContainerdCommit")]
6384    pub containerd_commit: Option<Commit>,
6385    #[serde(rename = "Containers")]
6386    #[serde(skip_serializing_if = "Option::is_none")]
6387    /// Total number of containers on the host.
6388    pub containers: Option<isize>,
6389    #[serde(rename = "ContainersPaused")]
6390    #[serde(skip_serializing_if = "Option::is_none")]
6391    /// Number of containers with status `"paused"`.
6392    pub containers_paused: Option<isize>,
6393    #[serde(rename = "ContainersRunning")]
6394    #[serde(skip_serializing_if = "Option::is_none")]
6395    /// Number of containers with status `"running"`.
6396    pub containers_running: Option<isize>,
6397    #[serde(rename = "ContainersStopped")]
6398    #[serde(skip_serializing_if = "Option::is_none")]
6399    /// Number of containers with status `"stopped"`.
6400    pub containers_stopped: Option<isize>,
6401    #[serde(rename = "CpuCfsPeriod")]
6402    #[serde(skip_serializing_if = "Option::is_none")]
6403    /// Indicates if CPU CFS(Completely Fair Scheduler) period is supported by
6404    /// the host.
6405    pub cpu_cfs_period: Option<bool>,
6406    #[serde(rename = "CpuCfsQuota")]
6407    #[serde(skip_serializing_if = "Option::is_none")]
6408    /// Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by
6409    /// the host.
6410    pub cpu_cfs_quota: Option<bool>,
6411    #[serde(rename = "Debug")]
6412    #[serde(skip_serializing_if = "Option::is_none")]
6413    /// Indicates if the daemon is running in debug-mode / with debug-level
6414    /// logging enabled.
6415    pub debug: Option<bool>,
6416    #[serde(rename = "DefaultAddressPools")]
6417    #[serde(skip_serializing_if = "Option::is_none")]
6418    /// List of custom default address pools for local networks, which can be
6419    /// specified in the daemon.json file or dockerd option.
6420    ///
6421    /// Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256
6422    /// 10.10.[0-255].0/24 address pools.
6423    pub default_address_pools: Option<Vec<SystemInfoDefaultAddressPoolsInlineItem>>,
6424    #[serde(rename = "DefaultRuntime")]
6425    #[serde(skip_serializing_if = "Option::is_none")]
6426    /// Name of the default OCI runtime that is used when starting containers.
6427    ///
6428    /// The default can be overridden per-container at create time.
6429    pub default_runtime: Option<String>,
6430    #[serde(rename = "DockerRootDir")]
6431    #[serde(skip_serializing_if = "Option::is_none")]
6432    /// Root directory of persistent Docker state.
6433    ///
6434    /// Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker`
6435    /// on Windows.
6436    pub docker_root_dir: Option<String>,
6437    #[serde(rename = "Driver")]
6438    #[serde(skip_serializing_if = "Option::is_none")]
6439    /// Name of the storage driver in use.
6440    pub driver: Option<String>,
6441    #[serde(rename = "DriverStatus")]
6442    #[serde(skip_serializing_if = "Option::is_none")]
6443    /// Information specific to the storage driver, provided as
6444    /// "label" / "value" pairs.
6445    ///
6446    /// This information is provided by the storage driver, and formatted
6447    /// in a way consistent with the output of `docker info` on the command
6448    /// line.
6449    ///
6450    /// <p><br /></p>
6451    ///
6452    /// > **Note**: The information returned in this field, including the
6453    /// > formatting of values and labels, should not be considered stable,
6454    /// > and may change without notice.
6455    pub driver_status: Option<Vec<Vec<String>>>,
6456    #[serde(rename = "ExperimentalBuild")]
6457    #[serde(skip_serializing_if = "Option::is_none")]
6458    /// Indicates if experimental features are enabled on the daemon.
6459    pub experimental_build: Option<bool>,
6460    #[serde(rename = "GenericResources")]
6461    pub generic_resources: Option<GenericResources>,
6462    #[serde(rename = "HttpProxy")]
6463    #[serde(skip_serializing_if = "Option::is_none")]
6464    /// HTTP-proxy configured for the daemon. This value is obtained from the
6465    /// [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
6466    /// Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL
6467    /// are masked in the API response.
6468    ///
6469    /// Containers do not automatically inherit this configuration.
6470    pub http_proxy: Option<String>,
6471    #[serde(rename = "HttpsProxy")]
6472    #[serde(skip_serializing_if = "Option::is_none")]
6473    /// HTTPS-proxy configured for the daemon. This value is obtained from the
6474    /// [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable.
6475    /// Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL
6476    /// are masked in the API response.
6477    ///
6478    /// Containers do not automatically inherit this configuration.
6479    pub https_proxy: Option<String>,
6480    #[serde(rename = "ID")]
6481    #[serde(skip_serializing_if = "Option::is_none")]
6482    /// Unique identifier of the daemon.
6483    ///
6484    /// <p><br /></p>
6485    ///
6486    /// > **Note**: The format of the ID itself is not part of the API, and
6487    /// > should not be considered stable.
6488    pub id: Option<String>,
6489    #[serde(rename = "IPv4Forwarding")]
6490    #[serde(skip_serializing_if = "Option::is_none")]
6491    /// Indicates IPv4 forwarding is enabled.
6492    pub i_pv_4_forwarding: Option<bool>,
6493    #[serde(rename = "Images")]
6494    #[serde(skip_serializing_if = "Option::is_none")]
6495    /// Total number of images on the host.
6496    ///
6497    /// Both _tagged_ and _untagged_ (dangling) images are counted.
6498    pub images: Option<isize>,
6499    #[serde(rename = "IndexServerAddress")]
6500    #[serde(skip_serializing_if = "Option::is_none")]
6501    /// Address / URL of the index server that is used for image search,
6502    /// and as a default for user authentication for Docker Hub and Docker Cloud.
6503    pub index_server_address: Option<String>,
6504    #[serde(rename = "InitBinary")]
6505    #[serde(skip_serializing_if = "Option::is_none")]
6506    /// Name and, optional, path of the `docker-init` binary.
6507    ///
6508    /// If the path is omitted, the daemon searches the host's `$PATH` for the
6509    /// binary and uses the first result.
6510    pub init_binary: Option<String>,
6511    #[serde(rename = "InitCommit")]
6512    pub init_commit: Option<Commit>,
6513    #[serde(rename = "Isolation")]
6514    #[serde(skip_serializing_if = "Option::is_none")]
6515    /// Represents the isolation technology to use as a default for containers.
6516    /// The supported values are platform-specific.
6517    ///
6518    /// If no isolation value is specified on daemon start, on Windows client,
6519    /// the default is `hyperv`, and on Windows server, the default is `process`.
6520    ///
6521    /// This option is currently not used on other platforms.
6522    pub isolation: Option<String>,
6523    #[serde(rename = "KernelMemoryTCP")]
6524    #[serde(skip_serializing_if = "Option::is_none")]
6525    /// Indicates if the host has kernel memory TCP limit support enabled. This
6526    /// field is omitted if not supported.
6527    ///
6528    /// Kernel memory TCP limits are not supported when using cgroups v2, which
6529    /// does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup.
6530    pub kernel_memory_tcp: Option<bool>,
6531    #[serde(rename = "KernelVersion")]
6532    #[serde(skip_serializing_if = "Option::is_none")]
6533    /// Kernel version of the host.
6534    ///
6535    /// On Linux, this information obtained from `uname`. On Windows this
6536    /// information is queried from the <kbd>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\</kbd>
6537    /// registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_.
6538    pub kernel_version: Option<String>,
6539    #[serde(rename = "Labels")]
6540    #[serde(skip_serializing_if = "Option::is_none")]
6541    /// User-defined labels (key/value metadata) as set on the daemon.
6542    ///
6543    /// <p><br /></p>
6544    ///
6545    /// > **Note**: When part of a Swarm, nodes can both have _daemon_ labels,
6546    /// > set through the daemon configuration, and _node_ labels, set from a
6547    /// > manager node in the Swarm. Node labels are not included in this
6548    /// > field. Node labels can be retrieved using the `/nodes/(id)` endpoint
6549    /// > on a manager node in the Swarm.
6550    pub labels: Option<Vec<String>>,
6551    #[serde(rename = "LiveRestoreEnabled")]
6552    #[serde(skip_serializing_if = "Option::is_none")]
6553    /// Indicates if live restore is enabled.
6554    ///
6555    /// If enabled, containers are kept running when the daemon is shutdown
6556    /// or upon daemon start if running containers are detected.
6557    pub live_restore_enabled: Option<bool>,
6558    #[serde(rename = "LoggingDriver")]
6559    #[serde(skip_serializing_if = "Option::is_none")]
6560    /// The logging driver to use as a default for new containers.
6561    pub logging_driver: Option<String>,
6562    #[serde(rename = "MemTotal")]
6563    #[serde(skip_serializing_if = "Option::is_none")]
6564    /// Total amount of physical memory available on the host, in bytes.
6565    pub mem_total: Option<i64>,
6566    #[serde(rename = "MemoryLimit")]
6567    #[serde(skip_serializing_if = "Option::is_none")]
6568    /// Indicates if the host has memory limit support enabled.
6569    pub memory_limit: Option<bool>,
6570    #[serde(rename = "NCPU")]
6571    #[serde(skip_serializing_if = "Option::is_none")]
6572    /// The number of logical CPUs usable by the daemon.
6573    ///
6574    /// The number of available CPUs is checked by querying the operating
6575    /// system when the daemon starts. Changes to operating system CPU
6576    /// allocation after the daemon is started are not reflected.
6577    pub ncpu: Option<isize>,
6578    #[serde(rename = "NEventsListener")]
6579    #[serde(skip_serializing_if = "Option::is_none")]
6580    /// Number of event listeners subscribed.
6581    pub n_events_listener: Option<isize>,
6582    #[serde(rename = "NFd")]
6583    #[serde(skip_serializing_if = "Option::is_none")]
6584    /// The total number of file Descriptors in use by the daemon process.
6585    ///
6586    /// This information is only returned if debug-mode is enabled.
6587    pub n_fd: Option<isize>,
6588    #[serde(rename = "NGoroutines")]
6589    #[serde(skip_serializing_if = "Option::is_none")]
6590    /// The  number of goroutines that currently exist.
6591    ///
6592    /// This information is only returned if debug-mode is enabled.
6593    pub n_goroutines: Option<isize>,
6594    #[serde(rename = "Name")]
6595    #[serde(skip_serializing_if = "Option::is_none")]
6596    /// Hostname of the host.
6597    pub name: Option<String>,
6598    #[serde(rename = "NoProxy")]
6599    #[serde(skip_serializing_if = "Option::is_none")]
6600    /// Comma-separated list of domain extensions for which no proxy should be
6601    /// used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html)
6602    /// environment variable.
6603    ///
6604    /// Containers do not automatically inherit this configuration.
6605    pub no_proxy: Option<String>,
6606    #[serde(rename = "OSType")]
6607    #[serde(skip_serializing_if = "Option::is_none")]
6608    /// Generic type of the operating system of the host, as returned by the
6609    /// Go runtime (`GOOS`).
6610    ///
6611    /// Currently returned values are "linux" and "windows". A full list of
6612    /// possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).
6613    pub os_type: Option<String>,
6614    #[serde(rename = "OSVersion")]
6615    #[serde(skip_serializing_if = "Option::is_none")]
6616    /// Version of the host's operating system
6617    ///
6618    /// <p><br /></p>
6619    ///
6620    /// > **Note**: The information returned in this field, including its
6621    /// > very existence, and the formatting of values, should not be considered
6622    /// > stable, and may change without notice.
6623    pub os_version: Option<String>,
6624    #[serde(rename = "OomKillDisable")]
6625    #[serde(skip_serializing_if = "Option::is_none")]
6626    /// Indicates if OOM killer disable is supported on the host.
6627    pub oom_kill_disable: Option<bool>,
6628    #[serde(rename = "OperatingSystem")]
6629    #[serde(skip_serializing_if = "Option::is_none")]
6630    /// Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS"
6631    /// or "Windows Server 2016 Datacenter"
6632    pub operating_system: Option<String>,
6633    #[serde(rename = "PidsLimit")]
6634    #[serde(skip_serializing_if = "Option::is_none")]
6635    /// Indicates if the host kernel has PID limit support enabled.
6636    pub pids_limit: Option<bool>,
6637    #[serde(rename = "Plugins")]
6638    pub plugins: Option<PluginsInfo>,
6639    #[serde(rename = "ProductLicense")]
6640    #[serde(skip_serializing_if = "Option::is_none")]
6641    /// Reports a summary of the product license on the daemon.
6642    ///
6643    /// If a commercial license has been applied to the daemon, information
6644    /// such as number of nodes, and expiration are included.
6645    pub product_license: Option<String>,
6646    #[serde(rename = "RegistryConfig")]
6647    pub registry_config: Option<RegistryServiceConfig>,
6648    #[serde(rename = "RuncCommit")]
6649    pub runc_commit: Option<Commit>,
6650    #[serde(rename = "Runtimes")]
6651    #[serde(skip_serializing_if = "Option::is_none")]
6652    /// List of [OCI compliant](https://github.com/opencontainers/runtime-spec)
6653    /// runtimes configured on the daemon. Keys hold the "name" used to
6654    /// reference the runtime.
6655    ///
6656    /// The Docker daemon relies on an OCI compliant runtime (invoked via the
6657    /// `containerd` daemon) as its interface to the Linux kernel namespaces,
6658    /// cgroups, and SELinux.
6659    ///
6660    /// The default runtime is `runc`, and automatically configured. Additional
6661    /// runtimes can be configured by the user and will be listed here.
6662    pub runtimes: Option<HashMap<String, Runtime>>,
6663    #[serde(rename = "SecurityOptions")]
6664    #[serde(skip_serializing_if = "Option::is_none")]
6665    /// List of security features that are enabled on the daemon, such as
6666    /// apparmor, seccomp, SELinux, user-namespaces (userns), rootless and
6667    /// no-new-privileges.
6668    ///
6669    /// Additional configuration options for each security feature may
6670    /// be present, and are included as a comma-separated list of key/value
6671    /// pairs.
6672    pub security_options: Option<Vec<String>>,
6673    #[serde(rename = "ServerVersion")]
6674    #[serde(skip_serializing_if = "Option::is_none")]
6675    /// Version string of the daemon.
6676    ///
6677    /// > **Note**: the [standalone Swarm API](/swarm/swarm-api/)
6678    /// > returns the Swarm version instead of the daemon  version, for example
6679    /// > `swarm/1.2.8`.
6680    pub server_version: Option<String>,
6681    #[serde(rename = "SwapLimit")]
6682    #[serde(skip_serializing_if = "Option::is_none")]
6683    /// Indicates if the host has memory swap limit support enabled.
6684    pub swap_limit: Option<bool>,
6685    #[serde(rename = "Swarm")]
6686    pub swarm: Option<SwarmInfo>,
6687    #[serde(rename = "SystemTime")]
6688    #[serde(skip_serializing_if = "Option::is_none")]
6689    /// Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)
6690    /// format with nano-seconds.
6691    pub system_time: Option<String>,
6692    #[serde(rename = "Warnings")]
6693    #[serde(skip_serializing_if = "Option::is_none")]
6694    /// List of warnings / informational messages about missing features, or
6695    /// issues related to the daemon configuration.
6696    ///
6697    /// These messages can be printed by the client as information to the user.
6698    pub warnings: Option<Vec<String>>,
6699}
6700
6701#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6702/// The driver to use for managing cgroups.
6703pub enum SystemInfoCgroupDriverInlineItem {
6704    #[serde(rename = "cgroupfs")]
6705    Cgroupfs,
6706    #[serde(rename = "systemd")]
6707    Systemd,
6708    #[serde(rename = "none")]
6709    None,
6710}
6711
6712impl AsRef<str> for SystemInfoCgroupDriverInlineItem {
6713    fn as_ref(&self) -> &str {
6714        match self {
6715            SystemInfoCgroupDriverInlineItem::Cgroupfs => "cgroupfs",
6716            SystemInfoCgroupDriverInlineItem::Systemd => "systemd",
6717            SystemInfoCgroupDriverInlineItem::None => "none",
6718        }
6719    }
6720}
6721
6722impl std::fmt::Display for SystemInfoCgroupDriverInlineItem {
6723    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6724        write!(f, "{}", self.as_ref())
6725    }
6726}
6727
6728#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6729/// The version of the cgroup.
6730pub enum SystemInfoCgroupVersionInlineItem {
6731    #[serde(rename = "1")]
6732    Value1,
6733    #[serde(rename = "2")]
6734    Value2,
6735}
6736
6737impl AsRef<str> for SystemInfoCgroupVersionInlineItem {
6738    fn as_ref(&self) -> &str {
6739        match self {
6740            SystemInfoCgroupVersionInlineItem::Value1 => "1",
6741            SystemInfoCgroupVersionInlineItem::Value2 => "2",
6742        }
6743    }
6744}
6745
6746impl std::fmt::Display for SystemInfoCgroupVersionInlineItem {
6747    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6748        write!(f, "{}", self.as_ref())
6749    }
6750}
6751
6752#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6753pub struct SystemInfoDefaultAddressPoolsInlineItem {
6754    #[serde(rename = "Base")]
6755    #[serde(skip_serializing_if = "Option::is_none")]
6756    /// The network address in CIDR format
6757    pub base: Option<String>,
6758    #[serde(rename = "Size")]
6759    #[serde(skip_serializing_if = "Option::is_none")]
6760    /// The network pool size
6761    pub size: Option<isize>,
6762}
6763
6764#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6765/// Represents the isolation technology to use as a default for containers.
6766/// The supported values are platform-specific.
6767///
6768/// If no isolation value is specified on daemon start, on Windows client,
6769/// the default is `hyperv`, and on Windows server, the default is `process`.
6770///
6771/// This option is currently not used on other platforms.
6772pub enum SystemInfoIsolationInlineItem {
6773    #[serde(rename = "default")]
6774    Default,
6775    #[serde(rename = "hyperv")]
6776    Hyperv,
6777    #[serde(rename = "process")]
6778    Process,
6779}
6780
6781impl AsRef<str> for SystemInfoIsolationInlineItem {
6782    fn as_ref(&self) -> &str {
6783        match self {
6784            SystemInfoIsolationInlineItem::Default => "default",
6785            SystemInfoIsolationInlineItem::Hyperv => "hyperv",
6786            SystemInfoIsolationInlineItem::Process => "process",
6787        }
6788    }
6789}
6790
6791impl std::fmt::Display for SystemInfoIsolationInlineItem {
6792    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6793        write!(f, "{}", self.as_ref())
6794    }
6795}
6796
6797/// no error
6798pub type SystemPing200Response = String;
6799
6800/// no error
6801pub type SystemPingHead200Response = String;
6802
6803#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6804/// Response of Engine API: GET "/version"
6805pub struct SystemVersion {
6806    #[serde(rename = "ApiVersion")]
6807    #[serde(skip_serializing_if = "Option::is_none")]
6808    /// The default (and highest) API version that is supported by the daemon
6809    pub api_version: Option<String>,
6810    #[serde(rename = "Arch")]
6811    #[serde(skip_serializing_if = "Option::is_none")]
6812    /// The architecture that the daemon is running on
6813    pub arch: Option<String>,
6814    #[serde(rename = "BuildTime")]
6815    #[serde(skip_serializing_if = "Option::is_none")]
6816    /// The date and time that the daemon was compiled.
6817    pub build_time: Option<String>,
6818    #[serde(rename = "Components")]
6819    #[serde(skip_serializing_if = "Option::is_none")]
6820    /// Information about system components
6821    pub components: Option<Vec<ComponentVersion>>,
6822    #[serde(rename = "Experimental")]
6823    #[serde(skip_serializing_if = "Option::is_none")]
6824    /// Indicates if the daemon is started with experimental features enabled.
6825    ///
6826    /// This field is omitted when empty / false.
6827    pub experimental: Option<bool>,
6828    #[serde(rename = "GitCommit")]
6829    #[serde(skip_serializing_if = "Option::is_none")]
6830    /// The Git commit of the source code that was used to build the daemon
6831    pub git_commit: Option<String>,
6832    #[serde(rename = "GoVersion")]
6833    #[serde(skip_serializing_if = "Option::is_none")]
6834    /// The version Go used to compile the daemon, and the version of the Go
6835    /// runtime in use.
6836    pub go_version: Option<String>,
6837    #[serde(rename = "KernelVersion")]
6838    #[serde(skip_serializing_if = "Option::is_none")]
6839    /// The kernel version (`uname -r`) that the daemon is running on.
6840    ///
6841    /// This field is omitted when empty.
6842    pub kernel_version: Option<String>,
6843    #[serde(rename = "MinAPIVersion")]
6844    #[serde(skip_serializing_if = "Option::is_none")]
6845    /// The minimum API version that is supported by the daemon
6846    pub min_api_version: Option<String>,
6847    #[serde(rename = "Os")]
6848    #[serde(skip_serializing_if = "Option::is_none")]
6849    /// The operating system that the daemon is running on ("linux" or "windows")
6850    pub os: Option<String>,
6851    #[serde(rename = "Platform")]
6852    #[serde(skip_serializing_if = "Option::is_none")]
6853    pub platform: Option<SystemVersionPlatformInlineItem>,
6854    #[serde(rename = "Version")]
6855    #[serde(skip_serializing_if = "Option::is_none")]
6856    /// The version of the daemon
6857    pub version: Option<String>,
6858}
6859
6860#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6861pub struct SystemVersionPlatformInlineItem {
6862    #[serde(rename = "Name")]
6863    pub name: String,
6864}
6865
6866#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6867/// Information about the issuer of leaf TLS certificates and the trusted root
6868/// CA certificate.
6869pub struct TlsInfo {
6870    #[serde(rename = "CertIssuerPublicKey")]
6871    #[serde(skip_serializing_if = "Option::is_none")]
6872    /// The base64-url-safe-encoded raw public key bytes of the issuer.
6873    pub cert_issuer_public_key: Option<String>,
6874    #[serde(rename = "CertIssuerSubject")]
6875    #[serde(skip_serializing_if = "Option::is_none")]
6876    /// The base64-url-safe-encoded raw subject bytes of the issuer.
6877    pub cert_issuer_subject: Option<String>,
6878    #[serde(rename = "TrustRoot")]
6879    #[serde(skip_serializing_if = "Option::is_none")]
6880    /// The root CA certificate(s) that are used to validate leaf TLS
6881    /// certificates.
6882    pub trust_root: Option<String>,
6883}
6884
6885#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6886pub struct Task {
6887    #[serde(rename = "AssignedGenericResources")]
6888    pub assigned_generic_resources: Option<GenericResources>,
6889    #[serde(rename = "CreatedAt")]
6890    #[serde(skip_serializing_if = "Option::is_none")]
6891    pub created_at: Option<DateTime<Utc>>,
6892    #[serde(rename = "DesiredState")]
6893    pub desired_state: Option<String>,
6894    #[serde(rename = "ID")]
6895    #[serde(skip_serializing_if = "Option::is_none")]
6896    /// The ID of the task.
6897    pub id: Option<String>,
6898    #[serde(rename = "JobIteration")]
6899    pub job_iteration: Option<ObjectVersion>,
6900    #[serde(rename = "Labels")]
6901    #[serde(skip_serializing_if = "Option::is_none")]
6902    /// User-defined key/value metadata.
6903    pub labels: Option<HashMap<String, String>>,
6904    #[serde(rename = "Name")]
6905    #[serde(skip_serializing_if = "Option::is_none")]
6906    /// Name of the task.
6907    pub name: Option<String>,
6908    #[serde(rename = "NodeID")]
6909    #[serde(skip_serializing_if = "Option::is_none")]
6910    /// The ID of the node that this task is on.
6911    pub node_id: Option<String>,
6912    #[serde(rename = "ServiceID")]
6913    #[serde(skip_serializing_if = "Option::is_none")]
6914    /// The ID of the service this task is part of.
6915    pub service_id: Option<String>,
6916    #[serde(rename = "Slot")]
6917    #[serde(skip_serializing_if = "Option::is_none")]
6918    pub slot: Option<isize>,
6919    #[serde(rename = "Spec")]
6920    pub spec: Option<TaskSpec>,
6921    #[serde(rename = "Status")]
6922    #[serde(skip_serializing_if = "Option::is_none")]
6923    pub status: Option<TaskStatusInlineItem>,
6924    #[serde(rename = "UpdatedAt")]
6925    #[serde(skip_serializing_if = "Option::is_none")]
6926    pub updated_at: Option<DateTime<Utc>>,
6927    #[serde(rename = "Version")]
6928    pub version: Option<ObjectVersion>,
6929}
6930
6931/// no error
6932pub type TaskList200Response = Vec<Task>;
6933
6934/// logs returned as a stream in response body
6935pub type TaskLogs200Response = Vec<u8>;
6936
6937#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
6938/// User modifiable task configuration.
6939pub struct TaskSpec {
6940    #[serde(rename = "ContainerSpec")]
6941    #[serde(skip_serializing_if = "Option::is_none")]
6942    /// Container spec for the service.
6943    ///
6944    /// <p><br /></p>
6945    ///
6946    /// > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
6947    /// > mutually exclusive. PluginSpec is only used when the Runtime field
6948    /// > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
6949    /// > field is set to `attachment`.
6950    pub container_spec: Option<TaskSpecContainerSpecInlineItem>,
6951    #[serde(rename = "ForceUpdate")]
6952    #[serde(skip_serializing_if = "Option::is_none")]
6953    /// A counter that triggers an update even if no relevant parameters have
6954    /// been changed.
6955    pub force_update: Option<isize>,
6956    #[serde(rename = "LogDriver")]
6957    #[serde(skip_serializing_if = "Option::is_none")]
6958    /// Specifies the log driver to use for tasks created from this spec. If
6959    /// not present, the default one for the swarm will be used, finally
6960    /// falling back to the engine default if not specified.
6961    pub log_driver: Option<TaskSpecLogDriverInlineItem>,
6962    #[serde(rename = "NetworkAttachmentSpec")]
6963    #[serde(skip_serializing_if = "Option::is_none")]
6964    /// Read-only spec type for non-swarm containers attached to swarm overlay
6965    /// networks.
6966    ///
6967    /// <p><br /></p>
6968    ///
6969    /// > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
6970    /// > mutually exclusive. PluginSpec is only used when the Runtime field
6971    /// > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
6972    /// > field is set to `attachment`.
6973    pub network_attachment_spec: Option<TaskSpecNetworkAttachmentSpecInlineItem>,
6974    #[serde(rename = "Networks")]
6975    #[serde(skip_serializing_if = "Option::is_none")]
6976    /// Specifies which networks the service should attach to.
6977    pub networks: Option<Vec<NetworkAttachmentConfig>>,
6978    #[serde(rename = "Placement")]
6979    #[serde(skip_serializing_if = "Option::is_none")]
6980    pub placement: Option<TaskSpecPlacementInlineItem>,
6981    #[serde(rename = "PluginSpec")]
6982    #[serde(skip_serializing_if = "Option::is_none")]
6983    /// Plugin spec for the service.  *(Experimental release only.)*
6984    ///
6985    /// <p><br /></p>
6986    ///
6987    /// > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
6988    /// > mutually exclusive. PluginSpec is only used when the Runtime field
6989    /// > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
6990    /// > field is set to `attachment`.
6991    pub plugin_spec: Option<TaskSpecPluginSpecInlineItem>,
6992    #[serde(rename = "Resources")]
6993    #[serde(skip_serializing_if = "Option::is_none")]
6994    /// Resource requirements which apply to each individual container created
6995    /// as part of the service.
6996    pub resources: Option<TaskSpecResourcesInlineItem>,
6997    #[serde(rename = "RestartPolicy")]
6998    #[serde(skip_serializing_if = "Option::is_none")]
6999    /// Specification for the restart policy which applies to containers
7000    /// created as part of this service.
7001    pub restart_policy: Option<TaskSpecRestartPolicyInlineItem>,
7002    #[serde(rename = "Runtime")]
7003    #[serde(skip_serializing_if = "Option::is_none")]
7004    /// Runtime is the type of runtime specified for the task executor.
7005    pub runtime: Option<String>,
7006}
7007
7008#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7009/// Container spec for the service.
7010///
7011/// <p><br /></p>
7012///
7013/// > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
7014/// > mutually exclusive. PluginSpec is only used when the Runtime field
7015/// > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
7016/// > field is set to `attachment`.
7017pub struct TaskSpecContainerSpecInlineItem {
7018    #[serde(rename = "Args")]
7019    #[serde(skip_serializing_if = "Option::is_none")]
7020    /// Arguments to the command.
7021    pub args: Option<Vec<String>>,
7022    #[serde(rename = "CapabilityAdd")]
7023    #[serde(skip_serializing_if = "Option::is_none")]
7024    /// A list of kernel capabilities to add to the default set
7025    /// for the container.
7026    pub capability_add: Option<Vec<String>>,
7027    #[serde(rename = "CapabilityDrop")]
7028    #[serde(skip_serializing_if = "Option::is_none")]
7029    /// A list of kernel capabilities to drop from the default set
7030    /// for the container.
7031    pub capability_drop: Option<Vec<String>>,
7032    #[serde(rename = "Command")]
7033    #[serde(skip_serializing_if = "Option::is_none")]
7034    /// The command to be run in the image.
7035    pub command: Option<Vec<String>>,
7036    #[serde(rename = "Configs")]
7037    #[serde(skip_serializing_if = "Option::is_none")]
7038    /// Configs contains references to zero or more configs that will be
7039    /// exposed to the service.
7040    pub configs: Option<Vec<TaskSpecContainerSpecInlineItemConfigsInlineItem>>,
7041    #[serde(rename = "DNSConfig")]
7042    #[serde(skip_serializing_if = "Option::is_none")]
7043    /// Specification for DNS related configurations in resolver configuration
7044    /// file (`resolv.conf`).
7045    pub dns_config: Option<TaskSpecContainerSpecInlineItemDnsConfigInlineItem>,
7046    #[serde(rename = "Dir")]
7047    #[serde(skip_serializing_if = "Option::is_none")]
7048    /// The working directory for commands to run in.
7049    pub dir: Option<String>,
7050    #[serde(rename = "Env")]
7051    #[serde(skip_serializing_if = "Option::is_none")]
7052    /// A list of environment variables in the form `VAR=value`.
7053    pub env: Option<Vec<String>>,
7054    #[serde(rename = "Groups")]
7055    #[serde(skip_serializing_if = "Option::is_none")]
7056    /// A list of additional groups that the container process will run as.
7057    pub groups: Option<Vec<String>>,
7058    #[serde(rename = "HealthCheck")]
7059    pub health_check: Option<HealthConfig>,
7060    #[serde(rename = "Hostname")]
7061    #[serde(skip_serializing_if = "Option::is_none")]
7062    /// The hostname to use for the container, as a valid
7063    /// [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname.
7064    pub hostname: Option<String>,
7065    #[serde(rename = "Hosts")]
7066    #[serde(skip_serializing_if = "Option::is_none")]
7067    /// A list of hostname/IP mappings to add to the container's `hosts`
7068    /// file. The format of extra hosts is specified in the
7069    /// [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html)
7070    /// man page:
7071    ///
7072    ///     IP_address canonical_hostname [aliases...]
7073    pub hosts: Option<Vec<String>>,
7074    #[serde(rename = "Image")]
7075    #[serde(skip_serializing_if = "Option::is_none")]
7076    /// The image name to use for the container
7077    pub image: Option<String>,
7078    #[serde(rename = "Init")]
7079    #[serde(skip_serializing_if = "Option::is_none")]
7080    /// Run an init inside the container that forwards signals and reaps
7081    /// processes. This field is omitted if empty, and the default (as
7082    /// configured on the daemon) is used.
7083    pub init: Option<bool>,
7084    #[serde(rename = "Isolation")]
7085    #[serde(skip_serializing_if = "Option::is_none")]
7086    /// Isolation technology of the containers running the service.
7087    /// (Windows only)
7088    pub isolation: Option<String>,
7089    #[serde(rename = "Labels")]
7090    #[serde(skip_serializing_if = "Option::is_none")]
7091    /// User-defined key/value data.
7092    pub labels: Option<HashMap<String, String>>,
7093    #[serde(rename = "Mounts")]
7094    #[serde(skip_serializing_if = "Option::is_none")]
7095    /// Specification for mounts to be added to containers created as part
7096    /// of the service.
7097    pub mounts: Option<Vec<Mount>>,
7098    #[serde(rename = "OpenStdin")]
7099    #[serde(skip_serializing_if = "Option::is_none")]
7100    /// Open `stdin`
7101    pub open_stdin: Option<bool>,
7102    #[serde(rename = "Privileges")]
7103    #[serde(skip_serializing_if = "Option::is_none")]
7104    /// Security options for the container
7105    pub privileges: Option<TaskSpecContainerSpecInlineItemPrivilegesInlineItem>,
7106    #[serde(rename = "ReadOnly")]
7107    #[serde(skip_serializing_if = "Option::is_none")]
7108    /// Mount the container's root filesystem as read only.
7109    pub read_only: Option<bool>,
7110    #[serde(rename = "Secrets")]
7111    #[serde(skip_serializing_if = "Option::is_none")]
7112    /// Secrets contains references to zero or more secrets that will be
7113    /// exposed to the service.
7114    pub secrets: Option<Vec<TaskSpecContainerSpecInlineItemSecretsInlineItem>>,
7115    #[serde(rename = "StopGracePeriod")]
7116    #[serde(skip_serializing_if = "Option::is_none")]
7117    /// Amount of time to wait for the container to terminate before
7118    /// forcefully killing it.
7119    pub stop_grace_period: Option<i64>,
7120    #[serde(rename = "StopSignal")]
7121    #[serde(skip_serializing_if = "Option::is_none")]
7122    /// Signal to stop the container.
7123    pub stop_signal: Option<String>,
7124    #[serde(rename = "Sysctls")]
7125    #[serde(skip_serializing_if = "Option::is_none")]
7126    /// Set kernel namedspaced parameters (sysctls) in the container.
7127    /// The Sysctls option on services accepts the same sysctls as the
7128    /// are supported on containers. Note that while the same sysctls are
7129    /// supported, no guarantees or checks are made about their
7130    /// suitability for a clustered environment, and it's up to the user
7131    /// to determine whether a given sysctl will work properly in a
7132    /// Service.
7133    pub sysctls: Option<HashMap<String, String>>,
7134    #[serde(rename = "TTY")]
7135    #[serde(skip_serializing_if = "Option::is_none")]
7136    /// Whether a pseudo-TTY should be allocated.
7137    pub tty: Option<bool>,
7138    #[serde(rename = "Ulimits")]
7139    #[serde(skip_serializing_if = "Option::is_none")]
7140    /// A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`"
7141    pub ulimits: Option<Vec<TaskSpecContainerSpecInlineItemUlimitsInlineItem>>,
7142    #[serde(rename = "User")]
7143    #[serde(skip_serializing_if = "Option::is_none")]
7144    /// The user inside the container.
7145    pub user: Option<String>,
7146}
7147
7148#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7149pub struct TaskSpecContainerSpecInlineItemConfigsInlineItem {
7150    #[serde(rename = "ConfigID")]
7151    #[serde(skip_serializing_if = "Option::is_none")]
7152    /// ConfigID represents the ID of the specific config that we're
7153    /// referencing.
7154    pub config_id: Option<String>,
7155    #[serde(rename = "ConfigName")]
7156    #[serde(skip_serializing_if = "Option::is_none")]
7157    /// ConfigName is the name of the config that this references,
7158    /// but this is just provided for lookup/display purposes. The
7159    /// config in the reference will be identified by its ID.
7160    pub config_name: Option<String>,
7161    #[serde(rename = "File")]
7162    #[serde(skip_serializing_if = "Option::is_none")]
7163    /// File represents a specific target that is backed by a file.
7164    ///
7165    /// <p><br /><p>
7166    ///
7167    /// > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive
7168    pub file: Option<TaskSpecContainerSpecInlineItemConfigsInlineItemFileInlineItem>,
7169    #[serde(rename = "Runtime")]
7170    #[serde(skip_serializing_if = "Option::is_none")]
7171    /// Runtime represents a target that is not mounted into the
7172    /// container but is used by the task
7173    ///
7174    /// <p><br /><p>
7175    ///
7176    /// > **Note**: `Configs.File` and `Configs.Runtime` are mutually
7177    /// > exclusive
7178    pub runtime: Option<Value>,
7179}
7180
7181#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7182/// File represents a specific target that is backed by a file.
7183///
7184/// <p><br /><p>
7185///
7186/// > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive
7187pub struct TaskSpecContainerSpecInlineItemConfigsInlineItemFileInlineItem {
7188    #[serde(rename = "GID")]
7189    #[serde(skip_serializing_if = "Option::is_none")]
7190    /// GID represents the file GID.
7191    pub gid: Option<String>,
7192    #[serde(rename = "Mode")]
7193    #[serde(skip_serializing_if = "Option::is_none")]
7194    /// Mode represents the FileMode of the file.
7195    pub mode: Option<u32>,
7196    #[serde(rename = "Name")]
7197    #[serde(skip_serializing_if = "Option::is_none")]
7198    /// Name represents the final filename in the filesystem.
7199    pub name: Option<String>,
7200    #[serde(rename = "UID")]
7201    #[serde(skip_serializing_if = "Option::is_none")]
7202    /// UID represents the file UID.
7203    pub uid: Option<String>,
7204}
7205
7206#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7207/// Specification for DNS related configurations in resolver configuration
7208/// file (`resolv.conf`).
7209pub struct TaskSpecContainerSpecInlineItemDnsConfigInlineItem {
7210    #[serde(rename = "Nameservers")]
7211    #[serde(skip_serializing_if = "Option::is_none")]
7212    /// The IP addresses of the name servers.
7213    pub nameservers: Option<Vec<String>>,
7214    #[serde(rename = "Options")]
7215    #[serde(skip_serializing_if = "Option::is_none")]
7216    /// A list of internal resolver variables to be modified (e.g.,
7217    /// `debug`, `ndots:3`, etc.).
7218    pub options: Option<Vec<String>>,
7219    #[serde(rename = "Search")]
7220    #[serde(skip_serializing_if = "Option::is_none")]
7221    /// A search list for host-name lookup.
7222    pub search: Option<Vec<String>>,
7223}
7224
7225#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7226/// Isolation technology of the containers running the service.
7227/// (Windows only)
7228pub enum TaskSpecContainerSpecInlineItemIsolationInlineItem {
7229    #[serde(rename = "default")]
7230    Default,
7231    #[serde(rename = "process")]
7232    Process,
7233    #[serde(rename = "hyperv")]
7234    Hyperv,
7235}
7236
7237impl AsRef<str> for TaskSpecContainerSpecInlineItemIsolationInlineItem {
7238    fn as_ref(&self) -> &str {
7239        match self {
7240            TaskSpecContainerSpecInlineItemIsolationInlineItem::Default => "default",
7241            TaskSpecContainerSpecInlineItemIsolationInlineItem::Process => "process",
7242            TaskSpecContainerSpecInlineItemIsolationInlineItem::Hyperv => "hyperv",
7243        }
7244    }
7245}
7246
7247impl std::fmt::Display for TaskSpecContainerSpecInlineItemIsolationInlineItem {
7248    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7249        write!(f, "{}", self.as_ref())
7250    }
7251}
7252
7253#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7254/// Security options for the container
7255pub struct TaskSpecContainerSpecInlineItemPrivilegesInlineItem {
7256    #[serde(rename = "CredentialSpec")]
7257    #[serde(skip_serializing_if = "Option::is_none")]
7258    /// CredentialSpec for managed service account (Windows only)
7259    pub credential_spec:
7260        Option<TaskSpecContainerSpecInlineItemPrivilegesInlineItemCredentialSpecInlineItem>,
7261    #[serde(rename = "SELinuxContext")]
7262    #[serde(skip_serializing_if = "Option::is_none")]
7263    /// SELinux labels of the container
7264    pub se_linux_context:
7265        Option<TaskSpecContainerSpecInlineItemPrivilegesInlineItemSeLinuxContextInlineItem>,
7266}
7267
7268#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7269/// CredentialSpec for managed service account (Windows only)
7270pub struct TaskSpecContainerSpecInlineItemPrivilegesInlineItemCredentialSpecInlineItem {
7271    #[serde(rename = "Config")]
7272    #[serde(skip_serializing_if = "Option::is_none")]
7273    /// Load credential spec from a Swarm Config with the given ID.
7274    /// The specified config must also be present in the Configs
7275    /// field with the Runtime property set.
7276    ///
7277    /// <p><br /></p>
7278    ///
7279    ///
7280    /// > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
7281    /// > and `CredentialSpec.Config` are mutually exclusive.
7282    pub config: Option<String>,
7283    #[serde(rename = "File")]
7284    #[serde(skip_serializing_if = "Option::is_none")]
7285    /// Load credential spec from this file. The file is read by
7286    /// the daemon, and must be present in the `CredentialSpecs`
7287    /// subdirectory in the docker data directory, which defaults
7288    /// to `C:\ProgramData\Docker\` on Windows.
7289    ///
7290    /// For example, specifying `spec.json` loads
7291    /// `C:\ProgramData\Docker\CredentialSpecs\spec.json`.
7292    ///
7293    /// <p><br /></p>
7294    ///
7295    /// > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
7296    /// > and `CredentialSpec.Config` are mutually exclusive.
7297    pub file: Option<String>,
7298    #[serde(rename = "Registry")]
7299    #[serde(skip_serializing_if = "Option::is_none")]
7300    /// Load credential spec from this value in the Windows
7301    /// registry. The specified registry value must be located in:
7302    ///
7303    /// `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs`
7304    ///
7305    /// <p><br /></p>
7306    ///
7307    ///
7308    /// > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`,
7309    /// > and `CredentialSpec.Config` are mutually exclusive.
7310    pub registry: Option<String>,
7311}
7312
7313#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7314/// SELinux labels of the container
7315pub struct TaskSpecContainerSpecInlineItemPrivilegesInlineItemSeLinuxContextInlineItem {
7316    #[serde(rename = "Disable")]
7317    #[serde(skip_serializing_if = "Option::is_none")]
7318    /// Disable SELinux
7319    pub disable: Option<bool>,
7320    #[serde(rename = "Level")]
7321    #[serde(skip_serializing_if = "Option::is_none")]
7322    /// SELinux level label
7323    pub level: Option<String>,
7324    #[serde(rename = "Role")]
7325    #[serde(skip_serializing_if = "Option::is_none")]
7326    /// SELinux role label
7327    pub role: Option<String>,
7328    #[serde(rename = "Type")]
7329    #[serde(skip_serializing_if = "Option::is_none")]
7330    /// SELinux type label
7331    pub type_: Option<String>,
7332    #[serde(rename = "User")]
7333    #[serde(skip_serializing_if = "Option::is_none")]
7334    /// SELinux user label
7335    pub user: Option<String>,
7336}
7337
7338#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7339pub struct TaskSpecContainerSpecInlineItemSecretsInlineItem {
7340    #[serde(rename = "File")]
7341    #[serde(skip_serializing_if = "Option::is_none")]
7342    /// File represents a specific target that is backed by a file.
7343    pub file: Option<TaskSpecContainerSpecInlineItemSecretsInlineItemFileInlineItem>,
7344    #[serde(rename = "SecretID")]
7345    #[serde(skip_serializing_if = "Option::is_none")]
7346    /// SecretID represents the ID of the specific secret that we're
7347    /// referencing.
7348    pub secret_id: Option<String>,
7349    #[serde(rename = "SecretName")]
7350    #[serde(skip_serializing_if = "Option::is_none")]
7351    /// SecretName is the name of the secret that this references,
7352    /// but this is just provided for lookup/display purposes. The
7353    /// secret in the reference will be identified by its ID.
7354    pub secret_name: Option<String>,
7355}
7356
7357#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7358/// File represents a specific target that is backed by a file.
7359pub struct TaskSpecContainerSpecInlineItemSecretsInlineItemFileInlineItem {
7360    #[serde(rename = "GID")]
7361    #[serde(skip_serializing_if = "Option::is_none")]
7362    /// GID represents the file GID.
7363    pub gid: Option<String>,
7364    #[serde(rename = "Mode")]
7365    #[serde(skip_serializing_if = "Option::is_none")]
7366    /// Mode represents the FileMode of the file.
7367    pub mode: Option<u32>,
7368    #[serde(rename = "Name")]
7369    #[serde(skip_serializing_if = "Option::is_none")]
7370    /// Name represents the final filename in the filesystem.
7371    pub name: Option<String>,
7372    #[serde(rename = "UID")]
7373    #[serde(skip_serializing_if = "Option::is_none")]
7374    /// UID represents the file UID.
7375    pub uid: Option<String>,
7376}
7377
7378#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7379pub struct TaskSpecContainerSpecInlineItemUlimitsInlineItem {
7380    #[serde(rename = "Hard")]
7381    #[serde(skip_serializing_if = "Option::is_none")]
7382    /// Hard limit
7383    pub hard: Option<isize>,
7384    #[serde(rename = "Name")]
7385    #[serde(skip_serializing_if = "Option::is_none")]
7386    /// Name of ulimit
7387    pub name: Option<String>,
7388    #[serde(rename = "Soft")]
7389    #[serde(skip_serializing_if = "Option::is_none")]
7390    /// Soft limit
7391    pub soft: Option<isize>,
7392}
7393
7394#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7395/// Specifies the log driver to use for tasks created from this spec. If
7396/// not present, the default one for the swarm will be used, finally
7397/// falling back to the engine default if not specified.
7398pub struct TaskSpecLogDriverInlineItem {
7399    #[serde(rename = "Name")]
7400    #[serde(skip_serializing_if = "Option::is_none")]
7401    pub name: Option<String>,
7402    #[serde(rename = "Options")]
7403    #[serde(skip_serializing_if = "Option::is_none")]
7404    pub options: Option<HashMap<String, String>>,
7405}
7406
7407#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7408/// Read-only spec type for non-swarm containers attached to swarm overlay
7409/// networks.
7410///
7411/// <p><br /></p>
7412///
7413/// > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
7414/// > mutually exclusive. PluginSpec is only used when the Runtime field
7415/// > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
7416/// > field is set to `attachment`.
7417pub struct TaskSpecNetworkAttachmentSpecInlineItem {
7418    #[serde(rename = "ContainerID")]
7419    #[serde(skip_serializing_if = "Option::is_none")]
7420    /// ID of the container represented by this task
7421    pub container_id: Option<String>,
7422}
7423
7424#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7425pub struct TaskSpecPlacementInlineItem {
7426    #[serde(rename = "Constraints")]
7427    #[serde(skip_serializing_if = "Option::is_none")]
7428    /// An array of constraint expressions to limit the set of nodes where
7429    /// a task can be scheduled. Constraint expressions can either use a
7430    /// _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find
7431    /// nodes that satisfy every expression (AND match). Constraints can
7432    /// match node or Docker Engine labels as follows:
7433    ///
7434    /// node attribute       | matches                        | example
7435    /// ---------------------|--------------------------------|-----------------------------------------------
7436    /// `node.id`            | Node ID                        | `node.id==2ivku8v2gvtg4`
7437    /// `node.hostname`      | Node hostname                  | `node.hostname!=node-2`
7438    /// `node.role`          | Node role (`manager`/`worker`) | `node.role==manager`
7439    /// `node.platform.os`   | Node operating system          | `node.platform.os==windows`
7440    /// `node.platform.arch` | Node architecture              | `node.platform.arch==x86_64`
7441    /// `node.labels`        | User-defined node labels       | `node.labels.security==high`
7442    /// `engine.labels`      | Docker Engine's labels         | `engine.labels.operatingsystem==ubuntu-14.04`
7443    ///
7444    /// `engine.labels` apply to Docker Engine labels like operating system,
7445    /// drivers, etc. Swarm administrators add `node.labels` for operational
7446    /// purposes by using the [`node update endpoint`](#operation/NodeUpdate).
7447    pub constraints: Option<Vec<String>>,
7448    #[serde(rename = "MaxReplicas")]
7449    #[serde(skip_serializing_if = "Option::is_none")]
7450    /// Maximum number of replicas for per node (default value is 0, which
7451    /// is unlimited)
7452    pub max_replicas: Option<i64>,
7453    #[serde(rename = "Platforms")]
7454    #[serde(skip_serializing_if = "Option::is_none")]
7455    /// Platforms stores all the platforms that the service's image can
7456    /// run on. This field is used in the platform filter for scheduling.
7457    /// If empty, then the platform filter is off, meaning there are no
7458    /// scheduling restrictions.
7459    pub platforms: Option<Vec<Platform>>,
7460    #[serde(rename = "Preferences")]
7461    #[serde(skip_serializing_if = "Option::is_none")]
7462    /// Preferences provide a way to make the scheduler aware of factors
7463    /// such as topology. They are provided in order from highest to
7464    /// lowest precedence.
7465    pub preferences: Option<Vec<TaskSpecPlacementInlineItemPreferencesInlineItem>>,
7466}
7467
7468#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7469pub struct TaskSpecPlacementInlineItemPreferencesInlineItem {
7470    #[serde(rename = "Spread")]
7471    #[serde(skip_serializing_if = "Option::is_none")]
7472    pub spread: Option<TaskSpecPlacementInlineItemPreferencesInlineItemSpreadInlineItem>,
7473}
7474
7475#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7476pub struct TaskSpecPlacementInlineItemPreferencesInlineItemSpreadInlineItem {
7477    #[serde(rename = "SpreadDescriptor")]
7478    #[serde(skip_serializing_if = "Option::is_none")]
7479    /// label descriptor, such as `engine.labels.az`.
7480    pub spread_descriptor: Option<String>,
7481}
7482
7483#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7484/// Plugin spec for the service.  *(Experimental release only.)*
7485///
7486/// <p><br /></p>
7487///
7488/// > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are
7489/// > mutually exclusive. PluginSpec is only used when the Runtime field
7490/// > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime
7491/// > field is set to `attachment`.
7492pub struct TaskSpecPluginSpecInlineItem {
7493    #[serde(rename = "Disabled")]
7494    #[serde(skip_serializing_if = "Option::is_none")]
7495    /// Disable the plugin once scheduled.
7496    pub disabled: Option<bool>,
7497    #[serde(rename = "Name")]
7498    #[serde(skip_serializing_if = "Option::is_none")]
7499    /// The name or 'alias' to use for the plugin.
7500    pub name: Option<String>,
7501    #[serde(rename = "PluginPrivilege")]
7502    #[serde(skip_serializing_if = "Option::is_none")]
7503    pub plugin_privilege: Option<Vec<PluginPrivilege>>,
7504    #[serde(rename = "Remote")]
7505    #[serde(skip_serializing_if = "Option::is_none")]
7506    /// The plugin image reference to use.
7507    pub remote: Option<String>,
7508}
7509
7510#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7511/// Resource requirements which apply to each individual container created
7512/// as part of the service.
7513pub struct TaskSpecResourcesInlineItem {
7514    #[serde(rename = "Limits")]
7515    pub limits: Option<Limit>,
7516    #[serde(rename = "Reservations")]
7517    pub reservations: Option<ResourceObject>,
7518}
7519
7520#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7521/// Specification for the restart policy which applies to containers
7522/// created as part of this service.
7523pub struct TaskSpecRestartPolicyInlineItem {
7524    #[serde(rename = "Condition")]
7525    #[serde(skip_serializing_if = "Option::is_none")]
7526    /// Condition for restart.
7527    pub condition: Option<String>,
7528    #[serde(rename = "Delay")]
7529    #[serde(skip_serializing_if = "Option::is_none")]
7530    /// Delay between restart attempts.
7531    pub delay: Option<i64>,
7532    #[serde(rename = "MaxAttempts")]
7533    #[serde(skip_serializing_if = "Option::is_none")]
7534    /// Maximum attempts to restart a given container before giving up
7535    /// (default value is 0, which is ignored).
7536    pub max_attempts: Option<i64>,
7537    #[serde(rename = "Window")]
7538    #[serde(skip_serializing_if = "Option::is_none")]
7539    /// Windows is the time window used to evaluate the restart policy
7540    /// (default value is 0, which is unbounded).
7541    pub window: Option<i64>,
7542}
7543
7544#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7545/// Condition for restart.
7546pub enum TaskSpecRestartPolicyInlineItemConditionInlineItem {
7547    #[serde(rename = "none")]
7548    None,
7549    #[serde(rename = "on-failure")]
7550    OnFailure,
7551    #[serde(rename = "any")]
7552    Any,
7553}
7554
7555impl AsRef<str> for TaskSpecRestartPolicyInlineItemConditionInlineItem {
7556    fn as_ref(&self) -> &str {
7557        match self {
7558            TaskSpecRestartPolicyInlineItemConditionInlineItem::None => "none",
7559            TaskSpecRestartPolicyInlineItemConditionInlineItem::OnFailure => "on-failure",
7560            TaskSpecRestartPolicyInlineItemConditionInlineItem::Any => "any",
7561        }
7562    }
7563}
7564
7565impl std::fmt::Display for TaskSpecRestartPolicyInlineItemConditionInlineItem {
7566    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7567        write!(f, "{}", self.as_ref())
7568    }
7569}
7570
7571#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7572pub enum TaskState {
7573    #[serde(rename = "new")]
7574    New,
7575    #[serde(rename = "allocated")]
7576    Allocated,
7577    #[serde(rename = "pending")]
7578    Pending,
7579    #[serde(rename = "assigned")]
7580    Assigned,
7581    #[serde(rename = "accepted")]
7582    Accepted,
7583    #[serde(rename = "preparing")]
7584    Preparing,
7585    #[serde(rename = "ready")]
7586    Ready,
7587    #[serde(rename = "starting")]
7588    Starting,
7589    #[serde(rename = "running")]
7590    Running,
7591    #[serde(rename = "complete")]
7592    Complete,
7593    #[serde(rename = "shutdown")]
7594    Shutdown,
7595    #[serde(rename = "failed")]
7596    Failed,
7597    #[serde(rename = "rejected")]
7598    Rejected,
7599    #[serde(rename = "remove")]
7600    Remove,
7601    #[serde(rename = "orphaned")]
7602    Orphaned,
7603}
7604
7605impl AsRef<str> for TaskState {
7606    fn as_ref(&self) -> &str {
7607        match self {
7608            TaskState::New => "new",
7609            TaskState::Allocated => "allocated",
7610            TaskState::Pending => "pending",
7611            TaskState::Assigned => "assigned",
7612            TaskState::Accepted => "accepted",
7613            TaskState::Preparing => "preparing",
7614            TaskState::Ready => "ready",
7615            TaskState::Starting => "starting",
7616            TaskState::Running => "running",
7617            TaskState::Complete => "complete",
7618            TaskState::Shutdown => "shutdown",
7619            TaskState::Failed => "failed",
7620            TaskState::Rejected => "rejected",
7621            TaskState::Remove => "remove",
7622            TaskState::Orphaned => "orphaned",
7623        }
7624    }
7625}
7626
7627impl std::fmt::Display for TaskState {
7628    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7629        write!(f, "{}", self.as_ref())
7630    }
7631}
7632
7633#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7634pub struct TaskStatusInlineItem {
7635    #[serde(rename = "ContainerStatus")]
7636    #[serde(skip_serializing_if = "Option::is_none")]
7637    pub container_status: Option<TaskStatusInlineItemContainerStatusInlineItem>,
7638    #[serde(rename = "Err")]
7639    #[serde(skip_serializing_if = "Option::is_none")]
7640    pub err: Option<String>,
7641    #[serde(rename = "Message")]
7642    #[serde(skip_serializing_if = "Option::is_none")]
7643    pub message: Option<String>,
7644    #[serde(rename = "State")]
7645    pub state: Option<String>,
7646    #[serde(rename = "Timestamp")]
7647    #[serde(skip_serializing_if = "Option::is_none")]
7648    pub timestamp: Option<DateTime<Utc>>,
7649}
7650
7651#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7652pub struct TaskStatusInlineItemContainerStatusInlineItem {
7653    #[serde(rename = "ContainerID")]
7654    #[serde(skip_serializing_if = "Option::is_none")]
7655    pub container_id: Option<String>,
7656    #[serde(rename = "ExitCode")]
7657    #[serde(skip_serializing_if = "Option::is_none")]
7658    pub exit_code: Option<isize>,
7659    #[serde(rename = "PID")]
7660    #[serde(skip_serializing_if = "Option::is_none")]
7661    pub pid: Option<isize>,
7662}
7663
7664#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7665pub struct ThrottleDevice {
7666    #[serde(rename = "Path")]
7667    #[serde(skip_serializing_if = "Option::is_none")]
7668    /// Device path
7669    pub path: Option<String>,
7670    #[serde(rename = "Rate")]
7671    #[serde(skip_serializing_if = "Option::is_none")]
7672    /// Rate
7673    pub rate: Option<i64>,
7674}
7675
7676/// A map of topological domains to topological segments. For in depth
7677/// details, see documentation for the Topology object in the CSI
7678/// specification.
7679pub type Topology = HashMap<String, String>;
7680
7681#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7682/// Usage details about the volume. This information is used by the
7683/// `GET /system/df` endpoint, and omitted in other endpoints.
7684pub struct UsageData {
7685    #[serde(rename = "RefCount")]
7686    /// The number of containers referencing this volume. This field
7687    /// is set to `-1` if the reference-count is not available.
7688    pub ref_count: i64,
7689    #[serde(rename = "Size")]
7690    /// Amount of disk space used by the volume (in bytes). This information
7691    /// is only available for volumes created with the `"local"` volume
7692    /// driver. For volumes created with other volume drivers, this field
7693    /// is set to `-1` ("not available")
7694    pub size: i64,
7695}
7696
7697#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7698pub struct Volume {
7699    #[serde(rename = "ClusterVolume")]
7700    pub cluster_volume: Option<ClusterVolume>,
7701    #[serde(rename = "CreatedAt")]
7702    #[serde(skip_serializing_if = "Option::is_none")]
7703    /// Date/Time the volume was created.
7704    pub created_at: Option<DateTime<Utc>>,
7705    #[serde(rename = "Driver")]
7706    /// Name of the volume driver used by the volume.
7707    pub driver: String,
7708    #[serde(rename = "Labels")]
7709    #[serde(default)]
7710    #[serde(deserialize_with = "deserialize_nonoptional_map")]
7711    /// User-defined key/value metadata.
7712    pub labels: HashMap<String, String>,
7713    #[serde(rename = "Mountpoint")]
7714    /// Mount path of the volume on the host.
7715    pub mountpoint: String,
7716    #[serde(rename = "Name")]
7717    /// Name of the volume.
7718    pub name: String,
7719    #[serde(rename = "Options")]
7720    #[serde(default)]
7721    #[serde(deserialize_with = "deserialize_nonoptional_map")]
7722    /// The driver specific options used when creating the volume.
7723    pub options: HashMap<String, String>,
7724    #[serde(rename = "Scope")]
7725    /// The level at which the volume exists. Either `global` for cluster-wide,
7726    /// or `local` for machine level.
7727    pub scope: String,
7728    #[serde(rename = "Status")]
7729    #[serde(skip_serializing_if = "Option::is_none")]
7730    /// Low-level details about the volume, provided by the volume driver.
7731    /// Details are returned as a map with key/value pairs:
7732    /// `{"key":"value","key2":"value2"}`.
7733    ///
7734    /// The `Status` field is optional, and is omitted if the volume driver
7735    /// does not support this feature.
7736    pub status: Option<HashMap<String, Value>>,
7737    #[serde(rename = "UsageData")]
7738    #[serde(skip_serializing_if = "Option::is_none")]
7739    /// Usage details about the volume. This information is used by the
7740    /// `GET /system/df` endpoint, and omitted in other endpoints.
7741    pub usage_data: Option<UsageData>,
7742}
7743
7744#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7745/// Volume configuration
7746pub struct VolumeCreateOptions {
7747    #[serde(rename = "ClusterVolumeSpec")]
7748    pub cluster_volume_spec: Option<ClusterVolumeSpec>,
7749    #[serde(rename = "Driver")]
7750    #[serde(skip_serializing_if = "Option::is_none")]
7751    /// Name of the volume driver to use.
7752    pub driver: Option<String>,
7753    #[serde(rename = "DriverOpts")]
7754    #[serde(skip_serializing_if = "Option::is_none")]
7755    /// A mapping of driver options and values. These options are
7756    /// passed directly to the driver and are driver specific.
7757    pub driver_opts: Option<HashMap<String, String>>,
7758    #[serde(rename = "Labels")]
7759    #[serde(skip_serializing_if = "Option::is_none")]
7760    /// User-defined key/value metadata.
7761    pub labels: Option<HashMap<String, String>>,
7762    #[serde(rename = "Name")]
7763    #[serde(skip_serializing_if = "Option::is_none")]
7764    /// The new volume's name. If not specified, Docker generates a name.
7765    pub name: Option<String>,
7766}
7767
7768#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7769/// Volume list response
7770pub struct VolumeListResponse {
7771    #[serde(rename = "Volumes")]
7772    #[serde(skip_serializing_if = "Option::is_none")]
7773    /// List of volumes
7774    pub volumes: Option<Vec<Volume>>,
7775    #[serde(rename = "Warnings")]
7776    #[serde(skip_serializing_if = "Option::is_none")]
7777    /// Warnings that occurred when fetching the list of volumes.
7778    pub warnings: Option<Vec<String>>,
7779}
7780
7781#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7782/// No error
7783pub struct VolumePrune200Response {
7784    #[serde(rename = "SpaceReclaimed")]
7785    #[serde(skip_serializing_if = "Option::is_none")]
7786    /// Disk space reclaimed in bytes
7787    pub space_reclaimed: Option<i64>,
7788    #[serde(rename = "VolumesDeleted")]
7789    #[serde(skip_serializing_if = "Option::is_none")]
7790    /// Volumes that were deleted
7791    pub volumes_deleted: Option<Vec<String>>,
7792}
7793
7794#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7795/// The level at which the volume exists. Either `global` for cluster-wide,
7796/// or `local` for machine level.
7797pub enum VolumeScopeInlineItem {
7798    #[serde(rename = "local")]
7799    Local,
7800    #[serde(rename = "global")]
7801    Global,
7802}
7803
7804impl AsRef<str> for VolumeScopeInlineItem {
7805    fn as_ref(&self) -> &str {
7806        match self {
7807            VolumeScopeInlineItem::Local => "local",
7808            VolumeScopeInlineItem::Global => "global",
7809        }
7810    }
7811}
7812
7813impl std::fmt::Display for VolumeScopeInlineItem {
7814    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
7815        write!(f, "{}", self.as_ref())
7816    }
7817}
7818
7819#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7820/// Volume configuration
7821pub struct VolumeUpdateBodyParam {
7822    #[serde(rename = "Spec")]
7823    pub spec: Option<ClusterVolumeSpec>,
7824}
7825
7826pub type ConfigUpdateBodyParam = ConfigSpec;
7827
7828/// Configuration for a container that is portable between hosts.
7829///
7830/// When used as `ContainerConfig` field in an image, `ContainerConfig` is an
7831/// optional field containing the configuration of the container that was last
7832/// committed when creating the image.
7833///
7834/// Previous versions of Docker builder used this field to store build cache,
7835/// and it is not in active use anymore.
7836pub type ImageCommitContainerConfigParam = ContainerConfig;
7837
7838pub type NodeUpdateBodyParam = NodeSpec;
7839
7840pub type SecretUpdateBodyParam = SecretSpec;
7841
7842/// User modifiable swarm configuration.
7843pub type SwarmUpdateBodyParam = SwarmSpec;
7844
7845pub type SystemAuthAuthConfigParam = AuthConfig;
7846
7847/// Volume configuration
7848pub type VolumeCreateVolumeConfigParam = VolumeCreateOptions;