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