From e4c295301ef45f82f52d5c2c4cb783be8dfafc13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarl=20Andr=C3=A9=20H=C3=BCbenthal?= Date: Mon, 4 Nov 2024 13:11:51 +0100 Subject: [PATCH 1/5] refactor evaluate_response --- docker_engine_api/api/container.ex | 77 +++++++++++++--------------- docker_engine_api/request_builder.ex | 51 ++++++------------ lib/docker/api.ex | 4 +- 3 files changed, 54 insertions(+), 78 deletions(-) diff --git a/docker_engine_api/api/container.ex b/docker_engine_api/api/container.ex index c3719b5..b6d21c1 100644 --- a/docker_engine_api/api/container.ex +++ b/docker_engine_api/api/container.ex @@ -46,7 +46,7 @@ defmodule DockerEngineAPI.Api.Container do @doc """ Get information about files in a container - A response header `X-Docker-Container-Path-Stat` is returned, containing a base64 - encoded JSON object with some filesystem header information about the path. + A response header `X-Docker-Container-Path-Stat` is returned, containing a base64 - encoded JSON object with some filesystem header information about the path. ### Parameters @@ -81,16 +81,16 @@ defmodule DockerEngineAPI.Api.Container do @doc """ Attach to a container - Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached. Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything. See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details. ### Hijacking This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket. This is the response from the daemon for an attach request: ``` HTTP/1.1 200 OK Content-Type: application/vnd.docker.raw-stream [STREAM] ``` After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server. To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. For example, the client sends this request to upgrade the connection: ``` POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 Upgrade: tcp Connection: Upgrade ``` The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream: ``` HTTP/1.1 101 UPGRADED Content-Type: application/vnd.docker.raw-stream Connection: Upgrade Upgrade: tcp [STREAM] ``` ### Stream format When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the HTTP Content-Type header is set to application/vnd.docker.multiplexed-stream and the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload. The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`). It is encoded on the first eight bytes like this: ```go header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} ``` `STREAM_TYPE` can be: - 0: `stdin` (is written on `stdout`) - 1: `stdout` - 2: `stderr` `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian. Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`. The simplest way to implement this protocol is the following: 1. Read 8 bytes. 2. Choose `stdout` or `stderr` depending on the first byte. 3. Extract the frame size from the last four bytes. 4. Read the extracted size and output it on the correct output. 5. Goto 1. ### Stream format when using a TTY When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`. + Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached. Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything. See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details. ### Hijacking This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket. This is the response from the daemon for an attach request: ``` HTTP/1.1 200 OK Content-Type: application/vnd.docker.raw-stream [STREAM] ``` After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server. To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. For example, the client sends this request to upgrade the connection: ``` POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 Upgrade: tcp Connection: Upgrade ``` The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream: ``` HTTP/1.1 101 UPGRADED Content-Type: application/vnd.docker.raw-stream Connection: Upgrade Upgrade: tcp [STREAM] ``` ### Stream format When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the HTTP Content-Type header is set to application/vnd.docker.multiplexed-stream and the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload. The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`). It is encoded on the first eight bytes like this: ```go header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} ``` `STREAM_TYPE` can be: - 0: `stdin` (is written on `stdout`) - 1: `stdout` - 2: `stderr` `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian. Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`. The simplest way to implement this protocol is the following: 1. Read 8 bytes. 2. Choose `stdout` or `stderr` depending on the first byte. 3. Extract the frame size from the last four bytes. 4. Read the extracted size and output it on the correct output. 5. Goto 1. ### Stream format when using a TTY When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`. ### Parameters - `connection` (DockerEngineAPI.Connection): Connection to server - `id` (String.t): ID or name of the container - `opts` (keyword): Optional parameters - - `:detachKeys` (String.t): Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. - - `:logs` (boolean()): Replay previous logs from the container. This is useful for attaching to a container that has started and you want to output everything since the container started. If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. - - `:stream` (boolean()): Stream attached streams from the time the request was made onwards. + - `:detachKeys` (String.t): Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + - `:logs` (boolean()): Replay previous logs from the container. This is useful for attaching to a container that has started and you want to output everything since the container started. If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. + - `:stream` (boolean()): Stream attached streams from the time the request was made onwards. - `:stdin` (boolean()): Attach to `stdin` - `:stdout` (boolean()): Attach to `stdout` - `:stderr` (boolean()): Attach to `stderr` @@ -138,7 +138,7 @@ defmodule DockerEngineAPI.Api.Container do - `connection` (DockerEngineAPI.Connection): Connection to server - `id` (String.t): ID or name of the container - `opts` (keyword): Optional parameters - - `:detachKeys` (String.t): Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`. + - `:detachKeys` (String.t): Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`. - `:logs` (boolean()): Return logs - `:stream` (boolean()): Return stream - `:stdin` (boolean()): Attach to `stdin` @@ -181,7 +181,7 @@ defmodule DockerEngineAPI.Api.Container do @doc """ Get changes on a container’s filesystem - Returns which files in a container's filesystem have been added, deleted, or modified. The `Kind` of modification can be one of: - `0`: Modified (\"C\") - `1`: Added (\"A\") - `2`: Deleted (\"D\") + Returns which files in a container's filesystem have been added, deleted, or modified. The `Kind` of modification can be one of: - `0`: Modified (\"C\") - `1`: Added (\"A\") - `2`: Deleted (\"D\") ### Parameters @@ -219,8 +219,8 @@ defmodule DockerEngineAPI.Api.Container do - `connection` (DockerEngineAPI.Connection): Connection to server - `body` (ContainerCreateRequest): Container to create - `opts` (keyword): Optional parameters - - `:name` (String.t): Assign the specified name to the container. Must match `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. - - `:platform` (String.t): Platform in the format `os[/arch[/variant]]` used for image lookup. When specified, the daemon checks if the requested image is present in the local image cache with the given OS and Architecture, and otherwise returns a `404` status. If the option is not set, the host's native OS and Architecture are used to look up the image in the image cache. However, if no platform is passed and the given image does exist in the local image cache, but its OS or architecture does not match, the container is created with the available image, and a warning is added to the `Warnings` field in the response, for example; WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested + - `:name` (String.t): Assign the specified name to the container. Must match `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. + - `:platform` (String.t): Platform in the format `os[/arch[/variant]]` used for image lookup. When specified, the daemon checks if the requested image is present in the local image cache with the given OS and Architecture, and otherwise returns a `404` status. If the option is not set, the host's native OS and Architecture are used to look up the image in the image cache. However, if no platform is passed and the given image does exist in the local image cache, but its OS or architecture does not match, the container is created with the available image, and a warning is added to the `Warnings` field in the response, for example; WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested ### Returns @@ -368,14 +368,14 @@ defmodule DockerEngineAPI.Api.Container do @doc """ Kill a container - Send a POSIX signal to a container, defaulting to killing to the container. + Send a POSIX signal to a container, defaulting to killing to the container. ### Parameters - `connection` (DockerEngineAPI.Connection): Connection to server - `id` (String.t): ID or name of the container - `opts` (keyword): Optional parameters - - `:signal` (String.t): Signal to send to the container as an integer or string (e.g. `SIGINT`). + - `:signal` (String.t): Signal to send to the container as an integer or string (e.g. `SIGINT`). ### Returns @@ -408,16 +408,16 @@ defmodule DockerEngineAPI.Api.Container do @doc """ List containers - Returns a list of containers. For details on the format, see the [inspect endpoint](#operation/ContainerInspect). Note that it uses a different, smaller representation of a container than inspecting a single container. For example, the list of linked containers is not propagated . + Returns a list of containers. For details on the format, see the [inspect endpoint](#operation/ContainerInspect). Note that it uses a different, smaller representation of a container than inspecting a single container. For example, the list of linked containers is not propagated . ### Parameters - `connection` (DockerEngineAPI.Connection): Connection to server - `opts` (keyword): Optional parameters - - `:all` (boolean()): Return all containers. By default, only running containers are shown. - - `:limit` (integer()): Return this number of most recently created containers, including non-running ones. - - `:size` (boolean()): Return the size of container as fields `SizeRw` and `SizeRootFs`. - - `:filters` (String.t): Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{\"status\": [\"paused\"]}` will only return paused containers. Available filters: - `ancestor`=(`[:]`, ``, or ``) - `before`=(`` or ``) - `expose`=(`[/]`|`/[]`) - `exited=` containers with exit code of `` - `health`=(`starting`|`healthy`|`unhealthy`|`none`) - `id=` a container's ID - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) - `is-task=`(`true`|`false`) - `label=key` or `label=\"key=value\"` of a container label - `name=` a container's name - `network`=(`` or ``) - `publish`=(`[/]`|`/[]`) - `since`=(`` or ``) - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - `volume`=(`` or ``) + - `:all` (boolean()): Return all containers. By default, only running containers are shown. + - `:limit` (integer()): Return this number of most recently created containers, including non-running ones. + - `:size` (boolean()): Return the size of container as fields `SizeRw` and `SizeRootFs`. + - `:filters` (String.t): Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{\"status\": [\"paused\"]}` will only return paused containers. Available filters: - `ancestor`=(`[:]`, ``, or ``) - `before`=(`` or ``) - `expose`=(`[/]`|`/[]`) - `exited=` containers with exit code of `` - `health`=(`starting`|`healthy`|`unhealthy`|`none`) - `id=` a container's ID - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) - `is-task=`(`true`|`false`) - `label=key` or `label=\"key=value\"` of a container label - `name=` a container's name - `network`=(`` or ``) - `publish`=(`[/]`|`/[]`) - `since`=(`` or ``) - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - `volume`=(`` or ``) ### Returns @@ -451,7 +451,7 @@ defmodule DockerEngineAPI.Api.Container do @doc """ Get container logs - Get `stdout` and `stderr` logs from a container. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. + Get `stdout` and `stderr` logs from a container. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. ### Parameters @@ -464,14 +464,9 @@ defmodule DockerEngineAPI.Api.Container do - `:since` (integer()): Only return logs since this time, as a UNIX timestamp - `:until` (integer()): Only return logs before this time, as a UNIX timestamp - `:timestamps` (boolean()): Add timestamps to every log line - - `:tail` (String.t): Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. - - ### Returns - - - `{:ok, String.t}` on success - - `{:error, Tesla.Env.t}` on failure + - `:tail` (String.t): Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. """ - @spec container_logs(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} + @spec container_logs(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t | Tesla.Env.t} | {:error, Tesla.Env.t} def container_logs(connection, id, opts \\ []) do optional_params = %{ :follow => :query, @@ -501,7 +496,7 @@ defmodule DockerEngineAPI.Api.Container do @doc """ Pause a container - Use the freezer cgroup to suspend all processes in a container. Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the freezer cgroup the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. + Use the freezer cgroup to suspend all processes in a container. Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the freezer cgroup the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. ### Parameters @@ -539,7 +534,7 @@ defmodule DockerEngineAPI.Api.Container do - `connection` (DockerEngineAPI.Connection): Connection to server - `opts` (keyword): Optional parameters - - `:filters` (String.t): Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `until=` Prune containers created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune containers with (or without, in case `label!=...` is used) the specified labels. + - `:filters` (String.t): Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `until=` Prune containers created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune containers with (or without, in case `label!=...` is used) the specified labels. ### Returns @@ -652,7 +647,7 @@ defmodule DockerEngineAPI.Api.Container do - `connection` (DockerEngineAPI.Connection): Connection to server - `id` (String.t): ID or name of the container - `opts` (keyword): Optional parameters - - `:signal` (String.t): Signal to send to the container as an integer or string (e.g. `SIGINT`). + - `:signal` (String.t): Signal to send to the container as an integer or string (e.g. `SIGINT`). - `:t` (integer()): Number of seconds to wait before killing the container ### Returns @@ -692,7 +687,7 @@ defmodule DockerEngineAPI.Api.Container do - `connection` (DockerEngineAPI.Connection): Connection to server - `id` (String.t): ID or name of the container - `opts` (keyword): Optional parameters - - `:detachKeys` (String.t): Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + - `:detachKeys` (String.t): Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. ### Returns @@ -725,15 +720,15 @@ defmodule DockerEngineAPI.Api.Container do @doc """ Get container stats based on resource usage - This endpoint returns a live stream of a container’s resource usage statistics. The `precpu_stats` is the CPU statistic of the *previous* read, and is used to calculate the CPU usage percentage. It is not an exact copy of the `cpu_stats` field. If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is nil then for compatibility with older daemons the length of the corresponding `cpu_usage.percpu_usage` array should be used. On a cgroup v2 host, the following fields are not set * `blkio_stats`: all fields other than `io_service_bytes_recursive` * `cpu_stats`: `cpu_usage.percpu_usage` * `memory_stats`: `max_usage` and `failcnt` Also, `memory_stats.stats` fields are incompatible with cgroup v1. To calculate the values shown by the `stats` command of the docker cli tool the following formulas can be used: * used_memory = `memory_stats.usage - memory_stats.stats.cache` * available_memory = `memory_stats.limit` * Memory usage % = `(used_memory / available_memory) * 100.0` * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` * number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` + This endpoint returns a live stream of a container’s resource usage statistics. The `precpu_stats` is the CPU statistic of the *previous* read, and is used to calculate the CPU usage percentage. It is not an exact copy of the `cpu_stats` field. If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is nil then for compatibility with older daemons the length of the corresponding `cpu_usage.percpu_usage` array should be used. On a cgroup v2 host, the following fields are not set * `blkio_stats`: all fields other than `io_service_bytes_recursive` * `cpu_stats`: `cpu_usage.percpu_usage` * `memory_stats`: `max_usage` and `failcnt` Also, `memory_stats.stats` fields are incompatible with cgroup v1. To calculate the values shown by the `stats` command of the docker cli tool the following formulas can be used: * used_memory = `memory_stats.usage - memory_stats.stats.cache` * available_memory = `memory_stats.limit` * Memory usage % = `(used_memory / available_memory) * 100.0` * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` * number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` ### Parameters - `connection` (DockerEngineAPI.Connection): Connection to server - `id` (String.t): ID or name of the container - `opts` (keyword): Optional parameters - - `:stream` (boolean()): Stream the output. If false, the stats will be output once and then it will disconnect. - - `:"one-shot"` (boolean()): Only get a single stat instead of waiting for 2 cycles. Must be used with `stream=false`. + - `:stream` (boolean()): Stream the output. If false, the stats will be output once and then it will disconnect. + - `:"one-shot"` (boolean()): Only get a single stat instead of waiting for 2 cycles. Must be used with `stream=false`. ### Returns @@ -771,7 +766,7 @@ defmodule DockerEngineAPI.Api.Container do - `connection` (DockerEngineAPI.Connection): Connection to server - `id` (String.t): ID or name of the container - `opts` (keyword): Optional parameters - - `:signal` (String.t): Signal to send to the container as an integer or string (e.g. `SIGINT`). + - `:signal` (String.t): Signal to send to the container as an integer or string (e.g. `SIGINT`). - `:t` (integer()): Number of seconds to wait before killing the container ### Returns @@ -806,7 +801,7 @@ defmodule DockerEngineAPI.Api.Container do @doc """ List processes running inside a container - On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. + On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. ### Parameters @@ -877,13 +872,13 @@ defmodule DockerEngineAPI.Api.Container do @doc """ Update a container - Change various configuration options of a container without having to recreate it. + Change various configuration options of a container without having to recreate it. ### Parameters - `connection` (DockerEngineAPI.Connection): Connection to server - `id` (String.t): ID or name of the container - - `update` (ContainerUpdateRequest): + - `update` (ContainerUpdateRequest): - `opts` (keyword): Optional parameters ### Returns @@ -918,7 +913,7 @@ defmodule DockerEngineAPI.Api.Container do - `connection` (DockerEngineAPI.Connection): Connection to server - `id` (String.t): ID or name of the container - `opts` (keyword): Optional parameters - - `:condition` (String.t): Wait until a container state reaches the given condition. Defaults to `not-running` if omitted or empty. + - `:condition` (String.t): Wait until a container state reaches the given condition. Defaults to `not-running` if omitted or empty. ### Returns @@ -951,17 +946,17 @@ defmodule DockerEngineAPI.Api.Container do @doc """ Extract an archive of files or folders to a directory in a container - Upload a tar archive to be extracted to a path in the filesystem of container id. `path` parameter is asserted to be a directory. If it exists as a file, 400 error will be returned with message \"not a directory\". + Upload a tar archive to be extracted to a path in the filesystem of container id. `path` parameter is asserted to be a directory. If it exists as a file, 400 error will be returned with message \"not a directory\". ### Parameters - `connection` (DockerEngineAPI.Connection): Connection to server - `id` (String.t): ID or name of the container - - `path` (String.t): Path to a directory in the container to extract the archive’s contents into. - - `input_stream` (String.t): The input stream must be a tar archive compressed with one of the following algorithms: `identity` (no compression), `gzip`, `bzip2`, or `xz`. + - `path` (String.t): Path to a directory in the container to extract the archive’s contents into. + - `input_stream` (String.t): The input stream must be a tar archive compressed with one of the following algorithms: `identity` (no compression), `gzip`, `bzip2`, or `xz`. - `opts` (keyword): Optional parameters - - `:noOverwriteDirNonDir` (String.t): If `1`, `true`, or `True` then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa. - - `:copyUIDGID` (String.t): If `1`, `true`, then it will copy UID/GID maps to the dest file or dir + - `:noOverwriteDirNonDir` (String.t): If `1`, `true`, or `True` then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa. + - `:copyUIDGID` (String.t): If `1`, `true`, then it will copy UID/GID maps to the dest file or dir ### Returns diff --git a/docker_engine_api/request_builder.ex b/docker_engine_api/request_builder.ex index 23304fd..d8831f9 100644 --- a/docker_engine_api/request_builder.ex +++ b/docker_engine_api/request_builder.ex @@ -152,46 +152,27 @@ defmodule DockerEngineAPI.RequestBuilder do @type response_mapping :: [{status_code, false | %{} | module()}] @doc """ - Evaluate the response from a Tesla request. - Decode the response for a Tesla request. + Evaluate and decode the response from a Tesla request. - ### Parameters - - - `result` (Tesla.Env.result()): The response from Tesla.request/2. - - `mapping` ([{http_status, struct}]): The mapping for status to struct for decoding. - - ### Returns - - - `{:ok, struct}` or `{:ok, Tesla.Env.t()}` on success - - `{:error, term}` on failure + - `result` (Tesla.Env.result()): The Tesla response. + - `mapping` ([{http_status, struct}]): Status-to-struct mapping for decoding. """ - @spec evaluate_response(Tesla.Env.result(), response_mapping) :: {:ok, struct()} | Tesla.Env.result() + @spec evaluate_response(Tesla.Env.result(), response_mapping) :: {:ok, struct()} | {:ok, Tesla.Env.t} | {:error, Tesla.Env.t} def evaluate_response({:ok, %Tesla.Env{} = env}, mapping) do - resolve_mapping(env, mapping, nil) - end - - def evaluate_response({:error, _} = error, _), do: error - - defp resolve_mapping(%Tesla.Env{status: status} = env, [{mapping_status, struct} | _], _) - when status == mapping_status do - decode(env, struct) + status = env.status + mapping + |> Enum.find_value({:error, env}, fn + {^status, struct} -> decode(env, struct) + _ -> {:error, env} + end) end - defp resolve_mapping(env, [{:default, struct} | tail], _), do: resolve_mapping(env, tail, struct) - - defp resolve_mapping(env, [_ | tail], struct), do: resolve_mapping(env, tail, struct) - - defp resolve_mapping(env, [], nil), do: {:error, env} - - defp resolve_mapping(env, [], struct), do: decode(env, struct) + def evaluate_response({:error, %Tesla.Env{} = env}, _), do: {:error, env} - defp decode(%Tesla.Env{} = env, false), do: {:ok, env} - - defp decode(%Tesla.Env{body: body}, %{}) do - DockerEngineAPI.Deserializer.jason_decode(body) - end - - defp decode(%Tesla.Env{body: body}, module) do - DockerEngineAPI.Deserializer.jason_decode(body, module) + defp decode(%Tesla.Env{body: body} = env, struct) do + case struct do + false -> {:ok, env} + module -> DockerEngineAPI.Deserializer.jason_decode(body, module) + end end end diff --git a/lib/docker/api.ex b/lib/docker/api.ex index 3286054..6ef50d7 100644 --- a/lib/docker/api.ex +++ b/lib/docker/api.ex @@ -156,8 +156,8 @@ defmodule Testcontainers.Docker.Api do {:ok, %DockerEngineAPI.Model.ErrorResponse{message: message}} -> {:error, message} - {:error, message} -> - {:error, message} + {:error, error} -> + {:error, :unknown, error} end end From 9828e9aa468152fc0d69ff0fa94a64c4285e9a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarl=20Andr=C3=A9=20H=C3=BCbenthal?= Date: Mon, 4 Nov 2024 16:48:13 +0100 Subject: [PATCH 2/5] fix --- docker_engine_api/request_builder.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker_engine_api/request_builder.ex b/docker_engine_api/request_builder.ex index d8831f9..3710a34 100644 --- a/docker_engine_api/request_builder.ex +++ b/docker_engine_api/request_builder.ex @@ -157,13 +157,13 @@ defmodule DockerEngineAPI.RequestBuilder do - `result` (Tesla.Env.result()): The Tesla response. - `mapping` ([{http_status, struct}]): Status-to-struct mapping for decoding. """ - @spec evaluate_response(Tesla.Env.result(), response_mapping) :: {:ok, struct()} | {:ok, Tesla.Env.t} | {:error, Tesla.Env.t} + @spec evaluate_response(Tesla.Env.result(), response_mapping) :: {:ok, struct() | Tesla.Env.t} | {:error, Tesla.Env.t} def evaluate_response({:ok, %Tesla.Env{} = env}, mapping) do status = env.status mapping |> Enum.find_value({:error, env}, fn {^status, struct} -> decode(env, struct) - _ -> {:error, env} + _ -> nil end) end From 92cca5a7e2305533e19d410c743d2078b1f8b5c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarl=20Andr=C3=A9=20H=C3=BCbenthal?= Date: Mon, 4 Nov 2024 20:21:39 +0100 Subject: [PATCH 3/5] delete code --- docker_engine_api/api/config.ex | 191 -------- docker_engine_api/api/container.ex | 29 +- docker_engine_api/api/distribution.ex | 43 -- docker_engine_api/api/image.ex | 38 +- docker_engine_api/api/node.ex | 159 ------- docker_engine_api/api/plugin.ex | 416 ------------------ docker_engine_api/api/secret.ex | 191 -------- docker_engine_api/api/service.ex | 258 ----------- docker_engine_api/api/session.ex | 43 -- docker_engine_api/api/swarm.ex | 252 ----------- docker_engine_api/api/system.ex | 245 ----------- docker_engine_api/api/task.ex | 130 ------ docker_engine_api/api/volume.ex | 225 ---------- docker_engine_api/model/build_cache.ex | 42 -- docker_engine_api/model/build_info.ex | 41 -- .../model/build_prune_response.ex | 24 - docker_engine_api/model/cluster_info.ex | 45 -- docker_engine_api/model/cluster_volume.ex | 40 -- .../model/cluster_volume_info.ex | 28 -- .../cluster_volume_publish_status_inner.ex | 26 -- .../model/cluster_volume_spec.ex | 27 -- .../model/cluster_volume_spec_access_mode.ex | 39 -- ..._access_mode_accessibility_requirements.ex | 24 - ..._volume_spec_access_mode_capacity_range.ex | 24 - ...r_volume_spec_access_mode_secrets_inner.ex | 24 - docker_engine_api/model/commit.ex | 24 - docker_engine_api/model/config.ex | 34 -- .../model/config_create_request.ex | 31 -- docker_engine_api/model/config_spec.ex | 31 -- .../model/distribution_inspect.ex | 28 -- docker_engine_api/model/driver.ex | 24 - docker_engine_api/model/join_tokens.ex | 24 - docker_engine_api/model/limit.ex | 26 -- docker_engine_api/model/node.ex | 43 -- docker_engine_api/model/node_description.ex | 36 -- docker_engine_api/model/node_spec.ex | 28 -- docker_engine_api/model/node_state.ex | 22 - docker_engine_api/model/node_status.ex | 29 -- docker_engine_api/model/object_version.ex | 22 - docker_engine_api/model/oci_descriptor.ex | 26 -- docker_engine_api/model/oci_platform.ex | 30 -- docker_engine_api/model/peer_node.ex | 24 - docker_engine_api/model/platform.ex | 24 - docker_engine_api/model/plugin.ex | 36 -- docker_engine_api/model/plugin_config.ex | 62 --- docker_engine_api/model/plugin_config_args.ex | 28 -- .../model/plugin_config_interface.ex | 29 -- .../model/plugin_config_linux.ex | 29 -- .../model/plugin_config_network.ex | 22 - .../model/plugin_config_rootfs.ex | 24 - docker_engine_api/model/plugin_config_user.ex | 24 - docker_engine_api/model/plugin_device.ex | 28 -- docker_engine_api/model/plugin_env.ex | 28 -- .../model/plugin_interface_type.ex | 26 -- docker_engine_api/model/plugin_mount.ex | 34 -- docker_engine_api/model/plugin_privilege.ex | 26 -- docker_engine_api/model/plugin_settings.ex | 32 -- docker_engine_api/model/plugins_info.ex | 28 -- docker_engine_api/model/progress_detail.ex | 24 - docker_engine_api/model/push_image_info.ex | 31 -- docker_engine_api/model/reachability.ex | 22 - .../model/registry_service_config.ex | 33 -- docker_engine_api/model/resource_object.ex | 29 -- docker_engine_api/model/resources.ex | 92 ---- .../resources_blkio_weight_device_inner.ex | 24 - .../model/resources_ulimits_inner.ex | 26 -- docker_engine_api/model/runtime.ex | 24 - docker_engine_api/model/secret.ex | 34 -- .../model/secret_create_request.ex | 34 -- docker_engine_api/model/secret_spec.ex | 34 -- docker_engine_api/model/service.ex | 46 -- .../model/service_create_request.ex | 44 -- .../model/service_create_response.ex | 24 - docker_engine_api/model/service_endpoint.ex | 31 -- .../service_endpoint_virtual_ips_inner.ex | 24 - docker_engine_api/model/service_job_status.ex | 27 -- .../model/service_service_status.ex | 26 -- docker_engine_api/model/service_spec.ex | 44 -- docker_engine_api/model/service_spec_mode.ex | 32 -- .../model/service_spec_mode_replicated.ex | 22 - .../model/service_spec_mode_replicated_job.ex | 24 - .../model/service_spec_rollback_config.ex | 32 -- .../model/service_spec_update_config.ex | 32 -- .../model/service_update_request.ex | 44 -- .../model/service_update_response.ex | 22 - .../model/service_update_status.ex | 28 -- docker_engine_api/model/swarm.ex | 48 -- docker_engine_api/model/swarm_info.ex | 43 -- docker_engine_api/model/swarm_init_request.ex | 39 -- docker_engine_api/model/swarm_join_request.ex | 30 -- docker_engine_api/model/swarm_spec.ex | 44 -- .../model/swarm_spec_ca_config.ex | 33 -- ...swarm_spec_ca_config_external_cas_inner.ex | 28 -- .../model/swarm_spec_dispatcher.ex | 22 - .../model/swarm_spec_encryption_config.ex | 22 - .../model/swarm_spec_orchestration.ex | 22 - docker_engine_api/model/swarm_spec_raft.ex | 30 -- .../model/swarm_spec_task_defaults.ex | 25 -- .../swarm_spec_task_defaults_log_driver.ex | 24 - .../model/swarm_unlock_request.ex | 22 - .../model/system_auth_response.ex | 24 - .../model/system_data_usage_response.ex | 36 -- docker_engine_api/model/system_info.ex | 151 ------- ...system_info_default_address_pools_inner.ex | 24 - docker_engine_api/model/system_version.ex | 48 -- .../model/system_version_components_inner.ex | 26 -- .../model/system_version_platform.ex | 22 - docker_engine_api/model/task.ex | 56 --- docker_engine_api/model/task_spec.ex | 50 --- .../model/task_spec_container_spec.ex | 83 ---- .../task_spec_container_spec_configs_inner.ex | 31 -- ..._spec_container_spec_configs_inner_file.ex | 28 -- .../task_spec_container_spec_dns_config.ex | 26 -- .../task_spec_container_spec_privileges.ex | 28 -- ...ntainer_spec_privileges_credential_spec.ex | 26 -- ...tainer_spec_privileges_se_linux_context.ex | 30 -- .../task_spec_container_spec_secrets_inner.ex | 29 -- ..._spec_container_spec_secrets_inner_file.ex | 28 -- .../model/task_spec_log_driver.ex | 24 - .../task_spec_network_attachment_spec.ex | 22 - .../model/task_spec_placement.ex | 32 -- .../task_spec_placement_preferences_inner.ex | 25 -- ...spec_placement_preferences_inner_spread.ex | 22 - .../model/task_spec_plugin_spec.ex | 31 -- .../model/task_spec_resources.ex | 28 -- .../model/task_spec_restart_policy.ex | 28 -- docker_engine_api/model/task_state.ex | 22 - docker_engine_api/model/task_status.ex | 34 -- .../model/task_status_container_status.ex | 26 -- docker_engine_api/model/throttle_device.ex | 24 - docker_engine_api/model/tls_info.ex | 26 -- .../model/unlock_key_response.ex | 22 - docker_engine_api/model/volume.ex | 44 -- .../model/volume_create_options.ex | 33 -- .../model/volume_list_response.ex | 27 -- .../model/volume_prune_response.ex | 24 - .../model/volume_update_request.ex | 25 -- docker_engine_api/model/volume_usage_data.ex | 24 - docker_engine_api/request_builder.ex | 3 +- lib/container.ex | 10 +- .../protocols/container_builder_helper.ex | 2 +- lib/container/rabbitmq_container.ex | 8 +- lib/docker/api.ex | 22 +- lib/mix/tasks/testcontainers/test.ex | 4 +- test/container/rabbitmq_container_test.exs | 24 + test/container_test.exs | 4 +- 146 files changed, 86 insertions(+), 6187 deletions(-) delete mode 100644 docker_engine_api/api/config.ex delete mode 100644 docker_engine_api/api/distribution.ex delete mode 100644 docker_engine_api/api/node.ex delete mode 100644 docker_engine_api/api/plugin.ex delete mode 100644 docker_engine_api/api/secret.ex delete mode 100644 docker_engine_api/api/service.ex delete mode 100644 docker_engine_api/api/session.ex delete mode 100644 docker_engine_api/api/swarm.ex delete mode 100644 docker_engine_api/api/system.ex delete mode 100644 docker_engine_api/api/task.ex delete mode 100644 docker_engine_api/api/volume.ex delete mode 100644 docker_engine_api/model/build_cache.ex delete mode 100644 docker_engine_api/model/build_info.ex delete mode 100644 docker_engine_api/model/build_prune_response.ex delete mode 100644 docker_engine_api/model/cluster_info.ex delete mode 100644 docker_engine_api/model/cluster_volume.ex delete mode 100644 docker_engine_api/model/cluster_volume_info.ex delete mode 100644 docker_engine_api/model/cluster_volume_publish_status_inner.ex delete mode 100644 docker_engine_api/model/cluster_volume_spec.ex delete mode 100644 docker_engine_api/model/cluster_volume_spec_access_mode.ex delete mode 100644 docker_engine_api/model/cluster_volume_spec_access_mode_accessibility_requirements.ex delete mode 100644 docker_engine_api/model/cluster_volume_spec_access_mode_capacity_range.ex delete mode 100644 docker_engine_api/model/cluster_volume_spec_access_mode_secrets_inner.ex delete mode 100644 docker_engine_api/model/commit.ex delete mode 100644 docker_engine_api/model/config.ex delete mode 100644 docker_engine_api/model/config_create_request.ex delete mode 100644 docker_engine_api/model/config_spec.ex delete mode 100644 docker_engine_api/model/distribution_inspect.ex delete mode 100644 docker_engine_api/model/driver.ex delete mode 100644 docker_engine_api/model/join_tokens.ex delete mode 100644 docker_engine_api/model/limit.ex delete mode 100644 docker_engine_api/model/node.ex delete mode 100644 docker_engine_api/model/node_description.ex delete mode 100644 docker_engine_api/model/node_spec.ex delete mode 100644 docker_engine_api/model/node_state.ex delete mode 100644 docker_engine_api/model/node_status.ex delete mode 100644 docker_engine_api/model/object_version.ex delete mode 100644 docker_engine_api/model/oci_descriptor.ex delete mode 100644 docker_engine_api/model/oci_platform.ex delete mode 100644 docker_engine_api/model/peer_node.ex delete mode 100644 docker_engine_api/model/platform.ex delete mode 100644 docker_engine_api/model/plugin.ex delete mode 100644 docker_engine_api/model/plugin_config.ex delete mode 100644 docker_engine_api/model/plugin_config_args.ex delete mode 100644 docker_engine_api/model/plugin_config_interface.ex delete mode 100644 docker_engine_api/model/plugin_config_linux.ex delete mode 100644 docker_engine_api/model/plugin_config_network.ex delete mode 100644 docker_engine_api/model/plugin_config_rootfs.ex delete mode 100644 docker_engine_api/model/plugin_config_user.ex delete mode 100644 docker_engine_api/model/plugin_device.ex delete mode 100644 docker_engine_api/model/plugin_env.ex delete mode 100644 docker_engine_api/model/plugin_interface_type.ex delete mode 100644 docker_engine_api/model/plugin_mount.ex delete mode 100644 docker_engine_api/model/plugin_privilege.ex delete mode 100644 docker_engine_api/model/plugin_settings.ex delete mode 100644 docker_engine_api/model/plugins_info.ex delete mode 100644 docker_engine_api/model/progress_detail.ex delete mode 100644 docker_engine_api/model/push_image_info.ex delete mode 100644 docker_engine_api/model/reachability.ex delete mode 100644 docker_engine_api/model/registry_service_config.ex delete mode 100644 docker_engine_api/model/resource_object.ex delete mode 100644 docker_engine_api/model/resources.ex delete mode 100644 docker_engine_api/model/resources_blkio_weight_device_inner.ex delete mode 100644 docker_engine_api/model/resources_ulimits_inner.ex delete mode 100644 docker_engine_api/model/runtime.ex delete mode 100644 docker_engine_api/model/secret.ex delete mode 100644 docker_engine_api/model/secret_create_request.ex delete mode 100644 docker_engine_api/model/secret_spec.ex delete mode 100644 docker_engine_api/model/service.ex delete mode 100644 docker_engine_api/model/service_create_request.ex delete mode 100644 docker_engine_api/model/service_create_response.ex delete mode 100644 docker_engine_api/model/service_endpoint.ex delete mode 100644 docker_engine_api/model/service_endpoint_virtual_ips_inner.ex delete mode 100644 docker_engine_api/model/service_job_status.ex delete mode 100644 docker_engine_api/model/service_service_status.ex delete mode 100644 docker_engine_api/model/service_spec.ex delete mode 100644 docker_engine_api/model/service_spec_mode.ex delete mode 100644 docker_engine_api/model/service_spec_mode_replicated.ex delete mode 100644 docker_engine_api/model/service_spec_mode_replicated_job.ex delete mode 100644 docker_engine_api/model/service_spec_rollback_config.ex delete mode 100644 docker_engine_api/model/service_spec_update_config.ex delete mode 100644 docker_engine_api/model/service_update_request.ex delete mode 100644 docker_engine_api/model/service_update_response.ex delete mode 100644 docker_engine_api/model/service_update_status.ex delete mode 100644 docker_engine_api/model/swarm.ex delete mode 100644 docker_engine_api/model/swarm_info.ex delete mode 100644 docker_engine_api/model/swarm_init_request.ex delete mode 100644 docker_engine_api/model/swarm_join_request.ex delete mode 100644 docker_engine_api/model/swarm_spec.ex delete mode 100644 docker_engine_api/model/swarm_spec_ca_config.ex delete mode 100644 docker_engine_api/model/swarm_spec_ca_config_external_cas_inner.ex delete mode 100644 docker_engine_api/model/swarm_spec_dispatcher.ex delete mode 100644 docker_engine_api/model/swarm_spec_encryption_config.ex delete mode 100644 docker_engine_api/model/swarm_spec_orchestration.ex delete mode 100644 docker_engine_api/model/swarm_spec_raft.ex delete mode 100644 docker_engine_api/model/swarm_spec_task_defaults.ex delete mode 100644 docker_engine_api/model/swarm_spec_task_defaults_log_driver.ex delete mode 100644 docker_engine_api/model/swarm_unlock_request.ex delete mode 100644 docker_engine_api/model/system_auth_response.ex delete mode 100644 docker_engine_api/model/system_data_usage_response.ex delete mode 100644 docker_engine_api/model/system_info.ex delete mode 100644 docker_engine_api/model/system_info_default_address_pools_inner.ex delete mode 100644 docker_engine_api/model/system_version.ex delete mode 100644 docker_engine_api/model/system_version_components_inner.ex delete mode 100644 docker_engine_api/model/system_version_platform.ex delete mode 100644 docker_engine_api/model/task.ex delete mode 100644 docker_engine_api/model/task_spec.ex delete mode 100644 docker_engine_api/model/task_spec_container_spec.ex delete mode 100644 docker_engine_api/model/task_spec_container_spec_configs_inner.ex delete mode 100644 docker_engine_api/model/task_spec_container_spec_configs_inner_file.ex delete mode 100644 docker_engine_api/model/task_spec_container_spec_dns_config.ex delete mode 100644 docker_engine_api/model/task_spec_container_spec_privileges.ex delete mode 100644 docker_engine_api/model/task_spec_container_spec_privileges_credential_spec.ex delete mode 100644 docker_engine_api/model/task_spec_container_spec_privileges_se_linux_context.ex delete mode 100644 docker_engine_api/model/task_spec_container_spec_secrets_inner.ex delete mode 100644 docker_engine_api/model/task_spec_container_spec_secrets_inner_file.ex delete mode 100644 docker_engine_api/model/task_spec_log_driver.ex delete mode 100644 docker_engine_api/model/task_spec_network_attachment_spec.ex delete mode 100644 docker_engine_api/model/task_spec_placement.ex delete mode 100644 docker_engine_api/model/task_spec_placement_preferences_inner.ex delete mode 100644 docker_engine_api/model/task_spec_placement_preferences_inner_spread.ex delete mode 100644 docker_engine_api/model/task_spec_plugin_spec.ex delete mode 100644 docker_engine_api/model/task_spec_resources.ex delete mode 100644 docker_engine_api/model/task_spec_restart_policy.ex delete mode 100644 docker_engine_api/model/task_state.ex delete mode 100644 docker_engine_api/model/task_status.ex delete mode 100644 docker_engine_api/model/task_status_container_status.ex delete mode 100644 docker_engine_api/model/throttle_device.ex delete mode 100644 docker_engine_api/model/tls_info.ex delete mode 100644 docker_engine_api/model/unlock_key_response.ex delete mode 100644 docker_engine_api/model/volume.ex delete mode 100644 docker_engine_api/model/volume_create_options.ex delete mode 100644 docker_engine_api/model/volume_list_response.ex delete mode 100644 docker_engine_api/model/volume_prune_response.ex delete mode 100644 docker_engine_api/model/volume_update_request.ex delete mode 100644 docker_engine_api/model/volume_usage_data.ex diff --git a/docker_engine_api/api/config.ex b/docker_engine_api/api/config.ex deleted file mode 100644 index 91b3633..0000000 --- a/docker_engine_api/api/config.ex +++ /dev/null @@ -1,191 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Api.Config do - @moduledoc """ - API calls for all endpoints tagged `Config`. - """ - - alias DockerEngineAPI.Connection - import DockerEngineAPI.RequestBuilder - - @doc """ - Create a config - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:body` (ConfigCreateRequest): - - ### Returns - - - `{:ok, DockerEngineAPI.Model.IdResponse.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec config_create(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.IdResponse.t} | {:error, Tesla.Env.t} - def config_create(connection, opts \\ []) do - optional_params = %{ - :body => :body - } - - request = - %{} - |> method(:post) - |> url("/configs/create") - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {201, DockerEngineAPI.Model.IdResponse}, - {409, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Delete a config - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): ID of the config - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec config_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def config_delete(connection, id, _opts \\ []) do - request = - %{} - |> method(:delete) - |> url("/configs/#{id}") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {204, false}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Inspect a config - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): ID of the config - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, DockerEngineAPI.Model.Config.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec config_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.Config.t} | {:error, Tesla.Env.t} - def config_inspect(connection, id, _opts \\ []) do - request = - %{} - |> method(:get) - |> url("/configs/#{id}") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Config}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - List configs - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the configs list. Available filters: - `id=` - `label= or label==value` - `name=` - `names=` - - ### Returns - - - `{:ok, [%Config{}, ...]}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec config_list(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, list(DockerEngineAPI.Model.Config.t)} | {:error, Tesla.Env.t} - def config_list(connection, opts \\ []) do - optional_params = %{ - :filters => :query - } - - request = - %{} - |> method(:get) - |> url("/configs") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Config}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Update a Config - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): The ID or name of the config - - `version` (integer()): The version number of the config object being updated. This is required to avoid conflicting writes. - - `opts` (keyword): Optional parameters - - `:body` (ConfigSpec): The spec of the config to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the [ConfigInspect endpoint](#operation/ConfigInspect) response values. - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec config_update(Tesla.Env.client, String.t, integer(), keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def config_update(connection, id, version, opts \\ []) do - optional_params = %{ - :body => :body - } - - request = - %{} - |> method(:post) - |> url("/configs/#{id}/update") - |> add_param(:query, :version, version) - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {400, DockerEngineAPI.Model.ErrorResponse}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end -end diff --git a/docker_engine_api/api/container.ex b/docker_engine_api/api/container.ex index b6d21c1..5b26330 100644 --- a/docker_engine_api/api/container.ex +++ b/docker_engine_api/api/container.ex @@ -418,13 +418,8 @@ defmodule DockerEngineAPI.Api.Container do - `:limit` (integer()): Return this number of most recently created containers, including non-running ones. - `:size` (boolean()): Return the size of container as fields `SizeRw` and `SizeRootFs`. - `:filters` (String.t): Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{\"status\": [\"paused\"]}` will only return paused containers. Available filters: - `ancestor`=(`[:]`, ``, or ``) - `before`=(`` or ``) - `expose`=(`[/]`|`/[]`) - `exited=` containers with exit code of `` - `health`=(`starting`|`healthy`|`unhealthy`|`none`) - `id=` a container's ID - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) - `is-task=`(`true`|`false`) - `label=key` or `label=\"key=value\"` of a container label - `name=` a container's name - `network`=(`` or ``) - `publish`=(`[/]`|`/[]`) - `since`=(`` or ``) - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - `volume`=(`` or ``) - - ### Returns - - - `{:ok, [%ContainerSummary{}, ...]}` on success - - `{:error, Tesla.Env.t}` on failure """ - @spec container_list(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, list(DockerEngineAPI.Model.ContainerSummary.t)} | {:error, Tesla.Env.t} + @spec container_list(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t() | list(DockerEngineAPI.Model.ContainerSummary.t())} | {:error, term()} def container_list(connection, opts \\ []) do optional_params = %{ :all => :query, @@ -466,7 +461,7 @@ defmodule DockerEngineAPI.Api.Container do - `:timestamps` (boolean()): Add timestamps to every log line - `:tail` (String.t): Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. """ - @spec container_logs(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t | Tesla.Env.t} | {:error, Tesla.Env.t} + @spec container_logs(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t() | Tesla.Env.t()} | {:error, term()} def container_logs(connection, id, opts \\ []) do optional_params = %{ :follow => :query, @@ -509,7 +504,7 @@ defmodule DockerEngineAPI.Api.Container do - `{:ok, nil}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec container_pause(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + @spec container_pause(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t() | Tesla.Env.t()} | {:error, term()} def container_pause(connection, id, _opts \\ []) do request = %{} @@ -541,7 +536,7 @@ defmodule DockerEngineAPI.Api.Container do - `{:ok, DockerEngineAPI.Model.ContainerPruneResponse.t}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec container_prune(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.ContainerPruneResponse.t} | {:error, Tesla.Env.t} + @spec container_prune(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t() | DockerEngineAPI.Model.ContainerPruneResponse.t()} | {:error, term()} def container_prune(connection, opts \\ []) do optional_params = %{ :filters => :query @@ -578,7 +573,7 @@ defmodule DockerEngineAPI.Api.Container do - `{:ok, nil}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec container_rename(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + @spec container_rename(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t() | Tesla.Env.t()} | {:error, term()} def container_rename(connection, id, name, _opts \\ []) do request = %{} @@ -615,7 +610,7 @@ defmodule DockerEngineAPI.Api.Container do - `{:ok, nil}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec container_resize(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + @spec container_resize(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t() | Tesla.Env.t()} | {:error, term()} def container_resize(connection, id, opts \\ []) do optional_params = %{ :h => :query, @@ -655,7 +650,7 @@ defmodule DockerEngineAPI.Api.Container do - `{:ok, nil}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec container_restart(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + @spec container_restart(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t() | Tesla.Env.t()} | {:error, term()} def container_restart(connection, id, opts \\ []) do optional_params = %{ :signal => :query, @@ -694,7 +689,7 @@ defmodule DockerEngineAPI.Api.Container do - `{:ok, nil}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec container_start(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + @spec container_start(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t() | Tesla.Env.t()} | {:error, term()} def container_start(connection, id, opts \\ []) do optional_params = %{ :detachKeys => :query @@ -735,7 +730,7 @@ defmodule DockerEngineAPI.Api.Container do - `{:ok, map()}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec container_stats(Tesla.Env.client, String.t, keyword()) :: {:ok, Map.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + @spec container_stats(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t() | %{}} | {:error, term()} def container_stats(connection, id, opts \\ []) do optional_params = %{ :stream => :query, @@ -774,7 +769,7 @@ defmodule DockerEngineAPI.Api.Container do - `{:ok, nil}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec container_stop(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + @spec container_stop(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t() | Tesla.Env.t()} | {:error, term()} def container_stop(connection, id, opts \\ []) do optional_params = %{ :signal => :query, @@ -815,7 +810,7 @@ defmodule DockerEngineAPI.Api.Container do - `{:ok, DockerEngineAPI.Model.ContainerTopResponse.t}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec container_top(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ContainerTopResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + @spec container_top(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ContainerTopResponse.t() | DockerEngineAPI.Model.ErrorResponse.t()} | {:error, term()} def container_top(connection, id, opts \\ []) do optional_params = %{ :ps_args => :query @@ -963,7 +958,7 @@ defmodule DockerEngineAPI.Api.Container do - `{:ok, nil}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec put_container_archive(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + @spec put_container_archive(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t() | Tesla.Env.t()} | {:error, term()} def put_container_archive(connection, id, path, input_stream, opts \\ []) do optional_params = %{ :noOverwriteDirNonDir => :query, diff --git a/docker_engine_api/api/distribution.ex b/docker_engine_api/api/distribution.ex deleted file mode 100644 index 3e34454..0000000 --- a/docker_engine_api/api/distribution.ex +++ /dev/null @@ -1,43 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Api.Distribution do - @moduledoc """ - API calls for all endpoints tagged `Distribution`. - """ - - alias DockerEngineAPI.Connection - import DockerEngineAPI.RequestBuilder - - @doc """ - Get image information from the registry - Return image digest and platform information by contacting the registry. - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `name` (String.t): Image name or id - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, DockerEngineAPI.Model.DistributionInspect.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec distribution_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.DistributionInspect.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def distribution_inspect(connection, name, _opts \\ []) do - request = - %{} - |> method(:get) - |> url("/distribution/#{name}/json") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.DistributionInspect}, - {401, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end -end diff --git a/docker_engine_api/api/image.ex b/docker_engine_api/api/image.ex index 748dbbc..9229f51 100644 --- a/docker_engine_api/api/image.ex +++ b/docker_engine_api/api/image.ex @@ -18,7 +18,7 @@ defmodule DockerEngineAPI.Api.Image do - `opts` (keyword): Optional parameters - `:"keep-storage"` (integer()): Amount of disk space in bytes to keep for cache - `:all` (boolean()): Remove all types of build cache - - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the list of build cache objects. Available filters: - `until=` remove cache older than ``. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon's local time. - `id=` - `parent=` - `type=` - `description=` - `inuse` - `shared` - `private` + - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the list of build cache objects. Available filters: - `until=` remove cache older than ``. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon's local time. - `id=` - `parent=` - `type=` - `description=` - `inuse` - `shared` - `private` ### Returns @@ -51,7 +51,7 @@ defmodule DockerEngineAPI.Api.Image do @doc """ Build an image - Build an image from a tar archive with a `Dockerfile` in it. The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/). The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output. The build is canceled if the client drops the connection by quitting or being killed. + Build an image from a tar archive with a `Dockerfile` in it. The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/). The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output. The build is canceled if the client drops the connection by quitting or being killed. ### Parameters @@ -73,13 +73,13 @@ defmodule DockerEngineAPI.Api.Image do - `:cpusetcpus` (String.t): CPUs in which to allow execution (e.g., `0-3`, `0,1`). - `:cpuperiod` (integer()): The length of a CPU period in microseconds. - `:cpuquota` (integer()): Microseconds of CPU time that the container can get in a CPU period. - - `:buildargs` (String.t): JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. For example, the build arg `FOO=bar` would become `{\"FOO\":\"bar\"}` in JSON. This would result in the query parameter `buildargs={\"FOO\":\"bar\"}`. Note that `{\"FOO\":\"bar\"}` should be URI component encoded. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + - `:buildargs` (String.t): JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. For example, the build arg `FOO=bar` would become `{\"FOO\":\"bar\"}` in JSON. This would result in the query parameter `buildargs={\"FOO\":\"bar\"}`. Note that `{\"FOO\":\"bar\"}` should be URI component encoded. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) - `:shmsize` (integer()): Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB. - `:squash` (boolean()): Squash the resulting images layers into a single layer. *(Experimental release only.)* - `:labels` (String.t): Arbitrary key/value labels to set on the image, as a JSON map of string pairs. - - `:networkmode` (String.t): Sets the networking mode for the run commands during build. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name or ID to which this container should connect to. - - `:"Content-type"` (String.t): - - `:"X-Registry-Config"` (String.t): This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: ``` { \"docker.example.com\": { \"username\": \"janedoe\", \"password\": \"hunter2\" }, \"https://index.docker.io/v1/\": { \"username\": \"mobydock\", \"password\": \"conta1n3rize14\" } } ``` Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API. + - `:networkmode` (String.t): Sets the networking mode for the run commands during build. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name or ID to which this container should connect to. + - `:"Content-type"` (String.t): + - `:"X-Registry-Config"` (String.t): This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: ``` { \"docker.example.com\": { \"username\": \"janedoe\", \"password\": \"hunter2\" }, \"https://index.docker.io/v1/\": { \"username\": \"mobydock\", \"password\": \"conta1n3rize14\" } } ``` Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API. - `:platform` (String.t): Platform in the format os[/arch[/variant]] - `:target` (String.t): Target build stage - `:outputs` (String.t): BuildKit output configuration @@ -203,9 +203,9 @@ defmodule DockerEngineAPI.Api.Image do - `:repo` (String.t): Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image. - `:tag` (String.t): Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled. - `:message` (String.t): Set commit message for imported image. - - `:"X-Registry-Auth"` (String.t): A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication) for details. - - `:changes` ([String.t]): Apply `Dockerfile` instructions to the image that is created, for example: `changes=ENV DEBUG=true`. Note that `ENV DEBUG=true` should be URI component encoded. Supported `Dockerfile` instructions: `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR` - - `:platform` (String.t): Platform in the format os[/arch[/variant]]. When used in combination with the `fromImage` option, the daemon checks if the given image is present in the local image cache with the given OS and Architecture, and otherwise attempts to pull the image. If the option is not set, the host's native OS and Architecture are used. If the given image does not exist in the local image cache, the daemon attempts to pull the image with the host's native OS and Architecture. If the given image does exists in the local image cache, but its OS or architecture does not match, a warning is produced. When used with the `fromSrc` option to import an image from an archive, this option sets the platform information for the imported image. If the option is not set, the host's native OS and Architecture are used for the imported image. + - `:"X-Registry-Auth"` (String.t): A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication) for details. + - `:changes` ([String.t]): Apply `Dockerfile` instructions to the image that is created, for example: `changes=ENV DEBUG=true`. Note that `ENV DEBUG=true` should be URI component encoded. Supported `Dockerfile` instructions: `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR` + - `:platform` (String.t): Platform in the format os[/arch[/variant]]. When used in combination with the `fromImage` option, the daemon checks if the given image is present in the local image cache with the given OS and Architecture, and otherwise attempts to pull the image. If the option is not set, the host's native OS and Architecture are used. If the given image does not exist in the local image cache, the daemon attempts to pull the image with the host's native OS and Architecture. If the given image does exists in the local image cache, but its OS or architecture does not match, a warning is produced. When used with the `fromSrc` option to import an image from an archive, this option sets the platform information for the imported image. If the option is not set, the host's native OS and Architecture are used for the imported image. - `:body` (String.t): Image content if the value `-` has been specified in fromSrc query parameter ### Returns @@ -213,7 +213,7 @@ defmodule DockerEngineAPI.Api.Image do - `{:ok, nil}` on success - `{:error, Tesla.Env.t}` on failure """ - @spec image_create(Tesla.Env.client, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} + @spec image_create(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t() | Tesla.Env.t()} | {:error, term()} def image_create(connection, opts \\ []) do optional_params = %{ :fromImage => :query, @@ -246,7 +246,7 @@ defmodule DockerEngineAPI.Api.Image do @doc """ Remove an image - Remove an image, along with any untagged parent images that were referenced by that image. Images can't be removed if they have descendant images, are being used by a running container or are being used by a build. + Remove an image, along with any untagged parent images that were referenced by that image. Images can't be removed if they have descendant images, are being used by a running container or are being used by a build. ### Parameters @@ -287,7 +287,7 @@ defmodule DockerEngineAPI.Api.Image do @doc """ Export an image - Get a tarball containing all images and metadata for a repository. If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced. ### Image tarball format An image tarball contains one directory per image layer (named using its long ID), each containing these files: - `VERSION`: currently `1.0` - the file format version - `json`: detailed layer information, similar to `docker inspect layer_id` - `layer.tar`: A tarfile containing the filesystem changes in this layer The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. ```json { \"hello-world\": { \"latest\": \"565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1\" } } ``` + Get a tarball containing all images and metadata for a repository. If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced. ### Image tarball format An image tarball contains one directory per image layer (named using its long ID), each containing these files: - `VERSION`: currently `1.0` - the file format version - `json`: detailed layer information, similar to `docker inspect layer_id` - `layer.tar`: A tarfile containing the filesystem changes in this layer The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. ```json { \"hello-world\": { \"latest\": \"565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1\" } } ``` ### Parameters @@ -318,7 +318,7 @@ defmodule DockerEngineAPI.Api.Image do @doc """ Export several images - Get a tarball containing all images and metadata for several image repositories. For each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID. For details on the format, see the [export image endpoint](#operation/ImageGet). + Get a tarball containing all images and metadata for several image repositories. For each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID. For details on the format, see the [export image endpoint](#operation/ImageGet). ### Parameters @@ -425,7 +425,7 @@ defmodule DockerEngineAPI.Api.Image do - `connection` (DockerEngineAPI.Connection): Connection to server - `opts` (keyword): Optional parameters - `:all` (boolean()): Show all images. Only images from a final layer (no children) are shown by default. - - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - `before`=(`[:]`, `` or ``) - `dangling=true` - `label=key` or `label=\"key=value\"` of an image label - `reference`=(`[:]`) - `since`=(`[:]`, `` or ``) + - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - `before`=(`[:]`, `` or ``) - `dangling=true` - `label=key` or `label=\"key=value\"` of an image label - `reference`=(`[:]`) - `since`=(`[:]`, `` or ``) - `:"shared-size"` (boolean()): Compute and show shared size as a `SharedSize` field on each image. - `:digests` (boolean()): Show digest information as a `RepoDigests` field on each image. @@ -460,7 +460,7 @@ defmodule DockerEngineAPI.Api.Image do @doc """ Import images - Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). + Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). ### Parameters @@ -504,7 +504,7 @@ defmodule DockerEngineAPI.Api.Image do - `connection` (DockerEngineAPI.Connection): Connection to server - `opts` (keyword): Optional parameters - - `:filters` (String.t): Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `dangling=` When set to `true` (or `1`), prune only unused *and* untagged images. When set to `false` (or `0`), all unused images are pruned. - `until=` Prune images created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune images with (or without, in case `label!=...` is used) the specified labels. + - `:filters` (String.t): Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `dangling=` When set to `true` (or `1`), prune only unused *and* untagged images. When set to `false` (or `0`), all unused images are pruned. - `until=` Prune images created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune images with (or without, in case `label!=...` is used) the specified labels. ### Returns @@ -535,13 +535,13 @@ defmodule DockerEngineAPI.Api.Image do @doc """ Push an image - Push an image to a registry. If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`. The push is cancelled if the HTTP connection is closed. + Push an image to a registry. If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`. The push is cancelled if the HTTP connection is closed. ### Parameters - `connection` (DockerEngineAPI.Connection): Connection to server - `name` (String.t): Image name or ID. - - `x_registry_auth` (String.t): A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication) for details. + - `x_registry_auth` (String.t): A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication) for details. - `opts` (keyword): Optional parameters - `:tag` (String.t): The tag to associate with the image on the registry. @@ -584,7 +584,7 @@ defmodule DockerEngineAPI.Api.Image do - `term` (String.t): Term to search - `opts` (keyword): Optional parameters - `:limit` (integer()): Maximum number of results to return - - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - `is-automated=(true|false)` - `is-official=(true|false)` - `stars=` Matches images that has at least 'number' stars. + - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - `is-automated=(true|false)` - `is-official=(true|false)` - `stars=` Matches images that has at least 'number' stars. ### Returns diff --git a/docker_engine_api/api/node.ex b/docker_engine_api/api/node.ex deleted file mode 100644 index 45fb04d..0000000 --- a/docker_engine_api/api/node.ex +++ /dev/null @@ -1,159 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Api.Node do - @moduledoc """ - API calls for all endpoints tagged `Node`. - """ - - alias DockerEngineAPI.Connection - import DockerEngineAPI.RequestBuilder - - @doc """ - Delete a node - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): The ID or name of the node - - `opts` (keyword): Optional parameters - - `:force` (boolean()): Force remove a node from the swarm - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec node_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def node_delete(connection, id, opts \\ []) do - optional_params = %{ - :force => :query - } - - request = - %{} - |> method(:delete) - |> url("/nodes/#{id}") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Inspect a node - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): The ID or name of the node - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, DockerEngineAPI.Model.Node.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec node_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Node.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def node_inspect(connection, id, _opts \\ []) do - request = - %{} - |> method(:get) - |> url("/nodes/#{id}") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Node}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - List nodes - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:filters` (String.t): Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). Available filters: - `id=` - `label=` - `membership=`(`accepted`|`pending`)` - `name=` - `node.label=` - `role=`(`manager`|`worker`)` - - ### Returns - - - `{:ok, [%Node{}, ...]}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec node_list(Tesla.Env.client, keyword()) :: {:ok, list(DockerEngineAPI.Model.Node.t)} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def node_list(connection, opts \\ []) do - optional_params = %{ - :filters => :query - } - - request = - %{} - |> method(:get) - |> url("/nodes") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Node}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Update a node - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): The ID of the node - - `version` (integer()): The version number of the node object being updated. This is required to avoid conflicting writes. - - `opts` (keyword): Optional parameters - - `:body` (NodeSpec): - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec node_update(Tesla.Env.client, String.t, integer(), keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def node_update(connection, id, version, opts \\ []) do - optional_params = %{ - :body => :body - } - - request = - %{} - |> method(:post) - |> url("/nodes/#{id}/update") - |> add_param(:query, :version, version) - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {400, DockerEngineAPI.Model.ErrorResponse}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end -end diff --git a/docker_engine_api/api/plugin.ex b/docker_engine_api/api/plugin.ex deleted file mode 100644 index 7015c3d..0000000 --- a/docker_engine_api/api/plugin.ex +++ /dev/null @@ -1,416 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Api.Plugin do - @moduledoc """ - API calls for all endpoints tagged `Plugin`. - """ - - alias DockerEngineAPI.Connection - import DockerEngineAPI.RequestBuilder - - @doc """ - Get plugin privileges - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `remote` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, [%PluginPrivilege{}, ...]}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec get_plugin_privileges(Tesla.Env.client, String.t, keyword()) :: {:ok, list(DockerEngineAPI.Model.PluginPrivilege.t)} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def get_plugin_privileges(connection, remote, _opts \\ []) do - request = - %{} - |> method(:get) - |> url("/plugins/privileges") - |> add_param(:query, :remote, remote) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.PluginPrivilege}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Create a plugin - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - - `opts` (keyword): Optional parameters - - `:body` (String.t): Path to tar containing plugin rootfs and manifest - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec plugin_create(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def plugin_create(connection, name, opts \\ []) do - optional_params = %{ - :body => :body - } - - request = - %{} - |> method(:post) - |> url("/plugins/create") - |> add_param(:query, :name, name) - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {204, false}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Remove a plugin - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - - `opts` (keyword): Optional parameters - - `:force` (boolean()): Disable the plugin before removing. This may result in issues if the plugin is in use by a container. - - ### Returns - - - `{:ok, DockerEngineAPI.Model.Plugin.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec plugin_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Plugin.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def plugin_delete(connection, name, opts \\ []) do - optional_params = %{ - :force => :query - } - - request = - %{} - |> method(:delete) - |> url("/plugins/#{name}") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Plugin}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Disable a plugin - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - - `opts` (keyword): Optional parameters - - `:force` (boolean()): Force disable a plugin even if still in use. - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec plugin_disable(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def plugin_disable(connection, name, opts \\ []) do - optional_params = %{ - :force => :query - } - - request = - %{} - |> method(:post) - |> url("/plugins/#{name}/disable") - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Enable a plugin - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - - `opts` (keyword): Optional parameters - - `:timeout` (integer()): Set the HTTP client timeout (in seconds) - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec plugin_enable(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def plugin_enable(connection, name, opts \\ []) do - optional_params = %{ - :timeout => :query - } - - request = - %{} - |> method(:post) - |> url("/plugins/#{name}/enable") - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Inspect a plugin - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, DockerEngineAPI.Model.Plugin.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec plugin_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Plugin.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def plugin_inspect(connection, name, _opts \\ []) do - request = - %{} - |> method(:get) - |> url("/plugins/#{name}/json") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Plugin}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - List plugins - Returns information about installed plugins. - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the plugin list. Available filters: - `capability=` - `enable=|` - - ### Returns - - - `{:ok, [%Plugin{}, ...]}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec plugin_list(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, list(DockerEngineAPI.Model.Plugin.t)} | {:error, Tesla.Env.t} - def plugin_list(connection, opts \\ []) do - optional_params = %{ - :filters => :query - } - - request = - %{} - |> method(:get) - |> url("/plugins") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Plugin}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Install a plugin - Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `remote` (String.t): Remote reference for plugin to install. The `:latest` tag is optional, and is used as the default if omitted. - - `opts` (keyword): Optional parameters - - `:name` (String.t): Local name for the pulled plugin. The `:latest` tag is optional, and is used as the default if omitted. - - `:"X-Registry-Auth"` (String.t): A base64url-encoded auth configuration to use when pulling a plugin from a registry. Refer to the [authentication section](#section/Authentication) for details. - - `:body` ([DockerEngineAPI.Model.PluginPrivilege.t]): - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec plugin_pull(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def plugin_pull(connection, remote, opts \\ []) do - optional_params = %{ - :name => :query, - :"X-Registry-Auth" => :headers, - :body => :body - } - - request = - %{} - |> method(:post) - |> url("/plugins/pull") - |> add_param(:query, :remote, remote) - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {204, false}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Push a plugin - Push a plugin to the registry. - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec plugin_push(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def plugin_push(connection, name, _opts \\ []) do - request = - %{} - |> method(:post) - |> url("/plugins/#{name}/push") - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Configure a plugin - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - - `opts` (keyword): Optional parameters - - `:body` ([String.t]): - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec plugin_set(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def plugin_set(connection, name, opts \\ []) do - optional_params = %{ - :body => :body - } - - request = - %{} - |> method(:post) - |> url("/plugins/#{name}/set") - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {204, false}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Upgrade a plugin - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `name` (String.t): The name of the plugin. The `:latest` tag is optional, and is the default if omitted. - - `remote` (String.t): Remote reference to upgrade to. The `:latest` tag is optional, and is used as the default if omitted. - - `opts` (keyword): Optional parameters - - `:"X-Registry-Auth"` (String.t): A base64url-encoded auth configuration to use when pulling a plugin from a registry. Refer to the [authentication section](#section/Authentication) for details. - - `:body` ([DockerEngineAPI.Model.PluginPrivilege.t]): - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec plugin_upgrade(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def plugin_upgrade(connection, name, remote, opts \\ []) do - optional_params = %{ - :"X-Registry-Auth" => :headers, - :body => :body - } - - request = - %{} - |> method(:post) - |> url("/plugins/#{name}/upgrade") - |> add_param(:query, :remote, remote) - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {204, false}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end -end diff --git a/docker_engine_api/api/secret.ex b/docker_engine_api/api/secret.ex deleted file mode 100644 index 61da30d..0000000 --- a/docker_engine_api/api/secret.ex +++ /dev/null @@ -1,191 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Api.Secret do - @moduledoc """ - API calls for all endpoints tagged `Secret`. - """ - - alias DockerEngineAPI.Connection - import DockerEngineAPI.RequestBuilder - - @doc """ - Create a secret - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:body` (SecretCreateRequest): - - ### Returns - - - `{:ok, DockerEngineAPI.Model.IdResponse.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec secret_create(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.IdResponse.t} | {:error, Tesla.Env.t} - def secret_create(connection, opts \\ []) do - optional_params = %{ - :body => :body - } - - request = - %{} - |> method(:post) - |> url("/secrets/create") - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {201, DockerEngineAPI.Model.IdResponse}, - {409, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Delete a secret - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): ID of the secret - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec secret_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def secret_delete(connection, id, _opts \\ []) do - request = - %{} - |> method(:delete) - |> url("/secrets/#{id}") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {204, false}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Inspect a secret - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): ID of the secret - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, DockerEngineAPI.Model.Secret.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec secret_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Secret.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def secret_inspect(connection, id, _opts \\ []) do - request = - %{} - |> method(:get) - |> url("/secrets/#{id}") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Secret}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - List secrets - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters: - `id=` - `label= or label==value` - `name=` - `names=` - - ### Returns - - - `{:ok, [%Secret{}, ...]}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec secret_list(Tesla.Env.client, keyword()) :: {:ok, list(DockerEngineAPI.Model.Secret.t)} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def secret_list(connection, opts \\ []) do - optional_params = %{ - :filters => :query - } - - request = - %{} - |> method(:get) - |> url("/secrets") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Secret}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Update a Secret - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): The ID or name of the secret - - `version` (integer()): The version number of the secret object being updated. This is required to avoid conflicting writes. - - `opts` (keyword): Optional parameters - - `:body` (SecretSpec): The spec of the secret to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the [SecretInspect endpoint](#operation/SecretInspect) response values. - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec secret_update(Tesla.Env.client, String.t, integer(), keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def secret_update(connection, id, version, opts \\ []) do - optional_params = %{ - :body => :body - } - - request = - %{} - |> method(:post) - |> url("/secrets/#{id}/update") - |> add_param(:query, :version, version) - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {400, DockerEngineAPI.Model.ErrorResponse}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end -end diff --git a/docker_engine_api/api/service.ex b/docker_engine_api/api/service.ex deleted file mode 100644 index e82f052..0000000 --- a/docker_engine_api/api/service.ex +++ /dev/null @@ -1,258 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Api.Service do - @moduledoc """ - API calls for all endpoints tagged `Service`. - """ - - alias DockerEngineAPI.Connection - import DockerEngineAPI.RequestBuilder - - @doc """ - Create a service - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `body` (ServiceCreateRequest): - - `opts` (keyword): Optional parameters - - `:"X-Registry-Auth"` (String.t): A base64url-encoded auth configuration for pulling from private registries. Refer to the [authentication section](#section/Authentication) for details. - - ### Returns - - - `{:ok, DockerEngineAPI.Model.ServiceCreateResponse.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec service_create(Tesla.Env.client, DockerEngineAPI.Model.ServiceCreateRequest.t, keyword()) :: {:ok, DockerEngineAPI.Model.ServiceCreateResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def service_create(connection, body, opts \\ []) do - optional_params = %{ - :"X-Registry-Auth" => :headers - } - - request = - %{} - |> method(:post) - |> url("/services/create") - |> add_param(:body, :body, body) - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {201, DockerEngineAPI.Model.ServiceCreateResponse}, - {400, DockerEngineAPI.Model.ErrorResponse}, - {403, DockerEngineAPI.Model.ErrorResponse}, - {409, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Delete a service - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): ID or name of service. - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec service_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def service_delete(connection, id, _opts \\ []) do - request = - %{} - |> method(:delete) - |> url("/services/#{id}") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Inspect a service - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): ID or name of service. - - `opts` (keyword): Optional parameters - - `:insertDefaults` (boolean()): Fill empty fields with default values. - - ### Returns - - - `{:ok, DockerEngineAPI.Model.Service.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec service_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Service.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def service_inspect(connection, id, opts \\ []) do - optional_params = %{ - :insertDefaults => :query - } - - request = - %{} - |> method(:get) - |> url("/services/#{id}") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Service}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - List services - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters: - `id=` - `label=` - `mode=[\"replicated\"|\"global\"]` - `name=` - - `:status` (boolean()): Include service status, with count of running and desired tasks. - - ### Returns - - - `{:ok, [%Service{}, ...]}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec service_list(Tesla.Env.client, keyword()) :: {:ok, list(DockerEngineAPI.Model.Service.t)} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def service_list(connection, opts \\ []) do - optional_params = %{ - :filters => :query, - :status => :query - } - - request = - %{} - |> method(:get) - |> url("/services") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Service}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Get service logs - Get `stdout` and `stderr` logs from a service. See also [`/containers/{id}/logs`](#operation/ContainerLogs). **Note**: This endpoint works only for services with the `local`, `json-file` or `journald` logging drivers. - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): ID or name of the service - - `opts` (keyword): Optional parameters - - `:details` (boolean()): Show service context and extra details provided to logs. - - `:follow` (boolean()): Keep connection after returning logs. - - `:stdout` (boolean()): Return logs from `stdout` - - `:stderr` (boolean()): Return logs from `stderr` - - `:since` (integer()): Only return logs since this time, as a UNIX timestamp - - `:timestamps` (boolean()): Add timestamps to every log line - - `:tail` (String.t): Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. - - ### Returns - - - `{:ok, String.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec service_logs(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} - def service_logs(connection, id, opts \\ []) do - optional_params = %{ - :details => :query, - :follow => :query, - :stdout => :query, - :stderr => :query, - :since => :query, - :timestamps => :query, - :tail => :query - } - - request = - %{} - |> method(:get) - |> url("/services/#{id}/logs") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Update a service - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): ID or name of service. - - `version` (integer()): The version number of the service object being updated. This is required to avoid conflicting writes. This version number should be the value as currently set on the service *before* the update. You can find the current version by calling `GET /services/{id}` - - `body` (ServiceUpdateRequest): - - `opts` (keyword): Optional parameters - - `:registryAuthFrom` (String.t): If the `X-Registry-Auth` header is not specified, this parameter indicates where to find registry authorization credentials. - - `:rollback` (String.t): Set to this parameter to `previous` to cause a server-side rollback to the previous service spec. The supplied spec will be ignored in this case. - - `:"X-Registry-Auth"` (String.t): A base64url-encoded auth configuration for pulling from private registries. Refer to the [authentication section](#section/Authentication) for details. - - ### Returns - - - `{:ok, DockerEngineAPI.Model.ServiceUpdateResponse.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec service_update(Tesla.Env.client, String.t, integer(), DockerEngineAPI.Model.ServiceUpdateRequest.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.ServiceUpdateResponse.t} | {:error, Tesla.Env.t} - def service_update(connection, id, version, body, opts \\ []) do - optional_params = %{ - :registryAuthFrom => :query, - :rollback => :query, - :"X-Registry-Auth" => :headers - } - - request = - %{} - |> method(:post) - |> url("/services/#{id}/update") - |> add_param(:query, :version, version) - |> add_param(:body, :body, body) - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.ServiceUpdateResponse}, - {400, DockerEngineAPI.Model.ErrorResponse}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end -end diff --git a/docker_engine_api/api/session.ex b/docker_engine_api/api/session.ex deleted file mode 100644 index fc1828f..0000000 --- a/docker_engine_api/api/session.ex +++ /dev/null @@ -1,43 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Api.Session do - @moduledoc """ - API calls for all endpoints tagged `Session`. - """ - - alias DockerEngineAPI.Connection - import DockerEngineAPI.RequestBuilder - - @doc """ - Initialize interactive session - Start a new interactive session with a server. Session allows server to call back to the client for advanced capabilities. ### Hijacking This endpoint hijacks the HTTP connection to HTTP2 transport that allows the client to expose gPRC services on that connection. For example, the client sends this request to upgrade the connection: ``` POST /session HTTP/1.1 Upgrade: h2c Connection: Upgrade ``` The Docker daemon responds with a `101 UPGRADED` response follow with the raw stream: ``` HTTP/1.1 101 UPGRADED Connection: Upgrade Upgrade: h2c ``` - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec session(Tesla.Env.client, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def session(connection, _opts \\ []) do - request = - %{} - |> method(:post) - |> url("/session") - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {101, false}, - {400, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end -end diff --git a/docker_engine_api/api/swarm.ex b/docker_engine_api/api/swarm.ex deleted file mode 100644 index 7499691..0000000 --- a/docker_engine_api/api/swarm.ex +++ /dev/null @@ -1,252 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Api.Swarm do - @moduledoc """ - API calls for all endpoints tagged `Swarm`. - """ - - alias DockerEngineAPI.Connection - import DockerEngineAPI.RequestBuilder - - @doc """ - Initialize a new swarm - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `body` (SwarmInitRequest): - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, String.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec swarm_init(Tesla.Env.client, DockerEngineAPI.Model.SwarmInitRequest.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} - def swarm_init(connection, body, _opts \\ []) do - request = - %{} - |> method(:post) - |> url("/swarm/init") - |> add_param(:body, :body, body) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {400, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Inspect swarm - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, DockerEngineAPI.Model.Swarm.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec swarm_inspect(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.Swarm.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def swarm_inspect(connection, _opts \\ []) do - request = - %{} - |> method(:get) - |> url("/swarm") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Swarm}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Join an existing swarm - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `body` (SwarmJoinRequest): - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec swarm_join(Tesla.Env.client, DockerEngineAPI.Model.SwarmJoinRequest.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def swarm_join(connection, body, _opts \\ []) do - request = - %{} - |> method(:post) - |> url("/swarm/join") - |> add_param(:body, :body, body) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {400, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Leave a swarm - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:force` (boolean()): Force leave swarm, even if this is the last manager or that it will break the cluster. - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec swarm_leave(Tesla.Env.client, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def swarm_leave(connection, opts \\ []) do - optional_params = %{ - :force => :query - } - - request = - %{} - |> method(:post) - |> url("/swarm/leave") - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Unlock a locked manager - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `body` (SwarmUnlockRequest): - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec swarm_unlock(Tesla.Env.client, DockerEngineAPI.Model.SwarmUnlockRequest.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def swarm_unlock(connection, body, _opts \\ []) do - request = - %{} - |> method(:post) - |> url("/swarm/unlock") - |> add_param(:body, :body, body) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Get the unlock key - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, DockerEngineAPI.Model.UnlockKeyResponse.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec swarm_unlockkey(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.UnlockKeyResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def swarm_unlockkey(connection, _opts \\ []) do - request = - %{} - |> method(:get) - |> url("/swarm/unlockkey") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.UnlockKeyResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Update a swarm - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `version` (integer()): The version number of the swarm object being updated. This is required to avoid conflicting writes. - - `body` (SwarmSpec): - - `opts` (keyword): Optional parameters - - `:rotateWorkerToken` (boolean()): Rotate the worker join token. - - `:rotateManagerToken` (boolean()): Rotate the manager join token. - - `:rotateManagerUnlockKey` (boolean()): Rotate the manager unlock key. - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec swarm_update(Tesla.Env.client, integer(), DockerEngineAPI.Model.SwarmSpec.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def swarm_update(connection, version, body, opts \\ []) do - optional_params = %{ - :rotateWorkerToken => :query, - :rotateManagerToken => :query, - :rotateManagerUnlockKey => :query - } - - request = - %{} - |> method(:post) - |> url("/swarm/update") - |> add_param(:query, :version, version) - |> add_param(:body, :body, body) - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {400, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end -end diff --git a/docker_engine_api/api/system.ex b/docker_engine_api/api/system.ex deleted file mode 100644 index b50eeb8..0000000 --- a/docker_engine_api/api/system.ex +++ /dev/null @@ -1,245 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Api.System do - @moduledoc """ - API calls for all endpoints tagged `System`. - """ - - alias DockerEngineAPI.Connection - import DockerEngineAPI.RequestBuilder - - @doc """ - Check auth configuration - Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:body` (AuthConfig): Authentication to check - - ### Returns - - - `{:ok, DockerEngineAPI.Model.SystemAuthResponse.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec system_auth(Tesla.Env.client, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.SystemAuthResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def system_auth(connection, opts \\ []) do - optional_params = %{ - :body => :body - } - - request = - %{} - |> method(:post) - |> url("/auth") - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.SystemAuthResponse}, - {204, false}, - {401, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Get data usage information - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:type` ([String.t]): Object types, for which to compute and return data. - - ### Returns - - - `{:ok, DockerEngineAPI.Model.SystemDataUsageResponse.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec system_data_usage(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.SystemDataUsageResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def system_data_usage(connection, opts \\ []) do - optional_params = %{ - :type => :query - } - - request = - %{} - |> method(:get) - |> url("/system/df") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.SystemDataUsageResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Monitor events - Stream real-time events from the server. Various objects within Docker report events when something happens to them. Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune` Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune` The Docker daemon reports these events: `reload` Services report these events: `create`, `update`, and `remove` Nodes report these events: `create`, `update`, and `remove` Secrets report these events: `create`, `update`, and `remove` Configs report these events: `create`, `update`, and `remove` The Builder reports `prune` events - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:since` (String.t): Show events created since this timestamp then stream new events. - - `:until` (String.t): Show events created until this timestamp then stop streaming. - - `:filters` (String.t): A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: - `config=` config name or ID - `container=` container name or ID - `daemon=` daemon name or ID - `event=` event type - `image=` image name or ID - `label=` image or container label - `network=` network name or ID - `node=` node ID - `plugin`= plugin name or ID - `scope`= local or swarm - `secret=` secret name or ID - `service=` service name or ID - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` - `volume=` volume name - - ### Returns - - - `{:ok, DockerEngineAPI.Model.EventMessage.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec system_events(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.EventMessage.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def system_events(connection, opts \\ []) do - optional_params = %{ - :since => :query, - :until => :query, - :filters => :query - } - - request = - %{} - |> method(:get) - |> url("/events") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.EventMessage}, - {400, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Get system information - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, DockerEngineAPI.Model.SystemInfo.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec system_info(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.SystemInfo.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def system_info(connection, _opts \\ []) do - request = - %{} - |> method(:get) - |> url("/info") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.SystemInfo}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Ping - This is a dummy endpoint you can use to test if the server is accessible. - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, String.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec system_ping(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} - def system_ping(connection, _opts \\ []) do - request = - %{} - |> method(:get) - |> url("/_ping") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Ping - This is a dummy endpoint you can use to test if the server is accessible. - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, String.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec system_ping_head(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} - def system_ping_head(connection, _opts \\ []) do - request = - %{} - |> method(:head) - |> url("/_ping") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Get version - Returns the version of Docker that is running and various information about the system that Docker is running on. - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, DockerEngineAPI.Model.SystemVersion.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec system_version(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.SystemVersion.t} | {:error, Tesla.Env.t} - def system_version(connection, _opts \\ []) do - request = - %{} - |> method(:get) - |> url("/version") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.SystemVersion}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end -end diff --git a/docker_engine_api/api/task.ex b/docker_engine_api/api/task.ex deleted file mode 100644 index 9c0e56f..0000000 --- a/docker_engine_api/api/task.ex +++ /dev/null @@ -1,130 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Api.Task do - @moduledoc """ - API calls for all endpoints tagged `Task`. - """ - - alias DockerEngineAPI.Connection - import DockerEngineAPI.RequestBuilder - - @doc """ - Inspect a task - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): ID of the task - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, DockerEngineAPI.Model.Task.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec task_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Task.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def task_inspect(connection, id, _opts \\ []) do - request = - %{} - |> method(:get) - |> url("/tasks/#{id}") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Task}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - List tasks - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:filters` (String.t): A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters: - `desired-state=(running | shutdown | accepted)` - `id=` - `label=key` or `label=\"key=value\"` - `name=` - `node=` - `service=` - - ### Returns - - - `{:ok, [%Task{}, ...]}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec task_list(Tesla.Env.client, keyword()) :: {:ok, list(DockerEngineAPI.Model.Task.t)} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def task_list(connection, opts \\ []) do - optional_params = %{ - :filters => :query - } - - request = - %{} - |> method(:get) - |> url("/tasks") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Task}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Get task logs - Get `stdout` and `stderr` logs from a task. See also [`/containers/{id}/logs`](#operation/ContainerLogs). **Note**: This endpoint works only for services with the `local`, `json-file` or `journald` logging drivers. - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `id` (String.t): ID of the task - - `opts` (keyword): Optional parameters - - `:details` (boolean()): Show task context and extra details provided to logs. - - `:follow` (boolean()): Keep connection after returning logs. - - `:stdout` (boolean()): Return logs from `stdout` - - `:stderr` (boolean()): Return logs from `stderr` - - `:since` (integer()): Only return logs since this time, as a UNIX timestamp - - `:timestamps` (boolean()): Add timestamps to every log line - - `:tail` (String.t): Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. - - ### Returns - - - `{:ok, String.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec task_logs(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, String.t} | {:error, Tesla.Env.t} - def task_logs(connection, id, opts \\ []) do - optional_params = %{ - :details => :query, - :follow => :query, - :stdout => :query, - :stderr => :query, - :since => :query, - :timestamps => :query, - :tail => :query - } - - request = - %{} - |> method(:get) - |> url("/tasks/#{id}/logs") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end -end diff --git a/docker_engine_api/api/volume.ex b/docker_engine_api/api/volume.ex deleted file mode 100644 index 0e2a5bb..0000000 --- a/docker_engine_api/api/volume.ex +++ /dev/null @@ -1,225 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Api.Volume do - @moduledoc """ - API calls for all endpoints tagged `Volume`. - """ - - alias DockerEngineAPI.Connection - import DockerEngineAPI.RequestBuilder - - @doc """ - Create a volume - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `volume_config` (VolumeCreateOptions): Volume configuration - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, DockerEngineAPI.Model.Volume.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec volume_create(Tesla.Env.client, DockerEngineAPI.Model.VolumeCreateOptions.t, keyword()) :: {:ok, DockerEngineAPI.Model.Volume.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def volume_create(connection, volume_config, _opts \\ []) do - request = - %{} - |> method(:post) - |> url("/volumes/create") - |> add_param(:body, :body, volume_config) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {201, DockerEngineAPI.Model.Volume}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Remove a volume - Instruct the driver to remove the volume. - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `name` (String.t): Volume name or ID - - `opts` (keyword): Optional parameters - - `:force` (boolean()): Force the removal of the volume - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec volume_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def volume_delete(connection, name, opts \\ []) do - optional_params = %{ - :force => :query - } - - request = - %{} - |> method(:delete) - |> url("/volumes/#{name}") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {204, false}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {409, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Inspect a volume - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `name` (String.t): Volume name or ID - - `opts` (keyword): Optional parameters - - ### Returns - - - `{:ok, DockerEngineAPI.Model.Volume.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec volume_inspect(Tesla.Env.client, String.t, keyword()) :: {:ok, DockerEngineAPI.Model.Volume.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def volume_inspect(connection, name, _opts \\ []) do - request = - %{} - |> method(:get) - |> url("/volumes/#{name}") - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.Volume}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - List volumes - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:filters` (String.t): JSON encoded value of the filters (a `map[string][]string`) to process on the volumes list. Available filters: - `dangling=` When set to `true` (or `1`), returns all volumes that are not in use by a container. When set to `false` (or `0`), only volumes that are in use by one or more containers are returned. - `driver=` Matches volumes based on their driver. - `label=` or `label=:` Matches volumes based on the presence of a `label` alone or a `label` and a value. - `name=` Matches all or part of a volume name. - - ### Returns - - - `{:ok, DockerEngineAPI.Model.VolumeListResponse.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec volume_list(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:ok, DockerEngineAPI.Model.VolumeListResponse.t} | {:error, Tesla.Env.t} - def volume_list(connection, opts \\ []) do - optional_params = %{ - :filters => :query - } - - request = - %{} - |> method(:get) - |> url("/volumes") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.VolumeListResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - Delete unused volumes - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `opts` (keyword): Optional parameters - - `:filters` (String.t): Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. - `all` (`all=true`) - Consider all (local) volumes for pruning and not just anonymous volumes. - - ### Returns - - - `{:ok, DockerEngineAPI.Model.VolumePruneResponse.t}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec volume_prune(Tesla.Env.client, keyword()) :: {:ok, DockerEngineAPI.Model.VolumePruneResponse.t} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def volume_prune(connection, opts \\ []) do - optional_params = %{ - :filters => :query - } - - request = - %{} - |> method(:post) - |> url("/volumes/prune") - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, DockerEngineAPI.Model.VolumePruneResponse}, - {500, DockerEngineAPI.Model.ErrorResponse} - ]) - end - - @doc """ - \"Update a volume. Valid only for Swarm cluster volumes\" - - ### Parameters - - - `connection` (DockerEngineAPI.Connection): Connection to server - - `name` (String.t): The name or ID of the volume - - `version` (integer()): The version number of the volume being updated. This is required to avoid conflicting writes. Found in the volume's `ClusterVolume` field. - - `opts` (keyword): Optional parameters - - `:body` (VolumeUpdateRequest): The spec of the volume to update. Currently, only Availability may change. All other fields must remain unchanged. - - ### Returns - - - `{:ok, nil}` on success - - `{:error, Tesla.Env.t}` on failure - """ - @spec volume_update(Tesla.Env.client, String.t, integer(), keyword()) :: {:ok, nil} | {:ok, DockerEngineAPI.Model.ErrorResponse.t} | {:error, Tesla.Env.t} - def volume_update(connection, name, version, opts \\ []) do - optional_params = %{ - :body => :body - } - - request = - %{} - |> method(:put) - |> url("/volumes/#{name}") - |> add_param(:query, :version, version) - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - - connection - |> Connection.request(request) - |> evaluate_response([ - {200, false}, - {400, DockerEngineAPI.Model.ErrorResponse}, - {404, DockerEngineAPI.Model.ErrorResponse}, - {500, DockerEngineAPI.Model.ErrorResponse}, - {503, DockerEngineAPI.Model.ErrorResponse} - ]) - end -end diff --git a/docker_engine_api/model/build_cache.ex b/docker_engine_api/model/build_cache.ex deleted file mode 100644 index d421abd..0000000 --- a/docker_engine_api/model/build_cache.ex +++ /dev/null @@ -1,42 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.BuildCache do - @moduledoc """ - BuildCache contains information about a build cache record. - """ - - @derive Jason.Encoder - defstruct [ - :ID, - :Parent, - :Parents, - :Type, - :Description, - :InUse, - :Shared, - :Size, - :CreatedAt, - :LastUsedAt, - :UsageCount - ] - - @type t :: %__MODULE__{ - :ID => String.t | nil, - :Parent => String.t | nil, - :Parents => [String.t] | nil, - :Type => String.t | nil, - :Description => String.t | nil, - :InUse => boolean() | nil, - :Shared => boolean() | nil, - :Size => integer() | nil, - :CreatedAt => String.t | nil, - :LastUsedAt => String.t | nil, - :UsageCount => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/build_info.ex b/docker_engine_api/model/build_info.ex deleted file mode 100644 index 88b77c8..0000000 --- a/docker_engine_api/model/build_info.ex +++ /dev/null @@ -1,41 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.BuildInfo do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :id, - :stream, - :error, - :errorDetail, - :status, - :progress, - :progressDetail, - :aux - ] - - @type t :: %__MODULE__{ - :id => String.t | nil, - :stream => String.t | nil, - :error => String.t | nil, - :errorDetail => DockerEngineAPI.Model.ErrorDetail.t | nil, - :status => String.t | nil, - :progress => String.t | nil, - :progressDetail => DockerEngineAPI.Model.ProgressDetail.t | nil, - :aux => DockerEngineAPI.Model.ImageId.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:errorDetail, :struct, DockerEngineAPI.Model.ErrorDetail) - |> Deserializer.deserialize(:progressDetail, :struct, DockerEngineAPI.Model.ProgressDetail) - |> Deserializer.deserialize(:aux, :struct, DockerEngineAPI.Model.ImageId) - end -end - diff --git a/docker_engine_api/model/build_prune_response.ex b/docker_engine_api/model/build_prune_response.ex deleted file mode 100644 index a02128a..0000000 --- a/docker_engine_api/model/build_prune_response.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.BuildPruneResponse do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :CachesDeleted, - :SpaceReclaimed - ] - - @type t :: %__MODULE__{ - :CachesDeleted => [String.t] | nil, - :SpaceReclaimed => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/cluster_info.ex b/docker_engine_api/model/cluster_info.ex deleted file mode 100644 index c10f112..0000000 --- a/docker_engine_api/model/cluster_info.ex +++ /dev/null @@ -1,45 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ClusterInfo do - @moduledoc """ - ClusterInfo represents information about the swarm as is returned by the \"/info\" endpoint. Join-tokens are not included. - """ - - @derive Jason.Encoder - defstruct [ - :ID, - :Version, - :CreatedAt, - :UpdatedAt, - :Spec, - :TLSInfo, - :RootRotationInProgress, - :DataPathPort, - :DefaultAddrPool, - :SubnetSize - ] - - @type t :: %__MODULE__{ - :ID => String.t | nil, - :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, - :CreatedAt => String.t | nil, - :UpdatedAt => String.t | nil, - :Spec => DockerEngineAPI.Model.SwarmSpec.t | nil, - :TLSInfo => DockerEngineAPI.Model.TlsInfo.t | nil, - :RootRotationInProgress => boolean() | nil, - :DataPathPort => integer() | nil, - :DefaultAddrPool => [String.t] | nil, - :SubnetSize => integer() | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) - |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.SwarmSpec) - |> Deserializer.deserialize(:TLSInfo, :struct, DockerEngineAPI.Model.TlsInfo) - end -end - diff --git a/docker_engine_api/model/cluster_volume.ex b/docker_engine_api/model/cluster_volume.ex deleted file mode 100644 index d1a241a..0000000 --- a/docker_engine_api/model/cluster_volume.ex +++ /dev/null @@ -1,40 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ClusterVolume do - @moduledoc """ - Options and information specific to, and only present on, Swarm CSI cluster volumes. - """ - - @derive Jason.Encoder - defstruct [ - :ID, - :Version, - :CreatedAt, - :UpdatedAt, - :Spec, - :Info, - :PublishStatus - ] - - @type t :: %__MODULE__{ - :ID => String.t | nil, - :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, - :CreatedAt => String.t | nil, - :UpdatedAt => String.t | nil, - :Spec => DockerEngineAPI.Model.ClusterVolumeSpec.t | nil, - :Info => DockerEngineAPI.Model.ClusterVolumeInfo.t | nil, - :PublishStatus => [DockerEngineAPI.Model.ClusterVolumePublishStatusInner.t] | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) - |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.ClusterVolumeSpec) - |> Deserializer.deserialize(:Info, :struct, DockerEngineAPI.Model.ClusterVolumeInfo) - |> Deserializer.deserialize(:PublishStatus, :list, DockerEngineAPI.Model.ClusterVolumePublishStatusInner) - end -end - diff --git a/docker_engine_api/model/cluster_volume_info.ex b/docker_engine_api/model/cluster_volume_info.ex deleted file mode 100644 index f8f1837..0000000 --- a/docker_engine_api/model/cluster_volume_info.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ClusterVolumeInfo do - @moduledoc """ - Information about the global status of the volume. - """ - - @derive Jason.Encoder - defstruct [ - :CapacityBytes, - :VolumeContext, - :VolumeID, - :AccessibleTopology - ] - - @type t :: %__MODULE__{ - :CapacityBytes => integer() | nil, - :VolumeContext => %{optional(String.t) => String.t} | nil, - :VolumeID => String.t | nil, - :AccessibleTopology => [DockerEngineAPI.Model.Map.t] | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/cluster_volume_publish_status_inner.ex b/docker_engine_api/model/cluster_volume_publish_status_inner.ex deleted file mode 100644 index bc64140..0000000 --- a/docker_engine_api/model/cluster_volume_publish_status_inner.ex +++ /dev/null @@ -1,26 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ClusterVolumePublishStatusInner do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :NodeID, - :State, - :PublishContext - ] - - @type t :: %__MODULE__{ - :NodeID => String.t | nil, - :State => String.t | nil, - :PublishContext => %{optional(String.t) => String.t} | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/cluster_volume_spec.ex b/docker_engine_api/model/cluster_volume_spec.ex deleted file mode 100644 index d5bc67d..0000000 --- a/docker_engine_api/model/cluster_volume_spec.ex +++ /dev/null @@ -1,27 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ClusterVolumeSpec do - @moduledoc """ - Cluster-specific options used to create the volume. - """ - - @derive Jason.Encoder - defstruct [ - :Group, - :AccessMode - ] - - @type t :: %__MODULE__{ - :Group => String.t | nil, - :AccessMode => DockerEngineAPI.Model.ClusterVolumeSpecAccessMode.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:AccessMode, :struct, DockerEngineAPI.Model.ClusterVolumeSpecAccessMode) - end -end - diff --git a/docker_engine_api/model/cluster_volume_spec_access_mode.ex b/docker_engine_api/model/cluster_volume_spec_access_mode.ex deleted file mode 100644 index e9d14b0..0000000 --- a/docker_engine_api/model/cluster_volume_spec_access_mode.ex +++ /dev/null @@ -1,39 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ClusterVolumeSpecAccessMode do - @moduledoc """ - Defines how the volume is used by tasks. - """ - - @derive Jason.Encoder - defstruct [ - :Scope, - :Sharing, - :MountVolume, - :Secrets, - :AccessibilityRequirements, - :CapacityRange, - :Availability - ] - - @type t :: %__MODULE__{ - :Scope => String.t | nil, - :Sharing => String.t | nil, - :MountVolume => map() | nil, - :Secrets => [DockerEngineAPI.Model.ClusterVolumeSpecAccessModeSecretsInner.t] | nil, - :AccessibilityRequirements => DockerEngineAPI.Model.ClusterVolumeSpecAccessModeAccessibilityRequirements.t | nil, - :CapacityRange => DockerEngineAPI.Model.ClusterVolumeSpecAccessModeCapacityRange.t | nil, - :Availability => String.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Secrets, :list, DockerEngineAPI.Model.ClusterVolumeSpecAccessModeSecretsInner) - |> Deserializer.deserialize(:AccessibilityRequirements, :struct, DockerEngineAPI.Model.ClusterVolumeSpecAccessModeAccessibilityRequirements) - |> Deserializer.deserialize(:CapacityRange, :struct, DockerEngineAPI.Model.ClusterVolumeSpecAccessModeCapacityRange) - end -end - diff --git a/docker_engine_api/model/cluster_volume_spec_access_mode_accessibility_requirements.ex b/docker_engine_api/model/cluster_volume_spec_access_mode_accessibility_requirements.ex deleted file mode 100644 index defd7d5..0000000 --- a/docker_engine_api/model/cluster_volume_spec_access_mode_accessibility_requirements.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ClusterVolumeSpecAccessModeAccessibilityRequirements do - @moduledoc """ - Requirements for the accessible topology of the volume. These fields are optional. For an in-depth description of what these fields mean, see the CSI specification. - """ - - @derive Jason.Encoder - defstruct [ - :Requisite, - :Preferred - ] - - @type t :: %__MODULE__{ - :Requisite => [DockerEngineAPI.Model.Map.t] | nil, - :Preferred => [DockerEngineAPI.Model.Map.t] | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/cluster_volume_spec_access_mode_capacity_range.ex b/docker_engine_api/model/cluster_volume_spec_access_mode_capacity_range.ex deleted file mode 100644 index 38726b1..0000000 --- a/docker_engine_api/model/cluster_volume_spec_access_mode_capacity_range.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ClusterVolumeSpecAccessModeCapacityRange do - @moduledoc """ - The desired capacity that the volume should be created with. If empty, the plugin will decide the capacity. - """ - - @derive Jason.Encoder - defstruct [ - :RequiredBytes, - :LimitBytes - ] - - @type t :: %__MODULE__{ - :RequiredBytes => integer() | nil, - :LimitBytes => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/cluster_volume_spec_access_mode_secrets_inner.ex b/docker_engine_api/model/cluster_volume_spec_access_mode_secrets_inner.ex deleted file mode 100644 index 74cf506..0000000 --- a/docker_engine_api/model/cluster_volume_spec_access_mode_secrets_inner.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ClusterVolumeSpecAccessModeSecretsInner do - @moduledoc """ - One cluster volume secret entry. Defines a key-value pair that is passed to the plugin. - """ - - @derive Jason.Encoder - defstruct [ - :Key, - :Secret - ] - - @type t :: %__MODULE__{ - :Key => String.t | nil, - :Secret => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/commit.ex b/docker_engine_api/model/commit.ex deleted file mode 100644 index 4ec6073..0000000 --- a/docker_engine_api/model/commit.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Commit do - @moduledoc """ - Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the version-string of external tools, such as `containerd`, or `runC`. - """ - - @derive Jason.Encoder - defstruct [ - :ID, - :Expected - ] - - @type t :: %__MODULE__{ - :ID => String.t | nil, - :Expected => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/config.ex b/docker_engine_api/model/config.ex deleted file mode 100644 index 732cdfd..0000000 --- a/docker_engine_api/model/config.ex +++ /dev/null @@ -1,34 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Config do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :ID, - :Version, - :CreatedAt, - :UpdatedAt, - :Spec - ] - - @type t :: %__MODULE__{ - :ID => String.t | nil, - :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, - :CreatedAt => String.t | nil, - :UpdatedAt => String.t | nil, - :Spec => DockerEngineAPI.Model.ConfigSpec.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) - |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.ConfigSpec) - end -end - diff --git a/docker_engine_api/model/config_create_request.ex b/docker_engine_api/model/config_create_request.ex deleted file mode 100644 index fd205bd..0000000 --- a/docker_engine_api/model/config_create_request.ex +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ConfigCreateRequest do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Labels, - :Data, - :Templating - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Labels => %{optional(String.t) => String.t} | nil, - :Data => String.t | nil, - :Templating => DockerEngineAPI.Model.Driver.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Templating, :struct, DockerEngineAPI.Model.Driver) - end -end - diff --git a/docker_engine_api/model/config_spec.ex b/docker_engine_api/model/config_spec.ex deleted file mode 100644 index 7340261..0000000 --- a/docker_engine_api/model/config_spec.ex +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ConfigSpec do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Labels, - :Data, - :Templating - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Labels => %{optional(String.t) => String.t} | nil, - :Data => String.t | nil, - :Templating => DockerEngineAPI.Model.Driver.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Templating, :struct, DockerEngineAPI.Model.Driver) - end -end - diff --git a/docker_engine_api/model/distribution_inspect.ex b/docker_engine_api/model/distribution_inspect.ex deleted file mode 100644 index 4bab5fe..0000000 --- a/docker_engine_api/model/distribution_inspect.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.DistributionInspect do - @moduledoc """ - Describes the result obtained from contacting the registry to retrieve image metadata. - """ - - @derive Jason.Encoder - defstruct [ - :Descriptor, - :Platforms - ] - - @type t :: %__MODULE__{ - :Descriptor => DockerEngineAPI.Model.OciDescriptor.t, - :Platforms => [DockerEngineAPI.Model.OciPlatform.t] - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Descriptor, :struct, DockerEngineAPI.Model.OciDescriptor) - |> Deserializer.deserialize(:Platforms, :list, DockerEngineAPI.Model.OciPlatform) - end -end - diff --git a/docker_engine_api/model/driver.ex b/docker_engine_api/model/driver.ex deleted file mode 100644 index 3bec351..0000000 --- a/docker_engine_api/model/driver.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Driver do - @moduledoc """ - Driver represents a driver (network, logging, secrets). - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Options - ] - - @type t :: %__MODULE__{ - :Name => String.t, - :Options => %{optional(String.t) => String.t} | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/join_tokens.ex b/docker_engine_api/model/join_tokens.ex deleted file mode 100644 index 35ae4e4..0000000 --- a/docker_engine_api/model/join_tokens.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.JoinTokens do - @moduledoc """ - JoinTokens contains the tokens workers and managers need to join the swarm. - """ - - @derive Jason.Encoder - defstruct [ - :Worker, - :Manager - ] - - @type t :: %__MODULE__{ - :Worker => String.t | nil, - :Manager => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/limit.ex b/docker_engine_api/model/limit.ex deleted file mode 100644 index c0a9cd7..0000000 --- a/docker_engine_api/model/limit.ex +++ /dev/null @@ -1,26 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Limit do - @moduledoc """ - An object describing a limit on resources which can be requested by a task. - """ - - @derive Jason.Encoder - defstruct [ - :NanoCPUs, - :MemoryBytes, - :Pids - ] - - @type t :: %__MODULE__{ - :NanoCPUs => integer() | nil, - :MemoryBytes => integer() | nil, - :Pids => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/node.ex b/docker_engine_api/model/node.ex deleted file mode 100644 index 3bad639..0000000 --- a/docker_engine_api/model/node.ex +++ /dev/null @@ -1,43 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Node do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :ID, - :Version, - :CreatedAt, - :UpdatedAt, - :Spec, - :Description, - :Status, - :ManagerStatus - ] - - @type t :: %__MODULE__{ - :ID => String.t | nil, - :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, - :CreatedAt => String.t | nil, - :UpdatedAt => String.t | nil, - :Spec => DockerEngineAPI.Model.NodeSpec.t | nil, - :Description => DockerEngineAPI.Model.NodeDescription.t | nil, - :Status => DockerEngineAPI.Model.NodeStatus.t | nil, - :ManagerStatus => DockerEngineAPI.Model.ManagerStatus.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) - |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.NodeSpec) - |> Deserializer.deserialize(:Description, :struct, DockerEngineAPI.Model.NodeDescription) - |> Deserializer.deserialize(:Status, :struct, DockerEngineAPI.Model.NodeStatus) - |> Deserializer.deserialize(:ManagerStatus, :struct, DockerEngineAPI.Model.ManagerStatus) - end -end - diff --git a/docker_engine_api/model/node_description.ex b/docker_engine_api/model/node_description.ex deleted file mode 100644 index 3b73590..0000000 --- a/docker_engine_api/model/node_description.ex +++ /dev/null @@ -1,36 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.NodeDescription do - @moduledoc """ - NodeDescription encapsulates the properties of the Node as reported by the agent. - """ - - @derive Jason.Encoder - defstruct [ - :Hostname, - :Platform, - :Resources, - :Engine, - :TLSInfo - ] - - @type t :: %__MODULE__{ - :Hostname => String.t | nil, - :Platform => DockerEngineAPI.Model.Platform.t | nil, - :Resources => DockerEngineAPI.Model.ResourceObject.t | nil, - :Engine => DockerEngineAPI.Model.EngineDescription.t | nil, - :TLSInfo => DockerEngineAPI.Model.TlsInfo.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Platform, :struct, DockerEngineAPI.Model.Platform) - |> Deserializer.deserialize(:Resources, :struct, DockerEngineAPI.Model.ResourceObject) - |> Deserializer.deserialize(:Engine, :struct, DockerEngineAPI.Model.EngineDescription) - |> Deserializer.deserialize(:TLSInfo, :struct, DockerEngineAPI.Model.TlsInfo) - end -end - diff --git a/docker_engine_api/model/node_spec.ex b/docker_engine_api/model/node_spec.ex deleted file mode 100644 index 6e21808..0000000 --- a/docker_engine_api/model/node_spec.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.NodeSpec do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Labels, - :Role, - :Availability - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Labels => %{optional(String.t) => String.t} | nil, - :Role => String.t | nil, - :Availability => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/node_state.ex b/docker_engine_api/model/node_state.ex deleted file mode 100644 index 2e2abd3..0000000 --- a/docker_engine_api/model/node_state.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.NodeState do - @moduledoc """ - NodeState represents the state of a node. - """ - - @derive Jason.Encoder - defstruct [ - - ] - - @type t :: %__MODULE__{ - - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/node_status.ex b/docker_engine_api/model/node_status.ex deleted file mode 100644 index 6604600..0000000 --- a/docker_engine_api/model/node_status.ex +++ /dev/null @@ -1,29 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.NodeStatus do - @moduledoc """ - NodeStatus represents the status of a node. It provides the current status of the node, as seen by the manager. - """ - - @derive Jason.Encoder - defstruct [ - :State, - :Message, - :Addr - ] - - @type t :: %__MODULE__{ - :State => DockerEngineAPI.Model.NodeState.t | nil, - :Message => String.t | nil, - :Addr => String.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:State, :struct, DockerEngineAPI.Model.NodeState) - end -end - diff --git a/docker_engine_api/model/object_version.ex b/docker_engine_api/model/object_version.ex deleted file mode 100644 index 3a866ea..0000000 --- a/docker_engine_api/model/object_version.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ObjectVersion do - @moduledoc """ - The version number of the object such as node, service, etc. This is needed to avoid conflicting writes. The client must send the version number along with the modified specification when updating these objects. This approach ensures safe concurrency and determinism in that the change on the object may not be applied if the version number has changed from the last read. In other words, if two update requests specify the same base version, only one of the requests can succeed. As a result, two separate update requests that happen at the same time will not unintentionally overwrite each other. - """ - - @derive Jason.Encoder - defstruct [ - :Index - ] - - @type t :: %__MODULE__{ - :Index => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/oci_descriptor.ex b/docker_engine_api/model/oci_descriptor.ex deleted file mode 100644 index aee71e3..0000000 --- a/docker_engine_api/model/oci_descriptor.ex +++ /dev/null @@ -1,26 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.OciDescriptor do - @moduledoc """ - A descriptor struct containing digest, media type, and size, as defined in the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). - """ - - @derive Jason.Encoder - defstruct [ - :mediaType, - :digest, - :size - ] - - @type t :: %__MODULE__{ - :mediaType => String.t | nil, - :digest => String.t | nil, - :size => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/oci_platform.ex b/docker_engine_api/model/oci_platform.ex deleted file mode 100644 index 045babc..0000000 --- a/docker_engine_api/model/oci_platform.ex +++ /dev/null @@ -1,30 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.OciPlatform do - @moduledoc """ - Describes the platform which the image in the manifest runs on, as defined in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). - """ - - @derive Jason.Encoder - defstruct [ - :architecture, - :os, - :"os.version", - :"os.features", - :variant - ] - - @type t :: %__MODULE__{ - :architecture => String.t | nil, - :os => String.t | nil, - :"os.version" => String.t | nil, - :"os.features" => [String.t] | nil, - :variant => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/peer_node.ex b/docker_engine_api/model/peer_node.ex deleted file mode 100644 index df58f7d..0000000 --- a/docker_engine_api/model/peer_node.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PeerNode do - @moduledoc """ - Represents a peer-node in the swarm - """ - - @derive Jason.Encoder - defstruct [ - :NodeID, - :Addr - ] - - @type t :: %__MODULE__{ - :NodeID => String.t | nil, - :Addr => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/platform.ex b/docker_engine_api/model/platform.ex deleted file mode 100644 index 0b66802..0000000 --- a/docker_engine_api/model/platform.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Platform do - @moduledoc """ - Platform represents the platform (Arch/OS). - """ - - @derive Jason.Encoder - defstruct [ - :Architecture, - :OS - ] - - @type t :: %__MODULE__{ - :Architecture => String.t | nil, - :OS => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/plugin.ex b/docker_engine_api/model/plugin.ex deleted file mode 100644 index b5d8618..0000000 --- a/docker_engine_api/model/plugin.ex +++ /dev/null @@ -1,36 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Plugin do - @moduledoc """ - A plugin for the Engine API - """ - - @derive Jason.Encoder - defstruct [ - :Id, - :Name, - :Enabled, - :Settings, - :PluginReference, - :Config - ] - - @type t :: %__MODULE__{ - :Id => String.t | nil, - :Name => String.t, - :Enabled => boolean(), - :Settings => DockerEngineAPI.Model.PluginSettings.t, - :PluginReference => String.t | nil, - :Config => DockerEngineAPI.Model.PluginConfig.t - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Settings, :struct, DockerEngineAPI.Model.PluginSettings) - |> Deserializer.deserialize(:Config, :struct, DockerEngineAPI.Model.PluginConfig) - end -end - diff --git a/docker_engine_api/model/plugin_config.ex b/docker_engine_api/model/plugin_config.ex deleted file mode 100644 index 5cbbe44..0000000 --- a/docker_engine_api/model/plugin_config.ex +++ /dev/null @@ -1,62 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginConfig do - @moduledoc """ - The config of a plugin. - """ - - @derive Jason.Encoder - defstruct [ - :DockerVersion, - :Description, - :Documentation, - :Interface, - :Entrypoint, - :WorkDir, - :User, - :Network, - :Linux, - :PropagatedMount, - :IpcHost, - :PidHost, - :Mounts, - :Env, - :Args, - :rootfs - ] - - @type t :: %__MODULE__{ - :DockerVersion => String.t | nil, - :Description => String.t, - :Documentation => String.t, - :Interface => DockerEngineAPI.Model.PluginConfigInterface.t, - :Entrypoint => [String.t], - :WorkDir => String.t, - :User => DockerEngineAPI.Model.PluginConfigUser.t | nil, - :Network => DockerEngineAPI.Model.PluginConfigNetwork.t, - :Linux => DockerEngineAPI.Model.PluginConfigLinux.t, - :PropagatedMount => String.t, - :IpcHost => boolean(), - :PidHost => boolean(), - :Mounts => [DockerEngineAPI.Model.PluginMount.t], - :Env => [DockerEngineAPI.Model.PluginEnv.t], - :Args => DockerEngineAPI.Model.PluginConfigArgs.t, - :rootfs => DockerEngineAPI.Model.PluginConfigRootfs.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Interface, :struct, DockerEngineAPI.Model.PluginConfigInterface) - |> Deserializer.deserialize(:User, :struct, DockerEngineAPI.Model.PluginConfigUser) - |> Deserializer.deserialize(:Network, :struct, DockerEngineAPI.Model.PluginConfigNetwork) - |> Deserializer.deserialize(:Linux, :struct, DockerEngineAPI.Model.PluginConfigLinux) - |> Deserializer.deserialize(:Mounts, :list, DockerEngineAPI.Model.PluginMount) - |> Deserializer.deserialize(:Env, :list, DockerEngineAPI.Model.PluginEnv) - |> Deserializer.deserialize(:Args, :struct, DockerEngineAPI.Model.PluginConfigArgs) - |> Deserializer.deserialize(:rootfs, :struct, DockerEngineAPI.Model.PluginConfigRootfs) - end -end - diff --git a/docker_engine_api/model/plugin_config_args.ex b/docker_engine_api/model/plugin_config_args.ex deleted file mode 100644 index c7dd9e8..0000000 --- a/docker_engine_api/model/plugin_config_args.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginConfigArgs do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Description, - :Settable, - :Value - ] - - @type t :: %__MODULE__{ - :Name => String.t, - :Description => String.t, - :Settable => [String.t], - :Value => [String.t] - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/plugin_config_interface.ex b/docker_engine_api/model/plugin_config_interface.ex deleted file mode 100644 index d7b184c..0000000 --- a/docker_engine_api/model/plugin_config_interface.ex +++ /dev/null @@ -1,29 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginConfigInterface do - @moduledoc """ - The interface between Docker and the plugin - """ - - @derive Jason.Encoder - defstruct [ - :Types, - :Socket, - :ProtocolScheme - ] - - @type t :: %__MODULE__{ - :Types => [DockerEngineAPI.Model.PluginInterfaceType.t], - :Socket => String.t, - :ProtocolScheme => String.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Types, :list, DockerEngineAPI.Model.PluginInterfaceType) - end -end - diff --git a/docker_engine_api/model/plugin_config_linux.ex b/docker_engine_api/model/plugin_config_linux.ex deleted file mode 100644 index c124b70..0000000 --- a/docker_engine_api/model/plugin_config_linux.ex +++ /dev/null @@ -1,29 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginConfigLinux do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Capabilities, - :AllowAllDevices, - :Devices - ] - - @type t :: %__MODULE__{ - :Capabilities => [String.t], - :AllowAllDevices => boolean(), - :Devices => [DockerEngineAPI.Model.PluginDevice.t] - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Devices, :list, DockerEngineAPI.Model.PluginDevice) - end -end - diff --git a/docker_engine_api/model/plugin_config_network.ex b/docker_engine_api/model/plugin_config_network.ex deleted file mode 100644 index 182042d..0000000 --- a/docker_engine_api/model/plugin_config_network.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginConfigNetwork do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Type - ] - - @type t :: %__MODULE__{ - :Type => String.t - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/plugin_config_rootfs.ex b/docker_engine_api/model/plugin_config_rootfs.ex deleted file mode 100644 index ccca389..0000000 --- a/docker_engine_api/model/plugin_config_rootfs.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginConfigRootfs do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :type, - :diff_ids - ] - - @type t :: %__MODULE__{ - :type => String.t | nil, - :diff_ids => [String.t] | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/plugin_config_user.ex b/docker_engine_api/model/plugin_config_user.ex deleted file mode 100644 index fbc247b..0000000 --- a/docker_engine_api/model/plugin_config_user.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginConfigUser do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :UID, - :GID - ] - - @type t :: %__MODULE__{ - :UID => integer() | nil, - :GID => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/plugin_device.ex b/docker_engine_api/model/plugin_device.ex deleted file mode 100644 index 3c27fda..0000000 --- a/docker_engine_api/model/plugin_device.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginDevice do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Description, - :Settable, - :Path - ] - - @type t :: %__MODULE__{ - :Name => String.t, - :Description => String.t, - :Settable => [String.t], - :Path => String.t - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/plugin_env.ex b/docker_engine_api/model/plugin_env.ex deleted file mode 100644 index 87230dd..0000000 --- a/docker_engine_api/model/plugin_env.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginEnv do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Description, - :Settable, - :Value - ] - - @type t :: %__MODULE__{ - :Name => String.t, - :Description => String.t, - :Settable => [String.t], - :Value => String.t - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/plugin_interface_type.ex b/docker_engine_api/model/plugin_interface_type.ex deleted file mode 100644 index 8cc6ae9..0000000 --- a/docker_engine_api/model/plugin_interface_type.ex +++ /dev/null @@ -1,26 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginInterfaceType do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Prefix, - :Capability, - :Version - ] - - @type t :: %__MODULE__{ - :Prefix => String.t, - :Capability => String.t, - :Version => String.t - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/plugin_mount.ex b/docker_engine_api/model/plugin_mount.ex deleted file mode 100644 index 51f42e3..0000000 --- a/docker_engine_api/model/plugin_mount.ex +++ /dev/null @@ -1,34 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginMount do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Description, - :Settable, - :Source, - :Destination, - :Type, - :Options - ] - - @type t :: %__MODULE__{ - :Name => String.t, - :Description => String.t, - :Settable => [String.t], - :Source => String.t, - :Destination => String.t, - :Type => String.t, - :Options => [String.t] - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/plugin_privilege.ex b/docker_engine_api/model/plugin_privilege.ex deleted file mode 100644 index 33ab2a8..0000000 --- a/docker_engine_api/model/plugin_privilege.ex +++ /dev/null @@ -1,26 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginPrivilege do - @moduledoc """ - Describes a permission the user has to accept upon installing the plugin. - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Description, - :Value - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Description => String.t | nil, - :Value => [String.t] | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/plugin_settings.ex b/docker_engine_api/model/plugin_settings.ex deleted file mode 100644 index 51bb50a..0000000 --- a/docker_engine_api/model/plugin_settings.ex +++ /dev/null @@ -1,32 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginSettings do - @moduledoc """ - Settings that can be modified by users. - """ - - @derive Jason.Encoder - defstruct [ - :Mounts, - :Env, - :Args, - :Devices - ] - - @type t :: %__MODULE__{ - :Mounts => [DockerEngineAPI.Model.PluginMount.t], - :Env => [String.t], - :Args => [String.t], - :Devices => [DockerEngineAPI.Model.PluginDevice.t] - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Mounts, :list, DockerEngineAPI.Model.PluginMount) - |> Deserializer.deserialize(:Devices, :list, DockerEngineAPI.Model.PluginDevice) - end -end - diff --git a/docker_engine_api/model/plugins_info.ex b/docker_engine_api/model/plugins_info.ex deleted file mode 100644 index f9aa252..0000000 --- a/docker_engine_api/model/plugins_info.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PluginsInfo do - @moduledoc """ - Available plugins per type.


> **Note**: Only unmanaged (V1) plugins are included in this list. > V1 plugins are \"lazily\" loaded, and are not returned in this list > if there is no resource using the plugin. - """ - - @derive Jason.Encoder - defstruct [ - :Volume, - :Network, - :Authorization, - :Log - ] - - @type t :: %__MODULE__{ - :Volume => [String.t] | nil, - :Network => [String.t] | nil, - :Authorization => [String.t] | nil, - :Log => [String.t] | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/progress_detail.ex b/docker_engine_api/model/progress_detail.ex deleted file mode 100644 index 997d29f..0000000 --- a/docker_engine_api/model/progress_detail.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ProgressDetail do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :current, - :total - ] - - @type t :: %__MODULE__{ - :current => integer() | nil, - :total => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/push_image_info.ex b/docker_engine_api/model/push_image_info.ex deleted file mode 100644 index 6177709..0000000 --- a/docker_engine_api/model/push_image_info.ex +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.PushImageInfo do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :error, - :status, - :progress, - :progressDetail - ] - - @type t :: %__MODULE__{ - :error => String.t | nil, - :status => String.t | nil, - :progress => String.t | nil, - :progressDetail => DockerEngineAPI.Model.ProgressDetail.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:progressDetail, :struct, DockerEngineAPI.Model.ProgressDetail) - end -end - diff --git a/docker_engine_api/model/reachability.ex b/docker_engine_api/model/reachability.ex deleted file mode 100644 index 077c70d..0000000 --- a/docker_engine_api/model/reachability.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Reachability do - @moduledoc """ - Reachability represents the reachability of a node. - """ - - @derive Jason.Encoder - defstruct [ - - ] - - @type t :: %__MODULE__{ - - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/registry_service_config.ex b/docker_engine_api/model/registry_service_config.ex deleted file mode 100644 index ced801d..0000000 --- a/docker_engine_api/model/registry_service_config.ex +++ /dev/null @@ -1,33 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.RegistryServiceConfig do - @moduledoc """ - RegistryServiceConfig stores daemon registry services configuration. - """ - - @derive Jason.Encoder - defstruct [ - :AllowNondistributableArtifactsCIDRs, - :AllowNondistributableArtifactsHostnames, - :InsecureRegistryCIDRs, - :IndexConfigs, - :Mirrors - ] - - @type t :: %__MODULE__{ - :AllowNondistributableArtifactsCIDRs => [String.t] | nil, - :AllowNondistributableArtifactsHostnames => [String.t] | nil, - :InsecureRegistryCIDRs => [String.t] | nil, - :IndexConfigs => %{optional(String.t) => DockerEngineAPI.Model.IndexInfo.t} | nil, - :Mirrors => [String.t] | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:IndexConfigs, :map, DockerEngineAPI.Model.IndexInfo) - end -end - diff --git a/docker_engine_api/model/resource_object.ex b/docker_engine_api/model/resource_object.ex deleted file mode 100644 index d5432a4..0000000 --- a/docker_engine_api/model/resource_object.ex +++ /dev/null @@ -1,29 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ResourceObject do - @moduledoc """ - An object describing the resources which can be advertised by a node and requested by a task. - """ - - @derive Jason.Encoder - defstruct [ - :NanoCPUs, - :MemoryBytes, - :GenericResources - ] - - @type t :: %__MODULE__{ - :NanoCPUs => integer() | nil, - :MemoryBytes => integer() | nil, - :GenericResources => [DockerEngineAPI.Model.GenericResourcesInner.t] | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:GenericResources, :list, DockerEngineAPI.Model.GenericResourcesInner) - end -end - diff --git a/docker_engine_api/model/resources.ex b/docker_engine_api/model/resources.ex deleted file mode 100644 index 3344596..0000000 --- a/docker_engine_api/model/resources.ex +++ /dev/null @@ -1,92 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Resources do - @moduledoc """ - A container's resources (cgroups config, ulimits, etc) - """ - - @derive Jason.Encoder - defstruct [ - :CpuShares, - :Memory, - :CgroupParent, - :BlkioWeight, - :BlkioWeightDevice, - :BlkioDeviceReadBps, - :BlkioDeviceWriteBps, - :BlkioDeviceReadIOps, - :BlkioDeviceWriteIOps, - :CpuPeriod, - :CpuQuota, - :CpuRealtimePeriod, - :CpuRealtimeRuntime, - :CpusetCpus, - :CpusetMems, - :Devices, - :DeviceCgroupRules, - :DeviceRequests, - :KernelMemoryTCP, - :MemoryReservation, - :MemorySwap, - :MemorySwappiness, - :NanoCpus, - :OomKillDisable, - :Init, - :PidsLimit, - :Ulimits, - :CpuCount, - :CpuPercent, - :IOMaximumIOps, - :IOMaximumBandwidth - ] - - @type t :: %__MODULE__{ - :CpuShares => integer() | nil, - :Memory => integer() | nil, - :CgroupParent => String.t | nil, - :BlkioWeight => integer() | nil, - :BlkioWeightDevice => [DockerEngineAPI.Model.ResourcesBlkioWeightDeviceInner.t] | nil, - :BlkioDeviceReadBps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, - :BlkioDeviceWriteBps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, - :BlkioDeviceReadIOps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, - :BlkioDeviceWriteIOps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil, - :CpuPeriod => integer() | nil, - :CpuQuota => integer() | nil, - :CpuRealtimePeriod => integer() | nil, - :CpuRealtimeRuntime => integer() | nil, - :CpusetCpus => String.t | nil, - :CpusetMems => String.t | nil, - :Devices => [DockerEngineAPI.Model.DeviceMapping.t] | nil, - :DeviceCgroupRules => [String.t] | nil, - :DeviceRequests => [DockerEngineAPI.Model.DeviceRequest.t] | nil, - :KernelMemoryTCP => integer() | nil, - :MemoryReservation => integer() | nil, - :MemorySwap => integer() | nil, - :MemorySwappiness => integer() | nil, - :NanoCpus => integer() | nil, - :OomKillDisable => boolean() | nil, - :Init => boolean() | nil, - :PidsLimit => integer() | nil, - :Ulimits => [DockerEngineAPI.Model.ResourcesUlimitsInner.t] | nil, - :CpuCount => integer() | nil, - :CpuPercent => integer() | nil, - :IOMaximumIOps => integer() | nil, - :IOMaximumBandwidth => integer() | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:BlkioWeightDevice, :list, DockerEngineAPI.Model.ResourcesBlkioWeightDeviceInner) - |> Deserializer.deserialize(:BlkioDeviceReadBps, :list, DockerEngineAPI.Model.ThrottleDevice) - |> Deserializer.deserialize(:BlkioDeviceWriteBps, :list, DockerEngineAPI.Model.ThrottleDevice) - |> Deserializer.deserialize(:BlkioDeviceReadIOps, :list, DockerEngineAPI.Model.ThrottleDevice) - |> Deserializer.deserialize(:BlkioDeviceWriteIOps, :list, DockerEngineAPI.Model.ThrottleDevice) - |> Deserializer.deserialize(:Devices, :list, DockerEngineAPI.Model.DeviceMapping) - |> Deserializer.deserialize(:DeviceRequests, :list, DockerEngineAPI.Model.DeviceRequest) - |> Deserializer.deserialize(:Ulimits, :list, DockerEngineAPI.Model.ResourcesUlimitsInner) - end -end - diff --git a/docker_engine_api/model/resources_blkio_weight_device_inner.ex b/docker_engine_api/model/resources_blkio_weight_device_inner.ex deleted file mode 100644 index 93faf4b..0000000 --- a/docker_engine_api/model/resources_blkio_weight_device_inner.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ResourcesBlkioWeightDeviceInner do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Path, - :Weight - ] - - @type t :: %__MODULE__{ - :Path => String.t | nil, - :Weight => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/resources_ulimits_inner.ex b/docker_engine_api/model/resources_ulimits_inner.ex deleted file mode 100644 index 7429007..0000000 --- a/docker_engine_api/model/resources_ulimits_inner.ex +++ /dev/null @@ -1,26 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ResourcesUlimitsInner do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Soft, - :Hard - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Soft => integer() | nil, - :Hard => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/runtime.ex b/docker_engine_api/model/runtime.ex deleted file mode 100644 index 9ebd750..0000000 --- a/docker_engine_api/model/runtime.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Runtime do - @moduledoc """ - Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux. - """ - - @derive Jason.Encoder - defstruct [ - :path, - :runtimeArgs - ] - - @type t :: %__MODULE__{ - :path => String.t | nil, - :runtimeArgs => [String.t] | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/secret.ex b/docker_engine_api/model/secret.ex deleted file mode 100644 index 4d80dda..0000000 --- a/docker_engine_api/model/secret.ex +++ /dev/null @@ -1,34 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Secret do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :ID, - :Version, - :CreatedAt, - :UpdatedAt, - :Spec - ] - - @type t :: %__MODULE__{ - :ID => String.t | nil, - :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, - :CreatedAt => String.t | nil, - :UpdatedAt => String.t | nil, - :Spec => DockerEngineAPI.Model.SecretSpec.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) - |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.SecretSpec) - end -end - diff --git a/docker_engine_api/model/secret_create_request.ex b/docker_engine_api/model/secret_create_request.ex deleted file mode 100644 index 8b9f6fe..0000000 --- a/docker_engine_api/model/secret_create_request.ex +++ /dev/null @@ -1,34 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SecretCreateRequest do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Labels, - :Data, - :Driver, - :Templating - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Labels => %{optional(String.t) => String.t} | nil, - :Data => String.t | nil, - :Driver => DockerEngineAPI.Model.Driver.t | nil, - :Templating => DockerEngineAPI.Model.Driver.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Driver, :struct, DockerEngineAPI.Model.Driver) - |> Deserializer.deserialize(:Templating, :struct, DockerEngineAPI.Model.Driver) - end -end - diff --git a/docker_engine_api/model/secret_spec.ex b/docker_engine_api/model/secret_spec.ex deleted file mode 100644 index 5dad52a..0000000 --- a/docker_engine_api/model/secret_spec.ex +++ /dev/null @@ -1,34 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SecretSpec do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Labels, - :Data, - :Driver, - :Templating - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Labels => %{optional(String.t) => String.t} | nil, - :Data => String.t | nil, - :Driver => DockerEngineAPI.Model.Driver.t | nil, - :Templating => DockerEngineAPI.Model.Driver.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Driver, :struct, DockerEngineAPI.Model.Driver) - |> Deserializer.deserialize(:Templating, :struct, DockerEngineAPI.Model.Driver) - end -end - diff --git a/docker_engine_api/model/service.ex b/docker_engine_api/model/service.ex deleted file mode 100644 index c93332d..0000000 --- a/docker_engine_api/model/service.ex +++ /dev/null @@ -1,46 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Service do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :ID, - :Version, - :CreatedAt, - :UpdatedAt, - :Spec, - :Endpoint, - :UpdateStatus, - :ServiceStatus, - :JobStatus - ] - - @type t :: %__MODULE__{ - :ID => String.t | nil, - :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, - :CreatedAt => String.t | nil, - :UpdatedAt => String.t | nil, - :Spec => DockerEngineAPI.Model.ServiceSpec.t | nil, - :Endpoint => DockerEngineAPI.Model.ServiceEndpoint.t | nil, - :UpdateStatus => DockerEngineAPI.Model.ServiceUpdateStatus.t | nil, - :ServiceStatus => DockerEngineAPI.Model.ServiceServiceStatus.t | nil, - :JobStatus => DockerEngineAPI.Model.ServiceJobStatus.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) - |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.ServiceSpec) - |> Deserializer.deserialize(:Endpoint, :struct, DockerEngineAPI.Model.ServiceEndpoint) - |> Deserializer.deserialize(:UpdateStatus, :struct, DockerEngineAPI.Model.ServiceUpdateStatus) - |> Deserializer.deserialize(:ServiceStatus, :struct, DockerEngineAPI.Model.ServiceServiceStatus) - |> Deserializer.deserialize(:JobStatus, :struct, DockerEngineAPI.Model.ServiceJobStatus) - end -end - diff --git a/docker_engine_api/model/service_create_request.ex b/docker_engine_api/model/service_create_request.ex deleted file mode 100644 index 61e84ba..0000000 --- a/docker_engine_api/model/service_create_request.ex +++ /dev/null @@ -1,44 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceCreateRequest do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Labels, - :TaskTemplate, - :Mode, - :UpdateConfig, - :RollbackConfig, - :Networks, - :EndpointSpec - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Labels => %{optional(String.t) => String.t} | nil, - :TaskTemplate => DockerEngineAPI.Model.TaskSpec.t | nil, - :Mode => DockerEngineAPI.Model.ServiceSpecMode.t | nil, - :UpdateConfig => DockerEngineAPI.Model.ServiceSpecUpdateConfig.t | nil, - :RollbackConfig => DockerEngineAPI.Model.ServiceSpecRollbackConfig.t | nil, - :Networks => [DockerEngineAPI.Model.NetworkAttachmentConfig.t] | nil, - :EndpointSpec => DockerEngineAPI.Model.EndpointSpec.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:TaskTemplate, :struct, DockerEngineAPI.Model.TaskSpec) - |> Deserializer.deserialize(:Mode, :struct, DockerEngineAPI.Model.ServiceSpecMode) - |> Deserializer.deserialize(:UpdateConfig, :struct, DockerEngineAPI.Model.ServiceSpecUpdateConfig) - |> Deserializer.deserialize(:RollbackConfig, :struct, DockerEngineAPI.Model.ServiceSpecRollbackConfig) - |> Deserializer.deserialize(:Networks, :list, DockerEngineAPI.Model.NetworkAttachmentConfig) - |> Deserializer.deserialize(:EndpointSpec, :struct, DockerEngineAPI.Model.EndpointSpec) - end -end - diff --git a/docker_engine_api/model/service_create_response.ex b/docker_engine_api/model/service_create_response.ex deleted file mode 100644 index 5115045..0000000 --- a/docker_engine_api/model/service_create_response.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceCreateResponse do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :ID, - :Warning - ] - - @type t :: %__MODULE__{ - :ID => String.t | nil, - :Warning => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/service_endpoint.ex b/docker_engine_api/model/service_endpoint.ex deleted file mode 100644 index 00902b8..0000000 --- a/docker_engine_api/model/service_endpoint.ex +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceEndpoint do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Spec, - :Ports, - :VirtualIPs - ] - - @type t :: %__MODULE__{ - :Spec => DockerEngineAPI.Model.EndpointSpec.t | nil, - :Ports => [DockerEngineAPI.Model.EndpointPortConfig.t] | nil, - :VirtualIPs => [DockerEngineAPI.Model.ServiceEndpointVirtualIpsInner.t] | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.EndpointSpec) - |> Deserializer.deserialize(:Ports, :list, DockerEngineAPI.Model.EndpointPortConfig) - |> Deserializer.deserialize(:VirtualIPs, :list, DockerEngineAPI.Model.ServiceEndpointVirtualIpsInner) - end -end - diff --git a/docker_engine_api/model/service_endpoint_virtual_ips_inner.ex b/docker_engine_api/model/service_endpoint_virtual_ips_inner.ex deleted file mode 100644 index a05d7b8..0000000 --- a/docker_engine_api/model/service_endpoint_virtual_ips_inner.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceEndpointVirtualIpsInner do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :NetworkID, - :Addr - ] - - @type t :: %__MODULE__{ - :NetworkID => String.t | nil, - :Addr => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/service_job_status.ex b/docker_engine_api/model/service_job_status.ex deleted file mode 100644 index 8e6d772..0000000 --- a/docker_engine_api/model/service_job_status.ex +++ /dev/null @@ -1,27 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceJobStatus do - @moduledoc """ - The status of the service when it is in one of ReplicatedJob or GlobalJob modes. Absent on Replicated and Global mode services. The JobIteration is an ObjectVersion, but unlike the Service's version, does not need to be sent with an update request. - """ - - @derive Jason.Encoder - defstruct [ - :JobIteration, - :LastExecution - ] - - @type t :: %__MODULE__{ - :JobIteration => DockerEngineAPI.Model.ObjectVersion.t | nil, - :LastExecution => String.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:JobIteration, :struct, DockerEngineAPI.Model.ObjectVersion) - end -end - diff --git a/docker_engine_api/model/service_service_status.ex b/docker_engine_api/model/service_service_status.ex deleted file mode 100644 index 64ca5ce..0000000 --- a/docker_engine_api/model/service_service_status.ex +++ /dev/null @@ -1,26 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceServiceStatus do - @moduledoc """ - The status of the service's tasks. Provided only when requested as part of a ServiceList operation. - """ - - @derive Jason.Encoder - defstruct [ - :RunningTasks, - :DesiredTasks, - :CompletedTasks - ] - - @type t :: %__MODULE__{ - :RunningTasks => integer() | nil, - :DesiredTasks => integer() | nil, - :CompletedTasks => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/service_spec.ex b/docker_engine_api/model/service_spec.ex deleted file mode 100644 index 9070bbd..0000000 --- a/docker_engine_api/model/service_spec.ex +++ /dev/null @@ -1,44 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceSpec do - @moduledoc """ - User modifiable configuration for a service. - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Labels, - :TaskTemplate, - :Mode, - :UpdateConfig, - :RollbackConfig, - :Networks, - :EndpointSpec - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Labels => %{optional(String.t) => String.t} | nil, - :TaskTemplate => DockerEngineAPI.Model.TaskSpec.t | nil, - :Mode => DockerEngineAPI.Model.ServiceSpecMode.t | nil, - :UpdateConfig => DockerEngineAPI.Model.ServiceSpecUpdateConfig.t | nil, - :RollbackConfig => DockerEngineAPI.Model.ServiceSpecRollbackConfig.t | nil, - :Networks => [DockerEngineAPI.Model.NetworkAttachmentConfig.t] | nil, - :EndpointSpec => DockerEngineAPI.Model.EndpointSpec.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:TaskTemplate, :struct, DockerEngineAPI.Model.TaskSpec) - |> Deserializer.deserialize(:Mode, :struct, DockerEngineAPI.Model.ServiceSpecMode) - |> Deserializer.deserialize(:UpdateConfig, :struct, DockerEngineAPI.Model.ServiceSpecUpdateConfig) - |> Deserializer.deserialize(:RollbackConfig, :struct, DockerEngineAPI.Model.ServiceSpecRollbackConfig) - |> Deserializer.deserialize(:Networks, :list, DockerEngineAPI.Model.NetworkAttachmentConfig) - |> Deserializer.deserialize(:EndpointSpec, :struct, DockerEngineAPI.Model.EndpointSpec) - end -end - diff --git a/docker_engine_api/model/service_spec_mode.ex b/docker_engine_api/model/service_spec_mode.ex deleted file mode 100644 index 7c77314..0000000 --- a/docker_engine_api/model/service_spec_mode.ex +++ /dev/null @@ -1,32 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceSpecMode do - @moduledoc """ - Scheduling mode for the service. - """ - - @derive Jason.Encoder - defstruct [ - :Replicated, - :Global, - :ReplicatedJob, - :GlobalJob - ] - - @type t :: %__MODULE__{ - :Replicated => DockerEngineAPI.Model.ServiceSpecModeReplicated.t | nil, - :Global => map() | nil, - :ReplicatedJob => DockerEngineAPI.Model.ServiceSpecModeReplicatedJob.t | nil, - :GlobalJob => map() | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Replicated, :struct, DockerEngineAPI.Model.ServiceSpecModeReplicated) - |> Deserializer.deserialize(:ReplicatedJob, :struct, DockerEngineAPI.Model.ServiceSpecModeReplicatedJob) - end -end - diff --git a/docker_engine_api/model/service_spec_mode_replicated.ex b/docker_engine_api/model/service_spec_mode_replicated.ex deleted file mode 100644 index 2d03df5..0000000 --- a/docker_engine_api/model/service_spec_mode_replicated.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceSpecModeReplicated do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Replicas - ] - - @type t :: %__MODULE__{ - :Replicas => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/service_spec_mode_replicated_job.ex b/docker_engine_api/model/service_spec_mode_replicated_job.ex deleted file mode 100644 index 079aa78..0000000 --- a/docker_engine_api/model/service_spec_mode_replicated_job.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceSpecModeReplicatedJob do - @moduledoc """ - The mode used for services with a finite number of tasks that run to a completed state. - """ - - @derive Jason.Encoder - defstruct [ - :MaxConcurrent, - :TotalCompletions - ] - - @type t :: %__MODULE__{ - :MaxConcurrent => integer() | nil, - :TotalCompletions => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/service_spec_rollback_config.ex b/docker_engine_api/model/service_spec_rollback_config.ex deleted file mode 100644 index 582afb3..0000000 --- a/docker_engine_api/model/service_spec_rollback_config.ex +++ /dev/null @@ -1,32 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceSpecRollbackConfig do - @moduledoc """ - Specification for the rollback strategy of the service. - """ - - @derive Jason.Encoder - defstruct [ - :Parallelism, - :Delay, - :FailureAction, - :Monitor, - :MaxFailureRatio, - :Order - ] - - @type t :: %__MODULE__{ - :Parallelism => integer() | nil, - :Delay => integer() | nil, - :FailureAction => String.t | nil, - :Monitor => integer() | nil, - :MaxFailureRatio => float() | nil, - :Order => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/service_spec_update_config.ex b/docker_engine_api/model/service_spec_update_config.ex deleted file mode 100644 index 5dc5e3b..0000000 --- a/docker_engine_api/model/service_spec_update_config.ex +++ /dev/null @@ -1,32 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceSpecUpdateConfig do - @moduledoc """ - Specification for the update strategy of the service. - """ - - @derive Jason.Encoder - defstruct [ - :Parallelism, - :Delay, - :FailureAction, - :Monitor, - :MaxFailureRatio, - :Order - ] - - @type t :: %__MODULE__{ - :Parallelism => integer() | nil, - :Delay => integer() | nil, - :FailureAction => String.t | nil, - :Monitor => integer() | nil, - :MaxFailureRatio => float() | nil, - :Order => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/service_update_request.ex b/docker_engine_api/model/service_update_request.ex deleted file mode 100644 index d9e587d..0000000 --- a/docker_engine_api/model/service_update_request.ex +++ /dev/null @@ -1,44 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceUpdateRequest do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Labels, - :TaskTemplate, - :Mode, - :UpdateConfig, - :RollbackConfig, - :Networks, - :EndpointSpec - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Labels => %{optional(String.t) => String.t} | nil, - :TaskTemplate => DockerEngineAPI.Model.TaskSpec.t | nil, - :Mode => DockerEngineAPI.Model.ServiceSpecMode.t | nil, - :UpdateConfig => DockerEngineAPI.Model.ServiceSpecUpdateConfig.t | nil, - :RollbackConfig => DockerEngineAPI.Model.ServiceSpecRollbackConfig.t | nil, - :Networks => [DockerEngineAPI.Model.NetworkAttachmentConfig.t] | nil, - :EndpointSpec => DockerEngineAPI.Model.EndpointSpec.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:TaskTemplate, :struct, DockerEngineAPI.Model.TaskSpec) - |> Deserializer.deserialize(:Mode, :struct, DockerEngineAPI.Model.ServiceSpecMode) - |> Deserializer.deserialize(:UpdateConfig, :struct, DockerEngineAPI.Model.ServiceSpecUpdateConfig) - |> Deserializer.deserialize(:RollbackConfig, :struct, DockerEngineAPI.Model.ServiceSpecRollbackConfig) - |> Deserializer.deserialize(:Networks, :list, DockerEngineAPI.Model.NetworkAttachmentConfig) - |> Deserializer.deserialize(:EndpointSpec, :struct, DockerEngineAPI.Model.EndpointSpec) - end -end - diff --git a/docker_engine_api/model/service_update_response.ex b/docker_engine_api/model/service_update_response.ex deleted file mode 100644 index d50ab20..0000000 --- a/docker_engine_api/model/service_update_response.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceUpdateResponse do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Warnings - ] - - @type t :: %__MODULE__{ - :Warnings => [String.t] | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/service_update_status.ex b/docker_engine_api/model/service_update_status.ex deleted file mode 100644 index ea65742..0000000 --- a/docker_engine_api/model/service_update_status.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ServiceUpdateStatus do - @moduledoc """ - The status of a service update. - """ - - @derive Jason.Encoder - defstruct [ - :State, - :StartedAt, - :CompletedAt, - :Message - ] - - @type t :: %__MODULE__{ - :State => String.t | nil, - :StartedAt => String.t | nil, - :CompletedAt => String.t | nil, - :Message => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/swarm.ex b/docker_engine_api/model/swarm.ex deleted file mode 100644 index 3bb8c18..0000000 --- a/docker_engine_api/model/swarm.ex +++ /dev/null @@ -1,48 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Swarm do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :ID, - :Version, - :CreatedAt, - :UpdatedAt, - :Spec, - :TLSInfo, - :RootRotationInProgress, - :DataPathPort, - :DefaultAddrPool, - :SubnetSize, - :JoinTokens - ] - - @type t :: %__MODULE__{ - :ID => String.t | nil, - :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, - :CreatedAt => String.t | nil, - :UpdatedAt => String.t | nil, - :Spec => DockerEngineAPI.Model.SwarmSpec.t | nil, - :TLSInfo => DockerEngineAPI.Model.TlsInfo.t | nil, - :RootRotationInProgress => boolean() | nil, - :DataPathPort => integer() | nil, - :DefaultAddrPool => [String.t] | nil, - :SubnetSize => integer() | nil, - :JoinTokens => DockerEngineAPI.Model.JoinTokens.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) - |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.SwarmSpec) - |> Deserializer.deserialize(:TLSInfo, :struct, DockerEngineAPI.Model.TlsInfo) - |> Deserializer.deserialize(:JoinTokens, :struct, DockerEngineAPI.Model.JoinTokens) - end -end - diff --git a/docker_engine_api/model/swarm_info.ex b/docker_engine_api/model/swarm_info.ex deleted file mode 100644 index 0c2faa8..0000000 --- a/docker_engine_api/model/swarm_info.ex +++ /dev/null @@ -1,43 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SwarmInfo do - @moduledoc """ - Represents generic information about swarm. - """ - - @derive Jason.Encoder - defstruct [ - :NodeID, - :NodeAddr, - :LocalNodeState, - :ControlAvailable, - :Error, - :RemoteManagers, - :Nodes, - :Managers, - :Cluster - ] - - @type t :: %__MODULE__{ - :NodeID => String.t | nil, - :NodeAddr => String.t | nil, - :LocalNodeState => DockerEngineAPI.Model.LocalNodeState.t | nil, - :ControlAvailable => boolean() | nil, - :Error => String.t | nil, - :RemoteManagers => [DockerEngineAPI.Model.PeerNode.t] | nil, - :Nodes => integer() | nil, - :Managers => integer() | nil, - :Cluster => DockerEngineAPI.Model.ClusterInfo.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:LocalNodeState, :struct, DockerEngineAPI.Model.LocalNodeState) - |> Deserializer.deserialize(:RemoteManagers, :list, DockerEngineAPI.Model.PeerNode) - |> Deserializer.deserialize(:Cluster, :struct, DockerEngineAPI.Model.ClusterInfo) - end -end - diff --git a/docker_engine_api/model/swarm_init_request.ex b/docker_engine_api/model/swarm_init_request.ex deleted file mode 100644 index 15ec597..0000000 --- a/docker_engine_api/model/swarm_init_request.ex +++ /dev/null @@ -1,39 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SwarmInitRequest do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :ListenAddr, - :AdvertiseAddr, - :DataPathAddr, - :DataPathPort, - :DefaultAddrPool, - :ForceNewCluster, - :SubnetSize, - :Spec - ] - - @type t :: %__MODULE__{ - :ListenAddr => String.t | nil, - :AdvertiseAddr => String.t | nil, - :DataPathAddr => String.t | nil, - :DataPathPort => integer() | nil, - :DefaultAddrPool => [String.t] | nil, - :ForceNewCluster => boolean() | nil, - :SubnetSize => integer() | nil, - :Spec => DockerEngineAPI.Model.SwarmSpec.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.SwarmSpec) - end -end - diff --git a/docker_engine_api/model/swarm_join_request.ex b/docker_engine_api/model/swarm_join_request.ex deleted file mode 100644 index 965c0b7..0000000 --- a/docker_engine_api/model/swarm_join_request.ex +++ /dev/null @@ -1,30 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SwarmJoinRequest do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :ListenAddr, - :AdvertiseAddr, - :DataPathAddr, - :RemoteAddrs, - :JoinToken - ] - - @type t :: %__MODULE__{ - :ListenAddr => String.t | nil, - :AdvertiseAddr => String.t | nil, - :DataPathAddr => String.t | nil, - :RemoteAddrs => [String.t] | nil, - :JoinToken => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/swarm_spec.ex b/docker_engine_api/model/swarm_spec.ex deleted file mode 100644 index 35cae35..0000000 --- a/docker_engine_api/model/swarm_spec.ex +++ /dev/null @@ -1,44 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SwarmSpec do - @moduledoc """ - User modifiable swarm configuration. - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Labels, - :Orchestration, - :Raft, - :Dispatcher, - :CAConfig, - :EncryptionConfig, - :TaskDefaults - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Labels => %{optional(String.t) => String.t} | nil, - :Orchestration => DockerEngineAPI.Model.SwarmSpecOrchestration.t | nil, - :Raft => DockerEngineAPI.Model.SwarmSpecRaft.t | nil, - :Dispatcher => DockerEngineAPI.Model.SwarmSpecDispatcher.t | nil, - :CAConfig => DockerEngineAPI.Model.SwarmSpecCaConfig.t | nil, - :EncryptionConfig => DockerEngineAPI.Model.SwarmSpecEncryptionConfig.t | nil, - :TaskDefaults => DockerEngineAPI.Model.SwarmSpecTaskDefaults.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Orchestration, :struct, DockerEngineAPI.Model.SwarmSpecOrchestration) - |> Deserializer.deserialize(:Raft, :struct, DockerEngineAPI.Model.SwarmSpecRaft) - |> Deserializer.deserialize(:Dispatcher, :struct, DockerEngineAPI.Model.SwarmSpecDispatcher) - |> Deserializer.deserialize(:CAConfig, :struct, DockerEngineAPI.Model.SwarmSpecCaConfig) - |> Deserializer.deserialize(:EncryptionConfig, :struct, DockerEngineAPI.Model.SwarmSpecEncryptionConfig) - |> Deserializer.deserialize(:TaskDefaults, :struct, DockerEngineAPI.Model.SwarmSpecTaskDefaults) - end -end - diff --git a/docker_engine_api/model/swarm_spec_ca_config.ex b/docker_engine_api/model/swarm_spec_ca_config.ex deleted file mode 100644 index cfc4535..0000000 --- a/docker_engine_api/model/swarm_spec_ca_config.ex +++ /dev/null @@ -1,33 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SwarmSpecCaConfig do - @moduledoc """ - CA configuration. - """ - - @derive Jason.Encoder - defstruct [ - :NodeCertExpiry, - :ExternalCAs, - :SigningCACert, - :SigningCAKey, - :ForceRotate - ] - - @type t :: %__MODULE__{ - :NodeCertExpiry => integer() | nil, - :ExternalCAs => [DockerEngineAPI.Model.SwarmSpecCaConfigExternalCasInner.t] | nil, - :SigningCACert => String.t | nil, - :SigningCAKey => String.t | nil, - :ForceRotate => integer() | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:ExternalCAs, :list, DockerEngineAPI.Model.SwarmSpecCaConfigExternalCasInner) - end -end - diff --git a/docker_engine_api/model/swarm_spec_ca_config_external_cas_inner.ex b/docker_engine_api/model/swarm_spec_ca_config_external_cas_inner.ex deleted file mode 100644 index 6cea405..0000000 --- a/docker_engine_api/model/swarm_spec_ca_config_external_cas_inner.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SwarmSpecCaConfigExternalCasInner do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Protocol, - :URL, - :Options, - :CACert - ] - - @type t :: %__MODULE__{ - :Protocol => String.t | nil, - :URL => String.t | nil, - :Options => %{optional(String.t) => String.t} | nil, - :CACert => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/swarm_spec_dispatcher.ex b/docker_engine_api/model/swarm_spec_dispatcher.ex deleted file mode 100644 index 4fd90b1..0000000 --- a/docker_engine_api/model/swarm_spec_dispatcher.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SwarmSpecDispatcher do - @moduledoc """ - Dispatcher configuration. - """ - - @derive Jason.Encoder - defstruct [ - :HeartbeatPeriod - ] - - @type t :: %__MODULE__{ - :HeartbeatPeriod => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/swarm_spec_encryption_config.ex b/docker_engine_api/model/swarm_spec_encryption_config.ex deleted file mode 100644 index 7ddd9c1..0000000 --- a/docker_engine_api/model/swarm_spec_encryption_config.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SwarmSpecEncryptionConfig do - @moduledoc """ - Parameters related to encryption-at-rest. - """ - - @derive Jason.Encoder - defstruct [ - :AutoLockManagers - ] - - @type t :: %__MODULE__{ - :AutoLockManagers => boolean() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/swarm_spec_orchestration.ex b/docker_engine_api/model/swarm_spec_orchestration.ex deleted file mode 100644 index 6412690..0000000 --- a/docker_engine_api/model/swarm_spec_orchestration.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SwarmSpecOrchestration do - @moduledoc """ - Orchestration configuration. - """ - - @derive Jason.Encoder - defstruct [ - :TaskHistoryRetentionLimit - ] - - @type t :: %__MODULE__{ - :TaskHistoryRetentionLimit => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/swarm_spec_raft.ex b/docker_engine_api/model/swarm_spec_raft.ex deleted file mode 100644 index 0fcc431..0000000 --- a/docker_engine_api/model/swarm_spec_raft.ex +++ /dev/null @@ -1,30 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SwarmSpecRaft do - @moduledoc """ - Raft configuration. - """ - - @derive Jason.Encoder - defstruct [ - :SnapshotInterval, - :KeepOldSnapshots, - :LogEntriesForSlowFollowers, - :ElectionTick, - :HeartbeatTick - ] - - @type t :: %__MODULE__{ - :SnapshotInterval => integer() | nil, - :KeepOldSnapshots => integer() | nil, - :LogEntriesForSlowFollowers => integer() | nil, - :ElectionTick => integer() | nil, - :HeartbeatTick => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/swarm_spec_task_defaults.ex b/docker_engine_api/model/swarm_spec_task_defaults.ex deleted file mode 100644 index c5b25c5..0000000 --- a/docker_engine_api/model/swarm_spec_task_defaults.ex +++ /dev/null @@ -1,25 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SwarmSpecTaskDefaults do - @moduledoc """ - Defaults for creating tasks in this cluster. - """ - - @derive Jason.Encoder - defstruct [ - :LogDriver - ] - - @type t :: %__MODULE__{ - :LogDriver => DockerEngineAPI.Model.SwarmSpecTaskDefaultsLogDriver.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:LogDriver, :struct, DockerEngineAPI.Model.SwarmSpecTaskDefaultsLogDriver) - end -end - diff --git a/docker_engine_api/model/swarm_spec_task_defaults_log_driver.ex b/docker_engine_api/model/swarm_spec_task_defaults_log_driver.ex deleted file mode 100644 index ae9b7c6..0000000 --- a/docker_engine_api/model/swarm_spec_task_defaults_log_driver.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SwarmSpecTaskDefaultsLogDriver do - @moduledoc """ - The log driver to use for tasks created in the orchestrator if unspecified by a service. Updating this value only affects new tasks. Existing tasks continue to use their previously configured log driver until recreated. - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Options - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Options => %{optional(String.t) => String.t} | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/swarm_unlock_request.ex b/docker_engine_api/model/swarm_unlock_request.ex deleted file mode 100644 index 7dfaeac..0000000 --- a/docker_engine_api/model/swarm_unlock_request.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SwarmUnlockRequest do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :UnlockKey - ] - - @type t :: %__MODULE__{ - :UnlockKey => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/system_auth_response.ex b/docker_engine_api/model/system_auth_response.ex deleted file mode 100644 index 6817b00..0000000 --- a/docker_engine_api/model/system_auth_response.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SystemAuthResponse do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Status, - :IdentityToken - ] - - @type t :: %__MODULE__{ - :Status => String.t, - :IdentityToken => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/system_data_usage_response.ex b/docker_engine_api/model/system_data_usage_response.ex deleted file mode 100644 index 96660ef..0000000 --- a/docker_engine_api/model/system_data_usage_response.ex +++ /dev/null @@ -1,36 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SystemDataUsageResponse do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :LayersSize, - :Images, - :Containers, - :Volumes, - :BuildCache - ] - - @type t :: %__MODULE__{ - :LayersSize => integer() | nil, - :Images => [DockerEngineAPI.Model.ImageSummary.t] | nil, - :Containers => [DockerEngineAPI.Model.ContainerSummary.t] | nil, - :Volumes => [DockerEngineAPI.Model.Volume.t] | nil, - :BuildCache => [DockerEngineAPI.Model.BuildCache.t] | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Images, :list, DockerEngineAPI.Model.ImageSummary) - |> Deserializer.deserialize(:Containers, :list, DockerEngineAPI.Model.ContainerSummary) - |> Deserializer.deserialize(:Volumes, :list, DockerEngineAPI.Model.Volume) - |> Deserializer.deserialize(:BuildCache, :list, DockerEngineAPI.Model.BuildCache) - end -end - diff --git a/docker_engine_api/model/system_info.ex b/docker_engine_api/model/system_info.ex deleted file mode 100644 index 971cf54..0000000 --- a/docker_engine_api/model/system_info.ex +++ /dev/null @@ -1,151 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SystemInfo do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :ID, - :Containers, - :ContainersRunning, - :ContainersPaused, - :ContainersStopped, - :Images, - :Driver, - :DriverStatus, - :DockerRootDir, - :Plugins, - :MemoryLimit, - :SwapLimit, - :KernelMemoryTCP, - :CpuCfsPeriod, - :CpuCfsQuota, - :CPUShares, - :CPUSet, - :PidsLimit, - :OomKillDisable, - :IPv4Forwarding, - :BridgeNfIptables, - :BridgeNfIp6tables, - :Debug, - :NFd, - :NGoroutines, - :SystemTime, - :LoggingDriver, - :CgroupDriver, - :CgroupVersion, - :NEventsListener, - :KernelVersion, - :OperatingSystem, - :OSVersion, - :OSType, - :Architecture, - :NCPU, - :MemTotal, - :IndexServerAddress, - :RegistryConfig, - :GenericResources, - :HttpProxy, - :HttpsProxy, - :NoProxy, - :Name, - :Labels, - :ExperimentalBuild, - :ServerVersion, - :Runtimes, - :DefaultRuntime, - :Swarm, - :LiveRestoreEnabled, - :Isolation, - :InitBinary, - :ContainerdCommit, - :RuncCommit, - :InitCommit, - :SecurityOptions, - :ProductLicense, - :DefaultAddressPools, - :Warnings - ] - - @type t :: %__MODULE__{ - :ID => String.t | nil, - :Containers => integer() | nil, - :ContainersRunning => integer() | nil, - :ContainersPaused => integer() | nil, - :ContainersStopped => integer() | nil, - :Images => integer() | nil, - :Driver => String.t | nil, - :DriverStatus => [[String.t]] | nil, - :DockerRootDir => String.t | nil, - :Plugins => DockerEngineAPI.Model.PluginsInfo.t | nil, - :MemoryLimit => boolean() | nil, - :SwapLimit => boolean() | nil, - :KernelMemoryTCP => boolean() | nil, - :CpuCfsPeriod => boolean() | nil, - :CpuCfsQuota => boolean() | nil, - :CPUShares => boolean() | nil, - :CPUSet => boolean() | nil, - :PidsLimit => boolean() | nil, - :OomKillDisable => boolean() | nil, - :IPv4Forwarding => boolean() | nil, - :BridgeNfIptables => boolean() | nil, - :BridgeNfIp6tables => boolean() | nil, - :Debug => boolean() | nil, - :NFd => integer() | nil, - :NGoroutines => integer() | nil, - :SystemTime => String.t | nil, - :LoggingDriver => String.t | nil, - :CgroupDriver => String.t | nil, - :CgroupVersion => String.t | nil, - :NEventsListener => integer() | nil, - :KernelVersion => String.t | nil, - :OperatingSystem => String.t | nil, - :OSVersion => String.t | nil, - :OSType => String.t | nil, - :Architecture => String.t | nil, - :NCPU => integer() | nil, - :MemTotal => integer() | nil, - :IndexServerAddress => String.t | nil, - :RegistryConfig => DockerEngineAPI.Model.RegistryServiceConfig.t | nil, - :GenericResources => [DockerEngineAPI.Model.GenericResourcesInner.t] | nil, - :HttpProxy => String.t | nil, - :HttpsProxy => String.t | nil, - :NoProxy => String.t | nil, - :Name => String.t | nil, - :Labels => [String.t] | nil, - :ExperimentalBuild => boolean() | nil, - :ServerVersion => String.t | nil, - :Runtimes => %{optional(String.t) => DockerEngineAPI.Model.Runtime.t} | nil, - :DefaultRuntime => String.t | nil, - :Swarm => DockerEngineAPI.Model.SwarmInfo.t | nil, - :LiveRestoreEnabled => boolean() | nil, - :Isolation => String.t | nil, - :InitBinary => String.t | nil, - :ContainerdCommit => DockerEngineAPI.Model.Commit.t | nil, - :RuncCommit => DockerEngineAPI.Model.Commit.t | nil, - :InitCommit => DockerEngineAPI.Model.Commit.t | nil, - :SecurityOptions => [String.t] | nil, - :ProductLicense => String.t | nil, - :DefaultAddressPools => [DockerEngineAPI.Model.SystemInfoDefaultAddressPoolsInner.t] | nil, - :Warnings => [String.t] | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Plugins, :struct, DockerEngineAPI.Model.PluginsInfo) - |> Deserializer.deserialize(:RegistryConfig, :struct, DockerEngineAPI.Model.RegistryServiceConfig) - |> Deserializer.deserialize(:GenericResources, :list, DockerEngineAPI.Model.GenericResourcesInner) - |> Deserializer.deserialize(:Runtimes, :map, DockerEngineAPI.Model.Runtime) - |> Deserializer.deserialize(:Swarm, :struct, DockerEngineAPI.Model.SwarmInfo) - |> Deserializer.deserialize(:ContainerdCommit, :struct, DockerEngineAPI.Model.Commit) - |> Deserializer.deserialize(:RuncCommit, :struct, DockerEngineAPI.Model.Commit) - |> Deserializer.deserialize(:InitCommit, :struct, DockerEngineAPI.Model.Commit) - |> Deserializer.deserialize(:DefaultAddressPools, :list, DockerEngineAPI.Model.SystemInfoDefaultAddressPoolsInner) - end -end - diff --git a/docker_engine_api/model/system_info_default_address_pools_inner.ex b/docker_engine_api/model/system_info_default_address_pools_inner.ex deleted file mode 100644 index a97c68e..0000000 --- a/docker_engine_api/model/system_info_default_address_pools_inner.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SystemInfoDefaultAddressPoolsInner do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Base, - :Size - ] - - @type t :: %__MODULE__{ - :Base => String.t | nil, - :Size => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/system_version.ex b/docker_engine_api/model/system_version.ex deleted file mode 100644 index 256f49a..0000000 --- a/docker_engine_api/model/system_version.ex +++ /dev/null @@ -1,48 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SystemVersion do - @moduledoc """ - Response of Engine API: GET \"/version\" - """ - - @derive Jason.Encoder - defstruct [ - :Platform, - :Components, - :Version, - :ApiVersion, - :MinAPIVersion, - :GitCommit, - :GoVersion, - :Os, - :Arch, - :KernelVersion, - :Experimental, - :BuildTime - ] - - @type t :: %__MODULE__{ - :Platform => DockerEngineAPI.Model.SystemVersionPlatform.t | nil, - :Components => [DockerEngineAPI.Model.SystemVersionComponentsInner.t] | nil, - :Version => String.t | nil, - :ApiVersion => String.t | nil, - :MinAPIVersion => String.t | nil, - :GitCommit => String.t | nil, - :GoVersion => String.t | nil, - :Os => String.t | nil, - :Arch => String.t | nil, - :KernelVersion => String.t | nil, - :Experimental => boolean() | nil, - :BuildTime => String.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Platform, :struct, DockerEngineAPI.Model.SystemVersionPlatform) - |> Deserializer.deserialize(:Components, :list, DockerEngineAPI.Model.SystemVersionComponentsInner) - end -end - diff --git a/docker_engine_api/model/system_version_components_inner.ex b/docker_engine_api/model/system_version_components_inner.ex deleted file mode 100644 index 55eb562..0000000 --- a/docker_engine_api/model/system_version_components_inner.ex +++ /dev/null @@ -1,26 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SystemVersionComponentsInner do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Version, - :Details - ] - - @type t :: %__MODULE__{ - :Name => String.t, - :Version => String.t, - :Details => map() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/system_version_platform.ex b/docker_engine_api/model/system_version_platform.ex deleted file mode 100644 index 1a446a4..0000000 --- a/docker_engine_api/model/system_version_platform.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.SystemVersionPlatform do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name - ] - - @type t :: %__MODULE__{ - :Name => String.t - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/task.ex b/docker_engine_api/model/task.ex deleted file mode 100644 index 400892c..0000000 --- a/docker_engine_api/model/task.ex +++ /dev/null @@ -1,56 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Task do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :ID, - :Version, - :CreatedAt, - :UpdatedAt, - :Name, - :Labels, - :Spec, - :ServiceID, - :Slot, - :NodeID, - :AssignedGenericResources, - :Status, - :DesiredState, - :JobIteration - ] - - @type t :: %__MODULE__{ - :ID => String.t | nil, - :Version => DockerEngineAPI.Model.ObjectVersion.t | nil, - :CreatedAt => String.t | nil, - :UpdatedAt => String.t | nil, - :Name => String.t | nil, - :Labels => %{optional(String.t) => String.t} | nil, - :Spec => DockerEngineAPI.Model.TaskSpec.t | nil, - :ServiceID => String.t | nil, - :Slot => integer() | nil, - :NodeID => String.t | nil, - :AssignedGenericResources => [DockerEngineAPI.Model.GenericResourcesInner.t] | nil, - :Status => DockerEngineAPI.Model.TaskStatus.t | nil, - :DesiredState => DockerEngineAPI.Model.TaskState.t | nil, - :JobIteration => DockerEngineAPI.Model.ObjectVersion.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Version, :struct, DockerEngineAPI.Model.ObjectVersion) - |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.TaskSpec) - |> Deserializer.deserialize(:AssignedGenericResources, :list, DockerEngineAPI.Model.GenericResourcesInner) - |> Deserializer.deserialize(:Status, :struct, DockerEngineAPI.Model.TaskStatus) - |> Deserializer.deserialize(:DesiredState, :struct, DockerEngineAPI.Model.TaskState) - |> Deserializer.deserialize(:JobIteration, :struct, DockerEngineAPI.Model.ObjectVersion) - end -end - diff --git a/docker_engine_api/model/task_spec.ex b/docker_engine_api/model/task_spec.ex deleted file mode 100644 index 1575bc4..0000000 --- a/docker_engine_api/model/task_spec.ex +++ /dev/null @@ -1,50 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpec do - @moduledoc """ - User modifiable task configuration. - """ - - @derive Jason.Encoder - defstruct [ - :PluginSpec, - :ContainerSpec, - :NetworkAttachmentSpec, - :Resources, - :RestartPolicy, - :Placement, - :ForceUpdate, - :Runtime, - :Networks, - :LogDriver - ] - - @type t :: %__MODULE__{ - :PluginSpec => DockerEngineAPI.Model.TaskSpecPluginSpec.t | nil, - :ContainerSpec => DockerEngineAPI.Model.TaskSpecContainerSpec.t | nil, - :NetworkAttachmentSpec => DockerEngineAPI.Model.TaskSpecNetworkAttachmentSpec.t | nil, - :Resources => DockerEngineAPI.Model.TaskSpecResources.t | nil, - :RestartPolicy => DockerEngineAPI.Model.TaskSpecRestartPolicy.t | nil, - :Placement => DockerEngineAPI.Model.TaskSpecPlacement.t | nil, - :ForceUpdate => integer() | nil, - :Runtime => String.t | nil, - :Networks => [DockerEngineAPI.Model.NetworkAttachmentConfig.t] | nil, - :LogDriver => DockerEngineAPI.Model.TaskSpecLogDriver.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:PluginSpec, :struct, DockerEngineAPI.Model.TaskSpecPluginSpec) - |> Deserializer.deserialize(:ContainerSpec, :struct, DockerEngineAPI.Model.TaskSpecContainerSpec) - |> Deserializer.deserialize(:NetworkAttachmentSpec, :struct, DockerEngineAPI.Model.TaskSpecNetworkAttachmentSpec) - |> Deserializer.deserialize(:Resources, :struct, DockerEngineAPI.Model.TaskSpecResources) - |> Deserializer.deserialize(:RestartPolicy, :struct, DockerEngineAPI.Model.TaskSpecRestartPolicy) - |> Deserializer.deserialize(:Placement, :struct, DockerEngineAPI.Model.TaskSpecPlacement) - |> Deserializer.deserialize(:Networks, :list, DockerEngineAPI.Model.NetworkAttachmentConfig) - |> Deserializer.deserialize(:LogDriver, :struct, DockerEngineAPI.Model.TaskSpecLogDriver) - end -end - diff --git a/docker_engine_api/model/task_spec_container_spec.ex b/docker_engine_api/model/task_spec_container_spec.ex deleted file mode 100644 index 8f69ccc..0000000 --- a/docker_engine_api/model/task_spec_container_spec.ex +++ /dev/null @@ -1,83 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecContainerSpec do - @moduledoc """ - Container spec for the service.


> **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are > mutually exclusive. PluginSpec is only used when the Runtime field > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime > field is set to `attachment`. - """ - - @derive Jason.Encoder - defstruct [ - :Image, - :Labels, - :Command, - :Args, - :Hostname, - :Env, - :Dir, - :User, - :Groups, - :Privileges, - :TTY, - :OpenStdin, - :ReadOnly, - :Mounts, - :StopSignal, - :StopGracePeriod, - :HealthCheck, - :Hosts, - :DNSConfig, - :Secrets, - :Configs, - :Isolation, - :Init, - :Sysctls, - :CapabilityAdd, - :CapabilityDrop, - :Ulimits - ] - - @type t :: %__MODULE__{ - :Image => String.t | nil, - :Labels => %{optional(String.t) => String.t} | nil, - :Command => [String.t] | nil, - :Args => [String.t] | nil, - :Hostname => String.t | nil, - :Env => [String.t] | nil, - :Dir => String.t | nil, - :User => String.t | nil, - :Groups => [String.t] | nil, - :Privileges => DockerEngineAPI.Model.TaskSpecContainerSpecPrivileges.t | nil, - :TTY => boolean() | nil, - :OpenStdin => boolean() | nil, - :ReadOnly => boolean() | nil, - :Mounts => [DockerEngineAPI.Model.Mount.t] | nil, - :StopSignal => String.t | nil, - :StopGracePeriod => integer() | nil, - :HealthCheck => DockerEngineAPI.Model.HealthConfig.t | nil, - :Hosts => [String.t] | nil, - :DNSConfig => DockerEngineAPI.Model.TaskSpecContainerSpecDnsConfig.t | nil, - :Secrets => [DockerEngineAPI.Model.TaskSpecContainerSpecSecretsInner.t] | nil, - :Configs => [DockerEngineAPI.Model.TaskSpecContainerSpecConfigsInner.t] | nil, - :Isolation => String.t | nil, - :Init => boolean() | nil, - :Sysctls => %{optional(String.t) => String.t} | nil, - :CapabilityAdd => [String.t] | nil, - :CapabilityDrop => [String.t] | nil, - :Ulimits => [DockerEngineAPI.Model.ResourcesUlimitsInner.t] | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Privileges, :struct, DockerEngineAPI.Model.TaskSpecContainerSpecPrivileges) - |> Deserializer.deserialize(:Mounts, :list, DockerEngineAPI.Model.Mount) - |> Deserializer.deserialize(:HealthCheck, :struct, DockerEngineAPI.Model.HealthConfig) - |> Deserializer.deserialize(:DNSConfig, :struct, DockerEngineAPI.Model.TaskSpecContainerSpecDnsConfig) - |> Deserializer.deserialize(:Secrets, :list, DockerEngineAPI.Model.TaskSpecContainerSpecSecretsInner) - |> Deserializer.deserialize(:Configs, :list, DockerEngineAPI.Model.TaskSpecContainerSpecConfigsInner) - |> Deserializer.deserialize(:Ulimits, :list, DockerEngineAPI.Model.ResourcesUlimitsInner) - end -end - diff --git a/docker_engine_api/model/task_spec_container_spec_configs_inner.ex b/docker_engine_api/model/task_spec_container_spec_configs_inner.ex deleted file mode 100644 index 42f249f..0000000 --- a/docker_engine_api/model/task_spec_container_spec_configs_inner.ex +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecContainerSpecConfigsInner do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :File, - :Runtime, - :ConfigID, - :ConfigName - ] - - @type t :: %__MODULE__{ - :File => DockerEngineAPI.Model.TaskSpecContainerSpecConfigsInnerFile.t | nil, - :Runtime => map() | nil, - :ConfigID => String.t | nil, - :ConfigName => String.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:File, :struct, DockerEngineAPI.Model.TaskSpecContainerSpecConfigsInnerFile) - end -end - diff --git a/docker_engine_api/model/task_spec_container_spec_configs_inner_file.ex b/docker_engine_api/model/task_spec_container_spec_configs_inner_file.ex deleted file mode 100644 index f4bbd77..0000000 --- a/docker_engine_api/model/task_spec_container_spec_configs_inner_file.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecContainerSpecConfigsInnerFile do - @moduledoc """ - File represents a specific target that is backed by a file.


> **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :UID, - :GID, - :Mode - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :UID => String.t | nil, - :GID => String.t | nil, - :Mode => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/task_spec_container_spec_dns_config.ex b/docker_engine_api/model/task_spec_container_spec_dns_config.ex deleted file mode 100644 index 98cb57a..0000000 --- a/docker_engine_api/model/task_spec_container_spec_dns_config.ex +++ /dev/null @@ -1,26 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecContainerSpecDnsConfig do - @moduledoc """ - Specification for DNS related configurations in resolver configuration file (`resolv.conf`). - """ - - @derive Jason.Encoder - defstruct [ - :Nameservers, - :Search, - :Options - ] - - @type t :: %__MODULE__{ - :Nameservers => [String.t] | nil, - :Search => [String.t] | nil, - :Options => [String.t] | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/task_spec_container_spec_privileges.ex b/docker_engine_api/model/task_spec_container_spec_privileges.ex deleted file mode 100644 index ca969b9..0000000 --- a/docker_engine_api/model/task_spec_container_spec_privileges.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecContainerSpecPrivileges do - @moduledoc """ - Security options for the container - """ - - @derive Jason.Encoder - defstruct [ - :CredentialSpec, - :SELinuxContext - ] - - @type t :: %__MODULE__{ - :CredentialSpec => DockerEngineAPI.Model.TaskSpecContainerSpecPrivilegesCredentialSpec.t | nil, - :SELinuxContext => DockerEngineAPI.Model.TaskSpecContainerSpecPrivilegesSeLinuxContext.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:CredentialSpec, :struct, DockerEngineAPI.Model.TaskSpecContainerSpecPrivilegesCredentialSpec) - |> Deserializer.deserialize(:SELinuxContext, :struct, DockerEngineAPI.Model.TaskSpecContainerSpecPrivilegesSeLinuxContext) - end -end - diff --git a/docker_engine_api/model/task_spec_container_spec_privileges_credential_spec.ex b/docker_engine_api/model/task_spec_container_spec_privileges_credential_spec.ex deleted file mode 100644 index cb6aad9..0000000 --- a/docker_engine_api/model/task_spec_container_spec_privileges_credential_spec.ex +++ /dev/null @@ -1,26 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecContainerSpecPrivilegesCredentialSpec do - @moduledoc """ - CredentialSpec for managed service account (Windows only) - """ - - @derive Jason.Encoder - defstruct [ - :Config, - :File, - :Registry - ] - - @type t :: %__MODULE__{ - :Config => String.t | nil, - :File => String.t | nil, - :Registry => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/task_spec_container_spec_privileges_se_linux_context.ex b/docker_engine_api/model/task_spec_container_spec_privileges_se_linux_context.ex deleted file mode 100644 index b3d4197..0000000 --- a/docker_engine_api/model/task_spec_container_spec_privileges_se_linux_context.ex +++ /dev/null @@ -1,30 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecContainerSpecPrivilegesSeLinuxContext do - @moduledoc """ - SELinux labels of the container - """ - - @derive Jason.Encoder - defstruct [ - :Disable, - :User, - :Role, - :Type, - :Level - ] - - @type t :: %__MODULE__{ - :Disable => boolean() | nil, - :User => String.t | nil, - :Role => String.t | nil, - :Type => String.t | nil, - :Level => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/task_spec_container_spec_secrets_inner.ex b/docker_engine_api/model/task_spec_container_spec_secrets_inner.ex deleted file mode 100644 index a001ed4..0000000 --- a/docker_engine_api/model/task_spec_container_spec_secrets_inner.ex +++ /dev/null @@ -1,29 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecContainerSpecSecretsInner do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :File, - :SecretID, - :SecretName - ] - - @type t :: %__MODULE__{ - :File => DockerEngineAPI.Model.TaskSpecContainerSpecSecretsInnerFile.t | nil, - :SecretID => String.t | nil, - :SecretName => String.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:File, :struct, DockerEngineAPI.Model.TaskSpecContainerSpecSecretsInnerFile) - end -end - diff --git a/docker_engine_api/model/task_spec_container_spec_secrets_inner_file.ex b/docker_engine_api/model/task_spec_container_spec_secrets_inner_file.ex deleted file mode 100644 index 38ee031..0000000 --- a/docker_engine_api/model/task_spec_container_spec_secrets_inner_file.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecContainerSpecSecretsInnerFile do - @moduledoc """ - File represents a specific target that is backed by a file. - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :UID, - :GID, - :Mode - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :UID => String.t | nil, - :GID => String.t | nil, - :Mode => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/task_spec_log_driver.ex b/docker_engine_api/model/task_spec_log_driver.ex deleted file mode 100644 index 52d6b31..0000000 --- a/docker_engine_api/model/task_spec_log_driver.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecLogDriver do - @moduledoc """ - Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified. - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Options - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Options => %{optional(String.t) => String.t} | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/task_spec_network_attachment_spec.ex b/docker_engine_api/model/task_spec_network_attachment_spec.ex deleted file mode 100644 index dd1dd85..0000000 --- a/docker_engine_api/model/task_spec_network_attachment_spec.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecNetworkAttachmentSpec do - @moduledoc """ - Read-only spec type for non-swarm containers attached to swarm overlay networks.


> **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are > mutually exclusive. PluginSpec is only used when the Runtime field > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime > field is set to `attachment`. - """ - - @derive Jason.Encoder - defstruct [ - :ContainerID - ] - - @type t :: %__MODULE__{ - :ContainerID => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/task_spec_placement.ex b/docker_engine_api/model/task_spec_placement.ex deleted file mode 100644 index 5a10e5f..0000000 --- a/docker_engine_api/model/task_spec_placement.ex +++ /dev/null @@ -1,32 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecPlacement do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Constraints, - :Preferences, - :MaxReplicas, - :Platforms - ] - - @type t :: %__MODULE__{ - :Constraints => [String.t] | nil, - :Preferences => [DockerEngineAPI.Model.TaskSpecPlacementPreferencesInner.t] | nil, - :MaxReplicas => integer() | nil, - :Platforms => [DockerEngineAPI.Model.Platform.t] | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Preferences, :list, DockerEngineAPI.Model.TaskSpecPlacementPreferencesInner) - |> Deserializer.deserialize(:Platforms, :list, DockerEngineAPI.Model.Platform) - end -end - diff --git a/docker_engine_api/model/task_spec_placement_preferences_inner.ex b/docker_engine_api/model/task_spec_placement_preferences_inner.ex deleted file mode 100644 index d4bdee2..0000000 --- a/docker_engine_api/model/task_spec_placement_preferences_inner.ex +++ /dev/null @@ -1,25 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecPlacementPreferencesInner do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Spread - ] - - @type t :: %__MODULE__{ - :Spread => DockerEngineAPI.Model.TaskSpecPlacementPreferencesInnerSpread.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Spread, :struct, DockerEngineAPI.Model.TaskSpecPlacementPreferencesInnerSpread) - end -end - diff --git a/docker_engine_api/model/task_spec_placement_preferences_inner_spread.ex b/docker_engine_api/model/task_spec_placement_preferences_inner_spread.ex deleted file mode 100644 index a163262..0000000 --- a/docker_engine_api/model/task_spec_placement_preferences_inner_spread.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecPlacementPreferencesInnerSpread do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :SpreadDescriptor - ] - - @type t :: %__MODULE__{ - :SpreadDescriptor => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/task_spec_plugin_spec.ex b/docker_engine_api/model/task_spec_plugin_spec.ex deleted file mode 100644 index d0b5187..0000000 --- a/docker_engine_api/model/task_spec_plugin_spec.ex +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecPluginSpec do - @moduledoc """ - Plugin spec for the service. *(Experimental release only.)*


> **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are > mutually exclusive. PluginSpec is only used when the Runtime field > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime > field is set to `attachment`. - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Remote, - :Disabled, - :PluginPrivilege - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Remote => String.t | nil, - :Disabled => boolean() | nil, - :PluginPrivilege => [DockerEngineAPI.Model.PluginPrivilege.t] | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:PluginPrivilege, :list, DockerEngineAPI.Model.PluginPrivilege) - end -end - diff --git a/docker_engine_api/model/task_spec_resources.ex b/docker_engine_api/model/task_spec_resources.ex deleted file mode 100644 index d141b98..0000000 --- a/docker_engine_api/model/task_spec_resources.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecResources do - @moduledoc """ - Resource requirements which apply to each individual container created as part of the service. - """ - - @derive Jason.Encoder - defstruct [ - :Limits, - :Reservations - ] - - @type t :: %__MODULE__{ - :Limits => DockerEngineAPI.Model.Limit.t | nil, - :Reservations => DockerEngineAPI.Model.ResourceObject.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Limits, :struct, DockerEngineAPI.Model.Limit) - |> Deserializer.deserialize(:Reservations, :struct, DockerEngineAPI.Model.ResourceObject) - end -end - diff --git a/docker_engine_api/model/task_spec_restart_policy.ex b/docker_engine_api/model/task_spec_restart_policy.ex deleted file mode 100644 index 4dac561..0000000 --- a/docker_engine_api/model/task_spec_restart_policy.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskSpecRestartPolicy do - @moduledoc """ - Specification for the restart policy which applies to containers created as part of this service. - """ - - @derive Jason.Encoder - defstruct [ - :Condition, - :Delay, - :MaxAttempts, - :Window - ] - - @type t :: %__MODULE__{ - :Condition => String.t | nil, - :Delay => integer() | nil, - :MaxAttempts => integer() | nil, - :Window => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/task_state.ex b/docker_engine_api/model/task_state.ex deleted file mode 100644 index 2652726..0000000 --- a/docker_engine_api/model/task_state.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskState do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - - ] - - @type t :: %__MODULE__{ - - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/task_status.ex b/docker_engine_api/model/task_status.ex deleted file mode 100644 index 629b37d..0000000 --- a/docker_engine_api/model/task_status.ex +++ /dev/null @@ -1,34 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskStatus do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Timestamp, - :State, - :Message, - :Err, - :ContainerStatus - ] - - @type t :: %__MODULE__{ - :Timestamp => String.t | nil, - :State => DockerEngineAPI.Model.TaskState.t | nil, - :Message => String.t | nil, - :Err => String.t | nil, - :ContainerStatus => DockerEngineAPI.Model.TaskStatusContainerStatus.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:State, :struct, DockerEngineAPI.Model.TaskState) - |> Deserializer.deserialize(:ContainerStatus, :struct, DockerEngineAPI.Model.TaskStatusContainerStatus) - end -end - diff --git a/docker_engine_api/model/task_status_container_status.ex b/docker_engine_api/model/task_status_container_status.ex deleted file mode 100644 index 7d1368a..0000000 --- a/docker_engine_api/model/task_status_container_status.ex +++ /dev/null @@ -1,26 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TaskStatusContainerStatus do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :ContainerID, - :PID, - :ExitCode - ] - - @type t :: %__MODULE__{ - :ContainerID => String.t | nil, - :PID => integer() | nil, - :ExitCode => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/throttle_device.ex b/docker_engine_api/model/throttle_device.ex deleted file mode 100644 index 7d63813..0000000 --- a/docker_engine_api/model/throttle_device.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ThrottleDevice do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Path, - :Rate - ] - - @type t :: %__MODULE__{ - :Path => String.t | nil, - :Rate => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/tls_info.ex b/docker_engine_api/model/tls_info.ex deleted file mode 100644 index e5b9849..0000000 --- a/docker_engine_api/model/tls_info.ex +++ /dev/null @@ -1,26 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.TlsInfo do - @moduledoc """ - Information about the issuer of leaf TLS certificates and the trusted root CA certificate. - """ - - @derive Jason.Encoder - defstruct [ - :TrustRoot, - :CertIssuerSubject, - :CertIssuerPublicKey - ] - - @type t :: %__MODULE__{ - :TrustRoot => String.t | nil, - :CertIssuerSubject => String.t | nil, - :CertIssuerPublicKey => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/unlock_key_response.ex b/docker_engine_api/model/unlock_key_response.ex deleted file mode 100644 index 81012cf..0000000 --- a/docker_engine_api/model/unlock_key_response.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.UnlockKeyResponse do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :UnlockKey - ] - - @type t :: %__MODULE__{ - :UnlockKey => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/volume.ex b/docker_engine_api/model/volume.ex deleted file mode 100644 index 461a544..0000000 --- a/docker_engine_api/model/volume.ex +++ /dev/null @@ -1,44 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.Volume do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Driver, - :Mountpoint, - :CreatedAt, - :Status, - :Labels, - :Scope, - :ClusterVolume, - :Options, - :UsageData - ] - - @type t :: %__MODULE__{ - :Name => String.t, - :Driver => String.t, - :Mountpoint => String.t, - :CreatedAt => String.t | nil, - :Status => %{optional(String.t) => map()} | nil, - :Labels => %{optional(String.t) => String.t}, - :Scope => String.t, - :ClusterVolume => DockerEngineAPI.Model.ClusterVolume.t | nil, - :Options => %{optional(String.t) => String.t}, - :UsageData => DockerEngineAPI.Model.VolumeUsageData.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:ClusterVolume, :struct, DockerEngineAPI.Model.ClusterVolume) - |> Deserializer.deserialize(:UsageData, :struct, DockerEngineAPI.Model.VolumeUsageData) - end -end - diff --git a/docker_engine_api/model/volume_create_options.ex b/docker_engine_api/model/volume_create_options.ex deleted file mode 100644 index 36c203c..0000000 --- a/docker_engine_api/model/volume_create_options.ex +++ /dev/null @@ -1,33 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.VolumeCreateOptions do - @moduledoc """ - Volume configuration - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Driver, - :DriverOpts, - :Labels, - :ClusterVolumeSpec - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Driver => String.t | nil, - :DriverOpts => %{optional(String.t) => String.t} | nil, - :Labels => %{optional(String.t) => String.t} | nil, - :ClusterVolumeSpec => DockerEngineAPI.Model.ClusterVolumeSpec.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:ClusterVolumeSpec, :struct, DockerEngineAPI.Model.ClusterVolumeSpec) - end -end - diff --git a/docker_engine_api/model/volume_list_response.ex b/docker_engine_api/model/volume_list_response.ex deleted file mode 100644 index 9bee563..0000000 --- a/docker_engine_api/model/volume_list_response.ex +++ /dev/null @@ -1,27 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.VolumeListResponse do - @moduledoc """ - Volume list response - """ - - @derive Jason.Encoder - defstruct [ - :Volumes, - :Warnings - ] - - @type t :: %__MODULE__{ - :Volumes => [DockerEngineAPI.Model.Volume.t] | nil, - :Warnings => [String.t] | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Volumes, :list, DockerEngineAPI.Model.Volume) - end -end - diff --git a/docker_engine_api/model/volume_prune_response.ex b/docker_engine_api/model/volume_prune_response.ex deleted file mode 100644 index c2dddf3..0000000 --- a/docker_engine_api/model/volume_prune_response.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.VolumePruneResponse do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :VolumesDeleted, - :SpaceReclaimed - ] - - @type t :: %__MODULE__{ - :VolumesDeleted => [String.t] | nil, - :SpaceReclaimed => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/volume_update_request.ex b/docker_engine_api/model/volume_update_request.ex deleted file mode 100644 index a0f97d6..0000000 --- a/docker_engine_api/model/volume_update_request.ex +++ /dev/null @@ -1,25 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.VolumeUpdateRequest do - @moduledoc """ - Volume configuration - """ - - @derive Jason.Encoder - defstruct [ - :Spec - ] - - @type t :: %__MODULE__{ - :Spec => DockerEngineAPI.Model.ClusterVolumeSpec.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Spec, :struct, DockerEngineAPI.Model.ClusterVolumeSpec) - end -end - diff --git a/docker_engine_api/model/volume_usage_data.ex b/docker_engine_api/model/volume_usage_data.ex deleted file mode 100644 index a5994fc..0000000 --- a/docker_engine_api/model/volume_usage_data.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.VolumeUsageData do - @moduledoc """ - Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. - """ - - @derive Jason.Encoder - defstruct [ - :Size, - :RefCount - ] - - @type t :: %__MODULE__{ - :Size => integer(), - :RefCount => integer() - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/request_builder.ex b/docker_engine_api/request_builder.ex index 3710a34..ba399f1 100644 --- a/docker_engine_api/request_builder.ex +++ b/docker_engine_api/request_builder.ex @@ -157,7 +157,7 @@ defmodule DockerEngineAPI.RequestBuilder do - `result` (Tesla.Env.result()): The Tesla response. - `mapping` ([{http_status, struct}]): Status-to-struct mapping for decoding. """ - @spec evaluate_response(Tesla.Env.result(), response_mapping) :: {:ok, struct() | Tesla.Env.t} | {:error, Tesla.Env.t} + @spec evaluate_response(Tesla.Env.result(), response_mapping) :: {:ok, struct() | list(struct()) | Tesla.Env.t} | {:error, term()} def evaluate_response({:ok, %Tesla.Env{} = env}, mapping) do status = env.status mapping @@ -172,6 +172,7 @@ defmodule DockerEngineAPI.RequestBuilder do defp decode(%Tesla.Env{body: body} = env, struct) do case struct do false -> {:ok, env} + %{} -> DockerEngineAPI.Deserializer.jason_decode(body) module -> DockerEngineAPI.Deserializer.jason_decode(body, module) end end diff --git a/lib/container.ex b/lib/container.ex index 40ef197..17083e4 100644 --- a/lib/container.ex +++ b/lib/container.ex @@ -23,7 +23,8 @@ defmodule Testcontainers.Container do container_id: nil, check_image: ~r/.*/, network_mode: nil, - reuse: false + reuse: false, + force_reuse: false ] @doc """ @@ -166,6 +167,13 @@ defmodule Testcontainers.Container do %__MODULE__{config | reuse: reuse} end + def with_force_reuse(%__MODULE__{} = config, force_reuse) when is_boolean(force_reuse) do + if config.auto_remove do + raise ArgumentError, "Cannot reuse a container that is set to auto-remove" + end + %__MODULE__{config | reuse: true, force_reuse: force_reuse} + end + @doc """ Adds authentication token for registries that require a login. """ diff --git a/lib/container/protocols/container_builder_helper.ex b/lib/container/protocols/container_builder_helper.ex index e032937..24346d6 100644 --- a/lib/container/protocols/container_builder_helper.ex +++ b/lib/container/protocols/container_builder_helper.ex @@ -10,7 +10,7 @@ defmodule Testcontainers.ContainerBuilderHelper do |> Container.with_label(container_lang_label(), container_lang_value()) |> Container.with_label(container_label(), "#{true}") - if config.reuse && "true" == Map.get(state.properties, "testcontainers.reuse.enable", "false") do + if config.reuse && ("true" == Map.get(state.properties, "testcontainers.reuse.enable", "false") || config.force_reuse) do hash = Hash.struct_to_hash(config) config |> Container.with_label(container_reuse(), "true") diff --git a/lib/container/rabbitmq_container.ex b/lib/container/rabbitmq_container.ex index de94f24..66de5ff 100644 --- a/lib/container/rabbitmq_container.ex +++ b/lib/container/rabbitmq_container.ex @@ -36,7 +36,8 @@ defmodule Testcontainers.RabbitMQContainer do :cmd, :wait_timeout, check_image: @default_image, - reuse: false + reuse: false, + force_reuse: false ] @doc """ @@ -160,6 +161,10 @@ defmodule Testcontainers.RabbitMQContainer do %__MODULE__{config | reuse: reuse} end + def with_force_reuse(%__MODULE__{} = config) do + %__MODULE__{config | reuse: true, force_reuse: true} + end + @doc """ Retrieves the default Docker image for the RabbitMQ container """ @@ -281,6 +286,7 @@ defmodule Testcontainers.RabbitMQContainer do ) |> with_check_image(config.check_image) |> with_reuse(config.reuse) + |> with_force_reuse(config.force_reuse) |> valid_image!() end diff --git a/lib/docker/api.ex b/lib/docker/api.ex index 6ef50d7..66ed2b1 100644 --- a/lib/docker/api.ex +++ b/lib/docker/api.ex @@ -26,20 +26,17 @@ defmodule Testcontainers.Docker.Api do "label" => ["#{Testcontainers.Constants.container_reuse_hash_label}=#{hash}"] } |> Jason.encode!() case Api.Container.container_list(conn, filters: filters_json) do - {:ok, containers} when is_list(containers) -> - case containers do - [] -> - {:error, :no_container} + {:ok, %DockerEngineAPI.Model.ErrorResponse{} = error} -> + {:error, {:failed_to_get_container, error}} - [container | _] -> - get_container(container."Id", conn) - end + {:error, error} -> + {:error, error} - {:error, %Tesla.Env{status: other}} -> - {:error, {:http_error, other}} + {:ok, []} -> + {:error, :no_container} - {:ok, %DockerEngineAPI.Model.ErrorResponse{} = error} -> - {:error, {:failed_to_get_container, error}} + {:ok, [container | _]}-> + get_container(container."Id", conn) end end @@ -125,9 +122,6 @@ defmodule Testcontainers.Docker.Api do {:ok, %DockerEngineAPI.Model.ExecInspectResponse{} = body} -> {:ok, parse_inspect_result(body)} - {:ok, %Tesla.Env{status: status}} -> - {:error, {:http_error, status}} - {:ok, %DockerEngineAPI.Model.ErrorResponse{message: message}} -> {:error, message} diff --git a/lib/mix/tasks/testcontainers/test.ex b/lib/mix/tasks/testcontainers/test.ex index 8dc405c..10e1a5c 100644 --- a/lib/mix/tasks/testcontainers/test.ex +++ b/lib/mix/tasks/testcontainers/test.ex @@ -33,7 +33,7 @@ defmodule Mix.Tasks.Testcontainers.Test do defp check_folders_exist(folders) do Enum.each(folders, fn folder -> unless File.dir?(folder) do - Mix.raise("Folder does not exist: #{folder}") + raise("Folder does not exist: #{folder}") end end) end @@ -77,7 +77,7 @@ defmodule Mix.Tasks.Testcontainers.Test do ) port = MySqlContainer.port(container) {container, create_env(port)} - _ -> Mix.raise("Unsupported database: #{database}") + _ -> raise("Unsupported database: #{database}") end end diff --git a/test/container/rabbitmq_container_test.exs b/test/container/rabbitmq_container_test.exs index 7df53a4..1556548 100644 --- a/test/container/rabbitmq_container_test.exs +++ b/test/container/rabbitmq_container_test.exs @@ -51,6 +51,30 @@ defmodule Testcontainers.Container.RabbitMQContainerTest do end end + describe "with force_reuse custom configuration" do + @custom_rabbitmq RabbitMQContainer.new() + |> RabbitMQContainer.with_image("rabbitmq:3-management-alpine") + |> RabbitMQContainer.with_port(5671) + |> RabbitMQContainer.with_username("custom-user") + |> RabbitMQContainer.with_password("custom_password") + |> RabbitMQContainer.with_virtual_host("custom-virtual-host") + |> RabbitMQContainer.with_force_reuse() + + container(:rabbitmq, @custom_rabbitmq) + + test "provides a rabbitmq container compliant with specified configuration", %{ + rabbitmq: rabbitmq + } do + {:ok, connection} = + RabbitMQContainer.connection_parameters(rabbitmq) + |> AMQP.Connection.open() + + do_assertion(connection) + + :ok = Testcontainers.stop_container(rabbitmq.container_id) + end + end + defp do_assertion(connection) do {:ok, channel} = AMQP.Channel.open(connection) AMQP.Queue.declare(channel, "channel") diff --git a/test/container_test.exs b/test/container_test.exs index 6b6deca..e86e816 100644 --- a/test/container_test.exs +++ b/test/container_test.exs @@ -19,8 +19,8 @@ defmodule Testcontainers.ContainerTest do test "returns the same hash for the same container" do container1 = ContainerBuilder.build(Testcontainers.PostgresContainer.new()) container2 = ContainerBuilder.build(Testcontainers.PostgresContainer.new()) - assert Testcontainers.Util.Hash.struct_to_hash(container1) == "005c9be32d1a1d2f74f5cdaaf534be3e039a016473906bad8d91186c47346f41" - assert Testcontainers.Util.Hash.struct_to_hash(container2) == "005c9be32d1a1d2f74f5cdaaf534be3e039a016473906bad8d91186c47346f41" + assert Testcontainers.Util.Hash.struct_to_hash(container1) == "7ecc623f446ebc9bd11be895960ef64964055d68262cbd8073754f926f048bcf" + assert Testcontainers.Util.Hash.struct_to_hash(container2) == "7ecc623f446ebc9bd11be895960ef64964055d68262cbd8073754f926f048bcf" end end From c3469937fc1f3798ac118515d02b17fa77cab1ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarl=20Andr=C3=A9=20H=C3=BCbenthal?= Date: Mon, 4 Nov 2024 21:15:12 +0100 Subject: [PATCH 4/5] lower cover threshold --- lib/wait_strategy/log_wait_strategy.ex | 2 +- mix.exs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/wait_strategy/log_wait_strategy.ex b/lib/wait_strategy/log_wait_strategy.ex index ec25285..b179c63 100644 --- a/lib/wait_strategy/log_wait_strategy.ex +++ b/lib/wait_strategy/log_wait_strategy.ex @@ -42,7 +42,7 @@ defmodule Testcontainers.LogWaitStrategy do true -> :ok - false -> + _ -> log_retry_message(container_id, wait_strategy.log_regex, wait_strategy.retry_delay) :timer.sleep(wait_strategy.retry_delay) wait_for_log_message(wait_strategy, container_id, conn, start_time) diff --git a/mix.exs b/mix.exs index 15a4a92..cb2c33f 100644 --- a/mix.exs +++ b/mix.exs @@ -22,11 +22,10 @@ defmodule TestcontainersElixir.MixProject do licenses: ["MIT"] ], test_coverage: [ - summary: [threshold: 60], + summary: [threshold: 50], ignore_modules: [ TestHelper, - Inspect.Testcontainers.TestUser, - ~r/DockerEngineAPI/ + Inspect.Testcontainers.TestUser ] ], elixirc_paths: elixirc_paths(Mix.env()) From da1828c7f4e1f37c6b5af553b391525f889d7bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarl=20Andr=C3=A9=20H=C3=BCbenthal?= Date: Mon, 4 Nov 2024 22:26:06 +0100 Subject: [PATCH 5/5] remove more files --- docker_engine_api/model/auth_config.ex | 28 ------------------ .../model/generic_resources_inner.ex | 28 ------------------ ..._resources_inner_discrete_resource_spec.ex | 24 --------------- ...ric_resources_inner_named_resource_spec.ex | 24 --------------- docker_engine_api/model/index_info.ex | 28 ------------------ docker_engine_api/model/local_node_state.ex | 22 -------------- docker_engine_api/model/manager_status.ex | 29 ------------------- 7 files changed, 183 deletions(-) delete mode 100644 docker_engine_api/model/auth_config.ex delete mode 100644 docker_engine_api/model/generic_resources_inner.ex delete mode 100644 docker_engine_api/model/generic_resources_inner_discrete_resource_spec.ex delete mode 100644 docker_engine_api/model/generic_resources_inner_named_resource_spec.ex delete mode 100644 docker_engine_api/model/index_info.ex delete mode 100644 docker_engine_api/model/local_node_state.ex delete mode 100644 docker_engine_api/model/manager_status.ex diff --git a/docker_engine_api/model/auth_config.ex b/docker_engine_api/model/auth_config.ex deleted file mode 100644 index d58145e..0000000 --- a/docker_engine_api/model/auth_config.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.AuthConfig do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :username, - :password, - :email, - :serveraddress - ] - - @type t :: %__MODULE__{ - :username => String.t | nil, - :password => String.t | nil, - :email => String.t | nil, - :serveraddress => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/generic_resources_inner.ex b/docker_engine_api/model/generic_resources_inner.ex deleted file mode 100644 index 5c7bff3..0000000 --- a/docker_engine_api/model/generic_resources_inner.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.GenericResourcesInner do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :NamedResourceSpec, - :DiscreteResourceSpec - ] - - @type t :: %__MODULE__{ - :NamedResourceSpec => DockerEngineAPI.Model.GenericResourcesInnerNamedResourceSpec.t | nil, - :DiscreteResourceSpec => DockerEngineAPI.Model.GenericResourcesInnerDiscreteResourceSpec.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:NamedResourceSpec, :struct, DockerEngineAPI.Model.GenericResourcesInnerNamedResourceSpec) - |> Deserializer.deserialize(:DiscreteResourceSpec, :struct, DockerEngineAPI.Model.GenericResourcesInnerDiscreteResourceSpec) - end -end - diff --git a/docker_engine_api/model/generic_resources_inner_discrete_resource_spec.ex b/docker_engine_api/model/generic_resources_inner_discrete_resource_spec.ex deleted file mode 100644 index 1fc6363..0000000 --- a/docker_engine_api/model/generic_resources_inner_discrete_resource_spec.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.GenericResourcesInnerDiscreteResourceSpec do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Kind, - :Value - ] - - @type t :: %__MODULE__{ - :Kind => String.t | nil, - :Value => integer() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/generic_resources_inner_named_resource_spec.ex b/docker_engine_api/model/generic_resources_inner_named_resource_spec.ex deleted file mode 100644 index a9b1523..0000000 --- a/docker_engine_api/model/generic_resources_inner_named_resource_spec.ex +++ /dev/null @@ -1,24 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.GenericResourcesInnerNamedResourceSpec do - @moduledoc """ - - """ - - @derive Jason.Encoder - defstruct [ - :Kind, - :Value - ] - - @type t :: %__MODULE__{ - :Kind => String.t | nil, - :Value => String.t | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/index_info.ex b/docker_engine_api/model/index_info.ex deleted file mode 100644 index 38487ff..0000000 --- a/docker_engine_api/model/index_info.ex +++ /dev/null @@ -1,28 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.IndexInfo do - @moduledoc """ - IndexInfo contains information about a registry. - """ - - @derive Jason.Encoder - defstruct [ - :Name, - :Mirrors, - :Secure, - :Official - ] - - @type t :: %__MODULE__{ - :Name => String.t | nil, - :Mirrors => [String.t] | nil, - :Secure => boolean() | nil, - :Official => boolean() | nil - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/local_node_state.ex b/docker_engine_api/model/local_node_state.ex deleted file mode 100644 index 8e40866..0000000 --- a/docker_engine_api/model/local_node_state.ex +++ /dev/null @@ -1,22 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.LocalNodeState do - @moduledoc """ - Current local status of this node. - """ - - @derive Jason.Encoder - defstruct [ - - ] - - @type t :: %__MODULE__{ - - } - - def decode(value) do - value - end -end - diff --git a/docker_engine_api/model/manager_status.ex b/docker_engine_api/model/manager_status.ex deleted file mode 100644 index a90bf1b..0000000 --- a/docker_engine_api/model/manager_status.ex +++ /dev/null @@ -1,29 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator 7.0.1 (https://openapi-generator.tech). -# Do not edit this file manually. - -defmodule DockerEngineAPI.Model.ManagerStatus do - @moduledoc """ - ManagerStatus represents the status of a manager. It provides the current status of a node's manager component, if the node is a manager. - """ - - @derive Jason.Encoder - defstruct [ - :Leader, - :Reachability, - :Addr - ] - - @type t :: %__MODULE__{ - :Leader => boolean() | nil, - :Reachability => DockerEngineAPI.Model.Reachability.t | nil, - :Addr => String.t | nil - } - - alias DockerEngineAPI.Deserializer - - def decode(value) do - value - |> Deserializer.deserialize(:Reachability, :struct, DockerEngineAPI.Model.Reachability) - end -end -