diff --git a/src/Docker.DotNet/Models/AccessMode.Generated.cs b/src/Docker.DotNet/Models/AccessMode.Generated.cs new file mode 100644 index 000000000..bf5c6a6ee --- /dev/null +++ b/src/Docker.DotNet/Models/AccessMode.Generated.cs @@ -0,0 +1,20 @@ +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class AccessMode // (volume.AccessMode) + { + [DataMember(Name = "Scope", EmitDefaultValue = false)] + public string Scope { get; set; } + + [DataMember(Name = "Sharing", EmitDefaultValue = false)] + public string Sharing { get; set; } + + [DataMember(Name = "MountVolume", EmitDefaultValue = false)] + public TypeMount MountVolume { get; set; } + + [DataMember(Name = "BlockVolume", EmitDefaultValue = false)] + public TypeBlock BlockVolume { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/AuthConfig.Generated.cs b/src/Docker.DotNet/Models/AuthConfig.Generated.cs index dc9119c27..c8f2f94c2 100644 --- a/src/Docker.DotNet/Models/AuthConfig.Generated.cs +++ b/src/Docker.DotNet/Models/AuthConfig.Generated.cs @@ -3,7 +3,7 @@ namespace Docker.DotNet.Models { [DataContract] - public class AuthConfig // (types.AuthConfig) + public class AuthConfig // (registry.AuthConfig) { [DataMember(Name = "username", EmitDefaultValue = false)] public string Username { get; set; } diff --git a/src/Docker.DotNet/Models/BindOptions.Generated.cs b/src/Docker.DotNet/Models/BindOptions.Generated.cs index 58f46cc7b..16147f569 100644 --- a/src/Docker.DotNet/Models/BindOptions.Generated.cs +++ b/src/Docker.DotNet/Models/BindOptions.Generated.cs @@ -10,5 +10,8 @@ public class BindOptions // (mount.BindOptions) [DataMember(Name = "NonRecursive", EmitDefaultValue = false)] public bool NonRecursive { get; set; } + + [DataMember(Name = "CreateMountpoint", EmitDefaultValue = false)] + public bool CreateMountpoint { get; set; } } } diff --git a/src/Docker.DotNet/Models/CapacityRange.Generated.cs b/src/Docker.DotNet/Models/CapacityRange.Generated.cs new file mode 100644 index 000000000..ee62c1039 --- /dev/null +++ b/src/Docker.DotNet/Models/CapacityRange.Generated.cs @@ -0,0 +1,14 @@ +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class CapacityRange // (volume.CapacityRange) + { + [DataMember(Name = "RequiredBytes", EmitDefaultValue = false)] + public long RequiredBytes { get; set; } + + [DataMember(Name = "LimitBytes", EmitDefaultValue = false)] + public long LimitBytes { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/ClusterOptions.Generated.cs b/src/Docker.DotNet/Models/ClusterOptions.Generated.cs new file mode 100644 index 000000000..f26176aa9 --- /dev/null +++ b/src/Docker.DotNet/Models/ClusterOptions.Generated.cs @@ -0,0 +1,9 @@ +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class ClusterOptions // (mount.ClusterOptions) + { + } +} diff --git a/src/Docker.DotNet/Models/ClusterVolume.Generated.cs b/src/Docker.DotNet/Models/ClusterVolume.Generated.cs new file mode 100644 index 000000000..b4cb66138 --- /dev/null +++ b/src/Docker.DotNet/Models/ClusterVolume.Generated.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class ClusterVolume // (volume.ClusterVolume) + { + public ClusterVolume() + { + } + + public ClusterVolume(Meta Meta) + { + if (Meta != null) + { + this.Version = Meta.Version; + this.CreatedAt = Meta.CreatedAt; + this.UpdatedAt = Meta.UpdatedAt; + } + } + + [DataMember(Name = "ID", EmitDefaultValue = false)] + public string ID { get; set; } + + [DataMember(Name = "Version", EmitDefaultValue = false)] + public Version Version { get; set; } + + [DataMember(Name = "CreatedAt", EmitDefaultValue = false)] + public DateTime CreatedAt { get; set; } + + [DataMember(Name = "UpdatedAt", EmitDefaultValue = false)] + public DateTime UpdatedAt { get; set; } + + [DataMember(Name = "Spec", EmitDefaultValue = false)] + public ClusterVolumeSpec Spec { get; set; } + + [DataMember(Name = "PublishStatus", EmitDefaultValue = false)] + public IList PublishStatus { get; set; } + + [DataMember(Name = "Info", EmitDefaultValue = false)] + public VolumeInfo Info { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/ClusterVolumeSpec.Generated.cs b/src/Docker.DotNet/Models/ClusterVolumeSpec.Generated.cs new file mode 100644 index 000000000..06c000aba --- /dev/null +++ b/src/Docker.DotNet/Models/ClusterVolumeSpec.Generated.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class ClusterVolumeSpec // (volume.ClusterVolumeSpec) + { + [DataMember(Name = "Group", EmitDefaultValue = false)] + public string Group { get; set; } + + [DataMember(Name = "AccessMode", EmitDefaultValue = false)] + public AccessMode AccessMode { get; set; } + + [DataMember(Name = "AccessibilityRequirements", EmitDefaultValue = false)] + public TopologyRequirement AccessibilityRequirements { get; set; } + + [DataMember(Name = "CapacityRange", EmitDefaultValue = false)] + public CapacityRange CapacityRange { get; set; } + + [DataMember(Name = "Secrets", EmitDefaultValue = false)] + public IList Secrets { get; set; } + + [DataMember(Name = "Availability", EmitDefaultValue = false)] + public string Availability { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/ContainerExecCreateParameters.Generated.cs b/src/Docker.DotNet/Models/ContainerExecCreateParameters.Generated.cs index 067f2270d..215b5823a 100644 --- a/src/Docker.DotNet/Models/ContainerExecCreateParameters.Generated.cs +++ b/src/Docker.DotNet/Models/ContainerExecCreateParameters.Generated.cs @@ -15,6 +15,9 @@ public class ContainerExecCreateParameters // (main.ContainerExecCreateParameter [DataMember(Name = "Tty", EmitDefaultValue = false)] public bool Tty { get; set; } + [DataMember(Name = "ConsoleSize", EmitDefaultValue = false)] + public ulong[] ConsoleSize { get; set; } + [DataMember(Name = "AttachStdin", EmitDefaultValue = false)] public bool AttachStdin { get; set; } diff --git a/src/Docker.DotNet/Models/ContainerExecStartParameters.Generated.cs b/src/Docker.DotNet/Models/ContainerExecStartParameters.Generated.cs index e011b6ca1..93f030ac1 100644 --- a/src/Docker.DotNet/Models/ContainerExecStartParameters.Generated.cs +++ b/src/Docker.DotNet/Models/ContainerExecStartParameters.Generated.cs @@ -15,6 +15,9 @@ public class ContainerExecStartParameters // (main.ContainerExecStartParameters) [DataMember(Name = "Tty", EmitDefaultValue = false)] public bool Tty { get; set; } + [DataMember(Name = "ConsoleSize", EmitDefaultValue = false)] + public ulong[] ConsoleSize { get; set; } + [DataMember(Name = "AttachStdin", EmitDefaultValue = false)] public bool AttachStdin { get; set; } diff --git a/src/Docker.DotNet/Models/ContainerFileSystemChangeResponse.Generated.cs b/src/Docker.DotNet/Models/ContainerFileSystemChangeResponse.Generated.cs index bfe10bcb0..c51964822 100644 --- a/src/Docker.DotNet/Models/ContainerFileSystemChangeResponse.Generated.cs +++ b/src/Docker.DotNet/Models/ContainerFileSystemChangeResponse.Generated.cs @@ -3,7 +3,7 @@ namespace Docker.DotNet.Models { [DataContract] - public class ContainerFileSystemChangeResponse // (container.ContainerChangeResponseItem) + public class ContainerFileSystemChangeResponse // (container.FilesystemChange) { [DataMember(Name = "Kind", EmitDefaultValue = false)] public FileSystemChangeKind Kind { get; set; } diff --git a/src/Docker.DotNet/Models/ContainerWaitResponse.Generated.cs b/src/Docker.DotNet/Models/ContainerWaitResponse.Generated.cs index 7413ee221..6f786eec0 100644 --- a/src/Docker.DotNet/Models/ContainerWaitResponse.Generated.cs +++ b/src/Docker.DotNet/Models/ContainerWaitResponse.Generated.cs @@ -6,7 +6,7 @@ namespace Docker.DotNet.Models public class ContainerWaitResponse // (main.ContainerWaitResponse) { [DataMember(Name = "Error", EmitDefaultValue = false)] - public ContainerWaitOKBodyError Error { get; set; } + public WaitExitError Error { get; set; } [DataMember(Name = "StatusCode", EmitDefaultValue = false)] public long StatusCode { get; set; } diff --git a/src/Docker.DotNet/Models/CreateContainerResponse.Generated.cs b/src/Docker.DotNet/Models/CreateContainerResponse.Generated.cs index 20c330631..eef2cd750 100644 --- a/src/Docker.DotNet/Models/CreateContainerResponse.Generated.cs +++ b/src/Docker.DotNet/Models/CreateContainerResponse.Generated.cs @@ -4,7 +4,7 @@ namespace Docker.DotNet.Models { [DataContract] - public class CreateContainerResponse // (container.ContainerCreateCreatedBody) + public class CreateContainerResponse // (container.CreateResponse) { [DataMember(Name = "Id", EmitDefaultValue = false)] public string ID { get; set; } diff --git a/src/Docker.DotNet/Models/HostConfig.Generated.cs b/src/Docker.DotNet/Models/HostConfig.Generated.cs index 3ed4ef991..6b4f1cec3 100644 --- a/src/Docker.DotNet/Models/HostConfig.Generated.cs +++ b/src/Docker.DotNet/Models/HostConfig.Generated.cs @@ -75,6 +75,12 @@ public HostConfig(Resources Resources) [DataMember(Name = "VolumesFrom", EmitDefaultValue = false)] public IList VolumesFrom { get; set; } + [DataMember(Name = "ConsoleSize", EmitDefaultValue = false)] + public ulong[] ConsoleSize { get; set; } + + [DataMember(Name = "Annotations", EmitDefaultValue = false)] + public IDictionary Annotations { get; set; } + [DataMember(Name = "CapAdd", EmitDefaultValue = false)] public IList CapAdd { get; set; } @@ -147,9 +153,6 @@ public HostConfig(Resources Resources) [DataMember(Name = "Runtime", EmitDefaultValue = false)] public string Runtime { get; set; } - [DataMember(Name = "ConsoleSize", EmitDefaultValue = false)] - public ulong[] ConsoleSize { get; set; } - [DataMember(Name = "Isolation", EmitDefaultValue = false)] public string Isolation { get; set; } diff --git a/src/Docker.DotNet/Models/Mount.Generated.cs b/src/Docker.DotNet/Models/Mount.Generated.cs index a547b1a75..659e76bf2 100644 --- a/src/Docker.DotNet/Models/Mount.Generated.cs +++ b/src/Docker.DotNet/Models/Mount.Generated.cs @@ -28,5 +28,8 @@ public class Mount // (mount.Mount) [DataMember(Name = "TmpfsOptions", EmitDefaultValue = false)] public TmpfsOptions TmpfsOptions { get; set; } + + [DataMember(Name = "ClusterOptions", EmitDefaultValue = false)] + public ClusterOptions ClusterOptions { get; set; } } } diff --git a/src/Docker.DotNet/Models/NodeCSIInfo.Generated.cs b/src/Docker.DotNet/Models/NodeCSIInfo.Generated.cs new file mode 100644 index 000000000..bf6e997f8 --- /dev/null +++ b/src/Docker.DotNet/Models/NodeCSIInfo.Generated.cs @@ -0,0 +1,20 @@ +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class NodeCSIInfo // (swarm.NodeCSIInfo) + { + [DataMember(Name = "PluginName", EmitDefaultValue = false)] + public string PluginName { get; set; } + + [DataMember(Name = "NodeID", EmitDefaultValue = false)] + public string NodeID { get; set; } + + [DataMember(Name = "MaxVolumesPerNode", EmitDefaultValue = false)] + public long MaxVolumesPerNode { get; set; } + + [DataMember(Name = "AccessibleTopology", EmitDefaultValue = false)] + public Topology AccessibleTopology { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/NodeDescription.Generated.cs b/src/Docker.DotNet/Models/NodeDescription.Generated.cs index ffb6bb6c6..d699f7ea3 100644 --- a/src/Docker.DotNet/Models/NodeDescription.Generated.cs +++ b/src/Docker.DotNet/Models/NodeDescription.Generated.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using System.Runtime.Serialization; namespace Docker.DotNet.Models @@ -19,5 +20,8 @@ public class NodeDescription // (swarm.NodeDescription) [DataMember(Name = "TLSInfo", EmitDefaultValue = false)] public TLSInfo TLSInfo { get; set; } + + [DataMember(Name = "CSIInfo", EmitDefaultValue = false)] + public IList CSIInfo { get; set; } } } diff --git a/src/Docker.DotNet/Models/PublishStatus.Generated.cs b/src/Docker.DotNet/Models/PublishStatus.Generated.cs new file mode 100644 index 000000000..db35f19b9 --- /dev/null +++ b/src/Docker.DotNet/Models/PublishStatus.Generated.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class PublishStatus // (volume.PublishStatus) + { + [DataMember(Name = "NodeID", EmitDefaultValue = false)] + public string NodeID { get; set; } + + [DataMember(Name = "State", EmitDefaultValue = false)] + public string State { get; set; } + + [DataMember(Name = "PublishContext", EmitDefaultValue = false)] + public IDictionary PublishContext { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/RootFS.Generated.cs b/src/Docker.DotNet/Models/RootFS.Generated.cs index 93ea4b84c..f1c72d7ed 100644 --- a/src/Docker.DotNet/Models/RootFS.Generated.cs +++ b/src/Docker.DotNet/Models/RootFS.Generated.cs @@ -11,8 +11,5 @@ public class RootFS // (types.RootFS) [DataMember(Name = "Layers", EmitDefaultValue = false)] public IList Layers { get; set; } - - [DataMember(Name = "BaseLayer", EmitDefaultValue = false)] - public string BaseLayer { get; set; } } } diff --git a/src/Docker.DotNet/Models/Runtime.Generated.cs b/src/Docker.DotNet/Models/Runtime.Generated.cs index d1bf075f1..0cedce60e 100644 --- a/src/Docker.DotNet/Models/Runtime.Generated.cs +++ b/src/Docker.DotNet/Models/Runtime.Generated.cs @@ -11,5 +11,11 @@ public class Runtime // (types.Runtime) [DataMember(Name = "runtimeArgs", EmitDefaultValue = false)] public IList Args { get; set; } + + [DataMember(Name = "runtimeType", EmitDefaultValue = false)] + public string Type { get; set; } + + [DataMember(Name = "options", EmitDefaultValue = false)] + public IDictionary Options { get; set; } } } diff --git a/src/Docker.DotNet/Models/SystemInfoResponse.Generated.cs b/src/Docker.DotNet/Models/SystemInfoResponse.Generated.cs index 1c450546d..c1f7d0132 100644 --- a/src/Docker.DotNet/Models/SystemInfoResponse.Generated.cs +++ b/src/Docker.DotNet/Models/SystemInfoResponse.Generated.cs @@ -153,12 +153,6 @@ public class SystemInfoResponse // (types.Info) [DataMember(Name = "ServerVersion", EmitDefaultValue = false)] public string ServerVersion { get; set; } - [DataMember(Name = "ClusterStore", EmitDefaultValue = false)] - public string ClusterStore { get; set; } - - [DataMember(Name = "ClusterAdvertise", EmitDefaultValue = false)] - public string ClusterAdvertise { get; set; } - [DataMember(Name = "Runtimes", EmitDefaultValue = false)] public IDictionary Runtimes { get; set; } diff --git a/src/Docker.DotNet/Models/TaskResponse.Generated.cs b/src/Docker.DotNet/Models/TaskResponse.Generated.cs index 7867abf51..be6225db9 100644 --- a/src/Docker.DotNet/Models/TaskResponse.Generated.cs +++ b/src/Docker.DotNet/Models/TaskResponse.Generated.cs @@ -71,5 +71,8 @@ public TaskResponse(Meta Meta, Annotations Annotations) [DataMember(Name = "JobIteration", EmitDefaultValue = false)] public Version JobIteration { get; set; } + + [DataMember(Name = "Volumes", EmitDefaultValue = false)] + public IList Volumes { get; set; } } } diff --git a/src/Docker.DotNet/Models/Topology.Generated.cs b/src/Docker.DotNet/Models/Topology.Generated.cs new file mode 100644 index 000000000..d20628394 --- /dev/null +++ b/src/Docker.DotNet/Models/Topology.Generated.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class Topology // (swarm.Topology) + { + [DataMember(Name = "Segments", EmitDefaultValue = false)] + public IDictionary Segments { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/TopologyRequirement.Generated.cs b/src/Docker.DotNet/Models/TopologyRequirement.Generated.cs new file mode 100644 index 000000000..567885ea7 --- /dev/null +++ b/src/Docker.DotNet/Models/TopologyRequirement.Generated.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class TopologyRequirement // (volume.TopologyRequirement) + { + [DataMember(Name = "Requisite", EmitDefaultValue = false)] + public IList Requisite { get; set; } + + [DataMember(Name = "Preferred", EmitDefaultValue = false)] + public IList Preferred { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/TypeBlock.Generated.cs b/src/Docker.DotNet/Models/TypeBlock.Generated.cs new file mode 100644 index 000000000..393533258 --- /dev/null +++ b/src/Docker.DotNet/Models/TypeBlock.Generated.cs @@ -0,0 +1,9 @@ +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class TypeBlock // (volume.TypeBlock) + { + } +} diff --git a/src/Docker.DotNet/Models/TypeMount.Generated.cs b/src/Docker.DotNet/Models/TypeMount.Generated.cs new file mode 100644 index 000000000..3f2475a81 --- /dev/null +++ b/src/Docker.DotNet/Models/TypeMount.Generated.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class TypeMount // (volume.TypeMount) + { + [DataMember(Name = "FsType", EmitDefaultValue = false)] + public string FsType { get; set; } + + [DataMember(Name = "MountFlags", EmitDefaultValue = false)] + public IList MountFlags { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/VolumeUsageData.Generated.cs b/src/Docker.DotNet/Models/UsageData.Generated.cs similarity index 83% rename from src/Docker.DotNet/Models/VolumeUsageData.Generated.cs rename to src/Docker.DotNet/Models/UsageData.Generated.cs index d9e7c4588..b30fde97b 100644 --- a/src/Docker.DotNet/Models/VolumeUsageData.Generated.cs +++ b/src/Docker.DotNet/Models/UsageData.Generated.cs @@ -3,7 +3,7 @@ namespace Docker.DotNet.Models { [DataContract] - public class VolumeUsageData // (types.VolumeUsageData) + public class UsageData // (volume.UsageData) { [DataMember(Name = "RefCount", EmitDefaultValue = false)] public long RefCount { get; set; } diff --git a/src/Docker.DotNet/Models/VolumeAttachment.Generated.cs b/src/Docker.DotNet/Models/VolumeAttachment.Generated.cs new file mode 100644 index 000000000..38f469d09 --- /dev/null +++ b/src/Docker.DotNet/Models/VolumeAttachment.Generated.cs @@ -0,0 +1,17 @@ +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class VolumeAttachment // (swarm.VolumeAttachment) + { + [DataMember(Name = "ID", EmitDefaultValue = false)] + public string ID { get; set; } + + [DataMember(Name = "Source", EmitDefaultValue = false)] + public string Source { get; set; } + + [DataMember(Name = "Target", EmitDefaultValue = false)] + public string Target { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/VolumeInfo.Generated.cs b/src/Docker.DotNet/Models/VolumeInfo.Generated.cs new file mode 100644 index 000000000..2c2377dfd --- /dev/null +++ b/src/Docker.DotNet/Models/VolumeInfo.Generated.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class VolumeInfo // (volume.Info) + { + [DataMember(Name = "CapacityBytes", EmitDefaultValue = false)] + public long CapacityBytes { get; set; } + + [DataMember(Name = "VolumeContext", EmitDefaultValue = false)] + public IDictionary VolumeContext { get; set; } + + [DataMember(Name = "VolumeID", EmitDefaultValue = false)] + public string VolumeID { get; set; } + + [DataMember(Name = "AccessibleTopology", EmitDefaultValue = false)] + public IList AccessibleTopology { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/VolumeResponse.Generated.cs b/src/Docker.DotNet/Models/VolumeResponse.Generated.cs index 8137d631b..12b929978 100644 --- a/src/Docker.DotNet/Models/VolumeResponse.Generated.cs +++ b/src/Docker.DotNet/Models/VolumeResponse.Generated.cs @@ -6,6 +6,9 @@ namespace Docker.DotNet.Models [DataContract] public class VolumeResponse // (main.VolumeResponse) { + [DataMember(Name = "ClusterVolume", EmitDefaultValue = false)] + public ClusterVolume ClusterVolume { get; set; } + [DataMember(Name = "CreatedAt", EmitDefaultValue = false)] public string CreatedAt { get; set; } @@ -31,6 +34,6 @@ public class VolumeResponse // (main.VolumeResponse) public IDictionary Status { get; set; } [DataMember(Name = "UsageData", EmitDefaultValue = false)] - public VolumeUsageData UsageData { get; set; } + public UsageData UsageData { get; set; } } } diff --git a/src/Docker.DotNet/Models/VolumeSecret.Generated.cs b/src/Docker.DotNet/Models/VolumeSecret.Generated.cs new file mode 100644 index 000000000..8df3da991 --- /dev/null +++ b/src/Docker.DotNet/Models/VolumeSecret.Generated.cs @@ -0,0 +1,14 @@ +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class VolumeSecret // (volume.Secret) + { + [DataMember(Name = "Key", EmitDefaultValue = false)] + public string Key { get; set; } + + [DataMember(Name = "Secret", EmitDefaultValue = false)] + public string Secret { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/VolumeTopology.Generated.cs b/src/Docker.DotNet/Models/VolumeTopology.Generated.cs new file mode 100644 index 000000000..b87b05215 --- /dev/null +++ b/src/Docker.DotNet/Models/VolumeTopology.Generated.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace Docker.DotNet.Models +{ + [DataContract] + public class VolumeTopology // (volume.Topology) + { + [DataMember(Name = "Segments", EmitDefaultValue = false)] + public IDictionary Segments { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/ContainerWaitOKBodyError.Generated.cs b/src/Docker.DotNet/Models/WaitExitError.Generated.cs similarity index 72% rename from src/Docker.DotNet/Models/ContainerWaitOKBodyError.Generated.cs rename to src/Docker.DotNet/Models/WaitExitError.Generated.cs index 1252a031d..7d019089a 100644 --- a/src/Docker.DotNet/Models/ContainerWaitOKBodyError.Generated.cs +++ b/src/Docker.DotNet/Models/WaitExitError.Generated.cs @@ -3,7 +3,7 @@ namespace Docker.DotNet.Models { [DataContract] - public class ContainerWaitOKBodyError // (container.ContainerWaitOKBodyError) + public class WaitExitError // (container.WaitExitError) { [DataMember(Name = "Message", EmitDefaultValue = false)] public string Message { get; set; } diff --git a/tools/specgen/csharptype.go b/tools/specgen/csharptype.go index 68cb013c0..8e879ef44 100644 --- a/tools/specgen/csharptype.go +++ b/tools/specgen/csharptype.go @@ -260,7 +260,7 @@ func writeConstructors(w io.Writer, typeName string, constructors []CSConstructo plen := len(c.Parameters) for pi, p := range c.Parameters { - fmt.Fprintf(w, p.toString()) + fmt.Fprint(w, p.toString()) if pi != plen-1 { fmt.Fprint(w, ", ") diff --git a/tools/specgen/go.mod b/tools/specgen/go.mod index 72f163d75..1f9d66036 100644 --- a/tools/specgen/go.mod +++ b/tools/specgen/go.mod @@ -4,7 +4,7 @@ go 1.15 require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/docker/docker v20.10.17+incompatible + github.com/docker/docker v24.0.2+incompatible github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 github.com/gogo/protobuf v1.3.1 // indirect diff --git a/tools/specgen/go.sum b/tools/specgen/go.sum index bb5fdef41..a988be1cb 100644 --- a/tools/specgen/go.sum +++ b/tools/specgen/go.sum @@ -12,6 +12,8 @@ github.com/docker/docker v20.10.2+incompatible h1:vFgEHPqWBTp4pTjdLwjAA4bSo3gvIG github.com/docker/docker v20.10.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.2+incompatible h1:eATx+oLz9WdNVkQrr0qjQ8HvRJ4bOOxfzEo8R+dA3cg= +github.com/docker/docker v24.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= diff --git a/tools/specgen/modeldefs.go b/tools/specgen/modeldefs.go index 47f1d8ac2..20c2c54be 100644 --- a/tools/specgen/modeldefs.go +++ b/tools/specgen/modeldefs.go @@ -4,7 +4,9 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/network" + "github.com/docker/docker/api/types/registry" "github.com/docker/docker/api/types/swarm" + "github.com/docker/docker/api/types/volume" ) // Args map @@ -12,31 +14,31 @@ type Args map[string]map[string]bool // ImageBuildParameters for POST /build type ImageBuildParameters struct { - Tags []string `rest:"query,t"` - SuppressOutput bool `rest:"query,q"` - RemoteContext string `rest:"query,remote"` - NoCache bool `rest:"query"` - Remove bool `rest:"query,rm"` - ForceRemove bool `rest:"query,forcerm"` - Pull string `rest:"query"` - CPUSetCPUs string `rest:"query"` - CPUShares int64 `rest:"query"` - CPUQuota int64 `rest:"query"` - CPUPeriod int64 `rest:"query"` - Memory int64 `rest:"query"` - MemorySwap int64 `rest:"query,memswap"` - NetworkMode string `rest:"query"` - ShmSize int64 `rest:"query"` - Dockerfile string `rest:"query"` - BuildArgs map[string]string `rest:"query"` - Labels map[string]string `rest:"query"` - Squash bool `rest:"query"` - CacheFrom []string `rest:"query"` - ExtraHosts []string `rest:"query"` - Target string `rest:"query"` - Platform string `rest:"query"` - Outputs string `rest:"query"` - AuthConfigs map[string]types.AuthConfig `rest:"headers,X-Registry-Config"` + Tags []string `rest:"query,t"` + SuppressOutput bool `rest:"query,q"` + RemoteContext string `rest:"query,remote"` + NoCache bool `rest:"query"` + Remove bool `rest:"query,rm"` + ForceRemove bool `rest:"query,forcerm"` + Pull string `rest:"query"` + CPUSetCPUs string `rest:"query"` + CPUShares int64 `rest:"query"` + CPUQuota int64 `rest:"query"` + CPUPeriod int64 `rest:"query"` + Memory int64 `rest:"query"` + MemorySwap int64 `rest:"query,memswap"` + NetworkMode string `rest:"query"` + ShmSize int64 `rest:"query"` + Dockerfile string `rest:"query"` + BuildArgs map[string]string `rest:"query"` + Labels map[string]string `rest:"query"` + Squash bool `rest:"query"` + CacheFrom []string `rest:"query"` + ExtraHosts []string `rest:"query"` + Target string `rest:"query"` + Platform string `rest:"query"` + Outputs string `rest:"query"` + AuthConfigs map[string]registry.AuthConfig `rest:"headers,X-Registry-Config"` } // CommitContainerChangesParameters for POST /commit @@ -165,7 +167,7 @@ type ContainerUpdateResponse struct { } // ContainerWaitResponse for POST /containers/(id)/wait -type ContainerWaitResponse container.ContainerWaitOKBody +type ContainerWaitResponse container.WaitResponse // ContainerEventsParameters for GET /events type ContainerEventsParameters struct { @@ -190,14 +192,14 @@ type ContainerExecStartParameters types.ExecConfig // ImagesCreateParameters for POST /images/create type ImagesCreateParameters struct { - FromImage string `rest:"query,fromImage"` - FromSrc string `rest:"query,fromSrc"` - Repo string `rest:"query"` - Tag string `rest:"query"` - Message string `rest:"query"` - Changes []string `rest:"query"` - Platform string `rest:"query"` - RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"` + FromImage string `rest:"query,fromImage"` + FromSrc string `rest:"query,fromSrc"` + Repo string `rest:"query"` + Tag string `rest:"query"` + Message string `rest:"query"` + Changes []string `rest:"query"` + Platform string `rest:"query"` + RegistryAuth registry.AuthConfig `rest:"headers,X-Registry-Auth"` } // ImagesListParameters for GET /images/json @@ -219,10 +221,10 @@ type ImagesPruneParameters struct { // ImagesSearchParameters for GET /images/search type ImagesSearchParameters struct { - Term string `rest:"query"` - Limit int `rest:"query"` - Filters Args `rest:"query"` - RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"` + Term string `rest:"query"` + Limit int `rest:"query"` + Filters Args `rest:"query"` + RegistryAuth registry.AuthConfig `rest:"headers,X-Registry-Auth"` } // ImageDeleteParameters for DELETE /images/(id) @@ -238,9 +240,9 @@ type ImageInspectParameters struct { // ImagePushParameters for POST /images/(id)/push type ImagePushParameters struct { - ImageID string `rest:"query,fromImage"` - Tag string `rest:"query"` - RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"` + ImageID string `rest:"query,fromImage"` + Tag string `rest:"query"` + RegistryAuth registry.AuthConfig `rest:"headers,X-Registry-Auth"` } // ImageTagParameters for POST /images/(id)/tag @@ -267,15 +269,15 @@ type PluginListParameters struct { // PluginGetPrivilegeParameters for GET /plugins/privileges type PluginGetPrivilegeParameters struct { - Remote string `rest:"query,remote,required"` - RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"` + Remote string `rest:"query,remote,required"` + RegistryAuth registry.AuthConfig `rest:"headers,X-Registry-Auth"` } // PluginInstallParameters for POST /plugins/pull type PluginInstallParameters struct { Remote string `rest:"query,remote,required"` Name string `rest:"query"` - RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"` + RegistryAuth registry.AuthConfig `rest:"headers,X-Registry-Auth"` Privileges types.PluginPrivileges `rest:"body,,required"` } @@ -297,7 +299,7 @@ type PluginDisableParameters struct { // PluginUpgradeParameters for POST /plugins/(name)/upgrade type PluginUpgradeParameters struct { Remote string `rest:"query,remote,required"` - RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"` + RegistryAuth registry.AuthConfig `rest:"headers,X-Registry-Auth"` Privileges types.PluginPrivileges `rest:"body,,required"` } @@ -330,7 +332,7 @@ type VolumesPruneParameters struct { } // VolumeResponse for GET /volumes -type VolumeResponse types.Volume +type VolumeResponse volume.Volume // VolumesListResponse for GET /volumes type VolumesListResponse struct { @@ -384,8 +386,8 @@ type MessageResponse struct { // ServiceCreateParameters for POST /services/create type ServiceCreateParameters struct { - Service swarm.ServiceSpec `rest:"body,service,required"` - RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"` + Service swarm.ServiceSpec `rest:"body,service,required"` + RegistryAuth registry.AuthConfig `rest:"headers,X-Registry-Auth"` } // ServiceListParameters for GET /services @@ -396,11 +398,11 @@ type ServiceListParameters struct { // ServiceUpdateParameters for POST /services/{id}/update type ServiceUpdateParameters struct { - Service swarm.ServiceSpec `rest:"body,service,required"` - Version int64 `rest:"query,version,required"` - RegistryAuthFrom string `rest:"query"` - Rollback string `rest:"query"` - RegistryAuth types.AuthConfig `rest:"headers,X-Registry-Auth"` + Service swarm.ServiceSpec `rest:"body,service,required"` + Version int64 `rest:"query,version,required"` + RegistryAuthFrom string `rest:"query"` + Rollback string `rest:"query"` + RegistryAuth registry.AuthConfig `rest:"headers,X-Registry-Auth"` } // ServiceLogsParameters for GET /services/(id)/logs diff --git a/tools/specgen/resttag.go b/tools/specgen/resttag.go index f9a529861..56a33745b 100644 --- a/tools/specgen/resttag.go +++ b/tools/specgen/resttag.go @@ -9,8 +9,6 @@ const ( header = "header" body = "body" query = "query" - - requiredTag = "required" ) // RestTag is a type that represents the valid values of a 'rest' struct tag. @@ -25,7 +23,7 @@ type RestTag struct { // This can take the form of rest:in,name,required func RestTagFromString(tag string) (RestTag, error) { if tag == "" { - return RestTag{}, errors.New("Nil or empty tag string") + return RestTag{}, errors.New("nil or empty tag string") } entries := strings.Split(tag, ",") diff --git a/tools/specgen/specgen.go b/tools/specgen/specgen.go index f582790ce..79e61f3ef 100644 --- a/tools/specgen/specgen.go +++ b/tools/specgen/specgen.go @@ -18,6 +18,7 @@ import ( "github.com/docker/docker/api/types/registry" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/swarm/runtime" + "github.com/docker/docker/api/types/volume" "github.com/docker/docker/pkg/jsonmessage" ) @@ -37,7 +38,7 @@ var typesToDisambiguate = map[string]*CSModelType{ }, }, }, - typeToKey(reflect.TypeOf(container.ContainerCreateCreatedBody{})): {Name: "CreateContainerResponse"}, + typeToKey(reflect.TypeOf(container.CreateResponse{})): {Name: "CreateContainerResponse"}, typeToKey(reflect.TypeOf(container.HealthConfig{})): { Properties: []CSProperty{ CSProperty{ @@ -70,6 +71,9 @@ var typesToDisambiguate = map[string]*CSModelType{ }, }, }, + typeToKey(reflect.TypeOf(volume.Info{})): {Name: "VolumeInfo"}, + typeToKey(reflect.TypeOf(volume.Topology{})): {Name: "VolumeTopology"}, + typeToKey(reflect.TypeOf(volume.Secret{})): {Name: "VolumeSecret"}, typeToKey(reflect.TypeOf(network.Task{})): {Name: "NetworkTask"}, typeToKey(reflect.TypeOf(registry.AuthenticateOKBody{})): {Name: "AuthResponse"}, typeToKey(reflect.TypeOf(registry.SearchResult{})): {Name: "ImageSearchResponse"}, @@ -77,13 +81,13 @@ var typesToDisambiguate = map[string]*CSModelType{ typeToKey(reflect.TypeOf(swarm.ConfigSpec{})): {Name: "SwarmConfigSpec"}, typeToKey(reflect.TypeOf(swarm.Driver{})): {Name: "SwarmDriver"}, typeToKey(reflect.TypeOf(swarm.InitRequest{})): {Name: "SwarmInitParameters"}, - typeToKey(reflect.TypeOf(swarm.JoinRequest{})): {Name: "SwarmJoinParameters"}, typeToKey(reflect.TypeOf(swarm.IPAMConfig{})): {Name: "SwarmIPAMConfig"}, + typeToKey(reflect.TypeOf(swarm.JoinRequest{})): {Name: "SwarmJoinParameters"}, typeToKey(reflect.TypeOf(swarm.Limit{})): {Name: "SwarmLimit"}, typeToKey(reflect.TypeOf(swarm.Node{})): {Name: "NodeListResponse"}, typeToKey(reflect.TypeOf(swarm.NodeSpec{})): {Name: "NodeUpdateParameters"}, - typeToKey(reflect.TypeOf(swarm.RestartPolicy{})): {Name: "SwarmRestartPolicy"}, typeToKey(reflect.TypeOf(swarm.Resources{})): {Name: "SwarmResources"}, + typeToKey(reflect.TypeOf(swarm.RestartPolicy{})): {Name: "SwarmRestartPolicy"}, typeToKey(reflect.TypeOf(swarm.Service{})): {Name: "SwarmService"}, typeToKey(reflect.TypeOf(swarm.Swarm{})): {Name: "SwarmInspectResponse"}, typeToKey(reflect.TypeOf(swarm.Task{})): { @@ -105,7 +109,7 @@ var typesToDisambiguate = map[string]*CSModelType{ CSProperty{Name: "Created", Type: CSType{"System", "DateTime", false}}, }, }, - typeToKey(reflect.TypeOf(container.ContainerChangeResponseItem{})): { + typeToKey(reflect.TypeOf(container.FilesystemChange{})): { Name: "ContainerFileSystemChangeResponse", Properties: []CSProperty{ CSProperty{Name: "Kind", Type: CSType{"", "FileSystemChangeKind", false}}, @@ -164,7 +168,7 @@ var typesToDisambiguate = map[string]*CSModelType{ var dockerTypesToReflect = []reflect.Type{ // POST /auth - reflect.TypeOf(types.AuthConfig{}), + reflect.TypeOf(registry.AuthConfig{}), reflect.TypeOf(registry.AuthenticateOKBody{}), // POST /build @@ -177,7 +181,7 @@ var dockerTypesToReflect = []reflect.Type{ // POST /containers/create reflect.TypeOf(CreateContainerParameters{}), - reflect.TypeOf(container.ContainerCreateCreatedBody{}), + reflect.TypeOf(container.CreateResponse{}), // GET /containers/json reflect.TypeOf(ContainersListParameters{}), @@ -200,7 +204,7 @@ var dockerTypesToReflect = []reflect.Type{ // POST /containers/(id)/attach/ws // GET /containers/(id)/changes - reflect.TypeOf(container.ContainerChangeResponseItem{}), + reflect.TypeOf(container.FilesystemChange{}), // OBSOLETE - POST /containers/(id)/copy