diff --git a/README.md b/README.md index a965258e..276271ed 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,7 @@ To obtain this stream you can use: ```csharp Stream stream = await client.System.MonitorEventsAsync( new ContainerEventsParameters(), - new Progress(), + new Progress(), CancellationToken.None); ``` diff --git a/src/Docker.DotNet/Base64Converter.cs b/src/Docker.DotNet/Base64Converter.cs new file mode 100644 index 00000000..66e3e302 --- /dev/null +++ b/src/Docker.DotNet/Base64Converter.cs @@ -0,0 +1,16 @@ +namespace Docker.DotNet; + +internal class Base64Converter : JsonConverter> +{ + public override IList Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var base64String = reader.GetString(); + return base64String == null ? null : Convert.FromBase64String(base64String); + } + + public override void Write(Utf8JsonWriter writer, IList value, JsonSerializerOptions options) + { + var base64String = Convert.ToBase64String(value.ToArray()); + writer.WriteStringValue(base64String); + } +} \ No newline at end of file diff --git a/src/Docker.DotNet/Endpoints/ExecOperations.cs b/src/Docker.DotNet/Endpoints/ExecOperations.cs index db961bc3..a3725839 100644 --- a/src/Docker.DotNet/Endpoints/ExecOperations.cs +++ b/src/Docker.DotNet/Endpoints/ExecOperations.cs @@ -58,6 +58,6 @@ public async Task StartContainerExecAsync(string id, Containe var stream = await _client.MakeRequestForHijackedStreamAsync([NoSuchContainerHandler], HttpMethod.Post, $"exec/{id}/start", null, data, null, cancellationToken) .ConfigureAwait(false); - return new MultiplexedStream(stream, !parameters.Tty); + return new MultiplexedStream(stream, !parameters.TTY); } } \ No newline at end of file diff --git a/src/Docker.DotNet/Endpoints/IPluginOperations.cs b/src/Docker.DotNet/Endpoints/IPluginOperations.cs index 7dc58b0d..ad2ba744 100644 --- a/src/Docker.DotNet/Endpoints/IPluginOperations.cs +++ b/src/Docker.DotNet/Endpoints/IPluginOperations.cs @@ -28,7 +28,7 @@ public interface IPluginOperations /// 200 - No error. /// 500 - Server error. /// - Task> GetPluginPrivilegesAsync(PluginGetPrivilegeParameters parameters, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetPrivilegesAsync(PluginGetPrivilegeParameters parameters, CancellationToken cancellationToken = default(CancellationToken)); /// /// Install a plugin. diff --git a/src/Docker.DotNet/Endpoints/ISecretsOperations.cs b/src/Docker.DotNet/Endpoints/ISecretsOperations.cs index 56d6cf68..7dcb8bec 100644 --- a/src/Docker.DotNet/Endpoints/ISecretsOperations.cs +++ b/src/Docker.DotNet/Endpoints/ISecretsOperations.cs @@ -20,7 +20,7 @@ public interface ISecretsOperations /// 409 - Name conflicts with an existing object. /// 500 - Server error. /// - Task CreateAsync(SecretSpec body, CancellationToken cancellationToken = default(CancellationToken)); + Task CreateAsync(SwarmSecretSpec body, CancellationToken cancellationToken = default(CancellationToken)); /// /// Inspect a secret diff --git a/src/Docker.DotNet/Endpoints/PluginOperations.cs b/src/Docker.DotNet/Endpoints/PluginOperations.cs index ea5f2f3a..269af926 100644 --- a/src/Docker.DotNet/Endpoints/PluginOperations.cs +++ b/src/Docker.DotNet/Endpoints/PluginOperations.cs @@ -24,7 +24,7 @@ internal PluginOperations(DockerClient client) return await _client.MakeRequestAsync(_client.NoErrorHandlers, HttpMethod.Get, "plugins", queryParameters, cancellationToken).ConfigureAwait(false); } - public async Task> GetPluginPrivilegesAsync(PluginGetPrivilegeParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetPrivilegesAsync(PluginGetPrivilegeParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) { if (parameters == null) { diff --git a/src/Docker.DotNet/Endpoints/SecretsOperations.cs b/src/Docker.DotNet/Endpoints/SecretsOperations.cs index 22cbd9db..f9862bcc 100644 --- a/src/Docker.DotNet/Endpoints/SecretsOperations.cs +++ b/src/Docker.DotNet/Endpoints/SecretsOperations.cs @@ -14,14 +14,14 @@ async Task> ISecretsOperations.ListAsync(CancellationToken cancell return await _client.MakeRequestAsync>(_client.NoErrorHandlers, HttpMethod.Get, "secrets", cancellationToken).ConfigureAwait(false); } - async Task ISecretsOperations.CreateAsync(SecretSpec body, CancellationToken cancellationToken) + async Task ISecretsOperations.CreateAsync(SwarmSecretSpec body, CancellationToken cancellationToken) { if (body == null) { throw new ArgumentNullException(nameof(body)); } - var data = new JsonRequestContent(body, DockerClient.JsonSerializer); + var data = new JsonRequestContent(body, DockerClient.JsonSerializer); return await _client.MakeRequestAsync(_client.NoErrorHandlers, HttpMethod.Post, "secrets/create", null, data, cancellationToken).ConfigureAwait(false); } diff --git a/src/Docker.DotNet/JsonBase64Converter.cs b/src/Docker.DotNet/JsonBase64Converter.cs deleted file mode 100644 index ccd65e54..00000000 --- a/src/Docker.DotNet/JsonBase64Converter.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace Docker.DotNet; - -internal class JsonBase64Converter : JsonConverter> -{ - public override IList Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - return reader.GetBytesFromBase64(); - } - - public override void Write(Utf8JsonWriter writer, IList value, JsonSerializerOptions options) - { - var bytes = GetBytes(value); - writer.WriteBase64StringValue(bytes); - } - - private static ReadOnlySpan GetBytes(IList value) - { -#if !NETSTANDARD - if (value is List list) - { - return CollectionsMarshal.AsSpan(list); - } -#endif - if (value is byte[] array) - { - return array; - } - - return value.ToArray(); - } -} \ No newline at end of file diff --git a/src/Docker.DotNet/JsonSerializer.cs b/src/Docker.DotNet/JsonSerializer.cs index f79083f4..bb5f768b 100644 --- a/src/Docker.DotNet/JsonSerializer.cs +++ b/src/Docker.DotNet/JsonSerializer.cs @@ -14,7 +14,6 @@ private JsonSerializer() _options.Converters.Add(new JsonEnumMemberConverter()); _options.Converters.Add(new JsonDateTimeConverter()); _options.Converters.Add(new JsonNullableDateTimeConverter()); - _options.Converters.Add(new JsonBase64Converter()); } public static JsonSerializer Instance { get; } diff --git a/src/Docker.DotNet/Models/Address.Generated.cs b/src/Docker.DotNet/Models/Address.Generated.cs deleted file mode 100644 index 1740cd68..00000000 --- a/src/Docker.DotNet/Models/Address.Generated.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Docker.DotNet.Models -{ - public class Address // (network.Address) - { - [JsonPropertyName("Addr")] - public string Addr { get; set; } - - [JsonPropertyName("PrefixLen")] - public long PrefixLen { get; set; } - } -} diff --git a/src/Docker.DotNet/Models/AuthConfig.Generated.cs b/src/Docker.DotNet/Models/AuthConfig.Generated.cs index 5715c611..a39ca39f 100644 --- a/src/Docker.DotNet/Models/AuthConfig.Generated.cs +++ b/src/Docker.DotNet/Models/AuthConfig.Generated.cs @@ -11,9 +11,6 @@ public class AuthConfig // (registry.AuthConfig) [JsonPropertyName("auth")] public string Auth { get; set; } - [JsonPropertyName("email")] - public string Email { get; set; } - [JsonPropertyName("serveraddress")] public string ServerAddress { get; set; } diff --git a/src/Docker.DotNet/Models/AuthResponse.Generated.cs b/src/Docker.DotNet/Models/AuthResponse.Generated.cs index 55de44a9..75050ce1 100644 --- a/src/Docker.DotNet/Models/AuthResponse.Generated.cs +++ b/src/Docker.DotNet/Models/AuthResponse.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class AuthResponse // (registry.AuthenticateOKBody) + public class AuthResponse // (registry.AuthResponse) { [JsonPropertyName("IdentityToken")] public string IdentityToken { get; set; } diff --git a/src/Docker.DotNet/Models/Commit.Generated.cs b/src/Docker.DotNet/Models/Commit.Generated.cs index c5a1b96c..a7c7390d 100644 --- a/src/Docker.DotNet/Models/Commit.Generated.cs +++ b/src/Docker.DotNet/Models/Commit.Generated.cs @@ -4,8 +4,5 @@ public class Commit // (system.Commit) { [JsonPropertyName("ID")] public string ID { get; set; } - - [JsonPropertyName("Expected")] - public string Expected { get; set; } } } diff --git a/src/Docker.DotNet/Models/CommitContainerChangesParameters.Generated.cs b/src/Docker.DotNet/Models/CommitContainerChangesParameters.Generated.cs index 58426a8d..aecbb3ec 100644 --- a/src/Docker.DotNet/Models/CommitContainerChangesParameters.Generated.cs +++ b/src/Docker.DotNet/Models/CommitContainerChangesParameters.Generated.cs @@ -29,7 +29,6 @@ public CommitContainerChangesParameters(ContainerConfig Config) this.WorkingDir = Config.WorkingDir; this.Entrypoint = Config.Entrypoint; this.NetworkDisabled = Config.NetworkDisabled; - this.MacAddress = Config.MacAddress; this.OnBuild = Config.OnBuild; this.Labels = Config.Labels; this.StopSignal = Config.StopSignal; @@ -116,9 +115,6 @@ public CommitContainerChangesParameters(ContainerConfig Config) [JsonPropertyName("NetworkDisabled")] public bool NetworkDisabled { get; set; } - [JsonPropertyName("MacAddress")] - public string MacAddress { get; set; } - [JsonPropertyName("OnBuild")] public IList OnBuild { get; set; } diff --git a/src/Docker.DotNet/Models/ComponentVersion.Generated.cs b/src/Docker.DotNet/Models/ComponentVersion.Generated.cs index c016f2d9..8e53dad0 100644 --- a/src/Docker.DotNet/Models/ComponentVersion.Generated.cs +++ b/src/Docker.DotNet/Models/ComponentVersion.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class ComponentVersion // (types.ComponentVersion) + public class ComponentVersion // (system.ComponentVersion) { [JsonPropertyName("Name")] public string Name { get; set; } diff --git a/src/Docker.DotNet/Models/ConsoleSize.Generated.cs b/src/Docker.DotNet/Models/ConsoleSize.Generated.cs new file mode 100644 index 00000000..bfffea9c --- /dev/null +++ b/src/Docker.DotNet/Models/ConsoleSize.Generated.cs @@ -0,0 +1,11 @@ +namespace Docker.DotNet.Models +{ + public class ConsoleSize // (client.ConsoleSize) + { + [JsonPropertyName("Height")] + public ulong Height { get; set; } + + [JsonPropertyName("Width")] + public ulong Width { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/ContainerConfig.Generated.cs b/src/Docker.DotNet/Models/ContainerConfig.Generated.cs index c9ff8967..a90fe10e 100644 --- a/src/Docker.DotNet/Models/ContainerConfig.Generated.cs +++ b/src/Docker.DotNet/Models/ContainerConfig.Generated.cs @@ -59,9 +59,6 @@ public class ContainerConfig // (container.Config) [JsonPropertyName("NetworkDisabled")] public bool NetworkDisabled { get; set; } - [JsonPropertyName("MacAddress")] - public string MacAddress { get; set; } - [JsonPropertyName("OnBuild")] public IList OnBuild { get; set; } diff --git a/src/Docker.DotNet/Models/ContainerExecCreateParameters.Generated.cs b/src/Docker.DotNet/Models/ContainerExecCreateParameters.Generated.cs index 8ec67baf..87626973 100644 --- a/src/Docker.DotNet/Models/ContainerExecCreateParameters.Generated.cs +++ b/src/Docker.DotNet/Models/ContainerExecCreateParameters.Generated.cs @@ -8,11 +8,11 @@ public class ContainerExecCreateParameters // (main.ContainerExecCreateParameter [JsonPropertyName("Privileged")] public bool Privileged { get; set; } - [JsonPropertyName("Tty")] - public bool Tty { get; set; } + [JsonPropertyName("TTY")] + public bool TTY { get; set; } [JsonPropertyName("ConsoleSize")] - public ulong[] ConsoleSize { get; set; } + public ConsoleSize ConsoleSize { get; set; } [JsonPropertyName("AttachStdin")] public bool AttachStdin { get; set; } @@ -34,8 +34,5 @@ public class ContainerExecCreateParameters // (main.ContainerExecCreateParameter [JsonPropertyName("Cmd")] public IList Cmd { get; set; } - - [JsonPropertyName("Detach")] - public bool Detach { get; set; } } } diff --git a/src/Docker.DotNet/Models/ContainerExecInspectResponse.Generated.cs b/src/Docker.DotNet/Models/ContainerExecInspectResponse.Generated.cs index 99ba792a..5767dd12 100644 --- a/src/Docker.DotNet/Models/ContainerExecInspectResponse.Generated.cs +++ b/src/Docker.DotNet/Models/ContainerExecInspectResponse.Generated.cs @@ -1,18 +1,36 @@ namespace Docker.DotNet.Models { - public class ContainerExecInspectResponse // (container.ExecInspect) + public class ContainerExecInspectResponse // (container.ExecInspectResponse) { [JsonPropertyName("ID")] - public string ExecID { get; set; } - - [JsonPropertyName("ContainerID")] - public string ContainerID { get; set; } + public string ID { get; set; } [JsonPropertyName("Running")] public bool Running { get; set; } [JsonPropertyName("ExitCode")] - public long ExitCode { get; set; } + public long? ExitCode { get; set; } + + [JsonPropertyName("ProcessConfig")] + public ExecProcessConfig ProcessConfig { get; set; } + + [JsonPropertyName("OpenStdin")] + public bool OpenStdin { get; set; } + + [JsonPropertyName("OpenStderr")] + public bool OpenStderr { get; set; } + + [JsonPropertyName("OpenStdout")] + public bool OpenStdout { get; set; } + + [JsonPropertyName("CanRemove")] + public bool CanRemove { get; set; } + + [JsonPropertyName("ContainerID")] + public string ContainerID { get; set; } + + [JsonPropertyName("DetachKeys")] + public string DetachKeys { get; set; } [JsonPropertyName("Pid")] public long Pid { get; set; } diff --git a/src/Docker.DotNet/Models/ContainerExecStartParameters.Generated.cs b/src/Docker.DotNet/Models/ContainerExecStartParameters.Generated.cs index 2b6b79b8..fb123489 100644 --- a/src/Docker.DotNet/Models/ContainerExecStartParameters.Generated.cs +++ b/src/Docker.DotNet/Models/ContainerExecStartParameters.Generated.cs @@ -5,10 +5,10 @@ public class ContainerExecStartParameters // (main.ContainerExecStartParameters) [JsonPropertyName("Detach")] public bool Detach { get; set; } - [JsonPropertyName("Tty")] - public bool Tty { get; set; } + [JsonPropertyName("TTY")] + public bool TTY { get; set; } [JsonPropertyName("ConsoleSize")] - public ulong[] ConsoleSize { get; set; } + public ConsoleSize ConsoleSize { get; set; } } } diff --git a/src/Docker.DotNet/Models/ContainerInspectResponse.Generated.cs b/src/Docker.DotNet/Models/ContainerInspectResponse.Generated.cs index d936e8e8..ca72ecd7 100644 --- a/src/Docker.DotNet/Models/ContainerInspectResponse.Generated.cs +++ b/src/Docker.DotNet/Models/ContainerInspectResponse.Generated.cs @@ -2,39 +2,6 @@ namespace Docker.DotNet.Models { public class ContainerInspectResponse // (container.InspectResponse) { - public ContainerInspectResponse() - { - } - - public ContainerInspectResponse(ContainerJSONBase ContainerJSONBase) - { - if (ContainerJSONBase != null) - { - this.ID = ContainerJSONBase.ID; - this.Created = ContainerJSONBase.Created; - this.Path = ContainerJSONBase.Path; - this.Args = ContainerJSONBase.Args; - this.State = ContainerJSONBase.State; - this.Image = ContainerJSONBase.Image; - this.ResolvConfPath = ContainerJSONBase.ResolvConfPath; - this.HostnamePath = ContainerJSONBase.HostnamePath; - this.HostsPath = ContainerJSONBase.HostsPath; - this.LogPath = ContainerJSONBase.LogPath; - this.Name = ContainerJSONBase.Name; - this.RestartCount = ContainerJSONBase.RestartCount; - this.Driver = ContainerJSONBase.Driver; - this.Platform = ContainerJSONBase.Platform; - this.MountLabel = ContainerJSONBase.MountLabel; - this.ProcessLabel = ContainerJSONBase.ProcessLabel; - this.AppArmorProfile = ContainerJSONBase.AppArmorProfile; - this.ExecIDs = ContainerJSONBase.ExecIDs; - this.HostConfig = ContainerJSONBase.HostConfig; - this.GraphDriver = ContainerJSONBase.GraphDriver; - this.SizeRw = ContainerJSONBase.SizeRw; - this.SizeRootFs = ContainerJSONBase.SizeRootFs; - } - } - [JsonPropertyName("Id")] public string ID { get; set; } @@ -95,6 +62,9 @@ public ContainerInspectResponse(ContainerJSONBase ContainerJSONBase) [JsonPropertyName("GraphDriver")] public DriverData GraphDriver { get; set; } + [JsonPropertyName("Storage")] + public Storage Storage { get; set; } + [JsonPropertyName("SizeRw")] public long? SizeRw { get; set; } diff --git a/src/Docker.DotNet/Models/ContainerJSONBase.Generated.cs b/src/Docker.DotNet/Models/ContainerJSONBase.Generated.cs deleted file mode 100644 index 5d7f0d4f..00000000 --- a/src/Docker.DotNet/Models/ContainerJSONBase.Generated.cs +++ /dev/null @@ -1,71 +0,0 @@ -namespace Docker.DotNet.Models -{ - public class ContainerJSONBase // (container.ContainerJSONBase) - { - [JsonPropertyName("Id")] - public string ID { get; set; } - - [JsonPropertyName("Created")] - public DateTime Created { get; set; } - - [JsonPropertyName("Path")] - public string Path { get; set; } - - [JsonPropertyName("Args")] - public IList Args { get; set; } - - [JsonPropertyName("State")] - public State State { get; set; } - - [JsonPropertyName("Image")] - public string Image { get; set; } - - [JsonPropertyName("ResolvConfPath")] - public string ResolvConfPath { get; set; } - - [JsonPropertyName("HostnamePath")] - public string HostnamePath { get; set; } - - [JsonPropertyName("HostsPath")] - public string HostsPath { get; set; } - - [JsonPropertyName("LogPath")] - public string LogPath { get; set; } - - [JsonPropertyName("Name")] - public string Name { get; set; } - - [JsonPropertyName("RestartCount")] - public long RestartCount { get; set; } - - [JsonPropertyName("Driver")] - public string Driver { get; set; } - - [JsonPropertyName("Platform")] - public string Platform { get; set; } - - [JsonPropertyName("MountLabel")] - public string MountLabel { get; set; } - - [JsonPropertyName("ProcessLabel")] - public string ProcessLabel { get; set; } - - [JsonPropertyName("AppArmorProfile")] - public string AppArmorProfile { get; set; } - - [JsonPropertyName("ExecIDs")] - public IList ExecIDs { get; set; } - - [JsonPropertyName("HostConfig")] - public HostConfig HostConfig { get; set; } - - [JsonPropertyName("GraphDriver")] - public DriverData GraphDriver { get; set; } - - [JsonPropertyName("SizeRw")] - public long? SizeRw { get; set; } - - [JsonPropertyName("SizeRootFs")] - public long? SizeRootFs { get; set; } - } -} diff --git a/src/Docker.DotNet/Models/ContainerListResponse.Generated.cs b/src/Docker.DotNet/Models/ContainerListResponse.Generated.cs index 1403f75f..0b273e85 100644 --- a/src/Docker.DotNet/Models/ContainerListResponse.Generated.cs +++ b/src/Docker.DotNet/Models/ContainerListResponse.Generated.cs @@ -24,7 +24,7 @@ public class ContainerListResponse // (container.Summary) public DateTime Created { get; set; } [JsonPropertyName("Ports")] - public IList Ports { get; set; } + public IList Ports { get; set; } [JsonPropertyName("SizeRw")] public long SizeRw { get; set; } @@ -44,6 +44,9 @@ public class ContainerListResponse // (container.Summary) [JsonPropertyName("HostConfig")] public SummaryHostConfig HostConfig { get; set; } + [JsonPropertyName("Health")] + public HealthSummary Health { get; set; } + [JsonPropertyName("NetworkSettings")] public NetworkSettingsSummary NetworkSettings { get; set; } diff --git a/src/Docker.DotNet/Models/ContainerStatsResponse.Generated.cs b/src/Docker.DotNet/Models/ContainerStatsResponse.Generated.cs index cce31d80..1965d296 100644 --- a/src/Docker.DotNet/Models/ContainerStatsResponse.Generated.cs +++ b/src/Docker.DotNet/Models/ContainerStatsResponse.Generated.cs @@ -2,17 +2,26 @@ namespace Docker.DotNet.Models { public class ContainerStatsResponse // (container.StatsResponse) { + [JsonPropertyName("id")] + public string ID { get; set; } + [JsonPropertyName("name")] public string Name { get; set; } - [JsonPropertyName("id")] - public string ID { get; set; } + [JsonPropertyName("os_type")] + public string OSType { get; set; } [JsonPropertyName("read")] public DateTime Read { get; set; } - [JsonPropertyName("preread")] - public DateTime PreRead { get; set; } + [JsonPropertyName("cpu_stats")] + public CPUStats CPUStats { get; set; } + + [JsonPropertyName("memory_stats")] + public MemoryStats MemoryStats { get; set; } + + [JsonPropertyName("networks")] + public IDictionary Networks { get; set; } [JsonPropertyName("pids_stats")] public PidsStats PidsStats { get; set; } @@ -26,16 +35,10 @@ public class ContainerStatsResponse // (container.StatsResponse) [JsonPropertyName("storage_stats")] public StorageStats StorageStats { get; set; } - [JsonPropertyName("cpu_stats")] - public CPUStats CPUStats { get; set; } + [JsonPropertyName("preread")] + public DateTime PreRead { get; set; } [JsonPropertyName("precpu_stats")] public CPUStats PreCPUStats { get; set; } - - [JsonPropertyName("memory_stats")] - public MemoryStats MemoryStats { get; set; } - - [JsonPropertyName("networks")] - public IDictionary Networks { get; set; } } } diff --git a/src/Docker.DotNet/Models/ContainerUpdateParameters.Generated.cs b/src/Docker.DotNet/Models/ContainerUpdateParameters.Generated.cs index 8f8d6cc2..82f1f5fe 100644 --- a/src/Docker.DotNet/Models/ContainerUpdateParameters.Generated.cs +++ b/src/Docker.DotNet/Models/ContainerUpdateParameters.Generated.cs @@ -29,8 +29,6 @@ public ContainerUpdateParameters(UpdateConfig UpdateConfig) this.Devices = UpdateConfig.Devices; this.DeviceCgroupRules = UpdateConfig.DeviceCgroupRules; this.DeviceRequests = UpdateConfig.DeviceRequests; - this.KernelMemory = UpdateConfig.KernelMemory; - this.KernelMemoryTCP = UpdateConfig.KernelMemoryTCP; this.MemoryReservation = UpdateConfig.MemoryReservation; this.MemorySwap = UpdateConfig.MemorySwap; this.MemorySwappiness = UpdateConfig.MemorySwappiness; @@ -102,12 +100,6 @@ public ContainerUpdateParameters(UpdateConfig UpdateConfig) [JsonPropertyName("DeviceRequests")] public IList DeviceRequests { get; set; } - [JsonPropertyName("KernelMemory")] - public long KernelMemory { get; set; } - - [JsonPropertyName("KernelMemoryTCP")] - public long KernelMemoryTCP { get; set; } - [JsonPropertyName("MemoryReservation")] public long MemoryReservation { get; set; } diff --git a/src/Docker.DotNet/Models/CreateContainerParameters.Generated.cs b/src/Docker.DotNet/Models/CreateContainerParameters.Generated.cs index 18677cef..a0b9d19a 100644 --- a/src/Docker.DotNet/Models/CreateContainerParameters.Generated.cs +++ b/src/Docker.DotNet/Models/CreateContainerParameters.Generated.cs @@ -29,7 +29,6 @@ public CreateContainerParameters(ContainerConfig Config) this.WorkingDir = Config.WorkingDir; this.Entrypoint = Config.Entrypoint; this.NetworkDisabled = Config.NetworkDisabled; - this.MacAddress = Config.MacAddress; this.OnBuild = Config.OnBuild; this.Labels = Config.Labels; this.StopSignal = Config.StopSignal; @@ -101,9 +100,6 @@ public CreateContainerParameters(ContainerConfig Config) [JsonPropertyName("NetworkDisabled")] public bool NetworkDisabled { get; set; } - [JsonPropertyName("MacAddress")] - public string MacAddress { get; set; } - [JsonPropertyName("OnBuild")] public IList OnBuild { get; set; } diff --git a/src/Docker.DotNet/Models/CreateOptions.Generated.cs b/src/Docker.DotNet/Models/CreateOptions.Generated.cs deleted file mode 100644 index f3396009..00000000 --- a/src/Docker.DotNet/Models/CreateOptions.Generated.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace Docker.DotNet.Models -{ - public class CreateOptions // (network.CreateOptions) - { - [JsonPropertyName("Driver")] - public string Driver { get; set; } - - [JsonPropertyName("Scope")] - public string Scope { get; set; } - - [JsonPropertyName("EnableIPv4")] - public bool? EnableIPv4 { get; set; } - - [JsonPropertyName("EnableIPv6")] - public bool? EnableIPv6 { get; set; } - - [JsonPropertyName("IPAM")] - public IPAM IPAM { get; set; } - - [JsonPropertyName("Internal")] - public bool Internal { get; set; } - - [JsonPropertyName("Attachable")] - public bool Attachable { get; set; } - - [JsonPropertyName("Ingress")] - public bool Ingress { get; set; } - - [JsonPropertyName("ConfigOnly")] - public bool ConfigOnly { get; set; } - - [JsonPropertyName("ConfigFrom")] - public ConfigReference ConfigFrom { get; set; } - - [JsonPropertyName("Options")] - public IDictionary Options { get; set; } - - [JsonPropertyName("Labels")] - public IDictionary Labels { get; set; } - } -} diff --git a/src/Docker.DotNet/Models/DefaultNetworkSettings.Generated.cs b/src/Docker.DotNet/Models/DefaultNetworkSettings.Generated.cs deleted file mode 100644 index c242fdfe..00000000 --- a/src/Docker.DotNet/Models/DefaultNetworkSettings.Generated.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace Docker.DotNet.Models -{ - public class DefaultNetworkSettings // (container.DefaultNetworkSettings) - { - [JsonPropertyName("EndpointID")] - public string EndpointID { get; set; } - - [JsonPropertyName("Gateway")] - public string Gateway { get; set; } - - [JsonPropertyName("GlobalIPv6Address")] - public string GlobalIPv6Address { get; set; } - - [JsonPropertyName("GlobalIPv6PrefixLen")] - public long GlobalIPv6PrefixLen { get; set; } - - [JsonPropertyName("IPAddress")] - public string IPAddress { get; set; } - - [JsonPropertyName("IPPrefixLen")] - public long IPPrefixLen { get; set; } - - [JsonPropertyName("IPv6Gateway")] - public string IPv6Gateway { get; set; } - - [JsonPropertyName("MacAddress")] - public string MacAddress { get; set; } - } -} diff --git a/src/Docker.DotNet/Models/Descriptor.Generated.cs b/src/Docker.DotNet/Models/Descriptor.Generated.cs index b095a16e..b4c2aed1 100644 --- a/src/Docker.DotNet/Models/Descriptor.Generated.cs +++ b/src/Docker.DotNet/Models/Descriptor.Generated.cs @@ -17,7 +17,14 @@ public class Descriptor // (v1.Descriptor) [JsonPropertyName("annotations")] public IDictionary Annotations { get; set; } + [JsonPropertyName("data")] + [JsonConverter(typeof(Base64Converter))] + public IList Data { get; set; } + [JsonPropertyName("platform")] public Platform Platform { get; set; } + + [JsonPropertyName("artifactType")] + public string ArtifactType { get; set; } } } diff --git a/src/Docker.DotNet/Models/DockerOCIImageConfig.Generated.cs b/src/Docker.DotNet/Models/DockerOCIImageConfig.Generated.cs index 8575c90f..d24f7ca8 100644 --- a/src/Docker.DotNet/Models/DockerOCIImageConfig.Generated.cs +++ b/src/Docker.DotNet/Models/DockerOCIImageConfig.Generated.cs @@ -19,6 +19,7 @@ public DockerOCIImageConfig(ImageConfig ImageConfig, DockerOCIImageConfigExt Doc this.WorkingDir = ImageConfig.WorkingDir; this.Labels = ImageConfig.Labels; this.StopSignal = ImageConfig.StopSignal; + this.ArgsEscaped = ImageConfig.ArgsEscaped; } if (DockerOCIImageConfigExt != null) @@ -56,6 +57,9 @@ public DockerOCIImageConfig(ImageConfig ImageConfig, DockerOCIImageConfigExt Doc [JsonPropertyName("StopSignal")] public string StopSignal { get; set; } + [JsonPropertyName("ArgsEscaped")] + public bool ArgsEscaped { get; set; } + [JsonPropertyName("Healthcheck")] public HealthcheckConfig Healthcheck { get; set; } diff --git a/src/Docker.DotNet/Models/EndpointSettings.Generated.cs b/src/Docker.DotNet/Models/EndpointSettings.Generated.cs index 1166450d..de8f1532 100644 --- a/src/Docker.DotNet/Models/EndpointSettings.Generated.cs +++ b/src/Docker.DotNet/Models/EndpointSettings.Generated.cs @@ -11,9 +11,6 @@ public class EndpointSettings // (network.EndpointSettings) [JsonPropertyName("Aliases")] public IList Aliases { get; set; } - [JsonPropertyName("MacAddress")] - public string MacAddress { get; set; } - [JsonPropertyName("DriverOpts")] public IDictionary DriverOpts { get; set; } @@ -32,6 +29,9 @@ public class EndpointSettings // (network.EndpointSettings) [JsonPropertyName("IPAddress")] public string IPAddress { get; set; } + [JsonPropertyName("MacAddress")] + public string MacAddress { get; set; } + [JsonPropertyName("IPPrefixLen")] public long IPPrefixLen { get; set; } diff --git a/src/Docker.DotNet/Models/ExecProcessConfig.Generated.cs b/src/Docker.DotNet/Models/ExecProcessConfig.Generated.cs new file mode 100644 index 00000000..4dc93257 --- /dev/null +++ b/src/Docker.DotNet/Models/ExecProcessConfig.Generated.cs @@ -0,0 +1,20 @@ +namespace Docker.DotNet.Models +{ + public class ExecProcessConfig // (container.ExecProcessConfig) + { + [JsonPropertyName("tty")] + public bool Tty { get; set; } + + [JsonPropertyName("entrypoint")] + public string Entrypoint { get; set; } + + [JsonPropertyName("arguments")] + public IList Arguments { get; set; } + + [JsonPropertyName("privileged")] + public bool? Privileged { get; set; } + + [JsonPropertyName("user")] + public string User { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/FileSystemChangeKind.cs b/src/Docker.DotNet/Models/FileSystemChangeKind.cs index bc4f83c4..84cf089b 100644 --- a/src/Docker.DotNet/Models/FileSystemChangeKind.cs +++ b/src/Docker.DotNet/Models/FileSystemChangeKind.cs @@ -2,7 +2,12 @@ namespace Docker.DotNet.Models; public enum FileSystemChangeKind { + [EnumMember(Value = "modify")] Modify, + + [EnumMember(Value = "add")] Add, + + [EnumMember(Value = "delete")] Delete } \ No newline at end of file diff --git a/src/Docker.DotNet/Models/HealthSummary.Generated.cs b/src/Docker.DotNet/Models/HealthSummary.Generated.cs new file mode 100644 index 00000000..f7ed0cd1 --- /dev/null +++ b/src/Docker.DotNet/Models/HealthSummary.Generated.cs @@ -0,0 +1,11 @@ +namespace Docker.DotNet.Models +{ + public class HealthSummary // (container.HealthSummary) + { + [JsonPropertyName("Status")] + public string Status { get; set; } + + [JsonPropertyName("FailingStreak")] + public long FailingStreak { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/HostConfig.Generated.cs b/src/Docker.DotNet/Models/HostConfig.Generated.cs index 84d3ff09..a294e70c 100644 --- a/src/Docker.DotNet/Models/HostConfig.Generated.cs +++ b/src/Docker.DotNet/Models/HostConfig.Generated.cs @@ -29,8 +29,6 @@ public HostConfig(Resources Resources) this.Devices = Resources.Devices; this.DeviceCgroupRules = Resources.DeviceCgroupRules; this.DeviceRequests = Resources.DeviceRequests; - this.KernelMemory = Resources.KernelMemory; - this.KernelMemoryTCP = Resources.KernelMemoryTCP; this.MemoryReservation = Resources.MemoryReservation; this.MemorySwap = Resources.MemorySwap; this.MemorySwappiness = Resources.MemorySwappiness; @@ -209,12 +207,6 @@ public HostConfig(Resources Resources) [JsonPropertyName("DeviceRequests")] public IList DeviceRequests { get; set; } - [JsonPropertyName("KernelMemory")] - public long KernelMemory { get; set; } - - [JsonPropertyName("KernelMemoryTCP")] - public long KernelMemoryTCP { get; set; } - [JsonPropertyName("MemoryReservation")] public long MemoryReservation { get; set; } diff --git a/src/Docker.DotNet/Models/IPAMStatus.Generated.cs b/src/Docker.DotNet/Models/IPAMStatus.Generated.cs new file mode 100644 index 00000000..8b0412bf --- /dev/null +++ b/src/Docker.DotNet/Models/IPAMStatus.Generated.cs @@ -0,0 +1,8 @@ +namespace Docker.DotNet.Models +{ + public class IPAMStatus // (network.IPAMStatus) + { + [JsonPropertyName("Subnets")] + public IDictionary Subnets { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/ImageBuildResponse.Generated.cs b/src/Docker.DotNet/Models/ImageBuildResponse.Generated.cs deleted file mode 100644 index 86f97027..00000000 --- a/src/Docker.DotNet/Models/ImageBuildResponse.Generated.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Docker.DotNet.Models -{ - public class ImageBuildResponse // (build.ImageBuildResponse) - { - [JsonPropertyName("Body")] - public object Body { get; set; } - - [JsonPropertyName("OSType")] - public string OSType { get; set; } - } -} diff --git a/src/Docker.DotNet/Models/ImageBuildResult.Generated.cs b/src/Docker.DotNet/Models/ImageBuildResult.Generated.cs new file mode 100644 index 00000000..ed6c102e --- /dev/null +++ b/src/Docker.DotNet/Models/ImageBuildResult.Generated.cs @@ -0,0 +1,8 @@ +namespace Docker.DotNet.Models +{ + public class ImageBuildResult // (client.ImageBuildResult) + { + [JsonPropertyName("Body")] + public object Body { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/ImageConfig.Generated.cs b/src/Docker.DotNet/Models/ImageConfig.Generated.cs index 2c0e146b..fc53888f 100644 --- a/src/Docker.DotNet/Models/ImageConfig.Generated.cs +++ b/src/Docker.DotNet/Models/ImageConfig.Generated.cs @@ -28,5 +28,8 @@ public class ImageConfig // (v1.ImageConfig) [JsonPropertyName("StopSignal")] public string StopSignal { get; set; } + + [JsonPropertyName("ArgsEscaped")] + public bool ArgsEscaped { get; set; } } } diff --git a/src/Docker.DotNet/Models/ImageInspectResponse.Generated.cs b/src/Docker.DotNet/Models/ImageInspectResponse.Generated.cs index 836c35e7..55c5c9f5 100644 --- a/src/Docker.DotNet/Models/ImageInspectResponse.Generated.cs +++ b/src/Docker.DotNet/Models/ImageInspectResponse.Generated.cs @@ -11,24 +11,12 @@ public class ImageInspectResponse // (image.InspectResponse) [JsonPropertyName("RepoDigests")] public IList RepoDigests { get; set; } - [JsonPropertyName("Parent")] - public string Parent { get; set; } - [JsonPropertyName("Comment")] public string Comment { get; set; } [JsonPropertyName("Created")] public DateTime Created { get; set; } - [JsonPropertyName("Container")] - public string Container { get; set; } - - [JsonPropertyName("ContainerConfig")] - public ContainerConfig ContainerConfig { get; set; } - - [JsonPropertyName("DockerVersion")] - public string DockerVersion { get; set; } - [JsonPropertyName("Author")] public string Author { get; set; } @@ -50,9 +38,6 @@ public class ImageInspectResponse // (image.InspectResponse) [JsonPropertyName("Size")] public long Size { get; set; } - [JsonPropertyName("VirtualSize")] - public long VirtualSize { get; set; } - [JsonPropertyName("GraphDriver")] public DriverData GraphDriver { get; set; } diff --git a/src/Docker.DotNet/Models/ImagesListResponse.Generated.cs b/src/Docker.DotNet/Models/ImagesListResponse.Generated.cs index 024b9da9..6d46bacf 100644 --- a/src/Docker.DotNet/Models/ImagesListResponse.Generated.cs +++ b/src/Docker.DotNet/Models/ImagesListResponse.Generated.cs @@ -34,8 +34,5 @@ public class ImagesListResponse // (image.Summary) [JsonPropertyName("Size")] public long Size { get; set; } - - [JsonPropertyName("VirtualSize")] - public long VirtualSize { get; set; } } } diff --git a/src/Docker.DotNet/Models/ImagesLoadResponse.Generated.cs b/src/Docker.DotNet/Models/ImagesLoadResponse.Generated.cs index b60b208e..9f00346a 100644 --- a/src/Docker.DotNet/Models/ImagesLoadResponse.Generated.cs +++ b/src/Docker.DotNet/Models/ImagesLoadResponse.Generated.cs @@ -1,11 +1,6 @@ namespace Docker.DotNet.Models { - public class ImagesLoadResponse // (image.LoadResponse) + public class ImagesLoadResponse // (main.ImageLoadResult) { - [JsonPropertyName("Body")] - public object Body { get; set; } - - [JsonPropertyName("JSON")] - public bool JSON { get; set; } } } diff --git a/src/Docker.DotNet/Models/JSONError.Generated.cs b/src/Docker.DotNet/Models/JSONError.Generated.cs index d10b90fd..1f0d4ef4 100644 --- a/src/Docker.DotNet/Models/JSONError.Generated.cs +++ b/src/Docker.DotNet/Models/JSONError.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class JSONError // (jsonmessage.JSONError) + public class JSONError // (jsonstream.Error) { [JsonPropertyName("code")] public long Code { get; set; } diff --git a/src/Docker.DotNet/Models/JSONMessage.Generated.cs b/src/Docker.DotNet/Models/JSONMessage.Generated.cs index ae8b7fb9..24e4f12f 100644 --- a/src/Docker.DotNet/Models/JSONMessage.Generated.cs +++ b/src/Docker.DotNet/Models/JSONMessage.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class JSONMessage // (jsonmessage.JSONMessage) + public class JSONMessage // (jsonstream.Message) { [JsonPropertyName("stream")] public string Stream { get; set; } @@ -11,27 +11,12 @@ public class JSONMessage // (jsonmessage.JSONMessage) [JsonPropertyName("progressDetail")] public JSONProgress Progress { get; set; } - [JsonPropertyName("progress")] - public string ProgressMessage { get; set; } - [JsonPropertyName("id")] public string ID { get; set; } - [JsonPropertyName("from")] - public string From { get; set; } - - [JsonPropertyName("time")] - public DateTime Time { get; set; } - - [JsonPropertyName("timeNano")] - public long TimeNano { get; set; } - [JsonPropertyName("errorDetail")] public JSONError Error { get; set; } - [JsonPropertyName("error")] - public string ErrorMessage { get; set; } - [JsonPropertyName("aux")] public ObjectExtensionData Aux { get; set; } } diff --git a/src/Docker.DotNet/Models/JSONProgress.Generated.cs b/src/Docker.DotNet/Models/JSONProgress.Generated.cs index 6eb92ede..9e7a8c16 100644 --- a/src/Docker.DotNet/Models/JSONProgress.Generated.cs +++ b/src/Docker.DotNet/Models/JSONProgress.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class JSONProgress // (jsonmessage.JSONProgress) + public class JSONProgress // (jsonstream.Progress) { [JsonPropertyName("current")] public long Current { get; set; } @@ -16,8 +16,5 @@ public class JSONProgress // (jsonmessage.JSONProgress) [JsonPropertyName("units")] public string Units { get; set; } - - [JsonPropertyName("winSize")] - public long winSize { get; set; } } } diff --git a/src/Docker.DotNet/Models/Message.Generated.cs b/src/Docker.DotNet/Models/Message.Generated.cs index 5370d359..df0fd4a4 100644 --- a/src/Docker.DotNet/Models/Message.Generated.cs +++ b/src/Docker.DotNet/Models/Message.Generated.cs @@ -2,15 +2,6 @@ namespace Docker.DotNet.Models { public class Message // (events.Message) { - [JsonPropertyName("status")] - public string Status { get; set; } - - [JsonPropertyName("id")] - public string ID { get; set; } - - [JsonPropertyName("from")] - public string From { get; set; } - [JsonPropertyName("Type")] public string Type { get; set; } diff --git a/src/Docker.DotNet/Models/Network.Generated.cs b/src/Docker.DotNet/Models/Network.Generated.cs index 43daecd0..03642177 100644 --- a/src/Docker.DotNet/Models/Network.Generated.cs +++ b/src/Docker.DotNet/Models/Network.Generated.cs @@ -1,40 +1,53 @@ namespace Docker.DotNet.Models { - public class Network // (swarm.Network) + public class Network // (network.Network) { - public Network() - { - } - - public Network(Meta Meta) - { - if (Meta != null) - { - this.Version = Meta.Version; - this.CreatedAt = Meta.CreatedAt; - this.UpdatedAt = Meta.UpdatedAt; - } - } - - [JsonPropertyName("ID")] + [JsonPropertyName("Name")] + public string Name { get; set; } + + [JsonPropertyName("Id")] public string ID { get; set; } - [JsonPropertyName("Version")] - public Version Version { get; set; } + [JsonPropertyName("Created")] + public DateTime Created { get; set; } + + [JsonPropertyName("Scope")] + public string Scope { get; set; } + + [JsonPropertyName("Driver")] + public string Driver { get; set; } + + [JsonPropertyName("EnableIPv4")] + public bool EnableIPv4 { get; set; } + + [JsonPropertyName("EnableIPv6")] + public bool EnableIPv6 { get; set; } + + [JsonPropertyName("IPAM")] + public IPAM IPAM { get; set; } + + [JsonPropertyName("Internal")] + public bool Internal { get; set; } + + [JsonPropertyName("Attachable")] + public bool Attachable { get; set; } + + [JsonPropertyName("Ingress")] + public bool Ingress { get; set; } - [JsonPropertyName("CreatedAt")] - public DateTime CreatedAt { get; set; } + [JsonPropertyName("ConfigFrom")] + public ConfigReference ConfigFrom { get; set; } - [JsonPropertyName("UpdatedAt")] - public DateTime UpdatedAt { get; set; } + [JsonPropertyName("ConfigOnly")] + public bool ConfigOnly { get; set; } - [JsonPropertyName("Spec")] - public NetworkSpec Spec { get; set; } + [JsonPropertyName("Options")] + public IDictionary Options { get; set; } - [JsonPropertyName("DriverState")] - public SwarmDriver DriverState { get; set; } + [JsonPropertyName("Labels")] + public IDictionary Labels { get; set; } - [JsonPropertyName("IPAMOptions")] - public IPAMOptions IPAMOptions { get; set; } + [JsonPropertyName("Peers")] + public IList Peers { get; set; } } } diff --git a/src/Docker.DotNet/Models/NetworkAttachment.Generated.cs b/src/Docker.DotNet/Models/NetworkAttachment.Generated.cs index 10c27d53..c44e7ef6 100644 --- a/src/Docker.DotNet/Models/NetworkAttachment.Generated.cs +++ b/src/Docker.DotNet/Models/NetworkAttachment.Generated.cs @@ -3,7 +3,7 @@ namespace Docker.DotNet.Models public class NetworkAttachment // (swarm.NetworkAttachment) { [JsonPropertyName("Network")] - public Network Network { get; set; } + public SwarmNetwork Network { get; set; } [JsonPropertyName("Addresses")] public IList Addresses { get; set; } diff --git a/src/Docker.DotNet/Models/NetworkConnectParameters.Generated.cs b/src/Docker.DotNet/Models/NetworkConnectParameters.Generated.cs index 4920646b..ab73e765 100644 --- a/src/Docker.DotNet/Models/NetworkConnectParameters.Generated.cs +++ b/src/Docker.DotNet/Models/NetworkConnectParameters.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class NetworkConnectParameters // (network.ConnectOptions) + public class NetworkConnectParameters // (client.NetworkConnectOptions) { [JsonPropertyName("Container")] public string Container { get; set; } diff --git a/src/Docker.DotNet/Models/NetworkDisconnectParameters.Generated.cs b/src/Docker.DotNet/Models/NetworkDisconnectParameters.Generated.cs index b2c0c659..8240aaae 100644 --- a/src/Docker.DotNet/Models/NetworkDisconnectParameters.Generated.cs +++ b/src/Docker.DotNet/Models/NetworkDisconnectParameters.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class NetworkDisconnectParameters // (network.DisconnectOptions) + public class NetworkDisconnectParameters // (client.NetworkDisconnectOptions) { [JsonPropertyName("Container")] public string Container { get; set; } diff --git a/src/Docker.DotNet/Models/NetworkResponse.Generated.cs b/src/Docker.DotNet/Models/NetworkResponse.Generated.cs index d69ae5d0..ba7cd21b 100644 --- a/src/Docker.DotNet/Models/NetworkResponse.Generated.cs +++ b/src/Docker.DotNet/Models/NetworkResponse.Generated.cs @@ -2,6 +2,33 @@ namespace Docker.DotNet.Models { public class NetworkResponse // (network.Inspect) { + public NetworkResponse() + { + } + + public NetworkResponse(Network Network) + { + if (Network != null) + { + this.Name = Network.Name; + this.ID = Network.ID; + this.Created = Network.Created; + this.Scope = Network.Scope; + this.Driver = Network.Driver; + this.EnableIPv4 = Network.EnableIPv4; + this.EnableIPv6 = Network.EnableIPv6; + this.IPAM = Network.IPAM; + this.Internal = Network.Internal; + this.Attachable = Network.Attachable; + this.Ingress = Network.Ingress; + this.ConfigFrom = Network.ConfigFrom; + this.ConfigOnly = Network.ConfigOnly; + this.Options = Network.Options; + this.Labels = Network.Labels; + this.Peers = Network.Peers; + } + } + [JsonPropertyName("Name")] public string Name { get; set; } @@ -41,9 +68,6 @@ public class NetworkResponse // (network.Inspect) [JsonPropertyName("ConfigOnly")] public bool ConfigOnly { get; set; } - [JsonPropertyName("Containers")] - public IDictionary Containers { get; set; } - [JsonPropertyName("Options")] public IDictionary Options { get; set; } @@ -53,7 +77,13 @@ public class NetworkResponse // (network.Inspect) [JsonPropertyName("Peers")] public IList Peers { get; set; } + [JsonPropertyName("Containers")] + public IDictionary Containers { get; set; } + [JsonPropertyName("Services")] public IDictionary Services { get; set; } + + [JsonPropertyName("Status")] + public Status Status { get; set; } } } diff --git a/src/Docker.DotNet/Models/NetworkSettings.Generated.cs b/src/Docker.DotNet/Models/NetworkSettings.Generated.cs index 677db279..c11ef06a 100644 --- a/src/Docker.DotNet/Models/NetworkSettings.Generated.cs +++ b/src/Docker.DotNet/Models/NetworkSettings.Generated.cs @@ -2,41 +2,6 @@ namespace Docker.DotNet.Models { public class NetworkSettings // (container.NetworkSettings) { - public NetworkSettings() - { - } - - public NetworkSettings(NetworkSettingsBase NetworkSettingsBase, DefaultNetworkSettings DefaultNetworkSettings) - { - if (NetworkSettingsBase != null) - { - this.Bridge = NetworkSettingsBase.Bridge; - this.SandboxID = NetworkSettingsBase.SandboxID; - this.SandboxKey = NetworkSettingsBase.SandboxKey; - this.Ports = NetworkSettingsBase.Ports; - this.HairpinMode = NetworkSettingsBase.HairpinMode; - this.LinkLocalIPv6Address = NetworkSettingsBase.LinkLocalIPv6Address; - this.LinkLocalIPv6PrefixLen = NetworkSettingsBase.LinkLocalIPv6PrefixLen; - this.SecondaryIPAddresses = NetworkSettingsBase.SecondaryIPAddresses; - this.SecondaryIPv6Addresses = NetworkSettingsBase.SecondaryIPv6Addresses; - } - - if (DefaultNetworkSettings != null) - { - this.EndpointID = DefaultNetworkSettings.EndpointID; - this.Gateway = DefaultNetworkSettings.Gateway; - this.GlobalIPv6Address = DefaultNetworkSettings.GlobalIPv6Address; - this.GlobalIPv6PrefixLen = DefaultNetworkSettings.GlobalIPv6PrefixLen; - this.IPAddress = DefaultNetworkSettings.IPAddress; - this.IPPrefixLen = DefaultNetworkSettings.IPPrefixLen; - this.IPv6Gateway = DefaultNetworkSettings.IPv6Gateway; - this.MacAddress = DefaultNetworkSettings.MacAddress; - } - } - - [JsonPropertyName("Bridge")] - public string Bridge { get; set; } - [JsonPropertyName("SandboxID")] public string SandboxID { get; set; } @@ -46,45 +11,6 @@ public NetworkSettings(NetworkSettingsBase NetworkSettingsBase, DefaultNetworkSe [JsonPropertyName("Ports")] public IDictionary> Ports { get; set; } - [JsonPropertyName("HairpinMode")] - public bool HairpinMode { get; set; } - - [JsonPropertyName("LinkLocalIPv6Address")] - public string LinkLocalIPv6Address { get; set; } - - [JsonPropertyName("LinkLocalIPv6PrefixLen")] - public long LinkLocalIPv6PrefixLen { get; set; } - - [JsonPropertyName("SecondaryIPAddresses")] - public IList
SecondaryIPAddresses { get; set; } - - [JsonPropertyName("SecondaryIPv6Addresses")] - public IList
SecondaryIPv6Addresses { get; set; } - - [JsonPropertyName("EndpointID")] - public string EndpointID { get; set; } - - [JsonPropertyName("Gateway")] - public string Gateway { get; set; } - - [JsonPropertyName("GlobalIPv6Address")] - public string GlobalIPv6Address { get; set; } - - [JsonPropertyName("GlobalIPv6PrefixLen")] - public long GlobalIPv6PrefixLen { get; set; } - - [JsonPropertyName("IPAddress")] - public string IPAddress { get; set; } - - [JsonPropertyName("IPPrefixLen")] - public long IPPrefixLen { get; set; } - - [JsonPropertyName("IPv6Gateway")] - public string IPv6Gateway { get; set; } - - [JsonPropertyName("MacAddress")] - public string MacAddress { get; set; } - [JsonPropertyName("Networks")] public IDictionary Networks { get; set; } } diff --git a/src/Docker.DotNet/Models/NetworkSettingsBase.Generated.cs b/src/Docker.DotNet/Models/NetworkSettingsBase.Generated.cs deleted file mode 100644 index dac1e195..00000000 --- a/src/Docker.DotNet/Models/NetworkSettingsBase.Generated.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace Docker.DotNet.Models -{ - public class NetworkSettingsBase // (container.NetworkSettingsBase) - { - [JsonPropertyName("Bridge")] - public string Bridge { get; set; } - - [JsonPropertyName("SandboxID")] - public string SandboxID { get; set; } - - [JsonPropertyName("SandboxKey")] - public string SandboxKey { get; set; } - - [JsonPropertyName("Ports")] - public IDictionary> Ports { get; set; } - - [JsonPropertyName("HairpinMode")] - public bool HairpinMode { get; set; } - - [JsonPropertyName("LinkLocalIPv6Address")] - public string LinkLocalIPv6Address { get; set; } - - [JsonPropertyName("LinkLocalIPv6PrefixLen")] - public long LinkLocalIPv6PrefixLen { get; set; } - - [JsonPropertyName("SecondaryIPAddresses")] - public IList
SecondaryIPAddresses { get; set; } - - [JsonPropertyName("SecondaryIPv6Addresses")] - public IList
SecondaryIPv6Addresses { get; set; } - } -} diff --git a/src/Docker.DotNet/Models/NetworksCreateParameters.Generated.cs b/src/Docker.DotNet/Models/NetworksCreateParameters.Generated.cs index 73c99da0..1f105b89 100644 --- a/src/Docker.DotNet/Models/NetworksCreateParameters.Generated.cs +++ b/src/Docker.DotNet/Models/NetworksCreateParameters.Generated.cs @@ -2,28 +2,8 @@ namespace Docker.DotNet.Models { public class NetworksCreateParameters // (network.CreateRequest) { - public NetworksCreateParameters() - { - } - - public NetworksCreateParameters(CreateOptions CreateOptions) - { - if (CreateOptions != null) - { - this.Driver = CreateOptions.Driver; - this.Scope = CreateOptions.Scope; - this.EnableIPv4 = CreateOptions.EnableIPv4; - this.EnableIPv6 = CreateOptions.EnableIPv6; - this.IPAM = CreateOptions.IPAM; - this.Internal = CreateOptions.Internal; - this.Attachable = CreateOptions.Attachable; - this.Ingress = CreateOptions.Ingress; - this.ConfigOnly = CreateOptions.ConfigOnly; - this.ConfigFrom = CreateOptions.ConfigFrom; - this.Options = CreateOptions.Options; - this.Labels = CreateOptions.Labels; - } - } + [JsonPropertyName("Name")] + public string Name { get; set; } [JsonPropertyName("Driver")] public string Driver { get; set; } @@ -60,11 +40,5 @@ public NetworksCreateParameters(CreateOptions CreateOptions) [JsonPropertyName("Labels")] public IDictionary Labels { get; set; } - - [JsonPropertyName("Name")] - public string Name { get; set; } - - [JsonPropertyName("CheckDuplicate")] - public bool? CheckDuplicate { get; set; } } } diff --git a/src/Docker.DotNet/Models/VersionPlatform.Generated.cs b/src/Docker.DotNet/Models/PlatformInfo.Generated.cs similarity index 66% rename from src/Docker.DotNet/Models/VersionPlatform.Generated.cs rename to src/Docker.DotNet/Models/PlatformInfo.Generated.cs index aeb3f8a2..54ef261f 100644 --- a/src/Docker.DotNet/Models/VersionPlatform.Generated.cs +++ b/src/Docker.DotNet/Models/PlatformInfo.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class VersionPlatform // (types.Version.Platform) + public class PlatformInfo // (system.PlatformInfo) { [JsonPropertyName("Name")] public string Name { get; set; } diff --git a/src/Docker.DotNet/Models/Plugin.Generated.cs b/src/Docker.DotNet/Models/Plugin.Generated.cs index 9b1528e2..856b7eac 100644 --- a/src/Docker.DotNet/Models/Plugin.Generated.cs +++ b/src/Docker.DotNet/Models/Plugin.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class Plugin // (types.Plugin) + public class Plugin // (plugin.Plugin) { [JsonPropertyName("Config")] public PluginConfig Config { get; set; } diff --git a/src/Docker.DotNet/Models/PluginConfigArgs.Generated.cs b/src/Docker.DotNet/Models/PluginArgs.Generated.cs similarity index 86% rename from src/Docker.DotNet/Models/PluginConfigArgs.Generated.cs rename to src/Docker.DotNet/Models/PluginArgs.Generated.cs index 95bf6b95..05e41c66 100644 --- a/src/Docker.DotNet/Models/PluginConfigArgs.Generated.cs +++ b/src/Docker.DotNet/Models/PluginArgs.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PluginConfigArgs // (types.PluginConfigArgs) + public class PluginArgs // (plugin.Args) { [JsonPropertyName("Description")] public string Description { get; set; } diff --git a/src/Docker.DotNet/Models/PluginInterfaceType.Generated.cs b/src/Docker.DotNet/Models/PluginCapabilityID.Generated.cs similarity index 81% rename from src/Docker.DotNet/Models/PluginInterfaceType.Generated.cs rename to src/Docker.DotNet/Models/PluginCapabilityID.Generated.cs index 04093999..5768ffa9 100644 --- a/src/Docker.DotNet/Models/PluginInterfaceType.Generated.cs +++ b/src/Docker.DotNet/Models/PluginCapabilityID.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PluginInterfaceType // (types.PluginInterfaceType) + public class PluginCapabilityID // (plugin.CapabilityID) { [JsonPropertyName("Capability")] public string Capability { get; set; } diff --git a/src/Docker.DotNet/Models/PluginConfig.Generated.cs b/src/Docker.DotNet/Models/PluginConfig.Generated.cs index 0adab628..449c577d 100644 --- a/src/Docker.DotNet/Models/PluginConfig.Generated.cs +++ b/src/Docker.DotNet/Models/PluginConfig.Generated.cs @@ -1,16 +1,13 @@ namespace Docker.DotNet.Models { - public class PluginConfig // (types.PluginConfig) + public class PluginConfig // (plugin.Config) { [JsonPropertyName("Args")] - public PluginConfigArgs Args { get; set; } + public PluginArgs Args { get; set; } [JsonPropertyName("Description")] public string Description { get; set; } - [JsonPropertyName("DockerVersion")] - public string DockerVersion { get; set; } - [JsonPropertyName("Documentation")] public string Documentation { get; set; } @@ -21,19 +18,19 @@ public class PluginConfig // (types.PluginConfig) public IList Env { get; set; } [JsonPropertyName("Interface")] - public PluginConfigInterface Interface { get; set; } + public PluginInterface Interface { get; set; } [JsonPropertyName("IpcHost")] public bool IpcHost { get; set; } [JsonPropertyName("Linux")] - public PluginConfigLinux Linux { get; set; } + public PluginLinuxConfig Linux { get; set; } [JsonPropertyName("Mounts")] public IList Mounts { get; set; } [JsonPropertyName("Network")] - public PluginConfigNetwork Network { get; set; } + public PluginNetworkConfig Network { get; set; } [JsonPropertyName("PidHost")] public bool PidHost { get; set; } @@ -42,12 +39,12 @@ public class PluginConfig // (types.PluginConfig) public string PropagatedMount { get; set; } [JsonPropertyName("User")] - public PluginConfigUser User { get; set; } + public PluginUser User { get; set; } [JsonPropertyName("WorkDir")] public string WorkDir { get; set; } [JsonPropertyName("rootfs")] - public PluginConfigRootfs Rootfs { get; set; } + public PluginRootFS Rootfs { get; set; } } } diff --git a/src/Docker.DotNet/Models/PluginDevice.Generated.cs b/src/Docker.DotNet/Models/PluginDevice.Generated.cs index 2e36bdb7..24aedb67 100644 --- a/src/Docker.DotNet/Models/PluginDevice.Generated.cs +++ b/src/Docker.DotNet/Models/PluginDevice.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PluginDevice // (types.PluginDevice) + public class PluginDevice // (plugin.Device) { [JsonPropertyName("Description")] public string Description { get; set; } diff --git a/src/Docker.DotNet/Models/PluginEnv.Generated.cs b/src/Docker.DotNet/Models/PluginEnv.Generated.cs index b1b4fc4b..96f9f615 100644 --- a/src/Docker.DotNet/Models/PluginEnv.Generated.cs +++ b/src/Docker.DotNet/Models/PluginEnv.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PluginEnv // (types.PluginEnv) + public class PluginEnv // (plugin.Env) { [JsonPropertyName("Description")] public string Description { get; set; } diff --git a/src/Docker.DotNet/Models/PluginConfigInterface.Generated.cs b/src/Docker.DotNet/Models/PluginInterface.Generated.cs similarity index 81% rename from src/Docker.DotNet/Models/PluginConfigInterface.Generated.cs rename to src/Docker.DotNet/Models/PluginInterface.Generated.cs index 6055fc34..036765a6 100644 --- a/src/Docker.DotNet/Models/PluginConfigInterface.Generated.cs +++ b/src/Docker.DotNet/Models/PluginInterface.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PluginConfigInterface // (types.PluginConfigInterface) + public class PluginInterface // (plugin.Interface) { [JsonPropertyName("ProtocolScheme")] public string ProtocolScheme { get; set; } diff --git a/src/Docker.DotNet/Models/PluginConfigLinux.Generated.cs b/src/Docker.DotNet/Models/PluginLinuxConfig.Generated.cs similarity index 84% rename from src/Docker.DotNet/Models/PluginConfigLinux.Generated.cs rename to src/Docker.DotNet/Models/PluginLinuxConfig.Generated.cs index 4482e6c1..15ddbb17 100644 --- a/src/Docker.DotNet/Models/PluginConfigLinux.Generated.cs +++ b/src/Docker.DotNet/Models/PluginLinuxConfig.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PluginConfigLinux // (types.PluginConfigLinux) + public class PluginLinuxConfig // (plugin.LinuxConfig) { [JsonPropertyName("AllowAllDevices")] public bool AllowAllDevices { get; set; } diff --git a/src/Docker.DotNet/Models/PluginMount.Generated.cs b/src/Docker.DotNet/Models/PluginMount.Generated.cs index 761ede7d..756a80c7 100644 --- a/src/Docker.DotNet/Models/PluginMount.Generated.cs +++ b/src/Docker.DotNet/Models/PluginMount.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PluginMount // (types.PluginMount) + public class PluginMount // (plugin.Mount) { [JsonPropertyName("Description")] public string Description { get; set; } diff --git a/src/Docker.DotNet/Models/PluginConfigNetwork.Generated.cs b/src/Docker.DotNet/Models/PluginNetworkConfig.Generated.cs similarity index 64% rename from src/Docker.DotNet/Models/PluginConfigNetwork.Generated.cs rename to src/Docker.DotNet/Models/PluginNetworkConfig.Generated.cs index c7a49bbf..495ba57c 100644 --- a/src/Docker.DotNet/Models/PluginConfigNetwork.Generated.cs +++ b/src/Docker.DotNet/Models/PluginNetworkConfig.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PluginConfigNetwork // (types.PluginConfigNetwork) + public class PluginNetworkConfig // (plugin.NetworkConfig) { [JsonPropertyName("Type")] public string Type { get; set; } diff --git a/src/Docker.DotNet/Models/PluginPrivilege.Generated.cs b/src/Docker.DotNet/Models/PluginPrivilege.Generated.cs index 7e3f200a..36e8816d 100644 --- a/src/Docker.DotNet/Models/PluginPrivilege.Generated.cs +++ b/src/Docker.DotNet/Models/PluginPrivilege.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PluginPrivilege // (types.PluginPrivilege) + public class PluginPrivilege // (plugin.Privilege) { [JsonPropertyName("Name")] public string Name { get; set; } diff --git a/src/Docker.DotNet/Models/PluginConfigRootfs.Generated.cs b/src/Docker.DotNet/Models/PluginRootFS.Generated.cs similarity index 76% rename from src/Docker.DotNet/Models/PluginConfigRootfs.Generated.cs rename to src/Docker.DotNet/Models/PluginRootFS.Generated.cs index 27dec93c..0563797b 100644 --- a/src/Docker.DotNet/Models/PluginConfigRootfs.Generated.cs +++ b/src/Docker.DotNet/Models/PluginRootFS.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PluginConfigRootfs // (types.PluginConfigRootfs) + public class PluginRootFS // (plugin.RootFS) { [JsonPropertyName("diff_ids")] public IList DiffIds { get; set; } diff --git a/src/Docker.DotNet/Models/PluginSettings.Generated.cs b/src/Docker.DotNet/Models/PluginSettings.Generated.cs index 8bdf992c..3d761f9a 100644 --- a/src/Docker.DotNet/Models/PluginSettings.Generated.cs +++ b/src/Docker.DotNet/Models/PluginSettings.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PluginSettings // (types.PluginSettings) + public class PluginSettings // (plugin.Settings) { [JsonPropertyName("Args")] public IList Args { get; set; } diff --git a/src/Docker.DotNet/Models/PluginConfigUser.Generated.cs b/src/Docker.DotNet/Models/PluginUser.Generated.cs similarity index 75% rename from src/Docker.DotNet/Models/PluginConfigUser.Generated.cs rename to src/Docker.DotNet/Models/PluginUser.Generated.cs index 35d2a37a..d75e055b 100644 --- a/src/Docker.DotNet/Models/PluginConfigUser.Generated.cs +++ b/src/Docker.DotNet/Models/PluginUser.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PluginConfigUser // (types.PluginConfigUser) + public class PluginUser // (plugin.User) { [JsonPropertyName("GID")] public uint GID { get; set; } diff --git a/src/Docker.DotNet/Models/PortBinding.Generated.cs b/src/Docker.DotNet/Models/PortBinding.Generated.cs index 7e7242cf..a476e179 100644 --- a/src/Docker.DotNet/Models/PortBinding.Generated.cs +++ b/src/Docker.DotNet/Models/PortBinding.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PortBinding // (nat.PortBinding) + public class PortBinding // (network.PortBinding) { [JsonPropertyName("HostIp")] public string HostIP { get; set; } diff --git a/src/Docker.DotNet/Models/Port.Generated.cs b/src/Docker.DotNet/Models/PortSummary.Generated.cs similarity index 87% rename from src/Docker.DotNet/Models/Port.Generated.cs rename to src/Docker.DotNet/Models/PortSummary.Generated.cs index 412e19b0..66d6fb85 100644 --- a/src/Docker.DotNet/Models/Port.Generated.cs +++ b/src/Docker.DotNet/Models/PortSummary.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class Port // (container.Port) + public class PortSummary // (container.PortSummary) { [JsonPropertyName("IP")] public string IP { get; set; } diff --git a/src/Docker.DotNet/Models/ResourceRequirements.Generated.cs b/src/Docker.DotNet/Models/ResourceRequirements.Generated.cs index 6c973842..9f82d88b 100644 --- a/src/Docker.DotNet/Models/ResourceRequirements.Generated.cs +++ b/src/Docker.DotNet/Models/ResourceRequirements.Generated.cs @@ -7,5 +7,11 @@ public class ResourceRequirements // (swarm.ResourceRequirements) [JsonPropertyName("Reservations")] public SwarmResources Reservations { get; set; } + + [JsonPropertyName("SwapBytes")] + public long? SwapBytes { get; set; } + + [JsonPropertyName("MemorySwappiness")] + public long? MemorySwappiness { get; set; } } } diff --git a/src/Docker.DotNet/Models/Resources.Generated.cs b/src/Docker.DotNet/Models/Resources.Generated.cs index 87377edd..97eb1697 100644 --- a/src/Docker.DotNet/Models/Resources.Generated.cs +++ b/src/Docker.DotNet/Models/Resources.Generated.cs @@ -59,12 +59,6 @@ public class Resources // (container.Resources) [JsonPropertyName("DeviceRequests")] public IList DeviceRequests { get; set; } - [JsonPropertyName("KernelMemory")] - public long KernelMemory { get; set; } - - [JsonPropertyName("KernelMemoryTCP")] - public long KernelMemoryTCP { get; set; } - [JsonPropertyName("MemoryReservation")] public long MemoryReservation { get; set; } diff --git a/src/Docker.DotNet/Models/RootFSStorage.Generated.cs b/src/Docker.DotNet/Models/RootFSStorage.Generated.cs new file mode 100644 index 00000000..61449ce9 --- /dev/null +++ b/src/Docker.DotNet/Models/RootFSStorage.Generated.cs @@ -0,0 +1,8 @@ +namespace Docker.DotNet.Models +{ + public class RootFSStorage // (storage.RootFSStorage) + { + [JsonPropertyName("Snapshot")] + public RootFSStorageSnapshot Snapshot { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/RootFSStorageSnapshot.Generated.cs b/src/Docker.DotNet/Models/RootFSStorageSnapshot.Generated.cs new file mode 100644 index 00000000..f5f35cc4 --- /dev/null +++ b/src/Docker.DotNet/Models/RootFSStorageSnapshot.Generated.cs @@ -0,0 +1,8 @@ +namespace Docker.DotNet.Models +{ + public class RootFSStorageSnapshot // (storage.RootFSStorageSnapshot) + { + [JsonPropertyName("Name")] + public string Name { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/RuntimePluginPrivilege.Generated.cs b/src/Docker.DotNet/Models/RuntimePrivilege.Generated.cs similarity index 81% rename from src/Docker.DotNet/Models/RuntimePluginPrivilege.Generated.cs rename to src/Docker.DotNet/Models/RuntimePrivilege.Generated.cs index 23d62b1d..a4a36fbd 100644 --- a/src/Docker.DotNet/Models/RuntimePluginPrivilege.Generated.cs +++ b/src/Docker.DotNet/Models/RuntimePrivilege.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class RuntimePluginPrivilege // (runtime.PluginPrivilege) + public class RuntimePrivilege // (swarm.RuntimePrivilege) { [JsonPropertyName("name")] public string Name { get; set; } diff --git a/src/Docker.DotNet/Models/Secret.Generated.cs b/src/Docker.DotNet/Models/Secret.Generated.cs index 29cb2617..d71214f5 100644 --- a/src/Docker.DotNet/Models/Secret.Generated.cs +++ b/src/Docker.DotNet/Models/Secret.Generated.cs @@ -29,6 +29,6 @@ public Secret(Meta Meta) public DateTime UpdatedAt { get; set; } [JsonPropertyName("Spec")] - public SecretSpec Spec { get; set; } + public SwarmSecretSpec Spec { get; set; } } } diff --git a/src/Docker.DotNet/Models/ServiceConfig.Generated.cs b/src/Docker.DotNet/Models/ServiceConfig.Generated.cs index 69c0947d..70d9c8f9 100644 --- a/src/Docker.DotNet/Models/ServiceConfig.Generated.cs +++ b/src/Docker.DotNet/Models/ServiceConfig.Generated.cs @@ -2,12 +2,6 @@ namespace Docker.DotNet.Models { public class ServiceConfig // (registry.ServiceConfig) { - [JsonPropertyName("AllowNondistributableArtifactsCIDRs")] - public IList AllowNondistributableArtifactsCIDRs { get; set; } - - [JsonPropertyName("AllowNondistributableArtifactsHostnames")] - public IList AllowNondistributableArtifactsHostnames { get; set; } - [JsonPropertyName("InsecureRegistryCIDRs")] public IList InsecureRegistryCIDRs { get; set; } diff --git a/src/Docker.DotNet/Models/ServiceSpec.Generated.cs b/src/Docker.DotNet/Models/ServiceSpec.Generated.cs index a3d5dca5..b275006b 100644 --- a/src/Docker.DotNet/Models/ServiceSpec.Generated.cs +++ b/src/Docker.DotNet/Models/ServiceSpec.Generated.cs @@ -33,9 +33,6 @@ public ServiceSpec(Annotations Annotations) [JsonPropertyName("RollbackConfig")] public SwarmUpdateConfig RollbackConfig { get; set; } - [JsonPropertyName("Networks")] - public IList Networks { get; set; } - [JsonPropertyName("EndpointSpec")] public EndpointSpec EndpointSpec { get; set; } } diff --git a/src/Docker.DotNet/Models/Status.Generated.cs b/src/Docker.DotNet/Models/Status.Generated.cs new file mode 100644 index 00000000..0a385a28 --- /dev/null +++ b/src/Docker.DotNet/Models/Status.Generated.cs @@ -0,0 +1,8 @@ +namespace Docker.DotNet.Models +{ + public class Status // (network.Status) + { + [JsonPropertyName("IPAM")] + public IPAMStatus IPAM { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/Storage.Generated.cs b/src/Docker.DotNet/Models/Storage.Generated.cs new file mode 100644 index 00000000..4948c938 --- /dev/null +++ b/src/Docker.DotNet/Models/Storage.Generated.cs @@ -0,0 +1,8 @@ +namespace Docker.DotNet.Models +{ + public class Storage // (storage.Storage) + { + [JsonPropertyName("RootFS")] + public RootFSStorage RootFS { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/SubnetStatus.Generated.cs b/src/Docker.DotNet/Models/SubnetStatus.Generated.cs new file mode 100644 index 00000000..13fbd74d --- /dev/null +++ b/src/Docker.DotNet/Models/SubnetStatus.Generated.cs @@ -0,0 +1,11 @@ +namespace Docker.DotNet.Models +{ + public class SubnetStatus // (network.SubnetStatus) + { + [JsonPropertyName("IPsInUse")] + public ulong IPsInUse { get; set; } + + [JsonPropertyName("DynamicIPsAvailable")] + public ulong DynamicIPsAvailable { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/SwarmConfigSpec.Generated.cs b/src/Docker.DotNet/Models/SwarmConfigSpec.Generated.cs index 8772deb9..08f24c1e 100644 --- a/src/Docker.DotNet/Models/SwarmConfigSpec.Generated.cs +++ b/src/Docker.DotNet/Models/SwarmConfigSpec.Generated.cs @@ -22,6 +22,7 @@ public SwarmConfigSpec(Annotations Annotations) public IDictionary Labels { get; set; } [JsonPropertyName("Data")] + [JsonConverter(typeof(Base64Converter))] public IList Data { get; set; } [JsonPropertyName("Templating")] diff --git a/src/Docker.DotNet/Models/SwarmNetwork.Generated.cs b/src/Docker.DotNet/Models/SwarmNetwork.Generated.cs new file mode 100644 index 00000000..c3ef8537 --- /dev/null +++ b/src/Docker.DotNet/Models/SwarmNetwork.Generated.cs @@ -0,0 +1,40 @@ +namespace Docker.DotNet.Models +{ + public class SwarmNetwork // (swarm.Network) + { + public SwarmNetwork() + { + } + + public SwarmNetwork(Meta Meta) + { + if (Meta != null) + { + this.Version = Meta.Version; + this.CreatedAt = Meta.CreatedAt; + this.UpdatedAt = Meta.UpdatedAt; + } + } + + [JsonPropertyName("ID")] + public string ID { get; set; } + + [JsonPropertyName("Version")] + public Version Version { get; set; } + + [JsonPropertyName("CreatedAt")] + public DateTime CreatedAt { get; set; } + + [JsonPropertyName("UpdatedAt")] + public DateTime UpdatedAt { get; set; } + + [JsonPropertyName("Spec")] + public NetworkSpec Spec { get; set; } + + [JsonPropertyName("DriverState")] + public SwarmDriver DriverState { get; set; } + + [JsonPropertyName("IPAMOptions")] + public IPAMOptions IPAMOptions { get; set; } + } +} diff --git a/src/Docker.DotNet/Models/PluginSpec.Generated.cs b/src/Docker.DotNet/Models/SwarmRuntimeSpec.Generated.cs similarity index 77% rename from src/Docker.DotNet/Models/PluginSpec.Generated.cs rename to src/Docker.DotNet/Models/SwarmRuntimeSpec.Generated.cs index 7a509bcc..a34d876e 100644 --- a/src/Docker.DotNet/Models/PluginSpec.Generated.cs +++ b/src/Docker.DotNet/Models/SwarmRuntimeSpec.Generated.cs @@ -1,6 +1,6 @@ namespace Docker.DotNet.Models { - public class PluginSpec // (runtime.PluginSpec) + public class SwarmRuntimeSpec // (swarm.RuntimeSpec) { [JsonPropertyName("name")] public string Name { get; set; } @@ -9,7 +9,7 @@ public class PluginSpec // (runtime.PluginSpec) public string Remote { get; set; } [JsonPropertyName("privileges")] - public IList Privileges { get; set; } + public IList Privileges { get; set; } [JsonPropertyName("disabled")] public bool Disabled { get; set; } diff --git a/src/Docker.DotNet/Models/SecretSpec.Generated.cs b/src/Docker.DotNet/Models/SwarmSecretSpec.Generated.cs similarity index 78% rename from src/Docker.DotNet/Models/SecretSpec.Generated.cs rename to src/Docker.DotNet/Models/SwarmSecretSpec.Generated.cs index fd92f04b..332b0852 100644 --- a/src/Docker.DotNet/Models/SecretSpec.Generated.cs +++ b/src/Docker.DotNet/Models/SwarmSecretSpec.Generated.cs @@ -1,12 +1,12 @@ namespace Docker.DotNet.Models { - public class SecretSpec // (swarm.SecretSpec) + public class SwarmSecretSpec // (swarm.SecretSpec) { - public SecretSpec() + public SwarmSecretSpec() { } - public SecretSpec(Annotations Annotations) + public SwarmSecretSpec(Annotations Annotations) { if (Annotations != null) { @@ -22,6 +22,7 @@ public SecretSpec(Annotations Annotations) public IDictionary Labels { get; set; } [JsonPropertyName("Data")] + [JsonConverter(typeof(Base64Converter))] public IList Data { get; set; } [JsonPropertyName("Driver")] diff --git a/src/Docker.DotNet/Models/SystemInfoResponse.Generated.cs b/src/Docker.DotNet/Models/SystemInfoResponse.Generated.cs index 6a1dc483..515f2591 100644 --- a/src/Docker.DotNet/Models/SystemInfoResponse.Generated.cs +++ b/src/Docker.DotNet/Models/SystemInfoResponse.Generated.cs @@ -38,12 +38,6 @@ public class SystemInfoResponse // (system.Info) [JsonPropertyName("SwapLimit")] public bool SwapLimit { get; set; } - [JsonPropertyName("KernelMemory")] - public bool KernelMemory { get; set; } - - [JsonPropertyName("KernelMemoryTCP")] - public bool KernelMemoryTCP { get; set; } - [JsonPropertyName("CpuCfsPeriod")] public bool CPUCfsPeriod { get; set; } diff --git a/src/Docker.DotNet/Models/TLSInfo.Generated.cs b/src/Docker.DotNet/Models/TLSInfo.Generated.cs index 1801075d..340317da 100644 --- a/src/Docker.DotNet/Models/TLSInfo.Generated.cs +++ b/src/Docker.DotNet/Models/TLSInfo.Generated.cs @@ -6,9 +6,11 @@ public class TLSInfo // (swarm.TLSInfo) public string TrustRoot { get; set; } [JsonPropertyName("CertIssuerSubject")] + [JsonConverter(typeof(Base64Converter))] public IList CertIssuerSubject { get; set; } [JsonPropertyName("CertIssuerPublicKey")] + [JsonConverter(typeof(Base64Converter))] public IList CertIssuerPublicKey { get; set; } } } diff --git a/src/Docker.DotNet/Models/TaskSpec.Generated.cs b/src/Docker.DotNet/Models/TaskSpec.Generated.cs index 676cb240..e3b49f32 100644 --- a/src/Docker.DotNet/Models/TaskSpec.Generated.cs +++ b/src/Docker.DotNet/Models/TaskSpec.Generated.cs @@ -6,7 +6,7 @@ public class TaskSpec // (swarm.TaskSpec) public ContainerSpec ContainerSpec { get; set; } [JsonPropertyName("PluginSpec")] - public PluginSpec PluginSpec { get; set; } + public SwarmRuntimeSpec PluginSpec { get; set; } [JsonPropertyName("NetworkAttachmentSpec")] public NetworkAttachmentSpec NetworkAttachmentSpec { get; set; } diff --git a/src/Docker.DotNet/Models/UpdateConfig.Generated.cs b/src/Docker.DotNet/Models/UpdateConfig.Generated.cs index 5351cd7d..caf3fc80 100644 --- a/src/Docker.DotNet/Models/UpdateConfig.Generated.cs +++ b/src/Docker.DotNet/Models/UpdateConfig.Generated.cs @@ -29,8 +29,6 @@ public UpdateConfig(Resources Resources) this.Devices = Resources.Devices; this.DeviceCgroupRules = Resources.DeviceCgroupRules; this.DeviceRequests = Resources.DeviceRequests; - this.KernelMemory = Resources.KernelMemory; - this.KernelMemoryTCP = Resources.KernelMemoryTCP; this.MemoryReservation = Resources.MemoryReservation; this.MemorySwap = Resources.MemorySwap; this.MemorySwappiness = Resources.MemorySwappiness; @@ -101,12 +99,6 @@ public UpdateConfig(Resources Resources) [JsonPropertyName("DeviceRequests")] public IList DeviceRequests { get; set; } - [JsonPropertyName("KernelMemory")] - public long KernelMemory { get; set; } - - [JsonPropertyName("KernelMemoryTCP")] - public long KernelMemoryTCP { get; set; } - [JsonPropertyName("MemoryReservation")] public long MemoryReservation { get; set; } diff --git a/src/Docker.DotNet/Models/VersionResponse.Generated.cs b/src/Docker.DotNet/Models/VersionResponse.Generated.cs index 02c2f151..01b6776f 100644 --- a/src/Docker.DotNet/Models/VersionResponse.Generated.cs +++ b/src/Docker.DotNet/Models/VersionResponse.Generated.cs @@ -1,12 +1,9 @@ namespace Docker.DotNet.Models { - public class VersionResponse // (types.Version) + public class VersionResponse // (system.VersionResponse) { [JsonPropertyName("Platform")] - public VersionPlatform Platform { get; set; } - - [JsonPropertyName("Components")] - public IList Components { get; set; } + public PlatformInfo Platform { get; set; } [JsonPropertyName("Version")] public string Version { get; set; } @@ -17,18 +14,21 @@ public class VersionResponse // (types.Version) [JsonPropertyName("MinAPIVersion")] public string MinAPIVersion { get; set; } - [JsonPropertyName("GitCommit")] - public string GitCommit { get; set; } - - [JsonPropertyName("GoVersion")] - public string GoVersion { get; set; } - [JsonPropertyName("Os")] public string Os { get; set; } [JsonPropertyName("Arch")] public string Arch { get; set; } + [JsonPropertyName("Components")] + public IList Components { get; set; } + + [JsonPropertyName("GitCommit")] + public string GitCommit { get; set; } + + [JsonPropertyName("GoVersion")] + public string GoVersion { get; set; } + [JsonPropertyName("KernelVersion")] public string KernelVersion { get; set; } diff --git a/src/Docker.DotNet/TimeSpanNanoSecondsConverter.cs b/src/Docker.DotNet/TimeSpanNanoSecondsConverter.cs index 808815d3..bba4ef12 100644 --- a/src/Docker.DotNet/TimeSpanNanoSecondsConverter.cs +++ b/src/Docker.DotNet/TimeSpanNanoSecondsConverter.cs @@ -6,9 +6,9 @@ internal class TimeSpanNanosecondsConverter : JsonConverter public override TimeSpan Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - var valueInNanoSeconds = reader.GetInt64(); - var milliSecondValue = valueInNanoSeconds / MilliSecondToNanoSecond; - return TimeSpan.FromMilliseconds(milliSecondValue); + var valueInNanoseconds = reader.GetInt64(); + var valueInMilliseconds = valueInNanoseconds / MilliSecondToNanoSecond; + return TimeSpan.FromMilliseconds(valueInMilliseconds); } public override void Write(Utf8JsonWriter writer, TimeSpan timeSpan, JsonSerializerOptions options) diff --git a/src/Docker.DotNet/TimeSpanSecondsQueryStringConverter.cs b/src/Docker.DotNet/TimeSpanSecondsQueryStringConverter.cs deleted file mode 100644 index 93681e5a..00000000 --- a/src/Docker.DotNet/TimeSpanSecondsQueryStringConverter.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace Docker.DotNet.Models; - -internal class TimeSpanSecondsQueryStringConverter : IQueryStringConverter -{ - public bool CanConvert(Type t) - { - return t == typeof (TimeSpan); - } - - public string[] Convert(object o) - { - Debug.Assert(o != null); - - return new[] {((TimeSpan) o).TotalSeconds.ToString(CultureInfo.InvariantCulture)}; - } -} \ No newline at end of file diff --git a/test/Docker.DotNet.Tests/ISystemOperations.Tests.cs b/test/Docker.DotNet.Tests/ISystemOperations.Tests.cs index 6c313945..3609a79c 100644 --- a/test/Docker.DotNet.Tests/ISystemOperations.Tests.cs +++ b/test/Docker.DotNet.Tests/ISystemOperations.Tests.cs @@ -67,7 +67,7 @@ public async Task MonitorEventsAsync_Succeeds() var progressMessage = new Progress(m => { - _testOutputHelper.WriteLine($"MonitorEventsAsync_Succeeds: Message - {m.Action} - {m.Status} {m.From} - {m.Type}"); + _testOutputHelper.WriteLine($"MonitorEventsAsync_Succeeds: Message - {m.Action} - {m.Actor.Attributes["name"]} - {m.Type}"); wasProgressCalled = true; Assert.NotNull(m); }); @@ -102,8 +102,7 @@ await _testFixture.DockerClient.Images.DeleteImageAsync( [Fact] public async Task MonitorEventsAsync_IsCancelled_NoStreamCorruption() { - var rand = new Random(); - var sw = new Stopwatch(); + var stopwatch = new Stopwatch(); for (int i = 0; i < 20; ++i) { @@ -132,15 +131,11 @@ public async Task MonitorEventsAsync_IsCancelled_NoStreamCorruption() }, CancellationToken.None); // (4) Wait for a short bit again and cancel the monitor task - if we get lucky, we the list images call will grab the same buffer while - sw.Restart(); - var iterations = rand.Next(15000000); + stopwatch.Restart(); - for (var j = 0; j < iterations; j++) - { - // noop - } + await Task.Delay(100, CancellationToken.None); - _testOutputHelper.WriteLine($"Waited for {sw.Elapsed.TotalMilliseconds} ms"); + _testOutputHelper.WriteLine($"Waited for {stopwatch.Elapsed.TotalMilliseconds} ms"); await cts.CancelAsync(); @@ -223,8 +218,8 @@ await _testFixture.DockerClient.Images.TagImageAsync( var progress = new Progress(m => { Interlocked.Increment(ref progressCalledCounter); - Assert.True(m.Status == "tag" || m.Status == "untag"); - _testOutputHelper.WriteLine($"MonitorEventsFiltered_Succeeds: Message received: {m.Action} - {m.Status} {m.From} - {m.Type}"); + Assert.True(m.Action == "tag" || m.Action == "untag"); + _testOutputHelper.WriteLine($"MonitorEventsFiltered_Succeeds: Message - {m.Action} - {m.Actor.Attributes["name"]} - {m.Type}"); }); using var cts = CancellationTokenSource.CreateLinkedTokenSource(_testFixture.Cts.Token); diff --git a/tools/specgen/README.md b/tools/specgen/README.md index e070b54a..a32c341c 100644 --- a/tools/specgen/README.md +++ b/tools/specgen/README.md @@ -9,7 +9,8 @@ A tool that reflects the Docker client [engine-api](https://github.com/docker/en To update the source repositories please use the following from your `$GOPATH`: ``` -> go get -u github.com/docker/docker@ +> go get -u github.com/moby/moby/api@ +> go get -u github.com/moby/moby/client@ ``` Note: Since the docker library is not a go module the version go generates will look something like this v17.12.0-ce-rc1.0.20200916142827-bd33bbf0497b+incompatible even though this is for v19.03.13. The commit hash bd33bbf0497b matches the commit hash of docker v 19.03.13 diff --git a/tools/specgen/csharptype.go b/tools/specgen/csharptype.go index 78cfdc21..f953604b 100644 --- a/tools/specgen/csharptype.go +++ b/tools/specgen/csharptype.go @@ -3,6 +3,8 @@ package main import ( "fmt" "io" + "net" + "net/netip" "os" "path/filepath" "reflect" @@ -11,7 +13,7 @@ import ( "strings" "time" - "github.com/docker/docker/api/types/registry" + "github.com/moby/moby/api/types/network" ) var GlobalUsings map[string]bool @@ -71,9 +73,14 @@ var CSInboxTypesMap = map[reflect.Kind]CSType{ // CSCustomTypeMap is a map from Go reflected types to C# types. var CSCustomTypeMap = map[reflect.Type]CSType{ - reflect.TypeOf(time.Time{}): {"System", "DateTime", true}, - reflect.TypeOf(registry.NetIPNet{}): {"", "string", false}, - EmptyStruct: {"", "BUG_IN_CONVERSION", false}, + reflect.TypeOf(net.IP{}): {"", "string", false}, + reflect.TypeOf(net.IPNet{}): {"", "string", false}, + reflect.TypeOf(netip.Addr{}): {"", "string", false}, + reflect.TypeOf(netip.Prefix{}): {"", "string", false}, + reflect.TypeOf(network.HardwareAddr{}): {"", "string", false}, + reflect.TypeOf(network.Port{}): {"", "string", false}, + reflect.TypeOf(time.Time{}): {"System", "DateTime", true}, + EmptyStruct: {"", "BUG_IN_CONVERSION", false}, } // CSArgument is a type that represents a C# argument that can diff --git a/tools/specgen/go.mod b/tools/specgen/go.mod index 7c45f87d..c0a2ea3b 100644 --- a/tools/specgen/go.mod +++ b/tools/specgen/go.mod @@ -1,22 +1,29 @@ module github.com/dotnet/Docker.DotNet/tools/specgen -go 1.15 +go 1.24.0 require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/docker/docker v28.3.3+incompatible - github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-units v0.4.0 // indirect - github.com/gogo/protobuf v1.3.1 // indirect - github.com/google/go-cmp v0.5.4 // indirect - github.com/kr/text v0.2.0 // indirect + github.com/moby/moby/api v1.52.1-0.20251128103149-9a84135d5240 + github.com/moby/moby/client v0.2.2-0.20251128103149-9a84135d5240 + github.com/opencontainers/image-spec v1.1.1 +) + +require ( + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/containerd/errdefs v1.0.0 // indirect + github.com/containerd/errdefs/pkg v0.3.0 // indirect + github.com/distribution/reference v0.6.0 // indirect + github.com/docker/go-connections v0.6.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect - github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect - github.com/morikuni/aec v1.0.0 // indirect - github.com/stretchr/testify v1.6.1 // indirect - golang.org/x/sys v0.0.0-20210105210732-16f7687f5001 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect - gopkg.in/yaml.v3 v3.0.0-20210105161348-2e78108cf5f8 // indirect - gotest.tools/v3 v3.0.3 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect + go.opentelemetry.io/otel v1.38.0 // indirect + go.opentelemetry.io/otel/metric v1.38.0 // indirect + go.opentelemetry.io/otel/trace v1.38.0 // indirect + golang.org/x/sys v0.38.0 // indirect ) diff --git a/tools/specgen/go.sum b/tools/specgen/go.sum index 4511c551..3f2349c8 100644 --- a/tools/specgen/go.sum +++ b/tools/specgen/go.sum @@ -1,69 +1,65 @@ -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= +github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= +github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= +github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/docker v28.3.3+incompatible h1:Dypm25kh4rmk49v1eiVbsAtpAsYURjYkaKubwuBdxEI= -github.com/docker/docker v28.3.3+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= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/go-connections v0.6.0 h1:LlMG9azAe1TqfR7sO+NJttz1gy6KO7VJBh+pMmjSD94= +github.com/docker/go-connections v0.6.0/go.mod h1:AahvXYshr6JgfUJGdDCs2b5EZG/vmaMAntpSFH5BFKE= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= -github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk= -github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= -github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/moby/moby/api v1.52.1-0.20251119163722-1fa8a3155618 h1:wpNMHn2Tqbs/HEvGyskQcCaf7nptj2rnH2ED8/dDR8k= +github.com/moby/moby/api v1.52.1-0.20251119163722-1fa8a3155618/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc= +github.com/moby/moby/api v1.52.1-0.20251128103149-9a84135d5240 h1:iUXoNduZHK2e9J/o29+7Zgcs07SnSTwURkh0e+ra86M= +github.com/moby/moby/api v1.52.1-0.20251128103149-9a84135d5240/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc= +github.com/moby/moby/client v0.1.1-0.20251119163722-1fa8a3155618 h1:eFftLw+l+zczLYpeHuaqtUhex02NH7OP+78F+X80mRI= +github.com/moby/moby/client v0.1.1-0.20251119163722-1fa8a3155618/go.mod h1:O+/tw5d4a1Ha/ZA/tPxIZJapJRUS6LNZ1wiVRxYHyUE= +github.com/moby/moby/client v0.2.2-0.20251128103149-9a84135d5240 h1:9mkIdtmxPRmEfb/8fWf/oBJQBahgj/PXatn4MojZVbU= +github.com/moby/moby/client v0.2.2-0.20251128103149-9a84135d5240/go.mod h1:O+/tw5d4a1Ha/ZA/tPxIZJapJRUS6LNZ1wiVRxYHyUE= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= +github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210105210732-16f7687f5001 h1:/dSxr6gT0FNI1MO5WLJo8mTmItROeOKTkDn+7OwWBos= -golang.org/x/sys v0.0.0-20210105210732-16f7687f5001/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210105161348-2e78108cf5f8 h1:tH9C0MON9YI3/KuD+u5+tQrQQ8px0MrcJ/avzeALw7o= -gopkg.in/yaml.v3 v3.0.0-20210105161348-2e78108cf5f8/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= +pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= +pgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= diff --git a/tools/specgen/modeldefs.go b/tools/specgen/modeldefs.go index 8498bce4..b61ae8e4 100644 --- a/tools/specgen/modeldefs.go +++ b/tools/specgen/modeldefs.go @@ -1,12 +1,13 @@ package main 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" + "github.com/moby/moby/api/types/container" + "github.com/moby/moby/api/types/network" + "github.com/moby/moby/api/types/plugin" + "github.com/moby/moby/api/types/registry" + "github.com/moby/moby/api/types/swarm" + "github.com/moby/moby/api/types/volume" + "github.com/moby/moby/client" ) // Args map @@ -189,13 +190,13 @@ type ContainersPruneParameters struct { } // ContainerExecCreateParameters for POST /containers/(id)/exec -type ContainerExecCreateParameters container.ExecOptions +type ContainerExecCreateParameters client.ExecCreateOptions // ContainerExecCreateResponse for POST /containers/(id)/exec type ContainerExecCreateResponse container.ExecCreateResponse // ContainerExecStartParameters for POST /exec/(id)/start -type ContainerExecStartParameters container.ExecStartOptions +type ContainerExecStartParameters client.ExecStartOptions // ImagesCreateParameters for POST /images/create type ImagesCreateParameters struct { @@ -276,10 +277,10 @@ type PluginGetPrivilegeParameters struct { // PluginInstallParameters for POST /plugins/pull type PluginInstallParameters struct { - Remote string `rest:"query,remote,required"` - Name string `rest:"query"` - RegistryAuth registry.AuthConfig `rest:"headers,X-Registry-Auth"` - Privileges types.PluginPrivileges `rest:"body,,required"` + Remote string `rest:"query,remote,required"` + Name string `rest:"query"` + RegistryAuth registry.AuthConfig `rest:"headers,X-Registry-Auth"` + Privileges plugin.Privileges `rest:"body,,required"` } // PluginRemoveParameters for DELETE /plugins/(name) @@ -299,9 +300,9 @@ type PluginDisableParameters struct { // PluginUpgradeParameters for POST /plugins/(name)/upgrade type PluginUpgradeParameters struct { - Remote string `rest:"query,remote,required"` - RegistryAuth registry.AuthConfig `rest:"headers,X-Registry-Auth"` - Privileges types.PluginPrivileges `rest:"body,,required"` + Remote string `rest:"query,remote,required"` + RegistryAuth registry.AuthConfig `rest:"headers,X-Registry-Auth"` + Privileges plugin.Privileges `rest:"body,,required"` } // PluginCreateParameters for POST /plugins/create diff --git a/tools/specgen/specgen.go b/tools/specgen/specgen.go index 531edfd5..30f269ae 100644 --- a/tools/specgen/specgen.go +++ b/tools/specgen/specgen.go @@ -9,18 +9,18 @@ import ( "strconv" "strings" - "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/build" - "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/events" - "github.com/docker/docker/api/types/image" - "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/swarm/runtime" - "github.com/docker/docker/api/types/system" - "github.com/docker/docker/api/types/volume" - "github.com/docker/docker/pkg/jsonmessage" + "github.com/moby/moby/api/types/container" + "github.com/moby/moby/api/types/events" + "github.com/moby/moby/api/types/image" + "github.com/moby/moby/api/types/jsonstream" + "github.com/moby/moby/api/types/network" + "github.com/moby/moby/api/types/plugin" + "github.com/moby/moby/api/types/registry" + "github.com/moby/moby/api/types/swarm" + "github.com/moby/moby/api/types/system" + "github.com/moby/moby/api/types/volume" + "github.com/moby/moby/client" + ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) var reflectedTypes = map[string]*CSModelType{} @@ -29,7 +29,22 @@ func typeToKey(t reflect.Type) string { return t.String() } +// TODO: This type is no longer public (the JSON bool field was removed). +// Only the interface is available. For now, create an empty type so the +// code compiles, and we'll figure out the proper implementation later: +// https://github.com/moby/moby/blob/master/client/image_load.go +type ImageLoadResult struct{} + var typesToDisambiguate = map[string]*CSModelType{ + typeToKey(reflect.TypeOf(ocispec.Descriptor{})): { + Properties: []CSProperty{ + { + Name: "Data", + Type: CSType{"", "IList", true}, + Attributes: []CSAttribute{{Type: CSType{"System.Text.Json.Serialization", "JsonConverter", false}, Arguments: []CSArgument{{Value: "typeof(Base64Converter)"}}}}, + }, + }, + }, typeToKey(reflect.TypeOf(container.Config{})): { Name: "ContainerConfig", Properties: []CSProperty{ @@ -58,12 +73,25 @@ var typesToDisambiguate = map[string]*CSModelType{ typeToKey(reflect.TypeOf(container.RestartPolicy{})): { Properties: []CSProperty{{Name: "Name", Type: CSType{"", "RestartPolicyKind", false}}}, }, - typeToKey(reflect.TypeOf(jsonmessage.JSONMessage{})): { + typeToKey(reflect.TypeOf(jsonstream.Error{})): { + Name: "JSONError", + }, + typeToKey(reflect.TypeOf(jsonstream.Message{})): { + Name: "JSONMessage", Properties: []CSProperty{ - {Name: "Time", Type: CSType{"System", "DateTime", false}}, - {Name: "Aux", Type: CSType{"", "ObjectExtensionData", false}}, + { + Name: "Time", + Type: CSType{"System", "DateTime", false}, + }, + { + Name: "Aux", + Type: CSType{"", "ObjectExtensionData", false}, + }, }, }, + typeToKey(reflect.TypeOf(jsonstream.Progress{})): { + Name: "JSONProgress", + }, typeToKey(reflect.TypeOf(CreateContainerParameters{})): { Properties: []CSProperty{ { @@ -73,27 +101,46 @@ var typesToDisambiguate = map[string]*CSModelType{ }, }, }, - typeToKey(reflect.TypeOf(volume.AccessMode{})): {Name: "VolumeAccessMode"}, - typeToKey(reflect.TypeOf(volume.Info{})): {Name: "VolumeInfo"}, - typeToKey(reflect.TypeOf(volume.Secret{})): {Name: "VolumeSecret"}, - typeToKey(reflect.TypeOf(volume.Topology{})): {Name: "VolumeTopology"}, - typeToKey(reflect.TypeOf(network.Task{})): {Name: "NetworkTask"}, - typeToKey(reflect.TypeOf(registry.AuthenticateOKBody{})): {Name: "AuthResponse"}, - typeToKey(reflect.TypeOf(registry.SearchResult{})): {Name: "ImageSearchResponse"}, - typeToKey(reflect.TypeOf(runtime.PluginPrivilege{})): {Name: "RuntimePluginPrivilege"}, - 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.IPAMConfig{})): {Name: "SwarmIPAMConfig"}, - typeToKey(reflect.TypeOf(swarm.JoinRequest{})): {Name: "SwarmJoinParameters"}, - typeToKey(reflect.TypeOf(swarm.Limit{})): {Name: "SwarmLimit"}, - typeToKey(reflect.TypeOf(swarm.Platform{})): {Name: "SwarmPlatform"}, - typeToKey(reflect.TypeOf(swarm.Node{})): {Name: "NodeListResponse"}, - typeToKey(reflect.TypeOf(swarm.NodeSpec{})): {Name: "NodeUpdateParameters"}, - 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(volume.AccessMode{})): {Name: "VolumeAccessMode"}, + typeToKey(reflect.TypeOf(volume.Info{})): {Name: "VolumeInfo"}, + typeToKey(reflect.TypeOf(volume.Secret{})): {Name: "VolumeSecret"}, + typeToKey(reflect.TypeOf(volume.Topology{})): {Name: "VolumeTopology"}, + typeToKey(reflect.TypeOf(registry.AuthResponse{})): {Name: "AuthResponse"}, + typeToKey(reflect.TypeOf(registry.SearchResult{})): {Name: "ImageSearchResponse"}, + typeToKey(reflect.TypeOf(swarm.RuntimeSpec{})): {Name: "SwarmRuntimeSpec"}, + typeToKey(reflect.TypeOf(swarm.ConfigSpec{})): { + Name: "SwarmConfigSpec", + Properties: []CSProperty{ + { + Name: "Data", + Type: CSType{"", "IList", true}, + Attributes: []CSAttribute{{Type: CSType{"System.Text.Json.Serialization", "JsonConverter", false}, Arguments: []CSArgument{{Value: "typeof(Base64Converter)"}}}}, + }, + }, + }, + typeToKey(reflect.TypeOf(swarm.SecretSpec{})): { + Name: "SwarmSecretSpec", + Properties: []CSProperty{ + { + Name: "Data", + Type: CSType{"", "IList", true}, + Attributes: []CSAttribute{{Type: CSType{"System.Text.Json.Serialization", "JsonConverter", false}, Arguments: []CSArgument{{Value: "typeof(Base64Converter)"}}}}, + }, + }, + }, + typeToKey(reflect.TypeOf(swarm.Driver{})): {Name: "SwarmDriver"}, + typeToKey(reflect.TypeOf(swarm.InitRequest{})): {Name: "SwarmInitParameters"}, + 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.Network{})): {Name: "SwarmNetwork"}, + typeToKey(reflect.TypeOf(swarm.Node{})): {Name: "NodeListResponse"}, + typeToKey(reflect.TypeOf(swarm.NodeSpec{})): {Name: "NodeUpdateParameters"}, + typeToKey(reflect.TypeOf(swarm.Platform{})): {Name: "SwarmPlatform"}, + 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{})): { Name: "TaskResponse", Properties: []CSProperty{ @@ -105,6 +152,20 @@ var typesToDisambiguate = map[string]*CSModelType{ {Name: "State", Type: CSType{"", "TaskState", false}}, }, }, + typeToKey(reflect.TypeOf(swarm.TLSInfo{})): { + Properties: []CSProperty{ + { + Name: "CertIssuerSubject", + Type: CSType{"", "IList", true}, + Attributes: []CSAttribute{{Type: CSType{"System.Text.Json.Serialization", "JsonConverter", false}, Arguments: []CSArgument{{Value: "typeof(Base64Converter)"}}}}, + }, + { + Name: "CertIssuerPublicKey", + Type: CSType{"", "IList", true}, + Attributes: []CSAttribute{{Type: CSType{"System.Text.Json.Serialization", "JsonConverter", false}, Arguments: []CSArgument{{Value: "typeof(Base64Converter)"}}}}, + }, + }, + }, typeToKey(reflect.TypeOf(swarm.UpdateConfig{})): {Name: "SwarmUpdateConfig"}, typeToKey(reflect.TypeOf(swarm.ConfigReference{})): {Name: "SwarmConfigReference"}, typeToKey(reflect.TypeOf(container.Summary{})): { @@ -119,9 +180,14 @@ var typesToDisambiguate = map[string]*CSModelType{ {Name: "Kind", Type: CSType{"", "FileSystemChangeKind", false}}, }, }, - typeToKey(reflect.TypeOf(container.ExecInspect{})): {Name: "ContainerExecInspectResponse"}, - typeToKey(reflect.TypeOf(container.InspectResponse{})): {Name: "ContainerInspectResponse"}, - typeToKey(reflect.TypeOf(container.ContainerJSONBase{})): { + typeToKey(reflect.TypeOf(container.ExecInspectResponse{})): { + Name: "ContainerExecInspectResponse", + Properties: []CSProperty{ + {Name: "DetachKeys", Type: CSType{"", "string", false}}, + }, + }, + typeToKey(reflect.TypeOf(container.InspectResponse{})): { + Name: "ContainerInspectResponse", Properties: []CSProperty{ {Name: "Created", Type: CSType{"System", "DateTime", false}}, }, @@ -142,29 +208,43 @@ var typesToDisambiguate = map[string]*CSModelType{ {Name: "Created", Type: CSType{"System", "DateTime", false}}, }, }, - typeToKey(reflect.TypeOf(image.LoadResponse{})): {Name: "ImagesLoadResponse"}, - typeToKey(reflect.TypeOf(image.PruneReport{})): {Name: "ImagesPruneResponse"}, + typeToKey(reflect.TypeOf(ImageLoadResult{})): {Name: "ImagesLoadResponse"}, + typeToKey(reflect.TypeOf(image.PruneReport{})): {Name: "ImagesPruneResponse"}, typeToKey(reflect.TypeOf(image.Summary{})): { Name: "ImagesListResponse", Properties: []CSProperty{ {Name: "Created", Type: CSType{"System", "DateTime", false}}, }, }, - typeToKey(reflect.TypeOf(system.Info{})): {Name: "SystemInfoResponse"}, - typeToKey(reflect.TypeOf(network.ConnectOptions{})): {Name: "NetworkConnectParameters"}, - typeToKey(reflect.TypeOf(network.CreateRequest{})): {Name: "NetworksCreateParameters"}, - typeToKey(reflect.TypeOf(network.CreateResponse{})): {Name: "NetworksCreateResponse"}, - typeToKey(reflect.TypeOf(network.DisconnectOptions{})): {Name: "NetworkDisconnectParameters"}, - typeToKey(reflect.TypeOf(network.PruneReport{})): {Name: "NetworksPruneResponse"}, - typeToKey(reflect.TypeOf(network.Inspect{})): {Name: "NetworkResponse"}, - typeToKey(reflect.TypeOf(types.PluginConfigInterface{})): { - Name: "PluginConfigInterface", + typeToKey(reflect.TypeOf(system.Info{})): {Name: "SystemInfoResponse"}, + typeToKey(reflect.TypeOf(client.NetworkConnectOptions{})): {Name: "NetworkConnectParameters"}, + typeToKey(reflect.TypeOf(client.NetworkDisconnectOptions{})): {Name: "NetworkDisconnectParameters"}, + typeToKey(reflect.TypeOf(network.CreateRequest{})): {Name: "NetworksCreateParameters"}, + typeToKey(reflect.TypeOf(network.CreateResponse{})): {Name: "NetworksCreateResponse"}, + typeToKey(reflect.TypeOf(network.Inspect{})): {Name: "NetworkResponse"}, + typeToKey(reflect.TypeOf(network.PruneReport{})): {Name: "NetworksPruneResponse"}, + typeToKey(reflect.TypeOf(network.Task{})): {Name: "NetworkTask"}, + typeToKey(reflect.TypeOf(plugin.Args{})): {Name: "PluginArgs"}, + typeToKey(reflect.TypeOf(plugin.CapabilityID{})): {Name: "PluginCapabilityID"}, + typeToKey(reflect.TypeOf(plugin.Config{})): {Name: "PluginConfig"}, + typeToKey(reflect.TypeOf(plugin.Device{})): {Name: "PluginDevice"}, + typeToKey(reflect.TypeOf(plugin.Env{})): {Name: "PluginEnv"}, + typeToKey(reflect.TypeOf(plugin.LinuxConfig{})): {Name: "PluginLinuxConfig"}, + typeToKey(reflect.TypeOf(plugin.Mount{})): {Name: "PluginMount"}, + typeToKey(reflect.TypeOf(plugin.NetworkConfig{})): {Name: "PluginNetworkConfig"}, + typeToKey(reflect.TypeOf(plugin.Privilege{})): {Name: "PluginPrivilege"}, + typeToKey(reflect.TypeOf(plugin.RootFS{})): {Name: "PluginRootFS"}, + typeToKey(reflect.TypeOf(plugin.Settings{})): {Name: "PluginSettings"}, + typeToKey(reflect.TypeOf(plugin.User{})): {Name: "PluginUser"}, + typeToKey(reflect.TypeOf(plugin.Interface{})): { + Name: "PluginInterface", Properties: []CSProperty{ {Name: "Types", Type: CSType{"System.Collections.Generic", "IList", false}}, }, }, + typeToKey(reflect.TypeOf(container.StatsResponse{})): {Name: "ContainerStatsResponse"}, - typeToKey(reflect.TypeOf(types.Version{})): {Name: "VersionResponse"}, + typeToKey(reflect.TypeOf(system.VersionResponse{})): {Name: "VersionResponse"}, typeToKey(reflect.TypeOf(volume.PruneReport{})): {Name: "VolumesPruneResponse"}, typeToKey(reflect.TypeOf(VolumeResponse{})): {Name: "VolumeResponse"}, } @@ -173,11 +253,11 @@ var dockerTypesToReflect = []reflect.Type{ // POST /auth reflect.TypeOf(registry.AuthConfig{}), - reflect.TypeOf(registry.AuthenticateOKBody{}), + reflect.TypeOf(registry.AuthResponse{}), // POST /build reflect.TypeOf(ImageBuildParameters{}), - reflect.TypeOf(build.ImageBuildResponse{}), + reflect.TypeOf(client.ImageBuildResult{}), // POST /commit reflect.TypeOf(CommitContainerChangesParameters{}), @@ -186,6 +266,7 @@ var dockerTypesToReflect = []reflect.Type{ // POST /containers/create reflect.TypeOf(CreateContainerParameters{}), reflect.TypeOf(container.CreateResponse{}), + reflect.TypeOf(network.Port{}), // GET /containers/json reflect.TypeOf(ContainersListParameters{}), @@ -266,7 +347,7 @@ var dockerTypesToReflect = []reflect.Type{ reflect.TypeOf(ContainerExecStartParameters{}), // GET /exec/(id)/json - reflect.TypeOf(container.ExecInspect{}), + reflect.TypeOf(container.ExecInspectResponse{}), // GET /events reflect.TypeOf(ContainerEventsParameters{}), @@ -275,7 +356,7 @@ var dockerTypesToReflect = []reflect.Type{ // POST /images/create reflect.TypeOf(ImagesCreateParameters{}), - reflect.TypeOf(jsonmessage.JSONMessage{}), + reflect.TypeOf(jsonstream.Message{}), // GET /images/get // TODO: stream @@ -287,7 +368,7 @@ var dockerTypesToReflect = []reflect.Type{ // POST /images/load // TODO: headers: application/x-tar body. reflect.TypeOf(ImageLoadParameters{}), - reflect.TypeOf(image.LoadResponse{}), + reflect.TypeOf(ImageLoadResult{}), // POST /images/prune reflect.TypeOf(ImagesPruneParameters{}), @@ -335,20 +416,20 @@ var dockerTypesToReflect = []reflect.Type{ // DELETE /networks/(id) // POST /networks/(id)/connect - reflect.TypeOf(network.ConnectOptions{}), + reflect.TypeOf(client.NetworkConnectOptions{}), // POST /networks/(id)/disconnect - reflect.TypeOf(network.DisconnectOptions{}), + reflect.TypeOf(client.NetworkDisconnectOptions{}), // GET /plugins // []Plugin reflect.TypeOf(PluginListParameters{}), - reflect.TypeOf(types.Plugin{}), + reflect.TypeOf(plugin.Plugin{}), // GET /plugins/privileges - // []PluginPrivilege + // []Privilege reflect.TypeOf(PluginGetPrivilegeParameters{}), - reflect.TypeOf(types.PluginPrivilege{}), + reflect.TypeOf(plugin.Privilege{}), // POST /plugins/pull // []PluginConfigArgs @@ -379,7 +460,7 @@ var dockerTypesToReflect = []reflect.Type{ reflect.TypeOf(PluginConfigureParameters{}), // GET /version - reflect.TypeOf(types.Version{}), + reflect.TypeOf(system.VersionResponse{}), // GET /volumes reflect.TypeOf(VolumesListParameters{}),