Skip to content

Commit

Permalink
feat: Update to Docker v24.0.2 (dotnet#639)
Browse files Browse the repository at this point in the history
* feat: Update to Docker v24.0.2

* chore: Generate nested swarm types with prefix

* chore: Generate classes (types)
  • Loading branch information
HofmeisterAn authored Jun 6, 2023
1 parent 4da1e18 commit 3441fb9
Show file tree
Hide file tree
Showing 38 changed files with 380 additions and 84 deletions.
20 changes: 20 additions & 0 deletions src/Docker.DotNet/Models/AccessMode.Generated.cs
Original file line number Diff line number Diff line change
@@ -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; }
}
}
2 changes: 1 addition & 1 deletion src/Docker.DotNet/Models/AuthConfig.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
3 changes: 3 additions & 0 deletions src/Docker.DotNet/Models/BindOptions.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
}
14 changes: 14 additions & 0 deletions src/Docker.DotNet/Models/CapacityRange.Generated.cs
Original file line number Diff line number Diff line change
@@ -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; }
}
}
9 changes: 9 additions & 0 deletions src/Docker.DotNet/Models/ClusterOptions.Generated.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System.Runtime.Serialization;

namespace Docker.DotNet.Models
{
[DataContract]
public class ClusterOptions // (mount.ClusterOptions)
{
}
}
45 changes: 45 additions & 0 deletions src/Docker.DotNet/Models/ClusterVolume.Generated.cs
Original file line number Diff line number Diff line change
@@ -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> PublishStatus { get; set; }

[DataMember(Name = "Info", EmitDefaultValue = false)]
public VolumeInfo Info { get; set; }
}
}
27 changes: 27 additions & 0 deletions src/Docker.DotNet/Models/ClusterVolumeSpec.Generated.cs
Original file line number Diff line number Diff line change
@@ -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<VolumeSecret> Secrets { get; set; }

[DataMember(Name = "Availability", EmitDefaultValue = false)]
public string Availability { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
9 changes: 6 additions & 3 deletions src/Docker.DotNet/Models/HostConfig.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ public HostConfig(Resources Resources)
[DataMember(Name = "VolumesFrom", EmitDefaultValue = false)]
public IList<string> VolumesFrom { get; set; }

[DataMember(Name = "ConsoleSize", EmitDefaultValue = false)]
public ulong[] ConsoleSize { get; set; }

[DataMember(Name = "Annotations", EmitDefaultValue = false)]
public IDictionary<string, string> Annotations { get; set; }

[DataMember(Name = "CapAdd", EmitDefaultValue = false)]
public IList<string> CapAdd { get; set; }

Expand Down Expand Up @@ -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; }

Expand Down
3 changes: 3 additions & 0 deletions src/Docker.DotNet/Models/Mount.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
}
20 changes: 20 additions & 0 deletions src/Docker.DotNet/Models/NodeCSIInfo.Generated.cs
Original file line number Diff line number Diff line change
@@ -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; }
}
}
4 changes: 4 additions & 0 deletions src/Docker.DotNet/Models/NodeDescription.Generated.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace Docker.DotNet.Models
Expand All @@ -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<NodeCSIInfo> CSIInfo { get; set; }
}
}
18 changes: 18 additions & 0 deletions src/Docker.DotNet/Models/PublishStatus.Generated.cs
Original file line number Diff line number Diff line change
@@ -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<string, string> PublishContext { get; set; }
}
}
3 changes: 0 additions & 3 deletions src/Docker.DotNet/Models/RootFS.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,5 @@ public class RootFS // (types.RootFS)

[DataMember(Name = "Layers", EmitDefaultValue = false)]
public IList<string> Layers { get; set; }

[DataMember(Name = "BaseLayer", EmitDefaultValue = false)]
public string BaseLayer { get; set; }
}
}
6 changes: 6 additions & 0 deletions src/Docker.DotNet/Models/Runtime.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@ public class Runtime // (types.Runtime)

[DataMember(Name = "runtimeArgs", EmitDefaultValue = false)]
public IList<string> Args { get; set; }

[DataMember(Name = "runtimeType", EmitDefaultValue = false)]
public string Type { get; set; }

[DataMember(Name = "options", EmitDefaultValue = false)]
public IDictionary<string, object> Options { get; set; }
}
}
6 changes: 0 additions & 6 deletions src/Docker.DotNet/Models/SystemInfoResponse.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, Runtime> Runtimes { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions src/Docker.DotNet/Models/TaskResponse.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<VolumeAttachment> Volumes { get; set; }
}
}
12 changes: 12 additions & 0 deletions src/Docker.DotNet/Models/Topology.Generated.cs
Original file line number Diff line number Diff line change
@@ -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<string, string> Segments { get; set; }
}
}
15 changes: 15 additions & 0 deletions src/Docker.DotNet/Models/TopologyRequirement.Generated.cs
Original file line number Diff line number Diff line change
@@ -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<VolumeTopology> Requisite { get; set; }

[DataMember(Name = "Preferred", EmitDefaultValue = false)]
public IList<VolumeTopology> Preferred { get; set; }
}
}
9 changes: 9 additions & 0 deletions src/Docker.DotNet/Models/TypeBlock.Generated.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System.Runtime.Serialization;

namespace Docker.DotNet.Models
{
[DataContract]
public class TypeBlock // (volume.TypeBlock)
{
}
}
15 changes: 15 additions & 0 deletions src/Docker.DotNet/Models/TypeMount.Generated.cs
Original file line number Diff line number Diff line change
@@ -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<string> MountFlags { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
17 changes: 17 additions & 0 deletions src/Docker.DotNet/Models/VolumeAttachment.Generated.cs
Original file line number Diff line number Diff line change
@@ -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; }
}
}
Loading

0 comments on commit 3441fb9

Please sign in to comment.