diff --git a/flake.nix b/flake.nix index d97d9eb..2fa0567 100644 --- a/flake.nix +++ b/flake.nix @@ -112,6 +112,20 @@ }; fixes = [fixHostConfigIsolation]; }; + api_1_45 = mkApiYaml { + src = pkgs.fetchurl { + url = "https://docs.docker.com/reference/engine/v1.45.yaml"; + hash = "sha256-PiGCCkbT/dHiSE4J+/rAX4MWfb1JR6FHkPui8DTFP7o="; + }; + fixes = [fixHostConfigIsolation]; + }; + api_1_46 = mkApiYaml { + src = pkgs.fetchurl { + url = "https://docs.docker.com/reference/engine/v1.46.yaml"; + hash = "sha256-bJr6mFqSvuFcN49NblO9pehFVCz7PSesBUweCicqRig="; + }; + fixes = [fixHostConfigIsolation]; + }; mkGenerateScript = apiYaml: dir: pkgs.writeShellScriptBin "generate.sh" '' mkdir -p "${dir}" @@ -172,7 +186,9 @@ api_1_41 api_1_42 api_1_43 - api_1_44; + api_1_44 + api_1_45 + api_1_46; generate1_36 = mkGenerateScript api_1_36 "v1.36"; generate1_37 = mkGenerateScript api_1_37 "v1.37"; @@ -183,6 +199,8 @@ generate1_42 = mkGenerateScript api_1_42 "v1.42"; generate1_43 = mkGenerateScript api_1_43 "v1.43"; generate1_44 = mkGenerateScript api_1_44 "v1.44"; + generate1_45 = mkGenerateScript api_1_45 "v1.45"; + generate1_46 = mkGenerateScript api_1_46 "v1.46"; }; } ); diff --git a/generate_all.sh b/generate_all.sh index 1c99987..f4efda4 100755 --- a/generate_all.sh +++ b/generate_all.sh @@ -16,3 +16,5 @@ nix run .#generate1_41 nix run .#generate1_42 nix run .#generate1_43 nix run .#generate1_44 +nix run .#generate1_45 +nix run .#generate1_46 diff --git a/integration-tests/lib/TestLib/Docker/Networks.hs b/integration-tests/lib/TestLib/Docker/Networks.hs index b530d9a..65e44cd 100644 --- a/integration-tests/lib/TestLib/Docker/Networks.hs +++ b/integration-tests/lib/TestLib/Docker/Networks.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE ViewPatterns #-} module TestLib.Docker.Networks where @@ -41,8 +42,13 @@ createNetwork ds networkName labels = do let networkConfig = (mkNetworkCreateRequest networkName) { networkCreateRequestLabels = Just $ M.mapKeys T.unpack labels } +#if MIN_VERSION_docker_engine(0,146,0) + NetworkCreateResponse {networkCreateResponseId=x} <- runDockerException ds (networkCreate networkConfig) + return (Id x) +#else NetworkCreateResponse {networkCreateResponseId=(Just x)} <- runDockerException ds (networkCreate networkConfig) return (Id x) +#endif deleteNetwork :: (HasCallStack, MonadUnliftIO m, MonadLoggerIO m, MonadThrow m) => DockerState -> Id -> m () deleteNetwork ds networkId = do diff --git a/stack.yaml b/stack.yaml index 8f06994..4d22c7c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -14,6 +14,8 @@ packages: # - ./v1.41 # - ./v1.42 # - ./v1.43 -- ./v1.44 +# - ./v1.44 +# - ./v1.45 +- ./v1.46 - ./integration-tests diff --git a/v1.45/.gitignore b/v1.45/.gitignore new file mode 100644 index 0000000..aaed8f8 --- /dev/null +++ b/v1.45/.gitignore @@ -0,0 +1,8 @@ +.stack-work +src/highlight.js +src/style.css +dist +dist-newstyle +cabal.project.local +.cabal-sandbox +cabal.sandbox.config \ No newline at end of file diff --git a/v1.45/.openapi-generator-ignore b/v1.45/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/v1.45/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/v1.45/.openapi-generator/FILES b/v1.45/.openapi-generator/FILES new file mode 100644 index 0000000..f68d8e4 --- /dev/null +++ b/v1.45/.openapi-generator/FILES @@ -0,0 +1,38 @@ +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +Setup.hs +docker-engine.cabal +git_push.sh +lib/DockerEngine.hs +lib/DockerEngine/API.hs +lib/DockerEngine/API/Config.hs +lib/DockerEngine/API/Container.hs +lib/DockerEngine/API/Distribution.hs +lib/DockerEngine/API/Exec.hs +lib/DockerEngine/API/Image.hs +lib/DockerEngine/API/Network.hs +lib/DockerEngine/API/Node.hs +lib/DockerEngine/API/Plugin.hs +lib/DockerEngine/API/Secret.hs +lib/DockerEngine/API/Service.hs +lib/DockerEngine/API/Session.hs +lib/DockerEngine/API/Swarm.hs +lib/DockerEngine/API/System.hs +lib/DockerEngine/API/Task.hs +lib/DockerEngine/API/Volume.hs +lib/DockerEngine/Client.hs +lib/DockerEngine/Core.hs +lib/DockerEngine/Logging.hs +lib/DockerEngine/LoggingKatip.hs +lib/DockerEngine/LoggingMonadLogger.hs +lib/DockerEngine/MimeTypes.hs +lib/DockerEngine/Model.hs +lib/DockerEngine/ModelLens.hs +openapi.yaml +stack.yaml +tests/ApproxEq.hs +tests/Instances.hs +tests/PropMime.hs +tests/Test.hs diff --git a/v1.45/.openapi-generator/VERSION b/v1.45/.openapi-generator/VERSION new file mode 100644 index 0000000..93c8dda --- /dev/null +++ b/v1.45/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.6.0 diff --git a/v1.45/README.md b/v1.45/README.md new file mode 100644 index 0000000..e5bedf8 --- /dev/null +++ b/v1.45/README.md @@ -0,0 +1,203 @@ +## OpenAPI Auto-Generated [http-client](https://www.stackage.org/lts-10.0/package/http-client-0.5.7.1) Bindings to `Docker Engine API` + +The library in `lib` provides auto-generated-from-OpenAPI [http-client](https://www.stackage.org/lts-10.0/package/http-client-0.5.7.1) bindings to the Docker Engine API API. + +OpenApi Version: 3.0.1 + +## Installation + +Installation follows the standard approach to installing Stack-based projects. + +1. Install the [Haskell `stack` tool](http://docs.haskellstack.org/en/stable/README). +2. To build the package, and generate the documentation (recommended): +``` +stack haddock +``` +which will generate docs for this lib in the `docs` folder. + +To generate the docs in the normal location (to enable hyperlinks to external libs), remove +``` +build: + haddock-arguments: + haddock-args: + - "--odir=./docs" +``` +from the stack.yaml file and run `stack haddock` again. + +3. To run unit tests: +``` +stack test +``` + +## OpenAPI-Generator + +The code generator that produced this library, and which explains how +to obtain and use the openapi-generator cli tool lives at + +https://openapi-generator.tech + +The _generator-name_ argument (`--generator-name`) passed to the cli tool used should be + +``` +haskell-http-client +``` + +### Unsupported OpenAPI Features + +* Model Inheritance + +This is beta software; other cases may not be supported. + +### Codegen "additional properties" parameters + +These options allow some customization of the code generation process. + +**haskell-http-client additional properties:** + +| OPTION | DESCRIPTION | DEFAULT | ACTUAL | +|---------------------------------|-------------------------------------------------------------------------------------------------------------------------------|----------|---------------------------------------| +| allowFromJsonNulls | allow JSON Null during model decoding from JSON | true | true | +| allowNonUniqueOperationIds | allow *different* API modules to contain the same operationId. Each API must be imported qualified | false | false | +| allowToJsonNulls | allow emitting JSON Null during model encoding to JSON | false | false | +| baseModule | Set the base module namespace | | DockerEngine | +| cabalPackage | Set the cabal package name, which consists of one or more alphanumeric words separated by hyphens | | docker-engine | +| cabalVersion | Set the cabal version number, consisting of a sequence of one or more integers separated by dots | 0.1.0.0 | 0.1.0.0 | +| customTestInstanceModule | test module used to provide typeclass instances for types not known by the generator | | | +| configType | Set the name of the type used for configuration | | DockerEngineConfig | +| dateFormat | format string used to parse/render a date | %Y-%m-%d | %Y-%m-%d | +| dateTimeFormat | format string used to parse/render a datetime. (Defaults to [formatISO8601Millis][1] when not provided) | | | +| dateTimeParseFormat | overrides the format string used to parse a datetime | | | +| generateEnums | Generate specific datatypes for OpenAPI enums | true | true | +| generateFormUrlEncodedInstances | Generate FromForm/ToForm instances for models used by x-www-form-urlencoded operations (model fields must be primitive types) | true | true | +| generateLenses | Generate Lens optics for Models | true | true | +| generateModelConstructors | Generate smart constructors (only supply required fields) for models | true | true | +| inlineMimeTypes | Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option | true | true | +| modelDeriving | Additional classes to include in the deriving() clause of Models | | | +| requestType | Set the name of the type used to generate requests | | DockerEngineRequest | +| strictFields | Add strictness annotations to all model fields | true | true | +| useKatip | Sets the default value for the UseKatip cabal flag. If true, the katip package provides logging instead of monad-logger | true | true | +| queryExtraUnreserved | Configures additional querystring characters which must not be URI encoded, e.g. '+' or ':' | | | + +[1]: https://www.stackage.org/haddock/lts-9.0/iso8601-time-0.1.4/Data-Time-ISO8601.html#v:formatISO8601Millis + +An example setting _dateTimeFormat_ and _strictFields_: + +``` +java -jar openapi-generator-cli.jar generate -i petstore.yaml -g haskell-http-client -o output/haskell-http-client --additional-properties=dateTimeFormat="%Y-%m-%dT%H:%M:%S%Q%z" --additional-properties=strictFields=false +``` + +View the full list of Codegen "config option" parameters with the command: + +``` +java -jar openapi-generator-cli.jar config-help -g haskell-http-client +``` + +## Usage Notes + +### Example Petstore Haddock documentation + +An example of the generated haddock documentation targeting the server http://petstore.swagger.io/ (Petstore) can be found [here][2] + +[2]: https://hackage.haskell.org/package/swagger-petstore + +### Example Petstore App + +An example application using the auto-generated haskell-http-client bindings for the server http://petstore.swagger.io/ can be found [here][3] + +[3]: https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/haskell-http-client/example-app + +This library is intended to be imported qualified. + +### Modules + +| MODULE | NOTES | +| ------------------- | --------------------------------------------------- | +| DockerEngine.Client | use the "dispatch" functions to send requests | +| DockerEngine.Core | core functions, config and request types | +| DockerEngine.API | construct api requests | +| DockerEngine.Model | describes api models | +| DockerEngine.MimeTypes | encoding/decoding MIME types (content-types/accept) | +| DockerEngine.ModelLens | lenses for model fields | +| DockerEngine.Logging | logging functions and utils | + + +### MimeTypes + +This library adds type safety around what OpenAPI specifies as +Produces and Consumes for each Operation (e.g. the list of MIME types an +Operation can Produce (using 'accept' headers) and Consume (using 'content-type' headers). + +For example, if there is an Operation named _addFoo_, there will be a +data type generated named _AddFoo_ (note the capitalization), which +describes additional constraints and actions on the _addFoo_ operation +via its typeclass instances. These typeclass instances can be viewed +in GHCi or via the Haddocks. + +* required parameters are included as function arguments to _addFoo_ +* optional non-body parameters are included by using `applyOptionalParam` +* optional body parameters are set by using `setBodyParam` + +Example code generated for pretend _addFoo_ operation: + +```haskell +data AddFoo +instance Consumes AddFoo MimeJSON +instance Produces AddFoo MimeJSON +instance Produces AddFoo MimeXML +instance HasBodyParam AddFoo FooModel +instance HasOptionalParam AddFoo FooName +instance HasOptionalParam AddFoo FooId +``` + +this would indicate that: + +* the _addFoo_ operation can consume JSON +* the _addFoo_ operation produces JSON or XML, depending on the argument passed to the dispatch function +* the _addFoo_ operation can set it's body param of _FooModel_ via `setBodyParam` +* the _addFoo_ operation can set 2 different optional parameters via `applyOptionalParam` + +If the OpenAPI spec doesn't declare it can accept or produce a certain +MIME type for a given Operation, you should either add a Produces or +Consumes instance for the desired MIME types (assuming the server +supports it), use `dispatchLbsUnsafe` or modify the OpenAPI spec and +run the generator again. + +New MIME type instances can be added via MimeType/MimeRender/MimeUnrender + +Only JSON instances are generated by default, and in some case +x-www-form-urlencoded instances (FromFrom, ToForm) will also be +generated if the model fields are primitive types, and there are +Operations using x-www-form-urlencoded which use those models. + +### Authentication + +A haskell data type will be generated for each OpenAPI authentication type. + +If for example the AuthMethod `AuthOAuthFoo` is generated for OAuth operations, then +`addAuthMethod` should be used to add the AuthMethod config. + +When a request is dispatched, if a matching auth method is found in +the config, it will be applied to the request. + +### Example + +```haskell +mgr <- newManager defaultManagerSettings +config0 <- withStdoutLogging =<< newConfig +let config = config0 + `addAuthMethod` AuthOAuthFoo "secret-key" + +let addFooRequest = + addFoo + (ContentType MimeJSON) + (Accept MimeXML) + (ParamBar paramBar) + (ParamQux paramQux) + modelBaz + `applyOptionalParam` FooId 1 + `applyOptionalParam` FooName "name" + `setHeader` [("qux_header","xxyy")] +addFooResult <- dispatchMime mgr config addFooRequest +``` + +See the example app and the haddocks for details. diff --git a/v1.45/Setup.hs b/v1.45/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/v1.45/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/v1.45/docker-engine.cabal b/v1.45/docker-engine.cabal new file mode 100644 index 0000000..acb19c4 --- /dev/null +++ b/v1.45/docker-engine.cabal @@ -0,0 +1,125 @@ +name: docker-engine +version: 0.145.0 +synopsis: Auto-generated docker-engine API Client +description: . + Client library for calling the Docker Engine API API based on http-client. + . + host: localhost + . + base path: http://localhost/v1.45 + . + Docker Engine API API version: 1.45 + . + OpenAPI version: 3.0.1 + . + Generator version: 7.6.0 + . +category: Web +homepage: https://github.com/codedownio/docker-engine +author: Tom McLaughlin +maintainer: Tom McLaughlin +license: Apache-2.0 +build-type: Simple +cabal-version: >= 1.10 + +extra-source-files: + README.md + +Flag UseKatip + Description: Use the katip package to provide logging (if false, use the default monad-logger package) + Default: True + Manual: True + +library + hs-source-dirs: + lib + ghc-options: -Wall -funbox-strict-fields + build-depends: + aeson >=1.0 && <3.0 + , base >=4.7 && <5.0 + , base64-bytestring >1.0 && <2.0 + , bytestring >=0.10.0 + , case-insensitive + , containers >=0.5.0.0 && <0.8 + , deepseq >= 1.4 && <1.6 + , exceptions >= 0.4 + , http-api-data >= 0.3.4 && <0.7 + , http-client >=0.5 && <0.8 + , http-client-tls + , http-media >= 0.4 && < 0.9 + , http-types >=0.8 && <0.13 + , iso8601-time >=0.1.3 && <0.2.0 + , microlens >= 0.4.3 + , mtl >=2.2.1 + , network >=2.6.2 && <3.9 + , random >=1.1 + , safe-exceptions <0.2 + , text >=0.11 && <3 + , time >=1.5 + , transformers >=0.4.0.0 + , unordered-containers + , vector >=0.10.9 && <0.14 + other-modules: + Paths_docker_engine + exposed-modules: + DockerEngine + DockerEngine.API + DockerEngine.API.Config + DockerEngine.API.Container + DockerEngine.API.Distribution + DockerEngine.API.Exec + DockerEngine.API.Image + DockerEngine.API.Network + DockerEngine.API.Node + DockerEngine.API.Plugin + DockerEngine.API.Secret + DockerEngine.API.Service + DockerEngine.API.Session + DockerEngine.API.Swarm + DockerEngine.API.System + DockerEngine.API.Task + DockerEngine.API.Volume + DockerEngine.Client + DockerEngine.Core + DockerEngine.Logging + DockerEngine.MimeTypes + DockerEngine.Model + DockerEngine.ModelLens + default-language: Haskell2010 + + if flag(UseKatip) + build-depends: katip >=0.8 && < 1.0 + other-modules: DockerEngine.LoggingKatip + cpp-options: -DUSE_KATIP + else + build-depends: monad-logger >=0.3 && <0.4 + other-modules: DockerEngine.LoggingMonadLogger + cpp-options: -DUSE_MONAD_LOGGER + +test-suite tests + type: exitcode-stdio-1.0 + main-is: Test.hs + hs-source-dirs: + tests + ghc-options: -Wall -fno-warn-orphans + build-depends: + docker-engine + , QuickCheck + , aeson + , base >=4.7 && <5.0 + , bytestring >=0.10.0 + , containers + , hspec >=1.8 + , iso8601-time + , mtl >=2.2.1 + , semigroups + , text + , time + , transformers >=0.4.0.0 + , unordered-containers + , vector + other-modules: + ApproxEq + Instances + PropMime + default-language: Haskell2010 diff --git a/v1.45/git_push.sh b/v1.45/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/v1.45/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/v1.45/lib/DockerEngine.hs b/v1.45/lib/DockerEngine.hs new file mode 100644 index 0000000..19bae6f --- /dev/null +++ b/v1.45/lib/DockerEngine.hs @@ -0,0 +1,31 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine +-} + +module DockerEngine + ( module DockerEngine.API + , module DockerEngine.Client + , module DockerEngine.Core + , module DockerEngine.Logging + , module DockerEngine.MimeTypes + , module DockerEngine.Model + , module DockerEngine.ModelLens + ) where + +import DockerEngine.API +import DockerEngine.Client +import DockerEngine.Core +import DockerEngine.Logging +import DockerEngine.MimeTypes +import DockerEngine.Model +import DockerEngine.ModelLens \ No newline at end of file diff --git a/v1.45/lib/DockerEngine/API.hs b/v1.45/lib/DockerEngine/API.hs new file mode 100644 index 0000000..6773d54 --- /dev/null +++ b/v1.45/lib/DockerEngine/API.hs @@ -0,0 +1,47 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API +-} + +module DockerEngine.API + ( module DockerEngine.API.Config + , module DockerEngine.API.Container + , module DockerEngine.API.Distribution + , module DockerEngine.API.Exec + , module DockerEngine.API.Image + , module DockerEngine.API.Network + , module DockerEngine.API.Node + , module DockerEngine.API.Plugin + , module DockerEngine.API.Secret + , module DockerEngine.API.Service + , module DockerEngine.API.Session + , module DockerEngine.API.Swarm + , module DockerEngine.API.System + , module DockerEngine.API.Task + , module DockerEngine.API.Volume + ) where + +import DockerEngine.API.Config +import DockerEngine.API.Container +import DockerEngine.API.Distribution +import DockerEngine.API.Exec +import DockerEngine.API.Image +import DockerEngine.API.Network +import DockerEngine.API.Node +import DockerEngine.API.Plugin +import DockerEngine.API.Secret +import DockerEngine.API.Service +import DockerEngine.API.Session +import DockerEngine.API.Swarm +import DockerEngine.API.System +import DockerEngine.API.Task +import DockerEngine.API.Volume \ No newline at end of file diff --git a/v1.45/lib/DockerEngine/API/Config.hs b/v1.45/lib/DockerEngine/API/Config.hs new file mode 100644 index 0000000..4ce5d6f --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Config.hs @@ -0,0 +1,163 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Config +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Config where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Config + +-- *** configCreate + +-- | @POST \/configs\/create@ +-- +-- Create a config +-- +configCreate + :: (Consumes ConfigCreate MimeJSON) + => DockerEngineRequest ConfigCreate MimeJSON IdResponse MimeJSON +configCreate = + _mkRequest "POST" ["/configs/create"] + +data ConfigCreate +instance HasBodyParam ConfigCreate ConfigCreateRequest + +-- | @application/json@ +instance Consumes ConfigCreate MimeJSON + +-- | @application/json@ +instance Produces ConfigCreate MimeJSON + + +-- *** configDelete + +-- | @DELETE \/configs\/{id}@ +-- +-- Delete a config +-- +configDelete + :: Id -- ^ "id" - ID of the config + -> DockerEngineRequest ConfigDelete MimeNoContent NoContent MimeNoContent +configDelete (Id id) = + _mkRequest "DELETE" ["/configs/",toPath id] + +data ConfigDelete +instance Produces ConfigDelete MimeNoContent + + +-- *** configInspect + +-- | @GET \/configs\/{id}@ +-- +-- Inspect a config +-- +configInspect + :: Id -- ^ "id" - ID of the config + -> DockerEngineRequest ConfigInspect MimeNoContent Config MimeJSON +configInspect (Id id) = + _mkRequest "GET" ["/configs/",toPath id] + +data ConfigInspect +-- | @application/json@ +instance Produces ConfigInspect MimeJSON + + +-- *** configList + +-- | @GET \/configs@ +-- +-- List configs +-- +configList + :: DockerEngineRequest ConfigList MimeNoContent [Config] MimeJSON +configList = + _mkRequest "GET" ["/configs"] + +data ConfigList + +-- | /Optional Param/ "filters" - 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=` +instance HasOptionalParam ConfigList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces ConfigList MimeJSON + + +-- *** configUpdate + +-- | @POST \/configs\/{id}\/update@ +-- +-- Update a Config +-- +configUpdate + :: (Consumes ConfigUpdate contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Id -- ^ "id" - The ID or name of the config + -> VersionInteger -- ^ "version" - The version number of the config object being updated. This is required to avoid conflicting writes. + -> DockerEngineRequest ConfigUpdate contentType NoContent MimeNoContent +configUpdate _ (Id id) (VersionInteger version) = + _mkRequest "POST" ["/configs/",toPath id,"/update"] + `addQuery` toQuery ("version", Just version) + +data ConfigUpdate + +-- | /Body Param/ "body" - 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. +instance HasBodyParam ConfigUpdate ConfigSpec + +-- | @application/json@ +instance Consumes ConfigUpdate MimeJSON +-- | @text/plain@ +instance Consumes ConfigUpdate MimePlainText + +instance Produces ConfigUpdate MimeNoContent + diff --git a/v1.45/lib/DockerEngine/API/Container.hs b/v1.45/lib/DockerEngine/API/Container.hs new file mode 100644 index 0000000..4cb341f --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Container.hs @@ -0,0 +1,769 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Container +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Container where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Container + +-- *** containerArchive + +-- | @GET \/containers\/{id}\/archive@ +-- +-- Get an archive of a filesystem resource in a container +-- +-- Get a tar archive of a resource in the filesystem of container id. +-- +containerArchive + :: Id -- ^ "id" - ID or name of the container + -> Path -- ^ "path" - Resource in the container’s filesystem to archive. + -> DockerEngineRequest ContainerArchive MimeNoContent NoContent MimeNoContent +containerArchive (Id id) (Path path) = + _mkRequest "GET" ["/containers/",toPath id,"/archive"] + `addQuery` toQuery ("path", Just path) + +data ContainerArchive +instance Produces ContainerArchive MimeNoContent + + +-- *** containerArchiveInfo + +-- | @HEAD \/containers\/{id}\/archive@ +-- +-- 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. +-- +containerArchiveInfo + :: Id -- ^ "id" - ID or name of the container + -> Path -- ^ "path" - Resource in the container’s filesystem to archive. + -> DockerEngineRequest ContainerArchiveInfo MimeNoContent NoContent MimeNoContent +containerArchiveInfo (Id id) (Path path) = + _mkRequest "HEAD" ["/containers/",toPath id,"/archive"] + `addQuery` toQuery ("path", Just path) + +data ContainerArchiveInfo +instance Produces ContainerArchiveInfo MimeNoContent + + +-- *** containerAttach + +-- | @POST \/containers\/{id}\/attach@ +-- +-- 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`. +-- +containerAttach + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerAttach MimeNoContent NoContent MimeNoContent +containerAttach (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/attach"] + +data ContainerAttach + +-- | /Optional Param/ "detachKeys" - Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. +instance HasOptionalParam ContainerAttach DetachKeys where + applyOptionalParam req (DetachKeys xs) = + req `addQuery` toQuery ("detachKeys", Just xs) + +-- | /Optional Param/ "logs" - 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. +instance HasOptionalParam ContainerAttach Logs where + applyOptionalParam req (Logs xs) = + req `addQuery` toQuery ("logs", Just xs) + +-- | /Optional Param/ "stream" - Stream attached streams from the time the request was made onwards. +instance HasOptionalParam ContainerAttach Stream where + applyOptionalParam req (Stream xs) = + req `addQuery` toQuery ("stream", Just xs) + +-- | /Optional Param/ "stdin" - Attach to `stdin` +instance HasOptionalParam ContainerAttach Stdin where + applyOptionalParam req (Stdin xs) = + req `addQuery` toQuery ("stdin", Just xs) + +-- | /Optional Param/ "stdout" - Attach to `stdout` +instance HasOptionalParam ContainerAttach Stdout where + applyOptionalParam req (Stdout xs) = + req `addQuery` toQuery ("stdout", Just xs) + +-- | /Optional Param/ "stderr" - Attach to `stderr` +instance HasOptionalParam ContainerAttach Stderr where + applyOptionalParam req (Stderr xs) = + req `addQuery` toQuery ("stderr", Just xs) +instance Produces ContainerAttach MimeNoContent + + +-- *** containerAttachWebsocket + +-- | @GET \/containers\/{id}\/attach\/ws@ +-- +-- Attach to a container via a websocket +-- +containerAttachWebsocket + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerAttachWebsocket MimeNoContent NoContent MimeNoContent +containerAttachWebsocket (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/attach/ws"] + +data ContainerAttachWebsocket + +-- | /Optional Param/ "detachKeys" - Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`. +instance HasOptionalParam ContainerAttachWebsocket DetachKeys where + applyOptionalParam req (DetachKeys xs) = + req `addQuery` toQuery ("detachKeys", Just xs) + +-- | /Optional Param/ "logs" - Return logs +instance HasOptionalParam ContainerAttachWebsocket Logs where + applyOptionalParam req (Logs xs) = + req `addQuery` toQuery ("logs", Just xs) + +-- | /Optional Param/ "stream" - Return stream +instance HasOptionalParam ContainerAttachWebsocket Stream where + applyOptionalParam req (Stream xs) = + req `addQuery` toQuery ("stream", Just xs) + +-- | /Optional Param/ "stdin" - Attach to `stdin` +instance HasOptionalParam ContainerAttachWebsocket Stdin where + applyOptionalParam req (Stdin xs) = + req `addQuery` toQuery ("stdin", Just xs) + +-- | /Optional Param/ "stdout" - Attach to `stdout` +instance HasOptionalParam ContainerAttachWebsocket Stdout where + applyOptionalParam req (Stdout xs) = + req `addQuery` toQuery ("stdout", Just xs) + +-- | /Optional Param/ "stderr" - Attach to `stderr` +instance HasOptionalParam ContainerAttachWebsocket Stderr where + applyOptionalParam req (Stderr xs) = + req `addQuery` toQuery ("stderr", Just xs) +instance Produces ContainerAttachWebsocket MimeNoContent + + +-- *** containerChanges + +-- | @GET \/containers\/{id}\/changes@ +-- +-- 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\") +-- +containerChanges + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerChanges MimeNoContent [FilesystemChange] MimeJSON +containerChanges (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/changes"] + +data ContainerChanges +-- | @application/json@ +instance Produces ContainerChanges MimeJSON + + +-- *** containerCreate + +-- | @POST \/containers\/create@ +-- +-- Create a container +-- +containerCreate + :: (Consumes ContainerCreate contentType, MimeRender contentType ContainerCreateRequest) + => ContentType contentType -- ^ request content-type ('MimeType') + -> ContainerCreateRequest -- ^ "body" - Container to create + -> DockerEngineRequest ContainerCreate contentType ContainerCreateResponse MimeJSON +containerCreate _ body = + _mkRequest "POST" ["/containers/create"] + `setBodyParam` body + +data ContainerCreate + +-- | /Body Param/ "body" - Container to create +instance HasBodyParam ContainerCreate ContainerCreateRequest + +-- | /Optional Param/ "name" - Assign the specified name to the container. Must match `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. +instance HasOptionalParam ContainerCreate Name where + applyOptionalParam req (Name xs) = + req `addQuery` toQuery ("name", Just xs) + +-- | /Optional Param/ "platform" - 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 +instance HasOptionalParam ContainerCreate Platform2 where + applyOptionalParam req (Platform2 xs) = + req `addQuery` toQuery ("platform", Just xs) + +-- | @application/octet-stream@ +instance Consumes ContainerCreate MimeOctetStream +-- | @application/json@ +instance Consumes ContainerCreate MimeJSON + +-- | @application/json@ +instance Produces ContainerCreate MimeJSON + + +-- *** containerDelete + +-- | @DELETE \/containers\/{id}@ +-- +-- Remove a container +-- +containerDelete + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerDelete MimeNoContent NoContent MimeNoContent +containerDelete (Id id) = + _mkRequest "DELETE" ["/containers/",toPath id] + +data ContainerDelete + +-- | /Optional Param/ "v" - Remove anonymous volumes associated with the container. +instance HasOptionalParam ContainerDelete V where + applyOptionalParam req (V xs) = + req `addQuery` toQuery ("v", Just xs) + +-- | /Optional Param/ "force" - If the container is running, kill it before removing it. +instance HasOptionalParam ContainerDelete Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) + +-- | /Optional Param/ "link" - Remove the specified link associated with the container. +instance HasOptionalParam ContainerDelete Link where + applyOptionalParam req (Link xs) = + req `addQuery` toQuery ("link", Just xs) +instance Produces ContainerDelete MimeNoContent + + +-- *** containerExport + +-- | @GET \/containers\/{id}\/export@ +-- +-- Export a container +-- +-- Export the contents of a container as a tarball. +-- +containerExport + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerExport MimeNoContent NoContent MimeNoContent +containerExport (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/export"] + +data ContainerExport +instance Produces ContainerExport MimeNoContent + + +-- *** containerInspect + +-- | @GET \/containers\/{id}\/json@ +-- +-- Inspect a container +-- +-- Return low-level information about a container. +-- +containerInspect + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerInspect MimeNoContent ContainerInspectResponse MimeJSON +containerInspect (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/json"] + +data ContainerInspect + +-- | /Optional Param/ "size" - Return the size of container as fields `SizeRw` and `SizeRootFs` +instance HasOptionalParam ContainerInspect Size where + applyOptionalParam req (Size xs) = + req `addQuery` toQuery ("size", Just xs) +-- | @application/json@ +instance Produces ContainerInspect MimeJSON + + +-- *** containerKill + +-- | @POST \/containers\/{id}\/kill@ +-- +-- Kill a container +-- +-- Send a POSIX signal to a container, defaulting to killing to the container. +-- +containerKill + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerKill MimeNoContent NoContent MimeNoContent +containerKill (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/kill"] + +data ContainerKill + +-- | /Optional Param/ "signal" - Signal to send to the container as an integer or string (e.g. `SIGINT`). +instance HasOptionalParam ContainerKill Signal where + applyOptionalParam req (Signal xs) = + req `addQuery` toQuery ("signal", Just xs) +instance Produces ContainerKill MimeNoContent + + +-- *** containerList + +-- | @GET \/containers\/json@ +-- +-- 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 . +-- +containerList + :: DockerEngineRequest ContainerList MimeNoContent [ContainerSummary] MimeJSON +containerList = + _mkRequest "GET" ["/containers/json"] + +data ContainerList + +-- | /Optional Param/ "all" - Return all containers. By default, only running containers are shown. +instance HasOptionalParam ContainerList All where + applyOptionalParam req (All xs) = + req `addQuery` toQuery ("all", Just xs) + +-- | /Optional Param/ "limit" - Return this number of most recently created containers, including non-running ones. +instance HasOptionalParam ContainerList Limit2 where + applyOptionalParam req (Limit2 xs) = + req `addQuery` toQuery ("limit", Just xs) + +-- | /Optional Param/ "size" - Return the size of container as fields `SizeRw` and `SizeRootFs`. +instance HasOptionalParam ContainerList Size where + applyOptionalParam req (Size xs) = + req `addQuery` toQuery ("size", Just xs) + +-- | /Optional Param/ "filters" - 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 ``) +instance HasOptionalParam ContainerList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces ContainerList MimeJSON + + +-- *** containerLogs + +-- | @GET \/containers\/{id}\/logs@ +-- +-- 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. +-- +containerLogs + :: Accept accept -- ^ request accept ('MimeType') + -> Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerLogs MimeNoContent FilePath accept +containerLogs _ (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/logs"] + +data ContainerLogs + +-- | /Optional Param/ "follow" - Keep connection after returning logs. +instance HasOptionalParam ContainerLogs Follow where + applyOptionalParam req (Follow xs) = + req `addQuery` toQuery ("follow", Just xs) + +-- | /Optional Param/ "stdout" - Return logs from `stdout` +instance HasOptionalParam ContainerLogs Stdout where + applyOptionalParam req (Stdout xs) = + req `addQuery` toQuery ("stdout", Just xs) + +-- | /Optional Param/ "stderr" - Return logs from `stderr` +instance HasOptionalParam ContainerLogs Stderr where + applyOptionalParam req (Stderr xs) = + req `addQuery` toQuery ("stderr", Just xs) + +-- | /Optional Param/ "since" - Only return logs since this time, as a UNIX timestamp +instance HasOptionalParam ContainerLogs Since where + applyOptionalParam req (Since xs) = + req `addQuery` toQuery ("since", Just xs) + +-- | /Optional Param/ "until" - Only return logs before this time, as a UNIX timestamp +instance HasOptionalParam ContainerLogs Until where + applyOptionalParam req (Until xs) = + req `addQuery` toQuery ("until", Just xs) + +-- | /Optional Param/ "timestamps" - Add timestamps to every log line +instance HasOptionalParam ContainerLogs Timestamps where + applyOptionalParam req (Timestamps xs) = + req `addQuery` toQuery ("timestamps", Just xs) + +-- | /Optional Param/ "tail" - Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. +instance HasOptionalParam ContainerLogs Tail where + applyOptionalParam req (Tail xs) = + req `addQuery` toQuery ("tail", Just xs) +-- | @application/json@ +instance Produces ContainerLogs MimeJSON +-- | @application/vnd.docker.raw-stream@ +instance Produces ContainerLogs MimeVndDockerRawStream +-- | @application/vnd.docker.multiplexed-stream@ +instance Produces ContainerLogs MimeVndDockerMultiplexedStream + + +-- *** containerPause + +-- | @POST \/containers\/{id}\/pause@ +-- +-- 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. +-- +containerPause + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerPause MimeNoContent NoContent MimeNoContent +containerPause (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/pause"] + +data ContainerPause +instance Produces ContainerPause MimeNoContent + + +-- *** containerPrune + +-- | @POST \/containers\/prune@ +-- +-- Delete stopped containers +-- +containerPrune + :: DockerEngineRequest ContainerPrune MimeNoContent ContainerPruneResponse MimeJSON +containerPrune = + _mkRequest "POST" ["/containers/prune"] + +data ContainerPrune + +-- | /Optional Param/ "filters" - 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. +instance HasOptionalParam ContainerPrune Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces ContainerPrune MimeJSON + + +-- *** containerRename + +-- | @POST \/containers\/{id}\/rename@ +-- +-- Rename a container +-- +containerRename + :: Id -- ^ "id" - ID or name of the container + -> Name -- ^ "name" - New name for the container + -> DockerEngineRequest ContainerRename MimeNoContent NoContent MimeNoContent +containerRename (Id id) (Name name) = + _mkRequest "POST" ["/containers/",toPath id,"/rename"] + `addQuery` toQuery ("name", Just name) + +data ContainerRename +instance Produces ContainerRename MimeNoContent + + +-- *** containerResize + +-- | @POST \/containers\/{id}\/resize@ +-- +-- Resize a container TTY +-- +-- Resize the TTY for a container. +-- +containerResize + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerResize MimeNoContent NoContent MimeNoContent +containerResize (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/resize"] + +data ContainerResize + +-- | /Optional Param/ "h" - Height of the TTY session in characters +instance HasOptionalParam ContainerResize H where + applyOptionalParam req (H xs) = + req `addQuery` toQuery ("h", Just xs) + +-- | /Optional Param/ "w" - Width of the TTY session in characters +instance HasOptionalParam ContainerResize W where + applyOptionalParam req (W xs) = + req `addQuery` toQuery ("w", Just xs) +instance Produces ContainerResize MimeNoContent + + +-- *** containerRestart + +-- | @POST \/containers\/{id}\/restart@ +-- +-- Restart a container +-- +containerRestart + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerRestart MimeNoContent NoContent MimeNoContent +containerRestart (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/restart"] + +data ContainerRestart + +-- | /Optional Param/ "signal" - Signal to send to the container as an integer or string (e.g. `SIGINT`). +instance HasOptionalParam ContainerRestart Signal where + applyOptionalParam req (Signal xs) = + req `addQuery` toQuery ("signal", Just xs) + +-- | /Optional Param/ "t" - Number of seconds to wait before killing the container +instance HasOptionalParam ContainerRestart T where + applyOptionalParam req (T xs) = + req `addQuery` toQuery ("t", Just xs) +instance Produces ContainerRestart MimeNoContent + + +-- *** containerStart + +-- | @POST \/containers\/{id}\/start@ +-- +-- Start a container +-- +containerStart + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerStart MimeNoContent NoContent MimeNoContent +containerStart (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/start"] + +data ContainerStart + +-- | /Optional Param/ "detachKeys" - Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. +instance HasOptionalParam ContainerStart DetachKeys where + applyOptionalParam req (DetachKeys xs) = + req `addQuery` toQuery ("detachKeys", Just xs) +instance Produces ContainerStart MimeNoContent + + +-- *** containerStats + +-- | @GET \/containers\/{id}\/stats@ +-- +-- 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` +-- +containerStats + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerStats MimeNoContent A.Value MimeJSON +containerStats (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/stats"] + +data ContainerStats + +-- | /Optional Param/ "stream" - Stream the output. If false, the stats will be output once and then it will disconnect. +instance HasOptionalParam ContainerStats Stream where + applyOptionalParam req (Stream xs) = + req `addQuery` toQuery ("stream", Just xs) + +-- | /Optional Param/ "one-shot" - Only get a single stat instead of waiting for 2 cycles. Must be used with `stream=false`. +instance HasOptionalParam ContainerStats OneShot where + applyOptionalParam req (OneShot xs) = + req `addQuery` toQuery ("one-shot", Just xs) +-- | @application/json@ +instance Produces ContainerStats MimeJSON + + +-- *** containerStop + +-- | @POST \/containers\/{id}\/stop@ +-- +-- Stop a container +-- +containerStop + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerStop MimeNoContent NoContent MimeNoContent +containerStop (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/stop"] + +data ContainerStop + +-- | /Optional Param/ "signal" - Signal to send to the container as an integer or string (e.g. `SIGINT`). +instance HasOptionalParam ContainerStop Signal where + applyOptionalParam req (Signal xs) = + req `addQuery` toQuery ("signal", Just xs) + +-- | /Optional Param/ "t" - Number of seconds to wait before killing the container +instance HasOptionalParam ContainerStop T where + applyOptionalParam req (T xs) = + req `addQuery` toQuery ("t", Just xs) +instance Produces ContainerStop MimeNoContent + + +-- *** containerTop + +-- | @GET \/containers\/{id}\/top@ +-- +-- List processes running inside a container +-- +-- On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. +-- +containerTop + :: Accept accept -- ^ request accept ('MimeType') + -> Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerTop MimeNoContent ContainerTopResponse accept +containerTop _ (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/top"] + +data ContainerTop + +-- | /Optional Param/ "ps_args" - The arguments to pass to `ps`. For example, `aux` +instance HasOptionalParam ContainerTop PsArgs where + applyOptionalParam req (PsArgs xs) = + req `addQuery` toQuery ("ps_args", Just xs) +-- | @application/json@ +instance Produces ContainerTop MimeJSON +-- | @text/plain@ +instance Produces ContainerTop MimePlainText + + +-- *** containerUnpause + +-- | @POST \/containers\/{id}\/unpause@ +-- +-- Unpause a container +-- +-- Resume a container which has been paused. +-- +containerUnpause + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerUnpause MimeNoContent NoContent MimeNoContent +containerUnpause (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/unpause"] + +data ContainerUnpause +instance Produces ContainerUnpause MimeNoContent + + +-- *** containerUpdate + +-- | @POST \/containers\/{id}\/update@ +-- +-- Update a container +-- +-- Change various configuration options of a container without having to recreate it. +-- +containerUpdate + :: (Consumes ContainerUpdate MimeJSON, MimeRender MimeJSON ContainerUpdateRequest) + => ContainerUpdateRequest -- ^ "update" + -> Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerUpdate MimeJSON ContainerUpdateResponse MimeJSON +containerUpdate update (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/update"] + `setBodyParam` update + +data ContainerUpdate +instance HasBodyParam ContainerUpdate ContainerUpdateRequest + +-- | @application/json@ +instance Consumes ContainerUpdate MimeJSON + +-- | @application/json@ +instance Produces ContainerUpdate MimeJSON + + +-- *** containerWait + +-- | @POST \/containers\/{id}\/wait@ +-- +-- Wait for a container +-- +-- Block until a container stops, then returns the exit code. +-- +containerWait + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerWait MimeNoContent ContainerWaitResponse MimeJSON +containerWait (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/wait"] + +data ContainerWait + +-- | /Optional Param/ "condition" - Wait until a container state reaches the given condition. Defaults to `not-running` if omitted or empty. +instance HasOptionalParam ContainerWait Condition where + applyOptionalParam req (Condition xs) = + req `addQuery` toQuery ("condition", Just xs) +-- | @application/json@ +instance Produces ContainerWait MimeJSON + + +-- *** putContainerArchive + +-- | @PUT \/containers\/{id}\/archive@ +-- +-- 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\". +-- +putContainerArchive + :: (Consumes PutContainerArchive contentType, MimeRender contentType InputStream) + => ContentType contentType -- ^ request content-type ('MimeType') + -> InputStream -- ^ "inputStream" - The input stream must be a tar archive compressed with one of the following algorithms: `identity` (no compression), `gzip`, `bzip2`, or `xz`. + -> Id -- ^ "id" - ID or name of the container + -> Path -- ^ "path" - Path to a directory in the container to extract the archive’s contents into. + -> DockerEngineRequest PutContainerArchive contentType NoContent MimeNoContent +putContainerArchive _ inputStream (Id id) (Path path) = + _mkRequest "PUT" ["/containers/",toPath id,"/archive"] + `setBodyParam` inputStream + `addQuery` toQuery ("path", Just path) + +data PutContainerArchive + +-- | /Body Param/ "inputStream" - The input stream must be a tar archive compressed with one of the following algorithms: `identity` (no compression), `gzip`, `bzip2`, or `xz`. +instance HasBodyParam PutContainerArchive InputStream + +-- | /Optional Param/ "noOverwriteDirNonDir" - 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. +instance HasOptionalParam PutContainerArchive NoOverwriteDirNonDir where + applyOptionalParam req (NoOverwriteDirNonDir xs) = + req `addQuery` toQuery ("noOverwriteDirNonDir", Just xs) + +-- | /Optional Param/ "copyUIDGID" - If `1`, `true`, then it will copy UID/GID maps to the dest file or dir +instance HasOptionalParam PutContainerArchive CopyUidgid where + applyOptionalParam req (CopyUidgid xs) = + req `addQuery` toQuery ("copyUIDGID", Just xs) + +-- | @application/x-tar@ +instance Consumes PutContainerArchive MimeXTar +-- | @application/octet-stream@ +instance Consumes PutContainerArchive MimeOctetStream + +instance Produces PutContainerArchive MimeNoContent + diff --git a/v1.45/lib/DockerEngine/API/Distribution.hs b/v1.45/lib/DockerEngine/API/Distribution.hs new file mode 100644 index 0000000..81ee4a2 --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Distribution.hs @@ -0,0 +1,77 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Distribution +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Distribution where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Distribution + +-- *** distributionInspect0 + +-- | @GET \/distribution\/{name}\/json@ +-- +-- Get image information from the registry +-- +-- Return image digest and platform information by contacting the registry. +-- +distributionInspect0 + :: Name -- ^ "name" - Image name or id + -> DockerEngineRequest DistributionInspect0 MimeNoContent DistributionInspect MimeJSON +distributionInspect0 (Name name) = + _mkRequest "GET" ["/distribution/",toPath name,"/json"] + +data DistributionInspect0 +-- | @application/json@ +instance Produces DistributionInspect0 MimeJSON + diff --git a/v1.45/lib/DockerEngine/API/Exec.hs b/v1.45/lib/DockerEngine/API/Exec.hs new file mode 100644 index 0000000..011bcd6 --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Exec.hs @@ -0,0 +1,158 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Exec +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Exec where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Exec + +-- *** containerExec + +-- | @POST \/containers\/{id}\/exec@ +-- +-- Create an exec instance +-- +-- Run a command inside a running container. +-- +containerExec + :: (Consumes ContainerExec MimeJSON, MimeRender MimeJSON ExecConfig) + => ExecConfig -- ^ "execConfig" - Exec configuration + -> Id -- ^ "id" - ID or name of container + -> DockerEngineRequest ContainerExec MimeJSON IdResponse MimeJSON +containerExec execConfig (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/exec"] + `setBodyParam` execConfig + +data ContainerExec + +-- | /Body Param/ "execConfig" - Exec configuration +instance HasBodyParam ContainerExec ExecConfig + +-- | @application/json@ +instance Consumes ContainerExec MimeJSON + +-- | @application/json@ +instance Produces ContainerExec MimeJSON + + +-- *** execInspect + +-- | @GET \/exec\/{id}\/json@ +-- +-- Inspect an exec instance +-- +-- Return low-level information about an exec instance. +-- +execInspect + :: Id -- ^ "id" - Exec instance ID + -> DockerEngineRequest ExecInspect MimeNoContent ExecInspectResponse MimeJSON +execInspect (Id id) = + _mkRequest "GET" ["/exec/",toPath id,"/json"] + +data ExecInspect +-- | @application/json@ +instance Produces ExecInspect MimeJSON + + +-- *** execResize + +-- | @POST \/exec\/{id}\/resize@ +-- +-- Resize an exec instance +-- +-- Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance. +-- +execResize + :: Id -- ^ "id" - Exec instance ID + -> DockerEngineRequest ExecResize MimeNoContent NoContent MimeNoContent +execResize (Id id) = + _mkRequest "POST" ["/exec/",toPath id,"/resize"] + +data ExecResize + +-- | /Optional Param/ "h" - Height of the TTY session in characters +instance HasOptionalParam ExecResize H where + applyOptionalParam req (H xs) = + req `addQuery` toQuery ("h", Just xs) + +-- | /Optional Param/ "w" - Width of the TTY session in characters +instance HasOptionalParam ExecResize W where + applyOptionalParam req (W xs) = + req `addQuery` toQuery ("w", Just xs) +instance Produces ExecResize MimeNoContent + + +-- *** execStart + +-- | @POST \/exec\/{id}\/start@ +-- +-- Start an exec instance +-- +-- Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command. +-- +execStart + :: (Consumes ExecStart MimeJSON) + => Id -- ^ "id" - Exec instance ID + -> DockerEngineRequest ExecStart MimeJSON NoContent MimeNoContent +execStart (Id id) = + _mkRequest "POST" ["/exec/",toPath id,"/start"] + +data ExecStart +instance HasBodyParam ExecStart ExecStartConfig + +-- | @application/json@ +instance Consumes ExecStart MimeJSON + +instance Produces ExecStart MimeNoContent + diff --git a/v1.45/lib/DockerEngine/API/Image.hs b/v1.45/lib/DockerEngine/API/Image.hs new file mode 100644 index 0000000..7ccd35a --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Image.hs @@ -0,0 +1,655 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Image +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Image where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Image + +-- *** buildPrune + +-- | @POST \/build\/prune@ +-- +-- Delete builder cache +-- +buildPrune + :: DockerEngineRequest BuildPrune MimeNoContent BuildPruneResponse MimeJSON +buildPrune = + _mkRequest "POST" ["/build/prune"] + +data BuildPrune + +-- | /Optional Param/ "keep-storage" - Amount of disk space in bytes to keep for cache +instance HasOptionalParam BuildPrune KeepStorage where + applyOptionalParam req (KeepStorage xs) = + req `addQuery` toQuery ("keep-storage", Just xs) + +-- | /Optional Param/ "all" - Remove all types of build cache +instance HasOptionalParam BuildPrune All where + applyOptionalParam req (All xs) = + req `addQuery` toQuery ("all", Just xs) + +-- | /Optional Param/ "filters" - 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` +instance HasOptionalParam BuildPrune Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces BuildPrune MimeJSON + + +-- *** imageBuild + +-- | @POST \/build@ +-- +-- 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. +-- +imageBuild + :: (Consumes ImageBuild MimeOctetStream) + => DockerEngineRequest ImageBuild MimeOctetStream NoContent MimeNoContent +imageBuild = + _mkRequest "POST" ["/build"] + +data ImageBuild + +-- | /Body Param/ "inputStream" - A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz. +instance HasBodyParam ImageBuild InputStream + +-- | /Optional Param/ "dockerfile" - Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`. +instance HasOptionalParam ImageBuild Dockerfile where + applyOptionalParam req (Dockerfile xs) = + req `addQuery` toQuery ("dockerfile", Just xs) + +-- | /Optional Param/ "t" - A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters. +instance HasOptionalParam ImageBuild TText where + applyOptionalParam req (TText xs) = + req `addQuery` toQuery ("t", Just xs) + +-- | /Optional Param/ "extrahosts" - Extra hosts to add to /etc/hosts +instance HasOptionalParam ImageBuild Extrahosts where + applyOptionalParam req (Extrahosts xs) = + req `addQuery` toQuery ("extrahosts", Just xs) + +-- | /Optional Param/ "remote" - A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball. +instance HasOptionalParam ImageBuild Remote where + applyOptionalParam req (Remote xs) = + req `addQuery` toQuery ("remote", Just xs) + +-- | /Optional Param/ "q" - Suppress verbose build output. +instance HasOptionalParam ImageBuild Q where + applyOptionalParam req (Q xs) = + req `addQuery` toQuery ("q", Just xs) + +-- | /Optional Param/ "nocache" - Do not use the cache when building the image. +instance HasOptionalParam ImageBuild Nocache where + applyOptionalParam req (Nocache xs) = + req `addQuery` toQuery ("nocache", Just xs) + +-- | /Optional Param/ "cachefrom" - JSON array of images used for build cache resolution. +instance HasOptionalParam ImageBuild Cachefrom where + applyOptionalParam req (Cachefrom xs) = + req `addQuery` toQuery ("cachefrom", Just xs) + +-- | /Optional Param/ "pull" - Attempt to pull the image even if an older image exists locally. +instance HasOptionalParam ImageBuild Pull where + applyOptionalParam req (Pull xs) = + req `addQuery` toQuery ("pull", Just xs) + +-- | /Optional Param/ "rm" - Remove intermediate containers after a successful build. +instance HasOptionalParam ImageBuild Rm where + applyOptionalParam req (Rm xs) = + req `addQuery` toQuery ("rm", Just xs) + +-- | /Optional Param/ "forcerm" - Always remove intermediate containers, even upon failure. +instance HasOptionalParam ImageBuild Forcerm where + applyOptionalParam req (Forcerm xs) = + req `addQuery` toQuery ("forcerm", Just xs) + +-- | /Optional Param/ "memory" - Set memory limit for build. +instance HasOptionalParam ImageBuild Memory where + applyOptionalParam req (Memory xs) = + req `addQuery` toQuery ("memory", Just xs) + +-- | /Optional Param/ "memswap" - Total memory (memory + swap). Set as `-1` to disable swap. +instance HasOptionalParam ImageBuild Memswap where + applyOptionalParam req (Memswap xs) = + req `addQuery` toQuery ("memswap", Just xs) + +-- | /Optional Param/ "cpushares" - CPU shares (relative weight). +instance HasOptionalParam ImageBuild Cpushares where + applyOptionalParam req (Cpushares xs) = + req `addQuery` toQuery ("cpushares", Just xs) + +-- | /Optional Param/ "cpusetcpus" - CPUs in which to allow execution (e.g., `0-3`, `0,1`). +instance HasOptionalParam ImageBuild Cpusetcpus where + applyOptionalParam req (Cpusetcpus xs) = + req `addQuery` toQuery ("cpusetcpus", Just xs) + +-- | /Optional Param/ "cpuperiod" - The length of a CPU period in microseconds. +instance HasOptionalParam ImageBuild Cpuperiod where + applyOptionalParam req (Cpuperiod xs) = + req `addQuery` toQuery ("cpuperiod", Just xs) + +-- | /Optional Param/ "cpuquota" - Microseconds of CPU time that the container can get in a CPU period. +instance HasOptionalParam ImageBuild Cpuquota where + applyOptionalParam req (Cpuquota xs) = + req `addQuery` toQuery ("cpuquota", Just xs) + +-- | /Optional Param/ "buildargs" - 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) +instance HasOptionalParam ImageBuild Buildargs where + applyOptionalParam req (Buildargs xs) = + req `addQuery` toQuery ("buildargs", Just xs) + +-- | /Optional Param/ "shmsize" - Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB. +instance HasOptionalParam ImageBuild Shmsize where + applyOptionalParam req (Shmsize xs) = + req `addQuery` toQuery ("shmsize", Just xs) + +-- | /Optional Param/ "squash" - Squash the resulting images layers into a single layer. *(Experimental release only.)* +instance HasOptionalParam ImageBuild Squash where + applyOptionalParam req (Squash xs) = + req `addQuery` toQuery ("squash", Just xs) + +-- | /Optional Param/ "labels" - Arbitrary key/value labels to set on the image, as a JSON map of string pairs. +instance HasOptionalParam ImageBuild Labels where + applyOptionalParam req (Labels xs) = + req `addQuery` toQuery ("labels", Just xs) + +-- | /Optional Param/ "networkmode" - 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. +instance HasOptionalParam ImageBuild Networkmode where + applyOptionalParam req (Networkmode xs) = + req `addQuery` toQuery ("networkmode", Just xs) +instance HasOptionalParam ImageBuild ParamContentType where + applyOptionalParam req (ParamContentType xs) = + req `addHeader` toHeader ("Content-type", xs) + +-- | /Optional Param/ "X-Registry-Config" - 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. +instance HasOptionalParam ImageBuild XRegistryConfig where + applyOptionalParam req (XRegistryConfig xs) = + req `addHeader` toHeader ("X-Registry-Config", xs) + +-- | /Optional Param/ "platform" - Platform in the format os[/arch[/variant]] +instance HasOptionalParam ImageBuild Platform2 where + applyOptionalParam req (Platform2 xs) = + req `addQuery` toQuery ("platform", Just xs) + +-- | /Optional Param/ "target" - Target build stage +instance HasOptionalParam ImageBuild Target where + applyOptionalParam req (Target xs) = + req `addQuery` toQuery ("target", Just xs) + +-- | /Optional Param/ "outputs" - BuildKit output configuration +instance HasOptionalParam ImageBuild Outputs where + applyOptionalParam req (Outputs xs) = + req `addQuery` toQuery ("outputs", Just xs) + +-- | /Optional Param/ "version" - Version of the builder backend to use. - `1` is the first generation classic (deprecated) builder in the Docker daemon (default) - `2` is [BuildKit](https://github.com/moby/buildkit) +instance HasOptionalParam ImageBuild Version where + applyOptionalParam req (Version xs) = + req `addQuery` toQuery ("version", Just xs) + +-- | @application/octet-stream@ +instance Consumes ImageBuild MimeOctetStream + +instance Produces ImageBuild MimeNoContent + + +-- *** imageCommit + +-- | @POST \/commit@ +-- +-- Create a new image from a container +-- +imageCommit + :: (Consumes ImageCommit MimeJSON) + => DockerEngineRequest ImageCommit MimeJSON IdResponse MimeJSON +imageCommit = + _mkRequest "POST" ["/commit"] + +data ImageCommit + +-- | /Body Param/ "containerConfig" - The container configuration +instance HasBodyParam ImageCommit ContainerConfig + +-- | /Optional Param/ "container" - The ID or name of the container to commit +instance HasOptionalParam ImageCommit Container where + applyOptionalParam req (Container xs) = + req `addQuery` toQuery ("container", Just xs) + +-- | /Optional Param/ "repo" - Repository name for the created image +instance HasOptionalParam ImageCommit Repo where + applyOptionalParam req (Repo xs) = + req `addQuery` toQuery ("repo", Just xs) + +-- | /Optional Param/ "tag" - Tag name for the create image +instance HasOptionalParam ImageCommit Tag where + applyOptionalParam req (Tag xs) = + req `addQuery` toQuery ("tag", Just xs) + +-- | /Optional Param/ "comment" - Commit message +instance HasOptionalParam ImageCommit Comment where + applyOptionalParam req (Comment xs) = + req `addQuery` toQuery ("comment", Just xs) + +-- | /Optional Param/ "author" - Author of the image (e.g., `John Hannibal Smith `) +instance HasOptionalParam ImageCommit Author where + applyOptionalParam req (Author xs) = + req `addQuery` toQuery ("author", Just xs) + +-- | /Optional Param/ "pause" - Whether to pause the container before committing +instance HasOptionalParam ImageCommit Pause where + applyOptionalParam req (Pause xs) = + req `addQuery` toQuery ("pause", Just xs) + +-- | /Optional Param/ "changes" - `Dockerfile` instructions to apply while committing +instance HasOptionalParam ImageCommit ChangesText where + applyOptionalParam req (ChangesText xs) = + req `addQuery` toQuery ("changes", Just xs) + +-- | @application/json@ +instance Consumes ImageCommit MimeJSON + +-- | @application/json@ +instance Produces ImageCommit MimeJSON + + +-- *** imageCreate + +-- | @POST \/images\/create@ +-- +-- Create an image +-- +-- Pull or import an image. +-- +imageCreate + :: (Consumes ImageCreate contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> DockerEngineRequest ImageCreate contentType NoContent MimeNoContent +imageCreate _ = + _mkRequest "POST" ["/images/create"] + +data ImageCreate + +-- | /Body Param/ "inputImage" - Image content if the value `-` has been specified in fromSrc query parameter +instance HasBodyParam ImageCreate InputImage + +-- | /Optional Param/ "fromImage" - Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed. +instance HasOptionalParam ImageCreate FromImage where + applyOptionalParam req (FromImage xs) = + req `addQuery` toQuery ("fromImage", Just xs) + +-- | /Optional Param/ "fromSrc" - Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image. +instance HasOptionalParam ImageCreate FromSrc where + applyOptionalParam req (FromSrc xs) = + req `addQuery` toQuery ("fromSrc", Just xs) + +-- | /Optional Param/ "repo" - 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. +instance HasOptionalParam ImageCreate Repo where + applyOptionalParam req (Repo xs) = + req `addQuery` toQuery ("repo", Just xs) + +-- | /Optional Param/ "tag" - Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled. +instance HasOptionalParam ImageCreate Tag where + applyOptionalParam req (Tag xs) = + req `addQuery` toQuery ("tag", Just xs) + +-- | /Optional Param/ "message" - Set commit message for imported image. +instance HasOptionalParam ImageCreate Message where + applyOptionalParam req (Message xs) = + req `addQuery` toQuery ("message", Just xs) + +-- | /Optional Param/ "X-Registry-Auth" - A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication) for details. +instance HasOptionalParam ImageCreate XRegistryAuth where + applyOptionalParam req (XRegistryAuth xs) = + req `addHeader` toHeader ("X-Registry-Auth", xs) + +-- | /Optional Param/ "changes" - 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` +instance HasOptionalParam ImageCreate Changes where + applyOptionalParam req (Changes xs) = + req `addQuery` toQueryColl CommaSeparated ("changes", Just xs) + +-- | /Optional Param/ "platform" - 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. +instance HasOptionalParam ImageCreate Platform2 where + applyOptionalParam req (Platform2 xs) = + req `addQuery` toQuery ("platform", Just xs) + +-- | @application/octet-stream@ +instance Consumes ImageCreate MimeOctetStream +-- | @text/plain@ +instance Consumes ImageCreate MimePlainText + +instance Produces ImageCreate MimeNoContent + + +-- *** imageDelete + +-- | @DELETE \/images\/{name}@ +-- +-- 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. +-- +imageDelete + :: Name -- ^ "name" - Image name or ID + -> DockerEngineRequest ImageDelete MimeNoContent [ImageDeleteResponseItem] MimeJSON +imageDelete (Name name) = + _mkRequest "DELETE" ["/images/",toPath name] + +data ImageDelete + +-- | /Optional Param/ "force" - Remove the image even if it is being used by stopped containers or has other tags +instance HasOptionalParam ImageDelete Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) + +-- | /Optional Param/ "noprune" - Do not delete untagged parent images +instance HasOptionalParam ImageDelete Noprune where + applyOptionalParam req (Noprune xs) = + req `addQuery` toQuery ("noprune", Just xs) +-- | @application/json@ +instance Produces ImageDelete MimeJSON + + +-- *** imageGet + +-- | @GET \/images\/{name}\/get@ +-- +-- 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\" } } ``` +-- +imageGet + :: Name -- ^ "name" - Image name or ID + -> DockerEngineRequest ImageGet MimeNoContent FilePath MimeXTar +imageGet (Name name) = + _mkRequest "GET" ["/images/",toPath name,"/get"] + +data ImageGet +-- | @application/x-tar@ +instance Produces ImageGet MimeXTar + + +-- *** imageGetAll + +-- | @GET \/images\/get@ +-- +-- 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). +-- +imageGetAll + :: DockerEngineRequest ImageGetAll MimeNoContent FilePath MimeXTar +imageGetAll = + _mkRequest "GET" ["/images/get"] + +data ImageGetAll + +-- | /Optional Param/ "names" - Image names to filter by +instance HasOptionalParam ImageGetAll Names where + applyOptionalParam req (Names xs) = + req `addQuery` toQueryColl CommaSeparated ("names", Just xs) +-- | @application/x-tar@ +instance Produces ImageGetAll MimeXTar + + +-- *** imageHistory + +-- | @GET \/images\/{name}\/history@ +-- +-- Get the history of an image +-- +-- Return parent layers of an image. +-- +imageHistory + :: Name -- ^ "name" - Image name or ID + -> DockerEngineRequest ImageHistory MimeNoContent [HistoryResponseItem] MimeJSON +imageHistory (Name name) = + _mkRequest "GET" ["/images/",toPath name,"/history"] + +data ImageHistory +-- | @application/json@ +instance Produces ImageHistory MimeJSON + + +-- *** imageInspect0 + +-- | @GET \/images\/{name}\/json@ +-- +-- Inspect an image +-- +-- Return low-level information about an image. +-- +imageInspect0 + :: Name -- ^ "name" - Image name or id + -> DockerEngineRequest ImageInspect0 MimeNoContent ImageInspect MimeJSON +imageInspect0 (Name name) = + _mkRequest "GET" ["/images/",toPath name,"/json"] + +data ImageInspect0 +-- | @application/json@ +instance Produces ImageInspect0 MimeJSON + + +-- *** imageList + +-- | @GET \/images\/json@ +-- +-- List Images +-- +-- Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image. +-- +imageList + :: DockerEngineRequest ImageList MimeNoContent [ImageSummary] MimeJSON +imageList = + _mkRequest "GET" ["/images/json"] + +data ImageList + +-- | /Optional Param/ "all" - Show all images. Only images from a final layer (no children) are shown by default. +instance HasOptionalParam ImageList All where + applyOptionalParam req (All xs) = + req `addQuery` toQuery ("all", Just xs) + +-- | /Optional Param/ "filters" - 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 ``) - `until=` +instance HasOptionalParam ImageList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) + +-- | /Optional Param/ "shared-size" - Compute and show shared size as a `SharedSize` field on each image. +instance HasOptionalParam ImageList SharedSize where + applyOptionalParam req (SharedSize xs) = + req `addQuery` toQuery ("shared-size", Just xs) + +-- | /Optional Param/ "digests" - Show digest information as a `RepoDigests` field on each image. +instance HasOptionalParam ImageList Digests where + applyOptionalParam req (Digests xs) = + req `addQuery` toQuery ("digests", Just xs) +-- | @application/json@ +instance Produces ImageList MimeJSON + + +-- *** imageLoad + +-- | @POST \/images\/load@ +-- +-- Import images +-- +-- Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). +-- +imageLoad + :: (Consumes ImageLoad MimeXTar) + => DockerEngineRequest ImageLoad MimeXTar NoContent MimeNoContent +imageLoad = + _mkRequest "POST" ["/images/load"] + +data ImageLoad + +-- | /Body Param/ "imagesTarball" - Tar archive containing images +instance HasBodyParam ImageLoad ImagesTarball + +-- | /Optional Param/ "quiet" - Suppress progress details during load. +instance HasOptionalParam ImageLoad Quiet where + applyOptionalParam req (Quiet xs) = + req `addQuery` toQuery ("quiet", Just xs) + +-- | @application/x-tar@ +instance Consumes ImageLoad MimeXTar + +instance Produces ImageLoad MimeNoContent + + +-- *** imagePrune + +-- | @POST \/images\/prune@ +-- +-- Delete unused images +-- +imagePrune + :: DockerEngineRequest ImagePrune MimeNoContent ImagePruneResponse MimeJSON +imagePrune = + _mkRequest "POST" ["/images/prune"] + +data ImagePrune + +-- | /Optional Param/ "filters" - 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. +instance HasOptionalParam ImagePrune Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces ImagePrune MimeJSON + + +-- *** imagePush + +-- | @POST \/images\/{name}\/push@ +-- +-- 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. +-- +imagePush + :: Name -- ^ "name" - Image name or ID. + -> XRegistryAuth -- ^ "xRegistryAuth" - A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication) for details. + -> DockerEngineRequest ImagePush MimeNoContent NoContent MimeNoContent +imagePush (Name name) (XRegistryAuth xRegistryAuth) = + _mkRequest "POST" ["/images/",toPath name,"/push"] + `addHeader` toHeader ("X-Registry-Auth", xRegistryAuth) + +data ImagePush + +-- | /Optional Param/ "tag" - The tag to associate with the image on the registry. +instance HasOptionalParam ImagePush Tag where + applyOptionalParam req (Tag xs) = + req `addQuery` toQuery ("tag", Just xs) +instance Produces ImagePush MimeNoContent + + +-- *** imageSearch + +-- | @GET \/images\/search@ +-- +-- Search images +-- +-- Search for an image on Docker Hub. +-- +imageSearch + :: Term -- ^ "term" - Term to search + -> DockerEngineRequest ImageSearch MimeNoContent [ImageSearchResponseItem] MimeJSON +imageSearch (Term term) = + _mkRequest "GET" ["/images/search"] + `addQuery` toQuery ("term", Just term) + +data ImageSearch + +-- | /Optional Param/ "limit" - Maximum number of results to return +instance HasOptionalParam ImageSearch Limit2 where + applyOptionalParam req (Limit2 xs) = + req `addQuery` toQuery ("limit", Just xs) + +-- | /Optional Param/ "filters" - A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - `is-official=(true|false)` - `stars=` Matches images that has at least 'number' stars. +instance HasOptionalParam ImageSearch Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces ImageSearch MimeJSON + + +-- *** imageTag + +-- | @POST \/images\/{name}\/tag@ +-- +-- Tag an image +-- +-- Tag an image so that it becomes part of a repository. +-- +imageTag + :: Name -- ^ "name" - Image name or ID to tag. + -> DockerEngineRequest ImageTag MimeNoContent NoContent MimeNoContent +imageTag (Name name) = + _mkRequest "POST" ["/images/",toPath name,"/tag"] + +data ImageTag + +-- | /Optional Param/ "repo" - The repository to tag in. For example, `someuser/someimage`. +instance HasOptionalParam ImageTag Repo where + applyOptionalParam req (Repo xs) = + req `addQuery` toQuery ("repo", Just xs) + +-- | /Optional Param/ "tag" - The name of the new tag. +instance HasOptionalParam ImageTag Tag where + applyOptionalParam req (Tag xs) = + req `addQuery` toQuery ("tag", Just xs) +instance Produces ImageTag MimeNoContent + diff --git a/v1.45/lib/DockerEngine/API/Network.hs b/v1.45/lib/DockerEngine/API/Network.hs new file mode 100644 index 0000000..9e9885f --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Network.hs @@ -0,0 +1,221 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Network +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Network where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Network + +-- *** networkConnect + +-- | @POST \/networks\/{id}\/connect@ +-- +-- Connect a container to a network +-- +-- The network must be either a local-scoped network or a swarm-scoped network with the `attachable` option set. A network cannot be re-attached to a running container +-- +networkConnect + :: (Consumes NetworkConnect MimeJSON, MimeRender MimeJSON NetworkConnectRequest) + => NetworkConnectRequest -- ^ "container" + -> Id -- ^ "id" - Network ID or name + -> DockerEngineRequest NetworkConnect MimeJSON NoContent MimeNoContent +networkConnect container (Id id) = + _mkRequest "POST" ["/networks/",toPath id,"/connect"] + `setBodyParam` container + +data NetworkConnect +instance HasBodyParam NetworkConnect NetworkConnectRequest + +-- | @application/json@ +instance Consumes NetworkConnect MimeJSON + +instance Produces NetworkConnect MimeNoContent + + +-- *** networkCreate + +-- | @POST \/networks\/create@ +-- +-- Create a network +-- +networkCreate + :: (Consumes NetworkCreate MimeJSON, MimeRender MimeJSON NetworkCreateRequest) + => NetworkCreateRequest -- ^ "networkConfig" - Network configuration + -> DockerEngineRequest NetworkCreate MimeJSON NetworkCreateResponse MimeJSON +networkCreate networkConfig = + _mkRequest "POST" ["/networks/create"] + `setBodyParam` networkConfig + +data NetworkCreate + +-- | /Body Param/ "networkConfig" - Network configuration +instance HasBodyParam NetworkCreate NetworkCreateRequest + +-- | @application/json@ +instance Consumes NetworkCreate MimeJSON + +-- | @application/json@ +instance Produces NetworkCreate MimeJSON + + +-- *** networkDelete + +-- | @DELETE \/networks\/{id}@ +-- +-- Remove a network +-- +networkDelete + :: Id -- ^ "id" - Network ID or name + -> DockerEngineRequest NetworkDelete MimeNoContent NoContent MimeNoContent +networkDelete (Id id) = + _mkRequest "DELETE" ["/networks/",toPath id] + +data NetworkDelete +instance Produces NetworkDelete MimeNoContent + + +-- *** networkDisconnect + +-- | @POST \/networks\/{id}\/disconnect@ +-- +-- Disconnect a container from a network +-- +networkDisconnect + :: (Consumes NetworkDisconnect MimeJSON, MimeRender MimeJSON NetworkDisconnectRequest) + => NetworkDisconnectRequest -- ^ "container" + -> Id -- ^ "id" - Network ID or name + -> DockerEngineRequest NetworkDisconnect MimeJSON NoContent MimeNoContent +networkDisconnect container (Id id) = + _mkRequest "POST" ["/networks/",toPath id,"/disconnect"] + `setBodyParam` container + +data NetworkDisconnect +instance HasBodyParam NetworkDisconnect NetworkDisconnectRequest + +-- | @application/json@ +instance Consumes NetworkDisconnect MimeJSON + +instance Produces NetworkDisconnect MimeNoContent + + +-- *** networkInspect + +-- | @GET \/networks\/{id}@ +-- +-- Inspect a network +-- +networkInspect + :: Id -- ^ "id" - Network ID or name + -> DockerEngineRequest NetworkInspect MimeNoContent Network MimeJSON +networkInspect (Id id) = + _mkRequest "GET" ["/networks/",toPath id] + +data NetworkInspect + +-- | /Optional Param/ "verbose" - Detailed inspect output for troubleshooting +instance HasOptionalParam NetworkInspect Verbose where + applyOptionalParam req (Verbose xs) = + req `addQuery` toQuery ("verbose", Just xs) + +-- | /Optional Param/ "scope" - Filter the network by scope (swarm, global, or local) +instance HasOptionalParam NetworkInspect Scope where + applyOptionalParam req (Scope xs) = + req `addQuery` toQuery ("scope", Just xs) +-- | @application/json@ +instance Produces NetworkInspect MimeJSON + + +-- *** networkList + +-- | @GET \/networks@ +-- +-- List networks +-- +-- Returns a list of networks. For details on the format, see the [network inspect endpoint](#operation/NetworkInspect). Note that it uses a different, smaller representation of a network than inspecting a single network. For example, the list of containers attached to the network is not propagated in API versions 1.28 and up. +-- +networkList + :: DockerEngineRequest NetworkList MimeNoContent [Network] MimeJSON +networkList = + _mkRequest "GET" ["/networks"] + +data NetworkList + +-- | /Optional Param/ "filters" - JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters: - `dangling=` When set to `true` (or `1`), returns all networks that are not in use by a container. When set to `false` (or `0`), only networks that are in use by one or more containers are returned. - `driver=` Matches a network's driver. - `id=` Matches all or part of a network ID. - `label=` or `label==` of a network label. - `name=` Matches all or part of a network name. - `scope=[\"swarm\"|\"global\"|\"local\"]` Filters networks by scope (`swarm`, `global`, or `local`). - `type=[\"custom\"|\"builtin\"]` Filters networks by type. The `custom` keyword returns all user-defined networks. +instance HasOptionalParam NetworkList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces NetworkList MimeJSON + + +-- *** networkPrune + +-- | @POST \/networks\/prune@ +-- +-- Delete unused networks +-- +networkPrune + :: DockerEngineRequest NetworkPrune MimeNoContent NetworkPruneResponse MimeJSON +networkPrune = + _mkRequest "POST" ["/networks/prune"] + +data NetworkPrune + +-- | /Optional Param/ "filters" - Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `until=` Prune networks 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 networks with (or without, in case `label!=...` is used) the specified labels. +instance HasOptionalParam NetworkPrune Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces NetworkPrune MimeJSON + diff --git a/v1.45/lib/DockerEngine/API/Node.hs b/v1.45/lib/DockerEngine/API/Node.hs new file mode 100644 index 0000000..447e85c --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Node.hs @@ -0,0 +1,150 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Node +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Node where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Node + +-- *** nodeDelete + +-- | @DELETE \/nodes\/{id}@ +-- +-- Delete a node +-- +nodeDelete + :: Id -- ^ "id" - The ID or name of the node + -> DockerEngineRequest NodeDelete MimeNoContent NoContent MimeNoContent +nodeDelete (Id id) = + _mkRequest "DELETE" ["/nodes/",toPath id] + +data NodeDelete + +-- | /Optional Param/ "force" - Force remove a node from the swarm +instance HasOptionalParam NodeDelete Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) +instance Produces NodeDelete MimeNoContent + + +-- *** nodeInspect + +-- | @GET \/nodes\/{id}@ +-- +-- Inspect a node +-- +nodeInspect + :: Accept accept -- ^ request accept ('MimeType') + -> Id -- ^ "id" - The ID or name of the node + -> DockerEngineRequest NodeInspect MimeNoContent Node accept +nodeInspect _ (Id id) = + _mkRequest "GET" ["/nodes/",toPath id] + +data NodeInspect +-- | @application/json@ +instance Produces NodeInspect MimeJSON +-- | @text/plain@ +instance Produces NodeInspect MimePlainText + + +-- *** nodeList + +-- | @GET \/nodes@ +-- +-- List nodes +-- +nodeList + :: Accept accept -- ^ request accept ('MimeType') + -> DockerEngineRequest NodeList MimeNoContent [Node] accept +nodeList _ = + _mkRequest "GET" ["/nodes"] + +data NodeList + +-- | /Optional Param/ "filters" - 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`)` +instance HasOptionalParam NodeList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces NodeList MimeJSON +-- | @text/plain@ +instance Produces NodeList MimePlainText + + +-- *** nodeUpdate + +-- | @POST \/nodes\/{id}\/update@ +-- +-- Update a node +-- +nodeUpdate + :: (Consumes NodeUpdate contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Id -- ^ "id" - The ID of the node + -> VersionInteger -- ^ "version" - The version number of the node object being updated. This is required to avoid conflicting writes. + -> DockerEngineRequest NodeUpdate contentType NoContent MimeNoContent +nodeUpdate _ (Id id) (VersionInteger version) = + _mkRequest "POST" ["/nodes/",toPath id,"/update"] + `addQuery` toQuery ("version", Just version) + +data NodeUpdate +instance HasBodyParam NodeUpdate NodeSpec + +-- | @application/json@ +instance Consumes NodeUpdate MimeJSON +-- | @text/plain@ +instance Consumes NodeUpdate MimePlainText + +instance Produces NodeUpdate MimeNoContent + diff --git a/v1.45/lib/DockerEngine/API/Plugin.hs b/v1.45/lib/DockerEngine/API/Plugin.hs new file mode 100644 index 0000000..39f7b89 --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Plugin.hs @@ -0,0 +1,324 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Plugin +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Plugin where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Plugin + +-- *** getPluginPrivileges + +-- | @GET \/plugins\/privileges@ +-- +-- Get plugin privileges +-- +getPluginPrivileges + :: Accept accept -- ^ request accept ('MimeType') + -> Remote -- ^ "remote" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest GetPluginPrivileges MimeNoContent [PluginPrivilege] accept +getPluginPrivileges _ (Remote remote) = + _mkRequest "GET" ["/plugins/privileges"] + `addQuery` toQuery ("remote", Just remote) + +data GetPluginPrivileges +-- | @application/json@ +instance Produces GetPluginPrivileges MimeJSON +-- | @text/plain@ +instance Produces GetPluginPrivileges MimePlainText + + +-- *** pluginCreate + +-- | @POST \/plugins\/create@ +-- +-- Create a plugin +-- +pluginCreate + :: (Consumes PluginCreate MimeXTar) + => Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginCreate MimeXTar NoContent MimeNoContent +pluginCreate (Name name) = + _mkRequest "POST" ["/plugins/create"] + `addQuery` toQuery ("name", Just name) + +data PluginCreate + +-- | /Body Param/ "tarContext" - Path to tar containing plugin rootfs and manifest +instance HasBodyParam PluginCreate TarContext + +-- | @application/x-tar@ +instance Consumes PluginCreate MimeXTar + +instance Produces PluginCreate MimeNoContent + + +-- *** pluginDelete + +-- | @DELETE \/plugins\/{name}@ +-- +-- Remove a plugin +-- +pluginDelete + :: Accept accept -- ^ request accept ('MimeType') + -> Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginDelete MimeNoContent Plugin accept +pluginDelete _ (Name name) = + _mkRequest "DELETE" ["/plugins/",toPath name] + +data PluginDelete + +-- | /Optional Param/ "force" - Disable the plugin before removing. This may result in issues if the plugin is in use by a container. +instance HasOptionalParam PluginDelete Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) +-- | @application/json@ +instance Produces PluginDelete MimeJSON +-- | @text/plain@ +instance Produces PluginDelete MimePlainText + + +-- *** pluginDisable + +-- | @POST \/plugins\/{name}\/disable@ +-- +-- Disable a plugin +-- +pluginDisable + :: Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginDisable MimeNoContent NoContent MimeNoContent +pluginDisable (Name name) = + _mkRequest "POST" ["/plugins/",toPath name,"/disable"] + +data PluginDisable + +-- | /Optional Param/ "force" - Force disable a plugin even if still in use. +instance HasOptionalParam PluginDisable Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) +instance Produces PluginDisable MimeNoContent + + +-- *** pluginEnable + +-- | @POST \/plugins\/{name}\/enable@ +-- +-- Enable a plugin +-- +pluginEnable + :: Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginEnable MimeNoContent NoContent MimeNoContent +pluginEnable (Name name) = + _mkRequest "POST" ["/plugins/",toPath name,"/enable"] + +data PluginEnable + +-- | /Optional Param/ "timeout" - Set the HTTP client timeout (in seconds) +instance HasOptionalParam PluginEnable Timeout where + applyOptionalParam req (Timeout xs) = + req `addQuery` toQuery ("timeout", Just xs) +instance Produces PluginEnable MimeNoContent + + +-- *** pluginInspect + +-- | @GET \/plugins\/{name}\/json@ +-- +-- Inspect a plugin +-- +pluginInspect + :: Accept accept -- ^ request accept ('MimeType') + -> Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginInspect MimeNoContent Plugin accept +pluginInspect _ (Name name) = + _mkRequest "GET" ["/plugins/",toPath name,"/json"] + +data PluginInspect +-- | @application/json@ +instance Produces PluginInspect MimeJSON +-- | @text/plain@ +instance Produces PluginInspect MimePlainText + + +-- *** pluginList + +-- | @GET \/plugins@ +-- +-- List plugins +-- +-- Returns information about installed plugins. +-- +pluginList + :: DockerEngineRequest PluginList MimeNoContent [Plugin] MimeJSON +pluginList = + _mkRequest "GET" ["/plugins"] + +data PluginList + +-- | /Optional Param/ "filters" - A JSON encoded value of the filters (a `map[string][]string`) to process on the plugin list. Available filters: - `capability=` - `enable=|` +instance HasOptionalParam PluginList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces PluginList MimeJSON + + +-- *** pluginPull + +-- | @POST \/plugins\/pull@ +-- +-- 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). +-- +pluginPull + :: (Consumes PluginPull contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Remote -- ^ "remote" - Remote reference for plugin to install. The `:latest` tag is optional, and is used as the default if omitted. + -> DockerEngineRequest PluginPull contentType NoContent MimeNoContent +pluginPull _ (Remote remote) = + _mkRequest "POST" ["/plugins/pull"] + `addQuery` toQuery ("remote", Just remote) + +data PluginPull +instance HasBodyParam PluginPull Body + +-- | /Optional Param/ "name" - Local name for the pulled plugin. The `:latest` tag is optional, and is used as the default if omitted. +instance HasOptionalParam PluginPull Name where + applyOptionalParam req (Name xs) = + req `addQuery` toQuery ("name", Just xs) + +-- | /Optional Param/ "X-Registry-Auth" - A base64url-encoded auth configuration to use when pulling a plugin from a registry. Refer to the [authentication section](#section/Authentication) for details. +instance HasOptionalParam PluginPull XRegistryAuth where + applyOptionalParam req (XRegistryAuth xs) = + req `addHeader` toHeader ("X-Registry-Auth", xs) + +-- | @application/json@ +instance Consumes PluginPull MimeJSON +-- | @text/plain@ +instance Consumes PluginPull MimePlainText + +instance Produces PluginPull MimeNoContent + + +-- *** pluginPush + +-- | @POST \/plugins\/{name}\/push@ +-- +-- Push a plugin +-- +-- Push a plugin to the registry. +-- +pluginPush + :: Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginPush MimeNoContent NoContent MimeNoContent +pluginPush (Name name) = + _mkRequest "POST" ["/plugins/",toPath name,"/push"] + +data PluginPush +instance Produces PluginPush MimeNoContent + + +-- *** pluginSet + +-- | @POST \/plugins\/{name}\/set@ +-- +-- Configure a plugin +-- +pluginSet + :: (Consumes PluginSet MimeJSON) + => Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginSet MimeJSON NoContent MimeNoContent +pluginSet (Name name) = + _mkRequest "POST" ["/plugins/",toPath name,"/set"] + +data PluginSet +instance HasBodyParam PluginSet BodyText + +-- | @application/json@ +instance Consumes PluginSet MimeJSON + +instance Produces PluginSet MimeNoContent + + +-- *** pluginUpgrade + +-- | @POST \/plugins\/{name}\/upgrade@ +-- +-- Upgrade a plugin +-- +pluginUpgrade + :: (Consumes PluginUpgrade contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> Remote -- ^ "remote" - Remote reference to upgrade to. The `:latest` tag is optional, and is used as the default if omitted. + -> DockerEngineRequest PluginUpgrade contentType NoContent MimeNoContent +pluginUpgrade _ (Name name) (Remote remote) = + _mkRequest "POST" ["/plugins/",toPath name,"/upgrade"] + `addQuery` toQuery ("remote", Just remote) + +data PluginUpgrade +instance HasBodyParam PluginUpgrade Body + +-- | /Optional Param/ "X-Registry-Auth" - A base64url-encoded auth configuration to use when pulling a plugin from a registry. Refer to the [authentication section](#section/Authentication) for details. +instance HasOptionalParam PluginUpgrade XRegistryAuth where + applyOptionalParam req (XRegistryAuth xs) = + req `addHeader` toHeader ("X-Registry-Auth", xs) + +-- | @application/json@ +instance Consumes PluginUpgrade MimeJSON +-- | @text/plain@ +instance Consumes PluginUpgrade MimePlainText + +instance Produces PluginUpgrade MimeNoContent + diff --git a/v1.45/lib/DockerEngine/API/Secret.hs b/v1.45/lib/DockerEngine/API/Secret.hs new file mode 100644 index 0000000..439ca9b --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Secret.hs @@ -0,0 +1,163 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Secret +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Secret where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Secret + +-- *** secretCreate + +-- | @POST \/secrets\/create@ +-- +-- Create a secret +-- +secretCreate + :: (Consumes SecretCreate MimeJSON) + => DockerEngineRequest SecretCreate MimeJSON IdResponse MimeJSON +secretCreate = + _mkRequest "POST" ["/secrets/create"] + +data SecretCreate +instance HasBodyParam SecretCreate SecretCreateRequest + +-- | @application/json@ +instance Consumes SecretCreate MimeJSON + +-- | @application/json@ +instance Produces SecretCreate MimeJSON + + +-- *** secretDelete + +-- | @DELETE \/secrets\/{id}@ +-- +-- Delete a secret +-- +secretDelete + :: Id -- ^ "id" - ID of the secret + -> DockerEngineRequest SecretDelete MimeNoContent NoContent MimeNoContent +secretDelete (Id id) = + _mkRequest "DELETE" ["/secrets/",toPath id] + +data SecretDelete +instance Produces SecretDelete MimeNoContent + + +-- *** secretInspect + +-- | @GET \/secrets\/{id}@ +-- +-- Inspect a secret +-- +secretInspect + :: Id -- ^ "id" - ID of the secret + -> DockerEngineRequest SecretInspect MimeNoContent Secret MimeJSON +secretInspect (Id id) = + _mkRequest "GET" ["/secrets/",toPath id] + +data SecretInspect +-- | @application/json@ +instance Produces SecretInspect MimeJSON + + +-- *** secretList + +-- | @GET \/secrets@ +-- +-- List secrets +-- +secretList + :: DockerEngineRequest SecretList MimeNoContent [Secret] MimeJSON +secretList = + _mkRequest "GET" ["/secrets"] + +data SecretList + +-- | /Optional Param/ "filters" - 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=` +instance HasOptionalParam SecretList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces SecretList MimeJSON + + +-- *** secretUpdate + +-- | @POST \/secrets\/{id}\/update@ +-- +-- Update a Secret +-- +secretUpdate + :: (Consumes SecretUpdate contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Id -- ^ "id" - The ID or name of the secret + -> VersionInteger -- ^ "version" - The version number of the secret object being updated. This is required to avoid conflicting writes. + -> DockerEngineRequest SecretUpdate contentType NoContent MimeNoContent +secretUpdate _ (Id id) (VersionInteger version) = + _mkRequest "POST" ["/secrets/",toPath id,"/update"] + `addQuery` toQuery ("version", Just version) + +data SecretUpdate + +-- | /Body Param/ "body" - 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. +instance HasBodyParam SecretUpdate SecretSpec + +-- | @application/json@ +instance Consumes SecretUpdate MimeJSON +-- | @text/plain@ +instance Consumes SecretUpdate MimePlainText + +instance Produces SecretUpdate MimeNoContent + diff --git a/v1.45/lib/DockerEngine/API/Service.hs b/v1.45/lib/DockerEngine/API/Service.hs new file mode 100644 index 0000000..e98b753 --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Service.hs @@ -0,0 +1,258 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Service +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Service where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Service + +-- *** serviceCreate + +-- | @POST \/services\/create@ +-- +-- Create a service +-- +serviceCreate + :: (Consumes ServiceCreate MimeJSON, MimeRender MimeJSON ServiceCreateRequest) + => ServiceCreateRequest -- ^ "body" + -> DockerEngineRequest ServiceCreate MimeJSON ServiceCreateResponse MimeJSON +serviceCreate body = + _mkRequest "POST" ["/services/create"] + `setBodyParam` body + +data ServiceCreate +instance HasBodyParam ServiceCreate ServiceCreateRequest + +-- | /Optional Param/ "X-Registry-Auth" - A base64url-encoded auth configuration for pulling from private registries. Refer to the [authentication section](#section/Authentication) for details. +instance HasOptionalParam ServiceCreate XRegistryAuth where + applyOptionalParam req (XRegistryAuth xs) = + req `addHeader` toHeader ("X-Registry-Auth", xs) + +-- | @application/json@ +instance Consumes ServiceCreate MimeJSON + +-- | @application/json@ +instance Produces ServiceCreate MimeJSON + + +-- *** serviceDelete + +-- | @DELETE \/services\/{id}@ +-- +-- Delete a service +-- +serviceDelete + :: Id -- ^ "id" - ID or name of service. + -> DockerEngineRequest ServiceDelete MimeNoContent NoContent MimeNoContent +serviceDelete (Id id) = + _mkRequest "DELETE" ["/services/",toPath id] + +data ServiceDelete +instance Produces ServiceDelete MimeNoContent + + +-- *** serviceInspect + +-- | @GET \/services\/{id}@ +-- +-- Inspect a service +-- +serviceInspect + :: Accept accept -- ^ request accept ('MimeType') + -> Id -- ^ "id" - ID or name of service. + -> DockerEngineRequest ServiceInspect MimeNoContent Service accept +serviceInspect _ (Id id) = + _mkRequest "GET" ["/services/",toPath id] + +data ServiceInspect + +-- | /Optional Param/ "insertDefaults" - Fill empty fields with default values. +instance HasOptionalParam ServiceInspect InsertDefaults where + applyOptionalParam req (InsertDefaults xs) = + req `addQuery` toQuery ("insertDefaults", Just xs) +-- | @application/json@ +instance Produces ServiceInspect MimeJSON +-- | @text/plain@ +instance Produces ServiceInspect MimePlainText + + +-- *** serviceList + +-- | @GET \/services@ +-- +-- List services +-- +serviceList + :: Accept accept -- ^ request accept ('MimeType') + -> DockerEngineRequest ServiceList MimeNoContent [Service] accept +serviceList _ = + _mkRequest "GET" ["/services"] + +data ServiceList + +-- | /Optional Param/ "filters" - 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=` +instance HasOptionalParam ServiceList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) + +-- | /Optional Param/ "status" - Include service status, with count of running and desired tasks. +instance HasOptionalParam ServiceList Status where + applyOptionalParam req (Status xs) = + req `addQuery` toQuery ("status", Just xs) +-- | @application/json@ +instance Produces ServiceList MimeJSON +-- | @text/plain@ +instance Produces ServiceList MimePlainText + + +-- *** serviceLogs + +-- | @GET \/services\/{id}\/logs@ +-- +-- 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. +-- +serviceLogs + :: Accept accept -- ^ request accept ('MimeType') + -> Id -- ^ "id" - ID or name of the service + -> DockerEngineRequest ServiceLogs MimeNoContent FilePath accept +serviceLogs _ (Id id) = + _mkRequest "GET" ["/services/",toPath id,"/logs"] + +data ServiceLogs + +-- | /Optional Param/ "details" - Show service context and extra details provided to logs. +instance HasOptionalParam ServiceLogs Details where + applyOptionalParam req (Details xs) = + req `addQuery` toQuery ("details", Just xs) + +-- | /Optional Param/ "follow" - Keep connection after returning logs. +instance HasOptionalParam ServiceLogs Follow where + applyOptionalParam req (Follow xs) = + req `addQuery` toQuery ("follow", Just xs) + +-- | /Optional Param/ "stdout" - Return logs from `stdout` +instance HasOptionalParam ServiceLogs Stdout where + applyOptionalParam req (Stdout xs) = + req `addQuery` toQuery ("stdout", Just xs) + +-- | /Optional Param/ "stderr" - Return logs from `stderr` +instance HasOptionalParam ServiceLogs Stderr where + applyOptionalParam req (Stderr xs) = + req `addQuery` toQuery ("stderr", Just xs) + +-- | /Optional Param/ "since" - Only return logs since this time, as a UNIX timestamp +instance HasOptionalParam ServiceLogs Since where + applyOptionalParam req (Since xs) = + req `addQuery` toQuery ("since", Just xs) + +-- | /Optional Param/ "timestamps" - Add timestamps to every log line +instance HasOptionalParam ServiceLogs Timestamps where + applyOptionalParam req (Timestamps xs) = + req `addQuery` toQuery ("timestamps", Just xs) + +-- | /Optional Param/ "tail" - Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. +instance HasOptionalParam ServiceLogs Tail where + applyOptionalParam req (Tail xs) = + req `addQuery` toQuery ("tail", Just xs) +-- | @application/json@ +instance Produces ServiceLogs MimeJSON +-- | @application/vnd.docker.raw-stream@ +instance Produces ServiceLogs MimeVndDockerRawStream +-- | @application/vnd.docker.multiplexed-stream@ +instance Produces ServiceLogs MimeVndDockerMultiplexedStream + + +-- *** serviceUpdate + +-- | @POST \/services\/{id}\/update@ +-- +-- Update a service +-- +serviceUpdate + :: (Consumes ServiceUpdate MimeJSON, MimeRender MimeJSON ServiceUpdateRequest) + => ServiceUpdateRequest -- ^ "body" + -> Id -- ^ "id" - ID or name of service. + -> VersionInt -- ^ "version" - 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}` + -> DockerEngineRequest ServiceUpdate MimeJSON ServiceUpdateResponse MimeJSON +serviceUpdate body (Id id) (VersionInt version) = + _mkRequest "POST" ["/services/",toPath id,"/update"] + `setBodyParam` body + `addQuery` toQuery ("version", Just version) + +data ServiceUpdate +instance HasBodyParam ServiceUpdate ServiceUpdateRequest + +-- | /Optional Param/ "registryAuthFrom" - If the `X-Registry-Auth` header is not specified, this parameter indicates where to find registry authorization credentials. +instance HasOptionalParam ServiceUpdate RegistryAuthFrom where + applyOptionalParam req (RegistryAuthFrom xs) = + req `addQuery` toQuery ("registryAuthFrom", Just xs) + +-- | /Optional Param/ "rollback" - 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. +instance HasOptionalParam ServiceUpdate Rollback where + applyOptionalParam req (Rollback xs) = + req `addQuery` toQuery ("rollback", Just xs) + +-- | /Optional Param/ "X-Registry-Auth" - A base64url-encoded auth configuration for pulling from private registries. Refer to the [authentication section](#section/Authentication) for details. +instance HasOptionalParam ServiceUpdate XRegistryAuth where + applyOptionalParam req (XRegistryAuth xs) = + req `addHeader` toHeader ("X-Registry-Auth", xs) + +-- | @application/json@ +instance Consumes ServiceUpdate MimeJSON + +-- | @application/json@ +instance Produces ServiceUpdate MimeJSON + diff --git a/v1.45/lib/DockerEngine/API/Session.hs b/v1.45/lib/DockerEngine/API/Session.hs new file mode 100644 index 0000000..ae73378 --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Session.hs @@ -0,0 +1,75 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Session +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Session where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Session + +-- *** session + +-- | @POST \/session@ +-- +-- 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 ``` +-- +session + :: DockerEngineRequest Session MimeNoContent NoContent MimeNoContent +session = + _mkRequest "POST" ["/session"] + +data Session +instance Produces Session MimeNoContent + diff --git a/v1.45/lib/DockerEngine/API/Swarm.hs b/v1.45/lib/DockerEngine/API/Swarm.hs new file mode 100644 index 0000000..58d6041 --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Swarm.hs @@ -0,0 +1,238 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Swarm +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Swarm where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Swarm + +-- *** swarmInit + +-- | @POST \/swarm\/init@ +-- +-- Initialize a new swarm +-- +swarmInit + :: (Consumes SwarmInit contentType, MimeRender contentType SwarmInitRequest) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> SwarmInitRequest -- ^ "body" + -> DockerEngineRequest SwarmInit contentType Text accept +swarmInit _ _ body = + _mkRequest "POST" ["/swarm/init"] + `setBodyParam` body + +data SwarmInit +instance HasBodyParam SwarmInit SwarmInitRequest + +-- | @application/json@ +instance Consumes SwarmInit MimeJSON +-- | @text/plain@ +instance Consumes SwarmInit MimePlainText + +-- | @application/json@ +instance Produces SwarmInit MimeJSON +-- | @text/plain@ +instance Produces SwarmInit MimePlainText + + +-- *** swarmInspect + +-- | @GET \/swarm@ +-- +-- Inspect swarm +-- +swarmInspect + :: Accept accept -- ^ request accept ('MimeType') + -> DockerEngineRequest SwarmInspect MimeNoContent Swarm accept +swarmInspect _ = + _mkRequest "GET" ["/swarm"] + +data SwarmInspect +-- | @application/json@ +instance Produces SwarmInspect MimeJSON +-- | @text/plain@ +instance Produces SwarmInspect MimePlainText + + +-- *** swarmJoin + +-- | @POST \/swarm\/join@ +-- +-- Join an existing swarm +-- +swarmJoin + :: (Consumes SwarmJoin contentType, MimeRender contentType SwarmJoinRequest) + => ContentType contentType -- ^ request content-type ('MimeType') + -> SwarmJoinRequest -- ^ "body" + -> DockerEngineRequest SwarmJoin contentType NoContent MimeNoContent +swarmJoin _ body = + _mkRequest "POST" ["/swarm/join"] + `setBodyParam` body + +data SwarmJoin +instance HasBodyParam SwarmJoin SwarmJoinRequest + +-- | @application/json@ +instance Consumes SwarmJoin MimeJSON +-- | @text/plain@ +instance Consumes SwarmJoin MimePlainText + +instance Produces SwarmJoin MimeNoContent + + +-- *** swarmLeave + +-- | @POST \/swarm\/leave@ +-- +-- Leave a swarm +-- +swarmLeave + :: DockerEngineRequest SwarmLeave MimeNoContent NoContent MimeNoContent +swarmLeave = + _mkRequest "POST" ["/swarm/leave"] + +data SwarmLeave + +-- | /Optional Param/ "force" - Force leave swarm, even if this is the last manager or that it will break the cluster. +instance HasOptionalParam SwarmLeave Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) +instance Produces SwarmLeave MimeNoContent + + +-- *** swarmUnlock + +-- | @POST \/swarm\/unlock@ +-- +-- Unlock a locked manager +-- +swarmUnlock + :: (Consumes SwarmUnlock MimeJSON, MimeRender MimeJSON SwarmUnlockRequest) + => SwarmUnlockRequest -- ^ "body" + -> DockerEngineRequest SwarmUnlock MimeJSON NoContent MimeNoContent +swarmUnlock body = + _mkRequest "POST" ["/swarm/unlock"] + `setBodyParam` body + +data SwarmUnlock +instance HasBodyParam SwarmUnlock SwarmUnlockRequest + +-- | @application/json@ +instance Consumes SwarmUnlock MimeJSON + +instance Produces SwarmUnlock MimeNoContent + + +-- *** swarmUnlockkey + +-- | @GET \/swarm\/unlockkey@ +-- +-- Get the unlock key +-- +swarmUnlockkey + :: Accept accept -- ^ request accept ('MimeType') + -> DockerEngineRequest SwarmUnlockkey MimeNoContent UnlockKeyResponse accept +swarmUnlockkey _ = + _mkRequest "GET" ["/swarm/unlockkey"] + +data SwarmUnlockkey +-- | @application/json@ +instance Produces SwarmUnlockkey MimeJSON +-- | @text/plain@ +instance Produces SwarmUnlockkey MimePlainText + + +-- *** swarmUpdate + +-- | @POST \/swarm\/update@ +-- +-- Update a swarm +-- +swarmUpdate + :: (Consumes SwarmUpdate contentType, MimeRender contentType SwarmSpec) + => ContentType contentType -- ^ request content-type ('MimeType') + -> SwarmSpec -- ^ "body" + -> VersionInteger -- ^ "version" - The version number of the swarm object being updated. This is required to avoid conflicting writes. + -> DockerEngineRequest SwarmUpdate contentType NoContent MimeNoContent +swarmUpdate _ body (VersionInteger version) = + _mkRequest "POST" ["/swarm/update"] + `setBodyParam` body + `addQuery` toQuery ("version", Just version) + +data SwarmUpdate +instance HasBodyParam SwarmUpdate SwarmSpec + +-- | /Optional Param/ "rotateWorkerToken" - Rotate the worker join token. +instance HasOptionalParam SwarmUpdate RotateWorkerToken where + applyOptionalParam req (RotateWorkerToken xs) = + req `addQuery` toQuery ("rotateWorkerToken", Just xs) + +-- | /Optional Param/ "rotateManagerToken" - Rotate the manager join token. +instance HasOptionalParam SwarmUpdate RotateManagerToken where + applyOptionalParam req (RotateManagerToken xs) = + req `addQuery` toQuery ("rotateManagerToken", Just xs) + +-- | /Optional Param/ "rotateManagerUnlockKey" - Rotate the manager unlock key. +instance HasOptionalParam SwarmUpdate RotateManagerUnlockKey where + applyOptionalParam req (RotateManagerUnlockKey xs) = + req `addQuery` toQuery ("rotateManagerUnlockKey", Just xs) + +-- | @application/json@ +instance Consumes SwarmUpdate MimeJSON +-- | @text/plain@ +instance Consumes SwarmUpdate MimePlainText + +instance Produces SwarmUpdate MimeNoContent + diff --git a/v1.45/lib/DockerEngine/API/System.hs b/v1.45/lib/DockerEngine/API/System.hs new file mode 100644 index 0000000..5446813 --- /dev/null +++ b/v1.45/lib/DockerEngine/API/System.hs @@ -0,0 +1,211 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.System +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.System where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** System + +-- *** systemAuth + +-- | @POST \/auth@ +-- +-- Check auth configuration +-- +-- Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. +-- +systemAuth + :: (Consumes SystemAuth MimeJSON) + => DockerEngineRequest SystemAuth MimeJSON SystemAuthResponse MimeJSON +systemAuth = + _mkRequest "POST" ["/auth"] + +data SystemAuth + +-- | /Body Param/ "authConfig" - Authentication to check +instance HasBodyParam SystemAuth AuthConfig + +-- | @application/json@ +instance Consumes SystemAuth MimeJSON + +-- | @application/json@ +instance Produces SystemAuth MimeJSON + + +-- *** systemDataUsage + +-- | @GET \/system\/df@ +-- +-- Get data usage information +-- +systemDataUsage + :: Accept accept -- ^ request accept ('MimeType') + -> DockerEngineRequest SystemDataUsage MimeNoContent SystemDataUsageResponse accept +systemDataUsage _ = + _mkRequest "GET" ["/system/df"] + +data SystemDataUsage + +-- | /Optional Param/ "type" - Object types, for which to compute and return data. +instance HasOptionalParam SystemDataUsage ParamType where + applyOptionalParam req (ParamType xs) = + req `addQuery` toQueryColl MultiParamArray ("type", Just xs) +-- | @application/json@ +instance Produces SystemDataUsage MimeJSON +-- | @text/plain@ +instance Produces SystemDataUsage MimePlainText + + +-- *** systemEvents + +-- | @GET \/events@ +-- +-- 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 +-- +systemEvents + :: DockerEngineRequest SystemEvents MimeNoContent EventMessage MimeJSON +systemEvents = + _mkRequest "GET" ["/events"] + +data SystemEvents + +-- | /Optional Param/ "since" - Show events created since this timestamp then stream new events. +instance HasOptionalParam SystemEvents SinceText where + applyOptionalParam req (SinceText xs) = + req `addQuery` toQuery ("since", Just xs) + +-- | /Optional Param/ "until" - Show events created until this timestamp then stop streaming. +instance HasOptionalParam SystemEvents UntilText where + applyOptionalParam req (UntilText xs) = + req `addQuery` toQuery ("until", Just xs) + +-- | /Optional Param/ "filters" - 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 +instance HasOptionalParam SystemEvents Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces SystemEvents MimeJSON + + +-- *** systemInfo0 + +-- | @GET \/info@ +-- +-- Get system information +-- +systemInfo0 + :: DockerEngineRequest SystemInfo0 MimeNoContent SystemInfo MimeJSON +systemInfo0 = + _mkRequest "GET" ["/info"] + +data SystemInfo0 +-- | @application/json@ +instance Produces SystemInfo0 MimeJSON + + +-- *** systemPing + +-- | @GET \/_ping@ +-- +-- Ping +-- +-- This is a dummy endpoint you can use to test if the server is accessible. +-- +systemPing + :: DockerEngineRequest SystemPing MimeNoContent Text MimePlainText +systemPing = + _mkRequest "GET" ["/_ping"] + +data SystemPing +-- | @text/plain@ +instance Produces SystemPing MimePlainText + + +-- *** systemPingHead + +-- | @HEAD \/_ping@ +-- +-- Ping +-- +-- This is a dummy endpoint you can use to test if the server is accessible. +-- +systemPingHead + :: DockerEngineRequest SystemPingHead MimeNoContent Text MimePlainText +systemPingHead = + _mkRequest "HEAD" ["/_ping"] + +data SystemPingHead +-- | @text/plain@ +instance Produces SystemPingHead MimePlainText + + +-- *** systemVersion0 + +-- | @GET \/version@ +-- +-- Get version +-- +-- Returns the version of Docker that is running and various information about the system that Docker is running on. +-- +systemVersion0 + :: DockerEngineRequest SystemVersion0 MimeNoContent SystemVersion MimeJSON +systemVersion0 = + _mkRequest "GET" ["/version"] + +data SystemVersion0 +-- | @application/json@ +instance Produces SystemVersion0 MimeJSON + diff --git a/v1.45/lib/DockerEngine/API/Task.hs b/v1.45/lib/DockerEngine/API/Task.hs new file mode 100644 index 0000000..835c85c --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Task.hs @@ -0,0 +1,155 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Task +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Task where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Task + +-- *** taskInspect + +-- | @GET \/tasks\/{id}@ +-- +-- Inspect a task +-- +taskInspect + :: Id -- ^ "id" - ID of the task + -> DockerEngineRequest TaskInspect MimeNoContent Task MimeJSON +taskInspect (Id id) = + _mkRequest "GET" ["/tasks/",toPath id] + +data TaskInspect +-- | @application/json@ +instance Produces TaskInspect MimeJSON + + +-- *** taskList + +-- | @GET \/tasks@ +-- +-- List tasks +-- +taskList + :: DockerEngineRequest TaskList MimeNoContent [Task] MimeJSON +taskList = + _mkRequest "GET" ["/tasks"] + +data TaskList + +-- | /Optional Param/ "filters" - 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=` +instance HasOptionalParam TaskList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces TaskList MimeJSON + + +-- *** taskLogs + +-- | @GET \/tasks\/{id}\/logs@ +-- +-- 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. +-- +taskLogs + :: Accept accept -- ^ request accept ('MimeType') + -> Id -- ^ "id" - ID of the task + -> DockerEngineRequest TaskLogs MimeNoContent FilePath accept +taskLogs _ (Id id) = + _mkRequest "GET" ["/tasks/",toPath id,"/logs"] + +data TaskLogs + +-- | /Optional Param/ "details" - Show task context and extra details provided to logs. +instance HasOptionalParam TaskLogs Details where + applyOptionalParam req (Details xs) = + req `addQuery` toQuery ("details", Just xs) + +-- | /Optional Param/ "follow" - Keep connection after returning logs. +instance HasOptionalParam TaskLogs Follow where + applyOptionalParam req (Follow xs) = + req `addQuery` toQuery ("follow", Just xs) + +-- | /Optional Param/ "stdout" - Return logs from `stdout` +instance HasOptionalParam TaskLogs Stdout where + applyOptionalParam req (Stdout xs) = + req `addQuery` toQuery ("stdout", Just xs) + +-- | /Optional Param/ "stderr" - Return logs from `stderr` +instance HasOptionalParam TaskLogs Stderr where + applyOptionalParam req (Stderr xs) = + req `addQuery` toQuery ("stderr", Just xs) + +-- | /Optional Param/ "since" - Only return logs since this time, as a UNIX timestamp +instance HasOptionalParam TaskLogs Since where + applyOptionalParam req (Since xs) = + req `addQuery` toQuery ("since", Just xs) + +-- | /Optional Param/ "timestamps" - Add timestamps to every log line +instance HasOptionalParam TaskLogs Timestamps where + applyOptionalParam req (Timestamps xs) = + req `addQuery` toQuery ("timestamps", Just xs) + +-- | /Optional Param/ "tail" - Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. +instance HasOptionalParam TaskLogs Tail where + applyOptionalParam req (Tail xs) = + req `addQuery` toQuery ("tail", Just xs) +-- | @application/json@ +instance Produces TaskLogs MimeJSON +-- | @application/vnd.docker.raw-stream@ +instance Produces TaskLogs MimeVndDockerRawStream +-- | @application/vnd.docker.multiplexed-stream@ +instance Produces TaskLogs MimeVndDockerMultiplexedStream + diff --git a/v1.45/lib/DockerEngine/API/Volume.hs b/v1.45/lib/DockerEngine/API/Volume.hs new file mode 100644 index 0000000..d3ab724 --- /dev/null +++ b/v1.45/lib/DockerEngine/API/Volume.hs @@ -0,0 +1,192 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Volume +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Volume where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Volume + +-- *** volumeCreate + +-- | @POST \/volumes\/create@ +-- +-- Create a volume +-- +volumeCreate + :: (Consumes VolumeCreate MimeJSON, MimeRender MimeJSON VolumeCreateOptions) + => VolumeCreateOptions -- ^ "volumeConfig" - Volume configuration + -> DockerEngineRequest VolumeCreate MimeJSON Volume MimeJSON +volumeCreate volumeConfig = + _mkRequest "POST" ["/volumes/create"] + `setBodyParam` volumeConfig + +data VolumeCreate + +-- | /Body Param/ "volumeConfig" - Volume configuration +instance HasBodyParam VolumeCreate VolumeCreateOptions + +-- | @application/json@ +instance Consumes VolumeCreate MimeJSON + +-- | @application/json@ +instance Produces VolumeCreate MimeJSON + + +-- *** volumeDelete + +-- | @DELETE \/volumes\/{name}@ +-- +-- Remove a volume +-- +-- Instruct the driver to remove the volume. +-- +volumeDelete + :: Name -- ^ "name" - Volume name or ID + -> DockerEngineRequest VolumeDelete MimeNoContent NoContent MimeNoContent +volumeDelete (Name name) = + _mkRequest "DELETE" ["/volumes/",toPath name] + +data VolumeDelete + +-- | /Optional Param/ "force" - Force the removal of the volume +instance HasOptionalParam VolumeDelete Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) +instance Produces VolumeDelete MimeNoContent + + +-- *** volumeInspect + +-- | @GET \/volumes\/{name}@ +-- +-- Inspect a volume +-- +volumeInspect + :: Name -- ^ "name" - Volume name or ID + -> DockerEngineRequest VolumeInspect MimeNoContent Volume MimeJSON +volumeInspect (Name name) = + _mkRequest "GET" ["/volumes/",toPath name] + +data VolumeInspect +-- | @application/json@ +instance Produces VolumeInspect MimeJSON + + +-- *** volumeList + +-- | @GET \/volumes@ +-- +-- List volumes +-- +volumeList + :: DockerEngineRequest VolumeList MimeNoContent VolumeListResponse MimeJSON +volumeList = + _mkRequest "GET" ["/volumes"] + +data VolumeList + +-- | /Optional Param/ "filters" - 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. +instance HasOptionalParam VolumeList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces VolumeList MimeJSON + + +-- *** volumePrune + +-- | @POST \/volumes\/prune@ +-- +-- Delete unused volumes +-- +volumePrune + :: DockerEngineRequest VolumePrune MimeNoContent VolumePruneResponse MimeJSON +volumePrune = + _mkRequest "POST" ["/volumes/prune"] + +data VolumePrune + +-- | /Optional Param/ "filters" - 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. +instance HasOptionalParam VolumePrune Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces VolumePrune MimeJSON + + +-- *** volumeUpdate + +-- | @PUT \/volumes\/{name}@ +-- +-- \"Update a volume. Valid only for Swarm cluster volumes\" +-- +volumeUpdate + :: (Consumes VolumeUpdate MimeJSON) + => Name -- ^ "name" - The name or ID of the volume + -> VersionInteger -- ^ "version" - The version number of the volume being updated. This is required to avoid conflicting writes. Found in the volume's `ClusterVolume` field. + -> DockerEngineRequest VolumeUpdate MimeJSON NoContent MimeNoContent +volumeUpdate (Name name) (VersionInteger version) = + _mkRequest "PUT" ["/volumes/",toPath name] + `addQuery` toQuery ("version", Just version) + +data VolumeUpdate + +-- | /Body Param/ "body" - The spec of the volume to update. Currently, only Availability may change. All other fields must remain unchanged. +instance HasBodyParam VolumeUpdate VolumeUpdateRequest + +-- | @application/json@ +instance Consumes VolumeUpdate MimeJSON + +instance Produces VolumeUpdate MimeNoContent + diff --git a/v1.45/lib/DockerEngine/Client.hs b/v1.45/lib/DockerEngine/Client.hs new file mode 100644 index 0000000..7d6a634 --- /dev/null +++ b/v1.45/lib/DockerEngine/Client.hs @@ -0,0 +1,223 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.Client +-} + +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE DeriveFunctor #-} +{-# LANGUAGE DeriveFoldable #-} +{-# LANGUAGE DeriveTraversable #-} +{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.Client where + +import DockerEngine.Core +import DockerEngine.Logging +import DockerEngine.MimeTypes + +import qualified Control.Exception.Safe as E +import qualified Control.Monad.IO.Class as P +import qualified Control.Monad as P +import qualified Data.Aeson.Types as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Char8 as BC +import qualified Data.ByteString.Lazy as BL +import qualified Data.ByteString.Lazy.Char8 as BCL +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Network.HTTP.Client as NH +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Function ((&)) +import Data.Monoid ((<>)) +import Data.Text (Text) +import GHC.Exts (IsString(..)) + +-- * Dispatch + +-- ** Lbs + +-- | send a request returning the raw http response +dispatchLbs + :: (Produces req accept, MimeType contentType) + => NH.Manager -- ^ http-client Connection manager + -> DockerEngineConfig -- ^ config + -> DockerEngineRequest req contentType res accept -- ^ request + -> IO (NH.Response BCL.ByteString) -- ^ response +dispatchLbs manager config request = do + initReq <- _toInitRequest config request + dispatchInitUnsafe manager config initReq + +-- ** Mime + +-- | pair of decoded http body and http response +data MimeResult res = + MimeResult { mimeResult :: Either MimeError res -- ^ decoded http body + , mimeResultResponse :: NH.Response BCL.ByteString -- ^ http response + } + deriving (Show, Functor, Foldable, Traversable) + +-- | pair of unrender/parser error and http response +data MimeError = + MimeError { + mimeError :: String -- ^ unrender/parser error + , mimeErrorResponse :: NH.Response BCL.ByteString -- ^ http response + } deriving (Show) + +-- | send a request returning the 'MimeResult' +dispatchMime + :: forall req contentType res accept. (Produces req accept, MimeUnrender accept res, MimeType contentType) + => NH.Manager -- ^ http-client Connection manager + -> DockerEngineConfig -- ^ config + -> DockerEngineRequest req contentType res accept -- ^ request + -> IO (MimeResult res) -- ^ response +dispatchMime manager config request = do + httpResponse <- dispatchLbs manager config request + let statusCode = NH.statusCode . NH.responseStatus $ httpResponse + parsedResult <- + runConfigLogWithExceptions "Client" config $ + do if (statusCode >= 400 && statusCode < 600) + then do + let s = "error statusCode: " ++ show statusCode + _log "Client" levelError (T.pack s) + pure (Left (MimeError s httpResponse)) + else case mimeUnrender (P.Proxy :: P.Proxy accept) (NH.responseBody httpResponse) of + Left s -> do + _log "Client" levelError (T.pack s) + pure (Left (MimeError s httpResponse)) + Right r -> pure (Right r) + return (MimeResult parsedResult httpResponse) + +-- | like 'dispatchMime', but only returns the decoded http body +dispatchMime' + :: (Produces req accept, MimeUnrender accept res, MimeType contentType) + => NH.Manager -- ^ http-client Connection manager + -> DockerEngineConfig -- ^ config + -> DockerEngineRequest req contentType res accept -- ^ request + -> IO (Either MimeError res) -- ^ response +dispatchMime' manager config request = do + MimeResult parsedResult _ <- dispatchMime manager config request + return parsedResult + +-- ** Unsafe + +-- | like 'dispatchReqLbs', but does not validate the operation is a 'Producer' of the "accept" 'MimeType'. (Useful if the server's response is undocumented) +dispatchLbsUnsafe + :: (MimeType accept, MimeType contentType) + => NH.Manager -- ^ http-client Connection manager + -> DockerEngineConfig -- ^ config + -> DockerEngineRequest req contentType res accept -- ^ request + -> IO (NH.Response BCL.ByteString) -- ^ response +dispatchLbsUnsafe manager config request = do + initReq <- _toInitRequest config request + dispatchInitUnsafe manager config initReq + +-- | dispatch an InitRequest +dispatchInitUnsafe + :: NH.Manager -- ^ http-client Connection manager + -> DockerEngineConfig -- ^ config + -> InitRequest req contentType res accept -- ^ init request + -> IO (NH.Response BCL.ByteString) -- ^ response +dispatchInitUnsafe manager config (InitRequest req) = do + runConfigLogWithExceptions src config $ + do _log src levelInfo requestLogMsg + _log src levelDebug requestDbgLogMsg + res <- P.liftIO $ NH.httpLbs req manager + _log src levelInfo (responseLogMsg res) + _log src levelDebug ((T.pack . show) res) + return res + where + src = "Client" + endpoint = + T.pack $ + BC.unpack $ + NH.method req <> " " <> NH.host req <> NH.path req <> NH.queryString req + requestLogMsg = "REQ:" <> endpoint + requestDbgLogMsg = + "Headers=" <> (T.pack . show) (NH.requestHeaders req) <> " Body=" <> + (case NH.requestBody req of + NH.RequestBodyLBS xs -> T.decodeUtf8 (BL.toStrict xs) + _ -> "") + responseStatusCode = (T.pack . show) . NH.statusCode . NH.responseStatus + responseLogMsg res = + "RES:statusCode=" <> responseStatusCode res <> " (" <> endpoint <> ")" + +-- * InitRequest + +-- | wraps an http-client 'Request' with request/response type parameters +newtype InitRequest req contentType res accept = InitRequest + { unInitRequest :: NH.Request + } deriving (Show) + +-- | Build an http-client 'Request' record from the supplied config and request +_toInitRequest + :: (MimeType accept, MimeType contentType) + => DockerEngineConfig -- ^ config + -> DockerEngineRequest req contentType res accept -- ^ request + -> IO (InitRequest req contentType res accept) -- ^ initialized request +_toInitRequest config req0 = + runConfigLogWithExceptions "Client" config $ do + parsedReq <- P.liftIO $ NH.parseRequest $ BCL.unpack $ BCL.append (configHost config) (BCL.concat (rUrlPath req0)) + req1 <- P.liftIO $ _applyAuthMethods req0 config + P.when + (configValidateAuthMethods config && (not . null . rAuthTypes) req1) + (E.throw $ AuthMethodException $ "AuthMethod not configured: " <> (show . head . rAuthTypes) req1) + let req2 = req1 & _setContentTypeHeader & _setAcceptHeader + params = rParams req2 + reqHeaders = ("User-Agent", WH.toHeader (configUserAgent config)) : paramsHeaders params + reqQuery = let query = paramsQuery params + queryExtraUnreserved = configQueryExtraUnreserved config + in if B.null queryExtraUnreserved + then NH.renderQuery True query + else NH.renderQueryPartialEscape True (toPartialEscapeQuery queryExtraUnreserved query) + pReq = parsedReq { NH.method = rMethod req2 + , NH.requestHeaders = reqHeaders + , NH.queryString = reqQuery + } + outReq <- case paramsBody params of + ParamBodyNone -> pure (pReq { NH.requestBody = mempty }) + ParamBodyB bs -> pure (pReq { NH.requestBody = NH.RequestBodyBS bs }) + ParamBodyBL bl -> pure (pReq { NH.requestBody = NH.RequestBodyLBS bl }) + ParamBodyFormUrlEncoded form -> pure (pReq { NH.requestBody = NH.RequestBodyLBS (WH.urlEncodeForm form) }) + ParamBodyMultipartFormData parts -> NH.formDataBody parts pReq + + pure (InitRequest outReq) + +-- | modify the underlying Request +modifyInitRequest :: InitRequest req contentType res accept -> (NH.Request -> NH.Request) -> InitRequest req contentType res accept +modifyInitRequest (InitRequest req) f = InitRequest (f req) + +-- | modify the underlying Request (monadic) +modifyInitRequestM :: Monad m => InitRequest req contentType res accept -> (NH.Request -> m NH.Request) -> m (InitRequest req contentType res accept) +modifyInitRequestM (InitRequest req) f = fmap InitRequest (f req) + +-- ** Logging + +-- | Run a block using the configured logger instance +runConfigLog + :: P.MonadIO m + => DockerEngineConfig -> LogExec m a +runConfigLog config = configLogExecWithContext config (configLogContext config) + +-- | Run a block using the configured logger instance (logs exceptions) +runConfigLogWithExceptions + :: (E.MonadCatch m, P.MonadIO m) + => T.Text -> DockerEngineConfig -> LogExec m a +runConfigLogWithExceptions src config = runConfigLog config . logExceptions src diff --git a/v1.45/lib/DockerEngine/Core.hs b/v1.45/lib/DockerEngine/Core.hs new file mode 100644 index 0000000..04fb994 --- /dev/null +++ b/v1.45/lib/DockerEngine/Core.hs @@ -0,0 +1,588 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.Core +-} + +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE ExistentialQuantification #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TupleSections #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE CPP #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.Core where + +import DockerEngine.MimeTypes +import DockerEngine.Logging + +import qualified Control.Arrow as P (left) +import qualified Control.DeepSeq as NF +import qualified Control.Exception.Safe as E +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Base64.Lazy as BL64 +import qualified Data.ByteString.Builder as BB +import qualified Data.ByteString.Char8 as BC +import qualified Data.ByteString.Lazy as BL +import qualified Data.ByteString.Lazy.Char8 as BCL +import qualified Data.CaseInsensitive as CI +import qualified Data.Data as P (Data, Typeable, TypeRep, typeRep) +import qualified Data.Foldable as P +import qualified Data.Ix as P +import qualified Data.Kind as K (Type) +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Data.Time.ISO8601 as TI +import qualified GHC.Base as P (Alternative) +import qualified Lens.Micro as L +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Types as NH +import qualified Prelude as P +import qualified Text.Printf as T +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Control.Applicative ((<|>)) +import Control.Applicative (Alternative) +import Control.Monad.Fail (MonadFail) +import Data.Function ((&)) +import Data.Foldable(foldlM) +import Data.Monoid ((<>)) +import Data.Text (Text) +import Prelude (($), (.), (&&), (<$>), (<*>), Maybe(..), Bool(..), Char, String, fmap, mempty, pure, return, show, IO, Monad, Functor, maybe) + +-- * DockerEngineConfig + +-- | +data DockerEngineConfig = DockerEngineConfig + { configHost :: BCL.ByteString -- ^ host supplied in the Request + , configUserAgent :: Text -- ^ user-agent supplied in the Request + , configLogExecWithContext :: LogExecWithContext -- ^ Run a block using a Logger instance + , configLogContext :: LogContext -- ^ Configures the logger + , configAuthMethods :: [AnyAuthMethod] -- ^ List of configured auth methods + , configValidateAuthMethods :: Bool -- ^ throw exceptions if auth methods are not configured + , configQueryExtraUnreserved :: B.ByteString -- ^ Configures additional querystring characters which must not be URI encoded, e.g. '+' or ':' + } + +-- | display the config +instance P.Show DockerEngineConfig where + show c = + T.printf + "{ configHost = %v, configUserAgent = %v, ..}" + (show (configHost c)) + (show (configUserAgent c)) + +-- | constructs a default DockerEngineConfig +-- +-- configHost: +-- +-- @http://localhost/v1.45@ +-- +-- configUserAgent: +-- +-- @"docker-engine/0.1.0.0"@ +-- +newConfig :: IO DockerEngineConfig +newConfig = do + logCxt <- initLogContext + return $ DockerEngineConfig + { configHost = "http://localhost/v1.45" + , configUserAgent = "docker-engine/0.1.0.0" + , configLogExecWithContext = runDefaultLogExecWithContext + , configLogContext = logCxt + , configAuthMethods = [] + , configValidateAuthMethods = True + , configQueryExtraUnreserved = "" + } + +-- | updates config use AuthMethod on matching requests +addAuthMethod :: AuthMethod auth => DockerEngineConfig -> auth -> DockerEngineConfig +addAuthMethod config@DockerEngineConfig {configAuthMethods = as} a = + config { configAuthMethods = AnyAuthMethod a : as} + +-- | updates the config to use stdout logging +withStdoutLogging :: DockerEngineConfig -> IO DockerEngineConfig +withStdoutLogging p = do + logCxt <- stdoutLoggingContext (configLogContext p) + return $ p { configLogExecWithContext = stdoutLoggingExec, configLogContext = logCxt } + +-- | updates the config to use stderr logging +withStderrLogging :: DockerEngineConfig -> IO DockerEngineConfig +withStderrLogging p = do + logCxt <- stderrLoggingContext (configLogContext p) + return $ p { configLogExecWithContext = stderrLoggingExec, configLogContext = logCxt } + +-- | updates the config to disable logging +withNoLogging :: DockerEngineConfig -> DockerEngineConfig +withNoLogging p = p { configLogExecWithContext = runNullLogExec} + +-- * DockerEngineRequest + +-- | Represents a request. +-- +-- Type Variables: +-- +-- * req - request operation +-- * contentType - 'MimeType' associated with request body +-- * res - response model +-- * accept - 'MimeType' associated with response body +data DockerEngineRequest req contentType res accept = DockerEngineRequest + { rMethod :: NH.Method -- ^ Method of DockerEngineRequest + , rUrlPath :: [BCL.ByteString] -- ^ Endpoint of DockerEngineRequest + , rParams :: Params -- ^ params of DockerEngineRequest + , rAuthTypes :: [P.TypeRep] -- ^ types of auth methods + } + deriving (P.Show) + +-- | 'rMethod' Lens +rMethodL :: Lens_' (DockerEngineRequest req contentType res accept) NH.Method +rMethodL f DockerEngineRequest{..} = (\rMethod -> DockerEngineRequest { rMethod, ..} ) <$> f rMethod +{-# INLINE rMethodL #-} + +-- | 'rUrlPath' Lens +rUrlPathL :: Lens_' (DockerEngineRequest req contentType res accept) [BCL.ByteString] +rUrlPathL f DockerEngineRequest{..} = (\rUrlPath -> DockerEngineRequest { rUrlPath, ..} ) <$> f rUrlPath +{-# INLINE rUrlPathL #-} + +-- | 'rParams' Lens +rParamsL :: Lens_' (DockerEngineRequest req contentType res accept) Params +rParamsL f DockerEngineRequest{..} = (\rParams -> DockerEngineRequest { rParams, ..} ) <$> f rParams +{-# INLINE rParamsL #-} + +-- | 'rParams' Lens +rAuthTypesL :: Lens_' (DockerEngineRequest req contentType res accept) [P.TypeRep] +rAuthTypesL f DockerEngineRequest{..} = (\rAuthTypes -> DockerEngineRequest { rAuthTypes, ..} ) <$> f rAuthTypes +{-# INLINE rAuthTypesL #-} + +-- * HasBodyParam + +-- | Designates the body parameter of a request +class HasBodyParam req param where + setBodyParam :: forall contentType res accept. (Consumes req contentType, MimeRender contentType param) => DockerEngineRequest req contentType res accept -> param -> DockerEngineRequest req contentType res accept + setBodyParam req xs = + req `_setBodyLBS` mimeRender (P.Proxy :: P.Proxy contentType) xs & _setContentTypeHeader + +-- * HasOptionalParam + +-- | Designates the optional parameters of a request +class HasOptionalParam req param where + {-# MINIMAL applyOptionalParam | (-&-) #-} + + -- | Apply an optional parameter to a request + applyOptionalParam :: DockerEngineRequest req contentType res accept -> param -> DockerEngineRequest req contentType res accept + applyOptionalParam = (-&-) + {-# INLINE applyOptionalParam #-} + + -- | infix operator \/ alias for 'addOptionalParam' + (-&-) :: DockerEngineRequest req contentType res accept -> param -> DockerEngineRequest req contentType res accept + (-&-) = applyOptionalParam + {-# INLINE (-&-) #-} + +infixl 2 -&- + +-- | Request Params +data Params = Params + { paramsQuery :: NH.Query + , paramsHeaders :: NH.RequestHeaders + , paramsBody :: ParamBody + } + deriving (P.Show) + +-- | 'paramsQuery' Lens +paramsQueryL :: Lens_' Params NH.Query +paramsQueryL f Params{..} = (\paramsQuery -> Params { paramsQuery, ..} ) <$> f paramsQuery +{-# INLINE paramsQueryL #-} + +-- | 'paramsHeaders' Lens +paramsHeadersL :: Lens_' Params NH.RequestHeaders +paramsHeadersL f Params{..} = (\paramsHeaders -> Params { paramsHeaders, ..} ) <$> f paramsHeaders +{-# INLINE paramsHeadersL #-} + +-- | 'paramsBody' Lens +paramsBodyL :: Lens_' Params ParamBody +paramsBodyL f Params{..} = (\paramsBody -> Params { paramsBody, ..} ) <$> f paramsBody +{-# INLINE paramsBodyL #-} + +-- | Request Body +data ParamBody + = ParamBodyNone + | ParamBodyB B.ByteString + | ParamBodyBL BL.ByteString + | ParamBodyFormUrlEncoded WH.Form + | ParamBodyMultipartFormData [NH.Part] + deriving (P.Show) + +-- ** DockerEngineRequest Utils + +_mkRequest :: NH.Method -- ^ Method + -> [BCL.ByteString] -- ^ Endpoint + -> DockerEngineRequest req contentType res accept -- ^ req: Request Type, res: Response Type +_mkRequest m u = DockerEngineRequest m u _mkParams [] + +_mkParams :: Params +_mkParams = Params [] [] ParamBodyNone + +setHeader :: + DockerEngineRequest req contentType res accept + -> [NH.Header] + -> DockerEngineRequest req contentType res accept +setHeader req header = + req `removeHeader` P.fmap P.fst header + & (`addHeader` header) + +addHeader :: + DockerEngineRequest req contentType res accept + -> [NH.Header] + -> DockerEngineRequest req contentType res accept +addHeader req header = L.over (rParamsL . paramsHeadersL) (header P.++) req + +removeHeader :: DockerEngineRequest req contentType res accept -> [NH.HeaderName] -> DockerEngineRequest req contentType res accept +removeHeader req header = + req & + L.over + (rParamsL . paramsHeadersL) + (P.filter (\h -> cifst h `P.notElem` P.fmap CI.mk header)) + where + cifst = CI.mk . P.fst + + +_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => DockerEngineRequest req contentType res accept -> DockerEngineRequest req contentType res accept +_setContentTypeHeader req = + case mimeType (P.Proxy :: P.Proxy contentType) of + Just m -> req `setHeader` [("content-type", BC.pack $ P.show m)] + Nothing -> req `removeHeader` ["content-type"] + +_setAcceptHeader :: forall req contentType res accept. MimeType accept => DockerEngineRequest req contentType res accept -> DockerEngineRequest req contentType res accept +_setAcceptHeader req = + case mimeType (P.Proxy :: P.Proxy accept) of + Just m -> req `setHeader` [("accept", BC.pack $ P.show m)] + Nothing -> req `removeHeader` ["accept"] + +setQuery :: + DockerEngineRequest req contentType res accept + -> [NH.QueryItem] + -> DockerEngineRequest req contentType res accept +setQuery req query = + req & + L.over + (rParamsL . paramsQueryL) + (P.filter (\q -> cifst q `P.notElem` P.fmap cifst query)) & + (`addQuery` query) + where + cifst = CI.mk . P.fst + +addQuery :: + DockerEngineRequest req contentType res accept + -> [NH.QueryItem] + -> DockerEngineRequest req contentType res accept +addQuery req query = req & L.over (rParamsL . paramsQueryL) (query P.++) + +addForm :: DockerEngineRequest req contentType res accept -> WH.Form -> DockerEngineRequest req contentType res accept +addForm req newform = + let form = case paramsBody (rParams req) of + ParamBodyFormUrlEncoded _form -> _form + _ -> mempty + in req & L.set (rParamsL . paramsBodyL) (ParamBodyFormUrlEncoded (newform <> form)) + +_addMultiFormPart :: DockerEngineRequest req contentType res accept -> NH.Part -> DockerEngineRequest req contentType res accept +_addMultiFormPart req newpart = + let parts = case paramsBody (rParams req) of + ParamBodyMultipartFormData _parts -> _parts + _ -> [] + in req & L.set (rParamsL . paramsBodyL) (ParamBodyMultipartFormData (newpart : parts)) + +_setBodyBS :: DockerEngineRequest req contentType res accept -> B.ByteString -> DockerEngineRequest req contentType res accept +_setBodyBS req body = + req & L.set (rParamsL . paramsBodyL) (ParamBodyB body) + +_setBodyLBS :: DockerEngineRequest req contentType res accept -> BL.ByteString -> DockerEngineRequest req contentType res accept +_setBodyLBS req body = + req & L.set (rParamsL . paramsBodyL) (ParamBodyBL body) + +_hasAuthType :: AuthMethod authMethod => DockerEngineRequest req contentType res accept -> P.Proxy authMethod -> DockerEngineRequest req contentType res accept +_hasAuthType req proxy = + req & L.over rAuthTypesL (P.typeRep proxy :) + +-- ** Params Utils + +toPath + :: WH.ToHttpApiData a + => a -> BCL.ByteString +toPath = BB.toLazyByteString . WH.toEncodedUrlPiece + +toHeader :: WH.ToHttpApiData a => (NH.HeaderName, a) -> [NH.Header] +toHeader x = [fmap WH.toHeader x] + +toForm :: WH.ToHttpApiData v => (BC.ByteString, v) -> WH.Form +toForm (k,v) = WH.toForm [(BC.unpack k,v)] + +toQuery :: WH.ToHttpApiData a => (BC.ByteString, Maybe a) -> [NH.QueryItem] +toQuery x = [(fmap . fmap) toQueryParam x] + where toQueryParam = T.encodeUtf8 . WH.toQueryParam + +toJsonQuery :: A.ToJSON a => (BC.ByteString, Maybe a) -> [NH.QueryItem] +toJsonQuery = toQuery . (fmap . fmap) (TL.decodeUtf8 . A.encode) + +toPartialEscapeQuery :: B.ByteString -> NH.Query -> NH.PartialEscapeQuery +toPartialEscapeQuery extraUnreserved query = fmap (\(k, v) -> (k, maybe [] go v)) query + where go :: B.ByteString -> [NH.EscapeItem] + go v = v & B.groupBy (\a b -> a `B.notElem` extraUnreserved && b `B.notElem` extraUnreserved) + & fmap (\xs -> if B.null xs then NH.QN xs + else if B.head xs `B.elem` extraUnreserved + then NH.QN xs -- Not Encoded + else NH.QE xs -- Encoded + ) + +-- *** OpenAPI `CollectionFormat` Utils + +-- | Determines the format of the array if type array is used. +data CollectionFormat + = CommaSeparated -- ^ CSV format for multiple parameters. + | SpaceSeparated -- ^ Also called "SSV" + | TabSeparated -- ^ Also called "TSV" + | PipeSeparated -- ^ `value1|value2|value2` + | MultiParamArray -- ^ Using multiple GET parameters, e.g. `foo=bar&foo=baz`. This is valid only for parameters in "query" ('NH.Query') or "formData" ('WH.Form') + +toHeaderColl :: WH.ToHttpApiData a => CollectionFormat -> (NH.HeaderName, [a]) -> [NH.Header] +toHeaderColl c xs = _toColl c toHeader xs + +toFormColl :: WH.ToHttpApiData v => CollectionFormat -> (BC.ByteString, [v]) -> WH.Form +toFormColl c xs = WH.toForm $ fmap unpack $ _toColl c toHeader $ pack xs + where + pack (k,v) = (CI.mk k, v) + unpack (k,v) = (BC.unpack (CI.original k), BC.unpack v) + +toQueryColl :: WH.ToHttpApiData a => CollectionFormat -> (BC.ByteString, Maybe [a]) -> NH.Query +toQueryColl c xs = _toCollA c toQuery xs + +toJsonQueryColl :: A.ToJSON a => CollectionFormat -> (BC.ByteString, Maybe [a]) -> NH.Query +toJsonQueryColl c xs = _toCollA c toJsonQuery xs + +_toColl :: P.Traversable f => CollectionFormat -> (f a -> [(b, BC.ByteString)]) -> f [a] -> [(b, BC.ByteString)] +_toColl c encode xs = fmap (fmap P.fromJust) (_toCollA' c fencode BC.singleton (fmap Just xs)) + where fencode = fmap (fmap Just) . encode . fmap P.fromJust + {-# INLINE fencode #-} + +_toCollA :: (P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t BC.ByteString)]) -> f (t [a]) -> [(b, t BC.ByteString)] +_toCollA c encode xs = _toCollA' c encode BC.singleton xs + +_toCollA' :: (P.Monoid c, P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) -> (Char -> c) -> f (t [a]) -> [(b, t c)] +_toCollA' c encode one xs = case c of + CommaSeparated -> go (one ',') + SpaceSeparated -> go (one ' ') + TabSeparated -> go (one '\t') + PipeSeparated -> go (one '|') + MultiParamArray -> expandList + where + go sep = + [P.foldl1 (\(sk, sv) (_, v) -> (sk, (combine sep <$> sv <*> v) <|> sv <|> v)) expandList] + combine sep x y = x <> sep <> y + expandList = (P.concatMap encode . (P.traverse . P.traverse) P.toList) xs + {-# INLINE go #-} + {-# INLINE expandList #-} + {-# INLINE combine #-} + +-- * AuthMethods + +-- | Provides a method to apply auth methods to requests +class P.Typeable a => + AuthMethod a where + applyAuthMethod + :: DockerEngineConfig + -> a + -> DockerEngineRequest req contentType res accept + -> IO (DockerEngineRequest req contentType res accept) + +-- | An existential wrapper for any AuthMethod +data AnyAuthMethod = forall a. AuthMethod a => AnyAuthMethod a deriving (P.Typeable) + +instance AuthMethod AnyAuthMethod where applyAuthMethod config (AnyAuthMethod a) req = applyAuthMethod config a req + +-- | indicates exceptions related to AuthMethods +data AuthMethodException = AuthMethodException String deriving (P.Show, P.Typeable) + +instance E.Exception AuthMethodException + +-- | apply all matching AuthMethods in config to request +_applyAuthMethods + :: DockerEngineRequest req contentType res accept + -> DockerEngineConfig + -> IO (DockerEngineRequest req contentType res accept) +_applyAuthMethods req config@(DockerEngineConfig {configAuthMethods = as}) = + foldlM go req as + where + go r (AnyAuthMethod a) = applyAuthMethod config a r + +-- * Utils + +-- | Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON) +#if MIN_VERSION_aeson(2,0,0) +_omitNulls :: [(A.Key, A.Value)] -> A.Value +#else +_omitNulls :: [(Text, A.Value)] -> A.Value +#endif +_omitNulls = A.object . P.filter notNull + where + notNull (_, A.Null) = False + notNull _ = True + +-- | Encodes fields using WH.toQueryParam +_toFormItem :: (WH.ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text]) +_toFormItem name x = (name,) . (:[]) . WH.toQueryParam <$> x + +-- | Collapse (Just "") to Nothing +_emptyToNothing :: Maybe String -> Maybe String +_emptyToNothing (Just "") = Nothing +_emptyToNothing x = x +{-# INLINE _emptyToNothing #-} + +-- | Collapse (Just mempty) to Nothing +_memptyToNothing :: (P.Monoid a, P.Eq a) => Maybe a -> Maybe a +_memptyToNothing (Just x) | x P.== P.mempty = Nothing +_memptyToNothing x = x +{-# INLINE _memptyToNothing #-} + +-- * DateTime Formatting + +newtype DateTime = DateTime { unDateTime :: TI.UTCTime } + deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData) +instance A.FromJSON DateTime where + parseJSON = A.withText "DateTime" (_readDateTime . T.unpack) +instance A.ToJSON DateTime where + toJSON (DateTime t) = A.toJSON (_showDateTime t) +instance WH.FromHttpApiData DateTime where + parseUrlPiece = P.maybe (P.Left "parseUrlPiece @DateTime") P.Right . _readDateTime . T.unpack +instance WH.ToHttpApiData DateTime where + toUrlPiece (DateTime t) = T.pack (_showDateTime t) +instance P.Show DateTime where + show (DateTime t) = _showDateTime t +instance MimeRender MimeMultipartFormData DateTime where + mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | @_parseISO8601@ +_readDateTime :: (MonadFail m, Alternative m) => String -> m DateTime +_readDateTime s = + DateTime <$> _parseISO8601 s +{-# INLINE _readDateTime #-} + +-- | @TI.formatISO8601Millis@ +_showDateTime :: (t ~ TI.UTCTime, TI.FormatTime t) => t -> String +_showDateTime = + TI.formatISO8601Millis +{-# INLINE _showDateTime #-} + +-- | parse an ISO8601 date-time string +_parseISO8601 :: (TI.ParseTime t, MonadFail m, Alternative m) => String -> m t +_parseISO8601 t = + P.asum $ + P.flip (TI.parseTimeM True TI.defaultTimeLocale) t <$> + ["%FT%T%QZ", "%FT%T%Q%z", "%FT%T%Q%Z"] +{-# INLINE _parseISO8601 #-} + +-- * Date Formatting + +newtype Date = Date { unDate :: TI.Day } + deriving (P.Enum,P.Eq,P.Data,P.Ord,P.Ix,NF.NFData) +instance A.FromJSON Date where + parseJSON = A.withText "Date" (_readDate . T.unpack) +instance A.ToJSON Date where + toJSON (Date t) = A.toJSON (_showDate t) +instance WH.FromHttpApiData Date where + parseUrlPiece = P.maybe (P.Left "parseUrlPiece @Date") P.Right . _readDate . T.unpack +instance WH.ToHttpApiData Date where + toUrlPiece (Date t) = T.pack (_showDate t) +instance P.Show Date where + show (Date t) = _showDate t +instance MimeRender MimeMultipartFormData Date where + mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | @TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d"@ +_readDate :: MonadFail m => String -> m Date +_readDate s = Date <$> TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d" s +{-# INLINE _readDate #-} + +-- | @TI.formatTime TI.defaultTimeLocale "%Y-%m-%d"@ +_showDate :: TI.FormatTime t => t -> String +_showDate = + TI.formatTime TI.defaultTimeLocale "%Y-%m-%d" +{-# INLINE _showDate #-} + +-- * Byte/Binary Formatting + + +-- | base64 encoded characters +newtype ByteArray = ByteArray { unByteArray :: BL.ByteString } + deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData) + +instance A.FromJSON ByteArray where + parseJSON = A.withText "ByteArray" _readByteArray +instance A.ToJSON ByteArray where + toJSON = A.toJSON . _showByteArray +instance WH.FromHttpApiData ByteArray where + parseUrlPiece = P.maybe (P.Left "parseUrlPiece @ByteArray") P.Right . _readByteArray +instance WH.ToHttpApiData ByteArray where + toUrlPiece = _showByteArray +instance P.Show ByteArray where + show = T.unpack . _showByteArray +instance MimeRender MimeMultipartFormData ByteArray where + mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | read base64 encoded characters +_readByteArray :: MonadFail m => Text -> m ByteArray +_readByteArray = P.either P.fail (pure . ByteArray) . BL64.decode . BL.fromStrict . T.encodeUtf8 +{-# INLINE _readByteArray #-} + +-- | show base64 encoded characters +_showByteArray :: ByteArray -> Text +_showByteArray = T.decodeUtf8 . BL.toStrict . BL64.encode . unByteArray +{-# INLINE _showByteArray #-} + +-- | any sequence of octets +newtype Binary = Binary { unBinary :: BL.ByteString } + deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData) + +instance A.FromJSON Binary where + parseJSON = A.withText "Binary" _readBinaryBase64 +instance A.ToJSON Binary where + toJSON = A.toJSON . _showBinaryBase64 +instance WH.FromHttpApiData Binary where + parseUrlPiece = P.maybe (P.Left "parseUrlPiece @Binary") P.Right . _readBinaryBase64 +instance WH.ToHttpApiData Binary where + toUrlPiece = _showBinaryBase64 +instance P.Show Binary where + show = T.unpack . _showBinaryBase64 +instance MimeRender MimeMultipartFormData Binary where + mimeRender _ = unBinary + +_readBinaryBase64 :: MonadFail m => Text -> m Binary +_readBinaryBase64 = P.either P.fail (pure . Binary) . BL64.decode . BL.fromStrict . T.encodeUtf8 +{-# INLINE _readBinaryBase64 #-} + +_showBinaryBase64 :: Binary -> Text +_showBinaryBase64 = T.decodeUtf8 . BL.toStrict . BL64.encode . unBinary +{-# INLINE _showBinaryBase64 #-} + +-- * Lens Type Aliases + +type Lens_' s a = Lens_ s s a a +type Lens_ s t a b = forall (f :: K.Type -> K.Type). Functor f => (a -> f b) -> s -> f t diff --git a/v1.45/lib/DockerEngine/Logging.hs b/v1.45/lib/DockerEngine/Logging.hs new file mode 100644 index 0000000..ba9dba9 --- /dev/null +++ b/v1.45/lib/DockerEngine/Logging.hs @@ -0,0 +1,33 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.Logging +Logging functions +-} +{-# LANGUAGE CPP #-} + +#ifdef USE_KATIP + +module DockerEngine.Logging + ( module DockerEngine.LoggingKatip + ) where + +import DockerEngine.LoggingKatip + +#else + +module DockerEngine.Logging + ( module DockerEngine.LoggingMonadLogger + ) where + +import DockerEngine.LoggingMonadLogger + +#endif diff --git a/v1.45/lib/DockerEngine/LoggingKatip.hs b/v1.45/lib/DockerEngine/LoggingKatip.hs new file mode 100644 index 0000000..2034eec --- /dev/null +++ b/v1.45/lib/DockerEngine/LoggingKatip.hs @@ -0,0 +1,117 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.LoggingKatip +Katip Logging functions +-} + +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE ScopedTypeVariables #-} + +module DockerEngine.LoggingKatip where + +import qualified Control.Exception.Safe as E +import qualified Control.Monad.IO.Class as P +import qualified Control.Monad.Trans.Reader as P +import qualified Data.Text as T +import qualified Lens.Micro as L +import qualified System.IO as IO + +import Data.Text (Text) +import GHC.Exts (IsString(..)) + +import qualified Katip as LG + +-- * Type Aliases (for compatibility) + +-- | Runs a Katip logging block with the Log environment +type LogExecWithContext = forall m a. P.MonadIO m => + LogContext -> LogExec m a + +-- | A Katip logging block +type LogExec m a = LG.KatipT m a -> m a + +-- | A Katip Log environment +type LogContext = LG.LogEnv + +-- | A Katip Log severity +type LogLevel = LG.Severity + +-- * default logger + +-- | the default log environment +initLogContext :: IO LogContext +initLogContext = LG.initLogEnv "DockerEngine" "dev" + +-- | Runs a Katip logging block with the Log environment +runDefaultLogExecWithContext :: LogExecWithContext +runDefaultLogExecWithContext = LG.runKatipT + +-- * stdout logger + +-- | Runs a Katip logging block with the Log environment +stdoutLoggingExec :: LogExecWithContext +stdoutLoggingExec = runDefaultLogExecWithContext + +-- | A Katip Log environment which targets stdout +stdoutLoggingContext :: LogContext -> IO LogContext +stdoutLoggingContext cxt = do + handleScribe <- LG.mkHandleScribe LG.ColorIfTerminal IO.stdout (LG.permitItem LG.InfoS) LG.V2 + LG.registerScribe "stdout" handleScribe LG.defaultScribeSettings cxt + +-- * stderr logger + +-- | Runs a Katip logging block with the Log environment +stderrLoggingExec :: LogExecWithContext +stderrLoggingExec = runDefaultLogExecWithContext + +-- | A Katip Log environment which targets stderr +stderrLoggingContext :: LogContext -> IO LogContext +stderrLoggingContext cxt = do + handleScribe <- LG.mkHandleScribe LG.ColorIfTerminal IO.stderr (LG.permitItem LG.InfoS) LG.V2 + LG.registerScribe "stderr" handleScribe LG.defaultScribeSettings cxt + +-- * Null logger + +-- | Disables Katip logging +runNullLogExec :: LogExecWithContext +runNullLogExec le (LG.KatipT f) = P.runReaderT f (L.set LG.logEnvScribes mempty le) + +-- * Log Msg + +-- | Log a katip message +_log :: (Applicative m, LG.Katip m) => Text -> LogLevel -> Text -> m () +_log src level msg = do + LG.logMsg (fromString $ T.unpack src) level (LG.logStr msg) + +-- * Log Exceptions + +-- | re-throws exceptions after logging them +logExceptions + :: (LG.Katip m, E.MonadCatch m, Applicative m) + => Text -> m a -> m a +logExceptions src = + E.handle + (\(e :: E.SomeException) -> do + _log src LG.ErrorS ((T.pack . show) e) + E.throw e) + +-- * Log Level + +levelInfo :: LogLevel +levelInfo = LG.InfoS + +levelError :: LogLevel +levelError = LG.ErrorS + +levelDebug :: LogLevel +levelDebug = LG.DebugS diff --git a/v1.45/lib/DockerEngine/LoggingMonadLogger.hs b/v1.45/lib/DockerEngine/LoggingMonadLogger.hs new file mode 100644 index 0000000..00b57cc --- /dev/null +++ b/v1.45/lib/DockerEngine/LoggingMonadLogger.hs @@ -0,0 +1,126 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.LoggingMonadLogger +monad-logger Logging functions +-} + +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE ScopedTypeVariables #-} + +module DockerEngine.LoggingMonadLogger where + +import qualified Control.Exception.Safe as E +import qualified Control.Monad.IO.Class as P +import qualified Data.Text as T +import qualified Data.Time as TI + +import Data.Text (Text) + +import qualified Control.Monad.Logger as LG + +-- * Type Aliases (for compatibility) + +-- | Runs a monad-logger block with the filter predicate +type LogExecWithContext = forall m a. P.MonadIO m => + LogContext -> LogExec m a + +-- | A monad-logger block +type LogExec m a = LG.LoggingT m a -> m a + +-- | A monad-logger filter predicate +type LogContext = LG.LogSource -> LG.LogLevel -> Bool + +-- | A monad-logger log level +type LogLevel = LG.LogLevel + +-- * default logger + +-- | the default log environment +initLogContext :: IO LogContext +initLogContext = pure infoLevelFilter + +-- | Runs a monad-logger block with the filter predicate +runDefaultLogExecWithContext :: LogExecWithContext +runDefaultLogExecWithContext = runNullLogExec + +-- * stdout logger + +-- | Runs a monad-logger block targeting stdout, with the filter predicate +stdoutLoggingExec :: LogExecWithContext +stdoutLoggingExec cxt = LG.runStdoutLoggingT . LG.filterLogger cxt + +-- | @pure@ +stdoutLoggingContext :: LogContext -> IO LogContext +stdoutLoggingContext = pure + +-- * stderr logger + +-- | Runs a monad-logger block targeting stderr, with the filter predicate +stderrLoggingExec :: LogExecWithContext +stderrLoggingExec cxt = LG.runStderrLoggingT . LG.filterLogger cxt + +-- | @pure@ +stderrLoggingContext :: LogContext -> IO LogContext +stderrLoggingContext = pure + +-- * Null logger + +-- | Disables monad-logger logging +runNullLogExec :: LogExecWithContext +runNullLogExec = const (`LG.runLoggingT` nullLogger) + +-- | monad-logger which does nothing +nullLogger :: LG.Loc -> LG.LogSource -> LG.LogLevel -> LG.LogStr -> IO () +nullLogger _ _ _ _ = return () + +-- * Log Msg + +-- | Log a message using the current time +_log :: (P.MonadIO m, LG.MonadLogger m) => Text -> LG.LogLevel -> Text -> m () +_log src level msg = do + now <- P.liftIO (formatTimeLog <$> TI.getCurrentTime) + LG.logOtherNS ("DockerEngine." <> src) level ("[" <> now <> "] " <> msg) + where + formatTimeLog = + T.pack . TI.formatTime TI.defaultTimeLocale "%Y-%m-%dT%H:%M:%S%Z" + +-- * Log Exceptions + +-- | re-throws exceptions after logging them +logExceptions + :: (LG.MonadLogger m, E.MonadCatch m, P.MonadIO m) + => Text -> m a -> m a +logExceptions src = + E.handle + (\(e :: E.SomeException) -> do + _log src LG.LevelError ((T.pack . show) e) + E.throw e) + +-- * Log Level + +levelInfo :: LogLevel +levelInfo = LG.LevelInfo + +levelError :: LogLevel +levelError = LG.LevelError + +levelDebug :: LogLevel +levelDebug = LG.LevelDebug + +-- * Level Filter + +minLevelFilter :: LG.LogLevel -> LG.LogSource -> LG.LogLevel -> Bool +minLevelFilter l _ l' = l' >= l + +infoLevelFilter :: LG.LogSource -> LG.LogLevel -> Bool +infoLevelFilter = minLevelFilter LG.LevelInfo diff --git a/v1.45/lib/DockerEngine/MimeTypes.hs b/v1.45/lib/DockerEngine/MimeTypes.hs new file mode 100644 index 0000000..707b4e0 --- /dev/null +++ b/v1.45/lib/DockerEngine/MimeTypes.hs @@ -0,0 +1,235 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.MimeTypes +-} + +{-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE ExistentialQuantification #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.MimeTypes where + +import qualified Control.Arrow as P (left) +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Builder as BB +import qualified Data.ByteString.Char8 as BC +import qualified Data.ByteString.Lazy as BL +import qualified Data.ByteString.Lazy.Char8 as BCL +import qualified Data.Data as P (Typeable) +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Network.HTTP.Media as ME +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Prelude (($), (.),(<$>),(<*>),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty) +import qualified Prelude as P + +-- * ContentType MimeType + +data ContentType a = MimeType a => ContentType { unContentType :: a } + +-- * Accept MimeType + +data Accept a = MimeType a => Accept { unAccept :: a } + +-- * Consumes Class + +class MimeType mtype => Consumes req mtype where + +-- * Produces Class + +class MimeType mtype => Produces req mtype where + +-- * Default Mime Types + +data MimeJSON = MimeJSON deriving (P.Typeable) +data MimeXML = MimeXML deriving (P.Typeable) +data MimePlainText = MimePlainText deriving (P.Typeable) +data MimeFormUrlEncoded = MimeFormUrlEncoded deriving (P.Typeable) +data MimeMultipartFormData = MimeMultipartFormData deriving (P.Typeable) +data MimeOctetStream = MimeOctetStream deriving (P.Typeable) +data MimeNoContent = MimeNoContent deriving (P.Typeable) +data MimeAny = MimeAny deriving (P.Typeable) + +-- | A type for responses without content-body. +data NoContent = NoContent + deriving (P.Show, P.Eq, P.Typeable) + + +-- * MimeType Class + +class P.Typeable mtype => MimeType mtype where + {-# MINIMAL mimeType | mimeTypes #-} + + mimeTypes :: P.Proxy mtype -> [ME.MediaType] + mimeTypes p = + case mimeType p of + Just x -> [x] + Nothing -> [] + + mimeType :: P.Proxy mtype -> Maybe ME.MediaType + mimeType p = + case mimeTypes p of + [] -> Nothing + (x:_) -> Just x + + mimeType' :: mtype -> Maybe ME.MediaType + mimeType' _ = mimeType (P.Proxy :: P.Proxy mtype) + mimeTypes' :: mtype -> [ME.MediaType] + mimeTypes' _ = mimeTypes (P.Proxy :: P.Proxy mtype) + +-- Default MimeType Instances + +-- | @application/json; charset=utf-8@ +instance MimeType MimeJSON where + mimeType _ = Just $ P.fromString "application/json" +-- | @application/xml; charset=utf-8@ +instance MimeType MimeXML where + mimeType _ = Just $ P.fromString "application/xml" +-- | @application/x-www-form-urlencoded@ +instance MimeType MimeFormUrlEncoded where + mimeType _ = Just $ P.fromString "application/x-www-form-urlencoded" +-- | @multipart/form-data@ +instance MimeType MimeMultipartFormData where + mimeType _ = Just $ P.fromString "multipart/form-data" +-- | @text/plain; charset=utf-8@ +instance MimeType MimePlainText where + mimeType _ = Just $ P.fromString "text/plain" +-- | @application/octet-stream@ +instance MimeType MimeOctetStream where + mimeType _ = Just $ P.fromString "application/octet-stream" +-- | @"*/*"@ +instance MimeType MimeAny where + mimeType _ = Just $ P.fromString "*/*" +instance MimeType MimeNoContent where + mimeType _ = Nothing + +-- * MimeRender Class + +class MimeType mtype => MimeRender mtype x where + mimeRender :: P.Proxy mtype -> x -> BL.ByteString + mimeRender' :: mtype -> x -> BL.ByteString + mimeRender' _ x = mimeRender (P.Proxy :: P.Proxy mtype) x + + +mimeRenderDefaultMultipartFormData :: WH.ToHttpApiData a => a -> BL.ByteString +mimeRenderDefaultMultipartFormData = BL.fromStrict . T.encodeUtf8 . WH.toQueryParam + +-- Default MimeRender Instances + +-- | `A.encode` +instance A.ToJSON a => MimeRender MimeJSON a where mimeRender _ = A.encode +-- | @WH.urlEncodeAsForm@ +instance WH.ToForm a => MimeRender MimeFormUrlEncoded a where mimeRender _ = WH.urlEncodeAsForm + +-- | @P.id@ +instance MimeRender MimePlainText BL.ByteString where mimeRender _ = P.id +-- | @BL.fromStrict . T.encodeUtf8@ +instance MimeRender MimePlainText T.Text where mimeRender _ = BL.fromStrict . T.encodeUtf8 +-- | @BCL.pack@ +instance MimeRender MimePlainText String where mimeRender _ = BCL.pack + +-- | @P.id@ +instance MimeRender MimeOctetStream BL.ByteString where mimeRender _ = P.id +-- | @BL.fromStrict . T.encodeUtf8@ +instance MimeRender MimeOctetStream T.Text where mimeRender _ = BL.fromStrict . T.encodeUtf8 +-- | @BCL.pack@ +instance MimeRender MimeOctetStream String where mimeRender _ = BCL.pack + +instance MimeRender MimeMultipartFormData BL.ByteString where mimeRender _ = P.id + +instance MimeRender MimeMultipartFormData Bool where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Char where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Double where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Float where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Int where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Integer where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData String where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData T.Text where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | @P.Right . P.const NoContent@ +instance MimeRender MimeNoContent NoContent where mimeRender _ = P.const BCL.empty + + +-- * MimeUnrender Class + +class MimeType mtype => MimeUnrender mtype o where + mimeUnrender :: P.Proxy mtype -> BL.ByteString -> P.Either String o + mimeUnrender' :: mtype -> BL.ByteString -> P.Either String o + mimeUnrender' _ x = mimeUnrender (P.Proxy :: P.Proxy mtype) x + +-- Default MimeUnrender Instances + +-- | @A.eitherDecode@ +instance A.FromJSON a => MimeUnrender MimeJSON a where mimeUnrender _ = A.eitherDecode +-- | @P.left T.unpack . WH.urlDecodeAsForm@ +instance WH.FromForm a => MimeUnrender MimeFormUrlEncoded a where mimeUnrender _ = P.left T.unpack . WH.urlDecodeAsForm +-- | @P.Right . P.id@ + +instance MimeUnrender MimePlainText BL.ByteString where mimeUnrender _ = P.Right . P.id +-- | @P.left P.show . TL.decodeUtf8'@ +instance MimeUnrender MimePlainText T.Text where mimeUnrender _ = P.left P.show . T.decodeUtf8' . BL.toStrict +-- | @P.Right . BCL.unpack@ +instance MimeUnrender MimePlainText String where mimeUnrender _ = P.Right . BCL.unpack + +-- | @P.Right . P.id@ +instance MimeUnrender MimeOctetStream BL.ByteString where mimeUnrender _ = P.Right . P.id +-- | @P.left P.show . T.decodeUtf8' . BL.toStrict@ +instance MimeUnrender MimeOctetStream T.Text where mimeUnrender _ = P.left P.show . T.decodeUtf8' . BL.toStrict +-- | @P.Right . BCL.unpack@ +instance MimeUnrender MimeOctetStream String where mimeUnrender _ = P.Right . BCL.unpack + +-- | @P.Right . P.const NoContent@ +instance MimeUnrender MimeNoContent NoContent where mimeUnrender _ = P.Right . P.const NoContent + + +-- * Custom Mime Types + +-- ** MimeVndDockerMultiplexedStream + +data MimeVndDockerMultiplexedStream = MimeVndDockerMultiplexedStream deriving (P.Typeable) + +-- | @application/vnd.docker.multiplexed-stream@ +instance MimeType MimeVndDockerMultiplexedStream where + mimeType _ = Just $ P.fromString "application/vnd.docker.multiplexed-stream" +-- instance MimeRender MimeVndDockerMultiplexedStream T.Text where mimeRender _ = undefined +-- instance MimeUnrender MimeVndDockerMultiplexedStream T.Text where mimeUnrender _ = undefined + +-- ** MimeVndDockerRawStream + +data MimeVndDockerRawStream = MimeVndDockerRawStream deriving (P.Typeable) + +-- | @application/vnd.docker.raw-stream@ +instance MimeType MimeVndDockerRawStream where + mimeType _ = Just $ P.fromString "application/vnd.docker.raw-stream" +-- instance MimeRender MimeVndDockerRawStream T.Text where mimeRender _ = undefined +-- instance MimeUnrender MimeVndDockerRawStream T.Text where mimeUnrender _ = undefined + +-- ** MimeXTar + +data MimeXTar = MimeXTar deriving (P.Typeable) + +-- | @application/x-tar@ +instance MimeType MimeXTar where + mimeType _ = Just $ P.fromString "application/x-tar" +-- instance MimeRender MimeXTar T.Text where mimeRender _ = undefined +-- instance MimeUnrender MimeXTar T.Text where mimeUnrender _ = undefined + diff --git a/v1.45/lib/DockerEngine/Model.hs b/v1.45/lib/DockerEngine/Model.hs new file mode 100644 index 0000000..d477b24 --- /dev/null +++ b/v1.45/lib/DockerEngine/Model.hs @@ -0,0 +1,11540 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.Model +-} + +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveFoldable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DeriveTraversable #-} +{-# LANGUAGE DuplicateRecordFields #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TupleSections #-} +{-# LANGUAGE TypeFamilies #-} +{-# OPTIONS_GHC -fno-warn-unused-matches -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.Model where + +import DockerEngine.Core +import DockerEngine.MimeTypes + +import Data.Aeson ((.:),(.:!),(.:?),(.=)) + +import qualified Control.Arrow as P (left) +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Base64 as B64 +import qualified Data.ByteString.Char8 as BC +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.HashMap.Lazy as HM +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Set as Set +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Time as TI +import qualified Lens.Micro as L +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Control.Applicative ((<|>)) +import Control.Applicative (Alternative) +import Data.Function ((&)) +import Data.Monoid ((<>)) +import Data.Text (Text) +import Prelude (($),(/=),(.),(<$>),(<*>),(>>=),(=<<),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) + +import qualified Prelude as P + + + +-- * Parameter newtypes + + +-- ** All +newtype All = All { unAll :: Bool } deriving (P.Eq, P.Show) + +-- ** Author +newtype Author = Author { unAuthor :: Text } deriving (P.Eq, P.Show) + +-- ** Body +newtype Body = Body { unBody :: [PluginPrivilege] } deriving (P.Eq, P.Show, A.ToJSON) + +-- ** BodyText +newtype BodyText = BodyText { unBodyText :: [Text] } deriving (P.Eq, P.Show, A.ToJSON) + +-- ** Buildargs +newtype Buildargs = Buildargs { unBuildargs :: Text } deriving (P.Eq, P.Show) + +-- ** Cachefrom +newtype Cachefrom = Cachefrom { unCachefrom :: Text } deriving (P.Eq, P.Show) + +-- ** Changes +newtype Changes = Changes { unChanges :: [Text] } deriving (P.Eq, P.Show) + +-- ** ChangesText +newtype ChangesText = ChangesText { unChangesText :: Text } deriving (P.Eq, P.Show) + +-- ** Comment +newtype Comment = Comment { unComment :: Text } deriving (P.Eq, P.Show) + +-- ** Condition +newtype Condition = Condition { unCondition :: E'Condition2 } deriving (P.Eq, P.Show) + +-- ** Container +newtype Container = Container { unContainer :: Text } deriving (P.Eq, P.Show) + +-- ** CopyUidgid +newtype CopyUidgid = CopyUidgid { unCopyUidgid :: Text } deriving (P.Eq, P.Show) + +-- ** Cpuperiod +newtype Cpuperiod = Cpuperiod { unCpuperiod :: Int } deriving (P.Eq, P.Show) + +-- ** Cpuquota +newtype Cpuquota = Cpuquota { unCpuquota :: Int } deriving (P.Eq, P.Show) + +-- ** Cpusetcpus +newtype Cpusetcpus = Cpusetcpus { unCpusetcpus :: Text } deriving (P.Eq, P.Show) + +-- ** Cpushares +newtype Cpushares = Cpushares { unCpushares :: Int } deriving (P.Eq, P.Show) + +-- ** DetachKeys +newtype DetachKeys = DetachKeys { unDetachKeys :: Text } deriving (P.Eq, P.Show) + +-- ** Details +newtype Details = Details { unDetails :: Bool } deriving (P.Eq, P.Show) + +-- ** Digests +newtype Digests = Digests { unDigests :: Bool } deriving (P.Eq, P.Show) + +-- ** Dockerfile +newtype Dockerfile = Dockerfile { unDockerfile :: Text } deriving (P.Eq, P.Show) + +-- ** Extrahosts +newtype Extrahosts = Extrahosts { unExtrahosts :: Text } deriving (P.Eq, P.Show) + +-- ** Filters +newtype Filters = Filters { unFilters :: Text } deriving (P.Eq, P.Show) + +-- ** Follow +newtype Follow = Follow { unFollow :: Bool } deriving (P.Eq, P.Show) + +-- ** Force +newtype Force = Force { unForce :: Bool } deriving (P.Eq, P.Show) + +-- ** Forcerm +newtype Forcerm = Forcerm { unForcerm :: Bool } deriving (P.Eq, P.Show) + +-- ** FromImage +newtype FromImage = FromImage { unFromImage :: Text } deriving (P.Eq, P.Show) + +-- ** FromSrc +newtype FromSrc = FromSrc { unFromSrc :: Text } deriving (P.Eq, P.Show) + +-- ** H +newtype H = H { unH :: Int } deriving (P.Eq, P.Show) + +-- ** Id +newtype Id = Id { unId :: Text } deriving (P.Eq, P.Show) + +-- ** ImagesTarball +newtype ImagesTarball = ImagesTarball { unImagesTarball :: FilePath } deriving (P.Eq, P.Show, A.ToJSON) + +-- ** InputImage +newtype InputImage = InputImage { unInputImage :: Text } deriving (P.Eq, P.Show, A.ToJSON) + +-- ** InputStream +newtype InputStream = InputStream { unInputStream :: FilePath } deriving (P.Eq, P.Show, A.ToJSON) + +-- ** InsertDefaults +newtype InsertDefaults = InsertDefaults { unInsertDefaults :: Bool } deriving (P.Eq, P.Show) + +-- ** KeepStorage +newtype KeepStorage = KeepStorage { unKeepStorage :: Integer } deriving (P.Eq, P.Show) + +-- ** Labels +newtype Labels = Labels { unLabels :: Text } deriving (P.Eq, P.Show) + +-- ** Limit2 +newtype Limit2 = Limit2 { unLimit2 :: Int } deriving (P.Eq, P.Show) + +-- ** Link +newtype Link = Link { unLink :: Bool } deriving (P.Eq, P.Show) + +-- ** Logs +newtype Logs = Logs { unLogs :: Bool } deriving (P.Eq, P.Show) + +-- ** Memory +newtype Memory = Memory { unMemory :: Int } deriving (P.Eq, P.Show) + +-- ** Memswap +newtype Memswap = Memswap { unMemswap :: Int } deriving (P.Eq, P.Show) + +-- ** Message +newtype Message = Message { unMessage :: Text } deriving (P.Eq, P.Show) + +-- ** Name +newtype Name = Name { unName :: Text } deriving (P.Eq, P.Show) + +-- ** Names +newtype Names = Names { unNames :: [Text] } deriving (P.Eq, P.Show) + +-- ** Networkmode +newtype Networkmode = Networkmode { unNetworkmode :: Text } deriving (P.Eq, P.Show) + +-- ** NoOverwriteDirNonDir +newtype NoOverwriteDirNonDir = NoOverwriteDirNonDir { unNoOverwriteDirNonDir :: Text } deriving (P.Eq, P.Show) + +-- ** Nocache +newtype Nocache = Nocache { unNocache :: Bool } deriving (P.Eq, P.Show) + +-- ** Noprune +newtype Noprune = Noprune { unNoprune :: Bool } deriving (P.Eq, P.Show) + +-- ** OneShot +newtype OneShot = OneShot { unOneShot :: Bool } deriving (P.Eq, P.Show) + +-- ** Outputs +newtype Outputs = Outputs { unOutputs :: Text } deriving (P.Eq, P.Show) + +-- ** ParamContentType +newtype ParamContentType = ParamContentType { unParamContentType :: E'ContentType } deriving (P.Eq, P.Show) + +-- ** ParamType +newtype ParamType = ParamType { unParamType :: [E'Type6] } deriving (P.Eq, P.Show) + +-- ** Path +newtype Path = Path { unPath :: Text } deriving (P.Eq, P.Show) + +-- ** Pause +newtype Pause = Pause { unPause :: Bool } deriving (P.Eq, P.Show) + +-- ** Platform2 +newtype Platform2 = Platform2 { unPlatform2 :: Text } deriving (P.Eq, P.Show) + +-- ** PsArgs +newtype PsArgs = PsArgs { unPsArgs :: Text } deriving (P.Eq, P.Show) + +-- ** Pull +newtype Pull = Pull { unPull :: Text } deriving (P.Eq, P.Show) + +-- ** Q +newtype Q = Q { unQ :: Bool } deriving (P.Eq, P.Show) + +-- ** Quiet +newtype Quiet = Quiet { unQuiet :: Bool } deriving (P.Eq, P.Show) + +-- ** RegistryAuthFrom +newtype RegistryAuthFrom = RegistryAuthFrom { unRegistryAuthFrom :: E'RegistryAuthFrom } deriving (P.Eq, P.Show) + +-- ** Remote +newtype Remote = Remote { unRemote :: Text } deriving (P.Eq, P.Show) + +-- ** Repo +newtype Repo = Repo { unRepo :: Text } deriving (P.Eq, P.Show) + +-- ** Rm +newtype Rm = Rm { unRm :: Bool } deriving (P.Eq, P.Show) + +-- ** Rollback +newtype Rollback = Rollback { unRollback :: Text } deriving (P.Eq, P.Show) + +-- ** RotateManagerToken +newtype RotateManagerToken = RotateManagerToken { unRotateManagerToken :: Bool } deriving (P.Eq, P.Show) + +-- ** RotateManagerUnlockKey +newtype RotateManagerUnlockKey = RotateManagerUnlockKey { unRotateManagerUnlockKey :: Bool } deriving (P.Eq, P.Show) + +-- ** RotateWorkerToken +newtype RotateWorkerToken = RotateWorkerToken { unRotateWorkerToken :: Bool } deriving (P.Eq, P.Show) + +-- ** Scope +newtype Scope = Scope { unScope :: Text } deriving (P.Eq, P.Show) + +-- ** SharedSize +newtype SharedSize = SharedSize { unSharedSize :: Bool } deriving (P.Eq, P.Show) + +-- ** Shmsize +newtype Shmsize = Shmsize { unShmsize :: Int } deriving (P.Eq, P.Show) + +-- ** Signal +newtype Signal = Signal { unSignal :: Text } deriving (P.Eq, P.Show) + +-- ** Since +newtype Since = Since { unSince :: Int } deriving (P.Eq, P.Show) + +-- ** SinceText +newtype SinceText = SinceText { unSinceText :: Text } deriving (P.Eq, P.Show) + +-- ** Size +newtype Size = Size { unSize :: Bool } deriving (P.Eq, P.Show) + +-- ** Squash +newtype Squash = Squash { unSquash :: Bool } deriving (P.Eq, P.Show) + +-- ** Status +newtype Status = Status { unStatus :: Bool } deriving (P.Eq, P.Show) + +-- ** Stderr +newtype Stderr = Stderr { unStderr :: Bool } deriving (P.Eq, P.Show) + +-- ** Stdin +newtype Stdin = Stdin { unStdin :: Bool } deriving (P.Eq, P.Show) + +-- ** Stdout +newtype Stdout = Stdout { unStdout :: Bool } deriving (P.Eq, P.Show) + +-- ** Stream +newtype Stream = Stream { unStream :: Bool } deriving (P.Eq, P.Show) + +-- ** T +newtype T = T { unT :: Int } deriving (P.Eq, P.Show) + +-- ** TText +newtype TText = TText { unTText :: Text } deriving (P.Eq, P.Show) + +-- ** Tag +newtype Tag = Tag { unTag :: Text } deriving (P.Eq, P.Show) + +-- ** Tail +newtype Tail = Tail { unTail :: Text } deriving (P.Eq, P.Show) + +-- ** TarContext +newtype TarContext = TarContext { unTarContext :: FilePath } deriving (P.Eq, P.Show, A.ToJSON) + +-- ** Target +newtype Target = Target { unTarget :: Text } deriving (P.Eq, P.Show) + +-- ** Term +newtype Term = Term { unTerm :: Text } deriving (P.Eq, P.Show) + +-- ** Timeout +newtype Timeout = Timeout { unTimeout :: Int } deriving (P.Eq, P.Show) + +-- ** Timestamps +newtype Timestamps = Timestamps { unTimestamps :: Bool } deriving (P.Eq, P.Show) + +-- ** Until +newtype Until = Until { unUntil :: Int } deriving (P.Eq, P.Show) + +-- ** UntilText +newtype UntilText = UntilText { unUntilText :: Text } deriving (P.Eq, P.Show) + +-- ** V +newtype V = V { unV :: Bool } deriving (P.Eq, P.Show) + +-- ** Verbose +newtype Verbose = Verbose { unVerbose :: Bool } deriving (P.Eq, P.Show) + +-- ** Version +newtype Version = Version { unVersion :: E'CgroupVersion } deriving (P.Eq, P.Show) + +-- ** VersionInt +newtype VersionInt = VersionInt { unVersionInt :: Int } deriving (P.Eq, P.Show) + +-- ** VersionInteger +newtype VersionInteger = VersionInteger { unVersionInteger :: Integer } deriving (P.Eq, P.Show) + +-- ** W +newtype W = W { unW :: Int } deriving (P.Eq, P.Show) + +-- ** XRegistryAuth +newtype XRegistryAuth = XRegistryAuth { unXRegistryAuth :: Text } deriving (P.Eq, P.Show) + +-- ** XRegistryConfig +newtype XRegistryConfig = XRegistryConfig { unXRegistryConfig :: Text } deriving (P.Eq, P.Show) + +-- * Models + + +-- ** Address +-- | Address +-- Address represents an IPv4 or IPv6 IP address. +data Address = Address + { addressAddr :: !(Maybe Text) -- ^ "Addr" - IP address. + , addressPrefixLen :: !(Maybe Int) -- ^ "PrefixLen" - Mask length of the IP address. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Address +instance A.FromJSON Address where + parseJSON = A.withObject "Address" $ \o -> + Address + <$> (o .:? "Addr") + <*> (o .:? "PrefixLen") + +-- | ToJSON Address +instance A.ToJSON Address where + toJSON Address {..} = + _omitNulls + [ "Addr" .= addressAddr + , "PrefixLen" .= addressPrefixLen + ] + + +-- | Construct a value of type 'Address' (by applying it's required fields, if any) +mkAddress + :: Address +mkAddress = + Address + { addressAddr = Nothing + , addressPrefixLen = Nothing + } + +-- ** AuthConfig +-- | AuthConfig +data AuthConfig = AuthConfig + { authConfigUsername :: !(Maybe Text) -- ^ "username" + , authConfigPassword :: !(Maybe Text) -- ^ "password" + , authConfigEmail :: !(Maybe Text) -- ^ "email" + , authConfigServeraddress :: !(Maybe Text) -- ^ "serveraddress" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON AuthConfig +instance A.FromJSON AuthConfig where + parseJSON = A.withObject "AuthConfig" $ \o -> + AuthConfig + <$> (o .:? "username") + <*> (o .:? "password") + <*> (o .:? "email") + <*> (o .:? "serveraddress") + +-- | ToJSON AuthConfig +instance A.ToJSON AuthConfig where + toJSON AuthConfig {..} = + _omitNulls + [ "username" .= authConfigUsername + , "password" .= authConfigPassword + , "email" .= authConfigEmail + , "serveraddress" .= authConfigServeraddress + ] + + +-- | Construct a value of type 'AuthConfig' (by applying it's required fields, if any) +mkAuthConfig + :: AuthConfig +mkAuthConfig = + AuthConfig + { authConfigUsername = Nothing + , authConfigPassword = Nothing + , authConfigEmail = Nothing + , authConfigServeraddress = Nothing + } + +-- ** BuildCache +-- | BuildCache +-- BuildCache contains information about a build cache record. +data BuildCache = BuildCache + { buildCacheId :: !(Maybe Text) -- ^ "ID" - Unique ID of the build cache record. + , buildCacheParent :: !(Maybe Text) -- ^ "Parent" - ID of the parent build cache record. > **Deprecated**: This field is deprecated, and omitted if empty. + , buildCacheParents :: !(Maybe [Text]) -- ^ "Parents" - List of parent build cache record IDs. + , buildCacheType :: !(Maybe E'Type3) -- ^ "Type" - Cache record type. + , buildCacheDescription :: !(Maybe Text) -- ^ "Description" - Description of the build-step that produced the build cache. + , buildCacheInUse :: !(Maybe Bool) -- ^ "InUse" - Indicates if the build cache is in use. + , buildCacheShared :: !(Maybe Bool) -- ^ "Shared" - Indicates if the build cache is shared. + , buildCacheSize :: !(Maybe Int) -- ^ "Size" - Amount of disk space used by the build cache (in bytes). + , buildCacheCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" - Date and time at which the build cache was created in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , buildCacheLastUsedAt :: !(Maybe Text) -- ^ "LastUsedAt" - Date and time at which the build cache was last used in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , buildCacheUsageCount :: !(Maybe Int) -- ^ "UsageCount" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON BuildCache +instance A.FromJSON BuildCache where + parseJSON = A.withObject "BuildCache" $ \o -> + BuildCache + <$> (o .:? "ID") + <*> (o .:? "Parent") + <*> (o .:? "Parents") + <*> (o .:? "Type") + <*> (o .:? "Description") + <*> (o .:? "InUse") + <*> (o .:? "Shared") + <*> (o .:? "Size") + <*> (o .:? "CreatedAt") + <*> (o .:? "LastUsedAt") + <*> (o .:? "UsageCount") + +-- | ToJSON BuildCache +instance A.ToJSON BuildCache where + toJSON BuildCache {..} = + _omitNulls + [ "ID" .= buildCacheId + , "Parent" .= buildCacheParent + , "Parents" .= buildCacheParents + , "Type" .= buildCacheType + , "Description" .= buildCacheDescription + , "InUse" .= buildCacheInUse + , "Shared" .= buildCacheShared + , "Size" .= buildCacheSize + , "CreatedAt" .= buildCacheCreatedAt + , "LastUsedAt" .= buildCacheLastUsedAt + , "UsageCount" .= buildCacheUsageCount + ] + + +-- | Construct a value of type 'BuildCache' (by applying it's required fields, if any) +mkBuildCache + :: BuildCache +mkBuildCache = + BuildCache + { buildCacheId = Nothing + , buildCacheParent = Nothing + , buildCacheParents = Nothing + , buildCacheType = Nothing + , buildCacheDescription = Nothing + , buildCacheInUse = Nothing + , buildCacheShared = Nothing + , buildCacheSize = Nothing + , buildCacheCreatedAt = Nothing + , buildCacheLastUsedAt = Nothing + , buildCacheUsageCount = Nothing + } + +-- ** BuildInfo +-- | BuildInfo +data BuildInfo = BuildInfo + { buildInfoId :: !(Maybe Text) -- ^ "id" + , buildInfoStream :: !(Maybe Text) -- ^ "stream" + , buildInfoError :: !(Maybe Text) -- ^ "error" + , buildInfoErrorDetail :: !(Maybe ErrorDetail) -- ^ "errorDetail" + , buildInfoStatus :: !(Maybe Text) -- ^ "status" + , buildInfoProgress :: !(Maybe Text) -- ^ "progress" + , buildInfoProgressDetail :: !(Maybe ProgressDetail) -- ^ "progressDetail" + , buildInfoAux :: !(Maybe ImageID) -- ^ "aux" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON BuildInfo +instance A.FromJSON BuildInfo where + parseJSON = A.withObject "BuildInfo" $ \o -> + BuildInfo + <$> (o .:? "id") + <*> (o .:? "stream") + <*> (o .:? "error") + <*> (o .:? "errorDetail") + <*> (o .:? "status") + <*> (o .:? "progress") + <*> (o .:? "progressDetail") + <*> (o .:? "aux") + +-- | ToJSON BuildInfo +instance A.ToJSON BuildInfo where + toJSON BuildInfo {..} = + _omitNulls + [ "id" .= buildInfoId + , "stream" .= buildInfoStream + , "error" .= buildInfoError + , "errorDetail" .= buildInfoErrorDetail + , "status" .= buildInfoStatus + , "progress" .= buildInfoProgress + , "progressDetail" .= buildInfoProgressDetail + , "aux" .= buildInfoAux + ] + + +-- | Construct a value of type 'BuildInfo' (by applying it's required fields, if any) +mkBuildInfo + :: BuildInfo +mkBuildInfo = + BuildInfo + { buildInfoId = Nothing + , buildInfoStream = Nothing + , buildInfoError = Nothing + , buildInfoErrorDetail = Nothing + , buildInfoStatus = Nothing + , buildInfoProgress = Nothing + , buildInfoProgressDetail = Nothing + , buildInfoAux = Nothing + } + +-- ** BuildPruneResponse +-- | BuildPruneResponse +-- BuildPruneResponse +-- +data BuildPruneResponse = BuildPruneResponse + { buildPruneResponseCachesDeleted :: !(Maybe [Text]) -- ^ "CachesDeleted" + , buildPruneResponseSpaceReclaimed :: !(Maybe Integer) -- ^ "SpaceReclaimed" - Disk space reclaimed in bytes + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON BuildPruneResponse +instance A.FromJSON BuildPruneResponse where + parseJSON = A.withObject "BuildPruneResponse" $ \o -> + BuildPruneResponse + <$> (o .:? "CachesDeleted") + <*> (o .:? "SpaceReclaimed") + +-- | ToJSON BuildPruneResponse +instance A.ToJSON BuildPruneResponse where + toJSON BuildPruneResponse {..} = + _omitNulls + [ "CachesDeleted" .= buildPruneResponseCachesDeleted + , "SpaceReclaimed" .= buildPruneResponseSpaceReclaimed + ] + + +-- | Construct a value of type 'BuildPruneResponse' (by applying it's required fields, if any) +mkBuildPruneResponse + :: BuildPruneResponse +mkBuildPruneResponse = + BuildPruneResponse + { buildPruneResponseCachesDeleted = Nothing + , buildPruneResponseSpaceReclaimed = Nothing + } + +-- ** ClusterInfo +-- | ClusterInfo +-- ClusterInfo represents information about the swarm as is returned by the \"/info\" endpoint. Join-tokens are not included. +data ClusterInfo = ClusterInfo + { clusterInfoId :: !(Maybe Text) -- ^ "ID" - The ID of the swarm. + , clusterInfoVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , clusterInfoCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" - Date and time at which the swarm was initialised in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , clusterInfoUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" - Date and time at which the swarm was last updated in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , clusterInfoSpec :: !(Maybe SwarmSpec) -- ^ "Spec" + , clusterInfoTlsInfo :: !(Maybe TLSInfo) -- ^ "TLSInfo" + , clusterInfoRootRotationInProgress :: !(Maybe Bool) -- ^ "RootRotationInProgress" - Whether there is currently a root CA rotation in progress for the swarm + , clusterInfoDataPathPort :: !(Maybe Int) -- ^ "DataPathPort" - DataPathPort specifies the data path port number for data traffic. Acceptable port range is 1024 to 49151. If no port is set or is set to 0, the default port (4789) is used. + , clusterInfoDefaultAddrPool :: !(Maybe [Text]) -- ^ "DefaultAddrPool" - Default Address Pool specifies default subnet pools for global scope networks. + , clusterInfoSubnetSize :: !(Maybe Int) -- ^ "SubnetSize" - SubnetSize specifies the subnet size of the networks created from the default subnet pool. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterInfo +instance A.FromJSON ClusterInfo where + parseJSON = A.withObject "ClusterInfo" $ \o -> + ClusterInfo + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + <*> (o .:? "TLSInfo") + <*> (o .:? "RootRotationInProgress") + <*> (o .:? "DataPathPort") + <*> (o .:? "DefaultAddrPool") + <*> (o .:? "SubnetSize") + +-- | ToJSON ClusterInfo +instance A.ToJSON ClusterInfo where + toJSON ClusterInfo {..} = + _omitNulls + [ "ID" .= clusterInfoId + , "Version" .= clusterInfoVersion + , "CreatedAt" .= clusterInfoCreatedAt + , "UpdatedAt" .= clusterInfoUpdatedAt + , "Spec" .= clusterInfoSpec + , "TLSInfo" .= clusterInfoTlsInfo + , "RootRotationInProgress" .= clusterInfoRootRotationInProgress + , "DataPathPort" .= clusterInfoDataPathPort + , "DefaultAddrPool" .= clusterInfoDefaultAddrPool + , "SubnetSize" .= clusterInfoSubnetSize + ] + + +-- | Construct a value of type 'ClusterInfo' (by applying it's required fields, if any) +mkClusterInfo + :: ClusterInfo +mkClusterInfo = + ClusterInfo + { clusterInfoId = Nothing + , clusterInfoVersion = Nothing + , clusterInfoCreatedAt = Nothing + , clusterInfoUpdatedAt = Nothing + , clusterInfoSpec = Nothing + , clusterInfoTlsInfo = Nothing + , clusterInfoRootRotationInProgress = Nothing + , clusterInfoDataPathPort = Nothing + , clusterInfoDefaultAddrPool = Nothing + , clusterInfoSubnetSize = Nothing + } + +-- ** ClusterVolume +-- | ClusterVolume +-- Options and information specific to, and only present on, Swarm CSI cluster volumes. +data ClusterVolume = ClusterVolume + { clusterVolumeId :: !(Maybe Text) -- ^ "ID" - The Swarm ID of this volume. Because cluster volumes are Swarm objects, they have an ID, unlike non-cluster volumes. This ID can be used to refer to the Volume instead of the name. + , clusterVolumeVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , clusterVolumeCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" + , clusterVolumeUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" + , clusterVolumeSpec :: !(Maybe ClusterVolumeSpec) -- ^ "Spec" + , clusterVolumeInfo :: !(Maybe ClusterVolumeInfo) -- ^ "Info" + , clusterVolumePublishStatus :: !(Maybe [ClusterVolumePublishStatusInner]) -- ^ "PublishStatus" - The status of the volume as it pertains to its publishing and use on specific nodes + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolume +instance A.FromJSON ClusterVolume where + parseJSON = A.withObject "ClusterVolume" $ \o -> + ClusterVolume + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + <*> (o .:? "Info") + <*> (o .:? "PublishStatus") + +-- | ToJSON ClusterVolume +instance A.ToJSON ClusterVolume where + toJSON ClusterVolume {..} = + _omitNulls + [ "ID" .= clusterVolumeId + , "Version" .= clusterVolumeVersion + , "CreatedAt" .= clusterVolumeCreatedAt + , "UpdatedAt" .= clusterVolumeUpdatedAt + , "Spec" .= clusterVolumeSpec + , "Info" .= clusterVolumeInfo + , "PublishStatus" .= clusterVolumePublishStatus + ] + + +-- | Construct a value of type 'ClusterVolume' (by applying it's required fields, if any) +mkClusterVolume + :: ClusterVolume +mkClusterVolume = + ClusterVolume + { clusterVolumeId = Nothing + , clusterVolumeVersion = Nothing + , clusterVolumeCreatedAt = Nothing + , clusterVolumeUpdatedAt = Nothing + , clusterVolumeSpec = Nothing + , clusterVolumeInfo = Nothing + , clusterVolumePublishStatus = Nothing + } + +-- ** ClusterVolumeInfo +-- | ClusterVolumeInfo +-- Information about the global status of the volume. +data ClusterVolumeInfo = ClusterVolumeInfo + { clusterVolumeInfoCapacityBytes :: !(Maybe Integer) -- ^ "CapacityBytes" - The capacity of the volume in bytes. A value of 0 indicates that the capacity is unknown. + , clusterVolumeInfoVolumeContext :: !(Maybe (Map.Map String Text)) -- ^ "VolumeContext" - A map of strings to strings returned from the storage plugin when the volume is created. + , clusterVolumeInfoVolumeId :: !(Maybe Text) -- ^ "VolumeID" - The ID of the volume as returned by the CSI storage plugin. This is distinct from the volume's ID as provided by Docker. This ID is never used by the user when communicating with Docker to refer to this volume. If the ID is blank, then the Volume has not been successfully created in the plugin yet. + , clusterVolumeInfoAccessibleTopology :: !(Maybe [Map]) -- ^ "AccessibleTopology" - The topology this volume is actually accessible from. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumeInfo +instance A.FromJSON ClusterVolumeInfo where + parseJSON = A.withObject "ClusterVolumeInfo" $ \o -> + ClusterVolumeInfo + <$> (o .:? "CapacityBytes") + <*> (o .:? "VolumeContext") + <*> (o .:? "VolumeID") + <*> (o .:? "AccessibleTopology") + +-- | ToJSON ClusterVolumeInfo +instance A.ToJSON ClusterVolumeInfo where + toJSON ClusterVolumeInfo {..} = + _omitNulls + [ "CapacityBytes" .= clusterVolumeInfoCapacityBytes + , "VolumeContext" .= clusterVolumeInfoVolumeContext + , "VolumeID" .= clusterVolumeInfoVolumeId + , "AccessibleTopology" .= clusterVolumeInfoAccessibleTopology + ] + + +-- | Construct a value of type 'ClusterVolumeInfo' (by applying it's required fields, if any) +mkClusterVolumeInfo + :: ClusterVolumeInfo +mkClusterVolumeInfo = + ClusterVolumeInfo + { clusterVolumeInfoCapacityBytes = Nothing + , clusterVolumeInfoVolumeContext = Nothing + , clusterVolumeInfoVolumeId = Nothing + , clusterVolumeInfoAccessibleTopology = Nothing + } + +-- ** ClusterVolumePublishStatusInner +-- | ClusterVolumePublishStatusInner +data ClusterVolumePublishStatusInner = ClusterVolumePublishStatusInner + { clusterVolumePublishStatusInnerNodeId :: !(Maybe Text) -- ^ "NodeID" - The ID of the Swarm node the volume is published on. + , clusterVolumePublishStatusInnerState :: !(Maybe E'State2) -- ^ "State" - The published state of the volume. * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. * `published` The volume is published successfully to the node. * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. + , clusterVolumePublishStatusInnerPublishContext :: !(Maybe (Map.Map String Text)) -- ^ "PublishContext" - A map of strings to strings returned by the CSI controller plugin when a volume is published. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumePublishStatusInner +instance A.FromJSON ClusterVolumePublishStatusInner where + parseJSON = A.withObject "ClusterVolumePublishStatusInner" $ \o -> + ClusterVolumePublishStatusInner + <$> (o .:? "NodeID") + <*> (o .:? "State") + <*> (o .:? "PublishContext") + +-- | ToJSON ClusterVolumePublishStatusInner +instance A.ToJSON ClusterVolumePublishStatusInner where + toJSON ClusterVolumePublishStatusInner {..} = + _omitNulls + [ "NodeID" .= clusterVolumePublishStatusInnerNodeId + , "State" .= clusterVolumePublishStatusInnerState + , "PublishContext" .= clusterVolumePublishStatusInnerPublishContext + ] + + +-- | Construct a value of type 'ClusterVolumePublishStatusInner' (by applying it's required fields, if any) +mkClusterVolumePublishStatusInner + :: ClusterVolumePublishStatusInner +mkClusterVolumePublishStatusInner = + ClusterVolumePublishStatusInner + { clusterVolumePublishStatusInnerNodeId = Nothing + , clusterVolumePublishStatusInnerState = Nothing + , clusterVolumePublishStatusInnerPublishContext = Nothing + } + +-- ** ClusterVolumeSpec +-- | ClusterVolumeSpec +-- Cluster-specific options used to create the volume. +data ClusterVolumeSpec = ClusterVolumeSpec + { clusterVolumeSpecGroup :: !(Maybe Text) -- ^ "Group" - Group defines the volume group of this volume. Volumes belonging to the same group can be referred to by group name when creating Services. Referring to a volume by group instructs Swarm to treat volumes in that group interchangeably for the purpose of scheduling. Volumes with an empty string for a group technically all belong to the same, emptystring group. + , clusterVolumeSpecAccessMode :: !(Maybe ClusterVolumeSpecAccessMode) -- ^ "AccessMode" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumeSpec +instance A.FromJSON ClusterVolumeSpec where + parseJSON = A.withObject "ClusterVolumeSpec" $ \o -> + ClusterVolumeSpec + <$> (o .:? "Group") + <*> (o .:? "AccessMode") + +-- | ToJSON ClusterVolumeSpec +instance A.ToJSON ClusterVolumeSpec where + toJSON ClusterVolumeSpec {..} = + _omitNulls + [ "Group" .= clusterVolumeSpecGroup + , "AccessMode" .= clusterVolumeSpecAccessMode + ] + + +-- | Construct a value of type 'ClusterVolumeSpec' (by applying it's required fields, if any) +mkClusterVolumeSpec + :: ClusterVolumeSpec +mkClusterVolumeSpec = + ClusterVolumeSpec + { clusterVolumeSpecGroup = Nothing + , clusterVolumeSpecAccessMode = Nothing + } + +-- ** ClusterVolumeSpecAccessMode +-- | ClusterVolumeSpecAccessMode +-- Defines how the volume is used by tasks. +data ClusterVolumeSpecAccessMode = ClusterVolumeSpecAccessMode + { clusterVolumeSpecAccessModeScope :: !(Maybe E'Scope3) -- ^ "Scope" - The set of nodes this volume can be used on at one time. - `single` The volume may only be scheduled to one node at a time. - `multi` the volume may be scheduled to any supported number of nodes at a time. + , clusterVolumeSpecAccessModeSharing :: !(Maybe E'Sharing) -- ^ "Sharing" - The number and way that different tasks can use this volume at one time. - `none` The volume may only be used by one task at a time. - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. - `all` The volume may have any number of readers and writers. + , clusterVolumeSpecAccessModeMountVolume :: !(Maybe A.Value) -- ^ "MountVolume" - Options for using this volume as a Mount-type volume. Either MountVolume or BlockVolume, but not both, must be present. properties: FsType: type: \"string\" description: | Specifies the filesystem type for the mount volume. Optional. MountFlags: type: \"array\" description: | Flags to pass when mounting the volume. Optional. items: type: \"string\" BlockVolume: type: \"object\" description: | Options for using this volume as a Block-type volume. Intentionally empty. + , clusterVolumeSpecAccessModeSecrets :: !(Maybe [ClusterVolumeSpecAccessModeSecretsInner]) -- ^ "Secrets" - Swarm Secrets that are passed to the CSI storage plugin when operating on this volume. + , clusterVolumeSpecAccessModeAccessibilityRequirements :: !(Maybe ClusterVolumeSpecAccessModeAccessibilityRequirements) -- ^ "AccessibilityRequirements" + , clusterVolumeSpecAccessModeCapacityRange :: !(Maybe ClusterVolumeSpecAccessModeCapacityRange) -- ^ "CapacityRange" + , clusterVolumeSpecAccessModeAvailability :: !(Maybe E'Availability) -- ^ "Availability" - The availability of the volume for use in tasks. - `active` The volume is fully available for scheduling on the cluster - `pause` No new workloads should use the volume, but existing workloads are not stopped. - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumeSpecAccessMode +instance A.FromJSON ClusterVolumeSpecAccessMode where + parseJSON = A.withObject "ClusterVolumeSpecAccessMode" $ \o -> + ClusterVolumeSpecAccessMode + <$> (o .:? "Scope") + <*> (o .:? "Sharing") + <*> (o .:? "MountVolume") + <*> (o .:? "Secrets") + <*> (o .:? "AccessibilityRequirements") + <*> (o .:? "CapacityRange") + <*> (o .:? "Availability") + +-- | ToJSON ClusterVolumeSpecAccessMode +instance A.ToJSON ClusterVolumeSpecAccessMode where + toJSON ClusterVolumeSpecAccessMode {..} = + _omitNulls + [ "Scope" .= clusterVolumeSpecAccessModeScope + , "Sharing" .= clusterVolumeSpecAccessModeSharing + , "MountVolume" .= clusterVolumeSpecAccessModeMountVolume + , "Secrets" .= clusterVolumeSpecAccessModeSecrets + , "AccessibilityRequirements" .= clusterVolumeSpecAccessModeAccessibilityRequirements + , "CapacityRange" .= clusterVolumeSpecAccessModeCapacityRange + , "Availability" .= clusterVolumeSpecAccessModeAvailability + ] + + +-- | Construct a value of type 'ClusterVolumeSpecAccessMode' (by applying it's required fields, if any) +mkClusterVolumeSpecAccessMode + :: ClusterVolumeSpecAccessMode +mkClusterVolumeSpecAccessMode = + ClusterVolumeSpecAccessMode + { clusterVolumeSpecAccessModeScope = Nothing + , clusterVolumeSpecAccessModeSharing = Nothing + , clusterVolumeSpecAccessModeMountVolume = Nothing + , clusterVolumeSpecAccessModeSecrets = Nothing + , clusterVolumeSpecAccessModeAccessibilityRequirements = Nothing + , clusterVolumeSpecAccessModeCapacityRange = Nothing + , clusterVolumeSpecAccessModeAvailability = Nothing + } + +-- ** ClusterVolumeSpecAccessModeAccessibilityRequirements +-- | ClusterVolumeSpecAccessModeAccessibilityRequirements +-- 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. +data ClusterVolumeSpecAccessModeAccessibilityRequirements = ClusterVolumeSpecAccessModeAccessibilityRequirements + { clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite :: !(Maybe [Map]) -- ^ "Requisite" - A list of required topologies, at least one of which the volume must be accessible from. + , clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred :: !(Maybe [Map]) -- ^ "Preferred" - A list of topologies that the volume should attempt to be provisioned in. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumeSpecAccessModeAccessibilityRequirements +instance A.FromJSON ClusterVolumeSpecAccessModeAccessibilityRequirements where + parseJSON = A.withObject "ClusterVolumeSpecAccessModeAccessibilityRequirements" $ \o -> + ClusterVolumeSpecAccessModeAccessibilityRequirements + <$> (o .:? "Requisite") + <*> (o .:? "Preferred") + +-- | ToJSON ClusterVolumeSpecAccessModeAccessibilityRequirements +instance A.ToJSON ClusterVolumeSpecAccessModeAccessibilityRequirements where + toJSON ClusterVolumeSpecAccessModeAccessibilityRequirements {..} = + _omitNulls + [ "Requisite" .= clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite + , "Preferred" .= clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred + ] + + +-- | Construct a value of type 'ClusterVolumeSpecAccessModeAccessibilityRequirements' (by applying it's required fields, if any) +mkClusterVolumeSpecAccessModeAccessibilityRequirements + :: ClusterVolumeSpecAccessModeAccessibilityRequirements +mkClusterVolumeSpecAccessModeAccessibilityRequirements = + ClusterVolumeSpecAccessModeAccessibilityRequirements + { clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite = Nothing + , clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred = Nothing + } + +-- ** ClusterVolumeSpecAccessModeCapacityRange +-- | ClusterVolumeSpecAccessModeCapacityRange +-- The desired capacity that the volume should be created with. If empty, the plugin will decide the capacity. +data ClusterVolumeSpecAccessModeCapacityRange = ClusterVolumeSpecAccessModeCapacityRange + { clusterVolumeSpecAccessModeCapacityRangeRequiredBytes :: !(Maybe Integer) -- ^ "RequiredBytes" - The volume must be at least this big. The value of 0 indicates an unspecified minimum + , clusterVolumeSpecAccessModeCapacityRangeLimitBytes :: !(Maybe Integer) -- ^ "LimitBytes" - The volume must not be bigger than this. The value of 0 indicates an unspecified maximum. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumeSpecAccessModeCapacityRange +instance A.FromJSON ClusterVolumeSpecAccessModeCapacityRange where + parseJSON = A.withObject "ClusterVolumeSpecAccessModeCapacityRange" $ \o -> + ClusterVolumeSpecAccessModeCapacityRange + <$> (o .:? "RequiredBytes") + <*> (o .:? "LimitBytes") + +-- | ToJSON ClusterVolumeSpecAccessModeCapacityRange +instance A.ToJSON ClusterVolumeSpecAccessModeCapacityRange where + toJSON ClusterVolumeSpecAccessModeCapacityRange {..} = + _omitNulls + [ "RequiredBytes" .= clusterVolumeSpecAccessModeCapacityRangeRequiredBytes + , "LimitBytes" .= clusterVolumeSpecAccessModeCapacityRangeLimitBytes + ] + + +-- | Construct a value of type 'ClusterVolumeSpecAccessModeCapacityRange' (by applying it's required fields, if any) +mkClusterVolumeSpecAccessModeCapacityRange + :: ClusterVolumeSpecAccessModeCapacityRange +mkClusterVolumeSpecAccessModeCapacityRange = + ClusterVolumeSpecAccessModeCapacityRange + { clusterVolumeSpecAccessModeCapacityRangeRequiredBytes = Nothing + , clusterVolumeSpecAccessModeCapacityRangeLimitBytes = Nothing + } + +-- ** ClusterVolumeSpecAccessModeSecretsInner +-- | ClusterVolumeSpecAccessModeSecretsInner +-- One cluster volume secret entry. Defines a key-value pair that is passed to the plugin. +data ClusterVolumeSpecAccessModeSecretsInner = ClusterVolumeSpecAccessModeSecretsInner + { clusterVolumeSpecAccessModeSecretsInnerKey :: !(Maybe Text) -- ^ "Key" - Key is the name of the key of the key-value pair passed to the plugin. + , clusterVolumeSpecAccessModeSecretsInnerSecret :: !(Maybe Text) -- ^ "Secret" - Secret is the swarm Secret object from which to read data. This can be a Secret name or ID. The Secret data is retrieved by swarm and used as the value of the key-value pair passed to the plugin. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumeSpecAccessModeSecretsInner +instance A.FromJSON ClusterVolumeSpecAccessModeSecretsInner where + parseJSON = A.withObject "ClusterVolumeSpecAccessModeSecretsInner" $ \o -> + ClusterVolumeSpecAccessModeSecretsInner + <$> (o .:? "Key") + <*> (o .:? "Secret") + +-- | ToJSON ClusterVolumeSpecAccessModeSecretsInner +instance A.ToJSON ClusterVolumeSpecAccessModeSecretsInner where + toJSON ClusterVolumeSpecAccessModeSecretsInner {..} = + _omitNulls + [ "Key" .= clusterVolumeSpecAccessModeSecretsInnerKey + , "Secret" .= clusterVolumeSpecAccessModeSecretsInnerSecret + ] + + +-- | Construct a value of type 'ClusterVolumeSpecAccessModeSecretsInner' (by applying it's required fields, if any) +mkClusterVolumeSpecAccessModeSecretsInner + :: ClusterVolumeSpecAccessModeSecretsInner +mkClusterVolumeSpecAccessModeSecretsInner = + ClusterVolumeSpecAccessModeSecretsInner + { clusterVolumeSpecAccessModeSecretsInnerKey = Nothing + , clusterVolumeSpecAccessModeSecretsInnerSecret = Nothing + } + +-- ** Commit +-- | Commit +-- 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`. +data Commit = Commit + { commitId :: !(Maybe Text) -- ^ "ID" - Actual commit ID of external tool. + , commitExpected :: !(Maybe Text) -- ^ "Expected" - Commit ID of external tool expected by dockerd as set at build time. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Commit +instance A.FromJSON Commit where + parseJSON = A.withObject "Commit" $ \o -> + Commit + <$> (o .:? "ID") + <*> (o .:? "Expected") + +-- | ToJSON Commit +instance A.ToJSON Commit where + toJSON Commit {..} = + _omitNulls + [ "ID" .= commitId + , "Expected" .= commitExpected + ] + + +-- | Construct a value of type 'Commit' (by applying it's required fields, if any) +mkCommit + :: Commit +mkCommit = + Commit + { commitId = Nothing + , commitExpected = Nothing + } + +-- ** Config +-- | Config +data Config = Config + { configId :: !(Maybe Text) -- ^ "ID" + , configVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , configCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" + , configUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" + , configSpec :: !(Maybe ConfigSpec) -- ^ "Spec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Config +instance A.FromJSON Config where + parseJSON = A.withObject "Config" $ \o -> + Config + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + +-- | ToJSON Config +instance A.ToJSON Config where + toJSON Config {..} = + _omitNulls + [ "ID" .= configId + , "Version" .= configVersion + , "CreatedAt" .= configCreatedAt + , "UpdatedAt" .= configUpdatedAt + , "Spec" .= configSpec + ] + + +-- | Construct a value of type 'Config' (by applying it's required fields, if any) +mkConfig + :: Config +mkConfig = + Config + { configId = Nothing + , configVersion = Nothing + , configCreatedAt = Nothing + , configUpdatedAt = Nothing + , configSpec = Nothing + } + +-- ** ConfigCreateRequest +-- | ConfigCreateRequest +data ConfigCreateRequest = ConfigCreateRequest + { configCreateRequestName :: !(Maybe Text) -- ^ "Name" - User-defined name of the config. + , configCreateRequestLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , configCreateRequestData :: !(Maybe Text) -- ^ "Data" - Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) config data. + , configCreateRequestTemplating :: !(Maybe Driver) -- ^ "Templating" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ConfigCreateRequest +instance A.FromJSON ConfigCreateRequest where + parseJSON = A.withObject "ConfigCreateRequest" $ \o -> + ConfigCreateRequest + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Data") + <*> (o .:? "Templating") + +-- | ToJSON ConfigCreateRequest +instance A.ToJSON ConfigCreateRequest where + toJSON ConfigCreateRequest {..} = + _omitNulls + [ "Name" .= configCreateRequestName + , "Labels" .= configCreateRequestLabels + , "Data" .= configCreateRequestData + , "Templating" .= configCreateRequestTemplating + ] + + +-- | Construct a value of type 'ConfigCreateRequest' (by applying it's required fields, if any) +mkConfigCreateRequest + :: ConfigCreateRequest +mkConfigCreateRequest = + ConfigCreateRequest + { configCreateRequestName = Nothing + , configCreateRequestLabels = Nothing + , configCreateRequestData = Nothing + , configCreateRequestTemplating = Nothing + } + +-- ** ConfigReference +-- | ConfigReference +-- The config-only network source to provide the configuration for this network. +data ConfigReference = ConfigReference + { configReferenceNetwork :: !(Maybe Text) -- ^ "Network" - The name of the config-only network that provides the network's configuration. The specified network must be an existing config-only network. Only network names are allowed, not network IDs. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ConfigReference +instance A.FromJSON ConfigReference where + parseJSON = A.withObject "ConfigReference" $ \o -> + ConfigReference + <$> (o .:? "Network") + +-- | ToJSON ConfigReference +instance A.ToJSON ConfigReference where + toJSON ConfigReference {..} = + _omitNulls + [ "Network" .= configReferenceNetwork + ] + + +-- | Construct a value of type 'ConfigReference' (by applying it's required fields, if any) +mkConfigReference + :: ConfigReference +mkConfigReference = + ConfigReference + { configReferenceNetwork = Nothing + } + +-- ** ConfigSpec +-- | ConfigSpec +data ConfigSpec = ConfigSpec + { configSpecName :: !(Maybe Text) -- ^ "Name" - User-defined name of the config. + , configSpecLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , configSpecData :: !(Maybe Text) -- ^ "Data" - Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) config data. + , configSpecTemplating :: !(Maybe Driver) -- ^ "Templating" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ConfigSpec +instance A.FromJSON ConfigSpec where + parseJSON = A.withObject "ConfigSpec" $ \o -> + ConfigSpec + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Data") + <*> (o .:? "Templating") + +-- | ToJSON ConfigSpec +instance A.ToJSON ConfigSpec where + toJSON ConfigSpec {..} = + _omitNulls + [ "Name" .= configSpecName + , "Labels" .= configSpecLabels + , "Data" .= configSpecData + , "Templating" .= configSpecTemplating + ] + + +-- | Construct a value of type 'ConfigSpec' (by applying it's required fields, if any) +mkConfigSpec + :: ConfigSpec +mkConfigSpec = + ConfigSpec + { configSpecName = Nothing + , configSpecLabels = Nothing + , configSpecData = Nothing + , configSpecTemplating = Nothing + } + +-- ** ContainerConfig +-- | ContainerConfig +-- Configuration for a container that is portable between hosts. +data ContainerConfig = ContainerConfig + { containerConfigHostname :: !(Maybe Text) -- ^ "Hostname" - The hostname to use for the container, as a valid RFC 1123 hostname. + , containerConfigDomainname :: !(Maybe Text) -- ^ "Domainname" - The domain name to use for the container. + , containerConfigUser :: !(Maybe Text) -- ^ "User" - The user that commands are run as inside the container. + , containerConfigAttachStdin :: !(Maybe Bool) -- ^ "AttachStdin" - Whether to attach to `stdin`. + , containerConfigAttachStdout :: !(Maybe Bool) -- ^ "AttachStdout" - Whether to attach to `stdout`. + , containerConfigAttachStderr :: !(Maybe Bool) -- ^ "AttachStderr" - Whether to attach to `stderr`. + , containerConfigExposedPorts :: !(Maybe (Map.Map String A.Value)) -- ^ "ExposedPorts" - An object mapping ports to an empty object in the form: `{\"<port>/<tcp|udp|sctp>\": {}}` + , containerConfigTty :: !(Maybe Bool) -- ^ "Tty" - Attach standard streams to a TTY, including `stdin` if it is not closed. + , containerConfigOpenStdin :: !(Maybe Bool) -- ^ "OpenStdin" - Open `stdin` + , containerConfigStdinOnce :: !(Maybe Bool) -- ^ "StdinOnce" - Close `stdin` after one attached client disconnects + , containerConfigEnv :: !(Maybe [Text]) -- ^ "Env" - A list of environment variables to set inside the container in the form `[\"VAR=value\", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value. + , containerConfigCmd :: !(Maybe [Text]) -- ^ "Cmd" - Command to run specified as a string or an array of strings. + , containerConfigHealthcheck :: !(Maybe HealthConfig) -- ^ "Healthcheck" + , containerConfigArgsEscaped :: !(Maybe Bool) -- ^ "ArgsEscaped" - Command is already escaped (Windows only) + , containerConfigImage :: !(Maybe Text) -- ^ "Image" - The name (or reference) of the image to use when creating the container, or which was used when the container was created. + , containerConfigVolumes :: !(Maybe (Map.Map String A.Value)) -- ^ "Volumes" - An object mapping mount point paths inside the container to empty objects. + , containerConfigWorkingDir :: !(Maybe Text) -- ^ "WorkingDir" - The working directory for commands to run in. + , containerConfigEntrypoint :: !(Maybe [Text]) -- ^ "Entrypoint" - The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + , containerConfigNetworkDisabled :: !(Maybe Bool) -- ^ "NetworkDisabled" - Disable networking for the container. + , containerConfigMacAddress :: !(Maybe Text) -- ^ "MacAddress" - MAC address of the container. Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. + , containerConfigOnBuild :: !(Maybe [Text]) -- ^ "OnBuild" - `ONBUILD` metadata that were defined in the image's `Dockerfile`. + , containerConfigLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , containerConfigStopSignal :: !(Maybe Text) -- ^ "StopSignal" - Signal to stop a container as a string or unsigned integer. + , containerConfigStopTimeout :: !(Maybe Int) -- ^ "StopTimeout" - Timeout to stop a container in seconds. + , containerConfigShell :: !(Maybe [Text]) -- ^ "Shell" - Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerConfig +instance A.FromJSON ContainerConfig where + parseJSON = A.withObject "ContainerConfig" $ \o -> + ContainerConfig + <$> (o .:? "Hostname") + <*> (o .:? "Domainname") + <*> (o .:? "User") + <*> (o .:? "AttachStdin") + <*> (o .:? "AttachStdout") + <*> (o .:? "AttachStderr") + <*> (o .:? "ExposedPorts") + <*> (o .:? "Tty") + <*> (o .:? "OpenStdin") + <*> (o .:? "StdinOnce") + <*> (o .:? "Env") + <*> (o .:? "Cmd") + <*> (o .:? "Healthcheck") + <*> (o .:? "ArgsEscaped") + <*> (o .:? "Image") + <*> (o .:? "Volumes") + <*> (o .:? "WorkingDir") + <*> (o .:? "Entrypoint") + <*> (o .:? "NetworkDisabled") + <*> (o .:? "MacAddress") + <*> (o .:? "OnBuild") + <*> (o .:? "Labels") + <*> (o .:? "StopSignal") + <*> (o .:? "StopTimeout") + <*> (o .:? "Shell") + +-- | ToJSON ContainerConfig +instance A.ToJSON ContainerConfig where + toJSON ContainerConfig {..} = + _omitNulls + [ "Hostname" .= containerConfigHostname + , "Domainname" .= containerConfigDomainname + , "User" .= containerConfigUser + , "AttachStdin" .= containerConfigAttachStdin + , "AttachStdout" .= containerConfigAttachStdout + , "AttachStderr" .= containerConfigAttachStderr + , "ExposedPorts" .= containerConfigExposedPorts + , "Tty" .= containerConfigTty + , "OpenStdin" .= containerConfigOpenStdin + , "StdinOnce" .= containerConfigStdinOnce + , "Env" .= containerConfigEnv + , "Cmd" .= containerConfigCmd + , "Healthcheck" .= containerConfigHealthcheck + , "ArgsEscaped" .= containerConfigArgsEscaped + , "Image" .= containerConfigImage + , "Volumes" .= containerConfigVolumes + , "WorkingDir" .= containerConfigWorkingDir + , "Entrypoint" .= containerConfigEntrypoint + , "NetworkDisabled" .= containerConfigNetworkDisabled + , "MacAddress" .= containerConfigMacAddress + , "OnBuild" .= containerConfigOnBuild + , "Labels" .= containerConfigLabels + , "StopSignal" .= containerConfigStopSignal + , "StopTimeout" .= containerConfigStopTimeout + , "Shell" .= containerConfigShell + ] + + +-- | Construct a value of type 'ContainerConfig' (by applying it's required fields, if any) +mkContainerConfig + :: ContainerConfig +mkContainerConfig = + ContainerConfig + { containerConfigHostname = Nothing + , containerConfigDomainname = Nothing + , containerConfigUser = Nothing + , containerConfigAttachStdin = Nothing + , containerConfigAttachStdout = Nothing + , containerConfigAttachStderr = Nothing + , containerConfigExposedPorts = Nothing + , containerConfigTty = Nothing + , containerConfigOpenStdin = Nothing + , containerConfigStdinOnce = Nothing + , containerConfigEnv = Nothing + , containerConfigCmd = Nothing + , containerConfigHealthcheck = Nothing + , containerConfigArgsEscaped = Nothing + , containerConfigImage = Nothing + , containerConfigVolumes = Nothing + , containerConfigWorkingDir = Nothing + , containerConfigEntrypoint = Nothing + , containerConfigNetworkDisabled = Nothing + , containerConfigMacAddress = Nothing + , containerConfigOnBuild = Nothing + , containerConfigLabels = Nothing + , containerConfigStopSignal = Nothing + , containerConfigStopTimeout = Nothing + , containerConfigShell = Nothing + } + +-- ** ContainerCreateRequest +-- | ContainerCreateRequest +data ContainerCreateRequest = ContainerCreateRequest + { containerCreateRequestHostname :: !(Maybe Text) -- ^ "Hostname" - The hostname to use for the container, as a valid RFC 1123 hostname. + , containerCreateRequestDomainname :: !(Maybe Text) -- ^ "Domainname" - The domain name to use for the container. + , containerCreateRequestUser :: !(Maybe Text) -- ^ "User" - The user that commands are run as inside the container. + , containerCreateRequestAttachStdin :: !(Maybe Bool) -- ^ "AttachStdin" - Whether to attach to `stdin`. + , containerCreateRequestAttachStdout :: !(Maybe Bool) -- ^ "AttachStdout" - Whether to attach to `stdout`. + , containerCreateRequestAttachStderr :: !(Maybe Bool) -- ^ "AttachStderr" - Whether to attach to `stderr`. + , containerCreateRequestExposedPorts :: !(Maybe (Map.Map String A.Value)) -- ^ "ExposedPorts" - An object mapping ports to an empty object in the form: `{\"<port>/<tcp|udp|sctp>\": {}}` + , containerCreateRequestTty :: !(Maybe Bool) -- ^ "Tty" - Attach standard streams to a TTY, including `stdin` if it is not closed. + , containerCreateRequestOpenStdin :: !(Maybe Bool) -- ^ "OpenStdin" - Open `stdin` + , containerCreateRequestStdinOnce :: !(Maybe Bool) -- ^ "StdinOnce" - Close `stdin` after one attached client disconnects + , containerCreateRequestEnv :: !(Maybe [Text]) -- ^ "Env" - A list of environment variables to set inside the container in the form `[\"VAR=value\", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value. + , containerCreateRequestCmd :: !(Maybe [Text]) -- ^ "Cmd" - Command to run specified as a string or an array of strings. + , containerCreateRequestHealthcheck :: !(Maybe HealthConfig) -- ^ "Healthcheck" + , containerCreateRequestArgsEscaped :: !(Maybe Bool) -- ^ "ArgsEscaped" - Command is already escaped (Windows only) + , containerCreateRequestImage :: !(Maybe Text) -- ^ "Image" - The name (or reference) of the image to use when creating the container, or which was used when the container was created. + , containerCreateRequestVolumes :: !(Maybe (Map.Map String A.Value)) -- ^ "Volumes" - An object mapping mount point paths inside the container to empty objects. + , containerCreateRequestWorkingDir :: !(Maybe Text) -- ^ "WorkingDir" - The working directory for commands to run in. + , containerCreateRequestEntrypoint :: !(Maybe [Text]) -- ^ "Entrypoint" - The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + , containerCreateRequestNetworkDisabled :: !(Maybe Bool) -- ^ "NetworkDisabled" - Disable networking for the container. + , containerCreateRequestMacAddress :: !(Maybe Text) -- ^ "MacAddress" - MAC address of the container. Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. + , containerCreateRequestOnBuild :: !(Maybe [Text]) -- ^ "OnBuild" - `ONBUILD` metadata that were defined in the image's `Dockerfile`. + , containerCreateRequestLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , containerCreateRequestStopSignal :: !(Maybe Text) -- ^ "StopSignal" - Signal to stop a container as a string or unsigned integer. + , containerCreateRequestStopTimeout :: !(Maybe Int) -- ^ "StopTimeout" - Timeout to stop a container in seconds. + , containerCreateRequestShell :: !(Maybe [Text]) -- ^ "Shell" - Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + , containerCreateRequestHostConfig :: !(Maybe HostConfig) -- ^ "HostConfig" + , containerCreateRequestNetworkingConfig :: !(Maybe NetworkingConfig) -- ^ "NetworkingConfig" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerCreateRequest +instance A.FromJSON ContainerCreateRequest where + parseJSON = A.withObject "ContainerCreateRequest" $ \o -> + ContainerCreateRequest + <$> (o .:? "Hostname") + <*> (o .:? "Domainname") + <*> (o .:? "User") + <*> (o .:? "AttachStdin") + <*> (o .:? "AttachStdout") + <*> (o .:? "AttachStderr") + <*> (o .:? "ExposedPorts") + <*> (o .:? "Tty") + <*> (o .:? "OpenStdin") + <*> (o .:? "StdinOnce") + <*> (o .:? "Env") + <*> (o .:? "Cmd") + <*> (o .:? "Healthcheck") + <*> (o .:? "ArgsEscaped") + <*> (o .:? "Image") + <*> (o .:? "Volumes") + <*> (o .:? "WorkingDir") + <*> (o .:? "Entrypoint") + <*> (o .:? "NetworkDisabled") + <*> (o .:? "MacAddress") + <*> (o .:? "OnBuild") + <*> (o .:? "Labels") + <*> (o .:? "StopSignal") + <*> (o .:? "StopTimeout") + <*> (o .:? "Shell") + <*> (o .:? "HostConfig") + <*> (o .:? "NetworkingConfig") + +-- | ToJSON ContainerCreateRequest +instance A.ToJSON ContainerCreateRequest where + toJSON ContainerCreateRequest {..} = + _omitNulls + [ "Hostname" .= containerCreateRequestHostname + , "Domainname" .= containerCreateRequestDomainname + , "User" .= containerCreateRequestUser + , "AttachStdin" .= containerCreateRequestAttachStdin + , "AttachStdout" .= containerCreateRequestAttachStdout + , "AttachStderr" .= containerCreateRequestAttachStderr + , "ExposedPorts" .= containerCreateRequestExposedPorts + , "Tty" .= containerCreateRequestTty + , "OpenStdin" .= containerCreateRequestOpenStdin + , "StdinOnce" .= containerCreateRequestStdinOnce + , "Env" .= containerCreateRequestEnv + , "Cmd" .= containerCreateRequestCmd + , "Healthcheck" .= containerCreateRequestHealthcheck + , "ArgsEscaped" .= containerCreateRequestArgsEscaped + , "Image" .= containerCreateRequestImage + , "Volumes" .= containerCreateRequestVolumes + , "WorkingDir" .= containerCreateRequestWorkingDir + , "Entrypoint" .= containerCreateRequestEntrypoint + , "NetworkDisabled" .= containerCreateRequestNetworkDisabled + , "MacAddress" .= containerCreateRequestMacAddress + , "OnBuild" .= containerCreateRequestOnBuild + , "Labels" .= containerCreateRequestLabels + , "StopSignal" .= containerCreateRequestStopSignal + , "StopTimeout" .= containerCreateRequestStopTimeout + , "Shell" .= containerCreateRequestShell + , "HostConfig" .= containerCreateRequestHostConfig + , "NetworkingConfig" .= containerCreateRequestNetworkingConfig + ] + + +-- | Construct a value of type 'ContainerCreateRequest' (by applying it's required fields, if any) +mkContainerCreateRequest + :: ContainerCreateRequest +mkContainerCreateRequest = + ContainerCreateRequest + { containerCreateRequestHostname = Nothing + , containerCreateRequestDomainname = Nothing + , containerCreateRequestUser = Nothing + , containerCreateRequestAttachStdin = Nothing + , containerCreateRequestAttachStdout = Nothing + , containerCreateRequestAttachStderr = Nothing + , containerCreateRequestExposedPorts = Nothing + , containerCreateRequestTty = Nothing + , containerCreateRequestOpenStdin = Nothing + , containerCreateRequestStdinOnce = Nothing + , containerCreateRequestEnv = Nothing + , containerCreateRequestCmd = Nothing + , containerCreateRequestHealthcheck = Nothing + , containerCreateRequestArgsEscaped = Nothing + , containerCreateRequestImage = Nothing + , containerCreateRequestVolumes = Nothing + , containerCreateRequestWorkingDir = Nothing + , containerCreateRequestEntrypoint = Nothing + , containerCreateRequestNetworkDisabled = Nothing + , containerCreateRequestMacAddress = Nothing + , containerCreateRequestOnBuild = Nothing + , containerCreateRequestLabels = Nothing + , containerCreateRequestStopSignal = Nothing + , containerCreateRequestStopTimeout = Nothing + , containerCreateRequestShell = Nothing + , containerCreateRequestHostConfig = Nothing + , containerCreateRequestNetworkingConfig = Nothing + } + +-- ** ContainerCreateResponse +-- | ContainerCreateResponse +-- ContainerCreateResponse +-- +-- OK response to ContainerCreate operation +data ContainerCreateResponse = ContainerCreateResponse + { containerCreateResponseId :: !(Text) -- ^ /Required/ "Id" - The ID of the created container + , containerCreateResponseWarnings :: !([Text]) -- ^ /Required/ "Warnings" - Warnings encountered when creating the container + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerCreateResponse +instance A.FromJSON ContainerCreateResponse where + parseJSON = A.withObject "ContainerCreateResponse" $ \o -> + ContainerCreateResponse + <$> (o .: "Id") + <*> (o .: "Warnings") + +-- | ToJSON ContainerCreateResponse +instance A.ToJSON ContainerCreateResponse where + toJSON ContainerCreateResponse {..} = + _omitNulls + [ "Id" .= containerCreateResponseId + , "Warnings" .= containerCreateResponseWarnings + ] + + +-- | Construct a value of type 'ContainerCreateResponse' (by applying it's required fields, if any) +mkContainerCreateResponse + :: Text -- ^ 'containerCreateResponseId': The ID of the created container + -> [Text] -- ^ 'containerCreateResponseWarnings': Warnings encountered when creating the container + -> ContainerCreateResponse +mkContainerCreateResponse containerCreateResponseId containerCreateResponseWarnings = + ContainerCreateResponse + { containerCreateResponseId + , containerCreateResponseWarnings + } + +-- ** ContainerInspectResponse +-- | ContainerInspectResponse +-- ContainerInspectResponse +-- +data ContainerInspectResponse = ContainerInspectResponse + { containerInspectResponseId :: !(Maybe Text) -- ^ "Id" - The ID of the container + , containerInspectResponseCreated :: !(Maybe Text) -- ^ "Created" - The time the container was created + , containerInspectResponsePath :: !(Maybe Text) -- ^ "Path" - The path to the command being run + , containerInspectResponseArgs :: !(Maybe [Text]) -- ^ "Args" - The arguments to the command being run + , containerInspectResponseState :: !(Maybe ContainerState) -- ^ "State" + , containerInspectResponseImage :: !(Maybe Text) -- ^ "Image" - The container's image ID + , containerInspectResponseResolvConfPath :: !(Maybe Text) -- ^ "ResolvConfPath" + , containerInspectResponseHostnamePath :: !(Maybe Text) -- ^ "HostnamePath" + , containerInspectResponseHostsPath :: !(Maybe Text) -- ^ "HostsPath" + , containerInspectResponseLogPath :: !(Maybe Text) -- ^ "LogPath" + , containerInspectResponseName :: !(Maybe Text) -- ^ "Name" + , containerInspectResponseRestartCount :: !(Maybe Int) -- ^ "RestartCount" + , containerInspectResponseDriver :: !(Maybe Text) -- ^ "Driver" + , containerInspectResponsePlatform :: !(Maybe Text) -- ^ "Platform" + , containerInspectResponseMountLabel :: !(Maybe Text) -- ^ "MountLabel" + , containerInspectResponseProcessLabel :: !(Maybe Text) -- ^ "ProcessLabel" + , containerInspectResponseAppArmorProfile :: !(Maybe Text) -- ^ "AppArmorProfile" + , containerInspectResponseExecIds :: !(Maybe [Text]) -- ^ "ExecIDs" - IDs of exec instances that are running in the container. + , containerInspectResponseHostConfig :: !(Maybe HostConfig) -- ^ "HostConfig" + , containerInspectResponseGraphDriver :: !(Maybe GraphDriverData) -- ^ "GraphDriver" + , containerInspectResponseSizeRw :: !(Maybe Integer) -- ^ "SizeRw" - The size of files that have been created or changed by this container. + , containerInspectResponseSizeRootFs :: !(Maybe Integer) -- ^ "SizeRootFs" - The total size of all the files in this container. + , containerInspectResponseMounts :: !(Maybe [MountPoint]) -- ^ "Mounts" + , containerInspectResponseConfig :: !(Maybe ContainerConfig) -- ^ "Config" + , containerInspectResponseNetworkSettings :: !(Maybe NetworkSettings) -- ^ "NetworkSettings" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerInspectResponse +instance A.FromJSON ContainerInspectResponse where + parseJSON = A.withObject "ContainerInspectResponse" $ \o -> + ContainerInspectResponse + <$> (o .:? "Id") + <*> (o .:? "Created") + <*> (o .:? "Path") + <*> (o .:? "Args") + <*> (o .:? "State") + <*> (o .:? "Image") + <*> (o .:? "ResolvConfPath") + <*> (o .:? "HostnamePath") + <*> (o .:? "HostsPath") + <*> (o .:? "LogPath") + <*> (o .:? "Name") + <*> (o .:? "RestartCount") + <*> (o .:? "Driver") + <*> (o .:? "Platform") + <*> (o .:? "MountLabel") + <*> (o .:? "ProcessLabel") + <*> (o .:? "AppArmorProfile") + <*> (o .:? "ExecIDs") + <*> (o .:? "HostConfig") + <*> (o .:? "GraphDriver") + <*> (o .:? "SizeRw") + <*> (o .:? "SizeRootFs") + <*> (o .:? "Mounts") + <*> (o .:? "Config") + <*> (o .:? "NetworkSettings") + +-- | ToJSON ContainerInspectResponse +instance A.ToJSON ContainerInspectResponse where + toJSON ContainerInspectResponse {..} = + _omitNulls + [ "Id" .= containerInspectResponseId + , "Created" .= containerInspectResponseCreated + , "Path" .= containerInspectResponsePath + , "Args" .= containerInspectResponseArgs + , "State" .= containerInspectResponseState + , "Image" .= containerInspectResponseImage + , "ResolvConfPath" .= containerInspectResponseResolvConfPath + , "HostnamePath" .= containerInspectResponseHostnamePath + , "HostsPath" .= containerInspectResponseHostsPath + , "LogPath" .= containerInspectResponseLogPath + , "Name" .= containerInspectResponseName + , "RestartCount" .= containerInspectResponseRestartCount + , "Driver" .= containerInspectResponseDriver + , "Platform" .= containerInspectResponsePlatform + , "MountLabel" .= containerInspectResponseMountLabel + , "ProcessLabel" .= containerInspectResponseProcessLabel + , "AppArmorProfile" .= containerInspectResponseAppArmorProfile + , "ExecIDs" .= containerInspectResponseExecIds + , "HostConfig" .= containerInspectResponseHostConfig + , "GraphDriver" .= containerInspectResponseGraphDriver + , "SizeRw" .= containerInspectResponseSizeRw + , "SizeRootFs" .= containerInspectResponseSizeRootFs + , "Mounts" .= containerInspectResponseMounts + , "Config" .= containerInspectResponseConfig + , "NetworkSettings" .= containerInspectResponseNetworkSettings + ] + + +-- | Construct a value of type 'ContainerInspectResponse' (by applying it's required fields, if any) +mkContainerInspectResponse + :: ContainerInspectResponse +mkContainerInspectResponse = + ContainerInspectResponse + { containerInspectResponseId = Nothing + , containerInspectResponseCreated = Nothing + , containerInspectResponsePath = Nothing + , containerInspectResponseArgs = Nothing + , containerInspectResponseState = Nothing + , containerInspectResponseImage = Nothing + , containerInspectResponseResolvConfPath = Nothing + , containerInspectResponseHostnamePath = Nothing + , containerInspectResponseHostsPath = Nothing + , containerInspectResponseLogPath = Nothing + , containerInspectResponseName = Nothing + , containerInspectResponseRestartCount = Nothing + , containerInspectResponseDriver = Nothing + , containerInspectResponsePlatform = Nothing + , containerInspectResponseMountLabel = Nothing + , containerInspectResponseProcessLabel = Nothing + , containerInspectResponseAppArmorProfile = Nothing + , containerInspectResponseExecIds = Nothing + , containerInspectResponseHostConfig = Nothing + , containerInspectResponseGraphDriver = Nothing + , containerInspectResponseSizeRw = Nothing + , containerInspectResponseSizeRootFs = Nothing + , containerInspectResponseMounts = Nothing + , containerInspectResponseConfig = Nothing + , containerInspectResponseNetworkSettings = Nothing + } + +-- ** ContainerPruneResponse +-- | ContainerPruneResponse +-- ContainerPruneResponse +-- +data ContainerPruneResponse = ContainerPruneResponse + { containerPruneResponseContainersDeleted :: !(Maybe [Text]) -- ^ "ContainersDeleted" - Container IDs that were deleted + , containerPruneResponseSpaceReclaimed :: !(Maybe Integer) -- ^ "SpaceReclaimed" - Disk space reclaimed in bytes + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerPruneResponse +instance A.FromJSON ContainerPruneResponse where + parseJSON = A.withObject "ContainerPruneResponse" $ \o -> + ContainerPruneResponse + <$> (o .:? "ContainersDeleted") + <*> (o .:? "SpaceReclaimed") + +-- | ToJSON ContainerPruneResponse +instance A.ToJSON ContainerPruneResponse where + toJSON ContainerPruneResponse {..} = + _omitNulls + [ "ContainersDeleted" .= containerPruneResponseContainersDeleted + , "SpaceReclaimed" .= containerPruneResponseSpaceReclaimed + ] + + +-- | Construct a value of type 'ContainerPruneResponse' (by applying it's required fields, if any) +mkContainerPruneResponse + :: ContainerPruneResponse +mkContainerPruneResponse = + ContainerPruneResponse + { containerPruneResponseContainersDeleted = Nothing + , containerPruneResponseSpaceReclaimed = Nothing + } + +-- ** ContainerState +-- | ContainerState +-- ContainerState stores container's running state. It's part of ContainerJSONBase and will be returned by the \"inspect\" command. +data ContainerState = ContainerState + { containerStateStatus :: !(Maybe E'Status2) -- ^ "Status" - String representation of the container state. Can be one of \"created\", \"running\", \"paused\", \"restarting\", \"removing\", \"exited\", or \"dead\". + , containerStateRunning :: !(Maybe Bool) -- ^ "Running" - Whether this container is running. Note that a running container can be _paused_. The `Running` and `Paused` booleans are not mutually exclusive: When pausing a container (on Linux), the freezer cgroup is used to suspend all processes in the container. Freezing the process requires the process to be running. As a result, paused containers are both `Running` _and_ `Paused`. Use the `Status` field instead to determine if a container's state is \"running\". + , containerStatePaused :: !(Maybe Bool) -- ^ "Paused" - Whether this container is paused. + , containerStateRestarting :: !(Maybe Bool) -- ^ "Restarting" - Whether this container is restarting. + , containerStateOomKilled :: !(Maybe Bool) -- ^ "OOMKilled" - Whether a process within this container has been killed because it ran out of memory since the container was last started. + , containerStateDead :: !(Maybe Bool) -- ^ "Dead" + , containerStatePid :: !(Maybe Int) -- ^ "Pid" - The process ID of this container + , containerStateExitCode :: !(Maybe Int) -- ^ "ExitCode" - The last exit code of this container + , containerStateError :: !(Maybe Text) -- ^ "Error" + , containerStateStartedAt :: !(Maybe Text) -- ^ "StartedAt" - The time when this container was last started. + , containerStateFinishedAt :: !(Maybe Text) -- ^ "FinishedAt" - The time when this container last exited. + , containerStateHealth :: !(Maybe Health) -- ^ "Health" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerState +instance A.FromJSON ContainerState where + parseJSON = A.withObject "ContainerState" $ \o -> + ContainerState + <$> (o .:? "Status") + <*> (o .:? "Running") + <*> (o .:? "Paused") + <*> (o .:? "Restarting") + <*> (o .:? "OOMKilled") + <*> (o .:? "Dead") + <*> (o .:? "Pid") + <*> (o .:? "ExitCode") + <*> (o .:? "Error") + <*> (o .:? "StartedAt") + <*> (o .:? "FinishedAt") + <*> (o .:? "Health") + +-- | ToJSON ContainerState +instance A.ToJSON ContainerState where + toJSON ContainerState {..} = + _omitNulls + [ "Status" .= containerStateStatus + , "Running" .= containerStateRunning + , "Paused" .= containerStatePaused + , "Restarting" .= containerStateRestarting + , "OOMKilled" .= containerStateOomKilled + , "Dead" .= containerStateDead + , "Pid" .= containerStatePid + , "ExitCode" .= containerStateExitCode + , "Error" .= containerStateError + , "StartedAt" .= containerStateStartedAt + , "FinishedAt" .= containerStateFinishedAt + , "Health" .= containerStateHealth + ] + + +-- | Construct a value of type 'ContainerState' (by applying it's required fields, if any) +mkContainerState + :: ContainerState +mkContainerState = + ContainerState + { containerStateStatus = Nothing + , containerStateRunning = Nothing + , containerStatePaused = Nothing + , containerStateRestarting = Nothing + , containerStateOomKilled = Nothing + , containerStateDead = Nothing + , containerStatePid = Nothing + , containerStateExitCode = Nothing + , containerStateError = Nothing + , containerStateStartedAt = Nothing + , containerStateFinishedAt = Nothing + , containerStateHealth = Nothing + } + +-- ** ContainerStatus +-- | ContainerStatus +-- represents the status of a container. +data ContainerStatus = ContainerStatus + { containerStatusContainerId :: !(Maybe Text) -- ^ "ContainerID" + , containerStatusPid :: !(Maybe Int) -- ^ "PID" + , containerStatusExitCode :: !(Maybe Int) -- ^ "ExitCode" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerStatus +instance A.FromJSON ContainerStatus where + parseJSON = A.withObject "ContainerStatus" $ \o -> + ContainerStatus + <$> (o .:? "ContainerID") + <*> (o .:? "PID") + <*> (o .:? "ExitCode") + +-- | ToJSON ContainerStatus +instance A.ToJSON ContainerStatus where + toJSON ContainerStatus {..} = + _omitNulls + [ "ContainerID" .= containerStatusContainerId + , "PID" .= containerStatusPid + , "ExitCode" .= containerStatusExitCode + ] + + +-- | Construct a value of type 'ContainerStatus' (by applying it's required fields, if any) +mkContainerStatus + :: ContainerStatus +mkContainerStatus = + ContainerStatus + { containerStatusContainerId = Nothing + , containerStatusPid = Nothing + , containerStatusExitCode = Nothing + } + +-- ** ContainerSummary +-- | ContainerSummary +data ContainerSummary = ContainerSummary + { containerSummaryId :: !(Maybe Text) -- ^ "Id" - The ID of this container + , containerSummaryNames :: !(Maybe [Text]) -- ^ "Names" - The names that this container has been given + , containerSummaryImage :: !(Maybe Text) -- ^ "Image" - The name of the image used when creating this container + , containerSummaryImageId :: !(Maybe Text) -- ^ "ImageID" - The ID of the image that this container was created from + , containerSummaryCommand :: !(Maybe Text) -- ^ "Command" - Command to run when starting the container + , containerSummaryCreated :: !(Maybe Integer) -- ^ "Created" - When the container was created + , containerSummaryPorts :: !(Maybe [Port]) -- ^ "Ports" - The ports exposed by this container + , containerSummarySizeRw :: !(Maybe Integer) -- ^ "SizeRw" - The size of files that have been created or changed by this container + , containerSummarySizeRootFs :: !(Maybe Integer) -- ^ "SizeRootFs" - The total size of all the files in this container + , containerSummaryLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , containerSummaryState :: !(Maybe Text) -- ^ "State" - The state of this container (e.g. `Exited`) + , containerSummaryStatus :: !(Maybe Text) -- ^ "Status" - Additional human-readable status of this container (e.g. `Exit 0`) + , containerSummaryHostConfig :: !(Maybe ContainerSummaryHostConfig) -- ^ "HostConfig" + , containerSummaryNetworkSettings :: !(Maybe ContainerSummaryNetworkSettings) -- ^ "NetworkSettings" + , containerSummaryMounts :: !(Maybe [MountPoint]) -- ^ "Mounts" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerSummary +instance A.FromJSON ContainerSummary where + parseJSON = A.withObject "ContainerSummary" $ \o -> + ContainerSummary + <$> (o .:? "Id") + <*> (o .:? "Names") + <*> (o .:? "Image") + <*> (o .:? "ImageID") + <*> (o .:? "Command") + <*> (o .:? "Created") + <*> (o .:? "Ports") + <*> (o .:? "SizeRw") + <*> (o .:? "SizeRootFs") + <*> (o .:? "Labels") + <*> (o .:? "State") + <*> (o .:? "Status") + <*> (o .:? "HostConfig") + <*> (o .:? "NetworkSettings") + <*> (o .:? "Mounts") + +-- | ToJSON ContainerSummary +instance A.ToJSON ContainerSummary where + toJSON ContainerSummary {..} = + _omitNulls + [ "Id" .= containerSummaryId + , "Names" .= containerSummaryNames + , "Image" .= containerSummaryImage + , "ImageID" .= containerSummaryImageId + , "Command" .= containerSummaryCommand + , "Created" .= containerSummaryCreated + , "Ports" .= containerSummaryPorts + , "SizeRw" .= containerSummarySizeRw + , "SizeRootFs" .= containerSummarySizeRootFs + , "Labels" .= containerSummaryLabels + , "State" .= containerSummaryState + , "Status" .= containerSummaryStatus + , "HostConfig" .= containerSummaryHostConfig + , "NetworkSettings" .= containerSummaryNetworkSettings + , "Mounts" .= containerSummaryMounts + ] + + +-- | Construct a value of type 'ContainerSummary' (by applying it's required fields, if any) +mkContainerSummary + :: ContainerSummary +mkContainerSummary = + ContainerSummary + { containerSummaryId = Nothing + , containerSummaryNames = Nothing + , containerSummaryImage = Nothing + , containerSummaryImageId = Nothing + , containerSummaryCommand = Nothing + , containerSummaryCreated = Nothing + , containerSummaryPorts = Nothing + , containerSummarySizeRw = Nothing + , containerSummarySizeRootFs = Nothing + , containerSummaryLabels = Nothing + , containerSummaryState = Nothing + , containerSummaryStatus = Nothing + , containerSummaryHostConfig = Nothing + , containerSummaryNetworkSettings = Nothing + , containerSummaryMounts = Nothing + } + +-- ** ContainerSummaryHostConfig +-- | ContainerSummaryHostConfig +data ContainerSummaryHostConfig = ContainerSummaryHostConfig + { containerSummaryHostConfigNetworkMode :: !(Maybe Text) -- ^ "NetworkMode" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerSummaryHostConfig +instance A.FromJSON ContainerSummaryHostConfig where + parseJSON = A.withObject "ContainerSummaryHostConfig" $ \o -> + ContainerSummaryHostConfig + <$> (o .:? "NetworkMode") + +-- | ToJSON ContainerSummaryHostConfig +instance A.ToJSON ContainerSummaryHostConfig where + toJSON ContainerSummaryHostConfig {..} = + _omitNulls + [ "NetworkMode" .= containerSummaryHostConfigNetworkMode + ] + + +-- | Construct a value of type 'ContainerSummaryHostConfig' (by applying it's required fields, if any) +mkContainerSummaryHostConfig + :: ContainerSummaryHostConfig +mkContainerSummaryHostConfig = + ContainerSummaryHostConfig + { containerSummaryHostConfigNetworkMode = Nothing + } + +-- ** ContainerSummaryNetworkSettings +-- | ContainerSummaryNetworkSettings +-- A summary of the container's network settings +data ContainerSummaryNetworkSettings = ContainerSummaryNetworkSettings + { containerSummaryNetworkSettingsNetworks :: !(Maybe (Map.Map String EndpointSettings)) -- ^ "Networks" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerSummaryNetworkSettings +instance A.FromJSON ContainerSummaryNetworkSettings where + parseJSON = A.withObject "ContainerSummaryNetworkSettings" $ \o -> + ContainerSummaryNetworkSettings + <$> (o .:? "Networks") + +-- | ToJSON ContainerSummaryNetworkSettings +instance A.ToJSON ContainerSummaryNetworkSettings where + toJSON ContainerSummaryNetworkSettings {..} = + _omitNulls + [ "Networks" .= containerSummaryNetworkSettingsNetworks + ] + + +-- | Construct a value of type 'ContainerSummaryNetworkSettings' (by applying it's required fields, if any) +mkContainerSummaryNetworkSettings + :: ContainerSummaryNetworkSettings +mkContainerSummaryNetworkSettings = + ContainerSummaryNetworkSettings + { containerSummaryNetworkSettingsNetworks = Nothing + } + +-- ** ContainerTopResponse +-- | ContainerTopResponse +-- ContainerTopResponse +-- +-- OK response to ContainerTop operation +data ContainerTopResponse = ContainerTopResponse + { containerTopResponseTitles :: !(Maybe [Text]) -- ^ "Titles" - The ps column titles + , containerTopResponseProcesses :: !(Maybe [[Text]]) -- ^ "Processes" - Each process running in the container, where each is process is an array of values corresponding to the titles. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerTopResponse +instance A.FromJSON ContainerTopResponse where + parseJSON = A.withObject "ContainerTopResponse" $ \o -> + ContainerTopResponse + <$> (o .:? "Titles") + <*> (o .:? "Processes") + +-- | ToJSON ContainerTopResponse +instance A.ToJSON ContainerTopResponse where + toJSON ContainerTopResponse {..} = + _omitNulls + [ "Titles" .= containerTopResponseTitles + , "Processes" .= containerTopResponseProcesses + ] + + +-- | Construct a value of type 'ContainerTopResponse' (by applying it's required fields, if any) +mkContainerTopResponse + :: ContainerTopResponse +mkContainerTopResponse = + ContainerTopResponse + { containerTopResponseTitles = Nothing + , containerTopResponseProcesses = Nothing + } + +-- ** ContainerUpdateRequest +-- | ContainerUpdateRequest +data ContainerUpdateRequest = ContainerUpdateRequest + { containerUpdateRequestCpuShares :: !(Maybe Int) -- ^ "CpuShares" - An integer value representing this container's relative CPU weight versus other containers. + , containerUpdateRequestMemory :: !(Maybe Integer) -- ^ "Memory" - Memory limit in bytes. + , containerUpdateRequestCgroupParent :: !(Maybe Text) -- ^ "CgroupParent" - Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + , containerUpdateRequestBlkioWeight :: !(Maybe Int) -- ^ "BlkioWeight" - Block IO weight (relative weight). + , containerUpdateRequestBlkioWeightDevice :: !(Maybe [ResourcesBlkioWeightDeviceInner]) -- ^ "BlkioWeightDevice" - Block IO weight (relative device weight) in the form: ``` [{\"Path\": \"device_path\", \"Weight\": weight}] ``` + , containerUpdateRequestBlkioDeviceReadBps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceReadBps" - Limit read rate (bytes per second) from a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , containerUpdateRequestBlkioDeviceWriteBps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceWriteBps" - Limit write rate (bytes per second) to a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , containerUpdateRequestBlkioDeviceReadIOps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceReadIOps" - Limit read rate (IO per second) from a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , containerUpdateRequestBlkioDeviceWriteIOps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceWriteIOps" - Limit write rate (IO per second) to a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , containerUpdateRequestCpuPeriod :: !(Maybe Integer) -- ^ "CpuPeriod" - The length of a CPU period in microseconds. + , containerUpdateRequestCpuQuota :: !(Maybe Integer) -- ^ "CpuQuota" - Microseconds of CPU time that the container can get in a CPU period. + , containerUpdateRequestCpuRealtimePeriod :: !(Maybe Integer) -- ^ "CpuRealtimePeriod" - The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + , containerUpdateRequestCpuRealtimeRuntime :: !(Maybe Integer) -- ^ "CpuRealtimeRuntime" - The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + , containerUpdateRequestCpusetCpus :: !(Maybe Text) -- ^ "CpusetCpus" - CPUs in which to allow execution (e.g., `0-3`, `0,1`). + , containerUpdateRequestCpusetMems :: !(Maybe Text) -- ^ "CpusetMems" - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + , containerUpdateRequestDevices :: !(Maybe [DeviceMapping]) -- ^ "Devices" - A list of devices to add to the container. + , containerUpdateRequestDeviceCgroupRules :: !(Maybe [Text]) -- ^ "DeviceCgroupRules" - a list of cgroup rules to apply to the container + , containerUpdateRequestDeviceRequests :: !(Maybe [DeviceRequest]) -- ^ "DeviceRequests" - A list of requests for devices to be sent to device drivers. + , containerUpdateRequestKernelMemoryTcp :: !(Maybe Integer) -- ^ "KernelMemoryTCP" - Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. + , containerUpdateRequestMemoryReservation :: !(Maybe Integer) -- ^ "MemoryReservation" - Memory soft limit in bytes. + , containerUpdateRequestMemorySwap :: !(Maybe Integer) -- ^ "MemorySwap" - Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + , containerUpdateRequestMemorySwappiness :: !(Maybe Integer) -- ^ "MemorySwappiness" - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + , containerUpdateRequestNanoCpus :: !(Maybe Integer) -- ^ "NanoCpus" - CPU quota in units of 10<sup>-9</sup> CPUs. + , containerUpdateRequestOomKillDisable :: !(Maybe Bool) -- ^ "OomKillDisable" - Disable OOM Killer for the container. + , containerUpdateRequestInit :: !(Maybe Bool) -- ^ "Init" - Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + , containerUpdateRequestPidsLimit :: !(Maybe Integer) -- ^ "PidsLimit" - Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not change. + , containerUpdateRequestUlimits :: !(Maybe [ResourcesUlimitsInner]) -- ^ "Ulimits" - A list of resource limits to set in the container. For example: ``` {\"Name\": \"nofile\", \"Soft\": 1024, \"Hard\": 2048} ``` + , containerUpdateRequestCpuCount :: !(Maybe Integer) -- ^ "CpuCount" - The number of usable CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + , containerUpdateRequestCpuPercent :: !(Maybe Integer) -- ^ "CpuPercent" - The usable percentage of the available CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + , containerUpdateRequestIoMaximumIOps :: !(Maybe Integer) -- ^ "IOMaximumIOps" - Maximum IOps for the container system drive (Windows only) + , containerUpdateRequestIoMaximumBandwidth :: !(Maybe Integer) -- ^ "IOMaximumBandwidth" - Maximum IO in bytes per second for the container system drive (Windows only). + , containerUpdateRequestRestartPolicy :: !(Maybe RestartPolicy) -- ^ "RestartPolicy" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerUpdateRequest +instance A.FromJSON ContainerUpdateRequest where + parseJSON = A.withObject "ContainerUpdateRequest" $ \o -> + ContainerUpdateRequest + <$> (o .:? "CpuShares") + <*> (o .:? "Memory") + <*> (o .:? "CgroupParent") + <*> (o .:? "BlkioWeight") + <*> (o .:? "BlkioWeightDevice") + <*> (o .:? "BlkioDeviceReadBps") + <*> (o .:? "BlkioDeviceWriteBps") + <*> (o .:? "BlkioDeviceReadIOps") + <*> (o .:? "BlkioDeviceWriteIOps") + <*> (o .:? "CpuPeriod") + <*> (o .:? "CpuQuota") + <*> (o .:? "CpuRealtimePeriod") + <*> (o .:? "CpuRealtimeRuntime") + <*> (o .:? "CpusetCpus") + <*> (o .:? "CpusetMems") + <*> (o .:? "Devices") + <*> (o .:? "DeviceCgroupRules") + <*> (o .:? "DeviceRequests") + <*> (o .:? "KernelMemoryTCP") + <*> (o .:? "MemoryReservation") + <*> (o .:? "MemorySwap") + <*> (o .:? "MemorySwappiness") + <*> (o .:? "NanoCpus") + <*> (o .:? "OomKillDisable") + <*> (o .:? "Init") + <*> (o .:? "PidsLimit") + <*> (o .:? "Ulimits") + <*> (o .:? "CpuCount") + <*> (o .:? "CpuPercent") + <*> (o .:? "IOMaximumIOps") + <*> (o .:? "IOMaximumBandwidth") + <*> (o .:? "RestartPolicy") + +-- | ToJSON ContainerUpdateRequest +instance A.ToJSON ContainerUpdateRequest where + toJSON ContainerUpdateRequest {..} = + _omitNulls + [ "CpuShares" .= containerUpdateRequestCpuShares + , "Memory" .= containerUpdateRequestMemory + , "CgroupParent" .= containerUpdateRequestCgroupParent + , "BlkioWeight" .= containerUpdateRequestBlkioWeight + , "BlkioWeightDevice" .= containerUpdateRequestBlkioWeightDevice + , "BlkioDeviceReadBps" .= containerUpdateRequestBlkioDeviceReadBps + , "BlkioDeviceWriteBps" .= containerUpdateRequestBlkioDeviceWriteBps + , "BlkioDeviceReadIOps" .= containerUpdateRequestBlkioDeviceReadIOps + , "BlkioDeviceWriteIOps" .= containerUpdateRequestBlkioDeviceWriteIOps + , "CpuPeriod" .= containerUpdateRequestCpuPeriod + , "CpuQuota" .= containerUpdateRequestCpuQuota + , "CpuRealtimePeriod" .= containerUpdateRequestCpuRealtimePeriod + , "CpuRealtimeRuntime" .= containerUpdateRequestCpuRealtimeRuntime + , "CpusetCpus" .= containerUpdateRequestCpusetCpus + , "CpusetMems" .= containerUpdateRequestCpusetMems + , "Devices" .= containerUpdateRequestDevices + , "DeviceCgroupRules" .= containerUpdateRequestDeviceCgroupRules + , "DeviceRequests" .= containerUpdateRequestDeviceRequests + , "KernelMemoryTCP" .= containerUpdateRequestKernelMemoryTcp + , "MemoryReservation" .= containerUpdateRequestMemoryReservation + , "MemorySwap" .= containerUpdateRequestMemorySwap + , "MemorySwappiness" .= containerUpdateRequestMemorySwappiness + , "NanoCpus" .= containerUpdateRequestNanoCpus + , "OomKillDisable" .= containerUpdateRequestOomKillDisable + , "Init" .= containerUpdateRequestInit + , "PidsLimit" .= containerUpdateRequestPidsLimit + , "Ulimits" .= containerUpdateRequestUlimits + , "CpuCount" .= containerUpdateRequestCpuCount + , "CpuPercent" .= containerUpdateRequestCpuPercent + , "IOMaximumIOps" .= containerUpdateRequestIoMaximumIOps + , "IOMaximumBandwidth" .= containerUpdateRequestIoMaximumBandwidth + , "RestartPolicy" .= containerUpdateRequestRestartPolicy + ] + + +-- | Construct a value of type 'ContainerUpdateRequest' (by applying it's required fields, if any) +mkContainerUpdateRequest + :: ContainerUpdateRequest +mkContainerUpdateRequest = + ContainerUpdateRequest + { containerUpdateRequestCpuShares = Nothing + , containerUpdateRequestMemory = Nothing + , containerUpdateRequestCgroupParent = Nothing + , containerUpdateRequestBlkioWeight = Nothing + , containerUpdateRequestBlkioWeightDevice = Nothing + , containerUpdateRequestBlkioDeviceReadBps = Nothing + , containerUpdateRequestBlkioDeviceWriteBps = Nothing + , containerUpdateRequestBlkioDeviceReadIOps = Nothing + , containerUpdateRequestBlkioDeviceWriteIOps = Nothing + , containerUpdateRequestCpuPeriod = Nothing + , containerUpdateRequestCpuQuota = Nothing + , containerUpdateRequestCpuRealtimePeriod = Nothing + , containerUpdateRequestCpuRealtimeRuntime = Nothing + , containerUpdateRequestCpusetCpus = Nothing + , containerUpdateRequestCpusetMems = Nothing + , containerUpdateRequestDevices = Nothing + , containerUpdateRequestDeviceCgroupRules = Nothing + , containerUpdateRequestDeviceRequests = Nothing + , containerUpdateRequestKernelMemoryTcp = Nothing + , containerUpdateRequestMemoryReservation = Nothing + , containerUpdateRequestMemorySwap = Nothing + , containerUpdateRequestMemorySwappiness = Nothing + , containerUpdateRequestNanoCpus = Nothing + , containerUpdateRequestOomKillDisable = Nothing + , containerUpdateRequestInit = Nothing + , containerUpdateRequestPidsLimit = Nothing + , containerUpdateRequestUlimits = Nothing + , containerUpdateRequestCpuCount = Nothing + , containerUpdateRequestCpuPercent = Nothing + , containerUpdateRequestIoMaximumIOps = Nothing + , containerUpdateRequestIoMaximumBandwidth = Nothing + , containerUpdateRequestRestartPolicy = Nothing + } + +-- ** ContainerUpdateResponse +-- | ContainerUpdateResponse +-- ContainerUpdateResponse +-- +-- OK response to ContainerUpdate operation +data ContainerUpdateResponse = ContainerUpdateResponse + { containerUpdateResponseWarnings :: !(Maybe [Text]) -- ^ "Warnings" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerUpdateResponse +instance A.FromJSON ContainerUpdateResponse where + parseJSON = A.withObject "ContainerUpdateResponse" $ \o -> + ContainerUpdateResponse + <$> (o .:? "Warnings") + +-- | ToJSON ContainerUpdateResponse +instance A.ToJSON ContainerUpdateResponse where + toJSON ContainerUpdateResponse {..} = + _omitNulls + [ "Warnings" .= containerUpdateResponseWarnings + ] + + +-- | Construct a value of type 'ContainerUpdateResponse' (by applying it's required fields, if any) +mkContainerUpdateResponse + :: ContainerUpdateResponse +mkContainerUpdateResponse = + ContainerUpdateResponse + { containerUpdateResponseWarnings = Nothing + } + +-- ** ContainerWaitExitError +-- | ContainerWaitExitError +-- container waiting error, if any +data ContainerWaitExitError = ContainerWaitExitError + { containerWaitExitErrorMessage :: !(Maybe Text) -- ^ "Message" - Details of an error + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerWaitExitError +instance A.FromJSON ContainerWaitExitError where + parseJSON = A.withObject "ContainerWaitExitError" $ \o -> + ContainerWaitExitError + <$> (o .:? "Message") + +-- | ToJSON ContainerWaitExitError +instance A.ToJSON ContainerWaitExitError where + toJSON ContainerWaitExitError {..} = + _omitNulls + [ "Message" .= containerWaitExitErrorMessage + ] + + +-- | Construct a value of type 'ContainerWaitExitError' (by applying it's required fields, if any) +mkContainerWaitExitError + :: ContainerWaitExitError +mkContainerWaitExitError = + ContainerWaitExitError + { containerWaitExitErrorMessage = Nothing + } + +-- ** ContainerWaitResponse +-- | ContainerWaitResponse +-- ContainerWaitResponse +-- +-- OK response to ContainerWait operation +data ContainerWaitResponse = ContainerWaitResponse + { containerWaitResponseStatusCode :: !(Integer) -- ^ /Required/ "StatusCode" - Exit code of the container + , containerWaitResponseError :: !(Maybe ContainerWaitExitError) -- ^ "Error" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerWaitResponse +instance A.FromJSON ContainerWaitResponse where + parseJSON = A.withObject "ContainerWaitResponse" $ \o -> + ContainerWaitResponse + <$> (o .: "StatusCode") + <*> (o .:? "Error") + +-- | ToJSON ContainerWaitResponse +instance A.ToJSON ContainerWaitResponse where + toJSON ContainerWaitResponse {..} = + _omitNulls + [ "StatusCode" .= containerWaitResponseStatusCode + , "Error" .= containerWaitResponseError + ] + + +-- | Construct a value of type 'ContainerWaitResponse' (by applying it's required fields, if any) +mkContainerWaitResponse + :: Integer -- ^ 'containerWaitResponseStatusCode': Exit code of the container + -> ContainerWaitResponse +mkContainerWaitResponse containerWaitResponseStatusCode = + ContainerWaitResponse + { containerWaitResponseStatusCode + , containerWaitResponseError = Nothing + } + +-- ** CreateImageInfo +-- | CreateImageInfo +data CreateImageInfo = CreateImageInfo + { createImageInfoId :: !(Maybe Text) -- ^ "id" + , createImageInfoError :: !(Maybe Text) -- ^ "error" + , createImageInfoErrorDetail :: !(Maybe ErrorDetail) -- ^ "errorDetail" + , createImageInfoStatus :: !(Maybe Text) -- ^ "status" + , createImageInfoProgress :: !(Maybe Text) -- ^ "progress" + , createImageInfoProgressDetail :: !(Maybe ProgressDetail) -- ^ "progressDetail" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON CreateImageInfo +instance A.FromJSON CreateImageInfo where + parseJSON = A.withObject "CreateImageInfo" $ \o -> + CreateImageInfo + <$> (o .:? "id") + <*> (o .:? "error") + <*> (o .:? "errorDetail") + <*> (o .:? "status") + <*> (o .:? "progress") + <*> (o .:? "progressDetail") + +-- | ToJSON CreateImageInfo +instance A.ToJSON CreateImageInfo where + toJSON CreateImageInfo {..} = + _omitNulls + [ "id" .= createImageInfoId + , "error" .= createImageInfoError + , "errorDetail" .= createImageInfoErrorDetail + , "status" .= createImageInfoStatus + , "progress" .= createImageInfoProgress + , "progressDetail" .= createImageInfoProgressDetail + ] + + +-- | Construct a value of type 'CreateImageInfo' (by applying it's required fields, if any) +mkCreateImageInfo + :: CreateImageInfo +mkCreateImageInfo = + CreateImageInfo + { createImageInfoId = Nothing + , createImageInfoError = Nothing + , createImageInfoErrorDetail = Nothing + , createImageInfoStatus = Nothing + , createImageInfoProgress = Nothing + , createImageInfoProgressDetail = Nothing + } + +-- ** DeviceMapping +-- | DeviceMapping +-- A device mapping between the host and container +data DeviceMapping = DeviceMapping + { deviceMappingPathOnHost :: !(Maybe Text) -- ^ "PathOnHost" + , deviceMappingPathInContainer :: !(Maybe Text) -- ^ "PathInContainer" + , deviceMappingCgroupPermissions :: !(Maybe Text) -- ^ "CgroupPermissions" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON DeviceMapping +instance A.FromJSON DeviceMapping where + parseJSON = A.withObject "DeviceMapping" $ \o -> + DeviceMapping + <$> (o .:? "PathOnHost") + <*> (o .:? "PathInContainer") + <*> (o .:? "CgroupPermissions") + +-- | ToJSON DeviceMapping +instance A.ToJSON DeviceMapping where + toJSON DeviceMapping {..} = + _omitNulls + [ "PathOnHost" .= deviceMappingPathOnHost + , "PathInContainer" .= deviceMappingPathInContainer + , "CgroupPermissions" .= deviceMappingCgroupPermissions + ] + + +-- | Construct a value of type 'DeviceMapping' (by applying it's required fields, if any) +mkDeviceMapping + :: DeviceMapping +mkDeviceMapping = + DeviceMapping + { deviceMappingPathOnHost = Nothing + , deviceMappingPathInContainer = Nothing + , deviceMappingCgroupPermissions = Nothing + } + +-- ** DeviceRequest +-- | DeviceRequest +-- A request for devices to be sent to device drivers +data DeviceRequest = DeviceRequest + { deviceRequestDriver :: !(Maybe Text) -- ^ "Driver" + , deviceRequestCount :: !(Maybe Int) -- ^ "Count" + , deviceRequestDeviceIds :: !(Maybe [Text]) -- ^ "DeviceIDs" + , deviceRequestCapabilities :: !(Maybe [[Text]]) -- ^ "Capabilities" - A list of capabilities; an OR list of AND lists of capabilities. + , deviceRequestOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - Driver-specific options, specified as a key/value pairs. These options are passed directly to the driver. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON DeviceRequest +instance A.FromJSON DeviceRequest where + parseJSON = A.withObject "DeviceRequest" $ \o -> + DeviceRequest + <$> (o .:? "Driver") + <*> (o .:? "Count") + <*> (o .:? "DeviceIDs") + <*> (o .:? "Capabilities") + <*> (o .:? "Options") + +-- | ToJSON DeviceRequest +instance A.ToJSON DeviceRequest where + toJSON DeviceRequest {..} = + _omitNulls + [ "Driver" .= deviceRequestDriver + , "Count" .= deviceRequestCount + , "DeviceIDs" .= deviceRequestDeviceIds + , "Capabilities" .= deviceRequestCapabilities + , "Options" .= deviceRequestOptions + ] + + +-- | Construct a value of type 'DeviceRequest' (by applying it's required fields, if any) +mkDeviceRequest + :: DeviceRequest +mkDeviceRequest = + DeviceRequest + { deviceRequestDriver = Nothing + , deviceRequestCount = Nothing + , deviceRequestDeviceIds = Nothing + , deviceRequestCapabilities = Nothing + , deviceRequestOptions = Nothing + } + +-- ** DistributionInspect +-- | DistributionInspect +-- DistributionInspectResponse +-- +-- Describes the result obtained from contacting the registry to retrieve image metadata. +data DistributionInspect = DistributionInspect + { distributionInspectDescriptor :: !(OCIDescriptor) -- ^ /Required/ "Descriptor" + , distributionInspectPlatforms :: !([OCIPlatform]) -- ^ /Required/ "Platforms" - An array containing all platforms supported by the image. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON DistributionInspect +instance A.FromJSON DistributionInspect where + parseJSON = A.withObject "DistributionInspect" $ \o -> + DistributionInspect + <$> (o .: "Descriptor") + <*> (o .: "Platforms") + +-- | ToJSON DistributionInspect +instance A.ToJSON DistributionInspect where + toJSON DistributionInspect {..} = + _omitNulls + [ "Descriptor" .= distributionInspectDescriptor + , "Platforms" .= distributionInspectPlatforms + ] + + +-- | Construct a value of type 'DistributionInspect' (by applying it's required fields, if any) +mkDistributionInspect + :: OCIDescriptor -- ^ 'distributionInspectDescriptor' + -> [OCIPlatform] -- ^ 'distributionInspectPlatforms': An array containing all platforms supported by the image. + -> DistributionInspect +mkDistributionInspect distributionInspectDescriptor distributionInspectPlatforms = + DistributionInspect + { distributionInspectDescriptor + , distributionInspectPlatforms + } + +-- ** Driver +-- | Driver +-- Driver represents a driver (network, logging, secrets). +data Driver = Driver + { driverName :: !(Text) -- ^ /Required/ "Name" - Name of the driver. + , driverOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - Key/value map of driver-specific options. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Driver +instance A.FromJSON Driver where + parseJSON = A.withObject "Driver" $ \o -> + Driver + <$> (o .: "Name") + <*> (o .:? "Options") + +-- | ToJSON Driver +instance A.ToJSON Driver where + toJSON Driver {..} = + _omitNulls + [ "Name" .= driverName + , "Options" .= driverOptions + ] + + +-- | Construct a value of type 'Driver' (by applying it's required fields, if any) +mkDriver + :: Text -- ^ 'driverName': Name of the driver. + -> Driver +mkDriver driverName = + Driver + { driverName + , driverOptions = Nothing + } + +-- ** EndpointIPAMConfig +-- | EndpointIPAMConfig +-- EndpointIPAMConfig represents an endpoint's IPAM configuration. +data EndpointIPAMConfig = EndpointIPAMConfig + { endpointIPAMConfigIpv4Address :: !(Maybe Text) -- ^ "IPv4Address" + , endpointIPAMConfigIpv6Address :: !(Maybe Text) -- ^ "IPv6Address" + , endpointIPAMConfigLinkLocalIps :: !(Maybe [Text]) -- ^ "LinkLocalIPs" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EndpointIPAMConfig +instance A.FromJSON EndpointIPAMConfig where + parseJSON = A.withObject "EndpointIPAMConfig" $ \o -> + EndpointIPAMConfig + <$> (o .:? "IPv4Address") + <*> (o .:? "IPv6Address") + <*> (o .:? "LinkLocalIPs") + +-- | ToJSON EndpointIPAMConfig +instance A.ToJSON EndpointIPAMConfig where + toJSON EndpointIPAMConfig {..} = + _omitNulls + [ "IPv4Address" .= endpointIPAMConfigIpv4Address + , "IPv6Address" .= endpointIPAMConfigIpv6Address + , "LinkLocalIPs" .= endpointIPAMConfigLinkLocalIps + ] + + +-- | Construct a value of type 'EndpointIPAMConfig' (by applying it's required fields, if any) +mkEndpointIPAMConfig + :: EndpointIPAMConfig +mkEndpointIPAMConfig = + EndpointIPAMConfig + { endpointIPAMConfigIpv4Address = Nothing + , endpointIPAMConfigIpv6Address = Nothing + , endpointIPAMConfigLinkLocalIps = Nothing + } + +-- ** EndpointPortConfig +-- | EndpointPortConfig +data EndpointPortConfig = EndpointPortConfig + { endpointPortConfigName :: !(Maybe Text) -- ^ "Name" + , endpointPortConfigProtocol :: !(Maybe E'Type) -- ^ "Protocol" + , endpointPortConfigTargetPort :: !(Maybe Int) -- ^ "TargetPort" - The port inside the container. + , endpointPortConfigPublishedPort :: !(Maybe Int) -- ^ "PublishedPort" - The port on the swarm hosts. + , endpointPortConfigPublishMode :: !(Maybe E'PublishMode) -- ^ "PublishMode" - The mode in which port is published. <p><br /></p> - \"ingress\" makes the target port accessible on every node, regardless of whether there is a task for the service running on that node or not. - \"host\" bypasses the routing mesh and publish the port directly on the swarm node where that service is running. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EndpointPortConfig +instance A.FromJSON EndpointPortConfig where + parseJSON = A.withObject "EndpointPortConfig" $ \o -> + EndpointPortConfig + <$> (o .:? "Name") + <*> (o .:? "Protocol") + <*> (o .:? "TargetPort") + <*> (o .:? "PublishedPort") + <*> (o .:? "PublishMode") + +-- | ToJSON EndpointPortConfig +instance A.ToJSON EndpointPortConfig where + toJSON EndpointPortConfig {..} = + _omitNulls + [ "Name" .= endpointPortConfigName + , "Protocol" .= endpointPortConfigProtocol + , "TargetPort" .= endpointPortConfigTargetPort + , "PublishedPort" .= endpointPortConfigPublishedPort + , "PublishMode" .= endpointPortConfigPublishMode + ] + + +-- | Construct a value of type 'EndpointPortConfig' (by applying it's required fields, if any) +mkEndpointPortConfig + :: EndpointPortConfig +mkEndpointPortConfig = + EndpointPortConfig + { endpointPortConfigName = Nothing + , endpointPortConfigProtocol = Nothing + , endpointPortConfigTargetPort = Nothing + , endpointPortConfigPublishedPort = Nothing + , endpointPortConfigPublishMode = Nothing + } + +-- ** EndpointSettings +-- | EndpointSettings +-- Configuration for a network endpoint. +data EndpointSettings = EndpointSettings + { endpointSettingsIpamConfig :: !(Maybe EndpointIPAMConfig) -- ^ "IPAMConfig" + , endpointSettingsLinks :: !(Maybe [Text]) -- ^ "Links" + , endpointSettingsMacAddress :: !(Maybe Text) -- ^ "MacAddress" - MAC address for the endpoint on this network. The network driver might ignore this parameter. + , endpointSettingsAliases :: !(Maybe [Text]) -- ^ "Aliases" + , endpointSettingsNetworkId :: !(Maybe Text) -- ^ "NetworkID" - Unique ID of the network. + , endpointSettingsEndpointId :: !(Maybe Text) -- ^ "EndpointID" - Unique ID for the service endpoint in a Sandbox. + , endpointSettingsGateway :: !(Maybe Text) -- ^ "Gateway" - Gateway address for this network. + , endpointSettingsIpAddress :: !(Maybe Text) -- ^ "IPAddress" - IPv4 address. + , endpointSettingsIpPrefixLen :: !(Maybe Int) -- ^ "IPPrefixLen" - Mask length of the IPv4 address. + , endpointSettingsIpv6Gateway :: !(Maybe Text) -- ^ "IPv6Gateway" - IPv6 gateway address. + , endpointSettingsGlobalIpv6Address :: !(Maybe Text) -- ^ "GlobalIPv6Address" - Global IPv6 address. + , endpointSettingsGlobalIpv6PrefixLen :: !(Maybe Integer) -- ^ "GlobalIPv6PrefixLen" - Mask length of the global IPv6 address. + , endpointSettingsDriverOpts :: !(Maybe (Map.Map String Text)) -- ^ "DriverOpts" - DriverOpts is a mapping of driver options and values. These options are passed directly to the driver and are driver specific. + , endpointSettingsDnsNames :: !(Maybe [Text]) -- ^ "DNSNames" - List of all DNS names an endpoint has on a specific network. This list is based on the container name, network aliases, container short ID, and hostname. These DNS names are non-fully qualified but can contain several dots. You can get fully qualified DNS names by appending `.<network-name>`. For instance, if container name is `my.ctr` and the network is named `testnet`, `DNSNames` will contain `my.ctr` and the FQDN will be `my.ctr.testnet`. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EndpointSettings +instance A.FromJSON EndpointSettings where + parseJSON = A.withObject "EndpointSettings" $ \o -> + EndpointSettings + <$> (o .:? "IPAMConfig") + <*> (o .:? "Links") + <*> (o .:? "MacAddress") + <*> (o .:? "Aliases") + <*> (o .:? "NetworkID") + <*> (o .:? "EndpointID") + <*> (o .:? "Gateway") + <*> (o .:? "IPAddress") + <*> (o .:? "IPPrefixLen") + <*> (o .:? "IPv6Gateway") + <*> (o .:? "GlobalIPv6Address") + <*> (o .:? "GlobalIPv6PrefixLen") + <*> (o .:? "DriverOpts") + <*> (o .:? "DNSNames") + +-- | ToJSON EndpointSettings +instance A.ToJSON EndpointSettings where + toJSON EndpointSettings {..} = + _omitNulls + [ "IPAMConfig" .= endpointSettingsIpamConfig + , "Links" .= endpointSettingsLinks + , "MacAddress" .= endpointSettingsMacAddress + , "Aliases" .= endpointSettingsAliases + , "NetworkID" .= endpointSettingsNetworkId + , "EndpointID" .= endpointSettingsEndpointId + , "Gateway" .= endpointSettingsGateway + , "IPAddress" .= endpointSettingsIpAddress + , "IPPrefixLen" .= endpointSettingsIpPrefixLen + , "IPv6Gateway" .= endpointSettingsIpv6Gateway + , "GlobalIPv6Address" .= endpointSettingsGlobalIpv6Address + , "GlobalIPv6PrefixLen" .= endpointSettingsGlobalIpv6PrefixLen + , "DriverOpts" .= endpointSettingsDriverOpts + , "DNSNames" .= endpointSettingsDnsNames + ] + + +-- | Construct a value of type 'EndpointSettings' (by applying it's required fields, if any) +mkEndpointSettings + :: EndpointSettings +mkEndpointSettings = + EndpointSettings + { endpointSettingsIpamConfig = Nothing + , endpointSettingsLinks = Nothing + , endpointSettingsMacAddress = Nothing + , endpointSettingsAliases = Nothing + , endpointSettingsNetworkId = Nothing + , endpointSettingsEndpointId = Nothing + , endpointSettingsGateway = Nothing + , endpointSettingsIpAddress = Nothing + , endpointSettingsIpPrefixLen = Nothing + , endpointSettingsIpv6Gateway = Nothing + , endpointSettingsGlobalIpv6Address = Nothing + , endpointSettingsGlobalIpv6PrefixLen = Nothing + , endpointSettingsDriverOpts = Nothing + , endpointSettingsDnsNames = Nothing + } + +-- ** EndpointSpec +-- | EndpointSpec +-- Properties that can be configured to access and load balance a service. +data EndpointSpec = EndpointSpec + { endpointSpecMode :: !(Maybe E'Mode) -- ^ "Mode" - The mode of resolution to use for internal load balancing between tasks. + , endpointSpecPorts :: !(Maybe [EndpointPortConfig]) -- ^ "Ports" - List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EndpointSpec +instance A.FromJSON EndpointSpec where + parseJSON = A.withObject "EndpointSpec" $ \o -> + EndpointSpec + <$> (o .:? "Mode") + <*> (o .:? "Ports") + +-- | ToJSON EndpointSpec +instance A.ToJSON EndpointSpec where + toJSON EndpointSpec {..} = + _omitNulls + [ "Mode" .= endpointSpecMode + , "Ports" .= endpointSpecPorts + ] + + +-- | Construct a value of type 'EndpointSpec' (by applying it's required fields, if any) +mkEndpointSpec + :: EndpointSpec +mkEndpointSpec = + EndpointSpec + { endpointSpecMode = Nothing + , endpointSpecPorts = Nothing + } + +-- ** EngineDescription +-- | EngineDescription +-- EngineDescription provides information about an engine. +data EngineDescription = EngineDescription + { engineDescriptionEngineVersion :: !(Maybe Text) -- ^ "EngineVersion" + , engineDescriptionLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" + , engineDescriptionPlugins :: !(Maybe [EngineDescriptionPluginsInner]) -- ^ "Plugins" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EngineDescription +instance A.FromJSON EngineDescription where + parseJSON = A.withObject "EngineDescription" $ \o -> + EngineDescription + <$> (o .:? "EngineVersion") + <*> (o .:? "Labels") + <*> (o .:? "Plugins") + +-- | ToJSON EngineDescription +instance A.ToJSON EngineDescription where + toJSON EngineDescription {..} = + _omitNulls + [ "EngineVersion" .= engineDescriptionEngineVersion + , "Labels" .= engineDescriptionLabels + , "Plugins" .= engineDescriptionPlugins + ] + + +-- | Construct a value of type 'EngineDescription' (by applying it's required fields, if any) +mkEngineDescription + :: EngineDescription +mkEngineDescription = + EngineDescription + { engineDescriptionEngineVersion = Nothing + , engineDescriptionLabels = Nothing + , engineDescriptionPlugins = Nothing + } + +-- ** EngineDescriptionPluginsInner +-- | EngineDescriptionPluginsInner +data EngineDescriptionPluginsInner = EngineDescriptionPluginsInner + { engineDescriptionPluginsInnerType :: !(Maybe Text) -- ^ "Type" + , engineDescriptionPluginsInnerName :: !(Maybe Text) -- ^ "Name" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EngineDescriptionPluginsInner +instance A.FromJSON EngineDescriptionPluginsInner where + parseJSON = A.withObject "EngineDescriptionPluginsInner" $ \o -> + EngineDescriptionPluginsInner + <$> (o .:? "Type") + <*> (o .:? "Name") + +-- | ToJSON EngineDescriptionPluginsInner +instance A.ToJSON EngineDescriptionPluginsInner where + toJSON EngineDescriptionPluginsInner {..} = + _omitNulls + [ "Type" .= engineDescriptionPluginsInnerType + , "Name" .= engineDescriptionPluginsInnerName + ] + + +-- | Construct a value of type 'EngineDescriptionPluginsInner' (by applying it's required fields, if any) +mkEngineDescriptionPluginsInner + :: EngineDescriptionPluginsInner +mkEngineDescriptionPluginsInner = + EngineDescriptionPluginsInner + { engineDescriptionPluginsInnerType = Nothing + , engineDescriptionPluginsInnerName = Nothing + } + +-- ** ErrorDetail +-- | ErrorDetail +data ErrorDetail = ErrorDetail + { errorDetailCode :: !(Maybe Int) -- ^ "code" + , errorDetailMessage :: !(Maybe Text) -- ^ "message" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ErrorDetail +instance A.FromJSON ErrorDetail where + parseJSON = A.withObject "ErrorDetail" $ \o -> + ErrorDetail + <$> (o .:? "code") + <*> (o .:? "message") + +-- | ToJSON ErrorDetail +instance A.ToJSON ErrorDetail where + toJSON ErrorDetail {..} = + _omitNulls + [ "code" .= errorDetailCode + , "message" .= errorDetailMessage + ] + + +-- | Construct a value of type 'ErrorDetail' (by applying it's required fields, if any) +mkErrorDetail + :: ErrorDetail +mkErrorDetail = + ErrorDetail + { errorDetailCode = Nothing + , errorDetailMessage = Nothing + } + +-- ** ErrorResponse +-- | ErrorResponse +-- Represents an error. +data ErrorResponse = ErrorResponse + { errorResponseMessage :: !(Text) -- ^ /Required/ "message" - The error message. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ErrorResponse +instance A.FromJSON ErrorResponse where + parseJSON = A.withObject "ErrorResponse" $ \o -> + ErrorResponse + <$> (o .: "message") + +-- | ToJSON ErrorResponse +instance A.ToJSON ErrorResponse where + toJSON ErrorResponse {..} = + _omitNulls + [ "message" .= errorResponseMessage + ] + + +-- | Construct a value of type 'ErrorResponse' (by applying it's required fields, if any) +mkErrorResponse + :: Text -- ^ 'errorResponseMessage': The error message. + -> ErrorResponse +mkErrorResponse errorResponseMessage = + ErrorResponse + { errorResponseMessage + } + +-- ** EventActor +-- | EventActor +-- Actor describes something that generates events, like a container, network, or a volume. +data EventActor = EventActor + { eventActorId :: !(Maybe Text) -- ^ "ID" - The ID of the object emitting the event + , eventActorAttributes :: !(Maybe (Map.Map String Text)) -- ^ "Attributes" - Various key/value attributes of the object, depending on its type. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EventActor +instance A.FromJSON EventActor where + parseJSON = A.withObject "EventActor" $ \o -> + EventActor + <$> (o .:? "ID") + <*> (o .:? "Attributes") + +-- | ToJSON EventActor +instance A.ToJSON EventActor where + toJSON EventActor {..} = + _omitNulls + [ "ID" .= eventActorId + , "Attributes" .= eventActorAttributes + ] + + +-- | Construct a value of type 'EventActor' (by applying it's required fields, if any) +mkEventActor + :: EventActor +mkEventActor = + EventActor + { eventActorId = Nothing + , eventActorAttributes = Nothing + } + +-- ** EventMessage +-- | EventMessage +-- SystemEventsResponse +-- +-- EventMessage represents the information an event contains. +data EventMessage = EventMessage + { eventMessageType :: !(Maybe E'Type4) -- ^ "Type" - The type of object emitting the event + , eventMessageAction :: !(Maybe Text) -- ^ "Action" - The type of event + , eventMessageActor :: !(Maybe EventActor) -- ^ "Actor" + , eventMessageScope :: !(Maybe E'Scope2) -- ^ "scope" - Scope of the event. Engine events are `local` scope. Cluster (Swarm) events are `swarm` scope. + , eventMessageTime :: !(Maybe Integer) -- ^ "time" - Timestamp of event + , eventMessageTimeNano :: !(Maybe Integer) -- ^ "timeNano" - Timestamp of event, with nanosecond accuracy + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EventMessage +instance A.FromJSON EventMessage where + parseJSON = A.withObject "EventMessage" $ \o -> + EventMessage + <$> (o .:? "Type") + <*> (o .:? "Action") + <*> (o .:? "Actor") + <*> (o .:? "scope") + <*> (o .:? "time") + <*> (o .:? "timeNano") + +-- | ToJSON EventMessage +instance A.ToJSON EventMessage where + toJSON EventMessage {..} = + _omitNulls + [ "Type" .= eventMessageType + , "Action" .= eventMessageAction + , "Actor" .= eventMessageActor + , "scope" .= eventMessageScope + , "time" .= eventMessageTime + , "timeNano" .= eventMessageTimeNano + ] + + +-- | Construct a value of type 'EventMessage' (by applying it's required fields, if any) +mkEventMessage + :: EventMessage +mkEventMessage = + EventMessage + { eventMessageType = Nothing + , eventMessageAction = Nothing + , eventMessageActor = Nothing + , eventMessageScope = Nothing + , eventMessageTime = Nothing + , eventMessageTimeNano = Nothing + } + +-- ** ExecConfig +-- | ExecConfig +-- ExecConfig +-- +data ExecConfig = ExecConfig + { execConfigAttachStdin :: !(Maybe Bool) -- ^ "AttachStdin" - Attach to `stdin` of the exec command. + , execConfigAttachStdout :: !(Maybe Bool) -- ^ "AttachStdout" - Attach to `stdout` of the exec command. + , execConfigAttachStderr :: !(Maybe Bool) -- ^ "AttachStderr" - Attach to `stderr` of the exec command. + , execConfigConsoleSize :: !(Maybe [Int]) -- ^ "ConsoleSize" - Initial console size, as an `[height, width]` array. + , execConfigDetachKeys :: !(Maybe Text) -- ^ "DetachKeys" - Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + , execConfigTty :: !(Maybe Bool) -- ^ "Tty" - Allocate a pseudo-TTY. + , execConfigEnv :: !(Maybe [Text]) -- ^ "Env" - A list of environment variables in the form `[\"VAR=value\", ...]`. + , execConfigCmd :: !(Maybe [Text]) -- ^ "Cmd" - Command to run, as a string or array of strings. + , execConfigPrivileged :: !(Maybe Bool) -- ^ "Privileged" - Runs the exec process with extended privileges. + , execConfigUser :: !(Maybe Text) -- ^ "User" - The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`. + , execConfigWorkingDir :: !(Maybe Text) -- ^ "WorkingDir" - The working directory for the exec process inside the container. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ExecConfig +instance A.FromJSON ExecConfig where + parseJSON = A.withObject "ExecConfig" $ \o -> + ExecConfig + <$> (o .:? "AttachStdin") + <*> (o .:? "AttachStdout") + <*> (o .:? "AttachStderr") + <*> (o .:? "ConsoleSize") + <*> (o .:? "DetachKeys") + <*> (o .:? "Tty") + <*> (o .:? "Env") + <*> (o .:? "Cmd") + <*> (o .:? "Privileged") + <*> (o .:? "User") + <*> (o .:? "WorkingDir") + +-- | ToJSON ExecConfig +instance A.ToJSON ExecConfig where + toJSON ExecConfig {..} = + _omitNulls + [ "AttachStdin" .= execConfigAttachStdin + , "AttachStdout" .= execConfigAttachStdout + , "AttachStderr" .= execConfigAttachStderr + , "ConsoleSize" .= execConfigConsoleSize + , "DetachKeys" .= execConfigDetachKeys + , "Tty" .= execConfigTty + , "Env" .= execConfigEnv + , "Cmd" .= execConfigCmd + , "Privileged" .= execConfigPrivileged + , "User" .= execConfigUser + , "WorkingDir" .= execConfigWorkingDir + ] + + +-- | Construct a value of type 'ExecConfig' (by applying it's required fields, if any) +mkExecConfig + :: ExecConfig +mkExecConfig = + ExecConfig + { execConfigAttachStdin = Nothing + , execConfigAttachStdout = Nothing + , execConfigAttachStderr = Nothing + , execConfigConsoleSize = Nothing + , execConfigDetachKeys = Nothing + , execConfigTty = Nothing + , execConfigEnv = Nothing + , execConfigCmd = Nothing + , execConfigPrivileged = Nothing + , execConfigUser = Nothing + , execConfigWorkingDir = Nothing + } + +-- ** ExecInspectResponse +-- | ExecInspectResponse +-- ExecInspectResponse +-- +data ExecInspectResponse = ExecInspectResponse + { execInspectResponseCanRemove :: !(Maybe Bool) -- ^ "CanRemove" + , execInspectResponseDetachKeys :: !(Maybe Text) -- ^ "DetachKeys" + , execInspectResponseId :: !(Maybe Text) -- ^ "ID" + , execInspectResponseRunning :: !(Maybe Bool) -- ^ "Running" + , execInspectResponseExitCode :: !(Maybe Int) -- ^ "ExitCode" + , execInspectResponseProcessConfig :: !(Maybe ProcessConfig) -- ^ "ProcessConfig" + , execInspectResponseOpenStdin :: !(Maybe Bool) -- ^ "OpenStdin" + , execInspectResponseOpenStderr :: !(Maybe Bool) -- ^ "OpenStderr" + , execInspectResponseOpenStdout :: !(Maybe Bool) -- ^ "OpenStdout" + , execInspectResponseContainerId :: !(Maybe Text) -- ^ "ContainerID" + , execInspectResponsePid :: !(Maybe Int) -- ^ "Pid" - The system process ID for the exec process. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ExecInspectResponse +instance A.FromJSON ExecInspectResponse where + parseJSON = A.withObject "ExecInspectResponse" $ \o -> + ExecInspectResponse + <$> (o .:? "CanRemove") + <*> (o .:? "DetachKeys") + <*> (o .:? "ID") + <*> (o .:? "Running") + <*> (o .:? "ExitCode") + <*> (o .:? "ProcessConfig") + <*> (o .:? "OpenStdin") + <*> (o .:? "OpenStderr") + <*> (o .:? "OpenStdout") + <*> (o .:? "ContainerID") + <*> (o .:? "Pid") + +-- | ToJSON ExecInspectResponse +instance A.ToJSON ExecInspectResponse where + toJSON ExecInspectResponse {..} = + _omitNulls + [ "CanRemove" .= execInspectResponseCanRemove + , "DetachKeys" .= execInspectResponseDetachKeys + , "ID" .= execInspectResponseId + , "Running" .= execInspectResponseRunning + , "ExitCode" .= execInspectResponseExitCode + , "ProcessConfig" .= execInspectResponseProcessConfig + , "OpenStdin" .= execInspectResponseOpenStdin + , "OpenStderr" .= execInspectResponseOpenStderr + , "OpenStdout" .= execInspectResponseOpenStdout + , "ContainerID" .= execInspectResponseContainerId + , "Pid" .= execInspectResponsePid + ] + + +-- | Construct a value of type 'ExecInspectResponse' (by applying it's required fields, if any) +mkExecInspectResponse + :: ExecInspectResponse +mkExecInspectResponse = + ExecInspectResponse + { execInspectResponseCanRemove = Nothing + , execInspectResponseDetachKeys = Nothing + , execInspectResponseId = Nothing + , execInspectResponseRunning = Nothing + , execInspectResponseExitCode = Nothing + , execInspectResponseProcessConfig = Nothing + , execInspectResponseOpenStdin = Nothing + , execInspectResponseOpenStderr = Nothing + , execInspectResponseOpenStdout = Nothing + , execInspectResponseContainerId = Nothing + , execInspectResponsePid = Nothing + } + +-- ** ExecStartConfig +-- | ExecStartConfig +-- ExecStartConfig +-- +data ExecStartConfig = ExecStartConfig + { execStartConfigDetach :: !(Maybe Bool) -- ^ "Detach" - Detach from the command. + , execStartConfigTty :: !(Maybe Bool) -- ^ "Tty" - Allocate a pseudo-TTY. + , execStartConfigConsoleSize :: !(Maybe [Int]) -- ^ "ConsoleSize" - Initial console size, as an `[height, width]` array. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ExecStartConfig +instance A.FromJSON ExecStartConfig where + parseJSON = A.withObject "ExecStartConfig" $ \o -> + ExecStartConfig + <$> (o .:? "Detach") + <*> (o .:? "Tty") + <*> (o .:? "ConsoleSize") + +-- | ToJSON ExecStartConfig +instance A.ToJSON ExecStartConfig where + toJSON ExecStartConfig {..} = + _omitNulls + [ "Detach" .= execStartConfigDetach + , "Tty" .= execStartConfigTty + , "ConsoleSize" .= execStartConfigConsoleSize + ] + + +-- | Construct a value of type 'ExecStartConfig' (by applying it's required fields, if any) +mkExecStartConfig + :: ExecStartConfig +mkExecStartConfig = + ExecStartConfig + { execStartConfigDetach = Nothing + , execStartConfigTty = Nothing + , execStartConfigConsoleSize = Nothing + } + +-- ** FilesystemChange +-- | FilesystemChange +-- Change in the container's filesystem. +data FilesystemChange = FilesystemChange + { filesystemChangePath :: !(Text) -- ^ /Required/ "Path" - Path to file or directory that has changed. + , filesystemChangeKind :: !(ChangeType) -- ^ /Required/ "Kind" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON FilesystemChange +instance A.FromJSON FilesystemChange where + parseJSON = A.withObject "FilesystemChange" $ \o -> + FilesystemChange + <$> (o .: "Path") + <*> (o .: "Kind") + +-- | ToJSON FilesystemChange +instance A.ToJSON FilesystemChange where + toJSON FilesystemChange {..} = + _omitNulls + [ "Path" .= filesystemChangePath + , "Kind" .= filesystemChangeKind + ] + + +-- | Construct a value of type 'FilesystemChange' (by applying it's required fields, if any) +mkFilesystemChange + :: Text -- ^ 'filesystemChangePath': Path to file or directory that has changed. + -> ChangeType -- ^ 'filesystemChangeKind' + -> FilesystemChange +mkFilesystemChange filesystemChangePath filesystemChangeKind = + FilesystemChange + { filesystemChangePath + , filesystemChangeKind + } + +-- ** GenericResourcesInner +-- | GenericResourcesInner +data GenericResourcesInner = GenericResourcesInner + { genericResourcesInnerNamedResourceSpec :: !(Maybe GenericResourcesInnerNamedResourceSpec) -- ^ "NamedResourceSpec" + , genericResourcesInnerDiscreteResourceSpec :: !(Maybe GenericResourcesInnerDiscreteResourceSpec) -- ^ "DiscreteResourceSpec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON GenericResourcesInner +instance A.FromJSON GenericResourcesInner where + parseJSON = A.withObject "GenericResourcesInner" $ \o -> + GenericResourcesInner + <$> (o .:? "NamedResourceSpec") + <*> (o .:? "DiscreteResourceSpec") + +-- | ToJSON GenericResourcesInner +instance A.ToJSON GenericResourcesInner where + toJSON GenericResourcesInner {..} = + _omitNulls + [ "NamedResourceSpec" .= genericResourcesInnerNamedResourceSpec + , "DiscreteResourceSpec" .= genericResourcesInnerDiscreteResourceSpec + ] + + +-- | Construct a value of type 'GenericResourcesInner' (by applying it's required fields, if any) +mkGenericResourcesInner + :: GenericResourcesInner +mkGenericResourcesInner = + GenericResourcesInner + { genericResourcesInnerNamedResourceSpec = Nothing + , genericResourcesInnerDiscreteResourceSpec = Nothing + } + +-- ** GenericResourcesInnerDiscreteResourceSpec +-- | GenericResourcesInnerDiscreteResourceSpec +data GenericResourcesInnerDiscreteResourceSpec = GenericResourcesInnerDiscreteResourceSpec + { genericResourcesInnerDiscreteResourceSpecKind :: !(Maybe Text) -- ^ "Kind" + , genericResourcesInnerDiscreteResourceSpecValue :: !(Maybe Integer) -- ^ "Value" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON GenericResourcesInnerDiscreteResourceSpec +instance A.FromJSON GenericResourcesInnerDiscreteResourceSpec where + parseJSON = A.withObject "GenericResourcesInnerDiscreteResourceSpec" $ \o -> + GenericResourcesInnerDiscreteResourceSpec + <$> (o .:? "Kind") + <*> (o .:? "Value") + +-- | ToJSON GenericResourcesInnerDiscreteResourceSpec +instance A.ToJSON GenericResourcesInnerDiscreteResourceSpec where + toJSON GenericResourcesInnerDiscreteResourceSpec {..} = + _omitNulls + [ "Kind" .= genericResourcesInnerDiscreteResourceSpecKind + , "Value" .= genericResourcesInnerDiscreteResourceSpecValue + ] + + +-- | Construct a value of type 'GenericResourcesInnerDiscreteResourceSpec' (by applying it's required fields, if any) +mkGenericResourcesInnerDiscreteResourceSpec + :: GenericResourcesInnerDiscreteResourceSpec +mkGenericResourcesInnerDiscreteResourceSpec = + GenericResourcesInnerDiscreteResourceSpec + { genericResourcesInnerDiscreteResourceSpecKind = Nothing + , genericResourcesInnerDiscreteResourceSpecValue = Nothing + } + +-- ** GenericResourcesInnerNamedResourceSpec +-- | GenericResourcesInnerNamedResourceSpec +data GenericResourcesInnerNamedResourceSpec = GenericResourcesInnerNamedResourceSpec + { genericResourcesInnerNamedResourceSpecKind :: !(Maybe Text) -- ^ "Kind" + , genericResourcesInnerNamedResourceSpecValue :: !(Maybe Text) -- ^ "Value" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON GenericResourcesInnerNamedResourceSpec +instance A.FromJSON GenericResourcesInnerNamedResourceSpec where + parseJSON = A.withObject "GenericResourcesInnerNamedResourceSpec" $ \o -> + GenericResourcesInnerNamedResourceSpec + <$> (o .:? "Kind") + <*> (o .:? "Value") + +-- | ToJSON GenericResourcesInnerNamedResourceSpec +instance A.ToJSON GenericResourcesInnerNamedResourceSpec where + toJSON GenericResourcesInnerNamedResourceSpec {..} = + _omitNulls + [ "Kind" .= genericResourcesInnerNamedResourceSpecKind + , "Value" .= genericResourcesInnerNamedResourceSpecValue + ] + + +-- | Construct a value of type 'GenericResourcesInnerNamedResourceSpec' (by applying it's required fields, if any) +mkGenericResourcesInnerNamedResourceSpec + :: GenericResourcesInnerNamedResourceSpec +mkGenericResourcesInnerNamedResourceSpec = + GenericResourcesInnerNamedResourceSpec + { genericResourcesInnerNamedResourceSpecKind = Nothing + , genericResourcesInnerNamedResourceSpecValue = Nothing + } + +-- ** GraphDriverData +-- | GraphDriverData +-- Information about the storage driver used to store the container's and image's filesystem. +data GraphDriverData = GraphDriverData + { graphDriverDataName :: !(Text) -- ^ /Required/ "Name" - Name of the storage driver. + , graphDriverDataData :: !((Map.Map String Text)) -- ^ /Required/ "Data" - Low-level storage metadata, provided as key/value pairs. This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON GraphDriverData +instance A.FromJSON GraphDriverData where + parseJSON = A.withObject "GraphDriverData" $ \o -> + GraphDriverData + <$> (o .: "Name") + <*> (o .: "Data") + +-- | ToJSON GraphDriverData +instance A.ToJSON GraphDriverData where + toJSON GraphDriverData {..} = + _omitNulls + [ "Name" .= graphDriverDataName + , "Data" .= graphDriverDataData + ] + + +-- | Construct a value of type 'GraphDriverData' (by applying it's required fields, if any) +mkGraphDriverData + :: Text -- ^ 'graphDriverDataName': Name of the storage driver. + -> (Map.Map String Text) -- ^ 'graphDriverDataData': Low-level storage metadata, provided as key/value pairs. This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only. + -> GraphDriverData +mkGraphDriverData graphDriverDataName graphDriverDataData = + GraphDriverData + { graphDriverDataName + , graphDriverDataData + } + +-- ** Health +-- | Health +-- Health stores information about the container's healthcheck results. +data Health = Health + { healthStatus :: !(Maybe E'Status) -- ^ "Status" - Status is one of `none`, `starting`, `healthy` or `unhealthy` - \"none\" Indicates there is no healthcheck - \"starting\" Starting indicates that the container is not yet ready - \"healthy\" Healthy indicates that the container is running correctly - \"unhealthy\" Unhealthy indicates that the container has a problem + , healthFailingStreak :: !(Maybe Int) -- ^ "FailingStreak" - FailingStreak is the number of consecutive failures + , healthLog :: !(Maybe [HealthcheckResult]) -- ^ "Log" - Log contains the last few results (oldest first) + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Health +instance A.FromJSON Health where + parseJSON = A.withObject "Health" $ \o -> + Health + <$> (o .:? "Status") + <*> (o .:? "FailingStreak") + <*> (o .:? "Log") + +-- | ToJSON Health +instance A.ToJSON Health where + toJSON Health {..} = + _omitNulls + [ "Status" .= healthStatus + , "FailingStreak" .= healthFailingStreak + , "Log" .= healthLog + ] + + +-- | Construct a value of type 'Health' (by applying it's required fields, if any) +mkHealth + :: Health +mkHealth = + Health + { healthStatus = Nothing + , healthFailingStreak = Nothing + , healthLog = Nothing + } + +-- ** HealthConfig +-- | HealthConfig +-- A test to perform to check that the container is healthy. +data HealthConfig = HealthConfig + { healthConfigTest :: !(Maybe [Text]) -- ^ "Test" - The test to perform. Possible values are: - `[]` inherit healthcheck from image or parent image - `[\"NONE\"]` disable healthcheck - `[\"CMD\", args...]` exec arguments directly - `[\"CMD-SHELL\", command]` run command with system's default shell + , healthConfigInterval :: !(Maybe Integer) -- ^ "Interval" - The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit. + , healthConfigTimeout :: !(Maybe Integer) -- ^ "Timeout" - The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). 0 means inherit. + , healthConfigRetries :: !(Maybe Int) -- ^ "Retries" - The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit. + , healthConfigStartPeriod :: !(Maybe Integer) -- ^ "StartPeriod" - Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit. + , healthConfigStartInterval :: !(Maybe Integer) -- ^ "StartInterval" - The time to wait between checks in nanoseconds during the start period. It should be 0 or at least 1000000 (1 ms). 0 means inherit. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON HealthConfig +instance A.FromJSON HealthConfig where + parseJSON = A.withObject "HealthConfig" $ \o -> + HealthConfig + <$> (o .:? "Test") + <*> (o .:? "Interval") + <*> (o .:? "Timeout") + <*> (o .:? "Retries") + <*> (o .:? "StartPeriod") + <*> (o .:? "StartInterval") + +-- | ToJSON HealthConfig +instance A.ToJSON HealthConfig where + toJSON HealthConfig {..} = + _omitNulls + [ "Test" .= healthConfigTest + , "Interval" .= healthConfigInterval + , "Timeout" .= healthConfigTimeout + , "Retries" .= healthConfigRetries + , "StartPeriod" .= healthConfigStartPeriod + , "StartInterval" .= healthConfigStartInterval + ] + + +-- | Construct a value of type 'HealthConfig' (by applying it's required fields, if any) +mkHealthConfig + :: HealthConfig +mkHealthConfig = + HealthConfig + { healthConfigTest = Nothing + , healthConfigInterval = Nothing + , healthConfigTimeout = Nothing + , healthConfigRetries = Nothing + , healthConfigStartPeriod = Nothing + , healthConfigStartInterval = Nothing + } + +-- ** HealthcheckResult +-- | HealthcheckResult +-- HealthcheckResult stores information about a single run of a healthcheck probe +data HealthcheckResult = HealthcheckResult + { healthcheckResultStart :: !(Maybe DateTime) -- ^ "Start" - Date and time at which this check started in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , healthcheckResultEnd :: !(Maybe Text) -- ^ "End" - Date and time at which this check ended in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , healthcheckResultExitCode :: !(Maybe Int) -- ^ "ExitCode" - ExitCode meanings: - `0` healthy - `1` unhealthy - `2` reserved (considered unhealthy) - other values: error running probe + , healthcheckResultOutput :: !(Maybe Text) -- ^ "Output" - Output from last check + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON HealthcheckResult +instance A.FromJSON HealthcheckResult where + parseJSON = A.withObject "HealthcheckResult" $ \o -> + HealthcheckResult + <$> (o .:? "Start") + <*> (o .:? "End") + <*> (o .:? "ExitCode") + <*> (o .:? "Output") + +-- | ToJSON HealthcheckResult +instance A.ToJSON HealthcheckResult where + toJSON HealthcheckResult {..} = + _omitNulls + [ "Start" .= healthcheckResultStart + , "End" .= healthcheckResultEnd + , "ExitCode" .= healthcheckResultExitCode + , "Output" .= healthcheckResultOutput + ] + + +-- | Construct a value of type 'HealthcheckResult' (by applying it's required fields, if any) +mkHealthcheckResult + :: HealthcheckResult +mkHealthcheckResult = + HealthcheckResult + { healthcheckResultStart = Nothing + , healthcheckResultEnd = Nothing + , healthcheckResultExitCode = Nothing + , healthcheckResultOutput = Nothing + } + +-- ** HistoryResponseItem +-- | HistoryResponseItem +-- HistoryResponseItem +-- +-- individual image layer information in response to ImageHistory operation +data HistoryResponseItem = HistoryResponseItem + { historyResponseItemId :: !(Text) -- ^ /Required/ "Id" + , historyResponseItemCreated :: !(Integer) -- ^ /Required/ "Created" + , historyResponseItemCreatedBy :: !(Text) -- ^ /Required/ "CreatedBy" + , historyResponseItemTags :: !([Text]) -- ^ /Required/ "Tags" + , historyResponseItemSize :: !(Integer) -- ^ /Required/ "Size" + , historyResponseItemComment :: !(Text) -- ^ /Required/ "Comment" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON HistoryResponseItem +instance A.FromJSON HistoryResponseItem where + parseJSON = A.withObject "HistoryResponseItem" $ \o -> + HistoryResponseItem + <$> (o .: "Id") + <*> (o .: "Created") + <*> (o .: "CreatedBy") + <*> (o .: "Tags") + <*> (o .: "Size") + <*> (o .: "Comment") + +-- | ToJSON HistoryResponseItem +instance A.ToJSON HistoryResponseItem where + toJSON HistoryResponseItem {..} = + _omitNulls + [ "Id" .= historyResponseItemId + , "Created" .= historyResponseItemCreated + , "CreatedBy" .= historyResponseItemCreatedBy + , "Tags" .= historyResponseItemTags + , "Size" .= historyResponseItemSize + , "Comment" .= historyResponseItemComment + ] + + +-- | Construct a value of type 'HistoryResponseItem' (by applying it's required fields, if any) +mkHistoryResponseItem + :: Text -- ^ 'historyResponseItemId' + -> Integer -- ^ 'historyResponseItemCreated' + -> Text -- ^ 'historyResponseItemCreatedBy' + -> [Text] -- ^ 'historyResponseItemTags' + -> Integer -- ^ 'historyResponseItemSize' + -> Text -- ^ 'historyResponseItemComment' + -> HistoryResponseItem +mkHistoryResponseItem historyResponseItemId historyResponseItemCreated historyResponseItemCreatedBy historyResponseItemTags historyResponseItemSize historyResponseItemComment = + HistoryResponseItem + { historyResponseItemId + , historyResponseItemCreated + , historyResponseItemCreatedBy + , historyResponseItemTags + , historyResponseItemSize + , historyResponseItemComment + } + +-- ** HostConfig +-- | HostConfig +-- Container configuration that depends on the host we are running on +data HostConfig = HostConfig + { hostConfigCpuShares :: !(Maybe Int) -- ^ "CpuShares" - An integer value representing this container's relative CPU weight versus other containers. + , hostConfigMemory :: !(Maybe Integer) -- ^ "Memory" - Memory limit in bytes. + , hostConfigCgroupParent :: !(Maybe Text) -- ^ "CgroupParent" - Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + , hostConfigBlkioWeight :: !(Maybe Int) -- ^ "BlkioWeight" - Block IO weight (relative weight). + , hostConfigBlkioWeightDevice :: !(Maybe [ResourcesBlkioWeightDeviceInner]) -- ^ "BlkioWeightDevice" - Block IO weight (relative device weight) in the form: ``` [{\"Path\": \"device_path\", \"Weight\": weight}] ``` + , hostConfigBlkioDeviceReadBps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceReadBps" - Limit read rate (bytes per second) from a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , hostConfigBlkioDeviceWriteBps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceWriteBps" - Limit write rate (bytes per second) to a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , hostConfigBlkioDeviceReadIOps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceReadIOps" - Limit read rate (IO per second) from a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , hostConfigBlkioDeviceWriteIOps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceWriteIOps" - Limit write rate (IO per second) to a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , hostConfigCpuPeriod :: !(Maybe Integer) -- ^ "CpuPeriod" - The length of a CPU period in microseconds. + , hostConfigCpuQuota :: !(Maybe Integer) -- ^ "CpuQuota" - Microseconds of CPU time that the container can get in a CPU period. + , hostConfigCpuRealtimePeriod :: !(Maybe Integer) -- ^ "CpuRealtimePeriod" - The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + , hostConfigCpuRealtimeRuntime :: !(Maybe Integer) -- ^ "CpuRealtimeRuntime" - The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + , hostConfigCpusetCpus :: !(Maybe Text) -- ^ "CpusetCpus" - CPUs in which to allow execution (e.g., `0-3`, `0,1`). + , hostConfigCpusetMems :: !(Maybe Text) -- ^ "CpusetMems" - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + , hostConfigDevices :: !(Maybe [DeviceMapping]) -- ^ "Devices" - A list of devices to add to the container. + , hostConfigDeviceCgroupRules :: !(Maybe [Text]) -- ^ "DeviceCgroupRules" - a list of cgroup rules to apply to the container + , hostConfigDeviceRequests :: !(Maybe [DeviceRequest]) -- ^ "DeviceRequests" - A list of requests for devices to be sent to device drivers. + , hostConfigKernelMemoryTcp :: !(Maybe Integer) -- ^ "KernelMemoryTCP" - Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. + , hostConfigMemoryReservation :: !(Maybe Integer) -- ^ "MemoryReservation" - Memory soft limit in bytes. + , hostConfigMemorySwap :: !(Maybe Integer) -- ^ "MemorySwap" - Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + , hostConfigMemorySwappiness :: !(Maybe Integer) -- ^ "MemorySwappiness" - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + , hostConfigNanoCpus :: !(Maybe Integer) -- ^ "NanoCpus" - CPU quota in units of 10<sup>-9</sup> CPUs. + , hostConfigOomKillDisable :: !(Maybe Bool) -- ^ "OomKillDisable" - Disable OOM Killer for the container. + , hostConfigInit :: !(Maybe Bool) -- ^ "Init" - Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + , hostConfigPidsLimit :: !(Maybe Integer) -- ^ "PidsLimit" - Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not change. + , hostConfigUlimits :: !(Maybe [ResourcesUlimitsInner]) -- ^ "Ulimits" - A list of resource limits to set in the container. For example: ``` {\"Name\": \"nofile\", \"Soft\": 1024, \"Hard\": 2048} ``` + , hostConfigCpuCount :: !(Maybe Integer) -- ^ "CpuCount" - The number of usable CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + , hostConfigCpuPercent :: !(Maybe Integer) -- ^ "CpuPercent" - The usable percentage of the available CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + , hostConfigIoMaximumIOps :: !(Maybe Integer) -- ^ "IOMaximumIOps" - Maximum IOps for the container system drive (Windows only) + , hostConfigIoMaximumBandwidth :: !(Maybe Integer) -- ^ "IOMaximumBandwidth" - Maximum IO in bytes per second for the container system drive (Windows only). + , hostConfigBinds :: !(Maybe [Text]) -- ^ "Binds" - A list of volume bindings for this container. Each volume binding is a string in one of these forms: - `host-src:container-dest[:options]` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - `volume-name:container-dest[:options]` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. `options` is an optional, comma-delimited list of: - `nocopy` disables automatic copying of data from the container path to the volume. The `nocopy` flag only applies to named volumes. - `[ro|rw]` mounts a volume read-only or read-write, respectively. If omitted or set to `rw`, volumes are mounted read-write. - `[z|Z]` applies SELinux labels to allow or deny multiple containers to read and write to the same volume. - `z`: a _shared_ content label is applied to the content. This label indicates that multiple containers can share the volume content, for both reading and writing. - `Z`: a _private unshared_ label is applied to the content. This label indicates that only the current container can use a private volume. Labeling systems such as SELinux require proper labels to be placed on volume content that is mounted into a container. Without a label, the security system can prevent a container's processes from using the content. By default, the labels set by the host operating system are not modified. - `[[r]shared|[r]slave|[r]private]` specifies mount [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). This only applies to bind-mounted volumes, not internal volumes or named volumes. Mount propagation requires the source mount point (the location where the source directory is mounted in the host operating system) to have the correct propagation properties. For shared volumes, the source mount point must be set to `shared`. For slave volumes, the mount must be set to either `shared` or `slave`. + , hostConfigContainerIdFile :: !(Maybe Text) -- ^ "ContainerIDFile" - Path to a file where the container ID is written + , hostConfigLogConfig :: !(Maybe HostConfigAllOfLogConfig) -- ^ "LogConfig" + , hostConfigNetworkMode :: !(Maybe Text) -- ^ "NetworkMode" - Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken as a custom network's name to which this container should connect to. + , hostConfigPortBindings :: !(Maybe (Map.Map String [PortBinding])) -- ^ "PortBindings" - PortMap describes the mapping of container ports to host ports, using the container's port-number and protocol as key in the format `<port>/<protocol>`, for example, `80/udp`. If a container's port is mapped for multiple protocols, separate entries are added to the mapping table. + , hostConfigRestartPolicy :: !(Maybe RestartPolicy) -- ^ "RestartPolicy" + , hostConfigAutoRemove :: !(Maybe Bool) -- ^ "AutoRemove" - Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set. + , hostConfigVolumeDriver :: !(Maybe Text) -- ^ "VolumeDriver" - Driver that this container uses to mount volumes. + , hostConfigVolumesFrom :: !(Maybe [Text]) -- ^ "VolumesFrom" - A list of volumes to inherit from another container, specified in the form `<container name>[:<ro|rw>]`. + , hostConfigMounts :: !(Maybe [Mount]) -- ^ "Mounts" - Specification for mounts to be added to the container. + , hostConfigConsoleSize :: !(Maybe [Int]) -- ^ "ConsoleSize" - Initial console size, as an `[height, width]` array. + , hostConfigAnnotations :: !(Maybe (Map.Map String Text)) -- ^ "Annotations" - Arbitrary non-identifying metadata attached to container and provided to the runtime when the container is started. + , hostConfigCapAdd :: !(Maybe [Text]) -- ^ "CapAdd" - A list of kernel capabilities to add to the container. Conflicts with option 'Capabilities'. + , hostConfigCapDrop :: !(Maybe [Text]) -- ^ "CapDrop" - A list of kernel capabilities to drop from the container. Conflicts with option 'Capabilities'. + , hostConfigCgroupnsMode :: !(Maybe E'CgroupnsMode) -- ^ "CgroupnsMode" - cgroup namespace mode for the container. Possible values are: - `\"private\"`: the container runs in its own private cgroup namespace - `\"host\"`: use the host system's cgroup namespace If not specified, the daemon default is used, which can either be `\"private\"` or `\"host\"`, depending on daemon version, kernel support and configuration. + , hostConfigDns :: !(Maybe [Text]) -- ^ "Dns" - A list of DNS servers for the container to use. + , hostConfigDnsOptions :: !(Maybe [Text]) -- ^ "DnsOptions" - A list of DNS options. + , hostConfigDnsSearch :: !(Maybe [Text]) -- ^ "DnsSearch" - A list of DNS search domains. + , hostConfigExtraHosts :: !(Maybe [Text]) -- ^ "ExtraHosts" - A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `[\"hostname:IP\"]`. + , hostConfigGroupAdd :: !(Maybe [Text]) -- ^ "GroupAdd" - A list of additional groups that the container process will run as. + , hostConfigIpcMode :: !(Maybe Text) -- ^ "IpcMode" - IPC sharing mode for the container. Possible values are: - `\"none\"`: own private IPC namespace, with /dev/shm not mounted - `\"private\"`: own private IPC namespace - `\"shareable\"`: own private IPC namespace, with a possibility to share it with other containers - `\"container:<name|id>\"`: join another (shareable) container's IPC namespace - `\"host\"`: use the host system's IPC namespace If not specified, daemon default is used, which can either be `\"private\"` or `\"shareable\"`, depending on daemon version and configuration. + , hostConfigCgroup :: !(Maybe Text) -- ^ "Cgroup" - Cgroup to use for the container. + , hostConfigLinks :: !(Maybe [Text]) -- ^ "Links" - A list of links for the container in the form `container_name:alias`. + , hostConfigOomScoreAdj :: !(Maybe Int) -- ^ "OomScoreAdj" - An integer value containing the score given to the container in order to tune OOM killer preferences. + , hostConfigPidMode :: !(Maybe Text) -- ^ "PidMode" - Set the PID (Process) Namespace mode for the container. It can be either: - `\"container:<name|id>\"`: joins another container's PID namespace - `\"host\"`: use the host's PID namespace inside the container + , hostConfigPrivileged :: !(Maybe Bool) -- ^ "Privileged" - Gives the container full access to the host. + , hostConfigPublishAllPorts :: !(Maybe Bool) -- ^ "PublishAllPorts" - Allocates an ephemeral host port for all of a container's exposed ports. Ports are de-allocated when the container stops and allocated when the container starts. The allocated port might be changed when restarting the container. The port is selected from the ephemeral port range that depends on the kernel. For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`. + , hostConfigReadonlyRootfs :: !(Maybe Bool) -- ^ "ReadonlyRootfs" - Mount the container's root filesystem as read only. + , hostConfigSecurityOpt :: !(Maybe [Text]) -- ^ "SecurityOpt" - A list of string values to customize labels for MLS systems, such as SELinux. + , hostConfigStorageOpt :: !(Maybe (Map.Map String Text)) -- ^ "StorageOpt" - Storage driver options for this container, in the form `{\"size\": \"120G\"}`. + , hostConfigTmpfs :: !(Maybe (Map.Map String Text)) -- ^ "Tmpfs" - A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: ``` { \"/run\": \"rw,noexec,nosuid,size=65536k\" } ``` + , hostConfigUtsMode :: !(Maybe Text) -- ^ "UTSMode" - UTS namespace to use for the container. + , hostConfigUsernsMode :: !(Maybe Text) -- ^ "UsernsMode" - Sets the usernamespace mode for the container when usernamespace remapping option is enabled. + , hostConfigShmSize :: !(Maybe Integer) -- ^ "ShmSize" - Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. + , hostConfigSysctls :: !(Maybe (Map.Map String Text)) -- ^ "Sysctls" - A list of kernel parameters (sysctls) to set in the container. For example: ``` {\"net.ipv4.ip_forward\": \"1\"} ``` + , hostConfigRuntime :: !(Maybe Text) -- ^ "Runtime" - Runtime to use with this container. + , hostConfigIsolation :: !(Maybe E'Isolation) -- ^ "Isolation" - Isolation technology of the container. (Windows only) + , hostConfigMaskedPaths :: !(Maybe [Text]) -- ^ "MaskedPaths" - The list of paths to be masked inside the container (this overrides the default set of paths). + , hostConfigReadonlyPaths :: !(Maybe [Text]) -- ^ "ReadonlyPaths" - The list of paths to be set as read-only inside the container (this overrides the default set of paths). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON HostConfig +instance A.FromJSON HostConfig where + parseJSON = A.withObject "HostConfig" $ \o -> + HostConfig + <$> (o .:? "CpuShares") + <*> (o .:? "Memory") + <*> (o .:? "CgroupParent") + <*> (o .:? "BlkioWeight") + <*> (o .:? "BlkioWeightDevice") + <*> (o .:? "BlkioDeviceReadBps") + <*> (o .:? "BlkioDeviceWriteBps") + <*> (o .:? "BlkioDeviceReadIOps") + <*> (o .:? "BlkioDeviceWriteIOps") + <*> (o .:? "CpuPeriod") + <*> (o .:? "CpuQuota") + <*> (o .:? "CpuRealtimePeriod") + <*> (o .:? "CpuRealtimeRuntime") + <*> (o .:? "CpusetCpus") + <*> (o .:? "CpusetMems") + <*> (o .:? "Devices") + <*> (o .:? "DeviceCgroupRules") + <*> (o .:? "DeviceRequests") + <*> (o .:? "KernelMemoryTCP") + <*> (o .:? "MemoryReservation") + <*> (o .:? "MemorySwap") + <*> (o .:? "MemorySwappiness") + <*> (o .:? "NanoCpus") + <*> (o .:? "OomKillDisable") + <*> (o .:? "Init") + <*> (o .:? "PidsLimit") + <*> (o .:? "Ulimits") + <*> (o .:? "CpuCount") + <*> (o .:? "CpuPercent") + <*> (o .:? "IOMaximumIOps") + <*> (o .:? "IOMaximumBandwidth") + <*> (o .:? "Binds") + <*> (o .:? "ContainerIDFile") + <*> (o .:? "LogConfig") + <*> (o .:? "NetworkMode") + <*> (o .:? "PortBindings") + <*> (o .:? "RestartPolicy") + <*> (o .:? "AutoRemove") + <*> (o .:? "VolumeDriver") + <*> (o .:? "VolumesFrom") + <*> (o .:? "Mounts") + <*> (o .:? "ConsoleSize") + <*> (o .:? "Annotations") + <*> (o .:? "CapAdd") + <*> (o .:? "CapDrop") + <*> (o .:? "CgroupnsMode") + <*> (o .:? "Dns") + <*> (o .:? "DnsOptions") + <*> (o .:? "DnsSearch") + <*> (o .:? "ExtraHosts") + <*> (o .:? "GroupAdd") + <*> (o .:? "IpcMode") + <*> (o .:? "Cgroup") + <*> (o .:? "Links") + <*> (o .:? "OomScoreAdj") + <*> (o .:? "PidMode") + <*> (o .:? "Privileged") + <*> (o .:? "PublishAllPorts") + <*> (o .:? "ReadonlyRootfs") + <*> (o .:? "SecurityOpt") + <*> (o .:? "StorageOpt") + <*> (o .:? "Tmpfs") + <*> (o .:? "UTSMode") + <*> (o .:? "UsernsMode") + <*> (o .:? "ShmSize") + <*> (o .:? "Sysctls") + <*> (o .:? "Runtime") + <*> (o .:? "Isolation") + <*> (o .:? "MaskedPaths") + <*> (o .:? "ReadonlyPaths") + +-- | ToJSON HostConfig +instance A.ToJSON HostConfig where + toJSON HostConfig {..} = + _omitNulls + [ "CpuShares" .= hostConfigCpuShares + , "Memory" .= hostConfigMemory + , "CgroupParent" .= hostConfigCgroupParent + , "BlkioWeight" .= hostConfigBlkioWeight + , "BlkioWeightDevice" .= hostConfigBlkioWeightDevice + , "BlkioDeviceReadBps" .= hostConfigBlkioDeviceReadBps + , "BlkioDeviceWriteBps" .= hostConfigBlkioDeviceWriteBps + , "BlkioDeviceReadIOps" .= hostConfigBlkioDeviceReadIOps + , "BlkioDeviceWriteIOps" .= hostConfigBlkioDeviceWriteIOps + , "CpuPeriod" .= hostConfigCpuPeriod + , "CpuQuota" .= hostConfigCpuQuota + , "CpuRealtimePeriod" .= hostConfigCpuRealtimePeriod + , "CpuRealtimeRuntime" .= hostConfigCpuRealtimeRuntime + , "CpusetCpus" .= hostConfigCpusetCpus + , "CpusetMems" .= hostConfigCpusetMems + , "Devices" .= hostConfigDevices + , "DeviceCgroupRules" .= hostConfigDeviceCgroupRules + , "DeviceRequests" .= hostConfigDeviceRequests + , "KernelMemoryTCP" .= hostConfigKernelMemoryTcp + , "MemoryReservation" .= hostConfigMemoryReservation + , "MemorySwap" .= hostConfigMemorySwap + , "MemorySwappiness" .= hostConfigMemorySwappiness + , "NanoCpus" .= hostConfigNanoCpus + , "OomKillDisable" .= hostConfigOomKillDisable + , "Init" .= hostConfigInit + , "PidsLimit" .= hostConfigPidsLimit + , "Ulimits" .= hostConfigUlimits + , "CpuCount" .= hostConfigCpuCount + , "CpuPercent" .= hostConfigCpuPercent + , "IOMaximumIOps" .= hostConfigIoMaximumIOps + , "IOMaximumBandwidth" .= hostConfigIoMaximumBandwidth + , "Binds" .= hostConfigBinds + , "ContainerIDFile" .= hostConfigContainerIdFile + , "LogConfig" .= hostConfigLogConfig + , "NetworkMode" .= hostConfigNetworkMode + , "PortBindings" .= hostConfigPortBindings + , "RestartPolicy" .= hostConfigRestartPolicy + , "AutoRemove" .= hostConfigAutoRemove + , "VolumeDriver" .= hostConfigVolumeDriver + , "VolumesFrom" .= hostConfigVolumesFrom + , "Mounts" .= hostConfigMounts + , "ConsoleSize" .= hostConfigConsoleSize + , "Annotations" .= hostConfigAnnotations + , "CapAdd" .= hostConfigCapAdd + , "CapDrop" .= hostConfigCapDrop + , "CgroupnsMode" .= hostConfigCgroupnsMode + , "Dns" .= hostConfigDns + , "DnsOptions" .= hostConfigDnsOptions + , "DnsSearch" .= hostConfigDnsSearch + , "ExtraHosts" .= hostConfigExtraHosts + , "GroupAdd" .= hostConfigGroupAdd + , "IpcMode" .= hostConfigIpcMode + , "Cgroup" .= hostConfigCgroup + , "Links" .= hostConfigLinks + , "OomScoreAdj" .= hostConfigOomScoreAdj + , "PidMode" .= hostConfigPidMode + , "Privileged" .= hostConfigPrivileged + , "PublishAllPorts" .= hostConfigPublishAllPorts + , "ReadonlyRootfs" .= hostConfigReadonlyRootfs + , "SecurityOpt" .= hostConfigSecurityOpt + , "StorageOpt" .= hostConfigStorageOpt + , "Tmpfs" .= hostConfigTmpfs + , "UTSMode" .= hostConfigUtsMode + , "UsernsMode" .= hostConfigUsernsMode + , "ShmSize" .= hostConfigShmSize + , "Sysctls" .= hostConfigSysctls + , "Runtime" .= hostConfigRuntime + , "Isolation" .= hostConfigIsolation + , "MaskedPaths" .= hostConfigMaskedPaths + , "ReadonlyPaths" .= hostConfigReadonlyPaths + ] + + +-- | Construct a value of type 'HostConfig' (by applying it's required fields, if any) +mkHostConfig + :: HostConfig +mkHostConfig = + HostConfig + { hostConfigCpuShares = Nothing + , hostConfigMemory = Nothing + , hostConfigCgroupParent = Nothing + , hostConfigBlkioWeight = Nothing + , hostConfigBlkioWeightDevice = Nothing + , hostConfigBlkioDeviceReadBps = Nothing + , hostConfigBlkioDeviceWriteBps = Nothing + , hostConfigBlkioDeviceReadIOps = Nothing + , hostConfigBlkioDeviceWriteIOps = Nothing + , hostConfigCpuPeriod = Nothing + , hostConfigCpuQuota = Nothing + , hostConfigCpuRealtimePeriod = Nothing + , hostConfigCpuRealtimeRuntime = Nothing + , hostConfigCpusetCpus = Nothing + , hostConfigCpusetMems = Nothing + , hostConfigDevices = Nothing + , hostConfigDeviceCgroupRules = Nothing + , hostConfigDeviceRequests = Nothing + , hostConfigKernelMemoryTcp = Nothing + , hostConfigMemoryReservation = Nothing + , hostConfigMemorySwap = Nothing + , hostConfigMemorySwappiness = Nothing + , hostConfigNanoCpus = Nothing + , hostConfigOomKillDisable = Nothing + , hostConfigInit = Nothing + , hostConfigPidsLimit = Nothing + , hostConfigUlimits = Nothing + , hostConfigCpuCount = Nothing + , hostConfigCpuPercent = Nothing + , hostConfigIoMaximumIOps = Nothing + , hostConfigIoMaximumBandwidth = Nothing + , hostConfigBinds = Nothing + , hostConfigContainerIdFile = Nothing + , hostConfigLogConfig = Nothing + , hostConfigNetworkMode = Nothing + , hostConfigPortBindings = Nothing + , hostConfigRestartPolicy = Nothing + , hostConfigAutoRemove = Nothing + , hostConfigVolumeDriver = Nothing + , hostConfigVolumesFrom = Nothing + , hostConfigMounts = Nothing + , hostConfigConsoleSize = Nothing + , hostConfigAnnotations = Nothing + , hostConfigCapAdd = Nothing + , hostConfigCapDrop = Nothing + , hostConfigCgroupnsMode = Nothing + , hostConfigDns = Nothing + , hostConfigDnsOptions = Nothing + , hostConfigDnsSearch = Nothing + , hostConfigExtraHosts = Nothing + , hostConfigGroupAdd = Nothing + , hostConfigIpcMode = Nothing + , hostConfigCgroup = Nothing + , hostConfigLinks = Nothing + , hostConfigOomScoreAdj = Nothing + , hostConfigPidMode = Nothing + , hostConfigPrivileged = Nothing + , hostConfigPublishAllPorts = Nothing + , hostConfigReadonlyRootfs = Nothing + , hostConfigSecurityOpt = Nothing + , hostConfigStorageOpt = Nothing + , hostConfigTmpfs = Nothing + , hostConfigUtsMode = Nothing + , hostConfigUsernsMode = Nothing + , hostConfigShmSize = Nothing + , hostConfigSysctls = Nothing + , hostConfigRuntime = Nothing + , hostConfigIsolation = Nothing + , hostConfigMaskedPaths = Nothing + , hostConfigReadonlyPaths = Nothing + } + +-- ** HostConfigAllOfLogConfig +-- | HostConfigAllOfLogConfig +-- The logging configuration for this container +data HostConfigAllOfLogConfig = HostConfigAllOfLogConfig + { hostConfigAllOfLogConfigType :: !(Maybe E'Type5) -- ^ "Type" + , hostConfigAllOfLogConfigConfig :: !(Maybe (Map.Map String Text)) -- ^ "Config" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON HostConfigAllOfLogConfig +instance A.FromJSON HostConfigAllOfLogConfig where + parseJSON = A.withObject "HostConfigAllOfLogConfig" $ \o -> + HostConfigAllOfLogConfig + <$> (o .:? "Type") + <*> (o .:? "Config") + +-- | ToJSON HostConfigAllOfLogConfig +instance A.ToJSON HostConfigAllOfLogConfig where + toJSON HostConfigAllOfLogConfig {..} = + _omitNulls + [ "Type" .= hostConfigAllOfLogConfigType + , "Config" .= hostConfigAllOfLogConfigConfig + ] + + +-- | Construct a value of type 'HostConfigAllOfLogConfig' (by applying it's required fields, if any) +mkHostConfigAllOfLogConfig + :: HostConfigAllOfLogConfig +mkHostConfigAllOfLogConfig = + HostConfigAllOfLogConfig + { hostConfigAllOfLogConfigType = Nothing + , hostConfigAllOfLogConfigConfig = Nothing + } + +-- ** IPAM +-- | IPAM +data IPAM = IPAM + { iPAMDriver :: !(Maybe Text) -- ^ "Driver" - Name of the IPAM driver to use. + , iPAMConfig :: !(Maybe [IPAMConfig]) -- ^ "Config" - List of IPAM configuration options, specified as a map: ``` {\"Subnet\": <CIDR>, \"IPRange\": <CIDR>, \"Gateway\": <IP address>, \"AuxAddress\": <device_name:IP address>} ``` + , iPAMOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - Driver-specific options, specified as a map. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON IPAM +instance A.FromJSON IPAM where + parseJSON = A.withObject "IPAM" $ \o -> + IPAM + <$> (o .:? "Driver") + <*> (o .:? "Config") + <*> (o .:? "Options") + +-- | ToJSON IPAM +instance A.ToJSON IPAM where + toJSON IPAM {..} = + _omitNulls + [ "Driver" .= iPAMDriver + , "Config" .= iPAMConfig + , "Options" .= iPAMOptions + ] + + +-- | Construct a value of type 'IPAM' (by applying it's required fields, if any) +mkIPAM + :: IPAM +mkIPAM = + IPAM + { iPAMDriver = Nothing + , iPAMConfig = Nothing + , iPAMOptions = Nothing + } + +-- ** IPAMConfig +-- | IPAMConfig +data IPAMConfig = IPAMConfig + { iPAMConfigSubnet :: !(Maybe Text) -- ^ "Subnet" + , iPAMConfigIpRange :: !(Maybe Text) -- ^ "IPRange" + , iPAMConfigGateway :: !(Maybe Text) -- ^ "Gateway" + , iPAMConfigAuxiliaryAddresses :: !(Maybe (Map.Map String Text)) -- ^ "AuxiliaryAddresses" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON IPAMConfig +instance A.FromJSON IPAMConfig where + parseJSON = A.withObject "IPAMConfig" $ \o -> + IPAMConfig + <$> (o .:? "Subnet") + <*> (o .:? "IPRange") + <*> (o .:? "Gateway") + <*> (o .:? "AuxiliaryAddresses") + +-- | ToJSON IPAMConfig +instance A.ToJSON IPAMConfig where + toJSON IPAMConfig {..} = + _omitNulls + [ "Subnet" .= iPAMConfigSubnet + , "IPRange" .= iPAMConfigIpRange + , "Gateway" .= iPAMConfigGateway + , "AuxiliaryAddresses" .= iPAMConfigAuxiliaryAddresses + ] + + +-- | Construct a value of type 'IPAMConfig' (by applying it's required fields, if any) +mkIPAMConfig + :: IPAMConfig +mkIPAMConfig = + IPAMConfig + { iPAMConfigSubnet = Nothing + , iPAMConfigIpRange = Nothing + , iPAMConfigGateway = Nothing + , iPAMConfigAuxiliaryAddresses = Nothing + } + +-- ** IdResponse +-- | IdResponse +-- Response to an API call that returns just an Id +data IdResponse = IdResponse + { idResponseId :: !(Text) -- ^ /Required/ "Id" - The id of the newly created object. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON IdResponse +instance A.FromJSON IdResponse where + parseJSON = A.withObject "IdResponse" $ \o -> + IdResponse + <$> (o .: "Id") + +-- | ToJSON IdResponse +instance A.ToJSON IdResponse where + toJSON IdResponse {..} = + _omitNulls + [ "Id" .= idResponseId + ] + + +-- | Construct a value of type 'IdResponse' (by applying it's required fields, if any) +mkIdResponse + :: Text -- ^ 'idResponseId': The id of the newly created object. + -> IdResponse +mkIdResponse idResponseId = + IdResponse + { idResponseId + } + +-- ** ImageConfig +-- | ImageConfig +-- Configuration of the image. These fields are used as defaults when starting a container from the image. +data ImageConfig = ImageConfig + { imageConfigHostname :: !(Maybe Text) -- ^ "Hostname" - The hostname to use for the container, as a valid RFC 1123 hostname. <p><br /></p> > **Note**: this field is always empty and must not be used. + , imageConfigDomainname :: !(Maybe Text) -- ^ "Domainname" - The domain name to use for the container. <p><br /></p> > **Note**: this field is always empty and must not be used. + , imageConfigUser :: !(Maybe Text) -- ^ "User" - The user that commands are run as inside the container. + , imageConfigAttachStdin :: !(Maybe Bool) -- ^ "AttachStdin" - Whether to attach to `stdin`. <p><br /></p> > **Note**: this field is always false and must not be used. + , imageConfigAttachStdout :: !(Maybe Bool) -- ^ "AttachStdout" - Whether to attach to `stdout`. <p><br /></p> > **Note**: this field is always false and must not be used. + , imageConfigAttachStderr :: !(Maybe Bool) -- ^ "AttachStderr" - Whether to attach to `stderr`. <p><br /></p> > **Note**: this field is always false and must not be used. + , imageConfigExposedPorts :: !(Maybe (Map.Map String A.Value)) -- ^ "ExposedPorts" - An object mapping ports to an empty object in the form: `{\"<port>/<tcp|udp|sctp>\": {}}` + , imageConfigTty :: !(Maybe Bool) -- ^ "Tty" - Attach standard streams to a TTY, including `stdin` if it is not closed. <p><br /></p> > **Note**: this field is always false and must not be used. + , imageConfigOpenStdin :: !(Maybe Bool) -- ^ "OpenStdin" - Open `stdin` <p><br /></p> > **Note**: this field is always false and must not be used. + , imageConfigStdinOnce :: !(Maybe Bool) -- ^ "StdinOnce" - Close `stdin` after one attached client disconnects. <p><br /></p> > **Note**: this field is always false and must not be used. + , imageConfigEnv :: !(Maybe [Text]) -- ^ "Env" - A list of environment variables to set inside the container in the form `[\"VAR=value\", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value. + , imageConfigCmd :: !(Maybe [Text]) -- ^ "Cmd" - Command to run specified as a string or an array of strings. + , imageConfigHealthcheck :: !(Maybe HealthConfig) -- ^ "Healthcheck" + , imageConfigArgsEscaped :: !(Maybe Bool) -- ^ "ArgsEscaped" - Command is already escaped (Windows only) + , imageConfigImage :: !(Maybe Text) -- ^ "Image" - The name (or reference) of the image to use when creating the container, or which was used when the container was created. <p><br /></p> > **Note**: this field is always empty and must not be used. + , imageConfigVolumes :: !(Maybe (Map.Map String A.Value)) -- ^ "Volumes" - An object mapping mount point paths inside the container to empty objects. + , imageConfigWorkingDir :: !(Maybe Text) -- ^ "WorkingDir" - The working directory for commands to run in. + , imageConfigEntrypoint :: !(Maybe [Text]) -- ^ "Entrypoint" - The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + , imageConfigNetworkDisabled :: !(Maybe Bool) -- ^ "NetworkDisabled" - Disable networking for the container. <p><br /></p> > **Note**: this field is always omitted and must not be used. + , imageConfigMacAddress :: !(Maybe Text) -- ^ "MacAddress" - MAC address of the container. <p><br /></p> > **Deprecated**: this field is deprecated in API v1.44 and up. It is always omitted. + , imageConfigOnBuild :: !(Maybe [Text]) -- ^ "OnBuild" - `ONBUILD` metadata that were defined in the image's `Dockerfile`. + , imageConfigLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , imageConfigStopSignal :: !(Maybe Text) -- ^ "StopSignal" - Signal to stop a container as a string or unsigned integer. + , imageConfigStopTimeout :: !(Maybe Int) -- ^ "StopTimeout" - Timeout to stop a container in seconds. <p><br /></p> > **Note**: this field is always omitted and must not be used. + , imageConfigShell :: !(Maybe [Text]) -- ^ "Shell" - Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageConfig +instance A.FromJSON ImageConfig where + parseJSON = A.withObject "ImageConfig" $ \o -> + ImageConfig + <$> (o .:? "Hostname") + <*> (o .:? "Domainname") + <*> (o .:? "User") + <*> (o .:? "AttachStdin") + <*> (o .:? "AttachStdout") + <*> (o .:? "AttachStderr") + <*> (o .:? "ExposedPorts") + <*> (o .:? "Tty") + <*> (o .:? "OpenStdin") + <*> (o .:? "StdinOnce") + <*> (o .:? "Env") + <*> (o .:? "Cmd") + <*> (o .:? "Healthcheck") + <*> (o .:? "ArgsEscaped") + <*> (o .:? "Image") + <*> (o .:? "Volumes") + <*> (o .:? "WorkingDir") + <*> (o .:? "Entrypoint") + <*> (o .:? "NetworkDisabled") + <*> (o .:? "MacAddress") + <*> (o .:? "OnBuild") + <*> (o .:? "Labels") + <*> (o .:? "StopSignal") + <*> (o .:? "StopTimeout") + <*> (o .:? "Shell") + +-- | ToJSON ImageConfig +instance A.ToJSON ImageConfig where + toJSON ImageConfig {..} = + _omitNulls + [ "Hostname" .= imageConfigHostname + , "Domainname" .= imageConfigDomainname + , "User" .= imageConfigUser + , "AttachStdin" .= imageConfigAttachStdin + , "AttachStdout" .= imageConfigAttachStdout + , "AttachStderr" .= imageConfigAttachStderr + , "ExposedPorts" .= imageConfigExposedPorts + , "Tty" .= imageConfigTty + , "OpenStdin" .= imageConfigOpenStdin + , "StdinOnce" .= imageConfigStdinOnce + , "Env" .= imageConfigEnv + , "Cmd" .= imageConfigCmd + , "Healthcheck" .= imageConfigHealthcheck + , "ArgsEscaped" .= imageConfigArgsEscaped + , "Image" .= imageConfigImage + , "Volumes" .= imageConfigVolumes + , "WorkingDir" .= imageConfigWorkingDir + , "Entrypoint" .= imageConfigEntrypoint + , "NetworkDisabled" .= imageConfigNetworkDisabled + , "MacAddress" .= imageConfigMacAddress + , "OnBuild" .= imageConfigOnBuild + , "Labels" .= imageConfigLabels + , "StopSignal" .= imageConfigStopSignal + , "StopTimeout" .= imageConfigStopTimeout + , "Shell" .= imageConfigShell + ] + + +-- | Construct a value of type 'ImageConfig' (by applying it's required fields, if any) +mkImageConfig + :: ImageConfig +mkImageConfig = + ImageConfig + { imageConfigHostname = Nothing + , imageConfigDomainname = Nothing + , imageConfigUser = Nothing + , imageConfigAttachStdin = Nothing + , imageConfigAttachStdout = Nothing + , imageConfigAttachStderr = Nothing + , imageConfigExposedPorts = Nothing + , imageConfigTty = Nothing + , imageConfigOpenStdin = Nothing + , imageConfigStdinOnce = Nothing + , imageConfigEnv = Nothing + , imageConfigCmd = Nothing + , imageConfigHealthcheck = Nothing + , imageConfigArgsEscaped = Nothing + , imageConfigImage = Nothing + , imageConfigVolumes = Nothing + , imageConfigWorkingDir = Nothing + , imageConfigEntrypoint = Nothing + , imageConfigNetworkDisabled = Nothing + , imageConfigMacAddress = Nothing + , imageConfigOnBuild = Nothing + , imageConfigLabels = Nothing + , imageConfigStopSignal = Nothing + , imageConfigStopTimeout = Nothing + , imageConfigShell = Nothing + } + +-- ** ImageDeleteResponseItem +-- | ImageDeleteResponseItem +data ImageDeleteResponseItem = ImageDeleteResponseItem + { imageDeleteResponseItemUntagged :: !(Maybe Text) -- ^ "Untagged" - The image ID of an image that was untagged + , imageDeleteResponseItemDeleted :: !(Maybe Text) -- ^ "Deleted" - The image ID of an image that was deleted + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageDeleteResponseItem +instance A.FromJSON ImageDeleteResponseItem where + parseJSON = A.withObject "ImageDeleteResponseItem" $ \o -> + ImageDeleteResponseItem + <$> (o .:? "Untagged") + <*> (o .:? "Deleted") + +-- | ToJSON ImageDeleteResponseItem +instance A.ToJSON ImageDeleteResponseItem where + toJSON ImageDeleteResponseItem {..} = + _omitNulls + [ "Untagged" .= imageDeleteResponseItemUntagged + , "Deleted" .= imageDeleteResponseItemDeleted + ] + + +-- | Construct a value of type 'ImageDeleteResponseItem' (by applying it's required fields, if any) +mkImageDeleteResponseItem + :: ImageDeleteResponseItem +mkImageDeleteResponseItem = + ImageDeleteResponseItem + { imageDeleteResponseItemUntagged = Nothing + , imageDeleteResponseItemDeleted = Nothing + } + +-- ** ImageID +-- | ImageID +-- Image ID or Digest +data ImageID = ImageID + { imageIDId :: !(Maybe Text) -- ^ "ID" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageID +instance A.FromJSON ImageID where + parseJSON = A.withObject "ImageID" $ \o -> + ImageID + <$> (o .:? "ID") + +-- | ToJSON ImageID +instance A.ToJSON ImageID where + toJSON ImageID {..} = + _omitNulls + [ "ID" .= imageIDId + ] + + +-- | Construct a value of type 'ImageID' (by applying it's required fields, if any) +mkImageID + :: ImageID +mkImageID = + ImageID + { imageIDId = Nothing + } + +-- ** ImageInspect +-- | ImageInspect +-- Information about an image in the local image cache. +data ImageInspect = ImageInspect + { imageInspectId :: !(Maybe Text) -- ^ "Id" - ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. + , imageInspectRepoTags :: !(Maybe [Text]) -- ^ "RepoTags" - List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. + , imageInspectRepoDigests :: !(Maybe [Text]) -- ^ "RepoDigests" - List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. + , imageInspectParent :: !(Maybe Text) -- ^ "Parent" - ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. + , imageInspectComment :: !(Maybe Text) -- ^ "Comment" - Optional message that was set when committing or importing the image. + , imageInspectCreated :: !(Maybe Text) -- ^ "Created" - Date and time at which the image was created, formatted in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. This information is only available if present in the image, and omitted otherwise. + , imageInspectDockerVersion :: !(Maybe Text) -- ^ "DockerVersion" - The version of Docker that was used to build the image. Depending on how the image was created, this field may be empty. + , imageInspectAuthor :: !(Maybe Text) -- ^ "Author" - Name of the author that was specified when committing the image, or as specified through MAINTAINER (deprecated) in the Dockerfile. + , imageInspectConfig :: !(Maybe ImageConfig) -- ^ "Config" + , imageInspectArchitecture :: !(Maybe Text) -- ^ "Architecture" - Hardware CPU architecture that the image runs on. + , imageInspectVariant :: !(Maybe Text) -- ^ "Variant" - CPU architecture variant (presently ARM-only). + , imageInspectOs :: !(Maybe Text) -- ^ "Os" - Operating System the image is built to run on. + , imageInspectOsVersion :: !(Maybe Text) -- ^ "OsVersion" - Operating System version the image is built to run on (especially for Windows). + , imageInspectSize :: !(Maybe Integer) -- ^ "Size" - Total size of the image including all layers it is composed of. + , imageInspectVirtualSize :: !(Maybe Integer) -- ^ "VirtualSize" - Total size of the image including all layers it is composed of. Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. + , imageInspectGraphDriver :: !(Maybe GraphDriverData) -- ^ "GraphDriver" + , imageInspectRootFs :: !(Maybe ImageInspectRootFS) -- ^ "RootFS" + , imageInspectMetadata :: !(Maybe ImageInspectMetadata) -- ^ "Metadata" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageInspect +instance A.FromJSON ImageInspect where + parseJSON = A.withObject "ImageInspect" $ \o -> + ImageInspect + <$> (o .:? "Id") + <*> (o .:? "RepoTags") + <*> (o .:? "RepoDigests") + <*> (o .:? "Parent") + <*> (o .:? "Comment") + <*> (o .:? "Created") + <*> (o .:? "DockerVersion") + <*> (o .:? "Author") + <*> (o .:? "Config") + <*> (o .:? "Architecture") + <*> (o .:? "Variant") + <*> (o .:? "Os") + <*> (o .:? "OsVersion") + <*> (o .:? "Size") + <*> (o .:? "VirtualSize") + <*> (o .:? "GraphDriver") + <*> (o .:? "RootFS") + <*> (o .:? "Metadata") + +-- | ToJSON ImageInspect +instance A.ToJSON ImageInspect where + toJSON ImageInspect {..} = + _omitNulls + [ "Id" .= imageInspectId + , "RepoTags" .= imageInspectRepoTags + , "RepoDigests" .= imageInspectRepoDigests + , "Parent" .= imageInspectParent + , "Comment" .= imageInspectComment + , "Created" .= imageInspectCreated + , "DockerVersion" .= imageInspectDockerVersion + , "Author" .= imageInspectAuthor + , "Config" .= imageInspectConfig + , "Architecture" .= imageInspectArchitecture + , "Variant" .= imageInspectVariant + , "Os" .= imageInspectOs + , "OsVersion" .= imageInspectOsVersion + , "Size" .= imageInspectSize + , "VirtualSize" .= imageInspectVirtualSize + , "GraphDriver" .= imageInspectGraphDriver + , "RootFS" .= imageInspectRootFs + , "Metadata" .= imageInspectMetadata + ] + + +-- | Construct a value of type 'ImageInspect' (by applying it's required fields, if any) +mkImageInspect + :: ImageInspect +mkImageInspect = + ImageInspect + { imageInspectId = Nothing + , imageInspectRepoTags = Nothing + , imageInspectRepoDigests = Nothing + , imageInspectParent = Nothing + , imageInspectComment = Nothing + , imageInspectCreated = Nothing + , imageInspectDockerVersion = Nothing + , imageInspectAuthor = Nothing + , imageInspectConfig = Nothing + , imageInspectArchitecture = Nothing + , imageInspectVariant = Nothing + , imageInspectOs = Nothing + , imageInspectOsVersion = Nothing + , imageInspectSize = Nothing + , imageInspectVirtualSize = Nothing + , imageInspectGraphDriver = Nothing + , imageInspectRootFs = Nothing + , imageInspectMetadata = Nothing + } + +-- ** ImageInspectMetadata +-- | ImageInspectMetadata +-- Additional metadata of the image in the local cache. This information is local to the daemon, and not part of the image itself. +data ImageInspectMetadata = ImageInspectMetadata + { imageInspectMetadataLastTagTime :: !(Maybe Text) -- ^ "LastTagTime" - Date and time at which the image was last tagged in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. This information is only available if the image was tagged locally, and omitted otherwise. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageInspectMetadata +instance A.FromJSON ImageInspectMetadata where + parseJSON = A.withObject "ImageInspectMetadata" $ \o -> + ImageInspectMetadata + <$> (o .:? "LastTagTime") + +-- | ToJSON ImageInspectMetadata +instance A.ToJSON ImageInspectMetadata where + toJSON ImageInspectMetadata {..} = + _omitNulls + [ "LastTagTime" .= imageInspectMetadataLastTagTime + ] + + +-- | Construct a value of type 'ImageInspectMetadata' (by applying it's required fields, if any) +mkImageInspectMetadata + :: ImageInspectMetadata +mkImageInspectMetadata = + ImageInspectMetadata + { imageInspectMetadataLastTagTime = Nothing + } + +-- ** ImageInspectRootFS +-- | ImageInspectRootFS +-- Information about the image's RootFS, including the layer IDs. +data ImageInspectRootFS = ImageInspectRootFS + { imageInspectRootFSType :: !(Text) -- ^ /Required/ "Type" + , imageInspectRootFSLayers :: !(Maybe [Text]) -- ^ "Layers" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageInspectRootFS +instance A.FromJSON ImageInspectRootFS where + parseJSON = A.withObject "ImageInspectRootFS" $ \o -> + ImageInspectRootFS + <$> (o .: "Type") + <*> (o .:? "Layers") + +-- | ToJSON ImageInspectRootFS +instance A.ToJSON ImageInspectRootFS where + toJSON ImageInspectRootFS {..} = + _omitNulls + [ "Type" .= imageInspectRootFSType + , "Layers" .= imageInspectRootFSLayers + ] + + +-- | Construct a value of type 'ImageInspectRootFS' (by applying it's required fields, if any) +mkImageInspectRootFS + :: Text -- ^ 'imageInspectRootFSType' + -> ImageInspectRootFS +mkImageInspectRootFS imageInspectRootFSType = + ImageInspectRootFS + { imageInspectRootFSType + , imageInspectRootFSLayers = Nothing + } + +-- ** ImagePruneResponse +-- | ImagePruneResponse +-- ImagePruneResponse +-- +data ImagePruneResponse = ImagePruneResponse + { imagePruneResponseImagesDeleted :: !(Maybe [ImageDeleteResponseItem]) -- ^ "ImagesDeleted" - Images that were deleted + , imagePruneResponseSpaceReclaimed :: !(Maybe Integer) -- ^ "SpaceReclaimed" - Disk space reclaimed in bytes + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImagePruneResponse +instance A.FromJSON ImagePruneResponse where + parseJSON = A.withObject "ImagePruneResponse" $ \o -> + ImagePruneResponse + <$> (o .:? "ImagesDeleted") + <*> (o .:? "SpaceReclaimed") + +-- | ToJSON ImagePruneResponse +instance A.ToJSON ImagePruneResponse where + toJSON ImagePruneResponse {..} = + _omitNulls + [ "ImagesDeleted" .= imagePruneResponseImagesDeleted + , "SpaceReclaimed" .= imagePruneResponseSpaceReclaimed + ] + + +-- | Construct a value of type 'ImagePruneResponse' (by applying it's required fields, if any) +mkImagePruneResponse + :: ImagePruneResponse +mkImagePruneResponse = + ImagePruneResponse + { imagePruneResponseImagesDeleted = Nothing + , imagePruneResponseSpaceReclaimed = Nothing + } + +-- ** ImageSearchResponseItem +-- | ImageSearchResponseItem +-- ImageSearchResponseItem +-- +data ImageSearchResponseItem = ImageSearchResponseItem + { imageSearchResponseItemDescription :: !(Maybe Text) -- ^ "description" + , imageSearchResponseItemIsOfficial :: !(Maybe Bool) -- ^ "is_official" + , imageSearchResponseItemIsAutomated :: !(Maybe Bool) -- ^ "is_automated" - Whether this repository has automated builds enabled. <p><br /></p> > **Deprecated**: This field is deprecated and will always be \"false\". + , imageSearchResponseItemName :: !(Maybe Text) -- ^ "name" + , imageSearchResponseItemStarCount :: !(Maybe Int) -- ^ "star_count" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageSearchResponseItem +instance A.FromJSON ImageSearchResponseItem where + parseJSON = A.withObject "ImageSearchResponseItem" $ \o -> + ImageSearchResponseItem + <$> (o .:? "description") + <*> (o .:? "is_official") + <*> (o .:? "is_automated") + <*> (o .:? "name") + <*> (o .:? "star_count") + +-- | ToJSON ImageSearchResponseItem +instance A.ToJSON ImageSearchResponseItem where + toJSON ImageSearchResponseItem {..} = + _omitNulls + [ "description" .= imageSearchResponseItemDescription + , "is_official" .= imageSearchResponseItemIsOfficial + , "is_automated" .= imageSearchResponseItemIsAutomated + , "name" .= imageSearchResponseItemName + , "star_count" .= imageSearchResponseItemStarCount + ] + + +-- | Construct a value of type 'ImageSearchResponseItem' (by applying it's required fields, if any) +mkImageSearchResponseItem + :: ImageSearchResponseItem +mkImageSearchResponseItem = + ImageSearchResponseItem + { imageSearchResponseItemDescription = Nothing + , imageSearchResponseItemIsOfficial = Nothing + , imageSearchResponseItemIsAutomated = Nothing + , imageSearchResponseItemName = Nothing + , imageSearchResponseItemStarCount = Nothing + } + +-- ** ImageSummary +-- | ImageSummary +data ImageSummary = ImageSummary + { imageSummaryId :: !(Text) -- ^ /Required/ "Id" - ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. + , imageSummaryParentId :: !(Text) -- ^ /Required/ "ParentId" - ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. + , imageSummaryRepoTags :: !([Text]) -- ^ /Required/ "RepoTags" - List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. + , imageSummaryRepoDigests :: !([Text]) -- ^ /Required/ "RepoDigests" - List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. + , imageSummaryCreated :: !(Int) -- ^ /Required/ "Created" - Date and time at which the image was created as a Unix timestamp (number of seconds sinds EPOCH). + , imageSummarySize :: !(Integer) -- ^ /Required/ "Size" - Total size of the image including all layers it is composed of. + , imageSummarySharedSize :: !(Integer) -- ^ /Required/ "SharedSize" - Total size of image layers that are shared between this image and other images. This size is not calculated by default. `-1` indicates that the value has not been set / calculated. + , imageSummaryVirtualSize :: !(Maybe Integer) -- ^ "VirtualSize" - Total size of the image including all layers it is composed of. Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. + , imageSummaryLabels :: !((Map.Map String Text)) -- ^ /Required/ "Labels" - User-defined key/value metadata. + , imageSummaryContainers :: !(Int) -- ^ /Required/ "Containers" - Number of containers using this image. Includes both stopped and running containers. This size is not calculated by default, and depends on which API endpoint is used. `-1` indicates that the value has not been set / calculated. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageSummary +instance A.FromJSON ImageSummary where + parseJSON = A.withObject "ImageSummary" $ \o -> + ImageSummary + <$> (o .: "Id") + <*> (o .: "ParentId") + <*> (o .: "RepoTags") + <*> (o .: "RepoDigests") + <*> (o .: "Created") + <*> (o .: "Size") + <*> (o .: "SharedSize") + <*> (o .:? "VirtualSize") + <*> (o .: "Labels") + <*> (o .: "Containers") + +-- | ToJSON ImageSummary +instance A.ToJSON ImageSummary where + toJSON ImageSummary {..} = + _omitNulls + [ "Id" .= imageSummaryId + , "ParentId" .= imageSummaryParentId + , "RepoTags" .= imageSummaryRepoTags + , "RepoDigests" .= imageSummaryRepoDigests + , "Created" .= imageSummaryCreated + , "Size" .= imageSummarySize + , "SharedSize" .= imageSummarySharedSize + , "VirtualSize" .= imageSummaryVirtualSize + , "Labels" .= imageSummaryLabels + , "Containers" .= imageSummaryContainers + ] + + +-- | Construct a value of type 'ImageSummary' (by applying it's required fields, if any) +mkImageSummary + :: Text -- ^ 'imageSummaryId': ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. + -> Text -- ^ 'imageSummaryParentId': ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. + -> [Text] -- ^ 'imageSummaryRepoTags': List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. + -> [Text] -- ^ 'imageSummaryRepoDigests': List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. + -> Int -- ^ 'imageSummaryCreated': Date and time at which the image was created as a Unix timestamp (number of seconds sinds EPOCH). + -> Integer -- ^ 'imageSummarySize': Total size of the image including all layers it is composed of. + -> Integer -- ^ 'imageSummarySharedSize': Total size of image layers that are shared between this image and other images. This size is not calculated by default. `-1` indicates that the value has not been set / calculated. + -> (Map.Map String Text) -- ^ 'imageSummaryLabels': User-defined key/value metadata. + -> Int -- ^ 'imageSummaryContainers': Number of containers using this image. Includes both stopped and running containers. This size is not calculated by default, and depends on which API endpoint is used. `-1` indicates that the value has not been set / calculated. + -> ImageSummary +mkImageSummary imageSummaryId imageSummaryParentId imageSummaryRepoTags imageSummaryRepoDigests imageSummaryCreated imageSummarySize imageSummarySharedSize imageSummaryLabels imageSummaryContainers = + ImageSummary + { imageSummaryId + , imageSummaryParentId + , imageSummaryRepoTags + , imageSummaryRepoDigests + , imageSummaryCreated + , imageSummarySize + , imageSummarySharedSize + , imageSummaryVirtualSize = Nothing + , imageSummaryLabels + , imageSummaryContainers + } + +-- ** IndexInfo +-- | IndexInfo +-- IndexInfo contains information about a registry. +data IndexInfo = IndexInfo + { indexInfoName :: !(Maybe Text) -- ^ "Name" - Name of the registry, such as \"docker.io\". + , indexInfoMirrors :: !(Maybe [Text]) -- ^ "Mirrors" - List of mirrors, expressed as URIs. + , indexInfoSecure :: !(Maybe Bool) -- ^ "Secure" - Indicates if the registry is part of the list of insecure registries. If `false`, the registry is insecure. Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication. > **Warning**: Insecure registries can be useful when running a local > registry. However, because its use creates security vulnerabilities > it should ONLY be enabled for testing purposes. For increased > security, users should add their CA to their system's list of > trusted CAs instead of enabling this option. + , indexInfoOfficial :: !(Maybe Bool) -- ^ "Official" - Indicates whether this is an official registry (i.e., Docker Hub / docker.io) + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON IndexInfo +instance A.FromJSON IndexInfo where + parseJSON = A.withObject "IndexInfo" $ \o -> + IndexInfo + <$> (o .:? "Name") + <*> (o .:? "Mirrors") + <*> (o .:? "Secure") + <*> (o .:? "Official") + +-- | ToJSON IndexInfo +instance A.ToJSON IndexInfo where + toJSON IndexInfo {..} = + _omitNulls + [ "Name" .= indexInfoName + , "Mirrors" .= indexInfoMirrors + , "Secure" .= indexInfoSecure + , "Official" .= indexInfoOfficial + ] + + +-- | Construct a value of type 'IndexInfo' (by applying it's required fields, if any) +mkIndexInfo + :: IndexInfo +mkIndexInfo = + IndexInfo + { indexInfoName = Nothing + , indexInfoMirrors = Nothing + , indexInfoSecure = Nothing + , indexInfoOfficial = Nothing + } + +-- ** JoinTokens +-- | JoinTokens +-- JoinTokens contains the tokens workers and managers need to join the swarm. +data JoinTokens = JoinTokens + { joinTokensWorker :: !(Maybe Text) -- ^ "Worker" - The token workers can use to join the swarm. + , joinTokensManager :: !(Maybe Text) -- ^ "Manager" - The token managers can use to join the swarm. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON JoinTokens +instance A.FromJSON JoinTokens where + parseJSON = A.withObject "JoinTokens" $ \o -> + JoinTokens + <$> (o .:? "Worker") + <*> (o .:? "Manager") + +-- | ToJSON JoinTokens +instance A.ToJSON JoinTokens where + toJSON JoinTokens {..} = + _omitNulls + [ "Worker" .= joinTokensWorker + , "Manager" .= joinTokensManager + ] + + +-- | Construct a value of type 'JoinTokens' (by applying it's required fields, if any) +mkJoinTokens + :: JoinTokens +mkJoinTokens = + JoinTokens + { joinTokensWorker = Nothing + , joinTokensManager = Nothing + } + +-- ** Limit +-- | Limit +-- An object describing a limit on resources which can be requested by a task. +data Limit = Limit + { limitNanoCpus :: !(Maybe Integer) -- ^ "NanoCPUs" + , limitMemoryBytes :: !(Maybe Integer) -- ^ "MemoryBytes" + , limitPids :: !(Maybe Integer) -- ^ "Pids" - Limits the maximum number of PIDs in the container. Set `0` for unlimited. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Limit +instance A.FromJSON Limit where + parseJSON = A.withObject "Limit" $ \o -> + Limit + <$> (o .:? "NanoCPUs") + <*> (o .:? "MemoryBytes") + <*> (o .:? "Pids") + +-- | ToJSON Limit +instance A.ToJSON Limit where + toJSON Limit {..} = + _omitNulls + [ "NanoCPUs" .= limitNanoCpus + , "MemoryBytes" .= limitMemoryBytes + , "Pids" .= limitPids + ] + + +-- | Construct a value of type 'Limit' (by applying it's required fields, if any) +mkLimit + :: Limit +mkLimit = + Limit + { limitNanoCpus = Nothing + , limitMemoryBytes = Nothing + , limitPids = Nothing + } + +-- ** ManagerStatus +-- | ManagerStatus +-- ManagerStatus represents the status of a manager. It provides the current status of a node's manager component, if the node is a manager. +data ManagerStatus = ManagerStatus + { managerStatusLeader :: !(Maybe Bool) -- ^ "Leader" + , managerStatusReachability :: !(Maybe Reachability) -- ^ "Reachability" + , managerStatusAddr :: !(Maybe Text) -- ^ "Addr" - The IP address and port at which the manager is reachable. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ManagerStatus +instance A.FromJSON ManagerStatus where + parseJSON = A.withObject "ManagerStatus" $ \o -> + ManagerStatus + <$> (o .:? "Leader") + <*> (o .:? "Reachability") + <*> (o .:? "Addr") + +-- | ToJSON ManagerStatus +instance A.ToJSON ManagerStatus where + toJSON ManagerStatus {..} = + _omitNulls + [ "Leader" .= managerStatusLeader + , "Reachability" .= managerStatusReachability + , "Addr" .= managerStatusAddr + ] + + +-- | Construct a value of type 'ManagerStatus' (by applying it's required fields, if any) +mkManagerStatus + :: ManagerStatus +mkManagerStatus = + ManagerStatus + { managerStatusLeader = Nothing + , managerStatusReachability = Nothing + , managerStatusAddr = Nothing + } + +-- ** Mount +-- | Mount +data Mount = Mount + { mountTarget :: !(Maybe Text) -- ^ "Target" - Container path. + , mountSource :: !(Maybe Text) -- ^ "Source" - Mount source (e.g. a volume name, a host path). + , mountType :: !(Maybe E'Type2) -- ^ "Type" - The mount type. Available types: - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. - `cluster` a Swarm cluster volume + , mountReadOnly :: !(Maybe Bool) -- ^ "ReadOnly" - Whether the mount should be read-only. + , mountConsistency :: !(Maybe Text) -- ^ "Consistency" - The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`. + , mountBindOptions :: !(Maybe MountBindOptions) -- ^ "BindOptions" + , mountVolumeOptions :: !(Maybe MountVolumeOptions) -- ^ "VolumeOptions" + , mountTmpfsOptions :: !(Maybe MountTmpfsOptions) -- ^ "TmpfsOptions" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Mount +instance A.FromJSON Mount where + parseJSON = A.withObject "Mount" $ \o -> + Mount + <$> (o .:? "Target") + <*> (o .:? "Source") + <*> (o .:? "Type") + <*> (o .:? "ReadOnly") + <*> (o .:? "Consistency") + <*> (o .:? "BindOptions") + <*> (o .:? "VolumeOptions") + <*> (o .:? "TmpfsOptions") + +-- | ToJSON Mount +instance A.ToJSON Mount where + toJSON Mount {..} = + _omitNulls + [ "Target" .= mountTarget + , "Source" .= mountSource + , "Type" .= mountType + , "ReadOnly" .= mountReadOnly + , "Consistency" .= mountConsistency + , "BindOptions" .= mountBindOptions + , "VolumeOptions" .= mountVolumeOptions + , "TmpfsOptions" .= mountTmpfsOptions + ] + + +-- | Construct a value of type 'Mount' (by applying it's required fields, if any) +mkMount + :: Mount +mkMount = + Mount + { mountTarget = Nothing + , mountSource = Nothing + , mountType = Nothing + , mountReadOnly = Nothing + , mountConsistency = Nothing + , mountBindOptions = Nothing + , mountVolumeOptions = Nothing + , mountTmpfsOptions = Nothing + } + +-- ** MountBindOptions +-- | MountBindOptions +-- Optional configuration for the `bind` type. +data MountBindOptions = MountBindOptions + { mountBindOptionsPropagation :: !(Maybe E'Propagation) -- ^ "Propagation" - A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. + , mountBindOptionsNonRecursive :: !(Maybe Bool) -- ^ "NonRecursive" - Disable recursive bind mount. + , mountBindOptionsCreateMountpoint :: !(Maybe Bool) -- ^ "CreateMountpoint" - Create mount point on host if missing + , mountBindOptionsReadOnlyNonRecursive :: !(Maybe Bool) -- ^ "ReadOnlyNonRecursive" - Make the mount non-recursively read-only, but still leave the mount recursive (unless NonRecursive is set to `true` in conjunction). Addded in v1.44, before that version all read-only mounts were non-recursive by default. To match the previous behaviour this will default to `true` for clients on versions prior to v1.44. + , mountBindOptionsReadOnlyForceRecursive :: !(Maybe Bool) -- ^ "ReadOnlyForceRecursive" - Raise an error if the mount cannot be made recursively read-only. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON MountBindOptions +instance A.FromJSON MountBindOptions where + parseJSON = A.withObject "MountBindOptions" $ \o -> + MountBindOptions + <$> (o .:? "Propagation") + <*> (o .:? "NonRecursive") + <*> (o .:? "CreateMountpoint") + <*> (o .:? "ReadOnlyNonRecursive") + <*> (o .:? "ReadOnlyForceRecursive") + +-- | ToJSON MountBindOptions +instance A.ToJSON MountBindOptions where + toJSON MountBindOptions {..} = + _omitNulls + [ "Propagation" .= mountBindOptionsPropagation + , "NonRecursive" .= mountBindOptionsNonRecursive + , "CreateMountpoint" .= mountBindOptionsCreateMountpoint + , "ReadOnlyNonRecursive" .= mountBindOptionsReadOnlyNonRecursive + , "ReadOnlyForceRecursive" .= mountBindOptionsReadOnlyForceRecursive + ] + + +-- | Construct a value of type 'MountBindOptions' (by applying it's required fields, if any) +mkMountBindOptions + :: MountBindOptions +mkMountBindOptions = + MountBindOptions + { mountBindOptionsPropagation = Nothing + , mountBindOptionsNonRecursive = Nothing + , mountBindOptionsCreateMountpoint = Nothing + , mountBindOptionsReadOnlyNonRecursive = Nothing + , mountBindOptionsReadOnlyForceRecursive = Nothing + } + +-- ** MountPoint +-- | MountPoint +-- MountPoint represents a mount point configuration inside the container. This is used for reporting the mountpoints in use by a container. +data MountPoint = MountPoint + { mountPointType :: !(Maybe E'Type2) -- ^ "Type" - The mount type: - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `tmpfs` a `tmpfs`. - `npipe` a named pipe from the host into the container. - `cluster` a Swarm cluster volume + , mountPointName :: !(Maybe Text) -- ^ "Name" - Name is the name reference to the underlying data defined by `Source` e.g., the volume name. + , mountPointSource :: !(Maybe Text) -- ^ "Source" - Source location of the mount. For volumes, this contains the storage location of the volume (within `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains the source (host) part of the bind-mount. For `tmpfs` mount points, this field is empty. + , mountPointDestination :: !(Maybe Text) -- ^ "Destination" - Destination is the path relative to the container root (`/`) where the `Source` is mounted inside the container. + , mountPointDriver :: !(Maybe Text) -- ^ "Driver" - Driver is the volume driver used to create the volume (if it is a volume). + , mountPointMode :: !(Maybe Text) -- ^ "Mode" - Mode is a comma separated list of options supplied by the user when creating the bind/volume mount. The default is platform-specific (`\"z\"` on Linux, empty on Windows). + , mountPointRw :: !(Maybe Bool) -- ^ "RW" - Whether the mount is mounted writable (read-write). + , mountPointPropagation :: !(Maybe Text) -- ^ "Propagation" - Propagation describes how mounts are propagated from the host into the mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) for details. This field is not used on Windows. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON MountPoint +instance A.FromJSON MountPoint where + parseJSON = A.withObject "MountPoint" $ \o -> + MountPoint + <$> (o .:? "Type") + <*> (o .:? "Name") + <*> (o .:? "Source") + <*> (o .:? "Destination") + <*> (o .:? "Driver") + <*> (o .:? "Mode") + <*> (o .:? "RW") + <*> (o .:? "Propagation") + +-- | ToJSON MountPoint +instance A.ToJSON MountPoint where + toJSON MountPoint {..} = + _omitNulls + [ "Type" .= mountPointType + , "Name" .= mountPointName + , "Source" .= mountPointSource + , "Destination" .= mountPointDestination + , "Driver" .= mountPointDriver + , "Mode" .= mountPointMode + , "RW" .= mountPointRw + , "Propagation" .= mountPointPropagation + ] + + +-- | Construct a value of type 'MountPoint' (by applying it's required fields, if any) +mkMountPoint + :: MountPoint +mkMountPoint = + MountPoint + { mountPointType = Nothing + , mountPointName = Nothing + , mountPointSource = Nothing + , mountPointDestination = Nothing + , mountPointDriver = Nothing + , mountPointMode = Nothing + , mountPointRw = Nothing + , mountPointPropagation = Nothing + } + +-- ** MountTmpfsOptions +-- | MountTmpfsOptions +-- Optional configuration for the `tmpfs` type. +data MountTmpfsOptions = MountTmpfsOptions + { mountTmpfsOptionsSizeBytes :: !(Maybe Integer) -- ^ "SizeBytes" - The size for the tmpfs mount in bytes. + , mountTmpfsOptionsMode :: !(Maybe Int) -- ^ "Mode" - The permission mode for the tmpfs mount in an integer. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON MountTmpfsOptions +instance A.FromJSON MountTmpfsOptions where + parseJSON = A.withObject "MountTmpfsOptions" $ \o -> + MountTmpfsOptions + <$> (o .:? "SizeBytes") + <*> (o .:? "Mode") + +-- | ToJSON MountTmpfsOptions +instance A.ToJSON MountTmpfsOptions where + toJSON MountTmpfsOptions {..} = + _omitNulls + [ "SizeBytes" .= mountTmpfsOptionsSizeBytes + , "Mode" .= mountTmpfsOptionsMode + ] + + +-- | Construct a value of type 'MountTmpfsOptions' (by applying it's required fields, if any) +mkMountTmpfsOptions + :: MountTmpfsOptions +mkMountTmpfsOptions = + MountTmpfsOptions + { mountTmpfsOptionsSizeBytes = Nothing + , mountTmpfsOptionsMode = Nothing + } + +-- ** MountVolumeOptions +-- | MountVolumeOptions +-- Optional configuration for the `volume` type. +data MountVolumeOptions = MountVolumeOptions + { mountVolumeOptionsNoCopy :: !(Maybe Bool) -- ^ "NoCopy" - Populate volume with data from the target. + , mountVolumeOptionsLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , mountVolumeOptionsDriverConfig :: !(Maybe MountVolumeOptionsDriverConfig) -- ^ "DriverConfig" + , mountVolumeOptionsSubpath :: !(Maybe Text) -- ^ "Subpath" - Source path inside the volume. Must be relative without any back traversals. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON MountVolumeOptions +instance A.FromJSON MountVolumeOptions where + parseJSON = A.withObject "MountVolumeOptions" $ \o -> + MountVolumeOptions + <$> (o .:? "NoCopy") + <*> (o .:? "Labels") + <*> (o .:? "DriverConfig") + <*> (o .:? "Subpath") + +-- | ToJSON MountVolumeOptions +instance A.ToJSON MountVolumeOptions where + toJSON MountVolumeOptions {..} = + _omitNulls + [ "NoCopy" .= mountVolumeOptionsNoCopy + , "Labels" .= mountVolumeOptionsLabels + , "DriverConfig" .= mountVolumeOptionsDriverConfig + , "Subpath" .= mountVolumeOptionsSubpath + ] + + +-- | Construct a value of type 'MountVolumeOptions' (by applying it's required fields, if any) +mkMountVolumeOptions + :: MountVolumeOptions +mkMountVolumeOptions = + MountVolumeOptions + { mountVolumeOptionsNoCopy = Nothing + , mountVolumeOptionsLabels = Nothing + , mountVolumeOptionsDriverConfig = Nothing + , mountVolumeOptionsSubpath = Nothing + } + +-- ** MountVolumeOptionsDriverConfig +-- | MountVolumeOptionsDriverConfig +-- Map of driver specific options +data MountVolumeOptionsDriverConfig = MountVolumeOptionsDriverConfig + { mountVolumeOptionsDriverConfigName :: !(Maybe Text) -- ^ "Name" - Name of the driver to use to create the volume. + , mountVolumeOptionsDriverConfigOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - key/value map of driver specific options. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON MountVolumeOptionsDriverConfig +instance A.FromJSON MountVolumeOptionsDriverConfig where + parseJSON = A.withObject "MountVolumeOptionsDriverConfig" $ \o -> + MountVolumeOptionsDriverConfig + <$> (o .:? "Name") + <*> (o .:? "Options") + +-- | ToJSON MountVolumeOptionsDriverConfig +instance A.ToJSON MountVolumeOptionsDriverConfig where + toJSON MountVolumeOptionsDriverConfig {..} = + _omitNulls + [ "Name" .= mountVolumeOptionsDriverConfigName + , "Options" .= mountVolumeOptionsDriverConfigOptions + ] + + +-- | Construct a value of type 'MountVolumeOptionsDriverConfig' (by applying it's required fields, if any) +mkMountVolumeOptionsDriverConfig + :: MountVolumeOptionsDriverConfig +mkMountVolumeOptionsDriverConfig = + MountVolumeOptionsDriverConfig + { mountVolumeOptionsDriverConfigName = Nothing + , mountVolumeOptionsDriverConfigOptions = Nothing + } + +-- ** Network +-- | Network +data Network = Network + { networkName :: !(Maybe Text) -- ^ "Name" - Name of the network. + , networkId :: !(Maybe Text) -- ^ "Id" - ID that uniquely identifies a network on a single machine. + , networkCreated :: !(Maybe Text) -- ^ "Created" - Date and time at which the network was created in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , networkScope :: !(Maybe Text) -- ^ "Scope" - The level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine level) + , networkDriver :: !(Maybe Text) -- ^ "Driver" - The name of the driver used to create the network (e.g. `bridge`, `overlay`). + , networkEnableIpv6 :: !(Maybe Bool) -- ^ "EnableIPv6" - Whether the network was created with IPv6 enabled. + , networkIpam :: !(Maybe IPAM) -- ^ "IPAM" + , networkInternal :: !(Maybe Bool) -- ^ "Internal" - Whether the network is created to only allow internal networking connectivity. + , networkAttachable :: !(Maybe Bool) -- ^ "Attachable" - Wheter a global / swarm scope network is manually attachable by regular containers from workers in swarm mode. + , networkIngress :: !(Maybe Bool) -- ^ "Ingress" - Whether the network is providing the routing-mesh for the swarm cluster. + , networkConfigFrom :: !(Maybe ConfigReference) -- ^ "ConfigFrom" + , networkConfigOnly :: !(Maybe Bool) -- ^ "ConfigOnly" - Whether the network is a config-only network. Config-only networks are placeholder networks for network configurations to be used by other networks. Config-only networks cannot be used directly to run containers or services. + , networkContainers :: !(Maybe (Map.Map String NetworkContainer)) -- ^ "Containers" - Contains endpoints attached to the network. + , networkOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - Network-specific options uses when creating the network. + , networkLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , networkPeers :: !(Maybe [PeerInfo]) -- ^ "Peers" - List of peer nodes for an overlay network. This field is only present for overlay networks, and omitted for other network types. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Network +instance A.FromJSON Network where + parseJSON = A.withObject "Network" $ \o -> + Network + <$> (o .:? "Name") + <*> (o .:? "Id") + <*> (o .:? "Created") + <*> (o .:? "Scope") + <*> (o .:? "Driver") + <*> (o .:? "EnableIPv6") + <*> (o .:? "IPAM") + <*> (o .:? "Internal") + <*> (o .:? "Attachable") + <*> (o .:? "Ingress") + <*> (o .:? "ConfigFrom") + <*> (o .:? "ConfigOnly") + <*> (o .:? "Containers") + <*> (o .:? "Options") + <*> (o .:? "Labels") + <*> (o .:? "Peers") + +-- | ToJSON Network +instance A.ToJSON Network where + toJSON Network {..} = + _omitNulls + [ "Name" .= networkName + , "Id" .= networkId + , "Created" .= networkCreated + , "Scope" .= networkScope + , "Driver" .= networkDriver + , "EnableIPv6" .= networkEnableIpv6 + , "IPAM" .= networkIpam + , "Internal" .= networkInternal + , "Attachable" .= networkAttachable + , "Ingress" .= networkIngress + , "ConfigFrom" .= networkConfigFrom + , "ConfigOnly" .= networkConfigOnly + , "Containers" .= networkContainers + , "Options" .= networkOptions + , "Labels" .= networkLabels + , "Peers" .= networkPeers + ] + + +-- | Construct a value of type 'Network' (by applying it's required fields, if any) +mkNetwork + :: Network +mkNetwork = + Network + { networkName = Nothing + , networkId = Nothing + , networkCreated = Nothing + , networkScope = Nothing + , networkDriver = Nothing + , networkEnableIpv6 = Nothing + , networkIpam = Nothing + , networkInternal = Nothing + , networkAttachable = Nothing + , networkIngress = Nothing + , networkConfigFrom = Nothing + , networkConfigOnly = Nothing + , networkContainers = Nothing + , networkOptions = Nothing + , networkLabels = Nothing + , networkPeers = Nothing + } + +-- ** NetworkAttachmentConfig +-- | NetworkAttachmentConfig +-- Specifies how a service should be attached to a particular network. +data NetworkAttachmentConfig = NetworkAttachmentConfig + { networkAttachmentConfigTarget :: !(Maybe Text) -- ^ "Target" - The target network for attachment. Must be a network name or ID. + , networkAttachmentConfigAliases :: !(Maybe [Text]) -- ^ "Aliases" - Discoverable alternate names for the service on this network. + , networkAttachmentConfigDriverOpts :: !(Maybe (Map.Map String Text)) -- ^ "DriverOpts" - Driver attachment options for the network target. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkAttachmentConfig +instance A.FromJSON NetworkAttachmentConfig where + parseJSON = A.withObject "NetworkAttachmentConfig" $ \o -> + NetworkAttachmentConfig + <$> (o .:? "Target") + <*> (o .:? "Aliases") + <*> (o .:? "DriverOpts") + +-- | ToJSON NetworkAttachmentConfig +instance A.ToJSON NetworkAttachmentConfig where + toJSON NetworkAttachmentConfig {..} = + _omitNulls + [ "Target" .= networkAttachmentConfigTarget + , "Aliases" .= networkAttachmentConfigAliases + , "DriverOpts" .= networkAttachmentConfigDriverOpts + ] + + +-- | Construct a value of type 'NetworkAttachmentConfig' (by applying it's required fields, if any) +mkNetworkAttachmentConfig + :: NetworkAttachmentConfig +mkNetworkAttachmentConfig = + NetworkAttachmentConfig + { networkAttachmentConfigTarget = Nothing + , networkAttachmentConfigAliases = Nothing + , networkAttachmentConfigDriverOpts = Nothing + } + +-- ** NetworkConnectRequest +-- | NetworkConnectRequest +-- NetworkConnectRequest +-- +data NetworkConnectRequest = NetworkConnectRequest + { networkConnectRequestContainer :: !(Maybe Text) -- ^ "Container" - The ID or name of the container to connect to the network. + , networkConnectRequestEndpointConfig :: !(Maybe EndpointSettings) -- ^ "EndpointConfig" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkConnectRequest +instance A.FromJSON NetworkConnectRequest where + parseJSON = A.withObject "NetworkConnectRequest" $ \o -> + NetworkConnectRequest + <$> (o .:? "Container") + <*> (o .:? "EndpointConfig") + +-- | ToJSON NetworkConnectRequest +instance A.ToJSON NetworkConnectRequest where + toJSON NetworkConnectRequest {..} = + _omitNulls + [ "Container" .= networkConnectRequestContainer + , "EndpointConfig" .= networkConnectRequestEndpointConfig + ] + + +-- | Construct a value of type 'NetworkConnectRequest' (by applying it's required fields, if any) +mkNetworkConnectRequest + :: NetworkConnectRequest +mkNetworkConnectRequest = + NetworkConnectRequest + { networkConnectRequestContainer = Nothing + , networkConnectRequestEndpointConfig = Nothing + } + +-- ** NetworkContainer +-- | NetworkContainer +data NetworkContainer = NetworkContainer + { networkContainerName :: !(Maybe Text) -- ^ "Name" + , networkContainerEndpointId :: !(Maybe Text) -- ^ "EndpointID" + , networkContainerMacAddress :: !(Maybe Text) -- ^ "MacAddress" + , networkContainerIpv4Address :: !(Maybe Text) -- ^ "IPv4Address" + , networkContainerIpv6Address :: !(Maybe Text) -- ^ "IPv6Address" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkContainer +instance A.FromJSON NetworkContainer where + parseJSON = A.withObject "NetworkContainer" $ \o -> + NetworkContainer + <$> (o .:? "Name") + <*> (o .:? "EndpointID") + <*> (o .:? "MacAddress") + <*> (o .:? "IPv4Address") + <*> (o .:? "IPv6Address") + +-- | ToJSON NetworkContainer +instance A.ToJSON NetworkContainer where + toJSON NetworkContainer {..} = + _omitNulls + [ "Name" .= networkContainerName + , "EndpointID" .= networkContainerEndpointId + , "MacAddress" .= networkContainerMacAddress + , "IPv4Address" .= networkContainerIpv4Address + , "IPv6Address" .= networkContainerIpv6Address + ] + + +-- | Construct a value of type 'NetworkContainer' (by applying it's required fields, if any) +mkNetworkContainer + :: NetworkContainer +mkNetworkContainer = + NetworkContainer + { networkContainerName = Nothing + , networkContainerEndpointId = Nothing + , networkContainerMacAddress = Nothing + , networkContainerIpv4Address = Nothing + , networkContainerIpv6Address = Nothing + } + +-- ** NetworkCreateRequest +-- | NetworkCreateRequest +-- NetworkCreateRequest +-- +data NetworkCreateRequest = NetworkCreateRequest + { networkCreateRequestName :: !(Text) -- ^ /Required/ "Name" - The network's name. + , networkCreateRequestCheckDuplicate :: !(Maybe Bool) -- ^ "CheckDuplicate" - Deprecated: CheckDuplicate is now always enabled. + , networkCreateRequestDriver :: !(Maybe Text) -- ^ "Driver" - Name of the network driver plugin to use. + , networkCreateRequestScope :: !(Maybe Text) -- ^ "Scope" - The level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine level). + , networkCreateRequestInternal :: !(Maybe Bool) -- ^ "Internal" - Restrict external access to the network. + , networkCreateRequestAttachable :: !(Maybe Bool) -- ^ "Attachable" - Globally scoped network is manually attachable by regular containers from workers in swarm mode. + , networkCreateRequestIngress :: !(Maybe Bool) -- ^ "Ingress" - Ingress network is the network which provides the routing-mesh in swarm mode. + , networkCreateRequestConfigOnly :: !(Maybe Bool) -- ^ "ConfigOnly" - Creates a config-only network. Config-only networks are placeholder networks for network configurations to be used by other networks. Config-only networks cannot be used directly to run containers or services. + , networkCreateRequestConfigFrom :: !(Maybe ConfigReference) -- ^ "ConfigFrom" + , networkCreateRequestIpam :: !(Maybe IPAM) -- ^ "IPAM" + , networkCreateRequestEnableIpv6 :: !(Maybe Bool) -- ^ "EnableIPv6" - Enable IPv6 on the network. + , networkCreateRequestOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - Network specific options to be used by the drivers. + , networkCreateRequestLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkCreateRequest +instance A.FromJSON NetworkCreateRequest where + parseJSON = A.withObject "NetworkCreateRequest" $ \o -> + NetworkCreateRequest + <$> (o .: "Name") + <*> (o .:? "CheckDuplicate") + <*> (o .:? "Driver") + <*> (o .:? "Scope") + <*> (o .:? "Internal") + <*> (o .:? "Attachable") + <*> (o .:? "Ingress") + <*> (o .:? "ConfigOnly") + <*> (o .:? "ConfigFrom") + <*> (o .:? "IPAM") + <*> (o .:? "EnableIPv6") + <*> (o .:? "Options") + <*> (o .:? "Labels") + +-- | ToJSON NetworkCreateRequest +instance A.ToJSON NetworkCreateRequest where + toJSON NetworkCreateRequest {..} = + _omitNulls + [ "Name" .= networkCreateRequestName + , "CheckDuplicate" .= networkCreateRequestCheckDuplicate + , "Driver" .= networkCreateRequestDriver + , "Scope" .= networkCreateRequestScope + , "Internal" .= networkCreateRequestInternal + , "Attachable" .= networkCreateRequestAttachable + , "Ingress" .= networkCreateRequestIngress + , "ConfigOnly" .= networkCreateRequestConfigOnly + , "ConfigFrom" .= networkCreateRequestConfigFrom + , "IPAM" .= networkCreateRequestIpam + , "EnableIPv6" .= networkCreateRequestEnableIpv6 + , "Options" .= networkCreateRequestOptions + , "Labels" .= networkCreateRequestLabels + ] + + +-- | Construct a value of type 'NetworkCreateRequest' (by applying it's required fields, if any) +mkNetworkCreateRequest + :: Text -- ^ 'networkCreateRequestName': The network's name. + -> NetworkCreateRequest +mkNetworkCreateRequest networkCreateRequestName = + NetworkCreateRequest + { networkCreateRequestName + , networkCreateRequestCheckDuplicate = Nothing + , networkCreateRequestDriver = Nothing + , networkCreateRequestScope = Nothing + , networkCreateRequestInternal = Nothing + , networkCreateRequestAttachable = Nothing + , networkCreateRequestIngress = Nothing + , networkCreateRequestConfigOnly = Nothing + , networkCreateRequestConfigFrom = Nothing + , networkCreateRequestIpam = Nothing + , networkCreateRequestEnableIpv6 = Nothing + , networkCreateRequestOptions = Nothing + , networkCreateRequestLabels = Nothing + } + +-- ** NetworkCreateResponse +-- | NetworkCreateResponse +-- NetworkCreateResponse +-- +data NetworkCreateResponse = NetworkCreateResponse + { networkCreateResponseId :: !(Maybe Text) -- ^ "Id" - The ID of the created network. + , networkCreateResponseWarning :: !(Maybe Text) -- ^ "Warning" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkCreateResponse +instance A.FromJSON NetworkCreateResponse where + parseJSON = A.withObject "NetworkCreateResponse" $ \o -> + NetworkCreateResponse + <$> (o .:? "Id") + <*> (o .:? "Warning") + +-- | ToJSON NetworkCreateResponse +instance A.ToJSON NetworkCreateResponse where + toJSON NetworkCreateResponse {..} = + _omitNulls + [ "Id" .= networkCreateResponseId + , "Warning" .= networkCreateResponseWarning + ] + + +-- | Construct a value of type 'NetworkCreateResponse' (by applying it's required fields, if any) +mkNetworkCreateResponse + :: NetworkCreateResponse +mkNetworkCreateResponse = + NetworkCreateResponse + { networkCreateResponseId = Nothing + , networkCreateResponseWarning = Nothing + } + +-- ** NetworkDisconnectRequest +-- | NetworkDisconnectRequest +-- NetworkDisconnectRequest +-- +data NetworkDisconnectRequest = NetworkDisconnectRequest + { networkDisconnectRequestContainer :: !(Maybe Text) -- ^ "Container" - The ID or name of the container to disconnect from the network. + , networkDisconnectRequestForce :: !(Maybe Bool) -- ^ "Force" - Force the container to disconnect from the network. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkDisconnectRequest +instance A.FromJSON NetworkDisconnectRequest where + parseJSON = A.withObject "NetworkDisconnectRequest" $ \o -> + NetworkDisconnectRequest + <$> (o .:? "Container") + <*> (o .:? "Force") + +-- | ToJSON NetworkDisconnectRequest +instance A.ToJSON NetworkDisconnectRequest where + toJSON NetworkDisconnectRequest {..} = + _omitNulls + [ "Container" .= networkDisconnectRequestContainer + , "Force" .= networkDisconnectRequestForce + ] + + +-- | Construct a value of type 'NetworkDisconnectRequest' (by applying it's required fields, if any) +mkNetworkDisconnectRequest + :: NetworkDisconnectRequest +mkNetworkDisconnectRequest = + NetworkDisconnectRequest + { networkDisconnectRequestContainer = Nothing + , networkDisconnectRequestForce = Nothing + } + +-- ** NetworkPruneResponse +-- | NetworkPruneResponse +-- NetworkPruneResponse +-- +data NetworkPruneResponse = NetworkPruneResponse + { networkPruneResponseNetworksDeleted :: !(Maybe [Text]) -- ^ "NetworksDeleted" - Networks that were deleted + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkPruneResponse +instance A.FromJSON NetworkPruneResponse where + parseJSON = A.withObject "NetworkPruneResponse" $ \o -> + NetworkPruneResponse + <$> (o .:? "NetworksDeleted") + +-- | ToJSON NetworkPruneResponse +instance A.ToJSON NetworkPruneResponse where + toJSON NetworkPruneResponse {..} = + _omitNulls + [ "NetworksDeleted" .= networkPruneResponseNetworksDeleted + ] + + +-- | Construct a value of type 'NetworkPruneResponse' (by applying it's required fields, if any) +mkNetworkPruneResponse + :: NetworkPruneResponse +mkNetworkPruneResponse = + NetworkPruneResponse + { networkPruneResponseNetworksDeleted = Nothing + } + +-- ** NetworkSettings +-- | NetworkSettings +-- NetworkSettings exposes the network settings in the API +data NetworkSettings = NetworkSettings + { networkSettingsBridge :: !(Maybe Text) -- ^ "Bridge" - Name of the default bridge interface when dockerd's --bridge flag is set. + , networkSettingsSandboxId :: !(Maybe Text) -- ^ "SandboxID" - SandboxID uniquely represents a container's network stack. + , networkSettingsHairpinMode :: !(Maybe Bool) -- ^ "HairpinMode" - Indicates if hairpin NAT should be enabled on the virtual interface. Deprecated: This field is never set and will be removed in a future release. + , networkSettingsLinkLocalIpv6Address :: !(Maybe Text) -- ^ "LinkLocalIPv6Address" - IPv6 unicast address using the link-local prefix. Deprecated: This field is never set and will be removed in a future release. + , networkSettingsLinkLocalIpv6PrefixLen :: !(Maybe Int) -- ^ "LinkLocalIPv6PrefixLen" - Prefix length of the IPv6 unicast address. Deprecated: This field is never set and will be removed in a future release. + , networkSettingsPorts :: !(Maybe (Map.Map String [PortBinding])) -- ^ "Ports" - PortMap describes the mapping of container ports to host ports, using the container's port-number and protocol as key in the format `<port>/<protocol>`, for example, `80/udp`. If a container's port is mapped for multiple protocols, separate entries are added to the mapping table. + , networkSettingsSandboxKey :: !(Maybe Text) -- ^ "SandboxKey" - SandboxKey is the full path of the netns handle + , networkSettingsSecondaryIpAddresses :: !(Maybe [Address]) -- ^ "SecondaryIPAddresses" - Deprecated: This field is never set and will be removed in a future release. + , networkSettingsSecondaryIpv6Addresses :: !(Maybe [Address]) -- ^ "SecondaryIPv6Addresses" - Deprecated: This field is never set and will be removed in a future release. + , networkSettingsEndpointId :: !(Maybe Text) -- ^ "EndpointID" - EndpointID uniquely represents a service endpoint in a Sandbox. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsGateway :: !(Maybe Text) -- ^ "Gateway" - Gateway address for the default \"bridge\" network. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsGlobalIpv6Address :: !(Maybe Text) -- ^ "GlobalIPv6Address" - Global IPv6 address for the default \"bridge\" network. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsGlobalIpv6PrefixLen :: !(Maybe Int) -- ^ "GlobalIPv6PrefixLen" - Mask length of the global IPv6 address. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsIpAddress :: !(Maybe Text) -- ^ "IPAddress" - IPv4 address for the default \"bridge\" network. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsIpPrefixLen :: !(Maybe Int) -- ^ "IPPrefixLen" - Mask length of the IPv4 address. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsIpv6Gateway :: !(Maybe Text) -- ^ "IPv6Gateway" - IPv6 gateway address for this network. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsMacAddress :: !(Maybe Text) -- ^ "MacAddress" - MAC address for the container on the default \"bridge\" network. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsNetworks :: !(Maybe (Map.Map String EndpointSettings)) -- ^ "Networks" - Information about all networks that the container is connected to. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkSettings +instance A.FromJSON NetworkSettings where + parseJSON = A.withObject "NetworkSettings" $ \o -> + NetworkSettings + <$> (o .:? "Bridge") + <*> (o .:? "SandboxID") + <*> (o .:? "HairpinMode") + <*> (o .:? "LinkLocalIPv6Address") + <*> (o .:? "LinkLocalIPv6PrefixLen") + <*> (o .:? "Ports") + <*> (o .:? "SandboxKey") + <*> (o .:? "SecondaryIPAddresses") + <*> (o .:? "SecondaryIPv6Addresses") + <*> (o .:? "EndpointID") + <*> (o .:? "Gateway") + <*> (o .:? "GlobalIPv6Address") + <*> (o .:? "GlobalIPv6PrefixLen") + <*> (o .:? "IPAddress") + <*> (o .:? "IPPrefixLen") + <*> (o .:? "IPv6Gateway") + <*> (o .:? "MacAddress") + <*> (o .:? "Networks") + +-- | ToJSON NetworkSettings +instance A.ToJSON NetworkSettings where + toJSON NetworkSettings {..} = + _omitNulls + [ "Bridge" .= networkSettingsBridge + , "SandboxID" .= networkSettingsSandboxId + , "HairpinMode" .= networkSettingsHairpinMode + , "LinkLocalIPv6Address" .= networkSettingsLinkLocalIpv6Address + , "LinkLocalIPv6PrefixLen" .= networkSettingsLinkLocalIpv6PrefixLen + , "Ports" .= networkSettingsPorts + , "SandboxKey" .= networkSettingsSandboxKey + , "SecondaryIPAddresses" .= networkSettingsSecondaryIpAddresses + , "SecondaryIPv6Addresses" .= networkSettingsSecondaryIpv6Addresses + , "EndpointID" .= networkSettingsEndpointId + , "Gateway" .= networkSettingsGateway + , "GlobalIPv6Address" .= networkSettingsGlobalIpv6Address + , "GlobalIPv6PrefixLen" .= networkSettingsGlobalIpv6PrefixLen + , "IPAddress" .= networkSettingsIpAddress + , "IPPrefixLen" .= networkSettingsIpPrefixLen + , "IPv6Gateway" .= networkSettingsIpv6Gateway + , "MacAddress" .= networkSettingsMacAddress + , "Networks" .= networkSettingsNetworks + ] + + +-- | Construct a value of type 'NetworkSettings' (by applying it's required fields, if any) +mkNetworkSettings + :: NetworkSettings +mkNetworkSettings = + NetworkSettings + { networkSettingsBridge = Nothing + , networkSettingsSandboxId = Nothing + , networkSettingsHairpinMode = Nothing + , networkSettingsLinkLocalIpv6Address = Nothing + , networkSettingsLinkLocalIpv6PrefixLen = Nothing + , networkSettingsPorts = Nothing + , networkSettingsSandboxKey = Nothing + , networkSettingsSecondaryIpAddresses = Nothing + , networkSettingsSecondaryIpv6Addresses = Nothing + , networkSettingsEndpointId = Nothing + , networkSettingsGateway = Nothing + , networkSettingsGlobalIpv6Address = Nothing + , networkSettingsGlobalIpv6PrefixLen = Nothing + , networkSettingsIpAddress = Nothing + , networkSettingsIpPrefixLen = Nothing + , networkSettingsIpv6Gateway = Nothing + , networkSettingsMacAddress = Nothing + , networkSettingsNetworks = Nothing + } + +-- ** NetworkingConfig +-- | NetworkingConfig +-- NetworkingConfig represents the container's networking configuration for each of its interfaces. It is used for the networking configs specified in the `docker create` and `docker network connect` commands. +data NetworkingConfig = NetworkingConfig + { networkingConfigEndpointsConfig :: !(Maybe (Map.Map String EndpointSettings)) -- ^ "EndpointsConfig" - A mapping of network name to endpoint configuration for that network. The endpoint configuration can be left empty to connect to that network with no particular endpoint configuration. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkingConfig +instance A.FromJSON NetworkingConfig where + parseJSON = A.withObject "NetworkingConfig" $ \o -> + NetworkingConfig + <$> (o .:? "EndpointsConfig") + +-- | ToJSON NetworkingConfig +instance A.ToJSON NetworkingConfig where + toJSON NetworkingConfig {..} = + _omitNulls + [ "EndpointsConfig" .= networkingConfigEndpointsConfig + ] + + +-- | Construct a value of type 'NetworkingConfig' (by applying it's required fields, if any) +mkNetworkingConfig + :: NetworkingConfig +mkNetworkingConfig = + NetworkingConfig + { networkingConfigEndpointsConfig = Nothing + } + +-- ** Node +-- | Node +data Node = Node + { nodeId :: !(Maybe Text) -- ^ "ID" + , nodeVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , nodeCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" - Date and time at which the node was added to the swarm in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , nodeUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" - Date and time at which the node was last updated in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , nodeSpec :: !(Maybe NodeSpec) -- ^ "Spec" + , nodeDescription :: !(Maybe NodeDescription) -- ^ "Description" + , nodeStatus :: !(Maybe NodeStatus) -- ^ "Status" + , nodeManagerStatus :: !(Maybe ManagerStatus) -- ^ "ManagerStatus" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Node +instance A.FromJSON Node where + parseJSON = A.withObject "Node" $ \o -> + Node + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + <*> (o .:? "Description") + <*> (o .:? "Status") + <*> (o .:? "ManagerStatus") + +-- | ToJSON Node +instance A.ToJSON Node where + toJSON Node {..} = + _omitNulls + [ "ID" .= nodeId + , "Version" .= nodeVersion + , "CreatedAt" .= nodeCreatedAt + , "UpdatedAt" .= nodeUpdatedAt + , "Spec" .= nodeSpec + , "Description" .= nodeDescription + , "Status" .= nodeStatus + , "ManagerStatus" .= nodeManagerStatus + ] + + +-- | Construct a value of type 'Node' (by applying it's required fields, if any) +mkNode + :: Node +mkNode = + Node + { nodeId = Nothing + , nodeVersion = Nothing + , nodeCreatedAt = Nothing + , nodeUpdatedAt = Nothing + , nodeSpec = Nothing + , nodeDescription = Nothing + , nodeStatus = Nothing + , nodeManagerStatus = Nothing + } + +-- ** NodeDescription +-- | NodeDescription +-- NodeDescription encapsulates the properties of the Node as reported by the agent. +data NodeDescription = NodeDescription + { nodeDescriptionHostname :: !(Maybe Text) -- ^ "Hostname" + , nodeDescriptionPlatform :: !(Maybe Platform) -- ^ "Platform" + , nodeDescriptionResources :: !(Maybe ResourceObject) -- ^ "Resources" + , nodeDescriptionEngine :: !(Maybe EngineDescription) -- ^ "Engine" + , nodeDescriptionTlsInfo :: !(Maybe TLSInfo) -- ^ "TLSInfo" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NodeDescription +instance A.FromJSON NodeDescription where + parseJSON = A.withObject "NodeDescription" $ \o -> + NodeDescription + <$> (o .:? "Hostname") + <*> (o .:? "Platform") + <*> (o .:? "Resources") + <*> (o .:? "Engine") + <*> (o .:? "TLSInfo") + +-- | ToJSON NodeDescription +instance A.ToJSON NodeDescription where + toJSON NodeDescription {..} = + _omitNulls + [ "Hostname" .= nodeDescriptionHostname + , "Platform" .= nodeDescriptionPlatform + , "Resources" .= nodeDescriptionResources + , "Engine" .= nodeDescriptionEngine + , "TLSInfo" .= nodeDescriptionTlsInfo + ] + + +-- | Construct a value of type 'NodeDescription' (by applying it's required fields, if any) +mkNodeDescription + :: NodeDescription +mkNodeDescription = + NodeDescription + { nodeDescriptionHostname = Nothing + , nodeDescriptionPlatform = Nothing + , nodeDescriptionResources = Nothing + , nodeDescriptionEngine = Nothing + , nodeDescriptionTlsInfo = Nothing + } + +-- ** NodeSpec +-- | NodeSpec +data NodeSpec = NodeSpec + { nodeSpecName :: !(Maybe Text) -- ^ "Name" - Name for the node. + , nodeSpecLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , nodeSpecRole :: !(Maybe E'Role) -- ^ "Role" - Role of the node. + , nodeSpecAvailability :: !(Maybe E'Availability) -- ^ "Availability" - Availability of the node. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NodeSpec +instance A.FromJSON NodeSpec where + parseJSON = A.withObject "NodeSpec" $ \o -> + NodeSpec + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Role") + <*> (o .:? "Availability") + +-- | ToJSON NodeSpec +instance A.ToJSON NodeSpec where + toJSON NodeSpec {..} = + _omitNulls + [ "Name" .= nodeSpecName + , "Labels" .= nodeSpecLabels + , "Role" .= nodeSpecRole + , "Availability" .= nodeSpecAvailability + ] + + +-- | Construct a value of type 'NodeSpec' (by applying it's required fields, if any) +mkNodeSpec + :: NodeSpec +mkNodeSpec = + NodeSpec + { nodeSpecName = Nothing + , nodeSpecLabels = Nothing + , nodeSpecRole = Nothing + , nodeSpecAvailability = Nothing + } + +-- ** NodeStatus +-- | NodeStatus +-- NodeStatus represents the status of a node. It provides the current status of the node, as seen by the manager. +data NodeStatus = NodeStatus + { nodeStatusState :: !(Maybe NodeState) -- ^ "State" + , nodeStatusMessage :: !(Maybe Text) -- ^ "Message" + , nodeStatusAddr :: !(Maybe Text) -- ^ "Addr" - IP address of the node. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NodeStatus +instance A.FromJSON NodeStatus where + parseJSON = A.withObject "NodeStatus" $ \o -> + NodeStatus + <$> (o .:? "State") + <*> (o .:? "Message") + <*> (o .:? "Addr") + +-- | ToJSON NodeStatus +instance A.ToJSON NodeStatus where + toJSON NodeStatus {..} = + _omitNulls + [ "State" .= nodeStatusState + , "Message" .= nodeStatusMessage + , "Addr" .= nodeStatusAddr + ] + + +-- | Construct a value of type 'NodeStatus' (by applying it's required fields, if any) +mkNodeStatus + :: NodeStatus +mkNodeStatus = + NodeStatus + { nodeStatusState = Nothing + , nodeStatusMessage = Nothing + , nodeStatusAddr = Nothing + } + +-- ** OCIDescriptor +-- | OCIDescriptor +-- 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). +data OCIDescriptor = OCIDescriptor + { oCIDescriptorMediaType :: !(Maybe Text) -- ^ "mediaType" - The media type of the object this schema refers to. + , oCIDescriptorDigest :: !(Maybe Text) -- ^ "digest" - The digest of the targeted content. + , oCIDescriptorSize :: !(Maybe Integer) -- ^ "size" - The size in bytes of the blob. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON OCIDescriptor +instance A.FromJSON OCIDescriptor where + parseJSON = A.withObject "OCIDescriptor" $ \o -> + OCIDescriptor + <$> (o .:? "mediaType") + <*> (o .:? "digest") + <*> (o .:? "size") + +-- | ToJSON OCIDescriptor +instance A.ToJSON OCIDescriptor where + toJSON OCIDescriptor {..} = + _omitNulls + [ "mediaType" .= oCIDescriptorMediaType + , "digest" .= oCIDescriptorDigest + , "size" .= oCIDescriptorSize + ] + + +-- | Construct a value of type 'OCIDescriptor' (by applying it's required fields, if any) +mkOCIDescriptor + :: OCIDescriptor +mkOCIDescriptor = + OCIDescriptor + { oCIDescriptorMediaType = Nothing + , oCIDescriptorDigest = Nothing + , oCIDescriptorSize = Nothing + } + +-- ** OCIPlatform +-- | OCIPlatform +-- 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). +data OCIPlatform = OCIPlatform + { oCIPlatformArchitecture :: !(Maybe Text) -- ^ "architecture" - The CPU architecture, for example `amd64` or `ppc64`. + , oCIPlatformOs :: !(Maybe Text) -- ^ "os" - The operating system, for example `linux` or `windows`. + , oCIPlatformOsVersion :: !(Maybe Text) -- ^ "os.version" - Optional field specifying the operating system version, for example on Windows `10.0.19041.1165`. + , oCIPlatformOsFeatures :: !(Maybe [Text]) -- ^ "os.features" - Optional field specifying an array of strings, each listing a required OS feature (for example on Windows `win32k`). + , oCIPlatformVariant :: !(Maybe Text) -- ^ "variant" - Optional field specifying a variant of the CPU, for example `v7` to specify ARMv7 when architecture is `arm`. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON OCIPlatform +instance A.FromJSON OCIPlatform where + parseJSON = A.withObject "OCIPlatform" $ \o -> + OCIPlatform + <$> (o .:? "architecture") + <*> (o .:? "os") + <*> (o .:? "os.version") + <*> (o .:? "os.features") + <*> (o .:? "variant") + +-- | ToJSON OCIPlatform +instance A.ToJSON OCIPlatform where + toJSON OCIPlatform {..} = + _omitNulls + [ "architecture" .= oCIPlatformArchitecture + , "os" .= oCIPlatformOs + , "os.version" .= oCIPlatformOsVersion + , "os.features" .= oCIPlatformOsFeatures + , "variant" .= oCIPlatformVariant + ] + + +-- | Construct a value of type 'OCIPlatform' (by applying it's required fields, if any) +mkOCIPlatform + :: OCIPlatform +mkOCIPlatform = + OCIPlatform + { oCIPlatformArchitecture = Nothing + , oCIPlatformOs = Nothing + , oCIPlatformOsVersion = Nothing + , oCIPlatformOsFeatures = Nothing + , oCIPlatformVariant = Nothing + } + +-- ** ObjectVersion +-- | ObjectVersion +-- 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. +data ObjectVersion = ObjectVersion + { objectVersionIndex :: !(Maybe Int) -- ^ "Index" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ObjectVersion +instance A.FromJSON ObjectVersion where + parseJSON = A.withObject "ObjectVersion" $ \o -> + ObjectVersion + <$> (o .:? "Index") + +-- | ToJSON ObjectVersion +instance A.ToJSON ObjectVersion where + toJSON ObjectVersion {..} = + _omitNulls + [ "Index" .= objectVersionIndex + ] + + +-- | Construct a value of type 'ObjectVersion' (by applying it's required fields, if any) +mkObjectVersion + :: ObjectVersion +mkObjectVersion = + ObjectVersion + { objectVersionIndex = Nothing + } + +-- ** PeerInfo +-- | PeerInfo +-- PeerInfo represents one peer of an overlay network. +data PeerInfo = PeerInfo + { peerInfoName :: !(Maybe Text) -- ^ "Name" - ID of the peer-node in the Swarm cluster. + , peerInfoIp :: !(Maybe Text) -- ^ "IP" - IP-address of the peer-node in the Swarm cluster. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PeerInfo +instance A.FromJSON PeerInfo where + parseJSON = A.withObject "PeerInfo" $ \o -> + PeerInfo + <$> (o .:? "Name") + <*> (o .:? "IP") + +-- | ToJSON PeerInfo +instance A.ToJSON PeerInfo where + toJSON PeerInfo {..} = + _omitNulls + [ "Name" .= peerInfoName + , "IP" .= peerInfoIp + ] + + +-- | Construct a value of type 'PeerInfo' (by applying it's required fields, if any) +mkPeerInfo + :: PeerInfo +mkPeerInfo = + PeerInfo + { peerInfoName = Nothing + , peerInfoIp = Nothing + } + +-- ** PeerNode +-- | PeerNode +-- Represents a peer-node in the swarm +data PeerNode = PeerNode + { peerNodeNodeId :: !(Maybe Text) -- ^ "NodeID" - Unique identifier of for this node in the swarm. + , peerNodeAddr :: !(Maybe Text) -- ^ "Addr" - IP address and ports at which this node can be reached. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PeerNode +instance A.FromJSON PeerNode where + parseJSON = A.withObject "PeerNode" $ \o -> + PeerNode + <$> (o .:? "NodeID") + <*> (o .:? "Addr") + +-- | ToJSON PeerNode +instance A.ToJSON PeerNode where + toJSON PeerNode {..} = + _omitNulls + [ "NodeID" .= peerNodeNodeId + , "Addr" .= peerNodeAddr + ] + + +-- | Construct a value of type 'PeerNode' (by applying it's required fields, if any) +mkPeerNode + :: PeerNode +mkPeerNode = + PeerNode + { peerNodeNodeId = Nothing + , peerNodeAddr = Nothing + } + +-- ** Platform +-- | Platform +-- Platform represents the platform (Arch/OS). +data Platform = Platform + { platformArchitecture :: !(Maybe Text) -- ^ "Architecture" - Architecture represents the hardware architecture (for example, `x86_64`). + , platformOs :: !(Maybe Text) -- ^ "OS" - OS represents the Operating System (for example, `linux` or `windows`). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Platform +instance A.FromJSON Platform where + parseJSON = A.withObject "Platform" $ \o -> + Platform + <$> (o .:? "Architecture") + <*> (o .:? "OS") + +-- | ToJSON Platform +instance A.ToJSON Platform where + toJSON Platform {..} = + _omitNulls + [ "Architecture" .= platformArchitecture + , "OS" .= platformOs + ] + + +-- | Construct a value of type 'Platform' (by applying it's required fields, if any) +mkPlatform + :: Platform +mkPlatform = + Platform + { platformArchitecture = Nothing + , platformOs = Nothing + } + +-- ** Plugin +-- | Plugin +-- A plugin for the Engine API +data Plugin = Plugin + { pluginId :: !(Maybe Text) -- ^ "Id" + , pluginName :: !(Text) -- ^ /Required/ "Name" + , pluginEnabled :: !(Bool) -- ^ /Required/ "Enabled" - True if the plugin is running. False if the plugin is not running, only installed. + , pluginSettings :: !(PluginSettings) -- ^ /Required/ "Settings" + , pluginPluginReference :: !(Maybe Text) -- ^ "PluginReference" - plugin remote reference used to push/pull the plugin + , pluginConfig :: !(PluginConfig) -- ^ /Required/ "Config" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Plugin +instance A.FromJSON Plugin where + parseJSON = A.withObject "Plugin" $ \o -> + Plugin + <$> (o .:? "Id") + <*> (o .: "Name") + <*> (o .: "Enabled") + <*> (o .: "Settings") + <*> (o .:? "PluginReference") + <*> (o .: "Config") + +-- | ToJSON Plugin +instance A.ToJSON Plugin where + toJSON Plugin {..} = + _omitNulls + [ "Id" .= pluginId + , "Name" .= pluginName + , "Enabled" .= pluginEnabled + , "Settings" .= pluginSettings + , "PluginReference" .= pluginPluginReference + , "Config" .= pluginConfig + ] + + +-- | Construct a value of type 'Plugin' (by applying it's required fields, if any) +mkPlugin + :: Text -- ^ 'pluginName' + -> Bool -- ^ 'pluginEnabled': True if the plugin is running. False if the plugin is not running, only installed. + -> PluginSettings -- ^ 'pluginSettings' + -> PluginConfig -- ^ 'pluginConfig' + -> Plugin +mkPlugin pluginName pluginEnabled pluginSettings pluginConfig = + Plugin + { pluginId = Nothing + , pluginName + , pluginEnabled + , pluginSettings + , pluginPluginReference = Nothing + , pluginConfig + } + +-- ** PluginConfig +-- | PluginConfig +-- The config of a plugin. +data PluginConfig = PluginConfig + { pluginConfigDockerVersion :: !(Maybe Text) -- ^ "DockerVersion" - Docker Version used to create the plugin + , pluginConfigDescription :: !(Text) -- ^ /Required/ "Description" + , pluginConfigDocumentation :: !(Text) -- ^ /Required/ "Documentation" + , pluginConfigInterface :: !(PluginConfigInterface) -- ^ /Required/ "Interface" + , pluginConfigEntrypoint :: !([Text]) -- ^ /Required/ "Entrypoint" + , pluginConfigWorkDir :: !(Text) -- ^ /Required/ "WorkDir" + , pluginConfigUser :: !(Maybe PluginConfigUser) -- ^ "User" + , pluginConfigNetwork :: !(PluginConfigNetwork) -- ^ /Required/ "Network" + , pluginConfigLinux :: !(PluginConfigLinux) -- ^ /Required/ "Linux" + , pluginConfigPropagatedMount :: !(Text) -- ^ /Required/ "PropagatedMount" + , pluginConfigIpcHost :: !(Bool) -- ^ /Required/ "IpcHost" + , pluginConfigPidHost :: !(Bool) -- ^ /Required/ "PidHost" + , pluginConfigMounts :: !([PluginMount]) -- ^ /Required/ "Mounts" + , pluginConfigEnv :: !([PluginEnv]) -- ^ /Required/ "Env" + , pluginConfigArgs :: !(PluginConfigArgs) -- ^ /Required/ "Args" + , pluginConfigRootfs :: !(Maybe PluginConfigRootfs) -- ^ "rootfs" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfig +instance A.FromJSON PluginConfig where + parseJSON = A.withObject "PluginConfig" $ \o -> + PluginConfig + <$> (o .:? "DockerVersion") + <*> (o .: "Description") + <*> (o .: "Documentation") + <*> (o .: "Interface") + <*> (o .: "Entrypoint") + <*> (o .: "WorkDir") + <*> (o .:? "User") + <*> (o .: "Network") + <*> (o .: "Linux") + <*> (o .: "PropagatedMount") + <*> (o .: "IpcHost") + <*> (o .: "PidHost") + <*> (o .: "Mounts") + <*> (o .: "Env") + <*> (o .: "Args") + <*> (o .:? "rootfs") + +-- | ToJSON PluginConfig +instance A.ToJSON PluginConfig where + toJSON PluginConfig {..} = + _omitNulls + [ "DockerVersion" .= pluginConfigDockerVersion + , "Description" .= pluginConfigDescription + , "Documentation" .= pluginConfigDocumentation + , "Interface" .= pluginConfigInterface + , "Entrypoint" .= pluginConfigEntrypoint + , "WorkDir" .= pluginConfigWorkDir + , "User" .= pluginConfigUser + , "Network" .= pluginConfigNetwork + , "Linux" .= pluginConfigLinux + , "PropagatedMount" .= pluginConfigPropagatedMount + , "IpcHost" .= pluginConfigIpcHost + , "PidHost" .= pluginConfigPidHost + , "Mounts" .= pluginConfigMounts + , "Env" .= pluginConfigEnv + , "Args" .= pluginConfigArgs + , "rootfs" .= pluginConfigRootfs + ] + + +-- | Construct a value of type 'PluginConfig' (by applying it's required fields, if any) +mkPluginConfig + :: Text -- ^ 'pluginConfigDescription' + -> Text -- ^ 'pluginConfigDocumentation' + -> PluginConfigInterface -- ^ 'pluginConfigInterface' + -> [Text] -- ^ 'pluginConfigEntrypoint' + -> Text -- ^ 'pluginConfigWorkDir' + -> PluginConfigNetwork -- ^ 'pluginConfigNetwork' + -> PluginConfigLinux -- ^ 'pluginConfigLinux' + -> Text -- ^ 'pluginConfigPropagatedMount' + -> Bool -- ^ 'pluginConfigIpcHost' + -> Bool -- ^ 'pluginConfigPidHost' + -> [PluginMount] -- ^ 'pluginConfigMounts' + -> [PluginEnv] -- ^ 'pluginConfigEnv' + -> PluginConfigArgs -- ^ 'pluginConfigArgs' + -> PluginConfig +mkPluginConfig pluginConfigDescription pluginConfigDocumentation pluginConfigInterface pluginConfigEntrypoint pluginConfigWorkDir pluginConfigNetwork pluginConfigLinux pluginConfigPropagatedMount pluginConfigIpcHost pluginConfigPidHost pluginConfigMounts pluginConfigEnv pluginConfigArgs = + PluginConfig + { pluginConfigDockerVersion = Nothing + , pluginConfigDescription + , pluginConfigDocumentation + , pluginConfigInterface + , pluginConfigEntrypoint + , pluginConfigWorkDir + , pluginConfigUser = Nothing + , pluginConfigNetwork + , pluginConfigLinux + , pluginConfigPropagatedMount + , pluginConfigIpcHost + , pluginConfigPidHost + , pluginConfigMounts + , pluginConfigEnv + , pluginConfigArgs + , pluginConfigRootfs = Nothing + } + +-- ** PluginConfigArgs +-- | PluginConfigArgs +data PluginConfigArgs = PluginConfigArgs + { pluginConfigArgsName :: !(Text) -- ^ /Required/ "Name" + , pluginConfigArgsDescription :: !(Text) -- ^ /Required/ "Description" + , pluginConfigArgsSettable :: !([Text]) -- ^ /Required/ "Settable" + , pluginConfigArgsValue :: !([Text]) -- ^ /Required/ "Value" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfigArgs +instance A.FromJSON PluginConfigArgs where + parseJSON = A.withObject "PluginConfigArgs" $ \o -> + PluginConfigArgs + <$> (o .: "Name") + <*> (o .: "Description") + <*> (o .: "Settable") + <*> (o .: "Value") + +-- | ToJSON PluginConfigArgs +instance A.ToJSON PluginConfigArgs where + toJSON PluginConfigArgs {..} = + _omitNulls + [ "Name" .= pluginConfigArgsName + , "Description" .= pluginConfigArgsDescription + , "Settable" .= pluginConfigArgsSettable + , "Value" .= pluginConfigArgsValue + ] + + +-- | Construct a value of type 'PluginConfigArgs' (by applying it's required fields, if any) +mkPluginConfigArgs + :: Text -- ^ 'pluginConfigArgsName' + -> Text -- ^ 'pluginConfigArgsDescription' + -> [Text] -- ^ 'pluginConfigArgsSettable' + -> [Text] -- ^ 'pluginConfigArgsValue' + -> PluginConfigArgs +mkPluginConfigArgs pluginConfigArgsName pluginConfigArgsDescription pluginConfigArgsSettable pluginConfigArgsValue = + PluginConfigArgs + { pluginConfigArgsName + , pluginConfigArgsDescription + , pluginConfigArgsSettable + , pluginConfigArgsValue + } + +-- ** PluginConfigInterface +-- | PluginConfigInterface +-- The interface between Docker and the plugin +data PluginConfigInterface = PluginConfigInterface + { pluginConfigInterfaceTypes :: !([PluginInterfaceType]) -- ^ /Required/ "Types" + , pluginConfigInterfaceSocket :: !(Text) -- ^ /Required/ "Socket" + , pluginConfigInterfaceProtocolScheme :: !(Maybe E'ProtocolScheme) -- ^ "ProtocolScheme" - Protocol to use for clients connecting to the plugin. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfigInterface +instance A.FromJSON PluginConfigInterface where + parseJSON = A.withObject "PluginConfigInterface" $ \o -> + PluginConfigInterface + <$> (o .: "Types") + <*> (o .: "Socket") + <*> (o .:? "ProtocolScheme") + +-- | ToJSON PluginConfigInterface +instance A.ToJSON PluginConfigInterface where + toJSON PluginConfigInterface {..} = + _omitNulls + [ "Types" .= pluginConfigInterfaceTypes + , "Socket" .= pluginConfigInterfaceSocket + , "ProtocolScheme" .= pluginConfigInterfaceProtocolScheme + ] + + +-- | Construct a value of type 'PluginConfigInterface' (by applying it's required fields, if any) +mkPluginConfigInterface + :: [PluginInterfaceType] -- ^ 'pluginConfigInterfaceTypes' + -> Text -- ^ 'pluginConfigInterfaceSocket' + -> PluginConfigInterface +mkPluginConfigInterface pluginConfigInterfaceTypes pluginConfigInterfaceSocket = + PluginConfigInterface + { pluginConfigInterfaceTypes + , pluginConfigInterfaceSocket + , pluginConfigInterfaceProtocolScheme = Nothing + } + +-- ** PluginConfigLinux +-- | PluginConfigLinux +data PluginConfigLinux = PluginConfigLinux + { pluginConfigLinuxCapabilities :: !([Text]) -- ^ /Required/ "Capabilities" + , pluginConfigLinuxAllowAllDevices :: !(Bool) -- ^ /Required/ "AllowAllDevices" + , pluginConfigLinuxDevices :: !([PluginDevice]) -- ^ /Required/ "Devices" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfigLinux +instance A.FromJSON PluginConfigLinux where + parseJSON = A.withObject "PluginConfigLinux" $ \o -> + PluginConfigLinux + <$> (o .: "Capabilities") + <*> (o .: "AllowAllDevices") + <*> (o .: "Devices") + +-- | ToJSON PluginConfigLinux +instance A.ToJSON PluginConfigLinux where + toJSON PluginConfigLinux {..} = + _omitNulls + [ "Capabilities" .= pluginConfigLinuxCapabilities + , "AllowAllDevices" .= pluginConfigLinuxAllowAllDevices + , "Devices" .= pluginConfigLinuxDevices + ] + + +-- | Construct a value of type 'PluginConfigLinux' (by applying it's required fields, if any) +mkPluginConfigLinux + :: [Text] -- ^ 'pluginConfigLinuxCapabilities' + -> Bool -- ^ 'pluginConfigLinuxAllowAllDevices' + -> [PluginDevice] -- ^ 'pluginConfigLinuxDevices' + -> PluginConfigLinux +mkPluginConfigLinux pluginConfigLinuxCapabilities pluginConfigLinuxAllowAllDevices pluginConfigLinuxDevices = + PluginConfigLinux + { pluginConfigLinuxCapabilities + , pluginConfigLinuxAllowAllDevices + , pluginConfigLinuxDevices + } + +-- ** PluginConfigNetwork +-- | PluginConfigNetwork +data PluginConfigNetwork = PluginConfigNetwork + { pluginConfigNetworkType :: !(Text) -- ^ /Required/ "Type" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfigNetwork +instance A.FromJSON PluginConfigNetwork where + parseJSON = A.withObject "PluginConfigNetwork" $ \o -> + PluginConfigNetwork + <$> (o .: "Type") + +-- | ToJSON PluginConfigNetwork +instance A.ToJSON PluginConfigNetwork where + toJSON PluginConfigNetwork {..} = + _omitNulls + [ "Type" .= pluginConfigNetworkType + ] + + +-- | Construct a value of type 'PluginConfigNetwork' (by applying it's required fields, if any) +mkPluginConfigNetwork + :: Text -- ^ 'pluginConfigNetworkType' + -> PluginConfigNetwork +mkPluginConfigNetwork pluginConfigNetworkType = + PluginConfigNetwork + { pluginConfigNetworkType + } + +-- ** PluginConfigRootfs +-- | PluginConfigRootfs +data PluginConfigRootfs = PluginConfigRootfs + { pluginConfigRootfsType :: !(Maybe Text) -- ^ "type" + , pluginConfigRootfsDiffIds :: !(Maybe [Text]) -- ^ "diff_ids" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfigRootfs +instance A.FromJSON PluginConfigRootfs where + parseJSON = A.withObject "PluginConfigRootfs" $ \o -> + PluginConfigRootfs + <$> (o .:? "type") + <*> (o .:? "diff_ids") + +-- | ToJSON PluginConfigRootfs +instance A.ToJSON PluginConfigRootfs where + toJSON PluginConfigRootfs {..} = + _omitNulls + [ "type" .= pluginConfigRootfsType + , "diff_ids" .= pluginConfigRootfsDiffIds + ] + + +-- | Construct a value of type 'PluginConfigRootfs' (by applying it's required fields, if any) +mkPluginConfigRootfs + :: PluginConfigRootfs +mkPluginConfigRootfs = + PluginConfigRootfs + { pluginConfigRootfsType = Nothing + , pluginConfigRootfsDiffIds = Nothing + } + +-- ** PluginConfigUser +-- | PluginConfigUser +data PluginConfigUser = PluginConfigUser + { pluginConfigUserUid :: !(Maybe Int) -- ^ "UID" + , pluginConfigUserGid :: !(Maybe Int) -- ^ "GID" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfigUser +instance A.FromJSON PluginConfigUser where + parseJSON = A.withObject "PluginConfigUser" $ \o -> + PluginConfigUser + <$> (o .:? "UID") + <*> (o .:? "GID") + +-- | ToJSON PluginConfigUser +instance A.ToJSON PluginConfigUser where + toJSON PluginConfigUser {..} = + _omitNulls + [ "UID" .= pluginConfigUserUid + , "GID" .= pluginConfigUserGid + ] + + +-- | Construct a value of type 'PluginConfigUser' (by applying it's required fields, if any) +mkPluginConfigUser + :: PluginConfigUser +mkPluginConfigUser = + PluginConfigUser + { pluginConfigUserUid = Nothing + , pluginConfigUserGid = Nothing + } + +-- ** PluginDevice +-- | PluginDevice +data PluginDevice = PluginDevice + { pluginDeviceName :: !(Text) -- ^ /Required/ "Name" + , pluginDeviceDescription :: !(Text) -- ^ /Required/ "Description" + , pluginDeviceSettable :: !([Text]) -- ^ /Required/ "Settable" + , pluginDevicePath :: !(Text) -- ^ /Required/ "Path" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginDevice +instance A.FromJSON PluginDevice where + parseJSON = A.withObject "PluginDevice" $ \o -> + PluginDevice + <$> (o .: "Name") + <*> (o .: "Description") + <*> (o .: "Settable") + <*> (o .: "Path") + +-- | ToJSON PluginDevice +instance A.ToJSON PluginDevice where + toJSON PluginDevice {..} = + _omitNulls + [ "Name" .= pluginDeviceName + , "Description" .= pluginDeviceDescription + , "Settable" .= pluginDeviceSettable + , "Path" .= pluginDevicePath + ] + + +-- | Construct a value of type 'PluginDevice' (by applying it's required fields, if any) +mkPluginDevice + :: Text -- ^ 'pluginDeviceName' + -> Text -- ^ 'pluginDeviceDescription' + -> [Text] -- ^ 'pluginDeviceSettable' + -> Text -- ^ 'pluginDevicePath' + -> PluginDevice +mkPluginDevice pluginDeviceName pluginDeviceDescription pluginDeviceSettable pluginDevicePath = + PluginDevice + { pluginDeviceName + , pluginDeviceDescription + , pluginDeviceSettable + , pluginDevicePath + } + +-- ** PluginEnv +-- | PluginEnv +data PluginEnv = PluginEnv + { pluginEnvName :: !(Text) -- ^ /Required/ "Name" + , pluginEnvDescription :: !(Text) -- ^ /Required/ "Description" + , pluginEnvSettable :: !([Text]) -- ^ /Required/ "Settable" + , pluginEnvValue :: !(Text) -- ^ /Required/ "Value" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginEnv +instance A.FromJSON PluginEnv where + parseJSON = A.withObject "PluginEnv" $ \o -> + PluginEnv + <$> (o .: "Name") + <*> (o .: "Description") + <*> (o .: "Settable") + <*> (o .: "Value") + +-- | ToJSON PluginEnv +instance A.ToJSON PluginEnv where + toJSON PluginEnv {..} = + _omitNulls + [ "Name" .= pluginEnvName + , "Description" .= pluginEnvDescription + , "Settable" .= pluginEnvSettable + , "Value" .= pluginEnvValue + ] + + +-- | Construct a value of type 'PluginEnv' (by applying it's required fields, if any) +mkPluginEnv + :: Text -- ^ 'pluginEnvName' + -> Text -- ^ 'pluginEnvDescription' + -> [Text] -- ^ 'pluginEnvSettable' + -> Text -- ^ 'pluginEnvValue' + -> PluginEnv +mkPluginEnv pluginEnvName pluginEnvDescription pluginEnvSettable pluginEnvValue = + PluginEnv + { pluginEnvName + , pluginEnvDescription + , pluginEnvSettable + , pluginEnvValue + } + +-- ** PluginInterfaceType +-- | PluginInterfaceType +data PluginInterfaceType = PluginInterfaceType + { pluginInterfaceTypePrefix :: !(Text) -- ^ /Required/ "Prefix" + , pluginInterfaceTypeCapability :: !(Text) -- ^ /Required/ "Capability" + , pluginInterfaceTypeVersion :: !(Text) -- ^ /Required/ "Version" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginInterfaceType +instance A.FromJSON PluginInterfaceType where + parseJSON = A.withObject "PluginInterfaceType" $ \o -> + PluginInterfaceType + <$> (o .: "Prefix") + <*> (o .: "Capability") + <*> (o .: "Version") + +-- | ToJSON PluginInterfaceType +instance A.ToJSON PluginInterfaceType where + toJSON PluginInterfaceType {..} = + _omitNulls + [ "Prefix" .= pluginInterfaceTypePrefix + , "Capability" .= pluginInterfaceTypeCapability + , "Version" .= pluginInterfaceTypeVersion + ] + + +-- | Construct a value of type 'PluginInterfaceType' (by applying it's required fields, if any) +mkPluginInterfaceType + :: Text -- ^ 'pluginInterfaceTypePrefix' + -> Text -- ^ 'pluginInterfaceTypeCapability' + -> Text -- ^ 'pluginInterfaceTypeVersion' + -> PluginInterfaceType +mkPluginInterfaceType pluginInterfaceTypePrefix pluginInterfaceTypeCapability pluginInterfaceTypeVersion = + PluginInterfaceType + { pluginInterfaceTypePrefix + , pluginInterfaceTypeCapability + , pluginInterfaceTypeVersion + } + +-- ** PluginMount +-- | PluginMount +data PluginMount = PluginMount + { pluginMountName :: !(Text) -- ^ /Required/ "Name" + , pluginMountDescription :: !(Text) -- ^ /Required/ "Description" + , pluginMountSettable :: !([Text]) -- ^ /Required/ "Settable" + , pluginMountSource :: !(Text) -- ^ /Required/ "Source" + , pluginMountDestination :: !(Text) -- ^ /Required/ "Destination" + , pluginMountType :: !(Text) -- ^ /Required/ "Type" + , pluginMountOptions :: !([Text]) -- ^ /Required/ "Options" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginMount +instance A.FromJSON PluginMount where + parseJSON = A.withObject "PluginMount" $ \o -> + PluginMount + <$> (o .: "Name") + <*> (o .: "Description") + <*> (o .: "Settable") + <*> (o .: "Source") + <*> (o .: "Destination") + <*> (o .: "Type") + <*> (o .: "Options") + +-- | ToJSON PluginMount +instance A.ToJSON PluginMount where + toJSON PluginMount {..} = + _omitNulls + [ "Name" .= pluginMountName + , "Description" .= pluginMountDescription + , "Settable" .= pluginMountSettable + , "Source" .= pluginMountSource + , "Destination" .= pluginMountDestination + , "Type" .= pluginMountType + , "Options" .= pluginMountOptions + ] + + +-- | Construct a value of type 'PluginMount' (by applying it's required fields, if any) +mkPluginMount + :: Text -- ^ 'pluginMountName' + -> Text -- ^ 'pluginMountDescription' + -> [Text] -- ^ 'pluginMountSettable' + -> Text -- ^ 'pluginMountSource' + -> Text -- ^ 'pluginMountDestination' + -> Text -- ^ 'pluginMountType' + -> [Text] -- ^ 'pluginMountOptions' + -> PluginMount +mkPluginMount pluginMountName pluginMountDescription pluginMountSettable pluginMountSource pluginMountDestination pluginMountType pluginMountOptions = + PluginMount + { pluginMountName + , pluginMountDescription + , pluginMountSettable + , pluginMountSource + , pluginMountDestination + , pluginMountType + , pluginMountOptions + } + +-- ** PluginPrivilege +-- | PluginPrivilege +-- Describes a permission the user has to accept upon installing the plugin. +data PluginPrivilege = PluginPrivilege + { pluginPrivilegeName :: !(Maybe Text) -- ^ "Name" + , pluginPrivilegeDescription :: !(Maybe Text) -- ^ "Description" + , pluginPrivilegeValue :: !(Maybe [Text]) -- ^ "Value" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginPrivilege +instance A.FromJSON PluginPrivilege where + parseJSON = A.withObject "PluginPrivilege" $ \o -> + PluginPrivilege + <$> (o .:? "Name") + <*> (o .:? "Description") + <*> (o .:? "Value") + +-- | ToJSON PluginPrivilege +instance A.ToJSON PluginPrivilege where + toJSON PluginPrivilege {..} = + _omitNulls + [ "Name" .= pluginPrivilegeName + , "Description" .= pluginPrivilegeDescription + , "Value" .= pluginPrivilegeValue + ] + + +-- | Construct a value of type 'PluginPrivilege' (by applying it's required fields, if any) +mkPluginPrivilege + :: PluginPrivilege +mkPluginPrivilege = + PluginPrivilege + { pluginPrivilegeName = Nothing + , pluginPrivilegeDescription = Nothing + , pluginPrivilegeValue = Nothing + } + +-- ** PluginSettings +-- | PluginSettings +-- Settings that can be modified by users. +data PluginSettings = PluginSettings + { pluginSettingsMounts :: !([PluginMount]) -- ^ /Required/ "Mounts" + , pluginSettingsEnv :: !([Text]) -- ^ /Required/ "Env" + , pluginSettingsArgs :: !([Text]) -- ^ /Required/ "Args" + , pluginSettingsDevices :: !([PluginDevice]) -- ^ /Required/ "Devices" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginSettings +instance A.FromJSON PluginSettings where + parseJSON = A.withObject "PluginSettings" $ \o -> + PluginSettings + <$> (o .: "Mounts") + <*> (o .: "Env") + <*> (o .: "Args") + <*> (o .: "Devices") + +-- | ToJSON PluginSettings +instance A.ToJSON PluginSettings where + toJSON PluginSettings {..} = + _omitNulls + [ "Mounts" .= pluginSettingsMounts + , "Env" .= pluginSettingsEnv + , "Args" .= pluginSettingsArgs + , "Devices" .= pluginSettingsDevices + ] + + +-- | Construct a value of type 'PluginSettings' (by applying it's required fields, if any) +mkPluginSettings + :: [PluginMount] -- ^ 'pluginSettingsMounts' + -> [Text] -- ^ 'pluginSettingsEnv' + -> [Text] -- ^ 'pluginSettingsArgs' + -> [PluginDevice] -- ^ 'pluginSettingsDevices' + -> PluginSettings +mkPluginSettings pluginSettingsMounts pluginSettingsEnv pluginSettingsArgs pluginSettingsDevices = + PluginSettings + { pluginSettingsMounts + , pluginSettingsEnv + , pluginSettingsArgs + , pluginSettingsDevices + } + +-- ** PluginsInfo +-- | PluginsInfo +-- 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. +data PluginsInfo = PluginsInfo + { pluginsInfoVolume :: !(Maybe [Text]) -- ^ "Volume" - Names of available volume-drivers, and network-driver plugins. + , pluginsInfoNetwork :: !(Maybe [Text]) -- ^ "Network" - Names of available network-drivers, and network-driver plugins. + , pluginsInfoAuthorization :: !(Maybe [Text]) -- ^ "Authorization" - Names of available authorization plugins. + , pluginsInfoLog :: !(Maybe [Text]) -- ^ "Log" - Names of available logging-drivers, and logging-driver plugins. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginsInfo +instance A.FromJSON PluginsInfo where + parseJSON = A.withObject "PluginsInfo" $ \o -> + PluginsInfo + <$> (o .:? "Volume") + <*> (o .:? "Network") + <*> (o .:? "Authorization") + <*> (o .:? "Log") + +-- | ToJSON PluginsInfo +instance A.ToJSON PluginsInfo where + toJSON PluginsInfo {..} = + _omitNulls + [ "Volume" .= pluginsInfoVolume + , "Network" .= pluginsInfoNetwork + , "Authorization" .= pluginsInfoAuthorization + , "Log" .= pluginsInfoLog + ] + + +-- | Construct a value of type 'PluginsInfo' (by applying it's required fields, if any) +mkPluginsInfo + :: PluginsInfo +mkPluginsInfo = + PluginsInfo + { pluginsInfoVolume = Nothing + , pluginsInfoNetwork = Nothing + , pluginsInfoAuthorization = Nothing + , pluginsInfoLog = Nothing + } + +-- ** Port +-- | Port +-- An open port on a container +data Port = Port + { portIp :: !(Maybe Text) -- ^ "IP" - Host IP address that the container's port is mapped to + , portPrivatePort :: !(Int) -- ^ /Required/ "PrivatePort" - Port on the container + , portPublicPort :: !(Maybe Int) -- ^ "PublicPort" - Port exposed on the host + , portType :: !(E'Type) -- ^ /Required/ "Type" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Port +instance A.FromJSON Port where + parseJSON = A.withObject "Port" $ \o -> + Port + <$> (o .:? "IP") + <*> (o .: "PrivatePort") + <*> (o .:? "PublicPort") + <*> (o .: "Type") + +-- | ToJSON Port +instance A.ToJSON Port where + toJSON Port {..} = + _omitNulls + [ "IP" .= portIp + , "PrivatePort" .= portPrivatePort + , "PublicPort" .= portPublicPort + , "Type" .= portType + ] + + +-- | Construct a value of type 'Port' (by applying it's required fields, if any) +mkPort + :: Int -- ^ 'portPrivatePort': Port on the container + -> E'Type -- ^ 'portType' + -> Port +mkPort portPrivatePort portType = + Port + { portIp = Nothing + , portPrivatePort + , portPublicPort = Nothing + , portType + } + +-- ** PortBinding +-- | PortBinding +-- PortBinding represents a binding between a host IP address and a host port. +data PortBinding = PortBinding + { portBindingHostIp :: !(Maybe Text) -- ^ "HostIp" - Host IP address that the container's port is mapped to. + , portBindingHostPort :: !(Maybe Text) -- ^ "HostPort" - Host port number that the container's port is mapped to. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PortBinding +instance A.FromJSON PortBinding where + parseJSON = A.withObject "PortBinding" $ \o -> + PortBinding + <$> (o .:? "HostIp") + <*> (o .:? "HostPort") + +-- | ToJSON PortBinding +instance A.ToJSON PortBinding where + toJSON PortBinding {..} = + _omitNulls + [ "HostIp" .= portBindingHostIp + , "HostPort" .= portBindingHostPort + ] + + +-- | Construct a value of type 'PortBinding' (by applying it's required fields, if any) +mkPortBinding + :: PortBinding +mkPortBinding = + PortBinding + { portBindingHostIp = Nothing + , portBindingHostPort = Nothing + } + +-- ** PortStatus +-- | PortStatus +-- represents the port status of a task's host ports whose service has published host ports +data PortStatus = PortStatus + { portStatusPorts :: !(Maybe [EndpointPortConfig]) -- ^ "Ports" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PortStatus +instance A.FromJSON PortStatus where + parseJSON = A.withObject "PortStatus" $ \o -> + PortStatus + <$> (o .:? "Ports") + +-- | ToJSON PortStatus +instance A.ToJSON PortStatus where + toJSON PortStatus {..} = + _omitNulls + [ "Ports" .= portStatusPorts + ] + + +-- | Construct a value of type 'PortStatus' (by applying it's required fields, if any) +mkPortStatus + :: PortStatus +mkPortStatus = + PortStatus + { portStatusPorts = Nothing + } + +-- ** ProcessConfig +-- | ProcessConfig +data ProcessConfig = ProcessConfig + { processConfigPrivileged :: !(Maybe Bool) -- ^ "privileged" + , processConfigUser :: !(Maybe Text) -- ^ "user" + , processConfigTty :: !(Maybe Bool) -- ^ "tty" + , processConfigEntrypoint :: !(Maybe Text) -- ^ "entrypoint" + , processConfigArguments :: !(Maybe [Text]) -- ^ "arguments" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ProcessConfig +instance A.FromJSON ProcessConfig where + parseJSON = A.withObject "ProcessConfig" $ \o -> + ProcessConfig + <$> (o .:? "privileged") + <*> (o .:? "user") + <*> (o .:? "tty") + <*> (o .:? "entrypoint") + <*> (o .:? "arguments") + +-- | ToJSON ProcessConfig +instance A.ToJSON ProcessConfig where + toJSON ProcessConfig {..} = + _omitNulls + [ "privileged" .= processConfigPrivileged + , "user" .= processConfigUser + , "tty" .= processConfigTty + , "entrypoint" .= processConfigEntrypoint + , "arguments" .= processConfigArguments + ] + + +-- | Construct a value of type 'ProcessConfig' (by applying it's required fields, if any) +mkProcessConfig + :: ProcessConfig +mkProcessConfig = + ProcessConfig + { processConfigPrivileged = Nothing + , processConfigUser = Nothing + , processConfigTty = Nothing + , processConfigEntrypoint = Nothing + , processConfigArguments = Nothing + } + +-- ** ProgressDetail +-- | ProgressDetail +data ProgressDetail = ProgressDetail + { progressDetailCurrent :: !(Maybe Int) -- ^ "current" + , progressDetailTotal :: !(Maybe Int) -- ^ "total" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ProgressDetail +instance A.FromJSON ProgressDetail where + parseJSON = A.withObject "ProgressDetail" $ \o -> + ProgressDetail + <$> (o .:? "current") + <*> (o .:? "total") + +-- | ToJSON ProgressDetail +instance A.ToJSON ProgressDetail where + toJSON ProgressDetail {..} = + _omitNulls + [ "current" .= progressDetailCurrent + , "total" .= progressDetailTotal + ] + + +-- | Construct a value of type 'ProgressDetail' (by applying it's required fields, if any) +mkProgressDetail + :: ProgressDetail +mkProgressDetail = + ProgressDetail + { progressDetailCurrent = Nothing + , progressDetailTotal = Nothing + } + +-- ** PushImageInfo +-- | PushImageInfo +data PushImageInfo = PushImageInfo + { pushImageInfoError :: !(Maybe Text) -- ^ "error" + , pushImageInfoStatus :: !(Maybe Text) -- ^ "status" + , pushImageInfoProgress :: !(Maybe Text) -- ^ "progress" + , pushImageInfoProgressDetail :: !(Maybe ProgressDetail) -- ^ "progressDetail" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PushImageInfo +instance A.FromJSON PushImageInfo where + parseJSON = A.withObject "PushImageInfo" $ \o -> + PushImageInfo + <$> (o .:? "error") + <*> (o .:? "status") + <*> (o .:? "progress") + <*> (o .:? "progressDetail") + +-- | ToJSON PushImageInfo +instance A.ToJSON PushImageInfo where + toJSON PushImageInfo {..} = + _omitNulls + [ "error" .= pushImageInfoError + , "status" .= pushImageInfoStatus + , "progress" .= pushImageInfoProgress + , "progressDetail" .= pushImageInfoProgressDetail + ] + + +-- | Construct a value of type 'PushImageInfo' (by applying it's required fields, if any) +mkPushImageInfo + :: PushImageInfo +mkPushImageInfo = + PushImageInfo + { pushImageInfoError = Nothing + , pushImageInfoStatus = Nothing + , pushImageInfoProgress = Nothing + , pushImageInfoProgressDetail = Nothing + } + +-- ** RegistryServiceConfig +-- | RegistryServiceConfig +-- RegistryServiceConfig stores daemon registry services configuration. +data RegistryServiceConfig = RegistryServiceConfig + { registryServiceConfigAllowNondistributableArtifactsCidrs :: !(Maybe [Text]) -- ^ "AllowNondistributableArtifactsCIDRs" - List of IP ranges to which nondistributable artifacts can be pushed, using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior, and enables the daemon to push nondistributable artifacts to all registries whose resolved IP address is within the subnet described by the CIDR syntax. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server. > **Warning**: Nondistributable artifacts typically have restrictions > on how and where they can be distributed and shared. Only use this > feature to push artifacts to private registries and ensure that you > are in compliance with any terms that cover redistributing > nondistributable artifacts. + , registryServiceConfigAllowNondistributableArtifactsHostnames :: !(Maybe [Text]) -- ^ "AllowNondistributableArtifactsHostnames" - List of registry hostnames to which nondistributable artifacts can be pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`. Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior for the specified registries. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server. > **Warning**: Nondistributable artifacts typically have restrictions > on how and where they can be distributed and shared. Only use this > feature to push artifacts to private registries and ensure that you > are in compliance with any terms that cover redistributing > nondistributable artifacts. + , registryServiceConfigInsecureRegistryCidrs :: !(Maybe [Text]) -- ^ "InsecureRegistryCIDRs" - List of IP ranges of insecure registries, using the CIDR syntax ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication. By default, local registries (`127.0.0.0/8`) are configured as insecure. All other registries are secure. Communicating with an insecure registry is not possible if the daemon assumes that registry is secure. This configuration override this behavior, insecure communication with registries whose resolved IP address is within the subnet described by the CIDR syntax. Registries can also be marked insecure by hostname. Those registries are listed under `IndexConfigs` and have their `Secure` field set to `false`. > **Warning**: Using this option can be useful when running a local > registry, but introduces security vulnerabilities. This option > should therefore ONLY be used for testing purposes. For increased > security, users should add their CA to their system's list of trusted > CAs instead of enabling this option. + , registryServiceConfigIndexConfigs :: !(Maybe (Map.Map String IndexInfo)) -- ^ "IndexConfigs" + , registryServiceConfigMirrors :: !(Maybe [Text]) -- ^ "Mirrors" - List of registry URLs that act as a mirror for the official (`docker.io`) registry. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON RegistryServiceConfig +instance A.FromJSON RegistryServiceConfig where + parseJSON = A.withObject "RegistryServiceConfig" $ \o -> + RegistryServiceConfig + <$> (o .:? "AllowNondistributableArtifactsCIDRs") + <*> (o .:? "AllowNondistributableArtifactsHostnames") + <*> (o .:? "InsecureRegistryCIDRs") + <*> (o .:? "IndexConfigs") + <*> (o .:? "Mirrors") + +-- | ToJSON RegistryServiceConfig +instance A.ToJSON RegistryServiceConfig where + toJSON RegistryServiceConfig {..} = + _omitNulls + [ "AllowNondistributableArtifactsCIDRs" .= registryServiceConfigAllowNondistributableArtifactsCidrs + , "AllowNondistributableArtifactsHostnames" .= registryServiceConfigAllowNondistributableArtifactsHostnames + , "InsecureRegistryCIDRs" .= registryServiceConfigInsecureRegistryCidrs + , "IndexConfigs" .= registryServiceConfigIndexConfigs + , "Mirrors" .= registryServiceConfigMirrors + ] + + +-- | Construct a value of type 'RegistryServiceConfig' (by applying it's required fields, if any) +mkRegistryServiceConfig + :: RegistryServiceConfig +mkRegistryServiceConfig = + RegistryServiceConfig + { registryServiceConfigAllowNondistributableArtifactsCidrs = Nothing + , registryServiceConfigAllowNondistributableArtifactsHostnames = Nothing + , registryServiceConfigInsecureRegistryCidrs = Nothing + , registryServiceConfigIndexConfigs = Nothing + , registryServiceConfigMirrors = Nothing + } + +-- ** ResourceObject +-- | ResourceObject +-- An object describing the resources which can be advertised by a node and requested by a task. +data ResourceObject = ResourceObject + { resourceObjectNanoCpus :: !(Maybe Integer) -- ^ "NanoCPUs" + , resourceObjectMemoryBytes :: !(Maybe Integer) -- ^ "MemoryBytes" + , resourceObjectGenericResources :: !(Maybe [GenericResourcesInner]) -- ^ "GenericResources" - User-defined resources can be either Integer resources (e.g, `SSD=3`) or String resources (e.g, `GPU=UUID1`). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ResourceObject +instance A.FromJSON ResourceObject where + parseJSON = A.withObject "ResourceObject" $ \o -> + ResourceObject + <$> (o .:? "NanoCPUs") + <*> (o .:? "MemoryBytes") + <*> (o .:? "GenericResources") + +-- | ToJSON ResourceObject +instance A.ToJSON ResourceObject where + toJSON ResourceObject {..} = + _omitNulls + [ "NanoCPUs" .= resourceObjectNanoCpus + , "MemoryBytes" .= resourceObjectMemoryBytes + , "GenericResources" .= resourceObjectGenericResources + ] + + +-- | Construct a value of type 'ResourceObject' (by applying it's required fields, if any) +mkResourceObject + :: ResourceObject +mkResourceObject = + ResourceObject + { resourceObjectNanoCpus = Nothing + , resourceObjectMemoryBytes = Nothing + , resourceObjectGenericResources = Nothing + } + +-- ** Resources +-- | Resources +-- A container's resources (cgroups config, ulimits, etc) +data Resources = Resources + { resourcesCpuShares :: !(Maybe Int) -- ^ "CpuShares" - An integer value representing this container's relative CPU weight versus other containers. + , resourcesMemory :: !(Maybe Integer) -- ^ "Memory" - Memory limit in bytes. + , resourcesCgroupParent :: !(Maybe Text) -- ^ "CgroupParent" - Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + , resourcesBlkioWeight :: !(Maybe Int) -- ^ "BlkioWeight" - Block IO weight (relative weight). + , resourcesBlkioWeightDevice :: !(Maybe [ResourcesBlkioWeightDeviceInner]) -- ^ "BlkioWeightDevice" - Block IO weight (relative device weight) in the form: ``` [{\"Path\": \"device_path\", \"Weight\": weight}] ``` + , resourcesBlkioDeviceReadBps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceReadBps" - Limit read rate (bytes per second) from a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , resourcesBlkioDeviceWriteBps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceWriteBps" - Limit write rate (bytes per second) to a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , resourcesBlkioDeviceReadIOps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceReadIOps" - Limit read rate (IO per second) from a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , resourcesBlkioDeviceWriteIOps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceWriteIOps" - Limit write rate (IO per second) to a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , resourcesCpuPeriod :: !(Maybe Integer) -- ^ "CpuPeriod" - The length of a CPU period in microseconds. + , resourcesCpuQuota :: !(Maybe Integer) -- ^ "CpuQuota" - Microseconds of CPU time that the container can get in a CPU period. + , resourcesCpuRealtimePeriod :: !(Maybe Integer) -- ^ "CpuRealtimePeriod" - The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + , resourcesCpuRealtimeRuntime :: !(Maybe Integer) -- ^ "CpuRealtimeRuntime" - The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + , resourcesCpusetCpus :: !(Maybe Text) -- ^ "CpusetCpus" - CPUs in which to allow execution (e.g., `0-3`, `0,1`). + , resourcesCpusetMems :: !(Maybe Text) -- ^ "CpusetMems" - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + , resourcesDevices :: !(Maybe [DeviceMapping]) -- ^ "Devices" - A list of devices to add to the container. + , resourcesDeviceCgroupRules :: !(Maybe [Text]) -- ^ "DeviceCgroupRules" - a list of cgroup rules to apply to the container + , resourcesDeviceRequests :: !(Maybe [DeviceRequest]) -- ^ "DeviceRequests" - A list of requests for devices to be sent to device drivers. + , resourcesKernelMemoryTcp :: !(Maybe Integer) -- ^ "KernelMemoryTCP" - Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. + , resourcesMemoryReservation :: !(Maybe Integer) -- ^ "MemoryReservation" - Memory soft limit in bytes. + , resourcesMemorySwap :: !(Maybe Integer) -- ^ "MemorySwap" - Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + , resourcesMemorySwappiness :: !(Maybe Integer) -- ^ "MemorySwappiness" - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + , resourcesNanoCpus :: !(Maybe Integer) -- ^ "NanoCpus" - CPU quota in units of 10<sup>-9</sup> CPUs. + , resourcesOomKillDisable :: !(Maybe Bool) -- ^ "OomKillDisable" - Disable OOM Killer for the container. + , resourcesInit :: !(Maybe Bool) -- ^ "Init" - Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + , resourcesPidsLimit :: !(Maybe Integer) -- ^ "PidsLimit" - Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not change. + , resourcesUlimits :: !(Maybe [ResourcesUlimitsInner]) -- ^ "Ulimits" - A list of resource limits to set in the container. For example: ``` {\"Name\": \"nofile\", \"Soft\": 1024, \"Hard\": 2048} ``` + , resourcesCpuCount :: !(Maybe Integer) -- ^ "CpuCount" - The number of usable CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + , resourcesCpuPercent :: !(Maybe Integer) -- ^ "CpuPercent" - The usable percentage of the available CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + , resourcesIoMaximumIOps :: !(Maybe Integer) -- ^ "IOMaximumIOps" - Maximum IOps for the container system drive (Windows only) + , resourcesIoMaximumBandwidth :: !(Maybe Integer) -- ^ "IOMaximumBandwidth" - Maximum IO in bytes per second for the container system drive (Windows only). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Resources +instance A.FromJSON Resources where + parseJSON = A.withObject "Resources" $ \o -> + Resources + <$> (o .:? "CpuShares") + <*> (o .:? "Memory") + <*> (o .:? "CgroupParent") + <*> (o .:? "BlkioWeight") + <*> (o .:? "BlkioWeightDevice") + <*> (o .:? "BlkioDeviceReadBps") + <*> (o .:? "BlkioDeviceWriteBps") + <*> (o .:? "BlkioDeviceReadIOps") + <*> (o .:? "BlkioDeviceWriteIOps") + <*> (o .:? "CpuPeriod") + <*> (o .:? "CpuQuota") + <*> (o .:? "CpuRealtimePeriod") + <*> (o .:? "CpuRealtimeRuntime") + <*> (o .:? "CpusetCpus") + <*> (o .:? "CpusetMems") + <*> (o .:? "Devices") + <*> (o .:? "DeviceCgroupRules") + <*> (o .:? "DeviceRequests") + <*> (o .:? "KernelMemoryTCP") + <*> (o .:? "MemoryReservation") + <*> (o .:? "MemorySwap") + <*> (o .:? "MemorySwappiness") + <*> (o .:? "NanoCpus") + <*> (o .:? "OomKillDisable") + <*> (o .:? "Init") + <*> (o .:? "PidsLimit") + <*> (o .:? "Ulimits") + <*> (o .:? "CpuCount") + <*> (o .:? "CpuPercent") + <*> (o .:? "IOMaximumIOps") + <*> (o .:? "IOMaximumBandwidth") + +-- | ToJSON Resources +instance A.ToJSON Resources where + toJSON Resources {..} = + _omitNulls + [ "CpuShares" .= resourcesCpuShares + , "Memory" .= resourcesMemory + , "CgroupParent" .= resourcesCgroupParent + , "BlkioWeight" .= resourcesBlkioWeight + , "BlkioWeightDevice" .= resourcesBlkioWeightDevice + , "BlkioDeviceReadBps" .= resourcesBlkioDeviceReadBps + , "BlkioDeviceWriteBps" .= resourcesBlkioDeviceWriteBps + , "BlkioDeviceReadIOps" .= resourcesBlkioDeviceReadIOps + , "BlkioDeviceWriteIOps" .= resourcesBlkioDeviceWriteIOps + , "CpuPeriod" .= resourcesCpuPeriod + , "CpuQuota" .= resourcesCpuQuota + , "CpuRealtimePeriod" .= resourcesCpuRealtimePeriod + , "CpuRealtimeRuntime" .= resourcesCpuRealtimeRuntime + , "CpusetCpus" .= resourcesCpusetCpus + , "CpusetMems" .= resourcesCpusetMems + , "Devices" .= resourcesDevices + , "DeviceCgroupRules" .= resourcesDeviceCgroupRules + , "DeviceRequests" .= resourcesDeviceRequests + , "KernelMemoryTCP" .= resourcesKernelMemoryTcp + , "MemoryReservation" .= resourcesMemoryReservation + , "MemorySwap" .= resourcesMemorySwap + , "MemorySwappiness" .= resourcesMemorySwappiness + , "NanoCpus" .= resourcesNanoCpus + , "OomKillDisable" .= resourcesOomKillDisable + , "Init" .= resourcesInit + , "PidsLimit" .= resourcesPidsLimit + , "Ulimits" .= resourcesUlimits + , "CpuCount" .= resourcesCpuCount + , "CpuPercent" .= resourcesCpuPercent + , "IOMaximumIOps" .= resourcesIoMaximumIOps + , "IOMaximumBandwidth" .= resourcesIoMaximumBandwidth + ] + + +-- | Construct a value of type 'Resources' (by applying it's required fields, if any) +mkResources + :: Resources +mkResources = + Resources + { resourcesCpuShares = Nothing + , resourcesMemory = Nothing + , resourcesCgroupParent = Nothing + , resourcesBlkioWeight = Nothing + , resourcesBlkioWeightDevice = Nothing + , resourcesBlkioDeviceReadBps = Nothing + , resourcesBlkioDeviceWriteBps = Nothing + , resourcesBlkioDeviceReadIOps = Nothing + , resourcesBlkioDeviceWriteIOps = Nothing + , resourcesCpuPeriod = Nothing + , resourcesCpuQuota = Nothing + , resourcesCpuRealtimePeriod = Nothing + , resourcesCpuRealtimeRuntime = Nothing + , resourcesCpusetCpus = Nothing + , resourcesCpusetMems = Nothing + , resourcesDevices = Nothing + , resourcesDeviceCgroupRules = Nothing + , resourcesDeviceRequests = Nothing + , resourcesKernelMemoryTcp = Nothing + , resourcesMemoryReservation = Nothing + , resourcesMemorySwap = Nothing + , resourcesMemorySwappiness = Nothing + , resourcesNanoCpus = Nothing + , resourcesOomKillDisable = Nothing + , resourcesInit = Nothing + , resourcesPidsLimit = Nothing + , resourcesUlimits = Nothing + , resourcesCpuCount = Nothing + , resourcesCpuPercent = Nothing + , resourcesIoMaximumIOps = Nothing + , resourcesIoMaximumBandwidth = Nothing + } + +-- ** ResourcesBlkioWeightDeviceInner +-- | ResourcesBlkioWeightDeviceInner +data ResourcesBlkioWeightDeviceInner = ResourcesBlkioWeightDeviceInner + { resourcesBlkioWeightDeviceInnerPath :: !(Maybe Text) -- ^ "Path" + , resourcesBlkioWeightDeviceInnerWeight :: !(Maybe Int) -- ^ "Weight" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ResourcesBlkioWeightDeviceInner +instance A.FromJSON ResourcesBlkioWeightDeviceInner where + parseJSON = A.withObject "ResourcesBlkioWeightDeviceInner" $ \o -> + ResourcesBlkioWeightDeviceInner + <$> (o .:? "Path") + <*> (o .:? "Weight") + +-- | ToJSON ResourcesBlkioWeightDeviceInner +instance A.ToJSON ResourcesBlkioWeightDeviceInner where + toJSON ResourcesBlkioWeightDeviceInner {..} = + _omitNulls + [ "Path" .= resourcesBlkioWeightDeviceInnerPath + , "Weight" .= resourcesBlkioWeightDeviceInnerWeight + ] + + +-- | Construct a value of type 'ResourcesBlkioWeightDeviceInner' (by applying it's required fields, if any) +mkResourcesBlkioWeightDeviceInner + :: ResourcesBlkioWeightDeviceInner +mkResourcesBlkioWeightDeviceInner = + ResourcesBlkioWeightDeviceInner + { resourcesBlkioWeightDeviceInnerPath = Nothing + , resourcesBlkioWeightDeviceInnerWeight = Nothing + } + +-- ** ResourcesUlimitsInner +-- | ResourcesUlimitsInner +data ResourcesUlimitsInner = ResourcesUlimitsInner + { resourcesUlimitsInnerName :: !(Maybe Text) -- ^ "Name" - Name of ulimit + , resourcesUlimitsInnerSoft :: !(Maybe Int) -- ^ "Soft" - Soft limit + , resourcesUlimitsInnerHard :: !(Maybe Int) -- ^ "Hard" - Hard limit + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ResourcesUlimitsInner +instance A.FromJSON ResourcesUlimitsInner where + parseJSON = A.withObject "ResourcesUlimitsInner" $ \o -> + ResourcesUlimitsInner + <$> (o .:? "Name") + <*> (o .:? "Soft") + <*> (o .:? "Hard") + +-- | ToJSON ResourcesUlimitsInner +instance A.ToJSON ResourcesUlimitsInner where + toJSON ResourcesUlimitsInner {..} = + _omitNulls + [ "Name" .= resourcesUlimitsInnerName + , "Soft" .= resourcesUlimitsInnerSoft + , "Hard" .= resourcesUlimitsInnerHard + ] + + +-- | Construct a value of type 'ResourcesUlimitsInner' (by applying it's required fields, if any) +mkResourcesUlimitsInner + :: ResourcesUlimitsInner +mkResourcesUlimitsInner = + ResourcesUlimitsInner + { resourcesUlimitsInnerName = Nothing + , resourcesUlimitsInnerSoft = Nothing + , resourcesUlimitsInnerHard = Nothing + } + +-- ** RestartPolicy +-- | RestartPolicy +-- The behavior to apply when the container exits. The default is not to restart. An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. +data RestartPolicy = RestartPolicy + { restartPolicyName :: !(Maybe E'Name) -- ^ "Name" - - Empty string means not to restart - `no` Do not automatically restart - `always` Always restart - `unless-stopped` Restart always except when the user has manually stopped the container - `on-failure` Restart only when the container exit code is non-zero + , restartPolicyMaximumRetryCount :: !(Maybe Int) -- ^ "MaximumRetryCount" - If `on-failure` is used, the number of times to retry before giving up. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON RestartPolicy +instance A.FromJSON RestartPolicy where + parseJSON = A.withObject "RestartPolicy" $ \o -> + RestartPolicy + <$> (o .:? "Name") + <*> (o .:? "MaximumRetryCount") + +-- | ToJSON RestartPolicy +instance A.ToJSON RestartPolicy where + toJSON RestartPolicy {..} = + _omitNulls + [ "Name" .= restartPolicyName + , "MaximumRetryCount" .= restartPolicyMaximumRetryCount + ] + + +-- | Construct a value of type 'RestartPolicy' (by applying it's required fields, if any) +mkRestartPolicy + :: RestartPolicy +mkRestartPolicy = + RestartPolicy + { restartPolicyName = Nothing + , restartPolicyMaximumRetryCount = Nothing + } + +-- ** Runtime +-- | Runtime +-- 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. +data Runtime = Runtime + { runtimePath :: !(Maybe Text) -- ^ "path" - Name and, optional, path, of the OCI executable binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result. + , runtimeRuntimeArgs :: !(Maybe [Text]) -- ^ "runtimeArgs" - List of command-line arguments to pass to the runtime when invoked. + , runtimeStatus :: !(Maybe (Map.Map String Text)) -- ^ "status" - Information specific to the runtime. While this API specification does not define data provided by runtimes, the following well-known properties may be provided by runtimes: `org.opencontainers.runtime-spec.features`: features structure as defined in the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec/blob/main/features.md), in a JSON string representation. <p><br /></p> > **Note**: The information returned in this field, including the > formatting of values and labels, should not be considered stable, > and may change without notice. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Runtime +instance A.FromJSON Runtime where + parseJSON = A.withObject "Runtime" $ \o -> + Runtime + <$> (o .:? "path") + <*> (o .:? "runtimeArgs") + <*> (o .:? "status") + +-- | ToJSON Runtime +instance A.ToJSON Runtime where + toJSON Runtime {..} = + _omitNulls + [ "path" .= runtimePath + , "runtimeArgs" .= runtimeRuntimeArgs + , "status" .= runtimeStatus + ] + + +-- | Construct a value of type 'Runtime' (by applying it's required fields, if any) +mkRuntime + :: Runtime +mkRuntime = + Runtime + { runtimePath = Nothing + , runtimeRuntimeArgs = Nothing + , runtimeStatus = Nothing + } + +-- ** Secret +-- | Secret +data Secret = Secret + { secretId :: !(Maybe Text) -- ^ "ID" + , secretVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , secretCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" + , secretUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" + , secretSpec :: !(Maybe SecretSpec) -- ^ "Spec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Secret +instance A.FromJSON Secret where + parseJSON = A.withObject "Secret" $ \o -> + Secret + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + +-- | ToJSON Secret +instance A.ToJSON Secret where + toJSON Secret {..} = + _omitNulls + [ "ID" .= secretId + , "Version" .= secretVersion + , "CreatedAt" .= secretCreatedAt + , "UpdatedAt" .= secretUpdatedAt + , "Spec" .= secretSpec + ] + + +-- | Construct a value of type 'Secret' (by applying it's required fields, if any) +mkSecret + :: Secret +mkSecret = + Secret + { secretId = Nothing + , secretVersion = Nothing + , secretCreatedAt = Nothing + , secretUpdatedAt = Nothing + , secretSpec = Nothing + } + +-- ** SecretCreateRequest +-- | SecretCreateRequest +data SecretCreateRequest = SecretCreateRequest + { secretCreateRequestName :: !(Maybe Text) -- ^ "Name" - User-defined name of the secret. + , secretCreateRequestLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , secretCreateRequestData :: !(Maybe Text) -- ^ "Data" - Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) data to store as secret. This field is only used to _create_ a secret, and is not returned by other endpoints. + , secretCreateRequestDriver :: !(Maybe Driver) -- ^ "Driver" + , secretCreateRequestTemplating :: !(Maybe Driver) -- ^ "Templating" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SecretCreateRequest +instance A.FromJSON SecretCreateRequest where + parseJSON = A.withObject "SecretCreateRequest" $ \o -> + SecretCreateRequest + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Data") + <*> (o .:? "Driver") + <*> (o .:? "Templating") + +-- | ToJSON SecretCreateRequest +instance A.ToJSON SecretCreateRequest where + toJSON SecretCreateRequest {..} = + _omitNulls + [ "Name" .= secretCreateRequestName + , "Labels" .= secretCreateRequestLabels + , "Data" .= secretCreateRequestData + , "Driver" .= secretCreateRequestDriver + , "Templating" .= secretCreateRequestTemplating + ] + + +-- | Construct a value of type 'SecretCreateRequest' (by applying it's required fields, if any) +mkSecretCreateRequest + :: SecretCreateRequest +mkSecretCreateRequest = + SecretCreateRequest + { secretCreateRequestName = Nothing + , secretCreateRequestLabels = Nothing + , secretCreateRequestData = Nothing + , secretCreateRequestDriver = Nothing + , secretCreateRequestTemplating = Nothing + } + +-- ** SecretSpec +-- | SecretSpec +data SecretSpec = SecretSpec + { secretSpecName :: !(Maybe Text) -- ^ "Name" - User-defined name of the secret. + , secretSpecLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , secretSpecData :: !(Maybe Text) -- ^ "Data" - Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) data to store as secret. This field is only used to _create_ a secret, and is not returned by other endpoints. + , secretSpecDriver :: !(Maybe Driver) -- ^ "Driver" + , secretSpecTemplating :: !(Maybe Driver) -- ^ "Templating" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SecretSpec +instance A.FromJSON SecretSpec where + parseJSON = A.withObject "SecretSpec" $ \o -> + SecretSpec + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Data") + <*> (o .:? "Driver") + <*> (o .:? "Templating") + +-- | ToJSON SecretSpec +instance A.ToJSON SecretSpec where + toJSON SecretSpec {..} = + _omitNulls + [ "Name" .= secretSpecName + , "Labels" .= secretSpecLabels + , "Data" .= secretSpecData + , "Driver" .= secretSpecDriver + , "Templating" .= secretSpecTemplating + ] + + +-- | Construct a value of type 'SecretSpec' (by applying it's required fields, if any) +mkSecretSpec + :: SecretSpec +mkSecretSpec = + SecretSpec + { secretSpecName = Nothing + , secretSpecLabels = Nothing + , secretSpecData = Nothing + , secretSpecDriver = Nothing + , secretSpecTemplating = Nothing + } + +-- ** Service +-- | Service +data Service = Service + { serviceId :: !(Maybe Text) -- ^ "ID" + , serviceVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , serviceCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" + , serviceUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" + , serviceSpec :: !(Maybe ServiceSpec) -- ^ "Spec" + , serviceEndpoint :: !(Maybe ServiceEndpoint) -- ^ "Endpoint" + , serviceUpdateStatus :: !(Maybe ServiceUpdateStatus) -- ^ "UpdateStatus" + , serviceServiceStatus :: !(Maybe ServiceServiceStatus) -- ^ "ServiceStatus" + , serviceJobStatus :: !(Maybe ServiceJobStatus) -- ^ "JobStatus" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Service +instance A.FromJSON Service where + parseJSON = A.withObject "Service" $ \o -> + Service + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + <*> (o .:? "Endpoint") + <*> (o .:? "UpdateStatus") + <*> (o .:? "ServiceStatus") + <*> (o .:? "JobStatus") + +-- | ToJSON Service +instance A.ToJSON Service where + toJSON Service {..} = + _omitNulls + [ "ID" .= serviceId + , "Version" .= serviceVersion + , "CreatedAt" .= serviceCreatedAt + , "UpdatedAt" .= serviceUpdatedAt + , "Spec" .= serviceSpec + , "Endpoint" .= serviceEndpoint + , "UpdateStatus" .= serviceUpdateStatus + , "ServiceStatus" .= serviceServiceStatus + , "JobStatus" .= serviceJobStatus + ] + + +-- | Construct a value of type 'Service' (by applying it's required fields, if any) +mkService + :: Service +mkService = + Service + { serviceId = Nothing + , serviceVersion = Nothing + , serviceCreatedAt = Nothing + , serviceUpdatedAt = Nothing + , serviceSpec = Nothing + , serviceEndpoint = Nothing + , serviceUpdateStatus = Nothing + , serviceServiceStatus = Nothing + , serviceJobStatus = Nothing + } + +-- ** ServiceCreateRequest +-- | ServiceCreateRequest +data ServiceCreateRequest = ServiceCreateRequest + { serviceCreateRequestName :: !(Maybe Text) -- ^ "Name" - Name of the service. + , serviceCreateRequestLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , serviceCreateRequestTaskTemplate :: !(Maybe TaskSpec) -- ^ "TaskTemplate" + , serviceCreateRequestMode :: !(Maybe ServiceSpecMode) -- ^ "Mode" + , serviceCreateRequestUpdateConfig :: !(Maybe ServiceSpecUpdateConfig) -- ^ "UpdateConfig" + , serviceCreateRequestRollbackConfig :: !(Maybe ServiceSpecRollbackConfig) -- ^ "RollbackConfig" + , serviceCreateRequestNetworks :: !(Maybe [NetworkAttachmentConfig]) -- ^ "Networks" - Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + , serviceCreateRequestEndpointSpec :: !(Maybe EndpointSpec) -- ^ "EndpointSpec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceCreateRequest +instance A.FromJSON ServiceCreateRequest where + parseJSON = A.withObject "ServiceCreateRequest" $ \o -> + ServiceCreateRequest + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "TaskTemplate") + <*> (o .:? "Mode") + <*> (o .:? "UpdateConfig") + <*> (o .:? "RollbackConfig") + <*> (o .:? "Networks") + <*> (o .:? "EndpointSpec") + +-- | ToJSON ServiceCreateRequest +instance A.ToJSON ServiceCreateRequest where + toJSON ServiceCreateRequest {..} = + _omitNulls + [ "Name" .= serviceCreateRequestName + , "Labels" .= serviceCreateRequestLabels + , "TaskTemplate" .= serviceCreateRequestTaskTemplate + , "Mode" .= serviceCreateRequestMode + , "UpdateConfig" .= serviceCreateRequestUpdateConfig + , "RollbackConfig" .= serviceCreateRequestRollbackConfig + , "Networks" .= serviceCreateRequestNetworks + , "EndpointSpec" .= serviceCreateRequestEndpointSpec + ] + + +-- | Construct a value of type 'ServiceCreateRequest' (by applying it's required fields, if any) +mkServiceCreateRequest + :: ServiceCreateRequest +mkServiceCreateRequest = + ServiceCreateRequest + { serviceCreateRequestName = Nothing + , serviceCreateRequestLabels = Nothing + , serviceCreateRequestTaskTemplate = Nothing + , serviceCreateRequestMode = Nothing + , serviceCreateRequestUpdateConfig = Nothing + , serviceCreateRequestRollbackConfig = Nothing + , serviceCreateRequestNetworks = Nothing + , serviceCreateRequestEndpointSpec = Nothing + } + +-- ** ServiceCreateResponse +-- | ServiceCreateResponse +-- contains the information returned to a client on the creation of a new service. +data ServiceCreateResponse = ServiceCreateResponse + { serviceCreateResponseId :: !(Maybe Text) -- ^ "ID" - The ID of the created service. + , serviceCreateResponseWarnings :: !(Maybe [Text]) -- ^ "Warnings" - Optional warning message. FIXME(thaJeztah): this should have \"omitempty\" in the generated type. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceCreateResponse +instance A.FromJSON ServiceCreateResponse where + parseJSON = A.withObject "ServiceCreateResponse" $ \o -> + ServiceCreateResponse + <$> (o .:? "ID") + <*> (o .:? "Warnings") + +-- | ToJSON ServiceCreateResponse +instance A.ToJSON ServiceCreateResponse where + toJSON ServiceCreateResponse {..} = + _omitNulls + [ "ID" .= serviceCreateResponseId + , "Warnings" .= serviceCreateResponseWarnings + ] + + +-- | Construct a value of type 'ServiceCreateResponse' (by applying it's required fields, if any) +mkServiceCreateResponse + :: ServiceCreateResponse +mkServiceCreateResponse = + ServiceCreateResponse + { serviceCreateResponseId = Nothing + , serviceCreateResponseWarnings = Nothing + } + +-- ** ServiceEndpoint +-- | ServiceEndpoint +data ServiceEndpoint = ServiceEndpoint + { serviceEndpointSpec :: !(Maybe EndpointSpec) -- ^ "Spec" + , serviceEndpointPorts :: !(Maybe [EndpointPortConfig]) -- ^ "Ports" + , serviceEndpointVirtualIps :: !(Maybe [ServiceEndpointVirtualIPsInner]) -- ^ "VirtualIPs" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceEndpoint +instance A.FromJSON ServiceEndpoint where + parseJSON = A.withObject "ServiceEndpoint" $ \o -> + ServiceEndpoint + <$> (o .:? "Spec") + <*> (o .:? "Ports") + <*> (o .:? "VirtualIPs") + +-- | ToJSON ServiceEndpoint +instance A.ToJSON ServiceEndpoint where + toJSON ServiceEndpoint {..} = + _omitNulls + [ "Spec" .= serviceEndpointSpec + , "Ports" .= serviceEndpointPorts + , "VirtualIPs" .= serviceEndpointVirtualIps + ] + + +-- | Construct a value of type 'ServiceEndpoint' (by applying it's required fields, if any) +mkServiceEndpoint + :: ServiceEndpoint +mkServiceEndpoint = + ServiceEndpoint + { serviceEndpointSpec = Nothing + , serviceEndpointPorts = Nothing + , serviceEndpointVirtualIps = Nothing + } + +-- ** ServiceEndpointVirtualIPsInner +-- | ServiceEndpointVirtualIPsInner +data ServiceEndpointVirtualIPsInner = ServiceEndpointVirtualIPsInner + { serviceEndpointVirtualIPsInnerNetworkId :: !(Maybe Text) -- ^ "NetworkID" + , serviceEndpointVirtualIPsInnerAddr :: !(Maybe Text) -- ^ "Addr" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceEndpointVirtualIPsInner +instance A.FromJSON ServiceEndpointVirtualIPsInner where + parseJSON = A.withObject "ServiceEndpointVirtualIPsInner" $ \o -> + ServiceEndpointVirtualIPsInner + <$> (o .:? "NetworkID") + <*> (o .:? "Addr") + +-- | ToJSON ServiceEndpointVirtualIPsInner +instance A.ToJSON ServiceEndpointVirtualIPsInner where + toJSON ServiceEndpointVirtualIPsInner {..} = + _omitNulls + [ "NetworkID" .= serviceEndpointVirtualIPsInnerNetworkId + , "Addr" .= serviceEndpointVirtualIPsInnerAddr + ] + + +-- | Construct a value of type 'ServiceEndpointVirtualIPsInner' (by applying it's required fields, if any) +mkServiceEndpointVirtualIPsInner + :: ServiceEndpointVirtualIPsInner +mkServiceEndpointVirtualIPsInner = + ServiceEndpointVirtualIPsInner + { serviceEndpointVirtualIPsInnerNetworkId = Nothing + , serviceEndpointVirtualIPsInnerAddr = Nothing + } + +-- ** ServiceJobStatus +-- | ServiceJobStatus +-- 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. +data ServiceJobStatus = ServiceJobStatus + { serviceJobStatusJobIteration :: !(Maybe ObjectVersion) -- ^ "JobIteration" + , serviceJobStatusLastExecution :: !(Maybe Text) -- ^ "LastExecution" - The last time, as observed by the server, that this job was started. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceJobStatus +instance A.FromJSON ServiceJobStatus where + parseJSON = A.withObject "ServiceJobStatus" $ \o -> + ServiceJobStatus + <$> (o .:? "JobIteration") + <*> (o .:? "LastExecution") + +-- | ToJSON ServiceJobStatus +instance A.ToJSON ServiceJobStatus where + toJSON ServiceJobStatus {..} = + _omitNulls + [ "JobIteration" .= serviceJobStatusJobIteration + , "LastExecution" .= serviceJobStatusLastExecution + ] + + +-- | Construct a value of type 'ServiceJobStatus' (by applying it's required fields, if any) +mkServiceJobStatus + :: ServiceJobStatus +mkServiceJobStatus = + ServiceJobStatus + { serviceJobStatusJobIteration = Nothing + , serviceJobStatusLastExecution = Nothing + } + +-- ** ServiceServiceStatus +-- | ServiceServiceStatus +-- The status of the service's tasks. Provided only when requested as part of a ServiceList operation. +data ServiceServiceStatus = ServiceServiceStatus + { serviceServiceStatusRunningTasks :: !(Maybe Int) -- ^ "RunningTasks" - The number of tasks for the service currently in the Running state. + , serviceServiceStatusDesiredTasks :: !(Maybe Int) -- ^ "DesiredTasks" - The number of tasks for the service desired to be running. For replicated services, this is the replica count from the service spec. For global services, this is computed by taking count of all tasks for the service with a Desired State other than Shutdown. + , serviceServiceStatusCompletedTasks :: !(Maybe Int) -- ^ "CompletedTasks" - The number of tasks for a job that are in the Completed state. This field must be cross-referenced with the service type, as the value of 0 may mean the service is not in a job mode, or it may mean the job-mode service has no tasks yet Completed. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceServiceStatus +instance A.FromJSON ServiceServiceStatus where + parseJSON = A.withObject "ServiceServiceStatus" $ \o -> + ServiceServiceStatus + <$> (o .:? "RunningTasks") + <*> (o .:? "DesiredTasks") + <*> (o .:? "CompletedTasks") + +-- | ToJSON ServiceServiceStatus +instance A.ToJSON ServiceServiceStatus where + toJSON ServiceServiceStatus {..} = + _omitNulls + [ "RunningTasks" .= serviceServiceStatusRunningTasks + , "DesiredTasks" .= serviceServiceStatusDesiredTasks + , "CompletedTasks" .= serviceServiceStatusCompletedTasks + ] + + +-- | Construct a value of type 'ServiceServiceStatus' (by applying it's required fields, if any) +mkServiceServiceStatus + :: ServiceServiceStatus +mkServiceServiceStatus = + ServiceServiceStatus + { serviceServiceStatusRunningTasks = Nothing + , serviceServiceStatusDesiredTasks = Nothing + , serviceServiceStatusCompletedTasks = Nothing + } + +-- ** ServiceSpec +-- | ServiceSpec +-- User modifiable configuration for a service. +data ServiceSpec = ServiceSpec + { serviceSpecName :: !(Maybe Text) -- ^ "Name" - Name of the service. + , serviceSpecLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , serviceSpecTaskTemplate :: !(Maybe TaskSpec) -- ^ "TaskTemplate" + , serviceSpecMode :: !(Maybe ServiceSpecMode) -- ^ "Mode" + , serviceSpecUpdateConfig :: !(Maybe ServiceSpecUpdateConfig) -- ^ "UpdateConfig" + , serviceSpecRollbackConfig :: !(Maybe ServiceSpecRollbackConfig) -- ^ "RollbackConfig" + , serviceSpecNetworks :: !(Maybe [NetworkAttachmentConfig]) -- ^ "Networks" - Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + , serviceSpecEndpointSpec :: !(Maybe EndpointSpec) -- ^ "EndpointSpec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceSpec +instance A.FromJSON ServiceSpec where + parseJSON = A.withObject "ServiceSpec" $ \o -> + ServiceSpec + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "TaskTemplate") + <*> (o .:? "Mode") + <*> (o .:? "UpdateConfig") + <*> (o .:? "RollbackConfig") + <*> (o .:? "Networks") + <*> (o .:? "EndpointSpec") + +-- | ToJSON ServiceSpec +instance A.ToJSON ServiceSpec where + toJSON ServiceSpec {..} = + _omitNulls + [ "Name" .= serviceSpecName + , "Labels" .= serviceSpecLabels + , "TaskTemplate" .= serviceSpecTaskTemplate + , "Mode" .= serviceSpecMode + , "UpdateConfig" .= serviceSpecUpdateConfig + , "RollbackConfig" .= serviceSpecRollbackConfig + , "Networks" .= serviceSpecNetworks + , "EndpointSpec" .= serviceSpecEndpointSpec + ] + + +-- | Construct a value of type 'ServiceSpec' (by applying it's required fields, if any) +mkServiceSpec + :: ServiceSpec +mkServiceSpec = + ServiceSpec + { serviceSpecName = Nothing + , serviceSpecLabels = Nothing + , serviceSpecTaskTemplate = Nothing + , serviceSpecMode = Nothing + , serviceSpecUpdateConfig = Nothing + , serviceSpecRollbackConfig = Nothing + , serviceSpecNetworks = Nothing + , serviceSpecEndpointSpec = Nothing + } + +-- ** ServiceSpecMode +-- | ServiceSpecMode +-- Scheduling mode for the service. +data ServiceSpecMode = ServiceSpecMode + { serviceSpecModeReplicated :: !(Maybe ServiceSpecModeReplicated) -- ^ "Replicated" + , serviceSpecModeGlobal :: !(Maybe A.Value) -- ^ "Global" + , serviceSpecModeReplicatedJob :: !(Maybe ServiceSpecModeReplicatedJob) -- ^ "ReplicatedJob" + , serviceSpecModeGlobalJob :: !(Maybe A.Value) -- ^ "GlobalJob" - The mode used for services which run a task to the completed state on each valid node. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceSpecMode +instance A.FromJSON ServiceSpecMode where + parseJSON = A.withObject "ServiceSpecMode" $ \o -> + ServiceSpecMode + <$> (o .:? "Replicated") + <*> (o .:? "Global") + <*> (o .:? "ReplicatedJob") + <*> (o .:? "GlobalJob") + +-- | ToJSON ServiceSpecMode +instance A.ToJSON ServiceSpecMode where + toJSON ServiceSpecMode {..} = + _omitNulls + [ "Replicated" .= serviceSpecModeReplicated + , "Global" .= serviceSpecModeGlobal + , "ReplicatedJob" .= serviceSpecModeReplicatedJob + , "GlobalJob" .= serviceSpecModeGlobalJob + ] + + +-- | Construct a value of type 'ServiceSpecMode' (by applying it's required fields, if any) +mkServiceSpecMode + :: ServiceSpecMode +mkServiceSpecMode = + ServiceSpecMode + { serviceSpecModeReplicated = Nothing + , serviceSpecModeGlobal = Nothing + , serviceSpecModeReplicatedJob = Nothing + , serviceSpecModeGlobalJob = Nothing + } + +-- ** ServiceSpecModeReplicated +-- | ServiceSpecModeReplicated +data ServiceSpecModeReplicated = ServiceSpecModeReplicated + { serviceSpecModeReplicatedReplicas :: !(Maybe Integer) -- ^ "Replicas" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceSpecModeReplicated +instance A.FromJSON ServiceSpecModeReplicated where + parseJSON = A.withObject "ServiceSpecModeReplicated" $ \o -> + ServiceSpecModeReplicated + <$> (o .:? "Replicas") + +-- | ToJSON ServiceSpecModeReplicated +instance A.ToJSON ServiceSpecModeReplicated where + toJSON ServiceSpecModeReplicated {..} = + _omitNulls + [ "Replicas" .= serviceSpecModeReplicatedReplicas + ] + + +-- | Construct a value of type 'ServiceSpecModeReplicated' (by applying it's required fields, if any) +mkServiceSpecModeReplicated + :: ServiceSpecModeReplicated +mkServiceSpecModeReplicated = + ServiceSpecModeReplicated + { serviceSpecModeReplicatedReplicas = Nothing + } + +-- ** ServiceSpecModeReplicatedJob +-- | ServiceSpecModeReplicatedJob +-- The mode used for services with a finite number of tasks that run to a completed state. +data ServiceSpecModeReplicatedJob = ServiceSpecModeReplicatedJob + { serviceSpecModeReplicatedJobMaxConcurrent :: !(Maybe Integer) -- ^ "MaxConcurrent" - The maximum number of replicas to run simultaneously. + , serviceSpecModeReplicatedJobTotalCompletions :: !(Maybe Integer) -- ^ "TotalCompletions" - The total number of replicas desired to reach the Completed state. If unset, will default to the value of `MaxConcurrent` + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceSpecModeReplicatedJob +instance A.FromJSON ServiceSpecModeReplicatedJob where + parseJSON = A.withObject "ServiceSpecModeReplicatedJob" $ \o -> + ServiceSpecModeReplicatedJob + <$> (o .:? "MaxConcurrent") + <*> (o .:? "TotalCompletions") + +-- | ToJSON ServiceSpecModeReplicatedJob +instance A.ToJSON ServiceSpecModeReplicatedJob where + toJSON ServiceSpecModeReplicatedJob {..} = + _omitNulls + [ "MaxConcurrent" .= serviceSpecModeReplicatedJobMaxConcurrent + , "TotalCompletions" .= serviceSpecModeReplicatedJobTotalCompletions + ] + + +-- | Construct a value of type 'ServiceSpecModeReplicatedJob' (by applying it's required fields, if any) +mkServiceSpecModeReplicatedJob + :: ServiceSpecModeReplicatedJob +mkServiceSpecModeReplicatedJob = + ServiceSpecModeReplicatedJob + { serviceSpecModeReplicatedJobMaxConcurrent = Nothing + , serviceSpecModeReplicatedJobTotalCompletions = Nothing + } + +-- ** ServiceSpecRollbackConfig +-- | ServiceSpecRollbackConfig +-- Specification for the rollback strategy of the service. +data ServiceSpecRollbackConfig = ServiceSpecRollbackConfig + { serviceSpecRollbackConfigParallelism :: !(Maybe Integer) -- ^ "Parallelism" - Maximum number of tasks to be rolled back in one iteration (0 means unlimited parallelism). + , serviceSpecRollbackConfigDelay :: !(Maybe Integer) -- ^ "Delay" - Amount of time between rollback iterations, in nanoseconds. + , serviceSpecRollbackConfigFailureAction :: !(Maybe E'FailureAction2) -- ^ "FailureAction" - Action to take if an rolled back task fails to run, or stops running during the rollback. + , serviceSpecRollbackConfigMonitor :: !(Maybe Integer) -- ^ "Monitor" - Amount of time to monitor each rolled back task for failures, in nanoseconds. + , serviceSpecRollbackConfigMaxFailureRatio :: !(Maybe Double) -- ^ "MaxFailureRatio" - The fraction of tasks that may fail during a rollback before the failure action is invoked, specified as a floating point number between 0 and 1. + , serviceSpecRollbackConfigOrder :: !(Maybe E'Order) -- ^ "Order" - The order of operations when rolling back a task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceSpecRollbackConfig +instance A.FromJSON ServiceSpecRollbackConfig where + parseJSON = A.withObject "ServiceSpecRollbackConfig" $ \o -> + ServiceSpecRollbackConfig + <$> (o .:? "Parallelism") + <*> (o .:? "Delay") + <*> (o .:? "FailureAction") + <*> (o .:? "Monitor") + <*> (o .:? "MaxFailureRatio") + <*> (o .:? "Order") + +-- | ToJSON ServiceSpecRollbackConfig +instance A.ToJSON ServiceSpecRollbackConfig where + toJSON ServiceSpecRollbackConfig {..} = + _omitNulls + [ "Parallelism" .= serviceSpecRollbackConfigParallelism + , "Delay" .= serviceSpecRollbackConfigDelay + , "FailureAction" .= serviceSpecRollbackConfigFailureAction + , "Monitor" .= serviceSpecRollbackConfigMonitor + , "MaxFailureRatio" .= serviceSpecRollbackConfigMaxFailureRatio + , "Order" .= serviceSpecRollbackConfigOrder + ] + + +-- | Construct a value of type 'ServiceSpecRollbackConfig' (by applying it's required fields, if any) +mkServiceSpecRollbackConfig + :: ServiceSpecRollbackConfig +mkServiceSpecRollbackConfig = + ServiceSpecRollbackConfig + { serviceSpecRollbackConfigParallelism = Nothing + , serviceSpecRollbackConfigDelay = Nothing + , serviceSpecRollbackConfigFailureAction = Nothing + , serviceSpecRollbackConfigMonitor = Nothing + , serviceSpecRollbackConfigMaxFailureRatio = Nothing + , serviceSpecRollbackConfigOrder = Nothing + } + +-- ** ServiceSpecUpdateConfig +-- | ServiceSpecUpdateConfig +-- Specification for the update strategy of the service. +data ServiceSpecUpdateConfig = ServiceSpecUpdateConfig + { serviceSpecUpdateConfigParallelism :: !(Maybe Integer) -- ^ "Parallelism" - Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism). + , serviceSpecUpdateConfigDelay :: !(Maybe Integer) -- ^ "Delay" - Amount of time between updates, in nanoseconds. + , serviceSpecUpdateConfigFailureAction :: !(Maybe E'FailureAction) -- ^ "FailureAction" - Action to take if an updated task fails to run, or stops running during the update. + , serviceSpecUpdateConfigMonitor :: !(Maybe Integer) -- ^ "Monitor" - Amount of time to monitor each updated task for failures, in nanoseconds. + , serviceSpecUpdateConfigMaxFailureRatio :: !(Maybe Double) -- ^ "MaxFailureRatio" - The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1. + , serviceSpecUpdateConfigOrder :: !(Maybe E'Order) -- ^ "Order" - The order of operations when rolling out an updated task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceSpecUpdateConfig +instance A.FromJSON ServiceSpecUpdateConfig where + parseJSON = A.withObject "ServiceSpecUpdateConfig" $ \o -> + ServiceSpecUpdateConfig + <$> (o .:? "Parallelism") + <*> (o .:? "Delay") + <*> (o .:? "FailureAction") + <*> (o .:? "Monitor") + <*> (o .:? "MaxFailureRatio") + <*> (o .:? "Order") + +-- | ToJSON ServiceSpecUpdateConfig +instance A.ToJSON ServiceSpecUpdateConfig where + toJSON ServiceSpecUpdateConfig {..} = + _omitNulls + [ "Parallelism" .= serviceSpecUpdateConfigParallelism + , "Delay" .= serviceSpecUpdateConfigDelay + , "FailureAction" .= serviceSpecUpdateConfigFailureAction + , "Monitor" .= serviceSpecUpdateConfigMonitor + , "MaxFailureRatio" .= serviceSpecUpdateConfigMaxFailureRatio + , "Order" .= serviceSpecUpdateConfigOrder + ] + + +-- | Construct a value of type 'ServiceSpecUpdateConfig' (by applying it's required fields, if any) +mkServiceSpecUpdateConfig + :: ServiceSpecUpdateConfig +mkServiceSpecUpdateConfig = + ServiceSpecUpdateConfig + { serviceSpecUpdateConfigParallelism = Nothing + , serviceSpecUpdateConfigDelay = Nothing + , serviceSpecUpdateConfigFailureAction = Nothing + , serviceSpecUpdateConfigMonitor = Nothing + , serviceSpecUpdateConfigMaxFailureRatio = Nothing + , serviceSpecUpdateConfigOrder = Nothing + } + +-- ** ServiceUpdateRequest +-- | ServiceUpdateRequest +data ServiceUpdateRequest = ServiceUpdateRequest + { serviceUpdateRequestName :: !(Maybe Text) -- ^ "Name" - Name of the service. + , serviceUpdateRequestLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , serviceUpdateRequestTaskTemplate :: !(Maybe TaskSpec) -- ^ "TaskTemplate" + , serviceUpdateRequestMode :: !(Maybe ServiceSpecMode) -- ^ "Mode" + , serviceUpdateRequestUpdateConfig :: !(Maybe ServiceSpecUpdateConfig) -- ^ "UpdateConfig" + , serviceUpdateRequestRollbackConfig :: !(Maybe ServiceSpecRollbackConfig) -- ^ "RollbackConfig" + , serviceUpdateRequestNetworks :: !(Maybe [NetworkAttachmentConfig]) -- ^ "Networks" - Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + , serviceUpdateRequestEndpointSpec :: !(Maybe EndpointSpec) -- ^ "EndpointSpec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceUpdateRequest +instance A.FromJSON ServiceUpdateRequest where + parseJSON = A.withObject "ServiceUpdateRequest" $ \o -> + ServiceUpdateRequest + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "TaskTemplate") + <*> (o .:? "Mode") + <*> (o .:? "UpdateConfig") + <*> (o .:? "RollbackConfig") + <*> (o .:? "Networks") + <*> (o .:? "EndpointSpec") + +-- | ToJSON ServiceUpdateRequest +instance A.ToJSON ServiceUpdateRequest where + toJSON ServiceUpdateRequest {..} = + _omitNulls + [ "Name" .= serviceUpdateRequestName + , "Labels" .= serviceUpdateRequestLabels + , "TaskTemplate" .= serviceUpdateRequestTaskTemplate + , "Mode" .= serviceUpdateRequestMode + , "UpdateConfig" .= serviceUpdateRequestUpdateConfig + , "RollbackConfig" .= serviceUpdateRequestRollbackConfig + , "Networks" .= serviceUpdateRequestNetworks + , "EndpointSpec" .= serviceUpdateRequestEndpointSpec + ] + + +-- | Construct a value of type 'ServiceUpdateRequest' (by applying it's required fields, if any) +mkServiceUpdateRequest + :: ServiceUpdateRequest +mkServiceUpdateRequest = + ServiceUpdateRequest + { serviceUpdateRequestName = Nothing + , serviceUpdateRequestLabels = Nothing + , serviceUpdateRequestTaskTemplate = Nothing + , serviceUpdateRequestMode = Nothing + , serviceUpdateRequestUpdateConfig = Nothing + , serviceUpdateRequestRollbackConfig = Nothing + , serviceUpdateRequestNetworks = Nothing + , serviceUpdateRequestEndpointSpec = Nothing + } + +-- ** ServiceUpdateResponse +-- | ServiceUpdateResponse +data ServiceUpdateResponse = ServiceUpdateResponse + { serviceUpdateResponseWarnings :: !(Maybe [Text]) -- ^ "Warnings" - Optional warning messages + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceUpdateResponse +instance A.FromJSON ServiceUpdateResponse where + parseJSON = A.withObject "ServiceUpdateResponse" $ \o -> + ServiceUpdateResponse + <$> (o .:? "Warnings") + +-- | ToJSON ServiceUpdateResponse +instance A.ToJSON ServiceUpdateResponse where + toJSON ServiceUpdateResponse {..} = + _omitNulls + [ "Warnings" .= serviceUpdateResponseWarnings + ] + + +-- | Construct a value of type 'ServiceUpdateResponse' (by applying it's required fields, if any) +mkServiceUpdateResponse + :: ServiceUpdateResponse +mkServiceUpdateResponse = + ServiceUpdateResponse + { serviceUpdateResponseWarnings = Nothing + } + +-- ** ServiceUpdateStatus +-- | ServiceUpdateStatus +-- The status of a service update. +data ServiceUpdateStatus = ServiceUpdateStatus + { serviceUpdateStatusState :: !(Maybe E'State) -- ^ "State" + , serviceUpdateStatusStartedAt :: !(Maybe Text) -- ^ "StartedAt" + , serviceUpdateStatusCompletedAt :: !(Maybe Text) -- ^ "CompletedAt" + , serviceUpdateStatusMessage :: !(Maybe Text) -- ^ "Message" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceUpdateStatus +instance A.FromJSON ServiceUpdateStatus where + parseJSON = A.withObject "ServiceUpdateStatus" $ \o -> + ServiceUpdateStatus + <$> (o .:? "State") + <*> (o .:? "StartedAt") + <*> (o .:? "CompletedAt") + <*> (o .:? "Message") + +-- | ToJSON ServiceUpdateStatus +instance A.ToJSON ServiceUpdateStatus where + toJSON ServiceUpdateStatus {..} = + _omitNulls + [ "State" .= serviceUpdateStatusState + , "StartedAt" .= serviceUpdateStatusStartedAt + , "CompletedAt" .= serviceUpdateStatusCompletedAt + , "Message" .= serviceUpdateStatusMessage + ] + + +-- | Construct a value of type 'ServiceUpdateStatus' (by applying it's required fields, if any) +mkServiceUpdateStatus + :: ServiceUpdateStatus +mkServiceUpdateStatus = + ServiceUpdateStatus + { serviceUpdateStatusState = Nothing + , serviceUpdateStatusStartedAt = Nothing + , serviceUpdateStatusCompletedAt = Nothing + , serviceUpdateStatusMessage = Nothing + } + +-- ** Swarm +-- | Swarm +data Swarm = Swarm + { swarmId :: !(Maybe Text) -- ^ "ID" - The ID of the swarm. + , swarmVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , swarmCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" - Date and time at which the swarm was initialised in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , swarmUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" - Date and time at which the swarm was last updated in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , swarmSpec :: !(Maybe SwarmSpec) -- ^ "Spec" + , swarmTlsInfo :: !(Maybe TLSInfo) -- ^ "TLSInfo" + , swarmRootRotationInProgress :: !(Maybe Bool) -- ^ "RootRotationInProgress" - Whether there is currently a root CA rotation in progress for the swarm + , swarmDataPathPort :: !(Maybe Int) -- ^ "DataPathPort" - DataPathPort specifies the data path port number for data traffic. Acceptable port range is 1024 to 49151. If no port is set or is set to 0, the default port (4789) is used. + , swarmDefaultAddrPool :: !(Maybe [Text]) -- ^ "DefaultAddrPool" - Default Address Pool specifies default subnet pools for global scope networks. + , swarmSubnetSize :: !(Maybe Int) -- ^ "SubnetSize" - SubnetSize specifies the subnet size of the networks created from the default subnet pool. + , swarmJoinTokens :: !(Maybe JoinTokens) -- ^ "JoinTokens" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Swarm +instance A.FromJSON Swarm where + parseJSON = A.withObject "Swarm" $ \o -> + Swarm + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + <*> (o .:? "TLSInfo") + <*> (o .:? "RootRotationInProgress") + <*> (o .:? "DataPathPort") + <*> (o .:? "DefaultAddrPool") + <*> (o .:? "SubnetSize") + <*> (o .:? "JoinTokens") + +-- | ToJSON Swarm +instance A.ToJSON Swarm where + toJSON Swarm {..} = + _omitNulls + [ "ID" .= swarmId + , "Version" .= swarmVersion + , "CreatedAt" .= swarmCreatedAt + , "UpdatedAt" .= swarmUpdatedAt + , "Spec" .= swarmSpec + , "TLSInfo" .= swarmTlsInfo + , "RootRotationInProgress" .= swarmRootRotationInProgress + , "DataPathPort" .= swarmDataPathPort + , "DefaultAddrPool" .= swarmDefaultAddrPool + , "SubnetSize" .= swarmSubnetSize + , "JoinTokens" .= swarmJoinTokens + ] + + +-- | Construct a value of type 'Swarm' (by applying it's required fields, if any) +mkSwarm + :: Swarm +mkSwarm = + Swarm + { swarmId = Nothing + , swarmVersion = Nothing + , swarmCreatedAt = Nothing + , swarmUpdatedAt = Nothing + , swarmSpec = Nothing + , swarmTlsInfo = Nothing + , swarmRootRotationInProgress = Nothing + , swarmDataPathPort = Nothing + , swarmDefaultAddrPool = Nothing + , swarmSubnetSize = Nothing + , swarmJoinTokens = Nothing + } + +-- ** SwarmInfo +-- | SwarmInfo +-- Represents generic information about swarm. +data SwarmInfo = SwarmInfo + { swarmInfoNodeId :: !(Maybe Text) -- ^ "NodeID" - Unique identifier of for this node in the swarm. + , swarmInfoNodeAddr :: !(Maybe Text) -- ^ "NodeAddr" - IP address at which this node can be reached by other nodes in the swarm. + , swarmInfoLocalNodeState :: !(Maybe LocalNodeState) -- ^ "LocalNodeState" + , swarmInfoControlAvailable :: !(Maybe Bool) -- ^ "ControlAvailable" + , swarmInfoError :: !(Maybe Text) -- ^ "Error" + , swarmInfoRemoteManagers :: !(Maybe [PeerNode]) -- ^ "RemoteManagers" - List of ID's and addresses of other managers in the swarm. + , swarmInfoNodes :: !(Maybe Int) -- ^ "Nodes" - Total number of nodes in the swarm. + , swarmInfoManagers :: !(Maybe Int) -- ^ "Managers" - Total number of managers in the swarm. + , swarmInfoCluster :: !(Maybe ClusterInfo) -- ^ "Cluster" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmInfo +instance A.FromJSON SwarmInfo where + parseJSON = A.withObject "SwarmInfo" $ \o -> + SwarmInfo + <$> (o .:? "NodeID") + <*> (o .:? "NodeAddr") + <*> (o .:? "LocalNodeState") + <*> (o .:? "ControlAvailable") + <*> (o .:? "Error") + <*> (o .:? "RemoteManagers") + <*> (o .:? "Nodes") + <*> (o .:? "Managers") + <*> (o .:? "Cluster") + +-- | ToJSON SwarmInfo +instance A.ToJSON SwarmInfo where + toJSON SwarmInfo {..} = + _omitNulls + [ "NodeID" .= swarmInfoNodeId + , "NodeAddr" .= swarmInfoNodeAddr + , "LocalNodeState" .= swarmInfoLocalNodeState + , "ControlAvailable" .= swarmInfoControlAvailable + , "Error" .= swarmInfoError + , "RemoteManagers" .= swarmInfoRemoteManagers + , "Nodes" .= swarmInfoNodes + , "Managers" .= swarmInfoManagers + , "Cluster" .= swarmInfoCluster + ] + + +-- | Construct a value of type 'SwarmInfo' (by applying it's required fields, if any) +mkSwarmInfo + :: SwarmInfo +mkSwarmInfo = + SwarmInfo + { swarmInfoNodeId = Nothing + , swarmInfoNodeAddr = Nothing + , swarmInfoLocalNodeState = Nothing + , swarmInfoControlAvailable = Nothing + , swarmInfoError = Nothing + , swarmInfoRemoteManagers = Nothing + , swarmInfoNodes = Nothing + , swarmInfoManagers = Nothing + , swarmInfoCluster = Nothing + } + +-- ** SwarmInitRequest +-- | SwarmInitRequest +-- SwarmInitRequest +-- +data SwarmInitRequest = SwarmInitRequest + { swarmInitRequestListenAddr :: !(Maybe Text) -- ^ "ListenAddr" - Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used. + , swarmInitRequestAdvertiseAddr :: !(Maybe Text) -- ^ "AdvertiseAddr" - Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. + , swarmInitRequestDataPathAddr :: !(Maybe Text) -- ^ "DataPathAddr" - Address or interface to use for data path traffic (format: `<ip|interface>`), for example, `192.168.1.1`, or an interface, like `eth0`. If `DataPathAddr` is unspecified, the same address as `AdvertiseAddr` is used. The `DataPathAddr` specifies the address that global scope network drivers will publish towards other nodes in order to reach the containers running on this node. Using this parameter it is possible to separate the container data traffic from the management traffic of the cluster. + , swarmInitRequestDataPathPort :: !(Maybe Int) -- ^ "DataPathPort" - DataPathPort specifies the data path port number for data traffic. Acceptable port range is 1024 to 49151. if no port is set or is set to 0, default port 4789 will be used. + , swarmInitRequestDefaultAddrPool :: !(Maybe [Text]) -- ^ "DefaultAddrPool" - Default Address Pool specifies default subnet pools for global scope networks. + , swarmInitRequestForceNewCluster :: !(Maybe Bool) -- ^ "ForceNewCluster" - Force creation of a new swarm. + , swarmInitRequestSubnetSize :: !(Maybe Int) -- ^ "SubnetSize" - SubnetSize specifies the subnet size of the networks created from the default subnet pool. + , swarmInitRequestSpec :: !(Maybe SwarmSpec) -- ^ "Spec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmInitRequest +instance A.FromJSON SwarmInitRequest where + parseJSON = A.withObject "SwarmInitRequest" $ \o -> + SwarmInitRequest + <$> (o .:? "ListenAddr") + <*> (o .:? "AdvertiseAddr") + <*> (o .:? "DataPathAddr") + <*> (o .:? "DataPathPort") + <*> (o .:? "DefaultAddrPool") + <*> (o .:? "ForceNewCluster") + <*> (o .:? "SubnetSize") + <*> (o .:? "Spec") + +-- | ToJSON SwarmInitRequest +instance A.ToJSON SwarmInitRequest where + toJSON SwarmInitRequest {..} = + _omitNulls + [ "ListenAddr" .= swarmInitRequestListenAddr + , "AdvertiseAddr" .= swarmInitRequestAdvertiseAddr + , "DataPathAddr" .= swarmInitRequestDataPathAddr + , "DataPathPort" .= swarmInitRequestDataPathPort + , "DefaultAddrPool" .= swarmInitRequestDefaultAddrPool + , "ForceNewCluster" .= swarmInitRequestForceNewCluster + , "SubnetSize" .= swarmInitRequestSubnetSize + , "Spec" .= swarmInitRequestSpec + ] + + +-- | Construct a value of type 'SwarmInitRequest' (by applying it's required fields, if any) +mkSwarmInitRequest + :: SwarmInitRequest +mkSwarmInitRequest = + SwarmInitRequest + { swarmInitRequestListenAddr = Nothing + , swarmInitRequestAdvertiseAddr = Nothing + , swarmInitRequestDataPathAddr = Nothing + , swarmInitRequestDataPathPort = Nothing + , swarmInitRequestDefaultAddrPool = Nothing + , swarmInitRequestForceNewCluster = Nothing + , swarmInitRequestSubnetSize = Nothing + , swarmInitRequestSpec = Nothing + } + +-- ** SwarmJoinRequest +-- | SwarmJoinRequest +-- SwarmJoinRequest +-- +data SwarmJoinRequest = SwarmJoinRequest + { swarmJoinRequestListenAddr :: !(Maybe Text) -- ^ "ListenAddr" - Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). + , swarmJoinRequestAdvertiseAddr :: !(Maybe Text) -- ^ "AdvertiseAddr" - Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. + , swarmJoinRequestDataPathAddr :: !(Maybe Text) -- ^ "DataPathAddr" - Address or interface to use for data path traffic (format: `<ip|interface>`), for example, `192.168.1.1`, or an interface, like `eth0`. If `DataPathAddr` is unspecified, the same address as `AdvertiseAddr` is used. The `DataPathAddr` specifies the address that global scope network drivers will publish towards other nodes in order to reach the containers running on this node. Using this parameter it is possible to separate the container data traffic from the management traffic of the cluster. + , swarmJoinRequestRemoteAddrs :: !(Maybe [Text]) -- ^ "RemoteAddrs" - Addresses of manager nodes already participating in the swarm. + , swarmJoinRequestJoinToken :: !(Maybe Text) -- ^ "JoinToken" - Secret token for joining this swarm. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmJoinRequest +instance A.FromJSON SwarmJoinRequest where + parseJSON = A.withObject "SwarmJoinRequest" $ \o -> + SwarmJoinRequest + <$> (o .:? "ListenAddr") + <*> (o .:? "AdvertiseAddr") + <*> (o .:? "DataPathAddr") + <*> (o .:? "RemoteAddrs") + <*> (o .:? "JoinToken") + +-- | ToJSON SwarmJoinRequest +instance A.ToJSON SwarmJoinRequest where + toJSON SwarmJoinRequest {..} = + _omitNulls + [ "ListenAddr" .= swarmJoinRequestListenAddr + , "AdvertiseAddr" .= swarmJoinRequestAdvertiseAddr + , "DataPathAddr" .= swarmJoinRequestDataPathAddr + , "RemoteAddrs" .= swarmJoinRequestRemoteAddrs + , "JoinToken" .= swarmJoinRequestJoinToken + ] + + +-- | Construct a value of type 'SwarmJoinRequest' (by applying it's required fields, if any) +mkSwarmJoinRequest + :: SwarmJoinRequest +mkSwarmJoinRequest = + SwarmJoinRequest + { swarmJoinRequestListenAddr = Nothing + , swarmJoinRequestAdvertiseAddr = Nothing + , swarmJoinRequestDataPathAddr = Nothing + , swarmJoinRequestRemoteAddrs = Nothing + , swarmJoinRequestJoinToken = Nothing + } + +-- ** SwarmSpec +-- | SwarmSpec +-- User modifiable swarm configuration. +data SwarmSpec = SwarmSpec + { swarmSpecName :: !(Maybe Text) -- ^ "Name" - Name of the swarm. + , swarmSpecLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , swarmSpecOrchestration :: !(Maybe SwarmSpecOrchestration) -- ^ "Orchestration" + , swarmSpecRaft :: !(Maybe SwarmSpecRaft) -- ^ "Raft" + , swarmSpecDispatcher :: !(Maybe SwarmSpecDispatcher) -- ^ "Dispatcher" + , swarmSpecCaConfig :: !(Maybe SwarmSpecCAConfig) -- ^ "CAConfig" + , swarmSpecEncryptionConfig :: !(Maybe SwarmSpecEncryptionConfig) -- ^ "EncryptionConfig" + , swarmSpecTaskDefaults :: !(Maybe SwarmSpecTaskDefaults) -- ^ "TaskDefaults" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpec +instance A.FromJSON SwarmSpec where + parseJSON = A.withObject "SwarmSpec" $ \o -> + SwarmSpec + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Orchestration") + <*> (o .:? "Raft") + <*> (o .:? "Dispatcher") + <*> (o .:? "CAConfig") + <*> (o .:? "EncryptionConfig") + <*> (o .:? "TaskDefaults") + +-- | ToJSON SwarmSpec +instance A.ToJSON SwarmSpec where + toJSON SwarmSpec {..} = + _omitNulls + [ "Name" .= swarmSpecName + , "Labels" .= swarmSpecLabels + , "Orchestration" .= swarmSpecOrchestration + , "Raft" .= swarmSpecRaft + , "Dispatcher" .= swarmSpecDispatcher + , "CAConfig" .= swarmSpecCaConfig + , "EncryptionConfig" .= swarmSpecEncryptionConfig + , "TaskDefaults" .= swarmSpecTaskDefaults + ] + + +-- | Construct a value of type 'SwarmSpec' (by applying it's required fields, if any) +mkSwarmSpec + :: SwarmSpec +mkSwarmSpec = + SwarmSpec + { swarmSpecName = Nothing + , swarmSpecLabels = Nothing + , swarmSpecOrchestration = Nothing + , swarmSpecRaft = Nothing + , swarmSpecDispatcher = Nothing + , swarmSpecCaConfig = Nothing + , swarmSpecEncryptionConfig = Nothing + , swarmSpecTaskDefaults = Nothing + } + +-- ** SwarmSpecCAConfig +-- | SwarmSpecCAConfig +-- CA configuration. +data SwarmSpecCAConfig = SwarmSpecCAConfig + { swarmSpecCAConfigNodeCertExpiry :: !(Maybe Integer) -- ^ "NodeCertExpiry" - The duration node certificates are issued for. + , swarmSpecCAConfigExternalCas :: !(Maybe [SwarmSpecCAConfigExternalCAsInner]) -- ^ "ExternalCAs" - Configuration for forwarding signing requests to an external certificate authority. + , swarmSpecCAConfigSigningCaCert :: !(Maybe Text) -- ^ "SigningCACert" - The desired signing CA certificate for all swarm node TLS leaf certificates, in PEM format. + , swarmSpecCAConfigSigningCaKey :: !(Maybe Text) -- ^ "SigningCAKey" - The desired signing CA key for all swarm node TLS leaf certificates, in PEM format. + , swarmSpecCAConfigForceRotate :: !(Maybe Int) -- ^ "ForceRotate" - An integer whose purpose is to force swarm to generate a new signing CA certificate and key, if none have been specified in `SigningCACert` and `SigningCAKey` + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecCAConfig +instance A.FromJSON SwarmSpecCAConfig where + parseJSON = A.withObject "SwarmSpecCAConfig" $ \o -> + SwarmSpecCAConfig + <$> (o .:? "NodeCertExpiry") + <*> (o .:? "ExternalCAs") + <*> (o .:? "SigningCACert") + <*> (o .:? "SigningCAKey") + <*> (o .:? "ForceRotate") + +-- | ToJSON SwarmSpecCAConfig +instance A.ToJSON SwarmSpecCAConfig where + toJSON SwarmSpecCAConfig {..} = + _omitNulls + [ "NodeCertExpiry" .= swarmSpecCAConfigNodeCertExpiry + , "ExternalCAs" .= swarmSpecCAConfigExternalCas + , "SigningCACert" .= swarmSpecCAConfigSigningCaCert + , "SigningCAKey" .= swarmSpecCAConfigSigningCaKey + , "ForceRotate" .= swarmSpecCAConfigForceRotate + ] + + +-- | Construct a value of type 'SwarmSpecCAConfig' (by applying it's required fields, if any) +mkSwarmSpecCAConfig + :: SwarmSpecCAConfig +mkSwarmSpecCAConfig = + SwarmSpecCAConfig + { swarmSpecCAConfigNodeCertExpiry = Nothing + , swarmSpecCAConfigExternalCas = Nothing + , swarmSpecCAConfigSigningCaCert = Nothing + , swarmSpecCAConfigSigningCaKey = Nothing + , swarmSpecCAConfigForceRotate = Nothing + } + +-- ** SwarmSpecCAConfigExternalCAsInner +-- | SwarmSpecCAConfigExternalCAsInner +data SwarmSpecCAConfigExternalCAsInner = SwarmSpecCAConfigExternalCAsInner + { swarmSpecCAConfigExternalCAsInnerProtocol :: !(Maybe E'Protocol) -- ^ "Protocol" - Protocol for communication with the external CA (currently only `cfssl` is supported). + , swarmSpecCAConfigExternalCAsInnerUrl :: !(Maybe Text) -- ^ "URL" - URL where certificate signing requests should be sent. + , swarmSpecCAConfigExternalCAsInnerOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver. + , swarmSpecCAConfigExternalCAsInnerCaCert :: !(Maybe Text) -- ^ "CACert" - The root CA certificate (in PEM format) this external CA uses to issue TLS certificates (assumed to be to the current swarm root CA certificate if not provided). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecCAConfigExternalCAsInner +instance A.FromJSON SwarmSpecCAConfigExternalCAsInner where + parseJSON = A.withObject "SwarmSpecCAConfigExternalCAsInner" $ \o -> + SwarmSpecCAConfigExternalCAsInner + <$> (o .:? "Protocol") + <*> (o .:? "URL") + <*> (o .:? "Options") + <*> (o .:? "CACert") + +-- | ToJSON SwarmSpecCAConfigExternalCAsInner +instance A.ToJSON SwarmSpecCAConfigExternalCAsInner where + toJSON SwarmSpecCAConfigExternalCAsInner {..} = + _omitNulls + [ "Protocol" .= swarmSpecCAConfigExternalCAsInnerProtocol + , "URL" .= swarmSpecCAConfigExternalCAsInnerUrl + , "Options" .= swarmSpecCAConfigExternalCAsInnerOptions + , "CACert" .= swarmSpecCAConfigExternalCAsInnerCaCert + ] + + +-- | Construct a value of type 'SwarmSpecCAConfigExternalCAsInner' (by applying it's required fields, if any) +mkSwarmSpecCAConfigExternalCAsInner + :: SwarmSpecCAConfigExternalCAsInner +mkSwarmSpecCAConfigExternalCAsInner = + SwarmSpecCAConfigExternalCAsInner + { swarmSpecCAConfigExternalCAsInnerProtocol = Nothing + , swarmSpecCAConfigExternalCAsInnerUrl = Nothing + , swarmSpecCAConfigExternalCAsInnerOptions = Nothing + , swarmSpecCAConfigExternalCAsInnerCaCert = Nothing + } + +-- ** SwarmSpecDispatcher +-- | SwarmSpecDispatcher +-- Dispatcher configuration. +data SwarmSpecDispatcher = SwarmSpecDispatcher + { swarmSpecDispatcherHeartbeatPeriod :: !(Maybe Integer) -- ^ "HeartbeatPeriod" - The delay for an agent to send a heartbeat to the dispatcher. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecDispatcher +instance A.FromJSON SwarmSpecDispatcher where + parseJSON = A.withObject "SwarmSpecDispatcher" $ \o -> + SwarmSpecDispatcher + <$> (o .:? "HeartbeatPeriod") + +-- | ToJSON SwarmSpecDispatcher +instance A.ToJSON SwarmSpecDispatcher where + toJSON SwarmSpecDispatcher {..} = + _omitNulls + [ "HeartbeatPeriod" .= swarmSpecDispatcherHeartbeatPeriod + ] + + +-- | Construct a value of type 'SwarmSpecDispatcher' (by applying it's required fields, if any) +mkSwarmSpecDispatcher + :: SwarmSpecDispatcher +mkSwarmSpecDispatcher = + SwarmSpecDispatcher + { swarmSpecDispatcherHeartbeatPeriod = Nothing + } + +-- ** SwarmSpecEncryptionConfig +-- | SwarmSpecEncryptionConfig +-- Parameters related to encryption-at-rest. +data SwarmSpecEncryptionConfig = SwarmSpecEncryptionConfig + { swarmSpecEncryptionConfigAutoLockManagers :: !(Maybe Bool) -- ^ "AutoLockManagers" - If set, generate a key and use it to lock data stored on the managers. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecEncryptionConfig +instance A.FromJSON SwarmSpecEncryptionConfig where + parseJSON = A.withObject "SwarmSpecEncryptionConfig" $ \o -> + SwarmSpecEncryptionConfig + <$> (o .:? "AutoLockManagers") + +-- | ToJSON SwarmSpecEncryptionConfig +instance A.ToJSON SwarmSpecEncryptionConfig where + toJSON SwarmSpecEncryptionConfig {..} = + _omitNulls + [ "AutoLockManagers" .= swarmSpecEncryptionConfigAutoLockManagers + ] + + +-- | Construct a value of type 'SwarmSpecEncryptionConfig' (by applying it's required fields, if any) +mkSwarmSpecEncryptionConfig + :: SwarmSpecEncryptionConfig +mkSwarmSpecEncryptionConfig = + SwarmSpecEncryptionConfig + { swarmSpecEncryptionConfigAutoLockManagers = Nothing + } + +-- ** SwarmSpecOrchestration +-- | SwarmSpecOrchestration +-- Orchestration configuration. +data SwarmSpecOrchestration = SwarmSpecOrchestration + { swarmSpecOrchestrationTaskHistoryRetentionLimit :: !(Maybe Integer) -- ^ "TaskHistoryRetentionLimit" - The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecOrchestration +instance A.FromJSON SwarmSpecOrchestration where + parseJSON = A.withObject "SwarmSpecOrchestration" $ \o -> + SwarmSpecOrchestration + <$> (o .:? "TaskHistoryRetentionLimit") + +-- | ToJSON SwarmSpecOrchestration +instance A.ToJSON SwarmSpecOrchestration where + toJSON SwarmSpecOrchestration {..} = + _omitNulls + [ "TaskHistoryRetentionLimit" .= swarmSpecOrchestrationTaskHistoryRetentionLimit + ] + + +-- | Construct a value of type 'SwarmSpecOrchestration' (by applying it's required fields, if any) +mkSwarmSpecOrchestration + :: SwarmSpecOrchestration +mkSwarmSpecOrchestration = + SwarmSpecOrchestration + { swarmSpecOrchestrationTaskHistoryRetentionLimit = Nothing + } + +-- ** SwarmSpecRaft +-- | SwarmSpecRaft +-- Raft configuration. +data SwarmSpecRaft = SwarmSpecRaft + { swarmSpecRaftSnapshotInterval :: !(Maybe Int) -- ^ "SnapshotInterval" - The number of log entries between snapshots. + , swarmSpecRaftKeepOldSnapshots :: !(Maybe Int) -- ^ "KeepOldSnapshots" - The number of snapshots to keep beyond the current snapshot. + , swarmSpecRaftLogEntriesForSlowFollowers :: !(Maybe Int) -- ^ "LogEntriesForSlowFollowers" - The number of log entries to keep around to sync up slow followers after a snapshot is created. + , swarmSpecRaftElectionTick :: !(Maybe Int) -- ^ "ElectionTick" - The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + , swarmSpecRaftHeartbeatTick :: !(Maybe Int) -- ^ "HeartbeatTick" - The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecRaft +instance A.FromJSON SwarmSpecRaft where + parseJSON = A.withObject "SwarmSpecRaft" $ \o -> + SwarmSpecRaft + <$> (o .:? "SnapshotInterval") + <*> (o .:? "KeepOldSnapshots") + <*> (o .:? "LogEntriesForSlowFollowers") + <*> (o .:? "ElectionTick") + <*> (o .:? "HeartbeatTick") + +-- | ToJSON SwarmSpecRaft +instance A.ToJSON SwarmSpecRaft where + toJSON SwarmSpecRaft {..} = + _omitNulls + [ "SnapshotInterval" .= swarmSpecRaftSnapshotInterval + , "KeepOldSnapshots" .= swarmSpecRaftKeepOldSnapshots + , "LogEntriesForSlowFollowers" .= swarmSpecRaftLogEntriesForSlowFollowers + , "ElectionTick" .= swarmSpecRaftElectionTick + , "HeartbeatTick" .= swarmSpecRaftHeartbeatTick + ] + + +-- | Construct a value of type 'SwarmSpecRaft' (by applying it's required fields, if any) +mkSwarmSpecRaft + :: SwarmSpecRaft +mkSwarmSpecRaft = + SwarmSpecRaft + { swarmSpecRaftSnapshotInterval = Nothing + , swarmSpecRaftKeepOldSnapshots = Nothing + , swarmSpecRaftLogEntriesForSlowFollowers = Nothing + , swarmSpecRaftElectionTick = Nothing + , swarmSpecRaftHeartbeatTick = Nothing + } + +-- ** SwarmSpecTaskDefaults +-- | SwarmSpecTaskDefaults +-- Defaults for creating tasks in this cluster. +data SwarmSpecTaskDefaults = SwarmSpecTaskDefaults + { swarmSpecTaskDefaultsLogDriver :: !(Maybe SwarmSpecTaskDefaultsLogDriver) -- ^ "LogDriver" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecTaskDefaults +instance A.FromJSON SwarmSpecTaskDefaults where + parseJSON = A.withObject "SwarmSpecTaskDefaults" $ \o -> + SwarmSpecTaskDefaults + <$> (o .:? "LogDriver") + +-- | ToJSON SwarmSpecTaskDefaults +instance A.ToJSON SwarmSpecTaskDefaults where + toJSON SwarmSpecTaskDefaults {..} = + _omitNulls + [ "LogDriver" .= swarmSpecTaskDefaultsLogDriver + ] + + +-- | Construct a value of type 'SwarmSpecTaskDefaults' (by applying it's required fields, if any) +mkSwarmSpecTaskDefaults + :: SwarmSpecTaskDefaults +mkSwarmSpecTaskDefaults = + SwarmSpecTaskDefaults + { swarmSpecTaskDefaultsLogDriver = Nothing + } + +-- ** SwarmSpecTaskDefaultsLogDriver +-- | SwarmSpecTaskDefaultsLogDriver +-- 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. +data SwarmSpecTaskDefaultsLogDriver = SwarmSpecTaskDefaultsLogDriver + { swarmSpecTaskDefaultsLogDriverName :: !(Maybe Text) -- ^ "Name" - The log driver to use as a default for new tasks. + , swarmSpecTaskDefaultsLogDriverOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - Driver-specific options for the selectd log driver, specified as key/value pairs. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecTaskDefaultsLogDriver +instance A.FromJSON SwarmSpecTaskDefaultsLogDriver where + parseJSON = A.withObject "SwarmSpecTaskDefaultsLogDriver" $ \o -> + SwarmSpecTaskDefaultsLogDriver + <$> (o .:? "Name") + <*> (o .:? "Options") + +-- | ToJSON SwarmSpecTaskDefaultsLogDriver +instance A.ToJSON SwarmSpecTaskDefaultsLogDriver where + toJSON SwarmSpecTaskDefaultsLogDriver {..} = + _omitNulls + [ "Name" .= swarmSpecTaskDefaultsLogDriverName + , "Options" .= swarmSpecTaskDefaultsLogDriverOptions + ] + + +-- | Construct a value of type 'SwarmSpecTaskDefaultsLogDriver' (by applying it's required fields, if any) +mkSwarmSpecTaskDefaultsLogDriver + :: SwarmSpecTaskDefaultsLogDriver +mkSwarmSpecTaskDefaultsLogDriver = + SwarmSpecTaskDefaultsLogDriver + { swarmSpecTaskDefaultsLogDriverName = Nothing + , swarmSpecTaskDefaultsLogDriverOptions = Nothing + } + +-- ** SwarmUnlockRequest +-- | SwarmUnlockRequest +-- SwarmUnlockRequest +-- +data SwarmUnlockRequest = SwarmUnlockRequest + { swarmUnlockRequestUnlockKey :: !(Maybe Text) -- ^ "UnlockKey" - The swarm's unlock key. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmUnlockRequest +instance A.FromJSON SwarmUnlockRequest where + parseJSON = A.withObject "SwarmUnlockRequest" $ \o -> + SwarmUnlockRequest + <$> (o .:? "UnlockKey") + +-- | ToJSON SwarmUnlockRequest +instance A.ToJSON SwarmUnlockRequest where + toJSON SwarmUnlockRequest {..} = + _omitNulls + [ "UnlockKey" .= swarmUnlockRequestUnlockKey + ] + + +-- | Construct a value of type 'SwarmUnlockRequest' (by applying it's required fields, if any) +mkSwarmUnlockRequest + :: SwarmUnlockRequest +mkSwarmUnlockRequest = + SwarmUnlockRequest + { swarmUnlockRequestUnlockKey = Nothing + } + +-- ** SystemAuthResponse +-- | SystemAuthResponse +-- SystemAuthResponse +-- +data SystemAuthResponse = SystemAuthResponse + { systemAuthResponseStatus :: !(Text) -- ^ /Required/ "Status" - The status of the authentication + , systemAuthResponseIdentityToken :: !(Maybe Text) -- ^ "IdentityToken" - An opaque token used to authenticate a user after a successful login + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemAuthResponse +instance A.FromJSON SystemAuthResponse where + parseJSON = A.withObject "SystemAuthResponse" $ \o -> + SystemAuthResponse + <$> (o .: "Status") + <*> (o .:? "IdentityToken") + +-- | ToJSON SystemAuthResponse +instance A.ToJSON SystemAuthResponse where + toJSON SystemAuthResponse {..} = + _omitNulls + [ "Status" .= systemAuthResponseStatus + , "IdentityToken" .= systemAuthResponseIdentityToken + ] + + +-- | Construct a value of type 'SystemAuthResponse' (by applying it's required fields, if any) +mkSystemAuthResponse + :: Text -- ^ 'systemAuthResponseStatus': The status of the authentication + -> SystemAuthResponse +mkSystemAuthResponse systemAuthResponseStatus = + SystemAuthResponse + { systemAuthResponseStatus + , systemAuthResponseIdentityToken = Nothing + } + +-- ** SystemDataUsageResponse +-- | SystemDataUsageResponse +-- SystemDataUsageResponse +-- +data SystemDataUsageResponse = SystemDataUsageResponse + { systemDataUsageResponseLayersSize :: !(Maybe Integer) -- ^ "LayersSize" + , systemDataUsageResponseImages :: !(Maybe [ImageSummary]) -- ^ "Images" + , systemDataUsageResponseContainers :: !(Maybe [ContainerSummary]) -- ^ "Containers" + , systemDataUsageResponseVolumes :: !(Maybe [Volume]) -- ^ "Volumes" + , systemDataUsageResponseBuildCache :: !(Maybe [BuildCache]) -- ^ "BuildCache" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemDataUsageResponse +instance A.FromJSON SystemDataUsageResponse where + parseJSON = A.withObject "SystemDataUsageResponse" $ \o -> + SystemDataUsageResponse + <$> (o .:? "LayersSize") + <*> (o .:? "Images") + <*> (o .:? "Containers") + <*> (o .:? "Volumes") + <*> (o .:? "BuildCache") + +-- | ToJSON SystemDataUsageResponse +instance A.ToJSON SystemDataUsageResponse where + toJSON SystemDataUsageResponse {..} = + _omitNulls + [ "LayersSize" .= systemDataUsageResponseLayersSize + , "Images" .= systemDataUsageResponseImages + , "Containers" .= systemDataUsageResponseContainers + , "Volumes" .= systemDataUsageResponseVolumes + , "BuildCache" .= systemDataUsageResponseBuildCache + ] + + +-- | Construct a value of type 'SystemDataUsageResponse' (by applying it's required fields, if any) +mkSystemDataUsageResponse + :: SystemDataUsageResponse +mkSystemDataUsageResponse = + SystemDataUsageResponse + { systemDataUsageResponseLayersSize = Nothing + , systemDataUsageResponseImages = Nothing + , systemDataUsageResponseContainers = Nothing + , systemDataUsageResponseVolumes = Nothing + , systemDataUsageResponseBuildCache = Nothing + } + +-- ** SystemInfo +-- | SystemInfo +data SystemInfo = SystemInfo + { systemInfoId :: !(Maybe Text) -- ^ "ID" - Unique identifier of the daemon. <p><br /></p> > **Note**: The format of the ID itself is not part of the API, and > should not be considered stable. + , systemInfoContainers :: !(Maybe Int) -- ^ "Containers" - Total number of containers on the host. + , systemInfoContainersRunning :: !(Maybe Int) -- ^ "ContainersRunning" - Number of containers with status `\"running\"`. + , systemInfoContainersPaused :: !(Maybe Int) -- ^ "ContainersPaused" - Number of containers with status `\"paused\"`. + , systemInfoContainersStopped :: !(Maybe Int) -- ^ "ContainersStopped" - Number of containers with status `\"stopped\"`. + , systemInfoImages :: !(Maybe Int) -- ^ "Images" - Total number of images on the host. Both _tagged_ and _untagged_ (dangling) images are counted. + , systemInfoDriver :: !(Maybe Text) -- ^ "Driver" - Name of the storage driver in use. + , systemInfoDriverStatus :: !(Maybe [[Text]]) -- ^ "DriverStatus" - Information specific to the storage driver, provided as \"label\" / \"value\" pairs. This information is provided by the storage driver, and formatted in a way consistent with the output of `docker info` on the command line. <p><br /></p> > **Note**: The information returned in this field, including the > formatting of values and labels, should not be considered stable, > and may change without notice. + , systemInfoDockerRootDir :: !(Maybe Text) -- ^ "DockerRootDir" - Root directory of persistent Docker state. Defaults to `/var/lib/docker` on Linux, and `C:\\ProgramData\\docker` on Windows. + , systemInfoPlugins :: !(Maybe PluginsInfo) -- ^ "Plugins" + , systemInfoMemoryLimit :: !(Maybe Bool) -- ^ "MemoryLimit" - Indicates if the host has memory limit support enabled. + , systemInfoSwapLimit :: !(Maybe Bool) -- ^ "SwapLimit" - Indicates if the host has memory swap limit support enabled. + , systemInfoKernelMemoryTcp :: !(Maybe Bool) -- ^ "KernelMemoryTCP" - Indicates if the host has kernel memory TCP limit support enabled. This field is omitted if not supported. Kernel memory TCP limits are not supported when using cgroups v2, which does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. + , systemInfoCpuCfsPeriod :: !(Maybe Bool) -- ^ "CpuCfsPeriod" - Indicates if CPU CFS(Completely Fair Scheduler) period is supported by the host. + , systemInfoCpuCfsQuota :: !(Maybe Bool) -- ^ "CpuCfsQuota" - Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by the host. + , systemInfoCpuShares :: !(Maybe Bool) -- ^ "CPUShares" - Indicates if CPU Shares limiting is supported by the host. + , systemInfoCpuSet :: !(Maybe Bool) -- ^ "CPUSet" - Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) + , systemInfoPidsLimit :: !(Maybe Bool) -- ^ "PidsLimit" - Indicates if the host kernel has PID limit support enabled. + , systemInfoOomKillDisable :: !(Maybe Bool) -- ^ "OomKillDisable" - Indicates if OOM killer disable is supported on the host. + , systemInfoIpv4Forwarding :: !(Maybe Bool) -- ^ "IPv4Forwarding" - Indicates IPv4 forwarding is enabled. + , systemInfoBridgeNfIptables :: !(Maybe Bool) -- ^ "BridgeNfIptables" - Indicates if `bridge-nf-call-iptables` is available on the host. + , systemInfoBridgeNfIp6tables :: !(Maybe Bool) -- ^ "BridgeNfIp6tables" - Indicates if `bridge-nf-call-ip6tables` is available on the host. + , systemInfoDebug :: !(Maybe Bool) -- ^ "Debug" - Indicates if the daemon is running in debug-mode / with debug-level logging enabled. + , systemInfoNfd :: !(Maybe Int) -- ^ "NFd" - The total number of file Descriptors in use by the daemon process. This information is only returned if debug-mode is enabled. + , systemInfoNGoroutines :: !(Maybe Int) -- ^ "NGoroutines" - The number of goroutines that currently exist. This information is only returned if debug-mode is enabled. + , systemInfoSystemTime :: !(Maybe Text) -- ^ "SystemTime" - Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , systemInfoLoggingDriver :: !(Maybe Text) -- ^ "LoggingDriver" - The logging driver to use as a default for new containers. + , systemInfoCgroupDriver :: !(Maybe E'CgroupDriver) -- ^ "CgroupDriver" - The driver to use for managing cgroups. + , systemInfoCgroupVersion :: !(Maybe E'CgroupVersion) -- ^ "CgroupVersion" - The version of the cgroup. + , systemInfoNEventsListener :: !(Maybe Int) -- ^ "NEventsListener" - Number of event listeners subscribed. + , systemInfoKernelVersion :: !(Maybe Text) -- ^ "KernelVersion" - Kernel version of the host. On Linux, this information obtained from `uname`. On Windows this information is queried from the <kbd>HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\</kbd> registry value, for example _\"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)\"_. + , systemInfoOperatingSystem :: !(Maybe Text) -- ^ "OperatingSystem" - Name of the host's operating system, for example: \"Ubuntu 16.04.2 LTS\" or \"Windows Server 2016 Datacenter\" + , systemInfoOsVersion :: !(Maybe Text) -- ^ "OSVersion" - Version of the host's operating system <p><br /></p> > **Note**: The information returned in this field, including its > very existence, and the formatting of values, should not be considered > stable, and may change without notice. + , systemInfoOsType :: !(Maybe Text) -- ^ "OSType" - Generic type of the operating system of the host, as returned by the Go runtime (`GOOS`). Currently returned values are \"linux\" and \"windows\". A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + , systemInfoArchitecture :: !(Maybe Text) -- ^ "Architecture" - Hardware architecture of the host, as returned by the Go runtime (`GOARCH`). A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + , systemInfoNcpu :: !(Maybe Int) -- ^ "NCPU" - The number of logical CPUs usable by the daemon. The number of available CPUs is checked by querying the operating system when the daemon starts. Changes to operating system CPU allocation after the daemon is started are not reflected. + , systemInfoMemTotal :: !(Maybe Integer) -- ^ "MemTotal" - Total amount of physical memory available on the host, in bytes. + , systemInfoIndexServerAddress :: !(Maybe Text) -- ^ "IndexServerAddress" - Address / URL of the index server that is used for image search, and as a default for user authentication for Docker Hub and Docker Cloud. + , systemInfoRegistryConfig :: !(Maybe RegistryServiceConfig) -- ^ "RegistryConfig" + , systemInfoGenericResources :: !(Maybe [GenericResourcesInner]) -- ^ "GenericResources" - User-defined resources can be either Integer resources (e.g, `SSD=3`) or String resources (e.g, `GPU=UUID1`). + , systemInfoHttpProxy :: !(Maybe Text) -- ^ "HttpProxy" - HTTP-proxy configured for the daemon. This value is obtained from the [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration. + , systemInfoHttpsProxy :: !(Maybe Text) -- ^ "HttpsProxy" - HTTPS-proxy configured for the daemon. This value is obtained from the [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration. + , systemInfoNoProxy :: !(Maybe Text) -- ^ "NoProxy" - Comma-separated list of domain extensions for which no proxy should be used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Containers do not automatically inherit this configuration. + , systemInfoName :: !(Maybe Text) -- ^ "Name" - Hostname of the host. + , systemInfoLabels :: !(Maybe [Text]) -- ^ "Labels" - User-defined labels (key/value metadata) as set on the daemon. <p><br /></p> > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, > set through the daemon configuration, and _node_ labels, set from a > manager node in the Swarm. Node labels are not included in this > field. Node labels can be retrieved using the `/nodes/(id)` endpoint > on a manager node in the Swarm. + , systemInfoExperimentalBuild :: !(Maybe Bool) -- ^ "ExperimentalBuild" - Indicates if experimental features are enabled on the daemon. + , systemInfoServerVersion :: !(Maybe Text) -- ^ "ServerVersion" - Version string of the daemon. + , systemInfoRuntimes :: !(Maybe (Map.Map String Runtime)) -- ^ "Runtimes" - List of [OCI compliant](https://github.com/opencontainers/runtime-spec) runtimes configured on the daemon. Keys hold the \"name\" used to reference the runtime. The Docker daemon relies on an OCI compliant runtime (invoked via the `containerd` daemon) as its interface to the Linux kernel namespaces, cgroups, and SELinux. The default runtime is `runc`, and automatically configured. Additional runtimes can be configured by the user and will be listed here. + , systemInfoDefaultRuntime :: !(Maybe Text) -- ^ "DefaultRuntime" - Name of the default OCI runtime that is used when starting containers. The default can be overridden per-container at create time. + , systemInfoSwarm :: !(Maybe SwarmInfo) -- ^ "Swarm" + , systemInfoLiveRestoreEnabled :: !(Maybe Bool) -- ^ "LiveRestoreEnabled" - Indicates if live restore is enabled. If enabled, containers are kept running when the daemon is shutdown or upon daemon start if running containers are detected. + , systemInfoIsolation :: !(Maybe E'Isolation2) -- ^ "Isolation" - Represents the isolation technology to use as a default for containers. The supported values are platform-specific. If no isolation value is specified on daemon start, on Windows client, the default is `hyperv`, and on Windows server, the default is `process`. This option is currently not used on other platforms. + , systemInfoInitBinary :: !(Maybe Text) -- ^ "InitBinary" - Name and, optional, path of the `docker-init` binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result. + , systemInfoContainerdCommit :: !(Maybe Commit) -- ^ "ContainerdCommit" + , systemInfoRuncCommit :: !(Maybe Commit) -- ^ "RuncCommit" + , systemInfoInitCommit :: !(Maybe Commit) -- ^ "InitCommit" + , systemInfoSecurityOptions :: !(Maybe [Text]) -- ^ "SecurityOptions" - List of security features that are enabled on the daemon, such as apparmor, seccomp, SELinux, user-namespaces (userns), rootless and no-new-privileges. Additional configuration options for each security feature may be present, and are included as a comma-separated list of key/value pairs. + , systemInfoProductLicense :: !(Maybe Text) -- ^ "ProductLicense" - Reports a summary of the product license on the daemon. If a commercial license has been applied to the daemon, information such as number of nodes, and expiration are included. + , systemInfoDefaultAddressPools :: !(Maybe [SystemInfoDefaultAddressPoolsInner]) -- ^ "DefaultAddressPools" - List of custom default address pools for local networks, which can be specified in the daemon.json file or dockerd option. Example: a Base \"10.10.0.0/16\" with Size 24 will define the set of 256 10.10.[0-255].0/24 address pools. + , systemInfoWarnings :: !(Maybe [Text]) -- ^ "Warnings" - List of warnings / informational messages about missing features, or issues related to the daemon configuration. These messages can be printed by the client as information to the user. + , systemInfoCdiSpecDirs :: !(Maybe [Text]) -- ^ "CDISpecDirs" - List of directories where (Container Device Interface) CDI specifications are located. These specifications define vendor-specific modifications to an OCI runtime specification for a container being created. An empty list indicates that CDI device injection is disabled. Note that since using CDI device injection requires the daemon to have experimental enabled. For non-experimental daemons an empty list will always be returned. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemInfo +instance A.FromJSON SystemInfo where + parseJSON = A.withObject "SystemInfo" $ \o -> + SystemInfo + <$> (o .:? "ID") + <*> (o .:? "Containers") + <*> (o .:? "ContainersRunning") + <*> (o .:? "ContainersPaused") + <*> (o .:? "ContainersStopped") + <*> (o .:? "Images") + <*> (o .:? "Driver") + <*> (o .:? "DriverStatus") + <*> (o .:? "DockerRootDir") + <*> (o .:? "Plugins") + <*> (o .:? "MemoryLimit") + <*> (o .:? "SwapLimit") + <*> (o .:? "KernelMemoryTCP") + <*> (o .:? "CpuCfsPeriod") + <*> (o .:? "CpuCfsQuota") + <*> (o .:? "CPUShares") + <*> (o .:? "CPUSet") + <*> (o .:? "PidsLimit") + <*> (o .:? "OomKillDisable") + <*> (o .:? "IPv4Forwarding") + <*> (o .:? "BridgeNfIptables") + <*> (o .:? "BridgeNfIp6tables") + <*> (o .:? "Debug") + <*> (o .:? "NFd") + <*> (o .:? "NGoroutines") + <*> (o .:? "SystemTime") + <*> (o .:? "LoggingDriver") + <*> (o .:? "CgroupDriver") + <*> (o .:? "CgroupVersion") + <*> (o .:? "NEventsListener") + <*> (o .:? "KernelVersion") + <*> (o .:? "OperatingSystem") + <*> (o .:? "OSVersion") + <*> (o .:? "OSType") + <*> (o .:? "Architecture") + <*> (o .:? "NCPU") + <*> (o .:? "MemTotal") + <*> (o .:? "IndexServerAddress") + <*> (o .:? "RegistryConfig") + <*> (o .:? "GenericResources") + <*> (o .:? "HttpProxy") + <*> (o .:? "HttpsProxy") + <*> (o .:? "NoProxy") + <*> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "ExperimentalBuild") + <*> (o .:? "ServerVersion") + <*> (o .:? "Runtimes") + <*> (o .:? "DefaultRuntime") + <*> (o .:? "Swarm") + <*> (o .:? "LiveRestoreEnabled") + <*> (o .:? "Isolation") + <*> (o .:? "InitBinary") + <*> (o .:? "ContainerdCommit") + <*> (o .:? "RuncCommit") + <*> (o .:? "InitCommit") + <*> (o .:? "SecurityOptions") + <*> (o .:? "ProductLicense") + <*> (o .:? "DefaultAddressPools") + <*> (o .:? "Warnings") + <*> (o .:? "CDISpecDirs") + +-- | ToJSON SystemInfo +instance A.ToJSON SystemInfo where + toJSON SystemInfo {..} = + _omitNulls + [ "ID" .= systemInfoId + , "Containers" .= systemInfoContainers + , "ContainersRunning" .= systemInfoContainersRunning + , "ContainersPaused" .= systemInfoContainersPaused + , "ContainersStopped" .= systemInfoContainersStopped + , "Images" .= systemInfoImages + , "Driver" .= systemInfoDriver + , "DriverStatus" .= systemInfoDriverStatus + , "DockerRootDir" .= systemInfoDockerRootDir + , "Plugins" .= systemInfoPlugins + , "MemoryLimit" .= systemInfoMemoryLimit + , "SwapLimit" .= systemInfoSwapLimit + , "KernelMemoryTCP" .= systemInfoKernelMemoryTcp + , "CpuCfsPeriod" .= systemInfoCpuCfsPeriod + , "CpuCfsQuota" .= systemInfoCpuCfsQuota + , "CPUShares" .= systemInfoCpuShares + , "CPUSet" .= systemInfoCpuSet + , "PidsLimit" .= systemInfoPidsLimit + , "OomKillDisable" .= systemInfoOomKillDisable + , "IPv4Forwarding" .= systemInfoIpv4Forwarding + , "BridgeNfIptables" .= systemInfoBridgeNfIptables + , "BridgeNfIp6tables" .= systemInfoBridgeNfIp6tables + , "Debug" .= systemInfoDebug + , "NFd" .= systemInfoNfd + , "NGoroutines" .= systemInfoNGoroutines + , "SystemTime" .= systemInfoSystemTime + , "LoggingDriver" .= systemInfoLoggingDriver + , "CgroupDriver" .= systemInfoCgroupDriver + , "CgroupVersion" .= systemInfoCgroupVersion + , "NEventsListener" .= systemInfoNEventsListener + , "KernelVersion" .= systemInfoKernelVersion + , "OperatingSystem" .= systemInfoOperatingSystem + , "OSVersion" .= systemInfoOsVersion + , "OSType" .= systemInfoOsType + , "Architecture" .= systemInfoArchitecture + , "NCPU" .= systemInfoNcpu + , "MemTotal" .= systemInfoMemTotal + , "IndexServerAddress" .= systemInfoIndexServerAddress + , "RegistryConfig" .= systemInfoRegistryConfig + , "GenericResources" .= systemInfoGenericResources + , "HttpProxy" .= systemInfoHttpProxy + , "HttpsProxy" .= systemInfoHttpsProxy + , "NoProxy" .= systemInfoNoProxy + , "Name" .= systemInfoName + , "Labels" .= systemInfoLabels + , "ExperimentalBuild" .= systemInfoExperimentalBuild + , "ServerVersion" .= systemInfoServerVersion + , "Runtimes" .= systemInfoRuntimes + , "DefaultRuntime" .= systemInfoDefaultRuntime + , "Swarm" .= systemInfoSwarm + , "LiveRestoreEnabled" .= systemInfoLiveRestoreEnabled + , "Isolation" .= systemInfoIsolation + , "InitBinary" .= systemInfoInitBinary + , "ContainerdCommit" .= systemInfoContainerdCommit + , "RuncCommit" .= systemInfoRuncCommit + , "InitCommit" .= systemInfoInitCommit + , "SecurityOptions" .= systemInfoSecurityOptions + , "ProductLicense" .= systemInfoProductLicense + , "DefaultAddressPools" .= systemInfoDefaultAddressPools + , "Warnings" .= systemInfoWarnings + , "CDISpecDirs" .= systemInfoCdiSpecDirs + ] + + +-- | Construct a value of type 'SystemInfo' (by applying it's required fields, if any) +mkSystemInfo + :: SystemInfo +mkSystemInfo = + SystemInfo + { systemInfoId = Nothing + , systemInfoContainers = Nothing + , systemInfoContainersRunning = Nothing + , systemInfoContainersPaused = Nothing + , systemInfoContainersStopped = Nothing + , systemInfoImages = Nothing + , systemInfoDriver = Nothing + , systemInfoDriverStatus = Nothing + , systemInfoDockerRootDir = Nothing + , systemInfoPlugins = Nothing + , systemInfoMemoryLimit = Nothing + , systemInfoSwapLimit = Nothing + , systemInfoKernelMemoryTcp = Nothing + , systemInfoCpuCfsPeriod = Nothing + , systemInfoCpuCfsQuota = Nothing + , systemInfoCpuShares = Nothing + , systemInfoCpuSet = Nothing + , systemInfoPidsLimit = Nothing + , systemInfoOomKillDisable = Nothing + , systemInfoIpv4Forwarding = Nothing + , systemInfoBridgeNfIptables = Nothing + , systemInfoBridgeNfIp6tables = Nothing + , systemInfoDebug = Nothing + , systemInfoNfd = Nothing + , systemInfoNGoroutines = Nothing + , systemInfoSystemTime = Nothing + , systemInfoLoggingDriver = Nothing + , systemInfoCgroupDriver = Nothing + , systemInfoCgroupVersion = Nothing + , systemInfoNEventsListener = Nothing + , systemInfoKernelVersion = Nothing + , systemInfoOperatingSystem = Nothing + , systemInfoOsVersion = Nothing + , systemInfoOsType = Nothing + , systemInfoArchitecture = Nothing + , systemInfoNcpu = Nothing + , systemInfoMemTotal = Nothing + , systemInfoIndexServerAddress = Nothing + , systemInfoRegistryConfig = Nothing + , systemInfoGenericResources = Nothing + , systemInfoHttpProxy = Nothing + , systemInfoHttpsProxy = Nothing + , systemInfoNoProxy = Nothing + , systemInfoName = Nothing + , systemInfoLabels = Nothing + , systemInfoExperimentalBuild = Nothing + , systemInfoServerVersion = Nothing + , systemInfoRuntimes = Nothing + , systemInfoDefaultRuntime = Nothing + , systemInfoSwarm = Nothing + , systemInfoLiveRestoreEnabled = Nothing + , systemInfoIsolation = Nothing + , systemInfoInitBinary = Nothing + , systemInfoContainerdCommit = Nothing + , systemInfoRuncCommit = Nothing + , systemInfoInitCommit = Nothing + , systemInfoSecurityOptions = Nothing + , systemInfoProductLicense = Nothing + , systemInfoDefaultAddressPools = Nothing + , systemInfoWarnings = Nothing + , systemInfoCdiSpecDirs = Nothing + } + +-- ** SystemInfoDefaultAddressPoolsInner +-- | SystemInfoDefaultAddressPoolsInner +data SystemInfoDefaultAddressPoolsInner = SystemInfoDefaultAddressPoolsInner + { systemInfoDefaultAddressPoolsInnerBase :: !(Maybe Text) -- ^ "Base" - The network address in CIDR format + , systemInfoDefaultAddressPoolsInnerSize :: !(Maybe Int) -- ^ "Size" - The network pool size + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemInfoDefaultAddressPoolsInner +instance A.FromJSON SystemInfoDefaultAddressPoolsInner where + parseJSON = A.withObject "SystemInfoDefaultAddressPoolsInner" $ \o -> + SystemInfoDefaultAddressPoolsInner + <$> (o .:? "Base") + <*> (o .:? "Size") + +-- | ToJSON SystemInfoDefaultAddressPoolsInner +instance A.ToJSON SystemInfoDefaultAddressPoolsInner where + toJSON SystemInfoDefaultAddressPoolsInner {..} = + _omitNulls + [ "Base" .= systemInfoDefaultAddressPoolsInnerBase + , "Size" .= systemInfoDefaultAddressPoolsInnerSize + ] + + +-- | Construct a value of type 'SystemInfoDefaultAddressPoolsInner' (by applying it's required fields, if any) +mkSystemInfoDefaultAddressPoolsInner + :: SystemInfoDefaultAddressPoolsInner +mkSystemInfoDefaultAddressPoolsInner = + SystemInfoDefaultAddressPoolsInner + { systemInfoDefaultAddressPoolsInnerBase = Nothing + , systemInfoDefaultAddressPoolsInnerSize = Nothing + } + +-- ** SystemVersion +-- | SystemVersion +-- Response of Engine API: GET \"/version\" +data SystemVersion = SystemVersion + { systemVersionPlatform :: !(Maybe SystemVersionPlatform) -- ^ "Platform" + , systemVersionComponents :: !(Maybe [SystemVersionComponentsInner]) -- ^ "Components" - Information about system components + , systemVersionVersion :: !(Maybe Text) -- ^ "Version" - The version of the daemon + , systemVersionApiVersion :: !(Maybe Text) -- ^ "ApiVersion" - The default (and highest) API version that is supported by the daemon + , systemVersionMinApiVersion :: !(Maybe Text) -- ^ "MinAPIVersion" - The minimum API version that is supported by the daemon + , systemVersionGitCommit :: !(Maybe Text) -- ^ "GitCommit" - The Git commit of the source code that was used to build the daemon + , systemVersionGoVersion :: !(Maybe Text) -- ^ "GoVersion" - The version Go used to compile the daemon, and the version of the Go runtime in use. + , systemVersionOs :: !(Maybe Text) -- ^ "Os" - The operating system that the daemon is running on (\"linux\" or \"windows\") + , systemVersionArch :: !(Maybe Text) -- ^ "Arch" - The architecture that the daemon is running on + , systemVersionKernelVersion :: !(Maybe Text) -- ^ "KernelVersion" - The kernel version (`uname -r`) that the daemon is running on. This field is omitted when empty. + , systemVersionExperimental :: !(Maybe Bool) -- ^ "Experimental" - Indicates if the daemon is started with experimental features enabled. This field is omitted when empty / false. + , systemVersionBuildTime :: !(Maybe Text) -- ^ "BuildTime" - The date and time that the daemon was compiled. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemVersion +instance A.FromJSON SystemVersion where + parseJSON = A.withObject "SystemVersion" $ \o -> + SystemVersion + <$> (o .:? "Platform") + <*> (o .:? "Components") + <*> (o .:? "Version") + <*> (o .:? "ApiVersion") + <*> (o .:? "MinAPIVersion") + <*> (o .:? "GitCommit") + <*> (o .:? "GoVersion") + <*> (o .:? "Os") + <*> (o .:? "Arch") + <*> (o .:? "KernelVersion") + <*> (o .:? "Experimental") + <*> (o .:? "BuildTime") + +-- | ToJSON SystemVersion +instance A.ToJSON SystemVersion where + toJSON SystemVersion {..} = + _omitNulls + [ "Platform" .= systemVersionPlatform + , "Components" .= systemVersionComponents + , "Version" .= systemVersionVersion + , "ApiVersion" .= systemVersionApiVersion + , "MinAPIVersion" .= systemVersionMinApiVersion + , "GitCommit" .= systemVersionGitCommit + , "GoVersion" .= systemVersionGoVersion + , "Os" .= systemVersionOs + , "Arch" .= systemVersionArch + , "KernelVersion" .= systemVersionKernelVersion + , "Experimental" .= systemVersionExperimental + , "BuildTime" .= systemVersionBuildTime + ] + + +-- | Construct a value of type 'SystemVersion' (by applying it's required fields, if any) +mkSystemVersion + :: SystemVersion +mkSystemVersion = + SystemVersion + { systemVersionPlatform = Nothing + , systemVersionComponents = Nothing + , systemVersionVersion = Nothing + , systemVersionApiVersion = Nothing + , systemVersionMinApiVersion = Nothing + , systemVersionGitCommit = Nothing + , systemVersionGoVersion = Nothing + , systemVersionOs = Nothing + , systemVersionArch = Nothing + , systemVersionKernelVersion = Nothing + , systemVersionExperimental = Nothing + , systemVersionBuildTime = Nothing + } + +-- ** SystemVersionComponentsInner +-- | SystemVersionComponentsInner +data SystemVersionComponentsInner = SystemVersionComponentsInner + { systemVersionComponentsInnerName :: !(Text) -- ^ /Required/ "Name" - Name of the component + , systemVersionComponentsInnerVersion :: !(Text) -- ^ /Required/ "Version" - Version of the component + , systemVersionComponentsInnerDetails :: !(Maybe A.Value) -- ^ "Details" - Key/value pairs of strings with additional information about the component. These values are intended for informational purposes only, and their content is not defined, and not part of the API specification. These messages can be printed by the client as information to the user. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemVersionComponentsInner +instance A.FromJSON SystemVersionComponentsInner where + parseJSON = A.withObject "SystemVersionComponentsInner" $ \o -> + SystemVersionComponentsInner + <$> (o .: "Name") + <*> (o .: "Version") + <*> (o .:? "Details") + +-- | ToJSON SystemVersionComponentsInner +instance A.ToJSON SystemVersionComponentsInner where + toJSON SystemVersionComponentsInner {..} = + _omitNulls + [ "Name" .= systemVersionComponentsInnerName + , "Version" .= systemVersionComponentsInnerVersion + , "Details" .= systemVersionComponentsInnerDetails + ] + + +-- | Construct a value of type 'SystemVersionComponentsInner' (by applying it's required fields, if any) +mkSystemVersionComponentsInner + :: Text -- ^ 'systemVersionComponentsInnerName': Name of the component + -> Text -- ^ 'systemVersionComponentsInnerVersion': Version of the component + -> SystemVersionComponentsInner +mkSystemVersionComponentsInner systemVersionComponentsInnerName systemVersionComponentsInnerVersion = + SystemVersionComponentsInner + { systemVersionComponentsInnerName + , systemVersionComponentsInnerVersion + , systemVersionComponentsInnerDetails = Nothing + } + +-- ** SystemVersionPlatform +-- | SystemVersionPlatform +data SystemVersionPlatform = SystemVersionPlatform + { systemVersionPlatformName :: !(Text) -- ^ /Required/ "Name" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemVersionPlatform +instance A.FromJSON SystemVersionPlatform where + parseJSON = A.withObject "SystemVersionPlatform" $ \o -> + SystemVersionPlatform + <$> (o .: "Name") + +-- | ToJSON SystemVersionPlatform +instance A.ToJSON SystemVersionPlatform where + toJSON SystemVersionPlatform {..} = + _omitNulls + [ "Name" .= systemVersionPlatformName + ] + + +-- | Construct a value of type 'SystemVersionPlatform' (by applying it's required fields, if any) +mkSystemVersionPlatform + :: Text -- ^ 'systemVersionPlatformName' + -> SystemVersionPlatform +mkSystemVersionPlatform systemVersionPlatformName = + SystemVersionPlatform + { systemVersionPlatformName + } + +-- ** TLSInfo +-- | TLSInfo +-- Information about the issuer of leaf TLS certificates and the trusted root CA certificate. +data TLSInfo = TLSInfo + { tLSInfoTrustRoot :: !(Maybe Text) -- ^ "TrustRoot" - The root CA certificate(s) that are used to validate leaf TLS certificates. + , tLSInfoCertIssuerSubject :: !(Maybe Text) -- ^ "CertIssuerSubject" - The base64-url-safe-encoded raw subject bytes of the issuer. + , tLSInfoCertIssuerPublicKey :: !(Maybe Text) -- ^ "CertIssuerPublicKey" - The base64-url-safe-encoded raw public key bytes of the issuer. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TLSInfo +instance A.FromJSON TLSInfo where + parseJSON = A.withObject "TLSInfo" $ \o -> + TLSInfo + <$> (o .:? "TrustRoot") + <*> (o .:? "CertIssuerSubject") + <*> (o .:? "CertIssuerPublicKey") + +-- | ToJSON TLSInfo +instance A.ToJSON TLSInfo where + toJSON TLSInfo {..} = + _omitNulls + [ "TrustRoot" .= tLSInfoTrustRoot + , "CertIssuerSubject" .= tLSInfoCertIssuerSubject + , "CertIssuerPublicKey" .= tLSInfoCertIssuerPublicKey + ] + + +-- | Construct a value of type 'TLSInfo' (by applying it's required fields, if any) +mkTLSInfo + :: TLSInfo +mkTLSInfo = + TLSInfo + { tLSInfoTrustRoot = Nothing + , tLSInfoCertIssuerSubject = Nothing + , tLSInfoCertIssuerPublicKey = Nothing + } + +-- ** Task +-- | Task +data Task = Task + { taskId :: !(Maybe Text) -- ^ "ID" - The ID of the task. + , taskVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , taskCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" + , taskUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" + , taskName :: !(Maybe Text) -- ^ "Name" - Name of the task. + , taskLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , taskSpec :: !(Maybe TaskSpec) -- ^ "Spec" + , taskServiceId :: !(Maybe Text) -- ^ "ServiceID" - The ID of the service this task is part of. + , taskSlot :: !(Maybe Int) -- ^ "Slot" + , taskNodeId :: !(Maybe Text) -- ^ "NodeID" - The ID of the node that this task is on. + , taskAssignedGenericResources :: !(Maybe [GenericResourcesInner]) -- ^ "AssignedGenericResources" - User-defined resources can be either Integer resources (e.g, `SSD=3`) or String resources (e.g, `GPU=UUID1`). + , taskStatus :: !(Maybe TaskStatus) -- ^ "Status" + , taskDesiredState :: !(Maybe TaskState) -- ^ "DesiredState" + , taskJobIteration :: !(Maybe ObjectVersion) -- ^ "JobIteration" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Task +instance A.FromJSON Task where + parseJSON = A.withObject "Task" $ \o -> + Task + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Spec") + <*> (o .:? "ServiceID") + <*> (o .:? "Slot") + <*> (o .:? "NodeID") + <*> (o .:? "AssignedGenericResources") + <*> (o .:? "Status") + <*> (o .:? "DesiredState") + <*> (o .:? "JobIteration") + +-- | ToJSON Task +instance A.ToJSON Task where + toJSON Task {..} = + _omitNulls + [ "ID" .= taskId + , "Version" .= taskVersion + , "CreatedAt" .= taskCreatedAt + , "UpdatedAt" .= taskUpdatedAt + , "Name" .= taskName + , "Labels" .= taskLabels + , "Spec" .= taskSpec + , "ServiceID" .= taskServiceId + , "Slot" .= taskSlot + , "NodeID" .= taskNodeId + , "AssignedGenericResources" .= taskAssignedGenericResources + , "Status" .= taskStatus + , "DesiredState" .= taskDesiredState + , "JobIteration" .= taskJobIteration + ] + + +-- | Construct a value of type 'Task' (by applying it's required fields, if any) +mkTask + :: Task +mkTask = + Task + { taskId = Nothing + , taskVersion = Nothing + , taskCreatedAt = Nothing + , taskUpdatedAt = Nothing + , taskName = Nothing + , taskLabels = Nothing + , taskSpec = Nothing + , taskServiceId = Nothing + , taskSlot = Nothing + , taskNodeId = Nothing + , taskAssignedGenericResources = Nothing + , taskStatus = Nothing + , taskDesiredState = Nothing + , taskJobIteration = Nothing + } + +-- ** TaskSpec +-- | TaskSpec +-- User modifiable task configuration. +data TaskSpec = TaskSpec + { taskSpecPluginSpec :: !(Maybe TaskSpecPluginSpec) -- ^ "PluginSpec" + , taskSpecContainerSpec :: !(Maybe TaskSpecContainerSpec) -- ^ "ContainerSpec" + , taskSpecNetworkAttachmentSpec :: !(Maybe TaskSpecNetworkAttachmentSpec) -- ^ "NetworkAttachmentSpec" + , taskSpecResources :: !(Maybe TaskSpecResources) -- ^ "Resources" + , taskSpecRestartPolicy :: !(Maybe TaskSpecRestartPolicy) -- ^ "RestartPolicy" + , taskSpecPlacement :: !(Maybe TaskSpecPlacement) -- ^ "Placement" + , taskSpecForceUpdate :: !(Maybe Int) -- ^ "ForceUpdate" - A counter that triggers an update even if no relevant parameters have been changed. + , taskSpecRuntime :: !(Maybe Text) -- ^ "Runtime" - Runtime is the type of runtime specified for the task executor. + , taskSpecNetworks :: !(Maybe [NetworkAttachmentConfig]) -- ^ "Networks" - Specifies which networks the service should attach to. + , taskSpecLogDriver :: !(Maybe TaskSpecLogDriver) -- ^ "LogDriver" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpec +instance A.FromJSON TaskSpec where + parseJSON = A.withObject "TaskSpec" $ \o -> + TaskSpec + <$> (o .:? "PluginSpec") + <*> (o .:? "ContainerSpec") + <*> (o .:? "NetworkAttachmentSpec") + <*> (o .:? "Resources") + <*> (o .:? "RestartPolicy") + <*> (o .:? "Placement") + <*> (o .:? "ForceUpdate") + <*> (o .:? "Runtime") + <*> (o .:? "Networks") + <*> (o .:? "LogDriver") + +-- | ToJSON TaskSpec +instance A.ToJSON TaskSpec where + toJSON TaskSpec {..} = + _omitNulls + [ "PluginSpec" .= taskSpecPluginSpec + , "ContainerSpec" .= taskSpecContainerSpec + , "NetworkAttachmentSpec" .= taskSpecNetworkAttachmentSpec + , "Resources" .= taskSpecResources + , "RestartPolicy" .= taskSpecRestartPolicy + , "Placement" .= taskSpecPlacement + , "ForceUpdate" .= taskSpecForceUpdate + , "Runtime" .= taskSpecRuntime + , "Networks" .= taskSpecNetworks + , "LogDriver" .= taskSpecLogDriver + ] + + +-- | Construct a value of type 'TaskSpec' (by applying it's required fields, if any) +mkTaskSpec + :: TaskSpec +mkTaskSpec = + TaskSpec + { taskSpecPluginSpec = Nothing + , taskSpecContainerSpec = Nothing + , taskSpecNetworkAttachmentSpec = Nothing + , taskSpecResources = Nothing + , taskSpecRestartPolicy = Nothing + , taskSpecPlacement = Nothing + , taskSpecForceUpdate = Nothing + , taskSpecRuntime = Nothing + , taskSpecNetworks = Nothing + , taskSpecLogDriver = Nothing + } + +-- ** TaskSpecContainerSpec +-- | TaskSpecContainerSpec +-- 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`. +data TaskSpecContainerSpec = TaskSpecContainerSpec + { taskSpecContainerSpecImage :: !(Maybe Text) -- ^ "Image" - The image name to use for the container + , taskSpecContainerSpecLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value data. + , taskSpecContainerSpecCommand :: !(Maybe [Text]) -- ^ "Command" - The command to be run in the image. + , taskSpecContainerSpecArgs :: !(Maybe [Text]) -- ^ "Args" - Arguments to the command. + , taskSpecContainerSpecHostname :: !(Maybe Text) -- ^ "Hostname" - The hostname to use for the container, as a valid [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. + , taskSpecContainerSpecEnv :: !(Maybe [Text]) -- ^ "Env" - A list of environment variables in the form `VAR=value`. + , taskSpecContainerSpecDir :: !(Maybe Text) -- ^ "Dir" - The working directory for commands to run in. + , taskSpecContainerSpecUser :: !(Maybe Text) -- ^ "User" - The user inside the container. + , taskSpecContainerSpecGroups :: !(Maybe [Text]) -- ^ "Groups" - A list of additional groups that the container process will run as. + , taskSpecContainerSpecPrivileges :: !(Maybe TaskSpecContainerSpecPrivileges) -- ^ "Privileges" + , taskSpecContainerSpecTty :: !(Maybe Bool) -- ^ "TTY" - Whether a pseudo-TTY should be allocated. + , taskSpecContainerSpecOpenStdin :: !(Maybe Bool) -- ^ "OpenStdin" - Open `stdin` + , taskSpecContainerSpecReadOnly :: !(Maybe Bool) -- ^ "ReadOnly" - Mount the container's root filesystem as read only. + , taskSpecContainerSpecMounts :: !(Maybe [Mount]) -- ^ "Mounts" - Specification for mounts to be added to containers created as part of the service. + , taskSpecContainerSpecStopSignal :: !(Maybe Text) -- ^ "StopSignal" - Signal to stop the container. + , taskSpecContainerSpecStopGracePeriod :: !(Maybe Integer) -- ^ "StopGracePeriod" - Amount of time to wait for the container to terminate before forcefully killing it. + , taskSpecContainerSpecHealthCheck :: !(Maybe HealthConfig) -- ^ "HealthCheck" + , taskSpecContainerSpecHosts :: !(Maybe [Text]) -- ^ "Hosts" - A list of hostname/IP mappings to add to the container's `hosts` file. The format of extra hosts is specified in the [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) man page: IP_address canonical_hostname [aliases...] + , taskSpecContainerSpecDnsConfig :: !(Maybe TaskSpecContainerSpecDNSConfig) -- ^ "DNSConfig" + , taskSpecContainerSpecSecrets :: !(Maybe [TaskSpecContainerSpecSecretsInner]) -- ^ "Secrets" - Secrets contains references to zero or more secrets that will be exposed to the service. + , taskSpecContainerSpecConfigs :: !(Maybe [TaskSpecContainerSpecConfigsInner]) -- ^ "Configs" - Configs contains references to zero or more configs that will be exposed to the service. + , taskSpecContainerSpecIsolation :: !(Maybe E'Isolation3) -- ^ "Isolation" - Isolation technology of the containers running the service. (Windows only) + , taskSpecContainerSpecInit :: !(Maybe Bool) -- ^ "Init" - Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + , taskSpecContainerSpecSysctls :: !(Maybe (Map.Map String Text)) -- ^ "Sysctls" - Set kernel namedspaced parameters (sysctls) in the container. The Sysctls option on services accepts the same sysctls as the are supported on containers. Note that while the same sysctls are supported, no guarantees or checks are made about their suitability for a clustered environment, and it's up to the user to determine whether a given sysctl will work properly in a Service. + , taskSpecContainerSpecCapabilityAdd :: !(Maybe [Text]) -- ^ "CapabilityAdd" - A list of kernel capabilities to add to the default set for the container. + , taskSpecContainerSpecCapabilityDrop :: !(Maybe [Text]) -- ^ "CapabilityDrop" - A list of kernel capabilities to drop from the default set for the container. + , taskSpecContainerSpecUlimits :: !(Maybe [ResourcesUlimitsInner]) -- ^ "Ulimits" - A list of resource limits to set in the container. For example: `{\"Name\": \"nofile\", \"Soft\": 1024, \"Hard\": 2048}`\" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpec +instance A.FromJSON TaskSpecContainerSpec where + parseJSON = A.withObject "TaskSpecContainerSpec" $ \o -> + TaskSpecContainerSpec + <$> (o .:? "Image") + <*> (o .:? "Labels") + <*> (o .:? "Command") + <*> (o .:? "Args") + <*> (o .:? "Hostname") + <*> (o .:? "Env") + <*> (o .:? "Dir") + <*> (o .:? "User") + <*> (o .:? "Groups") + <*> (o .:? "Privileges") + <*> (o .:? "TTY") + <*> (o .:? "OpenStdin") + <*> (o .:? "ReadOnly") + <*> (o .:? "Mounts") + <*> (o .:? "StopSignal") + <*> (o .:? "StopGracePeriod") + <*> (o .:? "HealthCheck") + <*> (o .:? "Hosts") + <*> (o .:? "DNSConfig") + <*> (o .:? "Secrets") + <*> (o .:? "Configs") + <*> (o .:? "Isolation") + <*> (o .:? "Init") + <*> (o .:? "Sysctls") + <*> (o .:? "CapabilityAdd") + <*> (o .:? "CapabilityDrop") + <*> (o .:? "Ulimits") + +-- | ToJSON TaskSpecContainerSpec +instance A.ToJSON TaskSpecContainerSpec where + toJSON TaskSpecContainerSpec {..} = + _omitNulls + [ "Image" .= taskSpecContainerSpecImage + , "Labels" .= taskSpecContainerSpecLabels + , "Command" .= taskSpecContainerSpecCommand + , "Args" .= taskSpecContainerSpecArgs + , "Hostname" .= taskSpecContainerSpecHostname + , "Env" .= taskSpecContainerSpecEnv + , "Dir" .= taskSpecContainerSpecDir + , "User" .= taskSpecContainerSpecUser + , "Groups" .= taskSpecContainerSpecGroups + , "Privileges" .= taskSpecContainerSpecPrivileges + , "TTY" .= taskSpecContainerSpecTty + , "OpenStdin" .= taskSpecContainerSpecOpenStdin + , "ReadOnly" .= taskSpecContainerSpecReadOnly + , "Mounts" .= taskSpecContainerSpecMounts + , "StopSignal" .= taskSpecContainerSpecStopSignal + , "StopGracePeriod" .= taskSpecContainerSpecStopGracePeriod + , "HealthCheck" .= taskSpecContainerSpecHealthCheck + , "Hosts" .= taskSpecContainerSpecHosts + , "DNSConfig" .= taskSpecContainerSpecDnsConfig + , "Secrets" .= taskSpecContainerSpecSecrets + , "Configs" .= taskSpecContainerSpecConfigs + , "Isolation" .= taskSpecContainerSpecIsolation + , "Init" .= taskSpecContainerSpecInit + , "Sysctls" .= taskSpecContainerSpecSysctls + , "CapabilityAdd" .= taskSpecContainerSpecCapabilityAdd + , "CapabilityDrop" .= taskSpecContainerSpecCapabilityDrop + , "Ulimits" .= taskSpecContainerSpecUlimits + ] + + +-- | Construct a value of type 'TaskSpecContainerSpec' (by applying it's required fields, if any) +mkTaskSpecContainerSpec + :: TaskSpecContainerSpec +mkTaskSpecContainerSpec = + TaskSpecContainerSpec + { taskSpecContainerSpecImage = Nothing + , taskSpecContainerSpecLabels = Nothing + , taskSpecContainerSpecCommand = Nothing + , taskSpecContainerSpecArgs = Nothing + , taskSpecContainerSpecHostname = Nothing + , taskSpecContainerSpecEnv = Nothing + , taskSpecContainerSpecDir = Nothing + , taskSpecContainerSpecUser = Nothing + , taskSpecContainerSpecGroups = Nothing + , taskSpecContainerSpecPrivileges = Nothing + , taskSpecContainerSpecTty = Nothing + , taskSpecContainerSpecOpenStdin = Nothing + , taskSpecContainerSpecReadOnly = Nothing + , taskSpecContainerSpecMounts = Nothing + , taskSpecContainerSpecStopSignal = Nothing + , taskSpecContainerSpecStopGracePeriod = Nothing + , taskSpecContainerSpecHealthCheck = Nothing + , taskSpecContainerSpecHosts = Nothing + , taskSpecContainerSpecDnsConfig = Nothing + , taskSpecContainerSpecSecrets = Nothing + , taskSpecContainerSpecConfigs = Nothing + , taskSpecContainerSpecIsolation = Nothing + , taskSpecContainerSpecInit = Nothing + , taskSpecContainerSpecSysctls = Nothing + , taskSpecContainerSpecCapabilityAdd = Nothing + , taskSpecContainerSpecCapabilityDrop = Nothing + , taskSpecContainerSpecUlimits = Nothing + } + +-- ** TaskSpecContainerSpecConfigsInner +-- | TaskSpecContainerSpecConfigsInner +data TaskSpecContainerSpecConfigsInner = TaskSpecContainerSpecConfigsInner + { taskSpecContainerSpecConfigsInnerFile :: !(Maybe TaskSpecContainerSpecConfigsInnerFile) -- ^ "File" + , taskSpecContainerSpecConfigsInnerRuntime :: !(Maybe A.Value) -- ^ "Runtime" - Runtime represents a target that is not mounted into the container but is used by the task <p><br /><p> > **Note**: `Configs.File` and `Configs.Runtime` are mutually > exclusive + , taskSpecContainerSpecConfigsInnerConfigId :: !(Maybe Text) -- ^ "ConfigID" - ConfigID represents the ID of the specific config that we're referencing. + , taskSpecContainerSpecConfigsInnerConfigName :: !(Maybe Text) -- ^ "ConfigName" - ConfigName is the name of the config that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecConfigsInner +instance A.FromJSON TaskSpecContainerSpecConfigsInner where + parseJSON = A.withObject "TaskSpecContainerSpecConfigsInner" $ \o -> + TaskSpecContainerSpecConfigsInner + <$> (o .:? "File") + <*> (o .:? "Runtime") + <*> (o .:? "ConfigID") + <*> (o .:? "ConfigName") + +-- | ToJSON TaskSpecContainerSpecConfigsInner +instance A.ToJSON TaskSpecContainerSpecConfigsInner where + toJSON TaskSpecContainerSpecConfigsInner {..} = + _omitNulls + [ "File" .= taskSpecContainerSpecConfigsInnerFile + , "Runtime" .= taskSpecContainerSpecConfigsInnerRuntime + , "ConfigID" .= taskSpecContainerSpecConfigsInnerConfigId + , "ConfigName" .= taskSpecContainerSpecConfigsInnerConfigName + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecConfigsInner' (by applying it's required fields, if any) +mkTaskSpecContainerSpecConfigsInner + :: TaskSpecContainerSpecConfigsInner +mkTaskSpecContainerSpecConfigsInner = + TaskSpecContainerSpecConfigsInner + { taskSpecContainerSpecConfigsInnerFile = Nothing + , taskSpecContainerSpecConfigsInnerRuntime = Nothing + , taskSpecContainerSpecConfigsInnerConfigId = Nothing + , taskSpecContainerSpecConfigsInnerConfigName = Nothing + } + +-- ** TaskSpecContainerSpecConfigsInnerFile +-- | TaskSpecContainerSpecConfigsInnerFile +-- File represents a specific target that is backed by a file.


> **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive +data TaskSpecContainerSpecConfigsInnerFile = TaskSpecContainerSpecConfigsInnerFile + { taskSpecContainerSpecConfigsInnerFileName :: !(Maybe Text) -- ^ "Name" - Name represents the final filename in the filesystem. + , taskSpecContainerSpecConfigsInnerFileUid :: !(Maybe Text) -- ^ "UID" - UID represents the file UID. + , taskSpecContainerSpecConfigsInnerFileGid :: !(Maybe Text) -- ^ "GID" - GID represents the file GID. + , taskSpecContainerSpecConfigsInnerFileMode :: !(Maybe Int) -- ^ "Mode" - Mode represents the FileMode of the file. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecConfigsInnerFile +instance A.FromJSON TaskSpecContainerSpecConfigsInnerFile where + parseJSON = A.withObject "TaskSpecContainerSpecConfigsInnerFile" $ \o -> + TaskSpecContainerSpecConfigsInnerFile + <$> (o .:? "Name") + <*> (o .:? "UID") + <*> (o .:? "GID") + <*> (o .:? "Mode") + +-- | ToJSON TaskSpecContainerSpecConfigsInnerFile +instance A.ToJSON TaskSpecContainerSpecConfigsInnerFile where + toJSON TaskSpecContainerSpecConfigsInnerFile {..} = + _omitNulls + [ "Name" .= taskSpecContainerSpecConfigsInnerFileName + , "UID" .= taskSpecContainerSpecConfigsInnerFileUid + , "GID" .= taskSpecContainerSpecConfigsInnerFileGid + , "Mode" .= taskSpecContainerSpecConfigsInnerFileMode + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecConfigsInnerFile' (by applying it's required fields, if any) +mkTaskSpecContainerSpecConfigsInnerFile + :: TaskSpecContainerSpecConfigsInnerFile +mkTaskSpecContainerSpecConfigsInnerFile = + TaskSpecContainerSpecConfigsInnerFile + { taskSpecContainerSpecConfigsInnerFileName = Nothing + , taskSpecContainerSpecConfigsInnerFileUid = Nothing + , taskSpecContainerSpecConfigsInnerFileGid = Nothing + , taskSpecContainerSpecConfigsInnerFileMode = Nothing + } + +-- ** TaskSpecContainerSpecDNSConfig +-- | TaskSpecContainerSpecDNSConfig +-- Specification for DNS related configurations in resolver configuration file (`resolv.conf`). +data TaskSpecContainerSpecDNSConfig = TaskSpecContainerSpecDNSConfig + { taskSpecContainerSpecDNSConfigNameservers :: !(Maybe [Text]) -- ^ "Nameservers" - The IP addresses of the name servers. + , taskSpecContainerSpecDNSConfigSearch :: !(Maybe [Text]) -- ^ "Search" - A search list for host-name lookup. + , taskSpecContainerSpecDNSConfigOptions :: !(Maybe [Text]) -- ^ "Options" - A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecDNSConfig +instance A.FromJSON TaskSpecContainerSpecDNSConfig where + parseJSON = A.withObject "TaskSpecContainerSpecDNSConfig" $ \o -> + TaskSpecContainerSpecDNSConfig + <$> (o .:? "Nameservers") + <*> (o .:? "Search") + <*> (o .:? "Options") + +-- | ToJSON TaskSpecContainerSpecDNSConfig +instance A.ToJSON TaskSpecContainerSpecDNSConfig where + toJSON TaskSpecContainerSpecDNSConfig {..} = + _omitNulls + [ "Nameservers" .= taskSpecContainerSpecDNSConfigNameservers + , "Search" .= taskSpecContainerSpecDNSConfigSearch + , "Options" .= taskSpecContainerSpecDNSConfigOptions + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecDNSConfig' (by applying it's required fields, if any) +mkTaskSpecContainerSpecDNSConfig + :: TaskSpecContainerSpecDNSConfig +mkTaskSpecContainerSpecDNSConfig = + TaskSpecContainerSpecDNSConfig + { taskSpecContainerSpecDNSConfigNameservers = Nothing + , taskSpecContainerSpecDNSConfigSearch = Nothing + , taskSpecContainerSpecDNSConfigOptions = Nothing + } + +-- ** TaskSpecContainerSpecPrivileges +-- | TaskSpecContainerSpecPrivileges +-- Security options for the container +data TaskSpecContainerSpecPrivileges = TaskSpecContainerSpecPrivileges + { taskSpecContainerSpecPrivilegesCredentialSpec :: !(Maybe TaskSpecContainerSpecPrivilegesCredentialSpec) -- ^ "CredentialSpec" + , taskSpecContainerSpecPrivilegesSeLinuxContext :: !(Maybe TaskSpecContainerSpecPrivilegesSELinuxContext) -- ^ "SELinuxContext" + , taskSpecContainerSpecPrivilegesSeccomp :: !(Maybe TaskSpecContainerSpecPrivilegesSeccomp) -- ^ "Seccomp" + , taskSpecContainerSpecPrivilegesAppArmor :: !(Maybe TaskSpecContainerSpecPrivilegesAppArmor) -- ^ "AppArmor" + , taskSpecContainerSpecPrivilegesNoNewPrivileges :: !(Maybe Bool) -- ^ "NoNewPrivileges" - Configuration of the no_new_privs bit in the container + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecPrivileges +instance A.FromJSON TaskSpecContainerSpecPrivileges where + parseJSON = A.withObject "TaskSpecContainerSpecPrivileges" $ \o -> + TaskSpecContainerSpecPrivileges + <$> (o .:? "CredentialSpec") + <*> (o .:? "SELinuxContext") + <*> (o .:? "Seccomp") + <*> (o .:? "AppArmor") + <*> (o .:? "NoNewPrivileges") + +-- | ToJSON TaskSpecContainerSpecPrivileges +instance A.ToJSON TaskSpecContainerSpecPrivileges where + toJSON TaskSpecContainerSpecPrivileges {..} = + _omitNulls + [ "CredentialSpec" .= taskSpecContainerSpecPrivilegesCredentialSpec + , "SELinuxContext" .= taskSpecContainerSpecPrivilegesSeLinuxContext + , "Seccomp" .= taskSpecContainerSpecPrivilegesSeccomp + , "AppArmor" .= taskSpecContainerSpecPrivilegesAppArmor + , "NoNewPrivileges" .= taskSpecContainerSpecPrivilegesNoNewPrivileges + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecPrivileges' (by applying it's required fields, if any) +mkTaskSpecContainerSpecPrivileges + :: TaskSpecContainerSpecPrivileges +mkTaskSpecContainerSpecPrivileges = + TaskSpecContainerSpecPrivileges + { taskSpecContainerSpecPrivilegesCredentialSpec = Nothing + , taskSpecContainerSpecPrivilegesSeLinuxContext = Nothing + , taskSpecContainerSpecPrivilegesSeccomp = Nothing + , taskSpecContainerSpecPrivilegesAppArmor = Nothing + , taskSpecContainerSpecPrivilegesNoNewPrivileges = Nothing + } + +-- ** TaskSpecContainerSpecPrivilegesAppArmor +-- | TaskSpecContainerSpecPrivilegesAppArmor +-- Options for configuring AppArmor on the container +data TaskSpecContainerSpecPrivilegesAppArmor = TaskSpecContainerSpecPrivilegesAppArmor + { taskSpecContainerSpecPrivilegesAppArmorMode :: !(Maybe E'Mode3) -- ^ "Mode" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecPrivilegesAppArmor +instance A.FromJSON TaskSpecContainerSpecPrivilegesAppArmor where + parseJSON = A.withObject "TaskSpecContainerSpecPrivilegesAppArmor" $ \o -> + TaskSpecContainerSpecPrivilegesAppArmor + <$> (o .:? "Mode") + +-- | ToJSON TaskSpecContainerSpecPrivilegesAppArmor +instance A.ToJSON TaskSpecContainerSpecPrivilegesAppArmor where + toJSON TaskSpecContainerSpecPrivilegesAppArmor {..} = + _omitNulls + [ "Mode" .= taskSpecContainerSpecPrivilegesAppArmorMode + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecPrivilegesAppArmor' (by applying it's required fields, if any) +mkTaskSpecContainerSpecPrivilegesAppArmor + :: TaskSpecContainerSpecPrivilegesAppArmor +mkTaskSpecContainerSpecPrivilegesAppArmor = + TaskSpecContainerSpecPrivilegesAppArmor + { taskSpecContainerSpecPrivilegesAppArmorMode = Nothing + } + +-- ** TaskSpecContainerSpecPrivilegesCredentialSpec +-- | TaskSpecContainerSpecPrivilegesCredentialSpec +-- CredentialSpec for managed service account (Windows only) +data TaskSpecContainerSpecPrivilegesCredentialSpec = TaskSpecContainerSpecPrivilegesCredentialSpec + { taskSpecContainerSpecPrivilegesCredentialSpecConfig :: !(Maybe Text) -- ^ "Config" - Load credential spec from a Swarm Config with the given ID. The specified config must also be present in the Configs field with the Runtime property set. <p><br /></p> > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, > and `CredentialSpec.Config` are mutually exclusive. + , taskSpecContainerSpecPrivilegesCredentialSpecFile :: !(Maybe Text) -- ^ "File" - Load credential spec from this file. The file is read by the daemon, and must be present in the `CredentialSpecs` subdirectory in the docker data directory, which defaults to `C:\\ProgramData\\Docker\\` on Windows. For example, specifying `spec.json` loads `C:\\ProgramData\\Docker\\CredentialSpecs\\spec.json`. <p><br /></p> > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, > and `CredentialSpec.Config` are mutually exclusive. + , taskSpecContainerSpecPrivilegesCredentialSpecRegistry :: !(Maybe Text) -- ^ "Registry" - Load credential spec from this value in the Windows registry. The specified registry value must be located in: `HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Virtualization\\Containers\\CredentialSpecs` <p><br /></p> > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, > and `CredentialSpec.Config` are mutually exclusive. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecPrivilegesCredentialSpec +instance A.FromJSON TaskSpecContainerSpecPrivilegesCredentialSpec where + parseJSON = A.withObject "TaskSpecContainerSpecPrivilegesCredentialSpec" $ \o -> + TaskSpecContainerSpecPrivilegesCredentialSpec + <$> (o .:? "Config") + <*> (o .:? "File") + <*> (o .:? "Registry") + +-- | ToJSON TaskSpecContainerSpecPrivilegesCredentialSpec +instance A.ToJSON TaskSpecContainerSpecPrivilegesCredentialSpec where + toJSON TaskSpecContainerSpecPrivilegesCredentialSpec {..} = + _omitNulls + [ "Config" .= taskSpecContainerSpecPrivilegesCredentialSpecConfig + , "File" .= taskSpecContainerSpecPrivilegesCredentialSpecFile + , "Registry" .= taskSpecContainerSpecPrivilegesCredentialSpecRegistry + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecPrivilegesCredentialSpec' (by applying it's required fields, if any) +mkTaskSpecContainerSpecPrivilegesCredentialSpec + :: TaskSpecContainerSpecPrivilegesCredentialSpec +mkTaskSpecContainerSpecPrivilegesCredentialSpec = + TaskSpecContainerSpecPrivilegesCredentialSpec + { taskSpecContainerSpecPrivilegesCredentialSpecConfig = Nothing + , taskSpecContainerSpecPrivilegesCredentialSpecFile = Nothing + , taskSpecContainerSpecPrivilegesCredentialSpecRegistry = Nothing + } + +-- ** TaskSpecContainerSpecPrivilegesSELinuxContext +-- | TaskSpecContainerSpecPrivilegesSELinuxContext +-- SELinux labels of the container +data TaskSpecContainerSpecPrivilegesSELinuxContext = TaskSpecContainerSpecPrivilegesSELinuxContext + { taskSpecContainerSpecPrivilegesSELinuxContextDisable :: !(Maybe Bool) -- ^ "Disable" - Disable SELinux + , taskSpecContainerSpecPrivilegesSELinuxContextUser :: !(Maybe Text) -- ^ "User" - SELinux user label + , taskSpecContainerSpecPrivilegesSELinuxContextRole :: !(Maybe Text) -- ^ "Role" - SELinux role label + , taskSpecContainerSpecPrivilegesSELinuxContextType :: !(Maybe Text) -- ^ "Type" - SELinux type label + , taskSpecContainerSpecPrivilegesSELinuxContextLevel :: !(Maybe Text) -- ^ "Level" - SELinux level label + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecPrivilegesSELinuxContext +instance A.FromJSON TaskSpecContainerSpecPrivilegesSELinuxContext where + parseJSON = A.withObject "TaskSpecContainerSpecPrivilegesSELinuxContext" $ \o -> + TaskSpecContainerSpecPrivilegesSELinuxContext + <$> (o .:? "Disable") + <*> (o .:? "User") + <*> (o .:? "Role") + <*> (o .:? "Type") + <*> (o .:? "Level") + +-- | ToJSON TaskSpecContainerSpecPrivilegesSELinuxContext +instance A.ToJSON TaskSpecContainerSpecPrivilegesSELinuxContext where + toJSON TaskSpecContainerSpecPrivilegesSELinuxContext {..} = + _omitNulls + [ "Disable" .= taskSpecContainerSpecPrivilegesSELinuxContextDisable + , "User" .= taskSpecContainerSpecPrivilegesSELinuxContextUser + , "Role" .= taskSpecContainerSpecPrivilegesSELinuxContextRole + , "Type" .= taskSpecContainerSpecPrivilegesSELinuxContextType + , "Level" .= taskSpecContainerSpecPrivilegesSELinuxContextLevel + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecPrivilegesSELinuxContext' (by applying it's required fields, if any) +mkTaskSpecContainerSpecPrivilegesSELinuxContext + :: TaskSpecContainerSpecPrivilegesSELinuxContext +mkTaskSpecContainerSpecPrivilegesSELinuxContext = + TaskSpecContainerSpecPrivilegesSELinuxContext + { taskSpecContainerSpecPrivilegesSELinuxContextDisable = Nothing + , taskSpecContainerSpecPrivilegesSELinuxContextUser = Nothing + , taskSpecContainerSpecPrivilegesSELinuxContextRole = Nothing + , taskSpecContainerSpecPrivilegesSELinuxContextType = Nothing + , taskSpecContainerSpecPrivilegesSELinuxContextLevel = Nothing + } + +-- ** TaskSpecContainerSpecPrivilegesSeccomp +-- | TaskSpecContainerSpecPrivilegesSeccomp +-- Options for configuring seccomp on the container +data TaskSpecContainerSpecPrivilegesSeccomp = TaskSpecContainerSpecPrivilegesSeccomp + { taskSpecContainerSpecPrivilegesSeccompMode :: !(Maybe E'Mode2) -- ^ "Mode" + , taskSpecContainerSpecPrivilegesSeccompProfile :: !(Maybe Text) -- ^ "Profile" - The custom seccomp profile as a json object + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecPrivilegesSeccomp +instance A.FromJSON TaskSpecContainerSpecPrivilegesSeccomp where + parseJSON = A.withObject "TaskSpecContainerSpecPrivilegesSeccomp" $ \o -> + TaskSpecContainerSpecPrivilegesSeccomp + <$> (o .:? "Mode") + <*> (o .:? "Profile") + +-- | ToJSON TaskSpecContainerSpecPrivilegesSeccomp +instance A.ToJSON TaskSpecContainerSpecPrivilegesSeccomp where + toJSON TaskSpecContainerSpecPrivilegesSeccomp {..} = + _omitNulls + [ "Mode" .= taskSpecContainerSpecPrivilegesSeccompMode + , "Profile" .= taskSpecContainerSpecPrivilegesSeccompProfile + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecPrivilegesSeccomp' (by applying it's required fields, if any) +mkTaskSpecContainerSpecPrivilegesSeccomp + :: TaskSpecContainerSpecPrivilegesSeccomp +mkTaskSpecContainerSpecPrivilegesSeccomp = + TaskSpecContainerSpecPrivilegesSeccomp + { taskSpecContainerSpecPrivilegesSeccompMode = Nothing + , taskSpecContainerSpecPrivilegesSeccompProfile = Nothing + } + +-- ** TaskSpecContainerSpecSecretsInner +-- | TaskSpecContainerSpecSecretsInner +data TaskSpecContainerSpecSecretsInner = TaskSpecContainerSpecSecretsInner + { taskSpecContainerSpecSecretsInnerFile :: !(Maybe TaskSpecContainerSpecSecretsInnerFile) -- ^ "File" + , taskSpecContainerSpecSecretsInnerSecretId :: !(Maybe Text) -- ^ "SecretID" - SecretID represents the ID of the specific secret that we're referencing. + , taskSpecContainerSpecSecretsInnerSecretName :: !(Maybe Text) -- ^ "SecretName" - SecretName is the name of the secret that this references, but this is just provided for lookup/display purposes. The secret in the reference will be identified by its ID. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecSecretsInner +instance A.FromJSON TaskSpecContainerSpecSecretsInner where + parseJSON = A.withObject "TaskSpecContainerSpecSecretsInner" $ \o -> + TaskSpecContainerSpecSecretsInner + <$> (o .:? "File") + <*> (o .:? "SecretID") + <*> (o .:? "SecretName") + +-- | ToJSON TaskSpecContainerSpecSecretsInner +instance A.ToJSON TaskSpecContainerSpecSecretsInner where + toJSON TaskSpecContainerSpecSecretsInner {..} = + _omitNulls + [ "File" .= taskSpecContainerSpecSecretsInnerFile + , "SecretID" .= taskSpecContainerSpecSecretsInnerSecretId + , "SecretName" .= taskSpecContainerSpecSecretsInnerSecretName + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecSecretsInner' (by applying it's required fields, if any) +mkTaskSpecContainerSpecSecretsInner + :: TaskSpecContainerSpecSecretsInner +mkTaskSpecContainerSpecSecretsInner = + TaskSpecContainerSpecSecretsInner + { taskSpecContainerSpecSecretsInnerFile = Nothing + , taskSpecContainerSpecSecretsInnerSecretId = Nothing + , taskSpecContainerSpecSecretsInnerSecretName = Nothing + } + +-- ** TaskSpecContainerSpecSecretsInnerFile +-- | TaskSpecContainerSpecSecretsInnerFile +-- File represents a specific target that is backed by a file. +data TaskSpecContainerSpecSecretsInnerFile = TaskSpecContainerSpecSecretsInnerFile + { taskSpecContainerSpecSecretsInnerFileName :: !(Maybe Text) -- ^ "Name" - Name represents the final filename in the filesystem. + , taskSpecContainerSpecSecretsInnerFileUid :: !(Maybe Text) -- ^ "UID" - UID represents the file UID. + , taskSpecContainerSpecSecretsInnerFileGid :: !(Maybe Text) -- ^ "GID" - GID represents the file GID. + , taskSpecContainerSpecSecretsInnerFileMode :: !(Maybe Int) -- ^ "Mode" - Mode represents the FileMode of the file. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecSecretsInnerFile +instance A.FromJSON TaskSpecContainerSpecSecretsInnerFile where + parseJSON = A.withObject "TaskSpecContainerSpecSecretsInnerFile" $ \o -> + TaskSpecContainerSpecSecretsInnerFile + <$> (o .:? "Name") + <*> (o .:? "UID") + <*> (o .:? "GID") + <*> (o .:? "Mode") + +-- | ToJSON TaskSpecContainerSpecSecretsInnerFile +instance A.ToJSON TaskSpecContainerSpecSecretsInnerFile where + toJSON TaskSpecContainerSpecSecretsInnerFile {..} = + _omitNulls + [ "Name" .= taskSpecContainerSpecSecretsInnerFileName + , "UID" .= taskSpecContainerSpecSecretsInnerFileUid + , "GID" .= taskSpecContainerSpecSecretsInnerFileGid + , "Mode" .= taskSpecContainerSpecSecretsInnerFileMode + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecSecretsInnerFile' (by applying it's required fields, if any) +mkTaskSpecContainerSpecSecretsInnerFile + :: TaskSpecContainerSpecSecretsInnerFile +mkTaskSpecContainerSpecSecretsInnerFile = + TaskSpecContainerSpecSecretsInnerFile + { taskSpecContainerSpecSecretsInnerFileName = Nothing + , taskSpecContainerSpecSecretsInnerFileUid = Nothing + , taskSpecContainerSpecSecretsInnerFileGid = Nothing + , taskSpecContainerSpecSecretsInnerFileMode = Nothing + } + +-- ** TaskSpecLogDriver +-- | TaskSpecLogDriver +-- 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. +data TaskSpecLogDriver = TaskSpecLogDriver + { taskSpecLogDriverName :: !(Maybe Text) -- ^ "Name" + , taskSpecLogDriverOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecLogDriver +instance A.FromJSON TaskSpecLogDriver where + parseJSON = A.withObject "TaskSpecLogDriver" $ \o -> + TaskSpecLogDriver + <$> (o .:? "Name") + <*> (o .:? "Options") + +-- | ToJSON TaskSpecLogDriver +instance A.ToJSON TaskSpecLogDriver where + toJSON TaskSpecLogDriver {..} = + _omitNulls + [ "Name" .= taskSpecLogDriverName + , "Options" .= taskSpecLogDriverOptions + ] + + +-- | Construct a value of type 'TaskSpecLogDriver' (by applying it's required fields, if any) +mkTaskSpecLogDriver + :: TaskSpecLogDriver +mkTaskSpecLogDriver = + TaskSpecLogDriver + { taskSpecLogDriverName = Nothing + , taskSpecLogDriverOptions = Nothing + } + +-- ** TaskSpecNetworkAttachmentSpec +-- | TaskSpecNetworkAttachmentSpec +-- 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`. +data TaskSpecNetworkAttachmentSpec = TaskSpecNetworkAttachmentSpec + { taskSpecNetworkAttachmentSpecContainerId :: !(Maybe Text) -- ^ "ContainerID" - ID of the container represented by this task + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecNetworkAttachmentSpec +instance A.FromJSON TaskSpecNetworkAttachmentSpec where + parseJSON = A.withObject "TaskSpecNetworkAttachmentSpec" $ \o -> + TaskSpecNetworkAttachmentSpec + <$> (o .:? "ContainerID") + +-- | ToJSON TaskSpecNetworkAttachmentSpec +instance A.ToJSON TaskSpecNetworkAttachmentSpec where + toJSON TaskSpecNetworkAttachmentSpec {..} = + _omitNulls + [ "ContainerID" .= taskSpecNetworkAttachmentSpecContainerId + ] + + +-- | Construct a value of type 'TaskSpecNetworkAttachmentSpec' (by applying it's required fields, if any) +mkTaskSpecNetworkAttachmentSpec + :: TaskSpecNetworkAttachmentSpec +mkTaskSpecNetworkAttachmentSpec = + TaskSpecNetworkAttachmentSpec + { taskSpecNetworkAttachmentSpecContainerId = Nothing + } + +-- ** TaskSpecPlacement +-- | TaskSpecPlacement +data TaskSpecPlacement = TaskSpecPlacement + { taskSpecPlacementConstraints :: !(Maybe [Text]) -- ^ "Constraints" - An array of constraint expressions to limit the set of nodes where a task can be scheduled. Constraint expressions can either use a _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find nodes that satisfy every expression (AND match). Constraints can match node or Docker Engine labels as follows: node attribute | matches | example ---------------------|--------------------------------|----------------------------------------------- `node.id` | Node ID | `node.id==2ivku8v2gvtg4` `node.hostname` | Node hostname | `node.hostname!=node-2` `node.role` | Node role (`manager`/`worker`) | `node.role==manager` `node.platform.os` | Node operating system | `node.platform.os==windows` `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` `node.labels` | User-defined node labels | `node.labels.security==high` `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04` `engine.labels` apply to Docker Engine labels like operating system, drivers, etc. Swarm administrators add `node.labels` for operational purposes by using the [`node update endpoint`](#operation/NodeUpdate). + , taskSpecPlacementPreferences :: !(Maybe [TaskSpecPlacementPreferencesInner]) -- ^ "Preferences" - Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence. + , taskSpecPlacementMaxReplicas :: !(Maybe Integer) -- ^ "MaxReplicas" - Maximum number of replicas for per node (default value is 0, which is unlimited) + , taskSpecPlacementPlatforms :: !(Maybe [Platform]) -- ^ "Platforms" - Platforms stores all the platforms that the service's image can run on. This field is used in the platform filter for scheduling. If empty, then the platform filter is off, meaning there are no scheduling restrictions. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecPlacement +instance A.FromJSON TaskSpecPlacement where + parseJSON = A.withObject "TaskSpecPlacement" $ \o -> + TaskSpecPlacement + <$> (o .:? "Constraints") + <*> (o .:? "Preferences") + <*> (o .:? "MaxReplicas") + <*> (o .:? "Platforms") + +-- | ToJSON TaskSpecPlacement +instance A.ToJSON TaskSpecPlacement where + toJSON TaskSpecPlacement {..} = + _omitNulls + [ "Constraints" .= taskSpecPlacementConstraints + , "Preferences" .= taskSpecPlacementPreferences + , "MaxReplicas" .= taskSpecPlacementMaxReplicas + , "Platforms" .= taskSpecPlacementPlatforms + ] + + +-- | Construct a value of type 'TaskSpecPlacement' (by applying it's required fields, if any) +mkTaskSpecPlacement + :: TaskSpecPlacement +mkTaskSpecPlacement = + TaskSpecPlacement + { taskSpecPlacementConstraints = Nothing + , taskSpecPlacementPreferences = Nothing + , taskSpecPlacementMaxReplicas = Nothing + , taskSpecPlacementPlatforms = Nothing + } + +-- ** TaskSpecPlacementPreferencesInner +-- | TaskSpecPlacementPreferencesInner +data TaskSpecPlacementPreferencesInner = TaskSpecPlacementPreferencesInner + { taskSpecPlacementPreferencesInnerSpread :: !(Maybe TaskSpecPlacementPreferencesInnerSpread) -- ^ "Spread" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecPlacementPreferencesInner +instance A.FromJSON TaskSpecPlacementPreferencesInner where + parseJSON = A.withObject "TaskSpecPlacementPreferencesInner" $ \o -> + TaskSpecPlacementPreferencesInner + <$> (o .:? "Spread") + +-- | ToJSON TaskSpecPlacementPreferencesInner +instance A.ToJSON TaskSpecPlacementPreferencesInner where + toJSON TaskSpecPlacementPreferencesInner {..} = + _omitNulls + [ "Spread" .= taskSpecPlacementPreferencesInnerSpread + ] + + +-- | Construct a value of type 'TaskSpecPlacementPreferencesInner' (by applying it's required fields, if any) +mkTaskSpecPlacementPreferencesInner + :: TaskSpecPlacementPreferencesInner +mkTaskSpecPlacementPreferencesInner = + TaskSpecPlacementPreferencesInner + { taskSpecPlacementPreferencesInnerSpread = Nothing + } + +-- ** TaskSpecPlacementPreferencesInnerSpread +-- | TaskSpecPlacementPreferencesInnerSpread +data TaskSpecPlacementPreferencesInnerSpread = TaskSpecPlacementPreferencesInnerSpread + { taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor :: !(Maybe Text) -- ^ "SpreadDescriptor" - label descriptor, such as `engine.labels.az`. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecPlacementPreferencesInnerSpread +instance A.FromJSON TaskSpecPlacementPreferencesInnerSpread where + parseJSON = A.withObject "TaskSpecPlacementPreferencesInnerSpread" $ \o -> + TaskSpecPlacementPreferencesInnerSpread + <$> (o .:? "SpreadDescriptor") + +-- | ToJSON TaskSpecPlacementPreferencesInnerSpread +instance A.ToJSON TaskSpecPlacementPreferencesInnerSpread where + toJSON TaskSpecPlacementPreferencesInnerSpread {..} = + _omitNulls + [ "SpreadDescriptor" .= taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor + ] + + +-- | Construct a value of type 'TaskSpecPlacementPreferencesInnerSpread' (by applying it's required fields, if any) +mkTaskSpecPlacementPreferencesInnerSpread + :: TaskSpecPlacementPreferencesInnerSpread +mkTaskSpecPlacementPreferencesInnerSpread = + TaskSpecPlacementPreferencesInnerSpread + { taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor = Nothing + } + +-- ** TaskSpecPluginSpec +-- | TaskSpecPluginSpec +-- 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`. +data TaskSpecPluginSpec = TaskSpecPluginSpec + { taskSpecPluginSpecName :: !(Maybe Text) -- ^ "Name" - The name or 'alias' to use for the plugin. + , taskSpecPluginSpecRemote :: !(Maybe Text) -- ^ "Remote" - The plugin image reference to use. + , taskSpecPluginSpecDisabled :: !(Maybe Bool) -- ^ "Disabled" - Disable the plugin once scheduled. + , taskSpecPluginSpecPluginPrivilege :: !(Maybe [PluginPrivilege]) -- ^ "PluginPrivilege" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecPluginSpec +instance A.FromJSON TaskSpecPluginSpec where + parseJSON = A.withObject "TaskSpecPluginSpec" $ \o -> + TaskSpecPluginSpec + <$> (o .:? "Name") + <*> (o .:? "Remote") + <*> (o .:? "Disabled") + <*> (o .:? "PluginPrivilege") + +-- | ToJSON TaskSpecPluginSpec +instance A.ToJSON TaskSpecPluginSpec where + toJSON TaskSpecPluginSpec {..} = + _omitNulls + [ "Name" .= taskSpecPluginSpecName + , "Remote" .= taskSpecPluginSpecRemote + , "Disabled" .= taskSpecPluginSpecDisabled + , "PluginPrivilege" .= taskSpecPluginSpecPluginPrivilege + ] + + +-- | Construct a value of type 'TaskSpecPluginSpec' (by applying it's required fields, if any) +mkTaskSpecPluginSpec + :: TaskSpecPluginSpec +mkTaskSpecPluginSpec = + TaskSpecPluginSpec + { taskSpecPluginSpecName = Nothing + , taskSpecPluginSpecRemote = Nothing + , taskSpecPluginSpecDisabled = Nothing + , taskSpecPluginSpecPluginPrivilege = Nothing + } + +-- ** TaskSpecResources +-- | TaskSpecResources +-- Resource requirements which apply to each individual container created as part of the service. +data TaskSpecResources = TaskSpecResources + { taskSpecResourcesLimits :: !(Maybe Limit) -- ^ "Limits" + , taskSpecResourcesReservations :: !(Maybe ResourceObject) -- ^ "Reservations" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecResources +instance A.FromJSON TaskSpecResources where + parseJSON = A.withObject "TaskSpecResources" $ \o -> + TaskSpecResources + <$> (o .:? "Limits") + <*> (o .:? "Reservations") + +-- | ToJSON TaskSpecResources +instance A.ToJSON TaskSpecResources where + toJSON TaskSpecResources {..} = + _omitNulls + [ "Limits" .= taskSpecResourcesLimits + , "Reservations" .= taskSpecResourcesReservations + ] + + +-- | Construct a value of type 'TaskSpecResources' (by applying it's required fields, if any) +mkTaskSpecResources + :: TaskSpecResources +mkTaskSpecResources = + TaskSpecResources + { taskSpecResourcesLimits = Nothing + , taskSpecResourcesReservations = Nothing + } + +-- ** TaskSpecRestartPolicy +-- | TaskSpecRestartPolicy +-- Specification for the restart policy which applies to containers created as part of this service. +data TaskSpecRestartPolicy = TaskSpecRestartPolicy + { taskSpecRestartPolicyCondition :: !(Maybe E'Condition) -- ^ "Condition" - Condition for restart. + , taskSpecRestartPolicyDelay :: !(Maybe Integer) -- ^ "Delay" - Delay between restart attempts. + , taskSpecRestartPolicyMaxAttempts :: !(Maybe Integer) -- ^ "MaxAttempts" - Maximum attempts to restart a given container before giving up (default value is 0, which is ignored). + , taskSpecRestartPolicyWindow :: !(Maybe Integer) -- ^ "Window" - Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecRestartPolicy +instance A.FromJSON TaskSpecRestartPolicy where + parseJSON = A.withObject "TaskSpecRestartPolicy" $ \o -> + TaskSpecRestartPolicy + <$> (o .:? "Condition") + <*> (o .:? "Delay") + <*> (o .:? "MaxAttempts") + <*> (o .:? "Window") + +-- | ToJSON TaskSpecRestartPolicy +instance A.ToJSON TaskSpecRestartPolicy where + toJSON TaskSpecRestartPolicy {..} = + _omitNulls + [ "Condition" .= taskSpecRestartPolicyCondition + , "Delay" .= taskSpecRestartPolicyDelay + , "MaxAttempts" .= taskSpecRestartPolicyMaxAttempts + , "Window" .= taskSpecRestartPolicyWindow + ] + + +-- | Construct a value of type 'TaskSpecRestartPolicy' (by applying it's required fields, if any) +mkTaskSpecRestartPolicy + :: TaskSpecRestartPolicy +mkTaskSpecRestartPolicy = + TaskSpecRestartPolicy + { taskSpecRestartPolicyCondition = Nothing + , taskSpecRestartPolicyDelay = Nothing + , taskSpecRestartPolicyMaxAttempts = Nothing + , taskSpecRestartPolicyWindow = Nothing + } + +-- ** TaskStatus +-- | TaskStatus +-- represents the status of a task. +data TaskStatus = TaskStatus + { taskStatusTimestamp :: !(Maybe Text) -- ^ "Timestamp" + , taskStatusState :: !(Maybe TaskState) -- ^ "State" + , taskStatusMessage :: !(Maybe Text) -- ^ "Message" + , taskStatusErr :: !(Maybe Text) -- ^ "Err" + , taskStatusContainerStatus :: !(Maybe ContainerStatus) -- ^ "ContainerStatus" + , taskStatusPortStatus :: !(Maybe PortStatus) -- ^ "PortStatus" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskStatus +instance A.FromJSON TaskStatus where + parseJSON = A.withObject "TaskStatus" $ \o -> + TaskStatus + <$> (o .:? "Timestamp") + <*> (o .:? "State") + <*> (o .:? "Message") + <*> (o .:? "Err") + <*> (o .:? "ContainerStatus") + <*> (o .:? "PortStatus") + +-- | ToJSON TaskStatus +instance A.ToJSON TaskStatus where + toJSON TaskStatus {..} = + _omitNulls + [ "Timestamp" .= taskStatusTimestamp + , "State" .= taskStatusState + , "Message" .= taskStatusMessage + , "Err" .= taskStatusErr + , "ContainerStatus" .= taskStatusContainerStatus + , "PortStatus" .= taskStatusPortStatus + ] + + +-- | Construct a value of type 'TaskStatus' (by applying it's required fields, if any) +mkTaskStatus + :: TaskStatus +mkTaskStatus = + TaskStatus + { taskStatusTimestamp = Nothing + , taskStatusState = Nothing + , taskStatusMessage = Nothing + , taskStatusErr = Nothing + , taskStatusContainerStatus = Nothing + , taskStatusPortStatus = Nothing + } + +-- ** ThrottleDevice +-- | ThrottleDevice +data ThrottleDevice = ThrottleDevice + { throttleDevicePath :: !(Maybe Text) -- ^ "Path" - Device path + , throttleDeviceRate :: !(Maybe Integer) -- ^ "Rate" - Rate + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ThrottleDevice +instance A.FromJSON ThrottleDevice where + parseJSON = A.withObject "ThrottleDevice" $ \o -> + ThrottleDevice + <$> (o .:? "Path") + <*> (o .:? "Rate") + +-- | ToJSON ThrottleDevice +instance A.ToJSON ThrottleDevice where + toJSON ThrottleDevice {..} = + _omitNulls + [ "Path" .= throttleDevicePath + , "Rate" .= throttleDeviceRate + ] + + +-- | Construct a value of type 'ThrottleDevice' (by applying it's required fields, if any) +mkThrottleDevice + :: ThrottleDevice +mkThrottleDevice = + ThrottleDevice + { throttleDevicePath = Nothing + , throttleDeviceRate = Nothing + } + +-- ** UnlockKeyResponse +-- | UnlockKeyResponse +-- UnlockKeyResponse +-- +data UnlockKeyResponse = UnlockKeyResponse + { unlockKeyResponseUnlockKey :: !(Maybe Text) -- ^ "UnlockKey" - The swarm's unlock key. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON UnlockKeyResponse +instance A.FromJSON UnlockKeyResponse where + parseJSON = A.withObject "UnlockKeyResponse" $ \o -> + UnlockKeyResponse + <$> (o .:? "UnlockKey") + +-- | ToJSON UnlockKeyResponse +instance A.ToJSON UnlockKeyResponse where + toJSON UnlockKeyResponse {..} = + _omitNulls + [ "UnlockKey" .= unlockKeyResponseUnlockKey + ] + + +-- | Construct a value of type 'UnlockKeyResponse' (by applying it's required fields, if any) +mkUnlockKeyResponse + :: UnlockKeyResponse +mkUnlockKeyResponse = + UnlockKeyResponse + { unlockKeyResponseUnlockKey = Nothing + } + +-- ** Volume +-- | Volume +data Volume = Volume + { volumeName :: !(Text) -- ^ /Required/ "Name" - Name of the volume. + , volumeDriver :: !(Text) -- ^ /Required/ "Driver" - Name of the volume driver used by the volume. + , volumeMountpoint :: !(Text) -- ^ /Required/ "Mountpoint" - Mount path of the volume on the host. + , volumeCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" - Date/Time the volume was created. + , volumeStatus :: !(Maybe (Map.Map String A.Value)) -- ^ "Status" - Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. + , volumeLabels :: !((Map.Map String Text)) -- ^ /Required/ "Labels" - User-defined key/value metadata. + , volumeScope :: !(E'Scope) -- ^ /Required/ "Scope" - The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. + , volumeClusterVolume :: !(Maybe ClusterVolume) -- ^ "ClusterVolume" + , volumeOptions :: !((Map.Map String Text)) -- ^ /Required/ "Options" - The driver specific options used when creating the volume. + , volumeUsageData :: !(Maybe VolumeUsageData) -- ^ "UsageData" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Volume +instance A.FromJSON Volume where + parseJSON = A.withObject "Volume" $ \o -> + Volume + <$> (o .: "Name") + <*> (o .: "Driver") + <*> (o .: "Mountpoint") + <*> (o .:? "CreatedAt") + <*> (o .:? "Status") + <*> (o .: "Labels") + <*> (o .: "Scope") + <*> (o .:? "ClusterVolume") + <*> (o .: "Options") + <*> (o .:? "UsageData") + +-- | ToJSON Volume +instance A.ToJSON Volume where + toJSON Volume {..} = + _omitNulls + [ "Name" .= volumeName + , "Driver" .= volumeDriver + , "Mountpoint" .= volumeMountpoint + , "CreatedAt" .= volumeCreatedAt + , "Status" .= volumeStatus + , "Labels" .= volumeLabels + , "Scope" .= volumeScope + , "ClusterVolume" .= volumeClusterVolume + , "Options" .= volumeOptions + , "UsageData" .= volumeUsageData + ] + + +-- | Construct a value of type 'Volume' (by applying it's required fields, if any) +mkVolume + :: Text -- ^ 'volumeName': Name of the volume. + -> Text -- ^ 'volumeDriver': Name of the volume driver used by the volume. + -> Text -- ^ 'volumeMountpoint': Mount path of the volume on the host. + -> (Map.Map String Text) -- ^ 'volumeLabels': User-defined key/value metadata. + -> E'Scope -- ^ 'volumeScope': The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. + -> (Map.Map String Text) -- ^ 'volumeOptions': The driver specific options used when creating the volume. + -> Volume +mkVolume volumeName volumeDriver volumeMountpoint volumeLabels volumeScope volumeOptions = + Volume + { volumeName + , volumeDriver + , volumeMountpoint + , volumeCreatedAt = Nothing + , volumeStatus = Nothing + , volumeLabels + , volumeScope + , volumeClusterVolume = Nothing + , volumeOptions + , volumeUsageData = Nothing + } + +-- ** VolumeCreateOptions +-- | VolumeCreateOptions +-- VolumeConfig +-- +-- Volume configuration +data VolumeCreateOptions = VolumeCreateOptions + { volumeCreateOptionsName :: !(Maybe Text) -- ^ "Name" - The new volume's name. If not specified, Docker generates a name. + , volumeCreateOptionsDriver :: !(Maybe Text) -- ^ "Driver" - Name of the volume driver to use. + , volumeCreateOptionsDriverOpts :: !(Maybe (Map.Map String Text)) -- ^ "DriverOpts" - A mapping of driver options and values. These options are passed directly to the driver and are driver specific. + , volumeCreateOptionsLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , volumeCreateOptionsClusterVolumeSpec :: !(Maybe ClusterVolumeSpec) -- ^ "ClusterVolumeSpec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON VolumeCreateOptions +instance A.FromJSON VolumeCreateOptions where + parseJSON = A.withObject "VolumeCreateOptions" $ \o -> + VolumeCreateOptions + <$> (o .:? "Name") + <*> (o .:? "Driver") + <*> (o .:? "DriverOpts") + <*> (o .:? "Labels") + <*> (o .:? "ClusterVolumeSpec") + +-- | ToJSON VolumeCreateOptions +instance A.ToJSON VolumeCreateOptions where + toJSON VolumeCreateOptions {..} = + _omitNulls + [ "Name" .= volumeCreateOptionsName + , "Driver" .= volumeCreateOptionsDriver + , "DriverOpts" .= volumeCreateOptionsDriverOpts + , "Labels" .= volumeCreateOptionsLabels + , "ClusterVolumeSpec" .= volumeCreateOptionsClusterVolumeSpec + ] + + +-- | Construct a value of type 'VolumeCreateOptions' (by applying it's required fields, if any) +mkVolumeCreateOptions + :: VolumeCreateOptions +mkVolumeCreateOptions = + VolumeCreateOptions + { volumeCreateOptionsName = Nothing + , volumeCreateOptionsDriver = Nothing + , volumeCreateOptionsDriverOpts = Nothing + , volumeCreateOptionsLabels = Nothing + , volumeCreateOptionsClusterVolumeSpec = Nothing + } + +-- ** VolumeListResponse +-- | VolumeListResponse +-- VolumeListResponse +-- +-- Volume list response +data VolumeListResponse = VolumeListResponse + { volumeListResponseVolumes :: !(Maybe [Volume]) -- ^ "Volumes" - List of volumes + , volumeListResponseWarnings :: !(Maybe [Text]) -- ^ "Warnings" - Warnings that occurred when fetching the list of volumes. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON VolumeListResponse +instance A.FromJSON VolumeListResponse where + parseJSON = A.withObject "VolumeListResponse" $ \o -> + VolumeListResponse + <$> (o .:? "Volumes") + <*> (o .:? "Warnings") + +-- | ToJSON VolumeListResponse +instance A.ToJSON VolumeListResponse where + toJSON VolumeListResponse {..} = + _omitNulls + [ "Volumes" .= volumeListResponseVolumes + , "Warnings" .= volumeListResponseWarnings + ] + + +-- | Construct a value of type 'VolumeListResponse' (by applying it's required fields, if any) +mkVolumeListResponse + :: VolumeListResponse +mkVolumeListResponse = + VolumeListResponse + { volumeListResponseVolumes = Nothing + , volumeListResponseWarnings = Nothing + } + +-- ** VolumePruneResponse +-- | VolumePruneResponse +-- VolumePruneResponse +-- +data VolumePruneResponse = VolumePruneResponse + { volumePruneResponseVolumesDeleted :: !(Maybe [Text]) -- ^ "VolumesDeleted" - Volumes that were deleted + , volumePruneResponseSpaceReclaimed :: !(Maybe Integer) -- ^ "SpaceReclaimed" - Disk space reclaimed in bytes + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON VolumePruneResponse +instance A.FromJSON VolumePruneResponse where + parseJSON = A.withObject "VolumePruneResponse" $ \o -> + VolumePruneResponse + <$> (o .:? "VolumesDeleted") + <*> (o .:? "SpaceReclaimed") + +-- | ToJSON VolumePruneResponse +instance A.ToJSON VolumePruneResponse where + toJSON VolumePruneResponse {..} = + _omitNulls + [ "VolumesDeleted" .= volumePruneResponseVolumesDeleted + , "SpaceReclaimed" .= volumePruneResponseSpaceReclaimed + ] + + +-- | Construct a value of type 'VolumePruneResponse' (by applying it's required fields, if any) +mkVolumePruneResponse + :: VolumePruneResponse +mkVolumePruneResponse = + VolumePruneResponse + { volumePruneResponseVolumesDeleted = Nothing + , volumePruneResponseSpaceReclaimed = Nothing + } + +-- ** VolumeUpdateRequest +-- | VolumeUpdateRequest +-- Volume configuration +data VolumeUpdateRequest = VolumeUpdateRequest + { volumeUpdateRequestSpec :: !(Maybe ClusterVolumeSpec) -- ^ "Spec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON VolumeUpdateRequest +instance A.FromJSON VolumeUpdateRequest where + parseJSON = A.withObject "VolumeUpdateRequest" $ \o -> + VolumeUpdateRequest + <$> (o .:? "Spec") + +-- | ToJSON VolumeUpdateRequest +instance A.ToJSON VolumeUpdateRequest where + toJSON VolumeUpdateRequest {..} = + _omitNulls + [ "Spec" .= volumeUpdateRequestSpec + ] + + +-- | Construct a value of type 'VolumeUpdateRequest' (by applying it's required fields, if any) +mkVolumeUpdateRequest + :: VolumeUpdateRequest +mkVolumeUpdateRequest = + VolumeUpdateRequest + { volumeUpdateRequestSpec = Nothing + } + +-- ** VolumeUsageData +-- | VolumeUsageData +-- Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. +data VolumeUsageData = VolumeUsageData + { volumeUsageDataSize :: !(Integer) -- ^ /Required/ "Size" - Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") + , volumeUsageDataRefCount :: !(Integer) -- ^ /Required/ "RefCount" - The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON VolumeUsageData +instance A.FromJSON VolumeUsageData where + parseJSON = A.withObject "VolumeUsageData" $ \o -> + VolumeUsageData + <$> (o .: "Size") + <*> (o .: "RefCount") + +-- | ToJSON VolumeUsageData +instance A.ToJSON VolumeUsageData where + toJSON VolumeUsageData {..} = + _omitNulls + [ "Size" .= volumeUsageDataSize + , "RefCount" .= volumeUsageDataRefCount + ] + + +-- | Construct a value of type 'VolumeUsageData' (by applying it's required fields, if any) +mkVolumeUsageData + :: Integer -- ^ 'volumeUsageDataSize': Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") + -> Integer -- ^ 'volumeUsageDataRefCount': The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. + -> VolumeUsageData +mkVolumeUsageData volumeUsageDataSize volumeUsageDataRefCount = + VolumeUsageData + { volumeUsageDataSize + , volumeUsageDataRefCount + } + + +-- * Enums + + +-- ** ChangeType + +-- | Enum of 'Int' . +-- Kind of change Can be one of: - `0`: Modified (\"C\") - `1`: Added (\"A\") - `2`: Deleted (\"D\") +data ChangeType + = ChangeType'Num0 -- ^ @0@ + | ChangeType'Num1 -- ^ @1@ + | ChangeType'Num2 -- ^ @2@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON ChangeType where toJSON = A.toJSON . fromChangeType +instance A.FromJSON ChangeType where parseJSON o = P.either P.fail (pure . P.id) . toChangeType =<< A.parseJSON o +instance WH.ToHttpApiData ChangeType where toQueryParam = WH.toQueryParam . fromChangeType +instance WH.FromHttpApiData ChangeType where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toChangeType +instance MimeRender MimeMultipartFormData ChangeType where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'ChangeType' enum +fromChangeType :: ChangeType -> Int +fromChangeType = \case + ChangeType'Num0 -> 0 + ChangeType'Num1 -> 1 + ChangeType'Num2 -> 2 + +-- | parse 'ChangeType' enum +toChangeType :: Int -> P.Either String ChangeType +toChangeType = \case + 0 -> P.Right ChangeType'Num0 + 1 -> P.Right ChangeType'Num1 + 2 -> P.Right ChangeType'Num2 + s -> P.Left $ "toChangeType: enum parse failure: " P.++ P.show s + + +-- ** E'Availability + +-- | Enum of 'Text' . +-- Availability of the node. +data E'Availability + = E'Availability'Active -- ^ @"active"@ + | E'Availability'Pause -- ^ @"pause"@ + | E'Availability'Drain -- ^ @"drain"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Availability where toJSON = A.toJSON . fromE'Availability +instance A.FromJSON E'Availability where parseJSON o = P.either P.fail (pure . P.id) . toE'Availability =<< A.parseJSON o +instance WH.ToHttpApiData E'Availability where toQueryParam = WH.toQueryParam . fromE'Availability +instance WH.FromHttpApiData E'Availability where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Availability +instance MimeRender MimeMultipartFormData E'Availability where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Availability' enum +fromE'Availability :: E'Availability -> Text +fromE'Availability = \case + E'Availability'Active -> "active" + E'Availability'Pause -> "pause" + E'Availability'Drain -> "drain" + +-- | parse 'E'Availability' enum +toE'Availability :: Text -> P.Either String E'Availability +toE'Availability = \case + "active" -> P.Right E'Availability'Active + "pause" -> P.Right E'Availability'Pause + "drain" -> P.Right E'Availability'Drain + s -> P.Left $ "toE'Availability: enum parse failure: " P.++ P.show s + + +-- ** E'CgroupDriver + +-- | Enum of 'Text' . +-- The driver to use for managing cgroups. +data E'CgroupDriver + = E'CgroupDriver'Cgroupfs -- ^ @"cgroupfs"@ + | E'CgroupDriver'Systemd -- ^ @"systemd"@ + | E'CgroupDriver'None -- ^ @"none"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'CgroupDriver where toJSON = A.toJSON . fromE'CgroupDriver +instance A.FromJSON E'CgroupDriver where parseJSON o = P.either P.fail (pure . P.id) . toE'CgroupDriver =<< A.parseJSON o +instance WH.ToHttpApiData E'CgroupDriver where toQueryParam = WH.toQueryParam . fromE'CgroupDriver +instance WH.FromHttpApiData E'CgroupDriver where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'CgroupDriver +instance MimeRender MimeMultipartFormData E'CgroupDriver where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'CgroupDriver' enum +fromE'CgroupDriver :: E'CgroupDriver -> Text +fromE'CgroupDriver = \case + E'CgroupDriver'Cgroupfs -> "cgroupfs" + E'CgroupDriver'Systemd -> "systemd" + E'CgroupDriver'None -> "none" + +-- | parse 'E'CgroupDriver' enum +toE'CgroupDriver :: Text -> P.Either String E'CgroupDriver +toE'CgroupDriver = \case + "cgroupfs" -> P.Right E'CgroupDriver'Cgroupfs + "systemd" -> P.Right E'CgroupDriver'Systemd + "none" -> P.Right E'CgroupDriver'None + s -> P.Left $ "toE'CgroupDriver: enum parse failure: " P.++ P.show s + + +-- ** E'CgroupVersion + +-- | Enum of 'Text' . +-- The version of the cgroup. +data E'CgroupVersion + = E'CgroupVersion'1 -- ^ @"1"@ + | E'CgroupVersion'2 -- ^ @"2"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'CgroupVersion where toJSON = A.toJSON . fromE'CgroupVersion +instance A.FromJSON E'CgroupVersion where parseJSON o = P.either P.fail (pure . P.id) . toE'CgroupVersion =<< A.parseJSON o +instance WH.ToHttpApiData E'CgroupVersion where toQueryParam = WH.toQueryParam . fromE'CgroupVersion +instance WH.FromHttpApiData E'CgroupVersion where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'CgroupVersion +instance MimeRender MimeMultipartFormData E'CgroupVersion where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'CgroupVersion' enum +fromE'CgroupVersion :: E'CgroupVersion -> Text +fromE'CgroupVersion = \case + E'CgroupVersion'1 -> "1" + E'CgroupVersion'2 -> "2" + +-- | parse 'E'CgroupVersion' enum +toE'CgroupVersion :: Text -> P.Either String E'CgroupVersion +toE'CgroupVersion = \case + "1" -> P.Right E'CgroupVersion'1 + "2" -> P.Right E'CgroupVersion'2 + s -> P.Left $ "toE'CgroupVersion: enum parse failure: " P.++ P.show s + + +-- ** E'CgroupnsMode + +-- | Enum of 'Text' . +-- cgroup namespace mode for the container. Possible values are: - `\"private\"`: the container runs in its own private cgroup namespace - `\"host\"`: use the host system's cgroup namespace If not specified, the daemon default is used, which can either be `\"private\"` or `\"host\"`, depending on daemon version, kernel support and configuration. +data E'CgroupnsMode + = E'CgroupnsMode'Private -- ^ @"private"@ + | E'CgroupnsMode'Host -- ^ @"host"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'CgroupnsMode where toJSON = A.toJSON . fromE'CgroupnsMode +instance A.FromJSON E'CgroupnsMode where parseJSON o = P.either P.fail (pure . P.id) . toE'CgroupnsMode =<< A.parseJSON o +instance WH.ToHttpApiData E'CgroupnsMode where toQueryParam = WH.toQueryParam . fromE'CgroupnsMode +instance WH.FromHttpApiData E'CgroupnsMode where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'CgroupnsMode +instance MimeRender MimeMultipartFormData E'CgroupnsMode where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'CgroupnsMode' enum +fromE'CgroupnsMode :: E'CgroupnsMode -> Text +fromE'CgroupnsMode = \case + E'CgroupnsMode'Private -> "private" + E'CgroupnsMode'Host -> "host" + +-- | parse 'E'CgroupnsMode' enum +toE'CgroupnsMode :: Text -> P.Either String E'CgroupnsMode +toE'CgroupnsMode = \case + "private" -> P.Right E'CgroupnsMode'Private + "host" -> P.Right E'CgroupnsMode'Host + s -> P.Left $ "toE'CgroupnsMode: enum parse failure: " P.++ P.show s + + +-- ** E'Condition + +-- | Enum of 'Text' . +-- Condition for restart. +data E'Condition + = E'Condition'None -- ^ @"none"@ + | E'Condition'On_failure -- ^ @"on-failure"@ + | E'Condition'Any -- ^ @"any"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Condition where toJSON = A.toJSON . fromE'Condition +instance A.FromJSON E'Condition where parseJSON o = P.either P.fail (pure . P.id) . toE'Condition =<< A.parseJSON o +instance WH.ToHttpApiData E'Condition where toQueryParam = WH.toQueryParam . fromE'Condition +instance WH.FromHttpApiData E'Condition where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Condition +instance MimeRender MimeMultipartFormData E'Condition where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Condition' enum +fromE'Condition :: E'Condition -> Text +fromE'Condition = \case + E'Condition'None -> "none" + E'Condition'On_failure -> "on-failure" + E'Condition'Any -> "any" + +-- | parse 'E'Condition' enum +toE'Condition :: Text -> P.Either String E'Condition +toE'Condition = \case + "none" -> P.Right E'Condition'None + "on-failure" -> P.Right E'Condition'On_failure + "any" -> P.Right E'Condition'Any + s -> P.Left $ "toE'Condition: enum parse failure: " P.++ P.show s + + +-- ** E'Condition2 + +-- | Enum of 'Text' +data E'Condition2 + = E'Condition2'Not_running -- ^ @"not-running"@ + | E'Condition2'Next_exit -- ^ @"next-exit"@ + | E'Condition2'Removed -- ^ @"removed"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Condition2 where toJSON = A.toJSON . fromE'Condition2 +instance A.FromJSON E'Condition2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Condition2 =<< A.parseJSON o +instance WH.ToHttpApiData E'Condition2 where toQueryParam = WH.toQueryParam . fromE'Condition2 +instance WH.FromHttpApiData E'Condition2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Condition2 +instance MimeRender MimeMultipartFormData E'Condition2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Condition2' enum +fromE'Condition2 :: E'Condition2 -> Text +fromE'Condition2 = \case + E'Condition2'Not_running -> "not-running" + E'Condition2'Next_exit -> "next-exit" + E'Condition2'Removed -> "removed" + +-- | parse 'E'Condition2' enum +toE'Condition2 :: Text -> P.Either String E'Condition2 +toE'Condition2 = \case + "not-running" -> P.Right E'Condition2'Not_running + "next-exit" -> P.Right E'Condition2'Next_exit + "removed" -> P.Right E'Condition2'Removed + s -> P.Left $ "toE'Condition2: enum parse failure: " P.++ P.show s + + +-- ** E'ContentType + +-- | Enum of 'Text' +data E'ContentType + = E'ContentType'Application_x_tar -- ^ @"application/x-tar"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'ContentType where toJSON = A.toJSON . fromE'ContentType +instance A.FromJSON E'ContentType where parseJSON o = P.either P.fail (pure . P.id) . toE'ContentType =<< A.parseJSON o +instance WH.ToHttpApiData E'ContentType where toQueryParam = WH.toQueryParam . fromE'ContentType +instance WH.FromHttpApiData E'ContentType where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'ContentType +instance MimeRender MimeMultipartFormData E'ContentType where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'ContentType' enum +fromE'ContentType :: E'ContentType -> Text +fromE'ContentType = \case + E'ContentType'Application_x_tar -> "application/x-tar" + +-- | parse 'E'ContentType' enum +toE'ContentType :: Text -> P.Either String E'ContentType +toE'ContentType = \case + "application/x-tar" -> P.Right E'ContentType'Application_x_tar + s -> P.Left $ "toE'ContentType: enum parse failure: " P.++ P.show s + + +-- ** E'FailureAction + +-- | Enum of 'Text' . +-- Action to take if an updated task fails to run, or stops running during the update. +data E'FailureAction + = E'FailureAction'Continue -- ^ @"continue"@ + | E'FailureAction'Pause -- ^ @"pause"@ + | E'FailureAction'Rollback -- ^ @"rollback"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'FailureAction where toJSON = A.toJSON . fromE'FailureAction +instance A.FromJSON E'FailureAction where parseJSON o = P.either P.fail (pure . P.id) . toE'FailureAction =<< A.parseJSON o +instance WH.ToHttpApiData E'FailureAction where toQueryParam = WH.toQueryParam . fromE'FailureAction +instance WH.FromHttpApiData E'FailureAction where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'FailureAction +instance MimeRender MimeMultipartFormData E'FailureAction where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'FailureAction' enum +fromE'FailureAction :: E'FailureAction -> Text +fromE'FailureAction = \case + E'FailureAction'Continue -> "continue" + E'FailureAction'Pause -> "pause" + E'FailureAction'Rollback -> "rollback" + +-- | parse 'E'FailureAction' enum +toE'FailureAction :: Text -> P.Either String E'FailureAction +toE'FailureAction = \case + "continue" -> P.Right E'FailureAction'Continue + "pause" -> P.Right E'FailureAction'Pause + "rollback" -> P.Right E'FailureAction'Rollback + s -> P.Left $ "toE'FailureAction: enum parse failure: " P.++ P.show s + + +-- ** E'FailureAction2 + +-- | Enum of 'Text' . +-- Action to take if an rolled back task fails to run, or stops running during the rollback. +data E'FailureAction2 + = E'FailureAction2'Continue -- ^ @"continue"@ + | E'FailureAction2'Pause -- ^ @"pause"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'FailureAction2 where toJSON = A.toJSON . fromE'FailureAction2 +instance A.FromJSON E'FailureAction2 where parseJSON o = P.either P.fail (pure . P.id) . toE'FailureAction2 =<< A.parseJSON o +instance WH.ToHttpApiData E'FailureAction2 where toQueryParam = WH.toQueryParam . fromE'FailureAction2 +instance WH.FromHttpApiData E'FailureAction2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'FailureAction2 +instance MimeRender MimeMultipartFormData E'FailureAction2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'FailureAction2' enum +fromE'FailureAction2 :: E'FailureAction2 -> Text +fromE'FailureAction2 = \case + E'FailureAction2'Continue -> "continue" + E'FailureAction2'Pause -> "pause" + +-- | parse 'E'FailureAction2' enum +toE'FailureAction2 :: Text -> P.Either String E'FailureAction2 +toE'FailureAction2 = \case + "continue" -> P.Right E'FailureAction2'Continue + "pause" -> P.Right E'FailureAction2'Pause + s -> P.Left $ "toE'FailureAction2: enum parse failure: " P.++ P.show s + + +-- ** E'Isolation + +-- | Enum of 'Text' . +-- Isolation technology of the container. (Windows only) +data E'Isolation + = E'Isolation'Default -- ^ @"default"@ + | E'Isolation'Process -- ^ @"process"@ + | E'Isolation'Hyperv -- ^ @"hyperv"@ + | E'Isolation'Empty -- ^ @""@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Isolation where toJSON = A.toJSON . fromE'Isolation +instance A.FromJSON E'Isolation where parseJSON o = P.either P.fail (pure . P.id) . toE'Isolation =<< A.parseJSON o +instance WH.ToHttpApiData E'Isolation where toQueryParam = WH.toQueryParam . fromE'Isolation +instance WH.FromHttpApiData E'Isolation where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Isolation +instance MimeRender MimeMultipartFormData E'Isolation where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Isolation' enum +fromE'Isolation :: E'Isolation -> Text +fromE'Isolation = \case + E'Isolation'Default -> "default" + E'Isolation'Process -> "process" + E'Isolation'Hyperv -> "hyperv" + E'Isolation'Empty -> "" + +-- | parse 'E'Isolation' enum +toE'Isolation :: Text -> P.Either String E'Isolation +toE'Isolation = \case + "default" -> P.Right E'Isolation'Default + "process" -> P.Right E'Isolation'Process + "hyperv" -> P.Right E'Isolation'Hyperv + "" -> P.Right E'Isolation'Empty + s -> P.Left $ "toE'Isolation: enum parse failure: " P.++ P.show s + + +-- ** E'Isolation2 + +-- | Enum of 'Text' . +-- Represents the isolation technology to use as a default for containers. The supported values are platform-specific. If no isolation value is specified on daemon start, on Windows client, the default is `hyperv`, and on Windows server, the default is `process`. This option is currently not used on other platforms. +data E'Isolation2 + = E'Isolation2'Default -- ^ @"default"@ + | E'Isolation2'Hyperv -- ^ @"hyperv"@ + | E'Isolation2'Process -- ^ @"process"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Isolation2 where toJSON = A.toJSON . fromE'Isolation2 +instance A.FromJSON E'Isolation2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Isolation2 =<< A.parseJSON o +instance WH.ToHttpApiData E'Isolation2 where toQueryParam = WH.toQueryParam . fromE'Isolation2 +instance WH.FromHttpApiData E'Isolation2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Isolation2 +instance MimeRender MimeMultipartFormData E'Isolation2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Isolation2' enum +fromE'Isolation2 :: E'Isolation2 -> Text +fromE'Isolation2 = \case + E'Isolation2'Default -> "default" + E'Isolation2'Hyperv -> "hyperv" + E'Isolation2'Process -> "process" + +-- | parse 'E'Isolation2' enum +toE'Isolation2 :: Text -> P.Either String E'Isolation2 +toE'Isolation2 = \case + "default" -> P.Right E'Isolation2'Default + "hyperv" -> P.Right E'Isolation2'Hyperv + "process" -> P.Right E'Isolation2'Process + s -> P.Left $ "toE'Isolation2: enum parse failure: " P.++ P.show s + + +-- ** E'Isolation3 + +-- | Enum of 'Text' . +-- Isolation technology of the containers running the service. (Windows only) +data E'Isolation3 + = E'Isolation3'Default -- ^ @"default"@ + | E'Isolation3'Process -- ^ @"process"@ + | E'Isolation3'Hyperv -- ^ @"hyperv"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Isolation3 where toJSON = A.toJSON . fromE'Isolation3 +instance A.FromJSON E'Isolation3 where parseJSON o = P.either P.fail (pure . P.id) . toE'Isolation3 =<< A.parseJSON o +instance WH.ToHttpApiData E'Isolation3 where toQueryParam = WH.toQueryParam . fromE'Isolation3 +instance WH.FromHttpApiData E'Isolation3 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Isolation3 +instance MimeRender MimeMultipartFormData E'Isolation3 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Isolation3' enum +fromE'Isolation3 :: E'Isolation3 -> Text +fromE'Isolation3 = \case + E'Isolation3'Default -> "default" + E'Isolation3'Process -> "process" + E'Isolation3'Hyperv -> "hyperv" + +-- | parse 'E'Isolation3' enum +toE'Isolation3 :: Text -> P.Either String E'Isolation3 +toE'Isolation3 = \case + "default" -> P.Right E'Isolation3'Default + "process" -> P.Right E'Isolation3'Process + "hyperv" -> P.Right E'Isolation3'Hyperv + s -> P.Left $ "toE'Isolation3: enum parse failure: " P.++ P.show s + + +-- ** E'Mode + +-- | Enum of 'Text' . +-- The mode of resolution to use for internal load balancing between tasks. +data E'Mode + = E'Mode'Vip -- ^ @"vip"@ + | E'Mode'Dnsrr -- ^ @"dnsrr"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Mode where toJSON = A.toJSON . fromE'Mode +instance A.FromJSON E'Mode where parseJSON o = P.either P.fail (pure . P.id) . toE'Mode =<< A.parseJSON o +instance WH.ToHttpApiData E'Mode where toQueryParam = WH.toQueryParam . fromE'Mode +instance WH.FromHttpApiData E'Mode where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Mode +instance MimeRender MimeMultipartFormData E'Mode where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Mode' enum +fromE'Mode :: E'Mode -> Text +fromE'Mode = \case + E'Mode'Vip -> "vip" + E'Mode'Dnsrr -> "dnsrr" + +-- | parse 'E'Mode' enum +toE'Mode :: Text -> P.Either String E'Mode +toE'Mode = \case + "vip" -> P.Right E'Mode'Vip + "dnsrr" -> P.Right E'Mode'Dnsrr + s -> P.Left $ "toE'Mode: enum parse failure: " P.++ P.show s + + +-- ** E'Mode2 + +-- | Enum of 'Text' +data E'Mode2 + = E'Mode2'Default -- ^ @"default"@ + | E'Mode2'Unconfined -- ^ @"unconfined"@ + | E'Mode2'Custom -- ^ @"custom"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Mode2 where toJSON = A.toJSON . fromE'Mode2 +instance A.FromJSON E'Mode2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Mode2 =<< A.parseJSON o +instance WH.ToHttpApiData E'Mode2 where toQueryParam = WH.toQueryParam . fromE'Mode2 +instance WH.FromHttpApiData E'Mode2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Mode2 +instance MimeRender MimeMultipartFormData E'Mode2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Mode2' enum +fromE'Mode2 :: E'Mode2 -> Text +fromE'Mode2 = \case + E'Mode2'Default -> "default" + E'Mode2'Unconfined -> "unconfined" + E'Mode2'Custom -> "custom" + +-- | parse 'E'Mode2' enum +toE'Mode2 :: Text -> P.Either String E'Mode2 +toE'Mode2 = \case + "default" -> P.Right E'Mode2'Default + "unconfined" -> P.Right E'Mode2'Unconfined + "custom" -> P.Right E'Mode2'Custom + s -> P.Left $ "toE'Mode2: enum parse failure: " P.++ P.show s + + +-- ** E'Mode3 + +-- | Enum of 'Text' +data E'Mode3 + = E'Mode3'Default -- ^ @"default"@ + | E'Mode3'Disabled -- ^ @"disabled"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Mode3 where toJSON = A.toJSON . fromE'Mode3 +instance A.FromJSON E'Mode3 where parseJSON o = P.either P.fail (pure . P.id) . toE'Mode3 =<< A.parseJSON o +instance WH.ToHttpApiData E'Mode3 where toQueryParam = WH.toQueryParam . fromE'Mode3 +instance WH.FromHttpApiData E'Mode3 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Mode3 +instance MimeRender MimeMultipartFormData E'Mode3 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Mode3' enum +fromE'Mode3 :: E'Mode3 -> Text +fromE'Mode3 = \case + E'Mode3'Default -> "default" + E'Mode3'Disabled -> "disabled" + +-- | parse 'E'Mode3' enum +toE'Mode3 :: Text -> P.Either String E'Mode3 +toE'Mode3 = \case + "default" -> P.Right E'Mode3'Default + "disabled" -> P.Right E'Mode3'Disabled + s -> P.Left $ "toE'Mode3: enum parse failure: " P.++ P.show s + + +-- ** E'Name + +-- | Enum of 'Text' . +-- - Empty string means not to restart - `no` Do not automatically restart - `always` Always restart - `unless-stopped` Restart always except when the user has manually stopped the container - `on-failure` Restart only when the container exit code is non-zero +data E'Name + = E'Name'Empty -- ^ @""@ + | E'Name'No -- ^ @"no"@ + | E'Name'Always -- ^ @"always"@ + | E'Name'Unless_stopped -- ^ @"unless-stopped"@ + | E'Name'On_failure -- ^ @"on-failure"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Name where toJSON = A.toJSON . fromE'Name +instance A.FromJSON E'Name where parseJSON o = P.either P.fail (pure . P.id) . toE'Name =<< A.parseJSON o +instance WH.ToHttpApiData E'Name where toQueryParam = WH.toQueryParam . fromE'Name +instance WH.FromHttpApiData E'Name where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Name +instance MimeRender MimeMultipartFormData E'Name where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Name' enum +fromE'Name :: E'Name -> Text +fromE'Name = \case + E'Name'Empty -> "" + E'Name'No -> "no" + E'Name'Always -> "always" + E'Name'Unless_stopped -> "unless-stopped" + E'Name'On_failure -> "on-failure" + +-- | parse 'E'Name' enum +toE'Name :: Text -> P.Either String E'Name +toE'Name = \case + "" -> P.Right E'Name'Empty + "no" -> P.Right E'Name'No + "always" -> P.Right E'Name'Always + "unless-stopped" -> P.Right E'Name'Unless_stopped + "on-failure" -> P.Right E'Name'On_failure + s -> P.Left $ "toE'Name: enum parse failure: " P.++ P.show s + + +-- ** E'Order + +-- | Enum of 'Text' . +-- The order of operations when rolling out an updated task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down. +data E'Order + = E'Order'Stop_first -- ^ @"stop-first"@ + | E'Order'Start_first -- ^ @"start-first"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Order where toJSON = A.toJSON . fromE'Order +instance A.FromJSON E'Order where parseJSON o = P.either P.fail (pure . P.id) . toE'Order =<< A.parseJSON o +instance WH.ToHttpApiData E'Order where toQueryParam = WH.toQueryParam . fromE'Order +instance WH.FromHttpApiData E'Order where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Order +instance MimeRender MimeMultipartFormData E'Order where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Order' enum +fromE'Order :: E'Order -> Text +fromE'Order = \case + E'Order'Stop_first -> "stop-first" + E'Order'Start_first -> "start-first" + +-- | parse 'E'Order' enum +toE'Order :: Text -> P.Either String E'Order +toE'Order = \case + "stop-first" -> P.Right E'Order'Stop_first + "start-first" -> P.Right E'Order'Start_first + s -> P.Left $ "toE'Order: enum parse failure: " P.++ P.show s + + +-- ** E'Propagation + +-- | Enum of 'Text' . +-- A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. +data E'Propagation + = E'Propagation'Private -- ^ @"private"@ + | E'Propagation'Rprivate -- ^ @"rprivate"@ + | E'Propagation'Shared -- ^ @"shared"@ + | E'Propagation'Rshared -- ^ @"rshared"@ + | E'Propagation'Slave -- ^ @"slave"@ + | E'Propagation'Rslave -- ^ @"rslave"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Propagation where toJSON = A.toJSON . fromE'Propagation +instance A.FromJSON E'Propagation where parseJSON o = P.either P.fail (pure . P.id) . toE'Propagation =<< A.parseJSON o +instance WH.ToHttpApiData E'Propagation where toQueryParam = WH.toQueryParam . fromE'Propagation +instance WH.FromHttpApiData E'Propagation where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Propagation +instance MimeRender MimeMultipartFormData E'Propagation where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Propagation' enum +fromE'Propagation :: E'Propagation -> Text +fromE'Propagation = \case + E'Propagation'Private -> "private" + E'Propagation'Rprivate -> "rprivate" + E'Propagation'Shared -> "shared" + E'Propagation'Rshared -> "rshared" + E'Propagation'Slave -> "slave" + E'Propagation'Rslave -> "rslave" + +-- | parse 'E'Propagation' enum +toE'Propagation :: Text -> P.Either String E'Propagation +toE'Propagation = \case + "private" -> P.Right E'Propagation'Private + "rprivate" -> P.Right E'Propagation'Rprivate + "shared" -> P.Right E'Propagation'Shared + "rshared" -> P.Right E'Propagation'Rshared + "slave" -> P.Right E'Propagation'Slave + "rslave" -> P.Right E'Propagation'Rslave + s -> P.Left $ "toE'Propagation: enum parse failure: " P.++ P.show s + + +-- ** E'Protocol + +-- | Enum of 'Text' . +-- Protocol for communication with the external CA (currently only `cfssl` is supported). +data E'Protocol + = E'Protocol'Cfssl -- ^ @"cfssl"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Protocol where toJSON = A.toJSON . fromE'Protocol +instance A.FromJSON E'Protocol where parseJSON o = P.either P.fail (pure . P.id) . toE'Protocol =<< A.parseJSON o +instance WH.ToHttpApiData E'Protocol where toQueryParam = WH.toQueryParam . fromE'Protocol +instance WH.FromHttpApiData E'Protocol where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Protocol +instance MimeRender MimeMultipartFormData E'Protocol where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Protocol' enum +fromE'Protocol :: E'Protocol -> Text +fromE'Protocol = \case + E'Protocol'Cfssl -> "cfssl" + +-- | parse 'E'Protocol' enum +toE'Protocol :: Text -> P.Either String E'Protocol +toE'Protocol = \case + "cfssl" -> P.Right E'Protocol'Cfssl + s -> P.Left $ "toE'Protocol: enum parse failure: " P.++ P.show s + + +-- ** E'ProtocolScheme + +-- | Enum of 'Text' . +-- Protocol to use for clients connecting to the plugin. +data E'ProtocolScheme + = E'ProtocolScheme'Empty -- ^ @""@ + | E'ProtocolScheme'Moby_plugins_http_v1 -- ^ @"moby.plugins.http/v1"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'ProtocolScheme where toJSON = A.toJSON . fromE'ProtocolScheme +instance A.FromJSON E'ProtocolScheme where parseJSON o = P.either P.fail (pure . P.id) . toE'ProtocolScheme =<< A.parseJSON o +instance WH.ToHttpApiData E'ProtocolScheme where toQueryParam = WH.toQueryParam . fromE'ProtocolScheme +instance WH.FromHttpApiData E'ProtocolScheme where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'ProtocolScheme +instance MimeRender MimeMultipartFormData E'ProtocolScheme where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'ProtocolScheme' enum +fromE'ProtocolScheme :: E'ProtocolScheme -> Text +fromE'ProtocolScheme = \case + E'ProtocolScheme'Empty -> "" + E'ProtocolScheme'Moby_plugins_http_v1 -> "moby.plugins.http/v1" + +-- | parse 'E'ProtocolScheme' enum +toE'ProtocolScheme :: Text -> P.Either String E'ProtocolScheme +toE'ProtocolScheme = \case + "" -> P.Right E'ProtocolScheme'Empty + "moby.plugins.http/v1" -> P.Right E'ProtocolScheme'Moby_plugins_http_v1 + s -> P.Left $ "toE'ProtocolScheme: enum parse failure: " P.++ P.show s + + +-- ** E'PublishMode + +-- | Enum of 'Text' . +-- The mode in which port is published.


- \"ingress\" makes the target port accessible on every node, regardless of whether there is a task for the service running on that node or not. - \"host\" bypasses the routing mesh and publish the port directly on the swarm node where that service is running. +data E'PublishMode + = E'PublishMode'Ingress -- ^ @"ingress"@ + | E'PublishMode'Host -- ^ @"host"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'PublishMode where toJSON = A.toJSON . fromE'PublishMode +instance A.FromJSON E'PublishMode where parseJSON o = P.either P.fail (pure . P.id) . toE'PublishMode =<< A.parseJSON o +instance WH.ToHttpApiData E'PublishMode where toQueryParam = WH.toQueryParam . fromE'PublishMode +instance WH.FromHttpApiData E'PublishMode where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'PublishMode +instance MimeRender MimeMultipartFormData E'PublishMode where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'PublishMode' enum +fromE'PublishMode :: E'PublishMode -> Text +fromE'PublishMode = \case + E'PublishMode'Ingress -> "ingress" + E'PublishMode'Host -> "host" + +-- | parse 'E'PublishMode' enum +toE'PublishMode :: Text -> P.Either String E'PublishMode +toE'PublishMode = \case + "ingress" -> P.Right E'PublishMode'Ingress + "host" -> P.Right E'PublishMode'Host + s -> P.Left $ "toE'PublishMode: enum parse failure: " P.++ P.show s + + +-- ** E'RegistryAuthFrom + +-- | Enum of 'Text' +data E'RegistryAuthFrom + = E'RegistryAuthFrom'Spec -- ^ @"spec"@ + | E'RegistryAuthFrom'Previous_spec -- ^ @"previous-spec"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'RegistryAuthFrom where toJSON = A.toJSON . fromE'RegistryAuthFrom +instance A.FromJSON E'RegistryAuthFrom where parseJSON o = P.either P.fail (pure . P.id) . toE'RegistryAuthFrom =<< A.parseJSON o +instance WH.ToHttpApiData E'RegistryAuthFrom where toQueryParam = WH.toQueryParam . fromE'RegistryAuthFrom +instance WH.FromHttpApiData E'RegistryAuthFrom where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'RegistryAuthFrom +instance MimeRender MimeMultipartFormData E'RegistryAuthFrom where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'RegistryAuthFrom' enum +fromE'RegistryAuthFrom :: E'RegistryAuthFrom -> Text +fromE'RegistryAuthFrom = \case + E'RegistryAuthFrom'Spec -> "spec" + E'RegistryAuthFrom'Previous_spec -> "previous-spec" + +-- | parse 'E'RegistryAuthFrom' enum +toE'RegistryAuthFrom :: Text -> P.Either String E'RegistryAuthFrom +toE'RegistryAuthFrom = \case + "spec" -> P.Right E'RegistryAuthFrom'Spec + "previous-spec" -> P.Right E'RegistryAuthFrom'Previous_spec + s -> P.Left $ "toE'RegistryAuthFrom: enum parse failure: " P.++ P.show s + + +-- ** E'Role + +-- | Enum of 'Text' . +-- Role of the node. +data E'Role + = E'Role'Worker -- ^ @"worker"@ + | E'Role'Manager -- ^ @"manager"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Role where toJSON = A.toJSON . fromE'Role +instance A.FromJSON E'Role where parseJSON o = P.either P.fail (pure . P.id) . toE'Role =<< A.parseJSON o +instance WH.ToHttpApiData E'Role where toQueryParam = WH.toQueryParam . fromE'Role +instance WH.FromHttpApiData E'Role where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Role +instance MimeRender MimeMultipartFormData E'Role where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Role' enum +fromE'Role :: E'Role -> Text +fromE'Role = \case + E'Role'Worker -> "worker" + E'Role'Manager -> "manager" + +-- | parse 'E'Role' enum +toE'Role :: Text -> P.Either String E'Role +toE'Role = \case + "worker" -> P.Right E'Role'Worker + "manager" -> P.Right E'Role'Manager + s -> P.Left $ "toE'Role: enum parse failure: " P.++ P.show s + + +-- ** E'Scope + +-- | Enum of 'Text' . +-- The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. +data E'Scope + = E'Scope'Local -- ^ @"local"@ + | E'Scope'Global -- ^ @"global"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Scope where toJSON = A.toJSON . fromE'Scope +instance A.FromJSON E'Scope where parseJSON o = P.either P.fail (pure . P.id) . toE'Scope =<< A.parseJSON o +instance WH.ToHttpApiData E'Scope where toQueryParam = WH.toQueryParam . fromE'Scope +instance WH.FromHttpApiData E'Scope where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Scope +instance MimeRender MimeMultipartFormData E'Scope where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Scope' enum +fromE'Scope :: E'Scope -> Text +fromE'Scope = \case + E'Scope'Local -> "local" + E'Scope'Global -> "global" + +-- | parse 'E'Scope' enum +toE'Scope :: Text -> P.Either String E'Scope +toE'Scope = \case + "local" -> P.Right E'Scope'Local + "global" -> P.Right E'Scope'Global + s -> P.Left $ "toE'Scope: enum parse failure: " P.++ P.show s + + +-- ** E'Scope2 + +-- | Enum of 'Text' . +-- Scope of the event. Engine events are `local` scope. Cluster (Swarm) events are `swarm` scope. +data E'Scope2 + = E'Scope2'Local -- ^ @"local"@ + | E'Scope2'Swarm -- ^ @"swarm"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Scope2 where toJSON = A.toJSON . fromE'Scope2 +instance A.FromJSON E'Scope2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Scope2 =<< A.parseJSON o +instance WH.ToHttpApiData E'Scope2 where toQueryParam = WH.toQueryParam . fromE'Scope2 +instance WH.FromHttpApiData E'Scope2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Scope2 +instance MimeRender MimeMultipartFormData E'Scope2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Scope2' enum +fromE'Scope2 :: E'Scope2 -> Text +fromE'Scope2 = \case + E'Scope2'Local -> "local" + E'Scope2'Swarm -> "swarm" + +-- | parse 'E'Scope2' enum +toE'Scope2 :: Text -> P.Either String E'Scope2 +toE'Scope2 = \case + "local" -> P.Right E'Scope2'Local + "swarm" -> P.Right E'Scope2'Swarm + s -> P.Left $ "toE'Scope2: enum parse failure: " P.++ P.show s + + +-- ** E'Scope3 + +-- | Enum of 'Text' . +-- The set of nodes this volume can be used on at one time. - `single` The volume may only be scheduled to one node at a time. - `multi` the volume may be scheduled to any supported number of nodes at a time. +data E'Scope3 + = E'Scope3'Single -- ^ @"single"@ + | E'Scope3'Multi -- ^ @"multi"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Scope3 where toJSON = A.toJSON . fromE'Scope3 +instance A.FromJSON E'Scope3 where parseJSON o = P.either P.fail (pure . P.id) . toE'Scope3 =<< A.parseJSON o +instance WH.ToHttpApiData E'Scope3 where toQueryParam = WH.toQueryParam . fromE'Scope3 +instance WH.FromHttpApiData E'Scope3 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Scope3 +instance MimeRender MimeMultipartFormData E'Scope3 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Scope3' enum +fromE'Scope3 :: E'Scope3 -> Text +fromE'Scope3 = \case + E'Scope3'Single -> "single" + E'Scope3'Multi -> "multi" + +-- | parse 'E'Scope3' enum +toE'Scope3 :: Text -> P.Either String E'Scope3 +toE'Scope3 = \case + "single" -> P.Right E'Scope3'Single + "multi" -> P.Right E'Scope3'Multi + s -> P.Left $ "toE'Scope3: enum parse failure: " P.++ P.show s + + +-- ** E'Sharing + +-- | Enum of 'Text' . +-- The number and way that different tasks can use this volume at one time. - `none` The volume may only be used by one task at a time. - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. - `all` The volume may have any number of readers and writers. +data E'Sharing + = E'Sharing'None -- ^ @"none"@ + | E'Sharing'Readonly -- ^ @"readonly"@ + | E'Sharing'Onewriter -- ^ @"onewriter"@ + | E'Sharing'All -- ^ @"all"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Sharing where toJSON = A.toJSON . fromE'Sharing +instance A.FromJSON E'Sharing where parseJSON o = P.either P.fail (pure . P.id) . toE'Sharing =<< A.parseJSON o +instance WH.ToHttpApiData E'Sharing where toQueryParam = WH.toQueryParam . fromE'Sharing +instance WH.FromHttpApiData E'Sharing where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Sharing +instance MimeRender MimeMultipartFormData E'Sharing where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Sharing' enum +fromE'Sharing :: E'Sharing -> Text +fromE'Sharing = \case + E'Sharing'None -> "none" + E'Sharing'Readonly -> "readonly" + E'Sharing'Onewriter -> "onewriter" + E'Sharing'All -> "all" + +-- | parse 'E'Sharing' enum +toE'Sharing :: Text -> P.Either String E'Sharing +toE'Sharing = \case + "none" -> P.Right E'Sharing'None + "readonly" -> P.Right E'Sharing'Readonly + "onewriter" -> P.Right E'Sharing'Onewriter + "all" -> P.Right E'Sharing'All + s -> P.Left $ "toE'Sharing: enum parse failure: " P.++ P.show s + + +-- ** E'State + +-- | Enum of 'Text' +data E'State + = E'State'Updating -- ^ @"updating"@ + | E'State'Paused -- ^ @"paused"@ + | E'State'Completed -- ^ @"completed"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'State where toJSON = A.toJSON . fromE'State +instance A.FromJSON E'State where parseJSON o = P.either P.fail (pure . P.id) . toE'State =<< A.parseJSON o +instance WH.ToHttpApiData E'State where toQueryParam = WH.toQueryParam . fromE'State +instance WH.FromHttpApiData E'State where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'State +instance MimeRender MimeMultipartFormData E'State where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'State' enum +fromE'State :: E'State -> Text +fromE'State = \case + E'State'Updating -> "updating" + E'State'Paused -> "paused" + E'State'Completed -> "completed" + +-- | parse 'E'State' enum +toE'State :: Text -> P.Either String E'State +toE'State = \case + "updating" -> P.Right E'State'Updating + "paused" -> P.Right E'State'Paused + "completed" -> P.Right E'State'Completed + s -> P.Left $ "toE'State: enum parse failure: " P.++ P.show s + + +-- ** E'State2 + +-- | Enum of 'Text' . +-- The published state of the volume. * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. * `published` The volume is published successfully to the node. * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. +data E'State2 + = E'State2'Pending_publish -- ^ @"pending-publish"@ + | E'State2'Published -- ^ @"published"@ + | E'State2'Pending_node_unpublish -- ^ @"pending-node-unpublish"@ + | E'State2'Pending_controller_unpublish -- ^ @"pending-controller-unpublish"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'State2 where toJSON = A.toJSON . fromE'State2 +instance A.FromJSON E'State2 where parseJSON o = P.either P.fail (pure . P.id) . toE'State2 =<< A.parseJSON o +instance WH.ToHttpApiData E'State2 where toQueryParam = WH.toQueryParam . fromE'State2 +instance WH.FromHttpApiData E'State2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'State2 +instance MimeRender MimeMultipartFormData E'State2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'State2' enum +fromE'State2 :: E'State2 -> Text +fromE'State2 = \case + E'State2'Pending_publish -> "pending-publish" + E'State2'Published -> "published" + E'State2'Pending_node_unpublish -> "pending-node-unpublish" + E'State2'Pending_controller_unpublish -> "pending-controller-unpublish" + +-- | parse 'E'State2' enum +toE'State2 :: Text -> P.Either String E'State2 +toE'State2 = \case + "pending-publish" -> P.Right E'State2'Pending_publish + "published" -> P.Right E'State2'Published + "pending-node-unpublish" -> P.Right E'State2'Pending_node_unpublish + "pending-controller-unpublish" -> P.Right E'State2'Pending_controller_unpublish + s -> P.Left $ "toE'State2: enum parse failure: " P.++ P.show s + + +-- ** E'Status + +-- | Enum of 'Text' . +-- Status is one of `none`, `starting`, `healthy` or `unhealthy` - \"none\" Indicates there is no healthcheck - \"starting\" Starting indicates that the container is not yet ready - \"healthy\" Healthy indicates that the container is running correctly - \"unhealthy\" Unhealthy indicates that the container has a problem +data E'Status + = E'Status'None -- ^ @"none"@ + | E'Status'Starting -- ^ @"starting"@ + | E'Status'Healthy -- ^ @"healthy"@ + | E'Status'Unhealthy -- ^ @"unhealthy"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Status where toJSON = A.toJSON . fromE'Status +instance A.FromJSON E'Status where parseJSON o = P.either P.fail (pure . P.id) . toE'Status =<< A.parseJSON o +instance WH.ToHttpApiData E'Status where toQueryParam = WH.toQueryParam . fromE'Status +instance WH.FromHttpApiData E'Status where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Status +instance MimeRender MimeMultipartFormData E'Status where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Status' enum +fromE'Status :: E'Status -> Text +fromE'Status = \case + E'Status'None -> "none" + E'Status'Starting -> "starting" + E'Status'Healthy -> "healthy" + E'Status'Unhealthy -> "unhealthy" + +-- | parse 'E'Status' enum +toE'Status :: Text -> P.Either String E'Status +toE'Status = \case + "none" -> P.Right E'Status'None + "starting" -> P.Right E'Status'Starting + "healthy" -> P.Right E'Status'Healthy + "unhealthy" -> P.Right E'Status'Unhealthy + s -> P.Left $ "toE'Status: enum parse failure: " P.++ P.show s + + +-- ** E'Status2 + +-- | Enum of 'Text' . +-- String representation of the container state. Can be one of \"created\", \"running\", \"paused\", \"restarting\", \"removing\", \"exited\", or \"dead\". +data E'Status2 + = E'Status2'Created -- ^ @"created"@ + | E'Status2'Running -- ^ @"running"@ + | E'Status2'Paused -- ^ @"paused"@ + | E'Status2'Restarting -- ^ @"restarting"@ + | E'Status2'Removing -- ^ @"removing"@ + | E'Status2'Exited -- ^ @"exited"@ + | E'Status2'Dead -- ^ @"dead"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Status2 where toJSON = A.toJSON . fromE'Status2 +instance A.FromJSON E'Status2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Status2 =<< A.parseJSON o +instance WH.ToHttpApiData E'Status2 where toQueryParam = WH.toQueryParam . fromE'Status2 +instance WH.FromHttpApiData E'Status2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Status2 +instance MimeRender MimeMultipartFormData E'Status2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Status2' enum +fromE'Status2 :: E'Status2 -> Text +fromE'Status2 = \case + E'Status2'Created -> "created" + E'Status2'Running -> "running" + E'Status2'Paused -> "paused" + E'Status2'Restarting -> "restarting" + E'Status2'Removing -> "removing" + E'Status2'Exited -> "exited" + E'Status2'Dead -> "dead" + +-- | parse 'E'Status2' enum +toE'Status2 :: Text -> P.Either String E'Status2 +toE'Status2 = \case + "created" -> P.Right E'Status2'Created + "running" -> P.Right E'Status2'Running + "paused" -> P.Right E'Status2'Paused + "restarting" -> P.Right E'Status2'Restarting + "removing" -> P.Right E'Status2'Removing + "exited" -> P.Right E'Status2'Exited + "dead" -> P.Right E'Status2'Dead + s -> P.Left $ "toE'Status2: enum parse failure: " P.++ P.show s + + +-- ** E'Swarm + +-- | Enum of 'Text' +data E'Swarm + = E'Swarm'Inactive -- ^ @"inactive"@ + | E'Swarm'Pending -- ^ @"pending"@ + | E'Swarm'Error -- ^ @"error"@ + | E'Swarm'Locked -- ^ @"locked"@ + | E'Swarm'Active_worker -- ^ @"active/worker"@ + | E'Swarm'Active_manager -- ^ @"active/manager"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Swarm where toJSON = A.toJSON . fromE'Swarm +instance A.FromJSON E'Swarm where parseJSON o = P.either P.fail (pure . P.id) . toE'Swarm =<< A.parseJSON o +instance WH.ToHttpApiData E'Swarm where toQueryParam = WH.toQueryParam . fromE'Swarm +instance WH.FromHttpApiData E'Swarm where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Swarm +instance MimeRender MimeMultipartFormData E'Swarm where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Swarm' enum +fromE'Swarm :: E'Swarm -> Text +fromE'Swarm = \case + E'Swarm'Inactive -> "inactive" + E'Swarm'Pending -> "pending" + E'Swarm'Error -> "error" + E'Swarm'Locked -> "locked" + E'Swarm'Active_worker -> "active/worker" + E'Swarm'Active_manager -> "active/manager" + +-- | parse 'E'Swarm' enum +toE'Swarm :: Text -> P.Either String E'Swarm +toE'Swarm = \case + "inactive" -> P.Right E'Swarm'Inactive + "pending" -> P.Right E'Swarm'Pending + "error" -> P.Right E'Swarm'Error + "locked" -> P.Right E'Swarm'Locked + "active/worker" -> P.Right E'Swarm'Active_worker + "active/manager" -> P.Right E'Swarm'Active_manager + s -> P.Left $ "toE'Swarm: enum parse failure: " P.++ P.show s + + +-- ** E'Type + +-- | Enum of 'Text' +data E'Type + = E'Type'Tcp -- ^ @"tcp"@ + | E'Type'Udp -- ^ @"udp"@ + | E'Type'Sctp -- ^ @"sctp"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Type where toJSON = A.toJSON . fromE'Type +instance A.FromJSON E'Type where parseJSON o = P.either P.fail (pure . P.id) . toE'Type =<< A.parseJSON o +instance WH.ToHttpApiData E'Type where toQueryParam = WH.toQueryParam . fromE'Type +instance WH.FromHttpApiData E'Type where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Type +instance MimeRender MimeMultipartFormData E'Type where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Type' enum +fromE'Type :: E'Type -> Text +fromE'Type = \case + E'Type'Tcp -> "tcp" + E'Type'Udp -> "udp" + E'Type'Sctp -> "sctp" + +-- | parse 'E'Type' enum +toE'Type :: Text -> P.Either String E'Type +toE'Type = \case + "tcp" -> P.Right E'Type'Tcp + "udp" -> P.Right E'Type'Udp + "sctp" -> P.Right E'Type'Sctp + s -> P.Left $ "toE'Type: enum parse failure: " P.++ P.show s + + +-- ** E'Type2 + +-- | Enum of 'Text' . +-- The mount type: - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `tmpfs` a `tmpfs`. - `npipe` a named pipe from the host into the container. - `cluster` a Swarm cluster volume +data E'Type2 + = E'Type2'Bind -- ^ @"bind"@ + | E'Type2'Volume -- ^ @"volume"@ + | E'Type2'Tmpfs -- ^ @"tmpfs"@ + | E'Type2'Npipe -- ^ @"npipe"@ + | E'Type2'Cluster -- ^ @"cluster"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Type2 where toJSON = A.toJSON . fromE'Type2 +instance A.FromJSON E'Type2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Type2 =<< A.parseJSON o +instance WH.ToHttpApiData E'Type2 where toQueryParam = WH.toQueryParam . fromE'Type2 +instance WH.FromHttpApiData E'Type2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Type2 +instance MimeRender MimeMultipartFormData E'Type2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Type2' enum +fromE'Type2 :: E'Type2 -> Text +fromE'Type2 = \case + E'Type2'Bind -> "bind" + E'Type2'Volume -> "volume" + E'Type2'Tmpfs -> "tmpfs" + E'Type2'Npipe -> "npipe" + E'Type2'Cluster -> "cluster" + +-- | parse 'E'Type2' enum +toE'Type2 :: Text -> P.Either String E'Type2 +toE'Type2 = \case + "bind" -> P.Right E'Type2'Bind + "volume" -> P.Right E'Type2'Volume + "tmpfs" -> P.Right E'Type2'Tmpfs + "npipe" -> P.Right E'Type2'Npipe + "cluster" -> P.Right E'Type2'Cluster + s -> P.Left $ "toE'Type2: enum parse failure: " P.++ P.show s + + +-- ** E'Type3 + +-- | Enum of 'Text' . +-- Cache record type. +data E'Type3 + = E'Type3'Internal -- ^ @"internal"@ + | E'Type3'Frontend -- ^ @"frontend"@ + | E'Type3'Source_local -- ^ @"source.local"@ + | E'Type3'Source_git_checkout -- ^ @"source.git.checkout"@ + | E'Type3'Exec_cachemount -- ^ @"exec.cachemount"@ + | E'Type3'Regular -- ^ @"regular"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Type3 where toJSON = A.toJSON . fromE'Type3 +instance A.FromJSON E'Type3 where parseJSON o = P.either P.fail (pure . P.id) . toE'Type3 =<< A.parseJSON o +instance WH.ToHttpApiData E'Type3 where toQueryParam = WH.toQueryParam . fromE'Type3 +instance WH.FromHttpApiData E'Type3 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Type3 +instance MimeRender MimeMultipartFormData E'Type3 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Type3' enum +fromE'Type3 :: E'Type3 -> Text +fromE'Type3 = \case + E'Type3'Internal -> "internal" + E'Type3'Frontend -> "frontend" + E'Type3'Source_local -> "source.local" + E'Type3'Source_git_checkout -> "source.git.checkout" + E'Type3'Exec_cachemount -> "exec.cachemount" + E'Type3'Regular -> "regular" + +-- | parse 'E'Type3' enum +toE'Type3 :: Text -> P.Either String E'Type3 +toE'Type3 = \case + "internal" -> P.Right E'Type3'Internal + "frontend" -> P.Right E'Type3'Frontend + "source.local" -> P.Right E'Type3'Source_local + "source.git.checkout" -> P.Right E'Type3'Source_git_checkout + "exec.cachemount" -> P.Right E'Type3'Exec_cachemount + "regular" -> P.Right E'Type3'Regular + s -> P.Left $ "toE'Type3: enum parse failure: " P.++ P.show s + + +-- ** E'Type4 + +-- | Enum of 'Text' . +-- The type of object emitting the event +data E'Type4 + = E'Type4'Builder -- ^ @"builder"@ + | E'Type4'Config -- ^ @"config"@ + | E'Type4'Container -- ^ @"container"@ + | E'Type4'Daemon -- ^ @"daemon"@ + | E'Type4'Image -- ^ @"image"@ + | E'Type4'Network -- ^ @"network"@ + | E'Type4'Node -- ^ @"node"@ + | E'Type4'Plugin -- ^ @"plugin"@ + | E'Type4'Secret -- ^ @"secret"@ + | E'Type4'Service -- ^ @"service"@ + | E'Type4'Volume -- ^ @"volume"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Type4 where toJSON = A.toJSON . fromE'Type4 +instance A.FromJSON E'Type4 where parseJSON o = P.either P.fail (pure . P.id) . toE'Type4 =<< A.parseJSON o +instance WH.ToHttpApiData E'Type4 where toQueryParam = WH.toQueryParam . fromE'Type4 +instance WH.FromHttpApiData E'Type4 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Type4 +instance MimeRender MimeMultipartFormData E'Type4 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Type4' enum +fromE'Type4 :: E'Type4 -> Text +fromE'Type4 = \case + E'Type4'Builder -> "builder" + E'Type4'Config -> "config" + E'Type4'Container -> "container" + E'Type4'Daemon -> "daemon" + E'Type4'Image -> "image" + E'Type4'Network -> "network" + E'Type4'Node -> "node" + E'Type4'Plugin -> "plugin" + E'Type4'Secret -> "secret" + E'Type4'Service -> "service" + E'Type4'Volume -> "volume" + +-- | parse 'E'Type4' enum +toE'Type4 :: Text -> P.Either String E'Type4 +toE'Type4 = \case + "builder" -> P.Right E'Type4'Builder + "config" -> P.Right E'Type4'Config + "container" -> P.Right E'Type4'Container + "daemon" -> P.Right E'Type4'Daemon + "image" -> P.Right E'Type4'Image + "network" -> P.Right E'Type4'Network + "node" -> P.Right E'Type4'Node + "plugin" -> P.Right E'Type4'Plugin + "secret" -> P.Right E'Type4'Secret + "service" -> P.Right E'Type4'Service + "volume" -> P.Right E'Type4'Volume + s -> P.Left $ "toE'Type4: enum parse failure: " P.++ P.show s + + +-- ** E'Type5 + +-- | Enum of 'Text' +data E'Type5 + = E'Type5'Json_file -- ^ @"json-file"@ + | E'Type5'Syslog -- ^ @"syslog"@ + | E'Type5'Journald -- ^ @"journald"@ + | E'Type5'Gelf -- ^ @"gelf"@ + | E'Type5'Fluentd -- ^ @"fluentd"@ + | E'Type5'Awslogs -- ^ @"awslogs"@ + | E'Type5'Splunk -- ^ @"splunk"@ + | E'Type5'Etwlogs -- ^ @"etwlogs"@ + | E'Type5'None -- ^ @"none"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Type5 where toJSON = A.toJSON . fromE'Type5 +instance A.FromJSON E'Type5 where parseJSON o = P.either P.fail (pure . P.id) . toE'Type5 =<< A.parseJSON o +instance WH.ToHttpApiData E'Type5 where toQueryParam = WH.toQueryParam . fromE'Type5 +instance WH.FromHttpApiData E'Type5 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Type5 +instance MimeRender MimeMultipartFormData E'Type5 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Type5' enum +fromE'Type5 :: E'Type5 -> Text +fromE'Type5 = \case + E'Type5'Json_file -> "json-file" + E'Type5'Syslog -> "syslog" + E'Type5'Journald -> "journald" + E'Type5'Gelf -> "gelf" + E'Type5'Fluentd -> "fluentd" + E'Type5'Awslogs -> "awslogs" + E'Type5'Splunk -> "splunk" + E'Type5'Etwlogs -> "etwlogs" + E'Type5'None -> "none" + +-- | parse 'E'Type5' enum +toE'Type5 :: Text -> P.Either String E'Type5 +toE'Type5 = \case + "json-file" -> P.Right E'Type5'Json_file + "syslog" -> P.Right E'Type5'Syslog + "journald" -> P.Right E'Type5'Journald + "gelf" -> P.Right E'Type5'Gelf + "fluentd" -> P.Right E'Type5'Fluentd + "awslogs" -> P.Right E'Type5'Awslogs + "splunk" -> P.Right E'Type5'Splunk + "etwlogs" -> P.Right E'Type5'Etwlogs + "none" -> P.Right E'Type5'None + s -> P.Left $ "toE'Type5: enum parse failure: " P.++ P.show s + + +-- ** E'Type6 + +-- | Enum of 'Text' +data E'Type6 + = E'Type6'Container -- ^ @"container"@ + | E'Type6'Image -- ^ @"image"@ + | E'Type6'Volume -- ^ @"volume"@ + | E'Type6'Build_cache -- ^ @"build-cache"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Type6 where toJSON = A.toJSON . fromE'Type6 +instance A.FromJSON E'Type6 where parseJSON o = P.either P.fail (pure . P.id) . toE'Type6 =<< A.parseJSON o +instance WH.ToHttpApiData E'Type6 where toQueryParam = WH.toQueryParam . fromE'Type6 +instance WH.FromHttpApiData E'Type6 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Type6 +instance MimeRender MimeMultipartFormData E'Type6 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Type6' enum +fromE'Type6 :: E'Type6 -> Text +fromE'Type6 = \case + E'Type6'Container -> "container" + E'Type6'Image -> "image" + E'Type6'Volume -> "volume" + E'Type6'Build_cache -> "build-cache" + +-- | parse 'E'Type6' enum +toE'Type6 :: Text -> P.Either String E'Type6 +toE'Type6 = \case + "container" -> P.Right E'Type6'Container + "image" -> P.Right E'Type6'Image + "volume" -> P.Right E'Type6'Volume + "build-cache" -> P.Right E'Type6'Build_cache + s -> P.Left $ "toE'Type6: enum parse failure: " P.++ P.show s + + +-- ** LocalNodeState + +-- | Enum of 'Text' . +-- Current local status of this node. +data LocalNodeState + = LocalNodeState'Empty -- ^ @""@ + | LocalNodeState'Inactive -- ^ @"inactive"@ + | LocalNodeState'Pending -- ^ @"pending"@ + | LocalNodeState'Active -- ^ @"active"@ + | LocalNodeState'Error -- ^ @"error"@ + | LocalNodeState'Locked -- ^ @"locked"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON LocalNodeState where toJSON = A.toJSON . fromLocalNodeState +instance A.FromJSON LocalNodeState where parseJSON o = P.either P.fail (pure . P.id) . toLocalNodeState =<< A.parseJSON o +instance WH.ToHttpApiData LocalNodeState where toQueryParam = WH.toQueryParam . fromLocalNodeState +instance WH.FromHttpApiData LocalNodeState where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toLocalNodeState +instance MimeRender MimeMultipartFormData LocalNodeState where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'LocalNodeState' enum +fromLocalNodeState :: LocalNodeState -> Text +fromLocalNodeState = \case + LocalNodeState'Empty -> "" + LocalNodeState'Inactive -> "inactive" + LocalNodeState'Pending -> "pending" + LocalNodeState'Active -> "active" + LocalNodeState'Error -> "error" + LocalNodeState'Locked -> "locked" + +-- | parse 'LocalNodeState' enum +toLocalNodeState :: Text -> P.Either String LocalNodeState +toLocalNodeState = \case + "" -> P.Right LocalNodeState'Empty + "inactive" -> P.Right LocalNodeState'Inactive + "pending" -> P.Right LocalNodeState'Pending + "active" -> P.Right LocalNodeState'Active + "error" -> P.Right LocalNodeState'Error + "locked" -> P.Right LocalNodeState'Locked + s -> P.Left $ "toLocalNodeState: enum parse failure: " P.++ P.show s + + +-- ** NodeState + +-- | Enum of 'Text' . +-- NodeState represents the state of a node. +data NodeState + = NodeState'Unknown -- ^ @"unknown"@ + | NodeState'Down -- ^ @"down"@ + | NodeState'Ready -- ^ @"ready"@ + | NodeState'Disconnected -- ^ @"disconnected"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON NodeState where toJSON = A.toJSON . fromNodeState +instance A.FromJSON NodeState where parseJSON o = P.either P.fail (pure . P.id) . toNodeState =<< A.parseJSON o +instance WH.ToHttpApiData NodeState where toQueryParam = WH.toQueryParam . fromNodeState +instance WH.FromHttpApiData NodeState where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toNodeState +instance MimeRender MimeMultipartFormData NodeState where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'NodeState' enum +fromNodeState :: NodeState -> Text +fromNodeState = \case + NodeState'Unknown -> "unknown" + NodeState'Down -> "down" + NodeState'Ready -> "ready" + NodeState'Disconnected -> "disconnected" + +-- | parse 'NodeState' enum +toNodeState :: Text -> P.Either String NodeState +toNodeState = \case + "unknown" -> P.Right NodeState'Unknown + "down" -> P.Right NodeState'Down + "ready" -> P.Right NodeState'Ready + "disconnected" -> P.Right NodeState'Disconnected + s -> P.Left $ "toNodeState: enum parse failure: " P.++ P.show s + + +-- ** Reachability + +-- | Enum of 'Text' . +-- Reachability represents the reachability of a node. +data Reachability + = Reachability'Unknown -- ^ @"unknown"@ + | Reachability'Unreachable -- ^ @"unreachable"@ + | Reachability'Reachable -- ^ @"reachable"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON Reachability where toJSON = A.toJSON . fromReachability +instance A.FromJSON Reachability where parseJSON o = P.either P.fail (pure . P.id) . toReachability =<< A.parseJSON o +instance WH.ToHttpApiData Reachability where toQueryParam = WH.toQueryParam . fromReachability +instance WH.FromHttpApiData Reachability where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toReachability +instance MimeRender MimeMultipartFormData Reachability where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'Reachability' enum +fromReachability :: Reachability -> Text +fromReachability = \case + Reachability'Unknown -> "unknown" + Reachability'Unreachable -> "unreachable" + Reachability'Reachable -> "reachable" + +-- | parse 'Reachability' enum +toReachability :: Text -> P.Either String Reachability +toReachability = \case + "unknown" -> P.Right Reachability'Unknown + "unreachable" -> P.Right Reachability'Unreachable + "reachable" -> P.Right Reachability'Reachable + s -> P.Left $ "toReachability: enum parse failure: " P.++ P.show s + + +-- ** TaskState + +-- | Enum of 'Text' +data TaskState + = TaskState'New -- ^ @"new"@ + | TaskState'Allocated -- ^ @"allocated"@ + | TaskState'Pending -- ^ @"pending"@ + | TaskState'Assigned -- ^ @"assigned"@ + | TaskState'Accepted -- ^ @"accepted"@ + | TaskState'Preparing -- ^ @"preparing"@ + | TaskState'Ready -- ^ @"ready"@ + | TaskState'Starting -- ^ @"starting"@ + | TaskState'Running -- ^ @"running"@ + | TaskState'Complete -- ^ @"complete"@ + | TaskState'Shutdown -- ^ @"shutdown"@ + | TaskState'Failed -- ^ @"failed"@ + | TaskState'Rejected -- ^ @"rejected"@ + | TaskState'Remove -- ^ @"remove"@ + | TaskState'Orphaned -- ^ @"orphaned"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON TaskState where toJSON = A.toJSON . fromTaskState +instance A.FromJSON TaskState where parseJSON o = P.either P.fail (pure . P.id) . toTaskState =<< A.parseJSON o +instance WH.ToHttpApiData TaskState where toQueryParam = WH.toQueryParam . fromTaskState +instance WH.FromHttpApiData TaskState where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toTaskState +instance MimeRender MimeMultipartFormData TaskState where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'TaskState' enum +fromTaskState :: TaskState -> Text +fromTaskState = \case + TaskState'New -> "new" + TaskState'Allocated -> "allocated" + TaskState'Pending -> "pending" + TaskState'Assigned -> "assigned" + TaskState'Accepted -> "accepted" + TaskState'Preparing -> "preparing" + TaskState'Ready -> "ready" + TaskState'Starting -> "starting" + TaskState'Running -> "running" + TaskState'Complete -> "complete" + TaskState'Shutdown -> "shutdown" + TaskState'Failed -> "failed" + TaskState'Rejected -> "rejected" + TaskState'Remove -> "remove" + TaskState'Orphaned -> "orphaned" + +-- | parse 'TaskState' enum +toTaskState :: Text -> P.Either String TaskState +toTaskState = \case + "new" -> P.Right TaskState'New + "allocated" -> P.Right TaskState'Allocated + "pending" -> P.Right TaskState'Pending + "assigned" -> P.Right TaskState'Assigned + "accepted" -> P.Right TaskState'Accepted + "preparing" -> P.Right TaskState'Preparing + "ready" -> P.Right TaskState'Ready + "starting" -> P.Right TaskState'Starting + "running" -> P.Right TaskState'Running + "complete" -> P.Right TaskState'Complete + "shutdown" -> P.Right TaskState'Shutdown + "failed" -> P.Right TaskState'Failed + "rejected" -> P.Right TaskState'Rejected + "remove" -> P.Right TaskState'Remove + "orphaned" -> P.Right TaskState'Orphaned + s -> P.Left $ "toTaskState: enum parse failure: " P.++ P.show s + + + +type Map = HM.HashMap String String diff --git a/v1.45/lib/DockerEngine/ModelLens.hs b/v1.45/lib/DockerEngine/ModelLens.hs new file mode 100644 index 0000000..1b08e3f --- /dev/null +++ b/v1.45/lib/DockerEngine/ModelLens.hs @@ -0,0 +1,6538 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.45) is used. For example, calling `/info` is the same as calling `/v1.45/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.45 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.Lens +-} + +{-# LANGUAGE KindSignatures #-} +{-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE RecordWildCards #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-matches -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.ModelLens where + +import qualified Data.Aeson as A +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Data, Typeable) +import qualified Data.Map as Map +import qualified Data.Set as Set +import qualified Data.Time as TI + +import Data.Text (Text) + +import Prelude (($), (.),(<$>),(<*>),(=<<),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +import DockerEngine.Model +import DockerEngine.Core + + +-- * Address + +-- | 'addressAddr' Lens +addressAddrL :: Lens_' Address (Maybe Text) +addressAddrL f Address{..} = (\addressAddr -> Address { addressAddr, ..} ) <$> f addressAddr +{-# INLINE addressAddrL #-} + +-- | 'addressPrefixLen' Lens +addressPrefixLenL :: Lens_' Address (Maybe Int) +addressPrefixLenL f Address{..} = (\addressPrefixLen -> Address { addressPrefixLen, ..} ) <$> f addressPrefixLen +{-# INLINE addressPrefixLenL #-} + + + +-- * AuthConfig + +-- | 'authConfigUsername' Lens +authConfigUsernameL :: Lens_' AuthConfig (Maybe Text) +authConfigUsernameL f AuthConfig{..} = (\authConfigUsername -> AuthConfig { authConfigUsername, ..} ) <$> f authConfigUsername +{-# INLINE authConfigUsernameL #-} + +-- | 'authConfigPassword' Lens +authConfigPasswordL :: Lens_' AuthConfig (Maybe Text) +authConfigPasswordL f AuthConfig{..} = (\authConfigPassword -> AuthConfig { authConfigPassword, ..} ) <$> f authConfigPassword +{-# INLINE authConfigPasswordL #-} + +-- | 'authConfigEmail' Lens +authConfigEmailL :: Lens_' AuthConfig (Maybe Text) +authConfigEmailL f AuthConfig{..} = (\authConfigEmail -> AuthConfig { authConfigEmail, ..} ) <$> f authConfigEmail +{-# INLINE authConfigEmailL #-} + +-- | 'authConfigServeraddress' Lens +authConfigServeraddressL :: Lens_' AuthConfig (Maybe Text) +authConfigServeraddressL f AuthConfig{..} = (\authConfigServeraddress -> AuthConfig { authConfigServeraddress, ..} ) <$> f authConfigServeraddress +{-# INLINE authConfigServeraddressL #-} + + + +-- * BuildCache + +-- | 'buildCacheId' Lens +buildCacheIdL :: Lens_' BuildCache (Maybe Text) +buildCacheIdL f BuildCache{..} = (\buildCacheId -> BuildCache { buildCacheId, ..} ) <$> f buildCacheId +{-# INLINE buildCacheIdL #-} + +-- | 'buildCacheParent' Lens +buildCacheParentL :: Lens_' BuildCache (Maybe Text) +buildCacheParentL f BuildCache{..} = (\buildCacheParent -> BuildCache { buildCacheParent, ..} ) <$> f buildCacheParent +{-# INLINE buildCacheParentL #-} + +-- | 'buildCacheParents' Lens +buildCacheParentsL :: Lens_' BuildCache (Maybe [Text]) +buildCacheParentsL f BuildCache{..} = (\buildCacheParents -> BuildCache { buildCacheParents, ..} ) <$> f buildCacheParents +{-# INLINE buildCacheParentsL #-} + +-- | 'buildCacheType' Lens +buildCacheTypeL :: Lens_' BuildCache (Maybe E'Type3) +buildCacheTypeL f BuildCache{..} = (\buildCacheType -> BuildCache { buildCacheType, ..} ) <$> f buildCacheType +{-# INLINE buildCacheTypeL #-} + +-- | 'buildCacheDescription' Lens +buildCacheDescriptionL :: Lens_' BuildCache (Maybe Text) +buildCacheDescriptionL f BuildCache{..} = (\buildCacheDescription -> BuildCache { buildCacheDescription, ..} ) <$> f buildCacheDescription +{-# INLINE buildCacheDescriptionL #-} + +-- | 'buildCacheInUse' Lens +buildCacheInUseL :: Lens_' BuildCache (Maybe Bool) +buildCacheInUseL f BuildCache{..} = (\buildCacheInUse -> BuildCache { buildCacheInUse, ..} ) <$> f buildCacheInUse +{-# INLINE buildCacheInUseL #-} + +-- | 'buildCacheShared' Lens +buildCacheSharedL :: Lens_' BuildCache (Maybe Bool) +buildCacheSharedL f BuildCache{..} = (\buildCacheShared -> BuildCache { buildCacheShared, ..} ) <$> f buildCacheShared +{-# INLINE buildCacheSharedL #-} + +-- | 'buildCacheSize' Lens +buildCacheSizeL :: Lens_' BuildCache (Maybe Int) +buildCacheSizeL f BuildCache{..} = (\buildCacheSize -> BuildCache { buildCacheSize, ..} ) <$> f buildCacheSize +{-# INLINE buildCacheSizeL #-} + +-- | 'buildCacheCreatedAt' Lens +buildCacheCreatedAtL :: Lens_' BuildCache (Maybe Text) +buildCacheCreatedAtL f BuildCache{..} = (\buildCacheCreatedAt -> BuildCache { buildCacheCreatedAt, ..} ) <$> f buildCacheCreatedAt +{-# INLINE buildCacheCreatedAtL #-} + +-- | 'buildCacheLastUsedAt' Lens +buildCacheLastUsedAtL :: Lens_' BuildCache (Maybe Text) +buildCacheLastUsedAtL f BuildCache{..} = (\buildCacheLastUsedAt -> BuildCache { buildCacheLastUsedAt, ..} ) <$> f buildCacheLastUsedAt +{-# INLINE buildCacheLastUsedAtL #-} + +-- | 'buildCacheUsageCount' Lens +buildCacheUsageCountL :: Lens_' BuildCache (Maybe Int) +buildCacheUsageCountL f BuildCache{..} = (\buildCacheUsageCount -> BuildCache { buildCacheUsageCount, ..} ) <$> f buildCacheUsageCount +{-# INLINE buildCacheUsageCountL #-} + + + +-- * BuildInfo + +-- | 'buildInfoId' Lens +buildInfoIdL :: Lens_' BuildInfo (Maybe Text) +buildInfoIdL f BuildInfo{..} = (\buildInfoId -> BuildInfo { buildInfoId, ..} ) <$> f buildInfoId +{-# INLINE buildInfoIdL #-} + +-- | 'buildInfoStream' Lens +buildInfoStreamL :: Lens_' BuildInfo (Maybe Text) +buildInfoStreamL f BuildInfo{..} = (\buildInfoStream -> BuildInfo { buildInfoStream, ..} ) <$> f buildInfoStream +{-# INLINE buildInfoStreamL #-} + +-- | 'buildInfoError' Lens +buildInfoErrorL :: Lens_' BuildInfo (Maybe Text) +buildInfoErrorL f BuildInfo{..} = (\buildInfoError -> BuildInfo { buildInfoError, ..} ) <$> f buildInfoError +{-# INLINE buildInfoErrorL #-} + +-- | 'buildInfoErrorDetail' Lens +buildInfoErrorDetailL :: Lens_' BuildInfo (Maybe ErrorDetail) +buildInfoErrorDetailL f BuildInfo{..} = (\buildInfoErrorDetail -> BuildInfo { buildInfoErrorDetail, ..} ) <$> f buildInfoErrorDetail +{-# INLINE buildInfoErrorDetailL #-} + +-- | 'buildInfoStatus' Lens +buildInfoStatusL :: Lens_' BuildInfo (Maybe Text) +buildInfoStatusL f BuildInfo{..} = (\buildInfoStatus -> BuildInfo { buildInfoStatus, ..} ) <$> f buildInfoStatus +{-# INLINE buildInfoStatusL #-} + +-- | 'buildInfoProgress' Lens +buildInfoProgressL :: Lens_' BuildInfo (Maybe Text) +buildInfoProgressL f BuildInfo{..} = (\buildInfoProgress -> BuildInfo { buildInfoProgress, ..} ) <$> f buildInfoProgress +{-# INLINE buildInfoProgressL #-} + +-- | 'buildInfoProgressDetail' Lens +buildInfoProgressDetailL :: Lens_' BuildInfo (Maybe ProgressDetail) +buildInfoProgressDetailL f BuildInfo{..} = (\buildInfoProgressDetail -> BuildInfo { buildInfoProgressDetail, ..} ) <$> f buildInfoProgressDetail +{-# INLINE buildInfoProgressDetailL #-} + +-- | 'buildInfoAux' Lens +buildInfoAuxL :: Lens_' BuildInfo (Maybe ImageID) +buildInfoAuxL f BuildInfo{..} = (\buildInfoAux -> BuildInfo { buildInfoAux, ..} ) <$> f buildInfoAux +{-# INLINE buildInfoAuxL #-} + + + +-- * BuildPruneResponse + +-- | 'buildPruneResponseCachesDeleted' Lens +buildPruneResponseCachesDeletedL :: Lens_' BuildPruneResponse (Maybe [Text]) +buildPruneResponseCachesDeletedL f BuildPruneResponse{..} = (\buildPruneResponseCachesDeleted -> BuildPruneResponse { buildPruneResponseCachesDeleted, ..} ) <$> f buildPruneResponseCachesDeleted +{-# INLINE buildPruneResponseCachesDeletedL #-} + +-- | 'buildPruneResponseSpaceReclaimed' Lens +buildPruneResponseSpaceReclaimedL :: Lens_' BuildPruneResponse (Maybe Integer) +buildPruneResponseSpaceReclaimedL f BuildPruneResponse{..} = (\buildPruneResponseSpaceReclaimed -> BuildPruneResponse { buildPruneResponseSpaceReclaimed, ..} ) <$> f buildPruneResponseSpaceReclaimed +{-# INLINE buildPruneResponseSpaceReclaimedL #-} + + + +-- * ChangeType + + + +-- * ClusterInfo + +-- | 'clusterInfoId' Lens +clusterInfoIdL :: Lens_' ClusterInfo (Maybe Text) +clusterInfoIdL f ClusterInfo{..} = (\clusterInfoId -> ClusterInfo { clusterInfoId, ..} ) <$> f clusterInfoId +{-# INLINE clusterInfoIdL #-} + +-- | 'clusterInfoVersion' Lens +clusterInfoVersionL :: Lens_' ClusterInfo (Maybe ObjectVersion) +clusterInfoVersionL f ClusterInfo{..} = (\clusterInfoVersion -> ClusterInfo { clusterInfoVersion, ..} ) <$> f clusterInfoVersion +{-# INLINE clusterInfoVersionL #-} + +-- | 'clusterInfoCreatedAt' Lens +clusterInfoCreatedAtL :: Lens_' ClusterInfo (Maybe Text) +clusterInfoCreatedAtL f ClusterInfo{..} = (\clusterInfoCreatedAt -> ClusterInfo { clusterInfoCreatedAt, ..} ) <$> f clusterInfoCreatedAt +{-# INLINE clusterInfoCreatedAtL #-} + +-- | 'clusterInfoUpdatedAt' Lens +clusterInfoUpdatedAtL :: Lens_' ClusterInfo (Maybe Text) +clusterInfoUpdatedAtL f ClusterInfo{..} = (\clusterInfoUpdatedAt -> ClusterInfo { clusterInfoUpdatedAt, ..} ) <$> f clusterInfoUpdatedAt +{-# INLINE clusterInfoUpdatedAtL #-} + +-- | 'clusterInfoSpec' Lens +clusterInfoSpecL :: Lens_' ClusterInfo (Maybe SwarmSpec) +clusterInfoSpecL f ClusterInfo{..} = (\clusterInfoSpec -> ClusterInfo { clusterInfoSpec, ..} ) <$> f clusterInfoSpec +{-# INLINE clusterInfoSpecL #-} + +-- | 'clusterInfoTlsInfo' Lens +clusterInfoTlsInfoL :: Lens_' ClusterInfo (Maybe TLSInfo) +clusterInfoTlsInfoL f ClusterInfo{..} = (\clusterInfoTlsInfo -> ClusterInfo { clusterInfoTlsInfo, ..} ) <$> f clusterInfoTlsInfo +{-# INLINE clusterInfoTlsInfoL #-} + +-- | 'clusterInfoRootRotationInProgress' Lens +clusterInfoRootRotationInProgressL :: Lens_' ClusterInfo (Maybe Bool) +clusterInfoRootRotationInProgressL f ClusterInfo{..} = (\clusterInfoRootRotationInProgress -> ClusterInfo { clusterInfoRootRotationInProgress, ..} ) <$> f clusterInfoRootRotationInProgress +{-# INLINE clusterInfoRootRotationInProgressL #-} + +-- | 'clusterInfoDataPathPort' Lens +clusterInfoDataPathPortL :: Lens_' ClusterInfo (Maybe Int) +clusterInfoDataPathPortL f ClusterInfo{..} = (\clusterInfoDataPathPort -> ClusterInfo { clusterInfoDataPathPort, ..} ) <$> f clusterInfoDataPathPort +{-# INLINE clusterInfoDataPathPortL #-} + +-- | 'clusterInfoDefaultAddrPool' Lens +clusterInfoDefaultAddrPoolL :: Lens_' ClusterInfo (Maybe [Text]) +clusterInfoDefaultAddrPoolL f ClusterInfo{..} = (\clusterInfoDefaultAddrPool -> ClusterInfo { clusterInfoDefaultAddrPool, ..} ) <$> f clusterInfoDefaultAddrPool +{-# INLINE clusterInfoDefaultAddrPoolL #-} + +-- | 'clusterInfoSubnetSize' Lens +clusterInfoSubnetSizeL :: Lens_' ClusterInfo (Maybe Int) +clusterInfoSubnetSizeL f ClusterInfo{..} = (\clusterInfoSubnetSize -> ClusterInfo { clusterInfoSubnetSize, ..} ) <$> f clusterInfoSubnetSize +{-# INLINE clusterInfoSubnetSizeL #-} + + + +-- * ClusterVolume + +-- | 'clusterVolumeId' Lens +clusterVolumeIdL :: Lens_' ClusterVolume (Maybe Text) +clusterVolumeIdL f ClusterVolume{..} = (\clusterVolumeId -> ClusterVolume { clusterVolumeId, ..} ) <$> f clusterVolumeId +{-# INLINE clusterVolumeIdL #-} + +-- | 'clusterVolumeVersion' Lens +clusterVolumeVersionL :: Lens_' ClusterVolume (Maybe ObjectVersion) +clusterVolumeVersionL f ClusterVolume{..} = (\clusterVolumeVersion -> ClusterVolume { clusterVolumeVersion, ..} ) <$> f clusterVolumeVersion +{-# INLINE clusterVolumeVersionL #-} + +-- | 'clusterVolumeCreatedAt' Lens +clusterVolumeCreatedAtL :: Lens_' ClusterVolume (Maybe Text) +clusterVolumeCreatedAtL f ClusterVolume{..} = (\clusterVolumeCreatedAt -> ClusterVolume { clusterVolumeCreatedAt, ..} ) <$> f clusterVolumeCreatedAt +{-# INLINE clusterVolumeCreatedAtL #-} + +-- | 'clusterVolumeUpdatedAt' Lens +clusterVolumeUpdatedAtL :: Lens_' ClusterVolume (Maybe Text) +clusterVolumeUpdatedAtL f ClusterVolume{..} = (\clusterVolumeUpdatedAt -> ClusterVolume { clusterVolumeUpdatedAt, ..} ) <$> f clusterVolumeUpdatedAt +{-# INLINE clusterVolumeUpdatedAtL #-} + +-- | 'clusterVolumeSpec' Lens +clusterVolumeSpecL :: Lens_' ClusterVolume (Maybe ClusterVolumeSpec) +clusterVolumeSpecL f ClusterVolume{..} = (\clusterVolumeSpec -> ClusterVolume { clusterVolumeSpec, ..} ) <$> f clusterVolumeSpec +{-# INLINE clusterVolumeSpecL #-} + +-- | 'clusterVolumeInfo' Lens +clusterVolumeInfoL :: Lens_' ClusterVolume (Maybe ClusterVolumeInfo) +clusterVolumeInfoL f ClusterVolume{..} = (\clusterVolumeInfo -> ClusterVolume { clusterVolumeInfo, ..} ) <$> f clusterVolumeInfo +{-# INLINE clusterVolumeInfoL #-} + +-- | 'clusterVolumePublishStatus' Lens +clusterVolumePublishStatusL :: Lens_' ClusterVolume (Maybe [ClusterVolumePublishStatusInner]) +clusterVolumePublishStatusL f ClusterVolume{..} = (\clusterVolumePublishStatus -> ClusterVolume { clusterVolumePublishStatus, ..} ) <$> f clusterVolumePublishStatus +{-# INLINE clusterVolumePublishStatusL #-} + + + +-- * ClusterVolumeInfo + +-- | 'clusterVolumeInfoCapacityBytes' Lens +clusterVolumeInfoCapacityBytesL :: Lens_' ClusterVolumeInfo (Maybe Integer) +clusterVolumeInfoCapacityBytesL f ClusterVolumeInfo{..} = (\clusterVolumeInfoCapacityBytes -> ClusterVolumeInfo { clusterVolumeInfoCapacityBytes, ..} ) <$> f clusterVolumeInfoCapacityBytes +{-# INLINE clusterVolumeInfoCapacityBytesL #-} + +-- | 'clusterVolumeInfoVolumeContext' Lens +clusterVolumeInfoVolumeContextL :: Lens_' ClusterVolumeInfo (Maybe (Map.Map String Text)) +clusterVolumeInfoVolumeContextL f ClusterVolumeInfo{..} = (\clusterVolumeInfoVolumeContext -> ClusterVolumeInfo { clusterVolumeInfoVolumeContext, ..} ) <$> f clusterVolumeInfoVolumeContext +{-# INLINE clusterVolumeInfoVolumeContextL #-} + +-- | 'clusterVolumeInfoVolumeId' Lens +clusterVolumeInfoVolumeIdL :: Lens_' ClusterVolumeInfo (Maybe Text) +clusterVolumeInfoVolumeIdL f ClusterVolumeInfo{..} = (\clusterVolumeInfoVolumeId -> ClusterVolumeInfo { clusterVolumeInfoVolumeId, ..} ) <$> f clusterVolumeInfoVolumeId +{-# INLINE clusterVolumeInfoVolumeIdL #-} + +-- | 'clusterVolumeInfoAccessibleTopology' Lens +clusterVolumeInfoAccessibleTopologyL :: Lens_' ClusterVolumeInfo (Maybe [Map]) +clusterVolumeInfoAccessibleTopologyL f ClusterVolumeInfo{..} = (\clusterVolumeInfoAccessibleTopology -> ClusterVolumeInfo { clusterVolumeInfoAccessibleTopology, ..} ) <$> f clusterVolumeInfoAccessibleTopology +{-# INLINE clusterVolumeInfoAccessibleTopologyL #-} + + + +-- * ClusterVolumePublishStatusInner + +-- | 'clusterVolumePublishStatusInnerNodeId' Lens +clusterVolumePublishStatusInnerNodeIdL :: Lens_' ClusterVolumePublishStatusInner (Maybe Text) +clusterVolumePublishStatusInnerNodeIdL f ClusterVolumePublishStatusInner{..} = (\clusterVolumePublishStatusInnerNodeId -> ClusterVolumePublishStatusInner { clusterVolumePublishStatusInnerNodeId, ..} ) <$> f clusterVolumePublishStatusInnerNodeId +{-# INLINE clusterVolumePublishStatusInnerNodeIdL #-} + +-- | 'clusterVolumePublishStatusInnerState' Lens +clusterVolumePublishStatusInnerStateL :: Lens_' ClusterVolumePublishStatusInner (Maybe E'State2) +clusterVolumePublishStatusInnerStateL f ClusterVolumePublishStatusInner{..} = (\clusterVolumePublishStatusInnerState -> ClusterVolumePublishStatusInner { clusterVolumePublishStatusInnerState, ..} ) <$> f clusterVolumePublishStatusInnerState +{-# INLINE clusterVolumePublishStatusInnerStateL #-} + +-- | 'clusterVolumePublishStatusInnerPublishContext' Lens +clusterVolumePublishStatusInnerPublishContextL :: Lens_' ClusterVolumePublishStatusInner (Maybe (Map.Map String Text)) +clusterVolumePublishStatusInnerPublishContextL f ClusterVolumePublishStatusInner{..} = (\clusterVolumePublishStatusInnerPublishContext -> ClusterVolumePublishStatusInner { clusterVolumePublishStatusInnerPublishContext, ..} ) <$> f clusterVolumePublishStatusInnerPublishContext +{-# INLINE clusterVolumePublishStatusInnerPublishContextL #-} + + + +-- * ClusterVolumeSpec + +-- | 'clusterVolumeSpecGroup' Lens +clusterVolumeSpecGroupL :: Lens_' ClusterVolumeSpec (Maybe Text) +clusterVolumeSpecGroupL f ClusterVolumeSpec{..} = (\clusterVolumeSpecGroup -> ClusterVolumeSpec { clusterVolumeSpecGroup, ..} ) <$> f clusterVolumeSpecGroup +{-# INLINE clusterVolumeSpecGroupL #-} + +-- | 'clusterVolumeSpecAccessMode' Lens +clusterVolumeSpecAccessModeL :: Lens_' ClusterVolumeSpec (Maybe ClusterVolumeSpecAccessMode) +clusterVolumeSpecAccessModeL f ClusterVolumeSpec{..} = (\clusterVolumeSpecAccessMode -> ClusterVolumeSpec { clusterVolumeSpecAccessMode, ..} ) <$> f clusterVolumeSpecAccessMode +{-# INLINE clusterVolumeSpecAccessModeL #-} + + + +-- * ClusterVolumeSpecAccessMode + +-- | 'clusterVolumeSpecAccessModeScope' Lens +clusterVolumeSpecAccessModeScopeL :: Lens_' ClusterVolumeSpecAccessMode (Maybe E'Scope3) +clusterVolumeSpecAccessModeScopeL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeScope -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeScope, ..} ) <$> f clusterVolumeSpecAccessModeScope +{-# INLINE clusterVolumeSpecAccessModeScopeL #-} + +-- | 'clusterVolumeSpecAccessModeSharing' Lens +clusterVolumeSpecAccessModeSharingL :: Lens_' ClusterVolumeSpecAccessMode (Maybe E'Sharing) +clusterVolumeSpecAccessModeSharingL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeSharing -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeSharing, ..} ) <$> f clusterVolumeSpecAccessModeSharing +{-# INLINE clusterVolumeSpecAccessModeSharingL #-} + +-- | 'clusterVolumeSpecAccessModeMountVolume' Lens +clusterVolumeSpecAccessModeMountVolumeL :: Lens_' ClusterVolumeSpecAccessMode (Maybe A.Value) +clusterVolumeSpecAccessModeMountVolumeL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeMountVolume -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeMountVolume, ..} ) <$> f clusterVolumeSpecAccessModeMountVolume +{-# INLINE clusterVolumeSpecAccessModeMountVolumeL #-} + +-- | 'clusterVolumeSpecAccessModeSecrets' Lens +clusterVolumeSpecAccessModeSecretsL :: Lens_' ClusterVolumeSpecAccessMode (Maybe [ClusterVolumeSpecAccessModeSecretsInner]) +clusterVolumeSpecAccessModeSecretsL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeSecrets -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeSecrets, ..} ) <$> f clusterVolumeSpecAccessModeSecrets +{-# INLINE clusterVolumeSpecAccessModeSecretsL #-} + +-- | 'clusterVolumeSpecAccessModeAccessibilityRequirements' Lens +clusterVolumeSpecAccessModeAccessibilityRequirementsL :: Lens_' ClusterVolumeSpecAccessMode (Maybe ClusterVolumeSpecAccessModeAccessibilityRequirements) +clusterVolumeSpecAccessModeAccessibilityRequirementsL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeAccessibilityRequirements -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeAccessibilityRequirements, ..} ) <$> f clusterVolumeSpecAccessModeAccessibilityRequirements +{-# INLINE clusterVolumeSpecAccessModeAccessibilityRequirementsL #-} + +-- | 'clusterVolumeSpecAccessModeCapacityRange' Lens +clusterVolumeSpecAccessModeCapacityRangeL :: Lens_' ClusterVolumeSpecAccessMode (Maybe ClusterVolumeSpecAccessModeCapacityRange) +clusterVolumeSpecAccessModeCapacityRangeL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeCapacityRange -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeCapacityRange, ..} ) <$> f clusterVolumeSpecAccessModeCapacityRange +{-# INLINE clusterVolumeSpecAccessModeCapacityRangeL #-} + +-- | 'clusterVolumeSpecAccessModeAvailability' Lens +clusterVolumeSpecAccessModeAvailabilityL :: Lens_' ClusterVolumeSpecAccessMode (Maybe E'Availability) +clusterVolumeSpecAccessModeAvailabilityL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeAvailability -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeAvailability, ..} ) <$> f clusterVolumeSpecAccessModeAvailability +{-# INLINE clusterVolumeSpecAccessModeAvailabilityL #-} + + + +-- * ClusterVolumeSpecAccessModeAccessibilityRequirements + +-- | 'clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite' Lens +clusterVolumeSpecAccessModeAccessibilityRequirementsRequisiteL :: Lens_' ClusterVolumeSpecAccessModeAccessibilityRequirements (Maybe [Map]) +clusterVolumeSpecAccessModeAccessibilityRequirementsRequisiteL f ClusterVolumeSpecAccessModeAccessibilityRequirements{..} = (\clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite -> ClusterVolumeSpecAccessModeAccessibilityRequirements { clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite, ..} ) <$> f clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite +{-# INLINE clusterVolumeSpecAccessModeAccessibilityRequirementsRequisiteL #-} + +-- | 'clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred' Lens +clusterVolumeSpecAccessModeAccessibilityRequirementsPreferredL :: Lens_' ClusterVolumeSpecAccessModeAccessibilityRequirements (Maybe [Map]) +clusterVolumeSpecAccessModeAccessibilityRequirementsPreferredL f ClusterVolumeSpecAccessModeAccessibilityRequirements{..} = (\clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred -> ClusterVolumeSpecAccessModeAccessibilityRequirements { clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred, ..} ) <$> f clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred +{-# INLINE clusterVolumeSpecAccessModeAccessibilityRequirementsPreferredL #-} + + + +-- * ClusterVolumeSpecAccessModeCapacityRange + +-- | 'clusterVolumeSpecAccessModeCapacityRangeRequiredBytes' Lens +clusterVolumeSpecAccessModeCapacityRangeRequiredBytesL :: Lens_' ClusterVolumeSpecAccessModeCapacityRange (Maybe Integer) +clusterVolumeSpecAccessModeCapacityRangeRequiredBytesL f ClusterVolumeSpecAccessModeCapacityRange{..} = (\clusterVolumeSpecAccessModeCapacityRangeRequiredBytes -> ClusterVolumeSpecAccessModeCapacityRange { clusterVolumeSpecAccessModeCapacityRangeRequiredBytes, ..} ) <$> f clusterVolumeSpecAccessModeCapacityRangeRequiredBytes +{-# INLINE clusterVolumeSpecAccessModeCapacityRangeRequiredBytesL #-} + +-- | 'clusterVolumeSpecAccessModeCapacityRangeLimitBytes' Lens +clusterVolumeSpecAccessModeCapacityRangeLimitBytesL :: Lens_' ClusterVolumeSpecAccessModeCapacityRange (Maybe Integer) +clusterVolumeSpecAccessModeCapacityRangeLimitBytesL f ClusterVolumeSpecAccessModeCapacityRange{..} = (\clusterVolumeSpecAccessModeCapacityRangeLimitBytes -> ClusterVolumeSpecAccessModeCapacityRange { clusterVolumeSpecAccessModeCapacityRangeLimitBytes, ..} ) <$> f clusterVolumeSpecAccessModeCapacityRangeLimitBytes +{-# INLINE clusterVolumeSpecAccessModeCapacityRangeLimitBytesL #-} + + + +-- * ClusterVolumeSpecAccessModeSecretsInner + +-- | 'clusterVolumeSpecAccessModeSecretsInnerKey' Lens +clusterVolumeSpecAccessModeSecretsInnerKeyL :: Lens_' ClusterVolumeSpecAccessModeSecretsInner (Maybe Text) +clusterVolumeSpecAccessModeSecretsInnerKeyL f ClusterVolumeSpecAccessModeSecretsInner{..} = (\clusterVolumeSpecAccessModeSecretsInnerKey -> ClusterVolumeSpecAccessModeSecretsInner { clusterVolumeSpecAccessModeSecretsInnerKey, ..} ) <$> f clusterVolumeSpecAccessModeSecretsInnerKey +{-# INLINE clusterVolumeSpecAccessModeSecretsInnerKeyL #-} + +-- | 'clusterVolumeSpecAccessModeSecretsInnerSecret' Lens +clusterVolumeSpecAccessModeSecretsInnerSecretL :: Lens_' ClusterVolumeSpecAccessModeSecretsInner (Maybe Text) +clusterVolumeSpecAccessModeSecretsInnerSecretL f ClusterVolumeSpecAccessModeSecretsInner{..} = (\clusterVolumeSpecAccessModeSecretsInnerSecret -> ClusterVolumeSpecAccessModeSecretsInner { clusterVolumeSpecAccessModeSecretsInnerSecret, ..} ) <$> f clusterVolumeSpecAccessModeSecretsInnerSecret +{-# INLINE clusterVolumeSpecAccessModeSecretsInnerSecretL #-} + + + +-- * Commit + +-- | 'commitId' Lens +commitIdL :: Lens_' Commit (Maybe Text) +commitIdL f Commit{..} = (\commitId -> Commit { commitId, ..} ) <$> f commitId +{-# INLINE commitIdL #-} + +-- | 'commitExpected' Lens +commitExpectedL :: Lens_' Commit (Maybe Text) +commitExpectedL f Commit{..} = (\commitExpected -> Commit { commitExpected, ..} ) <$> f commitExpected +{-# INLINE commitExpectedL #-} + + + +-- * Config + +-- | 'configId' Lens +configIdL :: Lens_' Config (Maybe Text) +configIdL f Config{..} = (\configId -> Config { configId, ..} ) <$> f configId +{-# INLINE configIdL #-} + +-- | 'configVersion' Lens +configVersionL :: Lens_' Config (Maybe ObjectVersion) +configVersionL f Config{..} = (\configVersion -> Config { configVersion, ..} ) <$> f configVersion +{-# INLINE configVersionL #-} + +-- | 'configCreatedAt' Lens +configCreatedAtL :: Lens_' Config (Maybe Text) +configCreatedAtL f Config{..} = (\configCreatedAt -> Config { configCreatedAt, ..} ) <$> f configCreatedAt +{-# INLINE configCreatedAtL #-} + +-- | 'configUpdatedAt' Lens +configUpdatedAtL :: Lens_' Config (Maybe Text) +configUpdatedAtL f Config{..} = (\configUpdatedAt -> Config { configUpdatedAt, ..} ) <$> f configUpdatedAt +{-# INLINE configUpdatedAtL #-} + +-- | 'configSpec' Lens +configSpecL :: Lens_' Config (Maybe ConfigSpec) +configSpecL f Config{..} = (\configSpec -> Config { configSpec, ..} ) <$> f configSpec +{-# INLINE configSpecL #-} + + + +-- * ConfigCreateRequest + +-- | 'configCreateRequestName' Lens +configCreateRequestNameL :: Lens_' ConfigCreateRequest (Maybe Text) +configCreateRequestNameL f ConfigCreateRequest{..} = (\configCreateRequestName -> ConfigCreateRequest { configCreateRequestName, ..} ) <$> f configCreateRequestName +{-# INLINE configCreateRequestNameL #-} + +-- | 'configCreateRequestLabels' Lens +configCreateRequestLabelsL :: Lens_' ConfigCreateRequest (Maybe (Map.Map String Text)) +configCreateRequestLabelsL f ConfigCreateRequest{..} = (\configCreateRequestLabels -> ConfigCreateRequest { configCreateRequestLabels, ..} ) <$> f configCreateRequestLabels +{-# INLINE configCreateRequestLabelsL #-} + +-- | 'configCreateRequestData' Lens +configCreateRequestDataL :: Lens_' ConfigCreateRequest (Maybe Text) +configCreateRequestDataL f ConfigCreateRequest{..} = (\configCreateRequestData -> ConfigCreateRequest { configCreateRequestData, ..} ) <$> f configCreateRequestData +{-# INLINE configCreateRequestDataL #-} + +-- | 'configCreateRequestTemplating' Lens +configCreateRequestTemplatingL :: Lens_' ConfigCreateRequest (Maybe Driver) +configCreateRequestTemplatingL f ConfigCreateRequest{..} = (\configCreateRequestTemplating -> ConfigCreateRequest { configCreateRequestTemplating, ..} ) <$> f configCreateRequestTemplating +{-# INLINE configCreateRequestTemplatingL #-} + + + +-- * ConfigReference + +-- | 'configReferenceNetwork' Lens +configReferenceNetworkL :: Lens_' ConfigReference (Maybe Text) +configReferenceNetworkL f ConfigReference{..} = (\configReferenceNetwork -> ConfigReference { configReferenceNetwork, ..} ) <$> f configReferenceNetwork +{-# INLINE configReferenceNetworkL #-} + + + +-- * ConfigSpec + +-- | 'configSpecName' Lens +configSpecNameL :: Lens_' ConfigSpec (Maybe Text) +configSpecNameL f ConfigSpec{..} = (\configSpecName -> ConfigSpec { configSpecName, ..} ) <$> f configSpecName +{-# INLINE configSpecNameL #-} + +-- | 'configSpecLabels' Lens +configSpecLabelsL :: Lens_' ConfigSpec (Maybe (Map.Map String Text)) +configSpecLabelsL f ConfigSpec{..} = (\configSpecLabels -> ConfigSpec { configSpecLabels, ..} ) <$> f configSpecLabels +{-# INLINE configSpecLabelsL #-} + +-- | 'configSpecData' Lens +configSpecDataL :: Lens_' ConfigSpec (Maybe Text) +configSpecDataL f ConfigSpec{..} = (\configSpecData -> ConfigSpec { configSpecData, ..} ) <$> f configSpecData +{-# INLINE configSpecDataL #-} + +-- | 'configSpecTemplating' Lens +configSpecTemplatingL :: Lens_' ConfigSpec (Maybe Driver) +configSpecTemplatingL f ConfigSpec{..} = (\configSpecTemplating -> ConfigSpec { configSpecTemplating, ..} ) <$> f configSpecTemplating +{-# INLINE configSpecTemplatingL #-} + + + +-- * ContainerConfig + +-- | 'containerConfigHostname' Lens +containerConfigHostnameL :: Lens_' ContainerConfig (Maybe Text) +containerConfigHostnameL f ContainerConfig{..} = (\containerConfigHostname -> ContainerConfig { containerConfigHostname, ..} ) <$> f containerConfigHostname +{-# INLINE containerConfigHostnameL #-} + +-- | 'containerConfigDomainname' Lens +containerConfigDomainnameL :: Lens_' ContainerConfig (Maybe Text) +containerConfigDomainnameL f ContainerConfig{..} = (\containerConfigDomainname -> ContainerConfig { containerConfigDomainname, ..} ) <$> f containerConfigDomainname +{-# INLINE containerConfigDomainnameL #-} + +-- | 'containerConfigUser' Lens +containerConfigUserL :: Lens_' ContainerConfig (Maybe Text) +containerConfigUserL f ContainerConfig{..} = (\containerConfigUser -> ContainerConfig { containerConfigUser, ..} ) <$> f containerConfigUser +{-# INLINE containerConfigUserL #-} + +-- | 'containerConfigAttachStdin' Lens +containerConfigAttachStdinL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigAttachStdinL f ContainerConfig{..} = (\containerConfigAttachStdin -> ContainerConfig { containerConfigAttachStdin, ..} ) <$> f containerConfigAttachStdin +{-# INLINE containerConfigAttachStdinL #-} + +-- | 'containerConfigAttachStdout' Lens +containerConfigAttachStdoutL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigAttachStdoutL f ContainerConfig{..} = (\containerConfigAttachStdout -> ContainerConfig { containerConfigAttachStdout, ..} ) <$> f containerConfigAttachStdout +{-# INLINE containerConfigAttachStdoutL #-} + +-- | 'containerConfigAttachStderr' Lens +containerConfigAttachStderrL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigAttachStderrL f ContainerConfig{..} = (\containerConfigAttachStderr -> ContainerConfig { containerConfigAttachStderr, ..} ) <$> f containerConfigAttachStderr +{-# INLINE containerConfigAttachStderrL #-} + +-- | 'containerConfigExposedPorts' Lens +containerConfigExposedPortsL :: Lens_' ContainerConfig (Maybe (Map.Map String A.Value)) +containerConfigExposedPortsL f ContainerConfig{..} = (\containerConfigExposedPorts -> ContainerConfig { containerConfigExposedPorts, ..} ) <$> f containerConfigExposedPorts +{-# INLINE containerConfigExposedPortsL #-} + +-- | 'containerConfigTty' Lens +containerConfigTtyL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigTtyL f ContainerConfig{..} = (\containerConfigTty -> ContainerConfig { containerConfigTty, ..} ) <$> f containerConfigTty +{-# INLINE containerConfigTtyL #-} + +-- | 'containerConfigOpenStdin' Lens +containerConfigOpenStdinL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigOpenStdinL f ContainerConfig{..} = (\containerConfigOpenStdin -> ContainerConfig { containerConfigOpenStdin, ..} ) <$> f containerConfigOpenStdin +{-# INLINE containerConfigOpenStdinL #-} + +-- | 'containerConfigStdinOnce' Lens +containerConfigStdinOnceL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigStdinOnceL f ContainerConfig{..} = (\containerConfigStdinOnce -> ContainerConfig { containerConfigStdinOnce, ..} ) <$> f containerConfigStdinOnce +{-# INLINE containerConfigStdinOnceL #-} + +-- | 'containerConfigEnv' Lens +containerConfigEnvL :: Lens_' ContainerConfig (Maybe [Text]) +containerConfigEnvL f ContainerConfig{..} = (\containerConfigEnv -> ContainerConfig { containerConfigEnv, ..} ) <$> f containerConfigEnv +{-# INLINE containerConfigEnvL #-} + +-- | 'containerConfigCmd' Lens +containerConfigCmdL :: Lens_' ContainerConfig (Maybe [Text]) +containerConfigCmdL f ContainerConfig{..} = (\containerConfigCmd -> ContainerConfig { containerConfigCmd, ..} ) <$> f containerConfigCmd +{-# INLINE containerConfigCmdL #-} + +-- | 'containerConfigHealthcheck' Lens +containerConfigHealthcheckL :: Lens_' ContainerConfig (Maybe HealthConfig) +containerConfigHealthcheckL f ContainerConfig{..} = (\containerConfigHealthcheck -> ContainerConfig { containerConfigHealthcheck, ..} ) <$> f containerConfigHealthcheck +{-# INLINE containerConfigHealthcheckL #-} + +-- | 'containerConfigArgsEscaped' Lens +containerConfigArgsEscapedL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigArgsEscapedL f ContainerConfig{..} = (\containerConfigArgsEscaped -> ContainerConfig { containerConfigArgsEscaped, ..} ) <$> f containerConfigArgsEscaped +{-# INLINE containerConfigArgsEscapedL #-} + +-- | 'containerConfigImage' Lens +containerConfigImageL :: Lens_' ContainerConfig (Maybe Text) +containerConfigImageL f ContainerConfig{..} = (\containerConfigImage -> ContainerConfig { containerConfigImage, ..} ) <$> f containerConfigImage +{-# INLINE containerConfigImageL #-} + +-- | 'containerConfigVolumes' Lens +containerConfigVolumesL :: Lens_' ContainerConfig (Maybe (Map.Map String A.Value)) +containerConfigVolumesL f ContainerConfig{..} = (\containerConfigVolumes -> ContainerConfig { containerConfigVolumes, ..} ) <$> f containerConfigVolumes +{-# INLINE containerConfigVolumesL #-} + +-- | 'containerConfigWorkingDir' Lens +containerConfigWorkingDirL :: Lens_' ContainerConfig (Maybe Text) +containerConfigWorkingDirL f ContainerConfig{..} = (\containerConfigWorkingDir -> ContainerConfig { containerConfigWorkingDir, ..} ) <$> f containerConfigWorkingDir +{-# INLINE containerConfigWorkingDirL #-} + +-- | 'containerConfigEntrypoint' Lens +containerConfigEntrypointL :: Lens_' ContainerConfig (Maybe [Text]) +containerConfigEntrypointL f ContainerConfig{..} = (\containerConfigEntrypoint -> ContainerConfig { containerConfigEntrypoint, ..} ) <$> f containerConfigEntrypoint +{-# INLINE containerConfigEntrypointL #-} + +-- | 'containerConfigNetworkDisabled' Lens +containerConfigNetworkDisabledL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigNetworkDisabledL f ContainerConfig{..} = (\containerConfigNetworkDisabled -> ContainerConfig { containerConfigNetworkDisabled, ..} ) <$> f containerConfigNetworkDisabled +{-# INLINE containerConfigNetworkDisabledL #-} + +-- | 'containerConfigMacAddress' Lens +containerConfigMacAddressL :: Lens_' ContainerConfig (Maybe Text) +containerConfigMacAddressL f ContainerConfig{..} = (\containerConfigMacAddress -> ContainerConfig { containerConfigMacAddress, ..} ) <$> f containerConfigMacAddress +{-# INLINE containerConfigMacAddressL #-} + +-- | 'containerConfigOnBuild' Lens +containerConfigOnBuildL :: Lens_' ContainerConfig (Maybe [Text]) +containerConfigOnBuildL f ContainerConfig{..} = (\containerConfigOnBuild -> ContainerConfig { containerConfigOnBuild, ..} ) <$> f containerConfigOnBuild +{-# INLINE containerConfigOnBuildL #-} + +-- | 'containerConfigLabels' Lens +containerConfigLabelsL :: Lens_' ContainerConfig (Maybe (Map.Map String Text)) +containerConfigLabelsL f ContainerConfig{..} = (\containerConfigLabels -> ContainerConfig { containerConfigLabels, ..} ) <$> f containerConfigLabels +{-# INLINE containerConfigLabelsL #-} + +-- | 'containerConfigStopSignal' Lens +containerConfigStopSignalL :: Lens_' ContainerConfig (Maybe Text) +containerConfigStopSignalL f ContainerConfig{..} = (\containerConfigStopSignal -> ContainerConfig { containerConfigStopSignal, ..} ) <$> f containerConfigStopSignal +{-# INLINE containerConfigStopSignalL #-} + +-- | 'containerConfigStopTimeout' Lens +containerConfigStopTimeoutL :: Lens_' ContainerConfig (Maybe Int) +containerConfigStopTimeoutL f ContainerConfig{..} = (\containerConfigStopTimeout -> ContainerConfig { containerConfigStopTimeout, ..} ) <$> f containerConfigStopTimeout +{-# INLINE containerConfigStopTimeoutL #-} + +-- | 'containerConfigShell' Lens +containerConfigShellL :: Lens_' ContainerConfig (Maybe [Text]) +containerConfigShellL f ContainerConfig{..} = (\containerConfigShell -> ContainerConfig { containerConfigShell, ..} ) <$> f containerConfigShell +{-# INLINE containerConfigShellL #-} + + + +-- * ContainerCreateRequest + +-- | 'containerCreateRequestHostname' Lens +containerCreateRequestHostnameL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestHostnameL f ContainerCreateRequest{..} = (\containerCreateRequestHostname -> ContainerCreateRequest { containerCreateRequestHostname, ..} ) <$> f containerCreateRequestHostname +{-# INLINE containerCreateRequestHostnameL #-} + +-- | 'containerCreateRequestDomainname' Lens +containerCreateRequestDomainnameL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestDomainnameL f ContainerCreateRequest{..} = (\containerCreateRequestDomainname -> ContainerCreateRequest { containerCreateRequestDomainname, ..} ) <$> f containerCreateRequestDomainname +{-# INLINE containerCreateRequestDomainnameL #-} + +-- | 'containerCreateRequestUser' Lens +containerCreateRequestUserL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestUserL f ContainerCreateRequest{..} = (\containerCreateRequestUser -> ContainerCreateRequest { containerCreateRequestUser, ..} ) <$> f containerCreateRequestUser +{-# INLINE containerCreateRequestUserL #-} + +-- | 'containerCreateRequestAttachStdin' Lens +containerCreateRequestAttachStdinL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestAttachStdinL f ContainerCreateRequest{..} = (\containerCreateRequestAttachStdin -> ContainerCreateRequest { containerCreateRequestAttachStdin, ..} ) <$> f containerCreateRequestAttachStdin +{-# INLINE containerCreateRequestAttachStdinL #-} + +-- | 'containerCreateRequestAttachStdout' Lens +containerCreateRequestAttachStdoutL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestAttachStdoutL f ContainerCreateRequest{..} = (\containerCreateRequestAttachStdout -> ContainerCreateRequest { containerCreateRequestAttachStdout, ..} ) <$> f containerCreateRequestAttachStdout +{-# INLINE containerCreateRequestAttachStdoutL #-} + +-- | 'containerCreateRequestAttachStderr' Lens +containerCreateRequestAttachStderrL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestAttachStderrL f ContainerCreateRequest{..} = (\containerCreateRequestAttachStderr -> ContainerCreateRequest { containerCreateRequestAttachStderr, ..} ) <$> f containerCreateRequestAttachStderr +{-# INLINE containerCreateRequestAttachStderrL #-} + +-- | 'containerCreateRequestExposedPorts' Lens +containerCreateRequestExposedPortsL :: Lens_' ContainerCreateRequest (Maybe (Map.Map String A.Value)) +containerCreateRequestExposedPortsL f ContainerCreateRequest{..} = (\containerCreateRequestExposedPorts -> ContainerCreateRequest { containerCreateRequestExposedPorts, ..} ) <$> f containerCreateRequestExposedPorts +{-# INLINE containerCreateRequestExposedPortsL #-} + +-- | 'containerCreateRequestTty' Lens +containerCreateRequestTtyL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestTtyL f ContainerCreateRequest{..} = (\containerCreateRequestTty -> ContainerCreateRequest { containerCreateRequestTty, ..} ) <$> f containerCreateRequestTty +{-# INLINE containerCreateRequestTtyL #-} + +-- | 'containerCreateRequestOpenStdin' Lens +containerCreateRequestOpenStdinL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestOpenStdinL f ContainerCreateRequest{..} = (\containerCreateRequestOpenStdin -> ContainerCreateRequest { containerCreateRequestOpenStdin, ..} ) <$> f containerCreateRequestOpenStdin +{-# INLINE containerCreateRequestOpenStdinL #-} + +-- | 'containerCreateRequestStdinOnce' Lens +containerCreateRequestStdinOnceL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestStdinOnceL f ContainerCreateRequest{..} = (\containerCreateRequestStdinOnce -> ContainerCreateRequest { containerCreateRequestStdinOnce, ..} ) <$> f containerCreateRequestStdinOnce +{-# INLINE containerCreateRequestStdinOnceL #-} + +-- | 'containerCreateRequestEnv' Lens +containerCreateRequestEnvL :: Lens_' ContainerCreateRequest (Maybe [Text]) +containerCreateRequestEnvL f ContainerCreateRequest{..} = (\containerCreateRequestEnv -> ContainerCreateRequest { containerCreateRequestEnv, ..} ) <$> f containerCreateRequestEnv +{-# INLINE containerCreateRequestEnvL #-} + +-- | 'containerCreateRequestCmd' Lens +containerCreateRequestCmdL :: Lens_' ContainerCreateRequest (Maybe [Text]) +containerCreateRequestCmdL f ContainerCreateRequest{..} = (\containerCreateRequestCmd -> ContainerCreateRequest { containerCreateRequestCmd, ..} ) <$> f containerCreateRequestCmd +{-# INLINE containerCreateRequestCmdL #-} + +-- | 'containerCreateRequestHealthcheck' Lens +containerCreateRequestHealthcheckL :: Lens_' ContainerCreateRequest (Maybe HealthConfig) +containerCreateRequestHealthcheckL f ContainerCreateRequest{..} = (\containerCreateRequestHealthcheck -> ContainerCreateRequest { containerCreateRequestHealthcheck, ..} ) <$> f containerCreateRequestHealthcheck +{-# INLINE containerCreateRequestHealthcheckL #-} + +-- | 'containerCreateRequestArgsEscaped' Lens +containerCreateRequestArgsEscapedL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestArgsEscapedL f ContainerCreateRequest{..} = (\containerCreateRequestArgsEscaped -> ContainerCreateRequest { containerCreateRequestArgsEscaped, ..} ) <$> f containerCreateRequestArgsEscaped +{-# INLINE containerCreateRequestArgsEscapedL #-} + +-- | 'containerCreateRequestImage' Lens +containerCreateRequestImageL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestImageL f ContainerCreateRequest{..} = (\containerCreateRequestImage -> ContainerCreateRequest { containerCreateRequestImage, ..} ) <$> f containerCreateRequestImage +{-# INLINE containerCreateRequestImageL #-} + +-- | 'containerCreateRequestVolumes' Lens +containerCreateRequestVolumesL :: Lens_' ContainerCreateRequest (Maybe (Map.Map String A.Value)) +containerCreateRequestVolumesL f ContainerCreateRequest{..} = (\containerCreateRequestVolumes -> ContainerCreateRequest { containerCreateRequestVolumes, ..} ) <$> f containerCreateRequestVolumes +{-# INLINE containerCreateRequestVolumesL #-} + +-- | 'containerCreateRequestWorkingDir' Lens +containerCreateRequestWorkingDirL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestWorkingDirL f ContainerCreateRequest{..} = (\containerCreateRequestWorkingDir -> ContainerCreateRequest { containerCreateRequestWorkingDir, ..} ) <$> f containerCreateRequestWorkingDir +{-# INLINE containerCreateRequestWorkingDirL #-} + +-- | 'containerCreateRequestEntrypoint' Lens +containerCreateRequestEntrypointL :: Lens_' ContainerCreateRequest (Maybe [Text]) +containerCreateRequestEntrypointL f ContainerCreateRequest{..} = (\containerCreateRequestEntrypoint -> ContainerCreateRequest { containerCreateRequestEntrypoint, ..} ) <$> f containerCreateRequestEntrypoint +{-# INLINE containerCreateRequestEntrypointL #-} + +-- | 'containerCreateRequestNetworkDisabled' Lens +containerCreateRequestNetworkDisabledL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestNetworkDisabledL f ContainerCreateRequest{..} = (\containerCreateRequestNetworkDisabled -> ContainerCreateRequest { containerCreateRequestNetworkDisabled, ..} ) <$> f containerCreateRequestNetworkDisabled +{-# INLINE containerCreateRequestNetworkDisabledL #-} + +-- | 'containerCreateRequestMacAddress' Lens +containerCreateRequestMacAddressL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestMacAddressL f ContainerCreateRequest{..} = (\containerCreateRequestMacAddress -> ContainerCreateRequest { containerCreateRequestMacAddress, ..} ) <$> f containerCreateRequestMacAddress +{-# INLINE containerCreateRequestMacAddressL #-} + +-- | 'containerCreateRequestOnBuild' Lens +containerCreateRequestOnBuildL :: Lens_' ContainerCreateRequest (Maybe [Text]) +containerCreateRequestOnBuildL f ContainerCreateRequest{..} = (\containerCreateRequestOnBuild -> ContainerCreateRequest { containerCreateRequestOnBuild, ..} ) <$> f containerCreateRequestOnBuild +{-# INLINE containerCreateRequestOnBuildL #-} + +-- | 'containerCreateRequestLabels' Lens +containerCreateRequestLabelsL :: Lens_' ContainerCreateRequest (Maybe (Map.Map String Text)) +containerCreateRequestLabelsL f ContainerCreateRequest{..} = (\containerCreateRequestLabels -> ContainerCreateRequest { containerCreateRequestLabels, ..} ) <$> f containerCreateRequestLabels +{-# INLINE containerCreateRequestLabelsL #-} + +-- | 'containerCreateRequestStopSignal' Lens +containerCreateRequestStopSignalL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestStopSignalL f ContainerCreateRequest{..} = (\containerCreateRequestStopSignal -> ContainerCreateRequest { containerCreateRequestStopSignal, ..} ) <$> f containerCreateRequestStopSignal +{-# INLINE containerCreateRequestStopSignalL #-} + +-- | 'containerCreateRequestStopTimeout' Lens +containerCreateRequestStopTimeoutL :: Lens_' ContainerCreateRequest (Maybe Int) +containerCreateRequestStopTimeoutL f ContainerCreateRequest{..} = (\containerCreateRequestStopTimeout -> ContainerCreateRequest { containerCreateRequestStopTimeout, ..} ) <$> f containerCreateRequestStopTimeout +{-# INLINE containerCreateRequestStopTimeoutL #-} + +-- | 'containerCreateRequestShell' Lens +containerCreateRequestShellL :: Lens_' ContainerCreateRequest (Maybe [Text]) +containerCreateRequestShellL f ContainerCreateRequest{..} = (\containerCreateRequestShell -> ContainerCreateRequest { containerCreateRequestShell, ..} ) <$> f containerCreateRequestShell +{-# INLINE containerCreateRequestShellL #-} + +-- | 'containerCreateRequestHostConfig' Lens +containerCreateRequestHostConfigL :: Lens_' ContainerCreateRequest (Maybe HostConfig) +containerCreateRequestHostConfigL f ContainerCreateRequest{..} = (\containerCreateRequestHostConfig -> ContainerCreateRequest { containerCreateRequestHostConfig, ..} ) <$> f containerCreateRequestHostConfig +{-# INLINE containerCreateRequestHostConfigL #-} + +-- | 'containerCreateRequestNetworkingConfig' Lens +containerCreateRequestNetworkingConfigL :: Lens_' ContainerCreateRequest (Maybe NetworkingConfig) +containerCreateRequestNetworkingConfigL f ContainerCreateRequest{..} = (\containerCreateRequestNetworkingConfig -> ContainerCreateRequest { containerCreateRequestNetworkingConfig, ..} ) <$> f containerCreateRequestNetworkingConfig +{-# INLINE containerCreateRequestNetworkingConfigL #-} + + + +-- * ContainerCreateResponse + +-- | 'containerCreateResponseId' Lens +containerCreateResponseIdL :: Lens_' ContainerCreateResponse (Text) +containerCreateResponseIdL f ContainerCreateResponse{..} = (\containerCreateResponseId -> ContainerCreateResponse { containerCreateResponseId, ..} ) <$> f containerCreateResponseId +{-# INLINE containerCreateResponseIdL #-} + +-- | 'containerCreateResponseWarnings' Lens +containerCreateResponseWarningsL :: Lens_' ContainerCreateResponse ([Text]) +containerCreateResponseWarningsL f ContainerCreateResponse{..} = (\containerCreateResponseWarnings -> ContainerCreateResponse { containerCreateResponseWarnings, ..} ) <$> f containerCreateResponseWarnings +{-# INLINE containerCreateResponseWarningsL #-} + + + +-- * ContainerInspectResponse + +-- | 'containerInspectResponseId' Lens +containerInspectResponseIdL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseIdL f ContainerInspectResponse{..} = (\containerInspectResponseId -> ContainerInspectResponse { containerInspectResponseId, ..} ) <$> f containerInspectResponseId +{-# INLINE containerInspectResponseIdL #-} + +-- | 'containerInspectResponseCreated' Lens +containerInspectResponseCreatedL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseCreatedL f ContainerInspectResponse{..} = (\containerInspectResponseCreated -> ContainerInspectResponse { containerInspectResponseCreated, ..} ) <$> f containerInspectResponseCreated +{-# INLINE containerInspectResponseCreatedL #-} + +-- | 'containerInspectResponsePath' Lens +containerInspectResponsePathL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponsePathL f ContainerInspectResponse{..} = (\containerInspectResponsePath -> ContainerInspectResponse { containerInspectResponsePath, ..} ) <$> f containerInspectResponsePath +{-# INLINE containerInspectResponsePathL #-} + +-- | 'containerInspectResponseArgs' Lens +containerInspectResponseArgsL :: Lens_' ContainerInspectResponse (Maybe [Text]) +containerInspectResponseArgsL f ContainerInspectResponse{..} = (\containerInspectResponseArgs -> ContainerInspectResponse { containerInspectResponseArgs, ..} ) <$> f containerInspectResponseArgs +{-# INLINE containerInspectResponseArgsL #-} + +-- | 'containerInspectResponseState' Lens +containerInspectResponseStateL :: Lens_' ContainerInspectResponse (Maybe ContainerState) +containerInspectResponseStateL f ContainerInspectResponse{..} = (\containerInspectResponseState -> ContainerInspectResponse { containerInspectResponseState, ..} ) <$> f containerInspectResponseState +{-# INLINE containerInspectResponseStateL #-} + +-- | 'containerInspectResponseImage' Lens +containerInspectResponseImageL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseImageL f ContainerInspectResponse{..} = (\containerInspectResponseImage -> ContainerInspectResponse { containerInspectResponseImage, ..} ) <$> f containerInspectResponseImage +{-# INLINE containerInspectResponseImageL #-} + +-- | 'containerInspectResponseResolvConfPath' Lens +containerInspectResponseResolvConfPathL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseResolvConfPathL f ContainerInspectResponse{..} = (\containerInspectResponseResolvConfPath -> ContainerInspectResponse { containerInspectResponseResolvConfPath, ..} ) <$> f containerInspectResponseResolvConfPath +{-# INLINE containerInspectResponseResolvConfPathL #-} + +-- | 'containerInspectResponseHostnamePath' Lens +containerInspectResponseHostnamePathL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseHostnamePathL f ContainerInspectResponse{..} = (\containerInspectResponseHostnamePath -> ContainerInspectResponse { containerInspectResponseHostnamePath, ..} ) <$> f containerInspectResponseHostnamePath +{-# INLINE containerInspectResponseHostnamePathL #-} + +-- | 'containerInspectResponseHostsPath' Lens +containerInspectResponseHostsPathL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseHostsPathL f ContainerInspectResponse{..} = (\containerInspectResponseHostsPath -> ContainerInspectResponse { containerInspectResponseHostsPath, ..} ) <$> f containerInspectResponseHostsPath +{-# INLINE containerInspectResponseHostsPathL #-} + +-- | 'containerInspectResponseLogPath' Lens +containerInspectResponseLogPathL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseLogPathL f ContainerInspectResponse{..} = (\containerInspectResponseLogPath -> ContainerInspectResponse { containerInspectResponseLogPath, ..} ) <$> f containerInspectResponseLogPath +{-# INLINE containerInspectResponseLogPathL #-} + +-- | 'containerInspectResponseName' Lens +containerInspectResponseNameL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseNameL f ContainerInspectResponse{..} = (\containerInspectResponseName -> ContainerInspectResponse { containerInspectResponseName, ..} ) <$> f containerInspectResponseName +{-# INLINE containerInspectResponseNameL #-} + +-- | 'containerInspectResponseRestartCount' Lens +containerInspectResponseRestartCountL :: Lens_' ContainerInspectResponse (Maybe Int) +containerInspectResponseRestartCountL f ContainerInspectResponse{..} = (\containerInspectResponseRestartCount -> ContainerInspectResponse { containerInspectResponseRestartCount, ..} ) <$> f containerInspectResponseRestartCount +{-# INLINE containerInspectResponseRestartCountL #-} + +-- | 'containerInspectResponseDriver' Lens +containerInspectResponseDriverL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseDriverL f ContainerInspectResponse{..} = (\containerInspectResponseDriver -> ContainerInspectResponse { containerInspectResponseDriver, ..} ) <$> f containerInspectResponseDriver +{-# INLINE containerInspectResponseDriverL #-} + +-- | 'containerInspectResponsePlatform' Lens +containerInspectResponsePlatformL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponsePlatformL f ContainerInspectResponse{..} = (\containerInspectResponsePlatform -> ContainerInspectResponse { containerInspectResponsePlatform, ..} ) <$> f containerInspectResponsePlatform +{-# INLINE containerInspectResponsePlatformL #-} + +-- | 'containerInspectResponseMountLabel' Lens +containerInspectResponseMountLabelL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseMountLabelL f ContainerInspectResponse{..} = (\containerInspectResponseMountLabel -> ContainerInspectResponse { containerInspectResponseMountLabel, ..} ) <$> f containerInspectResponseMountLabel +{-# INLINE containerInspectResponseMountLabelL #-} + +-- | 'containerInspectResponseProcessLabel' Lens +containerInspectResponseProcessLabelL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseProcessLabelL f ContainerInspectResponse{..} = (\containerInspectResponseProcessLabel -> ContainerInspectResponse { containerInspectResponseProcessLabel, ..} ) <$> f containerInspectResponseProcessLabel +{-# INLINE containerInspectResponseProcessLabelL #-} + +-- | 'containerInspectResponseAppArmorProfile' Lens +containerInspectResponseAppArmorProfileL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseAppArmorProfileL f ContainerInspectResponse{..} = (\containerInspectResponseAppArmorProfile -> ContainerInspectResponse { containerInspectResponseAppArmorProfile, ..} ) <$> f containerInspectResponseAppArmorProfile +{-# INLINE containerInspectResponseAppArmorProfileL #-} + +-- | 'containerInspectResponseExecIds' Lens +containerInspectResponseExecIdsL :: Lens_' ContainerInspectResponse (Maybe [Text]) +containerInspectResponseExecIdsL f ContainerInspectResponse{..} = (\containerInspectResponseExecIds -> ContainerInspectResponse { containerInspectResponseExecIds, ..} ) <$> f containerInspectResponseExecIds +{-# INLINE containerInspectResponseExecIdsL #-} + +-- | 'containerInspectResponseHostConfig' Lens +containerInspectResponseHostConfigL :: Lens_' ContainerInspectResponse (Maybe HostConfig) +containerInspectResponseHostConfigL f ContainerInspectResponse{..} = (\containerInspectResponseHostConfig -> ContainerInspectResponse { containerInspectResponseHostConfig, ..} ) <$> f containerInspectResponseHostConfig +{-# INLINE containerInspectResponseHostConfigL #-} + +-- | 'containerInspectResponseGraphDriver' Lens +containerInspectResponseGraphDriverL :: Lens_' ContainerInspectResponse (Maybe GraphDriverData) +containerInspectResponseGraphDriverL f ContainerInspectResponse{..} = (\containerInspectResponseGraphDriver -> ContainerInspectResponse { containerInspectResponseGraphDriver, ..} ) <$> f containerInspectResponseGraphDriver +{-# INLINE containerInspectResponseGraphDriverL #-} + +-- | 'containerInspectResponseSizeRw' Lens +containerInspectResponseSizeRwL :: Lens_' ContainerInspectResponse (Maybe Integer) +containerInspectResponseSizeRwL f ContainerInspectResponse{..} = (\containerInspectResponseSizeRw -> ContainerInspectResponse { containerInspectResponseSizeRw, ..} ) <$> f containerInspectResponseSizeRw +{-# INLINE containerInspectResponseSizeRwL #-} + +-- | 'containerInspectResponseSizeRootFs' Lens +containerInspectResponseSizeRootFsL :: Lens_' ContainerInspectResponse (Maybe Integer) +containerInspectResponseSizeRootFsL f ContainerInspectResponse{..} = (\containerInspectResponseSizeRootFs -> ContainerInspectResponse { containerInspectResponseSizeRootFs, ..} ) <$> f containerInspectResponseSizeRootFs +{-# INLINE containerInspectResponseSizeRootFsL #-} + +-- | 'containerInspectResponseMounts' Lens +containerInspectResponseMountsL :: Lens_' ContainerInspectResponse (Maybe [MountPoint]) +containerInspectResponseMountsL f ContainerInspectResponse{..} = (\containerInspectResponseMounts -> ContainerInspectResponse { containerInspectResponseMounts, ..} ) <$> f containerInspectResponseMounts +{-# INLINE containerInspectResponseMountsL #-} + +-- | 'containerInspectResponseConfig' Lens +containerInspectResponseConfigL :: Lens_' ContainerInspectResponse (Maybe ContainerConfig) +containerInspectResponseConfigL f ContainerInspectResponse{..} = (\containerInspectResponseConfig -> ContainerInspectResponse { containerInspectResponseConfig, ..} ) <$> f containerInspectResponseConfig +{-# INLINE containerInspectResponseConfigL #-} + +-- | 'containerInspectResponseNetworkSettings' Lens +containerInspectResponseNetworkSettingsL :: Lens_' ContainerInspectResponse (Maybe NetworkSettings) +containerInspectResponseNetworkSettingsL f ContainerInspectResponse{..} = (\containerInspectResponseNetworkSettings -> ContainerInspectResponse { containerInspectResponseNetworkSettings, ..} ) <$> f containerInspectResponseNetworkSettings +{-# INLINE containerInspectResponseNetworkSettingsL #-} + + + +-- * ContainerPruneResponse + +-- | 'containerPruneResponseContainersDeleted' Lens +containerPruneResponseContainersDeletedL :: Lens_' ContainerPruneResponse (Maybe [Text]) +containerPruneResponseContainersDeletedL f ContainerPruneResponse{..} = (\containerPruneResponseContainersDeleted -> ContainerPruneResponse { containerPruneResponseContainersDeleted, ..} ) <$> f containerPruneResponseContainersDeleted +{-# INLINE containerPruneResponseContainersDeletedL #-} + +-- | 'containerPruneResponseSpaceReclaimed' Lens +containerPruneResponseSpaceReclaimedL :: Lens_' ContainerPruneResponse (Maybe Integer) +containerPruneResponseSpaceReclaimedL f ContainerPruneResponse{..} = (\containerPruneResponseSpaceReclaimed -> ContainerPruneResponse { containerPruneResponseSpaceReclaimed, ..} ) <$> f containerPruneResponseSpaceReclaimed +{-# INLINE containerPruneResponseSpaceReclaimedL #-} + + + +-- * ContainerState + +-- | 'containerStateStatus' Lens +containerStateStatusL :: Lens_' ContainerState (Maybe E'Status2) +containerStateStatusL f ContainerState{..} = (\containerStateStatus -> ContainerState { containerStateStatus, ..} ) <$> f containerStateStatus +{-# INLINE containerStateStatusL #-} + +-- | 'containerStateRunning' Lens +containerStateRunningL :: Lens_' ContainerState (Maybe Bool) +containerStateRunningL f ContainerState{..} = (\containerStateRunning -> ContainerState { containerStateRunning, ..} ) <$> f containerStateRunning +{-# INLINE containerStateRunningL #-} + +-- | 'containerStatePaused' Lens +containerStatePausedL :: Lens_' ContainerState (Maybe Bool) +containerStatePausedL f ContainerState{..} = (\containerStatePaused -> ContainerState { containerStatePaused, ..} ) <$> f containerStatePaused +{-# INLINE containerStatePausedL #-} + +-- | 'containerStateRestarting' Lens +containerStateRestartingL :: Lens_' ContainerState (Maybe Bool) +containerStateRestartingL f ContainerState{..} = (\containerStateRestarting -> ContainerState { containerStateRestarting, ..} ) <$> f containerStateRestarting +{-# INLINE containerStateRestartingL #-} + +-- | 'containerStateOomKilled' Lens +containerStateOomKilledL :: Lens_' ContainerState (Maybe Bool) +containerStateOomKilledL f ContainerState{..} = (\containerStateOomKilled -> ContainerState { containerStateOomKilled, ..} ) <$> f containerStateOomKilled +{-# INLINE containerStateOomKilledL #-} + +-- | 'containerStateDead' Lens +containerStateDeadL :: Lens_' ContainerState (Maybe Bool) +containerStateDeadL f ContainerState{..} = (\containerStateDead -> ContainerState { containerStateDead, ..} ) <$> f containerStateDead +{-# INLINE containerStateDeadL #-} + +-- | 'containerStatePid' Lens +containerStatePidL :: Lens_' ContainerState (Maybe Int) +containerStatePidL f ContainerState{..} = (\containerStatePid -> ContainerState { containerStatePid, ..} ) <$> f containerStatePid +{-# INLINE containerStatePidL #-} + +-- | 'containerStateExitCode' Lens +containerStateExitCodeL :: Lens_' ContainerState (Maybe Int) +containerStateExitCodeL f ContainerState{..} = (\containerStateExitCode -> ContainerState { containerStateExitCode, ..} ) <$> f containerStateExitCode +{-# INLINE containerStateExitCodeL #-} + +-- | 'containerStateError' Lens +containerStateErrorL :: Lens_' ContainerState (Maybe Text) +containerStateErrorL f ContainerState{..} = (\containerStateError -> ContainerState { containerStateError, ..} ) <$> f containerStateError +{-# INLINE containerStateErrorL #-} + +-- | 'containerStateStartedAt' Lens +containerStateStartedAtL :: Lens_' ContainerState (Maybe Text) +containerStateStartedAtL f ContainerState{..} = (\containerStateStartedAt -> ContainerState { containerStateStartedAt, ..} ) <$> f containerStateStartedAt +{-# INLINE containerStateStartedAtL #-} + +-- | 'containerStateFinishedAt' Lens +containerStateFinishedAtL :: Lens_' ContainerState (Maybe Text) +containerStateFinishedAtL f ContainerState{..} = (\containerStateFinishedAt -> ContainerState { containerStateFinishedAt, ..} ) <$> f containerStateFinishedAt +{-# INLINE containerStateFinishedAtL #-} + +-- | 'containerStateHealth' Lens +containerStateHealthL :: Lens_' ContainerState (Maybe Health) +containerStateHealthL f ContainerState{..} = (\containerStateHealth -> ContainerState { containerStateHealth, ..} ) <$> f containerStateHealth +{-# INLINE containerStateHealthL #-} + + + +-- * ContainerStatus + +-- | 'containerStatusContainerId' Lens +containerStatusContainerIdL :: Lens_' ContainerStatus (Maybe Text) +containerStatusContainerIdL f ContainerStatus{..} = (\containerStatusContainerId -> ContainerStatus { containerStatusContainerId, ..} ) <$> f containerStatusContainerId +{-# INLINE containerStatusContainerIdL #-} + +-- | 'containerStatusPid' Lens +containerStatusPidL :: Lens_' ContainerStatus (Maybe Int) +containerStatusPidL f ContainerStatus{..} = (\containerStatusPid -> ContainerStatus { containerStatusPid, ..} ) <$> f containerStatusPid +{-# INLINE containerStatusPidL #-} + +-- | 'containerStatusExitCode' Lens +containerStatusExitCodeL :: Lens_' ContainerStatus (Maybe Int) +containerStatusExitCodeL f ContainerStatus{..} = (\containerStatusExitCode -> ContainerStatus { containerStatusExitCode, ..} ) <$> f containerStatusExitCode +{-# INLINE containerStatusExitCodeL #-} + + + +-- * ContainerSummary + +-- | 'containerSummaryId' Lens +containerSummaryIdL :: Lens_' ContainerSummary (Maybe Text) +containerSummaryIdL f ContainerSummary{..} = (\containerSummaryId -> ContainerSummary { containerSummaryId, ..} ) <$> f containerSummaryId +{-# INLINE containerSummaryIdL #-} + +-- | 'containerSummaryNames' Lens +containerSummaryNamesL :: Lens_' ContainerSummary (Maybe [Text]) +containerSummaryNamesL f ContainerSummary{..} = (\containerSummaryNames -> ContainerSummary { containerSummaryNames, ..} ) <$> f containerSummaryNames +{-# INLINE containerSummaryNamesL #-} + +-- | 'containerSummaryImage' Lens +containerSummaryImageL :: Lens_' ContainerSummary (Maybe Text) +containerSummaryImageL f ContainerSummary{..} = (\containerSummaryImage -> ContainerSummary { containerSummaryImage, ..} ) <$> f containerSummaryImage +{-# INLINE containerSummaryImageL #-} + +-- | 'containerSummaryImageId' Lens +containerSummaryImageIdL :: Lens_' ContainerSummary (Maybe Text) +containerSummaryImageIdL f ContainerSummary{..} = (\containerSummaryImageId -> ContainerSummary { containerSummaryImageId, ..} ) <$> f containerSummaryImageId +{-# INLINE containerSummaryImageIdL #-} + +-- | 'containerSummaryCommand' Lens +containerSummaryCommandL :: Lens_' ContainerSummary (Maybe Text) +containerSummaryCommandL f ContainerSummary{..} = (\containerSummaryCommand -> ContainerSummary { containerSummaryCommand, ..} ) <$> f containerSummaryCommand +{-# INLINE containerSummaryCommandL #-} + +-- | 'containerSummaryCreated' Lens +containerSummaryCreatedL :: Lens_' ContainerSummary (Maybe Integer) +containerSummaryCreatedL f ContainerSummary{..} = (\containerSummaryCreated -> ContainerSummary { containerSummaryCreated, ..} ) <$> f containerSummaryCreated +{-# INLINE containerSummaryCreatedL #-} + +-- | 'containerSummaryPorts' Lens +containerSummaryPortsL :: Lens_' ContainerSummary (Maybe [Port]) +containerSummaryPortsL f ContainerSummary{..} = (\containerSummaryPorts -> ContainerSummary { containerSummaryPorts, ..} ) <$> f containerSummaryPorts +{-# INLINE containerSummaryPortsL #-} + +-- | 'containerSummarySizeRw' Lens +containerSummarySizeRwL :: Lens_' ContainerSummary (Maybe Integer) +containerSummarySizeRwL f ContainerSummary{..} = (\containerSummarySizeRw -> ContainerSummary { containerSummarySizeRw, ..} ) <$> f containerSummarySizeRw +{-# INLINE containerSummarySizeRwL #-} + +-- | 'containerSummarySizeRootFs' Lens +containerSummarySizeRootFsL :: Lens_' ContainerSummary (Maybe Integer) +containerSummarySizeRootFsL f ContainerSummary{..} = (\containerSummarySizeRootFs -> ContainerSummary { containerSummarySizeRootFs, ..} ) <$> f containerSummarySizeRootFs +{-# INLINE containerSummarySizeRootFsL #-} + +-- | 'containerSummaryLabels' Lens +containerSummaryLabelsL :: Lens_' ContainerSummary (Maybe (Map.Map String Text)) +containerSummaryLabelsL f ContainerSummary{..} = (\containerSummaryLabels -> ContainerSummary { containerSummaryLabels, ..} ) <$> f containerSummaryLabels +{-# INLINE containerSummaryLabelsL #-} + +-- | 'containerSummaryState' Lens +containerSummaryStateL :: Lens_' ContainerSummary (Maybe Text) +containerSummaryStateL f ContainerSummary{..} = (\containerSummaryState -> ContainerSummary { containerSummaryState, ..} ) <$> f containerSummaryState +{-# INLINE containerSummaryStateL #-} + +-- | 'containerSummaryStatus' Lens +containerSummaryStatusL :: Lens_' ContainerSummary (Maybe Text) +containerSummaryStatusL f ContainerSummary{..} = (\containerSummaryStatus -> ContainerSummary { containerSummaryStatus, ..} ) <$> f containerSummaryStatus +{-# INLINE containerSummaryStatusL #-} + +-- | 'containerSummaryHostConfig' Lens +containerSummaryHostConfigL :: Lens_' ContainerSummary (Maybe ContainerSummaryHostConfig) +containerSummaryHostConfigL f ContainerSummary{..} = (\containerSummaryHostConfig -> ContainerSummary { containerSummaryHostConfig, ..} ) <$> f containerSummaryHostConfig +{-# INLINE containerSummaryHostConfigL #-} + +-- | 'containerSummaryNetworkSettings' Lens +containerSummaryNetworkSettingsL :: Lens_' ContainerSummary (Maybe ContainerSummaryNetworkSettings) +containerSummaryNetworkSettingsL f ContainerSummary{..} = (\containerSummaryNetworkSettings -> ContainerSummary { containerSummaryNetworkSettings, ..} ) <$> f containerSummaryNetworkSettings +{-# INLINE containerSummaryNetworkSettingsL #-} + +-- | 'containerSummaryMounts' Lens +containerSummaryMountsL :: Lens_' ContainerSummary (Maybe [MountPoint]) +containerSummaryMountsL f ContainerSummary{..} = (\containerSummaryMounts -> ContainerSummary { containerSummaryMounts, ..} ) <$> f containerSummaryMounts +{-# INLINE containerSummaryMountsL #-} + + + +-- * ContainerSummaryHostConfig + +-- | 'containerSummaryHostConfigNetworkMode' Lens +containerSummaryHostConfigNetworkModeL :: Lens_' ContainerSummaryHostConfig (Maybe Text) +containerSummaryHostConfigNetworkModeL f ContainerSummaryHostConfig{..} = (\containerSummaryHostConfigNetworkMode -> ContainerSummaryHostConfig { containerSummaryHostConfigNetworkMode, ..} ) <$> f containerSummaryHostConfigNetworkMode +{-# INLINE containerSummaryHostConfigNetworkModeL #-} + + + +-- * ContainerSummaryNetworkSettings + +-- | 'containerSummaryNetworkSettingsNetworks' Lens +containerSummaryNetworkSettingsNetworksL :: Lens_' ContainerSummaryNetworkSettings (Maybe (Map.Map String EndpointSettings)) +containerSummaryNetworkSettingsNetworksL f ContainerSummaryNetworkSettings{..} = (\containerSummaryNetworkSettingsNetworks -> ContainerSummaryNetworkSettings { containerSummaryNetworkSettingsNetworks, ..} ) <$> f containerSummaryNetworkSettingsNetworks +{-# INLINE containerSummaryNetworkSettingsNetworksL #-} + + + +-- * ContainerTopResponse + +-- | 'containerTopResponseTitles' Lens +containerTopResponseTitlesL :: Lens_' ContainerTopResponse (Maybe [Text]) +containerTopResponseTitlesL f ContainerTopResponse{..} = (\containerTopResponseTitles -> ContainerTopResponse { containerTopResponseTitles, ..} ) <$> f containerTopResponseTitles +{-# INLINE containerTopResponseTitlesL #-} + +-- | 'containerTopResponseProcesses' Lens +containerTopResponseProcessesL :: Lens_' ContainerTopResponse (Maybe [[Text]]) +containerTopResponseProcessesL f ContainerTopResponse{..} = (\containerTopResponseProcesses -> ContainerTopResponse { containerTopResponseProcesses, ..} ) <$> f containerTopResponseProcesses +{-# INLINE containerTopResponseProcessesL #-} + + + +-- * ContainerUpdateRequest + +-- | 'containerUpdateRequestCpuShares' Lens +containerUpdateRequestCpuSharesL :: Lens_' ContainerUpdateRequest (Maybe Int) +containerUpdateRequestCpuSharesL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuShares -> ContainerUpdateRequest { containerUpdateRequestCpuShares, ..} ) <$> f containerUpdateRequestCpuShares +{-# INLINE containerUpdateRequestCpuSharesL #-} + +-- | 'containerUpdateRequestMemory' Lens +containerUpdateRequestMemoryL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestMemoryL f ContainerUpdateRequest{..} = (\containerUpdateRequestMemory -> ContainerUpdateRequest { containerUpdateRequestMemory, ..} ) <$> f containerUpdateRequestMemory +{-# INLINE containerUpdateRequestMemoryL #-} + +-- | 'containerUpdateRequestCgroupParent' Lens +containerUpdateRequestCgroupParentL :: Lens_' ContainerUpdateRequest (Maybe Text) +containerUpdateRequestCgroupParentL f ContainerUpdateRequest{..} = (\containerUpdateRequestCgroupParent -> ContainerUpdateRequest { containerUpdateRequestCgroupParent, ..} ) <$> f containerUpdateRequestCgroupParent +{-# INLINE containerUpdateRequestCgroupParentL #-} + +-- | 'containerUpdateRequestBlkioWeight' Lens +containerUpdateRequestBlkioWeightL :: Lens_' ContainerUpdateRequest (Maybe Int) +containerUpdateRequestBlkioWeightL f ContainerUpdateRequest{..} = (\containerUpdateRequestBlkioWeight -> ContainerUpdateRequest { containerUpdateRequestBlkioWeight, ..} ) <$> f containerUpdateRequestBlkioWeight +{-# INLINE containerUpdateRequestBlkioWeightL #-} + +-- | 'containerUpdateRequestBlkioWeightDevice' Lens +containerUpdateRequestBlkioWeightDeviceL :: Lens_' ContainerUpdateRequest (Maybe [ResourcesBlkioWeightDeviceInner]) +containerUpdateRequestBlkioWeightDeviceL f ContainerUpdateRequest{..} = (\containerUpdateRequestBlkioWeightDevice -> ContainerUpdateRequest { containerUpdateRequestBlkioWeightDevice, ..} ) <$> f containerUpdateRequestBlkioWeightDevice +{-# INLINE containerUpdateRequestBlkioWeightDeviceL #-} + +-- | 'containerUpdateRequestBlkioDeviceReadBps' Lens +containerUpdateRequestBlkioDeviceReadBpsL :: Lens_' ContainerUpdateRequest (Maybe [ThrottleDevice]) +containerUpdateRequestBlkioDeviceReadBpsL f ContainerUpdateRequest{..} = (\containerUpdateRequestBlkioDeviceReadBps -> ContainerUpdateRequest { containerUpdateRequestBlkioDeviceReadBps, ..} ) <$> f containerUpdateRequestBlkioDeviceReadBps +{-# INLINE containerUpdateRequestBlkioDeviceReadBpsL #-} + +-- | 'containerUpdateRequestBlkioDeviceWriteBps' Lens +containerUpdateRequestBlkioDeviceWriteBpsL :: Lens_' ContainerUpdateRequest (Maybe [ThrottleDevice]) +containerUpdateRequestBlkioDeviceWriteBpsL f ContainerUpdateRequest{..} = (\containerUpdateRequestBlkioDeviceWriteBps -> ContainerUpdateRequest { containerUpdateRequestBlkioDeviceWriteBps, ..} ) <$> f containerUpdateRequestBlkioDeviceWriteBps +{-# INLINE containerUpdateRequestBlkioDeviceWriteBpsL #-} + +-- | 'containerUpdateRequestBlkioDeviceReadIOps' Lens +containerUpdateRequestBlkioDeviceReadIOpsL :: Lens_' ContainerUpdateRequest (Maybe [ThrottleDevice]) +containerUpdateRequestBlkioDeviceReadIOpsL f ContainerUpdateRequest{..} = (\containerUpdateRequestBlkioDeviceReadIOps -> ContainerUpdateRequest { containerUpdateRequestBlkioDeviceReadIOps, ..} ) <$> f containerUpdateRequestBlkioDeviceReadIOps +{-# INLINE containerUpdateRequestBlkioDeviceReadIOpsL #-} + +-- | 'containerUpdateRequestBlkioDeviceWriteIOps' Lens +containerUpdateRequestBlkioDeviceWriteIOpsL :: Lens_' ContainerUpdateRequest (Maybe [ThrottleDevice]) +containerUpdateRequestBlkioDeviceWriteIOpsL f ContainerUpdateRequest{..} = (\containerUpdateRequestBlkioDeviceWriteIOps -> ContainerUpdateRequest { containerUpdateRequestBlkioDeviceWriteIOps, ..} ) <$> f containerUpdateRequestBlkioDeviceWriteIOps +{-# INLINE containerUpdateRequestBlkioDeviceWriteIOpsL #-} + +-- | 'containerUpdateRequestCpuPeriod' Lens +containerUpdateRequestCpuPeriodL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestCpuPeriodL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuPeriod -> ContainerUpdateRequest { containerUpdateRequestCpuPeriod, ..} ) <$> f containerUpdateRequestCpuPeriod +{-# INLINE containerUpdateRequestCpuPeriodL #-} + +-- | 'containerUpdateRequestCpuQuota' Lens +containerUpdateRequestCpuQuotaL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestCpuQuotaL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuQuota -> ContainerUpdateRequest { containerUpdateRequestCpuQuota, ..} ) <$> f containerUpdateRequestCpuQuota +{-# INLINE containerUpdateRequestCpuQuotaL #-} + +-- | 'containerUpdateRequestCpuRealtimePeriod' Lens +containerUpdateRequestCpuRealtimePeriodL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestCpuRealtimePeriodL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuRealtimePeriod -> ContainerUpdateRequest { containerUpdateRequestCpuRealtimePeriod, ..} ) <$> f containerUpdateRequestCpuRealtimePeriod +{-# INLINE containerUpdateRequestCpuRealtimePeriodL #-} + +-- | 'containerUpdateRequestCpuRealtimeRuntime' Lens +containerUpdateRequestCpuRealtimeRuntimeL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestCpuRealtimeRuntimeL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuRealtimeRuntime -> ContainerUpdateRequest { containerUpdateRequestCpuRealtimeRuntime, ..} ) <$> f containerUpdateRequestCpuRealtimeRuntime +{-# INLINE containerUpdateRequestCpuRealtimeRuntimeL #-} + +-- | 'containerUpdateRequestCpusetCpus' Lens +containerUpdateRequestCpusetCpusL :: Lens_' ContainerUpdateRequest (Maybe Text) +containerUpdateRequestCpusetCpusL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpusetCpus -> ContainerUpdateRequest { containerUpdateRequestCpusetCpus, ..} ) <$> f containerUpdateRequestCpusetCpus +{-# INLINE containerUpdateRequestCpusetCpusL #-} + +-- | 'containerUpdateRequestCpusetMems' Lens +containerUpdateRequestCpusetMemsL :: Lens_' ContainerUpdateRequest (Maybe Text) +containerUpdateRequestCpusetMemsL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpusetMems -> ContainerUpdateRequest { containerUpdateRequestCpusetMems, ..} ) <$> f containerUpdateRequestCpusetMems +{-# INLINE containerUpdateRequestCpusetMemsL #-} + +-- | 'containerUpdateRequestDevices' Lens +containerUpdateRequestDevicesL :: Lens_' ContainerUpdateRequest (Maybe [DeviceMapping]) +containerUpdateRequestDevicesL f ContainerUpdateRequest{..} = (\containerUpdateRequestDevices -> ContainerUpdateRequest { containerUpdateRequestDevices, ..} ) <$> f containerUpdateRequestDevices +{-# INLINE containerUpdateRequestDevicesL #-} + +-- | 'containerUpdateRequestDeviceCgroupRules' Lens +containerUpdateRequestDeviceCgroupRulesL :: Lens_' ContainerUpdateRequest (Maybe [Text]) +containerUpdateRequestDeviceCgroupRulesL f ContainerUpdateRequest{..} = (\containerUpdateRequestDeviceCgroupRules -> ContainerUpdateRequest { containerUpdateRequestDeviceCgroupRules, ..} ) <$> f containerUpdateRequestDeviceCgroupRules +{-# INLINE containerUpdateRequestDeviceCgroupRulesL #-} + +-- | 'containerUpdateRequestDeviceRequests' Lens +containerUpdateRequestDeviceRequestsL :: Lens_' ContainerUpdateRequest (Maybe [DeviceRequest]) +containerUpdateRequestDeviceRequestsL f ContainerUpdateRequest{..} = (\containerUpdateRequestDeviceRequests -> ContainerUpdateRequest { containerUpdateRequestDeviceRequests, ..} ) <$> f containerUpdateRequestDeviceRequests +{-# INLINE containerUpdateRequestDeviceRequestsL #-} + +-- | 'containerUpdateRequestKernelMemoryTcp' Lens +containerUpdateRequestKernelMemoryTcpL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestKernelMemoryTcpL f ContainerUpdateRequest{..} = (\containerUpdateRequestKernelMemoryTcp -> ContainerUpdateRequest { containerUpdateRequestKernelMemoryTcp, ..} ) <$> f containerUpdateRequestKernelMemoryTcp +{-# INLINE containerUpdateRequestKernelMemoryTcpL #-} + +-- | 'containerUpdateRequestMemoryReservation' Lens +containerUpdateRequestMemoryReservationL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestMemoryReservationL f ContainerUpdateRequest{..} = (\containerUpdateRequestMemoryReservation -> ContainerUpdateRequest { containerUpdateRequestMemoryReservation, ..} ) <$> f containerUpdateRequestMemoryReservation +{-# INLINE containerUpdateRequestMemoryReservationL #-} + +-- | 'containerUpdateRequestMemorySwap' Lens +containerUpdateRequestMemorySwapL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestMemorySwapL f ContainerUpdateRequest{..} = (\containerUpdateRequestMemorySwap -> ContainerUpdateRequest { containerUpdateRequestMemorySwap, ..} ) <$> f containerUpdateRequestMemorySwap +{-# INLINE containerUpdateRequestMemorySwapL #-} + +-- | 'containerUpdateRequestMemorySwappiness' Lens +containerUpdateRequestMemorySwappinessL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestMemorySwappinessL f ContainerUpdateRequest{..} = (\containerUpdateRequestMemorySwappiness -> ContainerUpdateRequest { containerUpdateRequestMemorySwappiness, ..} ) <$> f containerUpdateRequestMemorySwappiness +{-# INLINE containerUpdateRequestMemorySwappinessL #-} + +-- | 'containerUpdateRequestNanoCpus' Lens +containerUpdateRequestNanoCpusL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestNanoCpusL f ContainerUpdateRequest{..} = (\containerUpdateRequestNanoCpus -> ContainerUpdateRequest { containerUpdateRequestNanoCpus, ..} ) <$> f containerUpdateRequestNanoCpus +{-# INLINE containerUpdateRequestNanoCpusL #-} + +-- | 'containerUpdateRequestOomKillDisable' Lens +containerUpdateRequestOomKillDisableL :: Lens_' ContainerUpdateRequest (Maybe Bool) +containerUpdateRequestOomKillDisableL f ContainerUpdateRequest{..} = (\containerUpdateRequestOomKillDisable -> ContainerUpdateRequest { containerUpdateRequestOomKillDisable, ..} ) <$> f containerUpdateRequestOomKillDisable +{-# INLINE containerUpdateRequestOomKillDisableL #-} + +-- | 'containerUpdateRequestInit' Lens +containerUpdateRequestInitL :: Lens_' ContainerUpdateRequest (Maybe Bool) +containerUpdateRequestInitL f ContainerUpdateRequest{..} = (\containerUpdateRequestInit -> ContainerUpdateRequest { containerUpdateRequestInit, ..} ) <$> f containerUpdateRequestInit +{-# INLINE containerUpdateRequestInitL #-} + +-- | 'containerUpdateRequestPidsLimit' Lens +containerUpdateRequestPidsLimitL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestPidsLimitL f ContainerUpdateRequest{..} = (\containerUpdateRequestPidsLimit -> ContainerUpdateRequest { containerUpdateRequestPidsLimit, ..} ) <$> f containerUpdateRequestPidsLimit +{-# INLINE containerUpdateRequestPidsLimitL #-} + +-- | 'containerUpdateRequestUlimits' Lens +containerUpdateRequestUlimitsL :: Lens_' ContainerUpdateRequest (Maybe [ResourcesUlimitsInner]) +containerUpdateRequestUlimitsL f ContainerUpdateRequest{..} = (\containerUpdateRequestUlimits -> ContainerUpdateRequest { containerUpdateRequestUlimits, ..} ) <$> f containerUpdateRequestUlimits +{-# INLINE containerUpdateRequestUlimitsL #-} + +-- | 'containerUpdateRequestCpuCount' Lens +containerUpdateRequestCpuCountL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestCpuCountL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuCount -> ContainerUpdateRequest { containerUpdateRequestCpuCount, ..} ) <$> f containerUpdateRequestCpuCount +{-# INLINE containerUpdateRequestCpuCountL #-} + +-- | 'containerUpdateRequestCpuPercent' Lens +containerUpdateRequestCpuPercentL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestCpuPercentL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuPercent -> ContainerUpdateRequest { containerUpdateRequestCpuPercent, ..} ) <$> f containerUpdateRequestCpuPercent +{-# INLINE containerUpdateRequestCpuPercentL #-} + +-- | 'containerUpdateRequestIoMaximumIOps' Lens +containerUpdateRequestIoMaximumIOpsL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestIoMaximumIOpsL f ContainerUpdateRequest{..} = (\containerUpdateRequestIoMaximumIOps -> ContainerUpdateRequest { containerUpdateRequestIoMaximumIOps, ..} ) <$> f containerUpdateRequestIoMaximumIOps +{-# INLINE containerUpdateRequestIoMaximumIOpsL #-} + +-- | 'containerUpdateRequestIoMaximumBandwidth' Lens +containerUpdateRequestIoMaximumBandwidthL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestIoMaximumBandwidthL f ContainerUpdateRequest{..} = (\containerUpdateRequestIoMaximumBandwidth -> ContainerUpdateRequest { containerUpdateRequestIoMaximumBandwidth, ..} ) <$> f containerUpdateRequestIoMaximumBandwidth +{-# INLINE containerUpdateRequestIoMaximumBandwidthL #-} + +-- | 'containerUpdateRequestRestartPolicy' Lens +containerUpdateRequestRestartPolicyL :: Lens_' ContainerUpdateRequest (Maybe RestartPolicy) +containerUpdateRequestRestartPolicyL f ContainerUpdateRequest{..} = (\containerUpdateRequestRestartPolicy -> ContainerUpdateRequest { containerUpdateRequestRestartPolicy, ..} ) <$> f containerUpdateRequestRestartPolicy +{-# INLINE containerUpdateRequestRestartPolicyL #-} + + + +-- * ContainerUpdateResponse + +-- | 'containerUpdateResponseWarnings' Lens +containerUpdateResponseWarningsL :: Lens_' ContainerUpdateResponse (Maybe [Text]) +containerUpdateResponseWarningsL f ContainerUpdateResponse{..} = (\containerUpdateResponseWarnings -> ContainerUpdateResponse { containerUpdateResponseWarnings, ..} ) <$> f containerUpdateResponseWarnings +{-# INLINE containerUpdateResponseWarningsL #-} + + + +-- * ContainerWaitExitError + +-- | 'containerWaitExitErrorMessage' Lens +containerWaitExitErrorMessageL :: Lens_' ContainerWaitExitError (Maybe Text) +containerWaitExitErrorMessageL f ContainerWaitExitError{..} = (\containerWaitExitErrorMessage -> ContainerWaitExitError { containerWaitExitErrorMessage, ..} ) <$> f containerWaitExitErrorMessage +{-# INLINE containerWaitExitErrorMessageL #-} + + + +-- * ContainerWaitResponse + +-- | 'containerWaitResponseStatusCode' Lens +containerWaitResponseStatusCodeL :: Lens_' ContainerWaitResponse (Integer) +containerWaitResponseStatusCodeL f ContainerWaitResponse{..} = (\containerWaitResponseStatusCode -> ContainerWaitResponse { containerWaitResponseStatusCode, ..} ) <$> f containerWaitResponseStatusCode +{-# INLINE containerWaitResponseStatusCodeL #-} + +-- | 'containerWaitResponseError' Lens +containerWaitResponseErrorL :: Lens_' ContainerWaitResponse (Maybe ContainerWaitExitError) +containerWaitResponseErrorL f ContainerWaitResponse{..} = (\containerWaitResponseError -> ContainerWaitResponse { containerWaitResponseError, ..} ) <$> f containerWaitResponseError +{-# INLINE containerWaitResponseErrorL #-} + + + +-- * CreateImageInfo + +-- | 'createImageInfoId' Lens +createImageInfoIdL :: Lens_' CreateImageInfo (Maybe Text) +createImageInfoIdL f CreateImageInfo{..} = (\createImageInfoId -> CreateImageInfo { createImageInfoId, ..} ) <$> f createImageInfoId +{-# INLINE createImageInfoIdL #-} + +-- | 'createImageInfoError' Lens +createImageInfoErrorL :: Lens_' CreateImageInfo (Maybe Text) +createImageInfoErrorL f CreateImageInfo{..} = (\createImageInfoError -> CreateImageInfo { createImageInfoError, ..} ) <$> f createImageInfoError +{-# INLINE createImageInfoErrorL #-} + +-- | 'createImageInfoErrorDetail' Lens +createImageInfoErrorDetailL :: Lens_' CreateImageInfo (Maybe ErrorDetail) +createImageInfoErrorDetailL f CreateImageInfo{..} = (\createImageInfoErrorDetail -> CreateImageInfo { createImageInfoErrorDetail, ..} ) <$> f createImageInfoErrorDetail +{-# INLINE createImageInfoErrorDetailL #-} + +-- | 'createImageInfoStatus' Lens +createImageInfoStatusL :: Lens_' CreateImageInfo (Maybe Text) +createImageInfoStatusL f CreateImageInfo{..} = (\createImageInfoStatus -> CreateImageInfo { createImageInfoStatus, ..} ) <$> f createImageInfoStatus +{-# INLINE createImageInfoStatusL #-} + +-- | 'createImageInfoProgress' Lens +createImageInfoProgressL :: Lens_' CreateImageInfo (Maybe Text) +createImageInfoProgressL f CreateImageInfo{..} = (\createImageInfoProgress -> CreateImageInfo { createImageInfoProgress, ..} ) <$> f createImageInfoProgress +{-# INLINE createImageInfoProgressL #-} + +-- | 'createImageInfoProgressDetail' Lens +createImageInfoProgressDetailL :: Lens_' CreateImageInfo (Maybe ProgressDetail) +createImageInfoProgressDetailL f CreateImageInfo{..} = (\createImageInfoProgressDetail -> CreateImageInfo { createImageInfoProgressDetail, ..} ) <$> f createImageInfoProgressDetail +{-# INLINE createImageInfoProgressDetailL #-} + + + +-- * DeviceMapping + +-- | 'deviceMappingPathOnHost' Lens +deviceMappingPathOnHostL :: Lens_' DeviceMapping (Maybe Text) +deviceMappingPathOnHostL f DeviceMapping{..} = (\deviceMappingPathOnHost -> DeviceMapping { deviceMappingPathOnHost, ..} ) <$> f deviceMappingPathOnHost +{-# INLINE deviceMappingPathOnHostL #-} + +-- | 'deviceMappingPathInContainer' Lens +deviceMappingPathInContainerL :: Lens_' DeviceMapping (Maybe Text) +deviceMappingPathInContainerL f DeviceMapping{..} = (\deviceMappingPathInContainer -> DeviceMapping { deviceMappingPathInContainer, ..} ) <$> f deviceMappingPathInContainer +{-# INLINE deviceMappingPathInContainerL #-} + +-- | 'deviceMappingCgroupPermissions' Lens +deviceMappingCgroupPermissionsL :: Lens_' DeviceMapping (Maybe Text) +deviceMappingCgroupPermissionsL f DeviceMapping{..} = (\deviceMappingCgroupPermissions -> DeviceMapping { deviceMappingCgroupPermissions, ..} ) <$> f deviceMappingCgroupPermissions +{-# INLINE deviceMappingCgroupPermissionsL #-} + + + +-- * DeviceRequest + +-- | 'deviceRequestDriver' Lens +deviceRequestDriverL :: Lens_' DeviceRequest (Maybe Text) +deviceRequestDriverL f DeviceRequest{..} = (\deviceRequestDriver -> DeviceRequest { deviceRequestDriver, ..} ) <$> f deviceRequestDriver +{-# INLINE deviceRequestDriverL #-} + +-- | 'deviceRequestCount' Lens +deviceRequestCountL :: Lens_' DeviceRequest (Maybe Int) +deviceRequestCountL f DeviceRequest{..} = (\deviceRequestCount -> DeviceRequest { deviceRequestCount, ..} ) <$> f deviceRequestCount +{-# INLINE deviceRequestCountL #-} + +-- | 'deviceRequestDeviceIds' Lens +deviceRequestDeviceIdsL :: Lens_' DeviceRequest (Maybe [Text]) +deviceRequestDeviceIdsL f DeviceRequest{..} = (\deviceRequestDeviceIds -> DeviceRequest { deviceRequestDeviceIds, ..} ) <$> f deviceRequestDeviceIds +{-# INLINE deviceRequestDeviceIdsL #-} + +-- | 'deviceRequestCapabilities' Lens +deviceRequestCapabilitiesL :: Lens_' DeviceRequest (Maybe [[Text]]) +deviceRequestCapabilitiesL f DeviceRequest{..} = (\deviceRequestCapabilities -> DeviceRequest { deviceRequestCapabilities, ..} ) <$> f deviceRequestCapabilities +{-# INLINE deviceRequestCapabilitiesL #-} + +-- | 'deviceRequestOptions' Lens +deviceRequestOptionsL :: Lens_' DeviceRequest (Maybe (Map.Map String Text)) +deviceRequestOptionsL f DeviceRequest{..} = (\deviceRequestOptions -> DeviceRequest { deviceRequestOptions, ..} ) <$> f deviceRequestOptions +{-# INLINE deviceRequestOptionsL #-} + + + +-- * DistributionInspect + +-- | 'distributionInspectDescriptor' Lens +distributionInspectDescriptorL :: Lens_' DistributionInspect (OCIDescriptor) +distributionInspectDescriptorL f DistributionInspect{..} = (\distributionInspectDescriptor -> DistributionInspect { distributionInspectDescriptor, ..} ) <$> f distributionInspectDescriptor +{-# INLINE distributionInspectDescriptorL #-} + +-- | 'distributionInspectPlatforms' Lens +distributionInspectPlatformsL :: Lens_' DistributionInspect ([OCIPlatform]) +distributionInspectPlatformsL f DistributionInspect{..} = (\distributionInspectPlatforms -> DistributionInspect { distributionInspectPlatforms, ..} ) <$> f distributionInspectPlatforms +{-# INLINE distributionInspectPlatformsL #-} + + + +-- * Driver + +-- | 'driverName' Lens +driverNameL :: Lens_' Driver (Text) +driverNameL f Driver{..} = (\driverName -> Driver { driverName, ..} ) <$> f driverName +{-# INLINE driverNameL #-} + +-- | 'driverOptions' Lens +driverOptionsL :: Lens_' Driver (Maybe (Map.Map String Text)) +driverOptionsL f Driver{..} = (\driverOptions -> Driver { driverOptions, ..} ) <$> f driverOptions +{-# INLINE driverOptionsL #-} + + + +-- * EndpointIPAMConfig + +-- | 'endpointIPAMConfigIpv4Address' Lens +endpointIPAMConfigIpv4AddressL :: Lens_' EndpointIPAMConfig (Maybe Text) +endpointIPAMConfigIpv4AddressL f EndpointIPAMConfig{..} = (\endpointIPAMConfigIpv4Address -> EndpointIPAMConfig { endpointIPAMConfigIpv4Address, ..} ) <$> f endpointIPAMConfigIpv4Address +{-# INLINE endpointIPAMConfigIpv4AddressL #-} + +-- | 'endpointIPAMConfigIpv6Address' Lens +endpointIPAMConfigIpv6AddressL :: Lens_' EndpointIPAMConfig (Maybe Text) +endpointIPAMConfigIpv6AddressL f EndpointIPAMConfig{..} = (\endpointIPAMConfigIpv6Address -> EndpointIPAMConfig { endpointIPAMConfigIpv6Address, ..} ) <$> f endpointIPAMConfigIpv6Address +{-# INLINE endpointIPAMConfigIpv6AddressL #-} + +-- | 'endpointIPAMConfigLinkLocalIps' Lens +endpointIPAMConfigLinkLocalIpsL :: Lens_' EndpointIPAMConfig (Maybe [Text]) +endpointIPAMConfigLinkLocalIpsL f EndpointIPAMConfig{..} = (\endpointIPAMConfigLinkLocalIps -> EndpointIPAMConfig { endpointIPAMConfigLinkLocalIps, ..} ) <$> f endpointIPAMConfigLinkLocalIps +{-# INLINE endpointIPAMConfigLinkLocalIpsL #-} + + + +-- * EndpointPortConfig + +-- | 'endpointPortConfigName' Lens +endpointPortConfigNameL :: Lens_' EndpointPortConfig (Maybe Text) +endpointPortConfigNameL f EndpointPortConfig{..} = (\endpointPortConfigName -> EndpointPortConfig { endpointPortConfigName, ..} ) <$> f endpointPortConfigName +{-# INLINE endpointPortConfigNameL #-} + +-- | 'endpointPortConfigProtocol' Lens +endpointPortConfigProtocolL :: Lens_' EndpointPortConfig (Maybe E'Type) +endpointPortConfigProtocolL f EndpointPortConfig{..} = (\endpointPortConfigProtocol -> EndpointPortConfig { endpointPortConfigProtocol, ..} ) <$> f endpointPortConfigProtocol +{-# INLINE endpointPortConfigProtocolL #-} + +-- | 'endpointPortConfigTargetPort' Lens +endpointPortConfigTargetPortL :: Lens_' EndpointPortConfig (Maybe Int) +endpointPortConfigTargetPortL f EndpointPortConfig{..} = (\endpointPortConfigTargetPort -> EndpointPortConfig { endpointPortConfigTargetPort, ..} ) <$> f endpointPortConfigTargetPort +{-# INLINE endpointPortConfigTargetPortL #-} + +-- | 'endpointPortConfigPublishedPort' Lens +endpointPortConfigPublishedPortL :: Lens_' EndpointPortConfig (Maybe Int) +endpointPortConfigPublishedPortL f EndpointPortConfig{..} = (\endpointPortConfigPublishedPort -> EndpointPortConfig { endpointPortConfigPublishedPort, ..} ) <$> f endpointPortConfigPublishedPort +{-# INLINE endpointPortConfigPublishedPortL #-} + +-- | 'endpointPortConfigPublishMode' Lens +endpointPortConfigPublishModeL :: Lens_' EndpointPortConfig (Maybe E'PublishMode) +endpointPortConfigPublishModeL f EndpointPortConfig{..} = (\endpointPortConfigPublishMode -> EndpointPortConfig { endpointPortConfigPublishMode, ..} ) <$> f endpointPortConfigPublishMode +{-# INLINE endpointPortConfigPublishModeL #-} + + + +-- * EndpointSettings + +-- | 'endpointSettingsIpamConfig' Lens +endpointSettingsIpamConfigL :: Lens_' EndpointSettings (Maybe EndpointIPAMConfig) +endpointSettingsIpamConfigL f EndpointSettings{..} = (\endpointSettingsIpamConfig -> EndpointSettings { endpointSettingsIpamConfig, ..} ) <$> f endpointSettingsIpamConfig +{-# INLINE endpointSettingsIpamConfigL #-} + +-- | 'endpointSettingsLinks' Lens +endpointSettingsLinksL :: Lens_' EndpointSettings (Maybe [Text]) +endpointSettingsLinksL f EndpointSettings{..} = (\endpointSettingsLinks -> EndpointSettings { endpointSettingsLinks, ..} ) <$> f endpointSettingsLinks +{-# INLINE endpointSettingsLinksL #-} + +-- | 'endpointSettingsMacAddress' Lens +endpointSettingsMacAddressL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsMacAddressL f EndpointSettings{..} = (\endpointSettingsMacAddress -> EndpointSettings { endpointSettingsMacAddress, ..} ) <$> f endpointSettingsMacAddress +{-# INLINE endpointSettingsMacAddressL #-} + +-- | 'endpointSettingsAliases' Lens +endpointSettingsAliasesL :: Lens_' EndpointSettings (Maybe [Text]) +endpointSettingsAliasesL f EndpointSettings{..} = (\endpointSettingsAliases -> EndpointSettings { endpointSettingsAliases, ..} ) <$> f endpointSettingsAliases +{-# INLINE endpointSettingsAliasesL #-} + +-- | 'endpointSettingsNetworkId' Lens +endpointSettingsNetworkIdL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsNetworkIdL f EndpointSettings{..} = (\endpointSettingsNetworkId -> EndpointSettings { endpointSettingsNetworkId, ..} ) <$> f endpointSettingsNetworkId +{-# INLINE endpointSettingsNetworkIdL #-} + +-- | 'endpointSettingsEndpointId' Lens +endpointSettingsEndpointIdL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsEndpointIdL f EndpointSettings{..} = (\endpointSettingsEndpointId -> EndpointSettings { endpointSettingsEndpointId, ..} ) <$> f endpointSettingsEndpointId +{-# INLINE endpointSettingsEndpointIdL #-} + +-- | 'endpointSettingsGateway' Lens +endpointSettingsGatewayL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsGatewayL f EndpointSettings{..} = (\endpointSettingsGateway -> EndpointSettings { endpointSettingsGateway, ..} ) <$> f endpointSettingsGateway +{-# INLINE endpointSettingsGatewayL #-} + +-- | 'endpointSettingsIpAddress' Lens +endpointSettingsIpAddressL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsIpAddressL f EndpointSettings{..} = (\endpointSettingsIpAddress -> EndpointSettings { endpointSettingsIpAddress, ..} ) <$> f endpointSettingsIpAddress +{-# INLINE endpointSettingsIpAddressL #-} + +-- | 'endpointSettingsIpPrefixLen' Lens +endpointSettingsIpPrefixLenL :: Lens_' EndpointSettings (Maybe Int) +endpointSettingsIpPrefixLenL f EndpointSettings{..} = (\endpointSettingsIpPrefixLen -> EndpointSettings { endpointSettingsIpPrefixLen, ..} ) <$> f endpointSettingsIpPrefixLen +{-# INLINE endpointSettingsIpPrefixLenL #-} + +-- | 'endpointSettingsIpv6Gateway' Lens +endpointSettingsIpv6GatewayL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsIpv6GatewayL f EndpointSettings{..} = (\endpointSettingsIpv6Gateway -> EndpointSettings { endpointSettingsIpv6Gateway, ..} ) <$> f endpointSettingsIpv6Gateway +{-# INLINE endpointSettingsIpv6GatewayL #-} + +-- | 'endpointSettingsGlobalIpv6Address' Lens +endpointSettingsGlobalIpv6AddressL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsGlobalIpv6AddressL f EndpointSettings{..} = (\endpointSettingsGlobalIpv6Address -> EndpointSettings { endpointSettingsGlobalIpv6Address, ..} ) <$> f endpointSettingsGlobalIpv6Address +{-# INLINE endpointSettingsGlobalIpv6AddressL #-} + +-- | 'endpointSettingsGlobalIpv6PrefixLen' Lens +endpointSettingsGlobalIpv6PrefixLenL :: Lens_' EndpointSettings (Maybe Integer) +endpointSettingsGlobalIpv6PrefixLenL f EndpointSettings{..} = (\endpointSettingsGlobalIpv6PrefixLen -> EndpointSettings { endpointSettingsGlobalIpv6PrefixLen, ..} ) <$> f endpointSettingsGlobalIpv6PrefixLen +{-# INLINE endpointSettingsGlobalIpv6PrefixLenL #-} + +-- | 'endpointSettingsDriverOpts' Lens +endpointSettingsDriverOptsL :: Lens_' EndpointSettings (Maybe (Map.Map String Text)) +endpointSettingsDriverOptsL f EndpointSettings{..} = (\endpointSettingsDriverOpts -> EndpointSettings { endpointSettingsDriverOpts, ..} ) <$> f endpointSettingsDriverOpts +{-# INLINE endpointSettingsDriverOptsL #-} + +-- | 'endpointSettingsDnsNames' Lens +endpointSettingsDnsNamesL :: Lens_' EndpointSettings (Maybe [Text]) +endpointSettingsDnsNamesL f EndpointSettings{..} = (\endpointSettingsDnsNames -> EndpointSettings { endpointSettingsDnsNames, ..} ) <$> f endpointSettingsDnsNames +{-# INLINE endpointSettingsDnsNamesL #-} + + + +-- * EndpointSpec + +-- | 'endpointSpecMode' Lens +endpointSpecModeL :: Lens_' EndpointSpec (Maybe E'Mode) +endpointSpecModeL f EndpointSpec{..} = (\endpointSpecMode -> EndpointSpec { endpointSpecMode, ..} ) <$> f endpointSpecMode +{-# INLINE endpointSpecModeL #-} + +-- | 'endpointSpecPorts' Lens +endpointSpecPortsL :: Lens_' EndpointSpec (Maybe [EndpointPortConfig]) +endpointSpecPortsL f EndpointSpec{..} = (\endpointSpecPorts -> EndpointSpec { endpointSpecPorts, ..} ) <$> f endpointSpecPorts +{-# INLINE endpointSpecPortsL #-} + + + +-- * EngineDescription + +-- | 'engineDescriptionEngineVersion' Lens +engineDescriptionEngineVersionL :: Lens_' EngineDescription (Maybe Text) +engineDescriptionEngineVersionL f EngineDescription{..} = (\engineDescriptionEngineVersion -> EngineDescription { engineDescriptionEngineVersion, ..} ) <$> f engineDescriptionEngineVersion +{-# INLINE engineDescriptionEngineVersionL #-} + +-- | 'engineDescriptionLabels' Lens +engineDescriptionLabelsL :: Lens_' EngineDescription (Maybe (Map.Map String Text)) +engineDescriptionLabelsL f EngineDescription{..} = (\engineDescriptionLabels -> EngineDescription { engineDescriptionLabels, ..} ) <$> f engineDescriptionLabels +{-# INLINE engineDescriptionLabelsL #-} + +-- | 'engineDescriptionPlugins' Lens +engineDescriptionPluginsL :: Lens_' EngineDescription (Maybe [EngineDescriptionPluginsInner]) +engineDescriptionPluginsL f EngineDescription{..} = (\engineDescriptionPlugins -> EngineDescription { engineDescriptionPlugins, ..} ) <$> f engineDescriptionPlugins +{-# INLINE engineDescriptionPluginsL #-} + + + +-- * EngineDescriptionPluginsInner + +-- | 'engineDescriptionPluginsInnerType' Lens +engineDescriptionPluginsInnerTypeL :: Lens_' EngineDescriptionPluginsInner (Maybe Text) +engineDescriptionPluginsInnerTypeL f EngineDescriptionPluginsInner{..} = (\engineDescriptionPluginsInnerType -> EngineDescriptionPluginsInner { engineDescriptionPluginsInnerType, ..} ) <$> f engineDescriptionPluginsInnerType +{-# INLINE engineDescriptionPluginsInnerTypeL #-} + +-- | 'engineDescriptionPluginsInnerName' Lens +engineDescriptionPluginsInnerNameL :: Lens_' EngineDescriptionPluginsInner (Maybe Text) +engineDescriptionPluginsInnerNameL f EngineDescriptionPluginsInner{..} = (\engineDescriptionPluginsInnerName -> EngineDescriptionPluginsInner { engineDescriptionPluginsInnerName, ..} ) <$> f engineDescriptionPluginsInnerName +{-# INLINE engineDescriptionPluginsInnerNameL #-} + + + +-- * ErrorDetail + +-- | 'errorDetailCode' Lens +errorDetailCodeL :: Lens_' ErrorDetail (Maybe Int) +errorDetailCodeL f ErrorDetail{..} = (\errorDetailCode -> ErrorDetail { errorDetailCode, ..} ) <$> f errorDetailCode +{-# INLINE errorDetailCodeL #-} + +-- | 'errorDetailMessage' Lens +errorDetailMessageL :: Lens_' ErrorDetail (Maybe Text) +errorDetailMessageL f ErrorDetail{..} = (\errorDetailMessage -> ErrorDetail { errorDetailMessage, ..} ) <$> f errorDetailMessage +{-# INLINE errorDetailMessageL #-} + + + +-- * ErrorResponse + +-- | 'errorResponseMessage' Lens +errorResponseMessageL :: Lens_' ErrorResponse (Text) +errorResponseMessageL f ErrorResponse{..} = (\errorResponseMessage -> ErrorResponse { errorResponseMessage, ..} ) <$> f errorResponseMessage +{-# INLINE errorResponseMessageL #-} + + + +-- * EventActor + +-- | 'eventActorId' Lens +eventActorIdL :: Lens_' EventActor (Maybe Text) +eventActorIdL f EventActor{..} = (\eventActorId -> EventActor { eventActorId, ..} ) <$> f eventActorId +{-# INLINE eventActorIdL #-} + +-- | 'eventActorAttributes' Lens +eventActorAttributesL :: Lens_' EventActor (Maybe (Map.Map String Text)) +eventActorAttributesL f EventActor{..} = (\eventActorAttributes -> EventActor { eventActorAttributes, ..} ) <$> f eventActorAttributes +{-# INLINE eventActorAttributesL #-} + + + +-- * EventMessage + +-- | 'eventMessageType' Lens +eventMessageTypeL :: Lens_' EventMessage (Maybe E'Type4) +eventMessageTypeL f EventMessage{..} = (\eventMessageType -> EventMessage { eventMessageType, ..} ) <$> f eventMessageType +{-# INLINE eventMessageTypeL #-} + +-- | 'eventMessageAction' Lens +eventMessageActionL :: Lens_' EventMessage (Maybe Text) +eventMessageActionL f EventMessage{..} = (\eventMessageAction -> EventMessage { eventMessageAction, ..} ) <$> f eventMessageAction +{-# INLINE eventMessageActionL #-} + +-- | 'eventMessageActor' Lens +eventMessageActorL :: Lens_' EventMessage (Maybe EventActor) +eventMessageActorL f EventMessage{..} = (\eventMessageActor -> EventMessage { eventMessageActor, ..} ) <$> f eventMessageActor +{-# INLINE eventMessageActorL #-} + +-- | 'eventMessageScope' Lens +eventMessageScopeL :: Lens_' EventMessage (Maybe E'Scope2) +eventMessageScopeL f EventMessage{..} = (\eventMessageScope -> EventMessage { eventMessageScope, ..} ) <$> f eventMessageScope +{-# INLINE eventMessageScopeL #-} + +-- | 'eventMessageTime' Lens +eventMessageTimeL :: Lens_' EventMessage (Maybe Integer) +eventMessageTimeL f EventMessage{..} = (\eventMessageTime -> EventMessage { eventMessageTime, ..} ) <$> f eventMessageTime +{-# INLINE eventMessageTimeL #-} + +-- | 'eventMessageTimeNano' Lens +eventMessageTimeNanoL :: Lens_' EventMessage (Maybe Integer) +eventMessageTimeNanoL f EventMessage{..} = (\eventMessageTimeNano -> EventMessage { eventMessageTimeNano, ..} ) <$> f eventMessageTimeNano +{-# INLINE eventMessageTimeNanoL #-} + + + +-- * ExecConfig + +-- | 'execConfigAttachStdin' Lens +execConfigAttachStdinL :: Lens_' ExecConfig (Maybe Bool) +execConfigAttachStdinL f ExecConfig{..} = (\execConfigAttachStdin -> ExecConfig { execConfigAttachStdin, ..} ) <$> f execConfigAttachStdin +{-# INLINE execConfigAttachStdinL #-} + +-- | 'execConfigAttachStdout' Lens +execConfigAttachStdoutL :: Lens_' ExecConfig (Maybe Bool) +execConfigAttachStdoutL f ExecConfig{..} = (\execConfigAttachStdout -> ExecConfig { execConfigAttachStdout, ..} ) <$> f execConfigAttachStdout +{-# INLINE execConfigAttachStdoutL #-} + +-- | 'execConfigAttachStderr' Lens +execConfigAttachStderrL :: Lens_' ExecConfig (Maybe Bool) +execConfigAttachStderrL f ExecConfig{..} = (\execConfigAttachStderr -> ExecConfig { execConfigAttachStderr, ..} ) <$> f execConfigAttachStderr +{-# INLINE execConfigAttachStderrL #-} + +-- | 'execConfigConsoleSize' Lens +execConfigConsoleSizeL :: Lens_' ExecConfig (Maybe [Int]) +execConfigConsoleSizeL f ExecConfig{..} = (\execConfigConsoleSize -> ExecConfig { execConfigConsoleSize, ..} ) <$> f execConfigConsoleSize +{-# INLINE execConfigConsoleSizeL #-} + +-- | 'execConfigDetachKeys' Lens +execConfigDetachKeysL :: Lens_' ExecConfig (Maybe Text) +execConfigDetachKeysL f ExecConfig{..} = (\execConfigDetachKeys -> ExecConfig { execConfigDetachKeys, ..} ) <$> f execConfigDetachKeys +{-# INLINE execConfigDetachKeysL #-} + +-- | 'execConfigTty' Lens +execConfigTtyL :: Lens_' ExecConfig (Maybe Bool) +execConfigTtyL f ExecConfig{..} = (\execConfigTty -> ExecConfig { execConfigTty, ..} ) <$> f execConfigTty +{-# INLINE execConfigTtyL #-} + +-- | 'execConfigEnv' Lens +execConfigEnvL :: Lens_' ExecConfig (Maybe [Text]) +execConfigEnvL f ExecConfig{..} = (\execConfigEnv -> ExecConfig { execConfigEnv, ..} ) <$> f execConfigEnv +{-# INLINE execConfigEnvL #-} + +-- | 'execConfigCmd' Lens +execConfigCmdL :: Lens_' ExecConfig (Maybe [Text]) +execConfigCmdL f ExecConfig{..} = (\execConfigCmd -> ExecConfig { execConfigCmd, ..} ) <$> f execConfigCmd +{-# INLINE execConfigCmdL #-} + +-- | 'execConfigPrivileged' Lens +execConfigPrivilegedL :: Lens_' ExecConfig (Maybe Bool) +execConfigPrivilegedL f ExecConfig{..} = (\execConfigPrivileged -> ExecConfig { execConfigPrivileged, ..} ) <$> f execConfigPrivileged +{-# INLINE execConfigPrivilegedL #-} + +-- | 'execConfigUser' Lens +execConfigUserL :: Lens_' ExecConfig (Maybe Text) +execConfigUserL f ExecConfig{..} = (\execConfigUser -> ExecConfig { execConfigUser, ..} ) <$> f execConfigUser +{-# INLINE execConfigUserL #-} + +-- | 'execConfigWorkingDir' Lens +execConfigWorkingDirL :: Lens_' ExecConfig (Maybe Text) +execConfigWorkingDirL f ExecConfig{..} = (\execConfigWorkingDir -> ExecConfig { execConfigWorkingDir, ..} ) <$> f execConfigWorkingDir +{-# INLINE execConfigWorkingDirL #-} + + + +-- * ExecInspectResponse + +-- | 'execInspectResponseCanRemove' Lens +execInspectResponseCanRemoveL :: Lens_' ExecInspectResponse (Maybe Bool) +execInspectResponseCanRemoveL f ExecInspectResponse{..} = (\execInspectResponseCanRemove -> ExecInspectResponse { execInspectResponseCanRemove, ..} ) <$> f execInspectResponseCanRemove +{-# INLINE execInspectResponseCanRemoveL #-} + +-- | 'execInspectResponseDetachKeys' Lens +execInspectResponseDetachKeysL :: Lens_' ExecInspectResponse (Maybe Text) +execInspectResponseDetachKeysL f ExecInspectResponse{..} = (\execInspectResponseDetachKeys -> ExecInspectResponse { execInspectResponseDetachKeys, ..} ) <$> f execInspectResponseDetachKeys +{-# INLINE execInspectResponseDetachKeysL #-} + +-- | 'execInspectResponseId' Lens +execInspectResponseIdL :: Lens_' ExecInspectResponse (Maybe Text) +execInspectResponseIdL f ExecInspectResponse{..} = (\execInspectResponseId -> ExecInspectResponse { execInspectResponseId, ..} ) <$> f execInspectResponseId +{-# INLINE execInspectResponseIdL #-} + +-- | 'execInspectResponseRunning' Lens +execInspectResponseRunningL :: Lens_' ExecInspectResponse (Maybe Bool) +execInspectResponseRunningL f ExecInspectResponse{..} = (\execInspectResponseRunning -> ExecInspectResponse { execInspectResponseRunning, ..} ) <$> f execInspectResponseRunning +{-# INLINE execInspectResponseRunningL #-} + +-- | 'execInspectResponseExitCode' Lens +execInspectResponseExitCodeL :: Lens_' ExecInspectResponse (Maybe Int) +execInspectResponseExitCodeL f ExecInspectResponse{..} = (\execInspectResponseExitCode -> ExecInspectResponse { execInspectResponseExitCode, ..} ) <$> f execInspectResponseExitCode +{-# INLINE execInspectResponseExitCodeL #-} + +-- | 'execInspectResponseProcessConfig' Lens +execInspectResponseProcessConfigL :: Lens_' ExecInspectResponse (Maybe ProcessConfig) +execInspectResponseProcessConfigL f ExecInspectResponse{..} = (\execInspectResponseProcessConfig -> ExecInspectResponse { execInspectResponseProcessConfig, ..} ) <$> f execInspectResponseProcessConfig +{-# INLINE execInspectResponseProcessConfigL #-} + +-- | 'execInspectResponseOpenStdin' Lens +execInspectResponseOpenStdinL :: Lens_' ExecInspectResponse (Maybe Bool) +execInspectResponseOpenStdinL f ExecInspectResponse{..} = (\execInspectResponseOpenStdin -> ExecInspectResponse { execInspectResponseOpenStdin, ..} ) <$> f execInspectResponseOpenStdin +{-# INLINE execInspectResponseOpenStdinL #-} + +-- | 'execInspectResponseOpenStderr' Lens +execInspectResponseOpenStderrL :: Lens_' ExecInspectResponse (Maybe Bool) +execInspectResponseOpenStderrL f ExecInspectResponse{..} = (\execInspectResponseOpenStderr -> ExecInspectResponse { execInspectResponseOpenStderr, ..} ) <$> f execInspectResponseOpenStderr +{-# INLINE execInspectResponseOpenStderrL #-} + +-- | 'execInspectResponseOpenStdout' Lens +execInspectResponseOpenStdoutL :: Lens_' ExecInspectResponse (Maybe Bool) +execInspectResponseOpenStdoutL f ExecInspectResponse{..} = (\execInspectResponseOpenStdout -> ExecInspectResponse { execInspectResponseOpenStdout, ..} ) <$> f execInspectResponseOpenStdout +{-# INLINE execInspectResponseOpenStdoutL #-} + +-- | 'execInspectResponseContainerId' Lens +execInspectResponseContainerIdL :: Lens_' ExecInspectResponse (Maybe Text) +execInspectResponseContainerIdL f ExecInspectResponse{..} = (\execInspectResponseContainerId -> ExecInspectResponse { execInspectResponseContainerId, ..} ) <$> f execInspectResponseContainerId +{-# INLINE execInspectResponseContainerIdL #-} + +-- | 'execInspectResponsePid' Lens +execInspectResponsePidL :: Lens_' ExecInspectResponse (Maybe Int) +execInspectResponsePidL f ExecInspectResponse{..} = (\execInspectResponsePid -> ExecInspectResponse { execInspectResponsePid, ..} ) <$> f execInspectResponsePid +{-# INLINE execInspectResponsePidL #-} + + + +-- * ExecStartConfig + +-- | 'execStartConfigDetach' Lens +execStartConfigDetachL :: Lens_' ExecStartConfig (Maybe Bool) +execStartConfigDetachL f ExecStartConfig{..} = (\execStartConfigDetach -> ExecStartConfig { execStartConfigDetach, ..} ) <$> f execStartConfigDetach +{-# INLINE execStartConfigDetachL #-} + +-- | 'execStartConfigTty' Lens +execStartConfigTtyL :: Lens_' ExecStartConfig (Maybe Bool) +execStartConfigTtyL f ExecStartConfig{..} = (\execStartConfigTty -> ExecStartConfig { execStartConfigTty, ..} ) <$> f execStartConfigTty +{-# INLINE execStartConfigTtyL #-} + +-- | 'execStartConfigConsoleSize' Lens +execStartConfigConsoleSizeL :: Lens_' ExecStartConfig (Maybe [Int]) +execStartConfigConsoleSizeL f ExecStartConfig{..} = (\execStartConfigConsoleSize -> ExecStartConfig { execStartConfigConsoleSize, ..} ) <$> f execStartConfigConsoleSize +{-# INLINE execStartConfigConsoleSizeL #-} + + + +-- * FilesystemChange + +-- | 'filesystemChangePath' Lens +filesystemChangePathL :: Lens_' FilesystemChange (Text) +filesystemChangePathL f FilesystemChange{..} = (\filesystemChangePath -> FilesystemChange { filesystemChangePath, ..} ) <$> f filesystemChangePath +{-# INLINE filesystemChangePathL #-} + +-- | 'filesystemChangeKind' Lens +filesystemChangeKindL :: Lens_' FilesystemChange (ChangeType) +filesystemChangeKindL f FilesystemChange{..} = (\filesystemChangeKind -> FilesystemChange { filesystemChangeKind, ..} ) <$> f filesystemChangeKind +{-# INLINE filesystemChangeKindL #-} + + + +-- * GenericResourcesInner + +-- | 'genericResourcesInnerNamedResourceSpec' Lens +genericResourcesInnerNamedResourceSpecL :: Lens_' GenericResourcesInner (Maybe GenericResourcesInnerNamedResourceSpec) +genericResourcesInnerNamedResourceSpecL f GenericResourcesInner{..} = (\genericResourcesInnerNamedResourceSpec -> GenericResourcesInner { genericResourcesInnerNamedResourceSpec, ..} ) <$> f genericResourcesInnerNamedResourceSpec +{-# INLINE genericResourcesInnerNamedResourceSpecL #-} + +-- | 'genericResourcesInnerDiscreteResourceSpec' Lens +genericResourcesInnerDiscreteResourceSpecL :: Lens_' GenericResourcesInner (Maybe GenericResourcesInnerDiscreteResourceSpec) +genericResourcesInnerDiscreteResourceSpecL f GenericResourcesInner{..} = (\genericResourcesInnerDiscreteResourceSpec -> GenericResourcesInner { genericResourcesInnerDiscreteResourceSpec, ..} ) <$> f genericResourcesInnerDiscreteResourceSpec +{-# INLINE genericResourcesInnerDiscreteResourceSpecL #-} + + + +-- * GenericResourcesInnerDiscreteResourceSpec + +-- | 'genericResourcesInnerDiscreteResourceSpecKind' Lens +genericResourcesInnerDiscreteResourceSpecKindL :: Lens_' GenericResourcesInnerDiscreteResourceSpec (Maybe Text) +genericResourcesInnerDiscreteResourceSpecKindL f GenericResourcesInnerDiscreteResourceSpec{..} = (\genericResourcesInnerDiscreteResourceSpecKind -> GenericResourcesInnerDiscreteResourceSpec { genericResourcesInnerDiscreteResourceSpecKind, ..} ) <$> f genericResourcesInnerDiscreteResourceSpecKind +{-# INLINE genericResourcesInnerDiscreteResourceSpecKindL #-} + +-- | 'genericResourcesInnerDiscreteResourceSpecValue' Lens +genericResourcesInnerDiscreteResourceSpecValueL :: Lens_' GenericResourcesInnerDiscreteResourceSpec (Maybe Integer) +genericResourcesInnerDiscreteResourceSpecValueL f GenericResourcesInnerDiscreteResourceSpec{..} = (\genericResourcesInnerDiscreteResourceSpecValue -> GenericResourcesInnerDiscreteResourceSpec { genericResourcesInnerDiscreteResourceSpecValue, ..} ) <$> f genericResourcesInnerDiscreteResourceSpecValue +{-# INLINE genericResourcesInnerDiscreteResourceSpecValueL #-} + + + +-- * GenericResourcesInnerNamedResourceSpec + +-- | 'genericResourcesInnerNamedResourceSpecKind' Lens +genericResourcesInnerNamedResourceSpecKindL :: Lens_' GenericResourcesInnerNamedResourceSpec (Maybe Text) +genericResourcesInnerNamedResourceSpecKindL f GenericResourcesInnerNamedResourceSpec{..} = (\genericResourcesInnerNamedResourceSpecKind -> GenericResourcesInnerNamedResourceSpec { genericResourcesInnerNamedResourceSpecKind, ..} ) <$> f genericResourcesInnerNamedResourceSpecKind +{-# INLINE genericResourcesInnerNamedResourceSpecKindL #-} + +-- | 'genericResourcesInnerNamedResourceSpecValue' Lens +genericResourcesInnerNamedResourceSpecValueL :: Lens_' GenericResourcesInnerNamedResourceSpec (Maybe Text) +genericResourcesInnerNamedResourceSpecValueL f GenericResourcesInnerNamedResourceSpec{..} = (\genericResourcesInnerNamedResourceSpecValue -> GenericResourcesInnerNamedResourceSpec { genericResourcesInnerNamedResourceSpecValue, ..} ) <$> f genericResourcesInnerNamedResourceSpecValue +{-# INLINE genericResourcesInnerNamedResourceSpecValueL #-} + + + +-- * GraphDriverData + +-- | 'graphDriverDataName' Lens +graphDriverDataNameL :: Lens_' GraphDriverData (Text) +graphDriverDataNameL f GraphDriverData{..} = (\graphDriverDataName -> GraphDriverData { graphDriverDataName, ..} ) <$> f graphDriverDataName +{-# INLINE graphDriverDataNameL #-} + +-- | 'graphDriverDataData' Lens +graphDriverDataDataL :: Lens_' GraphDriverData ((Map.Map String Text)) +graphDriverDataDataL f GraphDriverData{..} = (\graphDriverDataData -> GraphDriverData { graphDriverDataData, ..} ) <$> f graphDriverDataData +{-# INLINE graphDriverDataDataL #-} + + + +-- * Health + +-- | 'healthStatus' Lens +healthStatusL :: Lens_' Health (Maybe E'Status) +healthStatusL f Health{..} = (\healthStatus -> Health { healthStatus, ..} ) <$> f healthStatus +{-# INLINE healthStatusL #-} + +-- | 'healthFailingStreak' Lens +healthFailingStreakL :: Lens_' Health (Maybe Int) +healthFailingStreakL f Health{..} = (\healthFailingStreak -> Health { healthFailingStreak, ..} ) <$> f healthFailingStreak +{-# INLINE healthFailingStreakL #-} + +-- | 'healthLog' Lens +healthLogL :: Lens_' Health (Maybe [HealthcheckResult]) +healthLogL f Health{..} = (\healthLog -> Health { healthLog, ..} ) <$> f healthLog +{-# INLINE healthLogL #-} + + + +-- * HealthConfig + +-- | 'healthConfigTest' Lens +healthConfigTestL :: Lens_' HealthConfig (Maybe [Text]) +healthConfigTestL f HealthConfig{..} = (\healthConfigTest -> HealthConfig { healthConfigTest, ..} ) <$> f healthConfigTest +{-# INLINE healthConfigTestL #-} + +-- | 'healthConfigInterval' Lens +healthConfigIntervalL :: Lens_' HealthConfig (Maybe Integer) +healthConfigIntervalL f HealthConfig{..} = (\healthConfigInterval -> HealthConfig { healthConfigInterval, ..} ) <$> f healthConfigInterval +{-# INLINE healthConfigIntervalL #-} + +-- | 'healthConfigTimeout' Lens +healthConfigTimeoutL :: Lens_' HealthConfig (Maybe Integer) +healthConfigTimeoutL f HealthConfig{..} = (\healthConfigTimeout -> HealthConfig { healthConfigTimeout, ..} ) <$> f healthConfigTimeout +{-# INLINE healthConfigTimeoutL #-} + +-- | 'healthConfigRetries' Lens +healthConfigRetriesL :: Lens_' HealthConfig (Maybe Int) +healthConfigRetriesL f HealthConfig{..} = (\healthConfigRetries -> HealthConfig { healthConfigRetries, ..} ) <$> f healthConfigRetries +{-# INLINE healthConfigRetriesL #-} + +-- | 'healthConfigStartPeriod' Lens +healthConfigStartPeriodL :: Lens_' HealthConfig (Maybe Integer) +healthConfigStartPeriodL f HealthConfig{..} = (\healthConfigStartPeriod -> HealthConfig { healthConfigStartPeriod, ..} ) <$> f healthConfigStartPeriod +{-# INLINE healthConfigStartPeriodL #-} + +-- | 'healthConfigStartInterval' Lens +healthConfigStartIntervalL :: Lens_' HealthConfig (Maybe Integer) +healthConfigStartIntervalL f HealthConfig{..} = (\healthConfigStartInterval -> HealthConfig { healthConfigStartInterval, ..} ) <$> f healthConfigStartInterval +{-# INLINE healthConfigStartIntervalL #-} + + + +-- * HealthcheckResult + +-- | 'healthcheckResultStart' Lens +healthcheckResultStartL :: Lens_' HealthcheckResult (Maybe DateTime) +healthcheckResultStartL f HealthcheckResult{..} = (\healthcheckResultStart -> HealthcheckResult { healthcheckResultStart, ..} ) <$> f healthcheckResultStart +{-# INLINE healthcheckResultStartL #-} + +-- | 'healthcheckResultEnd' Lens +healthcheckResultEndL :: Lens_' HealthcheckResult (Maybe Text) +healthcheckResultEndL f HealthcheckResult{..} = (\healthcheckResultEnd -> HealthcheckResult { healthcheckResultEnd, ..} ) <$> f healthcheckResultEnd +{-# INLINE healthcheckResultEndL #-} + +-- | 'healthcheckResultExitCode' Lens +healthcheckResultExitCodeL :: Lens_' HealthcheckResult (Maybe Int) +healthcheckResultExitCodeL f HealthcheckResult{..} = (\healthcheckResultExitCode -> HealthcheckResult { healthcheckResultExitCode, ..} ) <$> f healthcheckResultExitCode +{-# INLINE healthcheckResultExitCodeL #-} + +-- | 'healthcheckResultOutput' Lens +healthcheckResultOutputL :: Lens_' HealthcheckResult (Maybe Text) +healthcheckResultOutputL f HealthcheckResult{..} = (\healthcheckResultOutput -> HealthcheckResult { healthcheckResultOutput, ..} ) <$> f healthcheckResultOutput +{-# INLINE healthcheckResultOutputL #-} + + + +-- * HistoryResponseItem + +-- | 'historyResponseItemId' Lens +historyResponseItemIdL :: Lens_' HistoryResponseItem (Text) +historyResponseItemIdL f HistoryResponseItem{..} = (\historyResponseItemId -> HistoryResponseItem { historyResponseItemId, ..} ) <$> f historyResponseItemId +{-# INLINE historyResponseItemIdL #-} + +-- | 'historyResponseItemCreated' Lens +historyResponseItemCreatedL :: Lens_' HistoryResponseItem (Integer) +historyResponseItemCreatedL f HistoryResponseItem{..} = (\historyResponseItemCreated -> HistoryResponseItem { historyResponseItemCreated, ..} ) <$> f historyResponseItemCreated +{-# INLINE historyResponseItemCreatedL #-} + +-- | 'historyResponseItemCreatedBy' Lens +historyResponseItemCreatedByL :: Lens_' HistoryResponseItem (Text) +historyResponseItemCreatedByL f HistoryResponseItem{..} = (\historyResponseItemCreatedBy -> HistoryResponseItem { historyResponseItemCreatedBy, ..} ) <$> f historyResponseItemCreatedBy +{-# INLINE historyResponseItemCreatedByL #-} + +-- | 'historyResponseItemTags' Lens +historyResponseItemTagsL :: Lens_' HistoryResponseItem ([Text]) +historyResponseItemTagsL f HistoryResponseItem{..} = (\historyResponseItemTags -> HistoryResponseItem { historyResponseItemTags, ..} ) <$> f historyResponseItemTags +{-# INLINE historyResponseItemTagsL #-} + +-- | 'historyResponseItemSize' Lens +historyResponseItemSizeL :: Lens_' HistoryResponseItem (Integer) +historyResponseItemSizeL f HistoryResponseItem{..} = (\historyResponseItemSize -> HistoryResponseItem { historyResponseItemSize, ..} ) <$> f historyResponseItemSize +{-# INLINE historyResponseItemSizeL #-} + +-- | 'historyResponseItemComment' Lens +historyResponseItemCommentL :: Lens_' HistoryResponseItem (Text) +historyResponseItemCommentL f HistoryResponseItem{..} = (\historyResponseItemComment -> HistoryResponseItem { historyResponseItemComment, ..} ) <$> f historyResponseItemComment +{-# INLINE historyResponseItemCommentL #-} + + + +-- * HostConfig + +-- | 'hostConfigCpuShares' Lens +hostConfigCpuSharesL :: Lens_' HostConfig (Maybe Int) +hostConfigCpuSharesL f HostConfig{..} = (\hostConfigCpuShares -> HostConfig { hostConfigCpuShares, ..} ) <$> f hostConfigCpuShares +{-# INLINE hostConfigCpuSharesL #-} + +-- | 'hostConfigMemory' Lens +hostConfigMemoryL :: Lens_' HostConfig (Maybe Integer) +hostConfigMemoryL f HostConfig{..} = (\hostConfigMemory -> HostConfig { hostConfigMemory, ..} ) <$> f hostConfigMemory +{-# INLINE hostConfigMemoryL #-} + +-- | 'hostConfigCgroupParent' Lens +hostConfigCgroupParentL :: Lens_' HostConfig (Maybe Text) +hostConfigCgroupParentL f HostConfig{..} = (\hostConfigCgroupParent -> HostConfig { hostConfigCgroupParent, ..} ) <$> f hostConfigCgroupParent +{-# INLINE hostConfigCgroupParentL #-} + +-- | 'hostConfigBlkioWeight' Lens +hostConfigBlkioWeightL :: Lens_' HostConfig (Maybe Int) +hostConfigBlkioWeightL f HostConfig{..} = (\hostConfigBlkioWeight -> HostConfig { hostConfigBlkioWeight, ..} ) <$> f hostConfigBlkioWeight +{-# INLINE hostConfigBlkioWeightL #-} + +-- | 'hostConfigBlkioWeightDevice' Lens +hostConfigBlkioWeightDeviceL :: Lens_' HostConfig (Maybe [ResourcesBlkioWeightDeviceInner]) +hostConfigBlkioWeightDeviceL f HostConfig{..} = (\hostConfigBlkioWeightDevice -> HostConfig { hostConfigBlkioWeightDevice, ..} ) <$> f hostConfigBlkioWeightDevice +{-# INLINE hostConfigBlkioWeightDeviceL #-} + +-- | 'hostConfigBlkioDeviceReadBps' Lens +hostConfigBlkioDeviceReadBpsL :: Lens_' HostConfig (Maybe [ThrottleDevice]) +hostConfigBlkioDeviceReadBpsL f HostConfig{..} = (\hostConfigBlkioDeviceReadBps -> HostConfig { hostConfigBlkioDeviceReadBps, ..} ) <$> f hostConfigBlkioDeviceReadBps +{-# INLINE hostConfigBlkioDeviceReadBpsL #-} + +-- | 'hostConfigBlkioDeviceWriteBps' Lens +hostConfigBlkioDeviceWriteBpsL :: Lens_' HostConfig (Maybe [ThrottleDevice]) +hostConfigBlkioDeviceWriteBpsL f HostConfig{..} = (\hostConfigBlkioDeviceWriteBps -> HostConfig { hostConfigBlkioDeviceWriteBps, ..} ) <$> f hostConfigBlkioDeviceWriteBps +{-# INLINE hostConfigBlkioDeviceWriteBpsL #-} + +-- | 'hostConfigBlkioDeviceReadIOps' Lens +hostConfigBlkioDeviceReadIOpsL :: Lens_' HostConfig (Maybe [ThrottleDevice]) +hostConfigBlkioDeviceReadIOpsL f HostConfig{..} = (\hostConfigBlkioDeviceReadIOps -> HostConfig { hostConfigBlkioDeviceReadIOps, ..} ) <$> f hostConfigBlkioDeviceReadIOps +{-# INLINE hostConfigBlkioDeviceReadIOpsL #-} + +-- | 'hostConfigBlkioDeviceWriteIOps' Lens +hostConfigBlkioDeviceWriteIOpsL :: Lens_' HostConfig (Maybe [ThrottleDevice]) +hostConfigBlkioDeviceWriteIOpsL f HostConfig{..} = (\hostConfigBlkioDeviceWriteIOps -> HostConfig { hostConfigBlkioDeviceWriteIOps, ..} ) <$> f hostConfigBlkioDeviceWriteIOps +{-# INLINE hostConfigBlkioDeviceWriteIOpsL #-} + +-- | 'hostConfigCpuPeriod' Lens +hostConfigCpuPeriodL :: Lens_' HostConfig (Maybe Integer) +hostConfigCpuPeriodL f HostConfig{..} = (\hostConfigCpuPeriod -> HostConfig { hostConfigCpuPeriod, ..} ) <$> f hostConfigCpuPeriod +{-# INLINE hostConfigCpuPeriodL #-} + +-- | 'hostConfigCpuQuota' Lens +hostConfigCpuQuotaL :: Lens_' HostConfig (Maybe Integer) +hostConfigCpuQuotaL f HostConfig{..} = (\hostConfigCpuQuota -> HostConfig { hostConfigCpuQuota, ..} ) <$> f hostConfigCpuQuota +{-# INLINE hostConfigCpuQuotaL #-} + +-- | 'hostConfigCpuRealtimePeriod' Lens +hostConfigCpuRealtimePeriodL :: Lens_' HostConfig (Maybe Integer) +hostConfigCpuRealtimePeriodL f HostConfig{..} = (\hostConfigCpuRealtimePeriod -> HostConfig { hostConfigCpuRealtimePeriod, ..} ) <$> f hostConfigCpuRealtimePeriod +{-# INLINE hostConfigCpuRealtimePeriodL #-} + +-- | 'hostConfigCpuRealtimeRuntime' Lens +hostConfigCpuRealtimeRuntimeL :: Lens_' HostConfig (Maybe Integer) +hostConfigCpuRealtimeRuntimeL f HostConfig{..} = (\hostConfigCpuRealtimeRuntime -> HostConfig { hostConfigCpuRealtimeRuntime, ..} ) <$> f hostConfigCpuRealtimeRuntime +{-# INLINE hostConfigCpuRealtimeRuntimeL #-} + +-- | 'hostConfigCpusetCpus' Lens +hostConfigCpusetCpusL :: Lens_' HostConfig (Maybe Text) +hostConfigCpusetCpusL f HostConfig{..} = (\hostConfigCpusetCpus -> HostConfig { hostConfigCpusetCpus, ..} ) <$> f hostConfigCpusetCpus +{-# INLINE hostConfigCpusetCpusL #-} + +-- | 'hostConfigCpusetMems' Lens +hostConfigCpusetMemsL :: Lens_' HostConfig (Maybe Text) +hostConfigCpusetMemsL f HostConfig{..} = (\hostConfigCpusetMems -> HostConfig { hostConfigCpusetMems, ..} ) <$> f hostConfigCpusetMems +{-# INLINE hostConfigCpusetMemsL #-} + +-- | 'hostConfigDevices' Lens +hostConfigDevicesL :: Lens_' HostConfig (Maybe [DeviceMapping]) +hostConfigDevicesL f HostConfig{..} = (\hostConfigDevices -> HostConfig { hostConfigDevices, ..} ) <$> f hostConfigDevices +{-# INLINE hostConfigDevicesL #-} + +-- | 'hostConfigDeviceCgroupRules' Lens +hostConfigDeviceCgroupRulesL :: Lens_' HostConfig (Maybe [Text]) +hostConfigDeviceCgroupRulesL f HostConfig{..} = (\hostConfigDeviceCgroupRules -> HostConfig { hostConfigDeviceCgroupRules, ..} ) <$> f hostConfigDeviceCgroupRules +{-# INLINE hostConfigDeviceCgroupRulesL #-} + +-- | 'hostConfigDeviceRequests' Lens +hostConfigDeviceRequestsL :: Lens_' HostConfig (Maybe [DeviceRequest]) +hostConfigDeviceRequestsL f HostConfig{..} = (\hostConfigDeviceRequests -> HostConfig { hostConfigDeviceRequests, ..} ) <$> f hostConfigDeviceRequests +{-# INLINE hostConfigDeviceRequestsL #-} + +-- | 'hostConfigKernelMemoryTcp' Lens +hostConfigKernelMemoryTcpL :: Lens_' HostConfig (Maybe Integer) +hostConfigKernelMemoryTcpL f HostConfig{..} = (\hostConfigKernelMemoryTcp -> HostConfig { hostConfigKernelMemoryTcp, ..} ) <$> f hostConfigKernelMemoryTcp +{-# INLINE hostConfigKernelMemoryTcpL #-} + +-- | 'hostConfigMemoryReservation' Lens +hostConfigMemoryReservationL :: Lens_' HostConfig (Maybe Integer) +hostConfigMemoryReservationL f HostConfig{..} = (\hostConfigMemoryReservation -> HostConfig { hostConfigMemoryReservation, ..} ) <$> f hostConfigMemoryReservation +{-# INLINE hostConfigMemoryReservationL #-} + +-- | 'hostConfigMemorySwap' Lens +hostConfigMemorySwapL :: Lens_' HostConfig (Maybe Integer) +hostConfigMemorySwapL f HostConfig{..} = (\hostConfigMemorySwap -> HostConfig { hostConfigMemorySwap, ..} ) <$> f hostConfigMemorySwap +{-# INLINE hostConfigMemorySwapL #-} + +-- | 'hostConfigMemorySwappiness' Lens +hostConfigMemorySwappinessL :: Lens_' HostConfig (Maybe Integer) +hostConfigMemorySwappinessL f HostConfig{..} = (\hostConfigMemorySwappiness -> HostConfig { hostConfigMemorySwappiness, ..} ) <$> f hostConfigMemorySwappiness +{-# INLINE hostConfigMemorySwappinessL #-} + +-- | 'hostConfigNanoCpus' Lens +hostConfigNanoCpusL :: Lens_' HostConfig (Maybe Integer) +hostConfigNanoCpusL f HostConfig{..} = (\hostConfigNanoCpus -> HostConfig { hostConfigNanoCpus, ..} ) <$> f hostConfigNanoCpus +{-# INLINE hostConfigNanoCpusL #-} + +-- | 'hostConfigOomKillDisable' Lens +hostConfigOomKillDisableL :: Lens_' HostConfig (Maybe Bool) +hostConfigOomKillDisableL f HostConfig{..} = (\hostConfigOomKillDisable -> HostConfig { hostConfigOomKillDisable, ..} ) <$> f hostConfigOomKillDisable +{-# INLINE hostConfigOomKillDisableL #-} + +-- | 'hostConfigInit' Lens +hostConfigInitL :: Lens_' HostConfig (Maybe Bool) +hostConfigInitL f HostConfig{..} = (\hostConfigInit -> HostConfig { hostConfigInit, ..} ) <$> f hostConfigInit +{-# INLINE hostConfigInitL #-} + +-- | 'hostConfigPidsLimit' Lens +hostConfigPidsLimitL :: Lens_' HostConfig (Maybe Integer) +hostConfigPidsLimitL f HostConfig{..} = (\hostConfigPidsLimit -> HostConfig { hostConfigPidsLimit, ..} ) <$> f hostConfigPidsLimit +{-# INLINE hostConfigPidsLimitL #-} + +-- | 'hostConfigUlimits' Lens +hostConfigUlimitsL :: Lens_' HostConfig (Maybe [ResourcesUlimitsInner]) +hostConfigUlimitsL f HostConfig{..} = (\hostConfigUlimits -> HostConfig { hostConfigUlimits, ..} ) <$> f hostConfigUlimits +{-# INLINE hostConfigUlimitsL #-} + +-- | 'hostConfigCpuCount' Lens +hostConfigCpuCountL :: Lens_' HostConfig (Maybe Integer) +hostConfigCpuCountL f HostConfig{..} = (\hostConfigCpuCount -> HostConfig { hostConfigCpuCount, ..} ) <$> f hostConfigCpuCount +{-# INLINE hostConfigCpuCountL #-} + +-- | 'hostConfigCpuPercent' Lens +hostConfigCpuPercentL :: Lens_' HostConfig (Maybe Integer) +hostConfigCpuPercentL f HostConfig{..} = (\hostConfigCpuPercent -> HostConfig { hostConfigCpuPercent, ..} ) <$> f hostConfigCpuPercent +{-# INLINE hostConfigCpuPercentL #-} + +-- | 'hostConfigIoMaximumIOps' Lens +hostConfigIoMaximumIOpsL :: Lens_' HostConfig (Maybe Integer) +hostConfigIoMaximumIOpsL f HostConfig{..} = (\hostConfigIoMaximumIOps -> HostConfig { hostConfigIoMaximumIOps, ..} ) <$> f hostConfigIoMaximumIOps +{-# INLINE hostConfigIoMaximumIOpsL #-} + +-- | 'hostConfigIoMaximumBandwidth' Lens +hostConfigIoMaximumBandwidthL :: Lens_' HostConfig (Maybe Integer) +hostConfigIoMaximumBandwidthL f HostConfig{..} = (\hostConfigIoMaximumBandwidth -> HostConfig { hostConfigIoMaximumBandwidth, ..} ) <$> f hostConfigIoMaximumBandwidth +{-# INLINE hostConfigIoMaximumBandwidthL #-} + +-- | 'hostConfigBinds' Lens +hostConfigBindsL :: Lens_' HostConfig (Maybe [Text]) +hostConfigBindsL f HostConfig{..} = (\hostConfigBinds -> HostConfig { hostConfigBinds, ..} ) <$> f hostConfigBinds +{-# INLINE hostConfigBindsL #-} + +-- | 'hostConfigContainerIdFile' Lens +hostConfigContainerIdFileL :: Lens_' HostConfig (Maybe Text) +hostConfigContainerIdFileL f HostConfig{..} = (\hostConfigContainerIdFile -> HostConfig { hostConfigContainerIdFile, ..} ) <$> f hostConfigContainerIdFile +{-# INLINE hostConfigContainerIdFileL #-} + +-- | 'hostConfigLogConfig' Lens +hostConfigLogConfigL :: Lens_' HostConfig (Maybe HostConfigAllOfLogConfig) +hostConfigLogConfigL f HostConfig{..} = (\hostConfigLogConfig -> HostConfig { hostConfigLogConfig, ..} ) <$> f hostConfigLogConfig +{-# INLINE hostConfigLogConfigL #-} + +-- | 'hostConfigNetworkMode' Lens +hostConfigNetworkModeL :: Lens_' HostConfig (Maybe Text) +hostConfigNetworkModeL f HostConfig{..} = (\hostConfigNetworkMode -> HostConfig { hostConfigNetworkMode, ..} ) <$> f hostConfigNetworkMode +{-# INLINE hostConfigNetworkModeL #-} + +-- | 'hostConfigPortBindings' Lens +hostConfigPortBindingsL :: Lens_' HostConfig (Maybe (Map.Map String [PortBinding])) +hostConfigPortBindingsL f HostConfig{..} = (\hostConfigPortBindings -> HostConfig { hostConfigPortBindings, ..} ) <$> f hostConfigPortBindings +{-# INLINE hostConfigPortBindingsL #-} + +-- | 'hostConfigRestartPolicy' Lens +hostConfigRestartPolicyL :: Lens_' HostConfig (Maybe RestartPolicy) +hostConfigRestartPolicyL f HostConfig{..} = (\hostConfigRestartPolicy -> HostConfig { hostConfigRestartPolicy, ..} ) <$> f hostConfigRestartPolicy +{-# INLINE hostConfigRestartPolicyL #-} + +-- | 'hostConfigAutoRemove' Lens +hostConfigAutoRemoveL :: Lens_' HostConfig (Maybe Bool) +hostConfigAutoRemoveL f HostConfig{..} = (\hostConfigAutoRemove -> HostConfig { hostConfigAutoRemove, ..} ) <$> f hostConfigAutoRemove +{-# INLINE hostConfigAutoRemoveL #-} + +-- | 'hostConfigVolumeDriver' Lens +hostConfigVolumeDriverL :: Lens_' HostConfig (Maybe Text) +hostConfigVolumeDriverL f HostConfig{..} = (\hostConfigVolumeDriver -> HostConfig { hostConfigVolumeDriver, ..} ) <$> f hostConfigVolumeDriver +{-# INLINE hostConfigVolumeDriverL #-} + +-- | 'hostConfigVolumesFrom' Lens +hostConfigVolumesFromL :: Lens_' HostConfig (Maybe [Text]) +hostConfigVolumesFromL f HostConfig{..} = (\hostConfigVolumesFrom -> HostConfig { hostConfigVolumesFrom, ..} ) <$> f hostConfigVolumesFrom +{-# INLINE hostConfigVolumesFromL #-} + +-- | 'hostConfigMounts' Lens +hostConfigMountsL :: Lens_' HostConfig (Maybe [Mount]) +hostConfigMountsL f HostConfig{..} = (\hostConfigMounts -> HostConfig { hostConfigMounts, ..} ) <$> f hostConfigMounts +{-# INLINE hostConfigMountsL #-} + +-- | 'hostConfigConsoleSize' Lens +hostConfigConsoleSizeL :: Lens_' HostConfig (Maybe [Int]) +hostConfigConsoleSizeL f HostConfig{..} = (\hostConfigConsoleSize -> HostConfig { hostConfigConsoleSize, ..} ) <$> f hostConfigConsoleSize +{-# INLINE hostConfigConsoleSizeL #-} + +-- | 'hostConfigAnnotations' Lens +hostConfigAnnotationsL :: Lens_' HostConfig (Maybe (Map.Map String Text)) +hostConfigAnnotationsL f HostConfig{..} = (\hostConfigAnnotations -> HostConfig { hostConfigAnnotations, ..} ) <$> f hostConfigAnnotations +{-# INLINE hostConfigAnnotationsL #-} + +-- | 'hostConfigCapAdd' Lens +hostConfigCapAddL :: Lens_' HostConfig (Maybe [Text]) +hostConfigCapAddL f HostConfig{..} = (\hostConfigCapAdd -> HostConfig { hostConfigCapAdd, ..} ) <$> f hostConfigCapAdd +{-# INLINE hostConfigCapAddL #-} + +-- | 'hostConfigCapDrop' Lens +hostConfigCapDropL :: Lens_' HostConfig (Maybe [Text]) +hostConfigCapDropL f HostConfig{..} = (\hostConfigCapDrop -> HostConfig { hostConfigCapDrop, ..} ) <$> f hostConfigCapDrop +{-# INLINE hostConfigCapDropL #-} + +-- | 'hostConfigCgroupnsMode' Lens +hostConfigCgroupnsModeL :: Lens_' HostConfig (Maybe E'CgroupnsMode) +hostConfigCgroupnsModeL f HostConfig{..} = (\hostConfigCgroupnsMode -> HostConfig { hostConfigCgroupnsMode, ..} ) <$> f hostConfigCgroupnsMode +{-# INLINE hostConfigCgroupnsModeL #-} + +-- | 'hostConfigDns' Lens +hostConfigDnsL :: Lens_' HostConfig (Maybe [Text]) +hostConfigDnsL f HostConfig{..} = (\hostConfigDns -> HostConfig { hostConfigDns, ..} ) <$> f hostConfigDns +{-# INLINE hostConfigDnsL #-} + +-- | 'hostConfigDnsOptions' Lens +hostConfigDnsOptionsL :: Lens_' HostConfig (Maybe [Text]) +hostConfigDnsOptionsL f HostConfig{..} = (\hostConfigDnsOptions -> HostConfig { hostConfigDnsOptions, ..} ) <$> f hostConfigDnsOptions +{-# INLINE hostConfigDnsOptionsL #-} + +-- | 'hostConfigDnsSearch' Lens +hostConfigDnsSearchL :: Lens_' HostConfig (Maybe [Text]) +hostConfigDnsSearchL f HostConfig{..} = (\hostConfigDnsSearch -> HostConfig { hostConfigDnsSearch, ..} ) <$> f hostConfigDnsSearch +{-# INLINE hostConfigDnsSearchL #-} + +-- | 'hostConfigExtraHosts' Lens +hostConfigExtraHostsL :: Lens_' HostConfig (Maybe [Text]) +hostConfigExtraHostsL f HostConfig{..} = (\hostConfigExtraHosts -> HostConfig { hostConfigExtraHosts, ..} ) <$> f hostConfigExtraHosts +{-# INLINE hostConfigExtraHostsL #-} + +-- | 'hostConfigGroupAdd' Lens +hostConfigGroupAddL :: Lens_' HostConfig (Maybe [Text]) +hostConfigGroupAddL f HostConfig{..} = (\hostConfigGroupAdd -> HostConfig { hostConfigGroupAdd, ..} ) <$> f hostConfigGroupAdd +{-# INLINE hostConfigGroupAddL #-} + +-- | 'hostConfigIpcMode' Lens +hostConfigIpcModeL :: Lens_' HostConfig (Maybe Text) +hostConfigIpcModeL f HostConfig{..} = (\hostConfigIpcMode -> HostConfig { hostConfigIpcMode, ..} ) <$> f hostConfigIpcMode +{-# INLINE hostConfigIpcModeL #-} + +-- | 'hostConfigCgroup' Lens +hostConfigCgroupL :: Lens_' HostConfig (Maybe Text) +hostConfigCgroupL f HostConfig{..} = (\hostConfigCgroup -> HostConfig { hostConfigCgroup, ..} ) <$> f hostConfigCgroup +{-# INLINE hostConfigCgroupL #-} + +-- | 'hostConfigLinks' Lens +hostConfigLinksL :: Lens_' HostConfig (Maybe [Text]) +hostConfigLinksL f HostConfig{..} = (\hostConfigLinks -> HostConfig { hostConfigLinks, ..} ) <$> f hostConfigLinks +{-# INLINE hostConfigLinksL #-} + +-- | 'hostConfigOomScoreAdj' Lens +hostConfigOomScoreAdjL :: Lens_' HostConfig (Maybe Int) +hostConfigOomScoreAdjL f HostConfig{..} = (\hostConfigOomScoreAdj -> HostConfig { hostConfigOomScoreAdj, ..} ) <$> f hostConfigOomScoreAdj +{-# INLINE hostConfigOomScoreAdjL #-} + +-- | 'hostConfigPidMode' Lens +hostConfigPidModeL :: Lens_' HostConfig (Maybe Text) +hostConfigPidModeL f HostConfig{..} = (\hostConfigPidMode -> HostConfig { hostConfigPidMode, ..} ) <$> f hostConfigPidMode +{-# INLINE hostConfigPidModeL #-} + +-- | 'hostConfigPrivileged' Lens +hostConfigPrivilegedL :: Lens_' HostConfig (Maybe Bool) +hostConfigPrivilegedL f HostConfig{..} = (\hostConfigPrivileged -> HostConfig { hostConfigPrivileged, ..} ) <$> f hostConfigPrivileged +{-# INLINE hostConfigPrivilegedL #-} + +-- | 'hostConfigPublishAllPorts' Lens +hostConfigPublishAllPortsL :: Lens_' HostConfig (Maybe Bool) +hostConfigPublishAllPortsL f HostConfig{..} = (\hostConfigPublishAllPorts -> HostConfig { hostConfigPublishAllPorts, ..} ) <$> f hostConfigPublishAllPorts +{-# INLINE hostConfigPublishAllPortsL #-} + +-- | 'hostConfigReadonlyRootfs' Lens +hostConfigReadonlyRootfsL :: Lens_' HostConfig (Maybe Bool) +hostConfigReadonlyRootfsL f HostConfig{..} = (\hostConfigReadonlyRootfs -> HostConfig { hostConfigReadonlyRootfs, ..} ) <$> f hostConfigReadonlyRootfs +{-# INLINE hostConfigReadonlyRootfsL #-} + +-- | 'hostConfigSecurityOpt' Lens +hostConfigSecurityOptL :: Lens_' HostConfig (Maybe [Text]) +hostConfigSecurityOptL f HostConfig{..} = (\hostConfigSecurityOpt -> HostConfig { hostConfigSecurityOpt, ..} ) <$> f hostConfigSecurityOpt +{-# INLINE hostConfigSecurityOptL #-} + +-- | 'hostConfigStorageOpt' Lens +hostConfigStorageOptL :: Lens_' HostConfig (Maybe (Map.Map String Text)) +hostConfigStorageOptL f HostConfig{..} = (\hostConfigStorageOpt -> HostConfig { hostConfigStorageOpt, ..} ) <$> f hostConfigStorageOpt +{-# INLINE hostConfigStorageOptL #-} + +-- | 'hostConfigTmpfs' Lens +hostConfigTmpfsL :: Lens_' HostConfig (Maybe (Map.Map String Text)) +hostConfigTmpfsL f HostConfig{..} = (\hostConfigTmpfs -> HostConfig { hostConfigTmpfs, ..} ) <$> f hostConfigTmpfs +{-# INLINE hostConfigTmpfsL #-} + +-- | 'hostConfigUtsMode' Lens +hostConfigUtsModeL :: Lens_' HostConfig (Maybe Text) +hostConfigUtsModeL f HostConfig{..} = (\hostConfigUtsMode -> HostConfig { hostConfigUtsMode, ..} ) <$> f hostConfigUtsMode +{-# INLINE hostConfigUtsModeL #-} + +-- | 'hostConfigUsernsMode' Lens +hostConfigUsernsModeL :: Lens_' HostConfig (Maybe Text) +hostConfigUsernsModeL f HostConfig{..} = (\hostConfigUsernsMode -> HostConfig { hostConfigUsernsMode, ..} ) <$> f hostConfigUsernsMode +{-# INLINE hostConfigUsernsModeL #-} + +-- | 'hostConfigShmSize' Lens +hostConfigShmSizeL :: Lens_' HostConfig (Maybe Integer) +hostConfigShmSizeL f HostConfig{..} = (\hostConfigShmSize -> HostConfig { hostConfigShmSize, ..} ) <$> f hostConfigShmSize +{-# INLINE hostConfigShmSizeL #-} + +-- | 'hostConfigSysctls' Lens +hostConfigSysctlsL :: Lens_' HostConfig (Maybe (Map.Map String Text)) +hostConfigSysctlsL f HostConfig{..} = (\hostConfigSysctls -> HostConfig { hostConfigSysctls, ..} ) <$> f hostConfigSysctls +{-# INLINE hostConfigSysctlsL #-} + +-- | 'hostConfigRuntime' Lens +hostConfigRuntimeL :: Lens_' HostConfig (Maybe Text) +hostConfigRuntimeL f HostConfig{..} = (\hostConfigRuntime -> HostConfig { hostConfigRuntime, ..} ) <$> f hostConfigRuntime +{-# INLINE hostConfigRuntimeL #-} + +-- | 'hostConfigIsolation' Lens +hostConfigIsolationL :: Lens_' HostConfig (Maybe E'Isolation) +hostConfigIsolationL f HostConfig{..} = (\hostConfigIsolation -> HostConfig { hostConfigIsolation, ..} ) <$> f hostConfigIsolation +{-# INLINE hostConfigIsolationL #-} + +-- | 'hostConfigMaskedPaths' Lens +hostConfigMaskedPathsL :: Lens_' HostConfig (Maybe [Text]) +hostConfigMaskedPathsL f HostConfig{..} = (\hostConfigMaskedPaths -> HostConfig { hostConfigMaskedPaths, ..} ) <$> f hostConfigMaskedPaths +{-# INLINE hostConfigMaskedPathsL #-} + +-- | 'hostConfigReadonlyPaths' Lens +hostConfigReadonlyPathsL :: Lens_' HostConfig (Maybe [Text]) +hostConfigReadonlyPathsL f HostConfig{..} = (\hostConfigReadonlyPaths -> HostConfig { hostConfigReadonlyPaths, ..} ) <$> f hostConfigReadonlyPaths +{-# INLINE hostConfigReadonlyPathsL #-} + + + +-- * HostConfigAllOfLogConfig + +-- | 'hostConfigAllOfLogConfigType' Lens +hostConfigAllOfLogConfigTypeL :: Lens_' HostConfigAllOfLogConfig (Maybe E'Type5) +hostConfigAllOfLogConfigTypeL f HostConfigAllOfLogConfig{..} = (\hostConfigAllOfLogConfigType -> HostConfigAllOfLogConfig { hostConfigAllOfLogConfigType, ..} ) <$> f hostConfigAllOfLogConfigType +{-# INLINE hostConfigAllOfLogConfigTypeL #-} + +-- | 'hostConfigAllOfLogConfigConfig' Lens +hostConfigAllOfLogConfigConfigL :: Lens_' HostConfigAllOfLogConfig (Maybe (Map.Map String Text)) +hostConfigAllOfLogConfigConfigL f HostConfigAllOfLogConfig{..} = (\hostConfigAllOfLogConfigConfig -> HostConfigAllOfLogConfig { hostConfigAllOfLogConfigConfig, ..} ) <$> f hostConfigAllOfLogConfigConfig +{-# INLINE hostConfigAllOfLogConfigConfigL #-} + + + +-- * IPAM + +-- | 'iPAMDriver' Lens +iPAMDriverL :: Lens_' IPAM (Maybe Text) +iPAMDriverL f IPAM{..} = (\iPAMDriver -> IPAM { iPAMDriver, ..} ) <$> f iPAMDriver +{-# INLINE iPAMDriverL #-} + +-- | 'iPAMConfig' Lens +iPAMConfigL :: Lens_' IPAM (Maybe [IPAMConfig]) +iPAMConfigL f IPAM{..} = (\iPAMConfig -> IPAM { iPAMConfig, ..} ) <$> f iPAMConfig +{-# INLINE iPAMConfigL #-} + +-- | 'iPAMOptions' Lens +iPAMOptionsL :: Lens_' IPAM (Maybe (Map.Map String Text)) +iPAMOptionsL f IPAM{..} = (\iPAMOptions -> IPAM { iPAMOptions, ..} ) <$> f iPAMOptions +{-# INLINE iPAMOptionsL #-} + + + +-- * IPAMConfig + +-- | 'iPAMConfigSubnet' Lens +iPAMConfigSubnetL :: Lens_' IPAMConfig (Maybe Text) +iPAMConfigSubnetL f IPAMConfig{..} = (\iPAMConfigSubnet -> IPAMConfig { iPAMConfigSubnet, ..} ) <$> f iPAMConfigSubnet +{-# INLINE iPAMConfigSubnetL #-} + +-- | 'iPAMConfigIpRange' Lens +iPAMConfigIpRangeL :: Lens_' IPAMConfig (Maybe Text) +iPAMConfigIpRangeL f IPAMConfig{..} = (\iPAMConfigIpRange -> IPAMConfig { iPAMConfigIpRange, ..} ) <$> f iPAMConfigIpRange +{-# INLINE iPAMConfigIpRangeL #-} + +-- | 'iPAMConfigGateway' Lens +iPAMConfigGatewayL :: Lens_' IPAMConfig (Maybe Text) +iPAMConfigGatewayL f IPAMConfig{..} = (\iPAMConfigGateway -> IPAMConfig { iPAMConfigGateway, ..} ) <$> f iPAMConfigGateway +{-# INLINE iPAMConfigGatewayL #-} + +-- | 'iPAMConfigAuxiliaryAddresses' Lens +iPAMConfigAuxiliaryAddressesL :: Lens_' IPAMConfig (Maybe (Map.Map String Text)) +iPAMConfigAuxiliaryAddressesL f IPAMConfig{..} = (\iPAMConfigAuxiliaryAddresses -> IPAMConfig { iPAMConfigAuxiliaryAddresses, ..} ) <$> f iPAMConfigAuxiliaryAddresses +{-# INLINE iPAMConfigAuxiliaryAddressesL #-} + + + +-- * IdResponse + +-- | 'idResponseId' Lens +idResponseIdL :: Lens_' IdResponse (Text) +idResponseIdL f IdResponse{..} = (\idResponseId -> IdResponse { idResponseId, ..} ) <$> f idResponseId +{-# INLINE idResponseIdL #-} + + + +-- * ImageConfig + +-- | 'imageConfigHostname' Lens +imageConfigHostnameL :: Lens_' ImageConfig (Maybe Text) +imageConfigHostnameL f ImageConfig{..} = (\imageConfigHostname -> ImageConfig { imageConfigHostname, ..} ) <$> f imageConfigHostname +{-# INLINE imageConfigHostnameL #-} + +-- | 'imageConfigDomainname' Lens +imageConfigDomainnameL :: Lens_' ImageConfig (Maybe Text) +imageConfigDomainnameL f ImageConfig{..} = (\imageConfigDomainname -> ImageConfig { imageConfigDomainname, ..} ) <$> f imageConfigDomainname +{-# INLINE imageConfigDomainnameL #-} + +-- | 'imageConfigUser' Lens +imageConfigUserL :: Lens_' ImageConfig (Maybe Text) +imageConfigUserL f ImageConfig{..} = (\imageConfigUser -> ImageConfig { imageConfigUser, ..} ) <$> f imageConfigUser +{-# INLINE imageConfigUserL #-} + +-- | 'imageConfigAttachStdin' Lens +imageConfigAttachStdinL :: Lens_' ImageConfig (Maybe Bool) +imageConfigAttachStdinL f ImageConfig{..} = (\imageConfigAttachStdin -> ImageConfig { imageConfigAttachStdin, ..} ) <$> f imageConfigAttachStdin +{-# INLINE imageConfigAttachStdinL #-} + +-- | 'imageConfigAttachStdout' Lens +imageConfigAttachStdoutL :: Lens_' ImageConfig (Maybe Bool) +imageConfigAttachStdoutL f ImageConfig{..} = (\imageConfigAttachStdout -> ImageConfig { imageConfigAttachStdout, ..} ) <$> f imageConfigAttachStdout +{-# INLINE imageConfigAttachStdoutL #-} + +-- | 'imageConfigAttachStderr' Lens +imageConfigAttachStderrL :: Lens_' ImageConfig (Maybe Bool) +imageConfigAttachStderrL f ImageConfig{..} = (\imageConfigAttachStderr -> ImageConfig { imageConfigAttachStderr, ..} ) <$> f imageConfigAttachStderr +{-# INLINE imageConfigAttachStderrL #-} + +-- | 'imageConfigExposedPorts' Lens +imageConfigExposedPortsL :: Lens_' ImageConfig (Maybe (Map.Map String A.Value)) +imageConfigExposedPortsL f ImageConfig{..} = (\imageConfigExposedPorts -> ImageConfig { imageConfigExposedPorts, ..} ) <$> f imageConfigExposedPorts +{-# INLINE imageConfigExposedPortsL #-} + +-- | 'imageConfigTty' Lens +imageConfigTtyL :: Lens_' ImageConfig (Maybe Bool) +imageConfigTtyL f ImageConfig{..} = (\imageConfigTty -> ImageConfig { imageConfigTty, ..} ) <$> f imageConfigTty +{-# INLINE imageConfigTtyL #-} + +-- | 'imageConfigOpenStdin' Lens +imageConfigOpenStdinL :: Lens_' ImageConfig (Maybe Bool) +imageConfigOpenStdinL f ImageConfig{..} = (\imageConfigOpenStdin -> ImageConfig { imageConfigOpenStdin, ..} ) <$> f imageConfigOpenStdin +{-# INLINE imageConfigOpenStdinL #-} + +-- | 'imageConfigStdinOnce' Lens +imageConfigStdinOnceL :: Lens_' ImageConfig (Maybe Bool) +imageConfigStdinOnceL f ImageConfig{..} = (\imageConfigStdinOnce -> ImageConfig { imageConfigStdinOnce, ..} ) <$> f imageConfigStdinOnce +{-# INLINE imageConfigStdinOnceL #-} + +-- | 'imageConfigEnv' Lens +imageConfigEnvL :: Lens_' ImageConfig (Maybe [Text]) +imageConfigEnvL f ImageConfig{..} = (\imageConfigEnv -> ImageConfig { imageConfigEnv, ..} ) <$> f imageConfigEnv +{-# INLINE imageConfigEnvL #-} + +-- | 'imageConfigCmd' Lens +imageConfigCmdL :: Lens_' ImageConfig (Maybe [Text]) +imageConfigCmdL f ImageConfig{..} = (\imageConfigCmd -> ImageConfig { imageConfigCmd, ..} ) <$> f imageConfigCmd +{-# INLINE imageConfigCmdL #-} + +-- | 'imageConfigHealthcheck' Lens +imageConfigHealthcheckL :: Lens_' ImageConfig (Maybe HealthConfig) +imageConfigHealthcheckL f ImageConfig{..} = (\imageConfigHealthcheck -> ImageConfig { imageConfigHealthcheck, ..} ) <$> f imageConfigHealthcheck +{-# INLINE imageConfigHealthcheckL #-} + +-- | 'imageConfigArgsEscaped' Lens +imageConfigArgsEscapedL :: Lens_' ImageConfig (Maybe Bool) +imageConfigArgsEscapedL f ImageConfig{..} = (\imageConfigArgsEscaped -> ImageConfig { imageConfigArgsEscaped, ..} ) <$> f imageConfigArgsEscaped +{-# INLINE imageConfigArgsEscapedL #-} + +-- | 'imageConfigImage' Lens +imageConfigImageL :: Lens_' ImageConfig (Maybe Text) +imageConfigImageL f ImageConfig{..} = (\imageConfigImage -> ImageConfig { imageConfigImage, ..} ) <$> f imageConfigImage +{-# INLINE imageConfigImageL #-} + +-- | 'imageConfigVolumes' Lens +imageConfigVolumesL :: Lens_' ImageConfig (Maybe (Map.Map String A.Value)) +imageConfigVolumesL f ImageConfig{..} = (\imageConfigVolumes -> ImageConfig { imageConfigVolumes, ..} ) <$> f imageConfigVolumes +{-# INLINE imageConfigVolumesL #-} + +-- | 'imageConfigWorkingDir' Lens +imageConfigWorkingDirL :: Lens_' ImageConfig (Maybe Text) +imageConfigWorkingDirL f ImageConfig{..} = (\imageConfigWorkingDir -> ImageConfig { imageConfigWorkingDir, ..} ) <$> f imageConfigWorkingDir +{-# INLINE imageConfigWorkingDirL #-} + +-- | 'imageConfigEntrypoint' Lens +imageConfigEntrypointL :: Lens_' ImageConfig (Maybe [Text]) +imageConfigEntrypointL f ImageConfig{..} = (\imageConfigEntrypoint -> ImageConfig { imageConfigEntrypoint, ..} ) <$> f imageConfigEntrypoint +{-# INLINE imageConfigEntrypointL #-} + +-- | 'imageConfigNetworkDisabled' Lens +imageConfigNetworkDisabledL :: Lens_' ImageConfig (Maybe Bool) +imageConfigNetworkDisabledL f ImageConfig{..} = (\imageConfigNetworkDisabled -> ImageConfig { imageConfigNetworkDisabled, ..} ) <$> f imageConfigNetworkDisabled +{-# INLINE imageConfigNetworkDisabledL #-} + +-- | 'imageConfigMacAddress' Lens +imageConfigMacAddressL :: Lens_' ImageConfig (Maybe Text) +imageConfigMacAddressL f ImageConfig{..} = (\imageConfigMacAddress -> ImageConfig { imageConfigMacAddress, ..} ) <$> f imageConfigMacAddress +{-# INLINE imageConfigMacAddressL #-} + +-- | 'imageConfigOnBuild' Lens +imageConfigOnBuildL :: Lens_' ImageConfig (Maybe [Text]) +imageConfigOnBuildL f ImageConfig{..} = (\imageConfigOnBuild -> ImageConfig { imageConfigOnBuild, ..} ) <$> f imageConfigOnBuild +{-# INLINE imageConfigOnBuildL #-} + +-- | 'imageConfigLabels' Lens +imageConfigLabelsL :: Lens_' ImageConfig (Maybe (Map.Map String Text)) +imageConfigLabelsL f ImageConfig{..} = (\imageConfigLabels -> ImageConfig { imageConfigLabels, ..} ) <$> f imageConfigLabels +{-# INLINE imageConfigLabelsL #-} + +-- | 'imageConfigStopSignal' Lens +imageConfigStopSignalL :: Lens_' ImageConfig (Maybe Text) +imageConfigStopSignalL f ImageConfig{..} = (\imageConfigStopSignal -> ImageConfig { imageConfigStopSignal, ..} ) <$> f imageConfigStopSignal +{-# INLINE imageConfigStopSignalL #-} + +-- | 'imageConfigStopTimeout' Lens +imageConfigStopTimeoutL :: Lens_' ImageConfig (Maybe Int) +imageConfigStopTimeoutL f ImageConfig{..} = (\imageConfigStopTimeout -> ImageConfig { imageConfigStopTimeout, ..} ) <$> f imageConfigStopTimeout +{-# INLINE imageConfigStopTimeoutL #-} + +-- | 'imageConfigShell' Lens +imageConfigShellL :: Lens_' ImageConfig (Maybe [Text]) +imageConfigShellL f ImageConfig{..} = (\imageConfigShell -> ImageConfig { imageConfigShell, ..} ) <$> f imageConfigShell +{-# INLINE imageConfigShellL #-} + + + +-- * ImageDeleteResponseItem + +-- | 'imageDeleteResponseItemUntagged' Lens +imageDeleteResponseItemUntaggedL :: Lens_' ImageDeleteResponseItem (Maybe Text) +imageDeleteResponseItemUntaggedL f ImageDeleteResponseItem{..} = (\imageDeleteResponseItemUntagged -> ImageDeleteResponseItem { imageDeleteResponseItemUntagged, ..} ) <$> f imageDeleteResponseItemUntagged +{-# INLINE imageDeleteResponseItemUntaggedL #-} + +-- | 'imageDeleteResponseItemDeleted' Lens +imageDeleteResponseItemDeletedL :: Lens_' ImageDeleteResponseItem (Maybe Text) +imageDeleteResponseItemDeletedL f ImageDeleteResponseItem{..} = (\imageDeleteResponseItemDeleted -> ImageDeleteResponseItem { imageDeleteResponseItemDeleted, ..} ) <$> f imageDeleteResponseItemDeleted +{-# INLINE imageDeleteResponseItemDeletedL #-} + + + +-- * ImageID + +-- | 'imageIDId' Lens +imageIDIdL :: Lens_' ImageID (Maybe Text) +imageIDIdL f ImageID{..} = (\imageIDId -> ImageID { imageIDId, ..} ) <$> f imageIDId +{-# INLINE imageIDIdL #-} + + + +-- * ImageInspect + +-- | 'imageInspectId' Lens +imageInspectIdL :: Lens_' ImageInspect (Maybe Text) +imageInspectIdL f ImageInspect{..} = (\imageInspectId -> ImageInspect { imageInspectId, ..} ) <$> f imageInspectId +{-# INLINE imageInspectIdL #-} + +-- | 'imageInspectRepoTags' Lens +imageInspectRepoTagsL :: Lens_' ImageInspect (Maybe [Text]) +imageInspectRepoTagsL f ImageInspect{..} = (\imageInspectRepoTags -> ImageInspect { imageInspectRepoTags, ..} ) <$> f imageInspectRepoTags +{-# INLINE imageInspectRepoTagsL #-} + +-- | 'imageInspectRepoDigests' Lens +imageInspectRepoDigestsL :: Lens_' ImageInspect (Maybe [Text]) +imageInspectRepoDigestsL f ImageInspect{..} = (\imageInspectRepoDigests -> ImageInspect { imageInspectRepoDigests, ..} ) <$> f imageInspectRepoDigests +{-# INLINE imageInspectRepoDigestsL #-} + +-- | 'imageInspectParent' Lens +imageInspectParentL :: Lens_' ImageInspect (Maybe Text) +imageInspectParentL f ImageInspect{..} = (\imageInspectParent -> ImageInspect { imageInspectParent, ..} ) <$> f imageInspectParent +{-# INLINE imageInspectParentL #-} + +-- | 'imageInspectComment' Lens +imageInspectCommentL :: Lens_' ImageInspect (Maybe Text) +imageInspectCommentL f ImageInspect{..} = (\imageInspectComment -> ImageInspect { imageInspectComment, ..} ) <$> f imageInspectComment +{-# INLINE imageInspectCommentL #-} + +-- | 'imageInspectCreated' Lens +imageInspectCreatedL :: Lens_' ImageInspect (Maybe Text) +imageInspectCreatedL f ImageInspect{..} = (\imageInspectCreated -> ImageInspect { imageInspectCreated, ..} ) <$> f imageInspectCreated +{-# INLINE imageInspectCreatedL #-} + +-- | 'imageInspectDockerVersion' Lens +imageInspectDockerVersionL :: Lens_' ImageInspect (Maybe Text) +imageInspectDockerVersionL f ImageInspect{..} = (\imageInspectDockerVersion -> ImageInspect { imageInspectDockerVersion, ..} ) <$> f imageInspectDockerVersion +{-# INLINE imageInspectDockerVersionL #-} + +-- | 'imageInspectAuthor' Lens +imageInspectAuthorL :: Lens_' ImageInspect (Maybe Text) +imageInspectAuthorL f ImageInspect{..} = (\imageInspectAuthor -> ImageInspect { imageInspectAuthor, ..} ) <$> f imageInspectAuthor +{-# INLINE imageInspectAuthorL #-} + +-- | 'imageInspectConfig' Lens +imageInspectConfigL :: Lens_' ImageInspect (Maybe ImageConfig) +imageInspectConfigL f ImageInspect{..} = (\imageInspectConfig -> ImageInspect { imageInspectConfig, ..} ) <$> f imageInspectConfig +{-# INLINE imageInspectConfigL #-} + +-- | 'imageInspectArchitecture' Lens +imageInspectArchitectureL :: Lens_' ImageInspect (Maybe Text) +imageInspectArchitectureL f ImageInspect{..} = (\imageInspectArchitecture -> ImageInspect { imageInspectArchitecture, ..} ) <$> f imageInspectArchitecture +{-# INLINE imageInspectArchitectureL #-} + +-- | 'imageInspectVariant' Lens +imageInspectVariantL :: Lens_' ImageInspect (Maybe Text) +imageInspectVariantL f ImageInspect{..} = (\imageInspectVariant -> ImageInspect { imageInspectVariant, ..} ) <$> f imageInspectVariant +{-# INLINE imageInspectVariantL #-} + +-- | 'imageInspectOs' Lens +imageInspectOsL :: Lens_' ImageInspect (Maybe Text) +imageInspectOsL f ImageInspect{..} = (\imageInspectOs -> ImageInspect { imageInspectOs, ..} ) <$> f imageInspectOs +{-# INLINE imageInspectOsL #-} + +-- | 'imageInspectOsVersion' Lens +imageInspectOsVersionL :: Lens_' ImageInspect (Maybe Text) +imageInspectOsVersionL f ImageInspect{..} = (\imageInspectOsVersion -> ImageInspect { imageInspectOsVersion, ..} ) <$> f imageInspectOsVersion +{-# INLINE imageInspectOsVersionL #-} + +-- | 'imageInspectSize' Lens +imageInspectSizeL :: Lens_' ImageInspect (Maybe Integer) +imageInspectSizeL f ImageInspect{..} = (\imageInspectSize -> ImageInspect { imageInspectSize, ..} ) <$> f imageInspectSize +{-# INLINE imageInspectSizeL #-} + +-- | 'imageInspectVirtualSize' Lens +imageInspectVirtualSizeL :: Lens_' ImageInspect (Maybe Integer) +imageInspectVirtualSizeL f ImageInspect{..} = (\imageInspectVirtualSize -> ImageInspect { imageInspectVirtualSize, ..} ) <$> f imageInspectVirtualSize +{-# INLINE imageInspectVirtualSizeL #-} + +-- | 'imageInspectGraphDriver' Lens +imageInspectGraphDriverL :: Lens_' ImageInspect (Maybe GraphDriverData) +imageInspectGraphDriverL f ImageInspect{..} = (\imageInspectGraphDriver -> ImageInspect { imageInspectGraphDriver, ..} ) <$> f imageInspectGraphDriver +{-# INLINE imageInspectGraphDriverL #-} + +-- | 'imageInspectRootFs' Lens +imageInspectRootFsL :: Lens_' ImageInspect (Maybe ImageInspectRootFS) +imageInspectRootFsL f ImageInspect{..} = (\imageInspectRootFs -> ImageInspect { imageInspectRootFs, ..} ) <$> f imageInspectRootFs +{-# INLINE imageInspectRootFsL #-} + +-- | 'imageInspectMetadata' Lens +imageInspectMetadataL :: Lens_' ImageInspect (Maybe ImageInspectMetadata) +imageInspectMetadataL f ImageInspect{..} = (\imageInspectMetadata -> ImageInspect { imageInspectMetadata, ..} ) <$> f imageInspectMetadata +{-# INLINE imageInspectMetadataL #-} + + + +-- * ImageInspectMetadata + +-- | 'imageInspectMetadataLastTagTime' Lens +imageInspectMetadataLastTagTimeL :: Lens_' ImageInspectMetadata (Maybe Text) +imageInspectMetadataLastTagTimeL f ImageInspectMetadata{..} = (\imageInspectMetadataLastTagTime -> ImageInspectMetadata { imageInspectMetadataLastTagTime, ..} ) <$> f imageInspectMetadataLastTagTime +{-# INLINE imageInspectMetadataLastTagTimeL #-} + + + +-- * ImageInspectRootFS + +-- | 'imageInspectRootFSType' Lens +imageInspectRootFSTypeL :: Lens_' ImageInspectRootFS (Text) +imageInspectRootFSTypeL f ImageInspectRootFS{..} = (\imageInspectRootFSType -> ImageInspectRootFS { imageInspectRootFSType, ..} ) <$> f imageInspectRootFSType +{-# INLINE imageInspectRootFSTypeL #-} + +-- | 'imageInspectRootFSLayers' Lens +imageInspectRootFSLayersL :: Lens_' ImageInspectRootFS (Maybe [Text]) +imageInspectRootFSLayersL f ImageInspectRootFS{..} = (\imageInspectRootFSLayers -> ImageInspectRootFS { imageInspectRootFSLayers, ..} ) <$> f imageInspectRootFSLayers +{-# INLINE imageInspectRootFSLayersL #-} + + + +-- * ImagePruneResponse + +-- | 'imagePruneResponseImagesDeleted' Lens +imagePruneResponseImagesDeletedL :: Lens_' ImagePruneResponse (Maybe [ImageDeleteResponseItem]) +imagePruneResponseImagesDeletedL f ImagePruneResponse{..} = (\imagePruneResponseImagesDeleted -> ImagePruneResponse { imagePruneResponseImagesDeleted, ..} ) <$> f imagePruneResponseImagesDeleted +{-# INLINE imagePruneResponseImagesDeletedL #-} + +-- | 'imagePruneResponseSpaceReclaimed' Lens +imagePruneResponseSpaceReclaimedL :: Lens_' ImagePruneResponse (Maybe Integer) +imagePruneResponseSpaceReclaimedL f ImagePruneResponse{..} = (\imagePruneResponseSpaceReclaimed -> ImagePruneResponse { imagePruneResponseSpaceReclaimed, ..} ) <$> f imagePruneResponseSpaceReclaimed +{-# INLINE imagePruneResponseSpaceReclaimedL #-} + + + +-- * ImageSearchResponseItem + +-- | 'imageSearchResponseItemDescription' Lens +imageSearchResponseItemDescriptionL :: Lens_' ImageSearchResponseItem (Maybe Text) +imageSearchResponseItemDescriptionL f ImageSearchResponseItem{..} = (\imageSearchResponseItemDescription -> ImageSearchResponseItem { imageSearchResponseItemDescription, ..} ) <$> f imageSearchResponseItemDescription +{-# INLINE imageSearchResponseItemDescriptionL #-} + +-- | 'imageSearchResponseItemIsOfficial' Lens +imageSearchResponseItemIsOfficialL :: Lens_' ImageSearchResponseItem (Maybe Bool) +imageSearchResponseItemIsOfficialL f ImageSearchResponseItem{..} = (\imageSearchResponseItemIsOfficial -> ImageSearchResponseItem { imageSearchResponseItemIsOfficial, ..} ) <$> f imageSearchResponseItemIsOfficial +{-# INLINE imageSearchResponseItemIsOfficialL #-} + +-- | 'imageSearchResponseItemIsAutomated' Lens +imageSearchResponseItemIsAutomatedL :: Lens_' ImageSearchResponseItem (Maybe Bool) +imageSearchResponseItemIsAutomatedL f ImageSearchResponseItem{..} = (\imageSearchResponseItemIsAutomated -> ImageSearchResponseItem { imageSearchResponseItemIsAutomated, ..} ) <$> f imageSearchResponseItemIsAutomated +{-# INLINE imageSearchResponseItemIsAutomatedL #-} + +-- | 'imageSearchResponseItemName' Lens +imageSearchResponseItemNameL :: Lens_' ImageSearchResponseItem (Maybe Text) +imageSearchResponseItemNameL f ImageSearchResponseItem{..} = (\imageSearchResponseItemName -> ImageSearchResponseItem { imageSearchResponseItemName, ..} ) <$> f imageSearchResponseItemName +{-# INLINE imageSearchResponseItemNameL #-} + +-- | 'imageSearchResponseItemStarCount' Lens +imageSearchResponseItemStarCountL :: Lens_' ImageSearchResponseItem (Maybe Int) +imageSearchResponseItemStarCountL f ImageSearchResponseItem{..} = (\imageSearchResponseItemStarCount -> ImageSearchResponseItem { imageSearchResponseItemStarCount, ..} ) <$> f imageSearchResponseItemStarCount +{-# INLINE imageSearchResponseItemStarCountL #-} + + + +-- * ImageSummary + +-- | 'imageSummaryId' Lens +imageSummaryIdL :: Lens_' ImageSummary (Text) +imageSummaryIdL f ImageSummary{..} = (\imageSummaryId -> ImageSummary { imageSummaryId, ..} ) <$> f imageSummaryId +{-# INLINE imageSummaryIdL #-} + +-- | 'imageSummaryParentId' Lens +imageSummaryParentIdL :: Lens_' ImageSummary (Text) +imageSummaryParentIdL f ImageSummary{..} = (\imageSummaryParentId -> ImageSummary { imageSummaryParentId, ..} ) <$> f imageSummaryParentId +{-# INLINE imageSummaryParentIdL #-} + +-- | 'imageSummaryRepoTags' Lens +imageSummaryRepoTagsL :: Lens_' ImageSummary ([Text]) +imageSummaryRepoTagsL f ImageSummary{..} = (\imageSummaryRepoTags -> ImageSummary { imageSummaryRepoTags, ..} ) <$> f imageSummaryRepoTags +{-# INLINE imageSummaryRepoTagsL #-} + +-- | 'imageSummaryRepoDigests' Lens +imageSummaryRepoDigestsL :: Lens_' ImageSummary ([Text]) +imageSummaryRepoDigestsL f ImageSummary{..} = (\imageSummaryRepoDigests -> ImageSummary { imageSummaryRepoDigests, ..} ) <$> f imageSummaryRepoDigests +{-# INLINE imageSummaryRepoDigestsL #-} + +-- | 'imageSummaryCreated' Lens +imageSummaryCreatedL :: Lens_' ImageSummary (Int) +imageSummaryCreatedL f ImageSummary{..} = (\imageSummaryCreated -> ImageSummary { imageSummaryCreated, ..} ) <$> f imageSummaryCreated +{-# INLINE imageSummaryCreatedL #-} + +-- | 'imageSummarySize' Lens +imageSummarySizeL :: Lens_' ImageSummary (Integer) +imageSummarySizeL f ImageSummary{..} = (\imageSummarySize -> ImageSummary { imageSummarySize, ..} ) <$> f imageSummarySize +{-# INLINE imageSummarySizeL #-} + +-- | 'imageSummarySharedSize' Lens +imageSummarySharedSizeL :: Lens_' ImageSummary (Integer) +imageSummarySharedSizeL f ImageSummary{..} = (\imageSummarySharedSize -> ImageSummary { imageSummarySharedSize, ..} ) <$> f imageSummarySharedSize +{-# INLINE imageSummarySharedSizeL #-} + +-- | 'imageSummaryVirtualSize' Lens +imageSummaryVirtualSizeL :: Lens_' ImageSummary (Maybe Integer) +imageSummaryVirtualSizeL f ImageSummary{..} = (\imageSummaryVirtualSize -> ImageSummary { imageSummaryVirtualSize, ..} ) <$> f imageSummaryVirtualSize +{-# INLINE imageSummaryVirtualSizeL #-} + +-- | 'imageSummaryLabels' Lens +imageSummaryLabelsL :: Lens_' ImageSummary ((Map.Map String Text)) +imageSummaryLabelsL f ImageSummary{..} = (\imageSummaryLabels -> ImageSummary { imageSummaryLabels, ..} ) <$> f imageSummaryLabels +{-# INLINE imageSummaryLabelsL #-} + +-- | 'imageSummaryContainers' Lens +imageSummaryContainersL :: Lens_' ImageSummary (Int) +imageSummaryContainersL f ImageSummary{..} = (\imageSummaryContainers -> ImageSummary { imageSummaryContainers, ..} ) <$> f imageSummaryContainers +{-# INLINE imageSummaryContainersL #-} + + + +-- * IndexInfo + +-- | 'indexInfoName' Lens +indexInfoNameL :: Lens_' IndexInfo (Maybe Text) +indexInfoNameL f IndexInfo{..} = (\indexInfoName -> IndexInfo { indexInfoName, ..} ) <$> f indexInfoName +{-# INLINE indexInfoNameL #-} + +-- | 'indexInfoMirrors' Lens +indexInfoMirrorsL :: Lens_' IndexInfo (Maybe [Text]) +indexInfoMirrorsL f IndexInfo{..} = (\indexInfoMirrors -> IndexInfo { indexInfoMirrors, ..} ) <$> f indexInfoMirrors +{-# INLINE indexInfoMirrorsL #-} + +-- | 'indexInfoSecure' Lens +indexInfoSecureL :: Lens_' IndexInfo (Maybe Bool) +indexInfoSecureL f IndexInfo{..} = (\indexInfoSecure -> IndexInfo { indexInfoSecure, ..} ) <$> f indexInfoSecure +{-# INLINE indexInfoSecureL #-} + +-- | 'indexInfoOfficial' Lens +indexInfoOfficialL :: Lens_' IndexInfo (Maybe Bool) +indexInfoOfficialL f IndexInfo{..} = (\indexInfoOfficial -> IndexInfo { indexInfoOfficial, ..} ) <$> f indexInfoOfficial +{-# INLINE indexInfoOfficialL #-} + + + +-- * JoinTokens + +-- | 'joinTokensWorker' Lens +joinTokensWorkerL :: Lens_' JoinTokens (Maybe Text) +joinTokensWorkerL f JoinTokens{..} = (\joinTokensWorker -> JoinTokens { joinTokensWorker, ..} ) <$> f joinTokensWorker +{-# INLINE joinTokensWorkerL #-} + +-- | 'joinTokensManager' Lens +joinTokensManagerL :: Lens_' JoinTokens (Maybe Text) +joinTokensManagerL f JoinTokens{..} = (\joinTokensManager -> JoinTokens { joinTokensManager, ..} ) <$> f joinTokensManager +{-# INLINE joinTokensManagerL #-} + + + +-- * Limit + +-- | 'limitNanoCpus' Lens +limitNanoCpusL :: Lens_' Limit (Maybe Integer) +limitNanoCpusL f Limit{..} = (\limitNanoCpus -> Limit { limitNanoCpus, ..} ) <$> f limitNanoCpus +{-# INLINE limitNanoCpusL #-} + +-- | 'limitMemoryBytes' Lens +limitMemoryBytesL :: Lens_' Limit (Maybe Integer) +limitMemoryBytesL f Limit{..} = (\limitMemoryBytes -> Limit { limitMemoryBytes, ..} ) <$> f limitMemoryBytes +{-# INLINE limitMemoryBytesL #-} + +-- | 'limitPids' Lens +limitPidsL :: Lens_' Limit (Maybe Integer) +limitPidsL f Limit{..} = (\limitPids -> Limit { limitPids, ..} ) <$> f limitPids +{-# INLINE limitPidsL #-} + + + +-- * LocalNodeState + + + +-- * ManagerStatus + +-- | 'managerStatusLeader' Lens +managerStatusLeaderL :: Lens_' ManagerStatus (Maybe Bool) +managerStatusLeaderL f ManagerStatus{..} = (\managerStatusLeader -> ManagerStatus { managerStatusLeader, ..} ) <$> f managerStatusLeader +{-# INLINE managerStatusLeaderL #-} + +-- | 'managerStatusReachability' Lens +managerStatusReachabilityL :: Lens_' ManagerStatus (Maybe Reachability) +managerStatusReachabilityL f ManagerStatus{..} = (\managerStatusReachability -> ManagerStatus { managerStatusReachability, ..} ) <$> f managerStatusReachability +{-# INLINE managerStatusReachabilityL #-} + +-- | 'managerStatusAddr' Lens +managerStatusAddrL :: Lens_' ManagerStatus (Maybe Text) +managerStatusAddrL f ManagerStatus{..} = (\managerStatusAddr -> ManagerStatus { managerStatusAddr, ..} ) <$> f managerStatusAddr +{-# INLINE managerStatusAddrL #-} + + + +-- * Mount + +-- | 'mountTarget' Lens +mountTargetL :: Lens_' Mount (Maybe Text) +mountTargetL f Mount{..} = (\mountTarget -> Mount { mountTarget, ..} ) <$> f mountTarget +{-# INLINE mountTargetL #-} + +-- | 'mountSource' Lens +mountSourceL :: Lens_' Mount (Maybe Text) +mountSourceL f Mount{..} = (\mountSource -> Mount { mountSource, ..} ) <$> f mountSource +{-# INLINE mountSourceL #-} + +-- | 'mountType' Lens +mountTypeL :: Lens_' Mount (Maybe E'Type2) +mountTypeL f Mount{..} = (\mountType -> Mount { mountType, ..} ) <$> f mountType +{-# INLINE mountTypeL #-} + +-- | 'mountReadOnly' Lens +mountReadOnlyL :: Lens_' Mount (Maybe Bool) +mountReadOnlyL f Mount{..} = (\mountReadOnly -> Mount { mountReadOnly, ..} ) <$> f mountReadOnly +{-# INLINE mountReadOnlyL #-} + +-- | 'mountConsistency' Lens +mountConsistencyL :: Lens_' Mount (Maybe Text) +mountConsistencyL f Mount{..} = (\mountConsistency -> Mount { mountConsistency, ..} ) <$> f mountConsistency +{-# INLINE mountConsistencyL #-} + +-- | 'mountBindOptions' Lens +mountBindOptionsL :: Lens_' Mount (Maybe MountBindOptions) +mountBindOptionsL f Mount{..} = (\mountBindOptions -> Mount { mountBindOptions, ..} ) <$> f mountBindOptions +{-# INLINE mountBindOptionsL #-} + +-- | 'mountVolumeOptions' Lens +mountVolumeOptionsL :: Lens_' Mount (Maybe MountVolumeOptions) +mountVolumeOptionsL f Mount{..} = (\mountVolumeOptions -> Mount { mountVolumeOptions, ..} ) <$> f mountVolumeOptions +{-# INLINE mountVolumeOptionsL #-} + +-- | 'mountTmpfsOptions' Lens +mountTmpfsOptionsL :: Lens_' Mount (Maybe MountTmpfsOptions) +mountTmpfsOptionsL f Mount{..} = (\mountTmpfsOptions -> Mount { mountTmpfsOptions, ..} ) <$> f mountTmpfsOptions +{-# INLINE mountTmpfsOptionsL #-} + + + +-- * MountBindOptions + +-- | 'mountBindOptionsPropagation' Lens +mountBindOptionsPropagationL :: Lens_' MountBindOptions (Maybe E'Propagation) +mountBindOptionsPropagationL f MountBindOptions{..} = (\mountBindOptionsPropagation -> MountBindOptions { mountBindOptionsPropagation, ..} ) <$> f mountBindOptionsPropagation +{-# INLINE mountBindOptionsPropagationL #-} + +-- | 'mountBindOptionsNonRecursive' Lens +mountBindOptionsNonRecursiveL :: Lens_' MountBindOptions (Maybe Bool) +mountBindOptionsNonRecursiveL f MountBindOptions{..} = (\mountBindOptionsNonRecursive -> MountBindOptions { mountBindOptionsNonRecursive, ..} ) <$> f mountBindOptionsNonRecursive +{-# INLINE mountBindOptionsNonRecursiveL #-} + +-- | 'mountBindOptionsCreateMountpoint' Lens +mountBindOptionsCreateMountpointL :: Lens_' MountBindOptions (Maybe Bool) +mountBindOptionsCreateMountpointL f MountBindOptions{..} = (\mountBindOptionsCreateMountpoint -> MountBindOptions { mountBindOptionsCreateMountpoint, ..} ) <$> f mountBindOptionsCreateMountpoint +{-# INLINE mountBindOptionsCreateMountpointL #-} + +-- | 'mountBindOptionsReadOnlyNonRecursive' Lens +mountBindOptionsReadOnlyNonRecursiveL :: Lens_' MountBindOptions (Maybe Bool) +mountBindOptionsReadOnlyNonRecursiveL f MountBindOptions{..} = (\mountBindOptionsReadOnlyNonRecursive -> MountBindOptions { mountBindOptionsReadOnlyNonRecursive, ..} ) <$> f mountBindOptionsReadOnlyNonRecursive +{-# INLINE mountBindOptionsReadOnlyNonRecursiveL #-} + +-- | 'mountBindOptionsReadOnlyForceRecursive' Lens +mountBindOptionsReadOnlyForceRecursiveL :: Lens_' MountBindOptions (Maybe Bool) +mountBindOptionsReadOnlyForceRecursiveL f MountBindOptions{..} = (\mountBindOptionsReadOnlyForceRecursive -> MountBindOptions { mountBindOptionsReadOnlyForceRecursive, ..} ) <$> f mountBindOptionsReadOnlyForceRecursive +{-# INLINE mountBindOptionsReadOnlyForceRecursiveL #-} + + + +-- * MountPoint + +-- | 'mountPointType' Lens +mountPointTypeL :: Lens_' MountPoint (Maybe E'Type2) +mountPointTypeL f MountPoint{..} = (\mountPointType -> MountPoint { mountPointType, ..} ) <$> f mountPointType +{-# INLINE mountPointTypeL #-} + +-- | 'mountPointName' Lens +mountPointNameL :: Lens_' MountPoint (Maybe Text) +mountPointNameL f MountPoint{..} = (\mountPointName -> MountPoint { mountPointName, ..} ) <$> f mountPointName +{-# INLINE mountPointNameL #-} + +-- | 'mountPointSource' Lens +mountPointSourceL :: Lens_' MountPoint (Maybe Text) +mountPointSourceL f MountPoint{..} = (\mountPointSource -> MountPoint { mountPointSource, ..} ) <$> f mountPointSource +{-# INLINE mountPointSourceL #-} + +-- | 'mountPointDestination' Lens +mountPointDestinationL :: Lens_' MountPoint (Maybe Text) +mountPointDestinationL f MountPoint{..} = (\mountPointDestination -> MountPoint { mountPointDestination, ..} ) <$> f mountPointDestination +{-# INLINE mountPointDestinationL #-} + +-- | 'mountPointDriver' Lens +mountPointDriverL :: Lens_' MountPoint (Maybe Text) +mountPointDriverL f MountPoint{..} = (\mountPointDriver -> MountPoint { mountPointDriver, ..} ) <$> f mountPointDriver +{-# INLINE mountPointDriverL #-} + +-- | 'mountPointMode' Lens +mountPointModeL :: Lens_' MountPoint (Maybe Text) +mountPointModeL f MountPoint{..} = (\mountPointMode -> MountPoint { mountPointMode, ..} ) <$> f mountPointMode +{-# INLINE mountPointModeL #-} + +-- | 'mountPointRw' Lens +mountPointRwL :: Lens_' MountPoint (Maybe Bool) +mountPointRwL f MountPoint{..} = (\mountPointRw -> MountPoint { mountPointRw, ..} ) <$> f mountPointRw +{-# INLINE mountPointRwL #-} + +-- | 'mountPointPropagation' Lens +mountPointPropagationL :: Lens_' MountPoint (Maybe Text) +mountPointPropagationL f MountPoint{..} = (\mountPointPropagation -> MountPoint { mountPointPropagation, ..} ) <$> f mountPointPropagation +{-# INLINE mountPointPropagationL #-} + + + +-- * MountTmpfsOptions + +-- | 'mountTmpfsOptionsSizeBytes' Lens +mountTmpfsOptionsSizeBytesL :: Lens_' MountTmpfsOptions (Maybe Integer) +mountTmpfsOptionsSizeBytesL f MountTmpfsOptions{..} = (\mountTmpfsOptionsSizeBytes -> MountTmpfsOptions { mountTmpfsOptionsSizeBytes, ..} ) <$> f mountTmpfsOptionsSizeBytes +{-# INLINE mountTmpfsOptionsSizeBytesL #-} + +-- | 'mountTmpfsOptionsMode' Lens +mountTmpfsOptionsModeL :: Lens_' MountTmpfsOptions (Maybe Int) +mountTmpfsOptionsModeL f MountTmpfsOptions{..} = (\mountTmpfsOptionsMode -> MountTmpfsOptions { mountTmpfsOptionsMode, ..} ) <$> f mountTmpfsOptionsMode +{-# INLINE mountTmpfsOptionsModeL #-} + + + +-- * MountVolumeOptions + +-- | 'mountVolumeOptionsNoCopy' Lens +mountVolumeOptionsNoCopyL :: Lens_' MountVolumeOptions (Maybe Bool) +mountVolumeOptionsNoCopyL f MountVolumeOptions{..} = (\mountVolumeOptionsNoCopy -> MountVolumeOptions { mountVolumeOptionsNoCopy, ..} ) <$> f mountVolumeOptionsNoCopy +{-# INLINE mountVolumeOptionsNoCopyL #-} + +-- | 'mountVolumeOptionsLabels' Lens +mountVolumeOptionsLabelsL :: Lens_' MountVolumeOptions (Maybe (Map.Map String Text)) +mountVolumeOptionsLabelsL f MountVolumeOptions{..} = (\mountVolumeOptionsLabels -> MountVolumeOptions { mountVolumeOptionsLabels, ..} ) <$> f mountVolumeOptionsLabels +{-# INLINE mountVolumeOptionsLabelsL #-} + +-- | 'mountVolumeOptionsDriverConfig' Lens +mountVolumeOptionsDriverConfigL :: Lens_' MountVolumeOptions (Maybe MountVolumeOptionsDriverConfig) +mountVolumeOptionsDriverConfigL f MountVolumeOptions{..} = (\mountVolumeOptionsDriverConfig -> MountVolumeOptions { mountVolumeOptionsDriverConfig, ..} ) <$> f mountVolumeOptionsDriverConfig +{-# INLINE mountVolumeOptionsDriverConfigL #-} + +-- | 'mountVolumeOptionsSubpath' Lens +mountVolumeOptionsSubpathL :: Lens_' MountVolumeOptions (Maybe Text) +mountVolumeOptionsSubpathL f MountVolumeOptions{..} = (\mountVolumeOptionsSubpath -> MountVolumeOptions { mountVolumeOptionsSubpath, ..} ) <$> f mountVolumeOptionsSubpath +{-# INLINE mountVolumeOptionsSubpathL #-} + + + +-- * MountVolumeOptionsDriverConfig + +-- | 'mountVolumeOptionsDriverConfigName' Lens +mountVolumeOptionsDriverConfigNameL :: Lens_' MountVolumeOptionsDriverConfig (Maybe Text) +mountVolumeOptionsDriverConfigNameL f MountVolumeOptionsDriverConfig{..} = (\mountVolumeOptionsDriverConfigName -> MountVolumeOptionsDriverConfig { mountVolumeOptionsDriverConfigName, ..} ) <$> f mountVolumeOptionsDriverConfigName +{-# INLINE mountVolumeOptionsDriverConfigNameL #-} + +-- | 'mountVolumeOptionsDriverConfigOptions' Lens +mountVolumeOptionsDriverConfigOptionsL :: Lens_' MountVolumeOptionsDriverConfig (Maybe (Map.Map String Text)) +mountVolumeOptionsDriverConfigOptionsL f MountVolumeOptionsDriverConfig{..} = (\mountVolumeOptionsDriverConfigOptions -> MountVolumeOptionsDriverConfig { mountVolumeOptionsDriverConfigOptions, ..} ) <$> f mountVolumeOptionsDriverConfigOptions +{-# INLINE mountVolumeOptionsDriverConfigOptionsL #-} + + + +-- * Network + +-- | 'networkName' Lens +networkNameL :: Lens_' Network (Maybe Text) +networkNameL f Network{..} = (\networkName -> Network { networkName, ..} ) <$> f networkName +{-# INLINE networkNameL #-} + +-- | 'networkId' Lens +networkIdL :: Lens_' Network (Maybe Text) +networkIdL f Network{..} = (\networkId -> Network { networkId, ..} ) <$> f networkId +{-# INLINE networkIdL #-} + +-- | 'networkCreated' Lens +networkCreatedL :: Lens_' Network (Maybe Text) +networkCreatedL f Network{..} = (\networkCreated -> Network { networkCreated, ..} ) <$> f networkCreated +{-# INLINE networkCreatedL #-} + +-- | 'networkScope' Lens +networkScopeL :: Lens_' Network (Maybe Text) +networkScopeL f Network{..} = (\networkScope -> Network { networkScope, ..} ) <$> f networkScope +{-# INLINE networkScopeL #-} + +-- | 'networkDriver' Lens +networkDriverL :: Lens_' Network (Maybe Text) +networkDriverL f Network{..} = (\networkDriver -> Network { networkDriver, ..} ) <$> f networkDriver +{-# INLINE networkDriverL #-} + +-- | 'networkEnableIpv6' Lens +networkEnableIpv6L :: Lens_' Network (Maybe Bool) +networkEnableIpv6L f Network{..} = (\networkEnableIpv6 -> Network { networkEnableIpv6, ..} ) <$> f networkEnableIpv6 +{-# INLINE networkEnableIpv6L #-} + +-- | 'networkIpam' Lens +networkIpamL :: Lens_' Network (Maybe IPAM) +networkIpamL f Network{..} = (\networkIpam -> Network { networkIpam, ..} ) <$> f networkIpam +{-# INLINE networkIpamL #-} + +-- | 'networkInternal' Lens +networkInternalL :: Lens_' Network (Maybe Bool) +networkInternalL f Network{..} = (\networkInternal -> Network { networkInternal, ..} ) <$> f networkInternal +{-# INLINE networkInternalL #-} + +-- | 'networkAttachable' Lens +networkAttachableL :: Lens_' Network (Maybe Bool) +networkAttachableL f Network{..} = (\networkAttachable -> Network { networkAttachable, ..} ) <$> f networkAttachable +{-# INLINE networkAttachableL #-} + +-- | 'networkIngress' Lens +networkIngressL :: Lens_' Network (Maybe Bool) +networkIngressL f Network{..} = (\networkIngress -> Network { networkIngress, ..} ) <$> f networkIngress +{-# INLINE networkIngressL #-} + +-- | 'networkConfigFrom' Lens +networkConfigFromL :: Lens_' Network (Maybe ConfigReference) +networkConfigFromL f Network{..} = (\networkConfigFrom -> Network { networkConfigFrom, ..} ) <$> f networkConfigFrom +{-# INLINE networkConfigFromL #-} + +-- | 'networkConfigOnly' Lens +networkConfigOnlyL :: Lens_' Network (Maybe Bool) +networkConfigOnlyL f Network{..} = (\networkConfigOnly -> Network { networkConfigOnly, ..} ) <$> f networkConfigOnly +{-# INLINE networkConfigOnlyL #-} + +-- | 'networkContainers' Lens +networkContainersL :: Lens_' Network (Maybe (Map.Map String NetworkContainer)) +networkContainersL f Network{..} = (\networkContainers -> Network { networkContainers, ..} ) <$> f networkContainers +{-# INLINE networkContainersL #-} + +-- | 'networkOptions' Lens +networkOptionsL :: Lens_' Network (Maybe (Map.Map String Text)) +networkOptionsL f Network{..} = (\networkOptions -> Network { networkOptions, ..} ) <$> f networkOptions +{-# INLINE networkOptionsL #-} + +-- | 'networkLabels' Lens +networkLabelsL :: Lens_' Network (Maybe (Map.Map String Text)) +networkLabelsL f Network{..} = (\networkLabels -> Network { networkLabels, ..} ) <$> f networkLabels +{-# INLINE networkLabelsL #-} + +-- | 'networkPeers' Lens +networkPeersL :: Lens_' Network (Maybe [PeerInfo]) +networkPeersL f Network{..} = (\networkPeers -> Network { networkPeers, ..} ) <$> f networkPeers +{-# INLINE networkPeersL #-} + + + +-- * NetworkAttachmentConfig + +-- | 'networkAttachmentConfigTarget' Lens +networkAttachmentConfigTargetL :: Lens_' NetworkAttachmentConfig (Maybe Text) +networkAttachmentConfigTargetL f NetworkAttachmentConfig{..} = (\networkAttachmentConfigTarget -> NetworkAttachmentConfig { networkAttachmentConfigTarget, ..} ) <$> f networkAttachmentConfigTarget +{-# INLINE networkAttachmentConfigTargetL #-} + +-- | 'networkAttachmentConfigAliases' Lens +networkAttachmentConfigAliasesL :: Lens_' NetworkAttachmentConfig (Maybe [Text]) +networkAttachmentConfigAliasesL f NetworkAttachmentConfig{..} = (\networkAttachmentConfigAliases -> NetworkAttachmentConfig { networkAttachmentConfigAliases, ..} ) <$> f networkAttachmentConfigAliases +{-# INLINE networkAttachmentConfigAliasesL #-} + +-- | 'networkAttachmentConfigDriverOpts' Lens +networkAttachmentConfigDriverOptsL :: Lens_' NetworkAttachmentConfig (Maybe (Map.Map String Text)) +networkAttachmentConfigDriverOptsL f NetworkAttachmentConfig{..} = (\networkAttachmentConfigDriverOpts -> NetworkAttachmentConfig { networkAttachmentConfigDriverOpts, ..} ) <$> f networkAttachmentConfigDriverOpts +{-# INLINE networkAttachmentConfigDriverOptsL #-} + + + +-- * NetworkConnectRequest + +-- | 'networkConnectRequestContainer' Lens +networkConnectRequestContainerL :: Lens_' NetworkConnectRequest (Maybe Text) +networkConnectRequestContainerL f NetworkConnectRequest{..} = (\networkConnectRequestContainer -> NetworkConnectRequest { networkConnectRequestContainer, ..} ) <$> f networkConnectRequestContainer +{-# INLINE networkConnectRequestContainerL #-} + +-- | 'networkConnectRequestEndpointConfig' Lens +networkConnectRequestEndpointConfigL :: Lens_' NetworkConnectRequest (Maybe EndpointSettings) +networkConnectRequestEndpointConfigL f NetworkConnectRequest{..} = (\networkConnectRequestEndpointConfig -> NetworkConnectRequest { networkConnectRequestEndpointConfig, ..} ) <$> f networkConnectRequestEndpointConfig +{-# INLINE networkConnectRequestEndpointConfigL #-} + + + +-- * NetworkContainer + +-- | 'networkContainerName' Lens +networkContainerNameL :: Lens_' NetworkContainer (Maybe Text) +networkContainerNameL f NetworkContainer{..} = (\networkContainerName -> NetworkContainer { networkContainerName, ..} ) <$> f networkContainerName +{-# INLINE networkContainerNameL #-} + +-- | 'networkContainerEndpointId' Lens +networkContainerEndpointIdL :: Lens_' NetworkContainer (Maybe Text) +networkContainerEndpointIdL f NetworkContainer{..} = (\networkContainerEndpointId -> NetworkContainer { networkContainerEndpointId, ..} ) <$> f networkContainerEndpointId +{-# INLINE networkContainerEndpointIdL #-} + +-- | 'networkContainerMacAddress' Lens +networkContainerMacAddressL :: Lens_' NetworkContainer (Maybe Text) +networkContainerMacAddressL f NetworkContainer{..} = (\networkContainerMacAddress -> NetworkContainer { networkContainerMacAddress, ..} ) <$> f networkContainerMacAddress +{-# INLINE networkContainerMacAddressL #-} + +-- | 'networkContainerIpv4Address' Lens +networkContainerIpv4AddressL :: Lens_' NetworkContainer (Maybe Text) +networkContainerIpv4AddressL f NetworkContainer{..} = (\networkContainerIpv4Address -> NetworkContainer { networkContainerIpv4Address, ..} ) <$> f networkContainerIpv4Address +{-# INLINE networkContainerIpv4AddressL #-} + +-- | 'networkContainerIpv6Address' Lens +networkContainerIpv6AddressL :: Lens_' NetworkContainer (Maybe Text) +networkContainerIpv6AddressL f NetworkContainer{..} = (\networkContainerIpv6Address -> NetworkContainer { networkContainerIpv6Address, ..} ) <$> f networkContainerIpv6Address +{-# INLINE networkContainerIpv6AddressL #-} + + + +-- * NetworkCreateRequest + +-- | 'networkCreateRequestName' Lens +networkCreateRequestNameL :: Lens_' NetworkCreateRequest (Text) +networkCreateRequestNameL f NetworkCreateRequest{..} = (\networkCreateRequestName -> NetworkCreateRequest { networkCreateRequestName, ..} ) <$> f networkCreateRequestName +{-# INLINE networkCreateRequestNameL #-} + +-- | 'networkCreateRequestCheckDuplicate' Lens +networkCreateRequestCheckDuplicateL :: Lens_' NetworkCreateRequest (Maybe Bool) +networkCreateRequestCheckDuplicateL f NetworkCreateRequest{..} = (\networkCreateRequestCheckDuplicate -> NetworkCreateRequest { networkCreateRequestCheckDuplicate, ..} ) <$> f networkCreateRequestCheckDuplicate +{-# INLINE networkCreateRequestCheckDuplicateL #-} + +-- | 'networkCreateRequestDriver' Lens +networkCreateRequestDriverL :: Lens_' NetworkCreateRequest (Maybe Text) +networkCreateRequestDriverL f NetworkCreateRequest{..} = (\networkCreateRequestDriver -> NetworkCreateRequest { networkCreateRequestDriver, ..} ) <$> f networkCreateRequestDriver +{-# INLINE networkCreateRequestDriverL #-} + +-- | 'networkCreateRequestScope' Lens +networkCreateRequestScopeL :: Lens_' NetworkCreateRequest (Maybe Text) +networkCreateRequestScopeL f NetworkCreateRequest{..} = (\networkCreateRequestScope -> NetworkCreateRequest { networkCreateRequestScope, ..} ) <$> f networkCreateRequestScope +{-# INLINE networkCreateRequestScopeL #-} + +-- | 'networkCreateRequestInternal' Lens +networkCreateRequestInternalL :: Lens_' NetworkCreateRequest (Maybe Bool) +networkCreateRequestInternalL f NetworkCreateRequest{..} = (\networkCreateRequestInternal -> NetworkCreateRequest { networkCreateRequestInternal, ..} ) <$> f networkCreateRequestInternal +{-# INLINE networkCreateRequestInternalL #-} + +-- | 'networkCreateRequestAttachable' Lens +networkCreateRequestAttachableL :: Lens_' NetworkCreateRequest (Maybe Bool) +networkCreateRequestAttachableL f NetworkCreateRequest{..} = (\networkCreateRequestAttachable -> NetworkCreateRequest { networkCreateRequestAttachable, ..} ) <$> f networkCreateRequestAttachable +{-# INLINE networkCreateRequestAttachableL #-} + +-- | 'networkCreateRequestIngress' Lens +networkCreateRequestIngressL :: Lens_' NetworkCreateRequest (Maybe Bool) +networkCreateRequestIngressL f NetworkCreateRequest{..} = (\networkCreateRequestIngress -> NetworkCreateRequest { networkCreateRequestIngress, ..} ) <$> f networkCreateRequestIngress +{-# INLINE networkCreateRequestIngressL #-} + +-- | 'networkCreateRequestConfigOnly' Lens +networkCreateRequestConfigOnlyL :: Lens_' NetworkCreateRequest (Maybe Bool) +networkCreateRequestConfigOnlyL f NetworkCreateRequest{..} = (\networkCreateRequestConfigOnly -> NetworkCreateRequest { networkCreateRequestConfigOnly, ..} ) <$> f networkCreateRequestConfigOnly +{-# INLINE networkCreateRequestConfigOnlyL #-} + +-- | 'networkCreateRequestConfigFrom' Lens +networkCreateRequestConfigFromL :: Lens_' NetworkCreateRequest (Maybe ConfigReference) +networkCreateRequestConfigFromL f NetworkCreateRequest{..} = (\networkCreateRequestConfigFrom -> NetworkCreateRequest { networkCreateRequestConfigFrom, ..} ) <$> f networkCreateRequestConfigFrom +{-# INLINE networkCreateRequestConfigFromL #-} + +-- | 'networkCreateRequestIpam' Lens +networkCreateRequestIpamL :: Lens_' NetworkCreateRequest (Maybe IPAM) +networkCreateRequestIpamL f NetworkCreateRequest{..} = (\networkCreateRequestIpam -> NetworkCreateRequest { networkCreateRequestIpam, ..} ) <$> f networkCreateRequestIpam +{-# INLINE networkCreateRequestIpamL #-} + +-- | 'networkCreateRequestEnableIpv6' Lens +networkCreateRequestEnableIpv6L :: Lens_' NetworkCreateRequest (Maybe Bool) +networkCreateRequestEnableIpv6L f NetworkCreateRequest{..} = (\networkCreateRequestEnableIpv6 -> NetworkCreateRequest { networkCreateRequestEnableIpv6, ..} ) <$> f networkCreateRequestEnableIpv6 +{-# INLINE networkCreateRequestEnableIpv6L #-} + +-- | 'networkCreateRequestOptions' Lens +networkCreateRequestOptionsL :: Lens_' NetworkCreateRequest (Maybe (Map.Map String Text)) +networkCreateRequestOptionsL f NetworkCreateRequest{..} = (\networkCreateRequestOptions -> NetworkCreateRequest { networkCreateRequestOptions, ..} ) <$> f networkCreateRequestOptions +{-# INLINE networkCreateRequestOptionsL #-} + +-- | 'networkCreateRequestLabels' Lens +networkCreateRequestLabelsL :: Lens_' NetworkCreateRequest (Maybe (Map.Map String Text)) +networkCreateRequestLabelsL f NetworkCreateRequest{..} = (\networkCreateRequestLabels -> NetworkCreateRequest { networkCreateRequestLabels, ..} ) <$> f networkCreateRequestLabels +{-# INLINE networkCreateRequestLabelsL #-} + + + +-- * NetworkCreateResponse + +-- | 'networkCreateResponseId' Lens +networkCreateResponseIdL :: Lens_' NetworkCreateResponse (Maybe Text) +networkCreateResponseIdL f NetworkCreateResponse{..} = (\networkCreateResponseId -> NetworkCreateResponse { networkCreateResponseId, ..} ) <$> f networkCreateResponseId +{-# INLINE networkCreateResponseIdL #-} + +-- | 'networkCreateResponseWarning' Lens +networkCreateResponseWarningL :: Lens_' NetworkCreateResponse (Maybe Text) +networkCreateResponseWarningL f NetworkCreateResponse{..} = (\networkCreateResponseWarning -> NetworkCreateResponse { networkCreateResponseWarning, ..} ) <$> f networkCreateResponseWarning +{-# INLINE networkCreateResponseWarningL #-} + + + +-- * NetworkDisconnectRequest + +-- | 'networkDisconnectRequestContainer' Lens +networkDisconnectRequestContainerL :: Lens_' NetworkDisconnectRequest (Maybe Text) +networkDisconnectRequestContainerL f NetworkDisconnectRequest{..} = (\networkDisconnectRequestContainer -> NetworkDisconnectRequest { networkDisconnectRequestContainer, ..} ) <$> f networkDisconnectRequestContainer +{-# INLINE networkDisconnectRequestContainerL #-} + +-- | 'networkDisconnectRequestForce' Lens +networkDisconnectRequestForceL :: Lens_' NetworkDisconnectRequest (Maybe Bool) +networkDisconnectRequestForceL f NetworkDisconnectRequest{..} = (\networkDisconnectRequestForce -> NetworkDisconnectRequest { networkDisconnectRequestForce, ..} ) <$> f networkDisconnectRequestForce +{-# INLINE networkDisconnectRequestForceL #-} + + + +-- * NetworkPruneResponse + +-- | 'networkPruneResponseNetworksDeleted' Lens +networkPruneResponseNetworksDeletedL :: Lens_' NetworkPruneResponse (Maybe [Text]) +networkPruneResponseNetworksDeletedL f NetworkPruneResponse{..} = (\networkPruneResponseNetworksDeleted -> NetworkPruneResponse { networkPruneResponseNetworksDeleted, ..} ) <$> f networkPruneResponseNetworksDeleted +{-# INLINE networkPruneResponseNetworksDeletedL #-} + + + +-- * NetworkSettings + +-- | 'networkSettingsBridge' Lens +networkSettingsBridgeL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsBridgeL f NetworkSettings{..} = (\networkSettingsBridge -> NetworkSettings { networkSettingsBridge, ..} ) <$> f networkSettingsBridge +{-# INLINE networkSettingsBridgeL #-} + +-- | 'networkSettingsSandboxId' Lens +networkSettingsSandboxIdL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsSandboxIdL f NetworkSettings{..} = (\networkSettingsSandboxId -> NetworkSettings { networkSettingsSandboxId, ..} ) <$> f networkSettingsSandboxId +{-# INLINE networkSettingsSandboxIdL #-} + +-- | 'networkSettingsHairpinMode' Lens +networkSettingsHairpinModeL :: Lens_' NetworkSettings (Maybe Bool) +networkSettingsHairpinModeL f NetworkSettings{..} = (\networkSettingsHairpinMode -> NetworkSettings { networkSettingsHairpinMode, ..} ) <$> f networkSettingsHairpinMode +{-# INLINE networkSettingsHairpinModeL #-} + +-- | 'networkSettingsLinkLocalIpv6Address' Lens +networkSettingsLinkLocalIpv6AddressL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsLinkLocalIpv6AddressL f NetworkSettings{..} = (\networkSettingsLinkLocalIpv6Address -> NetworkSettings { networkSettingsLinkLocalIpv6Address, ..} ) <$> f networkSettingsLinkLocalIpv6Address +{-# INLINE networkSettingsLinkLocalIpv6AddressL #-} + +-- | 'networkSettingsLinkLocalIpv6PrefixLen' Lens +networkSettingsLinkLocalIpv6PrefixLenL :: Lens_' NetworkSettings (Maybe Int) +networkSettingsLinkLocalIpv6PrefixLenL f NetworkSettings{..} = (\networkSettingsLinkLocalIpv6PrefixLen -> NetworkSettings { networkSettingsLinkLocalIpv6PrefixLen, ..} ) <$> f networkSettingsLinkLocalIpv6PrefixLen +{-# INLINE networkSettingsLinkLocalIpv6PrefixLenL #-} + +-- | 'networkSettingsPorts' Lens +networkSettingsPortsL :: Lens_' NetworkSettings (Maybe (Map.Map String [PortBinding])) +networkSettingsPortsL f NetworkSettings{..} = (\networkSettingsPorts -> NetworkSettings { networkSettingsPorts, ..} ) <$> f networkSettingsPorts +{-# INLINE networkSettingsPortsL #-} + +-- | 'networkSettingsSandboxKey' Lens +networkSettingsSandboxKeyL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsSandboxKeyL f NetworkSettings{..} = (\networkSettingsSandboxKey -> NetworkSettings { networkSettingsSandboxKey, ..} ) <$> f networkSettingsSandboxKey +{-# INLINE networkSettingsSandboxKeyL #-} + +-- | 'networkSettingsSecondaryIpAddresses' Lens +networkSettingsSecondaryIpAddressesL :: Lens_' NetworkSettings (Maybe [Address]) +networkSettingsSecondaryIpAddressesL f NetworkSettings{..} = (\networkSettingsSecondaryIpAddresses -> NetworkSettings { networkSettingsSecondaryIpAddresses, ..} ) <$> f networkSettingsSecondaryIpAddresses +{-# INLINE networkSettingsSecondaryIpAddressesL #-} + +-- | 'networkSettingsSecondaryIpv6Addresses' Lens +networkSettingsSecondaryIpv6AddressesL :: Lens_' NetworkSettings (Maybe [Address]) +networkSettingsSecondaryIpv6AddressesL f NetworkSettings{..} = (\networkSettingsSecondaryIpv6Addresses -> NetworkSettings { networkSettingsSecondaryIpv6Addresses, ..} ) <$> f networkSettingsSecondaryIpv6Addresses +{-# INLINE networkSettingsSecondaryIpv6AddressesL #-} + +-- | 'networkSettingsEndpointId' Lens +networkSettingsEndpointIdL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsEndpointIdL f NetworkSettings{..} = (\networkSettingsEndpointId -> NetworkSettings { networkSettingsEndpointId, ..} ) <$> f networkSettingsEndpointId +{-# INLINE networkSettingsEndpointIdL #-} + +-- | 'networkSettingsGateway' Lens +networkSettingsGatewayL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsGatewayL f NetworkSettings{..} = (\networkSettingsGateway -> NetworkSettings { networkSettingsGateway, ..} ) <$> f networkSettingsGateway +{-# INLINE networkSettingsGatewayL #-} + +-- | 'networkSettingsGlobalIpv6Address' Lens +networkSettingsGlobalIpv6AddressL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsGlobalIpv6AddressL f NetworkSettings{..} = (\networkSettingsGlobalIpv6Address -> NetworkSettings { networkSettingsGlobalIpv6Address, ..} ) <$> f networkSettingsGlobalIpv6Address +{-# INLINE networkSettingsGlobalIpv6AddressL #-} + +-- | 'networkSettingsGlobalIpv6PrefixLen' Lens +networkSettingsGlobalIpv6PrefixLenL :: Lens_' NetworkSettings (Maybe Int) +networkSettingsGlobalIpv6PrefixLenL f NetworkSettings{..} = (\networkSettingsGlobalIpv6PrefixLen -> NetworkSettings { networkSettingsGlobalIpv6PrefixLen, ..} ) <$> f networkSettingsGlobalIpv6PrefixLen +{-# INLINE networkSettingsGlobalIpv6PrefixLenL #-} + +-- | 'networkSettingsIpAddress' Lens +networkSettingsIpAddressL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsIpAddressL f NetworkSettings{..} = (\networkSettingsIpAddress -> NetworkSettings { networkSettingsIpAddress, ..} ) <$> f networkSettingsIpAddress +{-# INLINE networkSettingsIpAddressL #-} + +-- | 'networkSettingsIpPrefixLen' Lens +networkSettingsIpPrefixLenL :: Lens_' NetworkSettings (Maybe Int) +networkSettingsIpPrefixLenL f NetworkSettings{..} = (\networkSettingsIpPrefixLen -> NetworkSettings { networkSettingsIpPrefixLen, ..} ) <$> f networkSettingsIpPrefixLen +{-# INLINE networkSettingsIpPrefixLenL #-} + +-- | 'networkSettingsIpv6Gateway' Lens +networkSettingsIpv6GatewayL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsIpv6GatewayL f NetworkSettings{..} = (\networkSettingsIpv6Gateway -> NetworkSettings { networkSettingsIpv6Gateway, ..} ) <$> f networkSettingsIpv6Gateway +{-# INLINE networkSettingsIpv6GatewayL #-} + +-- | 'networkSettingsMacAddress' Lens +networkSettingsMacAddressL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsMacAddressL f NetworkSettings{..} = (\networkSettingsMacAddress -> NetworkSettings { networkSettingsMacAddress, ..} ) <$> f networkSettingsMacAddress +{-# INLINE networkSettingsMacAddressL #-} + +-- | 'networkSettingsNetworks' Lens +networkSettingsNetworksL :: Lens_' NetworkSettings (Maybe (Map.Map String EndpointSettings)) +networkSettingsNetworksL f NetworkSettings{..} = (\networkSettingsNetworks -> NetworkSettings { networkSettingsNetworks, ..} ) <$> f networkSettingsNetworks +{-# INLINE networkSettingsNetworksL #-} + + + +-- * NetworkingConfig + +-- | 'networkingConfigEndpointsConfig' Lens +networkingConfigEndpointsConfigL :: Lens_' NetworkingConfig (Maybe (Map.Map String EndpointSettings)) +networkingConfigEndpointsConfigL f NetworkingConfig{..} = (\networkingConfigEndpointsConfig -> NetworkingConfig { networkingConfigEndpointsConfig, ..} ) <$> f networkingConfigEndpointsConfig +{-# INLINE networkingConfigEndpointsConfigL #-} + + + +-- * Node + +-- | 'nodeId' Lens +nodeIdL :: Lens_' Node (Maybe Text) +nodeIdL f Node{..} = (\nodeId -> Node { nodeId, ..} ) <$> f nodeId +{-# INLINE nodeIdL #-} + +-- | 'nodeVersion' Lens +nodeVersionL :: Lens_' Node (Maybe ObjectVersion) +nodeVersionL f Node{..} = (\nodeVersion -> Node { nodeVersion, ..} ) <$> f nodeVersion +{-# INLINE nodeVersionL #-} + +-- | 'nodeCreatedAt' Lens +nodeCreatedAtL :: Lens_' Node (Maybe Text) +nodeCreatedAtL f Node{..} = (\nodeCreatedAt -> Node { nodeCreatedAt, ..} ) <$> f nodeCreatedAt +{-# INLINE nodeCreatedAtL #-} + +-- | 'nodeUpdatedAt' Lens +nodeUpdatedAtL :: Lens_' Node (Maybe Text) +nodeUpdatedAtL f Node{..} = (\nodeUpdatedAt -> Node { nodeUpdatedAt, ..} ) <$> f nodeUpdatedAt +{-# INLINE nodeUpdatedAtL #-} + +-- | 'nodeSpec' Lens +nodeSpecL :: Lens_' Node (Maybe NodeSpec) +nodeSpecL f Node{..} = (\nodeSpec -> Node { nodeSpec, ..} ) <$> f nodeSpec +{-# INLINE nodeSpecL #-} + +-- | 'nodeDescription' Lens +nodeDescriptionL :: Lens_' Node (Maybe NodeDescription) +nodeDescriptionL f Node{..} = (\nodeDescription -> Node { nodeDescription, ..} ) <$> f nodeDescription +{-# INLINE nodeDescriptionL #-} + +-- | 'nodeStatus' Lens +nodeStatusL :: Lens_' Node (Maybe NodeStatus) +nodeStatusL f Node{..} = (\nodeStatus -> Node { nodeStatus, ..} ) <$> f nodeStatus +{-# INLINE nodeStatusL #-} + +-- | 'nodeManagerStatus' Lens +nodeManagerStatusL :: Lens_' Node (Maybe ManagerStatus) +nodeManagerStatusL f Node{..} = (\nodeManagerStatus -> Node { nodeManagerStatus, ..} ) <$> f nodeManagerStatus +{-# INLINE nodeManagerStatusL #-} + + + +-- * NodeDescription + +-- | 'nodeDescriptionHostname' Lens +nodeDescriptionHostnameL :: Lens_' NodeDescription (Maybe Text) +nodeDescriptionHostnameL f NodeDescription{..} = (\nodeDescriptionHostname -> NodeDescription { nodeDescriptionHostname, ..} ) <$> f nodeDescriptionHostname +{-# INLINE nodeDescriptionHostnameL #-} + +-- | 'nodeDescriptionPlatform' Lens +nodeDescriptionPlatformL :: Lens_' NodeDescription (Maybe Platform) +nodeDescriptionPlatformL f NodeDescription{..} = (\nodeDescriptionPlatform -> NodeDescription { nodeDescriptionPlatform, ..} ) <$> f nodeDescriptionPlatform +{-# INLINE nodeDescriptionPlatformL #-} + +-- | 'nodeDescriptionResources' Lens +nodeDescriptionResourcesL :: Lens_' NodeDescription (Maybe ResourceObject) +nodeDescriptionResourcesL f NodeDescription{..} = (\nodeDescriptionResources -> NodeDescription { nodeDescriptionResources, ..} ) <$> f nodeDescriptionResources +{-# INLINE nodeDescriptionResourcesL #-} + +-- | 'nodeDescriptionEngine' Lens +nodeDescriptionEngineL :: Lens_' NodeDescription (Maybe EngineDescription) +nodeDescriptionEngineL f NodeDescription{..} = (\nodeDescriptionEngine -> NodeDescription { nodeDescriptionEngine, ..} ) <$> f nodeDescriptionEngine +{-# INLINE nodeDescriptionEngineL #-} + +-- | 'nodeDescriptionTlsInfo' Lens +nodeDescriptionTlsInfoL :: Lens_' NodeDescription (Maybe TLSInfo) +nodeDescriptionTlsInfoL f NodeDescription{..} = (\nodeDescriptionTlsInfo -> NodeDescription { nodeDescriptionTlsInfo, ..} ) <$> f nodeDescriptionTlsInfo +{-# INLINE nodeDescriptionTlsInfoL #-} + + + +-- * NodeSpec + +-- | 'nodeSpecName' Lens +nodeSpecNameL :: Lens_' NodeSpec (Maybe Text) +nodeSpecNameL f NodeSpec{..} = (\nodeSpecName -> NodeSpec { nodeSpecName, ..} ) <$> f nodeSpecName +{-# INLINE nodeSpecNameL #-} + +-- | 'nodeSpecLabels' Lens +nodeSpecLabelsL :: Lens_' NodeSpec (Maybe (Map.Map String Text)) +nodeSpecLabelsL f NodeSpec{..} = (\nodeSpecLabels -> NodeSpec { nodeSpecLabels, ..} ) <$> f nodeSpecLabels +{-# INLINE nodeSpecLabelsL #-} + +-- | 'nodeSpecRole' Lens +nodeSpecRoleL :: Lens_' NodeSpec (Maybe E'Role) +nodeSpecRoleL f NodeSpec{..} = (\nodeSpecRole -> NodeSpec { nodeSpecRole, ..} ) <$> f nodeSpecRole +{-# INLINE nodeSpecRoleL #-} + +-- | 'nodeSpecAvailability' Lens +nodeSpecAvailabilityL :: Lens_' NodeSpec (Maybe E'Availability) +nodeSpecAvailabilityL f NodeSpec{..} = (\nodeSpecAvailability -> NodeSpec { nodeSpecAvailability, ..} ) <$> f nodeSpecAvailability +{-# INLINE nodeSpecAvailabilityL #-} + + + +-- * NodeState + + + +-- * NodeStatus + +-- | 'nodeStatusState' Lens +nodeStatusStateL :: Lens_' NodeStatus (Maybe NodeState) +nodeStatusStateL f NodeStatus{..} = (\nodeStatusState -> NodeStatus { nodeStatusState, ..} ) <$> f nodeStatusState +{-# INLINE nodeStatusStateL #-} + +-- | 'nodeStatusMessage' Lens +nodeStatusMessageL :: Lens_' NodeStatus (Maybe Text) +nodeStatusMessageL f NodeStatus{..} = (\nodeStatusMessage -> NodeStatus { nodeStatusMessage, ..} ) <$> f nodeStatusMessage +{-# INLINE nodeStatusMessageL #-} + +-- | 'nodeStatusAddr' Lens +nodeStatusAddrL :: Lens_' NodeStatus (Maybe Text) +nodeStatusAddrL f NodeStatus{..} = (\nodeStatusAddr -> NodeStatus { nodeStatusAddr, ..} ) <$> f nodeStatusAddr +{-# INLINE nodeStatusAddrL #-} + + + +-- * OCIDescriptor + +-- | 'oCIDescriptorMediaType' Lens +oCIDescriptorMediaTypeL :: Lens_' OCIDescriptor (Maybe Text) +oCIDescriptorMediaTypeL f OCIDescriptor{..} = (\oCIDescriptorMediaType -> OCIDescriptor { oCIDescriptorMediaType, ..} ) <$> f oCIDescriptorMediaType +{-# INLINE oCIDescriptorMediaTypeL #-} + +-- | 'oCIDescriptorDigest' Lens +oCIDescriptorDigestL :: Lens_' OCIDescriptor (Maybe Text) +oCIDescriptorDigestL f OCIDescriptor{..} = (\oCIDescriptorDigest -> OCIDescriptor { oCIDescriptorDigest, ..} ) <$> f oCIDescriptorDigest +{-# INLINE oCIDescriptorDigestL #-} + +-- | 'oCIDescriptorSize' Lens +oCIDescriptorSizeL :: Lens_' OCIDescriptor (Maybe Integer) +oCIDescriptorSizeL f OCIDescriptor{..} = (\oCIDescriptorSize -> OCIDescriptor { oCIDescriptorSize, ..} ) <$> f oCIDescriptorSize +{-# INLINE oCIDescriptorSizeL #-} + + + +-- * OCIPlatform + +-- | 'oCIPlatformArchitecture' Lens +oCIPlatformArchitectureL :: Lens_' OCIPlatform (Maybe Text) +oCIPlatformArchitectureL f OCIPlatform{..} = (\oCIPlatformArchitecture -> OCIPlatform { oCIPlatformArchitecture, ..} ) <$> f oCIPlatformArchitecture +{-# INLINE oCIPlatformArchitectureL #-} + +-- | 'oCIPlatformOs' Lens +oCIPlatformOsL :: Lens_' OCIPlatform (Maybe Text) +oCIPlatformOsL f OCIPlatform{..} = (\oCIPlatformOs -> OCIPlatform { oCIPlatformOs, ..} ) <$> f oCIPlatformOs +{-# INLINE oCIPlatformOsL #-} + +-- | 'oCIPlatformOsVersion' Lens +oCIPlatformOsVersionL :: Lens_' OCIPlatform (Maybe Text) +oCIPlatformOsVersionL f OCIPlatform{..} = (\oCIPlatformOsVersion -> OCIPlatform { oCIPlatformOsVersion, ..} ) <$> f oCIPlatformOsVersion +{-# INLINE oCIPlatformOsVersionL #-} + +-- | 'oCIPlatformOsFeatures' Lens +oCIPlatformOsFeaturesL :: Lens_' OCIPlatform (Maybe [Text]) +oCIPlatformOsFeaturesL f OCIPlatform{..} = (\oCIPlatformOsFeatures -> OCIPlatform { oCIPlatformOsFeatures, ..} ) <$> f oCIPlatformOsFeatures +{-# INLINE oCIPlatformOsFeaturesL #-} + +-- | 'oCIPlatformVariant' Lens +oCIPlatformVariantL :: Lens_' OCIPlatform (Maybe Text) +oCIPlatformVariantL f OCIPlatform{..} = (\oCIPlatformVariant -> OCIPlatform { oCIPlatformVariant, ..} ) <$> f oCIPlatformVariant +{-# INLINE oCIPlatformVariantL #-} + + + +-- * ObjectVersion + +-- | 'objectVersionIndex' Lens +objectVersionIndexL :: Lens_' ObjectVersion (Maybe Int) +objectVersionIndexL f ObjectVersion{..} = (\objectVersionIndex -> ObjectVersion { objectVersionIndex, ..} ) <$> f objectVersionIndex +{-# INLINE objectVersionIndexL #-} + + + +-- * PeerInfo + +-- | 'peerInfoName' Lens +peerInfoNameL :: Lens_' PeerInfo (Maybe Text) +peerInfoNameL f PeerInfo{..} = (\peerInfoName -> PeerInfo { peerInfoName, ..} ) <$> f peerInfoName +{-# INLINE peerInfoNameL #-} + +-- | 'peerInfoIp' Lens +peerInfoIpL :: Lens_' PeerInfo (Maybe Text) +peerInfoIpL f PeerInfo{..} = (\peerInfoIp -> PeerInfo { peerInfoIp, ..} ) <$> f peerInfoIp +{-# INLINE peerInfoIpL #-} + + + +-- * PeerNode + +-- | 'peerNodeNodeId' Lens +peerNodeNodeIdL :: Lens_' PeerNode (Maybe Text) +peerNodeNodeIdL f PeerNode{..} = (\peerNodeNodeId -> PeerNode { peerNodeNodeId, ..} ) <$> f peerNodeNodeId +{-# INLINE peerNodeNodeIdL #-} + +-- | 'peerNodeAddr' Lens +peerNodeAddrL :: Lens_' PeerNode (Maybe Text) +peerNodeAddrL f PeerNode{..} = (\peerNodeAddr -> PeerNode { peerNodeAddr, ..} ) <$> f peerNodeAddr +{-# INLINE peerNodeAddrL #-} + + + +-- * Platform + +-- | 'platformArchitecture' Lens +platformArchitectureL :: Lens_' Platform (Maybe Text) +platformArchitectureL f Platform{..} = (\platformArchitecture -> Platform { platformArchitecture, ..} ) <$> f platformArchitecture +{-# INLINE platformArchitectureL #-} + +-- | 'platformOs' Lens +platformOsL :: Lens_' Platform (Maybe Text) +platformOsL f Platform{..} = (\platformOs -> Platform { platformOs, ..} ) <$> f platformOs +{-# INLINE platformOsL #-} + + + +-- * Plugin + +-- | 'pluginId' Lens +pluginIdL :: Lens_' Plugin (Maybe Text) +pluginIdL f Plugin{..} = (\pluginId -> Plugin { pluginId, ..} ) <$> f pluginId +{-# INLINE pluginIdL #-} + +-- | 'pluginName' Lens +pluginNameL :: Lens_' Plugin (Text) +pluginNameL f Plugin{..} = (\pluginName -> Plugin { pluginName, ..} ) <$> f pluginName +{-# INLINE pluginNameL #-} + +-- | 'pluginEnabled' Lens +pluginEnabledL :: Lens_' Plugin (Bool) +pluginEnabledL f Plugin{..} = (\pluginEnabled -> Plugin { pluginEnabled, ..} ) <$> f pluginEnabled +{-# INLINE pluginEnabledL #-} + +-- | 'pluginSettings' Lens +pluginSettingsL :: Lens_' Plugin (PluginSettings) +pluginSettingsL f Plugin{..} = (\pluginSettings -> Plugin { pluginSettings, ..} ) <$> f pluginSettings +{-# INLINE pluginSettingsL #-} + +-- | 'pluginPluginReference' Lens +pluginPluginReferenceL :: Lens_' Plugin (Maybe Text) +pluginPluginReferenceL f Plugin{..} = (\pluginPluginReference -> Plugin { pluginPluginReference, ..} ) <$> f pluginPluginReference +{-# INLINE pluginPluginReferenceL #-} + +-- | 'pluginConfig' Lens +pluginConfigL :: Lens_' Plugin (PluginConfig) +pluginConfigL f Plugin{..} = (\pluginConfig -> Plugin { pluginConfig, ..} ) <$> f pluginConfig +{-# INLINE pluginConfigL #-} + + + +-- * PluginConfig + +-- | 'pluginConfigDockerVersion' Lens +pluginConfigDockerVersionL :: Lens_' PluginConfig (Maybe Text) +pluginConfigDockerVersionL f PluginConfig{..} = (\pluginConfigDockerVersion -> PluginConfig { pluginConfigDockerVersion, ..} ) <$> f pluginConfigDockerVersion +{-# INLINE pluginConfigDockerVersionL #-} + +-- | 'pluginConfigDescription' Lens +pluginConfigDescriptionL :: Lens_' PluginConfig (Text) +pluginConfigDescriptionL f PluginConfig{..} = (\pluginConfigDescription -> PluginConfig { pluginConfigDescription, ..} ) <$> f pluginConfigDescription +{-# INLINE pluginConfigDescriptionL #-} + +-- | 'pluginConfigDocumentation' Lens +pluginConfigDocumentationL :: Lens_' PluginConfig (Text) +pluginConfigDocumentationL f PluginConfig{..} = (\pluginConfigDocumentation -> PluginConfig { pluginConfigDocumentation, ..} ) <$> f pluginConfigDocumentation +{-# INLINE pluginConfigDocumentationL #-} + +-- | 'pluginConfigInterface' Lens +pluginConfigInterfaceL :: Lens_' PluginConfig (PluginConfigInterface) +pluginConfigInterfaceL f PluginConfig{..} = (\pluginConfigInterface -> PluginConfig { pluginConfigInterface, ..} ) <$> f pluginConfigInterface +{-# INLINE pluginConfigInterfaceL #-} + +-- | 'pluginConfigEntrypoint' Lens +pluginConfigEntrypointL :: Lens_' PluginConfig ([Text]) +pluginConfigEntrypointL f PluginConfig{..} = (\pluginConfigEntrypoint -> PluginConfig { pluginConfigEntrypoint, ..} ) <$> f pluginConfigEntrypoint +{-# INLINE pluginConfigEntrypointL #-} + +-- | 'pluginConfigWorkDir' Lens +pluginConfigWorkDirL :: Lens_' PluginConfig (Text) +pluginConfigWorkDirL f PluginConfig{..} = (\pluginConfigWorkDir -> PluginConfig { pluginConfigWorkDir, ..} ) <$> f pluginConfigWorkDir +{-# INLINE pluginConfigWorkDirL #-} + +-- | 'pluginConfigUser' Lens +pluginConfigUserL :: Lens_' PluginConfig (Maybe PluginConfigUser) +pluginConfigUserL f PluginConfig{..} = (\pluginConfigUser -> PluginConfig { pluginConfigUser, ..} ) <$> f pluginConfigUser +{-# INLINE pluginConfigUserL #-} + +-- | 'pluginConfigNetwork' Lens +pluginConfigNetworkL :: Lens_' PluginConfig (PluginConfigNetwork) +pluginConfigNetworkL f PluginConfig{..} = (\pluginConfigNetwork -> PluginConfig { pluginConfigNetwork, ..} ) <$> f pluginConfigNetwork +{-# INLINE pluginConfigNetworkL #-} + +-- | 'pluginConfigLinux' Lens +pluginConfigLinuxL :: Lens_' PluginConfig (PluginConfigLinux) +pluginConfigLinuxL f PluginConfig{..} = (\pluginConfigLinux -> PluginConfig { pluginConfigLinux, ..} ) <$> f pluginConfigLinux +{-# INLINE pluginConfigLinuxL #-} + +-- | 'pluginConfigPropagatedMount' Lens +pluginConfigPropagatedMountL :: Lens_' PluginConfig (Text) +pluginConfigPropagatedMountL f PluginConfig{..} = (\pluginConfigPropagatedMount -> PluginConfig { pluginConfigPropagatedMount, ..} ) <$> f pluginConfigPropagatedMount +{-# INLINE pluginConfigPropagatedMountL #-} + +-- | 'pluginConfigIpcHost' Lens +pluginConfigIpcHostL :: Lens_' PluginConfig (Bool) +pluginConfigIpcHostL f PluginConfig{..} = (\pluginConfigIpcHost -> PluginConfig { pluginConfigIpcHost, ..} ) <$> f pluginConfigIpcHost +{-# INLINE pluginConfigIpcHostL #-} + +-- | 'pluginConfigPidHost' Lens +pluginConfigPidHostL :: Lens_' PluginConfig (Bool) +pluginConfigPidHostL f PluginConfig{..} = (\pluginConfigPidHost -> PluginConfig { pluginConfigPidHost, ..} ) <$> f pluginConfigPidHost +{-# INLINE pluginConfigPidHostL #-} + +-- | 'pluginConfigMounts' Lens +pluginConfigMountsL :: Lens_' PluginConfig ([PluginMount]) +pluginConfigMountsL f PluginConfig{..} = (\pluginConfigMounts -> PluginConfig { pluginConfigMounts, ..} ) <$> f pluginConfigMounts +{-# INLINE pluginConfigMountsL #-} + +-- | 'pluginConfigEnv' Lens +pluginConfigEnvL :: Lens_' PluginConfig ([PluginEnv]) +pluginConfigEnvL f PluginConfig{..} = (\pluginConfigEnv -> PluginConfig { pluginConfigEnv, ..} ) <$> f pluginConfigEnv +{-# INLINE pluginConfigEnvL #-} + +-- | 'pluginConfigArgs' Lens +pluginConfigArgsL :: Lens_' PluginConfig (PluginConfigArgs) +pluginConfigArgsL f PluginConfig{..} = (\pluginConfigArgs -> PluginConfig { pluginConfigArgs, ..} ) <$> f pluginConfigArgs +{-# INLINE pluginConfigArgsL #-} + +-- | 'pluginConfigRootfs' Lens +pluginConfigRootfsL :: Lens_' PluginConfig (Maybe PluginConfigRootfs) +pluginConfigRootfsL f PluginConfig{..} = (\pluginConfigRootfs -> PluginConfig { pluginConfigRootfs, ..} ) <$> f pluginConfigRootfs +{-# INLINE pluginConfigRootfsL #-} + + + +-- * PluginConfigArgs + +-- | 'pluginConfigArgsName' Lens +pluginConfigArgsNameL :: Lens_' PluginConfigArgs (Text) +pluginConfigArgsNameL f PluginConfigArgs{..} = (\pluginConfigArgsName -> PluginConfigArgs { pluginConfigArgsName, ..} ) <$> f pluginConfigArgsName +{-# INLINE pluginConfigArgsNameL #-} + +-- | 'pluginConfigArgsDescription' Lens +pluginConfigArgsDescriptionL :: Lens_' PluginConfigArgs (Text) +pluginConfigArgsDescriptionL f PluginConfigArgs{..} = (\pluginConfigArgsDescription -> PluginConfigArgs { pluginConfigArgsDescription, ..} ) <$> f pluginConfigArgsDescription +{-# INLINE pluginConfigArgsDescriptionL #-} + +-- | 'pluginConfigArgsSettable' Lens +pluginConfigArgsSettableL :: Lens_' PluginConfigArgs ([Text]) +pluginConfigArgsSettableL f PluginConfigArgs{..} = (\pluginConfigArgsSettable -> PluginConfigArgs { pluginConfigArgsSettable, ..} ) <$> f pluginConfigArgsSettable +{-# INLINE pluginConfigArgsSettableL #-} + +-- | 'pluginConfigArgsValue' Lens +pluginConfigArgsValueL :: Lens_' PluginConfigArgs ([Text]) +pluginConfigArgsValueL f PluginConfigArgs{..} = (\pluginConfigArgsValue -> PluginConfigArgs { pluginConfigArgsValue, ..} ) <$> f pluginConfigArgsValue +{-# INLINE pluginConfigArgsValueL #-} + + + +-- * PluginConfigInterface + +-- | 'pluginConfigInterfaceTypes' Lens +pluginConfigInterfaceTypesL :: Lens_' PluginConfigInterface ([PluginInterfaceType]) +pluginConfigInterfaceTypesL f PluginConfigInterface{..} = (\pluginConfigInterfaceTypes -> PluginConfigInterface { pluginConfigInterfaceTypes, ..} ) <$> f pluginConfigInterfaceTypes +{-# INLINE pluginConfigInterfaceTypesL #-} + +-- | 'pluginConfigInterfaceSocket' Lens +pluginConfigInterfaceSocketL :: Lens_' PluginConfigInterface (Text) +pluginConfigInterfaceSocketL f PluginConfigInterface{..} = (\pluginConfigInterfaceSocket -> PluginConfigInterface { pluginConfigInterfaceSocket, ..} ) <$> f pluginConfigInterfaceSocket +{-# INLINE pluginConfigInterfaceSocketL #-} + +-- | 'pluginConfigInterfaceProtocolScheme' Lens +pluginConfigInterfaceProtocolSchemeL :: Lens_' PluginConfigInterface (Maybe E'ProtocolScheme) +pluginConfigInterfaceProtocolSchemeL f PluginConfigInterface{..} = (\pluginConfigInterfaceProtocolScheme -> PluginConfigInterface { pluginConfigInterfaceProtocolScheme, ..} ) <$> f pluginConfigInterfaceProtocolScheme +{-# INLINE pluginConfigInterfaceProtocolSchemeL #-} + + + +-- * PluginConfigLinux + +-- | 'pluginConfigLinuxCapabilities' Lens +pluginConfigLinuxCapabilitiesL :: Lens_' PluginConfigLinux ([Text]) +pluginConfigLinuxCapabilitiesL f PluginConfigLinux{..} = (\pluginConfigLinuxCapabilities -> PluginConfigLinux { pluginConfigLinuxCapabilities, ..} ) <$> f pluginConfigLinuxCapabilities +{-# INLINE pluginConfigLinuxCapabilitiesL #-} + +-- | 'pluginConfigLinuxAllowAllDevices' Lens +pluginConfigLinuxAllowAllDevicesL :: Lens_' PluginConfigLinux (Bool) +pluginConfigLinuxAllowAllDevicesL f PluginConfigLinux{..} = (\pluginConfigLinuxAllowAllDevices -> PluginConfigLinux { pluginConfigLinuxAllowAllDevices, ..} ) <$> f pluginConfigLinuxAllowAllDevices +{-# INLINE pluginConfigLinuxAllowAllDevicesL #-} + +-- | 'pluginConfigLinuxDevices' Lens +pluginConfigLinuxDevicesL :: Lens_' PluginConfigLinux ([PluginDevice]) +pluginConfigLinuxDevicesL f PluginConfigLinux{..} = (\pluginConfigLinuxDevices -> PluginConfigLinux { pluginConfigLinuxDevices, ..} ) <$> f pluginConfigLinuxDevices +{-# INLINE pluginConfigLinuxDevicesL #-} + + + +-- * PluginConfigNetwork + +-- | 'pluginConfigNetworkType' Lens +pluginConfigNetworkTypeL :: Lens_' PluginConfigNetwork (Text) +pluginConfigNetworkTypeL f PluginConfigNetwork{..} = (\pluginConfigNetworkType -> PluginConfigNetwork { pluginConfigNetworkType, ..} ) <$> f pluginConfigNetworkType +{-# INLINE pluginConfigNetworkTypeL #-} + + + +-- * PluginConfigRootfs + +-- | 'pluginConfigRootfsType' Lens +pluginConfigRootfsTypeL :: Lens_' PluginConfigRootfs (Maybe Text) +pluginConfigRootfsTypeL f PluginConfigRootfs{..} = (\pluginConfigRootfsType -> PluginConfigRootfs { pluginConfigRootfsType, ..} ) <$> f pluginConfigRootfsType +{-# INLINE pluginConfigRootfsTypeL #-} + +-- | 'pluginConfigRootfsDiffIds' Lens +pluginConfigRootfsDiffIdsL :: Lens_' PluginConfigRootfs (Maybe [Text]) +pluginConfigRootfsDiffIdsL f PluginConfigRootfs{..} = (\pluginConfigRootfsDiffIds -> PluginConfigRootfs { pluginConfigRootfsDiffIds, ..} ) <$> f pluginConfigRootfsDiffIds +{-# INLINE pluginConfigRootfsDiffIdsL #-} + + + +-- * PluginConfigUser + +-- | 'pluginConfigUserUid' Lens +pluginConfigUserUidL :: Lens_' PluginConfigUser (Maybe Int) +pluginConfigUserUidL f PluginConfigUser{..} = (\pluginConfigUserUid -> PluginConfigUser { pluginConfigUserUid, ..} ) <$> f pluginConfigUserUid +{-# INLINE pluginConfigUserUidL #-} + +-- | 'pluginConfigUserGid' Lens +pluginConfigUserGidL :: Lens_' PluginConfigUser (Maybe Int) +pluginConfigUserGidL f PluginConfigUser{..} = (\pluginConfigUserGid -> PluginConfigUser { pluginConfigUserGid, ..} ) <$> f pluginConfigUserGid +{-# INLINE pluginConfigUserGidL #-} + + + +-- * PluginDevice + +-- | 'pluginDeviceName' Lens +pluginDeviceNameL :: Lens_' PluginDevice (Text) +pluginDeviceNameL f PluginDevice{..} = (\pluginDeviceName -> PluginDevice { pluginDeviceName, ..} ) <$> f pluginDeviceName +{-# INLINE pluginDeviceNameL #-} + +-- | 'pluginDeviceDescription' Lens +pluginDeviceDescriptionL :: Lens_' PluginDevice (Text) +pluginDeviceDescriptionL f PluginDevice{..} = (\pluginDeviceDescription -> PluginDevice { pluginDeviceDescription, ..} ) <$> f pluginDeviceDescription +{-# INLINE pluginDeviceDescriptionL #-} + +-- | 'pluginDeviceSettable' Lens +pluginDeviceSettableL :: Lens_' PluginDevice ([Text]) +pluginDeviceSettableL f PluginDevice{..} = (\pluginDeviceSettable -> PluginDevice { pluginDeviceSettable, ..} ) <$> f pluginDeviceSettable +{-# INLINE pluginDeviceSettableL #-} + +-- | 'pluginDevicePath' Lens +pluginDevicePathL :: Lens_' PluginDevice (Text) +pluginDevicePathL f PluginDevice{..} = (\pluginDevicePath -> PluginDevice { pluginDevicePath, ..} ) <$> f pluginDevicePath +{-# INLINE pluginDevicePathL #-} + + + +-- * PluginEnv + +-- | 'pluginEnvName' Lens +pluginEnvNameL :: Lens_' PluginEnv (Text) +pluginEnvNameL f PluginEnv{..} = (\pluginEnvName -> PluginEnv { pluginEnvName, ..} ) <$> f pluginEnvName +{-# INLINE pluginEnvNameL #-} + +-- | 'pluginEnvDescription' Lens +pluginEnvDescriptionL :: Lens_' PluginEnv (Text) +pluginEnvDescriptionL f PluginEnv{..} = (\pluginEnvDescription -> PluginEnv { pluginEnvDescription, ..} ) <$> f pluginEnvDescription +{-# INLINE pluginEnvDescriptionL #-} + +-- | 'pluginEnvSettable' Lens +pluginEnvSettableL :: Lens_' PluginEnv ([Text]) +pluginEnvSettableL f PluginEnv{..} = (\pluginEnvSettable -> PluginEnv { pluginEnvSettable, ..} ) <$> f pluginEnvSettable +{-# INLINE pluginEnvSettableL #-} + +-- | 'pluginEnvValue' Lens +pluginEnvValueL :: Lens_' PluginEnv (Text) +pluginEnvValueL f PluginEnv{..} = (\pluginEnvValue -> PluginEnv { pluginEnvValue, ..} ) <$> f pluginEnvValue +{-# INLINE pluginEnvValueL #-} + + + +-- * PluginInterfaceType + +-- | 'pluginInterfaceTypePrefix' Lens +pluginInterfaceTypePrefixL :: Lens_' PluginInterfaceType (Text) +pluginInterfaceTypePrefixL f PluginInterfaceType{..} = (\pluginInterfaceTypePrefix -> PluginInterfaceType { pluginInterfaceTypePrefix, ..} ) <$> f pluginInterfaceTypePrefix +{-# INLINE pluginInterfaceTypePrefixL #-} + +-- | 'pluginInterfaceTypeCapability' Lens +pluginInterfaceTypeCapabilityL :: Lens_' PluginInterfaceType (Text) +pluginInterfaceTypeCapabilityL f PluginInterfaceType{..} = (\pluginInterfaceTypeCapability -> PluginInterfaceType { pluginInterfaceTypeCapability, ..} ) <$> f pluginInterfaceTypeCapability +{-# INLINE pluginInterfaceTypeCapabilityL #-} + +-- | 'pluginInterfaceTypeVersion' Lens +pluginInterfaceTypeVersionL :: Lens_' PluginInterfaceType (Text) +pluginInterfaceTypeVersionL f PluginInterfaceType{..} = (\pluginInterfaceTypeVersion -> PluginInterfaceType { pluginInterfaceTypeVersion, ..} ) <$> f pluginInterfaceTypeVersion +{-# INLINE pluginInterfaceTypeVersionL #-} + + + +-- * PluginMount + +-- | 'pluginMountName' Lens +pluginMountNameL :: Lens_' PluginMount (Text) +pluginMountNameL f PluginMount{..} = (\pluginMountName -> PluginMount { pluginMountName, ..} ) <$> f pluginMountName +{-# INLINE pluginMountNameL #-} + +-- | 'pluginMountDescription' Lens +pluginMountDescriptionL :: Lens_' PluginMount (Text) +pluginMountDescriptionL f PluginMount{..} = (\pluginMountDescription -> PluginMount { pluginMountDescription, ..} ) <$> f pluginMountDescription +{-# INLINE pluginMountDescriptionL #-} + +-- | 'pluginMountSettable' Lens +pluginMountSettableL :: Lens_' PluginMount ([Text]) +pluginMountSettableL f PluginMount{..} = (\pluginMountSettable -> PluginMount { pluginMountSettable, ..} ) <$> f pluginMountSettable +{-# INLINE pluginMountSettableL #-} + +-- | 'pluginMountSource' Lens +pluginMountSourceL :: Lens_' PluginMount (Text) +pluginMountSourceL f PluginMount{..} = (\pluginMountSource -> PluginMount { pluginMountSource, ..} ) <$> f pluginMountSource +{-# INLINE pluginMountSourceL #-} + +-- | 'pluginMountDestination' Lens +pluginMountDestinationL :: Lens_' PluginMount (Text) +pluginMountDestinationL f PluginMount{..} = (\pluginMountDestination -> PluginMount { pluginMountDestination, ..} ) <$> f pluginMountDestination +{-# INLINE pluginMountDestinationL #-} + +-- | 'pluginMountType' Lens +pluginMountTypeL :: Lens_' PluginMount (Text) +pluginMountTypeL f PluginMount{..} = (\pluginMountType -> PluginMount { pluginMountType, ..} ) <$> f pluginMountType +{-# INLINE pluginMountTypeL #-} + +-- | 'pluginMountOptions' Lens +pluginMountOptionsL :: Lens_' PluginMount ([Text]) +pluginMountOptionsL f PluginMount{..} = (\pluginMountOptions -> PluginMount { pluginMountOptions, ..} ) <$> f pluginMountOptions +{-# INLINE pluginMountOptionsL #-} + + + +-- * PluginPrivilege + +-- | 'pluginPrivilegeName' Lens +pluginPrivilegeNameL :: Lens_' PluginPrivilege (Maybe Text) +pluginPrivilegeNameL f PluginPrivilege{..} = (\pluginPrivilegeName -> PluginPrivilege { pluginPrivilegeName, ..} ) <$> f pluginPrivilegeName +{-# INLINE pluginPrivilegeNameL #-} + +-- | 'pluginPrivilegeDescription' Lens +pluginPrivilegeDescriptionL :: Lens_' PluginPrivilege (Maybe Text) +pluginPrivilegeDescriptionL f PluginPrivilege{..} = (\pluginPrivilegeDescription -> PluginPrivilege { pluginPrivilegeDescription, ..} ) <$> f pluginPrivilegeDescription +{-# INLINE pluginPrivilegeDescriptionL #-} + +-- | 'pluginPrivilegeValue' Lens +pluginPrivilegeValueL :: Lens_' PluginPrivilege (Maybe [Text]) +pluginPrivilegeValueL f PluginPrivilege{..} = (\pluginPrivilegeValue -> PluginPrivilege { pluginPrivilegeValue, ..} ) <$> f pluginPrivilegeValue +{-# INLINE pluginPrivilegeValueL #-} + + + +-- * PluginSettings + +-- | 'pluginSettingsMounts' Lens +pluginSettingsMountsL :: Lens_' PluginSettings ([PluginMount]) +pluginSettingsMountsL f PluginSettings{..} = (\pluginSettingsMounts -> PluginSettings { pluginSettingsMounts, ..} ) <$> f pluginSettingsMounts +{-# INLINE pluginSettingsMountsL #-} + +-- | 'pluginSettingsEnv' Lens +pluginSettingsEnvL :: Lens_' PluginSettings ([Text]) +pluginSettingsEnvL f PluginSettings{..} = (\pluginSettingsEnv -> PluginSettings { pluginSettingsEnv, ..} ) <$> f pluginSettingsEnv +{-# INLINE pluginSettingsEnvL #-} + +-- | 'pluginSettingsArgs' Lens +pluginSettingsArgsL :: Lens_' PluginSettings ([Text]) +pluginSettingsArgsL f PluginSettings{..} = (\pluginSettingsArgs -> PluginSettings { pluginSettingsArgs, ..} ) <$> f pluginSettingsArgs +{-# INLINE pluginSettingsArgsL #-} + +-- | 'pluginSettingsDevices' Lens +pluginSettingsDevicesL :: Lens_' PluginSettings ([PluginDevice]) +pluginSettingsDevicesL f PluginSettings{..} = (\pluginSettingsDevices -> PluginSettings { pluginSettingsDevices, ..} ) <$> f pluginSettingsDevices +{-# INLINE pluginSettingsDevicesL #-} + + + +-- * PluginsInfo + +-- | 'pluginsInfoVolume' Lens +pluginsInfoVolumeL :: Lens_' PluginsInfo (Maybe [Text]) +pluginsInfoVolumeL f PluginsInfo{..} = (\pluginsInfoVolume -> PluginsInfo { pluginsInfoVolume, ..} ) <$> f pluginsInfoVolume +{-# INLINE pluginsInfoVolumeL #-} + +-- | 'pluginsInfoNetwork' Lens +pluginsInfoNetworkL :: Lens_' PluginsInfo (Maybe [Text]) +pluginsInfoNetworkL f PluginsInfo{..} = (\pluginsInfoNetwork -> PluginsInfo { pluginsInfoNetwork, ..} ) <$> f pluginsInfoNetwork +{-# INLINE pluginsInfoNetworkL #-} + +-- | 'pluginsInfoAuthorization' Lens +pluginsInfoAuthorizationL :: Lens_' PluginsInfo (Maybe [Text]) +pluginsInfoAuthorizationL f PluginsInfo{..} = (\pluginsInfoAuthorization -> PluginsInfo { pluginsInfoAuthorization, ..} ) <$> f pluginsInfoAuthorization +{-# INLINE pluginsInfoAuthorizationL #-} + +-- | 'pluginsInfoLog' Lens +pluginsInfoLogL :: Lens_' PluginsInfo (Maybe [Text]) +pluginsInfoLogL f PluginsInfo{..} = (\pluginsInfoLog -> PluginsInfo { pluginsInfoLog, ..} ) <$> f pluginsInfoLog +{-# INLINE pluginsInfoLogL #-} + + + +-- * Port + +-- | 'portIp' Lens +portIpL :: Lens_' Port (Maybe Text) +portIpL f Port{..} = (\portIp -> Port { portIp, ..} ) <$> f portIp +{-# INLINE portIpL #-} + +-- | 'portPrivatePort' Lens +portPrivatePortL :: Lens_' Port (Int) +portPrivatePortL f Port{..} = (\portPrivatePort -> Port { portPrivatePort, ..} ) <$> f portPrivatePort +{-# INLINE portPrivatePortL #-} + +-- | 'portPublicPort' Lens +portPublicPortL :: Lens_' Port (Maybe Int) +portPublicPortL f Port{..} = (\portPublicPort -> Port { portPublicPort, ..} ) <$> f portPublicPort +{-# INLINE portPublicPortL #-} + +-- | 'portType' Lens +portTypeL :: Lens_' Port (E'Type) +portTypeL f Port{..} = (\portType -> Port { portType, ..} ) <$> f portType +{-# INLINE portTypeL #-} + + + +-- * PortBinding + +-- | 'portBindingHostIp' Lens +portBindingHostIpL :: Lens_' PortBinding (Maybe Text) +portBindingHostIpL f PortBinding{..} = (\portBindingHostIp -> PortBinding { portBindingHostIp, ..} ) <$> f portBindingHostIp +{-# INLINE portBindingHostIpL #-} + +-- | 'portBindingHostPort' Lens +portBindingHostPortL :: Lens_' PortBinding (Maybe Text) +portBindingHostPortL f PortBinding{..} = (\portBindingHostPort -> PortBinding { portBindingHostPort, ..} ) <$> f portBindingHostPort +{-# INLINE portBindingHostPortL #-} + + + +-- * PortStatus + +-- | 'portStatusPorts' Lens +portStatusPortsL :: Lens_' PortStatus (Maybe [EndpointPortConfig]) +portStatusPortsL f PortStatus{..} = (\portStatusPorts -> PortStatus { portStatusPorts, ..} ) <$> f portStatusPorts +{-# INLINE portStatusPortsL #-} + + + +-- * ProcessConfig + +-- | 'processConfigPrivileged' Lens +processConfigPrivilegedL :: Lens_' ProcessConfig (Maybe Bool) +processConfigPrivilegedL f ProcessConfig{..} = (\processConfigPrivileged -> ProcessConfig { processConfigPrivileged, ..} ) <$> f processConfigPrivileged +{-# INLINE processConfigPrivilegedL #-} + +-- | 'processConfigUser' Lens +processConfigUserL :: Lens_' ProcessConfig (Maybe Text) +processConfigUserL f ProcessConfig{..} = (\processConfigUser -> ProcessConfig { processConfigUser, ..} ) <$> f processConfigUser +{-# INLINE processConfigUserL #-} + +-- | 'processConfigTty' Lens +processConfigTtyL :: Lens_' ProcessConfig (Maybe Bool) +processConfigTtyL f ProcessConfig{..} = (\processConfigTty -> ProcessConfig { processConfigTty, ..} ) <$> f processConfigTty +{-# INLINE processConfigTtyL #-} + +-- | 'processConfigEntrypoint' Lens +processConfigEntrypointL :: Lens_' ProcessConfig (Maybe Text) +processConfigEntrypointL f ProcessConfig{..} = (\processConfigEntrypoint -> ProcessConfig { processConfigEntrypoint, ..} ) <$> f processConfigEntrypoint +{-# INLINE processConfigEntrypointL #-} + +-- | 'processConfigArguments' Lens +processConfigArgumentsL :: Lens_' ProcessConfig (Maybe [Text]) +processConfigArgumentsL f ProcessConfig{..} = (\processConfigArguments -> ProcessConfig { processConfigArguments, ..} ) <$> f processConfigArguments +{-# INLINE processConfigArgumentsL #-} + + + +-- * ProgressDetail + +-- | 'progressDetailCurrent' Lens +progressDetailCurrentL :: Lens_' ProgressDetail (Maybe Int) +progressDetailCurrentL f ProgressDetail{..} = (\progressDetailCurrent -> ProgressDetail { progressDetailCurrent, ..} ) <$> f progressDetailCurrent +{-# INLINE progressDetailCurrentL #-} + +-- | 'progressDetailTotal' Lens +progressDetailTotalL :: Lens_' ProgressDetail (Maybe Int) +progressDetailTotalL f ProgressDetail{..} = (\progressDetailTotal -> ProgressDetail { progressDetailTotal, ..} ) <$> f progressDetailTotal +{-# INLINE progressDetailTotalL #-} + + + +-- * PushImageInfo + +-- | 'pushImageInfoError' Lens +pushImageInfoErrorL :: Lens_' PushImageInfo (Maybe Text) +pushImageInfoErrorL f PushImageInfo{..} = (\pushImageInfoError -> PushImageInfo { pushImageInfoError, ..} ) <$> f pushImageInfoError +{-# INLINE pushImageInfoErrorL #-} + +-- | 'pushImageInfoStatus' Lens +pushImageInfoStatusL :: Lens_' PushImageInfo (Maybe Text) +pushImageInfoStatusL f PushImageInfo{..} = (\pushImageInfoStatus -> PushImageInfo { pushImageInfoStatus, ..} ) <$> f pushImageInfoStatus +{-# INLINE pushImageInfoStatusL #-} + +-- | 'pushImageInfoProgress' Lens +pushImageInfoProgressL :: Lens_' PushImageInfo (Maybe Text) +pushImageInfoProgressL f PushImageInfo{..} = (\pushImageInfoProgress -> PushImageInfo { pushImageInfoProgress, ..} ) <$> f pushImageInfoProgress +{-# INLINE pushImageInfoProgressL #-} + +-- | 'pushImageInfoProgressDetail' Lens +pushImageInfoProgressDetailL :: Lens_' PushImageInfo (Maybe ProgressDetail) +pushImageInfoProgressDetailL f PushImageInfo{..} = (\pushImageInfoProgressDetail -> PushImageInfo { pushImageInfoProgressDetail, ..} ) <$> f pushImageInfoProgressDetail +{-# INLINE pushImageInfoProgressDetailL #-} + + + +-- * Reachability + + + +-- * RegistryServiceConfig + +-- | 'registryServiceConfigAllowNondistributableArtifactsCidrs' Lens +registryServiceConfigAllowNondistributableArtifactsCidrsL :: Lens_' RegistryServiceConfig (Maybe [Text]) +registryServiceConfigAllowNondistributableArtifactsCidrsL f RegistryServiceConfig{..} = (\registryServiceConfigAllowNondistributableArtifactsCidrs -> RegistryServiceConfig { registryServiceConfigAllowNondistributableArtifactsCidrs, ..} ) <$> f registryServiceConfigAllowNondistributableArtifactsCidrs +{-# INLINE registryServiceConfigAllowNondistributableArtifactsCidrsL #-} + +-- | 'registryServiceConfigAllowNondistributableArtifactsHostnames' Lens +registryServiceConfigAllowNondistributableArtifactsHostnamesL :: Lens_' RegistryServiceConfig (Maybe [Text]) +registryServiceConfigAllowNondistributableArtifactsHostnamesL f RegistryServiceConfig{..} = (\registryServiceConfigAllowNondistributableArtifactsHostnames -> RegistryServiceConfig { registryServiceConfigAllowNondistributableArtifactsHostnames, ..} ) <$> f registryServiceConfigAllowNondistributableArtifactsHostnames +{-# INLINE registryServiceConfigAllowNondistributableArtifactsHostnamesL #-} + +-- | 'registryServiceConfigInsecureRegistryCidrs' Lens +registryServiceConfigInsecureRegistryCidrsL :: Lens_' RegistryServiceConfig (Maybe [Text]) +registryServiceConfigInsecureRegistryCidrsL f RegistryServiceConfig{..} = (\registryServiceConfigInsecureRegistryCidrs -> RegistryServiceConfig { registryServiceConfigInsecureRegistryCidrs, ..} ) <$> f registryServiceConfigInsecureRegistryCidrs +{-# INLINE registryServiceConfigInsecureRegistryCidrsL #-} + +-- | 'registryServiceConfigIndexConfigs' Lens +registryServiceConfigIndexConfigsL :: Lens_' RegistryServiceConfig (Maybe (Map.Map String IndexInfo)) +registryServiceConfigIndexConfigsL f RegistryServiceConfig{..} = (\registryServiceConfigIndexConfigs -> RegistryServiceConfig { registryServiceConfigIndexConfigs, ..} ) <$> f registryServiceConfigIndexConfigs +{-# INLINE registryServiceConfigIndexConfigsL #-} + +-- | 'registryServiceConfigMirrors' Lens +registryServiceConfigMirrorsL :: Lens_' RegistryServiceConfig (Maybe [Text]) +registryServiceConfigMirrorsL f RegistryServiceConfig{..} = (\registryServiceConfigMirrors -> RegistryServiceConfig { registryServiceConfigMirrors, ..} ) <$> f registryServiceConfigMirrors +{-# INLINE registryServiceConfigMirrorsL #-} + + + +-- * ResourceObject + +-- | 'resourceObjectNanoCpus' Lens +resourceObjectNanoCpusL :: Lens_' ResourceObject (Maybe Integer) +resourceObjectNanoCpusL f ResourceObject{..} = (\resourceObjectNanoCpus -> ResourceObject { resourceObjectNanoCpus, ..} ) <$> f resourceObjectNanoCpus +{-# INLINE resourceObjectNanoCpusL #-} + +-- | 'resourceObjectMemoryBytes' Lens +resourceObjectMemoryBytesL :: Lens_' ResourceObject (Maybe Integer) +resourceObjectMemoryBytesL f ResourceObject{..} = (\resourceObjectMemoryBytes -> ResourceObject { resourceObjectMemoryBytes, ..} ) <$> f resourceObjectMemoryBytes +{-# INLINE resourceObjectMemoryBytesL #-} + +-- | 'resourceObjectGenericResources' Lens +resourceObjectGenericResourcesL :: Lens_' ResourceObject (Maybe [GenericResourcesInner]) +resourceObjectGenericResourcesL f ResourceObject{..} = (\resourceObjectGenericResources -> ResourceObject { resourceObjectGenericResources, ..} ) <$> f resourceObjectGenericResources +{-# INLINE resourceObjectGenericResourcesL #-} + + + +-- * Resources + +-- | 'resourcesCpuShares' Lens +resourcesCpuSharesL :: Lens_' Resources (Maybe Int) +resourcesCpuSharesL f Resources{..} = (\resourcesCpuShares -> Resources { resourcesCpuShares, ..} ) <$> f resourcesCpuShares +{-# INLINE resourcesCpuSharesL #-} + +-- | 'resourcesMemory' Lens +resourcesMemoryL :: Lens_' Resources (Maybe Integer) +resourcesMemoryL f Resources{..} = (\resourcesMemory -> Resources { resourcesMemory, ..} ) <$> f resourcesMemory +{-# INLINE resourcesMemoryL #-} + +-- | 'resourcesCgroupParent' Lens +resourcesCgroupParentL :: Lens_' Resources (Maybe Text) +resourcesCgroupParentL f Resources{..} = (\resourcesCgroupParent -> Resources { resourcesCgroupParent, ..} ) <$> f resourcesCgroupParent +{-# INLINE resourcesCgroupParentL #-} + +-- | 'resourcesBlkioWeight' Lens +resourcesBlkioWeightL :: Lens_' Resources (Maybe Int) +resourcesBlkioWeightL f Resources{..} = (\resourcesBlkioWeight -> Resources { resourcesBlkioWeight, ..} ) <$> f resourcesBlkioWeight +{-# INLINE resourcesBlkioWeightL #-} + +-- | 'resourcesBlkioWeightDevice' Lens +resourcesBlkioWeightDeviceL :: Lens_' Resources (Maybe [ResourcesBlkioWeightDeviceInner]) +resourcesBlkioWeightDeviceL f Resources{..} = (\resourcesBlkioWeightDevice -> Resources { resourcesBlkioWeightDevice, ..} ) <$> f resourcesBlkioWeightDevice +{-# INLINE resourcesBlkioWeightDeviceL #-} + +-- | 'resourcesBlkioDeviceReadBps' Lens +resourcesBlkioDeviceReadBpsL :: Lens_' Resources (Maybe [ThrottleDevice]) +resourcesBlkioDeviceReadBpsL f Resources{..} = (\resourcesBlkioDeviceReadBps -> Resources { resourcesBlkioDeviceReadBps, ..} ) <$> f resourcesBlkioDeviceReadBps +{-# INLINE resourcesBlkioDeviceReadBpsL #-} + +-- | 'resourcesBlkioDeviceWriteBps' Lens +resourcesBlkioDeviceWriteBpsL :: Lens_' Resources (Maybe [ThrottleDevice]) +resourcesBlkioDeviceWriteBpsL f Resources{..} = (\resourcesBlkioDeviceWriteBps -> Resources { resourcesBlkioDeviceWriteBps, ..} ) <$> f resourcesBlkioDeviceWriteBps +{-# INLINE resourcesBlkioDeviceWriteBpsL #-} + +-- | 'resourcesBlkioDeviceReadIOps' Lens +resourcesBlkioDeviceReadIOpsL :: Lens_' Resources (Maybe [ThrottleDevice]) +resourcesBlkioDeviceReadIOpsL f Resources{..} = (\resourcesBlkioDeviceReadIOps -> Resources { resourcesBlkioDeviceReadIOps, ..} ) <$> f resourcesBlkioDeviceReadIOps +{-# INLINE resourcesBlkioDeviceReadIOpsL #-} + +-- | 'resourcesBlkioDeviceWriteIOps' Lens +resourcesBlkioDeviceWriteIOpsL :: Lens_' Resources (Maybe [ThrottleDevice]) +resourcesBlkioDeviceWriteIOpsL f Resources{..} = (\resourcesBlkioDeviceWriteIOps -> Resources { resourcesBlkioDeviceWriteIOps, ..} ) <$> f resourcesBlkioDeviceWriteIOps +{-# INLINE resourcesBlkioDeviceWriteIOpsL #-} + +-- | 'resourcesCpuPeriod' Lens +resourcesCpuPeriodL :: Lens_' Resources (Maybe Integer) +resourcesCpuPeriodL f Resources{..} = (\resourcesCpuPeriod -> Resources { resourcesCpuPeriod, ..} ) <$> f resourcesCpuPeriod +{-# INLINE resourcesCpuPeriodL #-} + +-- | 'resourcesCpuQuota' Lens +resourcesCpuQuotaL :: Lens_' Resources (Maybe Integer) +resourcesCpuQuotaL f Resources{..} = (\resourcesCpuQuota -> Resources { resourcesCpuQuota, ..} ) <$> f resourcesCpuQuota +{-# INLINE resourcesCpuQuotaL #-} + +-- | 'resourcesCpuRealtimePeriod' Lens +resourcesCpuRealtimePeriodL :: Lens_' Resources (Maybe Integer) +resourcesCpuRealtimePeriodL f Resources{..} = (\resourcesCpuRealtimePeriod -> Resources { resourcesCpuRealtimePeriod, ..} ) <$> f resourcesCpuRealtimePeriod +{-# INLINE resourcesCpuRealtimePeriodL #-} + +-- | 'resourcesCpuRealtimeRuntime' Lens +resourcesCpuRealtimeRuntimeL :: Lens_' Resources (Maybe Integer) +resourcesCpuRealtimeRuntimeL f Resources{..} = (\resourcesCpuRealtimeRuntime -> Resources { resourcesCpuRealtimeRuntime, ..} ) <$> f resourcesCpuRealtimeRuntime +{-# INLINE resourcesCpuRealtimeRuntimeL #-} + +-- | 'resourcesCpusetCpus' Lens +resourcesCpusetCpusL :: Lens_' Resources (Maybe Text) +resourcesCpusetCpusL f Resources{..} = (\resourcesCpusetCpus -> Resources { resourcesCpusetCpus, ..} ) <$> f resourcesCpusetCpus +{-# INLINE resourcesCpusetCpusL #-} + +-- | 'resourcesCpusetMems' Lens +resourcesCpusetMemsL :: Lens_' Resources (Maybe Text) +resourcesCpusetMemsL f Resources{..} = (\resourcesCpusetMems -> Resources { resourcesCpusetMems, ..} ) <$> f resourcesCpusetMems +{-# INLINE resourcesCpusetMemsL #-} + +-- | 'resourcesDevices' Lens +resourcesDevicesL :: Lens_' Resources (Maybe [DeviceMapping]) +resourcesDevicesL f Resources{..} = (\resourcesDevices -> Resources { resourcesDevices, ..} ) <$> f resourcesDevices +{-# INLINE resourcesDevicesL #-} + +-- | 'resourcesDeviceCgroupRules' Lens +resourcesDeviceCgroupRulesL :: Lens_' Resources (Maybe [Text]) +resourcesDeviceCgroupRulesL f Resources{..} = (\resourcesDeviceCgroupRules -> Resources { resourcesDeviceCgroupRules, ..} ) <$> f resourcesDeviceCgroupRules +{-# INLINE resourcesDeviceCgroupRulesL #-} + +-- | 'resourcesDeviceRequests' Lens +resourcesDeviceRequestsL :: Lens_' Resources (Maybe [DeviceRequest]) +resourcesDeviceRequestsL f Resources{..} = (\resourcesDeviceRequests -> Resources { resourcesDeviceRequests, ..} ) <$> f resourcesDeviceRequests +{-# INLINE resourcesDeviceRequestsL #-} + +-- | 'resourcesKernelMemoryTcp' Lens +resourcesKernelMemoryTcpL :: Lens_' Resources (Maybe Integer) +resourcesKernelMemoryTcpL f Resources{..} = (\resourcesKernelMemoryTcp -> Resources { resourcesKernelMemoryTcp, ..} ) <$> f resourcesKernelMemoryTcp +{-# INLINE resourcesKernelMemoryTcpL #-} + +-- | 'resourcesMemoryReservation' Lens +resourcesMemoryReservationL :: Lens_' Resources (Maybe Integer) +resourcesMemoryReservationL f Resources{..} = (\resourcesMemoryReservation -> Resources { resourcesMemoryReservation, ..} ) <$> f resourcesMemoryReservation +{-# INLINE resourcesMemoryReservationL #-} + +-- | 'resourcesMemorySwap' Lens +resourcesMemorySwapL :: Lens_' Resources (Maybe Integer) +resourcesMemorySwapL f Resources{..} = (\resourcesMemorySwap -> Resources { resourcesMemorySwap, ..} ) <$> f resourcesMemorySwap +{-# INLINE resourcesMemorySwapL #-} + +-- | 'resourcesMemorySwappiness' Lens +resourcesMemorySwappinessL :: Lens_' Resources (Maybe Integer) +resourcesMemorySwappinessL f Resources{..} = (\resourcesMemorySwappiness -> Resources { resourcesMemorySwappiness, ..} ) <$> f resourcesMemorySwappiness +{-# INLINE resourcesMemorySwappinessL #-} + +-- | 'resourcesNanoCpus' Lens +resourcesNanoCpusL :: Lens_' Resources (Maybe Integer) +resourcesNanoCpusL f Resources{..} = (\resourcesNanoCpus -> Resources { resourcesNanoCpus, ..} ) <$> f resourcesNanoCpus +{-# INLINE resourcesNanoCpusL #-} + +-- | 'resourcesOomKillDisable' Lens +resourcesOomKillDisableL :: Lens_' Resources (Maybe Bool) +resourcesOomKillDisableL f Resources{..} = (\resourcesOomKillDisable -> Resources { resourcesOomKillDisable, ..} ) <$> f resourcesOomKillDisable +{-# INLINE resourcesOomKillDisableL #-} + +-- | 'resourcesInit' Lens +resourcesInitL :: Lens_' Resources (Maybe Bool) +resourcesInitL f Resources{..} = (\resourcesInit -> Resources { resourcesInit, ..} ) <$> f resourcesInit +{-# INLINE resourcesInitL #-} + +-- | 'resourcesPidsLimit' Lens +resourcesPidsLimitL :: Lens_' Resources (Maybe Integer) +resourcesPidsLimitL f Resources{..} = (\resourcesPidsLimit -> Resources { resourcesPidsLimit, ..} ) <$> f resourcesPidsLimit +{-# INLINE resourcesPidsLimitL #-} + +-- | 'resourcesUlimits' Lens +resourcesUlimitsL :: Lens_' Resources (Maybe [ResourcesUlimitsInner]) +resourcesUlimitsL f Resources{..} = (\resourcesUlimits -> Resources { resourcesUlimits, ..} ) <$> f resourcesUlimits +{-# INLINE resourcesUlimitsL #-} + +-- | 'resourcesCpuCount' Lens +resourcesCpuCountL :: Lens_' Resources (Maybe Integer) +resourcesCpuCountL f Resources{..} = (\resourcesCpuCount -> Resources { resourcesCpuCount, ..} ) <$> f resourcesCpuCount +{-# INLINE resourcesCpuCountL #-} + +-- | 'resourcesCpuPercent' Lens +resourcesCpuPercentL :: Lens_' Resources (Maybe Integer) +resourcesCpuPercentL f Resources{..} = (\resourcesCpuPercent -> Resources { resourcesCpuPercent, ..} ) <$> f resourcesCpuPercent +{-# INLINE resourcesCpuPercentL #-} + +-- | 'resourcesIoMaximumIOps' Lens +resourcesIoMaximumIOpsL :: Lens_' Resources (Maybe Integer) +resourcesIoMaximumIOpsL f Resources{..} = (\resourcesIoMaximumIOps -> Resources { resourcesIoMaximumIOps, ..} ) <$> f resourcesIoMaximumIOps +{-# INLINE resourcesIoMaximumIOpsL #-} + +-- | 'resourcesIoMaximumBandwidth' Lens +resourcesIoMaximumBandwidthL :: Lens_' Resources (Maybe Integer) +resourcesIoMaximumBandwidthL f Resources{..} = (\resourcesIoMaximumBandwidth -> Resources { resourcesIoMaximumBandwidth, ..} ) <$> f resourcesIoMaximumBandwidth +{-# INLINE resourcesIoMaximumBandwidthL #-} + + + +-- * ResourcesBlkioWeightDeviceInner + +-- | 'resourcesBlkioWeightDeviceInnerPath' Lens +resourcesBlkioWeightDeviceInnerPathL :: Lens_' ResourcesBlkioWeightDeviceInner (Maybe Text) +resourcesBlkioWeightDeviceInnerPathL f ResourcesBlkioWeightDeviceInner{..} = (\resourcesBlkioWeightDeviceInnerPath -> ResourcesBlkioWeightDeviceInner { resourcesBlkioWeightDeviceInnerPath, ..} ) <$> f resourcesBlkioWeightDeviceInnerPath +{-# INLINE resourcesBlkioWeightDeviceInnerPathL #-} + +-- | 'resourcesBlkioWeightDeviceInnerWeight' Lens +resourcesBlkioWeightDeviceInnerWeightL :: Lens_' ResourcesBlkioWeightDeviceInner (Maybe Int) +resourcesBlkioWeightDeviceInnerWeightL f ResourcesBlkioWeightDeviceInner{..} = (\resourcesBlkioWeightDeviceInnerWeight -> ResourcesBlkioWeightDeviceInner { resourcesBlkioWeightDeviceInnerWeight, ..} ) <$> f resourcesBlkioWeightDeviceInnerWeight +{-# INLINE resourcesBlkioWeightDeviceInnerWeightL #-} + + + +-- * ResourcesUlimitsInner + +-- | 'resourcesUlimitsInnerName' Lens +resourcesUlimitsInnerNameL :: Lens_' ResourcesUlimitsInner (Maybe Text) +resourcesUlimitsInnerNameL f ResourcesUlimitsInner{..} = (\resourcesUlimitsInnerName -> ResourcesUlimitsInner { resourcesUlimitsInnerName, ..} ) <$> f resourcesUlimitsInnerName +{-# INLINE resourcesUlimitsInnerNameL #-} + +-- | 'resourcesUlimitsInnerSoft' Lens +resourcesUlimitsInnerSoftL :: Lens_' ResourcesUlimitsInner (Maybe Int) +resourcesUlimitsInnerSoftL f ResourcesUlimitsInner{..} = (\resourcesUlimitsInnerSoft -> ResourcesUlimitsInner { resourcesUlimitsInnerSoft, ..} ) <$> f resourcesUlimitsInnerSoft +{-# INLINE resourcesUlimitsInnerSoftL #-} + +-- | 'resourcesUlimitsInnerHard' Lens +resourcesUlimitsInnerHardL :: Lens_' ResourcesUlimitsInner (Maybe Int) +resourcesUlimitsInnerHardL f ResourcesUlimitsInner{..} = (\resourcesUlimitsInnerHard -> ResourcesUlimitsInner { resourcesUlimitsInnerHard, ..} ) <$> f resourcesUlimitsInnerHard +{-# INLINE resourcesUlimitsInnerHardL #-} + + + +-- * RestartPolicy + +-- | 'restartPolicyName' Lens +restartPolicyNameL :: Lens_' RestartPolicy (Maybe E'Name) +restartPolicyNameL f RestartPolicy{..} = (\restartPolicyName -> RestartPolicy { restartPolicyName, ..} ) <$> f restartPolicyName +{-# INLINE restartPolicyNameL #-} + +-- | 'restartPolicyMaximumRetryCount' Lens +restartPolicyMaximumRetryCountL :: Lens_' RestartPolicy (Maybe Int) +restartPolicyMaximumRetryCountL f RestartPolicy{..} = (\restartPolicyMaximumRetryCount -> RestartPolicy { restartPolicyMaximumRetryCount, ..} ) <$> f restartPolicyMaximumRetryCount +{-# INLINE restartPolicyMaximumRetryCountL #-} + + + +-- * Runtime + +-- | 'runtimePath' Lens +runtimePathL :: Lens_' Runtime (Maybe Text) +runtimePathL f Runtime{..} = (\runtimePath -> Runtime { runtimePath, ..} ) <$> f runtimePath +{-# INLINE runtimePathL #-} + +-- | 'runtimeRuntimeArgs' Lens +runtimeRuntimeArgsL :: Lens_' Runtime (Maybe [Text]) +runtimeRuntimeArgsL f Runtime{..} = (\runtimeRuntimeArgs -> Runtime { runtimeRuntimeArgs, ..} ) <$> f runtimeRuntimeArgs +{-# INLINE runtimeRuntimeArgsL #-} + +-- | 'runtimeStatus' Lens +runtimeStatusL :: Lens_' Runtime (Maybe (Map.Map String Text)) +runtimeStatusL f Runtime{..} = (\runtimeStatus -> Runtime { runtimeStatus, ..} ) <$> f runtimeStatus +{-# INLINE runtimeStatusL #-} + + + +-- * Secret + +-- | 'secretId' Lens +secretIdL :: Lens_' Secret (Maybe Text) +secretIdL f Secret{..} = (\secretId -> Secret { secretId, ..} ) <$> f secretId +{-# INLINE secretIdL #-} + +-- | 'secretVersion' Lens +secretVersionL :: Lens_' Secret (Maybe ObjectVersion) +secretVersionL f Secret{..} = (\secretVersion -> Secret { secretVersion, ..} ) <$> f secretVersion +{-# INLINE secretVersionL #-} + +-- | 'secretCreatedAt' Lens +secretCreatedAtL :: Lens_' Secret (Maybe Text) +secretCreatedAtL f Secret{..} = (\secretCreatedAt -> Secret { secretCreatedAt, ..} ) <$> f secretCreatedAt +{-# INLINE secretCreatedAtL #-} + +-- | 'secretUpdatedAt' Lens +secretUpdatedAtL :: Lens_' Secret (Maybe Text) +secretUpdatedAtL f Secret{..} = (\secretUpdatedAt -> Secret { secretUpdatedAt, ..} ) <$> f secretUpdatedAt +{-# INLINE secretUpdatedAtL #-} + +-- | 'secretSpec' Lens +secretSpecL :: Lens_' Secret (Maybe SecretSpec) +secretSpecL f Secret{..} = (\secretSpec -> Secret { secretSpec, ..} ) <$> f secretSpec +{-# INLINE secretSpecL #-} + + + +-- * SecretCreateRequest + +-- | 'secretCreateRequestName' Lens +secretCreateRequestNameL :: Lens_' SecretCreateRequest (Maybe Text) +secretCreateRequestNameL f SecretCreateRequest{..} = (\secretCreateRequestName -> SecretCreateRequest { secretCreateRequestName, ..} ) <$> f secretCreateRequestName +{-# INLINE secretCreateRequestNameL #-} + +-- | 'secretCreateRequestLabels' Lens +secretCreateRequestLabelsL :: Lens_' SecretCreateRequest (Maybe (Map.Map String Text)) +secretCreateRequestLabelsL f SecretCreateRequest{..} = (\secretCreateRequestLabels -> SecretCreateRequest { secretCreateRequestLabels, ..} ) <$> f secretCreateRequestLabels +{-# INLINE secretCreateRequestLabelsL #-} + +-- | 'secretCreateRequestData' Lens +secretCreateRequestDataL :: Lens_' SecretCreateRequest (Maybe Text) +secretCreateRequestDataL f SecretCreateRequest{..} = (\secretCreateRequestData -> SecretCreateRequest { secretCreateRequestData, ..} ) <$> f secretCreateRequestData +{-# INLINE secretCreateRequestDataL #-} + +-- | 'secretCreateRequestDriver' Lens +secretCreateRequestDriverL :: Lens_' SecretCreateRequest (Maybe Driver) +secretCreateRequestDriverL f SecretCreateRequest{..} = (\secretCreateRequestDriver -> SecretCreateRequest { secretCreateRequestDriver, ..} ) <$> f secretCreateRequestDriver +{-# INLINE secretCreateRequestDriverL #-} + +-- | 'secretCreateRequestTemplating' Lens +secretCreateRequestTemplatingL :: Lens_' SecretCreateRequest (Maybe Driver) +secretCreateRequestTemplatingL f SecretCreateRequest{..} = (\secretCreateRequestTemplating -> SecretCreateRequest { secretCreateRequestTemplating, ..} ) <$> f secretCreateRequestTemplating +{-# INLINE secretCreateRequestTemplatingL #-} + + + +-- * SecretSpec + +-- | 'secretSpecName' Lens +secretSpecNameL :: Lens_' SecretSpec (Maybe Text) +secretSpecNameL f SecretSpec{..} = (\secretSpecName -> SecretSpec { secretSpecName, ..} ) <$> f secretSpecName +{-# INLINE secretSpecNameL #-} + +-- | 'secretSpecLabels' Lens +secretSpecLabelsL :: Lens_' SecretSpec (Maybe (Map.Map String Text)) +secretSpecLabelsL f SecretSpec{..} = (\secretSpecLabels -> SecretSpec { secretSpecLabels, ..} ) <$> f secretSpecLabels +{-# INLINE secretSpecLabelsL #-} + +-- | 'secretSpecData' Lens +secretSpecDataL :: Lens_' SecretSpec (Maybe Text) +secretSpecDataL f SecretSpec{..} = (\secretSpecData -> SecretSpec { secretSpecData, ..} ) <$> f secretSpecData +{-# INLINE secretSpecDataL #-} + +-- | 'secretSpecDriver' Lens +secretSpecDriverL :: Lens_' SecretSpec (Maybe Driver) +secretSpecDriverL f SecretSpec{..} = (\secretSpecDriver -> SecretSpec { secretSpecDriver, ..} ) <$> f secretSpecDriver +{-# INLINE secretSpecDriverL #-} + +-- | 'secretSpecTemplating' Lens +secretSpecTemplatingL :: Lens_' SecretSpec (Maybe Driver) +secretSpecTemplatingL f SecretSpec{..} = (\secretSpecTemplating -> SecretSpec { secretSpecTemplating, ..} ) <$> f secretSpecTemplating +{-# INLINE secretSpecTemplatingL #-} + + + +-- * Service + +-- | 'serviceId' Lens +serviceIdL :: Lens_' Service (Maybe Text) +serviceIdL f Service{..} = (\serviceId -> Service { serviceId, ..} ) <$> f serviceId +{-# INLINE serviceIdL #-} + +-- | 'serviceVersion' Lens +serviceVersionL :: Lens_' Service (Maybe ObjectVersion) +serviceVersionL f Service{..} = (\serviceVersion -> Service { serviceVersion, ..} ) <$> f serviceVersion +{-# INLINE serviceVersionL #-} + +-- | 'serviceCreatedAt' Lens +serviceCreatedAtL :: Lens_' Service (Maybe Text) +serviceCreatedAtL f Service{..} = (\serviceCreatedAt -> Service { serviceCreatedAt, ..} ) <$> f serviceCreatedAt +{-# INLINE serviceCreatedAtL #-} + +-- | 'serviceUpdatedAt' Lens +serviceUpdatedAtL :: Lens_' Service (Maybe Text) +serviceUpdatedAtL f Service{..} = (\serviceUpdatedAt -> Service { serviceUpdatedAt, ..} ) <$> f serviceUpdatedAt +{-# INLINE serviceUpdatedAtL #-} + +-- | 'serviceSpec' Lens +serviceSpecL :: Lens_' Service (Maybe ServiceSpec) +serviceSpecL f Service{..} = (\serviceSpec -> Service { serviceSpec, ..} ) <$> f serviceSpec +{-# INLINE serviceSpecL #-} + +-- | 'serviceEndpoint' Lens +serviceEndpointL :: Lens_' Service (Maybe ServiceEndpoint) +serviceEndpointL f Service{..} = (\serviceEndpoint -> Service { serviceEndpoint, ..} ) <$> f serviceEndpoint +{-# INLINE serviceEndpointL #-} + +-- | 'serviceUpdateStatus' Lens +serviceUpdateStatusL :: Lens_' Service (Maybe ServiceUpdateStatus) +serviceUpdateStatusL f Service{..} = (\serviceUpdateStatus -> Service { serviceUpdateStatus, ..} ) <$> f serviceUpdateStatus +{-# INLINE serviceUpdateStatusL #-} + +-- | 'serviceServiceStatus' Lens +serviceServiceStatusL :: Lens_' Service (Maybe ServiceServiceStatus) +serviceServiceStatusL f Service{..} = (\serviceServiceStatus -> Service { serviceServiceStatus, ..} ) <$> f serviceServiceStatus +{-# INLINE serviceServiceStatusL #-} + +-- | 'serviceJobStatus' Lens +serviceJobStatusL :: Lens_' Service (Maybe ServiceJobStatus) +serviceJobStatusL f Service{..} = (\serviceJobStatus -> Service { serviceJobStatus, ..} ) <$> f serviceJobStatus +{-# INLINE serviceJobStatusL #-} + + + +-- * ServiceCreateRequest + +-- | 'serviceCreateRequestName' Lens +serviceCreateRequestNameL :: Lens_' ServiceCreateRequest (Maybe Text) +serviceCreateRequestNameL f ServiceCreateRequest{..} = (\serviceCreateRequestName -> ServiceCreateRequest { serviceCreateRequestName, ..} ) <$> f serviceCreateRequestName +{-# INLINE serviceCreateRequestNameL #-} + +-- | 'serviceCreateRequestLabels' Lens +serviceCreateRequestLabelsL :: Lens_' ServiceCreateRequest (Maybe (Map.Map String Text)) +serviceCreateRequestLabelsL f ServiceCreateRequest{..} = (\serviceCreateRequestLabels -> ServiceCreateRequest { serviceCreateRequestLabels, ..} ) <$> f serviceCreateRequestLabels +{-# INLINE serviceCreateRequestLabelsL #-} + +-- | 'serviceCreateRequestTaskTemplate' Lens +serviceCreateRequestTaskTemplateL :: Lens_' ServiceCreateRequest (Maybe TaskSpec) +serviceCreateRequestTaskTemplateL f ServiceCreateRequest{..} = (\serviceCreateRequestTaskTemplate -> ServiceCreateRequest { serviceCreateRequestTaskTemplate, ..} ) <$> f serviceCreateRequestTaskTemplate +{-# INLINE serviceCreateRequestTaskTemplateL #-} + +-- | 'serviceCreateRequestMode' Lens +serviceCreateRequestModeL :: Lens_' ServiceCreateRequest (Maybe ServiceSpecMode) +serviceCreateRequestModeL f ServiceCreateRequest{..} = (\serviceCreateRequestMode -> ServiceCreateRequest { serviceCreateRequestMode, ..} ) <$> f serviceCreateRequestMode +{-# INLINE serviceCreateRequestModeL #-} + +-- | 'serviceCreateRequestUpdateConfig' Lens +serviceCreateRequestUpdateConfigL :: Lens_' ServiceCreateRequest (Maybe ServiceSpecUpdateConfig) +serviceCreateRequestUpdateConfigL f ServiceCreateRequest{..} = (\serviceCreateRequestUpdateConfig -> ServiceCreateRequest { serviceCreateRequestUpdateConfig, ..} ) <$> f serviceCreateRequestUpdateConfig +{-# INLINE serviceCreateRequestUpdateConfigL #-} + +-- | 'serviceCreateRequestRollbackConfig' Lens +serviceCreateRequestRollbackConfigL :: Lens_' ServiceCreateRequest (Maybe ServiceSpecRollbackConfig) +serviceCreateRequestRollbackConfigL f ServiceCreateRequest{..} = (\serviceCreateRequestRollbackConfig -> ServiceCreateRequest { serviceCreateRequestRollbackConfig, ..} ) <$> f serviceCreateRequestRollbackConfig +{-# INLINE serviceCreateRequestRollbackConfigL #-} + +-- | 'serviceCreateRequestNetworks' Lens +serviceCreateRequestNetworksL :: Lens_' ServiceCreateRequest (Maybe [NetworkAttachmentConfig]) +serviceCreateRequestNetworksL f ServiceCreateRequest{..} = (\serviceCreateRequestNetworks -> ServiceCreateRequest { serviceCreateRequestNetworks, ..} ) <$> f serviceCreateRequestNetworks +{-# INLINE serviceCreateRequestNetworksL #-} + +-- | 'serviceCreateRequestEndpointSpec' Lens +serviceCreateRequestEndpointSpecL :: Lens_' ServiceCreateRequest (Maybe EndpointSpec) +serviceCreateRequestEndpointSpecL f ServiceCreateRequest{..} = (\serviceCreateRequestEndpointSpec -> ServiceCreateRequest { serviceCreateRequestEndpointSpec, ..} ) <$> f serviceCreateRequestEndpointSpec +{-# INLINE serviceCreateRequestEndpointSpecL #-} + + + +-- * ServiceCreateResponse + +-- | 'serviceCreateResponseId' Lens +serviceCreateResponseIdL :: Lens_' ServiceCreateResponse (Maybe Text) +serviceCreateResponseIdL f ServiceCreateResponse{..} = (\serviceCreateResponseId -> ServiceCreateResponse { serviceCreateResponseId, ..} ) <$> f serviceCreateResponseId +{-# INLINE serviceCreateResponseIdL #-} + +-- | 'serviceCreateResponseWarnings' Lens +serviceCreateResponseWarningsL :: Lens_' ServiceCreateResponse (Maybe [Text]) +serviceCreateResponseWarningsL f ServiceCreateResponse{..} = (\serviceCreateResponseWarnings -> ServiceCreateResponse { serviceCreateResponseWarnings, ..} ) <$> f serviceCreateResponseWarnings +{-# INLINE serviceCreateResponseWarningsL #-} + + + +-- * ServiceEndpoint + +-- | 'serviceEndpointSpec' Lens +serviceEndpointSpecL :: Lens_' ServiceEndpoint (Maybe EndpointSpec) +serviceEndpointSpecL f ServiceEndpoint{..} = (\serviceEndpointSpec -> ServiceEndpoint { serviceEndpointSpec, ..} ) <$> f serviceEndpointSpec +{-# INLINE serviceEndpointSpecL #-} + +-- | 'serviceEndpointPorts' Lens +serviceEndpointPortsL :: Lens_' ServiceEndpoint (Maybe [EndpointPortConfig]) +serviceEndpointPortsL f ServiceEndpoint{..} = (\serviceEndpointPorts -> ServiceEndpoint { serviceEndpointPorts, ..} ) <$> f serviceEndpointPorts +{-# INLINE serviceEndpointPortsL #-} + +-- | 'serviceEndpointVirtualIps' Lens +serviceEndpointVirtualIpsL :: Lens_' ServiceEndpoint (Maybe [ServiceEndpointVirtualIPsInner]) +serviceEndpointVirtualIpsL f ServiceEndpoint{..} = (\serviceEndpointVirtualIps -> ServiceEndpoint { serviceEndpointVirtualIps, ..} ) <$> f serviceEndpointVirtualIps +{-# INLINE serviceEndpointVirtualIpsL #-} + + + +-- * ServiceEndpointVirtualIPsInner + +-- | 'serviceEndpointVirtualIPsInnerNetworkId' Lens +serviceEndpointVirtualIPsInnerNetworkIdL :: Lens_' ServiceEndpointVirtualIPsInner (Maybe Text) +serviceEndpointVirtualIPsInnerNetworkIdL f ServiceEndpointVirtualIPsInner{..} = (\serviceEndpointVirtualIPsInnerNetworkId -> ServiceEndpointVirtualIPsInner { serviceEndpointVirtualIPsInnerNetworkId, ..} ) <$> f serviceEndpointVirtualIPsInnerNetworkId +{-# INLINE serviceEndpointVirtualIPsInnerNetworkIdL #-} + +-- | 'serviceEndpointVirtualIPsInnerAddr' Lens +serviceEndpointVirtualIPsInnerAddrL :: Lens_' ServiceEndpointVirtualIPsInner (Maybe Text) +serviceEndpointVirtualIPsInnerAddrL f ServiceEndpointVirtualIPsInner{..} = (\serviceEndpointVirtualIPsInnerAddr -> ServiceEndpointVirtualIPsInner { serviceEndpointVirtualIPsInnerAddr, ..} ) <$> f serviceEndpointVirtualIPsInnerAddr +{-# INLINE serviceEndpointVirtualIPsInnerAddrL #-} + + + +-- * ServiceJobStatus + +-- | 'serviceJobStatusJobIteration' Lens +serviceJobStatusJobIterationL :: Lens_' ServiceJobStatus (Maybe ObjectVersion) +serviceJobStatusJobIterationL f ServiceJobStatus{..} = (\serviceJobStatusJobIteration -> ServiceJobStatus { serviceJobStatusJobIteration, ..} ) <$> f serviceJobStatusJobIteration +{-# INLINE serviceJobStatusJobIterationL #-} + +-- | 'serviceJobStatusLastExecution' Lens +serviceJobStatusLastExecutionL :: Lens_' ServiceJobStatus (Maybe Text) +serviceJobStatusLastExecutionL f ServiceJobStatus{..} = (\serviceJobStatusLastExecution -> ServiceJobStatus { serviceJobStatusLastExecution, ..} ) <$> f serviceJobStatusLastExecution +{-# INLINE serviceJobStatusLastExecutionL #-} + + + +-- * ServiceServiceStatus + +-- | 'serviceServiceStatusRunningTasks' Lens +serviceServiceStatusRunningTasksL :: Lens_' ServiceServiceStatus (Maybe Int) +serviceServiceStatusRunningTasksL f ServiceServiceStatus{..} = (\serviceServiceStatusRunningTasks -> ServiceServiceStatus { serviceServiceStatusRunningTasks, ..} ) <$> f serviceServiceStatusRunningTasks +{-# INLINE serviceServiceStatusRunningTasksL #-} + +-- | 'serviceServiceStatusDesiredTasks' Lens +serviceServiceStatusDesiredTasksL :: Lens_' ServiceServiceStatus (Maybe Int) +serviceServiceStatusDesiredTasksL f ServiceServiceStatus{..} = (\serviceServiceStatusDesiredTasks -> ServiceServiceStatus { serviceServiceStatusDesiredTasks, ..} ) <$> f serviceServiceStatusDesiredTasks +{-# INLINE serviceServiceStatusDesiredTasksL #-} + +-- | 'serviceServiceStatusCompletedTasks' Lens +serviceServiceStatusCompletedTasksL :: Lens_' ServiceServiceStatus (Maybe Int) +serviceServiceStatusCompletedTasksL f ServiceServiceStatus{..} = (\serviceServiceStatusCompletedTasks -> ServiceServiceStatus { serviceServiceStatusCompletedTasks, ..} ) <$> f serviceServiceStatusCompletedTasks +{-# INLINE serviceServiceStatusCompletedTasksL #-} + + + +-- * ServiceSpec + +-- | 'serviceSpecName' Lens +serviceSpecNameL :: Lens_' ServiceSpec (Maybe Text) +serviceSpecNameL f ServiceSpec{..} = (\serviceSpecName -> ServiceSpec { serviceSpecName, ..} ) <$> f serviceSpecName +{-# INLINE serviceSpecNameL #-} + +-- | 'serviceSpecLabels' Lens +serviceSpecLabelsL :: Lens_' ServiceSpec (Maybe (Map.Map String Text)) +serviceSpecLabelsL f ServiceSpec{..} = (\serviceSpecLabels -> ServiceSpec { serviceSpecLabels, ..} ) <$> f serviceSpecLabels +{-# INLINE serviceSpecLabelsL #-} + +-- | 'serviceSpecTaskTemplate' Lens +serviceSpecTaskTemplateL :: Lens_' ServiceSpec (Maybe TaskSpec) +serviceSpecTaskTemplateL f ServiceSpec{..} = (\serviceSpecTaskTemplate -> ServiceSpec { serviceSpecTaskTemplate, ..} ) <$> f serviceSpecTaskTemplate +{-# INLINE serviceSpecTaskTemplateL #-} + +-- | 'serviceSpecMode' Lens +serviceSpecModeL :: Lens_' ServiceSpec (Maybe ServiceSpecMode) +serviceSpecModeL f ServiceSpec{..} = (\serviceSpecMode -> ServiceSpec { serviceSpecMode, ..} ) <$> f serviceSpecMode +{-# INLINE serviceSpecModeL #-} + +-- | 'serviceSpecUpdateConfig' Lens +serviceSpecUpdateConfigL :: Lens_' ServiceSpec (Maybe ServiceSpecUpdateConfig) +serviceSpecUpdateConfigL f ServiceSpec{..} = (\serviceSpecUpdateConfig -> ServiceSpec { serviceSpecUpdateConfig, ..} ) <$> f serviceSpecUpdateConfig +{-# INLINE serviceSpecUpdateConfigL #-} + +-- | 'serviceSpecRollbackConfig' Lens +serviceSpecRollbackConfigL :: Lens_' ServiceSpec (Maybe ServiceSpecRollbackConfig) +serviceSpecRollbackConfigL f ServiceSpec{..} = (\serviceSpecRollbackConfig -> ServiceSpec { serviceSpecRollbackConfig, ..} ) <$> f serviceSpecRollbackConfig +{-# INLINE serviceSpecRollbackConfigL #-} + +-- | 'serviceSpecNetworks' Lens +serviceSpecNetworksL :: Lens_' ServiceSpec (Maybe [NetworkAttachmentConfig]) +serviceSpecNetworksL f ServiceSpec{..} = (\serviceSpecNetworks -> ServiceSpec { serviceSpecNetworks, ..} ) <$> f serviceSpecNetworks +{-# INLINE serviceSpecNetworksL #-} + +-- | 'serviceSpecEndpointSpec' Lens +serviceSpecEndpointSpecL :: Lens_' ServiceSpec (Maybe EndpointSpec) +serviceSpecEndpointSpecL f ServiceSpec{..} = (\serviceSpecEndpointSpec -> ServiceSpec { serviceSpecEndpointSpec, ..} ) <$> f serviceSpecEndpointSpec +{-# INLINE serviceSpecEndpointSpecL #-} + + + +-- * ServiceSpecMode + +-- | 'serviceSpecModeReplicated' Lens +serviceSpecModeReplicatedL :: Lens_' ServiceSpecMode (Maybe ServiceSpecModeReplicated) +serviceSpecModeReplicatedL f ServiceSpecMode{..} = (\serviceSpecModeReplicated -> ServiceSpecMode { serviceSpecModeReplicated, ..} ) <$> f serviceSpecModeReplicated +{-# INLINE serviceSpecModeReplicatedL #-} + +-- | 'serviceSpecModeGlobal' Lens +serviceSpecModeGlobalL :: Lens_' ServiceSpecMode (Maybe A.Value) +serviceSpecModeGlobalL f ServiceSpecMode{..} = (\serviceSpecModeGlobal -> ServiceSpecMode { serviceSpecModeGlobal, ..} ) <$> f serviceSpecModeGlobal +{-# INLINE serviceSpecModeGlobalL #-} + +-- | 'serviceSpecModeReplicatedJob' Lens +serviceSpecModeReplicatedJobL :: Lens_' ServiceSpecMode (Maybe ServiceSpecModeReplicatedJob) +serviceSpecModeReplicatedJobL f ServiceSpecMode{..} = (\serviceSpecModeReplicatedJob -> ServiceSpecMode { serviceSpecModeReplicatedJob, ..} ) <$> f serviceSpecModeReplicatedJob +{-# INLINE serviceSpecModeReplicatedJobL #-} + +-- | 'serviceSpecModeGlobalJob' Lens +serviceSpecModeGlobalJobL :: Lens_' ServiceSpecMode (Maybe A.Value) +serviceSpecModeGlobalJobL f ServiceSpecMode{..} = (\serviceSpecModeGlobalJob -> ServiceSpecMode { serviceSpecModeGlobalJob, ..} ) <$> f serviceSpecModeGlobalJob +{-# INLINE serviceSpecModeGlobalJobL #-} + + + +-- * ServiceSpecModeReplicated + +-- | 'serviceSpecModeReplicatedReplicas' Lens +serviceSpecModeReplicatedReplicasL :: Lens_' ServiceSpecModeReplicated (Maybe Integer) +serviceSpecModeReplicatedReplicasL f ServiceSpecModeReplicated{..} = (\serviceSpecModeReplicatedReplicas -> ServiceSpecModeReplicated { serviceSpecModeReplicatedReplicas, ..} ) <$> f serviceSpecModeReplicatedReplicas +{-# INLINE serviceSpecModeReplicatedReplicasL #-} + + + +-- * ServiceSpecModeReplicatedJob + +-- | 'serviceSpecModeReplicatedJobMaxConcurrent' Lens +serviceSpecModeReplicatedJobMaxConcurrentL :: Lens_' ServiceSpecModeReplicatedJob (Maybe Integer) +serviceSpecModeReplicatedJobMaxConcurrentL f ServiceSpecModeReplicatedJob{..} = (\serviceSpecModeReplicatedJobMaxConcurrent -> ServiceSpecModeReplicatedJob { serviceSpecModeReplicatedJobMaxConcurrent, ..} ) <$> f serviceSpecModeReplicatedJobMaxConcurrent +{-# INLINE serviceSpecModeReplicatedJobMaxConcurrentL #-} + +-- | 'serviceSpecModeReplicatedJobTotalCompletions' Lens +serviceSpecModeReplicatedJobTotalCompletionsL :: Lens_' ServiceSpecModeReplicatedJob (Maybe Integer) +serviceSpecModeReplicatedJobTotalCompletionsL f ServiceSpecModeReplicatedJob{..} = (\serviceSpecModeReplicatedJobTotalCompletions -> ServiceSpecModeReplicatedJob { serviceSpecModeReplicatedJobTotalCompletions, ..} ) <$> f serviceSpecModeReplicatedJobTotalCompletions +{-# INLINE serviceSpecModeReplicatedJobTotalCompletionsL #-} + + + +-- * ServiceSpecRollbackConfig + +-- | 'serviceSpecRollbackConfigParallelism' Lens +serviceSpecRollbackConfigParallelismL :: Lens_' ServiceSpecRollbackConfig (Maybe Integer) +serviceSpecRollbackConfigParallelismL f ServiceSpecRollbackConfig{..} = (\serviceSpecRollbackConfigParallelism -> ServiceSpecRollbackConfig { serviceSpecRollbackConfigParallelism, ..} ) <$> f serviceSpecRollbackConfigParallelism +{-# INLINE serviceSpecRollbackConfigParallelismL #-} + +-- | 'serviceSpecRollbackConfigDelay' Lens +serviceSpecRollbackConfigDelayL :: Lens_' ServiceSpecRollbackConfig (Maybe Integer) +serviceSpecRollbackConfigDelayL f ServiceSpecRollbackConfig{..} = (\serviceSpecRollbackConfigDelay -> ServiceSpecRollbackConfig { serviceSpecRollbackConfigDelay, ..} ) <$> f serviceSpecRollbackConfigDelay +{-# INLINE serviceSpecRollbackConfigDelayL #-} + +-- | 'serviceSpecRollbackConfigFailureAction' Lens +serviceSpecRollbackConfigFailureActionL :: Lens_' ServiceSpecRollbackConfig (Maybe E'FailureAction2) +serviceSpecRollbackConfigFailureActionL f ServiceSpecRollbackConfig{..} = (\serviceSpecRollbackConfigFailureAction -> ServiceSpecRollbackConfig { serviceSpecRollbackConfigFailureAction, ..} ) <$> f serviceSpecRollbackConfigFailureAction +{-# INLINE serviceSpecRollbackConfigFailureActionL #-} + +-- | 'serviceSpecRollbackConfigMonitor' Lens +serviceSpecRollbackConfigMonitorL :: Lens_' ServiceSpecRollbackConfig (Maybe Integer) +serviceSpecRollbackConfigMonitorL f ServiceSpecRollbackConfig{..} = (\serviceSpecRollbackConfigMonitor -> ServiceSpecRollbackConfig { serviceSpecRollbackConfigMonitor, ..} ) <$> f serviceSpecRollbackConfigMonitor +{-# INLINE serviceSpecRollbackConfigMonitorL #-} + +-- | 'serviceSpecRollbackConfigMaxFailureRatio' Lens +serviceSpecRollbackConfigMaxFailureRatioL :: Lens_' ServiceSpecRollbackConfig (Maybe Double) +serviceSpecRollbackConfigMaxFailureRatioL f ServiceSpecRollbackConfig{..} = (\serviceSpecRollbackConfigMaxFailureRatio -> ServiceSpecRollbackConfig { serviceSpecRollbackConfigMaxFailureRatio, ..} ) <$> f serviceSpecRollbackConfigMaxFailureRatio +{-# INLINE serviceSpecRollbackConfigMaxFailureRatioL #-} + +-- | 'serviceSpecRollbackConfigOrder' Lens +serviceSpecRollbackConfigOrderL :: Lens_' ServiceSpecRollbackConfig (Maybe E'Order) +serviceSpecRollbackConfigOrderL f ServiceSpecRollbackConfig{..} = (\serviceSpecRollbackConfigOrder -> ServiceSpecRollbackConfig { serviceSpecRollbackConfigOrder, ..} ) <$> f serviceSpecRollbackConfigOrder +{-# INLINE serviceSpecRollbackConfigOrderL #-} + + + +-- * ServiceSpecUpdateConfig + +-- | 'serviceSpecUpdateConfigParallelism' Lens +serviceSpecUpdateConfigParallelismL :: Lens_' ServiceSpecUpdateConfig (Maybe Integer) +serviceSpecUpdateConfigParallelismL f ServiceSpecUpdateConfig{..} = (\serviceSpecUpdateConfigParallelism -> ServiceSpecUpdateConfig { serviceSpecUpdateConfigParallelism, ..} ) <$> f serviceSpecUpdateConfigParallelism +{-# INLINE serviceSpecUpdateConfigParallelismL #-} + +-- | 'serviceSpecUpdateConfigDelay' Lens +serviceSpecUpdateConfigDelayL :: Lens_' ServiceSpecUpdateConfig (Maybe Integer) +serviceSpecUpdateConfigDelayL f ServiceSpecUpdateConfig{..} = (\serviceSpecUpdateConfigDelay -> ServiceSpecUpdateConfig { serviceSpecUpdateConfigDelay, ..} ) <$> f serviceSpecUpdateConfigDelay +{-# INLINE serviceSpecUpdateConfigDelayL #-} + +-- | 'serviceSpecUpdateConfigFailureAction' Lens +serviceSpecUpdateConfigFailureActionL :: Lens_' ServiceSpecUpdateConfig (Maybe E'FailureAction) +serviceSpecUpdateConfigFailureActionL f ServiceSpecUpdateConfig{..} = (\serviceSpecUpdateConfigFailureAction -> ServiceSpecUpdateConfig { serviceSpecUpdateConfigFailureAction, ..} ) <$> f serviceSpecUpdateConfigFailureAction +{-# INLINE serviceSpecUpdateConfigFailureActionL #-} + +-- | 'serviceSpecUpdateConfigMonitor' Lens +serviceSpecUpdateConfigMonitorL :: Lens_' ServiceSpecUpdateConfig (Maybe Integer) +serviceSpecUpdateConfigMonitorL f ServiceSpecUpdateConfig{..} = (\serviceSpecUpdateConfigMonitor -> ServiceSpecUpdateConfig { serviceSpecUpdateConfigMonitor, ..} ) <$> f serviceSpecUpdateConfigMonitor +{-# INLINE serviceSpecUpdateConfigMonitorL #-} + +-- | 'serviceSpecUpdateConfigMaxFailureRatio' Lens +serviceSpecUpdateConfigMaxFailureRatioL :: Lens_' ServiceSpecUpdateConfig (Maybe Double) +serviceSpecUpdateConfigMaxFailureRatioL f ServiceSpecUpdateConfig{..} = (\serviceSpecUpdateConfigMaxFailureRatio -> ServiceSpecUpdateConfig { serviceSpecUpdateConfigMaxFailureRatio, ..} ) <$> f serviceSpecUpdateConfigMaxFailureRatio +{-# INLINE serviceSpecUpdateConfigMaxFailureRatioL #-} + +-- | 'serviceSpecUpdateConfigOrder' Lens +serviceSpecUpdateConfigOrderL :: Lens_' ServiceSpecUpdateConfig (Maybe E'Order) +serviceSpecUpdateConfigOrderL f ServiceSpecUpdateConfig{..} = (\serviceSpecUpdateConfigOrder -> ServiceSpecUpdateConfig { serviceSpecUpdateConfigOrder, ..} ) <$> f serviceSpecUpdateConfigOrder +{-# INLINE serviceSpecUpdateConfigOrderL #-} + + + +-- * ServiceUpdateRequest + +-- | 'serviceUpdateRequestName' Lens +serviceUpdateRequestNameL :: Lens_' ServiceUpdateRequest (Maybe Text) +serviceUpdateRequestNameL f ServiceUpdateRequest{..} = (\serviceUpdateRequestName -> ServiceUpdateRequest { serviceUpdateRequestName, ..} ) <$> f serviceUpdateRequestName +{-# INLINE serviceUpdateRequestNameL #-} + +-- | 'serviceUpdateRequestLabels' Lens +serviceUpdateRequestLabelsL :: Lens_' ServiceUpdateRequest (Maybe (Map.Map String Text)) +serviceUpdateRequestLabelsL f ServiceUpdateRequest{..} = (\serviceUpdateRequestLabels -> ServiceUpdateRequest { serviceUpdateRequestLabels, ..} ) <$> f serviceUpdateRequestLabels +{-# INLINE serviceUpdateRequestLabelsL #-} + +-- | 'serviceUpdateRequestTaskTemplate' Lens +serviceUpdateRequestTaskTemplateL :: Lens_' ServiceUpdateRequest (Maybe TaskSpec) +serviceUpdateRequestTaskTemplateL f ServiceUpdateRequest{..} = (\serviceUpdateRequestTaskTemplate -> ServiceUpdateRequest { serviceUpdateRequestTaskTemplate, ..} ) <$> f serviceUpdateRequestTaskTemplate +{-# INLINE serviceUpdateRequestTaskTemplateL #-} + +-- | 'serviceUpdateRequestMode' Lens +serviceUpdateRequestModeL :: Lens_' ServiceUpdateRequest (Maybe ServiceSpecMode) +serviceUpdateRequestModeL f ServiceUpdateRequest{..} = (\serviceUpdateRequestMode -> ServiceUpdateRequest { serviceUpdateRequestMode, ..} ) <$> f serviceUpdateRequestMode +{-# INLINE serviceUpdateRequestModeL #-} + +-- | 'serviceUpdateRequestUpdateConfig' Lens +serviceUpdateRequestUpdateConfigL :: Lens_' ServiceUpdateRequest (Maybe ServiceSpecUpdateConfig) +serviceUpdateRequestUpdateConfigL f ServiceUpdateRequest{..} = (\serviceUpdateRequestUpdateConfig -> ServiceUpdateRequest { serviceUpdateRequestUpdateConfig, ..} ) <$> f serviceUpdateRequestUpdateConfig +{-# INLINE serviceUpdateRequestUpdateConfigL #-} + +-- | 'serviceUpdateRequestRollbackConfig' Lens +serviceUpdateRequestRollbackConfigL :: Lens_' ServiceUpdateRequest (Maybe ServiceSpecRollbackConfig) +serviceUpdateRequestRollbackConfigL f ServiceUpdateRequest{..} = (\serviceUpdateRequestRollbackConfig -> ServiceUpdateRequest { serviceUpdateRequestRollbackConfig, ..} ) <$> f serviceUpdateRequestRollbackConfig +{-# INLINE serviceUpdateRequestRollbackConfigL #-} + +-- | 'serviceUpdateRequestNetworks' Lens +serviceUpdateRequestNetworksL :: Lens_' ServiceUpdateRequest (Maybe [NetworkAttachmentConfig]) +serviceUpdateRequestNetworksL f ServiceUpdateRequest{..} = (\serviceUpdateRequestNetworks -> ServiceUpdateRequest { serviceUpdateRequestNetworks, ..} ) <$> f serviceUpdateRequestNetworks +{-# INLINE serviceUpdateRequestNetworksL #-} + +-- | 'serviceUpdateRequestEndpointSpec' Lens +serviceUpdateRequestEndpointSpecL :: Lens_' ServiceUpdateRequest (Maybe EndpointSpec) +serviceUpdateRequestEndpointSpecL f ServiceUpdateRequest{..} = (\serviceUpdateRequestEndpointSpec -> ServiceUpdateRequest { serviceUpdateRequestEndpointSpec, ..} ) <$> f serviceUpdateRequestEndpointSpec +{-# INLINE serviceUpdateRequestEndpointSpecL #-} + + + +-- * ServiceUpdateResponse + +-- | 'serviceUpdateResponseWarnings' Lens +serviceUpdateResponseWarningsL :: Lens_' ServiceUpdateResponse (Maybe [Text]) +serviceUpdateResponseWarningsL f ServiceUpdateResponse{..} = (\serviceUpdateResponseWarnings -> ServiceUpdateResponse { serviceUpdateResponseWarnings, ..} ) <$> f serviceUpdateResponseWarnings +{-# INLINE serviceUpdateResponseWarningsL #-} + + + +-- * ServiceUpdateStatus + +-- | 'serviceUpdateStatusState' Lens +serviceUpdateStatusStateL :: Lens_' ServiceUpdateStatus (Maybe E'State) +serviceUpdateStatusStateL f ServiceUpdateStatus{..} = (\serviceUpdateStatusState -> ServiceUpdateStatus { serviceUpdateStatusState, ..} ) <$> f serviceUpdateStatusState +{-# INLINE serviceUpdateStatusStateL #-} + +-- | 'serviceUpdateStatusStartedAt' Lens +serviceUpdateStatusStartedAtL :: Lens_' ServiceUpdateStatus (Maybe Text) +serviceUpdateStatusStartedAtL f ServiceUpdateStatus{..} = (\serviceUpdateStatusStartedAt -> ServiceUpdateStatus { serviceUpdateStatusStartedAt, ..} ) <$> f serviceUpdateStatusStartedAt +{-# INLINE serviceUpdateStatusStartedAtL #-} + +-- | 'serviceUpdateStatusCompletedAt' Lens +serviceUpdateStatusCompletedAtL :: Lens_' ServiceUpdateStatus (Maybe Text) +serviceUpdateStatusCompletedAtL f ServiceUpdateStatus{..} = (\serviceUpdateStatusCompletedAt -> ServiceUpdateStatus { serviceUpdateStatusCompletedAt, ..} ) <$> f serviceUpdateStatusCompletedAt +{-# INLINE serviceUpdateStatusCompletedAtL #-} + +-- | 'serviceUpdateStatusMessage' Lens +serviceUpdateStatusMessageL :: Lens_' ServiceUpdateStatus (Maybe Text) +serviceUpdateStatusMessageL f ServiceUpdateStatus{..} = (\serviceUpdateStatusMessage -> ServiceUpdateStatus { serviceUpdateStatusMessage, ..} ) <$> f serviceUpdateStatusMessage +{-# INLINE serviceUpdateStatusMessageL #-} + + + +-- * Swarm + +-- | 'swarmId' Lens +swarmIdL :: Lens_' Swarm (Maybe Text) +swarmIdL f Swarm{..} = (\swarmId -> Swarm { swarmId, ..} ) <$> f swarmId +{-# INLINE swarmIdL #-} + +-- | 'swarmVersion' Lens +swarmVersionL :: Lens_' Swarm (Maybe ObjectVersion) +swarmVersionL f Swarm{..} = (\swarmVersion -> Swarm { swarmVersion, ..} ) <$> f swarmVersion +{-# INLINE swarmVersionL #-} + +-- | 'swarmCreatedAt' Lens +swarmCreatedAtL :: Lens_' Swarm (Maybe Text) +swarmCreatedAtL f Swarm{..} = (\swarmCreatedAt -> Swarm { swarmCreatedAt, ..} ) <$> f swarmCreatedAt +{-# INLINE swarmCreatedAtL #-} + +-- | 'swarmUpdatedAt' Lens +swarmUpdatedAtL :: Lens_' Swarm (Maybe Text) +swarmUpdatedAtL f Swarm{..} = (\swarmUpdatedAt -> Swarm { swarmUpdatedAt, ..} ) <$> f swarmUpdatedAt +{-# INLINE swarmUpdatedAtL #-} + +-- | 'swarmSpec' Lens +swarmSpecL :: Lens_' Swarm (Maybe SwarmSpec) +swarmSpecL f Swarm{..} = (\swarmSpec -> Swarm { swarmSpec, ..} ) <$> f swarmSpec +{-# INLINE swarmSpecL #-} + +-- | 'swarmTlsInfo' Lens +swarmTlsInfoL :: Lens_' Swarm (Maybe TLSInfo) +swarmTlsInfoL f Swarm{..} = (\swarmTlsInfo -> Swarm { swarmTlsInfo, ..} ) <$> f swarmTlsInfo +{-# INLINE swarmTlsInfoL #-} + +-- | 'swarmRootRotationInProgress' Lens +swarmRootRotationInProgressL :: Lens_' Swarm (Maybe Bool) +swarmRootRotationInProgressL f Swarm{..} = (\swarmRootRotationInProgress -> Swarm { swarmRootRotationInProgress, ..} ) <$> f swarmRootRotationInProgress +{-# INLINE swarmRootRotationInProgressL #-} + +-- | 'swarmDataPathPort' Lens +swarmDataPathPortL :: Lens_' Swarm (Maybe Int) +swarmDataPathPortL f Swarm{..} = (\swarmDataPathPort -> Swarm { swarmDataPathPort, ..} ) <$> f swarmDataPathPort +{-# INLINE swarmDataPathPortL #-} + +-- | 'swarmDefaultAddrPool' Lens +swarmDefaultAddrPoolL :: Lens_' Swarm (Maybe [Text]) +swarmDefaultAddrPoolL f Swarm{..} = (\swarmDefaultAddrPool -> Swarm { swarmDefaultAddrPool, ..} ) <$> f swarmDefaultAddrPool +{-# INLINE swarmDefaultAddrPoolL #-} + +-- | 'swarmSubnetSize' Lens +swarmSubnetSizeL :: Lens_' Swarm (Maybe Int) +swarmSubnetSizeL f Swarm{..} = (\swarmSubnetSize -> Swarm { swarmSubnetSize, ..} ) <$> f swarmSubnetSize +{-# INLINE swarmSubnetSizeL #-} + +-- | 'swarmJoinTokens' Lens +swarmJoinTokensL :: Lens_' Swarm (Maybe JoinTokens) +swarmJoinTokensL f Swarm{..} = (\swarmJoinTokens -> Swarm { swarmJoinTokens, ..} ) <$> f swarmJoinTokens +{-# INLINE swarmJoinTokensL #-} + + + +-- * SwarmInfo + +-- | 'swarmInfoNodeId' Lens +swarmInfoNodeIdL :: Lens_' SwarmInfo (Maybe Text) +swarmInfoNodeIdL f SwarmInfo{..} = (\swarmInfoNodeId -> SwarmInfo { swarmInfoNodeId, ..} ) <$> f swarmInfoNodeId +{-# INLINE swarmInfoNodeIdL #-} + +-- | 'swarmInfoNodeAddr' Lens +swarmInfoNodeAddrL :: Lens_' SwarmInfo (Maybe Text) +swarmInfoNodeAddrL f SwarmInfo{..} = (\swarmInfoNodeAddr -> SwarmInfo { swarmInfoNodeAddr, ..} ) <$> f swarmInfoNodeAddr +{-# INLINE swarmInfoNodeAddrL #-} + +-- | 'swarmInfoLocalNodeState' Lens +swarmInfoLocalNodeStateL :: Lens_' SwarmInfo (Maybe LocalNodeState) +swarmInfoLocalNodeStateL f SwarmInfo{..} = (\swarmInfoLocalNodeState -> SwarmInfo { swarmInfoLocalNodeState, ..} ) <$> f swarmInfoLocalNodeState +{-# INLINE swarmInfoLocalNodeStateL #-} + +-- | 'swarmInfoControlAvailable' Lens +swarmInfoControlAvailableL :: Lens_' SwarmInfo (Maybe Bool) +swarmInfoControlAvailableL f SwarmInfo{..} = (\swarmInfoControlAvailable -> SwarmInfo { swarmInfoControlAvailable, ..} ) <$> f swarmInfoControlAvailable +{-# INLINE swarmInfoControlAvailableL #-} + +-- | 'swarmInfoError' Lens +swarmInfoErrorL :: Lens_' SwarmInfo (Maybe Text) +swarmInfoErrorL f SwarmInfo{..} = (\swarmInfoError -> SwarmInfo { swarmInfoError, ..} ) <$> f swarmInfoError +{-# INLINE swarmInfoErrorL #-} + +-- | 'swarmInfoRemoteManagers' Lens +swarmInfoRemoteManagersL :: Lens_' SwarmInfo (Maybe [PeerNode]) +swarmInfoRemoteManagersL f SwarmInfo{..} = (\swarmInfoRemoteManagers -> SwarmInfo { swarmInfoRemoteManagers, ..} ) <$> f swarmInfoRemoteManagers +{-# INLINE swarmInfoRemoteManagersL #-} + +-- | 'swarmInfoNodes' Lens +swarmInfoNodesL :: Lens_' SwarmInfo (Maybe Int) +swarmInfoNodesL f SwarmInfo{..} = (\swarmInfoNodes -> SwarmInfo { swarmInfoNodes, ..} ) <$> f swarmInfoNodes +{-# INLINE swarmInfoNodesL #-} + +-- | 'swarmInfoManagers' Lens +swarmInfoManagersL :: Lens_' SwarmInfo (Maybe Int) +swarmInfoManagersL f SwarmInfo{..} = (\swarmInfoManagers -> SwarmInfo { swarmInfoManagers, ..} ) <$> f swarmInfoManagers +{-# INLINE swarmInfoManagersL #-} + +-- | 'swarmInfoCluster' Lens +swarmInfoClusterL :: Lens_' SwarmInfo (Maybe ClusterInfo) +swarmInfoClusterL f SwarmInfo{..} = (\swarmInfoCluster -> SwarmInfo { swarmInfoCluster, ..} ) <$> f swarmInfoCluster +{-# INLINE swarmInfoClusterL #-} + + + +-- * SwarmInitRequest + +-- | 'swarmInitRequestListenAddr' Lens +swarmInitRequestListenAddrL :: Lens_' SwarmInitRequest (Maybe Text) +swarmInitRequestListenAddrL f SwarmInitRequest{..} = (\swarmInitRequestListenAddr -> SwarmInitRequest { swarmInitRequestListenAddr, ..} ) <$> f swarmInitRequestListenAddr +{-# INLINE swarmInitRequestListenAddrL #-} + +-- | 'swarmInitRequestAdvertiseAddr' Lens +swarmInitRequestAdvertiseAddrL :: Lens_' SwarmInitRequest (Maybe Text) +swarmInitRequestAdvertiseAddrL f SwarmInitRequest{..} = (\swarmInitRequestAdvertiseAddr -> SwarmInitRequest { swarmInitRequestAdvertiseAddr, ..} ) <$> f swarmInitRequestAdvertiseAddr +{-# INLINE swarmInitRequestAdvertiseAddrL #-} + +-- | 'swarmInitRequestDataPathAddr' Lens +swarmInitRequestDataPathAddrL :: Lens_' SwarmInitRequest (Maybe Text) +swarmInitRequestDataPathAddrL f SwarmInitRequest{..} = (\swarmInitRequestDataPathAddr -> SwarmInitRequest { swarmInitRequestDataPathAddr, ..} ) <$> f swarmInitRequestDataPathAddr +{-# INLINE swarmInitRequestDataPathAddrL #-} + +-- | 'swarmInitRequestDataPathPort' Lens +swarmInitRequestDataPathPortL :: Lens_' SwarmInitRequest (Maybe Int) +swarmInitRequestDataPathPortL f SwarmInitRequest{..} = (\swarmInitRequestDataPathPort -> SwarmInitRequest { swarmInitRequestDataPathPort, ..} ) <$> f swarmInitRequestDataPathPort +{-# INLINE swarmInitRequestDataPathPortL #-} + +-- | 'swarmInitRequestDefaultAddrPool' Lens +swarmInitRequestDefaultAddrPoolL :: Lens_' SwarmInitRequest (Maybe [Text]) +swarmInitRequestDefaultAddrPoolL f SwarmInitRequest{..} = (\swarmInitRequestDefaultAddrPool -> SwarmInitRequest { swarmInitRequestDefaultAddrPool, ..} ) <$> f swarmInitRequestDefaultAddrPool +{-# INLINE swarmInitRequestDefaultAddrPoolL #-} + +-- | 'swarmInitRequestForceNewCluster' Lens +swarmInitRequestForceNewClusterL :: Lens_' SwarmInitRequest (Maybe Bool) +swarmInitRequestForceNewClusterL f SwarmInitRequest{..} = (\swarmInitRequestForceNewCluster -> SwarmInitRequest { swarmInitRequestForceNewCluster, ..} ) <$> f swarmInitRequestForceNewCluster +{-# INLINE swarmInitRequestForceNewClusterL #-} + +-- | 'swarmInitRequestSubnetSize' Lens +swarmInitRequestSubnetSizeL :: Lens_' SwarmInitRequest (Maybe Int) +swarmInitRequestSubnetSizeL f SwarmInitRequest{..} = (\swarmInitRequestSubnetSize -> SwarmInitRequest { swarmInitRequestSubnetSize, ..} ) <$> f swarmInitRequestSubnetSize +{-# INLINE swarmInitRequestSubnetSizeL #-} + +-- | 'swarmInitRequestSpec' Lens +swarmInitRequestSpecL :: Lens_' SwarmInitRequest (Maybe SwarmSpec) +swarmInitRequestSpecL f SwarmInitRequest{..} = (\swarmInitRequestSpec -> SwarmInitRequest { swarmInitRequestSpec, ..} ) <$> f swarmInitRequestSpec +{-# INLINE swarmInitRequestSpecL #-} + + + +-- * SwarmJoinRequest + +-- | 'swarmJoinRequestListenAddr' Lens +swarmJoinRequestListenAddrL :: Lens_' SwarmJoinRequest (Maybe Text) +swarmJoinRequestListenAddrL f SwarmJoinRequest{..} = (\swarmJoinRequestListenAddr -> SwarmJoinRequest { swarmJoinRequestListenAddr, ..} ) <$> f swarmJoinRequestListenAddr +{-# INLINE swarmJoinRequestListenAddrL #-} + +-- | 'swarmJoinRequestAdvertiseAddr' Lens +swarmJoinRequestAdvertiseAddrL :: Lens_' SwarmJoinRequest (Maybe Text) +swarmJoinRequestAdvertiseAddrL f SwarmJoinRequest{..} = (\swarmJoinRequestAdvertiseAddr -> SwarmJoinRequest { swarmJoinRequestAdvertiseAddr, ..} ) <$> f swarmJoinRequestAdvertiseAddr +{-# INLINE swarmJoinRequestAdvertiseAddrL #-} + +-- | 'swarmJoinRequestDataPathAddr' Lens +swarmJoinRequestDataPathAddrL :: Lens_' SwarmJoinRequest (Maybe Text) +swarmJoinRequestDataPathAddrL f SwarmJoinRequest{..} = (\swarmJoinRequestDataPathAddr -> SwarmJoinRequest { swarmJoinRequestDataPathAddr, ..} ) <$> f swarmJoinRequestDataPathAddr +{-# INLINE swarmJoinRequestDataPathAddrL #-} + +-- | 'swarmJoinRequestRemoteAddrs' Lens +swarmJoinRequestRemoteAddrsL :: Lens_' SwarmJoinRequest (Maybe [Text]) +swarmJoinRequestRemoteAddrsL f SwarmJoinRequest{..} = (\swarmJoinRequestRemoteAddrs -> SwarmJoinRequest { swarmJoinRequestRemoteAddrs, ..} ) <$> f swarmJoinRequestRemoteAddrs +{-# INLINE swarmJoinRequestRemoteAddrsL #-} + +-- | 'swarmJoinRequestJoinToken' Lens +swarmJoinRequestJoinTokenL :: Lens_' SwarmJoinRequest (Maybe Text) +swarmJoinRequestJoinTokenL f SwarmJoinRequest{..} = (\swarmJoinRequestJoinToken -> SwarmJoinRequest { swarmJoinRequestJoinToken, ..} ) <$> f swarmJoinRequestJoinToken +{-# INLINE swarmJoinRequestJoinTokenL #-} + + + +-- * SwarmSpec + +-- | 'swarmSpecName' Lens +swarmSpecNameL :: Lens_' SwarmSpec (Maybe Text) +swarmSpecNameL f SwarmSpec{..} = (\swarmSpecName -> SwarmSpec { swarmSpecName, ..} ) <$> f swarmSpecName +{-# INLINE swarmSpecNameL #-} + +-- | 'swarmSpecLabels' Lens +swarmSpecLabelsL :: Lens_' SwarmSpec (Maybe (Map.Map String Text)) +swarmSpecLabelsL f SwarmSpec{..} = (\swarmSpecLabels -> SwarmSpec { swarmSpecLabels, ..} ) <$> f swarmSpecLabels +{-# INLINE swarmSpecLabelsL #-} + +-- | 'swarmSpecOrchestration' Lens +swarmSpecOrchestrationL :: Lens_' SwarmSpec (Maybe SwarmSpecOrchestration) +swarmSpecOrchestrationL f SwarmSpec{..} = (\swarmSpecOrchestration -> SwarmSpec { swarmSpecOrchestration, ..} ) <$> f swarmSpecOrchestration +{-# INLINE swarmSpecOrchestrationL #-} + +-- | 'swarmSpecRaft' Lens +swarmSpecRaftL :: Lens_' SwarmSpec (Maybe SwarmSpecRaft) +swarmSpecRaftL f SwarmSpec{..} = (\swarmSpecRaft -> SwarmSpec { swarmSpecRaft, ..} ) <$> f swarmSpecRaft +{-# INLINE swarmSpecRaftL #-} + +-- | 'swarmSpecDispatcher' Lens +swarmSpecDispatcherL :: Lens_' SwarmSpec (Maybe SwarmSpecDispatcher) +swarmSpecDispatcherL f SwarmSpec{..} = (\swarmSpecDispatcher -> SwarmSpec { swarmSpecDispatcher, ..} ) <$> f swarmSpecDispatcher +{-# INLINE swarmSpecDispatcherL #-} + +-- | 'swarmSpecCaConfig' Lens +swarmSpecCaConfigL :: Lens_' SwarmSpec (Maybe SwarmSpecCAConfig) +swarmSpecCaConfigL f SwarmSpec{..} = (\swarmSpecCaConfig -> SwarmSpec { swarmSpecCaConfig, ..} ) <$> f swarmSpecCaConfig +{-# INLINE swarmSpecCaConfigL #-} + +-- | 'swarmSpecEncryptionConfig' Lens +swarmSpecEncryptionConfigL :: Lens_' SwarmSpec (Maybe SwarmSpecEncryptionConfig) +swarmSpecEncryptionConfigL f SwarmSpec{..} = (\swarmSpecEncryptionConfig -> SwarmSpec { swarmSpecEncryptionConfig, ..} ) <$> f swarmSpecEncryptionConfig +{-# INLINE swarmSpecEncryptionConfigL #-} + +-- | 'swarmSpecTaskDefaults' Lens +swarmSpecTaskDefaultsL :: Lens_' SwarmSpec (Maybe SwarmSpecTaskDefaults) +swarmSpecTaskDefaultsL f SwarmSpec{..} = (\swarmSpecTaskDefaults -> SwarmSpec { swarmSpecTaskDefaults, ..} ) <$> f swarmSpecTaskDefaults +{-# INLINE swarmSpecTaskDefaultsL #-} + + + +-- * SwarmSpecCAConfig + +-- | 'swarmSpecCAConfigNodeCertExpiry' Lens +swarmSpecCAConfigNodeCertExpiryL :: Lens_' SwarmSpecCAConfig (Maybe Integer) +swarmSpecCAConfigNodeCertExpiryL f SwarmSpecCAConfig{..} = (\swarmSpecCAConfigNodeCertExpiry -> SwarmSpecCAConfig { swarmSpecCAConfigNodeCertExpiry, ..} ) <$> f swarmSpecCAConfigNodeCertExpiry +{-# INLINE swarmSpecCAConfigNodeCertExpiryL #-} + +-- | 'swarmSpecCAConfigExternalCas' Lens +swarmSpecCAConfigExternalCasL :: Lens_' SwarmSpecCAConfig (Maybe [SwarmSpecCAConfigExternalCAsInner]) +swarmSpecCAConfigExternalCasL f SwarmSpecCAConfig{..} = (\swarmSpecCAConfigExternalCas -> SwarmSpecCAConfig { swarmSpecCAConfigExternalCas, ..} ) <$> f swarmSpecCAConfigExternalCas +{-# INLINE swarmSpecCAConfigExternalCasL #-} + +-- | 'swarmSpecCAConfigSigningCaCert' Lens +swarmSpecCAConfigSigningCaCertL :: Lens_' SwarmSpecCAConfig (Maybe Text) +swarmSpecCAConfigSigningCaCertL f SwarmSpecCAConfig{..} = (\swarmSpecCAConfigSigningCaCert -> SwarmSpecCAConfig { swarmSpecCAConfigSigningCaCert, ..} ) <$> f swarmSpecCAConfigSigningCaCert +{-# INLINE swarmSpecCAConfigSigningCaCertL #-} + +-- | 'swarmSpecCAConfigSigningCaKey' Lens +swarmSpecCAConfigSigningCaKeyL :: Lens_' SwarmSpecCAConfig (Maybe Text) +swarmSpecCAConfigSigningCaKeyL f SwarmSpecCAConfig{..} = (\swarmSpecCAConfigSigningCaKey -> SwarmSpecCAConfig { swarmSpecCAConfigSigningCaKey, ..} ) <$> f swarmSpecCAConfigSigningCaKey +{-# INLINE swarmSpecCAConfigSigningCaKeyL #-} + +-- | 'swarmSpecCAConfigForceRotate' Lens +swarmSpecCAConfigForceRotateL :: Lens_' SwarmSpecCAConfig (Maybe Int) +swarmSpecCAConfigForceRotateL f SwarmSpecCAConfig{..} = (\swarmSpecCAConfigForceRotate -> SwarmSpecCAConfig { swarmSpecCAConfigForceRotate, ..} ) <$> f swarmSpecCAConfigForceRotate +{-# INLINE swarmSpecCAConfigForceRotateL #-} + + + +-- * SwarmSpecCAConfigExternalCAsInner + +-- | 'swarmSpecCAConfigExternalCAsInnerProtocol' Lens +swarmSpecCAConfigExternalCAsInnerProtocolL :: Lens_' SwarmSpecCAConfigExternalCAsInner (Maybe E'Protocol) +swarmSpecCAConfigExternalCAsInnerProtocolL f SwarmSpecCAConfigExternalCAsInner{..} = (\swarmSpecCAConfigExternalCAsInnerProtocol -> SwarmSpecCAConfigExternalCAsInner { swarmSpecCAConfigExternalCAsInnerProtocol, ..} ) <$> f swarmSpecCAConfigExternalCAsInnerProtocol +{-# INLINE swarmSpecCAConfigExternalCAsInnerProtocolL #-} + +-- | 'swarmSpecCAConfigExternalCAsInnerUrl' Lens +swarmSpecCAConfigExternalCAsInnerUrlL :: Lens_' SwarmSpecCAConfigExternalCAsInner (Maybe Text) +swarmSpecCAConfigExternalCAsInnerUrlL f SwarmSpecCAConfigExternalCAsInner{..} = (\swarmSpecCAConfigExternalCAsInnerUrl -> SwarmSpecCAConfigExternalCAsInner { swarmSpecCAConfigExternalCAsInnerUrl, ..} ) <$> f swarmSpecCAConfigExternalCAsInnerUrl +{-# INLINE swarmSpecCAConfigExternalCAsInnerUrlL #-} + +-- | 'swarmSpecCAConfigExternalCAsInnerOptions' Lens +swarmSpecCAConfigExternalCAsInnerOptionsL :: Lens_' SwarmSpecCAConfigExternalCAsInner (Maybe (Map.Map String Text)) +swarmSpecCAConfigExternalCAsInnerOptionsL f SwarmSpecCAConfigExternalCAsInner{..} = (\swarmSpecCAConfigExternalCAsInnerOptions -> SwarmSpecCAConfigExternalCAsInner { swarmSpecCAConfigExternalCAsInnerOptions, ..} ) <$> f swarmSpecCAConfigExternalCAsInnerOptions +{-# INLINE swarmSpecCAConfigExternalCAsInnerOptionsL #-} + +-- | 'swarmSpecCAConfigExternalCAsInnerCaCert' Lens +swarmSpecCAConfigExternalCAsInnerCaCertL :: Lens_' SwarmSpecCAConfigExternalCAsInner (Maybe Text) +swarmSpecCAConfigExternalCAsInnerCaCertL f SwarmSpecCAConfigExternalCAsInner{..} = (\swarmSpecCAConfigExternalCAsInnerCaCert -> SwarmSpecCAConfigExternalCAsInner { swarmSpecCAConfigExternalCAsInnerCaCert, ..} ) <$> f swarmSpecCAConfigExternalCAsInnerCaCert +{-# INLINE swarmSpecCAConfigExternalCAsInnerCaCertL #-} + + + +-- * SwarmSpecDispatcher + +-- | 'swarmSpecDispatcherHeartbeatPeriod' Lens +swarmSpecDispatcherHeartbeatPeriodL :: Lens_' SwarmSpecDispatcher (Maybe Integer) +swarmSpecDispatcherHeartbeatPeriodL f SwarmSpecDispatcher{..} = (\swarmSpecDispatcherHeartbeatPeriod -> SwarmSpecDispatcher { swarmSpecDispatcherHeartbeatPeriod, ..} ) <$> f swarmSpecDispatcherHeartbeatPeriod +{-# INLINE swarmSpecDispatcherHeartbeatPeriodL #-} + + + +-- * SwarmSpecEncryptionConfig + +-- | 'swarmSpecEncryptionConfigAutoLockManagers' Lens +swarmSpecEncryptionConfigAutoLockManagersL :: Lens_' SwarmSpecEncryptionConfig (Maybe Bool) +swarmSpecEncryptionConfigAutoLockManagersL f SwarmSpecEncryptionConfig{..} = (\swarmSpecEncryptionConfigAutoLockManagers -> SwarmSpecEncryptionConfig { swarmSpecEncryptionConfigAutoLockManagers, ..} ) <$> f swarmSpecEncryptionConfigAutoLockManagers +{-# INLINE swarmSpecEncryptionConfigAutoLockManagersL #-} + + + +-- * SwarmSpecOrchestration + +-- | 'swarmSpecOrchestrationTaskHistoryRetentionLimit' Lens +swarmSpecOrchestrationTaskHistoryRetentionLimitL :: Lens_' SwarmSpecOrchestration (Maybe Integer) +swarmSpecOrchestrationTaskHistoryRetentionLimitL f SwarmSpecOrchestration{..} = (\swarmSpecOrchestrationTaskHistoryRetentionLimit -> SwarmSpecOrchestration { swarmSpecOrchestrationTaskHistoryRetentionLimit, ..} ) <$> f swarmSpecOrchestrationTaskHistoryRetentionLimit +{-# INLINE swarmSpecOrchestrationTaskHistoryRetentionLimitL #-} + + + +-- * SwarmSpecRaft + +-- | 'swarmSpecRaftSnapshotInterval' Lens +swarmSpecRaftSnapshotIntervalL :: Lens_' SwarmSpecRaft (Maybe Int) +swarmSpecRaftSnapshotIntervalL f SwarmSpecRaft{..} = (\swarmSpecRaftSnapshotInterval -> SwarmSpecRaft { swarmSpecRaftSnapshotInterval, ..} ) <$> f swarmSpecRaftSnapshotInterval +{-# INLINE swarmSpecRaftSnapshotIntervalL #-} + +-- | 'swarmSpecRaftKeepOldSnapshots' Lens +swarmSpecRaftKeepOldSnapshotsL :: Lens_' SwarmSpecRaft (Maybe Int) +swarmSpecRaftKeepOldSnapshotsL f SwarmSpecRaft{..} = (\swarmSpecRaftKeepOldSnapshots -> SwarmSpecRaft { swarmSpecRaftKeepOldSnapshots, ..} ) <$> f swarmSpecRaftKeepOldSnapshots +{-# INLINE swarmSpecRaftKeepOldSnapshotsL #-} + +-- | 'swarmSpecRaftLogEntriesForSlowFollowers' Lens +swarmSpecRaftLogEntriesForSlowFollowersL :: Lens_' SwarmSpecRaft (Maybe Int) +swarmSpecRaftLogEntriesForSlowFollowersL f SwarmSpecRaft{..} = (\swarmSpecRaftLogEntriesForSlowFollowers -> SwarmSpecRaft { swarmSpecRaftLogEntriesForSlowFollowers, ..} ) <$> f swarmSpecRaftLogEntriesForSlowFollowers +{-# INLINE swarmSpecRaftLogEntriesForSlowFollowersL #-} + +-- | 'swarmSpecRaftElectionTick' Lens +swarmSpecRaftElectionTickL :: Lens_' SwarmSpecRaft (Maybe Int) +swarmSpecRaftElectionTickL f SwarmSpecRaft{..} = (\swarmSpecRaftElectionTick -> SwarmSpecRaft { swarmSpecRaftElectionTick, ..} ) <$> f swarmSpecRaftElectionTick +{-# INLINE swarmSpecRaftElectionTickL #-} + +-- | 'swarmSpecRaftHeartbeatTick' Lens +swarmSpecRaftHeartbeatTickL :: Lens_' SwarmSpecRaft (Maybe Int) +swarmSpecRaftHeartbeatTickL f SwarmSpecRaft{..} = (\swarmSpecRaftHeartbeatTick -> SwarmSpecRaft { swarmSpecRaftHeartbeatTick, ..} ) <$> f swarmSpecRaftHeartbeatTick +{-# INLINE swarmSpecRaftHeartbeatTickL #-} + + + +-- * SwarmSpecTaskDefaults + +-- | 'swarmSpecTaskDefaultsLogDriver' Lens +swarmSpecTaskDefaultsLogDriverL :: Lens_' SwarmSpecTaskDefaults (Maybe SwarmSpecTaskDefaultsLogDriver) +swarmSpecTaskDefaultsLogDriverL f SwarmSpecTaskDefaults{..} = (\swarmSpecTaskDefaultsLogDriver -> SwarmSpecTaskDefaults { swarmSpecTaskDefaultsLogDriver, ..} ) <$> f swarmSpecTaskDefaultsLogDriver +{-# INLINE swarmSpecTaskDefaultsLogDriverL #-} + + + +-- * SwarmSpecTaskDefaultsLogDriver + +-- | 'swarmSpecTaskDefaultsLogDriverName' Lens +swarmSpecTaskDefaultsLogDriverNameL :: Lens_' SwarmSpecTaskDefaultsLogDriver (Maybe Text) +swarmSpecTaskDefaultsLogDriverNameL f SwarmSpecTaskDefaultsLogDriver{..} = (\swarmSpecTaskDefaultsLogDriverName -> SwarmSpecTaskDefaultsLogDriver { swarmSpecTaskDefaultsLogDriverName, ..} ) <$> f swarmSpecTaskDefaultsLogDriverName +{-# INLINE swarmSpecTaskDefaultsLogDriverNameL #-} + +-- | 'swarmSpecTaskDefaultsLogDriverOptions' Lens +swarmSpecTaskDefaultsLogDriverOptionsL :: Lens_' SwarmSpecTaskDefaultsLogDriver (Maybe (Map.Map String Text)) +swarmSpecTaskDefaultsLogDriverOptionsL f SwarmSpecTaskDefaultsLogDriver{..} = (\swarmSpecTaskDefaultsLogDriverOptions -> SwarmSpecTaskDefaultsLogDriver { swarmSpecTaskDefaultsLogDriverOptions, ..} ) <$> f swarmSpecTaskDefaultsLogDriverOptions +{-# INLINE swarmSpecTaskDefaultsLogDriverOptionsL #-} + + + +-- * SwarmUnlockRequest + +-- | 'swarmUnlockRequestUnlockKey' Lens +swarmUnlockRequestUnlockKeyL :: Lens_' SwarmUnlockRequest (Maybe Text) +swarmUnlockRequestUnlockKeyL f SwarmUnlockRequest{..} = (\swarmUnlockRequestUnlockKey -> SwarmUnlockRequest { swarmUnlockRequestUnlockKey, ..} ) <$> f swarmUnlockRequestUnlockKey +{-# INLINE swarmUnlockRequestUnlockKeyL #-} + + + +-- * SystemAuthResponse + +-- | 'systemAuthResponseStatus' Lens +systemAuthResponseStatusL :: Lens_' SystemAuthResponse (Text) +systemAuthResponseStatusL f SystemAuthResponse{..} = (\systemAuthResponseStatus -> SystemAuthResponse { systemAuthResponseStatus, ..} ) <$> f systemAuthResponseStatus +{-# INLINE systemAuthResponseStatusL #-} + +-- | 'systemAuthResponseIdentityToken' Lens +systemAuthResponseIdentityTokenL :: Lens_' SystemAuthResponse (Maybe Text) +systemAuthResponseIdentityTokenL f SystemAuthResponse{..} = (\systemAuthResponseIdentityToken -> SystemAuthResponse { systemAuthResponseIdentityToken, ..} ) <$> f systemAuthResponseIdentityToken +{-# INLINE systemAuthResponseIdentityTokenL #-} + + + +-- * SystemDataUsageResponse + +-- | 'systemDataUsageResponseLayersSize' Lens +systemDataUsageResponseLayersSizeL :: Lens_' SystemDataUsageResponse (Maybe Integer) +systemDataUsageResponseLayersSizeL f SystemDataUsageResponse{..} = (\systemDataUsageResponseLayersSize -> SystemDataUsageResponse { systemDataUsageResponseLayersSize, ..} ) <$> f systemDataUsageResponseLayersSize +{-# INLINE systemDataUsageResponseLayersSizeL #-} + +-- | 'systemDataUsageResponseImages' Lens +systemDataUsageResponseImagesL :: Lens_' SystemDataUsageResponse (Maybe [ImageSummary]) +systemDataUsageResponseImagesL f SystemDataUsageResponse{..} = (\systemDataUsageResponseImages -> SystemDataUsageResponse { systemDataUsageResponseImages, ..} ) <$> f systemDataUsageResponseImages +{-# INLINE systemDataUsageResponseImagesL #-} + +-- | 'systemDataUsageResponseContainers' Lens +systemDataUsageResponseContainersL :: Lens_' SystemDataUsageResponse (Maybe [ContainerSummary]) +systemDataUsageResponseContainersL f SystemDataUsageResponse{..} = (\systemDataUsageResponseContainers -> SystemDataUsageResponse { systemDataUsageResponseContainers, ..} ) <$> f systemDataUsageResponseContainers +{-# INLINE systemDataUsageResponseContainersL #-} + +-- | 'systemDataUsageResponseVolumes' Lens +systemDataUsageResponseVolumesL :: Lens_' SystemDataUsageResponse (Maybe [Volume]) +systemDataUsageResponseVolumesL f SystemDataUsageResponse{..} = (\systemDataUsageResponseVolumes -> SystemDataUsageResponse { systemDataUsageResponseVolumes, ..} ) <$> f systemDataUsageResponseVolumes +{-# INLINE systemDataUsageResponseVolumesL #-} + +-- | 'systemDataUsageResponseBuildCache' Lens +systemDataUsageResponseBuildCacheL :: Lens_' SystemDataUsageResponse (Maybe [BuildCache]) +systemDataUsageResponseBuildCacheL f SystemDataUsageResponse{..} = (\systemDataUsageResponseBuildCache -> SystemDataUsageResponse { systemDataUsageResponseBuildCache, ..} ) <$> f systemDataUsageResponseBuildCache +{-# INLINE systemDataUsageResponseBuildCacheL #-} + + + +-- * SystemInfo + +-- | 'systemInfoId' Lens +systemInfoIdL :: Lens_' SystemInfo (Maybe Text) +systemInfoIdL f SystemInfo{..} = (\systemInfoId -> SystemInfo { systemInfoId, ..} ) <$> f systemInfoId +{-# INLINE systemInfoIdL #-} + +-- | 'systemInfoContainers' Lens +systemInfoContainersL :: Lens_' SystemInfo (Maybe Int) +systemInfoContainersL f SystemInfo{..} = (\systemInfoContainers -> SystemInfo { systemInfoContainers, ..} ) <$> f systemInfoContainers +{-# INLINE systemInfoContainersL #-} + +-- | 'systemInfoContainersRunning' Lens +systemInfoContainersRunningL :: Lens_' SystemInfo (Maybe Int) +systemInfoContainersRunningL f SystemInfo{..} = (\systemInfoContainersRunning -> SystemInfo { systemInfoContainersRunning, ..} ) <$> f systemInfoContainersRunning +{-# INLINE systemInfoContainersRunningL #-} + +-- | 'systemInfoContainersPaused' Lens +systemInfoContainersPausedL :: Lens_' SystemInfo (Maybe Int) +systemInfoContainersPausedL f SystemInfo{..} = (\systemInfoContainersPaused -> SystemInfo { systemInfoContainersPaused, ..} ) <$> f systemInfoContainersPaused +{-# INLINE systemInfoContainersPausedL #-} + +-- | 'systemInfoContainersStopped' Lens +systemInfoContainersStoppedL :: Lens_' SystemInfo (Maybe Int) +systemInfoContainersStoppedL f SystemInfo{..} = (\systemInfoContainersStopped -> SystemInfo { systemInfoContainersStopped, ..} ) <$> f systemInfoContainersStopped +{-# INLINE systemInfoContainersStoppedL #-} + +-- | 'systemInfoImages' Lens +systemInfoImagesL :: Lens_' SystemInfo (Maybe Int) +systemInfoImagesL f SystemInfo{..} = (\systemInfoImages -> SystemInfo { systemInfoImages, ..} ) <$> f systemInfoImages +{-# INLINE systemInfoImagesL #-} + +-- | 'systemInfoDriver' Lens +systemInfoDriverL :: Lens_' SystemInfo (Maybe Text) +systemInfoDriverL f SystemInfo{..} = (\systemInfoDriver -> SystemInfo { systemInfoDriver, ..} ) <$> f systemInfoDriver +{-# INLINE systemInfoDriverL #-} + +-- | 'systemInfoDriverStatus' Lens +systemInfoDriverStatusL :: Lens_' SystemInfo (Maybe [[Text]]) +systemInfoDriverStatusL f SystemInfo{..} = (\systemInfoDriverStatus -> SystemInfo { systemInfoDriverStatus, ..} ) <$> f systemInfoDriverStatus +{-# INLINE systemInfoDriverStatusL #-} + +-- | 'systemInfoDockerRootDir' Lens +systemInfoDockerRootDirL :: Lens_' SystemInfo (Maybe Text) +systemInfoDockerRootDirL f SystemInfo{..} = (\systemInfoDockerRootDir -> SystemInfo { systemInfoDockerRootDir, ..} ) <$> f systemInfoDockerRootDir +{-# INLINE systemInfoDockerRootDirL #-} + +-- | 'systemInfoPlugins' Lens +systemInfoPluginsL :: Lens_' SystemInfo (Maybe PluginsInfo) +systemInfoPluginsL f SystemInfo{..} = (\systemInfoPlugins -> SystemInfo { systemInfoPlugins, ..} ) <$> f systemInfoPlugins +{-# INLINE systemInfoPluginsL #-} + +-- | 'systemInfoMemoryLimit' Lens +systemInfoMemoryLimitL :: Lens_' SystemInfo (Maybe Bool) +systemInfoMemoryLimitL f SystemInfo{..} = (\systemInfoMemoryLimit -> SystemInfo { systemInfoMemoryLimit, ..} ) <$> f systemInfoMemoryLimit +{-# INLINE systemInfoMemoryLimitL #-} + +-- | 'systemInfoSwapLimit' Lens +systemInfoSwapLimitL :: Lens_' SystemInfo (Maybe Bool) +systemInfoSwapLimitL f SystemInfo{..} = (\systemInfoSwapLimit -> SystemInfo { systemInfoSwapLimit, ..} ) <$> f systemInfoSwapLimit +{-# INLINE systemInfoSwapLimitL #-} + +-- | 'systemInfoKernelMemoryTcp' Lens +systemInfoKernelMemoryTcpL :: Lens_' SystemInfo (Maybe Bool) +systemInfoKernelMemoryTcpL f SystemInfo{..} = (\systemInfoKernelMemoryTcp -> SystemInfo { systemInfoKernelMemoryTcp, ..} ) <$> f systemInfoKernelMemoryTcp +{-# INLINE systemInfoKernelMemoryTcpL #-} + +-- | 'systemInfoCpuCfsPeriod' Lens +systemInfoCpuCfsPeriodL :: Lens_' SystemInfo (Maybe Bool) +systemInfoCpuCfsPeriodL f SystemInfo{..} = (\systemInfoCpuCfsPeriod -> SystemInfo { systemInfoCpuCfsPeriod, ..} ) <$> f systemInfoCpuCfsPeriod +{-# INLINE systemInfoCpuCfsPeriodL #-} + +-- | 'systemInfoCpuCfsQuota' Lens +systemInfoCpuCfsQuotaL :: Lens_' SystemInfo (Maybe Bool) +systemInfoCpuCfsQuotaL f SystemInfo{..} = (\systemInfoCpuCfsQuota -> SystemInfo { systemInfoCpuCfsQuota, ..} ) <$> f systemInfoCpuCfsQuota +{-# INLINE systemInfoCpuCfsQuotaL #-} + +-- | 'systemInfoCpuShares' Lens +systemInfoCpuSharesL :: Lens_' SystemInfo (Maybe Bool) +systemInfoCpuSharesL f SystemInfo{..} = (\systemInfoCpuShares -> SystemInfo { systemInfoCpuShares, ..} ) <$> f systemInfoCpuShares +{-# INLINE systemInfoCpuSharesL #-} + +-- | 'systemInfoCpuSet' Lens +systemInfoCpuSetL :: Lens_' SystemInfo (Maybe Bool) +systemInfoCpuSetL f SystemInfo{..} = (\systemInfoCpuSet -> SystemInfo { systemInfoCpuSet, ..} ) <$> f systemInfoCpuSet +{-# INLINE systemInfoCpuSetL #-} + +-- | 'systemInfoPidsLimit' Lens +systemInfoPidsLimitL :: Lens_' SystemInfo (Maybe Bool) +systemInfoPidsLimitL f SystemInfo{..} = (\systemInfoPidsLimit -> SystemInfo { systemInfoPidsLimit, ..} ) <$> f systemInfoPidsLimit +{-# INLINE systemInfoPidsLimitL #-} + +-- | 'systemInfoOomKillDisable' Lens +systemInfoOomKillDisableL :: Lens_' SystemInfo (Maybe Bool) +systemInfoOomKillDisableL f SystemInfo{..} = (\systemInfoOomKillDisable -> SystemInfo { systemInfoOomKillDisable, ..} ) <$> f systemInfoOomKillDisable +{-# INLINE systemInfoOomKillDisableL #-} + +-- | 'systemInfoIpv4Forwarding' Lens +systemInfoIpv4ForwardingL :: Lens_' SystemInfo (Maybe Bool) +systemInfoIpv4ForwardingL f SystemInfo{..} = (\systemInfoIpv4Forwarding -> SystemInfo { systemInfoIpv4Forwarding, ..} ) <$> f systemInfoIpv4Forwarding +{-# INLINE systemInfoIpv4ForwardingL #-} + +-- | 'systemInfoBridgeNfIptables' Lens +systemInfoBridgeNfIptablesL :: Lens_' SystemInfo (Maybe Bool) +systemInfoBridgeNfIptablesL f SystemInfo{..} = (\systemInfoBridgeNfIptables -> SystemInfo { systemInfoBridgeNfIptables, ..} ) <$> f systemInfoBridgeNfIptables +{-# INLINE systemInfoBridgeNfIptablesL #-} + +-- | 'systemInfoBridgeNfIp6tables' Lens +systemInfoBridgeNfIp6tablesL :: Lens_' SystemInfo (Maybe Bool) +systemInfoBridgeNfIp6tablesL f SystemInfo{..} = (\systemInfoBridgeNfIp6tables -> SystemInfo { systemInfoBridgeNfIp6tables, ..} ) <$> f systemInfoBridgeNfIp6tables +{-# INLINE systemInfoBridgeNfIp6tablesL #-} + +-- | 'systemInfoDebug' Lens +systemInfoDebugL :: Lens_' SystemInfo (Maybe Bool) +systemInfoDebugL f SystemInfo{..} = (\systemInfoDebug -> SystemInfo { systemInfoDebug, ..} ) <$> f systemInfoDebug +{-# INLINE systemInfoDebugL #-} + +-- | 'systemInfoNfd' Lens +systemInfoNfdL :: Lens_' SystemInfo (Maybe Int) +systemInfoNfdL f SystemInfo{..} = (\systemInfoNfd -> SystemInfo { systemInfoNfd, ..} ) <$> f systemInfoNfd +{-# INLINE systemInfoNfdL #-} + +-- | 'systemInfoNGoroutines' Lens +systemInfoNGoroutinesL :: Lens_' SystemInfo (Maybe Int) +systemInfoNGoroutinesL f SystemInfo{..} = (\systemInfoNGoroutines -> SystemInfo { systemInfoNGoroutines, ..} ) <$> f systemInfoNGoroutines +{-# INLINE systemInfoNGoroutinesL #-} + +-- | 'systemInfoSystemTime' Lens +systemInfoSystemTimeL :: Lens_' SystemInfo (Maybe Text) +systemInfoSystemTimeL f SystemInfo{..} = (\systemInfoSystemTime -> SystemInfo { systemInfoSystemTime, ..} ) <$> f systemInfoSystemTime +{-# INLINE systemInfoSystemTimeL #-} + +-- | 'systemInfoLoggingDriver' Lens +systemInfoLoggingDriverL :: Lens_' SystemInfo (Maybe Text) +systemInfoLoggingDriverL f SystemInfo{..} = (\systemInfoLoggingDriver -> SystemInfo { systemInfoLoggingDriver, ..} ) <$> f systemInfoLoggingDriver +{-# INLINE systemInfoLoggingDriverL #-} + +-- | 'systemInfoCgroupDriver' Lens +systemInfoCgroupDriverL :: Lens_' SystemInfo (Maybe E'CgroupDriver) +systemInfoCgroupDriverL f SystemInfo{..} = (\systemInfoCgroupDriver -> SystemInfo { systemInfoCgroupDriver, ..} ) <$> f systemInfoCgroupDriver +{-# INLINE systemInfoCgroupDriverL #-} + +-- | 'systemInfoCgroupVersion' Lens +systemInfoCgroupVersionL :: Lens_' SystemInfo (Maybe E'CgroupVersion) +systemInfoCgroupVersionL f SystemInfo{..} = (\systemInfoCgroupVersion -> SystemInfo { systemInfoCgroupVersion, ..} ) <$> f systemInfoCgroupVersion +{-# INLINE systemInfoCgroupVersionL #-} + +-- | 'systemInfoNEventsListener' Lens +systemInfoNEventsListenerL :: Lens_' SystemInfo (Maybe Int) +systemInfoNEventsListenerL f SystemInfo{..} = (\systemInfoNEventsListener -> SystemInfo { systemInfoNEventsListener, ..} ) <$> f systemInfoNEventsListener +{-# INLINE systemInfoNEventsListenerL #-} + +-- | 'systemInfoKernelVersion' Lens +systemInfoKernelVersionL :: Lens_' SystemInfo (Maybe Text) +systemInfoKernelVersionL f SystemInfo{..} = (\systemInfoKernelVersion -> SystemInfo { systemInfoKernelVersion, ..} ) <$> f systemInfoKernelVersion +{-# INLINE systemInfoKernelVersionL #-} + +-- | 'systemInfoOperatingSystem' Lens +systemInfoOperatingSystemL :: Lens_' SystemInfo (Maybe Text) +systemInfoOperatingSystemL f SystemInfo{..} = (\systemInfoOperatingSystem -> SystemInfo { systemInfoOperatingSystem, ..} ) <$> f systemInfoOperatingSystem +{-# INLINE systemInfoOperatingSystemL #-} + +-- | 'systemInfoOsVersion' Lens +systemInfoOsVersionL :: Lens_' SystemInfo (Maybe Text) +systemInfoOsVersionL f SystemInfo{..} = (\systemInfoOsVersion -> SystemInfo { systemInfoOsVersion, ..} ) <$> f systemInfoOsVersion +{-# INLINE systemInfoOsVersionL #-} + +-- | 'systemInfoOsType' Lens +systemInfoOsTypeL :: Lens_' SystemInfo (Maybe Text) +systemInfoOsTypeL f SystemInfo{..} = (\systemInfoOsType -> SystemInfo { systemInfoOsType, ..} ) <$> f systemInfoOsType +{-# INLINE systemInfoOsTypeL #-} + +-- | 'systemInfoArchitecture' Lens +systemInfoArchitectureL :: Lens_' SystemInfo (Maybe Text) +systemInfoArchitectureL f SystemInfo{..} = (\systemInfoArchitecture -> SystemInfo { systemInfoArchitecture, ..} ) <$> f systemInfoArchitecture +{-# INLINE systemInfoArchitectureL #-} + +-- | 'systemInfoNcpu' Lens +systemInfoNcpuL :: Lens_' SystemInfo (Maybe Int) +systemInfoNcpuL f SystemInfo{..} = (\systemInfoNcpu -> SystemInfo { systemInfoNcpu, ..} ) <$> f systemInfoNcpu +{-# INLINE systemInfoNcpuL #-} + +-- | 'systemInfoMemTotal' Lens +systemInfoMemTotalL :: Lens_' SystemInfo (Maybe Integer) +systemInfoMemTotalL f SystemInfo{..} = (\systemInfoMemTotal -> SystemInfo { systemInfoMemTotal, ..} ) <$> f systemInfoMemTotal +{-# INLINE systemInfoMemTotalL #-} + +-- | 'systemInfoIndexServerAddress' Lens +systemInfoIndexServerAddressL :: Lens_' SystemInfo (Maybe Text) +systemInfoIndexServerAddressL f SystemInfo{..} = (\systemInfoIndexServerAddress -> SystemInfo { systemInfoIndexServerAddress, ..} ) <$> f systemInfoIndexServerAddress +{-# INLINE systemInfoIndexServerAddressL #-} + +-- | 'systemInfoRegistryConfig' Lens +systemInfoRegistryConfigL :: Lens_' SystemInfo (Maybe RegistryServiceConfig) +systemInfoRegistryConfigL f SystemInfo{..} = (\systemInfoRegistryConfig -> SystemInfo { systemInfoRegistryConfig, ..} ) <$> f systemInfoRegistryConfig +{-# INLINE systemInfoRegistryConfigL #-} + +-- | 'systemInfoGenericResources' Lens +systemInfoGenericResourcesL :: Lens_' SystemInfo (Maybe [GenericResourcesInner]) +systemInfoGenericResourcesL f SystemInfo{..} = (\systemInfoGenericResources -> SystemInfo { systemInfoGenericResources, ..} ) <$> f systemInfoGenericResources +{-# INLINE systemInfoGenericResourcesL #-} + +-- | 'systemInfoHttpProxy' Lens +systemInfoHttpProxyL :: Lens_' SystemInfo (Maybe Text) +systemInfoHttpProxyL f SystemInfo{..} = (\systemInfoHttpProxy -> SystemInfo { systemInfoHttpProxy, ..} ) <$> f systemInfoHttpProxy +{-# INLINE systemInfoHttpProxyL #-} + +-- | 'systemInfoHttpsProxy' Lens +systemInfoHttpsProxyL :: Lens_' SystemInfo (Maybe Text) +systemInfoHttpsProxyL f SystemInfo{..} = (\systemInfoHttpsProxy -> SystemInfo { systemInfoHttpsProxy, ..} ) <$> f systemInfoHttpsProxy +{-# INLINE systemInfoHttpsProxyL #-} + +-- | 'systemInfoNoProxy' Lens +systemInfoNoProxyL :: Lens_' SystemInfo (Maybe Text) +systemInfoNoProxyL f SystemInfo{..} = (\systemInfoNoProxy -> SystemInfo { systemInfoNoProxy, ..} ) <$> f systemInfoNoProxy +{-# INLINE systemInfoNoProxyL #-} + +-- | 'systemInfoName' Lens +systemInfoNameL :: Lens_' SystemInfo (Maybe Text) +systemInfoNameL f SystemInfo{..} = (\systemInfoName -> SystemInfo { systemInfoName, ..} ) <$> f systemInfoName +{-# INLINE systemInfoNameL #-} + +-- | 'systemInfoLabels' Lens +systemInfoLabelsL :: Lens_' SystemInfo (Maybe [Text]) +systemInfoLabelsL f SystemInfo{..} = (\systemInfoLabels -> SystemInfo { systemInfoLabels, ..} ) <$> f systemInfoLabels +{-# INLINE systemInfoLabelsL #-} + +-- | 'systemInfoExperimentalBuild' Lens +systemInfoExperimentalBuildL :: Lens_' SystemInfo (Maybe Bool) +systemInfoExperimentalBuildL f SystemInfo{..} = (\systemInfoExperimentalBuild -> SystemInfo { systemInfoExperimentalBuild, ..} ) <$> f systemInfoExperimentalBuild +{-# INLINE systemInfoExperimentalBuildL #-} + +-- | 'systemInfoServerVersion' Lens +systemInfoServerVersionL :: Lens_' SystemInfo (Maybe Text) +systemInfoServerVersionL f SystemInfo{..} = (\systemInfoServerVersion -> SystemInfo { systemInfoServerVersion, ..} ) <$> f systemInfoServerVersion +{-# INLINE systemInfoServerVersionL #-} + +-- | 'systemInfoRuntimes' Lens +systemInfoRuntimesL :: Lens_' SystemInfo (Maybe (Map.Map String Runtime)) +systemInfoRuntimesL f SystemInfo{..} = (\systemInfoRuntimes -> SystemInfo { systemInfoRuntimes, ..} ) <$> f systemInfoRuntimes +{-# INLINE systemInfoRuntimesL #-} + +-- | 'systemInfoDefaultRuntime' Lens +systemInfoDefaultRuntimeL :: Lens_' SystemInfo (Maybe Text) +systemInfoDefaultRuntimeL f SystemInfo{..} = (\systemInfoDefaultRuntime -> SystemInfo { systemInfoDefaultRuntime, ..} ) <$> f systemInfoDefaultRuntime +{-# INLINE systemInfoDefaultRuntimeL #-} + +-- | 'systemInfoSwarm' Lens +systemInfoSwarmL :: Lens_' SystemInfo (Maybe SwarmInfo) +systemInfoSwarmL f SystemInfo{..} = (\systemInfoSwarm -> SystemInfo { systemInfoSwarm, ..} ) <$> f systemInfoSwarm +{-# INLINE systemInfoSwarmL #-} + +-- | 'systemInfoLiveRestoreEnabled' Lens +systemInfoLiveRestoreEnabledL :: Lens_' SystemInfo (Maybe Bool) +systemInfoLiveRestoreEnabledL f SystemInfo{..} = (\systemInfoLiveRestoreEnabled -> SystemInfo { systemInfoLiveRestoreEnabled, ..} ) <$> f systemInfoLiveRestoreEnabled +{-# INLINE systemInfoLiveRestoreEnabledL #-} + +-- | 'systemInfoIsolation' Lens +systemInfoIsolationL :: Lens_' SystemInfo (Maybe E'Isolation2) +systemInfoIsolationL f SystemInfo{..} = (\systemInfoIsolation -> SystemInfo { systemInfoIsolation, ..} ) <$> f systemInfoIsolation +{-# INLINE systemInfoIsolationL #-} + +-- | 'systemInfoInitBinary' Lens +systemInfoInitBinaryL :: Lens_' SystemInfo (Maybe Text) +systemInfoInitBinaryL f SystemInfo{..} = (\systemInfoInitBinary -> SystemInfo { systemInfoInitBinary, ..} ) <$> f systemInfoInitBinary +{-# INLINE systemInfoInitBinaryL #-} + +-- | 'systemInfoContainerdCommit' Lens +systemInfoContainerdCommitL :: Lens_' SystemInfo (Maybe Commit) +systemInfoContainerdCommitL f SystemInfo{..} = (\systemInfoContainerdCommit -> SystemInfo { systemInfoContainerdCommit, ..} ) <$> f systemInfoContainerdCommit +{-# INLINE systemInfoContainerdCommitL #-} + +-- | 'systemInfoRuncCommit' Lens +systemInfoRuncCommitL :: Lens_' SystemInfo (Maybe Commit) +systemInfoRuncCommitL f SystemInfo{..} = (\systemInfoRuncCommit -> SystemInfo { systemInfoRuncCommit, ..} ) <$> f systemInfoRuncCommit +{-# INLINE systemInfoRuncCommitL #-} + +-- | 'systemInfoInitCommit' Lens +systemInfoInitCommitL :: Lens_' SystemInfo (Maybe Commit) +systemInfoInitCommitL f SystemInfo{..} = (\systemInfoInitCommit -> SystemInfo { systemInfoInitCommit, ..} ) <$> f systemInfoInitCommit +{-# INLINE systemInfoInitCommitL #-} + +-- | 'systemInfoSecurityOptions' Lens +systemInfoSecurityOptionsL :: Lens_' SystemInfo (Maybe [Text]) +systemInfoSecurityOptionsL f SystemInfo{..} = (\systemInfoSecurityOptions -> SystemInfo { systemInfoSecurityOptions, ..} ) <$> f systemInfoSecurityOptions +{-# INLINE systemInfoSecurityOptionsL #-} + +-- | 'systemInfoProductLicense' Lens +systemInfoProductLicenseL :: Lens_' SystemInfo (Maybe Text) +systemInfoProductLicenseL f SystemInfo{..} = (\systemInfoProductLicense -> SystemInfo { systemInfoProductLicense, ..} ) <$> f systemInfoProductLicense +{-# INLINE systemInfoProductLicenseL #-} + +-- | 'systemInfoDefaultAddressPools' Lens +systemInfoDefaultAddressPoolsL :: Lens_' SystemInfo (Maybe [SystemInfoDefaultAddressPoolsInner]) +systemInfoDefaultAddressPoolsL f SystemInfo{..} = (\systemInfoDefaultAddressPools -> SystemInfo { systemInfoDefaultAddressPools, ..} ) <$> f systemInfoDefaultAddressPools +{-# INLINE systemInfoDefaultAddressPoolsL #-} + +-- | 'systemInfoWarnings' Lens +systemInfoWarningsL :: Lens_' SystemInfo (Maybe [Text]) +systemInfoWarningsL f SystemInfo{..} = (\systemInfoWarnings -> SystemInfo { systemInfoWarnings, ..} ) <$> f systemInfoWarnings +{-# INLINE systemInfoWarningsL #-} + +-- | 'systemInfoCdiSpecDirs' Lens +systemInfoCdiSpecDirsL :: Lens_' SystemInfo (Maybe [Text]) +systemInfoCdiSpecDirsL f SystemInfo{..} = (\systemInfoCdiSpecDirs -> SystemInfo { systemInfoCdiSpecDirs, ..} ) <$> f systemInfoCdiSpecDirs +{-# INLINE systemInfoCdiSpecDirsL #-} + + + +-- * SystemInfoDefaultAddressPoolsInner + +-- | 'systemInfoDefaultAddressPoolsInnerBase' Lens +systemInfoDefaultAddressPoolsInnerBaseL :: Lens_' SystemInfoDefaultAddressPoolsInner (Maybe Text) +systemInfoDefaultAddressPoolsInnerBaseL f SystemInfoDefaultAddressPoolsInner{..} = (\systemInfoDefaultAddressPoolsInnerBase -> SystemInfoDefaultAddressPoolsInner { systemInfoDefaultAddressPoolsInnerBase, ..} ) <$> f systemInfoDefaultAddressPoolsInnerBase +{-# INLINE systemInfoDefaultAddressPoolsInnerBaseL #-} + +-- | 'systemInfoDefaultAddressPoolsInnerSize' Lens +systemInfoDefaultAddressPoolsInnerSizeL :: Lens_' SystemInfoDefaultAddressPoolsInner (Maybe Int) +systemInfoDefaultAddressPoolsInnerSizeL f SystemInfoDefaultAddressPoolsInner{..} = (\systemInfoDefaultAddressPoolsInnerSize -> SystemInfoDefaultAddressPoolsInner { systemInfoDefaultAddressPoolsInnerSize, ..} ) <$> f systemInfoDefaultAddressPoolsInnerSize +{-# INLINE systemInfoDefaultAddressPoolsInnerSizeL #-} + + + +-- * SystemVersion + +-- | 'systemVersionPlatform' Lens +systemVersionPlatformL :: Lens_' SystemVersion (Maybe SystemVersionPlatform) +systemVersionPlatformL f SystemVersion{..} = (\systemVersionPlatform -> SystemVersion { systemVersionPlatform, ..} ) <$> f systemVersionPlatform +{-# INLINE systemVersionPlatformL #-} + +-- | 'systemVersionComponents' Lens +systemVersionComponentsL :: Lens_' SystemVersion (Maybe [SystemVersionComponentsInner]) +systemVersionComponentsL f SystemVersion{..} = (\systemVersionComponents -> SystemVersion { systemVersionComponents, ..} ) <$> f systemVersionComponents +{-# INLINE systemVersionComponentsL #-} + +-- | 'systemVersionVersion' Lens +systemVersionVersionL :: Lens_' SystemVersion (Maybe Text) +systemVersionVersionL f SystemVersion{..} = (\systemVersionVersion -> SystemVersion { systemVersionVersion, ..} ) <$> f systemVersionVersion +{-# INLINE systemVersionVersionL #-} + +-- | 'systemVersionApiVersion' Lens +systemVersionApiVersionL :: Lens_' SystemVersion (Maybe Text) +systemVersionApiVersionL f SystemVersion{..} = (\systemVersionApiVersion -> SystemVersion { systemVersionApiVersion, ..} ) <$> f systemVersionApiVersion +{-# INLINE systemVersionApiVersionL #-} + +-- | 'systemVersionMinApiVersion' Lens +systemVersionMinApiVersionL :: Lens_' SystemVersion (Maybe Text) +systemVersionMinApiVersionL f SystemVersion{..} = (\systemVersionMinApiVersion -> SystemVersion { systemVersionMinApiVersion, ..} ) <$> f systemVersionMinApiVersion +{-# INLINE systemVersionMinApiVersionL #-} + +-- | 'systemVersionGitCommit' Lens +systemVersionGitCommitL :: Lens_' SystemVersion (Maybe Text) +systemVersionGitCommitL f SystemVersion{..} = (\systemVersionGitCommit -> SystemVersion { systemVersionGitCommit, ..} ) <$> f systemVersionGitCommit +{-# INLINE systemVersionGitCommitL #-} + +-- | 'systemVersionGoVersion' Lens +systemVersionGoVersionL :: Lens_' SystemVersion (Maybe Text) +systemVersionGoVersionL f SystemVersion{..} = (\systemVersionGoVersion -> SystemVersion { systemVersionGoVersion, ..} ) <$> f systemVersionGoVersion +{-# INLINE systemVersionGoVersionL #-} + +-- | 'systemVersionOs' Lens +systemVersionOsL :: Lens_' SystemVersion (Maybe Text) +systemVersionOsL f SystemVersion{..} = (\systemVersionOs -> SystemVersion { systemVersionOs, ..} ) <$> f systemVersionOs +{-# INLINE systemVersionOsL #-} + +-- | 'systemVersionArch' Lens +systemVersionArchL :: Lens_' SystemVersion (Maybe Text) +systemVersionArchL f SystemVersion{..} = (\systemVersionArch -> SystemVersion { systemVersionArch, ..} ) <$> f systemVersionArch +{-# INLINE systemVersionArchL #-} + +-- | 'systemVersionKernelVersion' Lens +systemVersionKernelVersionL :: Lens_' SystemVersion (Maybe Text) +systemVersionKernelVersionL f SystemVersion{..} = (\systemVersionKernelVersion -> SystemVersion { systemVersionKernelVersion, ..} ) <$> f systemVersionKernelVersion +{-# INLINE systemVersionKernelVersionL #-} + +-- | 'systemVersionExperimental' Lens +systemVersionExperimentalL :: Lens_' SystemVersion (Maybe Bool) +systemVersionExperimentalL f SystemVersion{..} = (\systemVersionExperimental -> SystemVersion { systemVersionExperimental, ..} ) <$> f systemVersionExperimental +{-# INLINE systemVersionExperimentalL #-} + +-- | 'systemVersionBuildTime' Lens +systemVersionBuildTimeL :: Lens_' SystemVersion (Maybe Text) +systemVersionBuildTimeL f SystemVersion{..} = (\systemVersionBuildTime -> SystemVersion { systemVersionBuildTime, ..} ) <$> f systemVersionBuildTime +{-# INLINE systemVersionBuildTimeL #-} + + + +-- * SystemVersionComponentsInner + +-- | 'systemVersionComponentsInnerName' Lens +systemVersionComponentsInnerNameL :: Lens_' SystemVersionComponentsInner (Text) +systemVersionComponentsInnerNameL f SystemVersionComponentsInner{..} = (\systemVersionComponentsInnerName -> SystemVersionComponentsInner { systemVersionComponentsInnerName, ..} ) <$> f systemVersionComponentsInnerName +{-# INLINE systemVersionComponentsInnerNameL #-} + +-- | 'systemVersionComponentsInnerVersion' Lens +systemVersionComponentsInnerVersionL :: Lens_' SystemVersionComponentsInner (Text) +systemVersionComponentsInnerVersionL f SystemVersionComponentsInner{..} = (\systemVersionComponentsInnerVersion -> SystemVersionComponentsInner { systemVersionComponentsInnerVersion, ..} ) <$> f systemVersionComponentsInnerVersion +{-# INLINE systemVersionComponentsInnerVersionL #-} + +-- | 'systemVersionComponentsInnerDetails' Lens +systemVersionComponentsInnerDetailsL :: Lens_' SystemVersionComponentsInner (Maybe A.Value) +systemVersionComponentsInnerDetailsL f SystemVersionComponentsInner{..} = (\systemVersionComponentsInnerDetails -> SystemVersionComponentsInner { systemVersionComponentsInnerDetails, ..} ) <$> f systemVersionComponentsInnerDetails +{-# INLINE systemVersionComponentsInnerDetailsL #-} + + + +-- * SystemVersionPlatform + +-- | 'systemVersionPlatformName' Lens +systemVersionPlatformNameL :: Lens_' SystemVersionPlatform (Text) +systemVersionPlatformNameL f SystemVersionPlatform{..} = (\systemVersionPlatformName -> SystemVersionPlatform { systemVersionPlatformName, ..} ) <$> f systemVersionPlatformName +{-# INLINE systemVersionPlatformNameL #-} + + + +-- * TLSInfo + +-- | 'tLSInfoTrustRoot' Lens +tLSInfoTrustRootL :: Lens_' TLSInfo (Maybe Text) +tLSInfoTrustRootL f TLSInfo{..} = (\tLSInfoTrustRoot -> TLSInfo { tLSInfoTrustRoot, ..} ) <$> f tLSInfoTrustRoot +{-# INLINE tLSInfoTrustRootL #-} + +-- | 'tLSInfoCertIssuerSubject' Lens +tLSInfoCertIssuerSubjectL :: Lens_' TLSInfo (Maybe Text) +tLSInfoCertIssuerSubjectL f TLSInfo{..} = (\tLSInfoCertIssuerSubject -> TLSInfo { tLSInfoCertIssuerSubject, ..} ) <$> f tLSInfoCertIssuerSubject +{-# INLINE tLSInfoCertIssuerSubjectL #-} + +-- | 'tLSInfoCertIssuerPublicKey' Lens +tLSInfoCertIssuerPublicKeyL :: Lens_' TLSInfo (Maybe Text) +tLSInfoCertIssuerPublicKeyL f TLSInfo{..} = (\tLSInfoCertIssuerPublicKey -> TLSInfo { tLSInfoCertIssuerPublicKey, ..} ) <$> f tLSInfoCertIssuerPublicKey +{-# INLINE tLSInfoCertIssuerPublicKeyL #-} + + + +-- * Task + +-- | 'taskId' Lens +taskIdL :: Lens_' Task (Maybe Text) +taskIdL f Task{..} = (\taskId -> Task { taskId, ..} ) <$> f taskId +{-# INLINE taskIdL #-} + +-- | 'taskVersion' Lens +taskVersionL :: Lens_' Task (Maybe ObjectVersion) +taskVersionL f Task{..} = (\taskVersion -> Task { taskVersion, ..} ) <$> f taskVersion +{-# INLINE taskVersionL #-} + +-- | 'taskCreatedAt' Lens +taskCreatedAtL :: Lens_' Task (Maybe Text) +taskCreatedAtL f Task{..} = (\taskCreatedAt -> Task { taskCreatedAt, ..} ) <$> f taskCreatedAt +{-# INLINE taskCreatedAtL #-} + +-- | 'taskUpdatedAt' Lens +taskUpdatedAtL :: Lens_' Task (Maybe Text) +taskUpdatedAtL f Task{..} = (\taskUpdatedAt -> Task { taskUpdatedAt, ..} ) <$> f taskUpdatedAt +{-# INLINE taskUpdatedAtL #-} + +-- | 'taskName' Lens +taskNameL :: Lens_' Task (Maybe Text) +taskNameL f Task{..} = (\taskName -> Task { taskName, ..} ) <$> f taskName +{-# INLINE taskNameL #-} + +-- | 'taskLabels' Lens +taskLabelsL :: Lens_' Task (Maybe (Map.Map String Text)) +taskLabelsL f Task{..} = (\taskLabels -> Task { taskLabels, ..} ) <$> f taskLabels +{-# INLINE taskLabelsL #-} + +-- | 'taskSpec' Lens +taskSpecL :: Lens_' Task (Maybe TaskSpec) +taskSpecL f Task{..} = (\taskSpec -> Task { taskSpec, ..} ) <$> f taskSpec +{-# INLINE taskSpecL #-} + +-- | 'taskServiceId' Lens +taskServiceIdL :: Lens_' Task (Maybe Text) +taskServiceIdL f Task{..} = (\taskServiceId -> Task { taskServiceId, ..} ) <$> f taskServiceId +{-# INLINE taskServiceIdL #-} + +-- | 'taskSlot' Lens +taskSlotL :: Lens_' Task (Maybe Int) +taskSlotL f Task{..} = (\taskSlot -> Task { taskSlot, ..} ) <$> f taskSlot +{-# INLINE taskSlotL #-} + +-- | 'taskNodeId' Lens +taskNodeIdL :: Lens_' Task (Maybe Text) +taskNodeIdL f Task{..} = (\taskNodeId -> Task { taskNodeId, ..} ) <$> f taskNodeId +{-# INLINE taskNodeIdL #-} + +-- | 'taskAssignedGenericResources' Lens +taskAssignedGenericResourcesL :: Lens_' Task (Maybe [GenericResourcesInner]) +taskAssignedGenericResourcesL f Task{..} = (\taskAssignedGenericResources -> Task { taskAssignedGenericResources, ..} ) <$> f taskAssignedGenericResources +{-# INLINE taskAssignedGenericResourcesL #-} + +-- | 'taskStatus' Lens +taskStatusL :: Lens_' Task (Maybe TaskStatus) +taskStatusL f Task{..} = (\taskStatus -> Task { taskStatus, ..} ) <$> f taskStatus +{-# INLINE taskStatusL #-} + +-- | 'taskDesiredState' Lens +taskDesiredStateL :: Lens_' Task (Maybe TaskState) +taskDesiredStateL f Task{..} = (\taskDesiredState -> Task { taskDesiredState, ..} ) <$> f taskDesiredState +{-# INLINE taskDesiredStateL #-} + +-- | 'taskJobIteration' Lens +taskJobIterationL :: Lens_' Task (Maybe ObjectVersion) +taskJobIterationL f Task{..} = (\taskJobIteration -> Task { taskJobIteration, ..} ) <$> f taskJobIteration +{-# INLINE taskJobIterationL #-} + + + +-- * TaskSpec + +-- | 'taskSpecPluginSpec' Lens +taskSpecPluginSpecL :: Lens_' TaskSpec (Maybe TaskSpecPluginSpec) +taskSpecPluginSpecL f TaskSpec{..} = (\taskSpecPluginSpec -> TaskSpec { taskSpecPluginSpec, ..} ) <$> f taskSpecPluginSpec +{-# INLINE taskSpecPluginSpecL #-} + +-- | 'taskSpecContainerSpec' Lens +taskSpecContainerSpecL :: Lens_' TaskSpec (Maybe TaskSpecContainerSpec) +taskSpecContainerSpecL f TaskSpec{..} = (\taskSpecContainerSpec -> TaskSpec { taskSpecContainerSpec, ..} ) <$> f taskSpecContainerSpec +{-# INLINE taskSpecContainerSpecL #-} + +-- | 'taskSpecNetworkAttachmentSpec' Lens +taskSpecNetworkAttachmentSpecL :: Lens_' TaskSpec (Maybe TaskSpecNetworkAttachmentSpec) +taskSpecNetworkAttachmentSpecL f TaskSpec{..} = (\taskSpecNetworkAttachmentSpec -> TaskSpec { taskSpecNetworkAttachmentSpec, ..} ) <$> f taskSpecNetworkAttachmentSpec +{-# INLINE taskSpecNetworkAttachmentSpecL #-} + +-- | 'taskSpecResources' Lens +taskSpecResourcesL :: Lens_' TaskSpec (Maybe TaskSpecResources) +taskSpecResourcesL f TaskSpec{..} = (\taskSpecResources -> TaskSpec { taskSpecResources, ..} ) <$> f taskSpecResources +{-# INLINE taskSpecResourcesL #-} + +-- | 'taskSpecRestartPolicy' Lens +taskSpecRestartPolicyL :: Lens_' TaskSpec (Maybe TaskSpecRestartPolicy) +taskSpecRestartPolicyL f TaskSpec{..} = (\taskSpecRestartPolicy -> TaskSpec { taskSpecRestartPolicy, ..} ) <$> f taskSpecRestartPolicy +{-# INLINE taskSpecRestartPolicyL #-} + +-- | 'taskSpecPlacement' Lens +taskSpecPlacementL :: Lens_' TaskSpec (Maybe TaskSpecPlacement) +taskSpecPlacementL f TaskSpec{..} = (\taskSpecPlacement -> TaskSpec { taskSpecPlacement, ..} ) <$> f taskSpecPlacement +{-# INLINE taskSpecPlacementL #-} + +-- | 'taskSpecForceUpdate' Lens +taskSpecForceUpdateL :: Lens_' TaskSpec (Maybe Int) +taskSpecForceUpdateL f TaskSpec{..} = (\taskSpecForceUpdate -> TaskSpec { taskSpecForceUpdate, ..} ) <$> f taskSpecForceUpdate +{-# INLINE taskSpecForceUpdateL #-} + +-- | 'taskSpecRuntime' Lens +taskSpecRuntimeL :: Lens_' TaskSpec (Maybe Text) +taskSpecRuntimeL f TaskSpec{..} = (\taskSpecRuntime -> TaskSpec { taskSpecRuntime, ..} ) <$> f taskSpecRuntime +{-# INLINE taskSpecRuntimeL #-} + +-- | 'taskSpecNetworks' Lens +taskSpecNetworksL :: Lens_' TaskSpec (Maybe [NetworkAttachmentConfig]) +taskSpecNetworksL f TaskSpec{..} = (\taskSpecNetworks -> TaskSpec { taskSpecNetworks, ..} ) <$> f taskSpecNetworks +{-# INLINE taskSpecNetworksL #-} + +-- | 'taskSpecLogDriver' Lens +taskSpecLogDriverL :: Lens_' TaskSpec (Maybe TaskSpecLogDriver) +taskSpecLogDriverL f TaskSpec{..} = (\taskSpecLogDriver -> TaskSpec { taskSpecLogDriver, ..} ) <$> f taskSpecLogDriver +{-# INLINE taskSpecLogDriverL #-} + + + +-- * TaskSpecContainerSpec + +-- | 'taskSpecContainerSpecImage' Lens +taskSpecContainerSpecImageL :: Lens_' TaskSpecContainerSpec (Maybe Text) +taskSpecContainerSpecImageL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecImage -> TaskSpecContainerSpec { taskSpecContainerSpecImage, ..} ) <$> f taskSpecContainerSpecImage +{-# INLINE taskSpecContainerSpecImageL #-} + +-- | 'taskSpecContainerSpecLabels' Lens +taskSpecContainerSpecLabelsL :: Lens_' TaskSpecContainerSpec (Maybe (Map.Map String Text)) +taskSpecContainerSpecLabelsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecLabels -> TaskSpecContainerSpec { taskSpecContainerSpecLabels, ..} ) <$> f taskSpecContainerSpecLabels +{-# INLINE taskSpecContainerSpecLabelsL #-} + +-- | 'taskSpecContainerSpecCommand' Lens +taskSpecContainerSpecCommandL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecCommandL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecCommand -> TaskSpecContainerSpec { taskSpecContainerSpecCommand, ..} ) <$> f taskSpecContainerSpecCommand +{-# INLINE taskSpecContainerSpecCommandL #-} + +-- | 'taskSpecContainerSpecArgs' Lens +taskSpecContainerSpecArgsL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecArgsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecArgs -> TaskSpecContainerSpec { taskSpecContainerSpecArgs, ..} ) <$> f taskSpecContainerSpecArgs +{-# INLINE taskSpecContainerSpecArgsL #-} + +-- | 'taskSpecContainerSpecHostname' Lens +taskSpecContainerSpecHostnameL :: Lens_' TaskSpecContainerSpec (Maybe Text) +taskSpecContainerSpecHostnameL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecHostname -> TaskSpecContainerSpec { taskSpecContainerSpecHostname, ..} ) <$> f taskSpecContainerSpecHostname +{-# INLINE taskSpecContainerSpecHostnameL #-} + +-- | 'taskSpecContainerSpecEnv' Lens +taskSpecContainerSpecEnvL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecEnvL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecEnv -> TaskSpecContainerSpec { taskSpecContainerSpecEnv, ..} ) <$> f taskSpecContainerSpecEnv +{-# INLINE taskSpecContainerSpecEnvL #-} + +-- | 'taskSpecContainerSpecDir' Lens +taskSpecContainerSpecDirL :: Lens_' TaskSpecContainerSpec (Maybe Text) +taskSpecContainerSpecDirL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecDir -> TaskSpecContainerSpec { taskSpecContainerSpecDir, ..} ) <$> f taskSpecContainerSpecDir +{-# INLINE taskSpecContainerSpecDirL #-} + +-- | 'taskSpecContainerSpecUser' Lens +taskSpecContainerSpecUserL :: Lens_' TaskSpecContainerSpec (Maybe Text) +taskSpecContainerSpecUserL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecUser -> TaskSpecContainerSpec { taskSpecContainerSpecUser, ..} ) <$> f taskSpecContainerSpecUser +{-# INLINE taskSpecContainerSpecUserL #-} + +-- | 'taskSpecContainerSpecGroups' Lens +taskSpecContainerSpecGroupsL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecGroupsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecGroups -> TaskSpecContainerSpec { taskSpecContainerSpecGroups, ..} ) <$> f taskSpecContainerSpecGroups +{-# INLINE taskSpecContainerSpecGroupsL #-} + +-- | 'taskSpecContainerSpecPrivileges' Lens +taskSpecContainerSpecPrivilegesL :: Lens_' TaskSpecContainerSpec (Maybe TaskSpecContainerSpecPrivileges) +taskSpecContainerSpecPrivilegesL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecPrivileges -> TaskSpecContainerSpec { taskSpecContainerSpecPrivileges, ..} ) <$> f taskSpecContainerSpecPrivileges +{-# INLINE taskSpecContainerSpecPrivilegesL #-} + +-- | 'taskSpecContainerSpecTty' Lens +taskSpecContainerSpecTtyL :: Lens_' TaskSpecContainerSpec (Maybe Bool) +taskSpecContainerSpecTtyL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecTty -> TaskSpecContainerSpec { taskSpecContainerSpecTty, ..} ) <$> f taskSpecContainerSpecTty +{-# INLINE taskSpecContainerSpecTtyL #-} + +-- | 'taskSpecContainerSpecOpenStdin' Lens +taskSpecContainerSpecOpenStdinL :: Lens_' TaskSpecContainerSpec (Maybe Bool) +taskSpecContainerSpecOpenStdinL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecOpenStdin -> TaskSpecContainerSpec { taskSpecContainerSpecOpenStdin, ..} ) <$> f taskSpecContainerSpecOpenStdin +{-# INLINE taskSpecContainerSpecOpenStdinL #-} + +-- | 'taskSpecContainerSpecReadOnly' Lens +taskSpecContainerSpecReadOnlyL :: Lens_' TaskSpecContainerSpec (Maybe Bool) +taskSpecContainerSpecReadOnlyL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecReadOnly -> TaskSpecContainerSpec { taskSpecContainerSpecReadOnly, ..} ) <$> f taskSpecContainerSpecReadOnly +{-# INLINE taskSpecContainerSpecReadOnlyL #-} + +-- | 'taskSpecContainerSpecMounts' Lens +taskSpecContainerSpecMountsL :: Lens_' TaskSpecContainerSpec (Maybe [Mount]) +taskSpecContainerSpecMountsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecMounts -> TaskSpecContainerSpec { taskSpecContainerSpecMounts, ..} ) <$> f taskSpecContainerSpecMounts +{-# INLINE taskSpecContainerSpecMountsL #-} + +-- | 'taskSpecContainerSpecStopSignal' Lens +taskSpecContainerSpecStopSignalL :: Lens_' TaskSpecContainerSpec (Maybe Text) +taskSpecContainerSpecStopSignalL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecStopSignal -> TaskSpecContainerSpec { taskSpecContainerSpecStopSignal, ..} ) <$> f taskSpecContainerSpecStopSignal +{-# INLINE taskSpecContainerSpecStopSignalL #-} + +-- | 'taskSpecContainerSpecStopGracePeriod' Lens +taskSpecContainerSpecStopGracePeriodL :: Lens_' TaskSpecContainerSpec (Maybe Integer) +taskSpecContainerSpecStopGracePeriodL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecStopGracePeriod -> TaskSpecContainerSpec { taskSpecContainerSpecStopGracePeriod, ..} ) <$> f taskSpecContainerSpecStopGracePeriod +{-# INLINE taskSpecContainerSpecStopGracePeriodL #-} + +-- | 'taskSpecContainerSpecHealthCheck' Lens +taskSpecContainerSpecHealthCheckL :: Lens_' TaskSpecContainerSpec (Maybe HealthConfig) +taskSpecContainerSpecHealthCheckL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecHealthCheck -> TaskSpecContainerSpec { taskSpecContainerSpecHealthCheck, ..} ) <$> f taskSpecContainerSpecHealthCheck +{-# INLINE taskSpecContainerSpecHealthCheckL #-} + +-- | 'taskSpecContainerSpecHosts' Lens +taskSpecContainerSpecHostsL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecHostsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecHosts -> TaskSpecContainerSpec { taskSpecContainerSpecHosts, ..} ) <$> f taskSpecContainerSpecHosts +{-# INLINE taskSpecContainerSpecHostsL #-} + +-- | 'taskSpecContainerSpecDnsConfig' Lens +taskSpecContainerSpecDnsConfigL :: Lens_' TaskSpecContainerSpec (Maybe TaskSpecContainerSpecDNSConfig) +taskSpecContainerSpecDnsConfigL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecDnsConfig -> TaskSpecContainerSpec { taskSpecContainerSpecDnsConfig, ..} ) <$> f taskSpecContainerSpecDnsConfig +{-# INLINE taskSpecContainerSpecDnsConfigL #-} + +-- | 'taskSpecContainerSpecSecrets' Lens +taskSpecContainerSpecSecretsL :: Lens_' TaskSpecContainerSpec (Maybe [TaskSpecContainerSpecSecretsInner]) +taskSpecContainerSpecSecretsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecSecrets -> TaskSpecContainerSpec { taskSpecContainerSpecSecrets, ..} ) <$> f taskSpecContainerSpecSecrets +{-# INLINE taskSpecContainerSpecSecretsL #-} + +-- | 'taskSpecContainerSpecConfigs' Lens +taskSpecContainerSpecConfigsL :: Lens_' TaskSpecContainerSpec (Maybe [TaskSpecContainerSpecConfigsInner]) +taskSpecContainerSpecConfigsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecConfigs -> TaskSpecContainerSpec { taskSpecContainerSpecConfigs, ..} ) <$> f taskSpecContainerSpecConfigs +{-# INLINE taskSpecContainerSpecConfigsL #-} + +-- | 'taskSpecContainerSpecIsolation' Lens +taskSpecContainerSpecIsolationL :: Lens_' TaskSpecContainerSpec (Maybe E'Isolation3) +taskSpecContainerSpecIsolationL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecIsolation -> TaskSpecContainerSpec { taskSpecContainerSpecIsolation, ..} ) <$> f taskSpecContainerSpecIsolation +{-# INLINE taskSpecContainerSpecIsolationL #-} + +-- | 'taskSpecContainerSpecInit' Lens +taskSpecContainerSpecInitL :: Lens_' TaskSpecContainerSpec (Maybe Bool) +taskSpecContainerSpecInitL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecInit -> TaskSpecContainerSpec { taskSpecContainerSpecInit, ..} ) <$> f taskSpecContainerSpecInit +{-# INLINE taskSpecContainerSpecInitL #-} + +-- | 'taskSpecContainerSpecSysctls' Lens +taskSpecContainerSpecSysctlsL :: Lens_' TaskSpecContainerSpec (Maybe (Map.Map String Text)) +taskSpecContainerSpecSysctlsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecSysctls -> TaskSpecContainerSpec { taskSpecContainerSpecSysctls, ..} ) <$> f taskSpecContainerSpecSysctls +{-# INLINE taskSpecContainerSpecSysctlsL #-} + +-- | 'taskSpecContainerSpecCapabilityAdd' Lens +taskSpecContainerSpecCapabilityAddL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecCapabilityAddL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecCapabilityAdd -> TaskSpecContainerSpec { taskSpecContainerSpecCapabilityAdd, ..} ) <$> f taskSpecContainerSpecCapabilityAdd +{-# INLINE taskSpecContainerSpecCapabilityAddL #-} + +-- | 'taskSpecContainerSpecCapabilityDrop' Lens +taskSpecContainerSpecCapabilityDropL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecCapabilityDropL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecCapabilityDrop -> TaskSpecContainerSpec { taskSpecContainerSpecCapabilityDrop, ..} ) <$> f taskSpecContainerSpecCapabilityDrop +{-# INLINE taskSpecContainerSpecCapabilityDropL #-} + +-- | 'taskSpecContainerSpecUlimits' Lens +taskSpecContainerSpecUlimitsL :: Lens_' TaskSpecContainerSpec (Maybe [ResourcesUlimitsInner]) +taskSpecContainerSpecUlimitsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecUlimits -> TaskSpecContainerSpec { taskSpecContainerSpecUlimits, ..} ) <$> f taskSpecContainerSpecUlimits +{-# INLINE taskSpecContainerSpecUlimitsL #-} + + + +-- * TaskSpecContainerSpecConfigsInner + +-- | 'taskSpecContainerSpecConfigsInnerFile' Lens +taskSpecContainerSpecConfigsInnerFileL :: Lens_' TaskSpecContainerSpecConfigsInner (Maybe TaskSpecContainerSpecConfigsInnerFile) +taskSpecContainerSpecConfigsInnerFileL f TaskSpecContainerSpecConfigsInner{..} = (\taskSpecContainerSpecConfigsInnerFile -> TaskSpecContainerSpecConfigsInner { taskSpecContainerSpecConfigsInnerFile, ..} ) <$> f taskSpecContainerSpecConfigsInnerFile +{-# INLINE taskSpecContainerSpecConfigsInnerFileL #-} + +-- | 'taskSpecContainerSpecConfigsInnerRuntime' Lens +taskSpecContainerSpecConfigsInnerRuntimeL :: Lens_' TaskSpecContainerSpecConfigsInner (Maybe A.Value) +taskSpecContainerSpecConfigsInnerRuntimeL f TaskSpecContainerSpecConfigsInner{..} = (\taskSpecContainerSpecConfigsInnerRuntime -> TaskSpecContainerSpecConfigsInner { taskSpecContainerSpecConfigsInnerRuntime, ..} ) <$> f taskSpecContainerSpecConfigsInnerRuntime +{-# INLINE taskSpecContainerSpecConfigsInnerRuntimeL #-} + +-- | 'taskSpecContainerSpecConfigsInnerConfigId' Lens +taskSpecContainerSpecConfigsInnerConfigIdL :: Lens_' TaskSpecContainerSpecConfigsInner (Maybe Text) +taskSpecContainerSpecConfigsInnerConfigIdL f TaskSpecContainerSpecConfigsInner{..} = (\taskSpecContainerSpecConfigsInnerConfigId -> TaskSpecContainerSpecConfigsInner { taskSpecContainerSpecConfigsInnerConfigId, ..} ) <$> f taskSpecContainerSpecConfigsInnerConfigId +{-# INLINE taskSpecContainerSpecConfigsInnerConfigIdL #-} + +-- | 'taskSpecContainerSpecConfigsInnerConfigName' Lens +taskSpecContainerSpecConfigsInnerConfigNameL :: Lens_' TaskSpecContainerSpecConfigsInner (Maybe Text) +taskSpecContainerSpecConfigsInnerConfigNameL f TaskSpecContainerSpecConfigsInner{..} = (\taskSpecContainerSpecConfigsInnerConfigName -> TaskSpecContainerSpecConfigsInner { taskSpecContainerSpecConfigsInnerConfigName, ..} ) <$> f taskSpecContainerSpecConfigsInnerConfigName +{-# INLINE taskSpecContainerSpecConfigsInnerConfigNameL #-} + + + +-- * TaskSpecContainerSpecConfigsInnerFile + +-- | 'taskSpecContainerSpecConfigsInnerFileName' Lens +taskSpecContainerSpecConfigsInnerFileNameL :: Lens_' TaskSpecContainerSpecConfigsInnerFile (Maybe Text) +taskSpecContainerSpecConfigsInnerFileNameL f TaskSpecContainerSpecConfigsInnerFile{..} = (\taskSpecContainerSpecConfigsInnerFileName -> TaskSpecContainerSpecConfigsInnerFile { taskSpecContainerSpecConfigsInnerFileName, ..} ) <$> f taskSpecContainerSpecConfigsInnerFileName +{-# INLINE taskSpecContainerSpecConfigsInnerFileNameL #-} + +-- | 'taskSpecContainerSpecConfigsInnerFileUid' Lens +taskSpecContainerSpecConfigsInnerFileUidL :: Lens_' TaskSpecContainerSpecConfigsInnerFile (Maybe Text) +taskSpecContainerSpecConfigsInnerFileUidL f TaskSpecContainerSpecConfigsInnerFile{..} = (\taskSpecContainerSpecConfigsInnerFileUid -> TaskSpecContainerSpecConfigsInnerFile { taskSpecContainerSpecConfigsInnerFileUid, ..} ) <$> f taskSpecContainerSpecConfigsInnerFileUid +{-# INLINE taskSpecContainerSpecConfigsInnerFileUidL #-} + +-- | 'taskSpecContainerSpecConfigsInnerFileGid' Lens +taskSpecContainerSpecConfigsInnerFileGidL :: Lens_' TaskSpecContainerSpecConfigsInnerFile (Maybe Text) +taskSpecContainerSpecConfigsInnerFileGidL f TaskSpecContainerSpecConfigsInnerFile{..} = (\taskSpecContainerSpecConfigsInnerFileGid -> TaskSpecContainerSpecConfigsInnerFile { taskSpecContainerSpecConfigsInnerFileGid, ..} ) <$> f taskSpecContainerSpecConfigsInnerFileGid +{-# INLINE taskSpecContainerSpecConfigsInnerFileGidL #-} + +-- | 'taskSpecContainerSpecConfigsInnerFileMode' Lens +taskSpecContainerSpecConfigsInnerFileModeL :: Lens_' TaskSpecContainerSpecConfigsInnerFile (Maybe Int) +taskSpecContainerSpecConfigsInnerFileModeL f TaskSpecContainerSpecConfigsInnerFile{..} = (\taskSpecContainerSpecConfigsInnerFileMode -> TaskSpecContainerSpecConfigsInnerFile { taskSpecContainerSpecConfigsInnerFileMode, ..} ) <$> f taskSpecContainerSpecConfigsInnerFileMode +{-# INLINE taskSpecContainerSpecConfigsInnerFileModeL #-} + + + +-- * TaskSpecContainerSpecDNSConfig + +-- | 'taskSpecContainerSpecDNSConfigNameservers' Lens +taskSpecContainerSpecDNSConfigNameserversL :: Lens_' TaskSpecContainerSpecDNSConfig (Maybe [Text]) +taskSpecContainerSpecDNSConfigNameserversL f TaskSpecContainerSpecDNSConfig{..} = (\taskSpecContainerSpecDNSConfigNameservers -> TaskSpecContainerSpecDNSConfig { taskSpecContainerSpecDNSConfigNameservers, ..} ) <$> f taskSpecContainerSpecDNSConfigNameservers +{-# INLINE taskSpecContainerSpecDNSConfigNameserversL #-} + +-- | 'taskSpecContainerSpecDNSConfigSearch' Lens +taskSpecContainerSpecDNSConfigSearchL :: Lens_' TaskSpecContainerSpecDNSConfig (Maybe [Text]) +taskSpecContainerSpecDNSConfigSearchL f TaskSpecContainerSpecDNSConfig{..} = (\taskSpecContainerSpecDNSConfigSearch -> TaskSpecContainerSpecDNSConfig { taskSpecContainerSpecDNSConfigSearch, ..} ) <$> f taskSpecContainerSpecDNSConfigSearch +{-# INLINE taskSpecContainerSpecDNSConfigSearchL #-} + +-- | 'taskSpecContainerSpecDNSConfigOptions' Lens +taskSpecContainerSpecDNSConfigOptionsL :: Lens_' TaskSpecContainerSpecDNSConfig (Maybe [Text]) +taskSpecContainerSpecDNSConfigOptionsL f TaskSpecContainerSpecDNSConfig{..} = (\taskSpecContainerSpecDNSConfigOptions -> TaskSpecContainerSpecDNSConfig { taskSpecContainerSpecDNSConfigOptions, ..} ) <$> f taskSpecContainerSpecDNSConfigOptions +{-# INLINE taskSpecContainerSpecDNSConfigOptionsL #-} + + + +-- * TaskSpecContainerSpecPrivileges + +-- | 'taskSpecContainerSpecPrivilegesCredentialSpec' Lens +taskSpecContainerSpecPrivilegesCredentialSpecL :: Lens_' TaskSpecContainerSpecPrivileges (Maybe TaskSpecContainerSpecPrivilegesCredentialSpec) +taskSpecContainerSpecPrivilegesCredentialSpecL f TaskSpecContainerSpecPrivileges{..} = (\taskSpecContainerSpecPrivilegesCredentialSpec -> TaskSpecContainerSpecPrivileges { taskSpecContainerSpecPrivilegesCredentialSpec, ..} ) <$> f taskSpecContainerSpecPrivilegesCredentialSpec +{-# INLINE taskSpecContainerSpecPrivilegesCredentialSpecL #-} + +-- | 'taskSpecContainerSpecPrivilegesSeLinuxContext' Lens +taskSpecContainerSpecPrivilegesSeLinuxContextL :: Lens_' TaskSpecContainerSpecPrivileges (Maybe TaskSpecContainerSpecPrivilegesSELinuxContext) +taskSpecContainerSpecPrivilegesSeLinuxContextL f TaskSpecContainerSpecPrivileges{..} = (\taskSpecContainerSpecPrivilegesSeLinuxContext -> TaskSpecContainerSpecPrivileges { taskSpecContainerSpecPrivilegesSeLinuxContext, ..} ) <$> f taskSpecContainerSpecPrivilegesSeLinuxContext +{-# INLINE taskSpecContainerSpecPrivilegesSeLinuxContextL #-} + +-- | 'taskSpecContainerSpecPrivilegesSeccomp' Lens +taskSpecContainerSpecPrivilegesSeccompL :: Lens_' TaskSpecContainerSpecPrivileges (Maybe TaskSpecContainerSpecPrivilegesSeccomp) +taskSpecContainerSpecPrivilegesSeccompL f TaskSpecContainerSpecPrivileges{..} = (\taskSpecContainerSpecPrivilegesSeccomp -> TaskSpecContainerSpecPrivileges { taskSpecContainerSpecPrivilegesSeccomp, ..} ) <$> f taskSpecContainerSpecPrivilegesSeccomp +{-# INLINE taskSpecContainerSpecPrivilegesSeccompL #-} + +-- | 'taskSpecContainerSpecPrivilegesAppArmor' Lens +taskSpecContainerSpecPrivilegesAppArmorL :: Lens_' TaskSpecContainerSpecPrivileges (Maybe TaskSpecContainerSpecPrivilegesAppArmor) +taskSpecContainerSpecPrivilegesAppArmorL f TaskSpecContainerSpecPrivileges{..} = (\taskSpecContainerSpecPrivilegesAppArmor -> TaskSpecContainerSpecPrivileges { taskSpecContainerSpecPrivilegesAppArmor, ..} ) <$> f taskSpecContainerSpecPrivilegesAppArmor +{-# INLINE taskSpecContainerSpecPrivilegesAppArmorL #-} + +-- | 'taskSpecContainerSpecPrivilegesNoNewPrivileges' Lens +taskSpecContainerSpecPrivilegesNoNewPrivilegesL :: Lens_' TaskSpecContainerSpecPrivileges (Maybe Bool) +taskSpecContainerSpecPrivilegesNoNewPrivilegesL f TaskSpecContainerSpecPrivileges{..} = (\taskSpecContainerSpecPrivilegesNoNewPrivileges -> TaskSpecContainerSpecPrivileges { taskSpecContainerSpecPrivilegesNoNewPrivileges, ..} ) <$> f taskSpecContainerSpecPrivilegesNoNewPrivileges +{-# INLINE taskSpecContainerSpecPrivilegesNoNewPrivilegesL #-} + + + +-- * TaskSpecContainerSpecPrivilegesAppArmor + +-- | 'taskSpecContainerSpecPrivilegesAppArmorMode' Lens +taskSpecContainerSpecPrivilegesAppArmorModeL :: Lens_' TaskSpecContainerSpecPrivilegesAppArmor (Maybe E'Mode3) +taskSpecContainerSpecPrivilegesAppArmorModeL f TaskSpecContainerSpecPrivilegesAppArmor{..} = (\taskSpecContainerSpecPrivilegesAppArmorMode -> TaskSpecContainerSpecPrivilegesAppArmor { taskSpecContainerSpecPrivilegesAppArmorMode, ..} ) <$> f taskSpecContainerSpecPrivilegesAppArmorMode +{-# INLINE taskSpecContainerSpecPrivilegesAppArmorModeL #-} + + + +-- * TaskSpecContainerSpecPrivilegesCredentialSpec + +-- | 'taskSpecContainerSpecPrivilegesCredentialSpecConfig' Lens +taskSpecContainerSpecPrivilegesCredentialSpecConfigL :: Lens_' TaskSpecContainerSpecPrivilegesCredentialSpec (Maybe Text) +taskSpecContainerSpecPrivilegesCredentialSpecConfigL f TaskSpecContainerSpecPrivilegesCredentialSpec{..} = (\taskSpecContainerSpecPrivilegesCredentialSpecConfig -> TaskSpecContainerSpecPrivilegesCredentialSpec { taskSpecContainerSpecPrivilegesCredentialSpecConfig, ..} ) <$> f taskSpecContainerSpecPrivilegesCredentialSpecConfig +{-# INLINE taskSpecContainerSpecPrivilegesCredentialSpecConfigL #-} + +-- | 'taskSpecContainerSpecPrivilegesCredentialSpecFile' Lens +taskSpecContainerSpecPrivilegesCredentialSpecFileL :: Lens_' TaskSpecContainerSpecPrivilegesCredentialSpec (Maybe Text) +taskSpecContainerSpecPrivilegesCredentialSpecFileL f TaskSpecContainerSpecPrivilegesCredentialSpec{..} = (\taskSpecContainerSpecPrivilegesCredentialSpecFile -> TaskSpecContainerSpecPrivilegesCredentialSpec { taskSpecContainerSpecPrivilegesCredentialSpecFile, ..} ) <$> f taskSpecContainerSpecPrivilegesCredentialSpecFile +{-# INLINE taskSpecContainerSpecPrivilegesCredentialSpecFileL #-} + +-- | 'taskSpecContainerSpecPrivilegesCredentialSpecRegistry' Lens +taskSpecContainerSpecPrivilegesCredentialSpecRegistryL :: Lens_' TaskSpecContainerSpecPrivilegesCredentialSpec (Maybe Text) +taskSpecContainerSpecPrivilegesCredentialSpecRegistryL f TaskSpecContainerSpecPrivilegesCredentialSpec{..} = (\taskSpecContainerSpecPrivilegesCredentialSpecRegistry -> TaskSpecContainerSpecPrivilegesCredentialSpec { taskSpecContainerSpecPrivilegesCredentialSpecRegistry, ..} ) <$> f taskSpecContainerSpecPrivilegesCredentialSpecRegistry +{-# INLINE taskSpecContainerSpecPrivilegesCredentialSpecRegistryL #-} + + + +-- * TaskSpecContainerSpecPrivilegesSELinuxContext + +-- | 'taskSpecContainerSpecPrivilegesSELinuxContextDisable' Lens +taskSpecContainerSpecPrivilegesSELinuxContextDisableL :: Lens_' TaskSpecContainerSpecPrivilegesSELinuxContext (Maybe Bool) +taskSpecContainerSpecPrivilegesSELinuxContextDisableL f TaskSpecContainerSpecPrivilegesSELinuxContext{..} = (\taskSpecContainerSpecPrivilegesSELinuxContextDisable -> TaskSpecContainerSpecPrivilegesSELinuxContext { taskSpecContainerSpecPrivilegesSELinuxContextDisable, ..} ) <$> f taskSpecContainerSpecPrivilegesSELinuxContextDisable +{-# INLINE taskSpecContainerSpecPrivilegesSELinuxContextDisableL #-} + +-- | 'taskSpecContainerSpecPrivilegesSELinuxContextUser' Lens +taskSpecContainerSpecPrivilegesSELinuxContextUserL :: Lens_' TaskSpecContainerSpecPrivilegesSELinuxContext (Maybe Text) +taskSpecContainerSpecPrivilegesSELinuxContextUserL f TaskSpecContainerSpecPrivilegesSELinuxContext{..} = (\taskSpecContainerSpecPrivilegesSELinuxContextUser -> TaskSpecContainerSpecPrivilegesSELinuxContext { taskSpecContainerSpecPrivilegesSELinuxContextUser, ..} ) <$> f taskSpecContainerSpecPrivilegesSELinuxContextUser +{-# INLINE taskSpecContainerSpecPrivilegesSELinuxContextUserL #-} + +-- | 'taskSpecContainerSpecPrivilegesSELinuxContextRole' Lens +taskSpecContainerSpecPrivilegesSELinuxContextRoleL :: Lens_' TaskSpecContainerSpecPrivilegesSELinuxContext (Maybe Text) +taskSpecContainerSpecPrivilegesSELinuxContextRoleL f TaskSpecContainerSpecPrivilegesSELinuxContext{..} = (\taskSpecContainerSpecPrivilegesSELinuxContextRole -> TaskSpecContainerSpecPrivilegesSELinuxContext { taskSpecContainerSpecPrivilegesSELinuxContextRole, ..} ) <$> f taskSpecContainerSpecPrivilegesSELinuxContextRole +{-# INLINE taskSpecContainerSpecPrivilegesSELinuxContextRoleL #-} + +-- | 'taskSpecContainerSpecPrivilegesSELinuxContextType' Lens +taskSpecContainerSpecPrivilegesSELinuxContextTypeL :: Lens_' TaskSpecContainerSpecPrivilegesSELinuxContext (Maybe Text) +taskSpecContainerSpecPrivilegesSELinuxContextTypeL f TaskSpecContainerSpecPrivilegesSELinuxContext{..} = (\taskSpecContainerSpecPrivilegesSELinuxContextType -> TaskSpecContainerSpecPrivilegesSELinuxContext { taskSpecContainerSpecPrivilegesSELinuxContextType, ..} ) <$> f taskSpecContainerSpecPrivilegesSELinuxContextType +{-# INLINE taskSpecContainerSpecPrivilegesSELinuxContextTypeL #-} + +-- | 'taskSpecContainerSpecPrivilegesSELinuxContextLevel' Lens +taskSpecContainerSpecPrivilegesSELinuxContextLevelL :: Lens_' TaskSpecContainerSpecPrivilegesSELinuxContext (Maybe Text) +taskSpecContainerSpecPrivilegesSELinuxContextLevelL f TaskSpecContainerSpecPrivilegesSELinuxContext{..} = (\taskSpecContainerSpecPrivilegesSELinuxContextLevel -> TaskSpecContainerSpecPrivilegesSELinuxContext { taskSpecContainerSpecPrivilegesSELinuxContextLevel, ..} ) <$> f taskSpecContainerSpecPrivilegesSELinuxContextLevel +{-# INLINE taskSpecContainerSpecPrivilegesSELinuxContextLevelL #-} + + + +-- * TaskSpecContainerSpecPrivilegesSeccomp + +-- | 'taskSpecContainerSpecPrivilegesSeccompMode' Lens +taskSpecContainerSpecPrivilegesSeccompModeL :: Lens_' TaskSpecContainerSpecPrivilegesSeccomp (Maybe E'Mode2) +taskSpecContainerSpecPrivilegesSeccompModeL f TaskSpecContainerSpecPrivilegesSeccomp{..} = (\taskSpecContainerSpecPrivilegesSeccompMode -> TaskSpecContainerSpecPrivilegesSeccomp { taskSpecContainerSpecPrivilegesSeccompMode, ..} ) <$> f taskSpecContainerSpecPrivilegesSeccompMode +{-# INLINE taskSpecContainerSpecPrivilegesSeccompModeL #-} + +-- | 'taskSpecContainerSpecPrivilegesSeccompProfile' Lens +taskSpecContainerSpecPrivilegesSeccompProfileL :: Lens_' TaskSpecContainerSpecPrivilegesSeccomp (Maybe Text) +taskSpecContainerSpecPrivilegesSeccompProfileL f TaskSpecContainerSpecPrivilegesSeccomp{..} = (\taskSpecContainerSpecPrivilegesSeccompProfile -> TaskSpecContainerSpecPrivilegesSeccomp { taskSpecContainerSpecPrivilegesSeccompProfile, ..} ) <$> f taskSpecContainerSpecPrivilegesSeccompProfile +{-# INLINE taskSpecContainerSpecPrivilegesSeccompProfileL #-} + + + +-- * TaskSpecContainerSpecSecretsInner + +-- | 'taskSpecContainerSpecSecretsInnerFile' Lens +taskSpecContainerSpecSecretsInnerFileL :: Lens_' TaskSpecContainerSpecSecretsInner (Maybe TaskSpecContainerSpecSecretsInnerFile) +taskSpecContainerSpecSecretsInnerFileL f TaskSpecContainerSpecSecretsInner{..} = (\taskSpecContainerSpecSecretsInnerFile -> TaskSpecContainerSpecSecretsInner { taskSpecContainerSpecSecretsInnerFile, ..} ) <$> f taskSpecContainerSpecSecretsInnerFile +{-# INLINE taskSpecContainerSpecSecretsInnerFileL #-} + +-- | 'taskSpecContainerSpecSecretsInnerSecretId' Lens +taskSpecContainerSpecSecretsInnerSecretIdL :: Lens_' TaskSpecContainerSpecSecretsInner (Maybe Text) +taskSpecContainerSpecSecretsInnerSecretIdL f TaskSpecContainerSpecSecretsInner{..} = (\taskSpecContainerSpecSecretsInnerSecretId -> TaskSpecContainerSpecSecretsInner { taskSpecContainerSpecSecretsInnerSecretId, ..} ) <$> f taskSpecContainerSpecSecretsInnerSecretId +{-# INLINE taskSpecContainerSpecSecretsInnerSecretIdL #-} + +-- | 'taskSpecContainerSpecSecretsInnerSecretName' Lens +taskSpecContainerSpecSecretsInnerSecretNameL :: Lens_' TaskSpecContainerSpecSecretsInner (Maybe Text) +taskSpecContainerSpecSecretsInnerSecretNameL f TaskSpecContainerSpecSecretsInner{..} = (\taskSpecContainerSpecSecretsInnerSecretName -> TaskSpecContainerSpecSecretsInner { taskSpecContainerSpecSecretsInnerSecretName, ..} ) <$> f taskSpecContainerSpecSecretsInnerSecretName +{-# INLINE taskSpecContainerSpecSecretsInnerSecretNameL #-} + + + +-- * TaskSpecContainerSpecSecretsInnerFile + +-- | 'taskSpecContainerSpecSecretsInnerFileName' Lens +taskSpecContainerSpecSecretsInnerFileNameL :: Lens_' TaskSpecContainerSpecSecretsInnerFile (Maybe Text) +taskSpecContainerSpecSecretsInnerFileNameL f TaskSpecContainerSpecSecretsInnerFile{..} = (\taskSpecContainerSpecSecretsInnerFileName -> TaskSpecContainerSpecSecretsInnerFile { taskSpecContainerSpecSecretsInnerFileName, ..} ) <$> f taskSpecContainerSpecSecretsInnerFileName +{-# INLINE taskSpecContainerSpecSecretsInnerFileNameL #-} + +-- | 'taskSpecContainerSpecSecretsInnerFileUid' Lens +taskSpecContainerSpecSecretsInnerFileUidL :: Lens_' TaskSpecContainerSpecSecretsInnerFile (Maybe Text) +taskSpecContainerSpecSecretsInnerFileUidL f TaskSpecContainerSpecSecretsInnerFile{..} = (\taskSpecContainerSpecSecretsInnerFileUid -> TaskSpecContainerSpecSecretsInnerFile { taskSpecContainerSpecSecretsInnerFileUid, ..} ) <$> f taskSpecContainerSpecSecretsInnerFileUid +{-# INLINE taskSpecContainerSpecSecretsInnerFileUidL #-} + +-- | 'taskSpecContainerSpecSecretsInnerFileGid' Lens +taskSpecContainerSpecSecretsInnerFileGidL :: Lens_' TaskSpecContainerSpecSecretsInnerFile (Maybe Text) +taskSpecContainerSpecSecretsInnerFileGidL f TaskSpecContainerSpecSecretsInnerFile{..} = (\taskSpecContainerSpecSecretsInnerFileGid -> TaskSpecContainerSpecSecretsInnerFile { taskSpecContainerSpecSecretsInnerFileGid, ..} ) <$> f taskSpecContainerSpecSecretsInnerFileGid +{-# INLINE taskSpecContainerSpecSecretsInnerFileGidL #-} + +-- | 'taskSpecContainerSpecSecretsInnerFileMode' Lens +taskSpecContainerSpecSecretsInnerFileModeL :: Lens_' TaskSpecContainerSpecSecretsInnerFile (Maybe Int) +taskSpecContainerSpecSecretsInnerFileModeL f TaskSpecContainerSpecSecretsInnerFile{..} = (\taskSpecContainerSpecSecretsInnerFileMode -> TaskSpecContainerSpecSecretsInnerFile { taskSpecContainerSpecSecretsInnerFileMode, ..} ) <$> f taskSpecContainerSpecSecretsInnerFileMode +{-# INLINE taskSpecContainerSpecSecretsInnerFileModeL #-} + + + +-- * TaskSpecLogDriver + +-- | 'taskSpecLogDriverName' Lens +taskSpecLogDriverNameL :: Lens_' TaskSpecLogDriver (Maybe Text) +taskSpecLogDriverNameL f TaskSpecLogDriver{..} = (\taskSpecLogDriverName -> TaskSpecLogDriver { taskSpecLogDriverName, ..} ) <$> f taskSpecLogDriverName +{-# INLINE taskSpecLogDriverNameL #-} + +-- | 'taskSpecLogDriverOptions' Lens +taskSpecLogDriverOptionsL :: Lens_' TaskSpecLogDriver (Maybe (Map.Map String Text)) +taskSpecLogDriverOptionsL f TaskSpecLogDriver{..} = (\taskSpecLogDriverOptions -> TaskSpecLogDriver { taskSpecLogDriverOptions, ..} ) <$> f taskSpecLogDriverOptions +{-# INLINE taskSpecLogDriverOptionsL #-} + + + +-- * TaskSpecNetworkAttachmentSpec + +-- | 'taskSpecNetworkAttachmentSpecContainerId' Lens +taskSpecNetworkAttachmentSpecContainerIdL :: Lens_' TaskSpecNetworkAttachmentSpec (Maybe Text) +taskSpecNetworkAttachmentSpecContainerIdL f TaskSpecNetworkAttachmentSpec{..} = (\taskSpecNetworkAttachmentSpecContainerId -> TaskSpecNetworkAttachmentSpec { taskSpecNetworkAttachmentSpecContainerId, ..} ) <$> f taskSpecNetworkAttachmentSpecContainerId +{-# INLINE taskSpecNetworkAttachmentSpecContainerIdL #-} + + + +-- * TaskSpecPlacement + +-- | 'taskSpecPlacementConstraints' Lens +taskSpecPlacementConstraintsL :: Lens_' TaskSpecPlacement (Maybe [Text]) +taskSpecPlacementConstraintsL f TaskSpecPlacement{..} = (\taskSpecPlacementConstraints -> TaskSpecPlacement { taskSpecPlacementConstraints, ..} ) <$> f taskSpecPlacementConstraints +{-# INLINE taskSpecPlacementConstraintsL #-} + +-- | 'taskSpecPlacementPreferences' Lens +taskSpecPlacementPreferencesL :: Lens_' TaskSpecPlacement (Maybe [TaskSpecPlacementPreferencesInner]) +taskSpecPlacementPreferencesL f TaskSpecPlacement{..} = (\taskSpecPlacementPreferences -> TaskSpecPlacement { taskSpecPlacementPreferences, ..} ) <$> f taskSpecPlacementPreferences +{-# INLINE taskSpecPlacementPreferencesL #-} + +-- | 'taskSpecPlacementMaxReplicas' Lens +taskSpecPlacementMaxReplicasL :: Lens_' TaskSpecPlacement (Maybe Integer) +taskSpecPlacementMaxReplicasL f TaskSpecPlacement{..} = (\taskSpecPlacementMaxReplicas -> TaskSpecPlacement { taskSpecPlacementMaxReplicas, ..} ) <$> f taskSpecPlacementMaxReplicas +{-# INLINE taskSpecPlacementMaxReplicasL #-} + +-- | 'taskSpecPlacementPlatforms' Lens +taskSpecPlacementPlatformsL :: Lens_' TaskSpecPlacement (Maybe [Platform]) +taskSpecPlacementPlatformsL f TaskSpecPlacement{..} = (\taskSpecPlacementPlatforms -> TaskSpecPlacement { taskSpecPlacementPlatforms, ..} ) <$> f taskSpecPlacementPlatforms +{-# INLINE taskSpecPlacementPlatformsL #-} + + + +-- * TaskSpecPlacementPreferencesInner + +-- | 'taskSpecPlacementPreferencesInnerSpread' Lens +taskSpecPlacementPreferencesInnerSpreadL :: Lens_' TaskSpecPlacementPreferencesInner (Maybe TaskSpecPlacementPreferencesInnerSpread) +taskSpecPlacementPreferencesInnerSpreadL f TaskSpecPlacementPreferencesInner{..} = (\taskSpecPlacementPreferencesInnerSpread -> TaskSpecPlacementPreferencesInner { taskSpecPlacementPreferencesInnerSpread, ..} ) <$> f taskSpecPlacementPreferencesInnerSpread +{-# INLINE taskSpecPlacementPreferencesInnerSpreadL #-} + + + +-- * TaskSpecPlacementPreferencesInnerSpread + +-- | 'taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor' Lens +taskSpecPlacementPreferencesInnerSpreadSpreadDescriptorL :: Lens_' TaskSpecPlacementPreferencesInnerSpread (Maybe Text) +taskSpecPlacementPreferencesInnerSpreadSpreadDescriptorL f TaskSpecPlacementPreferencesInnerSpread{..} = (\taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor -> TaskSpecPlacementPreferencesInnerSpread { taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor, ..} ) <$> f taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor +{-# INLINE taskSpecPlacementPreferencesInnerSpreadSpreadDescriptorL #-} + + + +-- * TaskSpecPluginSpec + +-- | 'taskSpecPluginSpecName' Lens +taskSpecPluginSpecNameL :: Lens_' TaskSpecPluginSpec (Maybe Text) +taskSpecPluginSpecNameL f TaskSpecPluginSpec{..} = (\taskSpecPluginSpecName -> TaskSpecPluginSpec { taskSpecPluginSpecName, ..} ) <$> f taskSpecPluginSpecName +{-# INLINE taskSpecPluginSpecNameL #-} + +-- | 'taskSpecPluginSpecRemote' Lens +taskSpecPluginSpecRemoteL :: Lens_' TaskSpecPluginSpec (Maybe Text) +taskSpecPluginSpecRemoteL f TaskSpecPluginSpec{..} = (\taskSpecPluginSpecRemote -> TaskSpecPluginSpec { taskSpecPluginSpecRemote, ..} ) <$> f taskSpecPluginSpecRemote +{-# INLINE taskSpecPluginSpecRemoteL #-} + +-- | 'taskSpecPluginSpecDisabled' Lens +taskSpecPluginSpecDisabledL :: Lens_' TaskSpecPluginSpec (Maybe Bool) +taskSpecPluginSpecDisabledL f TaskSpecPluginSpec{..} = (\taskSpecPluginSpecDisabled -> TaskSpecPluginSpec { taskSpecPluginSpecDisabled, ..} ) <$> f taskSpecPluginSpecDisabled +{-# INLINE taskSpecPluginSpecDisabledL #-} + +-- | 'taskSpecPluginSpecPluginPrivilege' Lens +taskSpecPluginSpecPluginPrivilegeL :: Lens_' TaskSpecPluginSpec (Maybe [PluginPrivilege]) +taskSpecPluginSpecPluginPrivilegeL f TaskSpecPluginSpec{..} = (\taskSpecPluginSpecPluginPrivilege -> TaskSpecPluginSpec { taskSpecPluginSpecPluginPrivilege, ..} ) <$> f taskSpecPluginSpecPluginPrivilege +{-# INLINE taskSpecPluginSpecPluginPrivilegeL #-} + + + +-- * TaskSpecResources + +-- | 'taskSpecResourcesLimits' Lens +taskSpecResourcesLimitsL :: Lens_' TaskSpecResources (Maybe Limit) +taskSpecResourcesLimitsL f TaskSpecResources{..} = (\taskSpecResourcesLimits -> TaskSpecResources { taskSpecResourcesLimits, ..} ) <$> f taskSpecResourcesLimits +{-# INLINE taskSpecResourcesLimitsL #-} + +-- | 'taskSpecResourcesReservations' Lens +taskSpecResourcesReservationsL :: Lens_' TaskSpecResources (Maybe ResourceObject) +taskSpecResourcesReservationsL f TaskSpecResources{..} = (\taskSpecResourcesReservations -> TaskSpecResources { taskSpecResourcesReservations, ..} ) <$> f taskSpecResourcesReservations +{-# INLINE taskSpecResourcesReservationsL #-} + + + +-- * TaskSpecRestartPolicy + +-- | 'taskSpecRestartPolicyCondition' Lens +taskSpecRestartPolicyConditionL :: Lens_' TaskSpecRestartPolicy (Maybe E'Condition) +taskSpecRestartPolicyConditionL f TaskSpecRestartPolicy{..} = (\taskSpecRestartPolicyCondition -> TaskSpecRestartPolicy { taskSpecRestartPolicyCondition, ..} ) <$> f taskSpecRestartPolicyCondition +{-# INLINE taskSpecRestartPolicyConditionL #-} + +-- | 'taskSpecRestartPolicyDelay' Lens +taskSpecRestartPolicyDelayL :: Lens_' TaskSpecRestartPolicy (Maybe Integer) +taskSpecRestartPolicyDelayL f TaskSpecRestartPolicy{..} = (\taskSpecRestartPolicyDelay -> TaskSpecRestartPolicy { taskSpecRestartPolicyDelay, ..} ) <$> f taskSpecRestartPolicyDelay +{-# INLINE taskSpecRestartPolicyDelayL #-} + +-- | 'taskSpecRestartPolicyMaxAttempts' Lens +taskSpecRestartPolicyMaxAttemptsL :: Lens_' TaskSpecRestartPolicy (Maybe Integer) +taskSpecRestartPolicyMaxAttemptsL f TaskSpecRestartPolicy{..} = (\taskSpecRestartPolicyMaxAttempts -> TaskSpecRestartPolicy { taskSpecRestartPolicyMaxAttempts, ..} ) <$> f taskSpecRestartPolicyMaxAttempts +{-# INLINE taskSpecRestartPolicyMaxAttemptsL #-} + +-- | 'taskSpecRestartPolicyWindow' Lens +taskSpecRestartPolicyWindowL :: Lens_' TaskSpecRestartPolicy (Maybe Integer) +taskSpecRestartPolicyWindowL f TaskSpecRestartPolicy{..} = (\taskSpecRestartPolicyWindow -> TaskSpecRestartPolicy { taskSpecRestartPolicyWindow, ..} ) <$> f taskSpecRestartPolicyWindow +{-# INLINE taskSpecRestartPolicyWindowL #-} + + + +-- * TaskState + + + +-- * TaskStatus + +-- | 'taskStatusTimestamp' Lens +taskStatusTimestampL :: Lens_' TaskStatus (Maybe Text) +taskStatusTimestampL f TaskStatus{..} = (\taskStatusTimestamp -> TaskStatus { taskStatusTimestamp, ..} ) <$> f taskStatusTimestamp +{-# INLINE taskStatusTimestampL #-} + +-- | 'taskStatusState' Lens +taskStatusStateL :: Lens_' TaskStatus (Maybe TaskState) +taskStatusStateL f TaskStatus{..} = (\taskStatusState -> TaskStatus { taskStatusState, ..} ) <$> f taskStatusState +{-# INLINE taskStatusStateL #-} + +-- | 'taskStatusMessage' Lens +taskStatusMessageL :: Lens_' TaskStatus (Maybe Text) +taskStatusMessageL f TaskStatus{..} = (\taskStatusMessage -> TaskStatus { taskStatusMessage, ..} ) <$> f taskStatusMessage +{-# INLINE taskStatusMessageL #-} + +-- | 'taskStatusErr' Lens +taskStatusErrL :: Lens_' TaskStatus (Maybe Text) +taskStatusErrL f TaskStatus{..} = (\taskStatusErr -> TaskStatus { taskStatusErr, ..} ) <$> f taskStatusErr +{-# INLINE taskStatusErrL #-} + +-- | 'taskStatusContainerStatus' Lens +taskStatusContainerStatusL :: Lens_' TaskStatus (Maybe ContainerStatus) +taskStatusContainerStatusL f TaskStatus{..} = (\taskStatusContainerStatus -> TaskStatus { taskStatusContainerStatus, ..} ) <$> f taskStatusContainerStatus +{-# INLINE taskStatusContainerStatusL #-} + +-- | 'taskStatusPortStatus' Lens +taskStatusPortStatusL :: Lens_' TaskStatus (Maybe PortStatus) +taskStatusPortStatusL f TaskStatus{..} = (\taskStatusPortStatus -> TaskStatus { taskStatusPortStatus, ..} ) <$> f taskStatusPortStatus +{-# INLINE taskStatusPortStatusL #-} + + + +-- * ThrottleDevice + +-- | 'throttleDevicePath' Lens +throttleDevicePathL :: Lens_' ThrottleDevice (Maybe Text) +throttleDevicePathL f ThrottleDevice{..} = (\throttleDevicePath -> ThrottleDevice { throttleDevicePath, ..} ) <$> f throttleDevicePath +{-# INLINE throttleDevicePathL #-} + +-- | 'throttleDeviceRate' Lens +throttleDeviceRateL :: Lens_' ThrottleDevice (Maybe Integer) +throttleDeviceRateL f ThrottleDevice{..} = (\throttleDeviceRate -> ThrottleDevice { throttleDeviceRate, ..} ) <$> f throttleDeviceRate +{-# INLINE throttleDeviceRateL #-} + + + +-- * UnlockKeyResponse + +-- | 'unlockKeyResponseUnlockKey' Lens +unlockKeyResponseUnlockKeyL :: Lens_' UnlockKeyResponse (Maybe Text) +unlockKeyResponseUnlockKeyL f UnlockKeyResponse{..} = (\unlockKeyResponseUnlockKey -> UnlockKeyResponse { unlockKeyResponseUnlockKey, ..} ) <$> f unlockKeyResponseUnlockKey +{-# INLINE unlockKeyResponseUnlockKeyL #-} + + + +-- * Volume + +-- | 'volumeName' Lens +volumeNameL :: Lens_' Volume (Text) +volumeNameL f Volume{..} = (\volumeName -> Volume { volumeName, ..} ) <$> f volumeName +{-# INLINE volumeNameL #-} + +-- | 'volumeDriver' Lens +volumeDriverL :: Lens_' Volume (Text) +volumeDriverL f Volume{..} = (\volumeDriver -> Volume { volumeDriver, ..} ) <$> f volumeDriver +{-# INLINE volumeDriverL #-} + +-- | 'volumeMountpoint' Lens +volumeMountpointL :: Lens_' Volume (Text) +volumeMountpointL f Volume{..} = (\volumeMountpoint -> Volume { volumeMountpoint, ..} ) <$> f volumeMountpoint +{-# INLINE volumeMountpointL #-} + +-- | 'volumeCreatedAt' Lens +volumeCreatedAtL :: Lens_' Volume (Maybe Text) +volumeCreatedAtL f Volume{..} = (\volumeCreatedAt -> Volume { volumeCreatedAt, ..} ) <$> f volumeCreatedAt +{-# INLINE volumeCreatedAtL #-} + +-- | 'volumeStatus' Lens +volumeStatusL :: Lens_' Volume (Maybe (Map.Map String A.Value)) +volumeStatusL f Volume{..} = (\volumeStatus -> Volume { volumeStatus, ..} ) <$> f volumeStatus +{-# INLINE volumeStatusL #-} + +-- | 'volumeLabels' Lens +volumeLabelsL :: Lens_' Volume ((Map.Map String Text)) +volumeLabelsL f Volume{..} = (\volumeLabels -> Volume { volumeLabels, ..} ) <$> f volumeLabels +{-# INLINE volumeLabelsL #-} + +-- | 'volumeScope' Lens +volumeScopeL :: Lens_' Volume (E'Scope) +volumeScopeL f Volume{..} = (\volumeScope -> Volume { volumeScope, ..} ) <$> f volumeScope +{-# INLINE volumeScopeL #-} + +-- | 'volumeClusterVolume' Lens +volumeClusterVolumeL :: Lens_' Volume (Maybe ClusterVolume) +volumeClusterVolumeL f Volume{..} = (\volumeClusterVolume -> Volume { volumeClusterVolume, ..} ) <$> f volumeClusterVolume +{-# INLINE volumeClusterVolumeL #-} + +-- | 'volumeOptions' Lens +volumeOptionsL :: Lens_' Volume ((Map.Map String Text)) +volumeOptionsL f Volume{..} = (\volumeOptions -> Volume { volumeOptions, ..} ) <$> f volumeOptions +{-# INLINE volumeOptionsL #-} + +-- | 'volumeUsageData' Lens +volumeUsageDataL :: Lens_' Volume (Maybe VolumeUsageData) +volumeUsageDataL f Volume{..} = (\volumeUsageData -> Volume { volumeUsageData, ..} ) <$> f volumeUsageData +{-# INLINE volumeUsageDataL #-} + + + +-- * VolumeCreateOptions + +-- | 'volumeCreateOptionsName' Lens +volumeCreateOptionsNameL :: Lens_' VolumeCreateOptions (Maybe Text) +volumeCreateOptionsNameL f VolumeCreateOptions{..} = (\volumeCreateOptionsName -> VolumeCreateOptions { volumeCreateOptionsName, ..} ) <$> f volumeCreateOptionsName +{-# INLINE volumeCreateOptionsNameL #-} + +-- | 'volumeCreateOptionsDriver' Lens +volumeCreateOptionsDriverL :: Lens_' VolumeCreateOptions (Maybe Text) +volumeCreateOptionsDriverL f VolumeCreateOptions{..} = (\volumeCreateOptionsDriver -> VolumeCreateOptions { volumeCreateOptionsDriver, ..} ) <$> f volumeCreateOptionsDriver +{-# INLINE volumeCreateOptionsDriverL #-} + +-- | 'volumeCreateOptionsDriverOpts' Lens +volumeCreateOptionsDriverOptsL :: Lens_' VolumeCreateOptions (Maybe (Map.Map String Text)) +volumeCreateOptionsDriverOptsL f VolumeCreateOptions{..} = (\volumeCreateOptionsDriverOpts -> VolumeCreateOptions { volumeCreateOptionsDriverOpts, ..} ) <$> f volumeCreateOptionsDriverOpts +{-# INLINE volumeCreateOptionsDriverOptsL #-} + +-- | 'volumeCreateOptionsLabels' Lens +volumeCreateOptionsLabelsL :: Lens_' VolumeCreateOptions (Maybe (Map.Map String Text)) +volumeCreateOptionsLabelsL f VolumeCreateOptions{..} = (\volumeCreateOptionsLabels -> VolumeCreateOptions { volumeCreateOptionsLabels, ..} ) <$> f volumeCreateOptionsLabels +{-# INLINE volumeCreateOptionsLabelsL #-} + +-- | 'volumeCreateOptionsClusterVolumeSpec' Lens +volumeCreateOptionsClusterVolumeSpecL :: Lens_' VolumeCreateOptions (Maybe ClusterVolumeSpec) +volumeCreateOptionsClusterVolumeSpecL f VolumeCreateOptions{..} = (\volumeCreateOptionsClusterVolumeSpec -> VolumeCreateOptions { volumeCreateOptionsClusterVolumeSpec, ..} ) <$> f volumeCreateOptionsClusterVolumeSpec +{-# INLINE volumeCreateOptionsClusterVolumeSpecL #-} + + + +-- * VolumeListResponse + +-- | 'volumeListResponseVolumes' Lens +volumeListResponseVolumesL :: Lens_' VolumeListResponse (Maybe [Volume]) +volumeListResponseVolumesL f VolumeListResponse{..} = (\volumeListResponseVolumes -> VolumeListResponse { volumeListResponseVolumes, ..} ) <$> f volumeListResponseVolumes +{-# INLINE volumeListResponseVolumesL #-} + +-- | 'volumeListResponseWarnings' Lens +volumeListResponseWarningsL :: Lens_' VolumeListResponse (Maybe [Text]) +volumeListResponseWarningsL f VolumeListResponse{..} = (\volumeListResponseWarnings -> VolumeListResponse { volumeListResponseWarnings, ..} ) <$> f volumeListResponseWarnings +{-# INLINE volumeListResponseWarningsL #-} + + + +-- * VolumePruneResponse + +-- | 'volumePruneResponseVolumesDeleted' Lens +volumePruneResponseVolumesDeletedL :: Lens_' VolumePruneResponse (Maybe [Text]) +volumePruneResponseVolumesDeletedL f VolumePruneResponse{..} = (\volumePruneResponseVolumesDeleted -> VolumePruneResponse { volumePruneResponseVolumesDeleted, ..} ) <$> f volumePruneResponseVolumesDeleted +{-# INLINE volumePruneResponseVolumesDeletedL #-} + +-- | 'volumePruneResponseSpaceReclaimed' Lens +volumePruneResponseSpaceReclaimedL :: Lens_' VolumePruneResponse (Maybe Integer) +volumePruneResponseSpaceReclaimedL f VolumePruneResponse{..} = (\volumePruneResponseSpaceReclaimed -> VolumePruneResponse { volumePruneResponseSpaceReclaimed, ..} ) <$> f volumePruneResponseSpaceReclaimed +{-# INLINE volumePruneResponseSpaceReclaimedL #-} + + + +-- * VolumeUpdateRequest + +-- | 'volumeUpdateRequestSpec' Lens +volumeUpdateRequestSpecL :: Lens_' VolumeUpdateRequest (Maybe ClusterVolumeSpec) +volumeUpdateRequestSpecL f VolumeUpdateRequest{..} = (\volumeUpdateRequestSpec -> VolumeUpdateRequest { volumeUpdateRequestSpec, ..} ) <$> f volumeUpdateRequestSpec +{-# INLINE volumeUpdateRequestSpecL #-} + + + +-- * VolumeUsageData + +-- | 'volumeUsageDataSize' Lens +volumeUsageDataSizeL :: Lens_' VolumeUsageData (Integer) +volumeUsageDataSizeL f VolumeUsageData{..} = (\volumeUsageDataSize -> VolumeUsageData { volumeUsageDataSize, ..} ) <$> f volumeUsageDataSize +{-# INLINE volumeUsageDataSizeL #-} + +-- | 'volumeUsageDataRefCount' Lens +volumeUsageDataRefCountL :: Lens_' VolumeUsageData (Integer) +volumeUsageDataRefCountL f VolumeUsageData{..} = (\volumeUsageDataRefCount -> VolumeUsageData { volumeUsageDataRefCount, ..} ) <$> f volumeUsageDataRefCount +{-# INLINE volumeUsageDataRefCountL #-} + + diff --git a/v1.45/tests/ApproxEq.hs b/v1.45/tests/ApproxEq.hs new file mode 100644 index 0000000..88ca211 --- /dev/null +++ b/v1.45/tests/ApproxEq.hs @@ -0,0 +1,81 @@ +{-# LANGUAGE DefaultSignatures #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeOperators #-} +{-# OPTIONS_GHC -fno-warn-orphans #-} + +module ApproxEq where + +import Data.Text (Text) +import Data.Time.Clock +import Test.QuickCheck +import GHC.Generics as G + +(==~) + :: (ApproxEq a, Show a) + => a -> a -> Property +a ==~ b = counterexample (show a ++ " !=~ " ++ show b) (a =~ b) + +class GApproxEq f where + gApproxEq :: f a -> f a -> Bool + +instance GApproxEq U1 where + gApproxEq U1 U1 = True + +instance (GApproxEq a, GApproxEq b) => + GApproxEq (a :+: b) where + gApproxEq (L1 a) (L1 b) = gApproxEq a b + gApproxEq (R1 a) (R1 b) = gApproxEq a b + gApproxEq _ _ = False + +instance (GApproxEq a, GApproxEq b) => + GApproxEq (a :*: b) where + gApproxEq (a1 :*: b1) (a2 :*: b2) = gApproxEq a1 a2 && gApproxEq b1 b2 + +instance (ApproxEq a) => + GApproxEq (K1 i a) where + gApproxEq (K1 a) (K1 b) = a =~ b + +instance (GApproxEq f) => + GApproxEq (M1 i t f) where + gApproxEq (M1 a) (M1 b) = gApproxEq a b + +class ApproxEq a where + (=~) :: a -> a -> Bool + default (=~) :: (Generic a, GApproxEq (Rep a)) => a -> a -> Bool + a =~ b = gApproxEq (G.from a) (G.from b) + +instance ApproxEq Text where + (=~) = (==) + +instance ApproxEq Char where + (=~) = (==) + +instance ApproxEq Bool where + (=~) = (==) + +instance ApproxEq Int where + (=~) = (==) + +instance ApproxEq Double where + (=~) = (==) + +instance ApproxEq a => + ApproxEq (Maybe a) + +instance ApproxEq UTCTime where + (=~) = (==) + +instance ApproxEq a => + ApproxEq [a] where + as =~ bs = and (zipWith (=~) as bs) + +instance (ApproxEq l, ApproxEq r) => + ApproxEq (Either l r) where + Left a =~ Left b = a =~ b + Right a =~ Right b = a =~ b + _ =~ _ = False + +instance (ApproxEq l, ApproxEq r) => + ApproxEq (l, r) where + (=~) (l1, r1) (l2, r2) = l1 =~ l2 && r1 =~ r2 diff --git a/v1.45/tests/Instances.hs b/v1.45/tests/Instances.hs new file mode 100644 index 0000000..60d373a --- /dev/null +++ b/v1.45/tests/Instances.hs @@ -0,0 +1,2810 @@ +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE CPP #-} +{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-unused-matches #-} + +module Instances where + +import DockerEngine.Model +import DockerEngine.Core + +import qualified Data.Aeson as A +import qualified Data.ByteString.Lazy as BL +import qualified Data.HashMap.Strict as HM +import qualified Data.Set as Set +import qualified Data.Text as T +import qualified Data.Time as TI +import qualified Data.Vector as V +import Data.String (fromString) + +import Control.Monad +import Data.Char (isSpace) +import Data.List (sort) +import Test.QuickCheck + +import ApproxEq + +instance Arbitrary T.Text where + arbitrary = T.pack <$> arbitrary + +instance Arbitrary TI.Day where + arbitrary = TI.ModifiedJulianDay . (2000 +) <$> arbitrary + shrink = (TI.ModifiedJulianDay <$>) . shrink . TI.toModifiedJulianDay + +instance Arbitrary TI.UTCTime where + arbitrary = + TI.UTCTime <$> arbitrary <*> (TI.secondsToDiffTime <$> choose (0, 86401)) + +instance Arbitrary BL.ByteString where + arbitrary = BL.pack <$> arbitrary + shrink xs = BL.pack <$> shrink (BL.unpack xs) + +instance Arbitrary ByteArray where + arbitrary = ByteArray <$> arbitrary + shrink (ByteArray xs) = ByteArray <$> shrink xs + +instance Arbitrary Binary where + arbitrary = Binary <$> arbitrary + shrink (Binary xs) = Binary <$> shrink xs + +instance Arbitrary DateTime where + arbitrary = DateTime <$> arbitrary + shrink (DateTime xs) = DateTime <$> shrink xs + +instance Arbitrary Date where + arbitrary = Date <$> arbitrary + shrink (Date xs) = Date <$> shrink xs + +#if MIN_VERSION_aeson(2,0,0) +#else +-- | A naive Arbitrary instance for A.Value: +instance Arbitrary A.Value where + arbitrary = arbitraryValue +#endif + +arbitraryValue :: Gen A.Value +arbitraryValue = + frequency [(3, simpleTypes), (1, arrayTypes), (1, objectTypes)] + where + simpleTypes :: Gen A.Value + simpleTypes = + frequency + [ (1, return A.Null) + , (2, liftM A.Bool (arbitrary :: Gen Bool)) + , (2, liftM (A.Number . fromIntegral) (arbitrary :: Gen Int)) + , (2, liftM (A.String . T.pack) (arbitrary :: Gen String)) + ] + mapF (k, v) = (fromString k, v) + simpleAndArrays = frequency [(1, sized sizedArray), (4, simpleTypes)] + arrayTypes = sized sizedArray + objectTypes = sized sizedObject + sizedArray n = liftM (A.Array . V.fromList) $ replicateM n simpleTypes + sizedObject n = + liftM (A.object . map mapF) $ + replicateM n $ (,) <$> (arbitrary :: Gen String) <*> simpleAndArrays + +-- | Checks if a given list has no duplicates in _O(n log n)_. +hasNoDups + :: (Ord a) + => [a] -> Bool +hasNoDups = go Set.empty + where + go _ [] = True + go s (x:xs) + | s' <- Set.insert x s + , Set.size s' > Set.size s = go s' xs + | otherwise = False + +instance ApproxEq TI.Day where + (=~) = (==) + +arbitraryReduced :: Arbitrary a => Int -> Gen a +arbitraryReduced n = resize (n `div` 2) arbitrary + +arbitraryReducedMaybe :: Arbitrary a => Int -> Gen (Maybe a) +arbitraryReducedMaybe 0 = elements [Nothing] +arbitraryReducedMaybe n = arbitraryReduced n + +arbitraryReducedMaybeValue :: Int -> Gen (Maybe A.Value) +arbitraryReducedMaybeValue 0 = elements [Nothing] +arbitraryReducedMaybeValue n = do + generated <- arbitraryReduced n + if generated == Just A.Null + then return Nothing + else return generated + +-- * Models + +instance Arbitrary Address where + arbitrary = sized genAddress + +genAddress :: Int -> Gen Address +genAddress n = + Address + <$> arbitraryReducedMaybe n -- addressAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- addressPrefixLen :: Maybe Int + +instance Arbitrary AuthConfig where + arbitrary = sized genAuthConfig + +genAuthConfig :: Int -> Gen AuthConfig +genAuthConfig n = + AuthConfig + <$> arbitraryReducedMaybe n -- authConfigUsername :: Maybe Text + <*> arbitraryReducedMaybe n -- authConfigPassword :: Maybe Text + <*> arbitraryReducedMaybe n -- authConfigEmail :: Maybe Text + <*> arbitraryReducedMaybe n -- authConfigServeraddress :: Maybe Text + +instance Arbitrary BuildCache where + arbitrary = sized genBuildCache + +genBuildCache :: Int -> Gen BuildCache +genBuildCache n = + BuildCache + <$> arbitraryReducedMaybe n -- buildCacheId :: Maybe Text + <*> arbitraryReducedMaybe n -- buildCacheParent :: Maybe Text + <*> arbitraryReducedMaybe n -- buildCacheParents :: Maybe [Text] + <*> arbitraryReducedMaybe n -- buildCacheType :: Maybe E'Type3 + <*> arbitraryReducedMaybe n -- buildCacheDescription :: Maybe Text + <*> arbitraryReducedMaybe n -- buildCacheInUse :: Maybe Bool + <*> arbitraryReducedMaybe n -- buildCacheShared :: Maybe Bool + <*> arbitraryReducedMaybe n -- buildCacheSize :: Maybe Int + <*> arbitraryReducedMaybe n -- buildCacheCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- buildCacheLastUsedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- buildCacheUsageCount :: Maybe Int + +instance Arbitrary BuildInfo where + arbitrary = sized genBuildInfo + +genBuildInfo :: Int -> Gen BuildInfo +genBuildInfo n = + BuildInfo + <$> arbitraryReducedMaybe n -- buildInfoId :: Maybe Text + <*> arbitraryReducedMaybe n -- buildInfoStream :: Maybe Text + <*> arbitraryReducedMaybe n -- buildInfoError :: Maybe Text + <*> arbitraryReducedMaybe n -- buildInfoErrorDetail :: Maybe ErrorDetail + <*> arbitraryReducedMaybe n -- buildInfoStatus :: Maybe Text + <*> arbitraryReducedMaybe n -- buildInfoProgress :: Maybe Text + <*> arbitraryReducedMaybe n -- buildInfoProgressDetail :: Maybe ProgressDetail + <*> arbitraryReducedMaybe n -- buildInfoAux :: Maybe ImageID + +instance Arbitrary BuildPruneResponse where + arbitrary = sized genBuildPruneResponse + +genBuildPruneResponse :: Int -> Gen BuildPruneResponse +genBuildPruneResponse n = + BuildPruneResponse + <$> arbitraryReducedMaybe n -- buildPruneResponseCachesDeleted :: Maybe [Text] + <*> arbitraryReducedMaybe n -- buildPruneResponseSpaceReclaimed :: Maybe Integer + +instance Arbitrary ClusterInfo where + arbitrary = sized genClusterInfo + +genClusterInfo :: Int -> Gen ClusterInfo +genClusterInfo n = + ClusterInfo + <$> arbitraryReducedMaybe n -- clusterInfoId :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterInfoVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- clusterInfoCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterInfoUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterInfoSpec :: Maybe SwarmSpec + <*> arbitraryReducedMaybe n -- clusterInfoTlsInfo :: Maybe TLSInfo + <*> arbitraryReducedMaybe n -- clusterInfoRootRotationInProgress :: Maybe Bool + <*> arbitraryReducedMaybe n -- clusterInfoDataPathPort :: Maybe Int + <*> arbitraryReducedMaybe n -- clusterInfoDefaultAddrPool :: Maybe [Text] + <*> arbitraryReducedMaybe n -- clusterInfoSubnetSize :: Maybe Int + +instance Arbitrary ClusterVolume where + arbitrary = sized genClusterVolume + +genClusterVolume :: Int -> Gen ClusterVolume +genClusterVolume n = + ClusterVolume + <$> arbitraryReducedMaybe n -- clusterVolumeId :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumeVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- clusterVolumeCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumeUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumeSpec :: Maybe ClusterVolumeSpec + <*> arbitraryReducedMaybe n -- clusterVolumeInfo :: Maybe ClusterVolumeInfo + <*> arbitraryReducedMaybe n -- clusterVolumePublishStatus :: Maybe [ClusterVolumePublishStatusInner] + +instance Arbitrary ClusterVolumeInfo where + arbitrary = sized genClusterVolumeInfo + +genClusterVolumeInfo :: Int -> Gen ClusterVolumeInfo +genClusterVolumeInfo n = + ClusterVolumeInfo + <$> arbitraryReducedMaybe n -- clusterVolumeInfoCapacityBytes :: Maybe Integer + <*> arbitraryReducedMaybe n -- clusterVolumeInfoVolumeContext :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- clusterVolumeInfoVolumeId :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumeInfoAccessibleTopology :: Maybe [Map] + +instance Arbitrary ClusterVolumePublishStatusInner where + arbitrary = sized genClusterVolumePublishStatusInner + +genClusterVolumePublishStatusInner :: Int -> Gen ClusterVolumePublishStatusInner +genClusterVolumePublishStatusInner n = + ClusterVolumePublishStatusInner + <$> arbitraryReducedMaybe n -- clusterVolumePublishStatusInnerNodeId :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumePublishStatusInnerState :: Maybe E'State2 + <*> arbitraryReducedMaybe n -- clusterVolumePublishStatusInnerPublishContext :: Maybe (Map.Map String Text) + +instance Arbitrary ClusterVolumeSpec where + arbitrary = sized genClusterVolumeSpec + +genClusterVolumeSpec :: Int -> Gen ClusterVolumeSpec +genClusterVolumeSpec n = + ClusterVolumeSpec + <$> arbitraryReducedMaybe n -- clusterVolumeSpecGroup :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessMode :: Maybe ClusterVolumeSpecAccessMode + +instance Arbitrary ClusterVolumeSpecAccessMode where + arbitrary = sized genClusterVolumeSpecAccessMode + +genClusterVolumeSpecAccessMode :: Int -> Gen ClusterVolumeSpecAccessMode +genClusterVolumeSpecAccessMode n = + ClusterVolumeSpecAccessMode + <$> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeScope :: Maybe E'Scope3 + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeSharing :: Maybe E'Sharing + <*> arbitraryReducedMaybeValue n -- clusterVolumeSpecAccessModeMountVolume :: Maybe A.Value + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeSecrets :: Maybe [ClusterVolumeSpecAccessModeSecretsInner] + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeAccessibilityRequirements :: Maybe ClusterVolumeSpecAccessModeAccessibilityRequirements + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeCapacityRange :: Maybe ClusterVolumeSpecAccessModeCapacityRange + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeAvailability :: Maybe E'Availability + +instance Arbitrary ClusterVolumeSpecAccessModeAccessibilityRequirements where + arbitrary = sized genClusterVolumeSpecAccessModeAccessibilityRequirements + +genClusterVolumeSpecAccessModeAccessibilityRequirements :: Int -> Gen ClusterVolumeSpecAccessModeAccessibilityRequirements +genClusterVolumeSpecAccessModeAccessibilityRequirements n = + ClusterVolumeSpecAccessModeAccessibilityRequirements + <$> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite :: Maybe [Map] + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred :: Maybe [Map] + +instance Arbitrary ClusterVolumeSpecAccessModeCapacityRange where + arbitrary = sized genClusterVolumeSpecAccessModeCapacityRange + +genClusterVolumeSpecAccessModeCapacityRange :: Int -> Gen ClusterVolumeSpecAccessModeCapacityRange +genClusterVolumeSpecAccessModeCapacityRange n = + ClusterVolumeSpecAccessModeCapacityRange + <$> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeCapacityRangeRequiredBytes :: Maybe Integer + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeCapacityRangeLimitBytes :: Maybe Integer + +instance Arbitrary ClusterVolumeSpecAccessModeSecretsInner where + arbitrary = sized genClusterVolumeSpecAccessModeSecretsInner + +genClusterVolumeSpecAccessModeSecretsInner :: Int -> Gen ClusterVolumeSpecAccessModeSecretsInner +genClusterVolumeSpecAccessModeSecretsInner n = + ClusterVolumeSpecAccessModeSecretsInner + <$> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeSecretsInnerKey :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeSecretsInnerSecret :: Maybe Text + +instance Arbitrary Commit where + arbitrary = sized genCommit + +genCommit :: Int -> Gen Commit +genCommit n = + Commit + <$> arbitraryReducedMaybe n -- commitId :: Maybe Text + <*> arbitraryReducedMaybe n -- commitExpected :: Maybe Text + +instance Arbitrary Config where + arbitrary = sized genConfig + +genConfig :: Int -> Gen Config +genConfig n = + Config + <$> arbitraryReducedMaybe n -- configId :: Maybe Text + <*> arbitraryReducedMaybe n -- configVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- configCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- configUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- configSpec :: Maybe ConfigSpec + +instance Arbitrary ConfigCreateRequest where + arbitrary = sized genConfigCreateRequest + +genConfigCreateRequest :: Int -> Gen ConfigCreateRequest +genConfigCreateRequest n = + ConfigCreateRequest + <$> arbitraryReducedMaybe n -- configCreateRequestName :: Maybe Text + <*> arbitraryReducedMaybe n -- configCreateRequestLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- configCreateRequestData :: Maybe Text + <*> arbitraryReducedMaybe n -- configCreateRequestTemplating :: Maybe Driver + +instance Arbitrary ConfigReference where + arbitrary = sized genConfigReference + +genConfigReference :: Int -> Gen ConfigReference +genConfigReference n = + ConfigReference + <$> arbitraryReducedMaybe n -- configReferenceNetwork :: Maybe Text + +instance Arbitrary ConfigSpec where + arbitrary = sized genConfigSpec + +genConfigSpec :: Int -> Gen ConfigSpec +genConfigSpec n = + ConfigSpec + <$> arbitraryReducedMaybe n -- configSpecName :: Maybe Text + <*> arbitraryReducedMaybe n -- configSpecLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- configSpecData :: Maybe Text + <*> arbitraryReducedMaybe n -- configSpecTemplating :: Maybe Driver + +instance Arbitrary ContainerConfig where + arbitrary = sized genContainerConfig + +genContainerConfig :: Int -> Gen ContainerConfig +genContainerConfig n = + ContainerConfig + <$> arbitraryReducedMaybe n -- containerConfigHostname :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigDomainname :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigUser :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigAttachStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigAttachStdout :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigAttachStderr :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigExposedPorts :: Maybe (Map.Map String A.Value) + <*> arbitraryReducedMaybe n -- containerConfigTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigOpenStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigStdinOnce :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigEnv :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerConfigCmd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerConfigHealthcheck :: Maybe HealthConfig + <*> arbitraryReducedMaybe n -- containerConfigArgsEscaped :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigImage :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigVolumes :: Maybe (Map.Map String A.Value) + <*> arbitraryReducedMaybe n -- containerConfigWorkingDir :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigEntrypoint :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerConfigNetworkDisabled :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigMacAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigOnBuild :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerConfigLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- containerConfigStopSignal :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigStopTimeout :: Maybe Int + <*> arbitraryReducedMaybe n -- containerConfigShell :: Maybe [Text] + +instance Arbitrary ContainerCreateRequest where + arbitrary = sized genContainerCreateRequest + +genContainerCreateRequest :: Int -> Gen ContainerCreateRequest +genContainerCreateRequest n = + ContainerCreateRequest + <$> arbitraryReducedMaybe n -- containerCreateRequestHostname :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestDomainname :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestUser :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestAttachStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestAttachStdout :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestAttachStderr :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestExposedPorts :: Maybe (Map.Map String A.Value) + <*> arbitraryReducedMaybe n -- containerCreateRequestTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestOpenStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestStdinOnce :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestEnv :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerCreateRequestCmd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerCreateRequestHealthcheck :: Maybe HealthConfig + <*> arbitraryReducedMaybe n -- containerCreateRequestArgsEscaped :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestImage :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestVolumes :: Maybe (Map.Map String A.Value) + <*> arbitraryReducedMaybe n -- containerCreateRequestWorkingDir :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestEntrypoint :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerCreateRequestNetworkDisabled :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestMacAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestOnBuild :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerCreateRequestLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- containerCreateRequestStopSignal :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestStopTimeout :: Maybe Int + <*> arbitraryReducedMaybe n -- containerCreateRequestShell :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerCreateRequestHostConfig :: Maybe HostConfig + <*> arbitraryReducedMaybe n -- containerCreateRequestNetworkingConfig :: Maybe NetworkingConfig + +instance Arbitrary ContainerCreateResponse where + arbitrary = sized genContainerCreateResponse + +genContainerCreateResponse :: Int -> Gen ContainerCreateResponse +genContainerCreateResponse n = + ContainerCreateResponse + <$> arbitrary -- containerCreateResponseId :: Text + <*> arbitrary -- containerCreateResponseWarnings :: [Text] + +instance Arbitrary ContainerInspectResponse where + arbitrary = sized genContainerInspectResponse + +genContainerInspectResponse :: Int -> Gen ContainerInspectResponse +genContainerInspectResponse n = + ContainerInspectResponse + <$> arbitraryReducedMaybe n -- containerInspectResponseId :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseCreated :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponsePath :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseArgs :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerInspectResponseState :: Maybe ContainerState + <*> arbitraryReducedMaybe n -- containerInspectResponseImage :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseResolvConfPath :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseHostnamePath :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseHostsPath :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseLogPath :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseName :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseRestartCount :: Maybe Int + <*> arbitraryReducedMaybe n -- containerInspectResponseDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponsePlatform :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseMountLabel :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseProcessLabel :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseAppArmorProfile :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseExecIds :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerInspectResponseHostConfig :: Maybe HostConfig + <*> arbitraryReducedMaybe n -- containerInspectResponseGraphDriver :: Maybe GraphDriverData + <*> arbitraryReducedMaybe n -- containerInspectResponseSizeRw :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerInspectResponseSizeRootFs :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerInspectResponseMounts :: Maybe [MountPoint] + <*> arbitraryReducedMaybe n -- containerInspectResponseConfig :: Maybe ContainerConfig + <*> arbitraryReducedMaybe n -- containerInspectResponseNetworkSettings :: Maybe NetworkSettings + +instance Arbitrary ContainerPruneResponse where + arbitrary = sized genContainerPruneResponse + +genContainerPruneResponse :: Int -> Gen ContainerPruneResponse +genContainerPruneResponse n = + ContainerPruneResponse + <$> arbitraryReducedMaybe n -- containerPruneResponseContainersDeleted :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerPruneResponseSpaceReclaimed :: Maybe Integer + +instance Arbitrary ContainerState where + arbitrary = sized genContainerState + +genContainerState :: Int -> Gen ContainerState +genContainerState n = + ContainerState + <$> arbitraryReducedMaybe n -- containerStateStatus :: Maybe E'Status2 + <*> arbitraryReducedMaybe n -- containerStateRunning :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerStatePaused :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerStateRestarting :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerStateOomKilled :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerStateDead :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerStatePid :: Maybe Int + <*> arbitraryReducedMaybe n -- containerStateExitCode :: Maybe Int + <*> arbitraryReducedMaybe n -- containerStateError :: Maybe Text + <*> arbitraryReducedMaybe n -- containerStateStartedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- containerStateFinishedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- containerStateHealth :: Maybe Health + +instance Arbitrary ContainerStatus where + arbitrary = sized genContainerStatus + +genContainerStatus :: Int -> Gen ContainerStatus +genContainerStatus n = + ContainerStatus + <$> arbitraryReducedMaybe n -- containerStatusContainerId :: Maybe Text + <*> arbitraryReducedMaybe n -- containerStatusPid :: Maybe Int + <*> arbitraryReducedMaybe n -- containerStatusExitCode :: Maybe Int + +instance Arbitrary ContainerSummary where + arbitrary = sized genContainerSummary + +genContainerSummary :: Int -> Gen ContainerSummary +genContainerSummary n = + ContainerSummary + <$> arbitraryReducedMaybe n -- containerSummaryId :: Maybe Text + <*> arbitraryReducedMaybe n -- containerSummaryNames :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerSummaryImage :: Maybe Text + <*> arbitraryReducedMaybe n -- containerSummaryImageId :: Maybe Text + <*> arbitraryReducedMaybe n -- containerSummaryCommand :: Maybe Text + <*> arbitraryReducedMaybe n -- containerSummaryCreated :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerSummaryPorts :: Maybe [Port] + <*> arbitraryReducedMaybe n -- containerSummarySizeRw :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerSummarySizeRootFs :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerSummaryLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- containerSummaryState :: Maybe Text + <*> arbitraryReducedMaybe n -- containerSummaryStatus :: Maybe Text + <*> arbitraryReducedMaybe n -- containerSummaryHostConfig :: Maybe ContainerSummaryHostConfig + <*> arbitraryReducedMaybe n -- containerSummaryNetworkSettings :: Maybe ContainerSummaryNetworkSettings + <*> arbitraryReducedMaybe n -- containerSummaryMounts :: Maybe [MountPoint] + +instance Arbitrary ContainerSummaryHostConfig where + arbitrary = sized genContainerSummaryHostConfig + +genContainerSummaryHostConfig :: Int -> Gen ContainerSummaryHostConfig +genContainerSummaryHostConfig n = + ContainerSummaryHostConfig + <$> arbitraryReducedMaybe n -- containerSummaryHostConfigNetworkMode :: Maybe Text + +instance Arbitrary ContainerSummaryNetworkSettings where + arbitrary = sized genContainerSummaryNetworkSettings + +genContainerSummaryNetworkSettings :: Int -> Gen ContainerSummaryNetworkSettings +genContainerSummaryNetworkSettings n = + ContainerSummaryNetworkSettings + <$> arbitraryReducedMaybe n -- containerSummaryNetworkSettingsNetworks :: Maybe (Map.Map String EndpointSettings) + +instance Arbitrary ContainerTopResponse where + arbitrary = sized genContainerTopResponse + +genContainerTopResponse :: Int -> Gen ContainerTopResponse +genContainerTopResponse n = + ContainerTopResponse + <$> arbitraryReducedMaybe n -- containerTopResponseTitles :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerTopResponseProcesses :: Maybe [[Text]] + +instance Arbitrary ContainerUpdateRequest where + arbitrary = sized genContainerUpdateRequest + +genContainerUpdateRequest :: Int -> Gen ContainerUpdateRequest +genContainerUpdateRequest n = + ContainerUpdateRequest + <$> arbitraryReducedMaybe n -- containerUpdateRequestCpuShares :: Maybe Int + <*> arbitraryReducedMaybe n -- containerUpdateRequestMemory :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestCgroupParent :: Maybe Text + <*> arbitraryReducedMaybe n -- containerUpdateRequestBlkioWeight :: Maybe Int + <*> arbitraryReducedMaybe n -- containerUpdateRequestBlkioWeightDevice :: Maybe [ResourcesBlkioWeightDeviceInner] + <*> arbitraryReducedMaybe n -- containerUpdateRequestBlkioDeviceReadBps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- containerUpdateRequestBlkioDeviceWriteBps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- containerUpdateRequestBlkioDeviceReadIOps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- containerUpdateRequestBlkioDeviceWriteIOps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpuPeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpuQuota :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpuRealtimePeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpuRealtimeRuntime :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpusetCpus :: Maybe Text + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpusetMems :: Maybe Text + <*> arbitraryReducedMaybe n -- containerUpdateRequestDevices :: Maybe [DeviceMapping] + <*> arbitraryReducedMaybe n -- containerUpdateRequestDeviceCgroupRules :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerUpdateRequestDeviceRequests :: Maybe [DeviceRequest] + <*> arbitraryReducedMaybe n -- containerUpdateRequestKernelMemoryTcp :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestMemoryReservation :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestMemorySwap :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestMemorySwappiness :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestNanoCpus :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestOomKillDisable :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerUpdateRequestInit :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerUpdateRequestPidsLimit :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestUlimits :: Maybe [ResourcesUlimitsInner] + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpuCount :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpuPercent :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestIoMaximumIOps :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestIoMaximumBandwidth :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestRestartPolicy :: Maybe RestartPolicy + +instance Arbitrary ContainerUpdateResponse where + arbitrary = sized genContainerUpdateResponse + +genContainerUpdateResponse :: Int -> Gen ContainerUpdateResponse +genContainerUpdateResponse n = + ContainerUpdateResponse + <$> arbitraryReducedMaybe n -- containerUpdateResponseWarnings :: Maybe [Text] + +instance Arbitrary ContainerWaitExitError where + arbitrary = sized genContainerWaitExitError + +genContainerWaitExitError :: Int -> Gen ContainerWaitExitError +genContainerWaitExitError n = + ContainerWaitExitError + <$> arbitraryReducedMaybe n -- containerWaitExitErrorMessage :: Maybe Text + +instance Arbitrary ContainerWaitResponse where + arbitrary = sized genContainerWaitResponse + +genContainerWaitResponse :: Int -> Gen ContainerWaitResponse +genContainerWaitResponse n = + ContainerWaitResponse + <$> arbitrary -- containerWaitResponseStatusCode :: Integer + <*> arbitraryReducedMaybe n -- containerWaitResponseError :: Maybe ContainerWaitExitError + +instance Arbitrary CreateImageInfo where + arbitrary = sized genCreateImageInfo + +genCreateImageInfo :: Int -> Gen CreateImageInfo +genCreateImageInfo n = + CreateImageInfo + <$> arbitraryReducedMaybe n -- createImageInfoId :: Maybe Text + <*> arbitraryReducedMaybe n -- createImageInfoError :: Maybe Text + <*> arbitraryReducedMaybe n -- createImageInfoErrorDetail :: Maybe ErrorDetail + <*> arbitraryReducedMaybe n -- createImageInfoStatus :: Maybe Text + <*> arbitraryReducedMaybe n -- createImageInfoProgress :: Maybe Text + <*> arbitraryReducedMaybe n -- createImageInfoProgressDetail :: Maybe ProgressDetail + +instance Arbitrary DeviceMapping where + arbitrary = sized genDeviceMapping + +genDeviceMapping :: Int -> Gen DeviceMapping +genDeviceMapping n = + DeviceMapping + <$> arbitraryReducedMaybe n -- deviceMappingPathOnHost :: Maybe Text + <*> arbitraryReducedMaybe n -- deviceMappingPathInContainer :: Maybe Text + <*> arbitraryReducedMaybe n -- deviceMappingCgroupPermissions :: Maybe Text + +instance Arbitrary DeviceRequest where + arbitrary = sized genDeviceRequest + +genDeviceRequest :: Int -> Gen DeviceRequest +genDeviceRequest n = + DeviceRequest + <$> arbitraryReducedMaybe n -- deviceRequestDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- deviceRequestCount :: Maybe Int + <*> arbitraryReducedMaybe n -- deviceRequestDeviceIds :: Maybe [Text] + <*> arbitraryReducedMaybe n -- deviceRequestCapabilities :: Maybe [[Text]] + <*> arbitraryReducedMaybe n -- deviceRequestOptions :: Maybe (Map.Map String Text) + +instance Arbitrary DistributionInspect where + arbitrary = sized genDistributionInspect + +genDistributionInspect :: Int -> Gen DistributionInspect +genDistributionInspect n = + DistributionInspect + <$> arbitraryReduced n -- distributionInspectDescriptor :: OCIDescriptor + <*> arbitraryReduced n -- distributionInspectPlatforms :: [OCIPlatform] + +instance Arbitrary Driver where + arbitrary = sized genDriver + +genDriver :: Int -> Gen Driver +genDriver n = + Driver + <$> arbitrary -- driverName :: Text + <*> arbitraryReducedMaybe n -- driverOptions :: Maybe (Map.Map String Text) + +instance Arbitrary EndpointIPAMConfig where + arbitrary = sized genEndpointIPAMConfig + +genEndpointIPAMConfig :: Int -> Gen EndpointIPAMConfig +genEndpointIPAMConfig n = + EndpointIPAMConfig + <$> arbitraryReducedMaybe n -- endpointIPAMConfigIpv4Address :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointIPAMConfigIpv6Address :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointIPAMConfigLinkLocalIps :: Maybe [Text] + +instance Arbitrary EndpointPortConfig where + arbitrary = sized genEndpointPortConfig + +genEndpointPortConfig :: Int -> Gen EndpointPortConfig +genEndpointPortConfig n = + EndpointPortConfig + <$> arbitraryReducedMaybe n -- endpointPortConfigName :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointPortConfigProtocol :: Maybe E'Type + <*> arbitraryReducedMaybe n -- endpointPortConfigTargetPort :: Maybe Int + <*> arbitraryReducedMaybe n -- endpointPortConfigPublishedPort :: Maybe Int + <*> arbitraryReducedMaybe n -- endpointPortConfigPublishMode :: Maybe E'PublishMode + +instance Arbitrary EndpointSettings where + arbitrary = sized genEndpointSettings + +genEndpointSettings :: Int -> Gen EndpointSettings +genEndpointSettings n = + EndpointSettings + <$> arbitraryReducedMaybe n -- endpointSettingsIpamConfig :: Maybe EndpointIPAMConfig + <*> arbitraryReducedMaybe n -- endpointSettingsLinks :: Maybe [Text] + <*> arbitraryReducedMaybe n -- endpointSettingsMacAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsAliases :: Maybe [Text] + <*> arbitraryReducedMaybe n -- endpointSettingsNetworkId :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsEndpointId :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsGateway :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsIpAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsIpPrefixLen :: Maybe Int + <*> arbitraryReducedMaybe n -- endpointSettingsIpv6Gateway :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsGlobalIpv6Address :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsGlobalIpv6PrefixLen :: Maybe Integer + <*> arbitraryReducedMaybe n -- endpointSettingsDriverOpts :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- endpointSettingsDnsNames :: Maybe [Text] + +instance Arbitrary EndpointSpec where + arbitrary = sized genEndpointSpec + +genEndpointSpec :: Int -> Gen EndpointSpec +genEndpointSpec n = + EndpointSpec + <$> arbitraryReducedMaybe n -- endpointSpecMode :: Maybe E'Mode + <*> arbitraryReducedMaybe n -- endpointSpecPorts :: Maybe [EndpointPortConfig] + +instance Arbitrary EngineDescription where + arbitrary = sized genEngineDescription + +genEngineDescription :: Int -> Gen EngineDescription +genEngineDescription n = + EngineDescription + <$> arbitraryReducedMaybe n -- engineDescriptionEngineVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- engineDescriptionLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- engineDescriptionPlugins :: Maybe [EngineDescriptionPluginsInner] + +instance Arbitrary EngineDescriptionPluginsInner where + arbitrary = sized genEngineDescriptionPluginsInner + +genEngineDescriptionPluginsInner :: Int -> Gen EngineDescriptionPluginsInner +genEngineDescriptionPluginsInner n = + EngineDescriptionPluginsInner + <$> arbitraryReducedMaybe n -- engineDescriptionPluginsInnerType :: Maybe Text + <*> arbitraryReducedMaybe n -- engineDescriptionPluginsInnerName :: Maybe Text + +instance Arbitrary ErrorDetail where + arbitrary = sized genErrorDetail + +genErrorDetail :: Int -> Gen ErrorDetail +genErrorDetail n = + ErrorDetail + <$> arbitraryReducedMaybe n -- errorDetailCode :: Maybe Int + <*> arbitraryReducedMaybe n -- errorDetailMessage :: Maybe Text + +instance Arbitrary ErrorResponse where + arbitrary = sized genErrorResponse + +genErrorResponse :: Int -> Gen ErrorResponse +genErrorResponse n = + ErrorResponse + <$> arbitrary -- errorResponseMessage :: Text + +instance Arbitrary EventActor where + arbitrary = sized genEventActor + +genEventActor :: Int -> Gen EventActor +genEventActor n = + EventActor + <$> arbitraryReducedMaybe n -- eventActorId :: Maybe Text + <*> arbitraryReducedMaybe n -- eventActorAttributes :: Maybe (Map.Map String Text) + +instance Arbitrary EventMessage where + arbitrary = sized genEventMessage + +genEventMessage :: Int -> Gen EventMessage +genEventMessage n = + EventMessage + <$> arbitraryReducedMaybe n -- eventMessageType :: Maybe E'Type4 + <*> arbitraryReducedMaybe n -- eventMessageAction :: Maybe Text + <*> arbitraryReducedMaybe n -- eventMessageActor :: Maybe EventActor + <*> arbitraryReducedMaybe n -- eventMessageScope :: Maybe E'Scope2 + <*> arbitraryReducedMaybe n -- eventMessageTime :: Maybe Integer + <*> arbitraryReducedMaybe n -- eventMessageTimeNano :: Maybe Integer + +instance Arbitrary ExecConfig where + arbitrary = sized genExecConfig + +genExecConfig :: Int -> Gen ExecConfig +genExecConfig n = + ExecConfig + <$> arbitraryReducedMaybe n -- execConfigAttachStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- execConfigAttachStdout :: Maybe Bool + <*> arbitraryReducedMaybe n -- execConfigAttachStderr :: Maybe Bool + <*> arbitraryReducedMaybe n -- execConfigConsoleSize :: Maybe [Int] + <*> arbitraryReducedMaybe n -- execConfigDetachKeys :: Maybe Text + <*> arbitraryReducedMaybe n -- execConfigTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- execConfigEnv :: Maybe [Text] + <*> arbitraryReducedMaybe n -- execConfigCmd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- execConfigPrivileged :: Maybe Bool + <*> arbitraryReducedMaybe n -- execConfigUser :: Maybe Text + <*> arbitraryReducedMaybe n -- execConfigWorkingDir :: Maybe Text + +instance Arbitrary ExecInspectResponse where + arbitrary = sized genExecInspectResponse + +genExecInspectResponse :: Int -> Gen ExecInspectResponse +genExecInspectResponse n = + ExecInspectResponse + <$> arbitraryReducedMaybe n -- execInspectResponseCanRemove :: Maybe Bool + <*> arbitraryReducedMaybe n -- execInspectResponseDetachKeys :: Maybe Text + <*> arbitraryReducedMaybe n -- execInspectResponseId :: Maybe Text + <*> arbitraryReducedMaybe n -- execInspectResponseRunning :: Maybe Bool + <*> arbitraryReducedMaybe n -- execInspectResponseExitCode :: Maybe Int + <*> arbitraryReducedMaybe n -- execInspectResponseProcessConfig :: Maybe ProcessConfig + <*> arbitraryReducedMaybe n -- execInspectResponseOpenStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- execInspectResponseOpenStderr :: Maybe Bool + <*> arbitraryReducedMaybe n -- execInspectResponseOpenStdout :: Maybe Bool + <*> arbitraryReducedMaybe n -- execInspectResponseContainerId :: Maybe Text + <*> arbitraryReducedMaybe n -- execInspectResponsePid :: Maybe Int + +instance Arbitrary ExecStartConfig where + arbitrary = sized genExecStartConfig + +genExecStartConfig :: Int -> Gen ExecStartConfig +genExecStartConfig n = + ExecStartConfig + <$> arbitraryReducedMaybe n -- execStartConfigDetach :: Maybe Bool + <*> arbitraryReducedMaybe n -- execStartConfigTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- execStartConfigConsoleSize :: Maybe [Int] + +instance Arbitrary FilesystemChange where + arbitrary = sized genFilesystemChange + +genFilesystemChange :: Int -> Gen FilesystemChange +genFilesystemChange n = + FilesystemChange + <$> arbitrary -- filesystemChangePath :: Text + <*> arbitraryReduced n -- filesystemChangeKind :: ChangeType + +instance Arbitrary GenericResourcesInner where + arbitrary = sized genGenericResourcesInner + +genGenericResourcesInner :: Int -> Gen GenericResourcesInner +genGenericResourcesInner n = + GenericResourcesInner + <$> arbitraryReducedMaybe n -- genericResourcesInnerNamedResourceSpec :: Maybe GenericResourcesInnerNamedResourceSpec + <*> arbitraryReducedMaybe n -- genericResourcesInnerDiscreteResourceSpec :: Maybe GenericResourcesInnerDiscreteResourceSpec + +instance Arbitrary GenericResourcesInnerDiscreteResourceSpec where + arbitrary = sized genGenericResourcesInnerDiscreteResourceSpec + +genGenericResourcesInnerDiscreteResourceSpec :: Int -> Gen GenericResourcesInnerDiscreteResourceSpec +genGenericResourcesInnerDiscreteResourceSpec n = + GenericResourcesInnerDiscreteResourceSpec + <$> arbitraryReducedMaybe n -- genericResourcesInnerDiscreteResourceSpecKind :: Maybe Text + <*> arbitraryReducedMaybe n -- genericResourcesInnerDiscreteResourceSpecValue :: Maybe Integer + +instance Arbitrary GenericResourcesInnerNamedResourceSpec where + arbitrary = sized genGenericResourcesInnerNamedResourceSpec + +genGenericResourcesInnerNamedResourceSpec :: Int -> Gen GenericResourcesInnerNamedResourceSpec +genGenericResourcesInnerNamedResourceSpec n = + GenericResourcesInnerNamedResourceSpec + <$> arbitraryReducedMaybe n -- genericResourcesInnerNamedResourceSpecKind :: Maybe Text + <*> arbitraryReducedMaybe n -- genericResourcesInnerNamedResourceSpecValue :: Maybe Text + +instance Arbitrary GraphDriverData where + arbitrary = sized genGraphDriverData + +genGraphDriverData :: Int -> Gen GraphDriverData +genGraphDriverData n = + GraphDriverData + <$> arbitrary -- graphDriverDataName :: Text + <*> arbitrary -- graphDriverDataData :: (Map.Map String Text) + +instance Arbitrary Health where + arbitrary = sized genHealth + +genHealth :: Int -> Gen Health +genHealth n = + Health + <$> arbitraryReducedMaybe n -- healthStatus :: Maybe E'Status + <*> arbitraryReducedMaybe n -- healthFailingStreak :: Maybe Int + <*> arbitraryReducedMaybe n -- healthLog :: Maybe [HealthcheckResult] + +instance Arbitrary HealthConfig where + arbitrary = sized genHealthConfig + +genHealthConfig :: Int -> Gen HealthConfig +genHealthConfig n = + HealthConfig + <$> arbitraryReducedMaybe n -- healthConfigTest :: Maybe [Text] + <*> arbitraryReducedMaybe n -- healthConfigInterval :: Maybe Integer + <*> arbitraryReducedMaybe n -- healthConfigTimeout :: Maybe Integer + <*> arbitraryReducedMaybe n -- healthConfigRetries :: Maybe Int + <*> arbitraryReducedMaybe n -- healthConfigStartPeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- healthConfigStartInterval :: Maybe Integer + +instance Arbitrary HealthcheckResult where + arbitrary = sized genHealthcheckResult + +genHealthcheckResult :: Int -> Gen HealthcheckResult +genHealthcheckResult n = + HealthcheckResult + <$> arbitraryReducedMaybe n -- healthcheckResultStart :: Maybe DateTime + <*> arbitraryReducedMaybe n -- healthcheckResultEnd :: Maybe Text + <*> arbitraryReducedMaybe n -- healthcheckResultExitCode :: Maybe Int + <*> arbitraryReducedMaybe n -- healthcheckResultOutput :: Maybe Text + +instance Arbitrary HistoryResponseItem where + arbitrary = sized genHistoryResponseItem + +genHistoryResponseItem :: Int -> Gen HistoryResponseItem +genHistoryResponseItem n = + HistoryResponseItem + <$> arbitrary -- historyResponseItemId :: Text + <*> arbitrary -- historyResponseItemCreated :: Integer + <*> arbitrary -- historyResponseItemCreatedBy :: Text + <*> arbitrary -- historyResponseItemTags :: [Text] + <*> arbitrary -- historyResponseItemSize :: Integer + <*> arbitrary -- historyResponseItemComment :: Text + +instance Arbitrary HostConfig where + arbitrary = sized genHostConfig + +genHostConfig :: Int -> Gen HostConfig +genHostConfig n = + HostConfig + <$> arbitraryReducedMaybe n -- hostConfigCpuShares :: Maybe Int + <*> arbitraryReducedMaybe n -- hostConfigMemory :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigCgroupParent :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigBlkioWeight :: Maybe Int + <*> arbitraryReducedMaybe n -- hostConfigBlkioWeightDevice :: Maybe [ResourcesBlkioWeightDeviceInner] + <*> arbitraryReducedMaybe n -- hostConfigBlkioDeviceReadBps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- hostConfigBlkioDeviceWriteBps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- hostConfigBlkioDeviceReadIOps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- hostConfigBlkioDeviceWriteIOps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- hostConfigCpuPeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigCpuQuota :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigCpuRealtimePeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigCpuRealtimeRuntime :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigCpusetCpus :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigCpusetMems :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigDevices :: Maybe [DeviceMapping] + <*> arbitraryReducedMaybe n -- hostConfigDeviceCgroupRules :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigDeviceRequests :: Maybe [DeviceRequest] + <*> arbitraryReducedMaybe n -- hostConfigKernelMemoryTcp :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigMemoryReservation :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigMemorySwap :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigMemorySwappiness :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigNanoCpus :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigOomKillDisable :: Maybe Bool + <*> arbitraryReducedMaybe n -- hostConfigInit :: Maybe Bool + <*> arbitraryReducedMaybe n -- hostConfigPidsLimit :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigUlimits :: Maybe [ResourcesUlimitsInner] + <*> arbitraryReducedMaybe n -- hostConfigCpuCount :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigCpuPercent :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigIoMaximumIOps :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigIoMaximumBandwidth :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigBinds :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigContainerIdFile :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigLogConfig :: Maybe HostConfigAllOfLogConfig + <*> arbitraryReducedMaybe n -- hostConfigNetworkMode :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigPortBindings :: Maybe (Map.Map String [PortBinding]) + <*> arbitraryReducedMaybe n -- hostConfigRestartPolicy :: Maybe RestartPolicy + <*> arbitraryReducedMaybe n -- hostConfigAutoRemove :: Maybe Bool + <*> arbitraryReducedMaybe n -- hostConfigVolumeDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigVolumesFrom :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigMounts :: Maybe [Mount] + <*> arbitraryReducedMaybe n -- hostConfigConsoleSize :: Maybe [Int] + <*> arbitraryReducedMaybe n -- hostConfigAnnotations :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- hostConfigCapAdd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigCapDrop :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigCgroupnsMode :: Maybe E'CgroupnsMode + <*> arbitraryReducedMaybe n -- hostConfigDns :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigDnsOptions :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigDnsSearch :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigExtraHosts :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigGroupAdd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigIpcMode :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigCgroup :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigLinks :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigOomScoreAdj :: Maybe Int + <*> arbitraryReducedMaybe n -- hostConfigPidMode :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigPrivileged :: Maybe Bool + <*> arbitraryReducedMaybe n -- hostConfigPublishAllPorts :: Maybe Bool + <*> arbitraryReducedMaybe n -- hostConfigReadonlyRootfs :: Maybe Bool + <*> arbitraryReducedMaybe n -- hostConfigSecurityOpt :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigStorageOpt :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- hostConfigTmpfs :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- hostConfigUtsMode :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigUsernsMode :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigShmSize :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigSysctls :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- hostConfigRuntime :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigIsolation :: Maybe E'Isolation + <*> arbitraryReducedMaybe n -- hostConfigMaskedPaths :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigReadonlyPaths :: Maybe [Text] + +instance Arbitrary HostConfigAllOfLogConfig where + arbitrary = sized genHostConfigAllOfLogConfig + +genHostConfigAllOfLogConfig :: Int -> Gen HostConfigAllOfLogConfig +genHostConfigAllOfLogConfig n = + HostConfigAllOfLogConfig + <$> arbitraryReducedMaybe n -- hostConfigAllOfLogConfigType :: Maybe E'Type5 + <*> arbitraryReducedMaybe n -- hostConfigAllOfLogConfigConfig :: Maybe (Map.Map String Text) + +instance Arbitrary IPAM where + arbitrary = sized genIPAM + +genIPAM :: Int -> Gen IPAM +genIPAM n = + IPAM + <$> arbitraryReducedMaybe n -- iPAMDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- iPAMConfig :: Maybe [IPAMConfig] + <*> arbitraryReducedMaybe n -- iPAMOptions :: Maybe (Map.Map String Text) + +instance Arbitrary IPAMConfig where + arbitrary = sized genIPAMConfig + +genIPAMConfig :: Int -> Gen IPAMConfig +genIPAMConfig n = + IPAMConfig + <$> arbitraryReducedMaybe n -- iPAMConfigSubnet :: Maybe Text + <*> arbitraryReducedMaybe n -- iPAMConfigIpRange :: Maybe Text + <*> arbitraryReducedMaybe n -- iPAMConfigGateway :: Maybe Text + <*> arbitraryReducedMaybe n -- iPAMConfigAuxiliaryAddresses :: Maybe (Map.Map String Text) + +instance Arbitrary IdResponse where + arbitrary = sized genIdResponse + +genIdResponse :: Int -> Gen IdResponse +genIdResponse n = + IdResponse + <$> arbitrary -- idResponseId :: Text + +instance Arbitrary ImageConfig where + arbitrary = sized genImageConfig + +genImageConfig :: Int -> Gen ImageConfig +genImageConfig n = + ImageConfig + <$> arbitraryReducedMaybe n -- imageConfigHostname :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigDomainname :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigUser :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigAttachStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigAttachStdout :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigAttachStderr :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigExposedPorts :: Maybe (Map.Map String A.Value) + <*> arbitraryReducedMaybe n -- imageConfigTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigOpenStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigStdinOnce :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigEnv :: Maybe [Text] + <*> arbitraryReducedMaybe n -- imageConfigCmd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- imageConfigHealthcheck :: Maybe HealthConfig + <*> arbitraryReducedMaybe n -- imageConfigArgsEscaped :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigImage :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigVolumes :: Maybe (Map.Map String A.Value) + <*> arbitraryReducedMaybe n -- imageConfigWorkingDir :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigEntrypoint :: Maybe [Text] + <*> arbitraryReducedMaybe n -- imageConfigNetworkDisabled :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigMacAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigOnBuild :: Maybe [Text] + <*> arbitraryReducedMaybe n -- imageConfigLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- imageConfigStopSignal :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigStopTimeout :: Maybe Int + <*> arbitraryReducedMaybe n -- imageConfigShell :: Maybe [Text] + +instance Arbitrary ImageDeleteResponseItem where + arbitrary = sized genImageDeleteResponseItem + +genImageDeleteResponseItem :: Int -> Gen ImageDeleteResponseItem +genImageDeleteResponseItem n = + ImageDeleteResponseItem + <$> arbitraryReducedMaybe n -- imageDeleteResponseItemUntagged :: Maybe Text + <*> arbitraryReducedMaybe n -- imageDeleteResponseItemDeleted :: Maybe Text + +instance Arbitrary ImageID where + arbitrary = sized genImageID + +genImageID :: Int -> Gen ImageID +genImageID n = + ImageID + <$> arbitraryReducedMaybe n -- imageIDId :: Maybe Text + +instance Arbitrary ImageInspect where + arbitrary = sized genImageInspect + +genImageInspect :: Int -> Gen ImageInspect +genImageInspect n = + ImageInspect + <$> arbitraryReducedMaybe n -- imageInspectId :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectRepoTags :: Maybe [Text] + <*> arbitraryReducedMaybe n -- imageInspectRepoDigests :: Maybe [Text] + <*> arbitraryReducedMaybe n -- imageInspectParent :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectComment :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectCreated :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectDockerVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectAuthor :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectConfig :: Maybe ImageConfig + <*> arbitraryReducedMaybe n -- imageInspectArchitecture :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectVariant :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectOs :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectOsVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectSize :: Maybe Integer + <*> arbitraryReducedMaybe n -- imageInspectVirtualSize :: Maybe Integer + <*> arbitraryReducedMaybe n -- imageInspectGraphDriver :: Maybe GraphDriverData + <*> arbitraryReducedMaybe n -- imageInspectRootFs :: Maybe ImageInspectRootFS + <*> arbitraryReducedMaybe n -- imageInspectMetadata :: Maybe ImageInspectMetadata + +instance Arbitrary ImageInspectMetadata where + arbitrary = sized genImageInspectMetadata + +genImageInspectMetadata :: Int -> Gen ImageInspectMetadata +genImageInspectMetadata n = + ImageInspectMetadata + <$> arbitraryReducedMaybe n -- imageInspectMetadataLastTagTime :: Maybe Text + +instance Arbitrary ImageInspectRootFS where + arbitrary = sized genImageInspectRootFS + +genImageInspectRootFS :: Int -> Gen ImageInspectRootFS +genImageInspectRootFS n = + ImageInspectRootFS + <$> arbitrary -- imageInspectRootFSType :: Text + <*> arbitraryReducedMaybe n -- imageInspectRootFSLayers :: Maybe [Text] + +instance Arbitrary ImagePruneResponse where + arbitrary = sized genImagePruneResponse + +genImagePruneResponse :: Int -> Gen ImagePruneResponse +genImagePruneResponse n = + ImagePruneResponse + <$> arbitraryReducedMaybe n -- imagePruneResponseImagesDeleted :: Maybe [ImageDeleteResponseItem] + <*> arbitraryReducedMaybe n -- imagePruneResponseSpaceReclaimed :: Maybe Integer + +instance Arbitrary ImageSearchResponseItem where + arbitrary = sized genImageSearchResponseItem + +genImageSearchResponseItem :: Int -> Gen ImageSearchResponseItem +genImageSearchResponseItem n = + ImageSearchResponseItem + <$> arbitraryReducedMaybe n -- imageSearchResponseItemDescription :: Maybe Text + <*> arbitraryReducedMaybe n -- imageSearchResponseItemIsOfficial :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageSearchResponseItemIsAutomated :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageSearchResponseItemName :: Maybe Text + <*> arbitraryReducedMaybe n -- imageSearchResponseItemStarCount :: Maybe Int + +instance Arbitrary ImageSummary where + arbitrary = sized genImageSummary + +genImageSummary :: Int -> Gen ImageSummary +genImageSummary n = + ImageSummary + <$> arbitrary -- imageSummaryId :: Text + <*> arbitrary -- imageSummaryParentId :: Text + <*> arbitrary -- imageSummaryRepoTags :: [Text] + <*> arbitrary -- imageSummaryRepoDigests :: [Text] + <*> arbitrary -- imageSummaryCreated :: Int + <*> arbitrary -- imageSummarySize :: Integer + <*> arbitrary -- imageSummarySharedSize :: Integer + <*> arbitraryReducedMaybe n -- imageSummaryVirtualSize :: Maybe Integer + <*> arbitrary -- imageSummaryLabels :: (Map.Map String Text) + <*> arbitrary -- imageSummaryContainers :: Int + +instance Arbitrary IndexInfo where + arbitrary = sized genIndexInfo + +genIndexInfo :: Int -> Gen IndexInfo +genIndexInfo n = + IndexInfo + <$> arbitraryReducedMaybe n -- indexInfoName :: Maybe Text + <*> arbitraryReducedMaybe n -- indexInfoMirrors :: Maybe [Text] + <*> arbitraryReducedMaybe n -- indexInfoSecure :: Maybe Bool + <*> arbitraryReducedMaybe n -- indexInfoOfficial :: Maybe Bool + +instance Arbitrary JoinTokens where + arbitrary = sized genJoinTokens + +genJoinTokens :: Int -> Gen JoinTokens +genJoinTokens n = + JoinTokens + <$> arbitraryReducedMaybe n -- joinTokensWorker :: Maybe Text + <*> arbitraryReducedMaybe n -- joinTokensManager :: Maybe Text + +instance Arbitrary Limit where + arbitrary = sized genLimit + +genLimit :: Int -> Gen Limit +genLimit n = + Limit + <$> arbitraryReducedMaybe n -- limitNanoCpus :: Maybe Integer + <*> arbitraryReducedMaybe n -- limitMemoryBytes :: Maybe Integer + <*> arbitraryReducedMaybe n -- limitPids :: Maybe Integer + +instance Arbitrary ManagerStatus where + arbitrary = sized genManagerStatus + +genManagerStatus :: Int -> Gen ManagerStatus +genManagerStatus n = + ManagerStatus + <$> arbitraryReducedMaybe n -- managerStatusLeader :: Maybe Bool + <*> arbitraryReducedMaybe n -- managerStatusReachability :: Maybe Reachability + <*> arbitraryReducedMaybe n -- managerStatusAddr :: Maybe Text + +instance Arbitrary Mount where + arbitrary = sized genMount + +genMount :: Int -> Gen Mount +genMount n = + Mount + <$> arbitraryReducedMaybe n -- mountTarget :: Maybe Text + <*> arbitraryReducedMaybe n -- mountSource :: Maybe Text + <*> arbitraryReducedMaybe n -- mountType :: Maybe E'Type2 + <*> arbitraryReducedMaybe n -- mountReadOnly :: Maybe Bool + <*> arbitraryReducedMaybe n -- mountConsistency :: Maybe Text + <*> arbitraryReducedMaybe n -- mountBindOptions :: Maybe MountBindOptions + <*> arbitraryReducedMaybe n -- mountVolumeOptions :: Maybe MountVolumeOptions + <*> arbitraryReducedMaybe n -- mountTmpfsOptions :: Maybe MountTmpfsOptions + +instance Arbitrary MountBindOptions where + arbitrary = sized genMountBindOptions + +genMountBindOptions :: Int -> Gen MountBindOptions +genMountBindOptions n = + MountBindOptions + <$> arbitraryReducedMaybe n -- mountBindOptionsPropagation :: Maybe E'Propagation + <*> arbitraryReducedMaybe n -- mountBindOptionsNonRecursive :: Maybe Bool + <*> arbitraryReducedMaybe n -- mountBindOptionsCreateMountpoint :: Maybe Bool + <*> arbitraryReducedMaybe n -- mountBindOptionsReadOnlyNonRecursive :: Maybe Bool + <*> arbitraryReducedMaybe n -- mountBindOptionsReadOnlyForceRecursive :: Maybe Bool + +instance Arbitrary MountPoint where + arbitrary = sized genMountPoint + +genMountPoint :: Int -> Gen MountPoint +genMountPoint n = + MountPoint + <$> arbitraryReducedMaybe n -- mountPointType :: Maybe E'Type2 + <*> arbitraryReducedMaybe n -- mountPointName :: Maybe Text + <*> arbitraryReducedMaybe n -- mountPointSource :: Maybe Text + <*> arbitraryReducedMaybe n -- mountPointDestination :: Maybe Text + <*> arbitraryReducedMaybe n -- mountPointDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- mountPointMode :: Maybe Text + <*> arbitraryReducedMaybe n -- mountPointRw :: Maybe Bool + <*> arbitraryReducedMaybe n -- mountPointPropagation :: Maybe Text + +instance Arbitrary MountTmpfsOptions where + arbitrary = sized genMountTmpfsOptions + +genMountTmpfsOptions :: Int -> Gen MountTmpfsOptions +genMountTmpfsOptions n = + MountTmpfsOptions + <$> arbitraryReducedMaybe n -- mountTmpfsOptionsSizeBytes :: Maybe Integer + <*> arbitraryReducedMaybe n -- mountTmpfsOptionsMode :: Maybe Int + +instance Arbitrary MountVolumeOptions where + arbitrary = sized genMountVolumeOptions + +genMountVolumeOptions :: Int -> Gen MountVolumeOptions +genMountVolumeOptions n = + MountVolumeOptions + <$> arbitraryReducedMaybe n -- mountVolumeOptionsNoCopy :: Maybe Bool + <*> arbitraryReducedMaybe n -- mountVolumeOptionsLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- mountVolumeOptionsDriverConfig :: Maybe MountVolumeOptionsDriverConfig + <*> arbitraryReducedMaybe n -- mountVolumeOptionsSubpath :: Maybe Text + +instance Arbitrary MountVolumeOptionsDriverConfig where + arbitrary = sized genMountVolumeOptionsDriverConfig + +genMountVolumeOptionsDriverConfig :: Int -> Gen MountVolumeOptionsDriverConfig +genMountVolumeOptionsDriverConfig n = + MountVolumeOptionsDriverConfig + <$> arbitraryReducedMaybe n -- mountVolumeOptionsDriverConfigName :: Maybe Text + <*> arbitraryReducedMaybe n -- mountVolumeOptionsDriverConfigOptions :: Maybe (Map.Map String Text) + +instance Arbitrary Network where + arbitrary = sized genNetwork + +genNetwork :: Int -> Gen Network +genNetwork n = + Network + <$> arbitraryReducedMaybe n -- networkName :: Maybe Text + <*> arbitraryReducedMaybe n -- networkId :: Maybe Text + <*> arbitraryReducedMaybe n -- networkCreated :: Maybe Text + <*> arbitraryReducedMaybe n -- networkScope :: Maybe Text + <*> arbitraryReducedMaybe n -- networkDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- networkEnableIpv6 :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkIpam :: Maybe IPAM + <*> arbitraryReducedMaybe n -- networkInternal :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkAttachable :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkIngress :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkConfigFrom :: Maybe ConfigReference + <*> arbitraryReducedMaybe n -- networkConfigOnly :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkContainers :: Maybe (Map.Map String NetworkContainer) + <*> arbitraryReducedMaybe n -- networkOptions :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- networkLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- networkPeers :: Maybe [PeerInfo] + +instance Arbitrary NetworkAttachmentConfig where + arbitrary = sized genNetworkAttachmentConfig + +genNetworkAttachmentConfig :: Int -> Gen NetworkAttachmentConfig +genNetworkAttachmentConfig n = + NetworkAttachmentConfig + <$> arbitraryReducedMaybe n -- networkAttachmentConfigTarget :: Maybe Text + <*> arbitraryReducedMaybe n -- networkAttachmentConfigAliases :: Maybe [Text] + <*> arbitraryReducedMaybe n -- networkAttachmentConfigDriverOpts :: Maybe (Map.Map String Text) + +instance Arbitrary NetworkConnectRequest where + arbitrary = sized genNetworkConnectRequest + +genNetworkConnectRequest :: Int -> Gen NetworkConnectRequest +genNetworkConnectRequest n = + NetworkConnectRequest + <$> arbitraryReducedMaybe n -- networkConnectRequestContainer :: Maybe Text + <*> arbitraryReducedMaybe n -- networkConnectRequestEndpointConfig :: Maybe EndpointSettings + +instance Arbitrary NetworkContainer where + arbitrary = sized genNetworkContainer + +genNetworkContainer :: Int -> Gen NetworkContainer +genNetworkContainer n = + NetworkContainer + <$> arbitraryReducedMaybe n -- networkContainerName :: Maybe Text + <*> arbitraryReducedMaybe n -- networkContainerEndpointId :: Maybe Text + <*> arbitraryReducedMaybe n -- networkContainerMacAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- networkContainerIpv4Address :: Maybe Text + <*> arbitraryReducedMaybe n -- networkContainerIpv6Address :: Maybe Text + +instance Arbitrary NetworkCreateRequest where + arbitrary = sized genNetworkCreateRequest + +genNetworkCreateRequest :: Int -> Gen NetworkCreateRequest +genNetworkCreateRequest n = + NetworkCreateRequest + <$> arbitrary -- networkCreateRequestName :: Text + <*> arbitraryReducedMaybe n -- networkCreateRequestCheckDuplicate :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkCreateRequestDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- networkCreateRequestScope :: Maybe Text + <*> arbitraryReducedMaybe n -- networkCreateRequestInternal :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkCreateRequestAttachable :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkCreateRequestIngress :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkCreateRequestConfigOnly :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkCreateRequestConfigFrom :: Maybe ConfigReference + <*> arbitraryReducedMaybe n -- networkCreateRequestIpam :: Maybe IPAM + <*> arbitraryReducedMaybe n -- networkCreateRequestEnableIpv6 :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkCreateRequestOptions :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- networkCreateRequestLabels :: Maybe (Map.Map String Text) + +instance Arbitrary NetworkCreateResponse where + arbitrary = sized genNetworkCreateResponse + +genNetworkCreateResponse :: Int -> Gen NetworkCreateResponse +genNetworkCreateResponse n = + NetworkCreateResponse + <$> arbitraryReducedMaybe n -- networkCreateResponseId :: Maybe Text + <*> arbitraryReducedMaybe n -- networkCreateResponseWarning :: Maybe Text + +instance Arbitrary NetworkDisconnectRequest where + arbitrary = sized genNetworkDisconnectRequest + +genNetworkDisconnectRequest :: Int -> Gen NetworkDisconnectRequest +genNetworkDisconnectRequest n = + NetworkDisconnectRequest + <$> arbitraryReducedMaybe n -- networkDisconnectRequestContainer :: Maybe Text + <*> arbitraryReducedMaybe n -- networkDisconnectRequestForce :: Maybe Bool + +instance Arbitrary NetworkPruneResponse where + arbitrary = sized genNetworkPruneResponse + +genNetworkPruneResponse :: Int -> Gen NetworkPruneResponse +genNetworkPruneResponse n = + NetworkPruneResponse + <$> arbitraryReducedMaybe n -- networkPruneResponseNetworksDeleted :: Maybe [Text] + +instance Arbitrary NetworkSettings where + arbitrary = sized genNetworkSettings + +genNetworkSettings :: Int -> Gen NetworkSettings +genNetworkSettings n = + NetworkSettings + <$> arbitraryReducedMaybe n -- networkSettingsBridge :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsSandboxId :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsHairpinMode :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkSettingsLinkLocalIpv6Address :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsLinkLocalIpv6PrefixLen :: Maybe Int + <*> arbitraryReducedMaybe n -- networkSettingsPorts :: Maybe (Map.Map String [PortBinding]) + <*> arbitraryReducedMaybe n -- networkSettingsSandboxKey :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsSecondaryIpAddresses :: Maybe [Address] + <*> arbitraryReducedMaybe n -- networkSettingsSecondaryIpv6Addresses :: Maybe [Address] + <*> arbitraryReducedMaybe n -- networkSettingsEndpointId :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsGateway :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsGlobalIpv6Address :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsGlobalIpv6PrefixLen :: Maybe Int + <*> arbitraryReducedMaybe n -- networkSettingsIpAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsIpPrefixLen :: Maybe Int + <*> arbitraryReducedMaybe n -- networkSettingsIpv6Gateway :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsMacAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsNetworks :: Maybe (Map.Map String EndpointSettings) + +instance Arbitrary NetworkingConfig where + arbitrary = sized genNetworkingConfig + +genNetworkingConfig :: Int -> Gen NetworkingConfig +genNetworkingConfig n = + NetworkingConfig + <$> arbitraryReducedMaybe n -- networkingConfigEndpointsConfig :: Maybe (Map.Map String EndpointSettings) + +instance Arbitrary Node where + arbitrary = sized genNode + +genNode :: Int -> Gen Node +genNode n = + Node + <$> arbitraryReducedMaybe n -- nodeId :: Maybe Text + <*> arbitraryReducedMaybe n -- nodeVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- nodeCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- nodeUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- nodeSpec :: Maybe NodeSpec + <*> arbitraryReducedMaybe n -- nodeDescription :: Maybe NodeDescription + <*> arbitraryReducedMaybe n -- nodeStatus :: Maybe NodeStatus + <*> arbitraryReducedMaybe n -- nodeManagerStatus :: Maybe ManagerStatus + +instance Arbitrary NodeDescription where + arbitrary = sized genNodeDescription + +genNodeDescription :: Int -> Gen NodeDescription +genNodeDescription n = + NodeDescription + <$> arbitraryReducedMaybe n -- nodeDescriptionHostname :: Maybe Text + <*> arbitraryReducedMaybe n -- nodeDescriptionPlatform :: Maybe Platform + <*> arbitraryReducedMaybe n -- nodeDescriptionResources :: Maybe ResourceObject + <*> arbitraryReducedMaybe n -- nodeDescriptionEngine :: Maybe EngineDescription + <*> arbitraryReducedMaybe n -- nodeDescriptionTlsInfo :: Maybe TLSInfo + +instance Arbitrary NodeSpec where + arbitrary = sized genNodeSpec + +genNodeSpec :: Int -> Gen NodeSpec +genNodeSpec n = + NodeSpec + <$> arbitraryReducedMaybe n -- nodeSpecName :: Maybe Text + <*> arbitraryReducedMaybe n -- nodeSpecLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- nodeSpecRole :: Maybe E'Role + <*> arbitraryReducedMaybe n -- nodeSpecAvailability :: Maybe E'Availability + +instance Arbitrary NodeStatus where + arbitrary = sized genNodeStatus + +genNodeStatus :: Int -> Gen NodeStatus +genNodeStatus n = + NodeStatus + <$> arbitraryReducedMaybe n -- nodeStatusState :: Maybe NodeState + <*> arbitraryReducedMaybe n -- nodeStatusMessage :: Maybe Text + <*> arbitraryReducedMaybe n -- nodeStatusAddr :: Maybe Text + +instance Arbitrary OCIDescriptor where + arbitrary = sized genOCIDescriptor + +genOCIDescriptor :: Int -> Gen OCIDescriptor +genOCIDescriptor n = + OCIDescriptor + <$> arbitraryReducedMaybe n -- oCIDescriptorMediaType :: Maybe Text + <*> arbitraryReducedMaybe n -- oCIDescriptorDigest :: Maybe Text + <*> arbitraryReducedMaybe n -- oCIDescriptorSize :: Maybe Integer + +instance Arbitrary OCIPlatform where + arbitrary = sized genOCIPlatform + +genOCIPlatform :: Int -> Gen OCIPlatform +genOCIPlatform n = + OCIPlatform + <$> arbitraryReducedMaybe n -- oCIPlatformArchitecture :: Maybe Text + <*> arbitraryReducedMaybe n -- oCIPlatformOs :: Maybe Text + <*> arbitraryReducedMaybe n -- oCIPlatformOsVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- oCIPlatformOsFeatures :: Maybe [Text] + <*> arbitraryReducedMaybe n -- oCIPlatformVariant :: Maybe Text + +instance Arbitrary ObjectVersion where + arbitrary = sized genObjectVersion + +genObjectVersion :: Int -> Gen ObjectVersion +genObjectVersion n = + ObjectVersion + <$> arbitraryReducedMaybe n -- objectVersionIndex :: Maybe Int + +instance Arbitrary PeerInfo where + arbitrary = sized genPeerInfo + +genPeerInfo :: Int -> Gen PeerInfo +genPeerInfo n = + PeerInfo + <$> arbitraryReducedMaybe n -- peerInfoName :: Maybe Text + <*> arbitraryReducedMaybe n -- peerInfoIp :: Maybe Text + +instance Arbitrary PeerNode where + arbitrary = sized genPeerNode + +genPeerNode :: Int -> Gen PeerNode +genPeerNode n = + PeerNode + <$> arbitraryReducedMaybe n -- peerNodeNodeId :: Maybe Text + <*> arbitraryReducedMaybe n -- peerNodeAddr :: Maybe Text + +instance Arbitrary Platform where + arbitrary = sized genPlatform + +genPlatform :: Int -> Gen Platform +genPlatform n = + Platform + <$> arbitraryReducedMaybe n -- platformArchitecture :: Maybe Text + <*> arbitraryReducedMaybe n -- platformOs :: Maybe Text + +instance Arbitrary Plugin where + arbitrary = sized genPlugin + +genPlugin :: Int -> Gen Plugin +genPlugin n = + Plugin + <$> arbitraryReducedMaybe n -- pluginId :: Maybe Text + <*> arbitrary -- pluginName :: Text + <*> arbitrary -- pluginEnabled :: Bool + <*> arbitraryReduced n -- pluginSettings :: PluginSettings + <*> arbitraryReducedMaybe n -- pluginPluginReference :: Maybe Text + <*> arbitraryReduced n -- pluginConfig :: PluginConfig + +instance Arbitrary PluginConfig where + arbitrary = sized genPluginConfig + +genPluginConfig :: Int -> Gen PluginConfig +genPluginConfig n = + PluginConfig + <$> arbitraryReducedMaybe n -- pluginConfigDockerVersion :: Maybe Text + <*> arbitrary -- pluginConfigDescription :: Text + <*> arbitrary -- pluginConfigDocumentation :: Text + <*> arbitraryReduced n -- pluginConfigInterface :: PluginConfigInterface + <*> arbitrary -- pluginConfigEntrypoint :: [Text] + <*> arbitrary -- pluginConfigWorkDir :: Text + <*> arbitraryReducedMaybe n -- pluginConfigUser :: Maybe PluginConfigUser + <*> arbitraryReduced n -- pluginConfigNetwork :: PluginConfigNetwork + <*> arbitraryReduced n -- pluginConfigLinux :: PluginConfigLinux + <*> arbitrary -- pluginConfigPropagatedMount :: Text + <*> arbitrary -- pluginConfigIpcHost :: Bool + <*> arbitrary -- pluginConfigPidHost :: Bool + <*> arbitraryReduced n -- pluginConfigMounts :: [PluginMount] + <*> arbitraryReduced n -- pluginConfigEnv :: [PluginEnv] + <*> arbitraryReduced n -- pluginConfigArgs :: PluginConfigArgs + <*> arbitraryReducedMaybe n -- pluginConfigRootfs :: Maybe PluginConfigRootfs + +instance Arbitrary PluginConfigArgs where + arbitrary = sized genPluginConfigArgs + +genPluginConfigArgs :: Int -> Gen PluginConfigArgs +genPluginConfigArgs n = + PluginConfigArgs + <$> arbitrary -- pluginConfigArgsName :: Text + <*> arbitrary -- pluginConfigArgsDescription :: Text + <*> arbitrary -- pluginConfigArgsSettable :: [Text] + <*> arbitrary -- pluginConfigArgsValue :: [Text] + +instance Arbitrary PluginConfigInterface where + arbitrary = sized genPluginConfigInterface + +genPluginConfigInterface :: Int -> Gen PluginConfigInterface +genPluginConfigInterface n = + PluginConfigInterface + <$> arbitraryReduced n -- pluginConfigInterfaceTypes :: [PluginInterfaceType] + <*> arbitrary -- pluginConfigInterfaceSocket :: Text + <*> arbitraryReducedMaybe n -- pluginConfigInterfaceProtocolScheme :: Maybe E'ProtocolScheme + +instance Arbitrary PluginConfigLinux where + arbitrary = sized genPluginConfigLinux + +genPluginConfigLinux :: Int -> Gen PluginConfigLinux +genPluginConfigLinux n = + PluginConfigLinux + <$> arbitrary -- pluginConfigLinuxCapabilities :: [Text] + <*> arbitrary -- pluginConfigLinuxAllowAllDevices :: Bool + <*> arbitraryReduced n -- pluginConfigLinuxDevices :: [PluginDevice] + +instance Arbitrary PluginConfigNetwork where + arbitrary = sized genPluginConfigNetwork + +genPluginConfigNetwork :: Int -> Gen PluginConfigNetwork +genPluginConfigNetwork n = + PluginConfigNetwork + <$> arbitrary -- pluginConfigNetworkType :: Text + +instance Arbitrary PluginConfigRootfs where + arbitrary = sized genPluginConfigRootfs + +genPluginConfigRootfs :: Int -> Gen PluginConfigRootfs +genPluginConfigRootfs n = + PluginConfigRootfs + <$> arbitraryReducedMaybe n -- pluginConfigRootfsType :: Maybe Text + <*> arbitraryReducedMaybe n -- pluginConfigRootfsDiffIds :: Maybe [Text] + +instance Arbitrary PluginConfigUser where + arbitrary = sized genPluginConfigUser + +genPluginConfigUser :: Int -> Gen PluginConfigUser +genPluginConfigUser n = + PluginConfigUser + <$> arbitraryReducedMaybe n -- pluginConfigUserUid :: Maybe Int + <*> arbitraryReducedMaybe n -- pluginConfigUserGid :: Maybe Int + +instance Arbitrary PluginDevice where + arbitrary = sized genPluginDevice + +genPluginDevice :: Int -> Gen PluginDevice +genPluginDevice n = + PluginDevice + <$> arbitrary -- pluginDeviceName :: Text + <*> arbitrary -- pluginDeviceDescription :: Text + <*> arbitrary -- pluginDeviceSettable :: [Text] + <*> arbitrary -- pluginDevicePath :: Text + +instance Arbitrary PluginEnv where + arbitrary = sized genPluginEnv + +genPluginEnv :: Int -> Gen PluginEnv +genPluginEnv n = + PluginEnv + <$> arbitrary -- pluginEnvName :: Text + <*> arbitrary -- pluginEnvDescription :: Text + <*> arbitrary -- pluginEnvSettable :: [Text] + <*> arbitrary -- pluginEnvValue :: Text + +instance Arbitrary PluginInterfaceType where + arbitrary = sized genPluginInterfaceType + +genPluginInterfaceType :: Int -> Gen PluginInterfaceType +genPluginInterfaceType n = + PluginInterfaceType + <$> arbitrary -- pluginInterfaceTypePrefix :: Text + <*> arbitrary -- pluginInterfaceTypeCapability :: Text + <*> arbitrary -- pluginInterfaceTypeVersion :: Text + +instance Arbitrary PluginMount where + arbitrary = sized genPluginMount + +genPluginMount :: Int -> Gen PluginMount +genPluginMount n = + PluginMount + <$> arbitrary -- pluginMountName :: Text + <*> arbitrary -- pluginMountDescription :: Text + <*> arbitrary -- pluginMountSettable :: [Text] + <*> arbitrary -- pluginMountSource :: Text + <*> arbitrary -- pluginMountDestination :: Text + <*> arbitrary -- pluginMountType :: Text + <*> arbitrary -- pluginMountOptions :: [Text] + +instance Arbitrary PluginPrivilege where + arbitrary = sized genPluginPrivilege + +genPluginPrivilege :: Int -> Gen PluginPrivilege +genPluginPrivilege n = + PluginPrivilege + <$> arbitraryReducedMaybe n -- pluginPrivilegeName :: Maybe Text + <*> arbitraryReducedMaybe n -- pluginPrivilegeDescription :: Maybe Text + <*> arbitraryReducedMaybe n -- pluginPrivilegeValue :: Maybe [Text] + +instance Arbitrary PluginSettings where + arbitrary = sized genPluginSettings + +genPluginSettings :: Int -> Gen PluginSettings +genPluginSettings n = + PluginSettings + <$> arbitraryReduced n -- pluginSettingsMounts :: [PluginMount] + <*> arbitrary -- pluginSettingsEnv :: [Text] + <*> arbitrary -- pluginSettingsArgs :: [Text] + <*> arbitraryReduced n -- pluginSettingsDevices :: [PluginDevice] + +instance Arbitrary PluginsInfo where + arbitrary = sized genPluginsInfo + +genPluginsInfo :: Int -> Gen PluginsInfo +genPluginsInfo n = + PluginsInfo + <$> arbitraryReducedMaybe n -- pluginsInfoVolume :: Maybe [Text] + <*> arbitraryReducedMaybe n -- pluginsInfoNetwork :: Maybe [Text] + <*> arbitraryReducedMaybe n -- pluginsInfoAuthorization :: Maybe [Text] + <*> arbitraryReducedMaybe n -- pluginsInfoLog :: Maybe [Text] + +instance Arbitrary Port where + arbitrary = sized genPort + +genPort :: Int -> Gen Port +genPort n = + Port + <$> arbitraryReducedMaybe n -- portIp :: Maybe Text + <*> arbitrary -- portPrivatePort :: Int + <*> arbitraryReducedMaybe n -- portPublicPort :: Maybe Int + <*> arbitrary -- portType :: E'Type + +instance Arbitrary PortBinding where + arbitrary = sized genPortBinding + +genPortBinding :: Int -> Gen PortBinding +genPortBinding n = + PortBinding + <$> arbitraryReducedMaybe n -- portBindingHostIp :: Maybe Text + <*> arbitraryReducedMaybe n -- portBindingHostPort :: Maybe Text + +instance Arbitrary PortStatus where + arbitrary = sized genPortStatus + +genPortStatus :: Int -> Gen PortStatus +genPortStatus n = + PortStatus + <$> arbitraryReducedMaybe n -- portStatusPorts :: Maybe [EndpointPortConfig] + +instance Arbitrary ProcessConfig where + arbitrary = sized genProcessConfig + +genProcessConfig :: Int -> Gen ProcessConfig +genProcessConfig n = + ProcessConfig + <$> arbitraryReducedMaybe n -- processConfigPrivileged :: Maybe Bool + <*> arbitraryReducedMaybe n -- processConfigUser :: Maybe Text + <*> arbitraryReducedMaybe n -- processConfigTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- processConfigEntrypoint :: Maybe Text + <*> arbitraryReducedMaybe n -- processConfigArguments :: Maybe [Text] + +instance Arbitrary ProgressDetail where + arbitrary = sized genProgressDetail + +genProgressDetail :: Int -> Gen ProgressDetail +genProgressDetail n = + ProgressDetail + <$> arbitraryReducedMaybe n -- progressDetailCurrent :: Maybe Int + <*> arbitraryReducedMaybe n -- progressDetailTotal :: Maybe Int + +instance Arbitrary PushImageInfo where + arbitrary = sized genPushImageInfo + +genPushImageInfo :: Int -> Gen PushImageInfo +genPushImageInfo n = + PushImageInfo + <$> arbitraryReducedMaybe n -- pushImageInfoError :: Maybe Text + <*> arbitraryReducedMaybe n -- pushImageInfoStatus :: Maybe Text + <*> arbitraryReducedMaybe n -- pushImageInfoProgress :: Maybe Text + <*> arbitraryReducedMaybe n -- pushImageInfoProgressDetail :: Maybe ProgressDetail + +instance Arbitrary RegistryServiceConfig where + arbitrary = sized genRegistryServiceConfig + +genRegistryServiceConfig :: Int -> Gen RegistryServiceConfig +genRegistryServiceConfig n = + RegistryServiceConfig + <$> arbitraryReducedMaybe n -- registryServiceConfigAllowNondistributableArtifactsCidrs :: Maybe [Text] + <*> arbitraryReducedMaybe n -- registryServiceConfigAllowNondistributableArtifactsHostnames :: Maybe [Text] + <*> arbitraryReducedMaybe n -- registryServiceConfigInsecureRegistryCidrs :: Maybe [Text] + <*> arbitraryReducedMaybe n -- registryServiceConfigIndexConfigs :: Maybe (Map.Map String IndexInfo) + <*> arbitraryReducedMaybe n -- registryServiceConfigMirrors :: Maybe [Text] + +instance Arbitrary ResourceObject where + arbitrary = sized genResourceObject + +genResourceObject :: Int -> Gen ResourceObject +genResourceObject n = + ResourceObject + <$> arbitraryReducedMaybe n -- resourceObjectNanoCpus :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourceObjectMemoryBytes :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourceObjectGenericResources :: Maybe [GenericResourcesInner] + +instance Arbitrary Resources where + arbitrary = sized genResources + +genResources :: Int -> Gen Resources +genResources n = + Resources + <$> arbitraryReducedMaybe n -- resourcesCpuShares :: Maybe Int + <*> arbitraryReducedMaybe n -- resourcesMemory :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesCgroupParent :: Maybe Text + <*> arbitraryReducedMaybe n -- resourcesBlkioWeight :: Maybe Int + <*> arbitraryReducedMaybe n -- resourcesBlkioWeightDevice :: Maybe [ResourcesBlkioWeightDeviceInner] + <*> arbitraryReducedMaybe n -- resourcesBlkioDeviceReadBps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- resourcesBlkioDeviceWriteBps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- resourcesBlkioDeviceReadIOps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- resourcesBlkioDeviceWriteIOps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- resourcesCpuPeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesCpuQuota :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesCpuRealtimePeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesCpuRealtimeRuntime :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesCpusetCpus :: Maybe Text + <*> arbitraryReducedMaybe n -- resourcesCpusetMems :: Maybe Text + <*> arbitraryReducedMaybe n -- resourcesDevices :: Maybe [DeviceMapping] + <*> arbitraryReducedMaybe n -- resourcesDeviceCgroupRules :: Maybe [Text] + <*> arbitraryReducedMaybe n -- resourcesDeviceRequests :: Maybe [DeviceRequest] + <*> arbitraryReducedMaybe n -- resourcesKernelMemoryTcp :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesMemoryReservation :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesMemorySwap :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesMemorySwappiness :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesNanoCpus :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesOomKillDisable :: Maybe Bool + <*> arbitraryReducedMaybe n -- resourcesInit :: Maybe Bool + <*> arbitraryReducedMaybe n -- resourcesPidsLimit :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesUlimits :: Maybe [ResourcesUlimitsInner] + <*> arbitraryReducedMaybe n -- resourcesCpuCount :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesCpuPercent :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesIoMaximumIOps :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesIoMaximumBandwidth :: Maybe Integer + +instance Arbitrary ResourcesBlkioWeightDeviceInner where + arbitrary = sized genResourcesBlkioWeightDeviceInner + +genResourcesBlkioWeightDeviceInner :: Int -> Gen ResourcesBlkioWeightDeviceInner +genResourcesBlkioWeightDeviceInner n = + ResourcesBlkioWeightDeviceInner + <$> arbitraryReducedMaybe n -- resourcesBlkioWeightDeviceInnerPath :: Maybe Text + <*> arbitraryReducedMaybe n -- resourcesBlkioWeightDeviceInnerWeight :: Maybe Int + +instance Arbitrary ResourcesUlimitsInner where + arbitrary = sized genResourcesUlimitsInner + +genResourcesUlimitsInner :: Int -> Gen ResourcesUlimitsInner +genResourcesUlimitsInner n = + ResourcesUlimitsInner + <$> arbitraryReducedMaybe n -- resourcesUlimitsInnerName :: Maybe Text + <*> arbitraryReducedMaybe n -- resourcesUlimitsInnerSoft :: Maybe Int + <*> arbitraryReducedMaybe n -- resourcesUlimitsInnerHard :: Maybe Int + +instance Arbitrary RestartPolicy where + arbitrary = sized genRestartPolicy + +genRestartPolicy :: Int -> Gen RestartPolicy +genRestartPolicy n = + RestartPolicy + <$> arbitraryReducedMaybe n -- restartPolicyName :: Maybe E'Name + <*> arbitraryReducedMaybe n -- restartPolicyMaximumRetryCount :: Maybe Int + +instance Arbitrary Runtime where + arbitrary = sized genRuntime + +genRuntime :: Int -> Gen Runtime +genRuntime n = + Runtime + <$> arbitraryReducedMaybe n -- runtimePath :: Maybe Text + <*> arbitraryReducedMaybe n -- runtimeRuntimeArgs :: Maybe [Text] + <*> arbitraryReducedMaybe n -- runtimeStatus :: Maybe (Map.Map String Text) + +instance Arbitrary Secret where + arbitrary = sized genSecret + +genSecret :: Int -> Gen Secret +genSecret n = + Secret + <$> arbitraryReducedMaybe n -- secretId :: Maybe Text + <*> arbitraryReducedMaybe n -- secretVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- secretCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- secretUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- secretSpec :: Maybe SecretSpec + +instance Arbitrary SecretCreateRequest where + arbitrary = sized genSecretCreateRequest + +genSecretCreateRequest :: Int -> Gen SecretCreateRequest +genSecretCreateRequest n = + SecretCreateRequest + <$> arbitraryReducedMaybe n -- secretCreateRequestName :: Maybe Text + <*> arbitraryReducedMaybe n -- secretCreateRequestLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- secretCreateRequestData :: Maybe Text + <*> arbitraryReducedMaybe n -- secretCreateRequestDriver :: Maybe Driver + <*> arbitraryReducedMaybe n -- secretCreateRequestTemplating :: Maybe Driver + +instance Arbitrary SecretSpec where + arbitrary = sized genSecretSpec + +genSecretSpec :: Int -> Gen SecretSpec +genSecretSpec n = + SecretSpec + <$> arbitraryReducedMaybe n -- secretSpecName :: Maybe Text + <*> arbitraryReducedMaybe n -- secretSpecLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- secretSpecData :: Maybe Text + <*> arbitraryReducedMaybe n -- secretSpecDriver :: Maybe Driver + <*> arbitraryReducedMaybe n -- secretSpecTemplating :: Maybe Driver + +instance Arbitrary Service where + arbitrary = sized genService + +genService :: Int -> Gen Service +genService n = + Service + <$> arbitraryReducedMaybe n -- serviceId :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- serviceCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceSpec :: Maybe ServiceSpec + <*> arbitraryReducedMaybe n -- serviceEndpoint :: Maybe ServiceEndpoint + <*> arbitraryReducedMaybe n -- serviceUpdateStatus :: Maybe ServiceUpdateStatus + <*> arbitraryReducedMaybe n -- serviceServiceStatus :: Maybe ServiceServiceStatus + <*> arbitraryReducedMaybe n -- serviceJobStatus :: Maybe ServiceJobStatus + +instance Arbitrary ServiceCreateRequest where + arbitrary = sized genServiceCreateRequest + +genServiceCreateRequest :: Int -> Gen ServiceCreateRequest +genServiceCreateRequest n = + ServiceCreateRequest + <$> arbitraryReducedMaybe n -- serviceCreateRequestName :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceCreateRequestLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- serviceCreateRequestTaskTemplate :: Maybe TaskSpec + <*> arbitraryReducedMaybe n -- serviceCreateRequestMode :: Maybe ServiceSpecMode + <*> arbitraryReducedMaybe n -- serviceCreateRequestUpdateConfig :: Maybe ServiceSpecUpdateConfig + <*> arbitraryReducedMaybe n -- serviceCreateRequestRollbackConfig :: Maybe ServiceSpecRollbackConfig + <*> arbitraryReducedMaybe n -- serviceCreateRequestNetworks :: Maybe [NetworkAttachmentConfig] + <*> arbitraryReducedMaybe n -- serviceCreateRequestEndpointSpec :: Maybe EndpointSpec + +instance Arbitrary ServiceCreateResponse where + arbitrary = sized genServiceCreateResponse + +genServiceCreateResponse :: Int -> Gen ServiceCreateResponse +genServiceCreateResponse n = + ServiceCreateResponse + <$> arbitraryReducedMaybe n -- serviceCreateResponseId :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceCreateResponseWarnings :: Maybe [Text] + +instance Arbitrary ServiceEndpoint where + arbitrary = sized genServiceEndpoint + +genServiceEndpoint :: Int -> Gen ServiceEndpoint +genServiceEndpoint n = + ServiceEndpoint + <$> arbitraryReducedMaybe n -- serviceEndpointSpec :: Maybe EndpointSpec + <*> arbitraryReducedMaybe n -- serviceEndpointPorts :: Maybe [EndpointPortConfig] + <*> arbitraryReducedMaybe n -- serviceEndpointVirtualIps :: Maybe [ServiceEndpointVirtualIPsInner] + +instance Arbitrary ServiceEndpointVirtualIPsInner where + arbitrary = sized genServiceEndpointVirtualIPsInner + +genServiceEndpointVirtualIPsInner :: Int -> Gen ServiceEndpointVirtualIPsInner +genServiceEndpointVirtualIPsInner n = + ServiceEndpointVirtualIPsInner + <$> arbitraryReducedMaybe n -- serviceEndpointVirtualIPsInnerNetworkId :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceEndpointVirtualIPsInnerAddr :: Maybe Text + +instance Arbitrary ServiceJobStatus where + arbitrary = sized genServiceJobStatus + +genServiceJobStatus :: Int -> Gen ServiceJobStatus +genServiceJobStatus n = + ServiceJobStatus + <$> arbitraryReducedMaybe n -- serviceJobStatusJobIteration :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- serviceJobStatusLastExecution :: Maybe Text + +instance Arbitrary ServiceServiceStatus where + arbitrary = sized genServiceServiceStatus + +genServiceServiceStatus :: Int -> Gen ServiceServiceStatus +genServiceServiceStatus n = + ServiceServiceStatus + <$> arbitraryReducedMaybe n -- serviceServiceStatusRunningTasks :: Maybe Int + <*> arbitraryReducedMaybe n -- serviceServiceStatusDesiredTasks :: Maybe Int + <*> arbitraryReducedMaybe n -- serviceServiceStatusCompletedTasks :: Maybe Int + +instance Arbitrary ServiceSpec where + arbitrary = sized genServiceSpec + +genServiceSpec :: Int -> Gen ServiceSpec +genServiceSpec n = + ServiceSpec + <$> arbitraryReducedMaybe n -- serviceSpecName :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceSpecLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- serviceSpecTaskTemplate :: Maybe TaskSpec + <*> arbitraryReducedMaybe n -- serviceSpecMode :: Maybe ServiceSpecMode + <*> arbitraryReducedMaybe n -- serviceSpecUpdateConfig :: Maybe ServiceSpecUpdateConfig + <*> arbitraryReducedMaybe n -- serviceSpecRollbackConfig :: Maybe ServiceSpecRollbackConfig + <*> arbitraryReducedMaybe n -- serviceSpecNetworks :: Maybe [NetworkAttachmentConfig] + <*> arbitraryReducedMaybe n -- serviceSpecEndpointSpec :: Maybe EndpointSpec + +instance Arbitrary ServiceSpecMode where + arbitrary = sized genServiceSpecMode + +genServiceSpecMode :: Int -> Gen ServiceSpecMode +genServiceSpecMode n = + ServiceSpecMode + <$> arbitraryReducedMaybe n -- serviceSpecModeReplicated :: Maybe ServiceSpecModeReplicated + <*> arbitraryReducedMaybeValue n -- serviceSpecModeGlobal :: Maybe A.Value + <*> arbitraryReducedMaybe n -- serviceSpecModeReplicatedJob :: Maybe ServiceSpecModeReplicatedJob + <*> arbitraryReducedMaybeValue n -- serviceSpecModeGlobalJob :: Maybe A.Value + +instance Arbitrary ServiceSpecModeReplicated where + arbitrary = sized genServiceSpecModeReplicated + +genServiceSpecModeReplicated :: Int -> Gen ServiceSpecModeReplicated +genServiceSpecModeReplicated n = + ServiceSpecModeReplicated + <$> arbitraryReducedMaybe n -- serviceSpecModeReplicatedReplicas :: Maybe Integer + +instance Arbitrary ServiceSpecModeReplicatedJob where + arbitrary = sized genServiceSpecModeReplicatedJob + +genServiceSpecModeReplicatedJob :: Int -> Gen ServiceSpecModeReplicatedJob +genServiceSpecModeReplicatedJob n = + ServiceSpecModeReplicatedJob + <$> arbitraryReducedMaybe n -- serviceSpecModeReplicatedJobMaxConcurrent :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecModeReplicatedJobTotalCompletions :: Maybe Integer + +instance Arbitrary ServiceSpecRollbackConfig where + arbitrary = sized genServiceSpecRollbackConfig + +genServiceSpecRollbackConfig :: Int -> Gen ServiceSpecRollbackConfig +genServiceSpecRollbackConfig n = + ServiceSpecRollbackConfig + <$> arbitraryReducedMaybe n -- serviceSpecRollbackConfigParallelism :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecRollbackConfigDelay :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecRollbackConfigFailureAction :: Maybe E'FailureAction2 + <*> arbitraryReducedMaybe n -- serviceSpecRollbackConfigMonitor :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecRollbackConfigMaxFailureRatio :: Maybe Double + <*> arbitraryReducedMaybe n -- serviceSpecRollbackConfigOrder :: Maybe E'Order + +instance Arbitrary ServiceSpecUpdateConfig where + arbitrary = sized genServiceSpecUpdateConfig + +genServiceSpecUpdateConfig :: Int -> Gen ServiceSpecUpdateConfig +genServiceSpecUpdateConfig n = + ServiceSpecUpdateConfig + <$> arbitraryReducedMaybe n -- serviceSpecUpdateConfigParallelism :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecUpdateConfigDelay :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecUpdateConfigFailureAction :: Maybe E'FailureAction + <*> arbitraryReducedMaybe n -- serviceSpecUpdateConfigMonitor :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecUpdateConfigMaxFailureRatio :: Maybe Double + <*> arbitraryReducedMaybe n -- serviceSpecUpdateConfigOrder :: Maybe E'Order + +instance Arbitrary ServiceUpdateRequest where + arbitrary = sized genServiceUpdateRequest + +genServiceUpdateRequest :: Int -> Gen ServiceUpdateRequest +genServiceUpdateRequest n = + ServiceUpdateRequest + <$> arbitraryReducedMaybe n -- serviceUpdateRequestName :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceUpdateRequestLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- serviceUpdateRequestTaskTemplate :: Maybe TaskSpec + <*> arbitraryReducedMaybe n -- serviceUpdateRequestMode :: Maybe ServiceSpecMode + <*> arbitraryReducedMaybe n -- serviceUpdateRequestUpdateConfig :: Maybe ServiceSpecUpdateConfig + <*> arbitraryReducedMaybe n -- serviceUpdateRequestRollbackConfig :: Maybe ServiceSpecRollbackConfig + <*> arbitraryReducedMaybe n -- serviceUpdateRequestNetworks :: Maybe [NetworkAttachmentConfig] + <*> arbitraryReducedMaybe n -- serviceUpdateRequestEndpointSpec :: Maybe EndpointSpec + +instance Arbitrary ServiceUpdateResponse where + arbitrary = sized genServiceUpdateResponse + +genServiceUpdateResponse :: Int -> Gen ServiceUpdateResponse +genServiceUpdateResponse n = + ServiceUpdateResponse + <$> arbitraryReducedMaybe n -- serviceUpdateResponseWarnings :: Maybe [Text] + +instance Arbitrary ServiceUpdateStatus where + arbitrary = sized genServiceUpdateStatus + +genServiceUpdateStatus :: Int -> Gen ServiceUpdateStatus +genServiceUpdateStatus n = + ServiceUpdateStatus + <$> arbitraryReducedMaybe n -- serviceUpdateStatusState :: Maybe E'State + <*> arbitraryReducedMaybe n -- serviceUpdateStatusStartedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceUpdateStatusCompletedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceUpdateStatusMessage :: Maybe Text + +instance Arbitrary Swarm where + arbitrary = sized genSwarm + +genSwarm :: Int -> Gen Swarm +genSwarm n = + Swarm + <$> arbitraryReducedMaybe n -- swarmId :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- swarmCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmSpec :: Maybe SwarmSpec + <*> arbitraryReducedMaybe n -- swarmTlsInfo :: Maybe TLSInfo + <*> arbitraryReducedMaybe n -- swarmRootRotationInProgress :: Maybe Bool + <*> arbitraryReducedMaybe n -- swarmDataPathPort :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmDefaultAddrPool :: Maybe [Text] + <*> arbitraryReducedMaybe n -- swarmSubnetSize :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmJoinTokens :: Maybe JoinTokens + +instance Arbitrary SwarmInfo where + arbitrary = sized genSwarmInfo + +genSwarmInfo :: Int -> Gen SwarmInfo +genSwarmInfo n = + SwarmInfo + <$> arbitraryReducedMaybe n -- swarmInfoNodeId :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmInfoNodeAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmInfoLocalNodeState :: Maybe LocalNodeState + <*> arbitraryReducedMaybe n -- swarmInfoControlAvailable :: Maybe Bool + <*> arbitraryReducedMaybe n -- swarmInfoError :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmInfoRemoteManagers :: Maybe [PeerNode] + <*> arbitraryReducedMaybe n -- swarmInfoNodes :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmInfoManagers :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmInfoCluster :: Maybe ClusterInfo + +instance Arbitrary SwarmInitRequest where + arbitrary = sized genSwarmInitRequest + +genSwarmInitRequest :: Int -> Gen SwarmInitRequest +genSwarmInitRequest n = + SwarmInitRequest + <$> arbitraryReducedMaybe n -- swarmInitRequestListenAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmInitRequestAdvertiseAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmInitRequestDataPathAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmInitRequestDataPathPort :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmInitRequestDefaultAddrPool :: Maybe [Text] + <*> arbitraryReducedMaybe n -- swarmInitRequestForceNewCluster :: Maybe Bool + <*> arbitraryReducedMaybe n -- swarmInitRequestSubnetSize :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmInitRequestSpec :: Maybe SwarmSpec + +instance Arbitrary SwarmJoinRequest where + arbitrary = sized genSwarmJoinRequest + +genSwarmJoinRequest :: Int -> Gen SwarmJoinRequest +genSwarmJoinRequest n = + SwarmJoinRequest + <$> arbitraryReducedMaybe n -- swarmJoinRequestListenAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmJoinRequestAdvertiseAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmJoinRequestDataPathAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmJoinRequestRemoteAddrs :: Maybe [Text] + <*> arbitraryReducedMaybe n -- swarmJoinRequestJoinToken :: Maybe Text + +instance Arbitrary SwarmSpec where + arbitrary = sized genSwarmSpec + +genSwarmSpec :: Int -> Gen SwarmSpec +genSwarmSpec n = + SwarmSpec + <$> arbitraryReducedMaybe n -- swarmSpecName :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmSpecLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- swarmSpecOrchestration :: Maybe SwarmSpecOrchestration + <*> arbitraryReducedMaybe n -- swarmSpecRaft :: Maybe SwarmSpecRaft + <*> arbitraryReducedMaybe n -- swarmSpecDispatcher :: Maybe SwarmSpecDispatcher + <*> arbitraryReducedMaybe n -- swarmSpecCaConfig :: Maybe SwarmSpecCAConfig + <*> arbitraryReducedMaybe n -- swarmSpecEncryptionConfig :: Maybe SwarmSpecEncryptionConfig + <*> arbitraryReducedMaybe n -- swarmSpecTaskDefaults :: Maybe SwarmSpecTaskDefaults + +instance Arbitrary SwarmSpecCAConfig where + arbitrary = sized genSwarmSpecCAConfig + +genSwarmSpecCAConfig :: Int -> Gen SwarmSpecCAConfig +genSwarmSpecCAConfig n = + SwarmSpecCAConfig + <$> arbitraryReducedMaybe n -- swarmSpecCAConfigNodeCertExpiry :: Maybe Integer + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigExternalCas :: Maybe [SwarmSpecCAConfigExternalCAsInner] + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigSigningCaCert :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigSigningCaKey :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigForceRotate :: Maybe Int + +instance Arbitrary SwarmSpecCAConfigExternalCAsInner where + arbitrary = sized genSwarmSpecCAConfigExternalCAsInner + +genSwarmSpecCAConfigExternalCAsInner :: Int -> Gen SwarmSpecCAConfigExternalCAsInner +genSwarmSpecCAConfigExternalCAsInner n = + SwarmSpecCAConfigExternalCAsInner + <$> arbitraryReducedMaybe n -- swarmSpecCAConfigExternalCAsInnerProtocol :: Maybe E'Protocol + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigExternalCAsInnerUrl :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigExternalCAsInnerOptions :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigExternalCAsInnerCaCert :: Maybe Text + +instance Arbitrary SwarmSpecDispatcher where + arbitrary = sized genSwarmSpecDispatcher + +genSwarmSpecDispatcher :: Int -> Gen SwarmSpecDispatcher +genSwarmSpecDispatcher n = + SwarmSpecDispatcher + <$> arbitraryReducedMaybe n -- swarmSpecDispatcherHeartbeatPeriod :: Maybe Integer + +instance Arbitrary SwarmSpecEncryptionConfig where + arbitrary = sized genSwarmSpecEncryptionConfig + +genSwarmSpecEncryptionConfig :: Int -> Gen SwarmSpecEncryptionConfig +genSwarmSpecEncryptionConfig n = + SwarmSpecEncryptionConfig + <$> arbitraryReducedMaybe n -- swarmSpecEncryptionConfigAutoLockManagers :: Maybe Bool + +instance Arbitrary SwarmSpecOrchestration where + arbitrary = sized genSwarmSpecOrchestration + +genSwarmSpecOrchestration :: Int -> Gen SwarmSpecOrchestration +genSwarmSpecOrchestration n = + SwarmSpecOrchestration + <$> arbitraryReducedMaybe n -- swarmSpecOrchestrationTaskHistoryRetentionLimit :: Maybe Integer + +instance Arbitrary SwarmSpecRaft where + arbitrary = sized genSwarmSpecRaft + +genSwarmSpecRaft :: Int -> Gen SwarmSpecRaft +genSwarmSpecRaft n = + SwarmSpecRaft + <$> arbitraryReducedMaybe n -- swarmSpecRaftSnapshotInterval :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmSpecRaftKeepOldSnapshots :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmSpecRaftLogEntriesForSlowFollowers :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmSpecRaftElectionTick :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmSpecRaftHeartbeatTick :: Maybe Int + +instance Arbitrary SwarmSpecTaskDefaults where + arbitrary = sized genSwarmSpecTaskDefaults + +genSwarmSpecTaskDefaults :: Int -> Gen SwarmSpecTaskDefaults +genSwarmSpecTaskDefaults n = + SwarmSpecTaskDefaults + <$> arbitraryReducedMaybe n -- swarmSpecTaskDefaultsLogDriver :: Maybe SwarmSpecTaskDefaultsLogDriver + +instance Arbitrary SwarmSpecTaskDefaultsLogDriver where + arbitrary = sized genSwarmSpecTaskDefaultsLogDriver + +genSwarmSpecTaskDefaultsLogDriver :: Int -> Gen SwarmSpecTaskDefaultsLogDriver +genSwarmSpecTaskDefaultsLogDriver n = + SwarmSpecTaskDefaultsLogDriver + <$> arbitraryReducedMaybe n -- swarmSpecTaskDefaultsLogDriverName :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmSpecTaskDefaultsLogDriverOptions :: Maybe (Map.Map String Text) + +instance Arbitrary SwarmUnlockRequest where + arbitrary = sized genSwarmUnlockRequest + +genSwarmUnlockRequest :: Int -> Gen SwarmUnlockRequest +genSwarmUnlockRequest n = + SwarmUnlockRequest + <$> arbitraryReducedMaybe n -- swarmUnlockRequestUnlockKey :: Maybe Text + +instance Arbitrary SystemAuthResponse where + arbitrary = sized genSystemAuthResponse + +genSystemAuthResponse :: Int -> Gen SystemAuthResponse +genSystemAuthResponse n = + SystemAuthResponse + <$> arbitrary -- systemAuthResponseStatus :: Text + <*> arbitraryReducedMaybe n -- systemAuthResponseIdentityToken :: Maybe Text + +instance Arbitrary SystemDataUsageResponse where + arbitrary = sized genSystemDataUsageResponse + +genSystemDataUsageResponse :: Int -> Gen SystemDataUsageResponse +genSystemDataUsageResponse n = + SystemDataUsageResponse + <$> arbitraryReducedMaybe n -- systemDataUsageResponseLayersSize :: Maybe Integer + <*> arbitraryReducedMaybe n -- systemDataUsageResponseImages :: Maybe [ImageSummary] + <*> arbitraryReducedMaybe n -- systemDataUsageResponseContainers :: Maybe [ContainerSummary] + <*> arbitraryReducedMaybe n -- systemDataUsageResponseVolumes :: Maybe [Volume] + <*> arbitraryReducedMaybe n -- systemDataUsageResponseBuildCache :: Maybe [BuildCache] + +instance Arbitrary SystemInfo where + arbitrary = sized genSystemInfo + +genSystemInfo :: Int -> Gen SystemInfo +genSystemInfo n = + SystemInfo + <$> arbitraryReducedMaybe n -- systemInfoId :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoContainers :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoContainersRunning :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoContainersPaused :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoContainersStopped :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoImages :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoDriverStatus :: Maybe [[Text]] + <*> arbitraryReducedMaybe n -- systemInfoDockerRootDir :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoPlugins :: Maybe PluginsInfo + <*> arbitraryReducedMaybe n -- systemInfoMemoryLimit :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoSwapLimit :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoKernelMemoryTcp :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoCpuCfsPeriod :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoCpuCfsQuota :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoCpuShares :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoCpuSet :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoPidsLimit :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoOomKillDisable :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoIpv4Forwarding :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoBridgeNfIptables :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoBridgeNfIp6tables :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoDebug :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoNfd :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoNGoroutines :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoSystemTime :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoLoggingDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoCgroupDriver :: Maybe E'CgroupDriver + <*> arbitraryReducedMaybe n -- systemInfoCgroupVersion :: Maybe E'CgroupVersion + <*> arbitraryReducedMaybe n -- systemInfoNEventsListener :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoKernelVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoOperatingSystem :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoOsVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoOsType :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoArchitecture :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoNcpu :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoMemTotal :: Maybe Integer + <*> arbitraryReducedMaybe n -- systemInfoIndexServerAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoRegistryConfig :: Maybe RegistryServiceConfig + <*> arbitraryReducedMaybe n -- systemInfoGenericResources :: Maybe [GenericResourcesInner] + <*> arbitraryReducedMaybe n -- systemInfoHttpProxy :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoHttpsProxy :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoNoProxy :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoName :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoLabels :: Maybe [Text] + <*> arbitraryReducedMaybe n -- systemInfoExperimentalBuild :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoServerVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoRuntimes :: Maybe (Map.Map String Runtime) + <*> arbitraryReducedMaybe n -- systemInfoDefaultRuntime :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoSwarm :: Maybe SwarmInfo + <*> arbitraryReducedMaybe n -- systemInfoLiveRestoreEnabled :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoIsolation :: Maybe E'Isolation2 + <*> arbitraryReducedMaybe n -- systemInfoInitBinary :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoContainerdCommit :: Maybe Commit + <*> arbitraryReducedMaybe n -- systemInfoRuncCommit :: Maybe Commit + <*> arbitraryReducedMaybe n -- systemInfoInitCommit :: Maybe Commit + <*> arbitraryReducedMaybe n -- systemInfoSecurityOptions :: Maybe [Text] + <*> arbitraryReducedMaybe n -- systemInfoProductLicense :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoDefaultAddressPools :: Maybe [SystemInfoDefaultAddressPoolsInner] + <*> arbitraryReducedMaybe n -- systemInfoWarnings :: Maybe [Text] + <*> arbitraryReducedMaybe n -- systemInfoCdiSpecDirs :: Maybe [Text] + +instance Arbitrary SystemInfoDefaultAddressPoolsInner where + arbitrary = sized genSystemInfoDefaultAddressPoolsInner + +genSystemInfoDefaultAddressPoolsInner :: Int -> Gen SystemInfoDefaultAddressPoolsInner +genSystemInfoDefaultAddressPoolsInner n = + SystemInfoDefaultAddressPoolsInner + <$> arbitraryReducedMaybe n -- systemInfoDefaultAddressPoolsInnerBase :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoDefaultAddressPoolsInnerSize :: Maybe Int + +instance Arbitrary SystemVersion where + arbitrary = sized genSystemVersion + +genSystemVersion :: Int -> Gen SystemVersion +genSystemVersion n = + SystemVersion + <$> arbitraryReducedMaybe n -- systemVersionPlatform :: Maybe SystemVersionPlatform + <*> arbitraryReducedMaybe n -- systemVersionComponents :: Maybe [SystemVersionComponentsInner] + <*> arbitraryReducedMaybe n -- systemVersionVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionApiVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionMinApiVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionGitCommit :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionGoVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionOs :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionArch :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionKernelVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionExperimental :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemVersionBuildTime :: Maybe Text + +instance Arbitrary SystemVersionComponentsInner where + arbitrary = sized genSystemVersionComponentsInner + +genSystemVersionComponentsInner :: Int -> Gen SystemVersionComponentsInner +genSystemVersionComponentsInner n = + SystemVersionComponentsInner + <$> arbitrary -- systemVersionComponentsInnerName :: Text + <*> arbitrary -- systemVersionComponentsInnerVersion :: Text + <*> arbitraryReducedMaybeValue n -- systemVersionComponentsInnerDetails :: Maybe A.Value + +instance Arbitrary SystemVersionPlatform where + arbitrary = sized genSystemVersionPlatform + +genSystemVersionPlatform :: Int -> Gen SystemVersionPlatform +genSystemVersionPlatform n = + SystemVersionPlatform + <$> arbitrary -- systemVersionPlatformName :: Text + +instance Arbitrary TLSInfo where + arbitrary = sized genTLSInfo + +genTLSInfo :: Int -> Gen TLSInfo +genTLSInfo n = + TLSInfo + <$> arbitraryReducedMaybe n -- tLSInfoTrustRoot :: Maybe Text + <*> arbitraryReducedMaybe n -- tLSInfoCertIssuerSubject :: Maybe Text + <*> arbitraryReducedMaybe n -- tLSInfoCertIssuerPublicKey :: Maybe Text + +instance Arbitrary Task where + arbitrary = sized genTask + +genTask :: Int -> Gen Task +genTask n = + Task + <$> arbitraryReducedMaybe n -- taskId :: Maybe Text + <*> arbitraryReducedMaybe n -- taskVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- taskCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- taskUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- taskName :: Maybe Text + <*> arbitraryReducedMaybe n -- taskLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- taskSpec :: Maybe TaskSpec + <*> arbitraryReducedMaybe n -- taskServiceId :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSlot :: Maybe Int + <*> arbitraryReducedMaybe n -- taskNodeId :: Maybe Text + <*> arbitraryReducedMaybe n -- taskAssignedGenericResources :: Maybe [GenericResourcesInner] + <*> arbitraryReducedMaybe n -- taskStatus :: Maybe TaskStatus + <*> arbitraryReducedMaybe n -- taskDesiredState :: Maybe TaskState + <*> arbitraryReducedMaybe n -- taskJobIteration :: Maybe ObjectVersion + +instance Arbitrary TaskSpec where + arbitrary = sized genTaskSpec + +genTaskSpec :: Int -> Gen TaskSpec +genTaskSpec n = + TaskSpec + <$> arbitraryReducedMaybe n -- taskSpecPluginSpec :: Maybe TaskSpecPluginSpec + <*> arbitraryReducedMaybe n -- taskSpecContainerSpec :: Maybe TaskSpecContainerSpec + <*> arbitraryReducedMaybe n -- taskSpecNetworkAttachmentSpec :: Maybe TaskSpecNetworkAttachmentSpec + <*> arbitraryReducedMaybe n -- taskSpecResources :: Maybe TaskSpecResources + <*> arbitraryReducedMaybe n -- taskSpecRestartPolicy :: Maybe TaskSpecRestartPolicy + <*> arbitraryReducedMaybe n -- taskSpecPlacement :: Maybe TaskSpecPlacement + <*> arbitraryReducedMaybe n -- taskSpecForceUpdate :: Maybe Int + <*> arbitraryReducedMaybe n -- taskSpecRuntime :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecNetworks :: Maybe [NetworkAttachmentConfig] + <*> arbitraryReducedMaybe n -- taskSpecLogDriver :: Maybe TaskSpecLogDriver + +instance Arbitrary TaskSpecContainerSpec where + arbitrary = sized genTaskSpecContainerSpec + +genTaskSpecContainerSpec :: Int -> Gen TaskSpecContainerSpec +genTaskSpecContainerSpec n = + TaskSpecContainerSpec + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecImage :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecCommand :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecArgs :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecHostname :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecEnv :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecDir :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecUser :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecGroups :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivileges :: Maybe TaskSpecContainerSpecPrivileges + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecOpenStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecReadOnly :: Maybe Bool + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecMounts :: Maybe [Mount] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecStopSignal :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecStopGracePeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecHealthCheck :: Maybe HealthConfig + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecHosts :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecDnsConfig :: Maybe TaskSpecContainerSpecDNSConfig + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSecrets :: Maybe [TaskSpecContainerSpecSecretsInner] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigs :: Maybe [TaskSpecContainerSpecConfigsInner] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecIsolation :: Maybe E'Isolation3 + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecInit :: Maybe Bool + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSysctls :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecCapabilityAdd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecCapabilityDrop :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecUlimits :: Maybe [ResourcesUlimitsInner] + +instance Arbitrary TaskSpecContainerSpecConfigsInner where + arbitrary = sized genTaskSpecContainerSpecConfigsInner + +genTaskSpecContainerSpecConfigsInner :: Int -> Gen TaskSpecContainerSpecConfigsInner +genTaskSpecContainerSpecConfigsInner n = + TaskSpecContainerSpecConfigsInner + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerFile :: Maybe TaskSpecContainerSpecConfigsInnerFile + <*> arbitraryReducedMaybeValue n -- taskSpecContainerSpecConfigsInnerRuntime :: Maybe A.Value + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerConfigId :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerConfigName :: Maybe Text + +instance Arbitrary TaskSpecContainerSpecConfigsInnerFile where + arbitrary = sized genTaskSpecContainerSpecConfigsInnerFile + +genTaskSpecContainerSpecConfigsInnerFile :: Int -> Gen TaskSpecContainerSpecConfigsInnerFile +genTaskSpecContainerSpecConfigsInnerFile n = + TaskSpecContainerSpecConfigsInnerFile + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerFileName :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerFileUid :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerFileGid :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerFileMode :: Maybe Int + +instance Arbitrary TaskSpecContainerSpecDNSConfig where + arbitrary = sized genTaskSpecContainerSpecDNSConfig + +genTaskSpecContainerSpecDNSConfig :: Int -> Gen TaskSpecContainerSpecDNSConfig +genTaskSpecContainerSpecDNSConfig n = + TaskSpecContainerSpecDNSConfig + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecDNSConfigNameservers :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecDNSConfigSearch :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecDNSConfigOptions :: Maybe [Text] + +instance Arbitrary TaskSpecContainerSpecPrivileges where + arbitrary = sized genTaskSpecContainerSpecPrivileges + +genTaskSpecContainerSpecPrivileges :: Int -> Gen TaskSpecContainerSpecPrivileges +genTaskSpecContainerSpecPrivileges n = + TaskSpecContainerSpecPrivileges + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesCredentialSpec :: Maybe TaskSpecContainerSpecPrivilegesCredentialSpec + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSeLinuxContext :: Maybe TaskSpecContainerSpecPrivilegesSELinuxContext + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSeccomp :: Maybe TaskSpecContainerSpecPrivilegesSeccomp + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesAppArmor :: Maybe TaskSpecContainerSpecPrivilegesAppArmor + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesNoNewPrivileges :: Maybe Bool + +instance Arbitrary TaskSpecContainerSpecPrivilegesAppArmor where + arbitrary = sized genTaskSpecContainerSpecPrivilegesAppArmor + +genTaskSpecContainerSpecPrivilegesAppArmor :: Int -> Gen TaskSpecContainerSpecPrivilegesAppArmor +genTaskSpecContainerSpecPrivilegesAppArmor n = + TaskSpecContainerSpecPrivilegesAppArmor + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesAppArmorMode :: Maybe E'Mode3 + +instance Arbitrary TaskSpecContainerSpecPrivilegesCredentialSpec where + arbitrary = sized genTaskSpecContainerSpecPrivilegesCredentialSpec + +genTaskSpecContainerSpecPrivilegesCredentialSpec :: Int -> Gen TaskSpecContainerSpecPrivilegesCredentialSpec +genTaskSpecContainerSpecPrivilegesCredentialSpec n = + TaskSpecContainerSpecPrivilegesCredentialSpec + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesCredentialSpecConfig :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesCredentialSpecFile :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesCredentialSpecRegistry :: Maybe Text + +instance Arbitrary TaskSpecContainerSpecPrivilegesSELinuxContext where + arbitrary = sized genTaskSpecContainerSpecPrivilegesSELinuxContext + +genTaskSpecContainerSpecPrivilegesSELinuxContext :: Int -> Gen TaskSpecContainerSpecPrivilegesSELinuxContext +genTaskSpecContainerSpecPrivilegesSELinuxContext n = + TaskSpecContainerSpecPrivilegesSELinuxContext + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSELinuxContextDisable :: Maybe Bool + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSELinuxContextUser :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSELinuxContextRole :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSELinuxContextType :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSELinuxContextLevel :: Maybe Text + +instance Arbitrary TaskSpecContainerSpecPrivilegesSeccomp where + arbitrary = sized genTaskSpecContainerSpecPrivilegesSeccomp + +genTaskSpecContainerSpecPrivilegesSeccomp :: Int -> Gen TaskSpecContainerSpecPrivilegesSeccomp +genTaskSpecContainerSpecPrivilegesSeccomp n = + TaskSpecContainerSpecPrivilegesSeccomp + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSeccompMode :: Maybe E'Mode2 + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSeccompProfile :: Maybe Text + +instance Arbitrary TaskSpecContainerSpecSecretsInner where + arbitrary = sized genTaskSpecContainerSpecSecretsInner + +genTaskSpecContainerSpecSecretsInner :: Int -> Gen TaskSpecContainerSpecSecretsInner +genTaskSpecContainerSpecSecretsInner n = + TaskSpecContainerSpecSecretsInner + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerFile :: Maybe TaskSpecContainerSpecSecretsInnerFile + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerSecretId :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerSecretName :: Maybe Text + +instance Arbitrary TaskSpecContainerSpecSecretsInnerFile where + arbitrary = sized genTaskSpecContainerSpecSecretsInnerFile + +genTaskSpecContainerSpecSecretsInnerFile :: Int -> Gen TaskSpecContainerSpecSecretsInnerFile +genTaskSpecContainerSpecSecretsInnerFile n = + TaskSpecContainerSpecSecretsInnerFile + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerFileName :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerFileUid :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerFileGid :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerFileMode :: Maybe Int + +instance Arbitrary TaskSpecLogDriver where + arbitrary = sized genTaskSpecLogDriver + +genTaskSpecLogDriver :: Int -> Gen TaskSpecLogDriver +genTaskSpecLogDriver n = + TaskSpecLogDriver + <$> arbitraryReducedMaybe n -- taskSpecLogDriverName :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecLogDriverOptions :: Maybe (Map.Map String Text) + +instance Arbitrary TaskSpecNetworkAttachmentSpec where + arbitrary = sized genTaskSpecNetworkAttachmentSpec + +genTaskSpecNetworkAttachmentSpec :: Int -> Gen TaskSpecNetworkAttachmentSpec +genTaskSpecNetworkAttachmentSpec n = + TaskSpecNetworkAttachmentSpec + <$> arbitraryReducedMaybe n -- taskSpecNetworkAttachmentSpecContainerId :: Maybe Text + +instance Arbitrary TaskSpecPlacement where + arbitrary = sized genTaskSpecPlacement + +genTaskSpecPlacement :: Int -> Gen TaskSpecPlacement +genTaskSpecPlacement n = + TaskSpecPlacement + <$> arbitraryReducedMaybe n -- taskSpecPlacementConstraints :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecPlacementPreferences :: Maybe [TaskSpecPlacementPreferencesInner] + <*> arbitraryReducedMaybe n -- taskSpecPlacementMaxReplicas :: Maybe Integer + <*> arbitraryReducedMaybe n -- taskSpecPlacementPlatforms :: Maybe [Platform] + +instance Arbitrary TaskSpecPlacementPreferencesInner where + arbitrary = sized genTaskSpecPlacementPreferencesInner + +genTaskSpecPlacementPreferencesInner :: Int -> Gen TaskSpecPlacementPreferencesInner +genTaskSpecPlacementPreferencesInner n = + TaskSpecPlacementPreferencesInner + <$> arbitraryReducedMaybe n -- taskSpecPlacementPreferencesInnerSpread :: Maybe TaskSpecPlacementPreferencesInnerSpread + +instance Arbitrary TaskSpecPlacementPreferencesInnerSpread where + arbitrary = sized genTaskSpecPlacementPreferencesInnerSpread + +genTaskSpecPlacementPreferencesInnerSpread :: Int -> Gen TaskSpecPlacementPreferencesInnerSpread +genTaskSpecPlacementPreferencesInnerSpread n = + TaskSpecPlacementPreferencesInnerSpread + <$> arbitraryReducedMaybe n -- taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor :: Maybe Text + +instance Arbitrary TaskSpecPluginSpec where + arbitrary = sized genTaskSpecPluginSpec + +genTaskSpecPluginSpec :: Int -> Gen TaskSpecPluginSpec +genTaskSpecPluginSpec n = + TaskSpecPluginSpec + <$> arbitraryReducedMaybe n -- taskSpecPluginSpecName :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecPluginSpecRemote :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecPluginSpecDisabled :: Maybe Bool + <*> arbitraryReducedMaybe n -- taskSpecPluginSpecPluginPrivilege :: Maybe [PluginPrivilege] + +instance Arbitrary TaskSpecResources where + arbitrary = sized genTaskSpecResources + +genTaskSpecResources :: Int -> Gen TaskSpecResources +genTaskSpecResources n = + TaskSpecResources + <$> arbitraryReducedMaybe n -- taskSpecResourcesLimits :: Maybe Limit + <*> arbitraryReducedMaybe n -- taskSpecResourcesReservations :: Maybe ResourceObject + +instance Arbitrary TaskSpecRestartPolicy where + arbitrary = sized genTaskSpecRestartPolicy + +genTaskSpecRestartPolicy :: Int -> Gen TaskSpecRestartPolicy +genTaskSpecRestartPolicy n = + TaskSpecRestartPolicy + <$> arbitraryReducedMaybe n -- taskSpecRestartPolicyCondition :: Maybe E'Condition + <*> arbitraryReducedMaybe n -- taskSpecRestartPolicyDelay :: Maybe Integer + <*> arbitraryReducedMaybe n -- taskSpecRestartPolicyMaxAttempts :: Maybe Integer + <*> arbitraryReducedMaybe n -- taskSpecRestartPolicyWindow :: Maybe Integer + +instance Arbitrary TaskStatus where + arbitrary = sized genTaskStatus + +genTaskStatus :: Int -> Gen TaskStatus +genTaskStatus n = + TaskStatus + <$> arbitraryReducedMaybe n -- taskStatusTimestamp :: Maybe Text + <*> arbitraryReducedMaybe n -- taskStatusState :: Maybe TaskState + <*> arbitraryReducedMaybe n -- taskStatusMessage :: Maybe Text + <*> arbitraryReducedMaybe n -- taskStatusErr :: Maybe Text + <*> arbitraryReducedMaybe n -- taskStatusContainerStatus :: Maybe ContainerStatus + <*> arbitraryReducedMaybe n -- taskStatusPortStatus :: Maybe PortStatus + +instance Arbitrary ThrottleDevice where + arbitrary = sized genThrottleDevice + +genThrottleDevice :: Int -> Gen ThrottleDevice +genThrottleDevice n = + ThrottleDevice + <$> arbitraryReducedMaybe n -- throttleDevicePath :: Maybe Text + <*> arbitraryReducedMaybe n -- throttleDeviceRate :: Maybe Integer + +instance Arbitrary UnlockKeyResponse where + arbitrary = sized genUnlockKeyResponse + +genUnlockKeyResponse :: Int -> Gen UnlockKeyResponse +genUnlockKeyResponse n = + UnlockKeyResponse + <$> arbitraryReducedMaybe n -- unlockKeyResponseUnlockKey :: Maybe Text + +instance Arbitrary Volume where + arbitrary = sized genVolume + +genVolume :: Int -> Gen Volume +genVolume n = + Volume + <$> arbitrary -- volumeName :: Text + <*> arbitrary -- volumeDriver :: Text + <*> arbitrary -- volumeMountpoint :: Text + <*> arbitraryReducedMaybe n -- volumeCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- volumeStatus :: Maybe (Map.Map String A.Value) + <*> arbitrary -- volumeLabels :: (Map.Map String Text) + <*> arbitrary -- volumeScope :: E'Scope + <*> arbitraryReducedMaybe n -- volumeClusterVolume :: Maybe ClusterVolume + <*> arbitrary -- volumeOptions :: (Map.Map String Text) + <*> arbitraryReducedMaybe n -- volumeUsageData :: Maybe VolumeUsageData + +instance Arbitrary VolumeCreateOptions where + arbitrary = sized genVolumeCreateOptions + +genVolumeCreateOptions :: Int -> Gen VolumeCreateOptions +genVolumeCreateOptions n = + VolumeCreateOptions + <$> arbitraryReducedMaybe n -- volumeCreateOptionsName :: Maybe Text + <*> arbitraryReducedMaybe n -- volumeCreateOptionsDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- volumeCreateOptionsDriverOpts :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- volumeCreateOptionsLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- volumeCreateOptionsClusterVolumeSpec :: Maybe ClusterVolumeSpec + +instance Arbitrary VolumeListResponse where + arbitrary = sized genVolumeListResponse + +genVolumeListResponse :: Int -> Gen VolumeListResponse +genVolumeListResponse n = + VolumeListResponse + <$> arbitraryReducedMaybe n -- volumeListResponseVolumes :: Maybe [Volume] + <*> arbitraryReducedMaybe n -- volumeListResponseWarnings :: Maybe [Text] + +instance Arbitrary VolumePruneResponse where + arbitrary = sized genVolumePruneResponse + +genVolumePruneResponse :: Int -> Gen VolumePruneResponse +genVolumePruneResponse n = + VolumePruneResponse + <$> arbitraryReducedMaybe n -- volumePruneResponseVolumesDeleted :: Maybe [Text] + <*> arbitraryReducedMaybe n -- volumePruneResponseSpaceReclaimed :: Maybe Integer + +instance Arbitrary VolumeUpdateRequest where + arbitrary = sized genVolumeUpdateRequest + +genVolumeUpdateRequest :: Int -> Gen VolumeUpdateRequest +genVolumeUpdateRequest n = + VolumeUpdateRequest + <$> arbitraryReducedMaybe n -- volumeUpdateRequestSpec :: Maybe ClusterVolumeSpec + +instance Arbitrary VolumeUsageData where + arbitrary = sized genVolumeUsageData + +genVolumeUsageData :: Int -> Gen VolumeUsageData +genVolumeUsageData n = + VolumeUsageData + <$> arbitrary -- volumeUsageDataSize :: Integer + <*> arbitrary -- volumeUsageDataRefCount :: Integer + + + + +instance Arbitrary ChangeType where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Availability where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'CgroupDriver where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'CgroupVersion where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'CgroupnsMode where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Condition where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Condition2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'ContentType where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'FailureAction where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'FailureAction2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Isolation where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Isolation2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Isolation3 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Mode where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Mode2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Mode3 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Name where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Order where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Propagation where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Protocol where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'ProtocolScheme where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'PublishMode where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'RegistryAuthFrom where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Role where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Scope where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Scope2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Scope3 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Sharing where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'State where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'State2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Status where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Status2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Swarm where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Type where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Type2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Type3 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Type4 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Type5 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Type6 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary LocalNodeState where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary NodeState where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary Reachability where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary TaskState where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary (HM.HashMap String String) where arbitrary = HM.fromList <$> arbitrary diff --git a/v1.45/tests/PropMime.hs b/v1.45/tests/PropMime.hs new file mode 100644 index 0000000..eca4411 --- /dev/null +++ b/v1.45/tests/PropMime.hs @@ -0,0 +1,51 @@ +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE ConstraintKinds #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +module PropMime where + +import Data.Aeson +import Data.Aeson.Types (parseEither) +import Data.Monoid ((<>)) +import Data.Typeable (Proxy(..), typeOf, Typeable) +import qualified Data.ByteString.Lazy.Char8 as BL8 +import Test.Hspec +import Test.QuickCheck +import Test.QuickCheck.Property +import Test.Hspec.QuickCheck (prop) + +import DockerEngine.MimeTypes + +import ApproxEq + +-- * Type Aliases + +type ArbitraryMime mime a = ArbitraryRoundtrip (MimeUnrender mime) (MimeRender mime) a + +type ArbitraryRoundtrip from to a = (from a, to a, Arbitrary' a) + +type Arbitrary' a = (Arbitrary a, Show a, Typeable a) + +-- * Mime + +propMime + :: forall a b mime. + (ArbitraryMime mime a, Testable b) + => String -> (a -> a -> b) -> mime -> Proxy a -> Spec +propMime eqDescr eq m _ = + prop + (show (typeOf (undefined :: a)) <> " " <> show (typeOf (undefined :: mime)) <> " roundtrip " <> eqDescr) $ + \(x :: a) -> + let rendered = mimeRender' m x + actual = mimeUnrender' m rendered + expected = Right x + failMsg = + "ACTUAL: " <> show actual <> "\nRENDERED: " <> BL8.unpack rendered + in counterexample failMsg $ + either reject property (eq <$> actual <*> expected) + where + reject = property . const rejected + +propMimeEq :: (ArbitraryMime mime a, Eq a) => mime -> Proxy a -> Spec +propMimeEq = propMime "(EQ)" (==) diff --git a/v1.45/tests/Test.hs b/v1.45/tests/Test.hs new file mode 100644 index 0000000..10b4046 --- /dev/null +++ b/v1.45/tests/Test.hs @@ -0,0 +1,232 @@ +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE PartialTypeSignatures #-} + +module Main where + +import Data.Typeable (Proxy(..)) +import Test.Hspec +import Test.Hspec.QuickCheck + +import PropMime +import Instances () + +import DockerEngine.Model +import DockerEngine.MimeTypes + +main :: IO () +main = + hspec $ modifyMaxSize (const 10) $ do + describe "JSON instances" $ do + pure () + propMimeEq MimeJSON (Proxy :: Proxy Address) + propMimeEq MimeJSON (Proxy :: Proxy AuthConfig) + propMimeEq MimeJSON (Proxy :: Proxy BuildCache) + propMimeEq MimeJSON (Proxy :: Proxy BuildInfo) + propMimeEq MimeJSON (Proxy :: Proxy BuildPruneResponse) + propMimeEq MimeJSON (Proxy :: Proxy ChangeType) + propMimeEq MimeJSON (Proxy :: Proxy ClusterInfo) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolume) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumeInfo) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumePublishStatusInner) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumeSpec) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumeSpecAccessMode) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumeSpecAccessModeAccessibilityRequirements) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumeSpecAccessModeCapacityRange) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumeSpecAccessModeSecretsInner) + propMimeEq MimeJSON (Proxy :: Proxy Commit) + propMimeEq MimeJSON (Proxy :: Proxy Config) + propMimeEq MimeJSON (Proxy :: Proxy ConfigCreateRequest) + propMimeEq MimeJSON (Proxy :: Proxy ConfigReference) + propMimeEq MimeJSON (Proxy :: Proxy ConfigSpec) + propMimeEq MimeJSON (Proxy :: Proxy ContainerConfig) + propMimeEq MimeJSON (Proxy :: Proxy ContainerCreateRequest) + propMimeEq MimeJSON (Proxy :: Proxy ContainerCreateResponse) + propMimeEq MimeJSON (Proxy :: Proxy ContainerInspectResponse) + propMimeEq MimeJSON (Proxy :: Proxy ContainerPruneResponse) + propMimeEq MimeJSON (Proxy :: Proxy ContainerState) + propMimeEq MimeJSON (Proxy :: Proxy ContainerStatus) + propMimeEq MimeJSON (Proxy :: Proxy ContainerSummary) + propMimeEq MimeJSON (Proxy :: Proxy ContainerSummaryHostConfig) + propMimeEq MimeJSON (Proxy :: Proxy ContainerSummaryNetworkSettings) + propMimeEq MimeJSON (Proxy :: Proxy ContainerTopResponse) + propMimeEq MimeJSON (Proxy :: Proxy ContainerUpdateRequest) + propMimeEq MimeJSON (Proxy :: Proxy ContainerUpdateResponse) + propMimeEq MimeJSON (Proxy :: Proxy ContainerWaitExitError) + propMimeEq MimeJSON (Proxy :: Proxy ContainerWaitResponse) + propMimeEq MimeJSON (Proxy :: Proxy CreateImageInfo) + propMimeEq MimeJSON (Proxy :: Proxy DeviceMapping) + propMimeEq MimeJSON (Proxy :: Proxy DeviceRequest) + propMimeEq MimeJSON (Proxy :: Proxy DistributionInspect) + propMimeEq MimeJSON (Proxy :: Proxy Driver) + propMimeEq MimeJSON (Proxy :: Proxy EndpointIPAMConfig) + propMimeEq MimeJSON (Proxy :: Proxy EndpointPortConfig) + propMimeEq MimeJSON (Proxy :: Proxy EndpointSettings) + propMimeEq MimeJSON (Proxy :: Proxy EndpointSpec) + propMimeEq MimeJSON (Proxy :: Proxy EngineDescription) + propMimeEq MimeJSON (Proxy :: Proxy EngineDescriptionPluginsInner) + propMimeEq MimeJSON (Proxy :: Proxy ErrorDetail) + propMimeEq MimeJSON (Proxy :: Proxy ErrorResponse) + propMimeEq MimeJSON (Proxy :: Proxy EventActor) + propMimeEq MimeJSON (Proxy :: Proxy EventMessage) + propMimeEq MimeJSON (Proxy :: Proxy ExecConfig) + propMimeEq MimeJSON (Proxy :: Proxy ExecInspectResponse) + propMimeEq MimeJSON (Proxy :: Proxy ExecStartConfig) + propMimeEq MimeJSON (Proxy :: Proxy FilesystemChange) + propMimeEq MimeJSON (Proxy :: Proxy GenericResourcesInner) + propMimeEq MimeJSON (Proxy :: Proxy GenericResourcesInnerDiscreteResourceSpec) + propMimeEq MimeJSON (Proxy :: Proxy GenericResourcesInnerNamedResourceSpec) + propMimeEq MimeJSON (Proxy :: Proxy GraphDriverData) + propMimeEq MimeJSON (Proxy :: Proxy Health) + propMimeEq MimeJSON (Proxy :: Proxy HealthConfig) + propMimeEq MimeJSON (Proxy :: Proxy HealthcheckResult) + propMimeEq MimeJSON (Proxy :: Proxy HistoryResponseItem) + propMimeEq MimeJSON (Proxy :: Proxy HostConfig) + propMimeEq MimeJSON (Proxy :: Proxy HostConfigAllOfLogConfig) + propMimeEq MimeJSON (Proxy :: Proxy IPAM) + propMimeEq MimeJSON (Proxy :: Proxy IPAMConfig) + propMimeEq MimeJSON (Proxy :: Proxy IdResponse) + propMimeEq MimeJSON (Proxy :: Proxy ImageConfig) + propMimeEq MimeJSON (Proxy :: Proxy ImageDeleteResponseItem) + propMimeEq MimeJSON (Proxy :: Proxy ImageID) + propMimeEq MimeJSON (Proxy :: Proxy ImageInspect) + propMimeEq MimeJSON (Proxy :: Proxy ImageInspectMetadata) + propMimeEq MimeJSON (Proxy :: Proxy ImageInspectRootFS) + propMimeEq MimeJSON (Proxy :: Proxy ImagePruneResponse) + propMimeEq MimeJSON (Proxy :: Proxy ImageSearchResponseItem) + propMimeEq MimeJSON (Proxy :: Proxy ImageSummary) + propMimeEq MimeJSON (Proxy :: Proxy IndexInfo) + propMimeEq MimeJSON (Proxy :: Proxy JoinTokens) + propMimeEq MimeJSON (Proxy :: Proxy Limit) + propMimeEq MimeJSON (Proxy :: Proxy LocalNodeState) + propMimeEq MimeJSON (Proxy :: Proxy ManagerStatus) + propMimeEq MimeJSON (Proxy :: Proxy Mount) + propMimeEq MimeJSON (Proxy :: Proxy MountBindOptions) + propMimeEq MimeJSON (Proxy :: Proxy MountPoint) + propMimeEq MimeJSON (Proxy :: Proxy MountTmpfsOptions) + propMimeEq MimeJSON (Proxy :: Proxy MountVolumeOptions) + propMimeEq MimeJSON (Proxy :: Proxy MountVolumeOptionsDriverConfig) + propMimeEq MimeJSON (Proxy :: Proxy Network) + propMimeEq MimeJSON (Proxy :: Proxy NetworkAttachmentConfig) + propMimeEq MimeJSON (Proxy :: Proxy NetworkConnectRequest) + propMimeEq MimeJSON (Proxy :: Proxy NetworkContainer) + propMimeEq MimeJSON (Proxy :: Proxy NetworkCreateRequest) + propMimeEq MimeJSON (Proxy :: Proxy NetworkCreateResponse) + propMimeEq MimeJSON (Proxy :: Proxy NetworkDisconnectRequest) + propMimeEq MimeJSON (Proxy :: Proxy NetworkPruneResponse) + propMimeEq MimeJSON (Proxy :: Proxy NetworkSettings) + propMimeEq MimeJSON (Proxy :: Proxy NetworkingConfig) + propMimeEq MimeJSON (Proxy :: Proxy Node) + propMimeEq MimeJSON (Proxy :: Proxy NodeDescription) + propMimeEq MimeJSON (Proxy :: Proxy NodeSpec) + propMimeEq MimeJSON (Proxy :: Proxy NodeState) + propMimeEq MimeJSON (Proxy :: Proxy NodeStatus) + propMimeEq MimeJSON (Proxy :: Proxy OCIDescriptor) + propMimeEq MimeJSON (Proxy :: Proxy OCIPlatform) + propMimeEq MimeJSON (Proxy :: Proxy ObjectVersion) + propMimeEq MimeJSON (Proxy :: Proxy PeerInfo) + propMimeEq MimeJSON (Proxy :: Proxy PeerNode) + propMimeEq MimeJSON (Proxy :: Proxy Platform) + propMimeEq MimeJSON (Proxy :: Proxy Plugin) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfig) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfigArgs) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfigInterface) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfigLinux) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfigNetwork) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfigRootfs) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfigUser) + propMimeEq MimeJSON (Proxy :: Proxy PluginDevice) + propMimeEq MimeJSON (Proxy :: Proxy PluginEnv) + propMimeEq MimeJSON (Proxy :: Proxy PluginInterfaceType) + propMimeEq MimeJSON (Proxy :: Proxy PluginMount) + propMimeEq MimeJSON (Proxy :: Proxy PluginPrivilege) + propMimeEq MimeJSON (Proxy :: Proxy PluginSettings) + propMimeEq MimeJSON (Proxy :: Proxy PluginsInfo) + propMimeEq MimeJSON (Proxy :: Proxy Port) + propMimeEq MimeJSON (Proxy :: Proxy PortBinding) + propMimeEq MimeJSON (Proxy :: Proxy PortStatus) + propMimeEq MimeJSON (Proxy :: Proxy ProcessConfig) + propMimeEq MimeJSON (Proxy :: Proxy ProgressDetail) + propMimeEq MimeJSON (Proxy :: Proxy PushImageInfo) + propMimeEq MimeJSON (Proxy :: Proxy Reachability) + propMimeEq MimeJSON (Proxy :: Proxy RegistryServiceConfig) + propMimeEq MimeJSON (Proxy :: Proxy ResourceObject) + propMimeEq MimeJSON (Proxy :: Proxy Resources) + propMimeEq MimeJSON (Proxy :: Proxy ResourcesBlkioWeightDeviceInner) + propMimeEq MimeJSON (Proxy :: Proxy ResourcesUlimitsInner) + propMimeEq MimeJSON (Proxy :: Proxy RestartPolicy) + propMimeEq MimeJSON (Proxy :: Proxy Runtime) + propMimeEq MimeJSON (Proxy :: Proxy Secret) + propMimeEq MimeJSON (Proxy :: Proxy SecretCreateRequest) + propMimeEq MimeJSON (Proxy :: Proxy SecretSpec) + propMimeEq MimeJSON (Proxy :: Proxy Service) + propMimeEq MimeJSON (Proxy :: Proxy ServiceCreateRequest) + propMimeEq MimeJSON (Proxy :: Proxy ServiceCreateResponse) + propMimeEq MimeJSON (Proxy :: Proxy ServiceEndpoint) + propMimeEq MimeJSON (Proxy :: Proxy ServiceEndpointVirtualIPsInner) + propMimeEq MimeJSON (Proxy :: Proxy ServiceJobStatus) + propMimeEq MimeJSON (Proxy :: Proxy ServiceServiceStatus) + propMimeEq MimeJSON (Proxy :: Proxy ServiceSpec) + propMimeEq MimeJSON (Proxy :: Proxy ServiceSpecMode) + propMimeEq MimeJSON (Proxy :: Proxy ServiceSpecModeReplicated) + propMimeEq MimeJSON (Proxy :: Proxy ServiceSpecModeReplicatedJob) + propMimeEq MimeJSON (Proxy :: Proxy ServiceSpecRollbackConfig) + propMimeEq MimeJSON (Proxy :: Proxy ServiceSpecUpdateConfig) + propMimeEq MimeJSON (Proxy :: Proxy ServiceUpdateRequest) + propMimeEq MimeJSON (Proxy :: Proxy ServiceUpdateResponse) + propMimeEq MimeJSON (Proxy :: Proxy ServiceUpdateStatus) + propMimeEq MimeJSON (Proxy :: Proxy Swarm) + propMimeEq MimeJSON (Proxy :: Proxy SwarmInfo) + propMimeEq MimeJSON (Proxy :: Proxy SwarmInitRequest) + propMimeEq MimeJSON (Proxy :: Proxy SwarmJoinRequest) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpec) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecCAConfig) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecCAConfigExternalCAsInner) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecDispatcher) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecEncryptionConfig) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecOrchestration) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecRaft) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecTaskDefaults) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecTaskDefaultsLogDriver) + propMimeEq MimeJSON (Proxy :: Proxy SwarmUnlockRequest) + propMimeEq MimeJSON (Proxy :: Proxy SystemAuthResponse) + propMimeEq MimeJSON (Proxy :: Proxy SystemDataUsageResponse) + propMimeEq MimeJSON (Proxy :: Proxy SystemInfo) + propMimeEq MimeJSON (Proxy :: Proxy SystemInfoDefaultAddressPoolsInner) + propMimeEq MimeJSON (Proxy :: Proxy SystemVersion) + propMimeEq MimeJSON (Proxy :: Proxy SystemVersionComponentsInner) + propMimeEq MimeJSON (Proxy :: Proxy SystemVersionPlatform) + propMimeEq MimeJSON (Proxy :: Proxy TLSInfo) + propMimeEq MimeJSON (Proxy :: Proxy Task) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpec) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpec) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecConfigsInner) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecConfigsInnerFile) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecDNSConfig) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecPrivileges) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecPrivilegesAppArmor) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecPrivilegesCredentialSpec) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecPrivilegesSELinuxContext) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecPrivilegesSeccomp) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecSecretsInner) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecSecretsInnerFile) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecLogDriver) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecNetworkAttachmentSpec) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecPlacement) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecPlacementPreferencesInner) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecPlacementPreferencesInnerSpread) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecPluginSpec) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecResources) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecRestartPolicy) + propMimeEq MimeJSON (Proxy :: Proxy TaskState) + propMimeEq MimeJSON (Proxy :: Proxy TaskStatus) + propMimeEq MimeJSON (Proxy :: Proxy ThrottleDevice) + propMimeEq MimeJSON (Proxy :: Proxy UnlockKeyResponse) + propMimeEq MimeJSON (Proxy :: Proxy Volume) + propMimeEq MimeJSON (Proxy :: Proxy VolumeCreateOptions) + propMimeEq MimeJSON (Proxy :: Proxy VolumeListResponse) + propMimeEq MimeJSON (Proxy :: Proxy VolumePruneResponse) + propMimeEq MimeJSON (Proxy :: Proxy VolumeUpdateRequest) + propMimeEq MimeJSON (Proxy :: Proxy VolumeUsageData) + diff --git a/v1.46/.gitignore b/v1.46/.gitignore new file mode 100644 index 0000000..aaed8f8 --- /dev/null +++ b/v1.46/.gitignore @@ -0,0 +1,8 @@ +.stack-work +src/highlight.js +src/style.css +dist +dist-newstyle +cabal.project.local +.cabal-sandbox +cabal.sandbox.config \ No newline at end of file diff --git a/v1.46/.openapi-generator-ignore b/v1.46/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/v1.46/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/v1.46/.openapi-generator/FILES b/v1.46/.openapi-generator/FILES new file mode 100644 index 0000000..f68d8e4 --- /dev/null +++ b/v1.46/.openapi-generator/FILES @@ -0,0 +1,38 @@ +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +Setup.hs +docker-engine.cabal +git_push.sh +lib/DockerEngine.hs +lib/DockerEngine/API.hs +lib/DockerEngine/API/Config.hs +lib/DockerEngine/API/Container.hs +lib/DockerEngine/API/Distribution.hs +lib/DockerEngine/API/Exec.hs +lib/DockerEngine/API/Image.hs +lib/DockerEngine/API/Network.hs +lib/DockerEngine/API/Node.hs +lib/DockerEngine/API/Plugin.hs +lib/DockerEngine/API/Secret.hs +lib/DockerEngine/API/Service.hs +lib/DockerEngine/API/Session.hs +lib/DockerEngine/API/Swarm.hs +lib/DockerEngine/API/System.hs +lib/DockerEngine/API/Task.hs +lib/DockerEngine/API/Volume.hs +lib/DockerEngine/Client.hs +lib/DockerEngine/Core.hs +lib/DockerEngine/Logging.hs +lib/DockerEngine/LoggingKatip.hs +lib/DockerEngine/LoggingMonadLogger.hs +lib/DockerEngine/MimeTypes.hs +lib/DockerEngine/Model.hs +lib/DockerEngine/ModelLens.hs +openapi.yaml +stack.yaml +tests/ApproxEq.hs +tests/Instances.hs +tests/PropMime.hs +tests/Test.hs diff --git a/v1.46/.openapi-generator/VERSION b/v1.46/.openapi-generator/VERSION new file mode 100644 index 0000000..93c8dda --- /dev/null +++ b/v1.46/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.6.0 diff --git a/v1.46/README.md b/v1.46/README.md new file mode 100644 index 0000000..e5bedf8 --- /dev/null +++ b/v1.46/README.md @@ -0,0 +1,203 @@ +## OpenAPI Auto-Generated [http-client](https://www.stackage.org/lts-10.0/package/http-client-0.5.7.1) Bindings to `Docker Engine API` + +The library in `lib` provides auto-generated-from-OpenAPI [http-client](https://www.stackage.org/lts-10.0/package/http-client-0.5.7.1) bindings to the Docker Engine API API. + +OpenApi Version: 3.0.1 + +## Installation + +Installation follows the standard approach to installing Stack-based projects. + +1. Install the [Haskell `stack` tool](http://docs.haskellstack.org/en/stable/README). +2. To build the package, and generate the documentation (recommended): +``` +stack haddock +``` +which will generate docs for this lib in the `docs` folder. + +To generate the docs in the normal location (to enable hyperlinks to external libs), remove +``` +build: + haddock-arguments: + haddock-args: + - "--odir=./docs" +``` +from the stack.yaml file and run `stack haddock` again. + +3. To run unit tests: +``` +stack test +``` + +## OpenAPI-Generator + +The code generator that produced this library, and which explains how +to obtain and use the openapi-generator cli tool lives at + +https://openapi-generator.tech + +The _generator-name_ argument (`--generator-name`) passed to the cli tool used should be + +``` +haskell-http-client +``` + +### Unsupported OpenAPI Features + +* Model Inheritance + +This is beta software; other cases may not be supported. + +### Codegen "additional properties" parameters + +These options allow some customization of the code generation process. + +**haskell-http-client additional properties:** + +| OPTION | DESCRIPTION | DEFAULT | ACTUAL | +|---------------------------------|-------------------------------------------------------------------------------------------------------------------------------|----------|---------------------------------------| +| allowFromJsonNulls | allow JSON Null during model decoding from JSON | true | true | +| allowNonUniqueOperationIds | allow *different* API modules to contain the same operationId. Each API must be imported qualified | false | false | +| allowToJsonNulls | allow emitting JSON Null during model encoding to JSON | false | false | +| baseModule | Set the base module namespace | | DockerEngine | +| cabalPackage | Set the cabal package name, which consists of one or more alphanumeric words separated by hyphens | | docker-engine | +| cabalVersion | Set the cabal version number, consisting of a sequence of one or more integers separated by dots | 0.1.0.0 | 0.1.0.0 | +| customTestInstanceModule | test module used to provide typeclass instances for types not known by the generator | | | +| configType | Set the name of the type used for configuration | | DockerEngineConfig | +| dateFormat | format string used to parse/render a date | %Y-%m-%d | %Y-%m-%d | +| dateTimeFormat | format string used to parse/render a datetime. (Defaults to [formatISO8601Millis][1] when not provided) | | | +| dateTimeParseFormat | overrides the format string used to parse a datetime | | | +| generateEnums | Generate specific datatypes for OpenAPI enums | true | true | +| generateFormUrlEncodedInstances | Generate FromForm/ToForm instances for models used by x-www-form-urlencoded operations (model fields must be primitive types) | true | true | +| generateLenses | Generate Lens optics for Models | true | true | +| generateModelConstructors | Generate smart constructors (only supply required fields) for models | true | true | +| inlineMimeTypes | Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option | true | true | +| modelDeriving | Additional classes to include in the deriving() clause of Models | | | +| requestType | Set the name of the type used to generate requests | | DockerEngineRequest | +| strictFields | Add strictness annotations to all model fields | true | true | +| useKatip | Sets the default value for the UseKatip cabal flag. If true, the katip package provides logging instead of monad-logger | true | true | +| queryExtraUnreserved | Configures additional querystring characters which must not be URI encoded, e.g. '+' or ':' | | | + +[1]: https://www.stackage.org/haddock/lts-9.0/iso8601-time-0.1.4/Data-Time-ISO8601.html#v:formatISO8601Millis + +An example setting _dateTimeFormat_ and _strictFields_: + +``` +java -jar openapi-generator-cli.jar generate -i petstore.yaml -g haskell-http-client -o output/haskell-http-client --additional-properties=dateTimeFormat="%Y-%m-%dT%H:%M:%S%Q%z" --additional-properties=strictFields=false +``` + +View the full list of Codegen "config option" parameters with the command: + +``` +java -jar openapi-generator-cli.jar config-help -g haskell-http-client +``` + +## Usage Notes + +### Example Petstore Haddock documentation + +An example of the generated haddock documentation targeting the server http://petstore.swagger.io/ (Petstore) can be found [here][2] + +[2]: https://hackage.haskell.org/package/swagger-petstore + +### Example Petstore App + +An example application using the auto-generated haskell-http-client bindings for the server http://petstore.swagger.io/ can be found [here][3] + +[3]: https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/haskell-http-client/example-app + +This library is intended to be imported qualified. + +### Modules + +| MODULE | NOTES | +| ------------------- | --------------------------------------------------- | +| DockerEngine.Client | use the "dispatch" functions to send requests | +| DockerEngine.Core | core functions, config and request types | +| DockerEngine.API | construct api requests | +| DockerEngine.Model | describes api models | +| DockerEngine.MimeTypes | encoding/decoding MIME types (content-types/accept) | +| DockerEngine.ModelLens | lenses for model fields | +| DockerEngine.Logging | logging functions and utils | + + +### MimeTypes + +This library adds type safety around what OpenAPI specifies as +Produces and Consumes for each Operation (e.g. the list of MIME types an +Operation can Produce (using 'accept' headers) and Consume (using 'content-type' headers). + +For example, if there is an Operation named _addFoo_, there will be a +data type generated named _AddFoo_ (note the capitalization), which +describes additional constraints and actions on the _addFoo_ operation +via its typeclass instances. These typeclass instances can be viewed +in GHCi or via the Haddocks. + +* required parameters are included as function arguments to _addFoo_ +* optional non-body parameters are included by using `applyOptionalParam` +* optional body parameters are set by using `setBodyParam` + +Example code generated for pretend _addFoo_ operation: + +```haskell +data AddFoo +instance Consumes AddFoo MimeJSON +instance Produces AddFoo MimeJSON +instance Produces AddFoo MimeXML +instance HasBodyParam AddFoo FooModel +instance HasOptionalParam AddFoo FooName +instance HasOptionalParam AddFoo FooId +``` + +this would indicate that: + +* the _addFoo_ operation can consume JSON +* the _addFoo_ operation produces JSON or XML, depending on the argument passed to the dispatch function +* the _addFoo_ operation can set it's body param of _FooModel_ via `setBodyParam` +* the _addFoo_ operation can set 2 different optional parameters via `applyOptionalParam` + +If the OpenAPI spec doesn't declare it can accept or produce a certain +MIME type for a given Operation, you should either add a Produces or +Consumes instance for the desired MIME types (assuming the server +supports it), use `dispatchLbsUnsafe` or modify the OpenAPI spec and +run the generator again. + +New MIME type instances can be added via MimeType/MimeRender/MimeUnrender + +Only JSON instances are generated by default, and in some case +x-www-form-urlencoded instances (FromFrom, ToForm) will also be +generated if the model fields are primitive types, and there are +Operations using x-www-form-urlencoded which use those models. + +### Authentication + +A haskell data type will be generated for each OpenAPI authentication type. + +If for example the AuthMethod `AuthOAuthFoo` is generated for OAuth operations, then +`addAuthMethod` should be used to add the AuthMethod config. + +When a request is dispatched, if a matching auth method is found in +the config, it will be applied to the request. + +### Example + +```haskell +mgr <- newManager defaultManagerSettings +config0 <- withStdoutLogging =<< newConfig +let config = config0 + `addAuthMethod` AuthOAuthFoo "secret-key" + +let addFooRequest = + addFoo + (ContentType MimeJSON) + (Accept MimeXML) + (ParamBar paramBar) + (ParamQux paramQux) + modelBaz + `applyOptionalParam` FooId 1 + `applyOptionalParam` FooName "name" + `setHeader` [("qux_header","xxyy")] +addFooResult <- dispatchMime mgr config addFooRequest +``` + +See the example app and the haddocks for details. diff --git a/v1.46/Setup.hs b/v1.46/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/v1.46/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/v1.46/docker-engine.cabal b/v1.46/docker-engine.cabal new file mode 100644 index 0000000..ed4574d --- /dev/null +++ b/v1.46/docker-engine.cabal @@ -0,0 +1,125 @@ +name: docker-engine +version: 0.146.0 +synopsis: Auto-generated docker-engine API Client +description: . + Client library for calling the Docker Engine API API based on http-client. + . + host: localhost + . + base path: http://localhost/v1.46 + . + Docker Engine API API version: 1.46 + . + OpenAPI version: 3.0.1 + . + Generator version: 7.6.0 + . +category: Web +homepage: https://github.com/codedownio/docker-engine +author: Tom McLaughlin +maintainer: Tom McLaughlin +license: Apache-2.0 +build-type: Simple +cabal-version: >= 1.10 + +extra-source-files: + README.md + +Flag UseKatip + Description: Use the katip package to provide logging (if false, use the default monad-logger package) + Default: True + Manual: True + +library + hs-source-dirs: + lib + ghc-options: -Wall -funbox-strict-fields + build-depends: + aeson >=1.0 && <3.0 + , base >=4.7 && <5.0 + , base64-bytestring >1.0 && <2.0 + , bytestring >=0.10.0 + , case-insensitive + , containers >=0.5.0.0 && <0.8 + , deepseq >= 1.4 && <1.6 + , exceptions >= 0.4 + , http-api-data >= 0.3.4 && <0.7 + , http-client >=0.5 && <0.8 + , http-client-tls + , http-media >= 0.4 && < 0.9 + , http-types >=0.8 && <0.13 + , iso8601-time >=0.1.3 && <0.2.0 + , microlens >= 0.4.3 + , mtl >=2.2.1 + , network >=2.6.2 && <3.9 + , random >=1.1 + , safe-exceptions <0.2 + , text >=0.11 && <3 + , time >=1.5 + , transformers >=0.4.0.0 + , unordered-containers + , vector >=0.10.9 && <0.14 + other-modules: + Paths_docker_engine + exposed-modules: + DockerEngine + DockerEngine.API + DockerEngine.API.Config + DockerEngine.API.Container + DockerEngine.API.Distribution + DockerEngine.API.Exec + DockerEngine.API.Image + DockerEngine.API.Network + DockerEngine.API.Node + DockerEngine.API.Plugin + DockerEngine.API.Secret + DockerEngine.API.Service + DockerEngine.API.Session + DockerEngine.API.Swarm + DockerEngine.API.System + DockerEngine.API.Task + DockerEngine.API.Volume + DockerEngine.Client + DockerEngine.Core + DockerEngine.Logging + DockerEngine.MimeTypes + DockerEngine.Model + DockerEngine.ModelLens + default-language: Haskell2010 + + if flag(UseKatip) + build-depends: katip >=0.8 && < 1.0 + other-modules: DockerEngine.LoggingKatip + cpp-options: -DUSE_KATIP + else + build-depends: monad-logger >=0.3 && <0.4 + other-modules: DockerEngine.LoggingMonadLogger + cpp-options: -DUSE_MONAD_LOGGER + +test-suite tests + type: exitcode-stdio-1.0 + main-is: Test.hs + hs-source-dirs: + tests + ghc-options: -Wall -fno-warn-orphans + build-depends: + docker-engine + , QuickCheck + , aeson + , base >=4.7 && <5.0 + , bytestring >=0.10.0 + , containers + , hspec >=1.8 + , iso8601-time + , mtl >=2.2.1 + , semigroups + , text + , time + , transformers >=0.4.0.0 + , unordered-containers + , vector + other-modules: + ApproxEq + Instances + PropMime + default-language: Haskell2010 diff --git a/v1.46/git_push.sh b/v1.46/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/v1.46/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/v1.46/lib/DockerEngine.hs b/v1.46/lib/DockerEngine.hs new file mode 100644 index 0000000..533c8f8 --- /dev/null +++ b/v1.46/lib/DockerEngine.hs @@ -0,0 +1,31 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine +-} + +module DockerEngine + ( module DockerEngine.API + , module DockerEngine.Client + , module DockerEngine.Core + , module DockerEngine.Logging + , module DockerEngine.MimeTypes + , module DockerEngine.Model + , module DockerEngine.ModelLens + ) where + +import DockerEngine.API +import DockerEngine.Client +import DockerEngine.Core +import DockerEngine.Logging +import DockerEngine.MimeTypes +import DockerEngine.Model +import DockerEngine.ModelLens \ No newline at end of file diff --git a/v1.46/lib/DockerEngine/API.hs b/v1.46/lib/DockerEngine/API.hs new file mode 100644 index 0000000..1ccbb22 --- /dev/null +++ b/v1.46/lib/DockerEngine/API.hs @@ -0,0 +1,47 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API +-} + +module DockerEngine.API + ( module DockerEngine.API.Config + , module DockerEngine.API.Container + , module DockerEngine.API.Distribution + , module DockerEngine.API.Exec + , module DockerEngine.API.Image + , module DockerEngine.API.Network + , module DockerEngine.API.Node + , module DockerEngine.API.Plugin + , module DockerEngine.API.Secret + , module DockerEngine.API.Service + , module DockerEngine.API.Session + , module DockerEngine.API.Swarm + , module DockerEngine.API.System + , module DockerEngine.API.Task + , module DockerEngine.API.Volume + ) where + +import DockerEngine.API.Config +import DockerEngine.API.Container +import DockerEngine.API.Distribution +import DockerEngine.API.Exec +import DockerEngine.API.Image +import DockerEngine.API.Network +import DockerEngine.API.Node +import DockerEngine.API.Plugin +import DockerEngine.API.Secret +import DockerEngine.API.Service +import DockerEngine.API.Session +import DockerEngine.API.Swarm +import DockerEngine.API.System +import DockerEngine.API.Task +import DockerEngine.API.Volume \ No newline at end of file diff --git a/v1.46/lib/DockerEngine/API/Config.hs b/v1.46/lib/DockerEngine/API/Config.hs new file mode 100644 index 0000000..476678e --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Config.hs @@ -0,0 +1,163 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Config +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Config where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Config + +-- *** configCreate + +-- | @POST \/configs\/create@ +-- +-- Create a config +-- +configCreate + :: (Consumes ConfigCreate MimeJSON) + => DockerEngineRequest ConfigCreate MimeJSON IdResponse MimeJSON +configCreate = + _mkRequest "POST" ["/configs/create"] + +data ConfigCreate +instance HasBodyParam ConfigCreate ConfigCreateRequest + +-- | @application/json@ +instance Consumes ConfigCreate MimeJSON + +-- | @application/json@ +instance Produces ConfigCreate MimeJSON + + +-- *** configDelete + +-- | @DELETE \/configs\/{id}@ +-- +-- Delete a config +-- +configDelete + :: Id -- ^ "id" - ID of the config + -> DockerEngineRequest ConfigDelete MimeNoContent NoContent MimeNoContent +configDelete (Id id) = + _mkRequest "DELETE" ["/configs/",toPath id] + +data ConfigDelete +instance Produces ConfigDelete MimeNoContent + + +-- *** configInspect + +-- | @GET \/configs\/{id}@ +-- +-- Inspect a config +-- +configInspect + :: Id -- ^ "id" - ID of the config + -> DockerEngineRequest ConfigInspect MimeNoContent Config MimeJSON +configInspect (Id id) = + _mkRequest "GET" ["/configs/",toPath id] + +data ConfigInspect +-- | @application/json@ +instance Produces ConfigInspect MimeJSON + + +-- *** configList + +-- | @GET \/configs@ +-- +-- List configs +-- +configList + :: DockerEngineRequest ConfigList MimeNoContent [Config] MimeJSON +configList = + _mkRequest "GET" ["/configs"] + +data ConfigList + +-- | /Optional Param/ "filters" - 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=` +instance HasOptionalParam ConfigList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces ConfigList MimeJSON + + +-- *** configUpdate + +-- | @POST \/configs\/{id}\/update@ +-- +-- Update a Config +-- +configUpdate + :: (Consumes ConfigUpdate contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Id -- ^ "id" - The ID or name of the config + -> VersionInteger -- ^ "version" - The version number of the config object being updated. This is required to avoid conflicting writes. + -> DockerEngineRequest ConfigUpdate contentType NoContent MimeNoContent +configUpdate _ (Id id) (VersionInteger version) = + _mkRequest "POST" ["/configs/",toPath id,"/update"] + `addQuery` toQuery ("version", Just version) + +data ConfigUpdate + +-- | /Body Param/ "body" - 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. +instance HasBodyParam ConfigUpdate ConfigSpec + +-- | @application/json@ +instance Consumes ConfigUpdate MimeJSON +-- | @text/plain@ +instance Consumes ConfigUpdate MimePlainText + +instance Produces ConfigUpdate MimeNoContent + diff --git a/v1.46/lib/DockerEngine/API/Container.hs b/v1.46/lib/DockerEngine/API/Container.hs new file mode 100644 index 0000000..a2b80ce --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Container.hs @@ -0,0 +1,769 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Container +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Container where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Container + +-- *** containerArchive + +-- | @GET \/containers\/{id}\/archive@ +-- +-- Get an archive of a filesystem resource in a container +-- +-- Get a tar archive of a resource in the filesystem of container id. +-- +containerArchive + :: Id -- ^ "id" - ID or name of the container + -> Path -- ^ "path" - Resource in the container’s filesystem to archive. + -> DockerEngineRequest ContainerArchive MimeNoContent NoContent MimeNoContent +containerArchive (Id id) (Path path) = + _mkRequest "GET" ["/containers/",toPath id,"/archive"] + `addQuery` toQuery ("path", Just path) + +data ContainerArchive +instance Produces ContainerArchive MimeNoContent + + +-- *** containerArchiveInfo + +-- | @HEAD \/containers\/{id}\/archive@ +-- +-- 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. +-- +containerArchiveInfo + :: Id -- ^ "id" - ID or name of the container + -> Path -- ^ "path" - Resource in the container’s filesystem to archive. + -> DockerEngineRequest ContainerArchiveInfo MimeNoContent NoContent MimeNoContent +containerArchiveInfo (Id id) (Path path) = + _mkRequest "HEAD" ["/containers/",toPath id,"/archive"] + `addQuery` toQuery ("path", Just path) + +data ContainerArchiveInfo +instance Produces ContainerArchiveInfo MimeNoContent + + +-- *** containerAttach + +-- | @POST \/containers\/{id}\/attach@ +-- +-- 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`. +-- +containerAttach + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerAttach MimeNoContent NoContent MimeNoContent +containerAttach (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/attach"] + +data ContainerAttach + +-- | /Optional Param/ "detachKeys" - Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. +instance HasOptionalParam ContainerAttach DetachKeys where + applyOptionalParam req (DetachKeys xs) = + req `addQuery` toQuery ("detachKeys", Just xs) + +-- | /Optional Param/ "logs" - 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. +instance HasOptionalParam ContainerAttach Logs where + applyOptionalParam req (Logs xs) = + req `addQuery` toQuery ("logs", Just xs) + +-- | /Optional Param/ "stream" - Stream attached streams from the time the request was made onwards. +instance HasOptionalParam ContainerAttach Stream where + applyOptionalParam req (Stream xs) = + req `addQuery` toQuery ("stream", Just xs) + +-- | /Optional Param/ "stdin" - Attach to `stdin` +instance HasOptionalParam ContainerAttach Stdin where + applyOptionalParam req (Stdin xs) = + req `addQuery` toQuery ("stdin", Just xs) + +-- | /Optional Param/ "stdout" - Attach to `stdout` +instance HasOptionalParam ContainerAttach Stdout where + applyOptionalParam req (Stdout xs) = + req `addQuery` toQuery ("stdout", Just xs) + +-- | /Optional Param/ "stderr" - Attach to `stderr` +instance HasOptionalParam ContainerAttach Stderr where + applyOptionalParam req (Stderr xs) = + req `addQuery` toQuery ("stderr", Just xs) +instance Produces ContainerAttach MimeNoContent + + +-- *** containerAttachWebsocket + +-- | @GET \/containers\/{id}\/attach\/ws@ +-- +-- Attach to a container via a websocket +-- +containerAttachWebsocket + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerAttachWebsocket MimeNoContent NoContent MimeNoContent +containerAttachWebsocket (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/attach/ws"] + +data ContainerAttachWebsocket + +-- | /Optional Param/ "detachKeys" - Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`. +instance HasOptionalParam ContainerAttachWebsocket DetachKeys where + applyOptionalParam req (DetachKeys xs) = + req `addQuery` toQuery ("detachKeys", Just xs) + +-- | /Optional Param/ "logs" - Return logs +instance HasOptionalParam ContainerAttachWebsocket Logs where + applyOptionalParam req (Logs xs) = + req `addQuery` toQuery ("logs", Just xs) + +-- | /Optional Param/ "stream" - Return stream +instance HasOptionalParam ContainerAttachWebsocket Stream where + applyOptionalParam req (Stream xs) = + req `addQuery` toQuery ("stream", Just xs) + +-- | /Optional Param/ "stdin" - Attach to `stdin` +instance HasOptionalParam ContainerAttachWebsocket Stdin where + applyOptionalParam req (Stdin xs) = + req `addQuery` toQuery ("stdin", Just xs) + +-- | /Optional Param/ "stdout" - Attach to `stdout` +instance HasOptionalParam ContainerAttachWebsocket Stdout where + applyOptionalParam req (Stdout xs) = + req `addQuery` toQuery ("stdout", Just xs) + +-- | /Optional Param/ "stderr" - Attach to `stderr` +instance HasOptionalParam ContainerAttachWebsocket Stderr where + applyOptionalParam req (Stderr xs) = + req `addQuery` toQuery ("stderr", Just xs) +instance Produces ContainerAttachWebsocket MimeNoContent + + +-- *** containerChanges + +-- | @GET \/containers\/{id}\/changes@ +-- +-- 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\") +-- +containerChanges + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerChanges MimeNoContent [FilesystemChange] MimeJSON +containerChanges (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/changes"] + +data ContainerChanges +-- | @application/json@ +instance Produces ContainerChanges MimeJSON + + +-- *** containerCreate + +-- | @POST \/containers\/create@ +-- +-- Create a container +-- +containerCreate + :: (Consumes ContainerCreate contentType, MimeRender contentType ContainerCreateRequest) + => ContentType contentType -- ^ request content-type ('MimeType') + -> ContainerCreateRequest -- ^ "body" - Container to create + -> DockerEngineRequest ContainerCreate contentType ContainerCreateResponse MimeJSON +containerCreate _ body = + _mkRequest "POST" ["/containers/create"] + `setBodyParam` body + +data ContainerCreate + +-- | /Body Param/ "body" - Container to create +instance HasBodyParam ContainerCreate ContainerCreateRequest + +-- | /Optional Param/ "name" - Assign the specified name to the container. Must match `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. +instance HasOptionalParam ContainerCreate Name where + applyOptionalParam req (Name xs) = + req `addQuery` toQuery ("name", Just xs) + +-- | /Optional Param/ "platform" - 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 +instance HasOptionalParam ContainerCreate Platform2 where + applyOptionalParam req (Platform2 xs) = + req `addQuery` toQuery ("platform", Just xs) + +-- | @application/octet-stream@ +instance Consumes ContainerCreate MimeOctetStream +-- | @application/json@ +instance Consumes ContainerCreate MimeJSON + +-- | @application/json@ +instance Produces ContainerCreate MimeJSON + + +-- *** containerDelete + +-- | @DELETE \/containers\/{id}@ +-- +-- Remove a container +-- +containerDelete + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerDelete MimeNoContent NoContent MimeNoContent +containerDelete (Id id) = + _mkRequest "DELETE" ["/containers/",toPath id] + +data ContainerDelete + +-- | /Optional Param/ "v" - Remove anonymous volumes associated with the container. +instance HasOptionalParam ContainerDelete V where + applyOptionalParam req (V xs) = + req `addQuery` toQuery ("v", Just xs) + +-- | /Optional Param/ "force" - If the container is running, kill it before removing it. +instance HasOptionalParam ContainerDelete Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) + +-- | /Optional Param/ "link" - Remove the specified link associated with the container. +instance HasOptionalParam ContainerDelete Link where + applyOptionalParam req (Link xs) = + req `addQuery` toQuery ("link", Just xs) +instance Produces ContainerDelete MimeNoContent + + +-- *** containerExport + +-- | @GET \/containers\/{id}\/export@ +-- +-- Export a container +-- +-- Export the contents of a container as a tarball. +-- +containerExport + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerExport MimeNoContent NoContent MimeNoContent +containerExport (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/export"] + +data ContainerExport +instance Produces ContainerExport MimeNoContent + + +-- *** containerInspect + +-- | @GET \/containers\/{id}\/json@ +-- +-- Inspect a container +-- +-- Return low-level information about a container. +-- +containerInspect + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerInspect MimeNoContent ContainerInspectResponse MimeJSON +containerInspect (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/json"] + +data ContainerInspect + +-- | /Optional Param/ "size" - Return the size of container as fields `SizeRw` and `SizeRootFs` +instance HasOptionalParam ContainerInspect Size where + applyOptionalParam req (Size xs) = + req `addQuery` toQuery ("size", Just xs) +-- | @application/json@ +instance Produces ContainerInspect MimeJSON + + +-- *** containerKill + +-- | @POST \/containers\/{id}\/kill@ +-- +-- Kill a container +-- +-- Send a POSIX signal to a container, defaulting to killing to the container. +-- +containerKill + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerKill MimeNoContent NoContent MimeNoContent +containerKill (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/kill"] + +data ContainerKill + +-- | /Optional Param/ "signal" - Signal to send to the container as an integer or string (e.g. `SIGINT`). +instance HasOptionalParam ContainerKill Signal where + applyOptionalParam req (Signal xs) = + req `addQuery` toQuery ("signal", Just xs) +instance Produces ContainerKill MimeNoContent + + +-- *** containerList + +-- | @GET \/containers\/json@ +-- +-- 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 . +-- +containerList + :: DockerEngineRequest ContainerList MimeNoContent [ContainerSummary] MimeJSON +containerList = + _mkRequest "GET" ["/containers/json"] + +data ContainerList + +-- | /Optional Param/ "all" - Return all containers. By default, only running containers are shown. +instance HasOptionalParam ContainerList All where + applyOptionalParam req (All xs) = + req `addQuery` toQuery ("all", Just xs) + +-- | /Optional Param/ "limit" - Return this number of most recently created containers, including non-running ones. +instance HasOptionalParam ContainerList Limit2 where + applyOptionalParam req (Limit2 xs) = + req `addQuery` toQuery ("limit", Just xs) + +-- | /Optional Param/ "size" - Return the size of container as fields `SizeRw` and `SizeRootFs`. +instance HasOptionalParam ContainerList Size where + applyOptionalParam req (Size xs) = + req `addQuery` toQuery ("size", Just xs) + +-- | /Optional Param/ "filters" - 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 ``) +instance HasOptionalParam ContainerList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces ContainerList MimeJSON + + +-- *** containerLogs + +-- | @GET \/containers\/{id}\/logs@ +-- +-- 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. +-- +containerLogs + :: Accept accept -- ^ request accept ('MimeType') + -> Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerLogs MimeNoContent FilePath accept +containerLogs _ (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/logs"] + +data ContainerLogs + +-- | /Optional Param/ "follow" - Keep connection after returning logs. +instance HasOptionalParam ContainerLogs Follow where + applyOptionalParam req (Follow xs) = + req `addQuery` toQuery ("follow", Just xs) + +-- | /Optional Param/ "stdout" - Return logs from `stdout` +instance HasOptionalParam ContainerLogs Stdout where + applyOptionalParam req (Stdout xs) = + req `addQuery` toQuery ("stdout", Just xs) + +-- | /Optional Param/ "stderr" - Return logs from `stderr` +instance HasOptionalParam ContainerLogs Stderr where + applyOptionalParam req (Stderr xs) = + req `addQuery` toQuery ("stderr", Just xs) + +-- | /Optional Param/ "since" - Only return logs since this time, as a UNIX timestamp +instance HasOptionalParam ContainerLogs Since where + applyOptionalParam req (Since xs) = + req `addQuery` toQuery ("since", Just xs) + +-- | /Optional Param/ "until" - Only return logs before this time, as a UNIX timestamp +instance HasOptionalParam ContainerLogs Until where + applyOptionalParam req (Until xs) = + req `addQuery` toQuery ("until", Just xs) + +-- | /Optional Param/ "timestamps" - Add timestamps to every log line +instance HasOptionalParam ContainerLogs Timestamps where + applyOptionalParam req (Timestamps xs) = + req `addQuery` toQuery ("timestamps", Just xs) + +-- | /Optional Param/ "tail" - Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. +instance HasOptionalParam ContainerLogs Tail where + applyOptionalParam req (Tail xs) = + req `addQuery` toQuery ("tail", Just xs) +-- | @application/json@ +instance Produces ContainerLogs MimeJSON +-- | @application/vnd.docker.raw-stream@ +instance Produces ContainerLogs MimeVndDockerRawStream +-- | @application/vnd.docker.multiplexed-stream@ +instance Produces ContainerLogs MimeVndDockerMultiplexedStream + + +-- *** containerPause + +-- | @POST \/containers\/{id}\/pause@ +-- +-- 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. +-- +containerPause + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerPause MimeNoContent NoContent MimeNoContent +containerPause (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/pause"] + +data ContainerPause +instance Produces ContainerPause MimeNoContent + + +-- *** containerPrune + +-- | @POST \/containers\/prune@ +-- +-- Delete stopped containers +-- +containerPrune + :: DockerEngineRequest ContainerPrune MimeNoContent ContainerPruneResponse MimeJSON +containerPrune = + _mkRequest "POST" ["/containers/prune"] + +data ContainerPrune + +-- | /Optional Param/ "filters" - 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. +instance HasOptionalParam ContainerPrune Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces ContainerPrune MimeJSON + + +-- *** containerRename + +-- | @POST \/containers\/{id}\/rename@ +-- +-- Rename a container +-- +containerRename + :: Id -- ^ "id" - ID or name of the container + -> Name -- ^ "name" - New name for the container + -> DockerEngineRequest ContainerRename MimeNoContent NoContent MimeNoContent +containerRename (Id id) (Name name) = + _mkRequest "POST" ["/containers/",toPath id,"/rename"] + `addQuery` toQuery ("name", Just name) + +data ContainerRename +instance Produces ContainerRename MimeNoContent + + +-- *** containerResize + +-- | @POST \/containers\/{id}\/resize@ +-- +-- Resize a container TTY +-- +-- Resize the TTY for a container. +-- +containerResize + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerResize MimeNoContent NoContent MimeNoContent +containerResize (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/resize"] + +data ContainerResize + +-- | /Optional Param/ "h" - Height of the TTY session in characters +instance HasOptionalParam ContainerResize H where + applyOptionalParam req (H xs) = + req `addQuery` toQuery ("h", Just xs) + +-- | /Optional Param/ "w" - Width of the TTY session in characters +instance HasOptionalParam ContainerResize W where + applyOptionalParam req (W xs) = + req `addQuery` toQuery ("w", Just xs) +instance Produces ContainerResize MimeNoContent + + +-- *** containerRestart + +-- | @POST \/containers\/{id}\/restart@ +-- +-- Restart a container +-- +containerRestart + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerRestart MimeNoContent NoContent MimeNoContent +containerRestart (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/restart"] + +data ContainerRestart + +-- | /Optional Param/ "signal" - Signal to send to the container as an integer or string (e.g. `SIGINT`). +instance HasOptionalParam ContainerRestart Signal where + applyOptionalParam req (Signal xs) = + req `addQuery` toQuery ("signal", Just xs) + +-- | /Optional Param/ "t" - Number of seconds to wait before killing the container +instance HasOptionalParam ContainerRestart T where + applyOptionalParam req (T xs) = + req `addQuery` toQuery ("t", Just xs) +instance Produces ContainerRestart MimeNoContent + + +-- *** containerStart + +-- | @POST \/containers\/{id}\/start@ +-- +-- Start a container +-- +containerStart + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerStart MimeNoContent NoContent MimeNoContent +containerStart (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/start"] + +data ContainerStart + +-- | /Optional Param/ "detachKeys" - Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. +instance HasOptionalParam ContainerStart DetachKeys where + applyOptionalParam req (DetachKeys xs) = + req `addQuery` toQuery ("detachKeys", Just xs) +instance Produces ContainerStart MimeNoContent + + +-- *** containerStats + +-- | @GET \/containers\/{id}\/stats@ +-- +-- 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` +-- +containerStats + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerStats MimeNoContent A.Value MimeJSON +containerStats (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/stats"] + +data ContainerStats + +-- | /Optional Param/ "stream" - Stream the output. If false, the stats will be output once and then it will disconnect. +instance HasOptionalParam ContainerStats Stream where + applyOptionalParam req (Stream xs) = + req `addQuery` toQuery ("stream", Just xs) + +-- | /Optional Param/ "one-shot" - Only get a single stat instead of waiting for 2 cycles. Must be used with `stream=false`. +instance HasOptionalParam ContainerStats OneShot where + applyOptionalParam req (OneShot xs) = + req `addQuery` toQuery ("one-shot", Just xs) +-- | @application/json@ +instance Produces ContainerStats MimeJSON + + +-- *** containerStop + +-- | @POST \/containers\/{id}\/stop@ +-- +-- Stop a container +-- +containerStop + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerStop MimeNoContent NoContent MimeNoContent +containerStop (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/stop"] + +data ContainerStop + +-- | /Optional Param/ "signal" - Signal to send to the container as an integer or string (e.g. `SIGINT`). +instance HasOptionalParam ContainerStop Signal where + applyOptionalParam req (Signal xs) = + req `addQuery` toQuery ("signal", Just xs) + +-- | /Optional Param/ "t" - Number of seconds to wait before killing the container +instance HasOptionalParam ContainerStop T where + applyOptionalParam req (T xs) = + req `addQuery` toQuery ("t", Just xs) +instance Produces ContainerStop MimeNoContent + + +-- *** containerTop + +-- | @GET \/containers\/{id}\/top@ +-- +-- List processes running inside a container +-- +-- On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. +-- +containerTop + :: Accept accept -- ^ request accept ('MimeType') + -> Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerTop MimeNoContent ContainerTopResponse accept +containerTop _ (Id id) = + _mkRequest "GET" ["/containers/",toPath id,"/top"] + +data ContainerTop + +-- | /Optional Param/ "ps_args" - The arguments to pass to `ps`. For example, `aux` +instance HasOptionalParam ContainerTop PsArgs where + applyOptionalParam req (PsArgs xs) = + req `addQuery` toQuery ("ps_args", Just xs) +-- | @application/json@ +instance Produces ContainerTop MimeJSON +-- | @text/plain@ +instance Produces ContainerTop MimePlainText + + +-- *** containerUnpause + +-- | @POST \/containers\/{id}\/unpause@ +-- +-- Unpause a container +-- +-- Resume a container which has been paused. +-- +containerUnpause + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerUnpause MimeNoContent NoContent MimeNoContent +containerUnpause (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/unpause"] + +data ContainerUnpause +instance Produces ContainerUnpause MimeNoContent + + +-- *** containerUpdate + +-- | @POST \/containers\/{id}\/update@ +-- +-- Update a container +-- +-- Change various configuration options of a container without having to recreate it. +-- +containerUpdate + :: (Consumes ContainerUpdate MimeJSON, MimeRender MimeJSON ContainerUpdateRequest) + => ContainerUpdateRequest -- ^ "update" + -> Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerUpdate MimeJSON ContainerUpdateResponse MimeJSON +containerUpdate update (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/update"] + `setBodyParam` update + +data ContainerUpdate +instance HasBodyParam ContainerUpdate ContainerUpdateRequest + +-- | @application/json@ +instance Consumes ContainerUpdate MimeJSON + +-- | @application/json@ +instance Produces ContainerUpdate MimeJSON + + +-- *** containerWait + +-- | @POST \/containers\/{id}\/wait@ +-- +-- Wait for a container +-- +-- Block until a container stops, then returns the exit code. +-- +containerWait + :: Id -- ^ "id" - ID or name of the container + -> DockerEngineRequest ContainerWait MimeNoContent ContainerWaitResponse MimeJSON +containerWait (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/wait"] + +data ContainerWait + +-- | /Optional Param/ "condition" - Wait until a container state reaches the given condition. Defaults to `not-running` if omitted or empty. +instance HasOptionalParam ContainerWait Condition where + applyOptionalParam req (Condition xs) = + req `addQuery` toQuery ("condition", Just xs) +-- | @application/json@ +instance Produces ContainerWait MimeJSON + + +-- *** putContainerArchive + +-- | @PUT \/containers\/{id}\/archive@ +-- +-- 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\". +-- +putContainerArchive + :: (Consumes PutContainerArchive contentType, MimeRender contentType InputStream) + => ContentType contentType -- ^ request content-type ('MimeType') + -> InputStream -- ^ "inputStream" - The input stream must be a tar archive compressed with one of the following algorithms: `identity` (no compression), `gzip`, `bzip2`, or `xz`. + -> Id -- ^ "id" - ID or name of the container + -> Path -- ^ "path" - Path to a directory in the container to extract the archive’s contents into. + -> DockerEngineRequest PutContainerArchive contentType NoContent MimeNoContent +putContainerArchive _ inputStream (Id id) (Path path) = + _mkRequest "PUT" ["/containers/",toPath id,"/archive"] + `setBodyParam` inputStream + `addQuery` toQuery ("path", Just path) + +data PutContainerArchive + +-- | /Body Param/ "inputStream" - The input stream must be a tar archive compressed with one of the following algorithms: `identity` (no compression), `gzip`, `bzip2`, or `xz`. +instance HasBodyParam PutContainerArchive InputStream + +-- | /Optional Param/ "noOverwriteDirNonDir" - 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. +instance HasOptionalParam PutContainerArchive NoOverwriteDirNonDir where + applyOptionalParam req (NoOverwriteDirNonDir xs) = + req `addQuery` toQuery ("noOverwriteDirNonDir", Just xs) + +-- | /Optional Param/ "copyUIDGID" - If `1`, `true`, then it will copy UID/GID maps to the dest file or dir +instance HasOptionalParam PutContainerArchive CopyUidgid where + applyOptionalParam req (CopyUidgid xs) = + req `addQuery` toQuery ("copyUIDGID", Just xs) + +-- | @application/x-tar@ +instance Consumes PutContainerArchive MimeXTar +-- | @application/octet-stream@ +instance Consumes PutContainerArchive MimeOctetStream + +instance Produces PutContainerArchive MimeNoContent + diff --git a/v1.46/lib/DockerEngine/API/Distribution.hs b/v1.46/lib/DockerEngine/API/Distribution.hs new file mode 100644 index 0000000..c4aab4b --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Distribution.hs @@ -0,0 +1,77 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Distribution +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Distribution where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Distribution + +-- *** distributionInspect0 + +-- | @GET \/distribution\/{name}\/json@ +-- +-- Get image information from the registry +-- +-- Return image digest and platform information by contacting the registry. +-- +distributionInspect0 + :: Name -- ^ "name" - Image name or id + -> DockerEngineRequest DistributionInspect0 MimeNoContent DistributionInspect MimeJSON +distributionInspect0 (Name name) = + _mkRequest "GET" ["/distribution/",toPath name,"/json"] + +data DistributionInspect0 +-- | @application/json@ +instance Produces DistributionInspect0 MimeJSON + diff --git a/v1.46/lib/DockerEngine/API/Exec.hs b/v1.46/lib/DockerEngine/API/Exec.hs new file mode 100644 index 0000000..66fb758 --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Exec.hs @@ -0,0 +1,158 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Exec +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Exec where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Exec + +-- *** containerExec + +-- | @POST \/containers\/{id}\/exec@ +-- +-- Create an exec instance +-- +-- Run a command inside a running container. +-- +containerExec + :: (Consumes ContainerExec MimeJSON, MimeRender MimeJSON ExecConfig) + => ExecConfig -- ^ "execConfig" - Exec configuration + -> Id -- ^ "id" - ID or name of container + -> DockerEngineRequest ContainerExec MimeJSON IdResponse MimeJSON +containerExec execConfig (Id id) = + _mkRequest "POST" ["/containers/",toPath id,"/exec"] + `setBodyParam` execConfig + +data ContainerExec + +-- | /Body Param/ "execConfig" - Exec configuration +instance HasBodyParam ContainerExec ExecConfig + +-- | @application/json@ +instance Consumes ContainerExec MimeJSON + +-- | @application/json@ +instance Produces ContainerExec MimeJSON + + +-- *** execInspect + +-- | @GET \/exec\/{id}\/json@ +-- +-- Inspect an exec instance +-- +-- Return low-level information about an exec instance. +-- +execInspect + :: Id -- ^ "id" - Exec instance ID + -> DockerEngineRequest ExecInspect MimeNoContent ExecInspectResponse MimeJSON +execInspect (Id id) = + _mkRequest "GET" ["/exec/",toPath id,"/json"] + +data ExecInspect +-- | @application/json@ +instance Produces ExecInspect MimeJSON + + +-- *** execResize + +-- | @POST \/exec\/{id}\/resize@ +-- +-- Resize an exec instance +-- +-- Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance. +-- +execResize + :: Id -- ^ "id" - Exec instance ID + -> DockerEngineRequest ExecResize MimeNoContent NoContent MimeNoContent +execResize (Id id) = + _mkRequest "POST" ["/exec/",toPath id,"/resize"] + +data ExecResize + +-- | /Optional Param/ "h" - Height of the TTY session in characters +instance HasOptionalParam ExecResize H where + applyOptionalParam req (H xs) = + req `addQuery` toQuery ("h", Just xs) + +-- | /Optional Param/ "w" - Width of the TTY session in characters +instance HasOptionalParam ExecResize W where + applyOptionalParam req (W xs) = + req `addQuery` toQuery ("w", Just xs) +instance Produces ExecResize MimeNoContent + + +-- *** execStart + +-- | @POST \/exec\/{id}\/start@ +-- +-- Start an exec instance +-- +-- Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command. +-- +execStart + :: (Consumes ExecStart MimeJSON) + => Id -- ^ "id" - Exec instance ID + -> DockerEngineRequest ExecStart MimeJSON NoContent MimeNoContent +execStart (Id id) = + _mkRequest "POST" ["/exec/",toPath id,"/start"] + +data ExecStart +instance HasBodyParam ExecStart ExecStartConfig + +-- | @application/json@ +instance Consumes ExecStart MimeJSON + +instance Produces ExecStart MimeNoContent + diff --git a/v1.46/lib/DockerEngine/API/Image.hs b/v1.46/lib/DockerEngine/API/Image.hs new file mode 100644 index 0000000..5f776de --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Image.hs @@ -0,0 +1,660 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Image +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Image where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Image + +-- *** buildPrune + +-- | @POST \/build\/prune@ +-- +-- Delete builder cache +-- +buildPrune + :: DockerEngineRequest BuildPrune MimeNoContent BuildPruneResponse MimeJSON +buildPrune = + _mkRequest "POST" ["/build/prune"] + +data BuildPrune + +-- | /Optional Param/ "keep-storage" - Amount of disk space in bytes to keep for cache +instance HasOptionalParam BuildPrune KeepStorage where + applyOptionalParam req (KeepStorage xs) = + req `addQuery` toQuery ("keep-storage", Just xs) + +-- | /Optional Param/ "all" - Remove all types of build cache +instance HasOptionalParam BuildPrune All where + applyOptionalParam req (All xs) = + req `addQuery` toQuery ("all", Just xs) + +-- | /Optional Param/ "filters" - 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` +instance HasOptionalParam BuildPrune Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces BuildPrune MimeJSON + + +-- *** imageBuild + +-- | @POST \/build@ +-- +-- 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. +-- +imageBuild + :: (Consumes ImageBuild MimeOctetStream) + => DockerEngineRequest ImageBuild MimeOctetStream NoContent MimeNoContent +imageBuild = + _mkRequest "POST" ["/build"] + +data ImageBuild + +-- | /Body Param/ "inputStream" - A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz. +instance HasBodyParam ImageBuild InputStream + +-- | /Optional Param/ "dockerfile" - Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`. +instance HasOptionalParam ImageBuild Dockerfile where + applyOptionalParam req (Dockerfile xs) = + req `addQuery` toQuery ("dockerfile", Just xs) + +-- | /Optional Param/ "t" - A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters. +instance HasOptionalParam ImageBuild TText where + applyOptionalParam req (TText xs) = + req `addQuery` toQuery ("t", Just xs) + +-- | /Optional Param/ "extrahosts" - Extra hosts to add to /etc/hosts +instance HasOptionalParam ImageBuild Extrahosts where + applyOptionalParam req (Extrahosts xs) = + req `addQuery` toQuery ("extrahosts", Just xs) + +-- | /Optional Param/ "remote" - A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball. +instance HasOptionalParam ImageBuild Remote where + applyOptionalParam req (Remote xs) = + req `addQuery` toQuery ("remote", Just xs) + +-- | /Optional Param/ "q" - Suppress verbose build output. +instance HasOptionalParam ImageBuild Q where + applyOptionalParam req (Q xs) = + req `addQuery` toQuery ("q", Just xs) + +-- | /Optional Param/ "nocache" - Do not use the cache when building the image. +instance HasOptionalParam ImageBuild Nocache where + applyOptionalParam req (Nocache xs) = + req `addQuery` toQuery ("nocache", Just xs) + +-- | /Optional Param/ "cachefrom" - JSON array of images used for build cache resolution. +instance HasOptionalParam ImageBuild Cachefrom where + applyOptionalParam req (Cachefrom xs) = + req `addQuery` toQuery ("cachefrom", Just xs) + +-- | /Optional Param/ "pull" - Attempt to pull the image even if an older image exists locally. +instance HasOptionalParam ImageBuild Pull where + applyOptionalParam req (Pull xs) = + req `addQuery` toQuery ("pull", Just xs) + +-- | /Optional Param/ "rm" - Remove intermediate containers after a successful build. +instance HasOptionalParam ImageBuild Rm where + applyOptionalParam req (Rm xs) = + req `addQuery` toQuery ("rm", Just xs) + +-- | /Optional Param/ "forcerm" - Always remove intermediate containers, even upon failure. +instance HasOptionalParam ImageBuild Forcerm where + applyOptionalParam req (Forcerm xs) = + req `addQuery` toQuery ("forcerm", Just xs) + +-- | /Optional Param/ "memory" - Set memory limit for build. +instance HasOptionalParam ImageBuild Memory where + applyOptionalParam req (Memory xs) = + req `addQuery` toQuery ("memory", Just xs) + +-- | /Optional Param/ "memswap" - Total memory (memory + swap). Set as `-1` to disable swap. +instance HasOptionalParam ImageBuild Memswap where + applyOptionalParam req (Memswap xs) = + req `addQuery` toQuery ("memswap", Just xs) + +-- | /Optional Param/ "cpushares" - CPU shares (relative weight). +instance HasOptionalParam ImageBuild Cpushares where + applyOptionalParam req (Cpushares xs) = + req `addQuery` toQuery ("cpushares", Just xs) + +-- | /Optional Param/ "cpusetcpus" - CPUs in which to allow execution (e.g., `0-3`, `0,1`). +instance HasOptionalParam ImageBuild Cpusetcpus where + applyOptionalParam req (Cpusetcpus xs) = + req `addQuery` toQuery ("cpusetcpus", Just xs) + +-- | /Optional Param/ "cpuperiod" - The length of a CPU period in microseconds. +instance HasOptionalParam ImageBuild Cpuperiod where + applyOptionalParam req (Cpuperiod xs) = + req `addQuery` toQuery ("cpuperiod", Just xs) + +-- | /Optional Param/ "cpuquota" - Microseconds of CPU time that the container can get in a CPU period. +instance HasOptionalParam ImageBuild Cpuquota where + applyOptionalParam req (Cpuquota xs) = + req `addQuery` toQuery ("cpuquota", Just xs) + +-- | /Optional Param/ "buildargs" - 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) +instance HasOptionalParam ImageBuild Buildargs where + applyOptionalParam req (Buildargs xs) = + req `addQuery` toQuery ("buildargs", Just xs) + +-- | /Optional Param/ "shmsize" - Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB. +instance HasOptionalParam ImageBuild Shmsize where + applyOptionalParam req (Shmsize xs) = + req `addQuery` toQuery ("shmsize", Just xs) + +-- | /Optional Param/ "squash" - Squash the resulting images layers into a single layer. *(Experimental release only.)* +instance HasOptionalParam ImageBuild Squash where + applyOptionalParam req (Squash xs) = + req `addQuery` toQuery ("squash", Just xs) + +-- | /Optional Param/ "labels" - Arbitrary key/value labels to set on the image, as a JSON map of string pairs. +instance HasOptionalParam ImageBuild Labels where + applyOptionalParam req (Labels xs) = + req `addQuery` toQuery ("labels", Just xs) + +-- | /Optional Param/ "networkmode" - 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. +instance HasOptionalParam ImageBuild Networkmode where + applyOptionalParam req (Networkmode xs) = + req `addQuery` toQuery ("networkmode", Just xs) +instance HasOptionalParam ImageBuild ParamContentType where + applyOptionalParam req (ParamContentType xs) = + req `addHeader` toHeader ("Content-type", xs) + +-- | /Optional Param/ "X-Registry-Config" - 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. +instance HasOptionalParam ImageBuild XRegistryConfig where + applyOptionalParam req (XRegistryConfig xs) = + req `addHeader` toHeader ("X-Registry-Config", xs) + +-- | /Optional Param/ "platform" - Platform in the format os[/arch[/variant]] +instance HasOptionalParam ImageBuild Platform2 where + applyOptionalParam req (Platform2 xs) = + req `addQuery` toQuery ("platform", Just xs) + +-- | /Optional Param/ "target" - Target build stage +instance HasOptionalParam ImageBuild Target where + applyOptionalParam req (Target xs) = + req `addQuery` toQuery ("target", Just xs) + +-- | /Optional Param/ "outputs" - BuildKit output configuration +instance HasOptionalParam ImageBuild Outputs where + applyOptionalParam req (Outputs xs) = + req `addQuery` toQuery ("outputs", Just xs) + +-- | /Optional Param/ "version" - Version of the builder backend to use. - `1` is the first generation classic (deprecated) builder in the Docker daemon (default) - `2` is [BuildKit](https://github.com/moby/buildkit) +instance HasOptionalParam ImageBuild Version where + applyOptionalParam req (Version xs) = + req `addQuery` toQuery ("version", Just xs) + +-- | @application/octet-stream@ +instance Consumes ImageBuild MimeOctetStream + +instance Produces ImageBuild MimeNoContent + + +-- *** imageCommit + +-- | @POST \/commit@ +-- +-- Create a new image from a container +-- +imageCommit + :: (Consumes ImageCommit MimeJSON) + => DockerEngineRequest ImageCommit MimeJSON IdResponse MimeJSON +imageCommit = + _mkRequest "POST" ["/commit"] + +data ImageCommit + +-- | /Body Param/ "containerConfig" - The container configuration +instance HasBodyParam ImageCommit ContainerConfig + +-- | /Optional Param/ "container" - The ID or name of the container to commit +instance HasOptionalParam ImageCommit Container where + applyOptionalParam req (Container xs) = + req `addQuery` toQuery ("container", Just xs) + +-- | /Optional Param/ "repo" - Repository name for the created image +instance HasOptionalParam ImageCommit Repo where + applyOptionalParam req (Repo xs) = + req `addQuery` toQuery ("repo", Just xs) + +-- | /Optional Param/ "tag" - Tag name for the create image +instance HasOptionalParam ImageCommit Tag where + applyOptionalParam req (Tag xs) = + req `addQuery` toQuery ("tag", Just xs) + +-- | /Optional Param/ "comment" - Commit message +instance HasOptionalParam ImageCommit Comment where + applyOptionalParam req (Comment xs) = + req `addQuery` toQuery ("comment", Just xs) + +-- | /Optional Param/ "author" - Author of the image (e.g., `John Hannibal Smith `) +instance HasOptionalParam ImageCommit Author where + applyOptionalParam req (Author xs) = + req `addQuery` toQuery ("author", Just xs) + +-- | /Optional Param/ "pause" - Whether to pause the container before committing +instance HasOptionalParam ImageCommit Pause where + applyOptionalParam req (Pause xs) = + req `addQuery` toQuery ("pause", Just xs) + +-- | /Optional Param/ "changes" - `Dockerfile` instructions to apply while committing +instance HasOptionalParam ImageCommit ChangesText where + applyOptionalParam req (ChangesText xs) = + req `addQuery` toQuery ("changes", Just xs) + +-- | @application/json@ +instance Consumes ImageCommit MimeJSON + +-- | @application/json@ +instance Produces ImageCommit MimeJSON + + +-- *** imageCreate + +-- | @POST \/images\/create@ +-- +-- Create an image +-- +-- Pull or import an image. +-- +imageCreate + :: (Consumes ImageCreate contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> DockerEngineRequest ImageCreate contentType NoContent MimeNoContent +imageCreate _ = + _mkRequest "POST" ["/images/create"] + +data ImageCreate + +-- | /Body Param/ "inputImage" - Image content if the value `-` has been specified in fromSrc query parameter +instance HasBodyParam ImageCreate InputImage + +-- | /Optional Param/ "fromImage" - Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed. +instance HasOptionalParam ImageCreate FromImage where + applyOptionalParam req (FromImage xs) = + req `addQuery` toQuery ("fromImage", Just xs) + +-- | /Optional Param/ "fromSrc" - Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image. +instance HasOptionalParam ImageCreate FromSrc where + applyOptionalParam req (FromSrc xs) = + req `addQuery` toQuery ("fromSrc", Just xs) + +-- | /Optional Param/ "repo" - 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. +instance HasOptionalParam ImageCreate Repo where + applyOptionalParam req (Repo xs) = + req `addQuery` toQuery ("repo", Just xs) + +-- | /Optional Param/ "tag" - Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled. +instance HasOptionalParam ImageCreate Tag where + applyOptionalParam req (Tag xs) = + req `addQuery` toQuery ("tag", Just xs) + +-- | /Optional Param/ "message" - Set commit message for imported image. +instance HasOptionalParam ImageCreate Message where + applyOptionalParam req (Message xs) = + req `addQuery` toQuery ("message", Just xs) + +-- | /Optional Param/ "X-Registry-Auth" - A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication) for details. +instance HasOptionalParam ImageCreate XRegistryAuth where + applyOptionalParam req (XRegistryAuth xs) = + req `addHeader` toHeader ("X-Registry-Auth", xs) + +-- | /Optional Param/ "changes" - 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` +instance HasOptionalParam ImageCreate Changes where + applyOptionalParam req (Changes xs) = + req `addQuery` toQueryColl CommaSeparated ("changes", Just xs) + +-- | /Optional Param/ "platform" - 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. +instance HasOptionalParam ImageCreate Platform2 where + applyOptionalParam req (Platform2 xs) = + req `addQuery` toQuery ("platform", Just xs) + +-- | @application/octet-stream@ +instance Consumes ImageCreate MimeOctetStream +-- | @text/plain@ +instance Consumes ImageCreate MimePlainText + +instance Produces ImageCreate MimeNoContent + + +-- *** imageDelete + +-- | @DELETE \/images\/{name}@ +-- +-- 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. +-- +imageDelete + :: Name -- ^ "name" - Image name or ID + -> DockerEngineRequest ImageDelete MimeNoContent [ImageDeleteResponseItem] MimeJSON +imageDelete (Name name) = + _mkRequest "DELETE" ["/images/",toPath name] + +data ImageDelete + +-- | /Optional Param/ "force" - Remove the image even if it is being used by stopped containers or has other tags +instance HasOptionalParam ImageDelete Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) + +-- | /Optional Param/ "noprune" - Do not delete untagged parent images +instance HasOptionalParam ImageDelete Noprune where + applyOptionalParam req (Noprune xs) = + req `addQuery` toQuery ("noprune", Just xs) +-- | @application/json@ +instance Produces ImageDelete MimeJSON + + +-- *** imageGet + +-- | @GET \/images\/{name}\/get@ +-- +-- 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\" } } ``` +-- +imageGet + :: Name -- ^ "name" - Image name or ID + -> DockerEngineRequest ImageGet MimeNoContent FilePath MimeXTar +imageGet (Name name) = + _mkRequest "GET" ["/images/",toPath name,"/get"] + +data ImageGet +-- | @application/x-tar@ +instance Produces ImageGet MimeXTar + + +-- *** imageGetAll + +-- | @GET \/images\/get@ +-- +-- 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). +-- +imageGetAll + :: DockerEngineRequest ImageGetAll MimeNoContent FilePath MimeXTar +imageGetAll = + _mkRequest "GET" ["/images/get"] + +data ImageGetAll + +-- | /Optional Param/ "names" - Image names to filter by +instance HasOptionalParam ImageGetAll Names where + applyOptionalParam req (Names xs) = + req `addQuery` toQueryColl CommaSeparated ("names", Just xs) +-- | @application/x-tar@ +instance Produces ImageGetAll MimeXTar + + +-- *** imageHistory + +-- | @GET \/images\/{name}\/history@ +-- +-- Get the history of an image +-- +-- Return parent layers of an image. +-- +imageHistory + :: Name -- ^ "name" - Image name or ID + -> DockerEngineRequest ImageHistory MimeNoContent [HistoryResponseItem] MimeJSON +imageHistory (Name name) = + _mkRequest "GET" ["/images/",toPath name,"/history"] + +data ImageHistory +-- | @application/json@ +instance Produces ImageHistory MimeJSON + + +-- *** imageInspect0 + +-- | @GET \/images\/{name}\/json@ +-- +-- Inspect an image +-- +-- Return low-level information about an image. +-- +imageInspect0 + :: Name -- ^ "name" - Image name or id + -> DockerEngineRequest ImageInspect0 MimeNoContent ImageInspect MimeJSON +imageInspect0 (Name name) = + _mkRequest "GET" ["/images/",toPath name,"/json"] + +data ImageInspect0 +-- | @application/json@ +instance Produces ImageInspect0 MimeJSON + + +-- *** imageList + +-- | @GET \/images\/json@ +-- +-- List Images +-- +-- Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image. +-- +imageList + :: DockerEngineRequest ImageList MimeNoContent [ImageSummary] MimeJSON +imageList = + _mkRequest "GET" ["/images/json"] + +data ImageList + +-- | /Optional Param/ "all" - Show all images. Only images from a final layer (no children) are shown by default. +instance HasOptionalParam ImageList All where + applyOptionalParam req (All xs) = + req `addQuery` toQuery ("all", Just xs) + +-- | /Optional Param/ "filters" - 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 ``) - `until=` +instance HasOptionalParam ImageList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) + +-- | /Optional Param/ "shared-size" - Compute and show shared size as a `SharedSize` field on each image. +instance HasOptionalParam ImageList SharedSize where + applyOptionalParam req (SharedSize xs) = + req `addQuery` toQuery ("shared-size", Just xs) + +-- | /Optional Param/ "digests" - Show digest information as a `RepoDigests` field on each image. +instance HasOptionalParam ImageList Digests where + applyOptionalParam req (Digests xs) = + req `addQuery` toQuery ("digests", Just xs) +-- | @application/json@ +instance Produces ImageList MimeJSON + + +-- *** imageLoad + +-- | @POST \/images\/load@ +-- +-- Import images +-- +-- Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). +-- +imageLoad + :: (Consumes ImageLoad MimeXTar) + => DockerEngineRequest ImageLoad MimeXTar NoContent MimeNoContent +imageLoad = + _mkRequest "POST" ["/images/load"] + +data ImageLoad + +-- | /Body Param/ "imagesTarball" - Tar archive containing images +instance HasBodyParam ImageLoad ImagesTarball + +-- | /Optional Param/ "quiet" - Suppress progress details during load. +instance HasOptionalParam ImageLoad Quiet where + applyOptionalParam req (Quiet xs) = + req `addQuery` toQuery ("quiet", Just xs) + +-- | @application/x-tar@ +instance Consumes ImageLoad MimeXTar + +instance Produces ImageLoad MimeNoContent + + +-- *** imagePrune + +-- | @POST \/images\/prune@ +-- +-- Delete unused images +-- +imagePrune + :: DockerEngineRequest ImagePrune MimeNoContent ImagePruneResponse MimeJSON +imagePrune = + _mkRequest "POST" ["/images/prune"] + +data ImagePrune + +-- | /Optional Param/ "filters" - 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. +instance HasOptionalParam ImagePrune Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces ImagePrune MimeJSON + + +-- *** imagePush + +-- | @POST \/images\/{name}\/push@ +-- +-- 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. +-- +imagePush + :: Name -- ^ "name" - Image name or ID. + -> XRegistryAuth -- ^ "xRegistryAuth" - A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication) for details. + -> DockerEngineRequest ImagePush MimeNoContent NoContent MimeNoContent +imagePush (Name name) (XRegistryAuth xRegistryAuth) = + _mkRequest "POST" ["/images/",toPath name,"/push"] + `addHeader` toHeader ("X-Registry-Auth", xRegistryAuth) + +data ImagePush + +-- | /Optional Param/ "tag" - The tag to associate with the image on the registry. +instance HasOptionalParam ImagePush Tag where + applyOptionalParam req (Tag xs) = + req `addQuery` toQuery ("tag", Just xs) + +-- | /Optional Param/ "platform" - Select a platform-specific manifest to be pushed. OCI platform (JSON encoded) +instance HasOptionalParam ImagePush Platform2 where + applyOptionalParam req (Platform2 xs) = + req `addQuery` toQuery ("platform", Just xs) +instance Produces ImagePush MimeNoContent + + +-- *** imageSearch + +-- | @GET \/images\/search@ +-- +-- Search images +-- +-- Search for an image on Docker Hub. +-- +imageSearch + :: Term -- ^ "term" - Term to search + -> DockerEngineRequest ImageSearch MimeNoContent [ImageSearchResponseItem] MimeJSON +imageSearch (Term term) = + _mkRequest "GET" ["/images/search"] + `addQuery` toQuery ("term", Just term) + +data ImageSearch + +-- | /Optional Param/ "limit" - Maximum number of results to return +instance HasOptionalParam ImageSearch Limit2 where + applyOptionalParam req (Limit2 xs) = + req `addQuery` toQuery ("limit", Just xs) + +-- | /Optional Param/ "filters" - A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - `is-official=(true|false)` - `stars=` Matches images that has at least 'number' stars. +instance HasOptionalParam ImageSearch Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces ImageSearch MimeJSON + + +-- *** imageTag + +-- | @POST \/images\/{name}\/tag@ +-- +-- Tag an image +-- +-- Tag an image so that it becomes part of a repository. +-- +imageTag + :: Name -- ^ "name" - Image name or ID to tag. + -> DockerEngineRequest ImageTag MimeNoContent NoContent MimeNoContent +imageTag (Name name) = + _mkRequest "POST" ["/images/",toPath name,"/tag"] + +data ImageTag + +-- | /Optional Param/ "repo" - The repository to tag in. For example, `someuser/someimage`. +instance HasOptionalParam ImageTag Repo where + applyOptionalParam req (Repo xs) = + req `addQuery` toQuery ("repo", Just xs) + +-- | /Optional Param/ "tag" - The name of the new tag. +instance HasOptionalParam ImageTag Tag where + applyOptionalParam req (Tag xs) = + req `addQuery` toQuery ("tag", Just xs) +instance Produces ImageTag MimeNoContent + diff --git a/v1.46/lib/DockerEngine/API/Network.hs b/v1.46/lib/DockerEngine/API/Network.hs new file mode 100644 index 0000000..78e0059 --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Network.hs @@ -0,0 +1,221 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Network +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Network where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Network + +-- *** networkConnect + +-- | @POST \/networks\/{id}\/connect@ +-- +-- Connect a container to a network +-- +-- The network must be either a local-scoped network or a swarm-scoped network with the `attachable` option set. A network cannot be re-attached to a running container +-- +networkConnect + :: (Consumes NetworkConnect MimeJSON, MimeRender MimeJSON NetworkConnectRequest) + => NetworkConnectRequest -- ^ "container" + -> Id -- ^ "id" - Network ID or name + -> DockerEngineRequest NetworkConnect MimeJSON NoContent MimeNoContent +networkConnect container (Id id) = + _mkRequest "POST" ["/networks/",toPath id,"/connect"] + `setBodyParam` container + +data NetworkConnect +instance HasBodyParam NetworkConnect NetworkConnectRequest + +-- | @application/json@ +instance Consumes NetworkConnect MimeJSON + +instance Produces NetworkConnect MimeNoContent + + +-- *** networkCreate + +-- | @POST \/networks\/create@ +-- +-- Create a network +-- +networkCreate + :: (Consumes NetworkCreate MimeJSON, MimeRender MimeJSON NetworkCreateRequest) + => NetworkCreateRequest -- ^ "networkConfig" - Network configuration + -> DockerEngineRequest NetworkCreate MimeJSON NetworkCreateResponse MimeJSON +networkCreate networkConfig = + _mkRequest "POST" ["/networks/create"] + `setBodyParam` networkConfig + +data NetworkCreate + +-- | /Body Param/ "networkConfig" - Network configuration +instance HasBodyParam NetworkCreate NetworkCreateRequest + +-- | @application/json@ +instance Consumes NetworkCreate MimeJSON + +-- | @application/json@ +instance Produces NetworkCreate MimeJSON + + +-- *** networkDelete + +-- | @DELETE \/networks\/{id}@ +-- +-- Remove a network +-- +networkDelete + :: Id -- ^ "id" - Network ID or name + -> DockerEngineRequest NetworkDelete MimeNoContent NoContent MimeNoContent +networkDelete (Id id) = + _mkRequest "DELETE" ["/networks/",toPath id] + +data NetworkDelete +instance Produces NetworkDelete MimeNoContent + + +-- *** networkDisconnect + +-- | @POST \/networks\/{id}\/disconnect@ +-- +-- Disconnect a container from a network +-- +networkDisconnect + :: (Consumes NetworkDisconnect MimeJSON, MimeRender MimeJSON NetworkDisconnectRequest) + => NetworkDisconnectRequest -- ^ "container" + -> Id -- ^ "id" - Network ID or name + -> DockerEngineRequest NetworkDisconnect MimeJSON NoContent MimeNoContent +networkDisconnect container (Id id) = + _mkRequest "POST" ["/networks/",toPath id,"/disconnect"] + `setBodyParam` container + +data NetworkDisconnect +instance HasBodyParam NetworkDisconnect NetworkDisconnectRequest + +-- | @application/json@ +instance Consumes NetworkDisconnect MimeJSON + +instance Produces NetworkDisconnect MimeNoContent + + +-- *** networkInspect + +-- | @GET \/networks\/{id}@ +-- +-- Inspect a network +-- +networkInspect + :: Id -- ^ "id" - Network ID or name + -> DockerEngineRequest NetworkInspect MimeNoContent Network MimeJSON +networkInspect (Id id) = + _mkRequest "GET" ["/networks/",toPath id] + +data NetworkInspect + +-- | /Optional Param/ "verbose" - Detailed inspect output for troubleshooting +instance HasOptionalParam NetworkInspect Verbose where + applyOptionalParam req (Verbose xs) = + req `addQuery` toQuery ("verbose", Just xs) + +-- | /Optional Param/ "scope" - Filter the network by scope (swarm, global, or local) +instance HasOptionalParam NetworkInspect Scope where + applyOptionalParam req (Scope xs) = + req `addQuery` toQuery ("scope", Just xs) +-- | @application/json@ +instance Produces NetworkInspect MimeJSON + + +-- *** networkList + +-- | @GET \/networks@ +-- +-- List networks +-- +-- Returns a list of networks. For details on the format, see the [network inspect endpoint](#operation/NetworkInspect). Note that it uses a different, smaller representation of a network than inspecting a single network. For example, the list of containers attached to the network is not propagated in API versions 1.28 and up. +-- +networkList + :: DockerEngineRequest NetworkList MimeNoContent [Network] MimeJSON +networkList = + _mkRequest "GET" ["/networks"] + +data NetworkList + +-- | /Optional Param/ "filters" - JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters: - `dangling=` When set to `true` (or `1`), returns all networks that are not in use by a container. When set to `false` (or `0`), only networks that are in use by one or more containers are returned. - `driver=` Matches a network's driver. - `id=` Matches all or part of a network ID. - `label=` or `label==` of a network label. - `name=` Matches all or part of a network name. - `scope=[\"swarm\"|\"global\"|\"local\"]` Filters networks by scope (`swarm`, `global`, or `local`). - `type=[\"custom\"|\"builtin\"]` Filters networks by type. The `custom` keyword returns all user-defined networks. +instance HasOptionalParam NetworkList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces NetworkList MimeJSON + + +-- *** networkPrune + +-- | @POST \/networks\/prune@ +-- +-- Delete unused networks +-- +networkPrune + :: DockerEngineRequest NetworkPrune MimeNoContent NetworkPruneResponse MimeJSON +networkPrune = + _mkRequest "POST" ["/networks/prune"] + +data NetworkPrune + +-- | /Optional Param/ "filters" - Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `until=` Prune networks 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 networks with (or without, in case `label!=...` is used) the specified labels. +instance HasOptionalParam NetworkPrune Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces NetworkPrune MimeJSON + diff --git a/v1.46/lib/DockerEngine/API/Node.hs b/v1.46/lib/DockerEngine/API/Node.hs new file mode 100644 index 0000000..2446fb6 --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Node.hs @@ -0,0 +1,150 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Node +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Node where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Node + +-- *** nodeDelete + +-- | @DELETE \/nodes\/{id}@ +-- +-- Delete a node +-- +nodeDelete + :: Id -- ^ "id" - The ID or name of the node + -> DockerEngineRequest NodeDelete MimeNoContent NoContent MimeNoContent +nodeDelete (Id id) = + _mkRequest "DELETE" ["/nodes/",toPath id] + +data NodeDelete + +-- | /Optional Param/ "force" - Force remove a node from the swarm +instance HasOptionalParam NodeDelete Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) +instance Produces NodeDelete MimeNoContent + + +-- *** nodeInspect + +-- | @GET \/nodes\/{id}@ +-- +-- Inspect a node +-- +nodeInspect + :: Accept accept -- ^ request accept ('MimeType') + -> Id -- ^ "id" - The ID or name of the node + -> DockerEngineRequest NodeInspect MimeNoContent Node accept +nodeInspect _ (Id id) = + _mkRequest "GET" ["/nodes/",toPath id] + +data NodeInspect +-- | @application/json@ +instance Produces NodeInspect MimeJSON +-- | @text/plain@ +instance Produces NodeInspect MimePlainText + + +-- *** nodeList + +-- | @GET \/nodes@ +-- +-- List nodes +-- +nodeList + :: Accept accept -- ^ request accept ('MimeType') + -> DockerEngineRequest NodeList MimeNoContent [Node] accept +nodeList _ = + _mkRequest "GET" ["/nodes"] + +data NodeList + +-- | /Optional Param/ "filters" - 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`)` +instance HasOptionalParam NodeList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces NodeList MimeJSON +-- | @text/plain@ +instance Produces NodeList MimePlainText + + +-- *** nodeUpdate + +-- | @POST \/nodes\/{id}\/update@ +-- +-- Update a node +-- +nodeUpdate + :: (Consumes NodeUpdate contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Id -- ^ "id" - The ID of the node + -> VersionInteger -- ^ "version" - The version number of the node object being updated. This is required to avoid conflicting writes. + -> DockerEngineRequest NodeUpdate contentType NoContent MimeNoContent +nodeUpdate _ (Id id) (VersionInteger version) = + _mkRequest "POST" ["/nodes/",toPath id,"/update"] + `addQuery` toQuery ("version", Just version) + +data NodeUpdate +instance HasBodyParam NodeUpdate NodeSpec + +-- | @application/json@ +instance Consumes NodeUpdate MimeJSON +-- | @text/plain@ +instance Consumes NodeUpdate MimePlainText + +instance Produces NodeUpdate MimeNoContent + diff --git a/v1.46/lib/DockerEngine/API/Plugin.hs b/v1.46/lib/DockerEngine/API/Plugin.hs new file mode 100644 index 0000000..ec15749 --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Plugin.hs @@ -0,0 +1,324 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Plugin +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Plugin where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Plugin + +-- *** getPluginPrivileges + +-- | @GET \/plugins\/privileges@ +-- +-- Get plugin privileges +-- +getPluginPrivileges + :: Accept accept -- ^ request accept ('MimeType') + -> Remote -- ^ "remote" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest GetPluginPrivileges MimeNoContent [PluginPrivilege] accept +getPluginPrivileges _ (Remote remote) = + _mkRequest "GET" ["/plugins/privileges"] + `addQuery` toQuery ("remote", Just remote) + +data GetPluginPrivileges +-- | @application/json@ +instance Produces GetPluginPrivileges MimeJSON +-- | @text/plain@ +instance Produces GetPluginPrivileges MimePlainText + + +-- *** pluginCreate + +-- | @POST \/plugins\/create@ +-- +-- Create a plugin +-- +pluginCreate + :: (Consumes PluginCreate MimeXTar) + => Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginCreate MimeXTar NoContent MimeNoContent +pluginCreate (Name name) = + _mkRequest "POST" ["/plugins/create"] + `addQuery` toQuery ("name", Just name) + +data PluginCreate + +-- | /Body Param/ "tarContext" - Path to tar containing plugin rootfs and manifest +instance HasBodyParam PluginCreate TarContext + +-- | @application/x-tar@ +instance Consumes PluginCreate MimeXTar + +instance Produces PluginCreate MimeNoContent + + +-- *** pluginDelete + +-- | @DELETE \/plugins\/{name}@ +-- +-- Remove a plugin +-- +pluginDelete + :: Accept accept -- ^ request accept ('MimeType') + -> Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginDelete MimeNoContent Plugin accept +pluginDelete _ (Name name) = + _mkRequest "DELETE" ["/plugins/",toPath name] + +data PluginDelete + +-- | /Optional Param/ "force" - Disable the plugin before removing. This may result in issues if the plugin is in use by a container. +instance HasOptionalParam PluginDelete Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) +-- | @application/json@ +instance Produces PluginDelete MimeJSON +-- | @text/plain@ +instance Produces PluginDelete MimePlainText + + +-- *** pluginDisable + +-- | @POST \/plugins\/{name}\/disable@ +-- +-- Disable a plugin +-- +pluginDisable + :: Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginDisable MimeNoContent NoContent MimeNoContent +pluginDisable (Name name) = + _mkRequest "POST" ["/plugins/",toPath name,"/disable"] + +data PluginDisable + +-- | /Optional Param/ "force" - Force disable a plugin even if still in use. +instance HasOptionalParam PluginDisable Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) +instance Produces PluginDisable MimeNoContent + + +-- *** pluginEnable + +-- | @POST \/plugins\/{name}\/enable@ +-- +-- Enable a plugin +-- +pluginEnable + :: Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginEnable MimeNoContent NoContent MimeNoContent +pluginEnable (Name name) = + _mkRequest "POST" ["/plugins/",toPath name,"/enable"] + +data PluginEnable + +-- | /Optional Param/ "timeout" - Set the HTTP client timeout (in seconds) +instance HasOptionalParam PluginEnable Timeout where + applyOptionalParam req (Timeout xs) = + req `addQuery` toQuery ("timeout", Just xs) +instance Produces PluginEnable MimeNoContent + + +-- *** pluginInspect + +-- | @GET \/plugins\/{name}\/json@ +-- +-- Inspect a plugin +-- +pluginInspect + :: Accept accept -- ^ request accept ('MimeType') + -> Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginInspect MimeNoContent Plugin accept +pluginInspect _ (Name name) = + _mkRequest "GET" ["/plugins/",toPath name,"/json"] + +data PluginInspect +-- | @application/json@ +instance Produces PluginInspect MimeJSON +-- | @text/plain@ +instance Produces PluginInspect MimePlainText + + +-- *** pluginList + +-- | @GET \/plugins@ +-- +-- List plugins +-- +-- Returns information about installed plugins. +-- +pluginList + :: DockerEngineRequest PluginList MimeNoContent [Plugin] MimeJSON +pluginList = + _mkRequest "GET" ["/plugins"] + +data PluginList + +-- | /Optional Param/ "filters" - A JSON encoded value of the filters (a `map[string][]string`) to process on the plugin list. Available filters: - `capability=` - `enable=|` +instance HasOptionalParam PluginList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces PluginList MimeJSON + + +-- *** pluginPull + +-- | @POST \/plugins\/pull@ +-- +-- 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). +-- +pluginPull + :: (Consumes PluginPull contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Remote -- ^ "remote" - Remote reference for plugin to install. The `:latest` tag is optional, and is used as the default if omitted. + -> DockerEngineRequest PluginPull contentType NoContent MimeNoContent +pluginPull _ (Remote remote) = + _mkRequest "POST" ["/plugins/pull"] + `addQuery` toQuery ("remote", Just remote) + +data PluginPull +instance HasBodyParam PluginPull Body + +-- | /Optional Param/ "name" - Local name for the pulled plugin. The `:latest` tag is optional, and is used as the default if omitted. +instance HasOptionalParam PluginPull Name where + applyOptionalParam req (Name xs) = + req `addQuery` toQuery ("name", Just xs) + +-- | /Optional Param/ "X-Registry-Auth" - A base64url-encoded auth configuration to use when pulling a plugin from a registry. Refer to the [authentication section](#section/Authentication) for details. +instance HasOptionalParam PluginPull XRegistryAuth where + applyOptionalParam req (XRegistryAuth xs) = + req `addHeader` toHeader ("X-Registry-Auth", xs) + +-- | @application/json@ +instance Consumes PluginPull MimeJSON +-- | @text/plain@ +instance Consumes PluginPull MimePlainText + +instance Produces PluginPull MimeNoContent + + +-- *** pluginPush + +-- | @POST \/plugins\/{name}\/push@ +-- +-- Push a plugin +-- +-- Push a plugin to the registry. +-- +pluginPush + :: Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginPush MimeNoContent NoContent MimeNoContent +pluginPush (Name name) = + _mkRequest "POST" ["/plugins/",toPath name,"/push"] + +data PluginPush +instance Produces PluginPush MimeNoContent + + +-- *** pluginSet + +-- | @POST \/plugins\/{name}\/set@ +-- +-- Configure a plugin +-- +pluginSet + :: (Consumes PluginSet MimeJSON) + => Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> DockerEngineRequest PluginSet MimeJSON NoContent MimeNoContent +pluginSet (Name name) = + _mkRequest "POST" ["/plugins/",toPath name,"/set"] + +data PluginSet +instance HasBodyParam PluginSet BodyText + +-- | @application/json@ +instance Consumes PluginSet MimeJSON + +instance Produces PluginSet MimeNoContent + + +-- *** pluginUpgrade + +-- | @POST \/plugins\/{name}\/upgrade@ +-- +-- Upgrade a plugin +-- +pluginUpgrade + :: (Consumes PluginUpgrade contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Name -- ^ "name" - The name of the plugin. The `:latest` tag is optional, and is the default if omitted. + -> Remote -- ^ "remote" - Remote reference to upgrade to. The `:latest` tag is optional, and is used as the default if omitted. + -> DockerEngineRequest PluginUpgrade contentType NoContent MimeNoContent +pluginUpgrade _ (Name name) (Remote remote) = + _mkRequest "POST" ["/plugins/",toPath name,"/upgrade"] + `addQuery` toQuery ("remote", Just remote) + +data PluginUpgrade +instance HasBodyParam PluginUpgrade Body + +-- | /Optional Param/ "X-Registry-Auth" - A base64url-encoded auth configuration to use when pulling a plugin from a registry. Refer to the [authentication section](#section/Authentication) for details. +instance HasOptionalParam PluginUpgrade XRegistryAuth where + applyOptionalParam req (XRegistryAuth xs) = + req `addHeader` toHeader ("X-Registry-Auth", xs) + +-- | @application/json@ +instance Consumes PluginUpgrade MimeJSON +-- | @text/plain@ +instance Consumes PluginUpgrade MimePlainText + +instance Produces PluginUpgrade MimeNoContent + diff --git a/v1.46/lib/DockerEngine/API/Secret.hs b/v1.46/lib/DockerEngine/API/Secret.hs new file mode 100644 index 0000000..88f0b7d --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Secret.hs @@ -0,0 +1,163 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Secret +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Secret where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Secret + +-- *** secretCreate + +-- | @POST \/secrets\/create@ +-- +-- Create a secret +-- +secretCreate + :: (Consumes SecretCreate MimeJSON) + => DockerEngineRequest SecretCreate MimeJSON IdResponse MimeJSON +secretCreate = + _mkRequest "POST" ["/secrets/create"] + +data SecretCreate +instance HasBodyParam SecretCreate SecretCreateRequest + +-- | @application/json@ +instance Consumes SecretCreate MimeJSON + +-- | @application/json@ +instance Produces SecretCreate MimeJSON + + +-- *** secretDelete + +-- | @DELETE \/secrets\/{id}@ +-- +-- Delete a secret +-- +secretDelete + :: Id -- ^ "id" - ID of the secret + -> DockerEngineRequest SecretDelete MimeNoContent NoContent MimeNoContent +secretDelete (Id id) = + _mkRequest "DELETE" ["/secrets/",toPath id] + +data SecretDelete +instance Produces SecretDelete MimeNoContent + + +-- *** secretInspect + +-- | @GET \/secrets\/{id}@ +-- +-- Inspect a secret +-- +secretInspect + :: Id -- ^ "id" - ID of the secret + -> DockerEngineRequest SecretInspect MimeNoContent Secret MimeJSON +secretInspect (Id id) = + _mkRequest "GET" ["/secrets/",toPath id] + +data SecretInspect +-- | @application/json@ +instance Produces SecretInspect MimeJSON + + +-- *** secretList + +-- | @GET \/secrets@ +-- +-- List secrets +-- +secretList + :: DockerEngineRequest SecretList MimeNoContent [Secret] MimeJSON +secretList = + _mkRequest "GET" ["/secrets"] + +data SecretList + +-- | /Optional Param/ "filters" - 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=` +instance HasOptionalParam SecretList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces SecretList MimeJSON + + +-- *** secretUpdate + +-- | @POST \/secrets\/{id}\/update@ +-- +-- Update a Secret +-- +secretUpdate + :: (Consumes SecretUpdate contentType) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Id -- ^ "id" - The ID or name of the secret + -> VersionInteger -- ^ "version" - The version number of the secret object being updated. This is required to avoid conflicting writes. + -> DockerEngineRequest SecretUpdate contentType NoContent MimeNoContent +secretUpdate _ (Id id) (VersionInteger version) = + _mkRequest "POST" ["/secrets/",toPath id,"/update"] + `addQuery` toQuery ("version", Just version) + +data SecretUpdate + +-- | /Body Param/ "body" - 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. +instance HasBodyParam SecretUpdate SecretSpec + +-- | @application/json@ +instance Consumes SecretUpdate MimeJSON +-- | @text/plain@ +instance Consumes SecretUpdate MimePlainText + +instance Produces SecretUpdate MimeNoContent + diff --git a/v1.46/lib/DockerEngine/API/Service.hs b/v1.46/lib/DockerEngine/API/Service.hs new file mode 100644 index 0000000..c245569 --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Service.hs @@ -0,0 +1,258 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Service +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Service where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Service + +-- *** serviceCreate + +-- | @POST \/services\/create@ +-- +-- Create a service +-- +serviceCreate + :: (Consumes ServiceCreate MimeJSON, MimeRender MimeJSON ServiceCreateRequest) + => ServiceCreateRequest -- ^ "body" + -> DockerEngineRequest ServiceCreate MimeJSON ServiceCreateResponse MimeJSON +serviceCreate body = + _mkRequest "POST" ["/services/create"] + `setBodyParam` body + +data ServiceCreate +instance HasBodyParam ServiceCreate ServiceCreateRequest + +-- | /Optional Param/ "X-Registry-Auth" - A base64url-encoded auth configuration for pulling from private registries. Refer to the [authentication section](#section/Authentication) for details. +instance HasOptionalParam ServiceCreate XRegistryAuth where + applyOptionalParam req (XRegistryAuth xs) = + req `addHeader` toHeader ("X-Registry-Auth", xs) + +-- | @application/json@ +instance Consumes ServiceCreate MimeJSON + +-- | @application/json@ +instance Produces ServiceCreate MimeJSON + + +-- *** serviceDelete + +-- | @DELETE \/services\/{id}@ +-- +-- Delete a service +-- +serviceDelete + :: Id -- ^ "id" - ID or name of service. + -> DockerEngineRequest ServiceDelete MimeNoContent NoContent MimeNoContent +serviceDelete (Id id) = + _mkRequest "DELETE" ["/services/",toPath id] + +data ServiceDelete +instance Produces ServiceDelete MimeNoContent + + +-- *** serviceInspect + +-- | @GET \/services\/{id}@ +-- +-- Inspect a service +-- +serviceInspect + :: Accept accept -- ^ request accept ('MimeType') + -> Id -- ^ "id" - ID or name of service. + -> DockerEngineRequest ServiceInspect MimeNoContent Service accept +serviceInspect _ (Id id) = + _mkRequest "GET" ["/services/",toPath id] + +data ServiceInspect + +-- | /Optional Param/ "insertDefaults" - Fill empty fields with default values. +instance HasOptionalParam ServiceInspect InsertDefaults where + applyOptionalParam req (InsertDefaults xs) = + req `addQuery` toQuery ("insertDefaults", Just xs) +-- | @application/json@ +instance Produces ServiceInspect MimeJSON +-- | @text/plain@ +instance Produces ServiceInspect MimePlainText + + +-- *** serviceList + +-- | @GET \/services@ +-- +-- List services +-- +serviceList + :: Accept accept -- ^ request accept ('MimeType') + -> DockerEngineRequest ServiceList MimeNoContent [Service] accept +serviceList _ = + _mkRequest "GET" ["/services"] + +data ServiceList + +-- | /Optional Param/ "filters" - 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=` +instance HasOptionalParam ServiceList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) + +-- | /Optional Param/ "status" - Include service status, with count of running and desired tasks. +instance HasOptionalParam ServiceList Status where + applyOptionalParam req (Status xs) = + req `addQuery` toQuery ("status", Just xs) +-- | @application/json@ +instance Produces ServiceList MimeJSON +-- | @text/plain@ +instance Produces ServiceList MimePlainText + + +-- *** serviceLogs + +-- | @GET \/services\/{id}\/logs@ +-- +-- 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. +-- +serviceLogs + :: Accept accept -- ^ request accept ('MimeType') + -> Id -- ^ "id" - ID or name of the service + -> DockerEngineRequest ServiceLogs MimeNoContent FilePath accept +serviceLogs _ (Id id) = + _mkRequest "GET" ["/services/",toPath id,"/logs"] + +data ServiceLogs + +-- | /Optional Param/ "details" - Show service context and extra details provided to logs. +instance HasOptionalParam ServiceLogs Details where + applyOptionalParam req (Details xs) = + req `addQuery` toQuery ("details", Just xs) + +-- | /Optional Param/ "follow" - Keep connection after returning logs. +instance HasOptionalParam ServiceLogs Follow where + applyOptionalParam req (Follow xs) = + req `addQuery` toQuery ("follow", Just xs) + +-- | /Optional Param/ "stdout" - Return logs from `stdout` +instance HasOptionalParam ServiceLogs Stdout where + applyOptionalParam req (Stdout xs) = + req `addQuery` toQuery ("stdout", Just xs) + +-- | /Optional Param/ "stderr" - Return logs from `stderr` +instance HasOptionalParam ServiceLogs Stderr where + applyOptionalParam req (Stderr xs) = + req `addQuery` toQuery ("stderr", Just xs) + +-- | /Optional Param/ "since" - Only return logs since this time, as a UNIX timestamp +instance HasOptionalParam ServiceLogs Since where + applyOptionalParam req (Since xs) = + req `addQuery` toQuery ("since", Just xs) + +-- | /Optional Param/ "timestamps" - Add timestamps to every log line +instance HasOptionalParam ServiceLogs Timestamps where + applyOptionalParam req (Timestamps xs) = + req `addQuery` toQuery ("timestamps", Just xs) + +-- | /Optional Param/ "tail" - Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. +instance HasOptionalParam ServiceLogs Tail where + applyOptionalParam req (Tail xs) = + req `addQuery` toQuery ("tail", Just xs) +-- | @application/json@ +instance Produces ServiceLogs MimeJSON +-- | @application/vnd.docker.raw-stream@ +instance Produces ServiceLogs MimeVndDockerRawStream +-- | @application/vnd.docker.multiplexed-stream@ +instance Produces ServiceLogs MimeVndDockerMultiplexedStream + + +-- *** serviceUpdate + +-- | @POST \/services\/{id}\/update@ +-- +-- Update a service +-- +serviceUpdate + :: (Consumes ServiceUpdate MimeJSON, MimeRender MimeJSON ServiceUpdateRequest) + => ServiceUpdateRequest -- ^ "body" + -> Id -- ^ "id" - ID or name of service. + -> VersionInt -- ^ "version" - 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}` + -> DockerEngineRequest ServiceUpdate MimeJSON ServiceUpdateResponse MimeJSON +serviceUpdate body (Id id) (VersionInt version) = + _mkRequest "POST" ["/services/",toPath id,"/update"] + `setBodyParam` body + `addQuery` toQuery ("version", Just version) + +data ServiceUpdate +instance HasBodyParam ServiceUpdate ServiceUpdateRequest + +-- | /Optional Param/ "registryAuthFrom" - If the `X-Registry-Auth` header is not specified, this parameter indicates where to find registry authorization credentials. +instance HasOptionalParam ServiceUpdate RegistryAuthFrom where + applyOptionalParam req (RegistryAuthFrom xs) = + req `addQuery` toQuery ("registryAuthFrom", Just xs) + +-- | /Optional Param/ "rollback" - 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. +instance HasOptionalParam ServiceUpdate Rollback where + applyOptionalParam req (Rollback xs) = + req `addQuery` toQuery ("rollback", Just xs) + +-- | /Optional Param/ "X-Registry-Auth" - A base64url-encoded auth configuration for pulling from private registries. Refer to the [authentication section](#section/Authentication) for details. +instance HasOptionalParam ServiceUpdate XRegistryAuth where + applyOptionalParam req (XRegistryAuth xs) = + req `addHeader` toHeader ("X-Registry-Auth", xs) + +-- | @application/json@ +instance Consumes ServiceUpdate MimeJSON + +-- | @application/json@ +instance Produces ServiceUpdate MimeJSON + diff --git a/v1.46/lib/DockerEngine/API/Session.hs b/v1.46/lib/DockerEngine/API/Session.hs new file mode 100644 index 0000000..632f101 --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Session.hs @@ -0,0 +1,75 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Session +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Session where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Session + +-- *** session + +-- | @POST \/session@ +-- +-- 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 ``` +-- +session + :: DockerEngineRequest Session MimeNoContent NoContent MimeNoContent +session = + _mkRequest "POST" ["/session"] + +data Session +instance Produces Session MimeNoContent + diff --git a/v1.46/lib/DockerEngine/API/Swarm.hs b/v1.46/lib/DockerEngine/API/Swarm.hs new file mode 100644 index 0000000..af34c6b --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Swarm.hs @@ -0,0 +1,238 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Swarm +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Swarm where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Swarm + +-- *** swarmInit + +-- | @POST \/swarm\/init@ +-- +-- Initialize a new swarm +-- +swarmInit + :: (Consumes SwarmInit contentType, MimeRender contentType SwarmInitRequest) + => ContentType contentType -- ^ request content-type ('MimeType') + -> Accept accept -- ^ request accept ('MimeType') + -> SwarmInitRequest -- ^ "body" + -> DockerEngineRequest SwarmInit contentType Text accept +swarmInit _ _ body = + _mkRequest "POST" ["/swarm/init"] + `setBodyParam` body + +data SwarmInit +instance HasBodyParam SwarmInit SwarmInitRequest + +-- | @application/json@ +instance Consumes SwarmInit MimeJSON +-- | @text/plain@ +instance Consumes SwarmInit MimePlainText + +-- | @application/json@ +instance Produces SwarmInit MimeJSON +-- | @text/plain@ +instance Produces SwarmInit MimePlainText + + +-- *** swarmInspect + +-- | @GET \/swarm@ +-- +-- Inspect swarm +-- +swarmInspect + :: Accept accept -- ^ request accept ('MimeType') + -> DockerEngineRequest SwarmInspect MimeNoContent Swarm accept +swarmInspect _ = + _mkRequest "GET" ["/swarm"] + +data SwarmInspect +-- | @application/json@ +instance Produces SwarmInspect MimeJSON +-- | @text/plain@ +instance Produces SwarmInspect MimePlainText + + +-- *** swarmJoin + +-- | @POST \/swarm\/join@ +-- +-- Join an existing swarm +-- +swarmJoin + :: (Consumes SwarmJoin contentType, MimeRender contentType SwarmJoinRequest) + => ContentType contentType -- ^ request content-type ('MimeType') + -> SwarmJoinRequest -- ^ "body" + -> DockerEngineRequest SwarmJoin contentType NoContent MimeNoContent +swarmJoin _ body = + _mkRequest "POST" ["/swarm/join"] + `setBodyParam` body + +data SwarmJoin +instance HasBodyParam SwarmJoin SwarmJoinRequest + +-- | @application/json@ +instance Consumes SwarmJoin MimeJSON +-- | @text/plain@ +instance Consumes SwarmJoin MimePlainText + +instance Produces SwarmJoin MimeNoContent + + +-- *** swarmLeave + +-- | @POST \/swarm\/leave@ +-- +-- Leave a swarm +-- +swarmLeave + :: DockerEngineRequest SwarmLeave MimeNoContent NoContent MimeNoContent +swarmLeave = + _mkRequest "POST" ["/swarm/leave"] + +data SwarmLeave + +-- | /Optional Param/ "force" - Force leave swarm, even if this is the last manager or that it will break the cluster. +instance HasOptionalParam SwarmLeave Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) +instance Produces SwarmLeave MimeNoContent + + +-- *** swarmUnlock + +-- | @POST \/swarm\/unlock@ +-- +-- Unlock a locked manager +-- +swarmUnlock + :: (Consumes SwarmUnlock MimeJSON, MimeRender MimeJSON SwarmUnlockRequest) + => SwarmUnlockRequest -- ^ "body" + -> DockerEngineRequest SwarmUnlock MimeJSON NoContent MimeNoContent +swarmUnlock body = + _mkRequest "POST" ["/swarm/unlock"] + `setBodyParam` body + +data SwarmUnlock +instance HasBodyParam SwarmUnlock SwarmUnlockRequest + +-- | @application/json@ +instance Consumes SwarmUnlock MimeJSON + +instance Produces SwarmUnlock MimeNoContent + + +-- *** swarmUnlockkey + +-- | @GET \/swarm\/unlockkey@ +-- +-- Get the unlock key +-- +swarmUnlockkey + :: Accept accept -- ^ request accept ('MimeType') + -> DockerEngineRequest SwarmUnlockkey MimeNoContent UnlockKeyResponse accept +swarmUnlockkey _ = + _mkRequest "GET" ["/swarm/unlockkey"] + +data SwarmUnlockkey +-- | @application/json@ +instance Produces SwarmUnlockkey MimeJSON +-- | @text/plain@ +instance Produces SwarmUnlockkey MimePlainText + + +-- *** swarmUpdate + +-- | @POST \/swarm\/update@ +-- +-- Update a swarm +-- +swarmUpdate + :: (Consumes SwarmUpdate contentType, MimeRender contentType SwarmSpec) + => ContentType contentType -- ^ request content-type ('MimeType') + -> SwarmSpec -- ^ "body" + -> VersionInteger -- ^ "version" - The version number of the swarm object being updated. This is required to avoid conflicting writes. + -> DockerEngineRequest SwarmUpdate contentType NoContent MimeNoContent +swarmUpdate _ body (VersionInteger version) = + _mkRequest "POST" ["/swarm/update"] + `setBodyParam` body + `addQuery` toQuery ("version", Just version) + +data SwarmUpdate +instance HasBodyParam SwarmUpdate SwarmSpec + +-- | /Optional Param/ "rotateWorkerToken" - Rotate the worker join token. +instance HasOptionalParam SwarmUpdate RotateWorkerToken where + applyOptionalParam req (RotateWorkerToken xs) = + req `addQuery` toQuery ("rotateWorkerToken", Just xs) + +-- | /Optional Param/ "rotateManagerToken" - Rotate the manager join token. +instance HasOptionalParam SwarmUpdate RotateManagerToken where + applyOptionalParam req (RotateManagerToken xs) = + req `addQuery` toQuery ("rotateManagerToken", Just xs) + +-- | /Optional Param/ "rotateManagerUnlockKey" - Rotate the manager unlock key. +instance HasOptionalParam SwarmUpdate RotateManagerUnlockKey where + applyOptionalParam req (RotateManagerUnlockKey xs) = + req `addQuery` toQuery ("rotateManagerUnlockKey", Just xs) + +-- | @application/json@ +instance Consumes SwarmUpdate MimeJSON +-- | @text/plain@ +instance Consumes SwarmUpdate MimePlainText + +instance Produces SwarmUpdate MimeNoContent + diff --git a/v1.46/lib/DockerEngine/API/System.hs b/v1.46/lib/DockerEngine/API/System.hs new file mode 100644 index 0000000..7e25525 --- /dev/null +++ b/v1.46/lib/DockerEngine/API/System.hs @@ -0,0 +1,211 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.System +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.System where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** System + +-- *** systemAuth + +-- | @POST \/auth@ +-- +-- Check auth configuration +-- +-- Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. +-- +systemAuth + :: (Consumes SystemAuth MimeJSON) + => DockerEngineRequest SystemAuth MimeJSON SystemAuthResponse MimeJSON +systemAuth = + _mkRequest "POST" ["/auth"] + +data SystemAuth + +-- | /Body Param/ "authConfig" - Authentication to check +instance HasBodyParam SystemAuth AuthConfig + +-- | @application/json@ +instance Consumes SystemAuth MimeJSON + +-- | @application/json@ +instance Produces SystemAuth MimeJSON + + +-- *** systemDataUsage + +-- | @GET \/system\/df@ +-- +-- Get data usage information +-- +systemDataUsage + :: Accept accept -- ^ request accept ('MimeType') + -> DockerEngineRequest SystemDataUsage MimeNoContent SystemDataUsageResponse accept +systemDataUsage _ = + _mkRequest "GET" ["/system/df"] + +data SystemDataUsage + +-- | /Optional Param/ "type" - Object types, for which to compute and return data. +instance HasOptionalParam SystemDataUsage ParamType where + applyOptionalParam req (ParamType xs) = + req `addQuery` toQueryColl MultiParamArray ("type", Just xs) +-- | @application/json@ +instance Produces SystemDataUsage MimeJSON +-- | @text/plain@ +instance Produces SystemDataUsage MimePlainText + + +-- *** systemEvents + +-- | @GET \/events@ +-- +-- 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: `create, `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 +-- +systemEvents + :: DockerEngineRequest SystemEvents MimeNoContent EventMessage MimeJSON +systemEvents = + _mkRequest "GET" ["/events"] + +data SystemEvents + +-- | /Optional Param/ "since" - Show events created since this timestamp then stream new events. +instance HasOptionalParam SystemEvents SinceText where + applyOptionalParam req (SinceText xs) = + req `addQuery` toQuery ("since", Just xs) + +-- | /Optional Param/ "until" - Show events created until this timestamp then stop streaming. +instance HasOptionalParam SystemEvents UntilText where + applyOptionalParam req (UntilText xs) = + req `addQuery` toQuery ("until", Just xs) + +-- | /Optional Param/ "filters" - 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 +instance HasOptionalParam SystemEvents Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces SystemEvents MimeJSON + + +-- *** systemInfo0 + +-- | @GET \/info@ +-- +-- Get system information +-- +systemInfo0 + :: DockerEngineRequest SystemInfo0 MimeNoContent SystemInfo MimeJSON +systemInfo0 = + _mkRequest "GET" ["/info"] + +data SystemInfo0 +-- | @application/json@ +instance Produces SystemInfo0 MimeJSON + + +-- *** systemPing + +-- | @GET \/_ping@ +-- +-- Ping +-- +-- This is a dummy endpoint you can use to test if the server is accessible. +-- +systemPing + :: DockerEngineRequest SystemPing MimeNoContent Text MimePlainText +systemPing = + _mkRequest "GET" ["/_ping"] + +data SystemPing +-- | @text/plain@ +instance Produces SystemPing MimePlainText + + +-- *** systemPingHead + +-- | @HEAD \/_ping@ +-- +-- Ping +-- +-- This is a dummy endpoint you can use to test if the server is accessible. +-- +systemPingHead + :: DockerEngineRequest SystemPingHead MimeNoContent Text MimePlainText +systemPingHead = + _mkRequest "HEAD" ["/_ping"] + +data SystemPingHead +-- | @text/plain@ +instance Produces SystemPingHead MimePlainText + + +-- *** systemVersion0 + +-- | @GET \/version@ +-- +-- Get version +-- +-- Returns the version of Docker that is running and various information about the system that Docker is running on. +-- +systemVersion0 + :: DockerEngineRequest SystemVersion0 MimeNoContent SystemVersion MimeJSON +systemVersion0 = + _mkRequest "GET" ["/version"] + +data SystemVersion0 +-- | @application/json@ +instance Produces SystemVersion0 MimeJSON + diff --git a/v1.46/lib/DockerEngine/API/Task.hs b/v1.46/lib/DockerEngine/API/Task.hs new file mode 100644 index 0000000..8a81633 --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Task.hs @@ -0,0 +1,155 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Task +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Task where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Task + +-- *** taskInspect + +-- | @GET \/tasks\/{id}@ +-- +-- Inspect a task +-- +taskInspect + :: Id -- ^ "id" - ID of the task + -> DockerEngineRequest TaskInspect MimeNoContent Task MimeJSON +taskInspect (Id id) = + _mkRequest "GET" ["/tasks/",toPath id] + +data TaskInspect +-- | @application/json@ +instance Produces TaskInspect MimeJSON + + +-- *** taskList + +-- | @GET \/tasks@ +-- +-- List tasks +-- +taskList + :: DockerEngineRequest TaskList MimeNoContent [Task] MimeJSON +taskList = + _mkRequest "GET" ["/tasks"] + +data TaskList + +-- | /Optional Param/ "filters" - 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=` +instance HasOptionalParam TaskList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces TaskList MimeJSON + + +-- *** taskLogs + +-- | @GET \/tasks\/{id}\/logs@ +-- +-- 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. +-- +taskLogs + :: Accept accept -- ^ request accept ('MimeType') + -> Id -- ^ "id" - ID of the task + -> DockerEngineRequest TaskLogs MimeNoContent FilePath accept +taskLogs _ (Id id) = + _mkRequest "GET" ["/tasks/",toPath id,"/logs"] + +data TaskLogs + +-- | /Optional Param/ "details" - Show task context and extra details provided to logs. +instance HasOptionalParam TaskLogs Details where + applyOptionalParam req (Details xs) = + req `addQuery` toQuery ("details", Just xs) + +-- | /Optional Param/ "follow" - Keep connection after returning logs. +instance HasOptionalParam TaskLogs Follow where + applyOptionalParam req (Follow xs) = + req `addQuery` toQuery ("follow", Just xs) + +-- | /Optional Param/ "stdout" - Return logs from `stdout` +instance HasOptionalParam TaskLogs Stdout where + applyOptionalParam req (Stdout xs) = + req `addQuery` toQuery ("stdout", Just xs) + +-- | /Optional Param/ "stderr" - Return logs from `stderr` +instance HasOptionalParam TaskLogs Stderr where + applyOptionalParam req (Stderr xs) = + req `addQuery` toQuery ("stderr", Just xs) + +-- | /Optional Param/ "since" - Only return logs since this time, as a UNIX timestamp +instance HasOptionalParam TaskLogs Since where + applyOptionalParam req (Since xs) = + req `addQuery` toQuery ("since", Just xs) + +-- | /Optional Param/ "timestamps" - Add timestamps to every log line +instance HasOptionalParam TaskLogs Timestamps where + applyOptionalParam req (Timestamps xs) = + req `addQuery` toQuery ("timestamps", Just xs) + +-- | /Optional Param/ "tail" - Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. +instance HasOptionalParam TaskLogs Tail where + applyOptionalParam req (Tail xs) = + req `addQuery` toQuery ("tail", Just xs) +-- | @application/json@ +instance Produces TaskLogs MimeJSON +-- | @application/vnd.docker.raw-stream@ +instance Produces TaskLogs MimeVndDockerRawStream +-- | @application/vnd.docker.multiplexed-stream@ +instance Produces TaskLogs MimeVndDockerMultiplexedStream + diff --git a/v1.46/lib/DockerEngine/API/Volume.hs b/v1.46/lib/DockerEngine/API/Volume.hs new file mode 100644 index 0000000..6c02a14 --- /dev/null +++ b/v1.46/lib/DockerEngine/API/Volume.hs @@ -0,0 +1,192 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.API.Volume +-} + +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MonoLocalBinds #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.API.Volume where + +import DockerEngine.Core +import DockerEngine.MimeTypes +import DockerEngine.Model as M + +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Set as Set +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Media as ME +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Text (Text) +import GHC.Base ((<|>)) + +import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +-- * Operations + + +-- ** Volume + +-- *** volumeCreate + +-- | @POST \/volumes\/create@ +-- +-- Create a volume +-- +volumeCreate + :: (Consumes VolumeCreate MimeJSON, MimeRender MimeJSON VolumeCreateOptions) + => VolumeCreateOptions -- ^ "volumeConfig" - Volume configuration + -> DockerEngineRequest VolumeCreate MimeJSON Volume MimeJSON +volumeCreate volumeConfig = + _mkRequest "POST" ["/volumes/create"] + `setBodyParam` volumeConfig + +data VolumeCreate + +-- | /Body Param/ "volumeConfig" - Volume configuration +instance HasBodyParam VolumeCreate VolumeCreateOptions + +-- | @application/json@ +instance Consumes VolumeCreate MimeJSON + +-- | @application/json@ +instance Produces VolumeCreate MimeJSON + + +-- *** volumeDelete + +-- | @DELETE \/volumes\/{name}@ +-- +-- Remove a volume +-- +-- Instruct the driver to remove the volume. +-- +volumeDelete + :: Name -- ^ "name" - Volume name or ID + -> DockerEngineRequest VolumeDelete MimeNoContent NoContent MimeNoContent +volumeDelete (Name name) = + _mkRequest "DELETE" ["/volumes/",toPath name] + +data VolumeDelete + +-- | /Optional Param/ "force" - Force the removal of the volume +instance HasOptionalParam VolumeDelete Force where + applyOptionalParam req (Force xs) = + req `addQuery` toQuery ("force", Just xs) +instance Produces VolumeDelete MimeNoContent + + +-- *** volumeInspect + +-- | @GET \/volumes\/{name}@ +-- +-- Inspect a volume +-- +volumeInspect + :: Name -- ^ "name" - Volume name or ID + -> DockerEngineRequest VolumeInspect MimeNoContent Volume MimeJSON +volumeInspect (Name name) = + _mkRequest "GET" ["/volumes/",toPath name] + +data VolumeInspect +-- | @application/json@ +instance Produces VolumeInspect MimeJSON + + +-- *** volumeList + +-- | @GET \/volumes@ +-- +-- List volumes +-- +volumeList + :: DockerEngineRequest VolumeList MimeNoContent VolumeListResponse MimeJSON +volumeList = + _mkRequest "GET" ["/volumes"] + +data VolumeList + +-- | /Optional Param/ "filters" - 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. +instance HasOptionalParam VolumeList Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces VolumeList MimeJSON + + +-- *** volumePrune + +-- | @POST \/volumes\/prune@ +-- +-- Delete unused volumes +-- +volumePrune + :: DockerEngineRequest VolumePrune MimeNoContent VolumePruneResponse MimeJSON +volumePrune = + _mkRequest "POST" ["/volumes/prune"] + +data VolumePrune + +-- | /Optional Param/ "filters" - 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. +instance HasOptionalParam VolumePrune Filters where + applyOptionalParam req (Filters xs) = + req `addQuery` toQuery ("filters", Just xs) +-- | @application/json@ +instance Produces VolumePrune MimeJSON + + +-- *** volumeUpdate + +-- | @PUT \/volumes\/{name}@ +-- +-- \"Update a volume. Valid only for Swarm cluster volumes\" +-- +volumeUpdate + :: (Consumes VolumeUpdate MimeJSON) + => Name -- ^ "name" - The name or ID of the volume + -> VersionInteger -- ^ "version" - The version number of the volume being updated. This is required to avoid conflicting writes. Found in the volume's `ClusterVolume` field. + -> DockerEngineRequest VolumeUpdate MimeJSON NoContent MimeNoContent +volumeUpdate (Name name) (VersionInteger version) = + _mkRequest "PUT" ["/volumes/",toPath name] + `addQuery` toQuery ("version", Just version) + +data VolumeUpdate + +-- | /Body Param/ "body" - The spec of the volume to update. Currently, only Availability may change. All other fields must remain unchanged. +instance HasBodyParam VolumeUpdate VolumeUpdateRequest + +-- | @application/json@ +instance Consumes VolumeUpdate MimeJSON + +instance Produces VolumeUpdate MimeNoContent + diff --git a/v1.46/lib/DockerEngine/Client.hs b/v1.46/lib/DockerEngine/Client.hs new file mode 100644 index 0000000..09f5964 --- /dev/null +++ b/v1.46/lib/DockerEngine/Client.hs @@ -0,0 +1,223 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.Client +-} + +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE DeriveFunctor #-} +{-# LANGUAGE DeriveFoldable #-} +{-# LANGUAGE DeriveTraversable #-} +{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.Client where + +import DockerEngine.Core +import DockerEngine.Logging +import DockerEngine.MimeTypes + +import qualified Control.Exception.Safe as E +import qualified Control.Monad.IO.Class as P +import qualified Control.Monad as P +import qualified Data.Aeson.Types as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Char8 as BC +import qualified Data.ByteString.Lazy as BL +import qualified Data.ByteString.Lazy.Char8 as BCL +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Network.HTTP.Client as NH +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Types as NH +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Data.Function ((&)) +import Data.Monoid ((<>)) +import Data.Text (Text) +import GHC.Exts (IsString(..)) + +-- * Dispatch + +-- ** Lbs + +-- | send a request returning the raw http response +dispatchLbs + :: (Produces req accept, MimeType contentType) + => NH.Manager -- ^ http-client Connection manager + -> DockerEngineConfig -- ^ config + -> DockerEngineRequest req contentType res accept -- ^ request + -> IO (NH.Response BCL.ByteString) -- ^ response +dispatchLbs manager config request = do + initReq <- _toInitRequest config request + dispatchInitUnsafe manager config initReq + +-- ** Mime + +-- | pair of decoded http body and http response +data MimeResult res = + MimeResult { mimeResult :: Either MimeError res -- ^ decoded http body + , mimeResultResponse :: NH.Response BCL.ByteString -- ^ http response + } + deriving (Show, Functor, Foldable, Traversable) + +-- | pair of unrender/parser error and http response +data MimeError = + MimeError { + mimeError :: String -- ^ unrender/parser error + , mimeErrorResponse :: NH.Response BCL.ByteString -- ^ http response + } deriving (Show) + +-- | send a request returning the 'MimeResult' +dispatchMime + :: forall req contentType res accept. (Produces req accept, MimeUnrender accept res, MimeType contentType) + => NH.Manager -- ^ http-client Connection manager + -> DockerEngineConfig -- ^ config + -> DockerEngineRequest req contentType res accept -- ^ request + -> IO (MimeResult res) -- ^ response +dispatchMime manager config request = do + httpResponse <- dispatchLbs manager config request + let statusCode = NH.statusCode . NH.responseStatus $ httpResponse + parsedResult <- + runConfigLogWithExceptions "Client" config $ + do if (statusCode >= 400 && statusCode < 600) + then do + let s = "error statusCode: " ++ show statusCode + _log "Client" levelError (T.pack s) + pure (Left (MimeError s httpResponse)) + else case mimeUnrender (P.Proxy :: P.Proxy accept) (NH.responseBody httpResponse) of + Left s -> do + _log "Client" levelError (T.pack s) + pure (Left (MimeError s httpResponse)) + Right r -> pure (Right r) + return (MimeResult parsedResult httpResponse) + +-- | like 'dispatchMime', but only returns the decoded http body +dispatchMime' + :: (Produces req accept, MimeUnrender accept res, MimeType contentType) + => NH.Manager -- ^ http-client Connection manager + -> DockerEngineConfig -- ^ config + -> DockerEngineRequest req contentType res accept -- ^ request + -> IO (Either MimeError res) -- ^ response +dispatchMime' manager config request = do + MimeResult parsedResult _ <- dispatchMime manager config request + return parsedResult + +-- ** Unsafe + +-- | like 'dispatchReqLbs', but does not validate the operation is a 'Producer' of the "accept" 'MimeType'. (Useful if the server's response is undocumented) +dispatchLbsUnsafe + :: (MimeType accept, MimeType contentType) + => NH.Manager -- ^ http-client Connection manager + -> DockerEngineConfig -- ^ config + -> DockerEngineRequest req contentType res accept -- ^ request + -> IO (NH.Response BCL.ByteString) -- ^ response +dispatchLbsUnsafe manager config request = do + initReq <- _toInitRequest config request + dispatchInitUnsafe manager config initReq + +-- | dispatch an InitRequest +dispatchInitUnsafe + :: NH.Manager -- ^ http-client Connection manager + -> DockerEngineConfig -- ^ config + -> InitRequest req contentType res accept -- ^ init request + -> IO (NH.Response BCL.ByteString) -- ^ response +dispatchInitUnsafe manager config (InitRequest req) = do + runConfigLogWithExceptions src config $ + do _log src levelInfo requestLogMsg + _log src levelDebug requestDbgLogMsg + res <- P.liftIO $ NH.httpLbs req manager + _log src levelInfo (responseLogMsg res) + _log src levelDebug ((T.pack . show) res) + return res + where + src = "Client" + endpoint = + T.pack $ + BC.unpack $ + NH.method req <> " " <> NH.host req <> NH.path req <> NH.queryString req + requestLogMsg = "REQ:" <> endpoint + requestDbgLogMsg = + "Headers=" <> (T.pack . show) (NH.requestHeaders req) <> " Body=" <> + (case NH.requestBody req of + NH.RequestBodyLBS xs -> T.decodeUtf8 (BL.toStrict xs) + _ -> "") + responseStatusCode = (T.pack . show) . NH.statusCode . NH.responseStatus + responseLogMsg res = + "RES:statusCode=" <> responseStatusCode res <> " (" <> endpoint <> ")" + +-- * InitRequest + +-- | wraps an http-client 'Request' with request/response type parameters +newtype InitRequest req contentType res accept = InitRequest + { unInitRequest :: NH.Request + } deriving (Show) + +-- | Build an http-client 'Request' record from the supplied config and request +_toInitRequest + :: (MimeType accept, MimeType contentType) + => DockerEngineConfig -- ^ config + -> DockerEngineRequest req contentType res accept -- ^ request + -> IO (InitRequest req contentType res accept) -- ^ initialized request +_toInitRequest config req0 = + runConfigLogWithExceptions "Client" config $ do + parsedReq <- P.liftIO $ NH.parseRequest $ BCL.unpack $ BCL.append (configHost config) (BCL.concat (rUrlPath req0)) + req1 <- P.liftIO $ _applyAuthMethods req0 config + P.when + (configValidateAuthMethods config && (not . null . rAuthTypes) req1) + (E.throw $ AuthMethodException $ "AuthMethod not configured: " <> (show . head . rAuthTypes) req1) + let req2 = req1 & _setContentTypeHeader & _setAcceptHeader + params = rParams req2 + reqHeaders = ("User-Agent", WH.toHeader (configUserAgent config)) : paramsHeaders params + reqQuery = let query = paramsQuery params + queryExtraUnreserved = configQueryExtraUnreserved config + in if B.null queryExtraUnreserved + then NH.renderQuery True query + else NH.renderQueryPartialEscape True (toPartialEscapeQuery queryExtraUnreserved query) + pReq = parsedReq { NH.method = rMethod req2 + , NH.requestHeaders = reqHeaders + , NH.queryString = reqQuery + } + outReq <- case paramsBody params of + ParamBodyNone -> pure (pReq { NH.requestBody = mempty }) + ParamBodyB bs -> pure (pReq { NH.requestBody = NH.RequestBodyBS bs }) + ParamBodyBL bl -> pure (pReq { NH.requestBody = NH.RequestBodyLBS bl }) + ParamBodyFormUrlEncoded form -> pure (pReq { NH.requestBody = NH.RequestBodyLBS (WH.urlEncodeForm form) }) + ParamBodyMultipartFormData parts -> NH.formDataBody parts pReq + + pure (InitRequest outReq) + +-- | modify the underlying Request +modifyInitRequest :: InitRequest req contentType res accept -> (NH.Request -> NH.Request) -> InitRequest req contentType res accept +modifyInitRequest (InitRequest req) f = InitRequest (f req) + +-- | modify the underlying Request (monadic) +modifyInitRequestM :: Monad m => InitRequest req contentType res accept -> (NH.Request -> m NH.Request) -> m (InitRequest req contentType res accept) +modifyInitRequestM (InitRequest req) f = fmap InitRequest (f req) + +-- ** Logging + +-- | Run a block using the configured logger instance +runConfigLog + :: P.MonadIO m + => DockerEngineConfig -> LogExec m a +runConfigLog config = configLogExecWithContext config (configLogContext config) + +-- | Run a block using the configured logger instance (logs exceptions) +runConfigLogWithExceptions + :: (E.MonadCatch m, P.MonadIO m) + => T.Text -> DockerEngineConfig -> LogExec m a +runConfigLogWithExceptions src config = runConfigLog config . logExceptions src diff --git a/v1.46/lib/DockerEngine/Core.hs b/v1.46/lib/DockerEngine/Core.hs new file mode 100644 index 0000000..ef97843 --- /dev/null +++ b/v1.46/lib/DockerEngine/Core.hs @@ -0,0 +1,588 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.Core +-} + +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE ExistentialQuantification #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TupleSections #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE CPP #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.Core where + +import DockerEngine.MimeTypes +import DockerEngine.Logging + +import qualified Control.Arrow as P (left) +import qualified Control.DeepSeq as NF +import qualified Control.Exception.Safe as E +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Base64.Lazy as BL64 +import qualified Data.ByteString.Builder as BB +import qualified Data.ByteString.Char8 as BC +import qualified Data.ByteString.Lazy as BL +import qualified Data.ByteString.Lazy.Char8 as BCL +import qualified Data.CaseInsensitive as CI +import qualified Data.Data as P (Data, Typeable, TypeRep, typeRep) +import qualified Data.Foldable as P +import qualified Data.Ix as P +import qualified Data.Kind as K (Type) +import qualified Data.Maybe as P +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Lazy.Encoding as TL +import qualified Data.Time as TI +import qualified Data.Time.ISO8601 as TI +import qualified GHC.Base as P (Alternative) +import qualified Lens.Micro as L +import qualified Network.HTTP.Client.MultipartFormData as NH +import qualified Network.HTTP.Types as NH +import qualified Prelude as P +import qualified Text.Printf as T +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Control.Applicative ((<|>)) +import Control.Applicative (Alternative) +import Control.Monad.Fail (MonadFail) +import Data.Function ((&)) +import Data.Foldable(foldlM) +import Data.Monoid ((<>)) +import Data.Text (Text) +import Prelude (($), (.), (&&), (<$>), (<*>), Maybe(..), Bool(..), Char, String, fmap, mempty, pure, return, show, IO, Monad, Functor, maybe) + +-- * DockerEngineConfig + +-- | +data DockerEngineConfig = DockerEngineConfig + { configHost :: BCL.ByteString -- ^ host supplied in the Request + , configUserAgent :: Text -- ^ user-agent supplied in the Request + , configLogExecWithContext :: LogExecWithContext -- ^ Run a block using a Logger instance + , configLogContext :: LogContext -- ^ Configures the logger + , configAuthMethods :: [AnyAuthMethod] -- ^ List of configured auth methods + , configValidateAuthMethods :: Bool -- ^ throw exceptions if auth methods are not configured + , configQueryExtraUnreserved :: B.ByteString -- ^ Configures additional querystring characters which must not be URI encoded, e.g. '+' or ':' + } + +-- | display the config +instance P.Show DockerEngineConfig where + show c = + T.printf + "{ configHost = %v, configUserAgent = %v, ..}" + (show (configHost c)) + (show (configUserAgent c)) + +-- | constructs a default DockerEngineConfig +-- +-- configHost: +-- +-- @http://localhost/v1.46@ +-- +-- configUserAgent: +-- +-- @"docker-engine/0.1.0.0"@ +-- +newConfig :: IO DockerEngineConfig +newConfig = do + logCxt <- initLogContext + return $ DockerEngineConfig + { configHost = "http://localhost/v1.46" + , configUserAgent = "docker-engine/0.1.0.0" + , configLogExecWithContext = runDefaultLogExecWithContext + , configLogContext = logCxt + , configAuthMethods = [] + , configValidateAuthMethods = True + , configQueryExtraUnreserved = "" + } + +-- | updates config use AuthMethod on matching requests +addAuthMethod :: AuthMethod auth => DockerEngineConfig -> auth -> DockerEngineConfig +addAuthMethod config@DockerEngineConfig {configAuthMethods = as} a = + config { configAuthMethods = AnyAuthMethod a : as} + +-- | updates the config to use stdout logging +withStdoutLogging :: DockerEngineConfig -> IO DockerEngineConfig +withStdoutLogging p = do + logCxt <- stdoutLoggingContext (configLogContext p) + return $ p { configLogExecWithContext = stdoutLoggingExec, configLogContext = logCxt } + +-- | updates the config to use stderr logging +withStderrLogging :: DockerEngineConfig -> IO DockerEngineConfig +withStderrLogging p = do + logCxt <- stderrLoggingContext (configLogContext p) + return $ p { configLogExecWithContext = stderrLoggingExec, configLogContext = logCxt } + +-- | updates the config to disable logging +withNoLogging :: DockerEngineConfig -> DockerEngineConfig +withNoLogging p = p { configLogExecWithContext = runNullLogExec} + +-- * DockerEngineRequest + +-- | Represents a request. +-- +-- Type Variables: +-- +-- * req - request operation +-- * contentType - 'MimeType' associated with request body +-- * res - response model +-- * accept - 'MimeType' associated with response body +data DockerEngineRequest req contentType res accept = DockerEngineRequest + { rMethod :: NH.Method -- ^ Method of DockerEngineRequest + , rUrlPath :: [BCL.ByteString] -- ^ Endpoint of DockerEngineRequest + , rParams :: Params -- ^ params of DockerEngineRequest + , rAuthTypes :: [P.TypeRep] -- ^ types of auth methods + } + deriving (P.Show) + +-- | 'rMethod' Lens +rMethodL :: Lens_' (DockerEngineRequest req contentType res accept) NH.Method +rMethodL f DockerEngineRequest{..} = (\rMethod -> DockerEngineRequest { rMethod, ..} ) <$> f rMethod +{-# INLINE rMethodL #-} + +-- | 'rUrlPath' Lens +rUrlPathL :: Lens_' (DockerEngineRequest req contentType res accept) [BCL.ByteString] +rUrlPathL f DockerEngineRequest{..} = (\rUrlPath -> DockerEngineRequest { rUrlPath, ..} ) <$> f rUrlPath +{-# INLINE rUrlPathL #-} + +-- | 'rParams' Lens +rParamsL :: Lens_' (DockerEngineRequest req contentType res accept) Params +rParamsL f DockerEngineRequest{..} = (\rParams -> DockerEngineRequest { rParams, ..} ) <$> f rParams +{-# INLINE rParamsL #-} + +-- | 'rParams' Lens +rAuthTypesL :: Lens_' (DockerEngineRequest req contentType res accept) [P.TypeRep] +rAuthTypesL f DockerEngineRequest{..} = (\rAuthTypes -> DockerEngineRequest { rAuthTypes, ..} ) <$> f rAuthTypes +{-# INLINE rAuthTypesL #-} + +-- * HasBodyParam + +-- | Designates the body parameter of a request +class HasBodyParam req param where + setBodyParam :: forall contentType res accept. (Consumes req contentType, MimeRender contentType param) => DockerEngineRequest req contentType res accept -> param -> DockerEngineRequest req contentType res accept + setBodyParam req xs = + req `_setBodyLBS` mimeRender (P.Proxy :: P.Proxy contentType) xs & _setContentTypeHeader + +-- * HasOptionalParam + +-- | Designates the optional parameters of a request +class HasOptionalParam req param where + {-# MINIMAL applyOptionalParam | (-&-) #-} + + -- | Apply an optional parameter to a request + applyOptionalParam :: DockerEngineRequest req contentType res accept -> param -> DockerEngineRequest req contentType res accept + applyOptionalParam = (-&-) + {-# INLINE applyOptionalParam #-} + + -- | infix operator \/ alias for 'addOptionalParam' + (-&-) :: DockerEngineRequest req contentType res accept -> param -> DockerEngineRequest req contentType res accept + (-&-) = applyOptionalParam + {-# INLINE (-&-) #-} + +infixl 2 -&- + +-- | Request Params +data Params = Params + { paramsQuery :: NH.Query + , paramsHeaders :: NH.RequestHeaders + , paramsBody :: ParamBody + } + deriving (P.Show) + +-- | 'paramsQuery' Lens +paramsQueryL :: Lens_' Params NH.Query +paramsQueryL f Params{..} = (\paramsQuery -> Params { paramsQuery, ..} ) <$> f paramsQuery +{-# INLINE paramsQueryL #-} + +-- | 'paramsHeaders' Lens +paramsHeadersL :: Lens_' Params NH.RequestHeaders +paramsHeadersL f Params{..} = (\paramsHeaders -> Params { paramsHeaders, ..} ) <$> f paramsHeaders +{-# INLINE paramsHeadersL #-} + +-- | 'paramsBody' Lens +paramsBodyL :: Lens_' Params ParamBody +paramsBodyL f Params{..} = (\paramsBody -> Params { paramsBody, ..} ) <$> f paramsBody +{-# INLINE paramsBodyL #-} + +-- | Request Body +data ParamBody + = ParamBodyNone + | ParamBodyB B.ByteString + | ParamBodyBL BL.ByteString + | ParamBodyFormUrlEncoded WH.Form + | ParamBodyMultipartFormData [NH.Part] + deriving (P.Show) + +-- ** DockerEngineRequest Utils + +_mkRequest :: NH.Method -- ^ Method + -> [BCL.ByteString] -- ^ Endpoint + -> DockerEngineRequest req contentType res accept -- ^ req: Request Type, res: Response Type +_mkRequest m u = DockerEngineRequest m u _mkParams [] + +_mkParams :: Params +_mkParams = Params [] [] ParamBodyNone + +setHeader :: + DockerEngineRequest req contentType res accept + -> [NH.Header] + -> DockerEngineRequest req contentType res accept +setHeader req header = + req `removeHeader` P.fmap P.fst header + & (`addHeader` header) + +addHeader :: + DockerEngineRequest req contentType res accept + -> [NH.Header] + -> DockerEngineRequest req contentType res accept +addHeader req header = L.over (rParamsL . paramsHeadersL) (header P.++) req + +removeHeader :: DockerEngineRequest req contentType res accept -> [NH.HeaderName] -> DockerEngineRequest req contentType res accept +removeHeader req header = + req & + L.over + (rParamsL . paramsHeadersL) + (P.filter (\h -> cifst h `P.notElem` P.fmap CI.mk header)) + where + cifst = CI.mk . P.fst + + +_setContentTypeHeader :: forall req contentType res accept. MimeType contentType => DockerEngineRequest req contentType res accept -> DockerEngineRequest req contentType res accept +_setContentTypeHeader req = + case mimeType (P.Proxy :: P.Proxy contentType) of + Just m -> req `setHeader` [("content-type", BC.pack $ P.show m)] + Nothing -> req `removeHeader` ["content-type"] + +_setAcceptHeader :: forall req contentType res accept. MimeType accept => DockerEngineRequest req contentType res accept -> DockerEngineRequest req contentType res accept +_setAcceptHeader req = + case mimeType (P.Proxy :: P.Proxy accept) of + Just m -> req `setHeader` [("accept", BC.pack $ P.show m)] + Nothing -> req `removeHeader` ["accept"] + +setQuery :: + DockerEngineRequest req contentType res accept + -> [NH.QueryItem] + -> DockerEngineRequest req contentType res accept +setQuery req query = + req & + L.over + (rParamsL . paramsQueryL) + (P.filter (\q -> cifst q `P.notElem` P.fmap cifst query)) & + (`addQuery` query) + where + cifst = CI.mk . P.fst + +addQuery :: + DockerEngineRequest req contentType res accept + -> [NH.QueryItem] + -> DockerEngineRequest req contentType res accept +addQuery req query = req & L.over (rParamsL . paramsQueryL) (query P.++) + +addForm :: DockerEngineRequest req contentType res accept -> WH.Form -> DockerEngineRequest req contentType res accept +addForm req newform = + let form = case paramsBody (rParams req) of + ParamBodyFormUrlEncoded _form -> _form + _ -> mempty + in req & L.set (rParamsL . paramsBodyL) (ParamBodyFormUrlEncoded (newform <> form)) + +_addMultiFormPart :: DockerEngineRequest req contentType res accept -> NH.Part -> DockerEngineRequest req contentType res accept +_addMultiFormPart req newpart = + let parts = case paramsBody (rParams req) of + ParamBodyMultipartFormData _parts -> _parts + _ -> [] + in req & L.set (rParamsL . paramsBodyL) (ParamBodyMultipartFormData (newpart : parts)) + +_setBodyBS :: DockerEngineRequest req contentType res accept -> B.ByteString -> DockerEngineRequest req contentType res accept +_setBodyBS req body = + req & L.set (rParamsL . paramsBodyL) (ParamBodyB body) + +_setBodyLBS :: DockerEngineRequest req contentType res accept -> BL.ByteString -> DockerEngineRequest req contentType res accept +_setBodyLBS req body = + req & L.set (rParamsL . paramsBodyL) (ParamBodyBL body) + +_hasAuthType :: AuthMethod authMethod => DockerEngineRequest req contentType res accept -> P.Proxy authMethod -> DockerEngineRequest req contentType res accept +_hasAuthType req proxy = + req & L.over rAuthTypesL (P.typeRep proxy :) + +-- ** Params Utils + +toPath + :: WH.ToHttpApiData a + => a -> BCL.ByteString +toPath = BB.toLazyByteString . WH.toEncodedUrlPiece + +toHeader :: WH.ToHttpApiData a => (NH.HeaderName, a) -> [NH.Header] +toHeader x = [fmap WH.toHeader x] + +toForm :: WH.ToHttpApiData v => (BC.ByteString, v) -> WH.Form +toForm (k,v) = WH.toForm [(BC.unpack k,v)] + +toQuery :: WH.ToHttpApiData a => (BC.ByteString, Maybe a) -> [NH.QueryItem] +toQuery x = [(fmap . fmap) toQueryParam x] + where toQueryParam = T.encodeUtf8 . WH.toQueryParam + +toJsonQuery :: A.ToJSON a => (BC.ByteString, Maybe a) -> [NH.QueryItem] +toJsonQuery = toQuery . (fmap . fmap) (TL.decodeUtf8 . A.encode) + +toPartialEscapeQuery :: B.ByteString -> NH.Query -> NH.PartialEscapeQuery +toPartialEscapeQuery extraUnreserved query = fmap (\(k, v) -> (k, maybe [] go v)) query + where go :: B.ByteString -> [NH.EscapeItem] + go v = v & B.groupBy (\a b -> a `B.notElem` extraUnreserved && b `B.notElem` extraUnreserved) + & fmap (\xs -> if B.null xs then NH.QN xs + else if B.head xs `B.elem` extraUnreserved + then NH.QN xs -- Not Encoded + else NH.QE xs -- Encoded + ) + +-- *** OpenAPI `CollectionFormat` Utils + +-- | Determines the format of the array if type array is used. +data CollectionFormat + = CommaSeparated -- ^ CSV format for multiple parameters. + | SpaceSeparated -- ^ Also called "SSV" + | TabSeparated -- ^ Also called "TSV" + | PipeSeparated -- ^ `value1|value2|value2` + | MultiParamArray -- ^ Using multiple GET parameters, e.g. `foo=bar&foo=baz`. This is valid only for parameters in "query" ('NH.Query') or "formData" ('WH.Form') + +toHeaderColl :: WH.ToHttpApiData a => CollectionFormat -> (NH.HeaderName, [a]) -> [NH.Header] +toHeaderColl c xs = _toColl c toHeader xs + +toFormColl :: WH.ToHttpApiData v => CollectionFormat -> (BC.ByteString, [v]) -> WH.Form +toFormColl c xs = WH.toForm $ fmap unpack $ _toColl c toHeader $ pack xs + where + pack (k,v) = (CI.mk k, v) + unpack (k,v) = (BC.unpack (CI.original k), BC.unpack v) + +toQueryColl :: WH.ToHttpApiData a => CollectionFormat -> (BC.ByteString, Maybe [a]) -> NH.Query +toQueryColl c xs = _toCollA c toQuery xs + +toJsonQueryColl :: A.ToJSON a => CollectionFormat -> (BC.ByteString, Maybe [a]) -> NH.Query +toJsonQueryColl c xs = _toCollA c toJsonQuery xs + +_toColl :: P.Traversable f => CollectionFormat -> (f a -> [(b, BC.ByteString)]) -> f [a] -> [(b, BC.ByteString)] +_toColl c encode xs = fmap (fmap P.fromJust) (_toCollA' c fencode BC.singleton (fmap Just xs)) + where fencode = fmap (fmap Just) . encode . fmap P.fromJust + {-# INLINE fencode #-} + +_toCollA :: (P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t BC.ByteString)]) -> f (t [a]) -> [(b, t BC.ByteString)] +_toCollA c encode xs = _toCollA' c encode BC.singleton xs + +_toCollA' :: (P.Monoid c, P.Traversable f, P.Traversable t, P.Alternative t) => CollectionFormat -> (f (t a) -> [(b, t c)]) -> (Char -> c) -> f (t [a]) -> [(b, t c)] +_toCollA' c encode one xs = case c of + CommaSeparated -> go (one ',') + SpaceSeparated -> go (one ' ') + TabSeparated -> go (one '\t') + PipeSeparated -> go (one '|') + MultiParamArray -> expandList + where + go sep = + [P.foldl1 (\(sk, sv) (_, v) -> (sk, (combine sep <$> sv <*> v) <|> sv <|> v)) expandList] + combine sep x y = x <> sep <> y + expandList = (P.concatMap encode . (P.traverse . P.traverse) P.toList) xs + {-# INLINE go #-} + {-# INLINE expandList #-} + {-# INLINE combine #-} + +-- * AuthMethods + +-- | Provides a method to apply auth methods to requests +class P.Typeable a => + AuthMethod a where + applyAuthMethod + :: DockerEngineConfig + -> a + -> DockerEngineRequest req contentType res accept + -> IO (DockerEngineRequest req contentType res accept) + +-- | An existential wrapper for any AuthMethod +data AnyAuthMethod = forall a. AuthMethod a => AnyAuthMethod a deriving (P.Typeable) + +instance AuthMethod AnyAuthMethod where applyAuthMethod config (AnyAuthMethod a) req = applyAuthMethod config a req + +-- | indicates exceptions related to AuthMethods +data AuthMethodException = AuthMethodException String deriving (P.Show, P.Typeable) + +instance E.Exception AuthMethodException + +-- | apply all matching AuthMethods in config to request +_applyAuthMethods + :: DockerEngineRequest req contentType res accept + -> DockerEngineConfig + -> IO (DockerEngineRequest req contentType res accept) +_applyAuthMethods req config@(DockerEngineConfig {configAuthMethods = as}) = + foldlM go req as + where + go r (AnyAuthMethod a) = applyAuthMethod config a r + +-- * Utils + +-- | Removes Null fields. (OpenAPI-Specification 2.0 does not allow Null in JSON) +#if MIN_VERSION_aeson(2,0,0) +_omitNulls :: [(A.Key, A.Value)] -> A.Value +#else +_omitNulls :: [(Text, A.Value)] -> A.Value +#endif +_omitNulls = A.object . P.filter notNull + where + notNull (_, A.Null) = False + notNull _ = True + +-- | Encodes fields using WH.toQueryParam +_toFormItem :: (WH.ToHttpApiData a, Functor f) => t -> f a -> f (t, [Text]) +_toFormItem name x = (name,) . (:[]) . WH.toQueryParam <$> x + +-- | Collapse (Just "") to Nothing +_emptyToNothing :: Maybe String -> Maybe String +_emptyToNothing (Just "") = Nothing +_emptyToNothing x = x +{-# INLINE _emptyToNothing #-} + +-- | Collapse (Just mempty) to Nothing +_memptyToNothing :: (P.Monoid a, P.Eq a) => Maybe a -> Maybe a +_memptyToNothing (Just x) | x P.== P.mempty = Nothing +_memptyToNothing x = x +{-# INLINE _memptyToNothing #-} + +-- * DateTime Formatting + +newtype DateTime = DateTime { unDateTime :: TI.UTCTime } + deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData) +instance A.FromJSON DateTime where + parseJSON = A.withText "DateTime" (_readDateTime . T.unpack) +instance A.ToJSON DateTime where + toJSON (DateTime t) = A.toJSON (_showDateTime t) +instance WH.FromHttpApiData DateTime where + parseUrlPiece = P.maybe (P.Left "parseUrlPiece @DateTime") P.Right . _readDateTime . T.unpack +instance WH.ToHttpApiData DateTime where + toUrlPiece (DateTime t) = T.pack (_showDateTime t) +instance P.Show DateTime where + show (DateTime t) = _showDateTime t +instance MimeRender MimeMultipartFormData DateTime where + mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | @_parseISO8601@ +_readDateTime :: (MonadFail m, Alternative m) => String -> m DateTime +_readDateTime s = + DateTime <$> _parseISO8601 s +{-# INLINE _readDateTime #-} + +-- | @TI.formatISO8601Millis@ +_showDateTime :: (t ~ TI.UTCTime, TI.FormatTime t) => t -> String +_showDateTime = + TI.formatISO8601Millis +{-# INLINE _showDateTime #-} + +-- | parse an ISO8601 date-time string +_parseISO8601 :: (TI.ParseTime t, MonadFail m, Alternative m) => String -> m t +_parseISO8601 t = + P.asum $ + P.flip (TI.parseTimeM True TI.defaultTimeLocale) t <$> + ["%FT%T%QZ", "%FT%T%Q%z", "%FT%T%Q%Z"] +{-# INLINE _parseISO8601 #-} + +-- * Date Formatting + +newtype Date = Date { unDate :: TI.Day } + deriving (P.Enum,P.Eq,P.Data,P.Ord,P.Ix,NF.NFData) +instance A.FromJSON Date where + parseJSON = A.withText "Date" (_readDate . T.unpack) +instance A.ToJSON Date where + toJSON (Date t) = A.toJSON (_showDate t) +instance WH.FromHttpApiData Date where + parseUrlPiece = P.maybe (P.Left "parseUrlPiece @Date") P.Right . _readDate . T.unpack +instance WH.ToHttpApiData Date where + toUrlPiece (Date t) = T.pack (_showDate t) +instance P.Show Date where + show (Date t) = _showDate t +instance MimeRender MimeMultipartFormData Date where + mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | @TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d"@ +_readDate :: MonadFail m => String -> m Date +_readDate s = Date <$> TI.parseTimeM True TI.defaultTimeLocale "%Y-%m-%d" s +{-# INLINE _readDate #-} + +-- | @TI.formatTime TI.defaultTimeLocale "%Y-%m-%d"@ +_showDate :: TI.FormatTime t => t -> String +_showDate = + TI.formatTime TI.defaultTimeLocale "%Y-%m-%d" +{-# INLINE _showDate #-} + +-- * Byte/Binary Formatting + + +-- | base64 encoded characters +newtype ByteArray = ByteArray { unByteArray :: BL.ByteString } + deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData) + +instance A.FromJSON ByteArray where + parseJSON = A.withText "ByteArray" _readByteArray +instance A.ToJSON ByteArray where + toJSON = A.toJSON . _showByteArray +instance WH.FromHttpApiData ByteArray where + parseUrlPiece = P.maybe (P.Left "parseUrlPiece @ByteArray") P.Right . _readByteArray +instance WH.ToHttpApiData ByteArray where + toUrlPiece = _showByteArray +instance P.Show ByteArray where + show = T.unpack . _showByteArray +instance MimeRender MimeMultipartFormData ByteArray where + mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | read base64 encoded characters +_readByteArray :: MonadFail m => Text -> m ByteArray +_readByteArray = P.either P.fail (pure . ByteArray) . BL64.decode . BL.fromStrict . T.encodeUtf8 +{-# INLINE _readByteArray #-} + +-- | show base64 encoded characters +_showByteArray :: ByteArray -> Text +_showByteArray = T.decodeUtf8 . BL.toStrict . BL64.encode . unByteArray +{-# INLINE _showByteArray #-} + +-- | any sequence of octets +newtype Binary = Binary { unBinary :: BL.ByteString } + deriving (P.Eq,P.Data,P.Ord,P.Typeable,NF.NFData) + +instance A.FromJSON Binary where + parseJSON = A.withText "Binary" _readBinaryBase64 +instance A.ToJSON Binary where + toJSON = A.toJSON . _showBinaryBase64 +instance WH.FromHttpApiData Binary where + parseUrlPiece = P.maybe (P.Left "parseUrlPiece @Binary") P.Right . _readBinaryBase64 +instance WH.ToHttpApiData Binary where + toUrlPiece = _showBinaryBase64 +instance P.Show Binary where + show = T.unpack . _showBinaryBase64 +instance MimeRender MimeMultipartFormData Binary where + mimeRender _ = unBinary + +_readBinaryBase64 :: MonadFail m => Text -> m Binary +_readBinaryBase64 = P.either P.fail (pure . Binary) . BL64.decode . BL.fromStrict . T.encodeUtf8 +{-# INLINE _readBinaryBase64 #-} + +_showBinaryBase64 :: Binary -> Text +_showBinaryBase64 = T.decodeUtf8 . BL.toStrict . BL64.encode . unBinary +{-# INLINE _showBinaryBase64 #-} + +-- * Lens Type Aliases + +type Lens_' s a = Lens_ s s a a +type Lens_ s t a b = forall (f :: K.Type -> K.Type). Functor f => (a -> f b) -> s -> f t diff --git a/v1.46/lib/DockerEngine/Logging.hs b/v1.46/lib/DockerEngine/Logging.hs new file mode 100644 index 0000000..85ae7e2 --- /dev/null +++ b/v1.46/lib/DockerEngine/Logging.hs @@ -0,0 +1,33 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.Logging +Logging functions +-} +{-# LANGUAGE CPP #-} + +#ifdef USE_KATIP + +module DockerEngine.Logging + ( module DockerEngine.LoggingKatip + ) where + +import DockerEngine.LoggingKatip + +#else + +module DockerEngine.Logging + ( module DockerEngine.LoggingMonadLogger + ) where + +import DockerEngine.LoggingMonadLogger + +#endif diff --git a/v1.46/lib/DockerEngine/LoggingKatip.hs b/v1.46/lib/DockerEngine/LoggingKatip.hs new file mode 100644 index 0000000..69b673b --- /dev/null +++ b/v1.46/lib/DockerEngine/LoggingKatip.hs @@ -0,0 +1,117 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.LoggingKatip +Katip Logging functions +-} + +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE ScopedTypeVariables #-} + +module DockerEngine.LoggingKatip where + +import qualified Control.Exception.Safe as E +import qualified Control.Monad.IO.Class as P +import qualified Control.Monad.Trans.Reader as P +import qualified Data.Text as T +import qualified Lens.Micro as L +import qualified System.IO as IO + +import Data.Text (Text) +import GHC.Exts (IsString(..)) + +import qualified Katip as LG + +-- * Type Aliases (for compatibility) + +-- | Runs a Katip logging block with the Log environment +type LogExecWithContext = forall m a. P.MonadIO m => + LogContext -> LogExec m a + +-- | A Katip logging block +type LogExec m a = LG.KatipT m a -> m a + +-- | A Katip Log environment +type LogContext = LG.LogEnv + +-- | A Katip Log severity +type LogLevel = LG.Severity + +-- * default logger + +-- | the default log environment +initLogContext :: IO LogContext +initLogContext = LG.initLogEnv "DockerEngine" "dev" + +-- | Runs a Katip logging block with the Log environment +runDefaultLogExecWithContext :: LogExecWithContext +runDefaultLogExecWithContext = LG.runKatipT + +-- * stdout logger + +-- | Runs a Katip logging block with the Log environment +stdoutLoggingExec :: LogExecWithContext +stdoutLoggingExec = runDefaultLogExecWithContext + +-- | A Katip Log environment which targets stdout +stdoutLoggingContext :: LogContext -> IO LogContext +stdoutLoggingContext cxt = do + handleScribe <- LG.mkHandleScribe LG.ColorIfTerminal IO.stdout (LG.permitItem LG.InfoS) LG.V2 + LG.registerScribe "stdout" handleScribe LG.defaultScribeSettings cxt + +-- * stderr logger + +-- | Runs a Katip logging block with the Log environment +stderrLoggingExec :: LogExecWithContext +stderrLoggingExec = runDefaultLogExecWithContext + +-- | A Katip Log environment which targets stderr +stderrLoggingContext :: LogContext -> IO LogContext +stderrLoggingContext cxt = do + handleScribe <- LG.mkHandleScribe LG.ColorIfTerminal IO.stderr (LG.permitItem LG.InfoS) LG.V2 + LG.registerScribe "stderr" handleScribe LG.defaultScribeSettings cxt + +-- * Null logger + +-- | Disables Katip logging +runNullLogExec :: LogExecWithContext +runNullLogExec le (LG.KatipT f) = P.runReaderT f (L.set LG.logEnvScribes mempty le) + +-- * Log Msg + +-- | Log a katip message +_log :: (Applicative m, LG.Katip m) => Text -> LogLevel -> Text -> m () +_log src level msg = do + LG.logMsg (fromString $ T.unpack src) level (LG.logStr msg) + +-- * Log Exceptions + +-- | re-throws exceptions after logging them +logExceptions + :: (LG.Katip m, E.MonadCatch m, Applicative m) + => Text -> m a -> m a +logExceptions src = + E.handle + (\(e :: E.SomeException) -> do + _log src LG.ErrorS ((T.pack . show) e) + E.throw e) + +-- * Log Level + +levelInfo :: LogLevel +levelInfo = LG.InfoS + +levelError :: LogLevel +levelError = LG.ErrorS + +levelDebug :: LogLevel +levelDebug = LG.DebugS diff --git a/v1.46/lib/DockerEngine/LoggingMonadLogger.hs b/v1.46/lib/DockerEngine/LoggingMonadLogger.hs new file mode 100644 index 0000000..6e27b29 --- /dev/null +++ b/v1.46/lib/DockerEngine/LoggingMonadLogger.hs @@ -0,0 +1,126 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.LoggingMonadLogger +monad-logger Logging functions +-} + +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE ScopedTypeVariables #-} + +module DockerEngine.LoggingMonadLogger where + +import qualified Control.Exception.Safe as E +import qualified Control.Monad.IO.Class as P +import qualified Data.Text as T +import qualified Data.Time as TI + +import Data.Text (Text) + +import qualified Control.Monad.Logger as LG + +-- * Type Aliases (for compatibility) + +-- | Runs a monad-logger block with the filter predicate +type LogExecWithContext = forall m a. P.MonadIO m => + LogContext -> LogExec m a + +-- | A monad-logger block +type LogExec m a = LG.LoggingT m a -> m a + +-- | A monad-logger filter predicate +type LogContext = LG.LogSource -> LG.LogLevel -> Bool + +-- | A monad-logger log level +type LogLevel = LG.LogLevel + +-- * default logger + +-- | the default log environment +initLogContext :: IO LogContext +initLogContext = pure infoLevelFilter + +-- | Runs a monad-logger block with the filter predicate +runDefaultLogExecWithContext :: LogExecWithContext +runDefaultLogExecWithContext = runNullLogExec + +-- * stdout logger + +-- | Runs a monad-logger block targeting stdout, with the filter predicate +stdoutLoggingExec :: LogExecWithContext +stdoutLoggingExec cxt = LG.runStdoutLoggingT . LG.filterLogger cxt + +-- | @pure@ +stdoutLoggingContext :: LogContext -> IO LogContext +stdoutLoggingContext = pure + +-- * stderr logger + +-- | Runs a monad-logger block targeting stderr, with the filter predicate +stderrLoggingExec :: LogExecWithContext +stderrLoggingExec cxt = LG.runStderrLoggingT . LG.filterLogger cxt + +-- | @pure@ +stderrLoggingContext :: LogContext -> IO LogContext +stderrLoggingContext = pure + +-- * Null logger + +-- | Disables monad-logger logging +runNullLogExec :: LogExecWithContext +runNullLogExec = const (`LG.runLoggingT` nullLogger) + +-- | monad-logger which does nothing +nullLogger :: LG.Loc -> LG.LogSource -> LG.LogLevel -> LG.LogStr -> IO () +nullLogger _ _ _ _ = return () + +-- * Log Msg + +-- | Log a message using the current time +_log :: (P.MonadIO m, LG.MonadLogger m) => Text -> LG.LogLevel -> Text -> m () +_log src level msg = do + now <- P.liftIO (formatTimeLog <$> TI.getCurrentTime) + LG.logOtherNS ("DockerEngine." <> src) level ("[" <> now <> "] " <> msg) + where + formatTimeLog = + T.pack . TI.formatTime TI.defaultTimeLocale "%Y-%m-%dT%H:%M:%S%Z" + +-- * Log Exceptions + +-- | re-throws exceptions after logging them +logExceptions + :: (LG.MonadLogger m, E.MonadCatch m, P.MonadIO m) + => Text -> m a -> m a +logExceptions src = + E.handle + (\(e :: E.SomeException) -> do + _log src LG.LevelError ((T.pack . show) e) + E.throw e) + +-- * Log Level + +levelInfo :: LogLevel +levelInfo = LG.LevelInfo + +levelError :: LogLevel +levelError = LG.LevelError + +levelDebug :: LogLevel +levelDebug = LG.LevelDebug + +-- * Level Filter + +minLevelFilter :: LG.LogLevel -> LG.LogSource -> LG.LogLevel -> Bool +minLevelFilter l _ l' = l' >= l + +infoLevelFilter :: LG.LogSource -> LG.LogLevel -> Bool +infoLevelFilter = minLevelFilter LG.LevelInfo diff --git a/v1.46/lib/DockerEngine/MimeTypes.hs b/v1.46/lib/DockerEngine/MimeTypes.hs new file mode 100644 index 0000000..451c613 --- /dev/null +++ b/v1.46/lib/DockerEngine/MimeTypes.hs @@ -0,0 +1,235 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.MimeTypes +-} + +{-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE ExistentialQuantification #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.MimeTypes where + +import qualified Control.Arrow as P (left) +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Builder as BB +import qualified Data.ByteString.Char8 as BC +import qualified Data.ByteString.Lazy as BL +import qualified Data.ByteString.Lazy.Char8 as BCL +import qualified Data.Data as P (Typeable) +import qualified Data.Proxy as P (Proxy(..)) +import qualified Data.String as P +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Network.HTTP.Media as ME +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Prelude (($), (.),(<$>),(<*>),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty) +import qualified Prelude as P + +-- * ContentType MimeType + +data ContentType a = MimeType a => ContentType { unContentType :: a } + +-- * Accept MimeType + +data Accept a = MimeType a => Accept { unAccept :: a } + +-- * Consumes Class + +class MimeType mtype => Consumes req mtype where + +-- * Produces Class + +class MimeType mtype => Produces req mtype where + +-- * Default Mime Types + +data MimeJSON = MimeJSON deriving (P.Typeable) +data MimeXML = MimeXML deriving (P.Typeable) +data MimePlainText = MimePlainText deriving (P.Typeable) +data MimeFormUrlEncoded = MimeFormUrlEncoded deriving (P.Typeable) +data MimeMultipartFormData = MimeMultipartFormData deriving (P.Typeable) +data MimeOctetStream = MimeOctetStream deriving (P.Typeable) +data MimeNoContent = MimeNoContent deriving (P.Typeable) +data MimeAny = MimeAny deriving (P.Typeable) + +-- | A type for responses without content-body. +data NoContent = NoContent + deriving (P.Show, P.Eq, P.Typeable) + + +-- * MimeType Class + +class P.Typeable mtype => MimeType mtype where + {-# MINIMAL mimeType | mimeTypes #-} + + mimeTypes :: P.Proxy mtype -> [ME.MediaType] + mimeTypes p = + case mimeType p of + Just x -> [x] + Nothing -> [] + + mimeType :: P.Proxy mtype -> Maybe ME.MediaType + mimeType p = + case mimeTypes p of + [] -> Nothing + (x:_) -> Just x + + mimeType' :: mtype -> Maybe ME.MediaType + mimeType' _ = mimeType (P.Proxy :: P.Proxy mtype) + mimeTypes' :: mtype -> [ME.MediaType] + mimeTypes' _ = mimeTypes (P.Proxy :: P.Proxy mtype) + +-- Default MimeType Instances + +-- | @application/json; charset=utf-8@ +instance MimeType MimeJSON where + mimeType _ = Just $ P.fromString "application/json" +-- | @application/xml; charset=utf-8@ +instance MimeType MimeXML where + mimeType _ = Just $ P.fromString "application/xml" +-- | @application/x-www-form-urlencoded@ +instance MimeType MimeFormUrlEncoded where + mimeType _ = Just $ P.fromString "application/x-www-form-urlencoded" +-- | @multipart/form-data@ +instance MimeType MimeMultipartFormData where + mimeType _ = Just $ P.fromString "multipart/form-data" +-- | @text/plain; charset=utf-8@ +instance MimeType MimePlainText where + mimeType _ = Just $ P.fromString "text/plain" +-- | @application/octet-stream@ +instance MimeType MimeOctetStream where + mimeType _ = Just $ P.fromString "application/octet-stream" +-- | @"*/*"@ +instance MimeType MimeAny where + mimeType _ = Just $ P.fromString "*/*" +instance MimeType MimeNoContent where + mimeType _ = Nothing + +-- * MimeRender Class + +class MimeType mtype => MimeRender mtype x where + mimeRender :: P.Proxy mtype -> x -> BL.ByteString + mimeRender' :: mtype -> x -> BL.ByteString + mimeRender' _ x = mimeRender (P.Proxy :: P.Proxy mtype) x + + +mimeRenderDefaultMultipartFormData :: WH.ToHttpApiData a => a -> BL.ByteString +mimeRenderDefaultMultipartFormData = BL.fromStrict . T.encodeUtf8 . WH.toQueryParam + +-- Default MimeRender Instances + +-- | `A.encode` +instance A.ToJSON a => MimeRender MimeJSON a where mimeRender _ = A.encode +-- | @WH.urlEncodeAsForm@ +instance WH.ToForm a => MimeRender MimeFormUrlEncoded a where mimeRender _ = WH.urlEncodeAsForm + +-- | @P.id@ +instance MimeRender MimePlainText BL.ByteString where mimeRender _ = P.id +-- | @BL.fromStrict . T.encodeUtf8@ +instance MimeRender MimePlainText T.Text where mimeRender _ = BL.fromStrict . T.encodeUtf8 +-- | @BCL.pack@ +instance MimeRender MimePlainText String where mimeRender _ = BCL.pack + +-- | @P.id@ +instance MimeRender MimeOctetStream BL.ByteString where mimeRender _ = P.id +-- | @BL.fromStrict . T.encodeUtf8@ +instance MimeRender MimeOctetStream T.Text where mimeRender _ = BL.fromStrict . T.encodeUtf8 +-- | @BCL.pack@ +instance MimeRender MimeOctetStream String where mimeRender _ = BCL.pack + +instance MimeRender MimeMultipartFormData BL.ByteString where mimeRender _ = P.id + +instance MimeRender MimeMultipartFormData Bool where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Char where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Double where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Float where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Int where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData Integer where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData String where mimeRender _ = mimeRenderDefaultMultipartFormData +instance MimeRender MimeMultipartFormData T.Text where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | @P.Right . P.const NoContent@ +instance MimeRender MimeNoContent NoContent where mimeRender _ = P.const BCL.empty + + +-- * MimeUnrender Class + +class MimeType mtype => MimeUnrender mtype o where + mimeUnrender :: P.Proxy mtype -> BL.ByteString -> P.Either String o + mimeUnrender' :: mtype -> BL.ByteString -> P.Either String o + mimeUnrender' _ x = mimeUnrender (P.Proxy :: P.Proxy mtype) x + +-- Default MimeUnrender Instances + +-- | @A.eitherDecode@ +instance A.FromJSON a => MimeUnrender MimeJSON a where mimeUnrender _ = A.eitherDecode +-- | @P.left T.unpack . WH.urlDecodeAsForm@ +instance WH.FromForm a => MimeUnrender MimeFormUrlEncoded a where mimeUnrender _ = P.left T.unpack . WH.urlDecodeAsForm +-- | @P.Right . P.id@ + +instance MimeUnrender MimePlainText BL.ByteString where mimeUnrender _ = P.Right . P.id +-- | @P.left P.show . TL.decodeUtf8'@ +instance MimeUnrender MimePlainText T.Text where mimeUnrender _ = P.left P.show . T.decodeUtf8' . BL.toStrict +-- | @P.Right . BCL.unpack@ +instance MimeUnrender MimePlainText String where mimeUnrender _ = P.Right . BCL.unpack + +-- | @P.Right . P.id@ +instance MimeUnrender MimeOctetStream BL.ByteString where mimeUnrender _ = P.Right . P.id +-- | @P.left P.show . T.decodeUtf8' . BL.toStrict@ +instance MimeUnrender MimeOctetStream T.Text where mimeUnrender _ = P.left P.show . T.decodeUtf8' . BL.toStrict +-- | @P.Right . BCL.unpack@ +instance MimeUnrender MimeOctetStream String where mimeUnrender _ = P.Right . BCL.unpack + +-- | @P.Right . P.const NoContent@ +instance MimeUnrender MimeNoContent NoContent where mimeUnrender _ = P.Right . P.const NoContent + + +-- * Custom Mime Types + +-- ** MimeVndDockerMultiplexedStream + +data MimeVndDockerMultiplexedStream = MimeVndDockerMultiplexedStream deriving (P.Typeable) + +-- | @application/vnd.docker.multiplexed-stream@ +instance MimeType MimeVndDockerMultiplexedStream where + mimeType _ = Just $ P.fromString "application/vnd.docker.multiplexed-stream" +-- instance MimeRender MimeVndDockerMultiplexedStream T.Text where mimeRender _ = undefined +-- instance MimeUnrender MimeVndDockerMultiplexedStream T.Text where mimeUnrender _ = undefined + +-- ** MimeVndDockerRawStream + +data MimeVndDockerRawStream = MimeVndDockerRawStream deriving (P.Typeable) + +-- | @application/vnd.docker.raw-stream@ +instance MimeType MimeVndDockerRawStream where + mimeType _ = Just $ P.fromString "application/vnd.docker.raw-stream" +-- instance MimeRender MimeVndDockerRawStream T.Text where mimeRender _ = undefined +-- instance MimeUnrender MimeVndDockerRawStream T.Text where mimeUnrender _ = undefined + +-- ** MimeXTar + +data MimeXTar = MimeXTar deriving (P.Typeable) + +-- | @application/x-tar@ +instance MimeType MimeXTar where + mimeType _ = Just $ P.fromString "application/x-tar" +-- instance MimeRender MimeXTar T.Text where mimeRender _ = undefined +-- instance MimeUnrender MimeXTar T.Text where mimeUnrender _ = undefined + diff --git a/v1.46/lib/DockerEngine/Model.hs b/v1.46/lib/DockerEngine/Model.hs new file mode 100644 index 0000000..070db08 --- /dev/null +++ b/v1.46/lib/DockerEngine/Model.hs @@ -0,0 +1,11621 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.Model +-} + +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveFoldable #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DeriveTraversable #-} +{-# LANGUAGE DuplicateRecordFields #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE TupleSections #-} +{-# LANGUAGE TypeFamilies #-} +{-# OPTIONS_GHC -fno-warn-unused-matches -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.Model where + +import DockerEngine.Core +import DockerEngine.MimeTypes + +import Data.Aeson ((.:),(.:!),(.:?),(.=)) + +import qualified Control.Arrow as P (left) +import qualified Data.Aeson as A +import qualified Data.ByteString as B +import qualified Data.ByteString.Base64 as B64 +import qualified Data.ByteString.Char8 as BC +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) +import qualified Data.Foldable as P +import qualified Data.HashMap.Lazy as HM +import qualified Data.Map as Map +import qualified Data.Maybe as P +import qualified Data.Set as Set +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Time as TI +import qualified Lens.Micro as L +import qualified Web.FormUrlEncoded as WH +import qualified Web.HttpApiData as WH + +import Control.Applicative ((<|>)) +import Control.Applicative (Alternative) +import Data.Function ((&)) +import Data.Monoid ((<>)) +import Data.Text (Text) +import Prelude (($),(/=),(.),(<$>),(<*>),(>>=),(=<<),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) + +import qualified Prelude as P + + + +-- * Parameter newtypes + + +-- ** All +newtype All = All { unAll :: Bool } deriving (P.Eq, P.Show) + +-- ** Author +newtype Author = Author { unAuthor :: Text } deriving (P.Eq, P.Show) + +-- ** Body +newtype Body = Body { unBody :: [PluginPrivilege] } deriving (P.Eq, P.Show, A.ToJSON) + +-- ** BodyText +newtype BodyText = BodyText { unBodyText :: [Text] } deriving (P.Eq, P.Show, A.ToJSON) + +-- ** Buildargs +newtype Buildargs = Buildargs { unBuildargs :: Text } deriving (P.Eq, P.Show) + +-- ** Cachefrom +newtype Cachefrom = Cachefrom { unCachefrom :: Text } deriving (P.Eq, P.Show) + +-- ** Changes +newtype Changes = Changes { unChanges :: [Text] } deriving (P.Eq, P.Show) + +-- ** ChangesText +newtype ChangesText = ChangesText { unChangesText :: Text } deriving (P.Eq, P.Show) + +-- ** Comment +newtype Comment = Comment { unComment :: Text } deriving (P.Eq, P.Show) + +-- ** Condition +newtype Condition = Condition { unCondition :: E'Condition2 } deriving (P.Eq, P.Show) + +-- ** Container +newtype Container = Container { unContainer :: Text } deriving (P.Eq, P.Show) + +-- ** CopyUidgid +newtype CopyUidgid = CopyUidgid { unCopyUidgid :: Text } deriving (P.Eq, P.Show) + +-- ** Cpuperiod +newtype Cpuperiod = Cpuperiod { unCpuperiod :: Int } deriving (P.Eq, P.Show) + +-- ** Cpuquota +newtype Cpuquota = Cpuquota { unCpuquota :: Int } deriving (P.Eq, P.Show) + +-- ** Cpusetcpus +newtype Cpusetcpus = Cpusetcpus { unCpusetcpus :: Text } deriving (P.Eq, P.Show) + +-- ** Cpushares +newtype Cpushares = Cpushares { unCpushares :: Int } deriving (P.Eq, P.Show) + +-- ** DetachKeys +newtype DetachKeys = DetachKeys { unDetachKeys :: Text } deriving (P.Eq, P.Show) + +-- ** Details +newtype Details = Details { unDetails :: Bool } deriving (P.Eq, P.Show) + +-- ** Digests +newtype Digests = Digests { unDigests :: Bool } deriving (P.Eq, P.Show) + +-- ** Dockerfile +newtype Dockerfile = Dockerfile { unDockerfile :: Text } deriving (P.Eq, P.Show) + +-- ** Extrahosts +newtype Extrahosts = Extrahosts { unExtrahosts :: Text } deriving (P.Eq, P.Show) + +-- ** Filters +newtype Filters = Filters { unFilters :: Text } deriving (P.Eq, P.Show) + +-- ** Follow +newtype Follow = Follow { unFollow :: Bool } deriving (P.Eq, P.Show) + +-- ** Force +newtype Force = Force { unForce :: Bool } deriving (P.Eq, P.Show) + +-- ** Forcerm +newtype Forcerm = Forcerm { unForcerm :: Bool } deriving (P.Eq, P.Show) + +-- ** FromImage +newtype FromImage = FromImage { unFromImage :: Text } deriving (P.Eq, P.Show) + +-- ** FromSrc +newtype FromSrc = FromSrc { unFromSrc :: Text } deriving (P.Eq, P.Show) + +-- ** H +newtype H = H { unH :: Int } deriving (P.Eq, P.Show) + +-- ** Id +newtype Id = Id { unId :: Text } deriving (P.Eq, P.Show) + +-- ** ImagesTarball +newtype ImagesTarball = ImagesTarball { unImagesTarball :: FilePath } deriving (P.Eq, P.Show, A.ToJSON) + +-- ** InputImage +newtype InputImage = InputImage { unInputImage :: Text } deriving (P.Eq, P.Show, A.ToJSON) + +-- ** InputStream +newtype InputStream = InputStream { unInputStream :: FilePath } deriving (P.Eq, P.Show, A.ToJSON) + +-- ** InsertDefaults +newtype InsertDefaults = InsertDefaults { unInsertDefaults :: Bool } deriving (P.Eq, P.Show) + +-- ** KeepStorage +newtype KeepStorage = KeepStorage { unKeepStorage :: Integer } deriving (P.Eq, P.Show) + +-- ** Labels +newtype Labels = Labels { unLabels :: Text } deriving (P.Eq, P.Show) + +-- ** Limit2 +newtype Limit2 = Limit2 { unLimit2 :: Int } deriving (P.Eq, P.Show) + +-- ** Link +newtype Link = Link { unLink :: Bool } deriving (P.Eq, P.Show) + +-- ** Logs +newtype Logs = Logs { unLogs :: Bool } deriving (P.Eq, P.Show) + +-- ** Memory +newtype Memory = Memory { unMemory :: Int } deriving (P.Eq, P.Show) + +-- ** Memswap +newtype Memswap = Memswap { unMemswap :: Int } deriving (P.Eq, P.Show) + +-- ** Message +newtype Message = Message { unMessage :: Text } deriving (P.Eq, P.Show) + +-- ** Name +newtype Name = Name { unName :: Text } deriving (P.Eq, P.Show) + +-- ** Names +newtype Names = Names { unNames :: [Text] } deriving (P.Eq, P.Show) + +-- ** Networkmode +newtype Networkmode = Networkmode { unNetworkmode :: Text } deriving (P.Eq, P.Show) + +-- ** NoOverwriteDirNonDir +newtype NoOverwriteDirNonDir = NoOverwriteDirNonDir { unNoOverwriteDirNonDir :: Text } deriving (P.Eq, P.Show) + +-- ** Nocache +newtype Nocache = Nocache { unNocache :: Bool } deriving (P.Eq, P.Show) + +-- ** Noprune +newtype Noprune = Noprune { unNoprune :: Bool } deriving (P.Eq, P.Show) + +-- ** OneShot +newtype OneShot = OneShot { unOneShot :: Bool } deriving (P.Eq, P.Show) + +-- ** Outputs +newtype Outputs = Outputs { unOutputs :: Text } deriving (P.Eq, P.Show) + +-- ** ParamContentType +newtype ParamContentType = ParamContentType { unParamContentType :: E'ContentType } deriving (P.Eq, P.Show) + +-- ** ParamType +newtype ParamType = ParamType { unParamType :: [E'Type6] } deriving (P.Eq, P.Show) + +-- ** Path +newtype Path = Path { unPath :: Text } deriving (P.Eq, P.Show) + +-- ** Pause +newtype Pause = Pause { unPause :: Bool } deriving (P.Eq, P.Show) + +-- ** Platform2 +newtype Platform2 = Platform2 { unPlatform2 :: Text } deriving (P.Eq, P.Show) + +-- ** PsArgs +newtype PsArgs = PsArgs { unPsArgs :: Text } deriving (P.Eq, P.Show) + +-- ** Pull +newtype Pull = Pull { unPull :: Text } deriving (P.Eq, P.Show) + +-- ** Q +newtype Q = Q { unQ :: Bool } deriving (P.Eq, P.Show) + +-- ** Quiet +newtype Quiet = Quiet { unQuiet :: Bool } deriving (P.Eq, P.Show) + +-- ** RegistryAuthFrom +newtype RegistryAuthFrom = RegistryAuthFrom { unRegistryAuthFrom :: E'RegistryAuthFrom } deriving (P.Eq, P.Show) + +-- ** Remote +newtype Remote = Remote { unRemote :: Text } deriving (P.Eq, P.Show) + +-- ** Repo +newtype Repo = Repo { unRepo :: Text } deriving (P.Eq, P.Show) + +-- ** Rm +newtype Rm = Rm { unRm :: Bool } deriving (P.Eq, P.Show) + +-- ** Rollback +newtype Rollback = Rollback { unRollback :: Text } deriving (P.Eq, P.Show) + +-- ** RotateManagerToken +newtype RotateManagerToken = RotateManagerToken { unRotateManagerToken :: Bool } deriving (P.Eq, P.Show) + +-- ** RotateManagerUnlockKey +newtype RotateManagerUnlockKey = RotateManagerUnlockKey { unRotateManagerUnlockKey :: Bool } deriving (P.Eq, P.Show) + +-- ** RotateWorkerToken +newtype RotateWorkerToken = RotateWorkerToken { unRotateWorkerToken :: Bool } deriving (P.Eq, P.Show) + +-- ** Scope +newtype Scope = Scope { unScope :: Text } deriving (P.Eq, P.Show) + +-- ** SharedSize +newtype SharedSize = SharedSize { unSharedSize :: Bool } deriving (P.Eq, P.Show) + +-- ** Shmsize +newtype Shmsize = Shmsize { unShmsize :: Int } deriving (P.Eq, P.Show) + +-- ** Signal +newtype Signal = Signal { unSignal :: Text } deriving (P.Eq, P.Show) + +-- ** Since +newtype Since = Since { unSince :: Int } deriving (P.Eq, P.Show) + +-- ** SinceText +newtype SinceText = SinceText { unSinceText :: Text } deriving (P.Eq, P.Show) + +-- ** Size +newtype Size = Size { unSize :: Bool } deriving (P.Eq, P.Show) + +-- ** Squash +newtype Squash = Squash { unSquash :: Bool } deriving (P.Eq, P.Show) + +-- ** Status +newtype Status = Status { unStatus :: Bool } deriving (P.Eq, P.Show) + +-- ** Stderr +newtype Stderr = Stderr { unStderr :: Bool } deriving (P.Eq, P.Show) + +-- ** Stdin +newtype Stdin = Stdin { unStdin :: Bool } deriving (P.Eq, P.Show) + +-- ** Stdout +newtype Stdout = Stdout { unStdout :: Bool } deriving (P.Eq, P.Show) + +-- ** Stream +newtype Stream = Stream { unStream :: Bool } deriving (P.Eq, P.Show) + +-- ** T +newtype T = T { unT :: Int } deriving (P.Eq, P.Show) + +-- ** TText +newtype TText = TText { unTText :: Text } deriving (P.Eq, P.Show) + +-- ** Tag +newtype Tag = Tag { unTag :: Text } deriving (P.Eq, P.Show) + +-- ** Tail +newtype Tail = Tail { unTail :: Text } deriving (P.Eq, P.Show) + +-- ** TarContext +newtype TarContext = TarContext { unTarContext :: FilePath } deriving (P.Eq, P.Show, A.ToJSON) + +-- ** Target +newtype Target = Target { unTarget :: Text } deriving (P.Eq, P.Show) + +-- ** Term +newtype Term = Term { unTerm :: Text } deriving (P.Eq, P.Show) + +-- ** Timeout +newtype Timeout = Timeout { unTimeout :: Int } deriving (P.Eq, P.Show) + +-- ** Timestamps +newtype Timestamps = Timestamps { unTimestamps :: Bool } deriving (P.Eq, P.Show) + +-- ** Until +newtype Until = Until { unUntil :: Int } deriving (P.Eq, P.Show) + +-- ** UntilText +newtype UntilText = UntilText { unUntilText :: Text } deriving (P.Eq, P.Show) + +-- ** V +newtype V = V { unV :: Bool } deriving (P.Eq, P.Show) + +-- ** Verbose +newtype Verbose = Verbose { unVerbose :: Bool } deriving (P.Eq, P.Show) + +-- ** Version +newtype Version = Version { unVersion :: E'CgroupVersion } deriving (P.Eq, P.Show) + +-- ** VersionInt +newtype VersionInt = VersionInt { unVersionInt :: Int } deriving (P.Eq, P.Show) + +-- ** VersionInteger +newtype VersionInteger = VersionInteger { unVersionInteger :: Integer } deriving (P.Eq, P.Show) + +-- ** W +newtype W = W { unW :: Int } deriving (P.Eq, P.Show) + +-- ** XRegistryAuth +newtype XRegistryAuth = XRegistryAuth { unXRegistryAuth :: Text } deriving (P.Eq, P.Show) + +-- ** XRegistryConfig +newtype XRegistryConfig = XRegistryConfig { unXRegistryConfig :: Text } deriving (P.Eq, P.Show) + +-- * Models + + +-- ** Address +-- | Address +-- Address represents an IPv4 or IPv6 IP address. +data Address = Address + { addressAddr :: !(Maybe Text) -- ^ "Addr" - IP address. + , addressPrefixLen :: !(Maybe Int) -- ^ "PrefixLen" - Mask length of the IP address. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Address +instance A.FromJSON Address where + parseJSON = A.withObject "Address" $ \o -> + Address + <$> (o .:? "Addr") + <*> (o .:? "PrefixLen") + +-- | ToJSON Address +instance A.ToJSON Address where + toJSON Address {..} = + _omitNulls + [ "Addr" .= addressAddr + , "PrefixLen" .= addressPrefixLen + ] + + +-- | Construct a value of type 'Address' (by applying it's required fields, if any) +mkAddress + :: Address +mkAddress = + Address + { addressAddr = Nothing + , addressPrefixLen = Nothing + } + +-- ** AuthConfig +-- | AuthConfig +data AuthConfig = AuthConfig + { authConfigUsername :: !(Maybe Text) -- ^ "username" + , authConfigPassword :: !(Maybe Text) -- ^ "password" + , authConfigEmail :: !(Maybe Text) -- ^ "email" + , authConfigServeraddress :: !(Maybe Text) -- ^ "serveraddress" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON AuthConfig +instance A.FromJSON AuthConfig where + parseJSON = A.withObject "AuthConfig" $ \o -> + AuthConfig + <$> (o .:? "username") + <*> (o .:? "password") + <*> (o .:? "email") + <*> (o .:? "serveraddress") + +-- | ToJSON AuthConfig +instance A.ToJSON AuthConfig where + toJSON AuthConfig {..} = + _omitNulls + [ "username" .= authConfigUsername + , "password" .= authConfigPassword + , "email" .= authConfigEmail + , "serveraddress" .= authConfigServeraddress + ] + + +-- | Construct a value of type 'AuthConfig' (by applying it's required fields, if any) +mkAuthConfig + :: AuthConfig +mkAuthConfig = + AuthConfig + { authConfigUsername = Nothing + , authConfigPassword = Nothing + , authConfigEmail = Nothing + , authConfigServeraddress = Nothing + } + +-- ** BuildCache +-- | BuildCache +-- BuildCache contains information about a build cache record. +data BuildCache = BuildCache + { buildCacheId :: !(Maybe Text) -- ^ "ID" - Unique ID of the build cache record. + , buildCacheParent :: !(Maybe Text) -- ^ "Parent" - ID of the parent build cache record. > **Deprecated**: This field is deprecated, and omitted if empty. + , buildCacheParents :: !(Maybe [Text]) -- ^ "Parents" - List of parent build cache record IDs. + , buildCacheType :: !(Maybe E'Type3) -- ^ "Type" - Cache record type. + , buildCacheDescription :: !(Maybe Text) -- ^ "Description" - Description of the build-step that produced the build cache. + , buildCacheInUse :: !(Maybe Bool) -- ^ "InUse" - Indicates if the build cache is in use. + , buildCacheShared :: !(Maybe Bool) -- ^ "Shared" - Indicates if the build cache is shared. + , buildCacheSize :: !(Maybe Int) -- ^ "Size" - Amount of disk space used by the build cache (in bytes). + , buildCacheCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" - Date and time at which the build cache was created in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , buildCacheLastUsedAt :: !(Maybe Text) -- ^ "LastUsedAt" - Date and time at which the build cache was last used in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , buildCacheUsageCount :: !(Maybe Int) -- ^ "UsageCount" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON BuildCache +instance A.FromJSON BuildCache where + parseJSON = A.withObject "BuildCache" $ \o -> + BuildCache + <$> (o .:? "ID") + <*> (o .:? "Parent") + <*> (o .:? "Parents") + <*> (o .:? "Type") + <*> (o .:? "Description") + <*> (o .:? "InUse") + <*> (o .:? "Shared") + <*> (o .:? "Size") + <*> (o .:? "CreatedAt") + <*> (o .:? "LastUsedAt") + <*> (o .:? "UsageCount") + +-- | ToJSON BuildCache +instance A.ToJSON BuildCache where + toJSON BuildCache {..} = + _omitNulls + [ "ID" .= buildCacheId + , "Parent" .= buildCacheParent + , "Parents" .= buildCacheParents + , "Type" .= buildCacheType + , "Description" .= buildCacheDescription + , "InUse" .= buildCacheInUse + , "Shared" .= buildCacheShared + , "Size" .= buildCacheSize + , "CreatedAt" .= buildCacheCreatedAt + , "LastUsedAt" .= buildCacheLastUsedAt + , "UsageCount" .= buildCacheUsageCount + ] + + +-- | Construct a value of type 'BuildCache' (by applying it's required fields, if any) +mkBuildCache + :: BuildCache +mkBuildCache = + BuildCache + { buildCacheId = Nothing + , buildCacheParent = Nothing + , buildCacheParents = Nothing + , buildCacheType = Nothing + , buildCacheDescription = Nothing + , buildCacheInUse = Nothing + , buildCacheShared = Nothing + , buildCacheSize = Nothing + , buildCacheCreatedAt = Nothing + , buildCacheLastUsedAt = Nothing + , buildCacheUsageCount = Nothing + } + +-- ** BuildInfo +-- | BuildInfo +data BuildInfo = BuildInfo + { buildInfoId :: !(Maybe Text) -- ^ "id" + , buildInfoStream :: !(Maybe Text) -- ^ "stream" + , buildInfoError :: !(Maybe Text) -- ^ "error" + , buildInfoErrorDetail :: !(Maybe ErrorDetail) -- ^ "errorDetail" + , buildInfoStatus :: !(Maybe Text) -- ^ "status" + , buildInfoProgress :: !(Maybe Text) -- ^ "progress" + , buildInfoProgressDetail :: !(Maybe ProgressDetail) -- ^ "progressDetail" + , buildInfoAux :: !(Maybe ImageID) -- ^ "aux" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON BuildInfo +instance A.FromJSON BuildInfo where + parseJSON = A.withObject "BuildInfo" $ \o -> + BuildInfo + <$> (o .:? "id") + <*> (o .:? "stream") + <*> (o .:? "error") + <*> (o .:? "errorDetail") + <*> (o .:? "status") + <*> (o .:? "progress") + <*> (o .:? "progressDetail") + <*> (o .:? "aux") + +-- | ToJSON BuildInfo +instance A.ToJSON BuildInfo where + toJSON BuildInfo {..} = + _omitNulls + [ "id" .= buildInfoId + , "stream" .= buildInfoStream + , "error" .= buildInfoError + , "errorDetail" .= buildInfoErrorDetail + , "status" .= buildInfoStatus + , "progress" .= buildInfoProgress + , "progressDetail" .= buildInfoProgressDetail + , "aux" .= buildInfoAux + ] + + +-- | Construct a value of type 'BuildInfo' (by applying it's required fields, if any) +mkBuildInfo + :: BuildInfo +mkBuildInfo = + BuildInfo + { buildInfoId = Nothing + , buildInfoStream = Nothing + , buildInfoError = Nothing + , buildInfoErrorDetail = Nothing + , buildInfoStatus = Nothing + , buildInfoProgress = Nothing + , buildInfoProgressDetail = Nothing + , buildInfoAux = Nothing + } + +-- ** BuildPruneResponse +-- | BuildPruneResponse +-- BuildPruneResponse +-- +data BuildPruneResponse = BuildPruneResponse + { buildPruneResponseCachesDeleted :: !(Maybe [Text]) -- ^ "CachesDeleted" + , buildPruneResponseSpaceReclaimed :: !(Maybe Integer) -- ^ "SpaceReclaimed" - Disk space reclaimed in bytes + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON BuildPruneResponse +instance A.FromJSON BuildPruneResponse where + parseJSON = A.withObject "BuildPruneResponse" $ \o -> + BuildPruneResponse + <$> (o .:? "CachesDeleted") + <*> (o .:? "SpaceReclaimed") + +-- | ToJSON BuildPruneResponse +instance A.ToJSON BuildPruneResponse where + toJSON BuildPruneResponse {..} = + _omitNulls + [ "CachesDeleted" .= buildPruneResponseCachesDeleted + , "SpaceReclaimed" .= buildPruneResponseSpaceReclaimed + ] + + +-- | Construct a value of type 'BuildPruneResponse' (by applying it's required fields, if any) +mkBuildPruneResponse + :: BuildPruneResponse +mkBuildPruneResponse = + BuildPruneResponse + { buildPruneResponseCachesDeleted = Nothing + , buildPruneResponseSpaceReclaimed = Nothing + } + +-- ** ClusterInfo +-- | ClusterInfo +-- ClusterInfo represents information about the swarm as is returned by the \"/info\" endpoint. Join-tokens are not included. +data ClusterInfo = ClusterInfo + { clusterInfoId :: !(Maybe Text) -- ^ "ID" - The ID of the swarm. + , clusterInfoVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , clusterInfoCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" - Date and time at which the swarm was initialised in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , clusterInfoUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" - Date and time at which the swarm was last updated in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , clusterInfoSpec :: !(Maybe SwarmSpec) -- ^ "Spec" + , clusterInfoTlsInfo :: !(Maybe TLSInfo) -- ^ "TLSInfo" + , clusterInfoRootRotationInProgress :: !(Maybe Bool) -- ^ "RootRotationInProgress" - Whether there is currently a root CA rotation in progress for the swarm + , clusterInfoDataPathPort :: !(Maybe Int) -- ^ "DataPathPort" - DataPathPort specifies the data path port number for data traffic. Acceptable port range is 1024 to 49151. If no port is set or is set to 0, the default port (4789) is used. + , clusterInfoDefaultAddrPool :: !(Maybe [Text]) -- ^ "DefaultAddrPool" - Default Address Pool specifies default subnet pools for global scope networks. + , clusterInfoSubnetSize :: !(Maybe Int) -- ^ "SubnetSize" - SubnetSize specifies the subnet size of the networks created from the default subnet pool. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterInfo +instance A.FromJSON ClusterInfo where + parseJSON = A.withObject "ClusterInfo" $ \o -> + ClusterInfo + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + <*> (o .:? "TLSInfo") + <*> (o .:? "RootRotationInProgress") + <*> (o .:? "DataPathPort") + <*> (o .:? "DefaultAddrPool") + <*> (o .:? "SubnetSize") + +-- | ToJSON ClusterInfo +instance A.ToJSON ClusterInfo where + toJSON ClusterInfo {..} = + _omitNulls + [ "ID" .= clusterInfoId + , "Version" .= clusterInfoVersion + , "CreatedAt" .= clusterInfoCreatedAt + , "UpdatedAt" .= clusterInfoUpdatedAt + , "Spec" .= clusterInfoSpec + , "TLSInfo" .= clusterInfoTlsInfo + , "RootRotationInProgress" .= clusterInfoRootRotationInProgress + , "DataPathPort" .= clusterInfoDataPathPort + , "DefaultAddrPool" .= clusterInfoDefaultAddrPool + , "SubnetSize" .= clusterInfoSubnetSize + ] + + +-- | Construct a value of type 'ClusterInfo' (by applying it's required fields, if any) +mkClusterInfo + :: ClusterInfo +mkClusterInfo = + ClusterInfo + { clusterInfoId = Nothing + , clusterInfoVersion = Nothing + , clusterInfoCreatedAt = Nothing + , clusterInfoUpdatedAt = Nothing + , clusterInfoSpec = Nothing + , clusterInfoTlsInfo = Nothing + , clusterInfoRootRotationInProgress = Nothing + , clusterInfoDataPathPort = Nothing + , clusterInfoDefaultAddrPool = Nothing + , clusterInfoSubnetSize = Nothing + } + +-- ** ClusterVolume +-- | ClusterVolume +-- Options and information specific to, and only present on, Swarm CSI cluster volumes. +data ClusterVolume = ClusterVolume + { clusterVolumeId :: !(Maybe Text) -- ^ "ID" - The Swarm ID of this volume. Because cluster volumes are Swarm objects, they have an ID, unlike non-cluster volumes. This ID can be used to refer to the Volume instead of the name. + , clusterVolumeVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , clusterVolumeCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" + , clusterVolumeUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" + , clusterVolumeSpec :: !(Maybe ClusterVolumeSpec) -- ^ "Spec" + , clusterVolumeInfo :: !(Maybe ClusterVolumeInfo) -- ^ "Info" + , clusterVolumePublishStatus :: !(Maybe [ClusterVolumePublishStatusInner]) -- ^ "PublishStatus" - The status of the volume as it pertains to its publishing and use on specific nodes + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolume +instance A.FromJSON ClusterVolume where + parseJSON = A.withObject "ClusterVolume" $ \o -> + ClusterVolume + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + <*> (o .:? "Info") + <*> (o .:? "PublishStatus") + +-- | ToJSON ClusterVolume +instance A.ToJSON ClusterVolume where + toJSON ClusterVolume {..} = + _omitNulls + [ "ID" .= clusterVolumeId + , "Version" .= clusterVolumeVersion + , "CreatedAt" .= clusterVolumeCreatedAt + , "UpdatedAt" .= clusterVolumeUpdatedAt + , "Spec" .= clusterVolumeSpec + , "Info" .= clusterVolumeInfo + , "PublishStatus" .= clusterVolumePublishStatus + ] + + +-- | Construct a value of type 'ClusterVolume' (by applying it's required fields, if any) +mkClusterVolume + :: ClusterVolume +mkClusterVolume = + ClusterVolume + { clusterVolumeId = Nothing + , clusterVolumeVersion = Nothing + , clusterVolumeCreatedAt = Nothing + , clusterVolumeUpdatedAt = Nothing + , clusterVolumeSpec = Nothing + , clusterVolumeInfo = Nothing + , clusterVolumePublishStatus = Nothing + } + +-- ** ClusterVolumeInfo +-- | ClusterVolumeInfo +-- Information about the global status of the volume. +data ClusterVolumeInfo = ClusterVolumeInfo + { clusterVolumeInfoCapacityBytes :: !(Maybe Integer) -- ^ "CapacityBytes" - The capacity of the volume in bytes. A value of 0 indicates that the capacity is unknown. + , clusterVolumeInfoVolumeContext :: !(Maybe (Map.Map String Text)) -- ^ "VolumeContext" - A map of strings to strings returned from the storage plugin when the volume is created. + , clusterVolumeInfoVolumeId :: !(Maybe Text) -- ^ "VolumeID" - The ID of the volume as returned by the CSI storage plugin. This is distinct from the volume's ID as provided by Docker. This ID is never used by the user when communicating with Docker to refer to this volume. If the ID is blank, then the Volume has not been successfully created in the plugin yet. + , clusterVolumeInfoAccessibleTopology :: !(Maybe [Map]) -- ^ "AccessibleTopology" - The topology this volume is actually accessible from. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumeInfo +instance A.FromJSON ClusterVolumeInfo where + parseJSON = A.withObject "ClusterVolumeInfo" $ \o -> + ClusterVolumeInfo + <$> (o .:? "CapacityBytes") + <*> (o .:? "VolumeContext") + <*> (o .:? "VolumeID") + <*> (o .:? "AccessibleTopology") + +-- | ToJSON ClusterVolumeInfo +instance A.ToJSON ClusterVolumeInfo where + toJSON ClusterVolumeInfo {..} = + _omitNulls + [ "CapacityBytes" .= clusterVolumeInfoCapacityBytes + , "VolumeContext" .= clusterVolumeInfoVolumeContext + , "VolumeID" .= clusterVolumeInfoVolumeId + , "AccessibleTopology" .= clusterVolumeInfoAccessibleTopology + ] + + +-- | Construct a value of type 'ClusterVolumeInfo' (by applying it's required fields, if any) +mkClusterVolumeInfo + :: ClusterVolumeInfo +mkClusterVolumeInfo = + ClusterVolumeInfo + { clusterVolumeInfoCapacityBytes = Nothing + , clusterVolumeInfoVolumeContext = Nothing + , clusterVolumeInfoVolumeId = Nothing + , clusterVolumeInfoAccessibleTopology = Nothing + } + +-- ** ClusterVolumePublishStatusInner +-- | ClusterVolumePublishStatusInner +data ClusterVolumePublishStatusInner = ClusterVolumePublishStatusInner + { clusterVolumePublishStatusInnerNodeId :: !(Maybe Text) -- ^ "NodeID" - The ID of the Swarm node the volume is published on. + , clusterVolumePublishStatusInnerState :: !(Maybe E'State2) -- ^ "State" - The published state of the volume. * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. * `published` The volume is published successfully to the node. * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. + , clusterVolumePublishStatusInnerPublishContext :: !(Maybe (Map.Map String Text)) -- ^ "PublishContext" - A map of strings to strings returned by the CSI controller plugin when a volume is published. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumePublishStatusInner +instance A.FromJSON ClusterVolumePublishStatusInner where + parseJSON = A.withObject "ClusterVolumePublishStatusInner" $ \o -> + ClusterVolumePublishStatusInner + <$> (o .:? "NodeID") + <*> (o .:? "State") + <*> (o .:? "PublishContext") + +-- | ToJSON ClusterVolumePublishStatusInner +instance A.ToJSON ClusterVolumePublishStatusInner where + toJSON ClusterVolumePublishStatusInner {..} = + _omitNulls + [ "NodeID" .= clusterVolumePublishStatusInnerNodeId + , "State" .= clusterVolumePublishStatusInnerState + , "PublishContext" .= clusterVolumePublishStatusInnerPublishContext + ] + + +-- | Construct a value of type 'ClusterVolumePublishStatusInner' (by applying it's required fields, if any) +mkClusterVolumePublishStatusInner + :: ClusterVolumePublishStatusInner +mkClusterVolumePublishStatusInner = + ClusterVolumePublishStatusInner + { clusterVolumePublishStatusInnerNodeId = Nothing + , clusterVolumePublishStatusInnerState = Nothing + , clusterVolumePublishStatusInnerPublishContext = Nothing + } + +-- ** ClusterVolumeSpec +-- | ClusterVolumeSpec +-- Cluster-specific options used to create the volume. +data ClusterVolumeSpec = ClusterVolumeSpec + { clusterVolumeSpecGroup :: !(Maybe Text) -- ^ "Group" - Group defines the volume group of this volume. Volumes belonging to the same group can be referred to by group name when creating Services. Referring to a volume by group instructs Swarm to treat volumes in that group interchangeably for the purpose of scheduling. Volumes with an empty string for a group technically all belong to the same, emptystring group. + , clusterVolumeSpecAccessMode :: !(Maybe ClusterVolumeSpecAccessMode) -- ^ "AccessMode" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumeSpec +instance A.FromJSON ClusterVolumeSpec where + parseJSON = A.withObject "ClusterVolumeSpec" $ \o -> + ClusterVolumeSpec + <$> (o .:? "Group") + <*> (o .:? "AccessMode") + +-- | ToJSON ClusterVolumeSpec +instance A.ToJSON ClusterVolumeSpec where + toJSON ClusterVolumeSpec {..} = + _omitNulls + [ "Group" .= clusterVolumeSpecGroup + , "AccessMode" .= clusterVolumeSpecAccessMode + ] + + +-- | Construct a value of type 'ClusterVolumeSpec' (by applying it's required fields, if any) +mkClusterVolumeSpec + :: ClusterVolumeSpec +mkClusterVolumeSpec = + ClusterVolumeSpec + { clusterVolumeSpecGroup = Nothing + , clusterVolumeSpecAccessMode = Nothing + } + +-- ** ClusterVolumeSpecAccessMode +-- | ClusterVolumeSpecAccessMode +-- Defines how the volume is used by tasks. +data ClusterVolumeSpecAccessMode = ClusterVolumeSpecAccessMode + { clusterVolumeSpecAccessModeScope :: !(Maybe E'Scope3) -- ^ "Scope" - The set of nodes this volume can be used on at one time. - `single` The volume may only be scheduled to one node at a time. - `multi` the volume may be scheduled to any supported number of nodes at a time. + , clusterVolumeSpecAccessModeSharing :: !(Maybe E'Sharing) -- ^ "Sharing" - The number and way that different tasks can use this volume at one time. - `none` The volume may only be used by one task at a time. - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. - `all` The volume may have any number of readers and writers. + , clusterVolumeSpecAccessModeMountVolume :: !(Maybe A.Value) -- ^ "MountVolume" - Options for using this volume as a Mount-type volume. Either MountVolume or BlockVolume, but not both, must be present. properties: FsType: type: \"string\" description: | Specifies the filesystem type for the mount volume. Optional. MountFlags: type: \"array\" description: | Flags to pass when mounting the volume. Optional. items: type: \"string\" BlockVolume: type: \"object\" description: | Options for using this volume as a Block-type volume. Intentionally empty. + , clusterVolumeSpecAccessModeSecrets :: !(Maybe [ClusterVolumeSpecAccessModeSecretsInner]) -- ^ "Secrets" - Swarm Secrets that are passed to the CSI storage plugin when operating on this volume. + , clusterVolumeSpecAccessModeAccessibilityRequirements :: !(Maybe ClusterVolumeSpecAccessModeAccessibilityRequirements) -- ^ "AccessibilityRequirements" + , clusterVolumeSpecAccessModeCapacityRange :: !(Maybe ClusterVolumeSpecAccessModeCapacityRange) -- ^ "CapacityRange" + , clusterVolumeSpecAccessModeAvailability :: !(Maybe E'Availability) -- ^ "Availability" - The availability of the volume for use in tasks. - `active` The volume is fully available for scheduling on the cluster - `pause` No new workloads should use the volume, but existing workloads are not stopped. - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumeSpecAccessMode +instance A.FromJSON ClusterVolumeSpecAccessMode where + parseJSON = A.withObject "ClusterVolumeSpecAccessMode" $ \o -> + ClusterVolumeSpecAccessMode + <$> (o .:? "Scope") + <*> (o .:? "Sharing") + <*> (o .:? "MountVolume") + <*> (o .:? "Secrets") + <*> (o .:? "AccessibilityRequirements") + <*> (o .:? "CapacityRange") + <*> (o .:? "Availability") + +-- | ToJSON ClusterVolumeSpecAccessMode +instance A.ToJSON ClusterVolumeSpecAccessMode where + toJSON ClusterVolumeSpecAccessMode {..} = + _omitNulls + [ "Scope" .= clusterVolumeSpecAccessModeScope + , "Sharing" .= clusterVolumeSpecAccessModeSharing + , "MountVolume" .= clusterVolumeSpecAccessModeMountVolume + , "Secrets" .= clusterVolumeSpecAccessModeSecrets + , "AccessibilityRequirements" .= clusterVolumeSpecAccessModeAccessibilityRequirements + , "CapacityRange" .= clusterVolumeSpecAccessModeCapacityRange + , "Availability" .= clusterVolumeSpecAccessModeAvailability + ] + + +-- | Construct a value of type 'ClusterVolumeSpecAccessMode' (by applying it's required fields, if any) +mkClusterVolumeSpecAccessMode + :: ClusterVolumeSpecAccessMode +mkClusterVolumeSpecAccessMode = + ClusterVolumeSpecAccessMode + { clusterVolumeSpecAccessModeScope = Nothing + , clusterVolumeSpecAccessModeSharing = Nothing + , clusterVolumeSpecAccessModeMountVolume = Nothing + , clusterVolumeSpecAccessModeSecrets = Nothing + , clusterVolumeSpecAccessModeAccessibilityRequirements = Nothing + , clusterVolumeSpecAccessModeCapacityRange = Nothing + , clusterVolumeSpecAccessModeAvailability = Nothing + } + +-- ** ClusterVolumeSpecAccessModeAccessibilityRequirements +-- | ClusterVolumeSpecAccessModeAccessibilityRequirements +-- 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. +data ClusterVolumeSpecAccessModeAccessibilityRequirements = ClusterVolumeSpecAccessModeAccessibilityRequirements + { clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite :: !(Maybe [Map]) -- ^ "Requisite" - A list of required topologies, at least one of which the volume must be accessible from. + , clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred :: !(Maybe [Map]) -- ^ "Preferred" - A list of topologies that the volume should attempt to be provisioned in. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumeSpecAccessModeAccessibilityRequirements +instance A.FromJSON ClusterVolumeSpecAccessModeAccessibilityRequirements where + parseJSON = A.withObject "ClusterVolumeSpecAccessModeAccessibilityRequirements" $ \o -> + ClusterVolumeSpecAccessModeAccessibilityRequirements + <$> (o .:? "Requisite") + <*> (o .:? "Preferred") + +-- | ToJSON ClusterVolumeSpecAccessModeAccessibilityRequirements +instance A.ToJSON ClusterVolumeSpecAccessModeAccessibilityRequirements where + toJSON ClusterVolumeSpecAccessModeAccessibilityRequirements {..} = + _omitNulls + [ "Requisite" .= clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite + , "Preferred" .= clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred + ] + + +-- | Construct a value of type 'ClusterVolumeSpecAccessModeAccessibilityRequirements' (by applying it's required fields, if any) +mkClusterVolumeSpecAccessModeAccessibilityRequirements + :: ClusterVolumeSpecAccessModeAccessibilityRequirements +mkClusterVolumeSpecAccessModeAccessibilityRequirements = + ClusterVolumeSpecAccessModeAccessibilityRequirements + { clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite = Nothing + , clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred = Nothing + } + +-- ** ClusterVolumeSpecAccessModeCapacityRange +-- | ClusterVolumeSpecAccessModeCapacityRange +-- The desired capacity that the volume should be created with. If empty, the plugin will decide the capacity. +data ClusterVolumeSpecAccessModeCapacityRange = ClusterVolumeSpecAccessModeCapacityRange + { clusterVolumeSpecAccessModeCapacityRangeRequiredBytes :: !(Maybe Integer) -- ^ "RequiredBytes" - The volume must be at least this big. The value of 0 indicates an unspecified minimum + , clusterVolumeSpecAccessModeCapacityRangeLimitBytes :: !(Maybe Integer) -- ^ "LimitBytes" - The volume must not be bigger than this. The value of 0 indicates an unspecified maximum. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumeSpecAccessModeCapacityRange +instance A.FromJSON ClusterVolumeSpecAccessModeCapacityRange where + parseJSON = A.withObject "ClusterVolumeSpecAccessModeCapacityRange" $ \o -> + ClusterVolumeSpecAccessModeCapacityRange + <$> (o .:? "RequiredBytes") + <*> (o .:? "LimitBytes") + +-- | ToJSON ClusterVolumeSpecAccessModeCapacityRange +instance A.ToJSON ClusterVolumeSpecAccessModeCapacityRange where + toJSON ClusterVolumeSpecAccessModeCapacityRange {..} = + _omitNulls + [ "RequiredBytes" .= clusterVolumeSpecAccessModeCapacityRangeRequiredBytes + , "LimitBytes" .= clusterVolumeSpecAccessModeCapacityRangeLimitBytes + ] + + +-- | Construct a value of type 'ClusterVolumeSpecAccessModeCapacityRange' (by applying it's required fields, if any) +mkClusterVolumeSpecAccessModeCapacityRange + :: ClusterVolumeSpecAccessModeCapacityRange +mkClusterVolumeSpecAccessModeCapacityRange = + ClusterVolumeSpecAccessModeCapacityRange + { clusterVolumeSpecAccessModeCapacityRangeRequiredBytes = Nothing + , clusterVolumeSpecAccessModeCapacityRangeLimitBytes = Nothing + } + +-- ** ClusterVolumeSpecAccessModeSecretsInner +-- | ClusterVolumeSpecAccessModeSecretsInner +-- One cluster volume secret entry. Defines a key-value pair that is passed to the plugin. +data ClusterVolumeSpecAccessModeSecretsInner = ClusterVolumeSpecAccessModeSecretsInner + { clusterVolumeSpecAccessModeSecretsInnerKey :: !(Maybe Text) -- ^ "Key" - Key is the name of the key of the key-value pair passed to the plugin. + , clusterVolumeSpecAccessModeSecretsInnerSecret :: !(Maybe Text) -- ^ "Secret" - Secret is the swarm Secret object from which to read data. This can be a Secret name or ID. The Secret data is retrieved by swarm and used as the value of the key-value pair passed to the plugin. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ClusterVolumeSpecAccessModeSecretsInner +instance A.FromJSON ClusterVolumeSpecAccessModeSecretsInner where + parseJSON = A.withObject "ClusterVolumeSpecAccessModeSecretsInner" $ \o -> + ClusterVolumeSpecAccessModeSecretsInner + <$> (o .:? "Key") + <*> (o .:? "Secret") + +-- | ToJSON ClusterVolumeSpecAccessModeSecretsInner +instance A.ToJSON ClusterVolumeSpecAccessModeSecretsInner where + toJSON ClusterVolumeSpecAccessModeSecretsInner {..} = + _omitNulls + [ "Key" .= clusterVolumeSpecAccessModeSecretsInnerKey + , "Secret" .= clusterVolumeSpecAccessModeSecretsInnerSecret + ] + + +-- | Construct a value of type 'ClusterVolumeSpecAccessModeSecretsInner' (by applying it's required fields, if any) +mkClusterVolumeSpecAccessModeSecretsInner + :: ClusterVolumeSpecAccessModeSecretsInner +mkClusterVolumeSpecAccessModeSecretsInner = + ClusterVolumeSpecAccessModeSecretsInner + { clusterVolumeSpecAccessModeSecretsInnerKey = Nothing + , clusterVolumeSpecAccessModeSecretsInnerSecret = Nothing + } + +-- ** Commit +-- | Commit +-- 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`. +data Commit = Commit + { commitId :: !(Maybe Text) -- ^ "ID" - Actual commit ID of external tool. + , commitExpected :: !(Maybe Text) -- ^ "Expected" - Commit ID of external tool expected by dockerd as set at build time. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Commit +instance A.FromJSON Commit where + parseJSON = A.withObject "Commit" $ \o -> + Commit + <$> (o .:? "ID") + <*> (o .:? "Expected") + +-- | ToJSON Commit +instance A.ToJSON Commit where + toJSON Commit {..} = + _omitNulls + [ "ID" .= commitId + , "Expected" .= commitExpected + ] + + +-- | Construct a value of type 'Commit' (by applying it's required fields, if any) +mkCommit + :: Commit +mkCommit = + Commit + { commitId = Nothing + , commitExpected = Nothing + } + +-- ** Config +-- | Config +data Config = Config + { configId :: !(Maybe Text) -- ^ "ID" + , configVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , configCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" + , configUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" + , configSpec :: !(Maybe ConfigSpec) -- ^ "Spec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Config +instance A.FromJSON Config where + parseJSON = A.withObject "Config" $ \o -> + Config + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + +-- | ToJSON Config +instance A.ToJSON Config where + toJSON Config {..} = + _omitNulls + [ "ID" .= configId + , "Version" .= configVersion + , "CreatedAt" .= configCreatedAt + , "UpdatedAt" .= configUpdatedAt + , "Spec" .= configSpec + ] + + +-- | Construct a value of type 'Config' (by applying it's required fields, if any) +mkConfig + :: Config +mkConfig = + Config + { configId = Nothing + , configVersion = Nothing + , configCreatedAt = Nothing + , configUpdatedAt = Nothing + , configSpec = Nothing + } + +-- ** ConfigCreateRequest +-- | ConfigCreateRequest +data ConfigCreateRequest = ConfigCreateRequest + { configCreateRequestName :: !(Maybe Text) -- ^ "Name" - User-defined name of the config. + , configCreateRequestLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , configCreateRequestData :: !(Maybe Text) -- ^ "Data" - Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) config data. + , configCreateRequestTemplating :: !(Maybe Driver) -- ^ "Templating" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ConfigCreateRequest +instance A.FromJSON ConfigCreateRequest where + parseJSON = A.withObject "ConfigCreateRequest" $ \o -> + ConfigCreateRequest + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Data") + <*> (o .:? "Templating") + +-- | ToJSON ConfigCreateRequest +instance A.ToJSON ConfigCreateRequest where + toJSON ConfigCreateRequest {..} = + _omitNulls + [ "Name" .= configCreateRequestName + , "Labels" .= configCreateRequestLabels + , "Data" .= configCreateRequestData + , "Templating" .= configCreateRequestTemplating + ] + + +-- | Construct a value of type 'ConfigCreateRequest' (by applying it's required fields, if any) +mkConfigCreateRequest + :: ConfigCreateRequest +mkConfigCreateRequest = + ConfigCreateRequest + { configCreateRequestName = Nothing + , configCreateRequestLabels = Nothing + , configCreateRequestData = Nothing + , configCreateRequestTemplating = Nothing + } + +-- ** ConfigReference +-- | ConfigReference +-- The config-only network source to provide the configuration for this network. +data ConfigReference = ConfigReference + { configReferenceNetwork :: !(Maybe Text) -- ^ "Network" - The name of the config-only network that provides the network's configuration. The specified network must be an existing config-only network. Only network names are allowed, not network IDs. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ConfigReference +instance A.FromJSON ConfigReference where + parseJSON = A.withObject "ConfigReference" $ \o -> + ConfigReference + <$> (o .:? "Network") + +-- | ToJSON ConfigReference +instance A.ToJSON ConfigReference where + toJSON ConfigReference {..} = + _omitNulls + [ "Network" .= configReferenceNetwork + ] + + +-- | Construct a value of type 'ConfigReference' (by applying it's required fields, if any) +mkConfigReference + :: ConfigReference +mkConfigReference = + ConfigReference + { configReferenceNetwork = Nothing + } + +-- ** ConfigSpec +-- | ConfigSpec +data ConfigSpec = ConfigSpec + { configSpecName :: !(Maybe Text) -- ^ "Name" - User-defined name of the config. + , configSpecLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , configSpecData :: !(Maybe Text) -- ^ "Data" - Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) config data. + , configSpecTemplating :: !(Maybe Driver) -- ^ "Templating" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ConfigSpec +instance A.FromJSON ConfigSpec where + parseJSON = A.withObject "ConfigSpec" $ \o -> + ConfigSpec + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Data") + <*> (o .:? "Templating") + +-- | ToJSON ConfigSpec +instance A.ToJSON ConfigSpec where + toJSON ConfigSpec {..} = + _omitNulls + [ "Name" .= configSpecName + , "Labels" .= configSpecLabels + , "Data" .= configSpecData + , "Templating" .= configSpecTemplating + ] + + +-- | Construct a value of type 'ConfigSpec' (by applying it's required fields, if any) +mkConfigSpec + :: ConfigSpec +mkConfigSpec = + ConfigSpec + { configSpecName = Nothing + , configSpecLabels = Nothing + , configSpecData = Nothing + , configSpecTemplating = Nothing + } + +-- ** ContainerConfig +-- | ContainerConfig +-- Configuration for a container that is portable between hosts. +data ContainerConfig = ContainerConfig + { containerConfigHostname :: !(Maybe Text) -- ^ "Hostname" - The hostname to use for the container, as a valid RFC 1123 hostname. + , containerConfigDomainname :: !(Maybe Text) -- ^ "Domainname" - The domain name to use for the container. + , containerConfigUser :: !(Maybe Text) -- ^ "User" - The user that commands are run as inside the container. + , containerConfigAttachStdin :: !(Maybe Bool) -- ^ "AttachStdin" - Whether to attach to `stdin`. + , containerConfigAttachStdout :: !(Maybe Bool) -- ^ "AttachStdout" - Whether to attach to `stdout`. + , containerConfigAttachStderr :: !(Maybe Bool) -- ^ "AttachStderr" - Whether to attach to `stderr`. + , containerConfigExposedPorts :: !(Maybe (Map.Map String A.Value)) -- ^ "ExposedPorts" - An object mapping ports to an empty object in the form: `{\"<port>/<tcp|udp|sctp>\": {}}` + , containerConfigTty :: !(Maybe Bool) -- ^ "Tty" - Attach standard streams to a TTY, including `stdin` if it is not closed. + , containerConfigOpenStdin :: !(Maybe Bool) -- ^ "OpenStdin" - Open `stdin` + , containerConfigStdinOnce :: !(Maybe Bool) -- ^ "StdinOnce" - Close `stdin` after one attached client disconnects + , containerConfigEnv :: !(Maybe [Text]) -- ^ "Env" - A list of environment variables to set inside the container in the form `[\"VAR=value\", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value. + , containerConfigCmd :: !(Maybe [Text]) -- ^ "Cmd" - Command to run specified as a string or an array of strings. + , containerConfigHealthcheck :: !(Maybe HealthConfig) -- ^ "Healthcheck" + , containerConfigArgsEscaped :: !(Maybe Bool) -- ^ "ArgsEscaped" - Command is already escaped (Windows only) + , containerConfigImage :: !(Maybe Text) -- ^ "Image" - The name (or reference) of the image to use when creating the container, or which was used when the container was created. + , containerConfigVolumes :: !(Maybe (Map.Map String A.Value)) -- ^ "Volumes" - An object mapping mount point paths inside the container to empty objects. + , containerConfigWorkingDir :: !(Maybe Text) -- ^ "WorkingDir" - The working directory for commands to run in. + , containerConfigEntrypoint :: !(Maybe [Text]) -- ^ "Entrypoint" - The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + , containerConfigNetworkDisabled :: !(Maybe Bool) -- ^ "NetworkDisabled" - Disable networking for the container. + , containerConfigMacAddress :: !(Maybe Text) -- ^ "MacAddress" - MAC address of the container. Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. + , containerConfigOnBuild :: !(Maybe [Text]) -- ^ "OnBuild" - `ONBUILD` metadata that were defined in the image's `Dockerfile`. + , containerConfigLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , containerConfigStopSignal :: !(Maybe Text) -- ^ "StopSignal" - Signal to stop a container as a string or unsigned integer. + , containerConfigStopTimeout :: !(Maybe Int) -- ^ "StopTimeout" - Timeout to stop a container in seconds. + , containerConfigShell :: !(Maybe [Text]) -- ^ "Shell" - Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerConfig +instance A.FromJSON ContainerConfig where + parseJSON = A.withObject "ContainerConfig" $ \o -> + ContainerConfig + <$> (o .:? "Hostname") + <*> (o .:? "Domainname") + <*> (o .:? "User") + <*> (o .:? "AttachStdin") + <*> (o .:? "AttachStdout") + <*> (o .:? "AttachStderr") + <*> (o .:? "ExposedPorts") + <*> (o .:? "Tty") + <*> (o .:? "OpenStdin") + <*> (o .:? "StdinOnce") + <*> (o .:? "Env") + <*> (o .:? "Cmd") + <*> (o .:? "Healthcheck") + <*> (o .:? "ArgsEscaped") + <*> (o .:? "Image") + <*> (o .:? "Volumes") + <*> (o .:? "WorkingDir") + <*> (o .:? "Entrypoint") + <*> (o .:? "NetworkDisabled") + <*> (o .:? "MacAddress") + <*> (o .:? "OnBuild") + <*> (o .:? "Labels") + <*> (o .:? "StopSignal") + <*> (o .:? "StopTimeout") + <*> (o .:? "Shell") + +-- | ToJSON ContainerConfig +instance A.ToJSON ContainerConfig where + toJSON ContainerConfig {..} = + _omitNulls + [ "Hostname" .= containerConfigHostname + , "Domainname" .= containerConfigDomainname + , "User" .= containerConfigUser + , "AttachStdin" .= containerConfigAttachStdin + , "AttachStdout" .= containerConfigAttachStdout + , "AttachStderr" .= containerConfigAttachStderr + , "ExposedPorts" .= containerConfigExposedPorts + , "Tty" .= containerConfigTty + , "OpenStdin" .= containerConfigOpenStdin + , "StdinOnce" .= containerConfigStdinOnce + , "Env" .= containerConfigEnv + , "Cmd" .= containerConfigCmd + , "Healthcheck" .= containerConfigHealthcheck + , "ArgsEscaped" .= containerConfigArgsEscaped + , "Image" .= containerConfigImage + , "Volumes" .= containerConfigVolumes + , "WorkingDir" .= containerConfigWorkingDir + , "Entrypoint" .= containerConfigEntrypoint + , "NetworkDisabled" .= containerConfigNetworkDisabled + , "MacAddress" .= containerConfigMacAddress + , "OnBuild" .= containerConfigOnBuild + , "Labels" .= containerConfigLabels + , "StopSignal" .= containerConfigStopSignal + , "StopTimeout" .= containerConfigStopTimeout + , "Shell" .= containerConfigShell + ] + + +-- | Construct a value of type 'ContainerConfig' (by applying it's required fields, if any) +mkContainerConfig + :: ContainerConfig +mkContainerConfig = + ContainerConfig + { containerConfigHostname = Nothing + , containerConfigDomainname = Nothing + , containerConfigUser = Nothing + , containerConfigAttachStdin = Nothing + , containerConfigAttachStdout = Nothing + , containerConfigAttachStderr = Nothing + , containerConfigExposedPorts = Nothing + , containerConfigTty = Nothing + , containerConfigOpenStdin = Nothing + , containerConfigStdinOnce = Nothing + , containerConfigEnv = Nothing + , containerConfigCmd = Nothing + , containerConfigHealthcheck = Nothing + , containerConfigArgsEscaped = Nothing + , containerConfigImage = Nothing + , containerConfigVolumes = Nothing + , containerConfigWorkingDir = Nothing + , containerConfigEntrypoint = Nothing + , containerConfigNetworkDisabled = Nothing + , containerConfigMacAddress = Nothing + , containerConfigOnBuild = Nothing + , containerConfigLabels = Nothing + , containerConfigStopSignal = Nothing + , containerConfigStopTimeout = Nothing + , containerConfigShell = Nothing + } + +-- ** ContainerCreateRequest +-- | ContainerCreateRequest +data ContainerCreateRequest = ContainerCreateRequest + { containerCreateRequestHostname :: !(Maybe Text) -- ^ "Hostname" - The hostname to use for the container, as a valid RFC 1123 hostname. + , containerCreateRequestDomainname :: !(Maybe Text) -- ^ "Domainname" - The domain name to use for the container. + , containerCreateRequestUser :: !(Maybe Text) -- ^ "User" - The user that commands are run as inside the container. + , containerCreateRequestAttachStdin :: !(Maybe Bool) -- ^ "AttachStdin" - Whether to attach to `stdin`. + , containerCreateRequestAttachStdout :: !(Maybe Bool) -- ^ "AttachStdout" - Whether to attach to `stdout`. + , containerCreateRequestAttachStderr :: !(Maybe Bool) -- ^ "AttachStderr" - Whether to attach to `stderr`. + , containerCreateRequestExposedPorts :: !(Maybe (Map.Map String A.Value)) -- ^ "ExposedPorts" - An object mapping ports to an empty object in the form: `{\"<port>/<tcp|udp|sctp>\": {}}` + , containerCreateRequestTty :: !(Maybe Bool) -- ^ "Tty" - Attach standard streams to a TTY, including `stdin` if it is not closed. + , containerCreateRequestOpenStdin :: !(Maybe Bool) -- ^ "OpenStdin" - Open `stdin` + , containerCreateRequestStdinOnce :: !(Maybe Bool) -- ^ "StdinOnce" - Close `stdin` after one attached client disconnects + , containerCreateRequestEnv :: !(Maybe [Text]) -- ^ "Env" - A list of environment variables to set inside the container in the form `[\"VAR=value\", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value. + , containerCreateRequestCmd :: !(Maybe [Text]) -- ^ "Cmd" - Command to run specified as a string or an array of strings. + , containerCreateRequestHealthcheck :: !(Maybe HealthConfig) -- ^ "Healthcheck" + , containerCreateRequestArgsEscaped :: !(Maybe Bool) -- ^ "ArgsEscaped" - Command is already escaped (Windows only) + , containerCreateRequestImage :: !(Maybe Text) -- ^ "Image" - The name (or reference) of the image to use when creating the container, or which was used when the container was created. + , containerCreateRequestVolumes :: !(Maybe (Map.Map String A.Value)) -- ^ "Volumes" - An object mapping mount point paths inside the container to empty objects. + , containerCreateRequestWorkingDir :: !(Maybe Text) -- ^ "WorkingDir" - The working directory for commands to run in. + , containerCreateRequestEntrypoint :: !(Maybe [Text]) -- ^ "Entrypoint" - The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + , containerCreateRequestNetworkDisabled :: !(Maybe Bool) -- ^ "NetworkDisabled" - Disable networking for the container. + , containerCreateRequestMacAddress :: !(Maybe Text) -- ^ "MacAddress" - MAC address of the container. Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. + , containerCreateRequestOnBuild :: !(Maybe [Text]) -- ^ "OnBuild" - `ONBUILD` metadata that were defined in the image's `Dockerfile`. + , containerCreateRequestLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , containerCreateRequestStopSignal :: !(Maybe Text) -- ^ "StopSignal" - Signal to stop a container as a string or unsigned integer. + , containerCreateRequestStopTimeout :: !(Maybe Int) -- ^ "StopTimeout" - Timeout to stop a container in seconds. + , containerCreateRequestShell :: !(Maybe [Text]) -- ^ "Shell" - Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + , containerCreateRequestHostConfig :: !(Maybe HostConfig) -- ^ "HostConfig" + , containerCreateRequestNetworkingConfig :: !(Maybe NetworkingConfig) -- ^ "NetworkingConfig" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerCreateRequest +instance A.FromJSON ContainerCreateRequest where + parseJSON = A.withObject "ContainerCreateRequest" $ \o -> + ContainerCreateRequest + <$> (o .:? "Hostname") + <*> (o .:? "Domainname") + <*> (o .:? "User") + <*> (o .:? "AttachStdin") + <*> (o .:? "AttachStdout") + <*> (o .:? "AttachStderr") + <*> (o .:? "ExposedPorts") + <*> (o .:? "Tty") + <*> (o .:? "OpenStdin") + <*> (o .:? "StdinOnce") + <*> (o .:? "Env") + <*> (o .:? "Cmd") + <*> (o .:? "Healthcheck") + <*> (o .:? "ArgsEscaped") + <*> (o .:? "Image") + <*> (o .:? "Volumes") + <*> (o .:? "WorkingDir") + <*> (o .:? "Entrypoint") + <*> (o .:? "NetworkDisabled") + <*> (o .:? "MacAddress") + <*> (o .:? "OnBuild") + <*> (o .:? "Labels") + <*> (o .:? "StopSignal") + <*> (o .:? "StopTimeout") + <*> (o .:? "Shell") + <*> (o .:? "HostConfig") + <*> (o .:? "NetworkingConfig") + +-- | ToJSON ContainerCreateRequest +instance A.ToJSON ContainerCreateRequest where + toJSON ContainerCreateRequest {..} = + _omitNulls + [ "Hostname" .= containerCreateRequestHostname + , "Domainname" .= containerCreateRequestDomainname + , "User" .= containerCreateRequestUser + , "AttachStdin" .= containerCreateRequestAttachStdin + , "AttachStdout" .= containerCreateRequestAttachStdout + , "AttachStderr" .= containerCreateRequestAttachStderr + , "ExposedPorts" .= containerCreateRequestExposedPorts + , "Tty" .= containerCreateRequestTty + , "OpenStdin" .= containerCreateRequestOpenStdin + , "StdinOnce" .= containerCreateRequestStdinOnce + , "Env" .= containerCreateRequestEnv + , "Cmd" .= containerCreateRequestCmd + , "Healthcheck" .= containerCreateRequestHealthcheck + , "ArgsEscaped" .= containerCreateRequestArgsEscaped + , "Image" .= containerCreateRequestImage + , "Volumes" .= containerCreateRequestVolumes + , "WorkingDir" .= containerCreateRequestWorkingDir + , "Entrypoint" .= containerCreateRequestEntrypoint + , "NetworkDisabled" .= containerCreateRequestNetworkDisabled + , "MacAddress" .= containerCreateRequestMacAddress + , "OnBuild" .= containerCreateRequestOnBuild + , "Labels" .= containerCreateRequestLabels + , "StopSignal" .= containerCreateRequestStopSignal + , "StopTimeout" .= containerCreateRequestStopTimeout + , "Shell" .= containerCreateRequestShell + , "HostConfig" .= containerCreateRequestHostConfig + , "NetworkingConfig" .= containerCreateRequestNetworkingConfig + ] + + +-- | Construct a value of type 'ContainerCreateRequest' (by applying it's required fields, if any) +mkContainerCreateRequest + :: ContainerCreateRequest +mkContainerCreateRequest = + ContainerCreateRequest + { containerCreateRequestHostname = Nothing + , containerCreateRequestDomainname = Nothing + , containerCreateRequestUser = Nothing + , containerCreateRequestAttachStdin = Nothing + , containerCreateRequestAttachStdout = Nothing + , containerCreateRequestAttachStderr = Nothing + , containerCreateRequestExposedPorts = Nothing + , containerCreateRequestTty = Nothing + , containerCreateRequestOpenStdin = Nothing + , containerCreateRequestStdinOnce = Nothing + , containerCreateRequestEnv = Nothing + , containerCreateRequestCmd = Nothing + , containerCreateRequestHealthcheck = Nothing + , containerCreateRequestArgsEscaped = Nothing + , containerCreateRequestImage = Nothing + , containerCreateRequestVolumes = Nothing + , containerCreateRequestWorkingDir = Nothing + , containerCreateRequestEntrypoint = Nothing + , containerCreateRequestNetworkDisabled = Nothing + , containerCreateRequestMacAddress = Nothing + , containerCreateRequestOnBuild = Nothing + , containerCreateRequestLabels = Nothing + , containerCreateRequestStopSignal = Nothing + , containerCreateRequestStopTimeout = Nothing + , containerCreateRequestShell = Nothing + , containerCreateRequestHostConfig = Nothing + , containerCreateRequestNetworkingConfig = Nothing + } + +-- ** ContainerCreateResponse +-- | ContainerCreateResponse +-- ContainerCreateResponse +-- +-- OK response to ContainerCreate operation +data ContainerCreateResponse = ContainerCreateResponse + { containerCreateResponseId :: !(Text) -- ^ /Required/ "Id" - The ID of the created container + , containerCreateResponseWarnings :: !([Text]) -- ^ /Required/ "Warnings" - Warnings encountered when creating the container + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerCreateResponse +instance A.FromJSON ContainerCreateResponse where + parseJSON = A.withObject "ContainerCreateResponse" $ \o -> + ContainerCreateResponse + <$> (o .: "Id") + <*> (o .: "Warnings") + +-- | ToJSON ContainerCreateResponse +instance A.ToJSON ContainerCreateResponse where + toJSON ContainerCreateResponse {..} = + _omitNulls + [ "Id" .= containerCreateResponseId + , "Warnings" .= containerCreateResponseWarnings + ] + + +-- | Construct a value of type 'ContainerCreateResponse' (by applying it's required fields, if any) +mkContainerCreateResponse + :: Text -- ^ 'containerCreateResponseId': The ID of the created container + -> [Text] -- ^ 'containerCreateResponseWarnings': Warnings encountered when creating the container + -> ContainerCreateResponse +mkContainerCreateResponse containerCreateResponseId containerCreateResponseWarnings = + ContainerCreateResponse + { containerCreateResponseId + , containerCreateResponseWarnings + } + +-- ** ContainerInspectResponse +-- | ContainerInspectResponse +-- ContainerInspectResponse +-- +data ContainerInspectResponse = ContainerInspectResponse + { containerInspectResponseId :: !(Maybe Text) -- ^ "Id" - The ID of the container + , containerInspectResponseCreated :: !(Maybe Text) -- ^ "Created" - The time the container was created + , containerInspectResponsePath :: !(Maybe Text) -- ^ "Path" - The path to the command being run + , containerInspectResponseArgs :: !(Maybe [Text]) -- ^ "Args" - The arguments to the command being run + , containerInspectResponseState :: !(Maybe ContainerState) -- ^ "State" + , containerInspectResponseImage :: !(Maybe Text) -- ^ "Image" - The container's image ID + , containerInspectResponseResolvConfPath :: !(Maybe Text) -- ^ "ResolvConfPath" + , containerInspectResponseHostnamePath :: !(Maybe Text) -- ^ "HostnamePath" + , containerInspectResponseHostsPath :: !(Maybe Text) -- ^ "HostsPath" + , containerInspectResponseLogPath :: !(Maybe Text) -- ^ "LogPath" + , containerInspectResponseName :: !(Maybe Text) -- ^ "Name" + , containerInspectResponseRestartCount :: !(Maybe Int) -- ^ "RestartCount" + , containerInspectResponseDriver :: !(Maybe Text) -- ^ "Driver" + , containerInspectResponsePlatform :: !(Maybe Text) -- ^ "Platform" + , containerInspectResponseMountLabel :: !(Maybe Text) -- ^ "MountLabel" + , containerInspectResponseProcessLabel :: !(Maybe Text) -- ^ "ProcessLabel" + , containerInspectResponseAppArmorProfile :: !(Maybe Text) -- ^ "AppArmorProfile" + , containerInspectResponseExecIds :: !(Maybe [Text]) -- ^ "ExecIDs" - IDs of exec instances that are running in the container. + , containerInspectResponseHostConfig :: !(Maybe HostConfig) -- ^ "HostConfig" + , containerInspectResponseGraphDriver :: !(Maybe GraphDriverData) -- ^ "GraphDriver" + , containerInspectResponseSizeRw :: !(Maybe Integer) -- ^ "SizeRw" - The size of files that have been created or changed by this container. + , containerInspectResponseSizeRootFs :: !(Maybe Integer) -- ^ "SizeRootFs" - The total size of all the files in this container. + , containerInspectResponseMounts :: !(Maybe [MountPoint]) -- ^ "Mounts" + , containerInspectResponseConfig :: !(Maybe ContainerConfig) -- ^ "Config" + , containerInspectResponseNetworkSettings :: !(Maybe NetworkSettings) -- ^ "NetworkSettings" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerInspectResponse +instance A.FromJSON ContainerInspectResponse where + parseJSON = A.withObject "ContainerInspectResponse" $ \o -> + ContainerInspectResponse + <$> (o .:? "Id") + <*> (o .:? "Created") + <*> (o .:? "Path") + <*> (o .:? "Args") + <*> (o .:? "State") + <*> (o .:? "Image") + <*> (o .:? "ResolvConfPath") + <*> (o .:? "HostnamePath") + <*> (o .:? "HostsPath") + <*> (o .:? "LogPath") + <*> (o .:? "Name") + <*> (o .:? "RestartCount") + <*> (o .:? "Driver") + <*> (o .:? "Platform") + <*> (o .:? "MountLabel") + <*> (o .:? "ProcessLabel") + <*> (o .:? "AppArmorProfile") + <*> (o .:? "ExecIDs") + <*> (o .:? "HostConfig") + <*> (o .:? "GraphDriver") + <*> (o .:? "SizeRw") + <*> (o .:? "SizeRootFs") + <*> (o .:? "Mounts") + <*> (o .:? "Config") + <*> (o .:? "NetworkSettings") + +-- | ToJSON ContainerInspectResponse +instance A.ToJSON ContainerInspectResponse where + toJSON ContainerInspectResponse {..} = + _omitNulls + [ "Id" .= containerInspectResponseId + , "Created" .= containerInspectResponseCreated + , "Path" .= containerInspectResponsePath + , "Args" .= containerInspectResponseArgs + , "State" .= containerInspectResponseState + , "Image" .= containerInspectResponseImage + , "ResolvConfPath" .= containerInspectResponseResolvConfPath + , "HostnamePath" .= containerInspectResponseHostnamePath + , "HostsPath" .= containerInspectResponseHostsPath + , "LogPath" .= containerInspectResponseLogPath + , "Name" .= containerInspectResponseName + , "RestartCount" .= containerInspectResponseRestartCount + , "Driver" .= containerInspectResponseDriver + , "Platform" .= containerInspectResponsePlatform + , "MountLabel" .= containerInspectResponseMountLabel + , "ProcessLabel" .= containerInspectResponseProcessLabel + , "AppArmorProfile" .= containerInspectResponseAppArmorProfile + , "ExecIDs" .= containerInspectResponseExecIds + , "HostConfig" .= containerInspectResponseHostConfig + , "GraphDriver" .= containerInspectResponseGraphDriver + , "SizeRw" .= containerInspectResponseSizeRw + , "SizeRootFs" .= containerInspectResponseSizeRootFs + , "Mounts" .= containerInspectResponseMounts + , "Config" .= containerInspectResponseConfig + , "NetworkSettings" .= containerInspectResponseNetworkSettings + ] + + +-- | Construct a value of type 'ContainerInspectResponse' (by applying it's required fields, if any) +mkContainerInspectResponse + :: ContainerInspectResponse +mkContainerInspectResponse = + ContainerInspectResponse + { containerInspectResponseId = Nothing + , containerInspectResponseCreated = Nothing + , containerInspectResponsePath = Nothing + , containerInspectResponseArgs = Nothing + , containerInspectResponseState = Nothing + , containerInspectResponseImage = Nothing + , containerInspectResponseResolvConfPath = Nothing + , containerInspectResponseHostnamePath = Nothing + , containerInspectResponseHostsPath = Nothing + , containerInspectResponseLogPath = Nothing + , containerInspectResponseName = Nothing + , containerInspectResponseRestartCount = Nothing + , containerInspectResponseDriver = Nothing + , containerInspectResponsePlatform = Nothing + , containerInspectResponseMountLabel = Nothing + , containerInspectResponseProcessLabel = Nothing + , containerInspectResponseAppArmorProfile = Nothing + , containerInspectResponseExecIds = Nothing + , containerInspectResponseHostConfig = Nothing + , containerInspectResponseGraphDriver = Nothing + , containerInspectResponseSizeRw = Nothing + , containerInspectResponseSizeRootFs = Nothing + , containerInspectResponseMounts = Nothing + , containerInspectResponseConfig = Nothing + , containerInspectResponseNetworkSettings = Nothing + } + +-- ** ContainerPruneResponse +-- | ContainerPruneResponse +-- ContainerPruneResponse +-- +data ContainerPruneResponse = ContainerPruneResponse + { containerPruneResponseContainersDeleted :: !(Maybe [Text]) -- ^ "ContainersDeleted" - Container IDs that were deleted + , containerPruneResponseSpaceReclaimed :: !(Maybe Integer) -- ^ "SpaceReclaimed" - Disk space reclaimed in bytes + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerPruneResponse +instance A.FromJSON ContainerPruneResponse where + parseJSON = A.withObject "ContainerPruneResponse" $ \o -> + ContainerPruneResponse + <$> (o .:? "ContainersDeleted") + <*> (o .:? "SpaceReclaimed") + +-- | ToJSON ContainerPruneResponse +instance A.ToJSON ContainerPruneResponse where + toJSON ContainerPruneResponse {..} = + _omitNulls + [ "ContainersDeleted" .= containerPruneResponseContainersDeleted + , "SpaceReclaimed" .= containerPruneResponseSpaceReclaimed + ] + + +-- | Construct a value of type 'ContainerPruneResponse' (by applying it's required fields, if any) +mkContainerPruneResponse + :: ContainerPruneResponse +mkContainerPruneResponse = + ContainerPruneResponse + { containerPruneResponseContainersDeleted = Nothing + , containerPruneResponseSpaceReclaimed = Nothing + } + +-- ** ContainerState +-- | ContainerState +-- ContainerState stores container's running state. It's part of ContainerJSONBase and will be returned by the \"inspect\" command. +data ContainerState = ContainerState + { containerStateStatus :: !(Maybe E'Status2) -- ^ "Status" - String representation of the container state. Can be one of \"created\", \"running\", \"paused\", \"restarting\", \"removing\", \"exited\", or \"dead\". + , containerStateRunning :: !(Maybe Bool) -- ^ "Running" - Whether this container is running. Note that a running container can be _paused_. The `Running` and `Paused` booleans are not mutually exclusive: When pausing a container (on Linux), the freezer cgroup is used to suspend all processes in the container. Freezing the process requires the process to be running. As a result, paused containers are both `Running` _and_ `Paused`. Use the `Status` field instead to determine if a container's state is \"running\". + , containerStatePaused :: !(Maybe Bool) -- ^ "Paused" - Whether this container is paused. + , containerStateRestarting :: !(Maybe Bool) -- ^ "Restarting" - Whether this container is restarting. + , containerStateOomKilled :: !(Maybe Bool) -- ^ "OOMKilled" - Whether a process within this container has been killed because it ran out of memory since the container was last started. + , containerStateDead :: !(Maybe Bool) -- ^ "Dead" + , containerStatePid :: !(Maybe Int) -- ^ "Pid" - The process ID of this container + , containerStateExitCode :: !(Maybe Int) -- ^ "ExitCode" - The last exit code of this container + , containerStateError :: !(Maybe Text) -- ^ "Error" + , containerStateStartedAt :: !(Maybe Text) -- ^ "StartedAt" - The time when this container was last started. + , containerStateFinishedAt :: !(Maybe Text) -- ^ "FinishedAt" - The time when this container last exited. + , containerStateHealth :: !(Maybe Health) -- ^ "Health" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerState +instance A.FromJSON ContainerState where + parseJSON = A.withObject "ContainerState" $ \o -> + ContainerState + <$> (o .:? "Status") + <*> (o .:? "Running") + <*> (o .:? "Paused") + <*> (o .:? "Restarting") + <*> (o .:? "OOMKilled") + <*> (o .:? "Dead") + <*> (o .:? "Pid") + <*> (o .:? "ExitCode") + <*> (o .:? "Error") + <*> (o .:? "StartedAt") + <*> (o .:? "FinishedAt") + <*> (o .:? "Health") + +-- | ToJSON ContainerState +instance A.ToJSON ContainerState where + toJSON ContainerState {..} = + _omitNulls + [ "Status" .= containerStateStatus + , "Running" .= containerStateRunning + , "Paused" .= containerStatePaused + , "Restarting" .= containerStateRestarting + , "OOMKilled" .= containerStateOomKilled + , "Dead" .= containerStateDead + , "Pid" .= containerStatePid + , "ExitCode" .= containerStateExitCode + , "Error" .= containerStateError + , "StartedAt" .= containerStateStartedAt + , "FinishedAt" .= containerStateFinishedAt + , "Health" .= containerStateHealth + ] + + +-- | Construct a value of type 'ContainerState' (by applying it's required fields, if any) +mkContainerState + :: ContainerState +mkContainerState = + ContainerState + { containerStateStatus = Nothing + , containerStateRunning = Nothing + , containerStatePaused = Nothing + , containerStateRestarting = Nothing + , containerStateOomKilled = Nothing + , containerStateDead = Nothing + , containerStatePid = Nothing + , containerStateExitCode = Nothing + , containerStateError = Nothing + , containerStateStartedAt = Nothing + , containerStateFinishedAt = Nothing + , containerStateHealth = Nothing + } + +-- ** ContainerStatus +-- | ContainerStatus +-- represents the status of a container. +data ContainerStatus = ContainerStatus + { containerStatusContainerId :: !(Maybe Text) -- ^ "ContainerID" + , containerStatusPid :: !(Maybe Int) -- ^ "PID" + , containerStatusExitCode :: !(Maybe Int) -- ^ "ExitCode" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerStatus +instance A.FromJSON ContainerStatus where + parseJSON = A.withObject "ContainerStatus" $ \o -> + ContainerStatus + <$> (o .:? "ContainerID") + <*> (o .:? "PID") + <*> (o .:? "ExitCode") + +-- | ToJSON ContainerStatus +instance A.ToJSON ContainerStatus where + toJSON ContainerStatus {..} = + _omitNulls + [ "ContainerID" .= containerStatusContainerId + , "PID" .= containerStatusPid + , "ExitCode" .= containerStatusExitCode + ] + + +-- | Construct a value of type 'ContainerStatus' (by applying it's required fields, if any) +mkContainerStatus + :: ContainerStatus +mkContainerStatus = + ContainerStatus + { containerStatusContainerId = Nothing + , containerStatusPid = Nothing + , containerStatusExitCode = Nothing + } + +-- ** ContainerSummary +-- | ContainerSummary +data ContainerSummary = ContainerSummary + { containerSummaryId :: !(Maybe Text) -- ^ "Id" - The ID of this container + , containerSummaryNames :: !(Maybe [Text]) -- ^ "Names" - The names that this container has been given + , containerSummaryImage :: !(Maybe Text) -- ^ "Image" - The name of the image used when creating this container + , containerSummaryImageId :: !(Maybe Text) -- ^ "ImageID" - The ID of the image that this container was created from + , containerSummaryCommand :: !(Maybe Text) -- ^ "Command" - Command to run when starting the container + , containerSummaryCreated :: !(Maybe Integer) -- ^ "Created" - When the container was created + , containerSummaryPorts :: !(Maybe [Port]) -- ^ "Ports" - The ports exposed by this container + , containerSummarySizeRw :: !(Maybe Integer) -- ^ "SizeRw" - The size of files that have been created or changed by this container + , containerSummarySizeRootFs :: !(Maybe Integer) -- ^ "SizeRootFs" - The total size of all the files in this container + , containerSummaryLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , containerSummaryState :: !(Maybe Text) -- ^ "State" - The state of this container (e.g. `Exited`) + , containerSummaryStatus :: !(Maybe Text) -- ^ "Status" - Additional human-readable status of this container (e.g. `Exit 0`) + , containerSummaryHostConfig :: !(Maybe ContainerSummaryHostConfig) -- ^ "HostConfig" + , containerSummaryNetworkSettings :: !(Maybe ContainerSummaryNetworkSettings) -- ^ "NetworkSettings" + , containerSummaryMounts :: !(Maybe [MountPoint]) -- ^ "Mounts" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerSummary +instance A.FromJSON ContainerSummary where + parseJSON = A.withObject "ContainerSummary" $ \o -> + ContainerSummary + <$> (o .:? "Id") + <*> (o .:? "Names") + <*> (o .:? "Image") + <*> (o .:? "ImageID") + <*> (o .:? "Command") + <*> (o .:? "Created") + <*> (o .:? "Ports") + <*> (o .:? "SizeRw") + <*> (o .:? "SizeRootFs") + <*> (o .:? "Labels") + <*> (o .:? "State") + <*> (o .:? "Status") + <*> (o .:? "HostConfig") + <*> (o .:? "NetworkSettings") + <*> (o .:? "Mounts") + +-- | ToJSON ContainerSummary +instance A.ToJSON ContainerSummary where + toJSON ContainerSummary {..} = + _omitNulls + [ "Id" .= containerSummaryId + , "Names" .= containerSummaryNames + , "Image" .= containerSummaryImage + , "ImageID" .= containerSummaryImageId + , "Command" .= containerSummaryCommand + , "Created" .= containerSummaryCreated + , "Ports" .= containerSummaryPorts + , "SizeRw" .= containerSummarySizeRw + , "SizeRootFs" .= containerSummarySizeRootFs + , "Labels" .= containerSummaryLabels + , "State" .= containerSummaryState + , "Status" .= containerSummaryStatus + , "HostConfig" .= containerSummaryHostConfig + , "NetworkSettings" .= containerSummaryNetworkSettings + , "Mounts" .= containerSummaryMounts + ] + + +-- | Construct a value of type 'ContainerSummary' (by applying it's required fields, if any) +mkContainerSummary + :: ContainerSummary +mkContainerSummary = + ContainerSummary + { containerSummaryId = Nothing + , containerSummaryNames = Nothing + , containerSummaryImage = Nothing + , containerSummaryImageId = Nothing + , containerSummaryCommand = Nothing + , containerSummaryCreated = Nothing + , containerSummaryPorts = Nothing + , containerSummarySizeRw = Nothing + , containerSummarySizeRootFs = Nothing + , containerSummaryLabels = Nothing + , containerSummaryState = Nothing + , containerSummaryStatus = Nothing + , containerSummaryHostConfig = Nothing + , containerSummaryNetworkSettings = Nothing + , containerSummaryMounts = Nothing + } + +-- ** ContainerSummaryHostConfig +-- | ContainerSummaryHostConfig +data ContainerSummaryHostConfig = ContainerSummaryHostConfig + { containerSummaryHostConfigNetworkMode :: !(Maybe Text) -- ^ "NetworkMode" + , containerSummaryHostConfigAnnotations :: !(Maybe (Map.Map String Text)) -- ^ "Annotations" - Arbitrary key-value metadata attached to container + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerSummaryHostConfig +instance A.FromJSON ContainerSummaryHostConfig where + parseJSON = A.withObject "ContainerSummaryHostConfig" $ \o -> + ContainerSummaryHostConfig + <$> (o .:? "NetworkMode") + <*> (o .:? "Annotations") + +-- | ToJSON ContainerSummaryHostConfig +instance A.ToJSON ContainerSummaryHostConfig where + toJSON ContainerSummaryHostConfig {..} = + _omitNulls + [ "NetworkMode" .= containerSummaryHostConfigNetworkMode + , "Annotations" .= containerSummaryHostConfigAnnotations + ] + + +-- | Construct a value of type 'ContainerSummaryHostConfig' (by applying it's required fields, if any) +mkContainerSummaryHostConfig + :: ContainerSummaryHostConfig +mkContainerSummaryHostConfig = + ContainerSummaryHostConfig + { containerSummaryHostConfigNetworkMode = Nothing + , containerSummaryHostConfigAnnotations = Nothing + } + +-- ** ContainerSummaryNetworkSettings +-- | ContainerSummaryNetworkSettings +-- A summary of the container's network settings +data ContainerSummaryNetworkSettings = ContainerSummaryNetworkSettings + { containerSummaryNetworkSettingsNetworks :: !(Maybe (Map.Map String EndpointSettings)) -- ^ "Networks" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerSummaryNetworkSettings +instance A.FromJSON ContainerSummaryNetworkSettings where + parseJSON = A.withObject "ContainerSummaryNetworkSettings" $ \o -> + ContainerSummaryNetworkSettings + <$> (o .:? "Networks") + +-- | ToJSON ContainerSummaryNetworkSettings +instance A.ToJSON ContainerSummaryNetworkSettings where + toJSON ContainerSummaryNetworkSettings {..} = + _omitNulls + [ "Networks" .= containerSummaryNetworkSettingsNetworks + ] + + +-- | Construct a value of type 'ContainerSummaryNetworkSettings' (by applying it's required fields, if any) +mkContainerSummaryNetworkSettings + :: ContainerSummaryNetworkSettings +mkContainerSummaryNetworkSettings = + ContainerSummaryNetworkSettings + { containerSummaryNetworkSettingsNetworks = Nothing + } + +-- ** ContainerTopResponse +-- | ContainerTopResponse +-- ContainerTopResponse +-- +-- OK response to ContainerTop operation +data ContainerTopResponse = ContainerTopResponse + { containerTopResponseTitles :: !(Maybe [Text]) -- ^ "Titles" - The ps column titles + , containerTopResponseProcesses :: !(Maybe [[Text]]) -- ^ "Processes" - Each process running in the container, where each is process is an array of values corresponding to the titles. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerTopResponse +instance A.FromJSON ContainerTopResponse where + parseJSON = A.withObject "ContainerTopResponse" $ \o -> + ContainerTopResponse + <$> (o .:? "Titles") + <*> (o .:? "Processes") + +-- | ToJSON ContainerTopResponse +instance A.ToJSON ContainerTopResponse where + toJSON ContainerTopResponse {..} = + _omitNulls + [ "Titles" .= containerTopResponseTitles + , "Processes" .= containerTopResponseProcesses + ] + + +-- | Construct a value of type 'ContainerTopResponse' (by applying it's required fields, if any) +mkContainerTopResponse + :: ContainerTopResponse +mkContainerTopResponse = + ContainerTopResponse + { containerTopResponseTitles = Nothing + , containerTopResponseProcesses = Nothing + } + +-- ** ContainerUpdateRequest +-- | ContainerUpdateRequest +data ContainerUpdateRequest = ContainerUpdateRequest + { containerUpdateRequestCpuShares :: !(Maybe Int) -- ^ "CpuShares" - An integer value representing this container's relative CPU weight versus other containers. + , containerUpdateRequestMemory :: !(Maybe Integer) -- ^ "Memory" - Memory limit in bytes. + , containerUpdateRequestCgroupParent :: !(Maybe Text) -- ^ "CgroupParent" - Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + , containerUpdateRequestBlkioWeight :: !(Maybe Int) -- ^ "BlkioWeight" - Block IO weight (relative weight). + , containerUpdateRequestBlkioWeightDevice :: !(Maybe [ResourcesBlkioWeightDeviceInner]) -- ^ "BlkioWeightDevice" - Block IO weight (relative device weight) in the form: ``` [{\"Path\": \"device_path\", \"Weight\": weight}] ``` + , containerUpdateRequestBlkioDeviceReadBps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceReadBps" - Limit read rate (bytes per second) from a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , containerUpdateRequestBlkioDeviceWriteBps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceWriteBps" - Limit write rate (bytes per second) to a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , containerUpdateRequestBlkioDeviceReadIOps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceReadIOps" - Limit read rate (IO per second) from a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , containerUpdateRequestBlkioDeviceWriteIOps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceWriteIOps" - Limit write rate (IO per second) to a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , containerUpdateRequestCpuPeriod :: !(Maybe Integer) -- ^ "CpuPeriod" - The length of a CPU period in microseconds. + , containerUpdateRequestCpuQuota :: !(Maybe Integer) -- ^ "CpuQuota" - Microseconds of CPU time that the container can get in a CPU period. + , containerUpdateRequestCpuRealtimePeriod :: !(Maybe Integer) -- ^ "CpuRealtimePeriod" - The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + , containerUpdateRequestCpuRealtimeRuntime :: !(Maybe Integer) -- ^ "CpuRealtimeRuntime" - The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + , containerUpdateRequestCpusetCpus :: !(Maybe Text) -- ^ "CpusetCpus" - CPUs in which to allow execution (e.g., `0-3`, `0,1`). + , containerUpdateRequestCpusetMems :: !(Maybe Text) -- ^ "CpusetMems" - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + , containerUpdateRequestDevices :: !(Maybe [DeviceMapping]) -- ^ "Devices" - A list of devices to add to the container. + , containerUpdateRequestDeviceCgroupRules :: !(Maybe [Text]) -- ^ "DeviceCgroupRules" - a list of cgroup rules to apply to the container + , containerUpdateRequestDeviceRequests :: !(Maybe [DeviceRequest]) -- ^ "DeviceRequests" - A list of requests for devices to be sent to device drivers. + , containerUpdateRequestKernelMemoryTcp :: !(Maybe Integer) -- ^ "KernelMemoryTCP" - Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. + , containerUpdateRequestMemoryReservation :: !(Maybe Integer) -- ^ "MemoryReservation" - Memory soft limit in bytes. + , containerUpdateRequestMemorySwap :: !(Maybe Integer) -- ^ "MemorySwap" - Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + , containerUpdateRequestMemorySwappiness :: !(Maybe Integer) -- ^ "MemorySwappiness" - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + , containerUpdateRequestNanoCpus :: !(Maybe Integer) -- ^ "NanoCpus" - CPU quota in units of 10<sup>-9</sup> CPUs. + , containerUpdateRequestOomKillDisable :: !(Maybe Bool) -- ^ "OomKillDisable" - Disable OOM Killer for the container. + , containerUpdateRequestInit :: !(Maybe Bool) -- ^ "Init" - Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + , containerUpdateRequestPidsLimit :: !(Maybe Integer) -- ^ "PidsLimit" - Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not change. + , containerUpdateRequestUlimits :: !(Maybe [ResourcesUlimitsInner]) -- ^ "Ulimits" - A list of resource limits to set in the container. For example: ``` {\"Name\": \"nofile\", \"Soft\": 1024, \"Hard\": 2048} ``` + , containerUpdateRequestCpuCount :: !(Maybe Integer) -- ^ "CpuCount" - The number of usable CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + , containerUpdateRequestCpuPercent :: !(Maybe Integer) -- ^ "CpuPercent" - The usable percentage of the available CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + , containerUpdateRequestIoMaximumIOps :: !(Maybe Integer) -- ^ "IOMaximumIOps" - Maximum IOps for the container system drive (Windows only) + , containerUpdateRequestIoMaximumBandwidth :: !(Maybe Integer) -- ^ "IOMaximumBandwidth" - Maximum IO in bytes per second for the container system drive (Windows only). + , containerUpdateRequestRestartPolicy :: !(Maybe RestartPolicy) -- ^ "RestartPolicy" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerUpdateRequest +instance A.FromJSON ContainerUpdateRequest where + parseJSON = A.withObject "ContainerUpdateRequest" $ \o -> + ContainerUpdateRequest + <$> (o .:? "CpuShares") + <*> (o .:? "Memory") + <*> (o .:? "CgroupParent") + <*> (o .:? "BlkioWeight") + <*> (o .:? "BlkioWeightDevice") + <*> (o .:? "BlkioDeviceReadBps") + <*> (o .:? "BlkioDeviceWriteBps") + <*> (o .:? "BlkioDeviceReadIOps") + <*> (o .:? "BlkioDeviceWriteIOps") + <*> (o .:? "CpuPeriod") + <*> (o .:? "CpuQuota") + <*> (o .:? "CpuRealtimePeriod") + <*> (o .:? "CpuRealtimeRuntime") + <*> (o .:? "CpusetCpus") + <*> (o .:? "CpusetMems") + <*> (o .:? "Devices") + <*> (o .:? "DeviceCgroupRules") + <*> (o .:? "DeviceRequests") + <*> (o .:? "KernelMemoryTCP") + <*> (o .:? "MemoryReservation") + <*> (o .:? "MemorySwap") + <*> (o .:? "MemorySwappiness") + <*> (o .:? "NanoCpus") + <*> (o .:? "OomKillDisable") + <*> (o .:? "Init") + <*> (o .:? "PidsLimit") + <*> (o .:? "Ulimits") + <*> (o .:? "CpuCount") + <*> (o .:? "CpuPercent") + <*> (o .:? "IOMaximumIOps") + <*> (o .:? "IOMaximumBandwidth") + <*> (o .:? "RestartPolicy") + +-- | ToJSON ContainerUpdateRequest +instance A.ToJSON ContainerUpdateRequest where + toJSON ContainerUpdateRequest {..} = + _omitNulls + [ "CpuShares" .= containerUpdateRequestCpuShares + , "Memory" .= containerUpdateRequestMemory + , "CgroupParent" .= containerUpdateRequestCgroupParent + , "BlkioWeight" .= containerUpdateRequestBlkioWeight + , "BlkioWeightDevice" .= containerUpdateRequestBlkioWeightDevice + , "BlkioDeviceReadBps" .= containerUpdateRequestBlkioDeviceReadBps + , "BlkioDeviceWriteBps" .= containerUpdateRequestBlkioDeviceWriteBps + , "BlkioDeviceReadIOps" .= containerUpdateRequestBlkioDeviceReadIOps + , "BlkioDeviceWriteIOps" .= containerUpdateRequestBlkioDeviceWriteIOps + , "CpuPeriod" .= containerUpdateRequestCpuPeriod + , "CpuQuota" .= containerUpdateRequestCpuQuota + , "CpuRealtimePeriod" .= containerUpdateRequestCpuRealtimePeriod + , "CpuRealtimeRuntime" .= containerUpdateRequestCpuRealtimeRuntime + , "CpusetCpus" .= containerUpdateRequestCpusetCpus + , "CpusetMems" .= containerUpdateRequestCpusetMems + , "Devices" .= containerUpdateRequestDevices + , "DeviceCgroupRules" .= containerUpdateRequestDeviceCgroupRules + , "DeviceRequests" .= containerUpdateRequestDeviceRequests + , "KernelMemoryTCP" .= containerUpdateRequestKernelMemoryTcp + , "MemoryReservation" .= containerUpdateRequestMemoryReservation + , "MemorySwap" .= containerUpdateRequestMemorySwap + , "MemorySwappiness" .= containerUpdateRequestMemorySwappiness + , "NanoCpus" .= containerUpdateRequestNanoCpus + , "OomKillDisable" .= containerUpdateRequestOomKillDisable + , "Init" .= containerUpdateRequestInit + , "PidsLimit" .= containerUpdateRequestPidsLimit + , "Ulimits" .= containerUpdateRequestUlimits + , "CpuCount" .= containerUpdateRequestCpuCount + , "CpuPercent" .= containerUpdateRequestCpuPercent + , "IOMaximumIOps" .= containerUpdateRequestIoMaximumIOps + , "IOMaximumBandwidth" .= containerUpdateRequestIoMaximumBandwidth + , "RestartPolicy" .= containerUpdateRequestRestartPolicy + ] + + +-- | Construct a value of type 'ContainerUpdateRequest' (by applying it's required fields, if any) +mkContainerUpdateRequest + :: ContainerUpdateRequest +mkContainerUpdateRequest = + ContainerUpdateRequest + { containerUpdateRequestCpuShares = Nothing + , containerUpdateRequestMemory = Nothing + , containerUpdateRequestCgroupParent = Nothing + , containerUpdateRequestBlkioWeight = Nothing + , containerUpdateRequestBlkioWeightDevice = Nothing + , containerUpdateRequestBlkioDeviceReadBps = Nothing + , containerUpdateRequestBlkioDeviceWriteBps = Nothing + , containerUpdateRequestBlkioDeviceReadIOps = Nothing + , containerUpdateRequestBlkioDeviceWriteIOps = Nothing + , containerUpdateRequestCpuPeriod = Nothing + , containerUpdateRequestCpuQuota = Nothing + , containerUpdateRequestCpuRealtimePeriod = Nothing + , containerUpdateRequestCpuRealtimeRuntime = Nothing + , containerUpdateRequestCpusetCpus = Nothing + , containerUpdateRequestCpusetMems = Nothing + , containerUpdateRequestDevices = Nothing + , containerUpdateRequestDeviceCgroupRules = Nothing + , containerUpdateRequestDeviceRequests = Nothing + , containerUpdateRequestKernelMemoryTcp = Nothing + , containerUpdateRequestMemoryReservation = Nothing + , containerUpdateRequestMemorySwap = Nothing + , containerUpdateRequestMemorySwappiness = Nothing + , containerUpdateRequestNanoCpus = Nothing + , containerUpdateRequestOomKillDisable = Nothing + , containerUpdateRequestInit = Nothing + , containerUpdateRequestPidsLimit = Nothing + , containerUpdateRequestUlimits = Nothing + , containerUpdateRequestCpuCount = Nothing + , containerUpdateRequestCpuPercent = Nothing + , containerUpdateRequestIoMaximumIOps = Nothing + , containerUpdateRequestIoMaximumBandwidth = Nothing + , containerUpdateRequestRestartPolicy = Nothing + } + +-- ** ContainerUpdateResponse +-- | ContainerUpdateResponse +-- ContainerUpdateResponse +-- +-- OK response to ContainerUpdate operation +data ContainerUpdateResponse = ContainerUpdateResponse + { containerUpdateResponseWarnings :: !(Maybe [Text]) -- ^ "Warnings" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerUpdateResponse +instance A.FromJSON ContainerUpdateResponse where + parseJSON = A.withObject "ContainerUpdateResponse" $ \o -> + ContainerUpdateResponse + <$> (o .:? "Warnings") + +-- | ToJSON ContainerUpdateResponse +instance A.ToJSON ContainerUpdateResponse where + toJSON ContainerUpdateResponse {..} = + _omitNulls + [ "Warnings" .= containerUpdateResponseWarnings + ] + + +-- | Construct a value of type 'ContainerUpdateResponse' (by applying it's required fields, if any) +mkContainerUpdateResponse + :: ContainerUpdateResponse +mkContainerUpdateResponse = + ContainerUpdateResponse + { containerUpdateResponseWarnings = Nothing + } + +-- ** ContainerWaitExitError +-- | ContainerWaitExitError +-- container waiting error, if any +data ContainerWaitExitError = ContainerWaitExitError + { containerWaitExitErrorMessage :: !(Maybe Text) -- ^ "Message" - Details of an error + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerWaitExitError +instance A.FromJSON ContainerWaitExitError where + parseJSON = A.withObject "ContainerWaitExitError" $ \o -> + ContainerWaitExitError + <$> (o .:? "Message") + +-- | ToJSON ContainerWaitExitError +instance A.ToJSON ContainerWaitExitError where + toJSON ContainerWaitExitError {..} = + _omitNulls + [ "Message" .= containerWaitExitErrorMessage + ] + + +-- | Construct a value of type 'ContainerWaitExitError' (by applying it's required fields, if any) +mkContainerWaitExitError + :: ContainerWaitExitError +mkContainerWaitExitError = + ContainerWaitExitError + { containerWaitExitErrorMessage = Nothing + } + +-- ** ContainerWaitResponse +-- | ContainerWaitResponse +-- ContainerWaitResponse +-- +-- OK response to ContainerWait operation +data ContainerWaitResponse = ContainerWaitResponse + { containerWaitResponseStatusCode :: !(Integer) -- ^ /Required/ "StatusCode" - Exit code of the container + , containerWaitResponseError :: !(Maybe ContainerWaitExitError) -- ^ "Error" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerWaitResponse +instance A.FromJSON ContainerWaitResponse where + parseJSON = A.withObject "ContainerWaitResponse" $ \o -> + ContainerWaitResponse + <$> (o .: "StatusCode") + <*> (o .:? "Error") + +-- | ToJSON ContainerWaitResponse +instance A.ToJSON ContainerWaitResponse where + toJSON ContainerWaitResponse {..} = + _omitNulls + [ "StatusCode" .= containerWaitResponseStatusCode + , "Error" .= containerWaitResponseError + ] + + +-- | Construct a value of type 'ContainerWaitResponse' (by applying it's required fields, if any) +mkContainerWaitResponse + :: Integer -- ^ 'containerWaitResponseStatusCode': Exit code of the container + -> ContainerWaitResponse +mkContainerWaitResponse containerWaitResponseStatusCode = + ContainerWaitResponse + { containerWaitResponseStatusCode + , containerWaitResponseError = Nothing + } + +-- ** ContainerdInfo +-- | ContainerdInfo +-- Information for connecting to the containerd instance that is used by the daemon. This is included for debugging purposes only. +data ContainerdInfo = ContainerdInfo + { containerdInfoAddress :: !(Maybe Text) -- ^ "Address" - The address of the containerd socket. + , containerdInfoNamespaces :: !(Maybe ContainerdInfoNamespaces) -- ^ "Namespaces" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerdInfo +instance A.FromJSON ContainerdInfo where + parseJSON = A.withObject "ContainerdInfo" $ \o -> + ContainerdInfo + <$> (o .:? "Address") + <*> (o .:? "Namespaces") + +-- | ToJSON ContainerdInfo +instance A.ToJSON ContainerdInfo where + toJSON ContainerdInfo {..} = + _omitNulls + [ "Address" .= containerdInfoAddress + , "Namespaces" .= containerdInfoNamespaces + ] + + +-- | Construct a value of type 'ContainerdInfo' (by applying it's required fields, if any) +mkContainerdInfo + :: ContainerdInfo +mkContainerdInfo = + ContainerdInfo + { containerdInfoAddress = Nothing + , containerdInfoNamespaces = Nothing + } + +-- ** ContainerdInfoNamespaces +-- | ContainerdInfoNamespaces +-- The namespaces that the daemon uses for running containers and plugins in containerd. These namespaces can be configured in the daemon configuration, and are considered to be used exclusively by the daemon, Tampering with the containerd instance may cause unexpected behavior. As these namespaces are considered to be exclusively accessed by the daemon, it is not recommended to change these values, or to change them to a value that is used by other systems, such as cri-containerd. +data ContainerdInfoNamespaces = ContainerdInfoNamespaces + { containerdInfoNamespacesContainers :: !(Maybe Text) -- ^ "Containers" - The default containerd namespace used for containers managed by the daemon. The default namespace for containers is \"moby\", but will be suffixed with the `<uid>.<gid>` of the remapped `root` if user-namespaces are enabled and the containerd image-store is used. + , containerdInfoNamespacesPlugins :: !(Maybe Text) -- ^ "Plugins" - The default containerd namespace used for plugins managed by the daemon. The default namespace for plugins is \"plugins.moby\", but will be suffixed with the `<uid>.<gid>` of the remapped `root` if user-namespaces are enabled and the containerd image-store is used. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ContainerdInfoNamespaces +instance A.FromJSON ContainerdInfoNamespaces where + parseJSON = A.withObject "ContainerdInfoNamespaces" $ \o -> + ContainerdInfoNamespaces + <$> (o .:? "Containers") + <*> (o .:? "Plugins") + +-- | ToJSON ContainerdInfoNamespaces +instance A.ToJSON ContainerdInfoNamespaces where + toJSON ContainerdInfoNamespaces {..} = + _omitNulls + [ "Containers" .= containerdInfoNamespacesContainers + , "Plugins" .= containerdInfoNamespacesPlugins + ] + + +-- | Construct a value of type 'ContainerdInfoNamespaces' (by applying it's required fields, if any) +mkContainerdInfoNamespaces + :: ContainerdInfoNamespaces +mkContainerdInfoNamespaces = + ContainerdInfoNamespaces + { containerdInfoNamespacesContainers = Nothing + , containerdInfoNamespacesPlugins = Nothing + } + +-- ** CreateImageInfo +-- | CreateImageInfo +data CreateImageInfo = CreateImageInfo + { createImageInfoId :: !(Maybe Text) -- ^ "id" + , createImageInfoError :: !(Maybe Text) -- ^ "error" + , createImageInfoErrorDetail :: !(Maybe ErrorDetail) -- ^ "errorDetail" + , createImageInfoStatus :: !(Maybe Text) -- ^ "status" + , createImageInfoProgress :: !(Maybe Text) -- ^ "progress" + , createImageInfoProgressDetail :: !(Maybe ProgressDetail) -- ^ "progressDetail" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON CreateImageInfo +instance A.FromJSON CreateImageInfo where + parseJSON = A.withObject "CreateImageInfo" $ \o -> + CreateImageInfo + <$> (o .:? "id") + <*> (o .:? "error") + <*> (o .:? "errorDetail") + <*> (o .:? "status") + <*> (o .:? "progress") + <*> (o .:? "progressDetail") + +-- | ToJSON CreateImageInfo +instance A.ToJSON CreateImageInfo where + toJSON CreateImageInfo {..} = + _omitNulls + [ "id" .= createImageInfoId + , "error" .= createImageInfoError + , "errorDetail" .= createImageInfoErrorDetail + , "status" .= createImageInfoStatus + , "progress" .= createImageInfoProgress + , "progressDetail" .= createImageInfoProgressDetail + ] + + +-- | Construct a value of type 'CreateImageInfo' (by applying it's required fields, if any) +mkCreateImageInfo + :: CreateImageInfo +mkCreateImageInfo = + CreateImageInfo + { createImageInfoId = Nothing + , createImageInfoError = Nothing + , createImageInfoErrorDetail = Nothing + , createImageInfoStatus = Nothing + , createImageInfoProgress = Nothing + , createImageInfoProgressDetail = Nothing + } + +-- ** DeviceMapping +-- | DeviceMapping +-- A device mapping between the host and container +data DeviceMapping = DeviceMapping + { deviceMappingPathOnHost :: !(Maybe Text) -- ^ "PathOnHost" + , deviceMappingPathInContainer :: !(Maybe Text) -- ^ "PathInContainer" + , deviceMappingCgroupPermissions :: !(Maybe Text) -- ^ "CgroupPermissions" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON DeviceMapping +instance A.FromJSON DeviceMapping where + parseJSON = A.withObject "DeviceMapping" $ \o -> + DeviceMapping + <$> (o .:? "PathOnHost") + <*> (o .:? "PathInContainer") + <*> (o .:? "CgroupPermissions") + +-- | ToJSON DeviceMapping +instance A.ToJSON DeviceMapping where + toJSON DeviceMapping {..} = + _omitNulls + [ "PathOnHost" .= deviceMappingPathOnHost + , "PathInContainer" .= deviceMappingPathInContainer + , "CgroupPermissions" .= deviceMappingCgroupPermissions + ] + + +-- | Construct a value of type 'DeviceMapping' (by applying it's required fields, if any) +mkDeviceMapping + :: DeviceMapping +mkDeviceMapping = + DeviceMapping + { deviceMappingPathOnHost = Nothing + , deviceMappingPathInContainer = Nothing + , deviceMappingCgroupPermissions = Nothing + } + +-- ** DeviceRequest +-- | DeviceRequest +-- A request for devices to be sent to device drivers +data DeviceRequest = DeviceRequest + { deviceRequestDriver :: !(Maybe Text) -- ^ "Driver" + , deviceRequestCount :: !(Maybe Int) -- ^ "Count" + , deviceRequestDeviceIds :: !(Maybe [Text]) -- ^ "DeviceIDs" + , deviceRequestCapabilities :: !(Maybe [[Text]]) -- ^ "Capabilities" - A list of capabilities; an OR list of AND lists of capabilities. + , deviceRequestOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - Driver-specific options, specified as a key/value pairs. These options are passed directly to the driver. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON DeviceRequest +instance A.FromJSON DeviceRequest where + parseJSON = A.withObject "DeviceRequest" $ \o -> + DeviceRequest + <$> (o .:? "Driver") + <*> (o .:? "Count") + <*> (o .:? "DeviceIDs") + <*> (o .:? "Capabilities") + <*> (o .:? "Options") + +-- | ToJSON DeviceRequest +instance A.ToJSON DeviceRequest where + toJSON DeviceRequest {..} = + _omitNulls + [ "Driver" .= deviceRequestDriver + , "Count" .= deviceRequestCount + , "DeviceIDs" .= deviceRequestDeviceIds + , "Capabilities" .= deviceRequestCapabilities + , "Options" .= deviceRequestOptions + ] + + +-- | Construct a value of type 'DeviceRequest' (by applying it's required fields, if any) +mkDeviceRequest + :: DeviceRequest +mkDeviceRequest = + DeviceRequest + { deviceRequestDriver = Nothing + , deviceRequestCount = Nothing + , deviceRequestDeviceIds = Nothing + , deviceRequestCapabilities = Nothing + , deviceRequestOptions = Nothing + } + +-- ** DistributionInspect +-- | DistributionInspect +-- DistributionInspectResponse +-- +-- Describes the result obtained from contacting the registry to retrieve image metadata. +data DistributionInspect = DistributionInspect + { distributionInspectDescriptor :: !(OCIDescriptor) -- ^ /Required/ "Descriptor" + , distributionInspectPlatforms :: !([OCIPlatform]) -- ^ /Required/ "Platforms" - An array containing all platforms supported by the image. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON DistributionInspect +instance A.FromJSON DistributionInspect where + parseJSON = A.withObject "DistributionInspect" $ \o -> + DistributionInspect + <$> (o .: "Descriptor") + <*> (o .: "Platforms") + +-- | ToJSON DistributionInspect +instance A.ToJSON DistributionInspect where + toJSON DistributionInspect {..} = + _omitNulls + [ "Descriptor" .= distributionInspectDescriptor + , "Platforms" .= distributionInspectPlatforms + ] + + +-- | Construct a value of type 'DistributionInspect' (by applying it's required fields, if any) +mkDistributionInspect + :: OCIDescriptor -- ^ 'distributionInspectDescriptor' + -> [OCIPlatform] -- ^ 'distributionInspectPlatforms': An array containing all platforms supported by the image. + -> DistributionInspect +mkDistributionInspect distributionInspectDescriptor distributionInspectPlatforms = + DistributionInspect + { distributionInspectDescriptor + , distributionInspectPlatforms + } + +-- ** Driver +-- | Driver +-- Driver represents a driver (network, logging, secrets). +data Driver = Driver + { driverName :: !(Text) -- ^ /Required/ "Name" - Name of the driver. + , driverOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - Key/value map of driver-specific options. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Driver +instance A.FromJSON Driver where + parseJSON = A.withObject "Driver" $ \o -> + Driver + <$> (o .: "Name") + <*> (o .:? "Options") + +-- | ToJSON Driver +instance A.ToJSON Driver where + toJSON Driver {..} = + _omitNulls + [ "Name" .= driverName + , "Options" .= driverOptions + ] + + +-- | Construct a value of type 'Driver' (by applying it's required fields, if any) +mkDriver + :: Text -- ^ 'driverName': Name of the driver. + -> Driver +mkDriver driverName = + Driver + { driverName + , driverOptions = Nothing + } + +-- ** EndpointIPAMConfig +-- | EndpointIPAMConfig +-- EndpointIPAMConfig represents an endpoint's IPAM configuration. +data EndpointIPAMConfig = EndpointIPAMConfig + { endpointIPAMConfigIpv4Address :: !(Maybe Text) -- ^ "IPv4Address" + , endpointIPAMConfigIpv6Address :: !(Maybe Text) -- ^ "IPv6Address" + , endpointIPAMConfigLinkLocalIps :: !(Maybe [Text]) -- ^ "LinkLocalIPs" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EndpointIPAMConfig +instance A.FromJSON EndpointIPAMConfig where + parseJSON = A.withObject "EndpointIPAMConfig" $ \o -> + EndpointIPAMConfig + <$> (o .:? "IPv4Address") + <*> (o .:? "IPv6Address") + <*> (o .:? "LinkLocalIPs") + +-- | ToJSON EndpointIPAMConfig +instance A.ToJSON EndpointIPAMConfig where + toJSON EndpointIPAMConfig {..} = + _omitNulls + [ "IPv4Address" .= endpointIPAMConfigIpv4Address + , "IPv6Address" .= endpointIPAMConfigIpv6Address + , "LinkLocalIPs" .= endpointIPAMConfigLinkLocalIps + ] + + +-- | Construct a value of type 'EndpointIPAMConfig' (by applying it's required fields, if any) +mkEndpointIPAMConfig + :: EndpointIPAMConfig +mkEndpointIPAMConfig = + EndpointIPAMConfig + { endpointIPAMConfigIpv4Address = Nothing + , endpointIPAMConfigIpv6Address = Nothing + , endpointIPAMConfigLinkLocalIps = Nothing + } + +-- ** EndpointPortConfig +-- | EndpointPortConfig +data EndpointPortConfig = EndpointPortConfig + { endpointPortConfigName :: !(Maybe Text) -- ^ "Name" + , endpointPortConfigProtocol :: !(Maybe E'Type) -- ^ "Protocol" + , endpointPortConfigTargetPort :: !(Maybe Int) -- ^ "TargetPort" - The port inside the container. + , endpointPortConfigPublishedPort :: !(Maybe Int) -- ^ "PublishedPort" - The port on the swarm hosts. + , endpointPortConfigPublishMode :: !(Maybe E'PublishMode) -- ^ "PublishMode" - The mode in which port is published. <p><br /></p> - \"ingress\" makes the target port accessible on every node, regardless of whether there is a task for the service running on that node or not. - \"host\" bypasses the routing mesh and publish the port directly on the swarm node where that service is running. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EndpointPortConfig +instance A.FromJSON EndpointPortConfig where + parseJSON = A.withObject "EndpointPortConfig" $ \o -> + EndpointPortConfig + <$> (o .:? "Name") + <*> (o .:? "Protocol") + <*> (o .:? "TargetPort") + <*> (o .:? "PublishedPort") + <*> (o .:? "PublishMode") + +-- | ToJSON EndpointPortConfig +instance A.ToJSON EndpointPortConfig where + toJSON EndpointPortConfig {..} = + _omitNulls + [ "Name" .= endpointPortConfigName + , "Protocol" .= endpointPortConfigProtocol + , "TargetPort" .= endpointPortConfigTargetPort + , "PublishedPort" .= endpointPortConfigPublishedPort + , "PublishMode" .= endpointPortConfigPublishMode + ] + + +-- | Construct a value of type 'EndpointPortConfig' (by applying it's required fields, if any) +mkEndpointPortConfig + :: EndpointPortConfig +mkEndpointPortConfig = + EndpointPortConfig + { endpointPortConfigName = Nothing + , endpointPortConfigProtocol = Nothing + , endpointPortConfigTargetPort = Nothing + , endpointPortConfigPublishedPort = Nothing + , endpointPortConfigPublishMode = Nothing + } + +-- ** EndpointSettings +-- | EndpointSettings +-- Configuration for a network endpoint. +data EndpointSettings = EndpointSettings + { endpointSettingsIpamConfig :: !(Maybe EndpointIPAMConfig) -- ^ "IPAMConfig" + , endpointSettingsLinks :: !(Maybe [Text]) -- ^ "Links" + , endpointSettingsMacAddress :: !(Maybe Text) -- ^ "MacAddress" - MAC address for the endpoint on this network. The network driver might ignore this parameter. + , endpointSettingsAliases :: !(Maybe [Text]) -- ^ "Aliases" + , endpointSettingsDriverOpts :: !(Maybe (Map.Map String Text)) -- ^ "DriverOpts" - DriverOpts is a mapping of driver options and values. These options are passed directly to the driver and are driver specific. + , endpointSettingsNetworkId :: !(Maybe Text) -- ^ "NetworkID" - Unique ID of the network. + , endpointSettingsEndpointId :: !(Maybe Text) -- ^ "EndpointID" - Unique ID for the service endpoint in a Sandbox. + , endpointSettingsGateway :: !(Maybe Text) -- ^ "Gateway" - Gateway address for this network. + , endpointSettingsIpAddress :: !(Maybe Text) -- ^ "IPAddress" - IPv4 address. + , endpointSettingsIpPrefixLen :: !(Maybe Int) -- ^ "IPPrefixLen" - Mask length of the IPv4 address. + , endpointSettingsIpv6Gateway :: !(Maybe Text) -- ^ "IPv6Gateway" - IPv6 gateway address. + , endpointSettingsGlobalIpv6Address :: !(Maybe Text) -- ^ "GlobalIPv6Address" - Global IPv6 address. + , endpointSettingsGlobalIpv6PrefixLen :: !(Maybe Integer) -- ^ "GlobalIPv6PrefixLen" - Mask length of the global IPv6 address. + , endpointSettingsDnsNames :: !(Maybe [Text]) -- ^ "DNSNames" - List of all DNS names an endpoint has on a specific network. This list is based on the container name, network aliases, container short ID, and hostname. These DNS names are non-fully qualified but can contain several dots. You can get fully qualified DNS names by appending `.<network-name>`. For instance, if container name is `my.ctr` and the network is named `testnet`, `DNSNames` will contain `my.ctr` and the FQDN will be `my.ctr.testnet`. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EndpointSettings +instance A.FromJSON EndpointSettings where + parseJSON = A.withObject "EndpointSettings" $ \o -> + EndpointSettings + <$> (o .:? "IPAMConfig") + <*> (o .:? "Links") + <*> (o .:? "MacAddress") + <*> (o .:? "Aliases") + <*> (o .:? "DriverOpts") + <*> (o .:? "NetworkID") + <*> (o .:? "EndpointID") + <*> (o .:? "Gateway") + <*> (o .:? "IPAddress") + <*> (o .:? "IPPrefixLen") + <*> (o .:? "IPv6Gateway") + <*> (o .:? "GlobalIPv6Address") + <*> (o .:? "GlobalIPv6PrefixLen") + <*> (o .:? "DNSNames") + +-- | ToJSON EndpointSettings +instance A.ToJSON EndpointSettings where + toJSON EndpointSettings {..} = + _omitNulls + [ "IPAMConfig" .= endpointSettingsIpamConfig + , "Links" .= endpointSettingsLinks + , "MacAddress" .= endpointSettingsMacAddress + , "Aliases" .= endpointSettingsAliases + , "DriverOpts" .= endpointSettingsDriverOpts + , "NetworkID" .= endpointSettingsNetworkId + , "EndpointID" .= endpointSettingsEndpointId + , "Gateway" .= endpointSettingsGateway + , "IPAddress" .= endpointSettingsIpAddress + , "IPPrefixLen" .= endpointSettingsIpPrefixLen + , "IPv6Gateway" .= endpointSettingsIpv6Gateway + , "GlobalIPv6Address" .= endpointSettingsGlobalIpv6Address + , "GlobalIPv6PrefixLen" .= endpointSettingsGlobalIpv6PrefixLen + , "DNSNames" .= endpointSettingsDnsNames + ] + + +-- | Construct a value of type 'EndpointSettings' (by applying it's required fields, if any) +mkEndpointSettings + :: EndpointSettings +mkEndpointSettings = + EndpointSettings + { endpointSettingsIpamConfig = Nothing + , endpointSettingsLinks = Nothing + , endpointSettingsMacAddress = Nothing + , endpointSettingsAliases = Nothing + , endpointSettingsDriverOpts = Nothing + , endpointSettingsNetworkId = Nothing + , endpointSettingsEndpointId = Nothing + , endpointSettingsGateway = Nothing + , endpointSettingsIpAddress = Nothing + , endpointSettingsIpPrefixLen = Nothing + , endpointSettingsIpv6Gateway = Nothing + , endpointSettingsGlobalIpv6Address = Nothing + , endpointSettingsGlobalIpv6PrefixLen = Nothing + , endpointSettingsDnsNames = Nothing + } + +-- ** EndpointSpec +-- | EndpointSpec +-- Properties that can be configured to access and load balance a service. +data EndpointSpec = EndpointSpec + { endpointSpecMode :: !(Maybe E'Mode) -- ^ "Mode" - The mode of resolution to use for internal load balancing between tasks. + , endpointSpecPorts :: !(Maybe [EndpointPortConfig]) -- ^ "Ports" - List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EndpointSpec +instance A.FromJSON EndpointSpec where + parseJSON = A.withObject "EndpointSpec" $ \o -> + EndpointSpec + <$> (o .:? "Mode") + <*> (o .:? "Ports") + +-- | ToJSON EndpointSpec +instance A.ToJSON EndpointSpec where + toJSON EndpointSpec {..} = + _omitNulls + [ "Mode" .= endpointSpecMode + , "Ports" .= endpointSpecPorts + ] + + +-- | Construct a value of type 'EndpointSpec' (by applying it's required fields, if any) +mkEndpointSpec + :: EndpointSpec +mkEndpointSpec = + EndpointSpec + { endpointSpecMode = Nothing + , endpointSpecPorts = Nothing + } + +-- ** EngineDescription +-- | EngineDescription +-- EngineDescription provides information about an engine. +data EngineDescription = EngineDescription + { engineDescriptionEngineVersion :: !(Maybe Text) -- ^ "EngineVersion" + , engineDescriptionLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" + , engineDescriptionPlugins :: !(Maybe [EngineDescriptionPluginsInner]) -- ^ "Plugins" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EngineDescription +instance A.FromJSON EngineDescription where + parseJSON = A.withObject "EngineDescription" $ \o -> + EngineDescription + <$> (o .:? "EngineVersion") + <*> (o .:? "Labels") + <*> (o .:? "Plugins") + +-- | ToJSON EngineDescription +instance A.ToJSON EngineDescription where + toJSON EngineDescription {..} = + _omitNulls + [ "EngineVersion" .= engineDescriptionEngineVersion + , "Labels" .= engineDescriptionLabels + , "Plugins" .= engineDescriptionPlugins + ] + + +-- | Construct a value of type 'EngineDescription' (by applying it's required fields, if any) +mkEngineDescription + :: EngineDescription +mkEngineDescription = + EngineDescription + { engineDescriptionEngineVersion = Nothing + , engineDescriptionLabels = Nothing + , engineDescriptionPlugins = Nothing + } + +-- ** EngineDescriptionPluginsInner +-- | EngineDescriptionPluginsInner +data EngineDescriptionPluginsInner = EngineDescriptionPluginsInner + { engineDescriptionPluginsInnerType :: !(Maybe Text) -- ^ "Type" + , engineDescriptionPluginsInnerName :: !(Maybe Text) -- ^ "Name" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EngineDescriptionPluginsInner +instance A.FromJSON EngineDescriptionPluginsInner where + parseJSON = A.withObject "EngineDescriptionPluginsInner" $ \o -> + EngineDescriptionPluginsInner + <$> (o .:? "Type") + <*> (o .:? "Name") + +-- | ToJSON EngineDescriptionPluginsInner +instance A.ToJSON EngineDescriptionPluginsInner where + toJSON EngineDescriptionPluginsInner {..} = + _omitNulls + [ "Type" .= engineDescriptionPluginsInnerType + , "Name" .= engineDescriptionPluginsInnerName + ] + + +-- | Construct a value of type 'EngineDescriptionPluginsInner' (by applying it's required fields, if any) +mkEngineDescriptionPluginsInner + :: EngineDescriptionPluginsInner +mkEngineDescriptionPluginsInner = + EngineDescriptionPluginsInner + { engineDescriptionPluginsInnerType = Nothing + , engineDescriptionPluginsInnerName = Nothing + } + +-- ** ErrorDetail +-- | ErrorDetail +data ErrorDetail = ErrorDetail + { errorDetailCode :: !(Maybe Int) -- ^ "code" + , errorDetailMessage :: !(Maybe Text) -- ^ "message" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ErrorDetail +instance A.FromJSON ErrorDetail where + parseJSON = A.withObject "ErrorDetail" $ \o -> + ErrorDetail + <$> (o .:? "code") + <*> (o .:? "message") + +-- | ToJSON ErrorDetail +instance A.ToJSON ErrorDetail where + toJSON ErrorDetail {..} = + _omitNulls + [ "code" .= errorDetailCode + , "message" .= errorDetailMessage + ] + + +-- | Construct a value of type 'ErrorDetail' (by applying it's required fields, if any) +mkErrorDetail + :: ErrorDetail +mkErrorDetail = + ErrorDetail + { errorDetailCode = Nothing + , errorDetailMessage = Nothing + } + +-- ** ErrorResponse +-- | ErrorResponse +-- Represents an error. +data ErrorResponse = ErrorResponse + { errorResponseMessage :: !(Text) -- ^ /Required/ "message" - The error message. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ErrorResponse +instance A.FromJSON ErrorResponse where + parseJSON = A.withObject "ErrorResponse" $ \o -> + ErrorResponse + <$> (o .: "message") + +-- | ToJSON ErrorResponse +instance A.ToJSON ErrorResponse where + toJSON ErrorResponse {..} = + _omitNulls + [ "message" .= errorResponseMessage + ] + + +-- | Construct a value of type 'ErrorResponse' (by applying it's required fields, if any) +mkErrorResponse + :: Text -- ^ 'errorResponseMessage': The error message. + -> ErrorResponse +mkErrorResponse errorResponseMessage = + ErrorResponse + { errorResponseMessage + } + +-- ** EventActor +-- | EventActor +-- Actor describes something that generates events, like a container, network, or a volume. +data EventActor = EventActor + { eventActorId :: !(Maybe Text) -- ^ "ID" - The ID of the object emitting the event + , eventActorAttributes :: !(Maybe (Map.Map String Text)) -- ^ "Attributes" - Various key/value attributes of the object, depending on its type. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EventActor +instance A.FromJSON EventActor where + parseJSON = A.withObject "EventActor" $ \o -> + EventActor + <$> (o .:? "ID") + <*> (o .:? "Attributes") + +-- | ToJSON EventActor +instance A.ToJSON EventActor where + toJSON EventActor {..} = + _omitNulls + [ "ID" .= eventActorId + , "Attributes" .= eventActorAttributes + ] + + +-- | Construct a value of type 'EventActor' (by applying it's required fields, if any) +mkEventActor + :: EventActor +mkEventActor = + EventActor + { eventActorId = Nothing + , eventActorAttributes = Nothing + } + +-- ** EventMessage +-- | EventMessage +-- SystemEventsResponse +-- +-- EventMessage represents the information an event contains. +data EventMessage = EventMessage + { eventMessageType :: !(Maybe E'Type4) -- ^ "Type" - The type of object emitting the event + , eventMessageAction :: !(Maybe Text) -- ^ "Action" - The type of event + , eventMessageActor :: !(Maybe EventActor) -- ^ "Actor" + , eventMessageScope :: !(Maybe E'Scope2) -- ^ "scope" - Scope of the event. Engine events are `local` scope. Cluster (Swarm) events are `swarm` scope. + , eventMessageTime :: !(Maybe Integer) -- ^ "time" - Timestamp of event + , eventMessageTimeNano :: !(Maybe Integer) -- ^ "timeNano" - Timestamp of event, with nanosecond accuracy + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON EventMessage +instance A.FromJSON EventMessage where + parseJSON = A.withObject "EventMessage" $ \o -> + EventMessage + <$> (o .:? "Type") + <*> (o .:? "Action") + <*> (o .:? "Actor") + <*> (o .:? "scope") + <*> (o .:? "time") + <*> (o .:? "timeNano") + +-- | ToJSON EventMessage +instance A.ToJSON EventMessage where + toJSON EventMessage {..} = + _omitNulls + [ "Type" .= eventMessageType + , "Action" .= eventMessageAction + , "Actor" .= eventMessageActor + , "scope" .= eventMessageScope + , "time" .= eventMessageTime + , "timeNano" .= eventMessageTimeNano + ] + + +-- | Construct a value of type 'EventMessage' (by applying it's required fields, if any) +mkEventMessage + :: EventMessage +mkEventMessage = + EventMessage + { eventMessageType = Nothing + , eventMessageAction = Nothing + , eventMessageActor = Nothing + , eventMessageScope = Nothing + , eventMessageTime = Nothing + , eventMessageTimeNano = Nothing + } + +-- ** ExecConfig +-- | ExecConfig +-- ExecConfig +-- +data ExecConfig = ExecConfig + { execConfigAttachStdin :: !(Maybe Bool) -- ^ "AttachStdin" - Attach to `stdin` of the exec command. + , execConfigAttachStdout :: !(Maybe Bool) -- ^ "AttachStdout" - Attach to `stdout` of the exec command. + , execConfigAttachStderr :: !(Maybe Bool) -- ^ "AttachStderr" - Attach to `stderr` of the exec command. + , execConfigConsoleSize :: !(Maybe [Int]) -- ^ "ConsoleSize" - Initial console size, as an `[height, width]` array. + , execConfigDetachKeys :: !(Maybe Text) -- ^ "DetachKeys" - Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-<value>` where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + , execConfigTty :: !(Maybe Bool) -- ^ "Tty" - Allocate a pseudo-TTY. + , execConfigEnv :: !(Maybe [Text]) -- ^ "Env" - A list of environment variables in the form `[\"VAR=value\", ...]`. + , execConfigCmd :: !(Maybe [Text]) -- ^ "Cmd" - Command to run, as a string or array of strings. + , execConfigPrivileged :: !(Maybe Bool) -- ^ "Privileged" - Runs the exec process with extended privileges. + , execConfigUser :: !(Maybe Text) -- ^ "User" - The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`. + , execConfigWorkingDir :: !(Maybe Text) -- ^ "WorkingDir" - The working directory for the exec process inside the container. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ExecConfig +instance A.FromJSON ExecConfig where + parseJSON = A.withObject "ExecConfig" $ \o -> + ExecConfig + <$> (o .:? "AttachStdin") + <*> (o .:? "AttachStdout") + <*> (o .:? "AttachStderr") + <*> (o .:? "ConsoleSize") + <*> (o .:? "DetachKeys") + <*> (o .:? "Tty") + <*> (o .:? "Env") + <*> (o .:? "Cmd") + <*> (o .:? "Privileged") + <*> (o .:? "User") + <*> (o .:? "WorkingDir") + +-- | ToJSON ExecConfig +instance A.ToJSON ExecConfig where + toJSON ExecConfig {..} = + _omitNulls + [ "AttachStdin" .= execConfigAttachStdin + , "AttachStdout" .= execConfigAttachStdout + , "AttachStderr" .= execConfigAttachStderr + , "ConsoleSize" .= execConfigConsoleSize + , "DetachKeys" .= execConfigDetachKeys + , "Tty" .= execConfigTty + , "Env" .= execConfigEnv + , "Cmd" .= execConfigCmd + , "Privileged" .= execConfigPrivileged + , "User" .= execConfigUser + , "WorkingDir" .= execConfigWorkingDir + ] + + +-- | Construct a value of type 'ExecConfig' (by applying it's required fields, if any) +mkExecConfig + :: ExecConfig +mkExecConfig = + ExecConfig + { execConfigAttachStdin = Nothing + , execConfigAttachStdout = Nothing + , execConfigAttachStderr = Nothing + , execConfigConsoleSize = Nothing + , execConfigDetachKeys = Nothing + , execConfigTty = Nothing + , execConfigEnv = Nothing + , execConfigCmd = Nothing + , execConfigPrivileged = Nothing + , execConfigUser = Nothing + , execConfigWorkingDir = Nothing + } + +-- ** ExecInspectResponse +-- | ExecInspectResponse +-- ExecInspectResponse +-- +data ExecInspectResponse = ExecInspectResponse + { execInspectResponseCanRemove :: !(Maybe Bool) -- ^ "CanRemove" + , execInspectResponseDetachKeys :: !(Maybe Text) -- ^ "DetachKeys" + , execInspectResponseId :: !(Maybe Text) -- ^ "ID" + , execInspectResponseRunning :: !(Maybe Bool) -- ^ "Running" + , execInspectResponseExitCode :: !(Maybe Int) -- ^ "ExitCode" + , execInspectResponseProcessConfig :: !(Maybe ProcessConfig) -- ^ "ProcessConfig" + , execInspectResponseOpenStdin :: !(Maybe Bool) -- ^ "OpenStdin" + , execInspectResponseOpenStderr :: !(Maybe Bool) -- ^ "OpenStderr" + , execInspectResponseOpenStdout :: !(Maybe Bool) -- ^ "OpenStdout" + , execInspectResponseContainerId :: !(Maybe Text) -- ^ "ContainerID" + , execInspectResponsePid :: !(Maybe Int) -- ^ "Pid" - The system process ID for the exec process. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ExecInspectResponse +instance A.FromJSON ExecInspectResponse where + parseJSON = A.withObject "ExecInspectResponse" $ \o -> + ExecInspectResponse + <$> (o .:? "CanRemove") + <*> (o .:? "DetachKeys") + <*> (o .:? "ID") + <*> (o .:? "Running") + <*> (o .:? "ExitCode") + <*> (o .:? "ProcessConfig") + <*> (o .:? "OpenStdin") + <*> (o .:? "OpenStderr") + <*> (o .:? "OpenStdout") + <*> (o .:? "ContainerID") + <*> (o .:? "Pid") + +-- | ToJSON ExecInspectResponse +instance A.ToJSON ExecInspectResponse where + toJSON ExecInspectResponse {..} = + _omitNulls + [ "CanRemove" .= execInspectResponseCanRemove + , "DetachKeys" .= execInspectResponseDetachKeys + , "ID" .= execInspectResponseId + , "Running" .= execInspectResponseRunning + , "ExitCode" .= execInspectResponseExitCode + , "ProcessConfig" .= execInspectResponseProcessConfig + , "OpenStdin" .= execInspectResponseOpenStdin + , "OpenStderr" .= execInspectResponseOpenStderr + , "OpenStdout" .= execInspectResponseOpenStdout + , "ContainerID" .= execInspectResponseContainerId + , "Pid" .= execInspectResponsePid + ] + + +-- | Construct a value of type 'ExecInspectResponse' (by applying it's required fields, if any) +mkExecInspectResponse + :: ExecInspectResponse +mkExecInspectResponse = + ExecInspectResponse + { execInspectResponseCanRemove = Nothing + , execInspectResponseDetachKeys = Nothing + , execInspectResponseId = Nothing + , execInspectResponseRunning = Nothing + , execInspectResponseExitCode = Nothing + , execInspectResponseProcessConfig = Nothing + , execInspectResponseOpenStdin = Nothing + , execInspectResponseOpenStderr = Nothing + , execInspectResponseOpenStdout = Nothing + , execInspectResponseContainerId = Nothing + , execInspectResponsePid = Nothing + } + +-- ** ExecStartConfig +-- | ExecStartConfig +-- ExecStartConfig +-- +data ExecStartConfig = ExecStartConfig + { execStartConfigDetach :: !(Maybe Bool) -- ^ "Detach" - Detach from the command. + , execStartConfigTty :: !(Maybe Bool) -- ^ "Tty" - Allocate a pseudo-TTY. + , execStartConfigConsoleSize :: !(Maybe [Int]) -- ^ "ConsoleSize" - Initial console size, as an `[height, width]` array. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ExecStartConfig +instance A.FromJSON ExecStartConfig where + parseJSON = A.withObject "ExecStartConfig" $ \o -> + ExecStartConfig + <$> (o .:? "Detach") + <*> (o .:? "Tty") + <*> (o .:? "ConsoleSize") + +-- | ToJSON ExecStartConfig +instance A.ToJSON ExecStartConfig where + toJSON ExecStartConfig {..} = + _omitNulls + [ "Detach" .= execStartConfigDetach + , "Tty" .= execStartConfigTty + , "ConsoleSize" .= execStartConfigConsoleSize + ] + + +-- | Construct a value of type 'ExecStartConfig' (by applying it's required fields, if any) +mkExecStartConfig + :: ExecStartConfig +mkExecStartConfig = + ExecStartConfig + { execStartConfigDetach = Nothing + , execStartConfigTty = Nothing + , execStartConfigConsoleSize = Nothing + } + +-- ** FilesystemChange +-- | FilesystemChange +-- Change in the container's filesystem. +data FilesystemChange = FilesystemChange + { filesystemChangePath :: !(Text) -- ^ /Required/ "Path" - Path to file or directory that has changed. + , filesystemChangeKind :: !(ChangeType) -- ^ /Required/ "Kind" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON FilesystemChange +instance A.FromJSON FilesystemChange where + parseJSON = A.withObject "FilesystemChange" $ \o -> + FilesystemChange + <$> (o .: "Path") + <*> (o .: "Kind") + +-- | ToJSON FilesystemChange +instance A.ToJSON FilesystemChange where + toJSON FilesystemChange {..} = + _omitNulls + [ "Path" .= filesystemChangePath + , "Kind" .= filesystemChangeKind + ] + + +-- | Construct a value of type 'FilesystemChange' (by applying it's required fields, if any) +mkFilesystemChange + :: Text -- ^ 'filesystemChangePath': Path to file or directory that has changed. + -> ChangeType -- ^ 'filesystemChangeKind' + -> FilesystemChange +mkFilesystemChange filesystemChangePath filesystemChangeKind = + FilesystemChange + { filesystemChangePath + , filesystemChangeKind + } + +-- ** GenericResourcesInner +-- | GenericResourcesInner +data GenericResourcesInner = GenericResourcesInner + { genericResourcesInnerNamedResourceSpec :: !(Maybe GenericResourcesInnerNamedResourceSpec) -- ^ "NamedResourceSpec" + , genericResourcesInnerDiscreteResourceSpec :: !(Maybe GenericResourcesInnerDiscreteResourceSpec) -- ^ "DiscreteResourceSpec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON GenericResourcesInner +instance A.FromJSON GenericResourcesInner where + parseJSON = A.withObject "GenericResourcesInner" $ \o -> + GenericResourcesInner + <$> (o .:? "NamedResourceSpec") + <*> (o .:? "DiscreteResourceSpec") + +-- | ToJSON GenericResourcesInner +instance A.ToJSON GenericResourcesInner where + toJSON GenericResourcesInner {..} = + _omitNulls + [ "NamedResourceSpec" .= genericResourcesInnerNamedResourceSpec + , "DiscreteResourceSpec" .= genericResourcesInnerDiscreteResourceSpec + ] + + +-- | Construct a value of type 'GenericResourcesInner' (by applying it's required fields, if any) +mkGenericResourcesInner + :: GenericResourcesInner +mkGenericResourcesInner = + GenericResourcesInner + { genericResourcesInnerNamedResourceSpec = Nothing + , genericResourcesInnerDiscreteResourceSpec = Nothing + } + +-- ** GenericResourcesInnerDiscreteResourceSpec +-- | GenericResourcesInnerDiscreteResourceSpec +data GenericResourcesInnerDiscreteResourceSpec = GenericResourcesInnerDiscreteResourceSpec + { genericResourcesInnerDiscreteResourceSpecKind :: !(Maybe Text) -- ^ "Kind" + , genericResourcesInnerDiscreteResourceSpecValue :: !(Maybe Integer) -- ^ "Value" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON GenericResourcesInnerDiscreteResourceSpec +instance A.FromJSON GenericResourcesInnerDiscreteResourceSpec where + parseJSON = A.withObject "GenericResourcesInnerDiscreteResourceSpec" $ \o -> + GenericResourcesInnerDiscreteResourceSpec + <$> (o .:? "Kind") + <*> (o .:? "Value") + +-- | ToJSON GenericResourcesInnerDiscreteResourceSpec +instance A.ToJSON GenericResourcesInnerDiscreteResourceSpec where + toJSON GenericResourcesInnerDiscreteResourceSpec {..} = + _omitNulls + [ "Kind" .= genericResourcesInnerDiscreteResourceSpecKind + , "Value" .= genericResourcesInnerDiscreteResourceSpecValue + ] + + +-- | Construct a value of type 'GenericResourcesInnerDiscreteResourceSpec' (by applying it's required fields, if any) +mkGenericResourcesInnerDiscreteResourceSpec + :: GenericResourcesInnerDiscreteResourceSpec +mkGenericResourcesInnerDiscreteResourceSpec = + GenericResourcesInnerDiscreteResourceSpec + { genericResourcesInnerDiscreteResourceSpecKind = Nothing + , genericResourcesInnerDiscreteResourceSpecValue = Nothing + } + +-- ** GenericResourcesInnerNamedResourceSpec +-- | GenericResourcesInnerNamedResourceSpec +data GenericResourcesInnerNamedResourceSpec = GenericResourcesInnerNamedResourceSpec + { genericResourcesInnerNamedResourceSpecKind :: !(Maybe Text) -- ^ "Kind" + , genericResourcesInnerNamedResourceSpecValue :: !(Maybe Text) -- ^ "Value" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON GenericResourcesInnerNamedResourceSpec +instance A.FromJSON GenericResourcesInnerNamedResourceSpec where + parseJSON = A.withObject "GenericResourcesInnerNamedResourceSpec" $ \o -> + GenericResourcesInnerNamedResourceSpec + <$> (o .:? "Kind") + <*> (o .:? "Value") + +-- | ToJSON GenericResourcesInnerNamedResourceSpec +instance A.ToJSON GenericResourcesInnerNamedResourceSpec where + toJSON GenericResourcesInnerNamedResourceSpec {..} = + _omitNulls + [ "Kind" .= genericResourcesInnerNamedResourceSpecKind + , "Value" .= genericResourcesInnerNamedResourceSpecValue + ] + + +-- | Construct a value of type 'GenericResourcesInnerNamedResourceSpec' (by applying it's required fields, if any) +mkGenericResourcesInnerNamedResourceSpec + :: GenericResourcesInnerNamedResourceSpec +mkGenericResourcesInnerNamedResourceSpec = + GenericResourcesInnerNamedResourceSpec + { genericResourcesInnerNamedResourceSpecKind = Nothing + , genericResourcesInnerNamedResourceSpecValue = Nothing + } + +-- ** GraphDriverData +-- | GraphDriverData +-- Information about the storage driver used to store the container's and image's filesystem. +data GraphDriverData = GraphDriverData + { graphDriverDataName :: !(Text) -- ^ /Required/ "Name" - Name of the storage driver. + , graphDriverDataData :: !((Map.Map String Text)) -- ^ /Required/ "Data" - Low-level storage metadata, provided as key/value pairs. This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON GraphDriverData +instance A.FromJSON GraphDriverData where + parseJSON = A.withObject "GraphDriverData" $ \o -> + GraphDriverData + <$> (o .: "Name") + <*> (o .: "Data") + +-- | ToJSON GraphDriverData +instance A.ToJSON GraphDriverData where + toJSON GraphDriverData {..} = + _omitNulls + [ "Name" .= graphDriverDataName + , "Data" .= graphDriverDataData + ] + + +-- | Construct a value of type 'GraphDriverData' (by applying it's required fields, if any) +mkGraphDriverData + :: Text -- ^ 'graphDriverDataName': Name of the storage driver. + -> (Map.Map String Text) -- ^ 'graphDriverDataData': Low-level storage metadata, provided as key/value pairs. This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only. + -> GraphDriverData +mkGraphDriverData graphDriverDataName graphDriverDataData = + GraphDriverData + { graphDriverDataName + , graphDriverDataData + } + +-- ** Health +-- | Health +-- Health stores information about the container's healthcheck results. +data Health = Health + { healthStatus :: !(Maybe E'Status) -- ^ "Status" - Status is one of `none`, `starting`, `healthy` or `unhealthy` - \"none\" Indicates there is no healthcheck - \"starting\" Starting indicates that the container is not yet ready - \"healthy\" Healthy indicates that the container is running correctly - \"unhealthy\" Unhealthy indicates that the container has a problem + , healthFailingStreak :: !(Maybe Int) -- ^ "FailingStreak" - FailingStreak is the number of consecutive failures + , healthLog :: !(Maybe [HealthcheckResult]) -- ^ "Log" - Log contains the last few results (oldest first) + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Health +instance A.FromJSON Health where + parseJSON = A.withObject "Health" $ \o -> + Health + <$> (o .:? "Status") + <*> (o .:? "FailingStreak") + <*> (o .:? "Log") + +-- | ToJSON Health +instance A.ToJSON Health where + toJSON Health {..} = + _omitNulls + [ "Status" .= healthStatus + , "FailingStreak" .= healthFailingStreak + , "Log" .= healthLog + ] + + +-- | Construct a value of type 'Health' (by applying it's required fields, if any) +mkHealth + :: Health +mkHealth = + Health + { healthStatus = Nothing + , healthFailingStreak = Nothing + , healthLog = Nothing + } + +-- ** HealthConfig +-- | HealthConfig +-- A test to perform to check that the container is healthy. +data HealthConfig = HealthConfig + { healthConfigTest :: !(Maybe [Text]) -- ^ "Test" - The test to perform. Possible values are: - `[]` inherit healthcheck from image or parent image - `[\"NONE\"]` disable healthcheck - `[\"CMD\", args...]` exec arguments directly - `[\"CMD-SHELL\", command]` run command with system's default shell + , healthConfigInterval :: !(Maybe Integer) -- ^ "Interval" - The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit. + , healthConfigTimeout :: !(Maybe Integer) -- ^ "Timeout" - The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). 0 means inherit. + , healthConfigRetries :: !(Maybe Int) -- ^ "Retries" - The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit. + , healthConfigStartPeriod :: !(Maybe Integer) -- ^ "StartPeriod" - Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit. + , healthConfigStartInterval :: !(Maybe Integer) -- ^ "StartInterval" - The time to wait between checks in nanoseconds during the start period. It should be 0 or at least 1000000 (1 ms). 0 means inherit. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON HealthConfig +instance A.FromJSON HealthConfig where + parseJSON = A.withObject "HealthConfig" $ \o -> + HealthConfig + <$> (o .:? "Test") + <*> (o .:? "Interval") + <*> (o .:? "Timeout") + <*> (o .:? "Retries") + <*> (o .:? "StartPeriod") + <*> (o .:? "StartInterval") + +-- | ToJSON HealthConfig +instance A.ToJSON HealthConfig where + toJSON HealthConfig {..} = + _omitNulls + [ "Test" .= healthConfigTest + , "Interval" .= healthConfigInterval + , "Timeout" .= healthConfigTimeout + , "Retries" .= healthConfigRetries + , "StartPeriod" .= healthConfigStartPeriod + , "StartInterval" .= healthConfigStartInterval + ] + + +-- | Construct a value of type 'HealthConfig' (by applying it's required fields, if any) +mkHealthConfig + :: HealthConfig +mkHealthConfig = + HealthConfig + { healthConfigTest = Nothing + , healthConfigInterval = Nothing + , healthConfigTimeout = Nothing + , healthConfigRetries = Nothing + , healthConfigStartPeriod = Nothing + , healthConfigStartInterval = Nothing + } + +-- ** HealthcheckResult +-- | HealthcheckResult +-- HealthcheckResult stores information about a single run of a healthcheck probe +data HealthcheckResult = HealthcheckResult + { healthcheckResultStart :: !(Maybe DateTime) -- ^ "Start" - Date and time at which this check started in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , healthcheckResultEnd :: !(Maybe Text) -- ^ "End" - Date and time at which this check ended in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , healthcheckResultExitCode :: !(Maybe Int) -- ^ "ExitCode" - ExitCode meanings: - `0` healthy - `1` unhealthy - `2` reserved (considered unhealthy) - other values: error running probe + , healthcheckResultOutput :: !(Maybe Text) -- ^ "Output" - Output from last check + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON HealthcheckResult +instance A.FromJSON HealthcheckResult where + parseJSON = A.withObject "HealthcheckResult" $ \o -> + HealthcheckResult + <$> (o .:? "Start") + <*> (o .:? "End") + <*> (o .:? "ExitCode") + <*> (o .:? "Output") + +-- | ToJSON HealthcheckResult +instance A.ToJSON HealthcheckResult where + toJSON HealthcheckResult {..} = + _omitNulls + [ "Start" .= healthcheckResultStart + , "End" .= healthcheckResultEnd + , "ExitCode" .= healthcheckResultExitCode + , "Output" .= healthcheckResultOutput + ] + + +-- | Construct a value of type 'HealthcheckResult' (by applying it's required fields, if any) +mkHealthcheckResult + :: HealthcheckResult +mkHealthcheckResult = + HealthcheckResult + { healthcheckResultStart = Nothing + , healthcheckResultEnd = Nothing + , healthcheckResultExitCode = Nothing + , healthcheckResultOutput = Nothing + } + +-- ** HistoryResponseItem +-- | HistoryResponseItem +-- HistoryResponseItem +-- +-- individual image layer information in response to ImageHistory operation +data HistoryResponseItem = HistoryResponseItem + { historyResponseItemId :: !(Text) -- ^ /Required/ "Id" + , historyResponseItemCreated :: !(Integer) -- ^ /Required/ "Created" + , historyResponseItemCreatedBy :: !(Text) -- ^ /Required/ "CreatedBy" + , historyResponseItemTags :: !([Text]) -- ^ /Required/ "Tags" + , historyResponseItemSize :: !(Integer) -- ^ /Required/ "Size" + , historyResponseItemComment :: !(Text) -- ^ /Required/ "Comment" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON HistoryResponseItem +instance A.FromJSON HistoryResponseItem where + parseJSON = A.withObject "HistoryResponseItem" $ \o -> + HistoryResponseItem + <$> (o .: "Id") + <*> (o .: "Created") + <*> (o .: "CreatedBy") + <*> (o .: "Tags") + <*> (o .: "Size") + <*> (o .: "Comment") + +-- | ToJSON HistoryResponseItem +instance A.ToJSON HistoryResponseItem where + toJSON HistoryResponseItem {..} = + _omitNulls + [ "Id" .= historyResponseItemId + , "Created" .= historyResponseItemCreated + , "CreatedBy" .= historyResponseItemCreatedBy + , "Tags" .= historyResponseItemTags + , "Size" .= historyResponseItemSize + , "Comment" .= historyResponseItemComment + ] + + +-- | Construct a value of type 'HistoryResponseItem' (by applying it's required fields, if any) +mkHistoryResponseItem + :: Text -- ^ 'historyResponseItemId' + -> Integer -- ^ 'historyResponseItemCreated' + -> Text -- ^ 'historyResponseItemCreatedBy' + -> [Text] -- ^ 'historyResponseItemTags' + -> Integer -- ^ 'historyResponseItemSize' + -> Text -- ^ 'historyResponseItemComment' + -> HistoryResponseItem +mkHistoryResponseItem historyResponseItemId historyResponseItemCreated historyResponseItemCreatedBy historyResponseItemTags historyResponseItemSize historyResponseItemComment = + HistoryResponseItem + { historyResponseItemId + , historyResponseItemCreated + , historyResponseItemCreatedBy + , historyResponseItemTags + , historyResponseItemSize + , historyResponseItemComment + } + +-- ** HostConfig +-- | HostConfig +-- Container configuration that depends on the host we are running on +data HostConfig = HostConfig + { hostConfigCpuShares :: !(Maybe Int) -- ^ "CpuShares" - An integer value representing this container's relative CPU weight versus other containers. + , hostConfigMemory :: !(Maybe Integer) -- ^ "Memory" - Memory limit in bytes. + , hostConfigCgroupParent :: !(Maybe Text) -- ^ "CgroupParent" - Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + , hostConfigBlkioWeight :: !(Maybe Int) -- ^ "BlkioWeight" - Block IO weight (relative weight). + , hostConfigBlkioWeightDevice :: !(Maybe [ResourcesBlkioWeightDeviceInner]) -- ^ "BlkioWeightDevice" - Block IO weight (relative device weight) in the form: ``` [{\"Path\": \"device_path\", \"Weight\": weight}] ``` + , hostConfigBlkioDeviceReadBps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceReadBps" - Limit read rate (bytes per second) from a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , hostConfigBlkioDeviceWriteBps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceWriteBps" - Limit write rate (bytes per second) to a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , hostConfigBlkioDeviceReadIOps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceReadIOps" - Limit read rate (IO per second) from a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , hostConfigBlkioDeviceWriteIOps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceWriteIOps" - Limit write rate (IO per second) to a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , hostConfigCpuPeriod :: !(Maybe Integer) -- ^ "CpuPeriod" - The length of a CPU period in microseconds. + , hostConfigCpuQuota :: !(Maybe Integer) -- ^ "CpuQuota" - Microseconds of CPU time that the container can get in a CPU period. + , hostConfigCpuRealtimePeriod :: !(Maybe Integer) -- ^ "CpuRealtimePeriod" - The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + , hostConfigCpuRealtimeRuntime :: !(Maybe Integer) -- ^ "CpuRealtimeRuntime" - The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + , hostConfigCpusetCpus :: !(Maybe Text) -- ^ "CpusetCpus" - CPUs in which to allow execution (e.g., `0-3`, `0,1`). + , hostConfigCpusetMems :: !(Maybe Text) -- ^ "CpusetMems" - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + , hostConfigDevices :: !(Maybe [DeviceMapping]) -- ^ "Devices" - A list of devices to add to the container. + , hostConfigDeviceCgroupRules :: !(Maybe [Text]) -- ^ "DeviceCgroupRules" - a list of cgroup rules to apply to the container + , hostConfigDeviceRequests :: !(Maybe [DeviceRequest]) -- ^ "DeviceRequests" - A list of requests for devices to be sent to device drivers. + , hostConfigKernelMemoryTcp :: !(Maybe Integer) -- ^ "KernelMemoryTCP" - Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. + , hostConfigMemoryReservation :: !(Maybe Integer) -- ^ "MemoryReservation" - Memory soft limit in bytes. + , hostConfigMemorySwap :: !(Maybe Integer) -- ^ "MemorySwap" - Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + , hostConfigMemorySwappiness :: !(Maybe Integer) -- ^ "MemorySwappiness" - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + , hostConfigNanoCpus :: !(Maybe Integer) -- ^ "NanoCpus" - CPU quota in units of 10<sup>-9</sup> CPUs. + , hostConfigOomKillDisable :: !(Maybe Bool) -- ^ "OomKillDisable" - Disable OOM Killer for the container. + , hostConfigInit :: !(Maybe Bool) -- ^ "Init" - Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + , hostConfigPidsLimit :: !(Maybe Integer) -- ^ "PidsLimit" - Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not change. + , hostConfigUlimits :: !(Maybe [ResourcesUlimitsInner]) -- ^ "Ulimits" - A list of resource limits to set in the container. For example: ``` {\"Name\": \"nofile\", \"Soft\": 1024, \"Hard\": 2048} ``` + , hostConfigCpuCount :: !(Maybe Integer) -- ^ "CpuCount" - The number of usable CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + , hostConfigCpuPercent :: !(Maybe Integer) -- ^ "CpuPercent" - The usable percentage of the available CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + , hostConfigIoMaximumIOps :: !(Maybe Integer) -- ^ "IOMaximumIOps" - Maximum IOps for the container system drive (Windows only) + , hostConfigIoMaximumBandwidth :: !(Maybe Integer) -- ^ "IOMaximumBandwidth" - Maximum IO in bytes per second for the container system drive (Windows only). + , hostConfigBinds :: !(Maybe [Text]) -- ^ "Binds" - A list of volume bindings for this container. Each volume binding is a string in one of these forms: - `host-src:container-dest[:options]` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - `volume-name:container-dest[:options]` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. `options` is an optional, comma-delimited list of: - `nocopy` disables automatic copying of data from the container path to the volume. The `nocopy` flag only applies to named volumes. - `[ro|rw]` mounts a volume read-only or read-write, respectively. If omitted or set to `rw`, volumes are mounted read-write. - `[z|Z]` applies SELinux labels to allow or deny multiple containers to read and write to the same volume. - `z`: a _shared_ content label is applied to the content. This label indicates that multiple containers can share the volume content, for both reading and writing. - `Z`: a _private unshared_ label is applied to the content. This label indicates that only the current container can use a private volume. Labeling systems such as SELinux require proper labels to be placed on volume content that is mounted into a container. Without a label, the security system can prevent a container's processes from using the content. By default, the labels set by the host operating system are not modified. - `[[r]shared|[r]slave|[r]private]` specifies mount [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). This only applies to bind-mounted volumes, not internal volumes or named volumes. Mount propagation requires the source mount point (the location where the source directory is mounted in the host operating system) to have the correct propagation properties. For shared volumes, the source mount point must be set to `shared`. For slave volumes, the mount must be set to either `shared` or `slave`. + , hostConfigContainerIdFile :: !(Maybe Text) -- ^ "ContainerIDFile" - Path to a file where the container ID is written + , hostConfigLogConfig :: !(Maybe HostConfigAllOfLogConfig) -- ^ "LogConfig" + , hostConfigNetworkMode :: !(Maybe Text) -- ^ "NetworkMode" - Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken as a custom network's name to which this container should connect to. + , hostConfigPortBindings :: !(Maybe (Map.Map String [PortBinding])) -- ^ "PortBindings" - PortMap describes the mapping of container ports to host ports, using the container's port-number and protocol as key in the format `<port>/<protocol>`, for example, `80/udp`. If a container's port is mapped for multiple protocols, separate entries are added to the mapping table. + , hostConfigRestartPolicy :: !(Maybe RestartPolicy) -- ^ "RestartPolicy" + , hostConfigAutoRemove :: !(Maybe Bool) -- ^ "AutoRemove" - Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set. + , hostConfigVolumeDriver :: !(Maybe Text) -- ^ "VolumeDriver" - Driver that this container uses to mount volumes. + , hostConfigVolumesFrom :: !(Maybe [Text]) -- ^ "VolumesFrom" - A list of volumes to inherit from another container, specified in the form `<container name>[:<ro|rw>]`. + , hostConfigMounts :: !(Maybe [Mount]) -- ^ "Mounts" - Specification for mounts to be added to the container. + , hostConfigConsoleSize :: !(Maybe [Int]) -- ^ "ConsoleSize" - Initial console size, as an `[height, width]` array. + , hostConfigAnnotations :: !(Maybe (Map.Map String Text)) -- ^ "Annotations" - Arbitrary non-identifying metadata attached to container and provided to the runtime when the container is started. + , hostConfigCapAdd :: !(Maybe [Text]) -- ^ "CapAdd" - A list of kernel capabilities to add to the container. Conflicts with option 'Capabilities'. + , hostConfigCapDrop :: !(Maybe [Text]) -- ^ "CapDrop" - A list of kernel capabilities to drop from the container. Conflicts with option 'Capabilities'. + , hostConfigCgroupnsMode :: !(Maybe E'CgroupnsMode) -- ^ "CgroupnsMode" - cgroup namespace mode for the container. Possible values are: - `\"private\"`: the container runs in its own private cgroup namespace - `\"host\"`: use the host system's cgroup namespace If not specified, the daemon default is used, which can either be `\"private\"` or `\"host\"`, depending on daemon version, kernel support and configuration. + , hostConfigDns :: !(Maybe [Text]) -- ^ "Dns" - A list of DNS servers for the container to use. + , hostConfigDnsOptions :: !(Maybe [Text]) -- ^ "DnsOptions" - A list of DNS options. + , hostConfigDnsSearch :: !(Maybe [Text]) -- ^ "DnsSearch" - A list of DNS search domains. + , hostConfigExtraHosts :: !(Maybe [Text]) -- ^ "ExtraHosts" - A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `[\"hostname:IP\"]`. + , hostConfigGroupAdd :: !(Maybe [Text]) -- ^ "GroupAdd" - A list of additional groups that the container process will run as. + , hostConfigIpcMode :: !(Maybe Text) -- ^ "IpcMode" - IPC sharing mode for the container. Possible values are: - `\"none\"`: own private IPC namespace, with /dev/shm not mounted - `\"private\"`: own private IPC namespace - `\"shareable\"`: own private IPC namespace, with a possibility to share it with other containers - `\"container:<name|id>\"`: join another (shareable) container's IPC namespace - `\"host\"`: use the host system's IPC namespace If not specified, daemon default is used, which can either be `\"private\"` or `\"shareable\"`, depending on daemon version and configuration. + , hostConfigCgroup :: !(Maybe Text) -- ^ "Cgroup" - Cgroup to use for the container. + , hostConfigLinks :: !(Maybe [Text]) -- ^ "Links" - A list of links for the container in the form `container_name:alias`. + , hostConfigOomScoreAdj :: !(Maybe Int) -- ^ "OomScoreAdj" - An integer value containing the score given to the container in order to tune OOM killer preferences. + , hostConfigPidMode :: !(Maybe Text) -- ^ "PidMode" - Set the PID (Process) Namespace mode for the container. It can be either: - `\"container:<name|id>\"`: joins another container's PID namespace - `\"host\"`: use the host's PID namespace inside the container + , hostConfigPrivileged :: !(Maybe Bool) -- ^ "Privileged" - Gives the container full access to the host. + , hostConfigPublishAllPorts :: !(Maybe Bool) -- ^ "PublishAllPorts" - Allocates an ephemeral host port for all of a container's exposed ports. Ports are de-allocated when the container stops and allocated when the container starts. The allocated port might be changed when restarting the container. The port is selected from the ephemeral port range that depends on the kernel. For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`. + , hostConfigReadonlyRootfs :: !(Maybe Bool) -- ^ "ReadonlyRootfs" - Mount the container's root filesystem as read only. + , hostConfigSecurityOpt :: !(Maybe [Text]) -- ^ "SecurityOpt" - A list of string values to customize labels for MLS systems, such as SELinux. + , hostConfigStorageOpt :: !(Maybe (Map.Map String Text)) -- ^ "StorageOpt" - Storage driver options for this container, in the form `{\"size\": \"120G\"}`. + , hostConfigTmpfs :: !(Maybe (Map.Map String Text)) -- ^ "Tmpfs" - A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: ``` { \"/run\": \"rw,noexec,nosuid,size=65536k\" } ``` + , hostConfigUtsMode :: !(Maybe Text) -- ^ "UTSMode" - UTS namespace to use for the container. + , hostConfigUsernsMode :: !(Maybe Text) -- ^ "UsernsMode" - Sets the usernamespace mode for the container when usernamespace remapping option is enabled. + , hostConfigShmSize :: !(Maybe Integer) -- ^ "ShmSize" - Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. + , hostConfigSysctls :: !(Maybe (Map.Map String Text)) -- ^ "Sysctls" - A list of kernel parameters (sysctls) to set in the container. For example: ``` {\"net.ipv4.ip_forward\": \"1\"} ``` + , hostConfigRuntime :: !(Maybe Text) -- ^ "Runtime" - Runtime to use with this container. + , hostConfigIsolation :: !(Maybe E'Isolation) -- ^ "Isolation" - Isolation technology of the container. (Windows only) + , hostConfigMaskedPaths :: !(Maybe [Text]) -- ^ "MaskedPaths" - The list of paths to be masked inside the container (this overrides the default set of paths). + , hostConfigReadonlyPaths :: !(Maybe [Text]) -- ^ "ReadonlyPaths" - The list of paths to be set as read-only inside the container (this overrides the default set of paths). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON HostConfig +instance A.FromJSON HostConfig where + parseJSON = A.withObject "HostConfig" $ \o -> + HostConfig + <$> (o .:? "CpuShares") + <*> (o .:? "Memory") + <*> (o .:? "CgroupParent") + <*> (o .:? "BlkioWeight") + <*> (o .:? "BlkioWeightDevice") + <*> (o .:? "BlkioDeviceReadBps") + <*> (o .:? "BlkioDeviceWriteBps") + <*> (o .:? "BlkioDeviceReadIOps") + <*> (o .:? "BlkioDeviceWriteIOps") + <*> (o .:? "CpuPeriod") + <*> (o .:? "CpuQuota") + <*> (o .:? "CpuRealtimePeriod") + <*> (o .:? "CpuRealtimeRuntime") + <*> (o .:? "CpusetCpus") + <*> (o .:? "CpusetMems") + <*> (o .:? "Devices") + <*> (o .:? "DeviceCgroupRules") + <*> (o .:? "DeviceRequests") + <*> (o .:? "KernelMemoryTCP") + <*> (o .:? "MemoryReservation") + <*> (o .:? "MemorySwap") + <*> (o .:? "MemorySwappiness") + <*> (o .:? "NanoCpus") + <*> (o .:? "OomKillDisable") + <*> (o .:? "Init") + <*> (o .:? "PidsLimit") + <*> (o .:? "Ulimits") + <*> (o .:? "CpuCount") + <*> (o .:? "CpuPercent") + <*> (o .:? "IOMaximumIOps") + <*> (o .:? "IOMaximumBandwidth") + <*> (o .:? "Binds") + <*> (o .:? "ContainerIDFile") + <*> (o .:? "LogConfig") + <*> (o .:? "NetworkMode") + <*> (o .:? "PortBindings") + <*> (o .:? "RestartPolicy") + <*> (o .:? "AutoRemove") + <*> (o .:? "VolumeDriver") + <*> (o .:? "VolumesFrom") + <*> (o .:? "Mounts") + <*> (o .:? "ConsoleSize") + <*> (o .:? "Annotations") + <*> (o .:? "CapAdd") + <*> (o .:? "CapDrop") + <*> (o .:? "CgroupnsMode") + <*> (o .:? "Dns") + <*> (o .:? "DnsOptions") + <*> (o .:? "DnsSearch") + <*> (o .:? "ExtraHosts") + <*> (o .:? "GroupAdd") + <*> (o .:? "IpcMode") + <*> (o .:? "Cgroup") + <*> (o .:? "Links") + <*> (o .:? "OomScoreAdj") + <*> (o .:? "PidMode") + <*> (o .:? "Privileged") + <*> (o .:? "PublishAllPorts") + <*> (o .:? "ReadonlyRootfs") + <*> (o .:? "SecurityOpt") + <*> (o .:? "StorageOpt") + <*> (o .:? "Tmpfs") + <*> (o .:? "UTSMode") + <*> (o .:? "UsernsMode") + <*> (o .:? "ShmSize") + <*> (o .:? "Sysctls") + <*> (o .:? "Runtime") + <*> (o .:? "Isolation") + <*> (o .:? "MaskedPaths") + <*> (o .:? "ReadonlyPaths") + +-- | ToJSON HostConfig +instance A.ToJSON HostConfig where + toJSON HostConfig {..} = + _omitNulls + [ "CpuShares" .= hostConfigCpuShares + , "Memory" .= hostConfigMemory + , "CgroupParent" .= hostConfigCgroupParent + , "BlkioWeight" .= hostConfigBlkioWeight + , "BlkioWeightDevice" .= hostConfigBlkioWeightDevice + , "BlkioDeviceReadBps" .= hostConfigBlkioDeviceReadBps + , "BlkioDeviceWriteBps" .= hostConfigBlkioDeviceWriteBps + , "BlkioDeviceReadIOps" .= hostConfigBlkioDeviceReadIOps + , "BlkioDeviceWriteIOps" .= hostConfigBlkioDeviceWriteIOps + , "CpuPeriod" .= hostConfigCpuPeriod + , "CpuQuota" .= hostConfigCpuQuota + , "CpuRealtimePeriod" .= hostConfigCpuRealtimePeriod + , "CpuRealtimeRuntime" .= hostConfigCpuRealtimeRuntime + , "CpusetCpus" .= hostConfigCpusetCpus + , "CpusetMems" .= hostConfigCpusetMems + , "Devices" .= hostConfigDevices + , "DeviceCgroupRules" .= hostConfigDeviceCgroupRules + , "DeviceRequests" .= hostConfigDeviceRequests + , "KernelMemoryTCP" .= hostConfigKernelMemoryTcp + , "MemoryReservation" .= hostConfigMemoryReservation + , "MemorySwap" .= hostConfigMemorySwap + , "MemorySwappiness" .= hostConfigMemorySwappiness + , "NanoCpus" .= hostConfigNanoCpus + , "OomKillDisable" .= hostConfigOomKillDisable + , "Init" .= hostConfigInit + , "PidsLimit" .= hostConfigPidsLimit + , "Ulimits" .= hostConfigUlimits + , "CpuCount" .= hostConfigCpuCount + , "CpuPercent" .= hostConfigCpuPercent + , "IOMaximumIOps" .= hostConfigIoMaximumIOps + , "IOMaximumBandwidth" .= hostConfigIoMaximumBandwidth + , "Binds" .= hostConfigBinds + , "ContainerIDFile" .= hostConfigContainerIdFile + , "LogConfig" .= hostConfigLogConfig + , "NetworkMode" .= hostConfigNetworkMode + , "PortBindings" .= hostConfigPortBindings + , "RestartPolicy" .= hostConfigRestartPolicy + , "AutoRemove" .= hostConfigAutoRemove + , "VolumeDriver" .= hostConfigVolumeDriver + , "VolumesFrom" .= hostConfigVolumesFrom + , "Mounts" .= hostConfigMounts + , "ConsoleSize" .= hostConfigConsoleSize + , "Annotations" .= hostConfigAnnotations + , "CapAdd" .= hostConfigCapAdd + , "CapDrop" .= hostConfigCapDrop + , "CgroupnsMode" .= hostConfigCgroupnsMode + , "Dns" .= hostConfigDns + , "DnsOptions" .= hostConfigDnsOptions + , "DnsSearch" .= hostConfigDnsSearch + , "ExtraHosts" .= hostConfigExtraHosts + , "GroupAdd" .= hostConfigGroupAdd + , "IpcMode" .= hostConfigIpcMode + , "Cgroup" .= hostConfigCgroup + , "Links" .= hostConfigLinks + , "OomScoreAdj" .= hostConfigOomScoreAdj + , "PidMode" .= hostConfigPidMode + , "Privileged" .= hostConfigPrivileged + , "PublishAllPorts" .= hostConfigPublishAllPorts + , "ReadonlyRootfs" .= hostConfigReadonlyRootfs + , "SecurityOpt" .= hostConfigSecurityOpt + , "StorageOpt" .= hostConfigStorageOpt + , "Tmpfs" .= hostConfigTmpfs + , "UTSMode" .= hostConfigUtsMode + , "UsernsMode" .= hostConfigUsernsMode + , "ShmSize" .= hostConfigShmSize + , "Sysctls" .= hostConfigSysctls + , "Runtime" .= hostConfigRuntime + , "Isolation" .= hostConfigIsolation + , "MaskedPaths" .= hostConfigMaskedPaths + , "ReadonlyPaths" .= hostConfigReadonlyPaths + ] + + +-- | Construct a value of type 'HostConfig' (by applying it's required fields, if any) +mkHostConfig + :: HostConfig +mkHostConfig = + HostConfig + { hostConfigCpuShares = Nothing + , hostConfigMemory = Nothing + , hostConfigCgroupParent = Nothing + , hostConfigBlkioWeight = Nothing + , hostConfigBlkioWeightDevice = Nothing + , hostConfigBlkioDeviceReadBps = Nothing + , hostConfigBlkioDeviceWriteBps = Nothing + , hostConfigBlkioDeviceReadIOps = Nothing + , hostConfigBlkioDeviceWriteIOps = Nothing + , hostConfigCpuPeriod = Nothing + , hostConfigCpuQuota = Nothing + , hostConfigCpuRealtimePeriod = Nothing + , hostConfigCpuRealtimeRuntime = Nothing + , hostConfigCpusetCpus = Nothing + , hostConfigCpusetMems = Nothing + , hostConfigDevices = Nothing + , hostConfigDeviceCgroupRules = Nothing + , hostConfigDeviceRequests = Nothing + , hostConfigKernelMemoryTcp = Nothing + , hostConfigMemoryReservation = Nothing + , hostConfigMemorySwap = Nothing + , hostConfigMemorySwappiness = Nothing + , hostConfigNanoCpus = Nothing + , hostConfigOomKillDisable = Nothing + , hostConfigInit = Nothing + , hostConfigPidsLimit = Nothing + , hostConfigUlimits = Nothing + , hostConfigCpuCount = Nothing + , hostConfigCpuPercent = Nothing + , hostConfigIoMaximumIOps = Nothing + , hostConfigIoMaximumBandwidth = Nothing + , hostConfigBinds = Nothing + , hostConfigContainerIdFile = Nothing + , hostConfigLogConfig = Nothing + , hostConfigNetworkMode = Nothing + , hostConfigPortBindings = Nothing + , hostConfigRestartPolicy = Nothing + , hostConfigAutoRemove = Nothing + , hostConfigVolumeDriver = Nothing + , hostConfigVolumesFrom = Nothing + , hostConfigMounts = Nothing + , hostConfigConsoleSize = Nothing + , hostConfigAnnotations = Nothing + , hostConfigCapAdd = Nothing + , hostConfigCapDrop = Nothing + , hostConfigCgroupnsMode = Nothing + , hostConfigDns = Nothing + , hostConfigDnsOptions = Nothing + , hostConfigDnsSearch = Nothing + , hostConfigExtraHosts = Nothing + , hostConfigGroupAdd = Nothing + , hostConfigIpcMode = Nothing + , hostConfigCgroup = Nothing + , hostConfigLinks = Nothing + , hostConfigOomScoreAdj = Nothing + , hostConfigPidMode = Nothing + , hostConfigPrivileged = Nothing + , hostConfigPublishAllPorts = Nothing + , hostConfigReadonlyRootfs = Nothing + , hostConfigSecurityOpt = Nothing + , hostConfigStorageOpt = Nothing + , hostConfigTmpfs = Nothing + , hostConfigUtsMode = Nothing + , hostConfigUsernsMode = Nothing + , hostConfigShmSize = Nothing + , hostConfigSysctls = Nothing + , hostConfigRuntime = Nothing + , hostConfigIsolation = Nothing + , hostConfigMaskedPaths = Nothing + , hostConfigReadonlyPaths = Nothing + } + +-- ** HostConfigAllOfLogConfig +-- | HostConfigAllOfLogConfig +-- The logging configuration for this container +data HostConfigAllOfLogConfig = HostConfigAllOfLogConfig + { hostConfigAllOfLogConfigType :: !(Maybe E'Type5) -- ^ "Type" + , hostConfigAllOfLogConfigConfig :: !(Maybe (Map.Map String Text)) -- ^ "Config" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON HostConfigAllOfLogConfig +instance A.FromJSON HostConfigAllOfLogConfig where + parseJSON = A.withObject "HostConfigAllOfLogConfig" $ \o -> + HostConfigAllOfLogConfig + <$> (o .:? "Type") + <*> (o .:? "Config") + +-- | ToJSON HostConfigAllOfLogConfig +instance A.ToJSON HostConfigAllOfLogConfig where + toJSON HostConfigAllOfLogConfig {..} = + _omitNulls + [ "Type" .= hostConfigAllOfLogConfigType + , "Config" .= hostConfigAllOfLogConfigConfig + ] + + +-- | Construct a value of type 'HostConfigAllOfLogConfig' (by applying it's required fields, if any) +mkHostConfigAllOfLogConfig + :: HostConfigAllOfLogConfig +mkHostConfigAllOfLogConfig = + HostConfigAllOfLogConfig + { hostConfigAllOfLogConfigType = Nothing + , hostConfigAllOfLogConfigConfig = Nothing + } + +-- ** IPAM +-- | IPAM +data IPAM = IPAM + { iPAMDriver :: !(Maybe Text) -- ^ "Driver" - Name of the IPAM driver to use. + , iPAMConfig :: !(Maybe [IPAMConfig]) -- ^ "Config" - List of IPAM configuration options, specified as a map: ``` {\"Subnet\": <CIDR>, \"IPRange\": <CIDR>, \"Gateway\": <IP address>, \"AuxAddress\": <device_name:IP address>} ``` + , iPAMOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - Driver-specific options, specified as a map. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON IPAM +instance A.FromJSON IPAM where + parseJSON = A.withObject "IPAM" $ \o -> + IPAM + <$> (o .:? "Driver") + <*> (o .:? "Config") + <*> (o .:? "Options") + +-- | ToJSON IPAM +instance A.ToJSON IPAM where + toJSON IPAM {..} = + _omitNulls + [ "Driver" .= iPAMDriver + , "Config" .= iPAMConfig + , "Options" .= iPAMOptions + ] + + +-- | Construct a value of type 'IPAM' (by applying it's required fields, if any) +mkIPAM + :: IPAM +mkIPAM = + IPAM + { iPAMDriver = Nothing + , iPAMConfig = Nothing + , iPAMOptions = Nothing + } + +-- ** IPAMConfig +-- | IPAMConfig +data IPAMConfig = IPAMConfig + { iPAMConfigSubnet :: !(Maybe Text) -- ^ "Subnet" + , iPAMConfigIpRange :: !(Maybe Text) -- ^ "IPRange" + , iPAMConfigGateway :: !(Maybe Text) -- ^ "Gateway" + , iPAMConfigAuxiliaryAddresses :: !(Maybe (Map.Map String Text)) -- ^ "AuxiliaryAddresses" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON IPAMConfig +instance A.FromJSON IPAMConfig where + parseJSON = A.withObject "IPAMConfig" $ \o -> + IPAMConfig + <$> (o .:? "Subnet") + <*> (o .:? "IPRange") + <*> (o .:? "Gateway") + <*> (o .:? "AuxiliaryAddresses") + +-- | ToJSON IPAMConfig +instance A.ToJSON IPAMConfig where + toJSON IPAMConfig {..} = + _omitNulls + [ "Subnet" .= iPAMConfigSubnet + , "IPRange" .= iPAMConfigIpRange + , "Gateway" .= iPAMConfigGateway + , "AuxiliaryAddresses" .= iPAMConfigAuxiliaryAddresses + ] + + +-- | Construct a value of type 'IPAMConfig' (by applying it's required fields, if any) +mkIPAMConfig + :: IPAMConfig +mkIPAMConfig = + IPAMConfig + { iPAMConfigSubnet = Nothing + , iPAMConfigIpRange = Nothing + , iPAMConfigGateway = Nothing + , iPAMConfigAuxiliaryAddresses = Nothing + } + +-- ** IdResponse +-- | IdResponse +-- Response to an API call that returns just an Id +data IdResponse = IdResponse + { idResponseId :: !(Text) -- ^ /Required/ "Id" - The id of the newly created object. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON IdResponse +instance A.FromJSON IdResponse where + parseJSON = A.withObject "IdResponse" $ \o -> + IdResponse + <$> (o .: "Id") + +-- | ToJSON IdResponse +instance A.ToJSON IdResponse where + toJSON IdResponse {..} = + _omitNulls + [ "Id" .= idResponseId + ] + + +-- | Construct a value of type 'IdResponse' (by applying it's required fields, if any) +mkIdResponse + :: Text -- ^ 'idResponseId': The id of the newly created object. + -> IdResponse +mkIdResponse idResponseId = + IdResponse + { idResponseId + } + +-- ** ImageConfig +-- | ImageConfig +-- Configuration of the image. These fields are used as defaults when starting a container from the image. +data ImageConfig = ImageConfig + { imageConfigHostname :: !(Maybe Text) -- ^ "Hostname" - The hostname to use for the container, as a valid RFC 1123 hostname. <p><br /></p> > **Deprecated**: this field is not part of the image specification and is > always empty. It must not be used, and will be removed in API v1.47. + , imageConfigDomainname :: !(Maybe Text) -- ^ "Domainname" - The domain name to use for the container. <p><br /></p> > **Deprecated**: this field is not part of the image specification and is > always empty. It must not be used, and will be removed in API v1.47. + , imageConfigUser :: !(Maybe Text) -- ^ "User" - The user that commands are run as inside the container. + , imageConfigAttachStdin :: !(Maybe Bool) -- ^ "AttachStdin" - Whether to attach to `stdin`. <p><br /></p> > **Deprecated**: this field is not part of the image specification and is > always false. It must not be used, and will be removed in API v1.47. + , imageConfigAttachStdout :: !(Maybe Bool) -- ^ "AttachStdout" - Whether to attach to `stdout`. <p><br /></p> > **Deprecated**: this field is not part of the image specification and is > always false. It must not be used, and will be removed in API v1.47. + , imageConfigAttachStderr :: !(Maybe Bool) -- ^ "AttachStderr" - Whether to attach to `stderr`. <p><br /></p> > **Deprecated**: this field is not part of the image specification and is > always false. It must not be used, and will be removed in API v1.47. + , imageConfigExposedPorts :: !(Maybe (Map.Map String A.Value)) -- ^ "ExposedPorts" - An object mapping ports to an empty object in the form: `{\"<port>/<tcp|udp|sctp>\": {}}` + , imageConfigTty :: !(Maybe Bool) -- ^ "Tty" - Attach standard streams to a TTY, including `stdin` if it is not closed. <p><br /></p> > **Deprecated**: this field is not part of the image specification and is > always false. It must not be used, and will be removed in API v1.47. + , imageConfigOpenStdin :: !(Maybe Bool) -- ^ "OpenStdin" - Open `stdin` <p><br /></p> > **Deprecated**: this field is not part of the image specification and is > always false. It must not be used, and will be removed in API v1.47. + , imageConfigStdinOnce :: !(Maybe Bool) -- ^ "StdinOnce" - Close `stdin` after one attached client disconnects. <p><br /></p> > **Deprecated**: this field is not part of the image specification and is > always false. It must not be used, and will be removed in API v1.47. + , imageConfigEnv :: !(Maybe [Text]) -- ^ "Env" - A list of environment variables to set inside the container in the form `[\"VAR=value\", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value. + , imageConfigCmd :: !(Maybe [Text]) -- ^ "Cmd" - Command to run specified as a string or an array of strings. + , imageConfigHealthcheck :: !(Maybe HealthConfig) -- ^ "Healthcheck" + , imageConfigArgsEscaped :: !(Maybe Bool) -- ^ "ArgsEscaped" - Command is already escaped (Windows only) + , imageConfigImage :: !(Maybe Text) -- ^ "Image" - The name (or reference) of the image to use when creating the container, or which was used when the container was created. <p><br /></p> > **Deprecated**: this field is not part of the image specification and is > always empty. It must not be used, and will be removed in API v1.47. + , imageConfigVolumes :: !(Maybe (Map.Map String A.Value)) -- ^ "Volumes" - An object mapping mount point paths inside the container to empty objects. + , imageConfigWorkingDir :: !(Maybe Text) -- ^ "WorkingDir" - The working directory for commands to run in. + , imageConfigEntrypoint :: !(Maybe [Text]) -- ^ "Entrypoint" - The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + , imageConfigNetworkDisabled :: !(Maybe Bool) -- ^ "NetworkDisabled" - Disable networking for the container. <p><br /></p> > **Deprecated**: this field is not part of the image specification and is > always omitted. It must not be used, and will be removed in API v1.47. + , imageConfigMacAddress :: !(Maybe Text) -- ^ "MacAddress" - MAC address of the container. <p><br /></p> > **Deprecated**: this field is not part of the image specification and is > always omitted. It must not be used, and will be removed in API v1.47. + , imageConfigOnBuild :: !(Maybe [Text]) -- ^ "OnBuild" - `ONBUILD` metadata that were defined in the image's `Dockerfile`. + , imageConfigLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , imageConfigStopSignal :: !(Maybe Text) -- ^ "StopSignal" - Signal to stop a container as a string or unsigned integer. + , imageConfigStopTimeout :: !(Maybe Int) -- ^ "StopTimeout" - Timeout to stop a container in seconds. <p><br /></p> > **Deprecated**: this field is not part of the image specification and is > always omitted. It must not be used, and will be removed in API v1.47. + , imageConfigShell :: !(Maybe [Text]) -- ^ "Shell" - Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageConfig +instance A.FromJSON ImageConfig where + parseJSON = A.withObject "ImageConfig" $ \o -> + ImageConfig + <$> (o .:? "Hostname") + <*> (o .:? "Domainname") + <*> (o .:? "User") + <*> (o .:? "AttachStdin") + <*> (o .:? "AttachStdout") + <*> (o .:? "AttachStderr") + <*> (o .:? "ExposedPorts") + <*> (o .:? "Tty") + <*> (o .:? "OpenStdin") + <*> (o .:? "StdinOnce") + <*> (o .:? "Env") + <*> (o .:? "Cmd") + <*> (o .:? "Healthcheck") + <*> (o .:? "ArgsEscaped") + <*> (o .:? "Image") + <*> (o .:? "Volumes") + <*> (o .:? "WorkingDir") + <*> (o .:? "Entrypoint") + <*> (o .:? "NetworkDisabled") + <*> (o .:? "MacAddress") + <*> (o .:? "OnBuild") + <*> (o .:? "Labels") + <*> (o .:? "StopSignal") + <*> (o .:? "StopTimeout") + <*> (o .:? "Shell") + +-- | ToJSON ImageConfig +instance A.ToJSON ImageConfig where + toJSON ImageConfig {..} = + _omitNulls + [ "Hostname" .= imageConfigHostname + , "Domainname" .= imageConfigDomainname + , "User" .= imageConfigUser + , "AttachStdin" .= imageConfigAttachStdin + , "AttachStdout" .= imageConfigAttachStdout + , "AttachStderr" .= imageConfigAttachStderr + , "ExposedPorts" .= imageConfigExposedPorts + , "Tty" .= imageConfigTty + , "OpenStdin" .= imageConfigOpenStdin + , "StdinOnce" .= imageConfigStdinOnce + , "Env" .= imageConfigEnv + , "Cmd" .= imageConfigCmd + , "Healthcheck" .= imageConfigHealthcheck + , "ArgsEscaped" .= imageConfigArgsEscaped + , "Image" .= imageConfigImage + , "Volumes" .= imageConfigVolumes + , "WorkingDir" .= imageConfigWorkingDir + , "Entrypoint" .= imageConfigEntrypoint + , "NetworkDisabled" .= imageConfigNetworkDisabled + , "MacAddress" .= imageConfigMacAddress + , "OnBuild" .= imageConfigOnBuild + , "Labels" .= imageConfigLabels + , "StopSignal" .= imageConfigStopSignal + , "StopTimeout" .= imageConfigStopTimeout + , "Shell" .= imageConfigShell + ] + + +-- | Construct a value of type 'ImageConfig' (by applying it's required fields, if any) +mkImageConfig + :: ImageConfig +mkImageConfig = + ImageConfig + { imageConfigHostname = Nothing + , imageConfigDomainname = Nothing + , imageConfigUser = Nothing + , imageConfigAttachStdin = Nothing + , imageConfigAttachStdout = Nothing + , imageConfigAttachStderr = Nothing + , imageConfigExposedPorts = Nothing + , imageConfigTty = Nothing + , imageConfigOpenStdin = Nothing + , imageConfigStdinOnce = Nothing + , imageConfigEnv = Nothing + , imageConfigCmd = Nothing + , imageConfigHealthcheck = Nothing + , imageConfigArgsEscaped = Nothing + , imageConfigImage = Nothing + , imageConfigVolumes = Nothing + , imageConfigWorkingDir = Nothing + , imageConfigEntrypoint = Nothing + , imageConfigNetworkDisabled = Nothing + , imageConfigMacAddress = Nothing + , imageConfigOnBuild = Nothing + , imageConfigLabels = Nothing + , imageConfigStopSignal = Nothing + , imageConfigStopTimeout = Nothing + , imageConfigShell = Nothing + } + +-- ** ImageDeleteResponseItem +-- | ImageDeleteResponseItem +data ImageDeleteResponseItem = ImageDeleteResponseItem + { imageDeleteResponseItemUntagged :: !(Maybe Text) -- ^ "Untagged" - The image ID of an image that was untagged + , imageDeleteResponseItemDeleted :: !(Maybe Text) -- ^ "Deleted" - The image ID of an image that was deleted + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageDeleteResponseItem +instance A.FromJSON ImageDeleteResponseItem where + parseJSON = A.withObject "ImageDeleteResponseItem" $ \o -> + ImageDeleteResponseItem + <$> (o .:? "Untagged") + <*> (o .:? "Deleted") + +-- | ToJSON ImageDeleteResponseItem +instance A.ToJSON ImageDeleteResponseItem where + toJSON ImageDeleteResponseItem {..} = + _omitNulls + [ "Untagged" .= imageDeleteResponseItemUntagged + , "Deleted" .= imageDeleteResponseItemDeleted + ] + + +-- | Construct a value of type 'ImageDeleteResponseItem' (by applying it's required fields, if any) +mkImageDeleteResponseItem + :: ImageDeleteResponseItem +mkImageDeleteResponseItem = + ImageDeleteResponseItem + { imageDeleteResponseItemUntagged = Nothing + , imageDeleteResponseItemDeleted = Nothing + } + +-- ** ImageID +-- | ImageID +-- Image ID or Digest +data ImageID = ImageID + { imageIDId :: !(Maybe Text) -- ^ "ID" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageID +instance A.FromJSON ImageID where + parseJSON = A.withObject "ImageID" $ \o -> + ImageID + <$> (o .:? "ID") + +-- | ToJSON ImageID +instance A.ToJSON ImageID where + toJSON ImageID {..} = + _omitNulls + [ "ID" .= imageIDId + ] + + +-- | Construct a value of type 'ImageID' (by applying it's required fields, if any) +mkImageID + :: ImageID +mkImageID = + ImageID + { imageIDId = Nothing + } + +-- ** ImageInspect +-- | ImageInspect +-- Information about an image in the local image cache. +data ImageInspect = ImageInspect + { imageInspectId :: !(Maybe Text) -- ^ "Id" - ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. + , imageInspectRepoTags :: !(Maybe [Text]) -- ^ "RepoTags" - List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. + , imageInspectRepoDigests :: !(Maybe [Text]) -- ^ "RepoDigests" - List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. + , imageInspectParent :: !(Maybe Text) -- ^ "Parent" - ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. + , imageInspectComment :: !(Maybe Text) -- ^ "Comment" - Optional message that was set when committing or importing the image. + , imageInspectCreated :: !(Maybe Text) -- ^ "Created" - Date and time at which the image was created, formatted in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. This information is only available if present in the image, and omitted otherwise. + , imageInspectDockerVersion :: !(Maybe Text) -- ^ "DockerVersion" - The version of Docker that was used to build the image. Depending on how the image was created, this field may be empty. + , imageInspectAuthor :: !(Maybe Text) -- ^ "Author" - Name of the author that was specified when committing the image, or as specified through MAINTAINER (deprecated) in the Dockerfile. + , imageInspectConfig :: !(Maybe ImageConfig) -- ^ "Config" + , imageInspectArchitecture :: !(Maybe Text) -- ^ "Architecture" - Hardware CPU architecture that the image runs on. + , imageInspectVariant :: !(Maybe Text) -- ^ "Variant" - CPU architecture variant (presently ARM-only). + , imageInspectOs :: !(Maybe Text) -- ^ "Os" - Operating System the image is built to run on. + , imageInspectOsVersion :: !(Maybe Text) -- ^ "OsVersion" - Operating System version the image is built to run on (especially for Windows). + , imageInspectSize :: !(Maybe Integer) -- ^ "Size" - Total size of the image including all layers it is composed of. + , imageInspectVirtualSize :: !(Maybe Integer) -- ^ "VirtualSize" - Total size of the image including all layers it is composed of. Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. + , imageInspectGraphDriver :: !(Maybe GraphDriverData) -- ^ "GraphDriver" + , imageInspectRootFs :: !(Maybe ImageInspectRootFS) -- ^ "RootFS" + , imageInspectMetadata :: !(Maybe ImageInspectMetadata) -- ^ "Metadata" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageInspect +instance A.FromJSON ImageInspect where + parseJSON = A.withObject "ImageInspect" $ \o -> + ImageInspect + <$> (o .:? "Id") + <*> (o .:? "RepoTags") + <*> (o .:? "RepoDigests") + <*> (o .:? "Parent") + <*> (o .:? "Comment") + <*> (o .:? "Created") + <*> (o .:? "DockerVersion") + <*> (o .:? "Author") + <*> (o .:? "Config") + <*> (o .:? "Architecture") + <*> (o .:? "Variant") + <*> (o .:? "Os") + <*> (o .:? "OsVersion") + <*> (o .:? "Size") + <*> (o .:? "VirtualSize") + <*> (o .:? "GraphDriver") + <*> (o .:? "RootFS") + <*> (o .:? "Metadata") + +-- | ToJSON ImageInspect +instance A.ToJSON ImageInspect where + toJSON ImageInspect {..} = + _omitNulls + [ "Id" .= imageInspectId + , "RepoTags" .= imageInspectRepoTags + , "RepoDigests" .= imageInspectRepoDigests + , "Parent" .= imageInspectParent + , "Comment" .= imageInspectComment + , "Created" .= imageInspectCreated + , "DockerVersion" .= imageInspectDockerVersion + , "Author" .= imageInspectAuthor + , "Config" .= imageInspectConfig + , "Architecture" .= imageInspectArchitecture + , "Variant" .= imageInspectVariant + , "Os" .= imageInspectOs + , "OsVersion" .= imageInspectOsVersion + , "Size" .= imageInspectSize + , "VirtualSize" .= imageInspectVirtualSize + , "GraphDriver" .= imageInspectGraphDriver + , "RootFS" .= imageInspectRootFs + , "Metadata" .= imageInspectMetadata + ] + + +-- | Construct a value of type 'ImageInspect' (by applying it's required fields, if any) +mkImageInspect + :: ImageInspect +mkImageInspect = + ImageInspect + { imageInspectId = Nothing + , imageInspectRepoTags = Nothing + , imageInspectRepoDigests = Nothing + , imageInspectParent = Nothing + , imageInspectComment = Nothing + , imageInspectCreated = Nothing + , imageInspectDockerVersion = Nothing + , imageInspectAuthor = Nothing + , imageInspectConfig = Nothing + , imageInspectArchitecture = Nothing + , imageInspectVariant = Nothing + , imageInspectOs = Nothing + , imageInspectOsVersion = Nothing + , imageInspectSize = Nothing + , imageInspectVirtualSize = Nothing + , imageInspectGraphDriver = Nothing + , imageInspectRootFs = Nothing + , imageInspectMetadata = Nothing + } + +-- ** ImageInspectMetadata +-- | ImageInspectMetadata +-- Additional metadata of the image in the local cache. This information is local to the daemon, and not part of the image itself. +data ImageInspectMetadata = ImageInspectMetadata + { imageInspectMetadataLastTagTime :: !(Maybe Text) -- ^ "LastTagTime" - Date and time at which the image was last tagged in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. This information is only available if the image was tagged locally, and omitted otherwise. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageInspectMetadata +instance A.FromJSON ImageInspectMetadata where + parseJSON = A.withObject "ImageInspectMetadata" $ \o -> + ImageInspectMetadata + <$> (o .:? "LastTagTime") + +-- | ToJSON ImageInspectMetadata +instance A.ToJSON ImageInspectMetadata where + toJSON ImageInspectMetadata {..} = + _omitNulls + [ "LastTagTime" .= imageInspectMetadataLastTagTime + ] + + +-- | Construct a value of type 'ImageInspectMetadata' (by applying it's required fields, if any) +mkImageInspectMetadata + :: ImageInspectMetadata +mkImageInspectMetadata = + ImageInspectMetadata + { imageInspectMetadataLastTagTime = Nothing + } + +-- ** ImageInspectRootFS +-- | ImageInspectRootFS +-- Information about the image's RootFS, including the layer IDs. +data ImageInspectRootFS = ImageInspectRootFS + { imageInspectRootFSType :: !(Text) -- ^ /Required/ "Type" + , imageInspectRootFSLayers :: !(Maybe [Text]) -- ^ "Layers" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageInspectRootFS +instance A.FromJSON ImageInspectRootFS where + parseJSON = A.withObject "ImageInspectRootFS" $ \o -> + ImageInspectRootFS + <$> (o .: "Type") + <*> (o .:? "Layers") + +-- | ToJSON ImageInspectRootFS +instance A.ToJSON ImageInspectRootFS where + toJSON ImageInspectRootFS {..} = + _omitNulls + [ "Type" .= imageInspectRootFSType + , "Layers" .= imageInspectRootFSLayers + ] + + +-- | Construct a value of type 'ImageInspectRootFS' (by applying it's required fields, if any) +mkImageInspectRootFS + :: Text -- ^ 'imageInspectRootFSType' + -> ImageInspectRootFS +mkImageInspectRootFS imageInspectRootFSType = + ImageInspectRootFS + { imageInspectRootFSType + , imageInspectRootFSLayers = Nothing + } + +-- ** ImagePruneResponse +-- | ImagePruneResponse +-- ImagePruneResponse +-- +data ImagePruneResponse = ImagePruneResponse + { imagePruneResponseImagesDeleted :: !(Maybe [ImageDeleteResponseItem]) -- ^ "ImagesDeleted" - Images that were deleted + , imagePruneResponseSpaceReclaimed :: !(Maybe Integer) -- ^ "SpaceReclaimed" - Disk space reclaimed in bytes + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImagePruneResponse +instance A.FromJSON ImagePruneResponse where + parseJSON = A.withObject "ImagePruneResponse" $ \o -> + ImagePruneResponse + <$> (o .:? "ImagesDeleted") + <*> (o .:? "SpaceReclaimed") + +-- | ToJSON ImagePruneResponse +instance A.ToJSON ImagePruneResponse where + toJSON ImagePruneResponse {..} = + _omitNulls + [ "ImagesDeleted" .= imagePruneResponseImagesDeleted + , "SpaceReclaimed" .= imagePruneResponseSpaceReclaimed + ] + + +-- | Construct a value of type 'ImagePruneResponse' (by applying it's required fields, if any) +mkImagePruneResponse + :: ImagePruneResponse +mkImagePruneResponse = + ImagePruneResponse + { imagePruneResponseImagesDeleted = Nothing + , imagePruneResponseSpaceReclaimed = Nothing + } + +-- ** ImageSearchResponseItem +-- | ImageSearchResponseItem +-- ImageSearchResponseItem +-- +data ImageSearchResponseItem = ImageSearchResponseItem + { imageSearchResponseItemDescription :: !(Maybe Text) -- ^ "description" + , imageSearchResponseItemIsOfficial :: !(Maybe Bool) -- ^ "is_official" + , imageSearchResponseItemIsAutomated :: !(Maybe Bool) -- ^ "is_automated" - Whether this repository has automated builds enabled. <p><br /></p> > **Deprecated**: This field is deprecated and will always be \"false\". + , imageSearchResponseItemName :: !(Maybe Text) -- ^ "name" + , imageSearchResponseItemStarCount :: !(Maybe Int) -- ^ "star_count" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageSearchResponseItem +instance A.FromJSON ImageSearchResponseItem where + parseJSON = A.withObject "ImageSearchResponseItem" $ \o -> + ImageSearchResponseItem + <$> (o .:? "description") + <*> (o .:? "is_official") + <*> (o .:? "is_automated") + <*> (o .:? "name") + <*> (o .:? "star_count") + +-- | ToJSON ImageSearchResponseItem +instance A.ToJSON ImageSearchResponseItem where + toJSON ImageSearchResponseItem {..} = + _omitNulls + [ "description" .= imageSearchResponseItemDescription + , "is_official" .= imageSearchResponseItemIsOfficial + , "is_automated" .= imageSearchResponseItemIsAutomated + , "name" .= imageSearchResponseItemName + , "star_count" .= imageSearchResponseItemStarCount + ] + + +-- | Construct a value of type 'ImageSearchResponseItem' (by applying it's required fields, if any) +mkImageSearchResponseItem + :: ImageSearchResponseItem +mkImageSearchResponseItem = + ImageSearchResponseItem + { imageSearchResponseItemDescription = Nothing + , imageSearchResponseItemIsOfficial = Nothing + , imageSearchResponseItemIsAutomated = Nothing + , imageSearchResponseItemName = Nothing + , imageSearchResponseItemStarCount = Nothing + } + +-- ** ImageSummary +-- | ImageSummary +data ImageSummary = ImageSummary + { imageSummaryId :: !(Text) -- ^ /Required/ "Id" - ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. + , imageSummaryParentId :: !(Text) -- ^ /Required/ "ParentId" - ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. + , imageSummaryRepoTags :: !([Text]) -- ^ /Required/ "RepoTags" - List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. + , imageSummaryRepoDigests :: !([Text]) -- ^ /Required/ "RepoDigests" - List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. + , imageSummaryCreated :: !(Int) -- ^ /Required/ "Created" - Date and time at which the image was created as a Unix timestamp (number of seconds sinds EPOCH). + , imageSummarySize :: !(Integer) -- ^ /Required/ "Size" - Total size of the image including all layers it is composed of. + , imageSummarySharedSize :: !(Integer) -- ^ /Required/ "SharedSize" - Total size of image layers that are shared between this image and other images. This size is not calculated by default. `-1` indicates that the value has not been set / calculated. + , imageSummaryVirtualSize :: !(Maybe Integer) -- ^ "VirtualSize" - Total size of the image including all layers it is composed of. Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. + , imageSummaryLabels :: !((Map.Map String Text)) -- ^ /Required/ "Labels" - User-defined key/value metadata. + , imageSummaryContainers :: !(Int) -- ^ /Required/ "Containers" - Number of containers using this image. Includes both stopped and running containers. This size is not calculated by default, and depends on which API endpoint is used. `-1` indicates that the value has not been set / calculated. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ImageSummary +instance A.FromJSON ImageSummary where + parseJSON = A.withObject "ImageSummary" $ \o -> + ImageSummary + <$> (o .: "Id") + <*> (o .: "ParentId") + <*> (o .: "RepoTags") + <*> (o .: "RepoDigests") + <*> (o .: "Created") + <*> (o .: "Size") + <*> (o .: "SharedSize") + <*> (o .:? "VirtualSize") + <*> (o .: "Labels") + <*> (o .: "Containers") + +-- | ToJSON ImageSummary +instance A.ToJSON ImageSummary where + toJSON ImageSummary {..} = + _omitNulls + [ "Id" .= imageSummaryId + , "ParentId" .= imageSummaryParentId + , "RepoTags" .= imageSummaryRepoTags + , "RepoDigests" .= imageSummaryRepoDigests + , "Created" .= imageSummaryCreated + , "Size" .= imageSummarySize + , "SharedSize" .= imageSummarySharedSize + , "VirtualSize" .= imageSummaryVirtualSize + , "Labels" .= imageSummaryLabels + , "Containers" .= imageSummaryContainers + ] + + +-- | Construct a value of type 'ImageSummary' (by applying it's required fields, if any) +mkImageSummary + :: Text -- ^ 'imageSummaryId': ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. + -> Text -- ^ 'imageSummaryParentId': ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. + -> [Text] -- ^ 'imageSummaryRepoTags': List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. + -> [Text] -- ^ 'imageSummaryRepoDigests': List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. + -> Int -- ^ 'imageSummaryCreated': Date and time at which the image was created as a Unix timestamp (number of seconds sinds EPOCH). + -> Integer -- ^ 'imageSummarySize': Total size of the image including all layers it is composed of. + -> Integer -- ^ 'imageSummarySharedSize': Total size of image layers that are shared between this image and other images. This size is not calculated by default. `-1` indicates that the value has not been set / calculated. + -> (Map.Map String Text) -- ^ 'imageSummaryLabels': User-defined key/value metadata. + -> Int -- ^ 'imageSummaryContainers': Number of containers using this image. Includes both stopped and running containers. This size is not calculated by default, and depends on which API endpoint is used. `-1` indicates that the value has not been set / calculated. + -> ImageSummary +mkImageSummary imageSummaryId imageSummaryParentId imageSummaryRepoTags imageSummaryRepoDigests imageSummaryCreated imageSummarySize imageSummarySharedSize imageSummaryLabels imageSummaryContainers = + ImageSummary + { imageSummaryId + , imageSummaryParentId + , imageSummaryRepoTags + , imageSummaryRepoDigests + , imageSummaryCreated + , imageSummarySize + , imageSummarySharedSize + , imageSummaryVirtualSize = Nothing + , imageSummaryLabels + , imageSummaryContainers + } + +-- ** IndexInfo +-- | IndexInfo +-- IndexInfo contains information about a registry. +data IndexInfo = IndexInfo + { indexInfoName :: !(Maybe Text) -- ^ "Name" - Name of the registry, such as \"docker.io\". + , indexInfoMirrors :: !(Maybe [Text]) -- ^ "Mirrors" - List of mirrors, expressed as URIs. + , indexInfoSecure :: !(Maybe Bool) -- ^ "Secure" - Indicates if the registry is part of the list of insecure registries. If `false`, the registry is insecure. Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication. > **Warning**: Insecure registries can be useful when running a local > registry. However, because its use creates security vulnerabilities > it should ONLY be enabled for testing purposes. For increased > security, users should add their CA to their system's list of > trusted CAs instead of enabling this option. + , indexInfoOfficial :: !(Maybe Bool) -- ^ "Official" - Indicates whether this is an official registry (i.e., Docker Hub / docker.io) + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON IndexInfo +instance A.FromJSON IndexInfo where + parseJSON = A.withObject "IndexInfo" $ \o -> + IndexInfo + <$> (o .:? "Name") + <*> (o .:? "Mirrors") + <*> (o .:? "Secure") + <*> (o .:? "Official") + +-- | ToJSON IndexInfo +instance A.ToJSON IndexInfo where + toJSON IndexInfo {..} = + _omitNulls + [ "Name" .= indexInfoName + , "Mirrors" .= indexInfoMirrors + , "Secure" .= indexInfoSecure + , "Official" .= indexInfoOfficial + ] + + +-- | Construct a value of type 'IndexInfo' (by applying it's required fields, if any) +mkIndexInfo + :: IndexInfo +mkIndexInfo = + IndexInfo + { indexInfoName = Nothing + , indexInfoMirrors = Nothing + , indexInfoSecure = Nothing + , indexInfoOfficial = Nothing + } + +-- ** JoinTokens +-- | JoinTokens +-- JoinTokens contains the tokens workers and managers need to join the swarm. +data JoinTokens = JoinTokens + { joinTokensWorker :: !(Maybe Text) -- ^ "Worker" - The token workers can use to join the swarm. + , joinTokensManager :: !(Maybe Text) -- ^ "Manager" - The token managers can use to join the swarm. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON JoinTokens +instance A.FromJSON JoinTokens where + parseJSON = A.withObject "JoinTokens" $ \o -> + JoinTokens + <$> (o .:? "Worker") + <*> (o .:? "Manager") + +-- | ToJSON JoinTokens +instance A.ToJSON JoinTokens where + toJSON JoinTokens {..} = + _omitNulls + [ "Worker" .= joinTokensWorker + , "Manager" .= joinTokensManager + ] + + +-- | Construct a value of type 'JoinTokens' (by applying it's required fields, if any) +mkJoinTokens + :: JoinTokens +mkJoinTokens = + JoinTokens + { joinTokensWorker = Nothing + , joinTokensManager = Nothing + } + +-- ** Limit +-- | Limit +-- An object describing a limit on resources which can be requested by a task. +data Limit = Limit + { limitNanoCpus :: !(Maybe Integer) -- ^ "NanoCPUs" + , limitMemoryBytes :: !(Maybe Integer) -- ^ "MemoryBytes" + , limitPids :: !(Maybe Integer) -- ^ "Pids" - Limits the maximum number of PIDs in the container. Set `0` for unlimited. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Limit +instance A.FromJSON Limit where + parseJSON = A.withObject "Limit" $ \o -> + Limit + <$> (o .:? "NanoCPUs") + <*> (o .:? "MemoryBytes") + <*> (o .:? "Pids") + +-- | ToJSON Limit +instance A.ToJSON Limit where + toJSON Limit {..} = + _omitNulls + [ "NanoCPUs" .= limitNanoCpus + , "MemoryBytes" .= limitMemoryBytes + , "Pids" .= limitPids + ] + + +-- | Construct a value of type 'Limit' (by applying it's required fields, if any) +mkLimit + :: Limit +mkLimit = + Limit + { limitNanoCpus = Nothing + , limitMemoryBytes = Nothing + , limitPids = Nothing + } + +-- ** ManagerStatus +-- | ManagerStatus +-- ManagerStatus represents the status of a manager. It provides the current status of a node's manager component, if the node is a manager. +data ManagerStatus = ManagerStatus + { managerStatusLeader :: !(Maybe Bool) -- ^ "Leader" + , managerStatusReachability :: !(Maybe Reachability) -- ^ "Reachability" + , managerStatusAddr :: !(Maybe Text) -- ^ "Addr" - The IP address and port at which the manager is reachable. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ManagerStatus +instance A.FromJSON ManagerStatus where + parseJSON = A.withObject "ManagerStatus" $ \o -> + ManagerStatus + <$> (o .:? "Leader") + <*> (o .:? "Reachability") + <*> (o .:? "Addr") + +-- | ToJSON ManagerStatus +instance A.ToJSON ManagerStatus where + toJSON ManagerStatus {..} = + _omitNulls + [ "Leader" .= managerStatusLeader + , "Reachability" .= managerStatusReachability + , "Addr" .= managerStatusAddr + ] + + +-- | Construct a value of type 'ManagerStatus' (by applying it's required fields, if any) +mkManagerStatus + :: ManagerStatus +mkManagerStatus = + ManagerStatus + { managerStatusLeader = Nothing + , managerStatusReachability = Nothing + , managerStatusAddr = Nothing + } + +-- ** Mount +-- | Mount +data Mount = Mount + { mountTarget :: !(Maybe Text) -- ^ "Target" - Container path. + , mountSource :: !(Maybe Text) -- ^ "Source" - Mount source (e.g. a volume name, a host path). + , mountType :: !(Maybe E'Type2) -- ^ "Type" - The mount type. Available types: - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. - `cluster` a Swarm cluster volume + , mountReadOnly :: !(Maybe Bool) -- ^ "ReadOnly" - Whether the mount should be read-only. + , mountConsistency :: !(Maybe Text) -- ^ "Consistency" - The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`. + , mountBindOptions :: !(Maybe MountBindOptions) -- ^ "BindOptions" + , mountVolumeOptions :: !(Maybe MountVolumeOptions) -- ^ "VolumeOptions" + , mountTmpfsOptions :: !(Maybe MountTmpfsOptions) -- ^ "TmpfsOptions" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Mount +instance A.FromJSON Mount where + parseJSON = A.withObject "Mount" $ \o -> + Mount + <$> (o .:? "Target") + <*> (o .:? "Source") + <*> (o .:? "Type") + <*> (o .:? "ReadOnly") + <*> (o .:? "Consistency") + <*> (o .:? "BindOptions") + <*> (o .:? "VolumeOptions") + <*> (o .:? "TmpfsOptions") + +-- | ToJSON Mount +instance A.ToJSON Mount where + toJSON Mount {..} = + _omitNulls + [ "Target" .= mountTarget + , "Source" .= mountSource + , "Type" .= mountType + , "ReadOnly" .= mountReadOnly + , "Consistency" .= mountConsistency + , "BindOptions" .= mountBindOptions + , "VolumeOptions" .= mountVolumeOptions + , "TmpfsOptions" .= mountTmpfsOptions + ] + + +-- | Construct a value of type 'Mount' (by applying it's required fields, if any) +mkMount + :: Mount +mkMount = + Mount + { mountTarget = Nothing + , mountSource = Nothing + , mountType = Nothing + , mountReadOnly = Nothing + , mountConsistency = Nothing + , mountBindOptions = Nothing + , mountVolumeOptions = Nothing + , mountTmpfsOptions = Nothing + } + +-- ** MountBindOptions +-- | MountBindOptions +-- Optional configuration for the `bind` type. +data MountBindOptions = MountBindOptions + { mountBindOptionsPropagation :: !(Maybe E'Propagation) -- ^ "Propagation" - A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. + , mountBindOptionsNonRecursive :: !(Maybe Bool) -- ^ "NonRecursive" - Disable recursive bind mount. + , mountBindOptionsCreateMountpoint :: !(Maybe Bool) -- ^ "CreateMountpoint" - Create mount point on host if missing + , mountBindOptionsReadOnlyNonRecursive :: !(Maybe Bool) -- ^ "ReadOnlyNonRecursive" - Make the mount non-recursively read-only, but still leave the mount recursive (unless NonRecursive is set to `true` in conjunction). Addded in v1.44, before that version all read-only mounts were non-recursive by default. To match the previous behaviour this will default to `true` for clients on versions prior to v1.44. + , mountBindOptionsReadOnlyForceRecursive :: !(Maybe Bool) -- ^ "ReadOnlyForceRecursive" - Raise an error if the mount cannot be made recursively read-only. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON MountBindOptions +instance A.FromJSON MountBindOptions where + parseJSON = A.withObject "MountBindOptions" $ \o -> + MountBindOptions + <$> (o .:? "Propagation") + <*> (o .:? "NonRecursive") + <*> (o .:? "CreateMountpoint") + <*> (o .:? "ReadOnlyNonRecursive") + <*> (o .:? "ReadOnlyForceRecursive") + +-- | ToJSON MountBindOptions +instance A.ToJSON MountBindOptions where + toJSON MountBindOptions {..} = + _omitNulls + [ "Propagation" .= mountBindOptionsPropagation + , "NonRecursive" .= mountBindOptionsNonRecursive + , "CreateMountpoint" .= mountBindOptionsCreateMountpoint + , "ReadOnlyNonRecursive" .= mountBindOptionsReadOnlyNonRecursive + , "ReadOnlyForceRecursive" .= mountBindOptionsReadOnlyForceRecursive + ] + + +-- | Construct a value of type 'MountBindOptions' (by applying it's required fields, if any) +mkMountBindOptions + :: MountBindOptions +mkMountBindOptions = + MountBindOptions + { mountBindOptionsPropagation = Nothing + , mountBindOptionsNonRecursive = Nothing + , mountBindOptionsCreateMountpoint = Nothing + , mountBindOptionsReadOnlyNonRecursive = Nothing + , mountBindOptionsReadOnlyForceRecursive = Nothing + } + +-- ** MountPoint +-- | MountPoint +-- MountPoint represents a mount point configuration inside the container. This is used for reporting the mountpoints in use by a container. +data MountPoint = MountPoint + { mountPointType :: !(Maybe E'Type2) -- ^ "Type" - The mount type: - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `tmpfs` a `tmpfs`. - `npipe` a named pipe from the host into the container. - `cluster` a Swarm cluster volume + , mountPointName :: !(Maybe Text) -- ^ "Name" - Name is the name reference to the underlying data defined by `Source` e.g., the volume name. + , mountPointSource :: !(Maybe Text) -- ^ "Source" - Source location of the mount. For volumes, this contains the storage location of the volume (within `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains the source (host) part of the bind-mount. For `tmpfs` mount points, this field is empty. + , mountPointDestination :: !(Maybe Text) -- ^ "Destination" - Destination is the path relative to the container root (`/`) where the `Source` is mounted inside the container. + , mountPointDriver :: !(Maybe Text) -- ^ "Driver" - Driver is the volume driver used to create the volume (if it is a volume). + , mountPointMode :: !(Maybe Text) -- ^ "Mode" - Mode is a comma separated list of options supplied by the user when creating the bind/volume mount. The default is platform-specific (`\"z\"` on Linux, empty on Windows). + , mountPointRw :: !(Maybe Bool) -- ^ "RW" - Whether the mount is mounted writable (read-write). + , mountPointPropagation :: !(Maybe Text) -- ^ "Propagation" - Propagation describes how mounts are propagated from the host into the mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) for details. This field is not used on Windows. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON MountPoint +instance A.FromJSON MountPoint where + parseJSON = A.withObject "MountPoint" $ \o -> + MountPoint + <$> (o .:? "Type") + <*> (o .:? "Name") + <*> (o .:? "Source") + <*> (o .:? "Destination") + <*> (o .:? "Driver") + <*> (o .:? "Mode") + <*> (o .:? "RW") + <*> (o .:? "Propagation") + +-- | ToJSON MountPoint +instance A.ToJSON MountPoint where + toJSON MountPoint {..} = + _omitNulls + [ "Type" .= mountPointType + , "Name" .= mountPointName + , "Source" .= mountPointSource + , "Destination" .= mountPointDestination + , "Driver" .= mountPointDriver + , "Mode" .= mountPointMode + , "RW" .= mountPointRw + , "Propagation" .= mountPointPropagation + ] + + +-- | Construct a value of type 'MountPoint' (by applying it's required fields, if any) +mkMountPoint + :: MountPoint +mkMountPoint = + MountPoint + { mountPointType = Nothing + , mountPointName = Nothing + , mountPointSource = Nothing + , mountPointDestination = Nothing + , mountPointDriver = Nothing + , mountPointMode = Nothing + , mountPointRw = Nothing + , mountPointPropagation = Nothing + } + +-- ** MountTmpfsOptions +-- | MountTmpfsOptions +-- Optional configuration for the `tmpfs` type. +data MountTmpfsOptions = MountTmpfsOptions + { mountTmpfsOptionsSizeBytes :: !(Maybe Integer) -- ^ "SizeBytes" - The size for the tmpfs mount in bytes. + , mountTmpfsOptionsMode :: !(Maybe Int) -- ^ "Mode" - The permission mode for the tmpfs mount in an integer. + , mountTmpfsOptionsOptions :: !(Maybe [[Text]]) -- ^ "Options" - The options to be passed to the tmpfs mount. An array of arrays. Flag options should be provided as 1-length arrays. Other types should be provided as as 2-length arrays, where the first item is the key and the second the value. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON MountTmpfsOptions +instance A.FromJSON MountTmpfsOptions where + parseJSON = A.withObject "MountTmpfsOptions" $ \o -> + MountTmpfsOptions + <$> (o .:? "SizeBytes") + <*> (o .:? "Mode") + <*> (o .:? "Options") + +-- | ToJSON MountTmpfsOptions +instance A.ToJSON MountTmpfsOptions where + toJSON MountTmpfsOptions {..} = + _omitNulls + [ "SizeBytes" .= mountTmpfsOptionsSizeBytes + , "Mode" .= mountTmpfsOptionsMode + , "Options" .= mountTmpfsOptionsOptions + ] + + +-- | Construct a value of type 'MountTmpfsOptions' (by applying it's required fields, if any) +mkMountTmpfsOptions + :: MountTmpfsOptions +mkMountTmpfsOptions = + MountTmpfsOptions + { mountTmpfsOptionsSizeBytes = Nothing + , mountTmpfsOptionsMode = Nothing + , mountTmpfsOptionsOptions = Nothing + } + +-- ** MountVolumeOptions +-- | MountVolumeOptions +-- Optional configuration for the `volume` type. +data MountVolumeOptions = MountVolumeOptions + { mountVolumeOptionsNoCopy :: !(Maybe Bool) -- ^ "NoCopy" - Populate volume with data from the target. + , mountVolumeOptionsLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , mountVolumeOptionsDriverConfig :: !(Maybe MountVolumeOptionsDriverConfig) -- ^ "DriverConfig" + , mountVolumeOptionsSubpath :: !(Maybe Text) -- ^ "Subpath" - Source path inside the volume. Must be relative without any back traversals. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON MountVolumeOptions +instance A.FromJSON MountVolumeOptions where + parseJSON = A.withObject "MountVolumeOptions" $ \o -> + MountVolumeOptions + <$> (o .:? "NoCopy") + <*> (o .:? "Labels") + <*> (o .:? "DriverConfig") + <*> (o .:? "Subpath") + +-- | ToJSON MountVolumeOptions +instance A.ToJSON MountVolumeOptions where + toJSON MountVolumeOptions {..} = + _omitNulls + [ "NoCopy" .= mountVolumeOptionsNoCopy + , "Labels" .= mountVolumeOptionsLabels + , "DriverConfig" .= mountVolumeOptionsDriverConfig + , "Subpath" .= mountVolumeOptionsSubpath + ] + + +-- | Construct a value of type 'MountVolumeOptions' (by applying it's required fields, if any) +mkMountVolumeOptions + :: MountVolumeOptions +mkMountVolumeOptions = + MountVolumeOptions + { mountVolumeOptionsNoCopy = Nothing + , mountVolumeOptionsLabels = Nothing + , mountVolumeOptionsDriverConfig = Nothing + , mountVolumeOptionsSubpath = Nothing + } + +-- ** MountVolumeOptionsDriverConfig +-- | MountVolumeOptionsDriverConfig +-- Map of driver specific options +data MountVolumeOptionsDriverConfig = MountVolumeOptionsDriverConfig + { mountVolumeOptionsDriverConfigName :: !(Maybe Text) -- ^ "Name" - Name of the driver to use to create the volume. + , mountVolumeOptionsDriverConfigOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - key/value map of driver specific options. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON MountVolumeOptionsDriverConfig +instance A.FromJSON MountVolumeOptionsDriverConfig where + parseJSON = A.withObject "MountVolumeOptionsDriverConfig" $ \o -> + MountVolumeOptionsDriverConfig + <$> (o .:? "Name") + <*> (o .:? "Options") + +-- | ToJSON MountVolumeOptionsDriverConfig +instance A.ToJSON MountVolumeOptionsDriverConfig where + toJSON MountVolumeOptionsDriverConfig {..} = + _omitNulls + [ "Name" .= mountVolumeOptionsDriverConfigName + , "Options" .= mountVolumeOptionsDriverConfigOptions + ] + + +-- | Construct a value of type 'MountVolumeOptionsDriverConfig' (by applying it's required fields, if any) +mkMountVolumeOptionsDriverConfig + :: MountVolumeOptionsDriverConfig +mkMountVolumeOptionsDriverConfig = + MountVolumeOptionsDriverConfig + { mountVolumeOptionsDriverConfigName = Nothing + , mountVolumeOptionsDriverConfigOptions = Nothing + } + +-- ** Network +-- | Network +data Network = Network + { networkName :: !(Maybe Text) -- ^ "Name" - Name of the network. + , networkId :: !(Maybe Text) -- ^ "Id" - ID that uniquely identifies a network on a single machine. + , networkCreated :: !(Maybe Text) -- ^ "Created" - Date and time at which the network was created in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , networkScope :: !(Maybe Text) -- ^ "Scope" - The level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine level) + , networkDriver :: !(Maybe Text) -- ^ "Driver" - The name of the driver used to create the network (e.g. `bridge`, `overlay`). + , networkEnableIpv6 :: !(Maybe Bool) -- ^ "EnableIPv6" - Whether the network was created with IPv6 enabled. + , networkIpam :: !(Maybe IPAM) -- ^ "IPAM" + , networkInternal :: !(Maybe Bool) -- ^ "Internal" - Whether the network is created to only allow internal networking connectivity. + , networkAttachable :: !(Maybe Bool) -- ^ "Attachable" - Wheter a global / swarm scope network is manually attachable by regular containers from workers in swarm mode. + , networkIngress :: !(Maybe Bool) -- ^ "Ingress" - Whether the network is providing the routing-mesh for the swarm cluster. + , networkConfigFrom :: !(Maybe ConfigReference) -- ^ "ConfigFrom" + , networkConfigOnly :: !(Maybe Bool) -- ^ "ConfigOnly" - Whether the network is a config-only network. Config-only networks are placeholder networks for network configurations to be used by other networks. Config-only networks cannot be used directly to run containers or services. + , networkContainers :: !(Maybe (Map.Map String NetworkContainer)) -- ^ "Containers" - Contains endpoints attached to the network. + , networkOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - Network-specific options uses when creating the network. + , networkLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , networkPeers :: !(Maybe [PeerInfo]) -- ^ "Peers" - List of peer nodes for an overlay network. This field is only present for overlay networks, and omitted for other network types. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Network +instance A.FromJSON Network where + parseJSON = A.withObject "Network" $ \o -> + Network + <$> (o .:? "Name") + <*> (o .:? "Id") + <*> (o .:? "Created") + <*> (o .:? "Scope") + <*> (o .:? "Driver") + <*> (o .:? "EnableIPv6") + <*> (o .:? "IPAM") + <*> (o .:? "Internal") + <*> (o .:? "Attachable") + <*> (o .:? "Ingress") + <*> (o .:? "ConfigFrom") + <*> (o .:? "ConfigOnly") + <*> (o .:? "Containers") + <*> (o .:? "Options") + <*> (o .:? "Labels") + <*> (o .:? "Peers") + +-- | ToJSON Network +instance A.ToJSON Network where + toJSON Network {..} = + _omitNulls + [ "Name" .= networkName + , "Id" .= networkId + , "Created" .= networkCreated + , "Scope" .= networkScope + , "Driver" .= networkDriver + , "EnableIPv6" .= networkEnableIpv6 + , "IPAM" .= networkIpam + , "Internal" .= networkInternal + , "Attachable" .= networkAttachable + , "Ingress" .= networkIngress + , "ConfigFrom" .= networkConfigFrom + , "ConfigOnly" .= networkConfigOnly + , "Containers" .= networkContainers + , "Options" .= networkOptions + , "Labels" .= networkLabels + , "Peers" .= networkPeers + ] + + +-- | Construct a value of type 'Network' (by applying it's required fields, if any) +mkNetwork + :: Network +mkNetwork = + Network + { networkName = Nothing + , networkId = Nothing + , networkCreated = Nothing + , networkScope = Nothing + , networkDriver = Nothing + , networkEnableIpv6 = Nothing + , networkIpam = Nothing + , networkInternal = Nothing + , networkAttachable = Nothing + , networkIngress = Nothing + , networkConfigFrom = Nothing + , networkConfigOnly = Nothing + , networkContainers = Nothing + , networkOptions = Nothing + , networkLabels = Nothing + , networkPeers = Nothing + } + +-- ** NetworkAttachmentConfig +-- | NetworkAttachmentConfig +-- Specifies how a service should be attached to a particular network. +data NetworkAttachmentConfig = NetworkAttachmentConfig + { networkAttachmentConfigTarget :: !(Maybe Text) -- ^ "Target" - The target network for attachment. Must be a network name or ID. + , networkAttachmentConfigAliases :: !(Maybe [Text]) -- ^ "Aliases" - Discoverable alternate names for the service on this network. + , networkAttachmentConfigDriverOpts :: !(Maybe (Map.Map String Text)) -- ^ "DriverOpts" - Driver attachment options for the network target. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkAttachmentConfig +instance A.FromJSON NetworkAttachmentConfig where + parseJSON = A.withObject "NetworkAttachmentConfig" $ \o -> + NetworkAttachmentConfig + <$> (o .:? "Target") + <*> (o .:? "Aliases") + <*> (o .:? "DriverOpts") + +-- | ToJSON NetworkAttachmentConfig +instance A.ToJSON NetworkAttachmentConfig where + toJSON NetworkAttachmentConfig {..} = + _omitNulls + [ "Target" .= networkAttachmentConfigTarget + , "Aliases" .= networkAttachmentConfigAliases + , "DriverOpts" .= networkAttachmentConfigDriverOpts + ] + + +-- | Construct a value of type 'NetworkAttachmentConfig' (by applying it's required fields, if any) +mkNetworkAttachmentConfig + :: NetworkAttachmentConfig +mkNetworkAttachmentConfig = + NetworkAttachmentConfig + { networkAttachmentConfigTarget = Nothing + , networkAttachmentConfigAliases = Nothing + , networkAttachmentConfigDriverOpts = Nothing + } + +-- ** NetworkConnectRequest +-- | NetworkConnectRequest +-- NetworkConnectRequest +-- +data NetworkConnectRequest = NetworkConnectRequest + { networkConnectRequestContainer :: !(Maybe Text) -- ^ "Container" - The ID or name of the container to connect to the network. + , networkConnectRequestEndpointConfig :: !(Maybe EndpointSettings) -- ^ "EndpointConfig" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkConnectRequest +instance A.FromJSON NetworkConnectRequest where + parseJSON = A.withObject "NetworkConnectRequest" $ \o -> + NetworkConnectRequest + <$> (o .:? "Container") + <*> (o .:? "EndpointConfig") + +-- | ToJSON NetworkConnectRequest +instance A.ToJSON NetworkConnectRequest where + toJSON NetworkConnectRequest {..} = + _omitNulls + [ "Container" .= networkConnectRequestContainer + , "EndpointConfig" .= networkConnectRequestEndpointConfig + ] + + +-- | Construct a value of type 'NetworkConnectRequest' (by applying it's required fields, if any) +mkNetworkConnectRequest + :: NetworkConnectRequest +mkNetworkConnectRequest = + NetworkConnectRequest + { networkConnectRequestContainer = Nothing + , networkConnectRequestEndpointConfig = Nothing + } + +-- ** NetworkContainer +-- | NetworkContainer +data NetworkContainer = NetworkContainer + { networkContainerName :: !(Maybe Text) -- ^ "Name" + , networkContainerEndpointId :: !(Maybe Text) -- ^ "EndpointID" + , networkContainerMacAddress :: !(Maybe Text) -- ^ "MacAddress" + , networkContainerIpv4Address :: !(Maybe Text) -- ^ "IPv4Address" + , networkContainerIpv6Address :: !(Maybe Text) -- ^ "IPv6Address" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkContainer +instance A.FromJSON NetworkContainer where + parseJSON = A.withObject "NetworkContainer" $ \o -> + NetworkContainer + <$> (o .:? "Name") + <*> (o .:? "EndpointID") + <*> (o .:? "MacAddress") + <*> (o .:? "IPv4Address") + <*> (o .:? "IPv6Address") + +-- | ToJSON NetworkContainer +instance A.ToJSON NetworkContainer where + toJSON NetworkContainer {..} = + _omitNulls + [ "Name" .= networkContainerName + , "EndpointID" .= networkContainerEndpointId + , "MacAddress" .= networkContainerMacAddress + , "IPv4Address" .= networkContainerIpv4Address + , "IPv6Address" .= networkContainerIpv6Address + ] + + +-- | Construct a value of type 'NetworkContainer' (by applying it's required fields, if any) +mkNetworkContainer + :: NetworkContainer +mkNetworkContainer = + NetworkContainer + { networkContainerName = Nothing + , networkContainerEndpointId = Nothing + , networkContainerMacAddress = Nothing + , networkContainerIpv4Address = Nothing + , networkContainerIpv6Address = Nothing + } + +-- ** NetworkCreateRequest +-- | NetworkCreateRequest +-- NetworkCreateRequest +-- +data NetworkCreateRequest = NetworkCreateRequest + { networkCreateRequestName :: !(Text) -- ^ /Required/ "Name" - The network's name. + , networkCreateRequestDriver :: !(Maybe Text) -- ^ "Driver" - Name of the network driver plugin to use. + , networkCreateRequestScope :: !(Maybe Text) -- ^ "Scope" - The level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine level). + , networkCreateRequestInternal :: !(Maybe Bool) -- ^ "Internal" - Restrict external access to the network. + , networkCreateRequestAttachable :: !(Maybe Bool) -- ^ "Attachable" - Globally scoped network is manually attachable by regular containers from workers in swarm mode. + , networkCreateRequestIngress :: !(Maybe Bool) -- ^ "Ingress" - Ingress network is the network which provides the routing-mesh in swarm mode. + , networkCreateRequestConfigOnly :: !(Maybe Bool) -- ^ "ConfigOnly" - Creates a config-only network. Config-only networks are placeholder networks for network configurations to be used by other networks. Config-only networks cannot be used directly to run containers or services. + , networkCreateRequestConfigFrom :: !(Maybe ConfigReference) -- ^ "ConfigFrom" + , networkCreateRequestIpam :: !(Maybe IPAM) -- ^ "IPAM" + , networkCreateRequestEnableIpv6 :: !(Maybe Bool) -- ^ "EnableIPv6" - Enable IPv6 on the network. + , networkCreateRequestOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - Network specific options to be used by the drivers. + , networkCreateRequestLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkCreateRequest +instance A.FromJSON NetworkCreateRequest where + parseJSON = A.withObject "NetworkCreateRequest" $ \o -> + NetworkCreateRequest + <$> (o .: "Name") + <*> (o .:? "Driver") + <*> (o .:? "Scope") + <*> (o .:? "Internal") + <*> (o .:? "Attachable") + <*> (o .:? "Ingress") + <*> (o .:? "ConfigOnly") + <*> (o .:? "ConfigFrom") + <*> (o .:? "IPAM") + <*> (o .:? "EnableIPv6") + <*> (o .:? "Options") + <*> (o .:? "Labels") + +-- | ToJSON NetworkCreateRequest +instance A.ToJSON NetworkCreateRequest where + toJSON NetworkCreateRequest {..} = + _omitNulls + [ "Name" .= networkCreateRequestName + , "Driver" .= networkCreateRequestDriver + , "Scope" .= networkCreateRequestScope + , "Internal" .= networkCreateRequestInternal + , "Attachable" .= networkCreateRequestAttachable + , "Ingress" .= networkCreateRequestIngress + , "ConfigOnly" .= networkCreateRequestConfigOnly + , "ConfigFrom" .= networkCreateRequestConfigFrom + , "IPAM" .= networkCreateRequestIpam + , "EnableIPv6" .= networkCreateRequestEnableIpv6 + , "Options" .= networkCreateRequestOptions + , "Labels" .= networkCreateRequestLabels + ] + + +-- | Construct a value of type 'NetworkCreateRequest' (by applying it's required fields, if any) +mkNetworkCreateRequest + :: Text -- ^ 'networkCreateRequestName': The network's name. + -> NetworkCreateRequest +mkNetworkCreateRequest networkCreateRequestName = + NetworkCreateRequest + { networkCreateRequestName + , networkCreateRequestDriver = Nothing + , networkCreateRequestScope = Nothing + , networkCreateRequestInternal = Nothing + , networkCreateRequestAttachable = Nothing + , networkCreateRequestIngress = Nothing + , networkCreateRequestConfigOnly = Nothing + , networkCreateRequestConfigFrom = Nothing + , networkCreateRequestIpam = Nothing + , networkCreateRequestEnableIpv6 = Nothing + , networkCreateRequestOptions = Nothing + , networkCreateRequestLabels = Nothing + } + +-- ** NetworkCreateResponse +-- | NetworkCreateResponse +-- NetworkCreateResponse +-- +-- OK response to NetworkCreate operation +data NetworkCreateResponse = NetworkCreateResponse + { networkCreateResponseId :: !(Text) -- ^ /Required/ "Id" - The ID of the created network. + , networkCreateResponseWarning :: !(Text) -- ^ /Required/ "Warning" - Warnings encountered when creating the container + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkCreateResponse +instance A.FromJSON NetworkCreateResponse where + parseJSON = A.withObject "NetworkCreateResponse" $ \o -> + NetworkCreateResponse + <$> (o .: "Id") + <*> (o .: "Warning") + +-- | ToJSON NetworkCreateResponse +instance A.ToJSON NetworkCreateResponse where + toJSON NetworkCreateResponse {..} = + _omitNulls + [ "Id" .= networkCreateResponseId + , "Warning" .= networkCreateResponseWarning + ] + + +-- | Construct a value of type 'NetworkCreateResponse' (by applying it's required fields, if any) +mkNetworkCreateResponse + :: Text -- ^ 'networkCreateResponseId': The ID of the created network. + -> Text -- ^ 'networkCreateResponseWarning': Warnings encountered when creating the container + -> NetworkCreateResponse +mkNetworkCreateResponse networkCreateResponseId networkCreateResponseWarning = + NetworkCreateResponse + { networkCreateResponseId + , networkCreateResponseWarning + } + +-- ** NetworkDisconnectRequest +-- | NetworkDisconnectRequest +-- NetworkDisconnectRequest +-- +data NetworkDisconnectRequest = NetworkDisconnectRequest + { networkDisconnectRequestContainer :: !(Maybe Text) -- ^ "Container" - The ID or name of the container to disconnect from the network. + , networkDisconnectRequestForce :: !(Maybe Bool) -- ^ "Force" - Force the container to disconnect from the network. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkDisconnectRequest +instance A.FromJSON NetworkDisconnectRequest where + parseJSON = A.withObject "NetworkDisconnectRequest" $ \o -> + NetworkDisconnectRequest + <$> (o .:? "Container") + <*> (o .:? "Force") + +-- | ToJSON NetworkDisconnectRequest +instance A.ToJSON NetworkDisconnectRequest where + toJSON NetworkDisconnectRequest {..} = + _omitNulls + [ "Container" .= networkDisconnectRequestContainer + , "Force" .= networkDisconnectRequestForce + ] + + +-- | Construct a value of type 'NetworkDisconnectRequest' (by applying it's required fields, if any) +mkNetworkDisconnectRequest + :: NetworkDisconnectRequest +mkNetworkDisconnectRequest = + NetworkDisconnectRequest + { networkDisconnectRequestContainer = Nothing + , networkDisconnectRequestForce = Nothing + } + +-- ** NetworkPruneResponse +-- | NetworkPruneResponse +-- NetworkPruneResponse +-- +data NetworkPruneResponse = NetworkPruneResponse + { networkPruneResponseNetworksDeleted :: !(Maybe [Text]) -- ^ "NetworksDeleted" - Networks that were deleted + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkPruneResponse +instance A.FromJSON NetworkPruneResponse where + parseJSON = A.withObject "NetworkPruneResponse" $ \o -> + NetworkPruneResponse + <$> (o .:? "NetworksDeleted") + +-- | ToJSON NetworkPruneResponse +instance A.ToJSON NetworkPruneResponse where + toJSON NetworkPruneResponse {..} = + _omitNulls + [ "NetworksDeleted" .= networkPruneResponseNetworksDeleted + ] + + +-- | Construct a value of type 'NetworkPruneResponse' (by applying it's required fields, if any) +mkNetworkPruneResponse + :: NetworkPruneResponse +mkNetworkPruneResponse = + NetworkPruneResponse + { networkPruneResponseNetworksDeleted = Nothing + } + +-- ** NetworkSettings +-- | NetworkSettings +-- NetworkSettings exposes the network settings in the API +data NetworkSettings = NetworkSettings + { networkSettingsBridge :: !(Maybe Text) -- ^ "Bridge" - Name of the default bridge interface when dockerd's --bridge flag is set. + , networkSettingsSandboxId :: !(Maybe Text) -- ^ "SandboxID" - SandboxID uniquely represents a container's network stack. + , networkSettingsHairpinMode :: !(Maybe Bool) -- ^ "HairpinMode" - Indicates if hairpin NAT should be enabled on the virtual interface. Deprecated: This field is never set and will be removed in a future release. + , networkSettingsLinkLocalIpv6Address :: !(Maybe Text) -- ^ "LinkLocalIPv6Address" - IPv6 unicast address using the link-local prefix. Deprecated: This field is never set and will be removed in a future release. + , networkSettingsLinkLocalIpv6PrefixLen :: !(Maybe Int) -- ^ "LinkLocalIPv6PrefixLen" - Prefix length of the IPv6 unicast address. Deprecated: This field is never set and will be removed in a future release. + , networkSettingsPorts :: !(Maybe (Map.Map String [PortBinding])) -- ^ "Ports" - PortMap describes the mapping of container ports to host ports, using the container's port-number and protocol as key in the format `<port>/<protocol>`, for example, `80/udp`. If a container's port is mapped for multiple protocols, separate entries are added to the mapping table. + , networkSettingsSandboxKey :: !(Maybe Text) -- ^ "SandboxKey" - SandboxKey is the full path of the netns handle + , networkSettingsSecondaryIpAddresses :: !(Maybe [Address]) -- ^ "SecondaryIPAddresses" - Deprecated: This field is never set and will be removed in a future release. + , networkSettingsSecondaryIpv6Addresses :: !(Maybe [Address]) -- ^ "SecondaryIPv6Addresses" - Deprecated: This field is never set and will be removed in a future release. + , networkSettingsEndpointId :: !(Maybe Text) -- ^ "EndpointID" - EndpointID uniquely represents a service endpoint in a Sandbox. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsGateway :: !(Maybe Text) -- ^ "Gateway" - Gateway address for the default \"bridge\" network. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsGlobalIpv6Address :: !(Maybe Text) -- ^ "GlobalIPv6Address" - Global IPv6 address for the default \"bridge\" network. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsGlobalIpv6PrefixLen :: !(Maybe Int) -- ^ "GlobalIPv6PrefixLen" - Mask length of the global IPv6 address. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsIpAddress :: !(Maybe Text) -- ^ "IPAddress" - IPv4 address for the default \"bridge\" network. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsIpPrefixLen :: !(Maybe Int) -- ^ "IPPrefixLen" - Mask length of the IPv4 address. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsIpv6Gateway :: !(Maybe Text) -- ^ "IPv6Gateway" - IPv6 gateway address for this network. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsMacAddress :: !(Maybe Text) -- ^ "MacAddress" - MAC address for the container on the default \"bridge\" network. <p><br /></p> > **Deprecated**: This field is only propagated when attached to the > default \"bridge\" network. Use the information from the \"bridge\" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 + , networkSettingsNetworks :: !(Maybe (Map.Map String EndpointSettings)) -- ^ "Networks" - Information about all networks that the container is connected to. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkSettings +instance A.FromJSON NetworkSettings where + parseJSON = A.withObject "NetworkSettings" $ \o -> + NetworkSettings + <$> (o .:? "Bridge") + <*> (o .:? "SandboxID") + <*> (o .:? "HairpinMode") + <*> (o .:? "LinkLocalIPv6Address") + <*> (o .:? "LinkLocalIPv6PrefixLen") + <*> (o .:? "Ports") + <*> (o .:? "SandboxKey") + <*> (o .:? "SecondaryIPAddresses") + <*> (o .:? "SecondaryIPv6Addresses") + <*> (o .:? "EndpointID") + <*> (o .:? "Gateway") + <*> (o .:? "GlobalIPv6Address") + <*> (o .:? "GlobalIPv6PrefixLen") + <*> (o .:? "IPAddress") + <*> (o .:? "IPPrefixLen") + <*> (o .:? "IPv6Gateway") + <*> (o .:? "MacAddress") + <*> (o .:? "Networks") + +-- | ToJSON NetworkSettings +instance A.ToJSON NetworkSettings where + toJSON NetworkSettings {..} = + _omitNulls + [ "Bridge" .= networkSettingsBridge + , "SandboxID" .= networkSettingsSandboxId + , "HairpinMode" .= networkSettingsHairpinMode + , "LinkLocalIPv6Address" .= networkSettingsLinkLocalIpv6Address + , "LinkLocalIPv6PrefixLen" .= networkSettingsLinkLocalIpv6PrefixLen + , "Ports" .= networkSettingsPorts + , "SandboxKey" .= networkSettingsSandboxKey + , "SecondaryIPAddresses" .= networkSettingsSecondaryIpAddresses + , "SecondaryIPv6Addresses" .= networkSettingsSecondaryIpv6Addresses + , "EndpointID" .= networkSettingsEndpointId + , "Gateway" .= networkSettingsGateway + , "GlobalIPv6Address" .= networkSettingsGlobalIpv6Address + , "GlobalIPv6PrefixLen" .= networkSettingsGlobalIpv6PrefixLen + , "IPAddress" .= networkSettingsIpAddress + , "IPPrefixLen" .= networkSettingsIpPrefixLen + , "IPv6Gateway" .= networkSettingsIpv6Gateway + , "MacAddress" .= networkSettingsMacAddress + , "Networks" .= networkSettingsNetworks + ] + + +-- | Construct a value of type 'NetworkSettings' (by applying it's required fields, if any) +mkNetworkSettings + :: NetworkSettings +mkNetworkSettings = + NetworkSettings + { networkSettingsBridge = Nothing + , networkSettingsSandboxId = Nothing + , networkSettingsHairpinMode = Nothing + , networkSettingsLinkLocalIpv6Address = Nothing + , networkSettingsLinkLocalIpv6PrefixLen = Nothing + , networkSettingsPorts = Nothing + , networkSettingsSandboxKey = Nothing + , networkSettingsSecondaryIpAddresses = Nothing + , networkSettingsSecondaryIpv6Addresses = Nothing + , networkSettingsEndpointId = Nothing + , networkSettingsGateway = Nothing + , networkSettingsGlobalIpv6Address = Nothing + , networkSettingsGlobalIpv6PrefixLen = Nothing + , networkSettingsIpAddress = Nothing + , networkSettingsIpPrefixLen = Nothing + , networkSettingsIpv6Gateway = Nothing + , networkSettingsMacAddress = Nothing + , networkSettingsNetworks = Nothing + } + +-- ** NetworkingConfig +-- | NetworkingConfig +-- NetworkingConfig represents the container's networking configuration for each of its interfaces. It is used for the networking configs specified in the `docker create` and `docker network connect` commands. +data NetworkingConfig = NetworkingConfig + { networkingConfigEndpointsConfig :: !(Maybe (Map.Map String EndpointSettings)) -- ^ "EndpointsConfig" - A mapping of network name to endpoint configuration for that network. The endpoint configuration can be left empty to connect to that network with no particular endpoint configuration. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NetworkingConfig +instance A.FromJSON NetworkingConfig where + parseJSON = A.withObject "NetworkingConfig" $ \o -> + NetworkingConfig + <$> (o .:? "EndpointsConfig") + +-- | ToJSON NetworkingConfig +instance A.ToJSON NetworkingConfig where + toJSON NetworkingConfig {..} = + _omitNulls + [ "EndpointsConfig" .= networkingConfigEndpointsConfig + ] + + +-- | Construct a value of type 'NetworkingConfig' (by applying it's required fields, if any) +mkNetworkingConfig + :: NetworkingConfig +mkNetworkingConfig = + NetworkingConfig + { networkingConfigEndpointsConfig = Nothing + } + +-- ** Node +-- | Node +data Node = Node + { nodeId :: !(Maybe Text) -- ^ "ID" + , nodeVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , nodeCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" - Date and time at which the node was added to the swarm in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , nodeUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" - Date and time at which the node was last updated in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , nodeSpec :: !(Maybe NodeSpec) -- ^ "Spec" + , nodeDescription :: !(Maybe NodeDescription) -- ^ "Description" + , nodeStatus :: !(Maybe NodeStatus) -- ^ "Status" + , nodeManagerStatus :: !(Maybe ManagerStatus) -- ^ "ManagerStatus" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Node +instance A.FromJSON Node where + parseJSON = A.withObject "Node" $ \o -> + Node + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + <*> (o .:? "Description") + <*> (o .:? "Status") + <*> (o .:? "ManagerStatus") + +-- | ToJSON Node +instance A.ToJSON Node where + toJSON Node {..} = + _omitNulls + [ "ID" .= nodeId + , "Version" .= nodeVersion + , "CreatedAt" .= nodeCreatedAt + , "UpdatedAt" .= nodeUpdatedAt + , "Spec" .= nodeSpec + , "Description" .= nodeDescription + , "Status" .= nodeStatus + , "ManagerStatus" .= nodeManagerStatus + ] + + +-- | Construct a value of type 'Node' (by applying it's required fields, if any) +mkNode + :: Node +mkNode = + Node + { nodeId = Nothing + , nodeVersion = Nothing + , nodeCreatedAt = Nothing + , nodeUpdatedAt = Nothing + , nodeSpec = Nothing + , nodeDescription = Nothing + , nodeStatus = Nothing + , nodeManagerStatus = Nothing + } + +-- ** NodeDescription +-- | NodeDescription +-- NodeDescription encapsulates the properties of the Node as reported by the agent. +data NodeDescription = NodeDescription + { nodeDescriptionHostname :: !(Maybe Text) -- ^ "Hostname" + , nodeDescriptionPlatform :: !(Maybe Platform) -- ^ "Platform" + , nodeDescriptionResources :: !(Maybe ResourceObject) -- ^ "Resources" + , nodeDescriptionEngine :: !(Maybe EngineDescription) -- ^ "Engine" + , nodeDescriptionTlsInfo :: !(Maybe TLSInfo) -- ^ "TLSInfo" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NodeDescription +instance A.FromJSON NodeDescription where + parseJSON = A.withObject "NodeDescription" $ \o -> + NodeDescription + <$> (o .:? "Hostname") + <*> (o .:? "Platform") + <*> (o .:? "Resources") + <*> (o .:? "Engine") + <*> (o .:? "TLSInfo") + +-- | ToJSON NodeDescription +instance A.ToJSON NodeDescription where + toJSON NodeDescription {..} = + _omitNulls + [ "Hostname" .= nodeDescriptionHostname + , "Platform" .= nodeDescriptionPlatform + , "Resources" .= nodeDescriptionResources + , "Engine" .= nodeDescriptionEngine + , "TLSInfo" .= nodeDescriptionTlsInfo + ] + + +-- | Construct a value of type 'NodeDescription' (by applying it's required fields, if any) +mkNodeDescription + :: NodeDescription +mkNodeDescription = + NodeDescription + { nodeDescriptionHostname = Nothing + , nodeDescriptionPlatform = Nothing + , nodeDescriptionResources = Nothing + , nodeDescriptionEngine = Nothing + , nodeDescriptionTlsInfo = Nothing + } + +-- ** NodeSpec +-- | NodeSpec +data NodeSpec = NodeSpec + { nodeSpecName :: !(Maybe Text) -- ^ "Name" - Name for the node. + , nodeSpecLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , nodeSpecRole :: !(Maybe E'Role) -- ^ "Role" - Role of the node. + , nodeSpecAvailability :: !(Maybe E'Availability) -- ^ "Availability" - Availability of the node. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NodeSpec +instance A.FromJSON NodeSpec where + parseJSON = A.withObject "NodeSpec" $ \o -> + NodeSpec + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Role") + <*> (o .:? "Availability") + +-- | ToJSON NodeSpec +instance A.ToJSON NodeSpec where + toJSON NodeSpec {..} = + _omitNulls + [ "Name" .= nodeSpecName + , "Labels" .= nodeSpecLabels + , "Role" .= nodeSpecRole + , "Availability" .= nodeSpecAvailability + ] + + +-- | Construct a value of type 'NodeSpec' (by applying it's required fields, if any) +mkNodeSpec + :: NodeSpec +mkNodeSpec = + NodeSpec + { nodeSpecName = Nothing + , nodeSpecLabels = Nothing + , nodeSpecRole = Nothing + , nodeSpecAvailability = Nothing + } + +-- ** NodeStatus +-- | NodeStatus +-- NodeStatus represents the status of a node. It provides the current status of the node, as seen by the manager. +data NodeStatus = NodeStatus + { nodeStatusState :: !(Maybe NodeState) -- ^ "State" + , nodeStatusMessage :: !(Maybe Text) -- ^ "Message" + , nodeStatusAddr :: !(Maybe Text) -- ^ "Addr" - IP address of the node. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON NodeStatus +instance A.FromJSON NodeStatus where + parseJSON = A.withObject "NodeStatus" $ \o -> + NodeStatus + <$> (o .:? "State") + <*> (o .:? "Message") + <*> (o .:? "Addr") + +-- | ToJSON NodeStatus +instance A.ToJSON NodeStatus where + toJSON NodeStatus {..} = + _omitNulls + [ "State" .= nodeStatusState + , "Message" .= nodeStatusMessage + , "Addr" .= nodeStatusAddr + ] + + +-- | Construct a value of type 'NodeStatus' (by applying it's required fields, if any) +mkNodeStatus + :: NodeStatus +mkNodeStatus = + NodeStatus + { nodeStatusState = Nothing + , nodeStatusMessage = Nothing + , nodeStatusAddr = Nothing + } + +-- ** OCIDescriptor +-- | OCIDescriptor +-- 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). +data OCIDescriptor = OCIDescriptor + { oCIDescriptorMediaType :: !(Maybe Text) -- ^ "mediaType" - The media type of the object this schema refers to. + , oCIDescriptorDigest :: !(Maybe Text) -- ^ "digest" - The digest of the targeted content. + , oCIDescriptorSize :: !(Maybe Integer) -- ^ "size" - The size in bytes of the blob. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON OCIDescriptor +instance A.FromJSON OCIDescriptor where + parseJSON = A.withObject "OCIDescriptor" $ \o -> + OCIDescriptor + <$> (o .:? "mediaType") + <*> (o .:? "digest") + <*> (o .:? "size") + +-- | ToJSON OCIDescriptor +instance A.ToJSON OCIDescriptor where + toJSON OCIDescriptor {..} = + _omitNulls + [ "mediaType" .= oCIDescriptorMediaType + , "digest" .= oCIDescriptorDigest + , "size" .= oCIDescriptorSize + ] + + +-- | Construct a value of type 'OCIDescriptor' (by applying it's required fields, if any) +mkOCIDescriptor + :: OCIDescriptor +mkOCIDescriptor = + OCIDescriptor + { oCIDescriptorMediaType = Nothing + , oCIDescriptorDigest = Nothing + , oCIDescriptorSize = Nothing + } + +-- ** OCIPlatform +-- | OCIPlatform +-- 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). +data OCIPlatform = OCIPlatform + { oCIPlatformArchitecture :: !(Maybe Text) -- ^ "architecture" - The CPU architecture, for example `amd64` or `ppc64`. + , oCIPlatformOs :: !(Maybe Text) -- ^ "os" - The operating system, for example `linux` or `windows`. + , oCIPlatformOsVersion :: !(Maybe Text) -- ^ "os.version" - Optional field specifying the operating system version, for example on Windows `10.0.19041.1165`. + , oCIPlatformOsFeatures :: !(Maybe [Text]) -- ^ "os.features" - Optional field specifying an array of strings, each listing a required OS feature (for example on Windows `win32k`). + , oCIPlatformVariant :: !(Maybe Text) -- ^ "variant" - Optional field specifying a variant of the CPU, for example `v7` to specify ARMv7 when architecture is `arm`. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON OCIPlatform +instance A.FromJSON OCIPlatform where + parseJSON = A.withObject "OCIPlatform" $ \o -> + OCIPlatform + <$> (o .:? "architecture") + <*> (o .:? "os") + <*> (o .:? "os.version") + <*> (o .:? "os.features") + <*> (o .:? "variant") + +-- | ToJSON OCIPlatform +instance A.ToJSON OCIPlatform where + toJSON OCIPlatform {..} = + _omitNulls + [ "architecture" .= oCIPlatformArchitecture + , "os" .= oCIPlatformOs + , "os.version" .= oCIPlatformOsVersion + , "os.features" .= oCIPlatformOsFeatures + , "variant" .= oCIPlatformVariant + ] + + +-- | Construct a value of type 'OCIPlatform' (by applying it's required fields, if any) +mkOCIPlatform + :: OCIPlatform +mkOCIPlatform = + OCIPlatform + { oCIPlatformArchitecture = Nothing + , oCIPlatformOs = Nothing + , oCIPlatformOsVersion = Nothing + , oCIPlatformOsFeatures = Nothing + , oCIPlatformVariant = Nothing + } + +-- ** ObjectVersion +-- | ObjectVersion +-- 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. +data ObjectVersion = ObjectVersion + { objectVersionIndex :: !(Maybe Int) -- ^ "Index" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ObjectVersion +instance A.FromJSON ObjectVersion where + parseJSON = A.withObject "ObjectVersion" $ \o -> + ObjectVersion + <$> (o .:? "Index") + +-- | ToJSON ObjectVersion +instance A.ToJSON ObjectVersion where + toJSON ObjectVersion {..} = + _omitNulls + [ "Index" .= objectVersionIndex + ] + + +-- | Construct a value of type 'ObjectVersion' (by applying it's required fields, if any) +mkObjectVersion + :: ObjectVersion +mkObjectVersion = + ObjectVersion + { objectVersionIndex = Nothing + } + +-- ** PeerInfo +-- | PeerInfo +-- PeerInfo represents one peer of an overlay network. +data PeerInfo = PeerInfo + { peerInfoName :: !(Maybe Text) -- ^ "Name" - ID of the peer-node in the Swarm cluster. + , peerInfoIp :: !(Maybe Text) -- ^ "IP" - IP-address of the peer-node in the Swarm cluster. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PeerInfo +instance A.FromJSON PeerInfo where + parseJSON = A.withObject "PeerInfo" $ \o -> + PeerInfo + <$> (o .:? "Name") + <*> (o .:? "IP") + +-- | ToJSON PeerInfo +instance A.ToJSON PeerInfo where + toJSON PeerInfo {..} = + _omitNulls + [ "Name" .= peerInfoName + , "IP" .= peerInfoIp + ] + + +-- | Construct a value of type 'PeerInfo' (by applying it's required fields, if any) +mkPeerInfo + :: PeerInfo +mkPeerInfo = + PeerInfo + { peerInfoName = Nothing + , peerInfoIp = Nothing + } + +-- ** PeerNode +-- | PeerNode +-- Represents a peer-node in the swarm +data PeerNode = PeerNode + { peerNodeNodeId :: !(Maybe Text) -- ^ "NodeID" - Unique identifier of for this node in the swarm. + , peerNodeAddr :: !(Maybe Text) -- ^ "Addr" - IP address and ports at which this node can be reached. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PeerNode +instance A.FromJSON PeerNode where + parseJSON = A.withObject "PeerNode" $ \o -> + PeerNode + <$> (o .:? "NodeID") + <*> (o .:? "Addr") + +-- | ToJSON PeerNode +instance A.ToJSON PeerNode where + toJSON PeerNode {..} = + _omitNulls + [ "NodeID" .= peerNodeNodeId + , "Addr" .= peerNodeAddr + ] + + +-- | Construct a value of type 'PeerNode' (by applying it's required fields, if any) +mkPeerNode + :: PeerNode +mkPeerNode = + PeerNode + { peerNodeNodeId = Nothing + , peerNodeAddr = Nothing + } + +-- ** Platform +-- | Platform +-- Platform represents the platform (Arch/OS). +data Platform = Platform + { platformArchitecture :: !(Maybe Text) -- ^ "Architecture" - Architecture represents the hardware architecture (for example, `x86_64`). + , platformOs :: !(Maybe Text) -- ^ "OS" - OS represents the Operating System (for example, `linux` or `windows`). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Platform +instance A.FromJSON Platform where + parseJSON = A.withObject "Platform" $ \o -> + Platform + <$> (o .:? "Architecture") + <*> (o .:? "OS") + +-- | ToJSON Platform +instance A.ToJSON Platform where + toJSON Platform {..} = + _omitNulls + [ "Architecture" .= platformArchitecture + , "OS" .= platformOs + ] + + +-- | Construct a value of type 'Platform' (by applying it's required fields, if any) +mkPlatform + :: Platform +mkPlatform = + Platform + { platformArchitecture = Nothing + , platformOs = Nothing + } + +-- ** Plugin +-- | Plugin +-- A plugin for the Engine API +data Plugin = Plugin + { pluginId :: !(Maybe Text) -- ^ "Id" + , pluginName :: !(Text) -- ^ /Required/ "Name" + , pluginEnabled :: !(Bool) -- ^ /Required/ "Enabled" - True if the plugin is running. False if the plugin is not running, only installed. + , pluginSettings :: !(PluginSettings) -- ^ /Required/ "Settings" + , pluginPluginReference :: !(Maybe Text) -- ^ "PluginReference" - plugin remote reference used to push/pull the plugin + , pluginConfig :: !(PluginConfig) -- ^ /Required/ "Config" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Plugin +instance A.FromJSON Plugin where + parseJSON = A.withObject "Plugin" $ \o -> + Plugin + <$> (o .:? "Id") + <*> (o .: "Name") + <*> (o .: "Enabled") + <*> (o .: "Settings") + <*> (o .:? "PluginReference") + <*> (o .: "Config") + +-- | ToJSON Plugin +instance A.ToJSON Plugin where + toJSON Plugin {..} = + _omitNulls + [ "Id" .= pluginId + , "Name" .= pluginName + , "Enabled" .= pluginEnabled + , "Settings" .= pluginSettings + , "PluginReference" .= pluginPluginReference + , "Config" .= pluginConfig + ] + + +-- | Construct a value of type 'Plugin' (by applying it's required fields, if any) +mkPlugin + :: Text -- ^ 'pluginName' + -> Bool -- ^ 'pluginEnabled': True if the plugin is running. False if the plugin is not running, only installed. + -> PluginSettings -- ^ 'pluginSettings' + -> PluginConfig -- ^ 'pluginConfig' + -> Plugin +mkPlugin pluginName pluginEnabled pluginSettings pluginConfig = + Plugin + { pluginId = Nothing + , pluginName + , pluginEnabled + , pluginSettings + , pluginPluginReference = Nothing + , pluginConfig + } + +-- ** PluginConfig +-- | PluginConfig +-- The config of a plugin. +data PluginConfig = PluginConfig + { pluginConfigDockerVersion :: !(Maybe Text) -- ^ "DockerVersion" - Docker Version used to create the plugin + , pluginConfigDescription :: !(Text) -- ^ /Required/ "Description" + , pluginConfigDocumentation :: !(Text) -- ^ /Required/ "Documentation" + , pluginConfigInterface :: !(PluginConfigInterface) -- ^ /Required/ "Interface" + , pluginConfigEntrypoint :: !([Text]) -- ^ /Required/ "Entrypoint" + , pluginConfigWorkDir :: !(Text) -- ^ /Required/ "WorkDir" + , pluginConfigUser :: !(Maybe PluginConfigUser) -- ^ "User" + , pluginConfigNetwork :: !(PluginConfigNetwork) -- ^ /Required/ "Network" + , pluginConfigLinux :: !(PluginConfigLinux) -- ^ /Required/ "Linux" + , pluginConfigPropagatedMount :: !(Text) -- ^ /Required/ "PropagatedMount" + , pluginConfigIpcHost :: !(Bool) -- ^ /Required/ "IpcHost" + , pluginConfigPidHost :: !(Bool) -- ^ /Required/ "PidHost" + , pluginConfigMounts :: !([PluginMount]) -- ^ /Required/ "Mounts" + , pluginConfigEnv :: !([PluginEnv]) -- ^ /Required/ "Env" + , pluginConfigArgs :: !(PluginConfigArgs) -- ^ /Required/ "Args" + , pluginConfigRootfs :: !(Maybe PluginConfigRootfs) -- ^ "rootfs" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfig +instance A.FromJSON PluginConfig where + parseJSON = A.withObject "PluginConfig" $ \o -> + PluginConfig + <$> (o .:? "DockerVersion") + <*> (o .: "Description") + <*> (o .: "Documentation") + <*> (o .: "Interface") + <*> (o .: "Entrypoint") + <*> (o .: "WorkDir") + <*> (o .:? "User") + <*> (o .: "Network") + <*> (o .: "Linux") + <*> (o .: "PropagatedMount") + <*> (o .: "IpcHost") + <*> (o .: "PidHost") + <*> (o .: "Mounts") + <*> (o .: "Env") + <*> (o .: "Args") + <*> (o .:? "rootfs") + +-- | ToJSON PluginConfig +instance A.ToJSON PluginConfig where + toJSON PluginConfig {..} = + _omitNulls + [ "DockerVersion" .= pluginConfigDockerVersion + , "Description" .= pluginConfigDescription + , "Documentation" .= pluginConfigDocumentation + , "Interface" .= pluginConfigInterface + , "Entrypoint" .= pluginConfigEntrypoint + , "WorkDir" .= pluginConfigWorkDir + , "User" .= pluginConfigUser + , "Network" .= pluginConfigNetwork + , "Linux" .= pluginConfigLinux + , "PropagatedMount" .= pluginConfigPropagatedMount + , "IpcHost" .= pluginConfigIpcHost + , "PidHost" .= pluginConfigPidHost + , "Mounts" .= pluginConfigMounts + , "Env" .= pluginConfigEnv + , "Args" .= pluginConfigArgs + , "rootfs" .= pluginConfigRootfs + ] + + +-- | Construct a value of type 'PluginConfig' (by applying it's required fields, if any) +mkPluginConfig + :: Text -- ^ 'pluginConfigDescription' + -> Text -- ^ 'pluginConfigDocumentation' + -> PluginConfigInterface -- ^ 'pluginConfigInterface' + -> [Text] -- ^ 'pluginConfigEntrypoint' + -> Text -- ^ 'pluginConfigWorkDir' + -> PluginConfigNetwork -- ^ 'pluginConfigNetwork' + -> PluginConfigLinux -- ^ 'pluginConfigLinux' + -> Text -- ^ 'pluginConfigPropagatedMount' + -> Bool -- ^ 'pluginConfigIpcHost' + -> Bool -- ^ 'pluginConfigPidHost' + -> [PluginMount] -- ^ 'pluginConfigMounts' + -> [PluginEnv] -- ^ 'pluginConfigEnv' + -> PluginConfigArgs -- ^ 'pluginConfigArgs' + -> PluginConfig +mkPluginConfig pluginConfigDescription pluginConfigDocumentation pluginConfigInterface pluginConfigEntrypoint pluginConfigWorkDir pluginConfigNetwork pluginConfigLinux pluginConfigPropagatedMount pluginConfigIpcHost pluginConfigPidHost pluginConfigMounts pluginConfigEnv pluginConfigArgs = + PluginConfig + { pluginConfigDockerVersion = Nothing + , pluginConfigDescription + , pluginConfigDocumentation + , pluginConfigInterface + , pluginConfigEntrypoint + , pluginConfigWorkDir + , pluginConfigUser = Nothing + , pluginConfigNetwork + , pluginConfigLinux + , pluginConfigPropagatedMount + , pluginConfigIpcHost + , pluginConfigPidHost + , pluginConfigMounts + , pluginConfigEnv + , pluginConfigArgs + , pluginConfigRootfs = Nothing + } + +-- ** PluginConfigArgs +-- | PluginConfigArgs +data PluginConfigArgs = PluginConfigArgs + { pluginConfigArgsName :: !(Text) -- ^ /Required/ "Name" + , pluginConfigArgsDescription :: !(Text) -- ^ /Required/ "Description" + , pluginConfigArgsSettable :: !([Text]) -- ^ /Required/ "Settable" + , pluginConfigArgsValue :: !([Text]) -- ^ /Required/ "Value" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfigArgs +instance A.FromJSON PluginConfigArgs where + parseJSON = A.withObject "PluginConfigArgs" $ \o -> + PluginConfigArgs + <$> (o .: "Name") + <*> (o .: "Description") + <*> (o .: "Settable") + <*> (o .: "Value") + +-- | ToJSON PluginConfigArgs +instance A.ToJSON PluginConfigArgs where + toJSON PluginConfigArgs {..} = + _omitNulls + [ "Name" .= pluginConfigArgsName + , "Description" .= pluginConfigArgsDescription + , "Settable" .= pluginConfigArgsSettable + , "Value" .= pluginConfigArgsValue + ] + + +-- | Construct a value of type 'PluginConfigArgs' (by applying it's required fields, if any) +mkPluginConfigArgs + :: Text -- ^ 'pluginConfigArgsName' + -> Text -- ^ 'pluginConfigArgsDescription' + -> [Text] -- ^ 'pluginConfigArgsSettable' + -> [Text] -- ^ 'pluginConfigArgsValue' + -> PluginConfigArgs +mkPluginConfigArgs pluginConfigArgsName pluginConfigArgsDescription pluginConfigArgsSettable pluginConfigArgsValue = + PluginConfigArgs + { pluginConfigArgsName + , pluginConfigArgsDescription + , pluginConfigArgsSettable + , pluginConfigArgsValue + } + +-- ** PluginConfigInterface +-- | PluginConfigInterface +-- The interface between Docker and the plugin +data PluginConfigInterface = PluginConfigInterface + { pluginConfigInterfaceTypes :: !([PluginInterfaceType]) -- ^ /Required/ "Types" + , pluginConfigInterfaceSocket :: !(Text) -- ^ /Required/ "Socket" + , pluginConfigInterfaceProtocolScheme :: !(Maybe E'ProtocolScheme) -- ^ "ProtocolScheme" - Protocol to use for clients connecting to the plugin. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfigInterface +instance A.FromJSON PluginConfigInterface where + parseJSON = A.withObject "PluginConfigInterface" $ \o -> + PluginConfigInterface + <$> (o .: "Types") + <*> (o .: "Socket") + <*> (o .:? "ProtocolScheme") + +-- | ToJSON PluginConfigInterface +instance A.ToJSON PluginConfigInterface where + toJSON PluginConfigInterface {..} = + _omitNulls + [ "Types" .= pluginConfigInterfaceTypes + , "Socket" .= pluginConfigInterfaceSocket + , "ProtocolScheme" .= pluginConfigInterfaceProtocolScheme + ] + + +-- | Construct a value of type 'PluginConfigInterface' (by applying it's required fields, if any) +mkPluginConfigInterface + :: [PluginInterfaceType] -- ^ 'pluginConfigInterfaceTypes' + -> Text -- ^ 'pluginConfigInterfaceSocket' + -> PluginConfigInterface +mkPluginConfigInterface pluginConfigInterfaceTypes pluginConfigInterfaceSocket = + PluginConfigInterface + { pluginConfigInterfaceTypes + , pluginConfigInterfaceSocket + , pluginConfigInterfaceProtocolScheme = Nothing + } + +-- ** PluginConfigLinux +-- | PluginConfigLinux +data PluginConfigLinux = PluginConfigLinux + { pluginConfigLinuxCapabilities :: !([Text]) -- ^ /Required/ "Capabilities" + , pluginConfigLinuxAllowAllDevices :: !(Bool) -- ^ /Required/ "AllowAllDevices" + , pluginConfigLinuxDevices :: !([PluginDevice]) -- ^ /Required/ "Devices" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfigLinux +instance A.FromJSON PluginConfigLinux where + parseJSON = A.withObject "PluginConfigLinux" $ \o -> + PluginConfigLinux + <$> (o .: "Capabilities") + <*> (o .: "AllowAllDevices") + <*> (o .: "Devices") + +-- | ToJSON PluginConfigLinux +instance A.ToJSON PluginConfigLinux where + toJSON PluginConfigLinux {..} = + _omitNulls + [ "Capabilities" .= pluginConfigLinuxCapabilities + , "AllowAllDevices" .= pluginConfigLinuxAllowAllDevices + , "Devices" .= pluginConfigLinuxDevices + ] + + +-- | Construct a value of type 'PluginConfigLinux' (by applying it's required fields, if any) +mkPluginConfigLinux + :: [Text] -- ^ 'pluginConfigLinuxCapabilities' + -> Bool -- ^ 'pluginConfigLinuxAllowAllDevices' + -> [PluginDevice] -- ^ 'pluginConfigLinuxDevices' + -> PluginConfigLinux +mkPluginConfigLinux pluginConfigLinuxCapabilities pluginConfigLinuxAllowAllDevices pluginConfigLinuxDevices = + PluginConfigLinux + { pluginConfigLinuxCapabilities + , pluginConfigLinuxAllowAllDevices + , pluginConfigLinuxDevices + } + +-- ** PluginConfigNetwork +-- | PluginConfigNetwork +data PluginConfigNetwork = PluginConfigNetwork + { pluginConfigNetworkType :: !(Text) -- ^ /Required/ "Type" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfigNetwork +instance A.FromJSON PluginConfigNetwork where + parseJSON = A.withObject "PluginConfigNetwork" $ \o -> + PluginConfigNetwork + <$> (o .: "Type") + +-- | ToJSON PluginConfigNetwork +instance A.ToJSON PluginConfigNetwork where + toJSON PluginConfigNetwork {..} = + _omitNulls + [ "Type" .= pluginConfigNetworkType + ] + + +-- | Construct a value of type 'PluginConfigNetwork' (by applying it's required fields, if any) +mkPluginConfigNetwork + :: Text -- ^ 'pluginConfigNetworkType' + -> PluginConfigNetwork +mkPluginConfigNetwork pluginConfigNetworkType = + PluginConfigNetwork + { pluginConfigNetworkType + } + +-- ** PluginConfigRootfs +-- | PluginConfigRootfs +data PluginConfigRootfs = PluginConfigRootfs + { pluginConfigRootfsType :: !(Maybe Text) -- ^ "type" + , pluginConfigRootfsDiffIds :: !(Maybe [Text]) -- ^ "diff_ids" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfigRootfs +instance A.FromJSON PluginConfigRootfs where + parseJSON = A.withObject "PluginConfigRootfs" $ \o -> + PluginConfigRootfs + <$> (o .:? "type") + <*> (o .:? "diff_ids") + +-- | ToJSON PluginConfigRootfs +instance A.ToJSON PluginConfigRootfs where + toJSON PluginConfigRootfs {..} = + _omitNulls + [ "type" .= pluginConfigRootfsType + , "diff_ids" .= pluginConfigRootfsDiffIds + ] + + +-- | Construct a value of type 'PluginConfigRootfs' (by applying it's required fields, if any) +mkPluginConfigRootfs + :: PluginConfigRootfs +mkPluginConfigRootfs = + PluginConfigRootfs + { pluginConfigRootfsType = Nothing + , pluginConfigRootfsDiffIds = Nothing + } + +-- ** PluginConfigUser +-- | PluginConfigUser +data PluginConfigUser = PluginConfigUser + { pluginConfigUserUid :: !(Maybe Int) -- ^ "UID" + , pluginConfigUserGid :: !(Maybe Int) -- ^ "GID" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginConfigUser +instance A.FromJSON PluginConfigUser where + parseJSON = A.withObject "PluginConfigUser" $ \o -> + PluginConfigUser + <$> (o .:? "UID") + <*> (o .:? "GID") + +-- | ToJSON PluginConfigUser +instance A.ToJSON PluginConfigUser where + toJSON PluginConfigUser {..} = + _omitNulls + [ "UID" .= pluginConfigUserUid + , "GID" .= pluginConfigUserGid + ] + + +-- | Construct a value of type 'PluginConfigUser' (by applying it's required fields, if any) +mkPluginConfigUser + :: PluginConfigUser +mkPluginConfigUser = + PluginConfigUser + { pluginConfigUserUid = Nothing + , pluginConfigUserGid = Nothing + } + +-- ** PluginDevice +-- | PluginDevice +data PluginDevice = PluginDevice + { pluginDeviceName :: !(Text) -- ^ /Required/ "Name" + , pluginDeviceDescription :: !(Text) -- ^ /Required/ "Description" + , pluginDeviceSettable :: !([Text]) -- ^ /Required/ "Settable" + , pluginDevicePath :: !(Text) -- ^ /Required/ "Path" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginDevice +instance A.FromJSON PluginDevice where + parseJSON = A.withObject "PluginDevice" $ \o -> + PluginDevice + <$> (o .: "Name") + <*> (o .: "Description") + <*> (o .: "Settable") + <*> (o .: "Path") + +-- | ToJSON PluginDevice +instance A.ToJSON PluginDevice where + toJSON PluginDevice {..} = + _omitNulls + [ "Name" .= pluginDeviceName + , "Description" .= pluginDeviceDescription + , "Settable" .= pluginDeviceSettable + , "Path" .= pluginDevicePath + ] + + +-- | Construct a value of type 'PluginDevice' (by applying it's required fields, if any) +mkPluginDevice + :: Text -- ^ 'pluginDeviceName' + -> Text -- ^ 'pluginDeviceDescription' + -> [Text] -- ^ 'pluginDeviceSettable' + -> Text -- ^ 'pluginDevicePath' + -> PluginDevice +mkPluginDevice pluginDeviceName pluginDeviceDescription pluginDeviceSettable pluginDevicePath = + PluginDevice + { pluginDeviceName + , pluginDeviceDescription + , pluginDeviceSettable + , pluginDevicePath + } + +-- ** PluginEnv +-- | PluginEnv +data PluginEnv = PluginEnv + { pluginEnvName :: !(Text) -- ^ /Required/ "Name" + , pluginEnvDescription :: !(Text) -- ^ /Required/ "Description" + , pluginEnvSettable :: !([Text]) -- ^ /Required/ "Settable" + , pluginEnvValue :: !(Text) -- ^ /Required/ "Value" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginEnv +instance A.FromJSON PluginEnv where + parseJSON = A.withObject "PluginEnv" $ \o -> + PluginEnv + <$> (o .: "Name") + <*> (o .: "Description") + <*> (o .: "Settable") + <*> (o .: "Value") + +-- | ToJSON PluginEnv +instance A.ToJSON PluginEnv where + toJSON PluginEnv {..} = + _omitNulls + [ "Name" .= pluginEnvName + , "Description" .= pluginEnvDescription + , "Settable" .= pluginEnvSettable + , "Value" .= pluginEnvValue + ] + + +-- | Construct a value of type 'PluginEnv' (by applying it's required fields, if any) +mkPluginEnv + :: Text -- ^ 'pluginEnvName' + -> Text -- ^ 'pluginEnvDescription' + -> [Text] -- ^ 'pluginEnvSettable' + -> Text -- ^ 'pluginEnvValue' + -> PluginEnv +mkPluginEnv pluginEnvName pluginEnvDescription pluginEnvSettable pluginEnvValue = + PluginEnv + { pluginEnvName + , pluginEnvDescription + , pluginEnvSettable + , pluginEnvValue + } + +-- ** PluginInterfaceType +-- | PluginInterfaceType +data PluginInterfaceType = PluginInterfaceType + { pluginInterfaceTypePrefix :: !(Text) -- ^ /Required/ "Prefix" + , pluginInterfaceTypeCapability :: !(Text) -- ^ /Required/ "Capability" + , pluginInterfaceTypeVersion :: !(Text) -- ^ /Required/ "Version" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginInterfaceType +instance A.FromJSON PluginInterfaceType where + parseJSON = A.withObject "PluginInterfaceType" $ \o -> + PluginInterfaceType + <$> (o .: "Prefix") + <*> (o .: "Capability") + <*> (o .: "Version") + +-- | ToJSON PluginInterfaceType +instance A.ToJSON PluginInterfaceType where + toJSON PluginInterfaceType {..} = + _omitNulls + [ "Prefix" .= pluginInterfaceTypePrefix + , "Capability" .= pluginInterfaceTypeCapability + , "Version" .= pluginInterfaceTypeVersion + ] + + +-- | Construct a value of type 'PluginInterfaceType' (by applying it's required fields, if any) +mkPluginInterfaceType + :: Text -- ^ 'pluginInterfaceTypePrefix' + -> Text -- ^ 'pluginInterfaceTypeCapability' + -> Text -- ^ 'pluginInterfaceTypeVersion' + -> PluginInterfaceType +mkPluginInterfaceType pluginInterfaceTypePrefix pluginInterfaceTypeCapability pluginInterfaceTypeVersion = + PluginInterfaceType + { pluginInterfaceTypePrefix + , pluginInterfaceTypeCapability + , pluginInterfaceTypeVersion + } + +-- ** PluginMount +-- | PluginMount +data PluginMount = PluginMount + { pluginMountName :: !(Text) -- ^ /Required/ "Name" + , pluginMountDescription :: !(Text) -- ^ /Required/ "Description" + , pluginMountSettable :: !([Text]) -- ^ /Required/ "Settable" + , pluginMountSource :: !(Text) -- ^ /Required/ "Source" + , pluginMountDestination :: !(Text) -- ^ /Required/ "Destination" + , pluginMountType :: !(Text) -- ^ /Required/ "Type" + , pluginMountOptions :: !([Text]) -- ^ /Required/ "Options" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginMount +instance A.FromJSON PluginMount where + parseJSON = A.withObject "PluginMount" $ \o -> + PluginMount + <$> (o .: "Name") + <*> (o .: "Description") + <*> (o .: "Settable") + <*> (o .: "Source") + <*> (o .: "Destination") + <*> (o .: "Type") + <*> (o .: "Options") + +-- | ToJSON PluginMount +instance A.ToJSON PluginMount where + toJSON PluginMount {..} = + _omitNulls + [ "Name" .= pluginMountName + , "Description" .= pluginMountDescription + , "Settable" .= pluginMountSettable + , "Source" .= pluginMountSource + , "Destination" .= pluginMountDestination + , "Type" .= pluginMountType + , "Options" .= pluginMountOptions + ] + + +-- | Construct a value of type 'PluginMount' (by applying it's required fields, if any) +mkPluginMount + :: Text -- ^ 'pluginMountName' + -> Text -- ^ 'pluginMountDescription' + -> [Text] -- ^ 'pluginMountSettable' + -> Text -- ^ 'pluginMountSource' + -> Text -- ^ 'pluginMountDestination' + -> Text -- ^ 'pluginMountType' + -> [Text] -- ^ 'pluginMountOptions' + -> PluginMount +mkPluginMount pluginMountName pluginMountDescription pluginMountSettable pluginMountSource pluginMountDestination pluginMountType pluginMountOptions = + PluginMount + { pluginMountName + , pluginMountDescription + , pluginMountSettable + , pluginMountSource + , pluginMountDestination + , pluginMountType + , pluginMountOptions + } + +-- ** PluginPrivilege +-- | PluginPrivilege +-- Describes a permission the user has to accept upon installing the plugin. +data PluginPrivilege = PluginPrivilege + { pluginPrivilegeName :: !(Maybe Text) -- ^ "Name" + , pluginPrivilegeDescription :: !(Maybe Text) -- ^ "Description" + , pluginPrivilegeValue :: !(Maybe [Text]) -- ^ "Value" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginPrivilege +instance A.FromJSON PluginPrivilege where + parseJSON = A.withObject "PluginPrivilege" $ \o -> + PluginPrivilege + <$> (o .:? "Name") + <*> (o .:? "Description") + <*> (o .:? "Value") + +-- | ToJSON PluginPrivilege +instance A.ToJSON PluginPrivilege where + toJSON PluginPrivilege {..} = + _omitNulls + [ "Name" .= pluginPrivilegeName + , "Description" .= pluginPrivilegeDescription + , "Value" .= pluginPrivilegeValue + ] + + +-- | Construct a value of type 'PluginPrivilege' (by applying it's required fields, if any) +mkPluginPrivilege + :: PluginPrivilege +mkPluginPrivilege = + PluginPrivilege + { pluginPrivilegeName = Nothing + , pluginPrivilegeDescription = Nothing + , pluginPrivilegeValue = Nothing + } + +-- ** PluginSettings +-- | PluginSettings +-- Settings that can be modified by users. +data PluginSettings = PluginSettings + { pluginSettingsMounts :: !([PluginMount]) -- ^ /Required/ "Mounts" + , pluginSettingsEnv :: !([Text]) -- ^ /Required/ "Env" + , pluginSettingsArgs :: !([Text]) -- ^ /Required/ "Args" + , pluginSettingsDevices :: !([PluginDevice]) -- ^ /Required/ "Devices" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginSettings +instance A.FromJSON PluginSettings where + parseJSON = A.withObject "PluginSettings" $ \o -> + PluginSettings + <$> (o .: "Mounts") + <*> (o .: "Env") + <*> (o .: "Args") + <*> (o .: "Devices") + +-- | ToJSON PluginSettings +instance A.ToJSON PluginSettings where + toJSON PluginSettings {..} = + _omitNulls + [ "Mounts" .= pluginSettingsMounts + , "Env" .= pluginSettingsEnv + , "Args" .= pluginSettingsArgs + , "Devices" .= pluginSettingsDevices + ] + + +-- | Construct a value of type 'PluginSettings' (by applying it's required fields, if any) +mkPluginSettings + :: [PluginMount] -- ^ 'pluginSettingsMounts' + -> [Text] -- ^ 'pluginSettingsEnv' + -> [Text] -- ^ 'pluginSettingsArgs' + -> [PluginDevice] -- ^ 'pluginSettingsDevices' + -> PluginSettings +mkPluginSettings pluginSettingsMounts pluginSettingsEnv pluginSettingsArgs pluginSettingsDevices = + PluginSettings + { pluginSettingsMounts + , pluginSettingsEnv + , pluginSettingsArgs + , pluginSettingsDevices + } + +-- ** PluginsInfo +-- | PluginsInfo +-- 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. +data PluginsInfo = PluginsInfo + { pluginsInfoVolume :: !(Maybe [Text]) -- ^ "Volume" - Names of available volume-drivers, and network-driver plugins. + , pluginsInfoNetwork :: !(Maybe [Text]) -- ^ "Network" - Names of available network-drivers, and network-driver plugins. + , pluginsInfoAuthorization :: !(Maybe [Text]) -- ^ "Authorization" - Names of available authorization plugins. + , pluginsInfoLog :: !(Maybe [Text]) -- ^ "Log" - Names of available logging-drivers, and logging-driver plugins. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PluginsInfo +instance A.FromJSON PluginsInfo where + parseJSON = A.withObject "PluginsInfo" $ \o -> + PluginsInfo + <$> (o .:? "Volume") + <*> (o .:? "Network") + <*> (o .:? "Authorization") + <*> (o .:? "Log") + +-- | ToJSON PluginsInfo +instance A.ToJSON PluginsInfo where + toJSON PluginsInfo {..} = + _omitNulls + [ "Volume" .= pluginsInfoVolume + , "Network" .= pluginsInfoNetwork + , "Authorization" .= pluginsInfoAuthorization + , "Log" .= pluginsInfoLog + ] + + +-- | Construct a value of type 'PluginsInfo' (by applying it's required fields, if any) +mkPluginsInfo + :: PluginsInfo +mkPluginsInfo = + PluginsInfo + { pluginsInfoVolume = Nothing + , pluginsInfoNetwork = Nothing + , pluginsInfoAuthorization = Nothing + , pluginsInfoLog = Nothing + } + +-- ** Port +-- | Port +-- An open port on a container +data Port = Port + { portIp :: !(Maybe Text) -- ^ "IP" - Host IP address that the container's port is mapped to + , portPrivatePort :: !(Int) -- ^ /Required/ "PrivatePort" - Port on the container + , portPublicPort :: !(Maybe Int) -- ^ "PublicPort" - Port exposed on the host + , portType :: !(E'Type) -- ^ /Required/ "Type" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Port +instance A.FromJSON Port where + parseJSON = A.withObject "Port" $ \o -> + Port + <$> (o .:? "IP") + <*> (o .: "PrivatePort") + <*> (o .:? "PublicPort") + <*> (o .: "Type") + +-- | ToJSON Port +instance A.ToJSON Port where + toJSON Port {..} = + _omitNulls + [ "IP" .= portIp + , "PrivatePort" .= portPrivatePort + , "PublicPort" .= portPublicPort + , "Type" .= portType + ] + + +-- | Construct a value of type 'Port' (by applying it's required fields, if any) +mkPort + :: Int -- ^ 'portPrivatePort': Port on the container + -> E'Type -- ^ 'portType' + -> Port +mkPort portPrivatePort portType = + Port + { portIp = Nothing + , portPrivatePort + , portPublicPort = Nothing + , portType + } + +-- ** PortBinding +-- | PortBinding +-- PortBinding represents a binding between a host IP address and a host port. +data PortBinding = PortBinding + { portBindingHostIp :: !(Maybe Text) -- ^ "HostIp" - Host IP address that the container's port is mapped to. + , portBindingHostPort :: !(Maybe Text) -- ^ "HostPort" - Host port number that the container's port is mapped to. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PortBinding +instance A.FromJSON PortBinding where + parseJSON = A.withObject "PortBinding" $ \o -> + PortBinding + <$> (o .:? "HostIp") + <*> (o .:? "HostPort") + +-- | ToJSON PortBinding +instance A.ToJSON PortBinding where + toJSON PortBinding {..} = + _omitNulls + [ "HostIp" .= portBindingHostIp + , "HostPort" .= portBindingHostPort + ] + + +-- | Construct a value of type 'PortBinding' (by applying it's required fields, if any) +mkPortBinding + :: PortBinding +mkPortBinding = + PortBinding + { portBindingHostIp = Nothing + , portBindingHostPort = Nothing + } + +-- ** PortStatus +-- | PortStatus +-- represents the port status of a task's host ports whose service has published host ports +data PortStatus = PortStatus + { portStatusPorts :: !(Maybe [EndpointPortConfig]) -- ^ "Ports" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PortStatus +instance A.FromJSON PortStatus where + parseJSON = A.withObject "PortStatus" $ \o -> + PortStatus + <$> (o .:? "Ports") + +-- | ToJSON PortStatus +instance A.ToJSON PortStatus where + toJSON PortStatus {..} = + _omitNulls + [ "Ports" .= portStatusPorts + ] + + +-- | Construct a value of type 'PortStatus' (by applying it's required fields, if any) +mkPortStatus + :: PortStatus +mkPortStatus = + PortStatus + { portStatusPorts = Nothing + } + +-- ** ProcessConfig +-- | ProcessConfig +data ProcessConfig = ProcessConfig + { processConfigPrivileged :: !(Maybe Bool) -- ^ "privileged" + , processConfigUser :: !(Maybe Text) -- ^ "user" + , processConfigTty :: !(Maybe Bool) -- ^ "tty" + , processConfigEntrypoint :: !(Maybe Text) -- ^ "entrypoint" + , processConfigArguments :: !(Maybe [Text]) -- ^ "arguments" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ProcessConfig +instance A.FromJSON ProcessConfig where + parseJSON = A.withObject "ProcessConfig" $ \o -> + ProcessConfig + <$> (o .:? "privileged") + <*> (o .:? "user") + <*> (o .:? "tty") + <*> (o .:? "entrypoint") + <*> (o .:? "arguments") + +-- | ToJSON ProcessConfig +instance A.ToJSON ProcessConfig where + toJSON ProcessConfig {..} = + _omitNulls + [ "privileged" .= processConfigPrivileged + , "user" .= processConfigUser + , "tty" .= processConfigTty + , "entrypoint" .= processConfigEntrypoint + , "arguments" .= processConfigArguments + ] + + +-- | Construct a value of type 'ProcessConfig' (by applying it's required fields, if any) +mkProcessConfig + :: ProcessConfig +mkProcessConfig = + ProcessConfig + { processConfigPrivileged = Nothing + , processConfigUser = Nothing + , processConfigTty = Nothing + , processConfigEntrypoint = Nothing + , processConfigArguments = Nothing + } + +-- ** ProgressDetail +-- | ProgressDetail +data ProgressDetail = ProgressDetail + { progressDetailCurrent :: !(Maybe Int) -- ^ "current" + , progressDetailTotal :: !(Maybe Int) -- ^ "total" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ProgressDetail +instance A.FromJSON ProgressDetail where + parseJSON = A.withObject "ProgressDetail" $ \o -> + ProgressDetail + <$> (o .:? "current") + <*> (o .:? "total") + +-- | ToJSON ProgressDetail +instance A.ToJSON ProgressDetail where + toJSON ProgressDetail {..} = + _omitNulls + [ "current" .= progressDetailCurrent + , "total" .= progressDetailTotal + ] + + +-- | Construct a value of type 'ProgressDetail' (by applying it's required fields, if any) +mkProgressDetail + :: ProgressDetail +mkProgressDetail = + ProgressDetail + { progressDetailCurrent = Nothing + , progressDetailTotal = Nothing + } + +-- ** PushImageInfo +-- | PushImageInfo +data PushImageInfo = PushImageInfo + { pushImageInfoError :: !(Maybe Text) -- ^ "error" + , pushImageInfoStatus :: !(Maybe Text) -- ^ "status" + , pushImageInfoProgress :: !(Maybe Text) -- ^ "progress" + , pushImageInfoProgressDetail :: !(Maybe ProgressDetail) -- ^ "progressDetail" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON PushImageInfo +instance A.FromJSON PushImageInfo where + parseJSON = A.withObject "PushImageInfo" $ \o -> + PushImageInfo + <$> (o .:? "error") + <*> (o .:? "status") + <*> (o .:? "progress") + <*> (o .:? "progressDetail") + +-- | ToJSON PushImageInfo +instance A.ToJSON PushImageInfo where + toJSON PushImageInfo {..} = + _omitNulls + [ "error" .= pushImageInfoError + , "status" .= pushImageInfoStatus + , "progress" .= pushImageInfoProgress + , "progressDetail" .= pushImageInfoProgressDetail + ] + + +-- | Construct a value of type 'PushImageInfo' (by applying it's required fields, if any) +mkPushImageInfo + :: PushImageInfo +mkPushImageInfo = + PushImageInfo + { pushImageInfoError = Nothing + , pushImageInfoStatus = Nothing + , pushImageInfoProgress = Nothing + , pushImageInfoProgressDetail = Nothing + } + +-- ** RegistryServiceConfig +-- | RegistryServiceConfig +-- RegistryServiceConfig stores daemon registry services configuration. +data RegistryServiceConfig = RegistryServiceConfig + { registryServiceConfigAllowNondistributableArtifactsCidrs :: !(Maybe [Text]) -- ^ "AllowNondistributableArtifactsCIDRs" - List of IP ranges to which nondistributable artifacts can be pushed, using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior, and enables the daemon to push nondistributable artifacts to all registries whose resolved IP address is within the subnet described by the CIDR syntax. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server. > **Warning**: Nondistributable artifacts typically have restrictions > on how and where they can be distributed and shared. Only use this > feature to push artifacts to private registries and ensure that you > are in compliance with any terms that cover redistributing > nondistributable artifacts. + , registryServiceConfigAllowNondistributableArtifactsHostnames :: !(Maybe [Text]) -- ^ "AllowNondistributableArtifactsHostnames" - List of registry hostnames to which nondistributable artifacts can be pushed, using the format `<hostname>[:<port>]` or `<IP address>[:<port>]`. Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior for the specified registries. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server. > **Warning**: Nondistributable artifacts typically have restrictions > on how and where they can be distributed and shared. Only use this > feature to push artifacts to private registries and ensure that you > are in compliance with any terms that cover redistributing > nondistributable artifacts. + , registryServiceConfigInsecureRegistryCidrs :: !(Maybe [Text]) -- ^ "InsecureRegistryCIDRs" - List of IP ranges of insecure registries, using the CIDR syntax ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication. By default, local registries (`127.0.0.0/8`) are configured as insecure. All other registries are secure. Communicating with an insecure registry is not possible if the daemon assumes that registry is secure. This configuration override this behavior, insecure communication with registries whose resolved IP address is within the subnet described by the CIDR syntax. Registries can also be marked insecure by hostname. Those registries are listed under `IndexConfigs` and have their `Secure` field set to `false`. > **Warning**: Using this option can be useful when running a local > registry, but introduces security vulnerabilities. This option > should therefore ONLY be used for testing purposes. For increased > security, users should add their CA to their system's list of trusted > CAs instead of enabling this option. + , registryServiceConfigIndexConfigs :: !(Maybe (Map.Map String IndexInfo)) -- ^ "IndexConfigs" + , registryServiceConfigMirrors :: !(Maybe [Text]) -- ^ "Mirrors" - List of registry URLs that act as a mirror for the official (`docker.io`) registry. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON RegistryServiceConfig +instance A.FromJSON RegistryServiceConfig where + parseJSON = A.withObject "RegistryServiceConfig" $ \o -> + RegistryServiceConfig + <$> (o .:? "AllowNondistributableArtifactsCIDRs") + <*> (o .:? "AllowNondistributableArtifactsHostnames") + <*> (o .:? "InsecureRegistryCIDRs") + <*> (o .:? "IndexConfigs") + <*> (o .:? "Mirrors") + +-- | ToJSON RegistryServiceConfig +instance A.ToJSON RegistryServiceConfig where + toJSON RegistryServiceConfig {..} = + _omitNulls + [ "AllowNondistributableArtifactsCIDRs" .= registryServiceConfigAllowNondistributableArtifactsCidrs + , "AllowNondistributableArtifactsHostnames" .= registryServiceConfigAllowNondistributableArtifactsHostnames + , "InsecureRegistryCIDRs" .= registryServiceConfigInsecureRegistryCidrs + , "IndexConfigs" .= registryServiceConfigIndexConfigs + , "Mirrors" .= registryServiceConfigMirrors + ] + + +-- | Construct a value of type 'RegistryServiceConfig' (by applying it's required fields, if any) +mkRegistryServiceConfig + :: RegistryServiceConfig +mkRegistryServiceConfig = + RegistryServiceConfig + { registryServiceConfigAllowNondistributableArtifactsCidrs = Nothing + , registryServiceConfigAllowNondistributableArtifactsHostnames = Nothing + , registryServiceConfigInsecureRegistryCidrs = Nothing + , registryServiceConfigIndexConfigs = Nothing + , registryServiceConfigMirrors = Nothing + } + +-- ** ResourceObject +-- | ResourceObject +-- An object describing the resources which can be advertised by a node and requested by a task. +data ResourceObject = ResourceObject + { resourceObjectNanoCpus :: !(Maybe Integer) -- ^ "NanoCPUs" + , resourceObjectMemoryBytes :: !(Maybe Integer) -- ^ "MemoryBytes" + , resourceObjectGenericResources :: !(Maybe [GenericResourcesInner]) -- ^ "GenericResources" - User-defined resources can be either Integer resources (e.g, `SSD=3`) or String resources (e.g, `GPU=UUID1`). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ResourceObject +instance A.FromJSON ResourceObject where + parseJSON = A.withObject "ResourceObject" $ \o -> + ResourceObject + <$> (o .:? "NanoCPUs") + <*> (o .:? "MemoryBytes") + <*> (o .:? "GenericResources") + +-- | ToJSON ResourceObject +instance A.ToJSON ResourceObject where + toJSON ResourceObject {..} = + _omitNulls + [ "NanoCPUs" .= resourceObjectNanoCpus + , "MemoryBytes" .= resourceObjectMemoryBytes + , "GenericResources" .= resourceObjectGenericResources + ] + + +-- | Construct a value of type 'ResourceObject' (by applying it's required fields, if any) +mkResourceObject + :: ResourceObject +mkResourceObject = + ResourceObject + { resourceObjectNanoCpus = Nothing + , resourceObjectMemoryBytes = Nothing + , resourceObjectGenericResources = Nothing + } + +-- ** Resources +-- | Resources +-- A container's resources (cgroups config, ulimits, etc) +data Resources = Resources + { resourcesCpuShares :: !(Maybe Int) -- ^ "CpuShares" - An integer value representing this container's relative CPU weight versus other containers. + , resourcesMemory :: !(Maybe Integer) -- ^ "Memory" - Memory limit in bytes. + , resourcesCgroupParent :: !(Maybe Text) -- ^ "CgroupParent" - Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. + , resourcesBlkioWeight :: !(Maybe Int) -- ^ "BlkioWeight" - Block IO weight (relative weight). + , resourcesBlkioWeightDevice :: !(Maybe [ResourcesBlkioWeightDeviceInner]) -- ^ "BlkioWeightDevice" - Block IO weight (relative device weight) in the form: ``` [{\"Path\": \"device_path\", \"Weight\": weight}] ``` + , resourcesBlkioDeviceReadBps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceReadBps" - Limit read rate (bytes per second) from a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , resourcesBlkioDeviceWriteBps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceWriteBps" - Limit write rate (bytes per second) to a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , resourcesBlkioDeviceReadIOps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceReadIOps" - Limit read rate (IO per second) from a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , resourcesBlkioDeviceWriteIOps :: !(Maybe [ThrottleDevice]) -- ^ "BlkioDeviceWriteIOps" - Limit write rate (IO per second) to a device, in the form: ``` [{\"Path\": \"device_path\", \"Rate\": rate}] ``` + , resourcesCpuPeriod :: !(Maybe Integer) -- ^ "CpuPeriod" - The length of a CPU period in microseconds. + , resourcesCpuQuota :: !(Maybe Integer) -- ^ "CpuQuota" - Microseconds of CPU time that the container can get in a CPU period. + , resourcesCpuRealtimePeriod :: !(Maybe Integer) -- ^ "CpuRealtimePeriod" - The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + , resourcesCpuRealtimeRuntime :: !(Maybe Integer) -- ^ "CpuRealtimeRuntime" - The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. + , resourcesCpusetCpus :: !(Maybe Text) -- ^ "CpusetCpus" - CPUs in which to allow execution (e.g., `0-3`, `0,1`). + , resourcesCpusetMems :: !(Maybe Text) -- ^ "CpusetMems" - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. + , resourcesDevices :: !(Maybe [DeviceMapping]) -- ^ "Devices" - A list of devices to add to the container. + , resourcesDeviceCgroupRules :: !(Maybe [Text]) -- ^ "DeviceCgroupRules" - a list of cgroup rules to apply to the container + , resourcesDeviceRequests :: !(Maybe [DeviceRequest]) -- ^ "DeviceRequests" - A list of requests for devices to be sent to device drivers. + , resourcesKernelMemoryTcp :: !(Maybe Integer) -- ^ "KernelMemoryTCP" - Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. + , resourcesMemoryReservation :: !(Maybe Integer) -- ^ "MemoryReservation" - Memory soft limit in bytes. + , resourcesMemorySwap :: !(Maybe Integer) -- ^ "MemorySwap" - Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. + , resourcesMemorySwappiness :: !(Maybe Integer) -- ^ "MemorySwappiness" - Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. + , resourcesNanoCpus :: !(Maybe Integer) -- ^ "NanoCpus" - CPU quota in units of 10<sup>-9</sup> CPUs. + , resourcesOomKillDisable :: !(Maybe Bool) -- ^ "OomKillDisable" - Disable OOM Killer for the container. + , resourcesInit :: !(Maybe Bool) -- ^ "Init" - Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + , resourcesPidsLimit :: !(Maybe Integer) -- ^ "PidsLimit" - Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not change. + , resourcesUlimits :: !(Maybe [ResourcesUlimitsInner]) -- ^ "Ulimits" - A list of resource limits to set in the container. For example: ``` {\"Name\": \"nofile\", \"Soft\": 1024, \"Hard\": 2048} ``` + , resourcesCpuCount :: !(Maybe Integer) -- ^ "CpuCount" - The number of usable CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + , resourcesCpuPercent :: !(Maybe Integer) -- ^ "CpuPercent" - The usable percentage of the available CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. + , resourcesIoMaximumIOps :: !(Maybe Integer) -- ^ "IOMaximumIOps" - Maximum IOps for the container system drive (Windows only) + , resourcesIoMaximumBandwidth :: !(Maybe Integer) -- ^ "IOMaximumBandwidth" - Maximum IO in bytes per second for the container system drive (Windows only). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Resources +instance A.FromJSON Resources where + parseJSON = A.withObject "Resources" $ \o -> + Resources + <$> (o .:? "CpuShares") + <*> (o .:? "Memory") + <*> (o .:? "CgroupParent") + <*> (o .:? "BlkioWeight") + <*> (o .:? "BlkioWeightDevice") + <*> (o .:? "BlkioDeviceReadBps") + <*> (o .:? "BlkioDeviceWriteBps") + <*> (o .:? "BlkioDeviceReadIOps") + <*> (o .:? "BlkioDeviceWriteIOps") + <*> (o .:? "CpuPeriod") + <*> (o .:? "CpuQuota") + <*> (o .:? "CpuRealtimePeriod") + <*> (o .:? "CpuRealtimeRuntime") + <*> (o .:? "CpusetCpus") + <*> (o .:? "CpusetMems") + <*> (o .:? "Devices") + <*> (o .:? "DeviceCgroupRules") + <*> (o .:? "DeviceRequests") + <*> (o .:? "KernelMemoryTCP") + <*> (o .:? "MemoryReservation") + <*> (o .:? "MemorySwap") + <*> (o .:? "MemorySwappiness") + <*> (o .:? "NanoCpus") + <*> (o .:? "OomKillDisable") + <*> (o .:? "Init") + <*> (o .:? "PidsLimit") + <*> (o .:? "Ulimits") + <*> (o .:? "CpuCount") + <*> (o .:? "CpuPercent") + <*> (o .:? "IOMaximumIOps") + <*> (o .:? "IOMaximumBandwidth") + +-- | ToJSON Resources +instance A.ToJSON Resources where + toJSON Resources {..} = + _omitNulls + [ "CpuShares" .= resourcesCpuShares + , "Memory" .= resourcesMemory + , "CgroupParent" .= resourcesCgroupParent + , "BlkioWeight" .= resourcesBlkioWeight + , "BlkioWeightDevice" .= resourcesBlkioWeightDevice + , "BlkioDeviceReadBps" .= resourcesBlkioDeviceReadBps + , "BlkioDeviceWriteBps" .= resourcesBlkioDeviceWriteBps + , "BlkioDeviceReadIOps" .= resourcesBlkioDeviceReadIOps + , "BlkioDeviceWriteIOps" .= resourcesBlkioDeviceWriteIOps + , "CpuPeriod" .= resourcesCpuPeriod + , "CpuQuota" .= resourcesCpuQuota + , "CpuRealtimePeriod" .= resourcesCpuRealtimePeriod + , "CpuRealtimeRuntime" .= resourcesCpuRealtimeRuntime + , "CpusetCpus" .= resourcesCpusetCpus + , "CpusetMems" .= resourcesCpusetMems + , "Devices" .= resourcesDevices + , "DeviceCgroupRules" .= resourcesDeviceCgroupRules + , "DeviceRequests" .= resourcesDeviceRequests + , "KernelMemoryTCP" .= resourcesKernelMemoryTcp + , "MemoryReservation" .= resourcesMemoryReservation + , "MemorySwap" .= resourcesMemorySwap + , "MemorySwappiness" .= resourcesMemorySwappiness + , "NanoCpus" .= resourcesNanoCpus + , "OomKillDisable" .= resourcesOomKillDisable + , "Init" .= resourcesInit + , "PidsLimit" .= resourcesPidsLimit + , "Ulimits" .= resourcesUlimits + , "CpuCount" .= resourcesCpuCount + , "CpuPercent" .= resourcesCpuPercent + , "IOMaximumIOps" .= resourcesIoMaximumIOps + , "IOMaximumBandwidth" .= resourcesIoMaximumBandwidth + ] + + +-- | Construct a value of type 'Resources' (by applying it's required fields, if any) +mkResources + :: Resources +mkResources = + Resources + { resourcesCpuShares = Nothing + , resourcesMemory = Nothing + , resourcesCgroupParent = Nothing + , resourcesBlkioWeight = Nothing + , resourcesBlkioWeightDevice = Nothing + , resourcesBlkioDeviceReadBps = Nothing + , resourcesBlkioDeviceWriteBps = Nothing + , resourcesBlkioDeviceReadIOps = Nothing + , resourcesBlkioDeviceWriteIOps = Nothing + , resourcesCpuPeriod = Nothing + , resourcesCpuQuota = Nothing + , resourcesCpuRealtimePeriod = Nothing + , resourcesCpuRealtimeRuntime = Nothing + , resourcesCpusetCpus = Nothing + , resourcesCpusetMems = Nothing + , resourcesDevices = Nothing + , resourcesDeviceCgroupRules = Nothing + , resourcesDeviceRequests = Nothing + , resourcesKernelMemoryTcp = Nothing + , resourcesMemoryReservation = Nothing + , resourcesMemorySwap = Nothing + , resourcesMemorySwappiness = Nothing + , resourcesNanoCpus = Nothing + , resourcesOomKillDisable = Nothing + , resourcesInit = Nothing + , resourcesPidsLimit = Nothing + , resourcesUlimits = Nothing + , resourcesCpuCount = Nothing + , resourcesCpuPercent = Nothing + , resourcesIoMaximumIOps = Nothing + , resourcesIoMaximumBandwidth = Nothing + } + +-- ** ResourcesBlkioWeightDeviceInner +-- | ResourcesBlkioWeightDeviceInner +data ResourcesBlkioWeightDeviceInner = ResourcesBlkioWeightDeviceInner + { resourcesBlkioWeightDeviceInnerPath :: !(Maybe Text) -- ^ "Path" + , resourcesBlkioWeightDeviceInnerWeight :: !(Maybe Int) -- ^ "Weight" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ResourcesBlkioWeightDeviceInner +instance A.FromJSON ResourcesBlkioWeightDeviceInner where + parseJSON = A.withObject "ResourcesBlkioWeightDeviceInner" $ \o -> + ResourcesBlkioWeightDeviceInner + <$> (o .:? "Path") + <*> (o .:? "Weight") + +-- | ToJSON ResourcesBlkioWeightDeviceInner +instance A.ToJSON ResourcesBlkioWeightDeviceInner where + toJSON ResourcesBlkioWeightDeviceInner {..} = + _omitNulls + [ "Path" .= resourcesBlkioWeightDeviceInnerPath + , "Weight" .= resourcesBlkioWeightDeviceInnerWeight + ] + + +-- | Construct a value of type 'ResourcesBlkioWeightDeviceInner' (by applying it's required fields, if any) +mkResourcesBlkioWeightDeviceInner + :: ResourcesBlkioWeightDeviceInner +mkResourcesBlkioWeightDeviceInner = + ResourcesBlkioWeightDeviceInner + { resourcesBlkioWeightDeviceInnerPath = Nothing + , resourcesBlkioWeightDeviceInnerWeight = Nothing + } + +-- ** ResourcesUlimitsInner +-- | ResourcesUlimitsInner +data ResourcesUlimitsInner = ResourcesUlimitsInner + { resourcesUlimitsInnerName :: !(Maybe Text) -- ^ "Name" - Name of ulimit + , resourcesUlimitsInnerSoft :: !(Maybe Int) -- ^ "Soft" - Soft limit + , resourcesUlimitsInnerHard :: !(Maybe Int) -- ^ "Hard" - Hard limit + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ResourcesUlimitsInner +instance A.FromJSON ResourcesUlimitsInner where + parseJSON = A.withObject "ResourcesUlimitsInner" $ \o -> + ResourcesUlimitsInner + <$> (o .:? "Name") + <*> (o .:? "Soft") + <*> (o .:? "Hard") + +-- | ToJSON ResourcesUlimitsInner +instance A.ToJSON ResourcesUlimitsInner where + toJSON ResourcesUlimitsInner {..} = + _omitNulls + [ "Name" .= resourcesUlimitsInnerName + , "Soft" .= resourcesUlimitsInnerSoft + , "Hard" .= resourcesUlimitsInnerHard + ] + + +-- | Construct a value of type 'ResourcesUlimitsInner' (by applying it's required fields, if any) +mkResourcesUlimitsInner + :: ResourcesUlimitsInner +mkResourcesUlimitsInner = + ResourcesUlimitsInner + { resourcesUlimitsInnerName = Nothing + , resourcesUlimitsInnerSoft = Nothing + , resourcesUlimitsInnerHard = Nothing + } + +-- ** RestartPolicy +-- | RestartPolicy +-- The behavior to apply when the container exits. The default is not to restart. An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. +data RestartPolicy = RestartPolicy + { restartPolicyName :: !(Maybe E'Name) -- ^ "Name" - - Empty string means not to restart - `no` Do not automatically restart - `always` Always restart - `unless-stopped` Restart always except when the user has manually stopped the container - `on-failure` Restart only when the container exit code is non-zero + , restartPolicyMaximumRetryCount :: !(Maybe Int) -- ^ "MaximumRetryCount" - If `on-failure` is used, the number of times to retry before giving up. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON RestartPolicy +instance A.FromJSON RestartPolicy where + parseJSON = A.withObject "RestartPolicy" $ \o -> + RestartPolicy + <$> (o .:? "Name") + <*> (o .:? "MaximumRetryCount") + +-- | ToJSON RestartPolicy +instance A.ToJSON RestartPolicy where + toJSON RestartPolicy {..} = + _omitNulls + [ "Name" .= restartPolicyName + , "MaximumRetryCount" .= restartPolicyMaximumRetryCount + ] + + +-- | Construct a value of type 'RestartPolicy' (by applying it's required fields, if any) +mkRestartPolicy + :: RestartPolicy +mkRestartPolicy = + RestartPolicy + { restartPolicyName = Nothing + , restartPolicyMaximumRetryCount = Nothing + } + +-- ** Runtime +-- | Runtime +-- 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. +data Runtime = Runtime + { runtimePath :: !(Maybe Text) -- ^ "path" - Name and, optional, path, of the OCI executable binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result. + , runtimeRuntimeArgs :: !(Maybe [Text]) -- ^ "runtimeArgs" - List of command-line arguments to pass to the runtime when invoked. + , runtimeStatus :: !(Maybe (Map.Map String Text)) -- ^ "status" - Information specific to the runtime. While this API specification does not define data provided by runtimes, the following well-known properties may be provided by runtimes: `org.opencontainers.runtime-spec.features`: features structure as defined in the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec/blob/main/features.md), in a JSON string representation. <p><br /></p> > **Note**: The information returned in this field, including the > formatting of values and labels, should not be considered stable, > and may change without notice. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Runtime +instance A.FromJSON Runtime where + parseJSON = A.withObject "Runtime" $ \o -> + Runtime + <$> (o .:? "path") + <*> (o .:? "runtimeArgs") + <*> (o .:? "status") + +-- | ToJSON Runtime +instance A.ToJSON Runtime where + toJSON Runtime {..} = + _omitNulls + [ "path" .= runtimePath + , "runtimeArgs" .= runtimeRuntimeArgs + , "status" .= runtimeStatus + ] + + +-- | Construct a value of type 'Runtime' (by applying it's required fields, if any) +mkRuntime + :: Runtime +mkRuntime = + Runtime + { runtimePath = Nothing + , runtimeRuntimeArgs = Nothing + , runtimeStatus = Nothing + } + +-- ** Secret +-- | Secret +data Secret = Secret + { secretId :: !(Maybe Text) -- ^ "ID" + , secretVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , secretCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" + , secretUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" + , secretSpec :: !(Maybe SecretSpec) -- ^ "Spec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Secret +instance A.FromJSON Secret where + parseJSON = A.withObject "Secret" $ \o -> + Secret + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + +-- | ToJSON Secret +instance A.ToJSON Secret where + toJSON Secret {..} = + _omitNulls + [ "ID" .= secretId + , "Version" .= secretVersion + , "CreatedAt" .= secretCreatedAt + , "UpdatedAt" .= secretUpdatedAt + , "Spec" .= secretSpec + ] + + +-- | Construct a value of type 'Secret' (by applying it's required fields, if any) +mkSecret + :: Secret +mkSecret = + Secret + { secretId = Nothing + , secretVersion = Nothing + , secretCreatedAt = Nothing + , secretUpdatedAt = Nothing + , secretSpec = Nothing + } + +-- ** SecretCreateRequest +-- | SecretCreateRequest +data SecretCreateRequest = SecretCreateRequest + { secretCreateRequestName :: !(Maybe Text) -- ^ "Name" - User-defined name of the secret. + , secretCreateRequestLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , secretCreateRequestData :: !(Maybe Text) -- ^ "Data" - Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) data to store as secret. This field is only used to _create_ a secret, and is not returned by other endpoints. + , secretCreateRequestDriver :: !(Maybe Driver) -- ^ "Driver" + , secretCreateRequestTemplating :: !(Maybe Driver) -- ^ "Templating" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SecretCreateRequest +instance A.FromJSON SecretCreateRequest where + parseJSON = A.withObject "SecretCreateRequest" $ \o -> + SecretCreateRequest + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Data") + <*> (o .:? "Driver") + <*> (o .:? "Templating") + +-- | ToJSON SecretCreateRequest +instance A.ToJSON SecretCreateRequest where + toJSON SecretCreateRequest {..} = + _omitNulls + [ "Name" .= secretCreateRequestName + , "Labels" .= secretCreateRequestLabels + , "Data" .= secretCreateRequestData + , "Driver" .= secretCreateRequestDriver + , "Templating" .= secretCreateRequestTemplating + ] + + +-- | Construct a value of type 'SecretCreateRequest' (by applying it's required fields, if any) +mkSecretCreateRequest + :: SecretCreateRequest +mkSecretCreateRequest = + SecretCreateRequest + { secretCreateRequestName = Nothing + , secretCreateRequestLabels = Nothing + , secretCreateRequestData = Nothing + , secretCreateRequestDriver = Nothing + , secretCreateRequestTemplating = Nothing + } + +-- ** SecretSpec +-- | SecretSpec +data SecretSpec = SecretSpec + { secretSpecName :: !(Maybe Text) -- ^ "Name" - User-defined name of the secret. + , secretSpecLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , secretSpecData :: !(Maybe Text) -- ^ "Data" - Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) data to store as secret. This field is only used to _create_ a secret, and is not returned by other endpoints. + , secretSpecDriver :: !(Maybe Driver) -- ^ "Driver" + , secretSpecTemplating :: !(Maybe Driver) -- ^ "Templating" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SecretSpec +instance A.FromJSON SecretSpec where + parseJSON = A.withObject "SecretSpec" $ \o -> + SecretSpec + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Data") + <*> (o .:? "Driver") + <*> (o .:? "Templating") + +-- | ToJSON SecretSpec +instance A.ToJSON SecretSpec where + toJSON SecretSpec {..} = + _omitNulls + [ "Name" .= secretSpecName + , "Labels" .= secretSpecLabels + , "Data" .= secretSpecData + , "Driver" .= secretSpecDriver + , "Templating" .= secretSpecTemplating + ] + + +-- | Construct a value of type 'SecretSpec' (by applying it's required fields, if any) +mkSecretSpec + :: SecretSpec +mkSecretSpec = + SecretSpec + { secretSpecName = Nothing + , secretSpecLabels = Nothing + , secretSpecData = Nothing + , secretSpecDriver = Nothing + , secretSpecTemplating = Nothing + } + +-- ** Service +-- | Service +data Service = Service + { serviceId :: !(Maybe Text) -- ^ "ID" + , serviceVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , serviceCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" + , serviceUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" + , serviceSpec :: !(Maybe ServiceSpec) -- ^ "Spec" + , serviceEndpoint :: !(Maybe ServiceEndpoint) -- ^ "Endpoint" + , serviceUpdateStatus :: !(Maybe ServiceUpdateStatus) -- ^ "UpdateStatus" + , serviceServiceStatus :: !(Maybe ServiceServiceStatus) -- ^ "ServiceStatus" + , serviceJobStatus :: !(Maybe ServiceJobStatus) -- ^ "JobStatus" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Service +instance A.FromJSON Service where + parseJSON = A.withObject "Service" $ \o -> + Service + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + <*> (o .:? "Endpoint") + <*> (o .:? "UpdateStatus") + <*> (o .:? "ServiceStatus") + <*> (o .:? "JobStatus") + +-- | ToJSON Service +instance A.ToJSON Service where + toJSON Service {..} = + _omitNulls + [ "ID" .= serviceId + , "Version" .= serviceVersion + , "CreatedAt" .= serviceCreatedAt + , "UpdatedAt" .= serviceUpdatedAt + , "Spec" .= serviceSpec + , "Endpoint" .= serviceEndpoint + , "UpdateStatus" .= serviceUpdateStatus + , "ServiceStatus" .= serviceServiceStatus + , "JobStatus" .= serviceJobStatus + ] + + +-- | Construct a value of type 'Service' (by applying it's required fields, if any) +mkService + :: Service +mkService = + Service + { serviceId = Nothing + , serviceVersion = Nothing + , serviceCreatedAt = Nothing + , serviceUpdatedAt = Nothing + , serviceSpec = Nothing + , serviceEndpoint = Nothing + , serviceUpdateStatus = Nothing + , serviceServiceStatus = Nothing + , serviceJobStatus = Nothing + } + +-- ** ServiceCreateRequest +-- | ServiceCreateRequest +data ServiceCreateRequest = ServiceCreateRequest + { serviceCreateRequestName :: !(Maybe Text) -- ^ "Name" - Name of the service. + , serviceCreateRequestLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , serviceCreateRequestTaskTemplate :: !(Maybe TaskSpec) -- ^ "TaskTemplate" + , serviceCreateRequestMode :: !(Maybe ServiceSpecMode) -- ^ "Mode" + , serviceCreateRequestUpdateConfig :: !(Maybe ServiceSpecUpdateConfig) -- ^ "UpdateConfig" + , serviceCreateRequestRollbackConfig :: !(Maybe ServiceSpecRollbackConfig) -- ^ "RollbackConfig" + , serviceCreateRequestNetworks :: !(Maybe [NetworkAttachmentConfig]) -- ^ "Networks" - Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + , serviceCreateRequestEndpointSpec :: !(Maybe EndpointSpec) -- ^ "EndpointSpec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceCreateRequest +instance A.FromJSON ServiceCreateRequest where + parseJSON = A.withObject "ServiceCreateRequest" $ \o -> + ServiceCreateRequest + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "TaskTemplate") + <*> (o .:? "Mode") + <*> (o .:? "UpdateConfig") + <*> (o .:? "RollbackConfig") + <*> (o .:? "Networks") + <*> (o .:? "EndpointSpec") + +-- | ToJSON ServiceCreateRequest +instance A.ToJSON ServiceCreateRequest where + toJSON ServiceCreateRequest {..} = + _omitNulls + [ "Name" .= serviceCreateRequestName + , "Labels" .= serviceCreateRequestLabels + , "TaskTemplate" .= serviceCreateRequestTaskTemplate + , "Mode" .= serviceCreateRequestMode + , "UpdateConfig" .= serviceCreateRequestUpdateConfig + , "RollbackConfig" .= serviceCreateRequestRollbackConfig + , "Networks" .= serviceCreateRequestNetworks + , "EndpointSpec" .= serviceCreateRequestEndpointSpec + ] + + +-- | Construct a value of type 'ServiceCreateRequest' (by applying it's required fields, if any) +mkServiceCreateRequest + :: ServiceCreateRequest +mkServiceCreateRequest = + ServiceCreateRequest + { serviceCreateRequestName = Nothing + , serviceCreateRequestLabels = Nothing + , serviceCreateRequestTaskTemplate = Nothing + , serviceCreateRequestMode = Nothing + , serviceCreateRequestUpdateConfig = Nothing + , serviceCreateRequestRollbackConfig = Nothing + , serviceCreateRequestNetworks = Nothing + , serviceCreateRequestEndpointSpec = Nothing + } + +-- ** ServiceCreateResponse +-- | ServiceCreateResponse +-- contains the information returned to a client on the creation of a new service. +data ServiceCreateResponse = ServiceCreateResponse + { serviceCreateResponseId :: !(Maybe Text) -- ^ "ID" - The ID of the created service. + , serviceCreateResponseWarnings :: !(Maybe [Text]) -- ^ "Warnings" - Optional warning message. FIXME(thaJeztah): this should have \"omitempty\" in the generated type. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceCreateResponse +instance A.FromJSON ServiceCreateResponse where + parseJSON = A.withObject "ServiceCreateResponse" $ \o -> + ServiceCreateResponse + <$> (o .:? "ID") + <*> (o .:? "Warnings") + +-- | ToJSON ServiceCreateResponse +instance A.ToJSON ServiceCreateResponse where + toJSON ServiceCreateResponse {..} = + _omitNulls + [ "ID" .= serviceCreateResponseId + , "Warnings" .= serviceCreateResponseWarnings + ] + + +-- | Construct a value of type 'ServiceCreateResponse' (by applying it's required fields, if any) +mkServiceCreateResponse + :: ServiceCreateResponse +mkServiceCreateResponse = + ServiceCreateResponse + { serviceCreateResponseId = Nothing + , serviceCreateResponseWarnings = Nothing + } + +-- ** ServiceEndpoint +-- | ServiceEndpoint +data ServiceEndpoint = ServiceEndpoint + { serviceEndpointSpec :: !(Maybe EndpointSpec) -- ^ "Spec" + , serviceEndpointPorts :: !(Maybe [EndpointPortConfig]) -- ^ "Ports" + , serviceEndpointVirtualIps :: !(Maybe [ServiceEndpointVirtualIPsInner]) -- ^ "VirtualIPs" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceEndpoint +instance A.FromJSON ServiceEndpoint where + parseJSON = A.withObject "ServiceEndpoint" $ \o -> + ServiceEndpoint + <$> (o .:? "Spec") + <*> (o .:? "Ports") + <*> (o .:? "VirtualIPs") + +-- | ToJSON ServiceEndpoint +instance A.ToJSON ServiceEndpoint where + toJSON ServiceEndpoint {..} = + _omitNulls + [ "Spec" .= serviceEndpointSpec + , "Ports" .= serviceEndpointPorts + , "VirtualIPs" .= serviceEndpointVirtualIps + ] + + +-- | Construct a value of type 'ServiceEndpoint' (by applying it's required fields, if any) +mkServiceEndpoint + :: ServiceEndpoint +mkServiceEndpoint = + ServiceEndpoint + { serviceEndpointSpec = Nothing + , serviceEndpointPorts = Nothing + , serviceEndpointVirtualIps = Nothing + } + +-- ** ServiceEndpointVirtualIPsInner +-- | ServiceEndpointVirtualIPsInner +data ServiceEndpointVirtualIPsInner = ServiceEndpointVirtualIPsInner + { serviceEndpointVirtualIPsInnerNetworkId :: !(Maybe Text) -- ^ "NetworkID" + , serviceEndpointVirtualIPsInnerAddr :: !(Maybe Text) -- ^ "Addr" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceEndpointVirtualIPsInner +instance A.FromJSON ServiceEndpointVirtualIPsInner where + parseJSON = A.withObject "ServiceEndpointVirtualIPsInner" $ \o -> + ServiceEndpointVirtualIPsInner + <$> (o .:? "NetworkID") + <*> (o .:? "Addr") + +-- | ToJSON ServiceEndpointVirtualIPsInner +instance A.ToJSON ServiceEndpointVirtualIPsInner where + toJSON ServiceEndpointVirtualIPsInner {..} = + _omitNulls + [ "NetworkID" .= serviceEndpointVirtualIPsInnerNetworkId + , "Addr" .= serviceEndpointVirtualIPsInnerAddr + ] + + +-- | Construct a value of type 'ServiceEndpointVirtualIPsInner' (by applying it's required fields, if any) +mkServiceEndpointVirtualIPsInner + :: ServiceEndpointVirtualIPsInner +mkServiceEndpointVirtualIPsInner = + ServiceEndpointVirtualIPsInner + { serviceEndpointVirtualIPsInnerNetworkId = Nothing + , serviceEndpointVirtualIPsInnerAddr = Nothing + } + +-- ** ServiceJobStatus +-- | ServiceJobStatus +-- 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. +data ServiceJobStatus = ServiceJobStatus + { serviceJobStatusJobIteration :: !(Maybe ObjectVersion) -- ^ "JobIteration" + , serviceJobStatusLastExecution :: !(Maybe Text) -- ^ "LastExecution" - The last time, as observed by the server, that this job was started. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceJobStatus +instance A.FromJSON ServiceJobStatus where + parseJSON = A.withObject "ServiceJobStatus" $ \o -> + ServiceJobStatus + <$> (o .:? "JobIteration") + <*> (o .:? "LastExecution") + +-- | ToJSON ServiceJobStatus +instance A.ToJSON ServiceJobStatus where + toJSON ServiceJobStatus {..} = + _omitNulls + [ "JobIteration" .= serviceJobStatusJobIteration + , "LastExecution" .= serviceJobStatusLastExecution + ] + + +-- | Construct a value of type 'ServiceJobStatus' (by applying it's required fields, if any) +mkServiceJobStatus + :: ServiceJobStatus +mkServiceJobStatus = + ServiceJobStatus + { serviceJobStatusJobIteration = Nothing + , serviceJobStatusLastExecution = Nothing + } + +-- ** ServiceServiceStatus +-- | ServiceServiceStatus +-- The status of the service's tasks. Provided only when requested as part of a ServiceList operation. +data ServiceServiceStatus = ServiceServiceStatus + { serviceServiceStatusRunningTasks :: !(Maybe Int) -- ^ "RunningTasks" - The number of tasks for the service currently in the Running state. + , serviceServiceStatusDesiredTasks :: !(Maybe Int) -- ^ "DesiredTasks" - The number of tasks for the service desired to be running. For replicated services, this is the replica count from the service spec. For global services, this is computed by taking count of all tasks for the service with a Desired State other than Shutdown. + , serviceServiceStatusCompletedTasks :: !(Maybe Int) -- ^ "CompletedTasks" - The number of tasks for a job that are in the Completed state. This field must be cross-referenced with the service type, as the value of 0 may mean the service is not in a job mode, or it may mean the job-mode service has no tasks yet Completed. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceServiceStatus +instance A.FromJSON ServiceServiceStatus where + parseJSON = A.withObject "ServiceServiceStatus" $ \o -> + ServiceServiceStatus + <$> (o .:? "RunningTasks") + <*> (o .:? "DesiredTasks") + <*> (o .:? "CompletedTasks") + +-- | ToJSON ServiceServiceStatus +instance A.ToJSON ServiceServiceStatus where + toJSON ServiceServiceStatus {..} = + _omitNulls + [ "RunningTasks" .= serviceServiceStatusRunningTasks + , "DesiredTasks" .= serviceServiceStatusDesiredTasks + , "CompletedTasks" .= serviceServiceStatusCompletedTasks + ] + + +-- | Construct a value of type 'ServiceServiceStatus' (by applying it's required fields, if any) +mkServiceServiceStatus + :: ServiceServiceStatus +mkServiceServiceStatus = + ServiceServiceStatus + { serviceServiceStatusRunningTasks = Nothing + , serviceServiceStatusDesiredTasks = Nothing + , serviceServiceStatusCompletedTasks = Nothing + } + +-- ** ServiceSpec +-- | ServiceSpec +-- User modifiable configuration for a service. +data ServiceSpec = ServiceSpec + { serviceSpecName :: !(Maybe Text) -- ^ "Name" - Name of the service. + , serviceSpecLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , serviceSpecTaskTemplate :: !(Maybe TaskSpec) -- ^ "TaskTemplate" + , serviceSpecMode :: !(Maybe ServiceSpecMode) -- ^ "Mode" + , serviceSpecUpdateConfig :: !(Maybe ServiceSpecUpdateConfig) -- ^ "UpdateConfig" + , serviceSpecRollbackConfig :: !(Maybe ServiceSpecRollbackConfig) -- ^ "RollbackConfig" + , serviceSpecNetworks :: !(Maybe [NetworkAttachmentConfig]) -- ^ "Networks" - Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + , serviceSpecEndpointSpec :: !(Maybe EndpointSpec) -- ^ "EndpointSpec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceSpec +instance A.FromJSON ServiceSpec where + parseJSON = A.withObject "ServiceSpec" $ \o -> + ServiceSpec + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "TaskTemplate") + <*> (o .:? "Mode") + <*> (o .:? "UpdateConfig") + <*> (o .:? "RollbackConfig") + <*> (o .:? "Networks") + <*> (o .:? "EndpointSpec") + +-- | ToJSON ServiceSpec +instance A.ToJSON ServiceSpec where + toJSON ServiceSpec {..} = + _omitNulls + [ "Name" .= serviceSpecName + , "Labels" .= serviceSpecLabels + , "TaskTemplate" .= serviceSpecTaskTemplate + , "Mode" .= serviceSpecMode + , "UpdateConfig" .= serviceSpecUpdateConfig + , "RollbackConfig" .= serviceSpecRollbackConfig + , "Networks" .= serviceSpecNetworks + , "EndpointSpec" .= serviceSpecEndpointSpec + ] + + +-- | Construct a value of type 'ServiceSpec' (by applying it's required fields, if any) +mkServiceSpec + :: ServiceSpec +mkServiceSpec = + ServiceSpec + { serviceSpecName = Nothing + , serviceSpecLabels = Nothing + , serviceSpecTaskTemplate = Nothing + , serviceSpecMode = Nothing + , serviceSpecUpdateConfig = Nothing + , serviceSpecRollbackConfig = Nothing + , serviceSpecNetworks = Nothing + , serviceSpecEndpointSpec = Nothing + } + +-- ** ServiceSpecMode +-- | ServiceSpecMode +-- Scheduling mode for the service. +data ServiceSpecMode = ServiceSpecMode + { serviceSpecModeReplicated :: !(Maybe ServiceSpecModeReplicated) -- ^ "Replicated" + , serviceSpecModeGlobal :: !(Maybe A.Value) -- ^ "Global" + , serviceSpecModeReplicatedJob :: !(Maybe ServiceSpecModeReplicatedJob) -- ^ "ReplicatedJob" + , serviceSpecModeGlobalJob :: !(Maybe A.Value) -- ^ "GlobalJob" - The mode used for services which run a task to the completed state on each valid node. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceSpecMode +instance A.FromJSON ServiceSpecMode where + parseJSON = A.withObject "ServiceSpecMode" $ \o -> + ServiceSpecMode + <$> (o .:? "Replicated") + <*> (o .:? "Global") + <*> (o .:? "ReplicatedJob") + <*> (o .:? "GlobalJob") + +-- | ToJSON ServiceSpecMode +instance A.ToJSON ServiceSpecMode where + toJSON ServiceSpecMode {..} = + _omitNulls + [ "Replicated" .= serviceSpecModeReplicated + , "Global" .= serviceSpecModeGlobal + , "ReplicatedJob" .= serviceSpecModeReplicatedJob + , "GlobalJob" .= serviceSpecModeGlobalJob + ] + + +-- | Construct a value of type 'ServiceSpecMode' (by applying it's required fields, if any) +mkServiceSpecMode + :: ServiceSpecMode +mkServiceSpecMode = + ServiceSpecMode + { serviceSpecModeReplicated = Nothing + , serviceSpecModeGlobal = Nothing + , serviceSpecModeReplicatedJob = Nothing + , serviceSpecModeGlobalJob = Nothing + } + +-- ** ServiceSpecModeReplicated +-- | ServiceSpecModeReplicated +data ServiceSpecModeReplicated = ServiceSpecModeReplicated + { serviceSpecModeReplicatedReplicas :: !(Maybe Integer) -- ^ "Replicas" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceSpecModeReplicated +instance A.FromJSON ServiceSpecModeReplicated where + parseJSON = A.withObject "ServiceSpecModeReplicated" $ \o -> + ServiceSpecModeReplicated + <$> (o .:? "Replicas") + +-- | ToJSON ServiceSpecModeReplicated +instance A.ToJSON ServiceSpecModeReplicated where + toJSON ServiceSpecModeReplicated {..} = + _omitNulls + [ "Replicas" .= serviceSpecModeReplicatedReplicas + ] + + +-- | Construct a value of type 'ServiceSpecModeReplicated' (by applying it's required fields, if any) +mkServiceSpecModeReplicated + :: ServiceSpecModeReplicated +mkServiceSpecModeReplicated = + ServiceSpecModeReplicated + { serviceSpecModeReplicatedReplicas = Nothing + } + +-- ** ServiceSpecModeReplicatedJob +-- | ServiceSpecModeReplicatedJob +-- The mode used for services with a finite number of tasks that run to a completed state. +data ServiceSpecModeReplicatedJob = ServiceSpecModeReplicatedJob + { serviceSpecModeReplicatedJobMaxConcurrent :: !(Maybe Integer) -- ^ "MaxConcurrent" - The maximum number of replicas to run simultaneously. + , serviceSpecModeReplicatedJobTotalCompletions :: !(Maybe Integer) -- ^ "TotalCompletions" - The total number of replicas desired to reach the Completed state. If unset, will default to the value of `MaxConcurrent` + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceSpecModeReplicatedJob +instance A.FromJSON ServiceSpecModeReplicatedJob where + parseJSON = A.withObject "ServiceSpecModeReplicatedJob" $ \o -> + ServiceSpecModeReplicatedJob + <$> (o .:? "MaxConcurrent") + <*> (o .:? "TotalCompletions") + +-- | ToJSON ServiceSpecModeReplicatedJob +instance A.ToJSON ServiceSpecModeReplicatedJob where + toJSON ServiceSpecModeReplicatedJob {..} = + _omitNulls + [ "MaxConcurrent" .= serviceSpecModeReplicatedJobMaxConcurrent + , "TotalCompletions" .= serviceSpecModeReplicatedJobTotalCompletions + ] + + +-- | Construct a value of type 'ServiceSpecModeReplicatedJob' (by applying it's required fields, if any) +mkServiceSpecModeReplicatedJob + :: ServiceSpecModeReplicatedJob +mkServiceSpecModeReplicatedJob = + ServiceSpecModeReplicatedJob + { serviceSpecModeReplicatedJobMaxConcurrent = Nothing + , serviceSpecModeReplicatedJobTotalCompletions = Nothing + } + +-- ** ServiceSpecRollbackConfig +-- | ServiceSpecRollbackConfig +-- Specification for the rollback strategy of the service. +data ServiceSpecRollbackConfig = ServiceSpecRollbackConfig + { serviceSpecRollbackConfigParallelism :: !(Maybe Integer) -- ^ "Parallelism" - Maximum number of tasks to be rolled back in one iteration (0 means unlimited parallelism). + , serviceSpecRollbackConfigDelay :: !(Maybe Integer) -- ^ "Delay" - Amount of time between rollback iterations, in nanoseconds. + , serviceSpecRollbackConfigFailureAction :: !(Maybe E'FailureAction2) -- ^ "FailureAction" - Action to take if an rolled back task fails to run, or stops running during the rollback. + , serviceSpecRollbackConfigMonitor :: !(Maybe Integer) -- ^ "Monitor" - Amount of time to monitor each rolled back task for failures, in nanoseconds. + , serviceSpecRollbackConfigMaxFailureRatio :: !(Maybe Double) -- ^ "MaxFailureRatio" - The fraction of tasks that may fail during a rollback before the failure action is invoked, specified as a floating point number between 0 and 1. + , serviceSpecRollbackConfigOrder :: !(Maybe E'Order) -- ^ "Order" - The order of operations when rolling back a task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceSpecRollbackConfig +instance A.FromJSON ServiceSpecRollbackConfig where + parseJSON = A.withObject "ServiceSpecRollbackConfig" $ \o -> + ServiceSpecRollbackConfig + <$> (o .:? "Parallelism") + <*> (o .:? "Delay") + <*> (o .:? "FailureAction") + <*> (o .:? "Monitor") + <*> (o .:? "MaxFailureRatio") + <*> (o .:? "Order") + +-- | ToJSON ServiceSpecRollbackConfig +instance A.ToJSON ServiceSpecRollbackConfig where + toJSON ServiceSpecRollbackConfig {..} = + _omitNulls + [ "Parallelism" .= serviceSpecRollbackConfigParallelism + , "Delay" .= serviceSpecRollbackConfigDelay + , "FailureAction" .= serviceSpecRollbackConfigFailureAction + , "Monitor" .= serviceSpecRollbackConfigMonitor + , "MaxFailureRatio" .= serviceSpecRollbackConfigMaxFailureRatio + , "Order" .= serviceSpecRollbackConfigOrder + ] + + +-- | Construct a value of type 'ServiceSpecRollbackConfig' (by applying it's required fields, if any) +mkServiceSpecRollbackConfig + :: ServiceSpecRollbackConfig +mkServiceSpecRollbackConfig = + ServiceSpecRollbackConfig + { serviceSpecRollbackConfigParallelism = Nothing + , serviceSpecRollbackConfigDelay = Nothing + , serviceSpecRollbackConfigFailureAction = Nothing + , serviceSpecRollbackConfigMonitor = Nothing + , serviceSpecRollbackConfigMaxFailureRatio = Nothing + , serviceSpecRollbackConfigOrder = Nothing + } + +-- ** ServiceSpecUpdateConfig +-- | ServiceSpecUpdateConfig +-- Specification for the update strategy of the service. +data ServiceSpecUpdateConfig = ServiceSpecUpdateConfig + { serviceSpecUpdateConfigParallelism :: !(Maybe Integer) -- ^ "Parallelism" - Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism). + , serviceSpecUpdateConfigDelay :: !(Maybe Integer) -- ^ "Delay" - Amount of time between updates, in nanoseconds. + , serviceSpecUpdateConfigFailureAction :: !(Maybe E'FailureAction) -- ^ "FailureAction" - Action to take if an updated task fails to run, or stops running during the update. + , serviceSpecUpdateConfigMonitor :: !(Maybe Integer) -- ^ "Monitor" - Amount of time to monitor each updated task for failures, in nanoseconds. + , serviceSpecUpdateConfigMaxFailureRatio :: !(Maybe Double) -- ^ "MaxFailureRatio" - The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1. + , serviceSpecUpdateConfigOrder :: !(Maybe E'Order) -- ^ "Order" - The order of operations when rolling out an updated task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceSpecUpdateConfig +instance A.FromJSON ServiceSpecUpdateConfig where + parseJSON = A.withObject "ServiceSpecUpdateConfig" $ \o -> + ServiceSpecUpdateConfig + <$> (o .:? "Parallelism") + <*> (o .:? "Delay") + <*> (o .:? "FailureAction") + <*> (o .:? "Monitor") + <*> (o .:? "MaxFailureRatio") + <*> (o .:? "Order") + +-- | ToJSON ServiceSpecUpdateConfig +instance A.ToJSON ServiceSpecUpdateConfig where + toJSON ServiceSpecUpdateConfig {..} = + _omitNulls + [ "Parallelism" .= serviceSpecUpdateConfigParallelism + , "Delay" .= serviceSpecUpdateConfigDelay + , "FailureAction" .= serviceSpecUpdateConfigFailureAction + , "Monitor" .= serviceSpecUpdateConfigMonitor + , "MaxFailureRatio" .= serviceSpecUpdateConfigMaxFailureRatio + , "Order" .= serviceSpecUpdateConfigOrder + ] + + +-- | Construct a value of type 'ServiceSpecUpdateConfig' (by applying it's required fields, if any) +mkServiceSpecUpdateConfig + :: ServiceSpecUpdateConfig +mkServiceSpecUpdateConfig = + ServiceSpecUpdateConfig + { serviceSpecUpdateConfigParallelism = Nothing + , serviceSpecUpdateConfigDelay = Nothing + , serviceSpecUpdateConfigFailureAction = Nothing + , serviceSpecUpdateConfigMonitor = Nothing + , serviceSpecUpdateConfigMaxFailureRatio = Nothing + , serviceSpecUpdateConfigOrder = Nothing + } + +-- ** ServiceUpdateRequest +-- | ServiceUpdateRequest +data ServiceUpdateRequest = ServiceUpdateRequest + { serviceUpdateRequestName :: !(Maybe Text) -- ^ "Name" - Name of the service. + , serviceUpdateRequestLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , serviceUpdateRequestTaskTemplate :: !(Maybe TaskSpec) -- ^ "TaskTemplate" + , serviceUpdateRequestMode :: !(Maybe ServiceSpecMode) -- ^ "Mode" + , serviceUpdateRequestUpdateConfig :: !(Maybe ServiceSpecUpdateConfig) -- ^ "UpdateConfig" + , serviceUpdateRequestRollbackConfig :: !(Maybe ServiceSpecRollbackConfig) -- ^ "RollbackConfig" + , serviceUpdateRequestNetworks :: !(Maybe [NetworkAttachmentConfig]) -- ^ "Networks" - Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. + , serviceUpdateRequestEndpointSpec :: !(Maybe EndpointSpec) -- ^ "EndpointSpec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceUpdateRequest +instance A.FromJSON ServiceUpdateRequest where + parseJSON = A.withObject "ServiceUpdateRequest" $ \o -> + ServiceUpdateRequest + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "TaskTemplate") + <*> (o .:? "Mode") + <*> (o .:? "UpdateConfig") + <*> (o .:? "RollbackConfig") + <*> (o .:? "Networks") + <*> (o .:? "EndpointSpec") + +-- | ToJSON ServiceUpdateRequest +instance A.ToJSON ServiceUpdateRequest where + toJSON ServiceUpdateRequest {..} = + _omitNulls + [ "Name" .= serviceUpdateRequestName + , "Labels" .= serviceUpdateRequestLabels + , "TaskTemplate" .= serviceUpdateRequestTaskTemplate + , "Mode" .= serviceUpdateRequestMode + , "UpdateConfig" .= serviceUpdateRequestUpdateConfig + , "RollbackConfig" .= serviceUpdateRequestRollbackConfig + , "Networks" .= serviceUpdateRequestNetworks + , "EndpointSpec" .= serviceUpdateRequestEndpointSpec + ] + + +-- | Construct a value of type 'ServiceUpdateRequest' (by applying it's required fields, if any) +mkServiceUpdateRequest + :: ServiceUpdateRequest +mkServiceUpdateRequest = + ServiceUpdateRequest + { serviceUpdateRequestName = Nothing + , serviceUpdateRequestLabels = Nothing + , serviceUpdateRequestTaskTemplate = Nothing + , serviceUpdateRequestMode = Nothing + , serviceUpdateRequestUpdateConfig = Nothing + , serviceUpdateRequestRollbackConfig = Nothing + , serviceUpdateRequestNetworks = Nothing + , serviceUpdateRequestEndpointSpec = Nothing + } + +-- ** ServiceUpdateResponse +-- | ServiceUpdateResponse +data ServiceUpdateResponse = ServiceUpdateResponse + { serviceUpdateResponseWarnings :: !(Maybe [Text]) -- ^ "Warnings" - Optional warning messages + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceUpdateResponse +instance A.FromJSON ServiceUpdateResponse where + parseJSON = A.withObject "ServiceUpdateResponse" $ \o -> + ServiceUpdateResponse + <$> (o .:? "Warnings") + +-- | ToJSON ServiceUpdateResponse +instance A.ToJSON ServiceUpdateResponse where + toJSON ServiceUpdateResponse {..} = + _omitNulls + [ "Warnings" .= serviceUpdateResponseWarnings + ] + + +-- | Construct a value of type 'ServiceUpdateResponse' (by applying it's required fields, if any) +mkServiceUpdateResponse + :: ServiceUpdateResponse +mkServiceUpdateResponse = + ServiceUpdateResponse + { serviceUpdateResponseWarnings = Nothing + } + +-- ** ServiceUpdateStatus +-- | ServiceUpdateStatus +-- The status of a service update. +data ServiceUpdateStatus = ServiceUpdateStatus + { serviceUpdateStatusState :: !(Maybe E'State) -- ^ "State" + , serviceUpdateStatusStartedAt :: !(Maybe Text) -- ^ "StartedAt" + , serviceUpdateStatusCompletedAt :: !(Maybe Text) -- ^ "CompletedAt" + , serviceUpdateStatusMessage :: !(Maybe Text) -- ^ "Message" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ServiceUpdateStatus +instance A.FromJSON ServiceUpdateStatus where + parseJSON = A.withObject "ServiceUpdateStatus" $ \o -> + ServiceUpdateStatus + <$> (o .:? "State") + <*> (o .:? "StartedAt") + <*> (o .:? "CompletedAt") + <*> (o .:? "Message") + +-- | ToJSON ServiceUpdateStatus +instance A.ToJSON ServiceUpdateStatus where + toJSON ServiceUpdateStatus {..} = + _omitNulls + [ "State" .= serviceUpdateStatusState + , "StartedAt" .= serviceUpdateStatusStartedAt + , "CompletedAt" .= serviceUpdateStatusCompletedAt + , "Message" .= serviceUpdateStatusMessage + ] + + +-- | Construct a value of type 'ServiceUpdateStatus' (by applying it's required fields, if any) +mkServiceUpdateStatus + :: ServiceUpdateStatus +mkServiceUpdateStatus = + ServiceUpdateStatus + { serviceUpdateStatusState = Nothing + , serviceUpdateStatusStartedAt = Nothing + , serviceUpdateStatusCompletedAt = Nothing + , serviceUpdateStatusMessage = Nothing + } + +-- ** Swarm +-- | Swarm +data Swarm = Swarm + { swarmId :: !(Maybe Text) -- ^ "ID" - The ID of the swarm. + , swarmVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , swarmCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" - Date and time at which the swarm was initialised in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , swarmUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" - Date and time at which the swarm was last updated in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , swarmSpec :: !(Maybe SwarmSpec) -- ^ "Spec" + , swarmTlsInfo :: !(Maybe TLSInfo) -- ^ "TLSInfo" + , swarmRootRotationInProgress :: !(Maybe Bool) -- ^ "RootRotationInProgress" - Whether there is currently a root CA rotation in progress for the swarm + , swarmDataPathPort :: !(Maybe Int) -- ^ "DataPathPort" - DataPathPort specifies the data path port number for data traffic. Acceptable port range is 1024 to 49151. If no port is set or is set to 0, the default port (4789) is used. + , swarmDefaultAddrPool :: !(Maybe [Text]) -- ^ "DefaultAddrPool" - Default Address Pool specifies default subnet pools for global scope networks. + , swarmSubnetSize :: !(Maybe Int) -- ^ "SubnetSize" - SubnetSize specifies the subnet size of the networks created from the default subnet pool. + , swarmJoinTokens :: !(Maybe JoinTokens) -- ^ "JoinTokens" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Swarm +instance A.FromJSON Swarm where + parseJSON = A.withObject "Swarm" $ \o -> + Swarm + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Spec") + <*> (o .:? "TLSInfo") + <*> (o .:? "RootRotationInProgress") + <*> (o .:? "DataPathPort") + <*> (o .:? "DefaultAddrPool") + <*> (o .:? "SubnetSize") + <*> (o .:? "JoinTokens") + +-- | ToJSON Swarm +instance A.ToJSON Swarm where + toJSON Swarm {..} = + _omitNulls + [ "ID" .= swarmId + , "Version" .= swarmVersion + , "CreatedAt" .= swarmCreatedAt + , "UpdatedAt" .= swarmUpdatedAt + , "Spec" .= swarmSpec + , "TLSInfo" .= swarmTlsInfo + , "RootRotationInProgress" .= swarmRootRotationInProgress + , "DataPathPort" .= swarmDataPathPort + , "DefaultAddrPool" .= swarmDefaultAddrPool + , "SubnetSize" .= swarmSubnetSize + , "JoinTokens" .= swarmJoinTokens + ] + + +-- | Construct a value of type 'Swarm' (by applying it's required fields, if any) +mkSwarm + :: Swarm +mkSwarm = + Swarm + { swarmId = Nothing + , swarmVersion = Nothing + , swarmCreatedAt = Nothing + , swarmUpdatedAt = Nothing + , swarmSpec = Nothing + , swarmTlsInfo = Nothing + , swarmRootRotationInProgress = Nothing + , swarmDataPathPort = Nothing + , swarmDefaultAddrPool = Nothing + , swarmSubnetSize = Nothing + , swarmJoinTokens = Nothing + } + +-- ** SwarmInfo +-- | SwarmInfo +-- Represents generic information about swarm. +data SwarmInfo = SwarmInfo + { swarmInfoNodeId :: !(Maybe Text) -- ^ "NodeID" - Unique identifier of for this node in the swarm. + , swarmInfoNodeAddr :: !(Maybe Text) -- ^ "NodeAddr" - IP address at which this node can be reached by other nodes in the swarm. + , swarmInfoLocalNodeState :: !(Maybe LocalNodeState) -- ^ "LocalNodeState" + , swarmInfoControlAvailable :: !(Maybe Bool) -- ^ "ControlAvailable" + , swarmInfoError :: !(Maybe Text) -- ^ "Error" + , swarmInfoRemoteManagers :: !(Maybe [PeerNode]) -- ^ "RemoteManagers" - List of ID's and addresses of other managers in the swarm. + , swarmInfoNodes :: !(Maybe Int) -- ^ "Nodes" - Total number of nodes in the swarm. + , swarmInfoManagers :: !(Maybe Int) -- ^ "Managers" - Total number of managers in the swarm. + , swarmInfoCluster :: !(Maybe ClusterInfo) -- ^ "Cluster" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmInfo +instance A.FromJSON SwarmInfo where + parseJSON = A.withObject "SwarmInfo" $ \o -> + SwarmInfo + <$> (o .:? "NodeID") + <*> (o .:? "NodeAddr") + <*> (o .:? "LocalNodeState") + <*> (o .:? "ControlAvailable") + <*> (o .:? "Error") + <*> (o .:? "RemoteManagers") + <*> (o .:? "Nodes") + <*> (o .:? "Managers") + <*> (o .:? "Cluster") + +-- | ToJSON SwarmInfo +instance A.ToJSON SwarmInfo where + toJSON SwarmInfo {..} = + _omitNulls + [ "NodeID" .= swarmInfoNodeId + , "NodeAddr" .= swarmInfoNodeAddr + , "LocalNodeState" .= swarmInfoLocalNodeState + , "ControlAvailable" .= swarmInfoControlAvailable + , "Error" .= swarmInfoError + , "RemoteManagers" .= swarmInfoRemoteManagers + , "Nodes" .= swarmInfoNodes + , "Managers" .= swarmInfoManagers + , "Cluster" .= swarmInfoCluster + ] + + +-- | Construct a value of type 'SwarmInfo' (by applying it's required fields, if any) +mkSwarmInfo + :: SwarmInfo +mkSwarmInfo = + SwarmInfo + { swarmInfoNodeId = Nothing + , swarmInfoNodeAddr = Nothing + , swarmInfoLocalNodeState = Nothing + , swarmInfoControlAvailable = Nothing + , swarmInfoError = Nothing + , swarmInfoRemoteManagers = Nothing + , swarmInfoNodes = Nothing + , swarmInfoManagers = Nothing + , swarmInfoCluster = Nothing + } + +-- ** SwarmInitRequest +-- | SwarmInitRequest +-- SwarmInitRequest +-- +data SwarmInitRequest = SwarmInitRequest + { swarmInitRequestListenAddr :: !(Maybe Text) -- ^ "ListenAddr" - Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used. + , swarmInitRequestAdvertiseAddr :: !(Maybe Text) -- ^ "AdvertiseAddr" - Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. + , swarmInitRequestDataPathAddr :: !(Maybe Text) -- ^ "DataPathAddr" - Address or interface to use for data path traffic (format: `<ip|interface>`), for example, `192.168.1.1`, or an interface, like `eth0`. If `DataPathAddr` is unspecified, the same address as `AdvertiseAddr` is used. The `DataPathAddr` specifies the address that global scope network drivers will publish towards other nodes in order to reach the containers running on this node. Using this parameter it is possible to separate the container data traffic from the management traffic of the cluster. + , swarmInitRequestDataPathPort :: !(Maybe Int) -- ^ "DataPathPort" - DataPathPort specifies the data path port number for data traffic. Acceptable port range is 1024 to 49151. if no port is set or is set to 0, default port 4789 will be used. + , swarmInitRequestDefaultAddrPool :: !(Maybe [Text]) -- ^ "DefaultAddrPool" - Default Address Pool specifies default subnet pools for global scope networks. + , swarmInitRequestForceNewCluster :: !(Maybe Bool) -- ^ "ForceNewCluster" - Force creation of a new swarm. + , swarmInitRequestSubnetSize :: !(Maybe Int) -- ^ "SubnetSize" - SubnetSize specifies the subnet size of the networks created from the default subnet pool. + , swarmInitRequestSpec :: !(Maybe SwarmSpec) -- ^ "Spec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmInitRequest +instance A.FromJSON SwarmInitRequest where + parseJSON = A.withObject "SwarmInitRequest" $ \o -> + SwarmInitRequest + <$> (o .:? "ListenAddr") + <*> (o .:? "AdvertiseAddr") + <*> (o .:? "DataPathAddr") + <*> (o .:? "DataPathPort") + <*> (o .:? "DefaultAddrPool") + <*> (o .:? "ForceNewCluster") + <*> (o .:? "SubnetSize") + <*> (o .:? "Spec") + +-- | ToJSON SwarmInitRequest +instance A.ToJSON SwarmInitRequest where + toJSON SwarmInitRequest {..} = + _omitNulls + [ "ListenAddr" .= swarmInitRequestListenAddr + , "AdvertiseAddr" .= swarmInitRequestAdvertiseAddr + , "DataPathAddr" .= swarmInitRequestDataPathAddr + , "DataPathPort" .= swarmInitRequestDataPathPort + , "DefaultAddrPool" .= swarmInitRequestDefaultAddrPool + , "ForceNewCluster" .= swarmInitRequestForceNewCluster + , "SubnetSize" .= swarmInitRequestSubnetSize + , "Spec" .= swarmInitRequestSpec + ] + + +-- | Construct a value of type 'SwarmInitRequest' (by applying it's required fields, if any) +mkSwarmInitRequest + :: SwarmInitRequest +mkSwarmInitRequest = + SwarmInitRequest + { swarmInitRequestListenAddr = Nothing + , swarmInitRequestAdvertiseAddr = Nothing + , swarmInitRequestDataPathAddr = Nothing + , swarmInitRequestDataPathPort = Nothing + , swarmInitRequestDefaultAddrPool = Nothing + , swarmInitRequestForceNewCluster = Nothing + , swarmInitRequestSubnetSize = Nothing + , swarmInitRequestSpec = Nothing + } + +-- ** SwarmJoinRequest +-- | SwarmJoinRequest +-- SwarmJoinRequest +-- +data SwarmJoinRequest = SwarmJoinRequest + { swarmJoinRequestListenAddr :: !(Maybe Text) -- ^ "ListenAddr" - Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). + , swarmJoinRequestAdvertiseAddr :: !(Maybe Text) -- ^ "AdvertiseAddr" - Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. + , swarmJoinRequestDataPathAddr :: !(Maybe Text) -- ^ "DataPathAddr" - Address or interface to use for data path traffic (format: `<ip|interface>`), for example, `192.168.1.1`, or an interface, like `eth0`. If `DataPathAddr` is unspecified, the same address as `AdvertiseAddr` is used. The `DataPathAddr` specifies the address that global scope network drivers will publish towards other nodes in order to reach the containers running on this node. Using this parameter it is possible to separate the container data traffic from the management traffic of the cluster. + , swarmJoinRequestRemoteAddrs :: !(Maybe [Text]) -- ^ "RemoteAddrs" - Addresses of manager nodes already participating in the swarm. + , swarmJoinRequestJoinToken :: !(Maybe Text) -- ^ "JoinToken" - Secret token for joining this swarm. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmJoinRequest +instance A.FromJSON SwarmJoinRequest where + parseJSON = A.withObject "SwarmJoinRequest" $ \o -> + SwarmJoinRequest + <$> (o .:? "ListenAddr") + <*> (o .:? "AdvertiseAddr") + <*> (o .:? "DataPathAddr") + <*> (o .:? "RemoteAddrs") + <*> (o .:? "JoinToken") + +-- | ToJSON SwarmJoinRequest +instance A.ToJSON SwarmJoinRequest where + toJSON SwarmJoinRequest {..} = + _omitNulls + [ "ListenAddr" .= swarmJoinRequestListenAddr + , "AdvertiseAddr" .= swarmJoinRequestAdvertiseAddr + , "DataPathAddr" .= swarmJoinRequestDataPathAddr + , "RemoteAddrs" .= swarmJoinRequestRemoteAddrs + , "JoinToken" .= swarmJoinRequestJoinToken + ] + + +-- | Construct a value of type 'SwarmJoinRequest' (by applying it's required fields, if any) +mkSwarmJoinRequest + :: SwarmJoinRequest +mkSwarmJoinRequest = + SwarmJoinRequest + { swarmJoinRequestListenAddr = Nothing + , swarmJoinRequestAdvertiseAddr = Nothing + , swarmJoinRequestDataPathAddr = Nothing + , swarmJoinRequestRemoteAddrs = Nothing + , swarmJoinRequestJoinToken = Nothing + } + +-- ** SwarmSpec +-- | SwarmSpec +-- User modifiable swarm configuration. +data SwarmSpec = SwarmSpec + { swarmSpecName :: !(Maybe Text) -- ^ "Name" - Name of the swarm. + , swarmSpecLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , swarmSpecOrchestration :: !(Maybe SwarmSpecOrchestration) -- ^ "Orchestration" + , swarmSpecRaft :: !(Maybe SwarmSpecRaft) -- ^ "Raft" + , swarmSpecDispatcher :: !(Maybe SwarmSpecDispatcher) -- ^ "Dispatcher" + , swarmSpecCaConfig :: !(Maybe SwarmSpecCAConfig) -- ^ "CAConfig" + , swarmSpecEncryptionConfig :: !(Maybe SwarmSpecEncryptionConfig) -- ^ "EncryptionConfig" + , swarmSpecTaskDefaults :: !(Maybe SwarmSpecTaskDefaults) -- ^ "TaskDefaults" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpec +instance A.FromJSON SwarmSpec where + parseJSON = A.withObject "SwarmSpec" $ \o -> + SwarmSpec + <$> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Orchestration") + <*> (o .:? "Raft") + <*> (o .:? "Dispatcher") + <*> (o .:? "CAConfig") + <*> (o .:? "EncryptionConfig") + <*> (o .:? "TaskDefaults") + +-- | ToJSON SwarmSpec +instance A.ToJSON SwarmSpec where + toJSON SwarmSpec {..} = + _omitNulls + [ "Name" .= swarmSpecName + , "Labels" .= swarmSpecLabels + , "Orchestration" .= swarmSpecOrchestration + , "Raft" .= swarmSpecRaft + , "Dispatcher" .= swarmSpecDispatcher + , "CAConfig" .= swarmSpecCaConfig + , "EncryptionConfig" .= swarmSpecEncryptionConfig + , "TaskDefaults" .= swarmSpecTaskDefaults + ] + + +-- | Construct a value of type 'SwarmSpec' (by applying it's required fields, if any) +mkSwarmSpec + :: SwarmSpec +mkSwarmSpec = + SwarmSpec + { swarmSpecName = Nothing + , swarmSpecLabels = Nothing + , swarmSpecOrchestration = Nothing + , swarmSpecRaft = Nothing + , swarmSpecDispatcher = Nothing + , swarmSpecCaConfig = Nothing + , swarmSpecEncryptionConfig = Nothing + , swarmSpecTaskDefaults = Nothing + } + +-- ** SwarmSpecCAConfig +-- | SwarmSpecCAConfig +-- CA configuration. +data SwarmSpecCAConfig = SwarmSpecCAConfig + { swarmSpecCAConfigNodeCertExpiry :: !(Maybe Integer) -- ^ "NodeCertExpiry" - The duration node certificates are issued for. + , swarmSpecCAConfigExternalCas :: !(Maybe [SwarmSpecCAConfigExternalCAsInner]) -- ^ "ExternalCAs" - Configuration for forwarding signing requests to an external certificate authority. + , swarmSpecCAConfigSigningCaCert :: !(Maybe Text) -- ^ "SigningCACert" - The desired signing CA certificate for all swarm node TLS leaf certificates, in PEM format. + , swarmSpecCAConfigSigningCaKey :: !(Maybe Text) -- ^ "SigningCAKey" - The desired signing CA key for all swarm node TLS leaf certificates, in PEM format. + , swarmSpecCAConfigForceRotate :: !(Maybe Int) -- ^ "ForceRotate" - An integer whose purpose is to force swarm to generate a new signing CA certificate and key, if none have been specified in `SigningCACert` and `SigningCAKey` + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecCAConfig +instance A.FromJSON SwarmSpecCAConfig where + parseJSON = A.withObject "SwarmSpecCAConfig" $ \o -> + SwarmSpecCAConfig + <$> (o .:? "NodeCertExpiry") + <*> (o .:? "ExternalCAs") + <*> (o .:? "SigningCACert") + <*> (o .:? "SigningCAKey") + <*> (o .:? "ForceRotate") + +-- | ToJSON SwarmSpecCAConfig +instance A.ToJSON SwarmSpecCAConfig where + toJSON SwarmSpecCAConfig {..} = + _omitNulls + [ "NodeCertExpiry" .= swarmSpecCAConfigNodeCertExpiry + , "ExternalCAs" .= swarmSpecCAConfigExternalCas + , "SigningCACert" .= swarmSpecCAConfigSigningCaCert + , "SigningCAKey" .= swarmSpecCAConfigSigningCaKey + , "ForceRotate" .= swarmSpecCAConfigForceRotate + ] + + +-- | Construct a value of type 'SwarmSpecCAConfig' (by applying it's required fields, if any) +mkSwarmSpecCAConfig + :: SwarmSpecCAConfig +mkSwarmSpecCAConfig = + SwarmSpecCAConfig + { swarmSpecCAConfigNodeCertExpiry = Nothing + , swarmSpecCAConfigExternalCas = Nothing + , swarmSpecCAConfigSigningCaCert = Nothing + , swarmSpecCAConfigSigningCaKey = Nothing + , swarmSpecCAConfigForceRotate = Nothing + } + +-- ** SwarmSpecCAConfigExternalCAsInner +-- | SwarmSpecCAConfigExternalCAsInner +data SwarmSpecCAConfigExternalCAsInner = SwarmSpecCAConfigExternalCAsInner + { swarmSpecCAConfigExternalCAsInnerProtocol :: !(Maybe E'Protocol) -- ^ "Protocol" - Protocol for communication with the external CA (currently only `cfssl` is supported). + , swarmSpecCAConfigExternalCAsInnerUrl :: !(Maybe Text) -- ^ "URL" - URL where certificate signing requests should be sent. + , swarmSpecCAConfigExternalCAsInnerOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver. + , swarmSpecCAConfigExternalCAsInnerCaCert :: !(Maybe Text) -- ^ "CACert" - The root CA certificate (in PEM format) this external CA uses to issue TLS certificates (assumed to be to the current swarm root CA certificate if not provided). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecCAConfigExternalCAsInner +instance A.FromJSON SwarmSpecCAConfigExternalCAsInner where + parseJSON = A.withObject "SwarmSpecCAConfigExternalCAsInner" $ \o -> + SwarmSpecCAConfigExternalCAsInner + <$> (o .:? "Protocol") + <*> (o .:? "URL") + <*> (o .:? "Options") + <*> (o .:? "CACert") + +-- | ToJSON SwarmSpecCAConfigExternalCAsInner +instance A.ToJSON SwarmSpecCAConfigExternalCAsInner where + toJSON SwarmSpecCAConfigExternalCAsInner {..} = + _omitNulls + [ "Protocol" .= swarmSpecCAConfigExternalCAsInnerProtocol + , "URL" .= swarmSpecCAConfigExternalCAsInnerUrl + , "Options" .= swarmSpecCAConfigExternalCAsInnerOptions + , "CACert" .= swarmSpecCAConfigExternalCAsInnerCaCert + ] + + +-- | Construct a value of type 'SwarmSpecCAConfigExternalCAsInner' (by applying it's required fields, if any) +mkSwarmSpecCAConfigExternalCAsInner + :: SwarmSpecCAConfigExternalCAsInner +mkSwarmSpecCAConfigExternalCAsInner = + SwarmSpecCAConfigExternalCAsInner + { swarmSpecCAConfigExternalCAsInnerProtocol = Nothing + , swarmSpecCAConfigExternalCAsInnerUrl = Nothing + , swarmSpecCAConfigExternalCAsInnerOptions = Nothing + , swarmSpecCAConfigExternalCAsInnerCaCert = Nothing + } + +-- ** SwarmSpecDispatcher +-- | SwarmSpecDispatcher +-- Dispatcher configuration. +data SwarmSpecDispatcher = SwarmSpecDispatcher + { swarmSpecDispatcherHeartbeatPeriod :: !(Maybe Integer) -- ^ "HeartbeatPeriod" - The delay for an agent to send a heartbeat to the dispatcher. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecDispatcher +instance A.FromJSON SwarmSpecDispatcher where + parseJSON = A.withObject "SwarmSpecDispatcher" $ \o -> + SwarmSpecDispatcher + <$> (o .:? "HeartbeatPeriod") + +-- | ToJSON SwarmSpecDispatcher +instance A.ToJSON SwarmSpecDispatcher where + toJSON SwarmSpecDispatcher {..} = + _omitNulls + [ "HeartbeatPeriod" .= swarmSpecDispatcherHeartbeatPeriod + ] + + +-- | Construct a value of type 'SwarmSpecDispatcher' (by applying it's required fields, if any) +mkSwarmSpecDispatcher + :: SwarmSpecDispatcher +mkSwarmSpecDispatcher = + SwarmSpecDispatcher + { swarmSpecDispatcherHeartbeatPeriod = Nothing + } + +-- ** SwarmSpecEncryptionConfig +-- | SwarmSpecEncryptionConfig +-- Parameters related to encryption-at-rest. +data SwarmSpecEncryptionConfig = SwarmSpecEncryptionConfig + { swarmSpecEncryptionConfigAutoLockManagers :: !(Maybe Bool) -- ^ "AutoLockManagers" - If set, generate a key and use it to lock data stored on the managers. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecEncryptionConfig +instance A.FromJSON SwarmSpecEncryptionConfig where + parseJSON = A.withObject "SwarmSpecEncryptionConfig" $ \o -> + SwarmSpecEncryptionConfig + <$> (o .:? "AutoLockManagers") + +-- | ToJSON SwarmSpecEncryptionConfig +instance A.ToJSON SwarmSpecEncryptionConfig where + toJSON SwarmSpecEncryptionConfig {..} = + _omitNulls + [ "AutoLockManagers" .= swarmSpecEncryptionConfigAutoLockManagers + ] + + +-- | Construct a value of type 'SwarmSpecEncryptionConfig' (by applying it's required fields, if any) +mkSwarmSpecEncryptionConfig + :: SwarmSpecEncryptionConfig +mkSwarmSpecEncryptionConfig = + SwarmSpecEncryptionConfig + { swarmSpecEncryptionConfigAutoLockManagers = Nothing + } + +-- ** SwarmSpecOrchestration +-- | SwarmSpecOrchestration +-- Orchestration configuration. +data SwarmSpecOrchestration = SwarmSpecOrchestration + { swarmSpecOrchestrationTaskHistoryRetentionLimit :: !(Maybe Integer) -- ^ "TaskHistoryRetentionLimit" - The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecOrchestration +instance A.FromJSON SwarmSpecOrchestration where + parseJSON = A.withObject "SwarmSpecOrchestration" $ \o -> + SwarmSpecOrchestration + <$> (o .:? "TaskHistoryRetentionLimit") + +-- | ToJSON SwarmSpecOrchestration +instance A.ToJSON SwarmSpecOrchestration where + toJSON SwarmSpecOrchestration {..} = + _omitNulls + [ "TaskHistoryRetentionLimit" .= swarmSpecOrchestrationTaskHistoryRetentionLimit + ] + + +-- | Construct a value of type 'SwarmSpecOrchestration' (by applying it's required fields, if any) +mkSwarmSpecOrchestration + :: SwarmSpecOrchestration +mkSwarmSpecOrchestration = + SwarmSpecOrchestration + { swarmSpecOrchestrationTaskHistoryRetentionLimit = Nothing + } + +-- ** SwarmSpecRaft +-- | SwarmSpecRaft +-- Raft configuration. +data SwarmSpecRaft = SwarmSpecRaft + { swarmSpecRaftSnapshotInterval :: !(Maybe Int) -- ^ "SnapshotInterval" - The number of log entries between snapshots. + , swarmSpecRaftKeepOldSnapshots :: !(Maybe Int) -- ^ "KeepOldSnapshots" - The number of snapshots to keep beyond the current snapshot. + , swarmSpecRaftLogEntriesForSlowFollowers :: !(Maybe Int) -- ^ "LogEntriesForSlowFollowers" - The number of log entries to keep around to sync up slow followers after a snapshot is created. + , swarmSpecRaftElectionTick :: !(Maybe Int) -- ^ "ElectionTick" - The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + , swarmSpecRaftHeartbeatTick :: !(Maybe Int) -- ^ "HeartbeatTick" - The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecRaft +instance A.FromJSON SwarmSpecRaft where + parseJSON = A.withObject "SwarmSpecRaft" $ \o -> + SwarmSpecRaft + <$> (o .:? "SnapshotInterval") + <*> (o .:? "KeepOldSnapshots") + <*> (o .:? "LogEntriesForSlowFollowers") + <*> (o .:? "ElectionTick") + <*> (o .:? "HeartbeatTick") + +-- | ToJSON SwarmSpecRaft +instance A.ToJSON SwarmSpecRaft where + toJSON SwarmSpecRaft {..} = + _omitNulls + [ "SnapshotInterval" .= swarmSpecRaftSnapshotInterval + , "KeepOldSnapshots" .= swarmSpecRaftKeepOldSnapshots + , "LogEntriesForSlowFollowers" .= swarmSpecRaftLogEntriesForSlowFollowers + , "ElectionTick" .= swarmSpecRaftElectionTick + , "HeartbeatTick" .= swarmSpecRaftHeartbeatTick + ] + + +-- | Construct a value of type 'SwarmSpecRaft' (by applying it's required fields, if any) +mkSwarmSpecRaft + :: SwarmSpecRaft +mkSwarmSpecRaft = + SwarmSpecRaft + { swarmSpecRaftSnapshotInterval = Nothing + , swarmSpecRaftKeepOldSnapshots = Nothing + , swarmSpecRaftLogEntriesForSlowFollowers = Nothing + , swarmSpecRaftElectionTick = Nothing + , swarmSpecRaftHeartbeatTick = Nothing + } + +-- ** SwarmSpecTaskDefaults +-- | SwarmSpecTaskDefaults +-- Defaults for creating tasks in this cluster. +data SwarmSpecTaskDefaults = SwarmSpecTaskDefaults + { swarmSpecTaskDefaultsLogDriver :: !(Maybe SwarmSpecTaskDefaultsLogDriver) -- ^ "LogDriver" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecTaskDefaults +instance A.FromJSON SwarmSpecTaskDefaults where + parseJSON = A.withObject "SwarmSpecTaskDefaults" $ \o -> + SwarmSpecTaskDefaults + <$> (o .:? "LogDriver") + +-- | ToJSON SwarmSpecTaskDefaults +instance A.ToJSON SwarmSpecTaskDefaults where + toJSON SwarmSpecTaskDefaults {..} = + _omitNulls + [ "LogDriver" .= swarmSpecTaskDefaultsLogDriver + ] + + +-- | Construct a value of type 'SwarmSpecTaskDefaults' (by applying it's required fields, if any) +mkSwarmSpecTaskDefaults + :: SwarmSpecTaskDefaults +mkSwarmSpecTaskDefaults = + SwarmSpecTaskDefaults + { swarmSpecTaskDefaultsLogDriver = Nothing + } + +-- ** SwarmSpecTaskDefaultsLogDriver +-- | SwarmSpecTaskDefaultsLogDriver +-- 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. +data SwarmSpecTaskDefaultsLogDriver = SwarmSpecTaskDefaultsLogDriver + { swarmSpecTaskDefaultsLogDriverName :: !(Maybe Text) -- ^ "Name" - The log driver to use as a default for new tasks. + , swarmSpecTaskDefaultsLogDriverOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" - Driver-specific options for the selectd log driver, specified as key/value pairs. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmSpecTaskDefaultsLogDriver +instance A.FromJSON SwarmSpecTaskDefaultsLogDriver where + parseJSON = A.withObject "SwarmSpecTaskDefaultsLogDriver" $ \o -> + SwarmSpecTaskDefaultsLogDriver + <$> (o .:? "Name") + <*> (o .:? "Options") + +-- | ToJSON SwarmSpecTaskDefaultsLogDriver +instance A.ToJSON SwarmSpecTaskDefaultsLogDriver where + toJSON SwarmSpecTaskDefaultsLogDriver {..} = + _omitNulls + [ "Name" .= swarmSpecTaskDefaultsLogDriverName + , "Options" .= swarmSpecTaskDefaultsLogDriverOptions + ] + + +-- | Construct a value of type 'SwarmSpecTaskDefaultsLogDriver' (by applying it's required fields, if any) +mkSwarmSpecTaskDefaultsLogDriver + :: SwarmSpecTaskDefaultsLogDriver +mkSwarmSpecTaskDefaultsLogDriver = + SwarmSpecTaskDefaultsLogDriver + { swarmSpecTaskDefaultsLogDriverName = Nothing + , swarmSpecTaskDefaultsLogDriverOptions = Nothing + } + +-- ** SwarmUnlockRequest +-- | SwarmUnlockRequest +-- SwarmUnlockRequest +-- +data SwarmUnlockRequest = SwarmUnlockRequest + { swarmUnlockRequestUnlockKey :: !(Maybe Text) -- ^ "UnlockKey" - The swarm's unlock key. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SwarmUnlockRequest +instance A.FromJSON SwarmUnlockRequest where + parseJSON = A.withObject "SwarmUnlockRequest" $ \o -> + SwarmUnlockRequest + <$> (o .:? "UnlockKey") + +-- | ToJSON SwarmUnlockRequest +instance A.ToJSON SwarmUnlockRequest where + toJSON SwarmUnlockRequest {..} = + _omitNulls + [ "UnlockKey" .= swarmUnlockRequestUnlockKey + ] + + +-- | Construct a value of type 'SwarmUnlockRequest' (by applying it's required fields, if any) +mkSwarmUnlockRequest + :: SwarmUnlockRequest +mkSwarmUnlockRequest = + SwarmUnlockRequest + { swarmUnlockRequestUnlockKey = Nothing + } + +-- ** SystemAuthResponse +-- | SystemAuthResponse +-- SystemAuthResponse +-- +data SystemAuthResponse = SystemAuthResponse + { systemAuthResponseStatus :: !(Text) -- ^ /Required/ "Status" - The status of the authentication + , systemAuthResponseIdentityToken :: !(Maybe Text) -- ^ "IdentityToken" - An opaque token used to authenticate a user after a successful login + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemAuthResponse +instance A.FromJSON SystemAuthResponse where + parseJSON = A.withObject "SystemAuthResponse" $ \o -> + SystemAuthResponse + <$> (o .: "Status") + <*> (o .:? "IdentityToken") + +-- | ToJSON SystemAuthResponse +instance A.ToJSON SystemAuthResponse where + toJSON SystemAuthResponse {..} = + _omitNulls + [ "Status" .= systemAuthResponseStatus + , "IdentityToken" .= systemAuthResponseIdentityToken + ] + + +-- | Construct a value of type 'SystemAuthResponse' (by applying it's required fields, if any) +mkSystemAuthResponse + :: Text -- ^ 'systemAuthResponseStatus': The status of the authentication + -> SystemAuthResponse +mkSystemAuthResponse systemAuthResponseStatus = + SystemAuthResponse + { systemAuthResponseStatus + , systemAuthResponseIdentityToken = Nothing + } + +-- ** SystemDataUsageResponse +-- | SystemDataUsageResponse +-- SystemDataUsageResponse +-- +data SystemDataUsageResponse = SystemDataUsageResponse + { systemDataUsageResponseLayersSize :: !(Maybe Integer) -- ^ "LayersSize" + , systemDataUsageResponseImages :: !(Maybe [ImageSummary]) -- ^ "Images" + , systemDataUsageResponseContainers :: !(Maybe [ContainerSummary]) -- ^ "Containers" + , systemDataUsageResponseVolumes :: !(Maybe [Volume]) -- ^ "Volumes" + , systemDataUsageResponseBuildCache :: !(Maybe [BuildCache]) -- ^ "BuildCache" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemDataUsageResponse +instance A.FromJSON SystemDataUsageResponse where + parseJSON = A.withObject "SystemDataUsageResponse" $ \o -> + SystemDataUsageResponse + <$> (o .:? "LayersSize") + <*> (o .:? "Images") + <*> (o .:? "Containers") + <*> (o .:? "Volumes") + <*> (o .:? "BuildCache") + +-- | ToJSON SystemDataUsageResponse +instance A.ToJSON SystemDataUsageResponse where + toJSON SystemDataUsageResponse {..} = + _omitNulls + [ "LayersSize" .= systemDataUsageResponseLayersSize + , "Images" .= systemDataUsageResponseImages + , "Containers" .= systemDataUsageResponseContainers + , "Volumes" .= systemDataUsageResponseVolumes + , "BuildCache" .= systemDataUsageResponseBuildCache + ] + + +-- | Construct a value of type 'SystemDataUsageResponse' (by applying it's required fields, if any) +mkSystemDataUsageResponse + :: SystemDataUsageResponse +mkSystemDataUsageResponse = + SystemDataUsageResponse + { systemDataUsageResponseLayersSize = Nothing + , systemDataUsageResponseImages = Nothing + , systemDataUsageResponseContainers = Nothing + , systemDataUsageResponseVolumes = Nothing + , systemDataUsageResponseBuildCache = Nothing + } + +-- ** SystemInfo +-- | SystemInfo +data SystemInfo = SystemInfo + { systemInfoId :: !(Maybe Text) -- ^ "ID" - Unique identifier of the daemon. <p><br /></p> > **Note**: The format of the ID itself is not part of the API, and > should not be considered stable. + , systemInfoContainers :: !(Maybe Int) -- ^ "Containers" - Total number of containers on the host. + , systemInfoContainersRunning :: !(Maybe Int) -- ^ "ContainersRunning" - Number of containers with status `\"running\"`. + , systemInfoContainersPaused :: !(Maybe Int) -- ^ "ContainersPaused" - Number of containers with status `\"paused\"`. + , systemInfoContainersStopped :: !(Maybe Int) -- ^ "ContainersStopped" - Number of containers with status `\"stopped\"`. + , systemInfoImages :: !(Maybe Int) -- ^ "Images" - Total number of images on the host. Both _tagged_ and _untagged_ (dangling) images are counted. + , systemInfoDriver :: !(Maybe Text) -- ^ "Driver" - Name of the storage driver in use. + , systemInfoDriverStatus :: !(Maybe [[Text]]) -- ^ "DriverStatus" - Information specific to the storage driver, provided as \"label\" / \"value\" pairs. This information is provided by the storage driver, and formatted in a way consistent with the output of `docker info` on the command line. <p><br /></p> > **Note**: The information returned in this field, including the > formatting of values and labels, should not be considered stable, > and may change without notice. + , systemInfoDockerRootDir :: !(Maybe Text) -- ^ "DockerRootDir" - Root directory of persistent Docker state. Defaults to `/var/lib/docker` on Linux, and `C:\\ProgramData\\docker` on Windows. + , systemInfoPlugins :: !(Maybe PluginsInfo) -- ^ "Plugins" + , systemInfoMemoryLimit :: !(Maybe Bool) -- ^ "MemoryLimit" - Indicates if the host has memory limit support enabled. + , systemInfoSwapLimit :: !(Maybe Bool) -- ^ "SwapLimit" - Indicates if the host has memory swap limit support enabled. + , systemInfoKernelMemoryTcp :: !(Maybe Bool) -- ^ "KernelMemoryTCP" - Indicates if the host has kernel memory TCP limit support enabled. This field is omitted if not supported. Kernel memory TCP limits are not supported when using cgroups v2, which does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. + , systemInfoCpuCfsPeriod :: !(Maybe Bool) -- ^ "CpuCfsPeriod" - Indicates if CPU CFS(Completely Fair Scheduler) period is supported by the host. + , systemInfoCpuCfsQuota :: !(Maybe Bool) -- ^ "CpuCfsQuota" - Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by the host. + , systemInfoCpuShares :: !(Maybe Bool) -- ^ "CPUShares" - Indicates if CPU Shares limiting is supported by the host. + , systemInfoCpuSet :: !(Maybe Bool) -- ^ "CPUSet" - Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) + , systemInfoPidsLimit :: !(Maybe Bool) -- ^ "PidsLimit" - Indicates if the host kernel has PID limit support enabled. + , systemInfoOomKillDisable :: !(Maybe Bool) -- ^ "OomKillDisable" - Indicates if OOM killer disable is supported on the host. + , systemInfoIpv4Forwarding :: !(Maybe Bool) -- ^ "IPv4Forwarding" - Indicates IPv4 forwarding is enabled. + , systemInfoBridgeNfIptables :: !(Maybe Bool) -- ^ "BridgeNfIptables" - Indicates if `bridge-nf-call-iptables` is available on the host. + , systemInfoBridgeNfIp6tables :: !(Maybe Bool) -- ^ "BridgeNfIp6tables" - Indicates if `bridge-nf-call-ip6tables` is available on the host. + , systemInfoDebug :: !(Maybe Bool) -- ^ "Debug" - Indicates if the daemon is running in debug-mode / with debug-level logging enabled. + , systemInfoNfd :: !(Maybe Int) -- ^ "NFd" - The total number of file Descriptors in use by the daemon process. This information is only returned if debug-mode is enabled. + , systemInfoNGoroutines :: !(Maybe Int) -- ^ "NGoroutines" - The number of goroutines that currently exist. This information is only returned if debug-mode is enabled. + , systemInfoSystemTime :: !(Maybe Text) -- ^ "SystemTime" - Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + , systemInfoLoggingDriver :: !(Maybe Text) -- ^ "LoggingDriver" - The logging driver to use as a default for new containers. + , systemInfoCgroupDriver :: !(Maybe E'CgroupDriver) -- ^ "CgroupDriver" - The driver to use for managing cgroups. + , systemInfoCgroupVersion :: !(Maybe E'CgroupVersion) -- ^ "CgroupVersion" - The version of the cgroup. + , systemInfoNEventsListener :: !(Maybe Int) -- ^ "NEventsListener" - Number of event listeners subscribed. + , systemInfoKernelVersion :: !(Maybe Text) -- ^ "KernelVersion" - Kernel version of the host. On Linux, this information obtained from `uname`. On Windows this information is queried from the <kbd>HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\</kbd> registry value, for example _\"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)\"_. + , systemInfoOperatingSystem :: !(Maybe Text) -- ^ "OperatingSystem" - Name of the host's operating system, for example: \"Ubuntu 24.04 LTS\" or \"Windows Server 2016 Datacenter\" + , systemInfoOsVersion :: !(Maybe Text) -- ^ "OSVersion" - Version of the host's operating system <p><br /></p> > **Note**: The information returned in this field, including its > very existence, and the formatting of values, should not be considered > stable, and may change without notice. + , systemInfoOsType :: !(Maybe Text) -- ^ "OSType" - Generic type of the operating system of the host, as returned by the Go runtime (`GOOS`). Currently returned values are \"linux\" and \"windows\". A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + , systemInfoArchitecture :: !(Maybe Text) -- ^ "Architecture" - Hardware architecture of the host, as returned by the Go runtime (`GOARCH`). A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). + , systemInfoNcpu :: !(Maybe Int) -- ^ "NCPU" - The number of logical CPUs usable by the daemon. The number of available CPUs is checked by querying the operating system when the daemon starts. Changes to operating system CPU allocation after the daemon is started are not reflected. + , systemInfoMemTotal :: !(Maybe Integer) -- ^ "MemTotal" - Total amount of physical memory available on the host, in bytes. + , systemInfoIndexServerAddress :: !(Maybe Text) -- ^ "IndexServerAddress" - Address / URL of the index server that is used for image search, and as a default for user authentication for Docker Hub and Docker Cloud. + , systemInfoRegistryConfig :: !(Maybe RegistryServiceConfig) -- ^ "RegistryConfig" + , systemInfoGenericResources :: !(Maybe [GenericResourcesInner]) -- ^ "GenericResources" - User-defined resources can be either Integer resources (e.g, `SSD=3`) or String resources (e.g, `GPU=UUID1`). + , systemInfoHttpProxy :: !(Maybe Text) -- ^ "HttpProxy" - HTTP-proxy configured for the daemon. This value is obtained from the [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration. + , systemInfoHttpsProxy :: !(Maybe Text) -- ^ "HttpsProxy" - HTTPS-proxy configured for the daemon. This value is obtained from the [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration. + , systemInfoNoProxy :: !(Maybe Text) -- ^ "NoProxy" - Comma-separated list of domain extensions for which no proxy should be used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Containers do not automatically inherit this configuration. + , systemInfoName :: !(Maybe Text) -- ^ "Name" - Hostname of the host. + , systemInfoLabels :: !(Maybe [Text]) -- ^ "Labels" - User-defined labels (key/value metadata) as set on the daemon. <p><br /></p> > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, > set through the daemon configuration, and _node_ labels, set from a > manager node in the Swarm. Node labels are not included in this > field. Node labels can be retrieved using the `/nodes/(id)` endpoint > on a manager node in the Swarm. + , systemInfoExperimentalBuild :: !(Maybe Bool) -- ^ "ExperimentalBuild" - Indicates if experimental features are enabled on the daemon. + , systemInfoServerVersion :: !(Maybe Text) -- ^ "ServerVersion" - Version string of the daemon. + , systemInfoRuntimes :: !(Maybe (Map.Map String Runtime)) -- ^ "Runtimes" - List of [OCI compliant](https://github.com/opencontainers/runtime-spec) runtimes configured on the daemon. Keys hold the \"name\" used to reference the runtime. The Docker daemon relies on an OCI compliant runtime (invoked via the `containerd` daemon) as its interface to the Linux kernel namespaces, cgroups, and SELinux. The default runtime is `runc`, and automatically configured. Additional runtimes can be configured by the user and will be listed here. + , systemInfoDefaultRuntime :: !(Maybe Text) -- ^ "DefaultRuntime" - Name of the default OCI runtime that is used when starting containers. The default can be overridden per-container at create time. + , systemInfoSwarm :: !(Maybe SwarmInfo) -- ^ "Swarm" + , systemInfoLiveRestoreEnabled :: !(Maybe Bool) -- ^ "LiveRestoreEnabled" - Indicates if live restore is enabled. If enabled, containers are kept running when the daemon is shutdown or upon daemon start if running containers are detected. + , systemInfoIsolation :: !(Maybe E'Isolation2) -- ^ "Isolation" - Represents the isolation technology to use as a default for containers. The supported values are platform-specific. If no isolation value is specified on daemon start, on Windows client, the default is `hyperv`, and on Windows server, the default is `process`. This option is currently not used on other platforms. + , systemInfoInitBinary :: !(Maybe Text) -- ^ "InitBinary" - Name and, optional, path of the `docker-init` binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result. + , systemInfoContainerdCommit :: !(Maybe Commit) -- ^ "ContainerdCommit" + , systemInfoRuncCommit :: !(Maybe Commit) -- ^ "RuncCommit" + , systemInfoInitCommit :: !(Maybe Commit) -- ^ "InitCommit" + , systemInfoSecurityOptions :: !(Maybe [Text]) -- ^ "SecurityOptions" - List of security features that are enabled on the daemon, such as apparmor, seccomp, SELinux, user-namespaces (userns), rootless and no-new-privileges. Additional configuration options for each security feature may be present, and are included as a comma-separated list of key/value pairs. + , systemInfoProductLicense :: !(Maybe Text) -- ^ "ProductLicense" - Reports a summary of the product license on the daemon. If a commercial license has been applied to the daemon, information such as number of nodes, and expiration are included. + , systemInfoDefaultAddressPools :: !(Maybe [SystemInfoDefaultAddressPoolsInner]) -- ^ "DefaultAddressPools" - List of custom default address pools for local networks, which can be specified in the daemon.json file or dockerd option. Example: a Base \"10.10.0.0/16\" with Size 24 will define the set of 256 10.10.[0-255].0/24 address pools. + , systemInfoWarnings :: !(Maybe [Text]) -- ^ "Warnings" - List of warnings / informational messages about missing features, or issues related to the daemon configuration. These messages can be printed by the client as information to the user. + , systemInfoCdiSpecDirs :: !(Maybe [Text]) -- ^ "CDISpecDirs" - List of directories where (Container Device Interface) CDI specifications are located. These specifications define vendor-specific modifications to an OCI runtime specification for a container being created. An empty list indicates that CDI device injection is disabled. Note that since using CDI device injection requires the daemon to have experimental enabled. For non-experimental daemons an empty list will always be returned. + , systemInfoContainerd :: !(Maybe ContainerdInfo) -- ^ "Containerd" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemInfo +instance A.FromJSON SystemInfo where + parseJSON = A.withObject "SystemInfo" $ \o -> + SystemInfo + <$> (o .:? "ID") + <*> (o .:? "Containers") + <*> (o .:? "ContainersRunning") + <*> (o .:? "ContainersPaused") + <*> (o .:? "ContainersStopped") + <*> (o .:? "Images") + <*> (o .:? "Driver") + <*> (o .:? "DriverStatus") + <*> (o .:? "DockerRootDir") + <*> (o .:? "Plugins") + <*> (o .:? "MemoryLimit") + <*> (o .:? "SwapLimit") + <*> (o .:? "KernelMemoryTCP") + <*> (o .:? "CpuCfsPeriod") + <*> (o .:? "CpuCfsQuota") + <*> (o .:? "CPUShares") + <*> (o .:? "CPUSet") + <*> (o .:? "PidsLimit") + <*> (o .:? "OomKillDisable") + <*> (o .:? "IPv4Forwarding") + <*> (o .:? "BridgeNfIptables") + <*> (o .:? "BridgeNfIp6tables") + <*> (o .:? "Debug") + <*> (o .:? "NFd") + <*> (o .:? "NGoroutines") + <*> (o .:? "SystemTime") + <*> (o .:? "LoggingDriver") + <*> (o .:? "CgroupDriver") + <*> (o .:? "CgroupVersion") + <*> (o .:? "NEventsListener") + <*> (o .:? "KernelVersion") + <*> (o .:? "OperatingSystem") + <*> (o .:? "OSVersion") + <*> (o .:? "OSType") + <*> (o .:? "Architecture") + <*> (o .:? "NCPU") + <*> (o .:? "MemTotal") + <*> (o .:? "IndexServerAddress") + <*> (o .:? "RegistryConfig") + <*> (o .:? "GenericResources") + <*> (o .:? "HttpProxy") + <*> (o .:? "HttpsProxy") + <*> (o .:? "NoProxy") + <*> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "ExperimentalBuild") + <*> (o .:? "ServerVersion") + <*> (o .:? "Runtimes") + <*> (o .:? "DefaultRuntime") + <*> (o .:? "Swarm") + <*> (o .:? "LiveRestoreEnabled") + <*> (o .:? "Isolation") + <*> (o .:? "InitBinary") + <*> (o .:? "ContainerdCommit") + <*> (o .:? "RuncCommit") + <*> (o .:? "InitCommit") + <*> (o .:? "SecurityOptions") + <*> (o .:? "ProductLicense") + <*> (o .:? "DefaultAddressPools") + <*> (o .:? "Warnings") + <*> (o .:? "CDISpecDirs") + <*> (o .:? "Containerd") + +-- | ToJSON SystemInfo +instance A.ToJSON SystemInfo where + toJSON SystemInfo {..} = + _omitNulls + [ "ID" .= systemInfoId + , "Containers" .= systemInfoContainers + , "ContainersRunning" .= systemInfoContainersRunning + , "ContainersPaused" .= systemInfoContainersPaused + , "ContainersStopped" .= systemInfoContainersStopped + , "Images" .= systemInfoImages + , "Driver" .= systemInfoDriver + , "DriverStatus" .= systemInfoDriverStatus + , "DockerRootDir" .= systemInfoDockerRootDir + , "Plugins" .= systemInfoPlugins + , "MemoryLimit" .= systemInfoMemoryLimit + , "SwapLimit" .= systemInfoSwapLimit + , "KernelMemoryTCP" .= systemInfoKernelMemoryTcp + , "CpuCfsPeriod" .= systemInfoCpuCfsPeriod + , "CpuCfsQuota" .= systemInfoCpuCfsQuota + , "CPUShares" .= systemInfoCpuShares + , "CPUSet" .= systemInfoCpuSet + , "PidsLimit" .= systemInfoPidsLimit + , "OomKillDisable" .= systemInfoOomKillDisable + , "IPv4Forwarding" .= systemInfoIpv4Forwarding + , "BridgeNfIptables" .= systemInfoBridgeNfIptables + , "BridgeNfIp6tables" .= systemInfoBridgeNfIp6tables + , "Debug" .= systemInfoDebug + , "NFd" .= systemInfoNfd + , "NGoroutines" .= systemInfoNGoroutines + , "SystemTime" .= systemInfoSystemTime + , "LoggingDriver" .= systemInfoLoggingDriver + , "CgroupDriver" .= systemInfoCgroupDriver + , "CgroupVersion" .= systemInfoCgroupVersion + , "NEventsListener" .= systemInfoNEventsListener + , "KernelVersion" .= systemInfoKernelVersion + , "OperatingSystem" .= systemInfoOperatingSystem + , "OSVersion" .= systemInfoOsVersion + , "OSType" .= systemInfoOsType + , "Architecture" .= systemInfoArchitecture + , "NCPU" .= systemInfoNcpu + , "MemTotal" .= systemInfoMemTotal + , "IndexServerAddress" .= systemInfoIndexServerAddress + , "RegistryConfig" .= systemInfoRegistryConfig + , "GenericResources" .= systemInfoGenericResources + , "HttpProxy" .= systemInfoHttpProxy + , "HttpsProxy" .= systemInfoHttpsProxy + , "NoProxy" .= systemInfoNoProxy + , "Name" .= systemInfoName + , "Labels" .= systemInfoLabels + , "ExperimentalBuild" .= systemInfoExperimentalBuild + , "ServerVersion" .= systemInfoServerVersion + , "Runtimes" .= systemInfoRuntimes + , "DefaultRuntime" .= systemInfoDefaultRuntime + , "Swarm" .= systemInfoSwarm + , "LiveRestoreEnabled" .= systemInfoLiveRestoreEnabled + , "Isolation" .= systemInfoIsolation + , "InitBinary" .= systemInfoInitBinary + , "ContainerdCommit" .= systemInfoContainerdCommit + , "RuncCommit" .= systemInfoRuncCommit + , "InitCommit" .= systemInfoInitCommit + , "SecurityOptions" .= systemInfoSecurityOptions + , "ProductLicense" .= systemInfoProductLicense + , "DefaultAddressPools" .= systemInfoDefaultAddressPools + , "Warnings" .= systemInfoWarnings + , "CDISpecDirs" .= systemInfoCdiSpecDirs + , "Containerd" .= systemInfoContainerd + ] + + +-- | Construct a value of type 'SystemInfo' (by applying it's required fields, if any) +mkSystemInfo + :: SystemInfo +mkSystemInfo = + SystemInfo + { systemInfoId = Nothing + , systemInfoContainers = Nothing + , systemInfoContainersRunning = Nothing + , systemInfoContainersPaused = Nothing + , systemInfoContainersStopped = Nothing + , systemInfoImages = Nothing + , systemInfoDriver = Nothing + , systemInfoDriverStatus = Nothing + , systemInfoDockerRootDir = Nothing + , systemInfoPlugins = Nothing + , systemInfoMemoryLimit = Nothing + , systemInfoSwapLimit = Nothing + , systemInfoKernelMemoryTcp = Nothing + , systemInfoCpuCfsPeriod = Nothing + , systemInfoCpuCfsQuota = Nothing + , systemInfoCpuShares = Nothing + , systemInfoCpuSet = Nothing + , systemInfoPidsLimit = Nothing + , systemInfoOomKillDisable = Nothing + , systemInfoIpv4Forwarding = Nothing + , systemInfoBridgeNfIptables = Nothing + , systemInfoBridgeNfIp6tables = Nothing + , systemInfoDebug = Nothing + , systemInfoNfd = Nothing + , systemInfoNGoroutines = Nothing + , systemInfoSystemTime = Nothing + , systemInfoLoggingDriver = Nothing + , systemInfoCgroupDriver = Nothing + , systemInfoCgroupVersion = Nothing + , systemInfoNEventsListener = Nothing + , systemInfoKernelVersion = Nothing + , systemInfoOperatingSystem = Nothing + , systemInfoOsVersion = Nothing + , systemInfoOsType = Nothing + , systemInfoArchitecture = Nothing + , systemInfoNcpu = Nothing + , systemInfoMemTotal = Nothing + , systemInfoIndexServerAddress = Nothing + , systemInfoRegistryConfig = Nothing + , systemInfoGenericResources = Nothing + , systemInfoHttpProxy = Nothing + , systemInfoHttpsProxy = Nothing + , systemInfoNoProxy = Nothing + , systemInfoName = Nothing + , systemInfoLabels = Nothing + , systemInfoExperimentalBuild = Nothing + , systemInfoServerVersion = Nothing + , systemInfoRuntimes = Nothing + , systemInfoDefaultRuntime = Nothing + , systemInfoSwarm = Nothing + , systemInfoLiveRestoreEnabled = Nothing + , systemInfoIsolation = Nothing + , systemInfoInitBinary = Nothing + , systemInfoContainerdCommit = Nothing + , systemInfoRuncCommit = Nothing + , systemInfoInitCommit = Nothing + , systemInfoSecurityOptions = Nothing + , systemInfoProductLicense = Nothing + , systemInfoDefaultAddressPools = Nothing + , systemInfoWarnings = Nothing + , systemInfoCdiSpecDirs = Nothing + , systemInfoContainerd = Nothing + } + +-- ** SystemInfoDefaultAddressPoolsInner +-- | SystemInfoDefaultAddressPoolsInner +data SystemInfoDefaultAddressPoolsInner = SystemInfoDefaultAddressPoolsInner + { systemInfoDefaultAddressPoolsInnerBase :: !(Maybe Text) -- ^ "Base" - The network address in CIDR format + , systemInfoDefaultAddressPoolsInnerSize :: !(Maybe Int) -- ^ "Size" - The network pool size + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemInfoDefaultAddressPoolsInner +instance A.FromJSON SystemInfoDefaultAddressPoolsInner where + parseJSON = A.withObject "SystemInfoDefaultAddressPoolsInner" $ \o -> + SystemInfoDefaultAddressPoolsInner + <$> (o .:? "Base") + <*> (o .:? "Size") + +-- | ToJSON SystemInfoDefaultAddressPoolsInner +instance A.ToJSON SystemInfoDefaultAddressPoolsInner where + toJSON SystemInfoDefaultAddressPoolsInner {..} = + _omitNulls + [ "Base" .= systemInfoDefaultAddressPoolsInnerBase + , "Size" .= systemInfoDefaultAddressPoolsInnerSize + ] + + +-- | Construct a value of type 'SystemInfoDefaultAddressPoolsInner' (by applying it's required fields, if any) +mkSystemInfoDefaultAddressPoolsInner + :: SystemInfoDefaultAddressPoolsInner +mkSystemInfoDefaultAddressPoolsInner = + SystemInfoDefaultAddressPoolsInner + { systemInfoDefaultAddressPoolsInnerBase = Nothing + , systemInfoDefaultAddressPoolsInnerSize = Nothing + } + +-- ** SystemVersion +-- | SystemVersion +-- Response of Engine API: GET \"/version\" +data SystemVersion = SystemVersion + { systemVersionPlatform :: !(Maybe SystemVersionPlatform) -- ^ "Platform" + , systemVersionComponents :: !(Maybe [SystemVersionComponentsInner]) -- ^ "Components" - Information about system components + , systemVersionVersion :: !(Maybe Text) -- ^ "Version" - The version of the daemon + , systemVersionApiVersion :: !(Maybe Text) -- ^ "ApiVersion" - The default (and highest) API version that is supported by the daemon + , systemVersionMinApiVersion :: !(Maybe Text) -- ^ "MinAPIVersion" - The minimum API version that is supported by the daemon + , systemVersionGitCommit :: !(Maybe Text) -- ^ "GitCommit" - The Git commit of the source code that was used to build the daemon + , systemVersionGoVersion :: !(Maybe Text) -- ^ "GoVersion" - The version Go used to compile the daemon, and the version of the Go runtime in use. + , systemVersionOs :: !(Maybe Text) -- ^ "Os" - The operating system that the daemon is running on (\"linux\" or \"windows\") + , systemVersionArch :: !(Maybe Text) -- ^ "Arch" - The architecture that the daemon is running on + , systemVersionKernelVersion :: !(Maybe Text) -- ^ "KernelVersion" - The kernel version (`uname -r`) that the daemon is running on. This field is omitted when empty. + , systemVersionExperimental :: !(Maybe Bool) -- ^ "Experimental" - Indicates if the daemon is started with experimental features enabled. This field is omitted when empty / false. + , systemVersionBuildTime :: !(Maybe Text) -- ^ "BuildTime" - The date and time that the daemon was compiled. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemVersion +instance A.FromJSON SystemVersion where + parseJSON = A.withObject "SystemVersion" $ \o -> + SystemVersion + <$> (o .:? "Platform") + <*> (o .:? "Components") + <*> (o .:? "Version") + <*> (o .:? "ApiVersion") + <*> (o .:? "MinAPIVersion") + <*> (o .:? "GitCommit") + <*> (o .:? "GoVersion") + <*> (o .:? "Os") + <*> (o .:? "Arch") + <*> (o .:? "KernelVersion") + <*> (o .:? "Experimental") + <*> (o .:? "BuildTime") + +-- | ToJSON SystemVersion +instance A.ToJSON SystemVersion where + toJSON SystemVersion {..} = + _omitNulls + [ "Platform" .= systemVersionPlatform + , "Components" .= systemVersionComponents + , "Version" .= systemVersionVersion + , "ApiVersion" .= systemVersionApiVersion + , "MinAPIVersion" .= systemVersionMinApiVersion + , "GitCommit" .= systemVersionGitCommit + , "GoVersion" .= systemVersionGoVersion + , "Os" .= systemVersionOs + , "Arch" .= systemVersionArch + , "KernelVersion" .= systemVersionKernelVersion + , "Experimental" .= systemVersionExperimental + , "BuildTime" .= systemVersionBuildTime + ] + + +-- | Construct a value of type 'SystemVersion' (by applying it's required fields, if any) +mkSystemVersion + :: SystemVersion +mkSystemVersion = + SystemVersion + { systemVersionPlatform = Nothing + , systemVersionComponents = Nothing + , systemVersionVersion = Nothing + , systemVersionApiVersion = Nothing + , systemVersionMinApiVersion = Nothing + , systemVersionGitCommit = Nothing + , systemVersionGoVersion = Nothing + , systemVersionOs = Nothing + , systemVersionArch = Nothing + , systemVersionKernelVersion = Nothing + , systemVersionExperimental = Nothing + , systemVersionBuildTime = Nothing + } + +-- ** SystemVersionComponentsInner +-- | SystemVersionComponentsInner +data SystemVersionComponentsInner = SystemVersionComponentsInner + { systemVersionComponentsInnerName :: !(Text) -- ^ /Required/ "Name" - Name of the component + , systemVersionComponentsInnerVersion :: !(Text) -- ^ /Required/ "Version" - Version of the component + , systemVersionComponentsInnerDetails :: !(Maybe A.Value) -- ^ "Details" - Key/value pairs of strings with additional information about the component. These values are intended for informational purposes only, and their content is not defined, and not part of the API specification. These messages can be printed by the client as information to the user. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemVersionComponentsInner +instance A.FromJSON SystemVersionComponentsInner where + parseJSON = A.withObject "SystemVersionComponentsInner" $ \o -> + SystemVersionComponentsInner + <$> (o .: "Name") + <*> (o .: "Version") + <*> (o .:? "Details") + +-- | ToJSON SystemVersionComponentsInner +instance A.ToJSON SystemVersionComponentsInner where + toJSON SystemVersionComponentsInner {..} = + _omitNulls + [ "Name" .= systemVersionComponentsInnerName + , "Version" .= systemVersionComponentsInnerVersion + , "Details" .= systemVersionComponentsInnerDetails + ] + + +-- | Construct a value of type 'SystemVersionComponentsInner' (by applying it's required fields, if any) +mkSystemVersionComponentsInner + :: Text -- ^ 'systemVersionComponentsInnerName': Name of the component + -> Text -- ^ 'systemVersionComponentsInnerVersion': Version of the component + -> SystemVersionComponentsInner +mkSystemVersionComponentsInner systemVersionComponentsInnerName systemVersionComponentsInnerVersion = + SystemVersionComponentsInner + { systemVersionComponentsInnerName + , systemVersionComponentsInnerVersion + , systemVersionComponentsInnerDetails = Nothing + } + +-- ** SystemVersionPlatform +-- | SystemVersionPlatform +data SystemVersionPlatform = SystemVersionPlatform + { systemVersionPlatformName :: !(Text) -- ^ /Required/ "Name" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON SystemVersionPlatform +instance A.FromJSON SystemVersionPlatform where + parseJSON = A.withObject "SystemVersionPlatform" $ \o -> + SystemVersionPlatform + <$> (o .: "Name") + +-- | ToJSON SystemVersionPlatform +instance A.ToJSON SystemVersionPlatform where + toJSON SystemVersionPlatform {..} = + _omitNulls + [ "Name" .= systemVersionPlatformName + ] + + +-- | Construct a value of type 'SystemVersionPlatform' (by applying it's required fields, if any) +mkSystemVersionPlatform + :: Text -- ^ 'systemVersionPlatformName' + -> SystemVersionPlatform +mkSystemVersionPlatform systemVersionPlatformName = + SystemVersionPlatform + { systemVersionPlatformName + } + +-- ** TLSInfo +-- | TLSInfo +-- Information about the issuer of leaf TLS certificates and the trusted root CA certificate. +data TLSInfo = TLSInfo + { tLSInfoTrustRoot :: !(Maybe Text) -- ^ "TrustRoot" - The root CA certificate(s) that are used to validate leaf TLS certificates. + , tLSInfoCertIssuerSubject :: !(Maybe Text) -- ^ "CertIssuerSubject" - The base64-url-safe-encoded raw subject bytes of the issuer. + , tLSInfoCertIssuerPublicKey :: !(Maybe Text) -- ^ "CertIssuerPublicKey" - The base64-url-safe-encoded raw public key bytes of the issuer. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TLSInfo +instance A.FromJSON TLSInfo where + parseJSON = A.withObject "TLSInfo" $ \o -> + TLSInfo + <$> (o .:? "TrustRoot") + <*> (o .:? "CertIssuerSubject") + <*> (o .:? "CertIssuerPublicKey") + +-- | ToJSON TLSInfo +instance A.ToJSON TLSInfo where + toJSON TLSInfo {..} = + _omitNulls + [ "TrustRoot" .= tLSInfoTrustRoot + , "CertIssuerSubject" .= tLSInfoCertIssuerSubject + , "CertIssuerPublicKey" .= tLSInfoCertIssuerPublicKey + ] + + +-- | Construct a value of type 'TLSInfo' (by applying it's required fields, if any) +mkTLSInfo + :: TLSInfo +mkTLSInfo = + TLSInfo + { tLSInfoTrustRoot = Nothing + , tLSInfoCertIssuerSubject = Nothing + , tLSInfoCertIssuerPublicKey = Nothing + } + +-- ** Task +-- | Task +data Task = Task + { taskId :: !(Maybe Text) -- ^ "ID" - The ID of the task. + , taskVersion :: !(Maybe ObjectVersion) -- ^ "Version" + , taskCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" + , taskUpdatedAt :: !(Maybe Text) -- ^ "UpdatedAt" + , taskName :: !(Maybe Text) -- ^ "Name" - Name of the task. + , taskLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , taskSpec :: !(Maybe TaskSpec) -- ^ "Spec" + , taskServiceId :: !(Maybe Text) -- ^ "ServiceID" - The ID of the service this task is part of. + , taskSlot :: !(Maybe Int) -- ^ "Slot" + , taskNodeId :: !(Maybe Text) -- ^ "NodeID" - The ID of the node that this task is on. + , taskAssignedGenericResources :: !(Maybe [GenericResourcesInner]) -- ^ "AssignedGenericResources" - User-defined resources can be either Integer resources (e.g, `SSD=3`) or String resources (e.g, `GPU=UUID1`). + , taskStatus :: !(Maybe TaskStatus) -- ^ "Status" + , taskDesiredState :: !(Maybe TaskState) -- ^ "DesiredState" + , taskJobIteration :: !(Maybe ObjectVersion) -- ^ "JobIteration" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Task +instance A.FromJSON Task where + parseJSON = A.withObject "Task" $ \o -> + Task + <$> (o .:? "ID") + <*> (o .:? "Version") + <*> (o .:? "CreatedAt") + <*> (o .:? "UpdatedAt") + <*> (o .:? "Name") + <*> (o .:? "Labels") + <*> (o .:? "Spec") + <*> (o .:? "ServiceID") + <*> (o .:? "Slot") + <*> (o .:? "NodeID") + <*> (o .:? "AssignedGenericResources") + <*> (o .:? "Status") + <*> (o .:? "DesiredState") + <*> (o .:? "JobIteration") + +-- | ToJSON Task +instance A.ToJSON Task where + toJSON Task {..} = + _omitNulls + [ "ID" .= taskId + , "Version" .= taskVersion + , "CreatedAt" .= taskCreatedAt + , "UpdatedAt" .= taskUpdatedAt + , "Name" .= taskName + , "Labels" .= taskLabels + , "Spec" .= taskSpec + , "ServiceID" .= taskServiceId + , "Slot" .= taskSlot + , "NodeID" .= taskNodeId + , "AssignedGenericResources" .= taskAssignedGenericResources + , "Status" .= taskStatus + , "DesiredState" .= taskDesiredState + , "JobIteration" .= taskJobIteration + ] + + +-- | Construct a value of type 'Task' (by applying it's required fields, if any) +mkTask + :: Task +mkTask = + Task + { taskId = Nothing + , taskVersion = Nothing + , taskCreatedAt = Nothing + , taskUpdatedAt = Nothing + , taskName = Nothing + , taskLabels = Nothing + , taskSpec = Nothing + , taskServiceId = Nothing + , taskSlot = Nothing + , taskNodeId = Nothing + , taskAssignedGenericResources = Nothing + , taskStatus = Nothing + , taskDesiredState = Nothing + , taskJobIteration = Nothing + } + +-- ** TaskSpec +-- | TaskSpec +-- User modifiable task configuration. +data TaskSpec = TaskSpec + { taskSpecPluginSpec :: !(Maybe TaskSpecPluginSpec) -- ^ "PluginSpec" + , taskSpecContainerSpec :: !(Maybe TaskSpecContainerSpec) -- ^ "ContainerSpec" + , taskSpecNetworkAttachmentSpec :: !(Maybe TaskSpecNetworkAttachmentSpec) -- ^ "NetworkAttachmentSpec" + , taskSpecResources :: !(Maybe TaskSpecResources) -- ^ "Resources" + , taskSpecRestartPolicy :: !(Maybe TaskSpecRestartPolicy) -- ^ "RestartPolicy" + , taskSpecPlacement :: !(Maybe TaskSpecPlacement) -- ^ "Placement" + , taskSpecForceUpdate :: !(Maybe Int) -- ^ "ForceUpdate" - A counter that triggers an update even if no relevant parameters have been changed. + , taskSpecRuntime :: !(Maybe Text) -- ^ "Runtime" - Runtime is the type of runtime specified for the task executor. + , taskSpecNetworks :: !(Maybe [NetworkAttachmentConfig]) -- ^ "Networks" - Specifies which networks the service should attach to. + , taskSpecLogDriver :: !(Maybe TaskSpecLogDriver) -- ^ "LogDriver" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpec +instance A.FromJSON TaskSpec where + parseJSON = A.withObject "TaskSpec" $ \o -> + TaskSpec + <$> (o .:? "PluginSpec") + <*> (o .:? "ContainerSpec") + <*> (o .:? "NetworkAttachmentSpec") + <*> (o .:? "Resources") + <*> (o .:? "RestartPolicy") + <*> (o .:? "Placement") + <*> (o .:? "ForceUpdate") + <*> (o .:? "Runtime") + <*> (o .:? "Networks") + <*> (o .:? "LogDriver") + +-- | ToJSON TaskSpec +instance A.ToJSON TaskSpec where + toJSON TaskSpec {..} = + _omitNulls + [ "PluginSpec" .= taskSpecPluginSpec + , "ContainerSpec" .= taskSpecContainerSpec + , "NetworkAttachmentSpec" .= taskSpecNetworkAttachmentSpec + , "Resources" .= taskSpecResources + , "RestartPolicy" .= taskSpecRestartPolicy + , "Placement" .= taskSpecPlacement + , "ForceUpdate" .= taskSpecForceUpdate + , "Runtime" .= taskSpecRuntime + , "Networks" .= taskSpecNetworks + , "LogDriver" .= taskSpecLogDriver + ] + + +-- | Construct a value of type 'TaskSpec' (by applying it's required fields, if any) +mkTaskSpec + :: TaskSpec +mkTaskSpec = + TaskSpec + { taskSpecPluginSpec = Nothing + , taskSpecContainerSpec = Nothing + , taskSpecNetworkAttachmentSpec = Nothing + , taskSpecResources = Nothing + , taskSpecRestartPolicy = Nothing + , taskSpecPlacement = Nothing + , taskSpecForceUpdate = Nothing + , taskSpecRuntime = Nothing + , taskSpecNetworks = Nothing + , taskSpecLogDriver = Nothing + } + +-- ** TaskSpecContainerSpec +-- | TaskSpecContainerSpec +-- 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`. +data TaskSpecContainerSpec = TaskSpecContainerSpec + { taskSpecContainerSpecImage :: !(Maybe Text) -- ^ "Image" - The image name to use for the container + , taskSpecContainerSpecLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value data. + , taskSpecContainerSpecCommand :: !(Maybe [Text]) -- ^ "Command" - The command to be run in the image. + , taskSpecContainerSpecArgs :: !(Maybe [Text]) -- ^ "Args" - Arguments to the command. + , taskSpecContainerSpecHostname :: !(Maybe Text) -- ^ "Hostname" - The hostname to use for the container, as a valid [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. + , taskSpecContainerSpecEnv :: !(Maybe [Text]) -- ^ "Env" - A list of environment variables in the form `VAR=value`. + , taskSpecContainerSpecDir :: !(Maybe Text) -- ^ "Dir" - The working directory for commands to run in. + , taskSpecContainerSpecUser :: !(Maybe Text) -- ^ "User" - The user inside the container. + , taskSpecContainerSpecGroups :: !(Maybe [Text]) -- ^ "Groups" - A list of additional groups that the container process will run as. + , taskSpecContainerSpecPrivileges :: !(Maybe TaskSpecContainerSpecPrivileges) -- ^ "Privileges" + , taskSpecContainerSpecTty :: !(Maybe Bool) -- ^ "TTY" - Whether a pseudo-TTY should be allocated. + , taskSpecContainerSpecOpenStdin :: !(Maybe Bool) -- ^ "OpenStdin" - Open `stdin` + , taskSpecContainerSpecReadOnly :: !(Maybe Bool) -- ^ "ReadOnly" - Mount the container's root filesystem as read only. + , taskSpecContainerSpecMounts :: !(Maybe [Mount]) -- ^ "Mounts" - Specification for mounts to be added to containers created as part of the service. + , taskSpecContainerSpecStopSignal :: !(Maybe Text) -- ^ "StopSignal" - Signal to stop the container. + , taskSpecContainerSpecStopGracePeriod :: !(Maybe Integer) -- ^ "StopGracePeriod" - Amount of time to wait for the container to terminate before forcefully killing it. + , taskSpecContainerSpecHealthCheck :: !(Maybe HealthConfig) -- ^ "HealthCheck" + , taskSpecContainerSpecHosts :: !(Maybe [Text]) -- ^ "Hosts" - A list of hostname/IP mappings to add to the container's `hosts` file. The format of extra hosts is specified in the [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) man page: IP_address canonical_hostname [aliases...] + , taskSpecContainerSpecDnsConfig :: !(Maybe TaskSpecContainerSpecDNSConfig) -- ^ "DNSConfig" + , taskSpecContainerSpecSecrets :: !(Maybe [TaskSpecContainerSpecSecretsInner]) -- ^ "Secrets" - Secrets contains references to zero or more secrets that will be exposed to the service. + , taskSpecContainerSpecOomScoreAdj :: !(Maybe Integer) -- ^ "OomScoreAdj" - An integer value containing the score given to the container in order to tune OOM killer preferences. + , taskSpecContainerSpecConfigs :: !(Maybe [TaskSpecContainerSpecConfigsInner]) -- ^ "Configs" - Configs contains references to zero or more configs that will be exposed to the service. + , taskSpecContainerSpecIsolation :: !(Maybe E'Isolation3) -- ^ "Isolation" - Isolation technology of the containers running the service. (Windows only) + , taskSpecContainerSpecInit :: !(Maybe Bool) -- ^ "Init" - Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. + , taskSpecContainerSpecSysctls :: !(Maybe (Map.Map String Text)) -- ^ "Sysctls" - Set kernel namedspaced parameters (sysctls) in the container. The Sysctls option on services accepts the same sysctls as the are supported on containers. Note that while the same sysctls are supported, no guarantees or checks are made about their suitability for a clustered environment, and it's up to the user to determine whether a given sysctl will work properly in a Service. + , taskSpecContainerSpecCapabilityAdd :: !(Maybe [Text]) -- ^ "CapabilityAdd" - A list of kernel capabilities to add to the default set for the container. + , taskSpecContainerSpecCapabilityDrop :: !(Maybe [Text]) -- ^ "CapabilityDrop" - A list of kernel capabilities to drop from the default set for the container. + , taskSpecContainerSpecUlimits :: !(Maybe [ResourcesUlimitsInner]) -- ^ "Ulimits" - A list of resource limits to set in the container. For example: `{\"Name\": \"nofile\", \"Soft\": 1024, \"Hard\": 2048}`\" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpec +instance A.FromJSON TaskSpecContainerSpec where + parseJSON = A.withObject "TaskSpecContainerSpec" $ \o -> + TaskSpecContainerSpec + <$> (o .:? "Image") + <*> (o .:? "Labels") + <*> (o .:? "Command") + <*> (o .:? "Args") + <*> (o .:? "Hostname") + <*> (o .:? "Env") + <*> (o .:? "Dir") + <*> (o .:? "User") + <*> (o .:? "Groups") + <*> (o .:? "Privileges") + <*> (o .:? "TTY") + <*> (o .:? "OpenStdin") + <*> (o .:? "ReadOnly") + <*> (o .:? "Mounts") + <*> (o .:? "StopSignal") + <*> (o .:? "StopGracePeriod") + <*> (o .:? "HealthCheck") + <*> (o .:? "Hosts") + <*> (o .:? "DNSConfig") + <*> (o .:? "Secrets") + <*> (o .:? "OomScoreAdj") + <*> (o .:? "Configs") + <*> (o .:? "Isolation") + <*> (o .:? "Init") + <*> (o .:? "Sysctls") + <*> (o .:? "CapabilityAdd") + <*> (o .:? "CapabilityDrop") + <*> (o .:? "Ulimits") + +-- | ToJSON TaskSpecContainerSpec +instance A.ToJSON TaskSpecContainerSpec where + toJSON TaskSpecContainerSpec {..} = + _omitNulls + [ "Image" .= taskSpecContainerSpecImage + , "Labels" .= taskSpecContainerSpecLabels + , "Command" .= taskSpecContainerSpecCommand + , "Args" .= taskSpecContainerSpecArgs + , "Hostname" .= taskSpecContainerSpecHostname + , "Env" .= taskSpecContainerSpecEnv + , "Dir" .= taskSpecContainerSpecDir + , "User" .= taskSpecContainerSpecUser + , "Groups" .= taskSpecContainerSpecGroups + , "Privileges" .= taskSpecContainerSpecPrivileges + , "TTY" .= taskSpecContainerSpecTty + , "OpenStdin" .= taskSpecContainerSpecOpenStdin + , "ReadOnly" .= taskSpecContainerSpecReadOnly + , "Mounts" .= taskSpecContainerSpecMounts + , "StopSignal" .= taskSpecContainerSpecStopSignal + , "StopGracePeriod" .= taskSpecContainerSpecStopGracePeriod + , "HealthCheck" .= taskSpecContainerSpecHealthCheck + , "Hosts" .= taskSpecContainerSpecHosts + , "DNSConfig" .= taskSpecContainerSpecDnsConfig + , "Secrets" .= taskSpecContainerSpecSecrets + , "OomScoreAdj" .= taskSpecContainerSpecOomScoreAdj + , "Configs" .= taskSpecContainerSpecConfigs + , "Isolation" .= taskSpecContainerSpecIsolation + , "Init" .= taskSpecContainerSpecInit + , "Sysctls" .= taskSpecContainerSpecSysctls + , "CapabilityAdd" .= taskSpecContainerSpecCapabilityAdd + , "CapabilityDrop" .= taskSpecContainerSpecCapabilityDrop + , "Ulimits" .= taskSpecContainerSpecUlimits + ] + + +-- | Construct a value of type 'TaskSpecContainerSpec' (by applying it's required fields, if any) +mkTaskSpecContainerSpec + :: TaskSpecContainerSpec +mkTaskSpecContainerSpec = + TaskSpecContainerSpec + { taskSpecContainerSpecImage = Nothing + , taskSpecContainerSpecLabels = Nothing + , taskSpecContainerSpecCommand = Nothing + , taskSpecContainerSpecArgs = Nothing + , taskSpecContainerSpecHostname = Nothing + , taskSpecContainerSpecEnv = Nothing + , taskSpecContainerSpecDir = Nothing + , taskSpecContainerSpecUser = Nothing + , taskSpecContainerSpecGroups = Nothing + , taskSpecContainerSpecPrivileges = Nothing + , taskSpecContainerSpecTty = Nothing + , taskSpecContainerSpecOpenStdin = Nothing + , taskSpecContainerSpecReadOnly = Nothing + , taskSpecContainerSpecMounts = Nothing + , taskSpecContainerSpecStopSignal = Nothing + , taskSpecContainerSpecStopGracePeriod = Nothing + , taskSpecContainerSpecHealthCheck = Nothing + , taskSpecContainerSpecHosts = Nothing + , taskSpecContainerSpecDnsConfig = Nothing + , taskSpecContainerSpecSecrets = Nothing + , taskSpecContainerSpecOomScoreAdj = Nothing + , taskSpecContainerSpecConfigs = Nothing + , taskSpecContainerSpecIsolation = Nothing + , taskSpecContainerSpecInit = Nothing + , taskSpecContainerSpecSysctls = Nothing + , taskSpecContainerSpecCapabilityAdd = Nothing + , taskSpecContainerSpecCapabilityDrop = Nothing + , taskSpecContainerSpecUlimits = Nothing + } + +-- ** TaskSpecContainerSpecConfigsInner +-- | TaskSpecContainerSpecConfigsInner +data TaskSpecContainerSpecConfigsInner = TaskSpecContainerSpecConfigsInner + { taskSpecContainerSpecConfigsInnerFile :: !(Maybe TaskSpecContainerSpecConfigsInnerFile) -- ^ "File" + , taskSpecContainerSpecConfigsInnerRuntime :: !(Maybe A.Value) -- ^ "Runtime" - Runtime represents a target that is not mounted into the container but is used by the task <p><br /><p> > **Note**: `Configs.File` and `Configs.Runtime` are mutually > exclusive + , taskSpecContainerSpecConfigsInnerConfigId :: !(Maybe Text) -- ^ "ConfigID" - ConfigID represents the ID of the specific config that we're referencing. + , taskSpecContainerSpecConfigsInnerConfigName :: !(Maybe Text) -- ^ "ConfigName" - ConfigName is the name of the config that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecConfigsInner +instance A.FromJSON TaskSpecContainerSpecConfigsInner where + parseJSON = A.withObject "TaskSpecContainerSpecConfigsInner" $ \o -> + TaskSpecContainerSpecConfigsInner + <$> (o .:? "File") + <*> (o .:? "Runtime") + <*> (o .:? "ConfigID") + <*> (o .:? "ConfigName") + +-- | ToJSON TaskSpecContainerSpecConfigsInner +instance A.ToJSON TaskSpecContainerSpecConfigsInner where + toJSON TaskSpecContainerSpecConfigsInner {..} = + _omitNulls + [ "File" .= taskSpecContainerSpecConfigsInnerFile + , "Runtime" .= taskSpecContainerSpecConfigsInnerRuntime + , "ConfigID" .= taskSpecContainerSpecConfigsInnerConfigId + , "ConfigName" .= taskSpecContainerSpecConfigsInnerConfigName + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecConfigsInner' (by applying it's required fields, if any) +mkTaskSpecContainerSpecConfigsInner + :: TaskSpecContainerSpecConfigsInner +mkTaskSpecContainerSpecConfigsInner = + TaskSpecContainerSpecConfigsInner + { taskSpecContainerSpecConfigsInnerFile = Nothing + , taskSpecContainerSpecConfigsInnerRuntime = Nothing + , taskSpecContainerSpecConfigsInnerConfigId = Nothing + , taskSpecContainerSpecConfigsInnerConfigName = Nothing + } + +-- ** TaskSpecContainerSpecConfigsInnerFile +-- | TaskSpecContainerSpecConfigsInnerFile +-- File represents a specific target that is backed by a file.


> **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive +data TaskSpecContainerSpecConfigsInnerFile = TaskSpecContainerSpecConfigsInnerFile + { taskSpecContainerSpecConfigsInnerFileName :: !(Maybe Text) -- ^ "Name" - Name represents the final filename in the filesystem. + , taskSpecContainerSpecConfigsInnerFileUid :: !(Maybe Text) -- ^ "UID" - UID represents the file UID. + , taskSpecContainerSpecConfigsInnerFileGid :: !(Maybe Text) -- ^ "GID" - GID represents the file GID. + , taskSpecContainerSpecConfigsInnerFileMode :: !(Maybe Int) -- ^ "Mode" - Mode represents the FileMode of the file. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecConfigsInnerFile +instance A.FromJSON TaskSpecContainerSpecConfigsInnerFile where + parseJSON = A.withObject "TaskSpecContainerSpecConfigsInnerFile" $ \o -> + TaskSpecContainerSpecConfigsInnerFile + <$> (o .:? "Name") + <*> (o .:? "UID") + <*> (o .:? "GID") + <*> (o .:? "Mode") + +-- | ToJSON TaskSpecContainerSpecConfigsInnerFile +instance A.ToJSON TaskSpecContainerSpecConfigsInnerFile where + toJSON TaskSpecContainerSpecConfigsInnerFile {..} = + _omitNulls + [ "Name" .= taskSpecContainerSpecConfigsInnerFileName + , "UID" .= taskSpecContainerSpecConfigsInnerFileUid + , "GID" .= taskSpecContainerSpecConfigsInnerFileGid + , "Mode" .= taskSpecContainerSpecConfigsInnerFileMode + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecConfigsInnerFile' (by applying it's required fields, if any) +mkTaskSpecContainerSpecConfigsInnerFile + :: TaskSpecContainerSpecConfigsInnerFile +mkTaskSpecContainerSpecConfigsInnerFile = + TaskSpecContainerSpecConfigsInnerFile + { taskSpecContainerSpecConfigsInnerFileName = Nothing + , taskSpecContainerSpecConfigsInnerFileUid = Nothing + , taskSpecContainerSpecConfigsInnerFileGid = Nothing + , taskSpecContainerSpecConfigsInnerFileMode = Nothing + } + +-- ** TaskSpecContainerSpecDNSConfig +-- | TaskSpecContainerSpecDNSConfig +-- Specification for DNS related configurations in resolver configuration file (`resolv.conf`). +data TaskSpecContainerSpecDNSConfig = TaskSpecContainerSpecDNSConfig + { taskSpecContainerSpecDNSConfigNameservers :: !(Maybe [Text]) -- ^ "Nameservers" - The IP addresses of the name servers. + , taskSpecContainerSpecDNSConfigSearch :: !(Maybe [Text]) -- ^ "Search" - A search list for host-name lookup. + , taskSpecContainerSpecDNSConfigOptions :: !(Maybe [Text]) -- ^ "Options" - A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecDNSConfig +instance A.FromJSON TaskSpecContainerSpecDNSConfig where + parseJSON = A.withObject "TaskSpecContainerSpecDNSConfig" $ \o -> + TaskSpecContainerSpecDNSConfig + <$> (o .:? "Nameservers") + <*> (o .:? "Search") + <*> (o .:? "Options") + +-- | ToJSON TaskSpecContainerSpecDNSConfig +instance A.ToJSON TaskSpecContainerSpecDNSConfig where + toJSON TaskSpecContainerSpecDNSConfig {..} = + _omitNulls + [ "Nameservers" .= taskSpecContainerSpecDNSConfigNameservers + , "Search" .= taskSpecContainerSpecDNSConfigSearch + , "Options" .= taskSpecContainerSpecDNSConfigOptions + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecDNSConfig' (by applying it's required fields, if any) +mkTaskSpecContainerSpecDNSConfig + :: TaskSpecContainerSpecDNSConfig +mkTaskSpecContainerSpecDNSConfig = + TaskSpecContainerSpecDNSConfig + { taskSpecContainerSpecDNSConfigNameservers = Nothing + , taskSpecContainerSpecDNSConfigSearch = Nothing + , taskSpecContainerSpecDNSConfigOptions = Nothing + } + +-- ** TaskSpecContainerSpecPrivileges +-- | TaskSpecContainerSpecPrivileges +-- Security options for the container +data TaskSpecContainerSpecPrivileges = TaskSpecContainerSpecPrivileges + { taskSpecContainerSpecPrivilegesCredentialSpec :: !(Maybe TaskSpecContainerSpecPrivilegesCredentialSpec) -- ^ "CredentialSpec" + , taskSpecContainerSpecPrivilegesSeLinuxContext :: !(Maybe TaskSpecContainerSpecPrivilegesSELinuxContext) -- ^ "SELinuxContext" + , taskSpecContainerSpecPrivilegesSeccomp :: !(Maybe TaskSpecContainerSpecPrivilegesSeccomp) -- ^ "Seccomp" + , taskSpecContainerSpecPrivilegesAppArmor :: !(Maybe TaskSpecContainerSpecPrivilegesAppArmor) -- ^ "AppArmor" + , taskSpecContainerSpecPrivilegesNoNewPrivileges :: !(Maybe Bool) -- ^ "NoNewPrivileges" - Configuration of the no_new_privs bit in the container + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecPrivileges +instance A.FromJSON TaskSpecContainerSpecPrivileges where + parseJSON = A.withObject "TaskSpecContainerSpecPrivileges" $ \o -> + TaskSpecContainerSpecPrivileges + <$> (o .:? "CredentialSpec") + <*> (o .:? "SELinuxContext") + <*> (o .:? "Seccomp") + <*> (o .:? "AppArmor") + <*> (o .:? "NoNewPrivileges") + +-- | ToJSON TaskSpecContainerSpecPrivileges +instance A.ToJSON TaskSpecContainerSpecPrivileges where + toJSON TaskSpecContainerSpecPrivileges {..} = + _omitNulls + [ "CredentialSpec" .= taskSpecContainerSpecPrivilegesCredentialSpec + , "SELinuxContext" .= taskSpecContainerSpecPrivilegesSeLinuxContext + , "Seccomp" .= taskSpecContainerSpecPrivilegesSeccomp + , "AppArmor" .= taskSpecContainerSpecPrivilegesAppArmor + , "NoNewPrivileges" .= taskSpecContainerSpecPrivilegesNoNewPrivileges + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecPrivileges' (by applying it's required fields, if any) +mkTaskSpecContainerSpecPrivileges + :: TaskSpecContainerSpecPrivileges +mkTaskSpecContainerSpecPrivileges = + TaskSpecContainerSpecPrivileges + { taskSpecContainerSpecPrivilegesCredentialSpec = Nothing + , taskSpecContainerSpecPrivilegesSeLinuxContext = Nothing + , taskSpecContainerSpecPrivilegesSeccomp = Nothing + , taskSpecContainerSpecPrivilegesAppArmor = Nothing + , taskSpecContainerSpecPrivilegesNoNewPrivileges = Nothing + } + +-- ** TaskSpecContainerSpecPrivilegesAppArmor +-- | TaskSpecContainerSpecPrivilegesAppArmor +-- Options for configuring AppArmor on the container +data TaskSpecContainerSpecPrivilegesAppArmor = TaskSpecContainerSpecPrivilegesAppArmor + { taskSpecContainerSpecPrivilegesAppArmorMode :: !(Maybe E'Mode3) -- ^ "Mode" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecPrivilegesAppArmor +instance A.FromJSON TaskSpecContainerSpecPrivilegesAppArmor where + parseJSON = A.withObject "TaskSpecContainerSpecPrivilegesAppArmor" $ \o -> + TaskSpecContainerSpecPrivilegesAppArmor + <$> (o .:? "Mode") + +-- | ToJSON TaskSpecContainerSpecPrivilegesAppArmor +instance A.ToJSON TaskSpecContainerSpecPrivilegesAppArmor where + toJSON TaskSpecContainerSpecPrivilegesAppArmor {..} = + _omitNulls + [ "Mode" .= taskSpecContainerSpecPrivilegesAppArmorMode + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecPrivilegesAppArmor' (by applying it's required fields, if any) +mkTaskSpecContainerSpecPrivilegesAppArmor + :: TaskSpecContainerSpecPrivilegesAppArmor +mkTaskSpecContainerSpecPrivilegesAppArmor = + TaskSpecContainerSpecPrivilegesAppArmor + { taskSpecContainerSpecPrivilegesAppArmorMode = Nothing + } + +-- ** TaskSpecContainerSpecPrivilegesCredentialSpec +-- | TaskSpecContainerSpecPrivilegesCredentialSpec +-- CredentialSpec for managed service account (Windows only) +data TaskSpecContainerSpecPrivilegesCredentialSpec = TaskSpecContainerSpecPrivilegesCredentialSpec + { taskSpecContainerSpecPrivilegesCredentialSpecConfig :: !(Maybe Text) -- ^ "Config" - Load credential spec from a Swarm Config with the given ID. The specified config must also be present in the Configs field with the Runtime property set. <p><br /></p> > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, > and `CredentialSpec.Config` are mutually exclusive. + , taskSpecContainerSpecPrivilegesCredentialSpecFile :: !(Maybe Text) -- ^ "File" - Load credential spec from this file. The file is read by the daemon, and must be present in the `CredentialSpecs` subdirectory in the docker data directory, which defaults to `C:\\ProgramData\\Docker\\` on Windows. For example, specifying `spec.json` loads `C:\\ProgramData\\Docker\\CredentialSpecs\\spec.json`. <p><br /></p> > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, > and `CredentialSpec.Config` are mutually exclusive. + , taskSpecContainerSpecPrivilegesCredentialSpecRegistry :: !(Maybe Text) -- ^ "Registry" - Load credential spec from this value in the Windows registry. The specified registry value must be located in: `HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Virtualization\\Containers\\CredentialSpecs` <p><br /></p> > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, > and `CredentialSpec.Config` are mutually exclusive. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecPrivilegesCredentialSpec +instance A.FromJSON TaskSpecContainerSpecPrivilegesCredentialSpec where + parseJSON = A.withObject "TaskSpecContainerSpecPrivilegesCredentialSpec" $ \o -> + TaskSpecContainerSpecPrivilegesCredentialSpec + <$> (o .:? "Config") + <*> (o .:? "File") + <*> (o .:? "Registry") + +-- | ToJSON TaskSpecContainerSpecPrivilegesCredentialSpec +instance A.ToJSON TaskSpecContainerSpecPrivilegesCredentialSpec where + toJSON TaskSpecContainerSpecPrivilegesCredentialSpec {..} = + _omitNulls + [ "Config" .= taskSpecContainerSpecPrivilegesCredentialSpecConfig + , "File" .= taskSpecContainerSpecPrivilegesCredentialSpecFile + , "Registry" .= taskSpecContainerSpecPrivilegesCredentialSpecRegistry + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecPrivilegesCredentialSpec' (by applying it's required fields, if any) +mkTaskSpecContainerSpecPrivilegesCredentialSpec + :: TaskSpecContainerSpecPrivilegesCredentialSpec +mkTaskSpecContainerSpecPrivilegesCredentialSpec = + TaskSpecContainerSpecPrivilegesCredentialSpec + { taskSpecContainerSpecPrivilegesCredentialSpecConfig = Nothing + , taskSpecContainerSpecPrivilegesCredentialSpecFile = Nothing + , taskSpecContainerSpecPrivilegesCredentialSpecRegistry = Nothing + } + +-- ** TaskSpecContainerSpecPrivilegesSELinuxContext +-- | TaskSpecContainerSpecPrivilegesSELinuxContext +-- SELinux labels of the container +data TaskSpecContainerSpecPrivilegesSELinuxContext = TaskSpecContainerSpecPrivilegesSELinuxContext + { taskSpecContainerSpecPrivilegesSELinuxContextDisable :: !(Maybe Bool) -- ^ "Disable" - Disable SELinux + , taskSpecContainerSpecPrivilegesSELinuxContextUser :: !(Maybe Text) -- ^ "User" - SELinux user label + , taskSpecContainerSpecPrivilegesSELinuxContextRole :: !(Maybe Text) -- ^ "Role" - SELinux role label + , taskSpecContainerSpecPrivilegesSELinuxContextType :: !(Maybe Text) -- ^ "Type" - SELinux type label + , taskSpecContainerSpecPrivilegesSELinuxContextLevel :: !(Maybe Text) -- ^ "Level" - SELinux level label + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecPrivilegesSELinuxContext +instance A.FromJSON TaskSpecContainerSpecPrivilegesSELinuxContext where + parseJSON = A.withObject "TaskSpecContainerSpecPrivilegesSELinuxContext" $ \o -> + TaskSpecContainerSpecPrivilegesSELinuxContext + <$> (o .:? "Disable") + <*> (o .:? "User") + <*> (o .:? "Role") + <*> (o .:? "Type") + <*> (o .:? "Level") + +-- | ToJSON TaskSpecContainerSpecPrivilegesSELinuxContext +instance A.ToJSON TaskSpecContainerSpecPrivilegesSELinuxContext where + toJSON TaskSpecContainerSpecPrivilegesSELinuxContext {..} = + _omitNulls + [ "Disable" .= taskSpecContainerSpecPrivilegesSELinuxContextDisable + , "User" .= taskSpecContainerSpecPrivilegesSELinuxContextUser + , "Role" .= taskSpecContainerSpecPrivilegesSELinuxContextRole + , "Type" .= taskSpecContainerSpecPrivilegesSELinuxContextType + , "Level" .= taskSpecContainerSpecPrivilegesSELinuxContextLevel + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecPrivilegesSELinuxContext' (by applying it's required fields, if any) +mkTaskSpecContainerSpecPrivilegesSELinuxContext + :: TaskSpecContainerSpecPrivilegesSELinuxContext +mkTaskSpecContainerSpecPrivilegesSELinuxContext = + TaskSpecContainerSpecPrivilegesSELinuxContext + { taskSpecContainerSpecPrivilegesSELinuxContextDisable = Nothing + , taskSpecContainerSpecPrivilegesSELinuxContextUser = Nothing + , taskSpecContainerSpecPrivilegesSELinuxContextRole = Nothing + , taskSpecContainerSpecPrivilegesSELinuxContextType = Nothing + , taskSpecContainerSpecPrivilegesSELinuxContextLevel = Nothing + } + +-- ** TaskSpecContainerSpecPrivilegesSeccomp +-- | TaskSpecContainerSpecPrivilegesSeccomp +-- Options for configuring seccomp on the container +data TaskSpecContainerSpecPrivilegesSeccomp = TaskSpecContainerSpecPrivilegesSeccomp + { taskSpecContainerSpecPrivilegesSeccompMode :: !(Maybe E'Mode2) -- ^ "Mode" + , taskSpecContainerSpecPrivilegesSeccompProfile :: !(Maybe Text) -- ^ "Profile" - The custom seccomp profile as a json object + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecPrivilegesSeccomp +instance A.FromJSON TaskSpecContainerSpecPrivilegesSeccomp where + parseJSON = A.withObject "TaskSpecContainerSpecPrivilegesSeccomp" $ \o -> + TaskSpecContainerSpecPrivilegesSeccomp + <$> (o .:? "Mode") + <*> (o .:? "Profile") + +-- | ToJSON TaskSpecContainerSpecPrivilegesSeccomp +instance A.ToJSON TaskSpecContainerSpecPrivilegesSeccomp where + toJSON TaskSpecContainerSpecPrivilegesSeccomp {..} = + _omitNulls + [ "Mode" .= taskSpecContainerSpecPrivilegesSeccompMode + , "Profile" .= taskSpecContainerSpecPrivilegesSeccompProfile + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecPrivilegesSeccomp' (by applying it's required fields, if any) +mkTaskSpecContainerSpecPrivilegesSeccomp + :: TaskSpecContainerSpecPrivilegesSeccomp +mkTaskSpecContainerSpecPrivilegesSeccomp = + TaskSpecContainerSpecPrivilegesSeccomp + { taskSpecContainerSpecPrivilegesSeccompMode = Nothing + , taskSpecContainerSpecPrivilegesSeccompProfile = Nothing + } + +-- ** TaskSpecContainerSpecSecretsInner +-- | TaskSpecContainerSpecSecretsInner +data TaskSpecContainerSpecSecretsInner = TaskSpecContainerSpecSecretsInner + { taskSpecContainerSpecSecretsInnerFile :: !(Maybe TaskSpecContainerSpecSecretsInnerFile) -- ^ "File" + , taskSpecContainerSpecSecretsInnerSecretId :: !(Maybe Text) -- ^ "SecretID" - SecretID represents the ID of the specific secret that we're referencing. + , taskSpecContainerSpecSecretsInnerSecretName :: !(Maybe Text) -- ^ "SecretName" - SecretName is the name of the secret that this references, but this is just provided for lookup/display purposes. The secret in the reference will be identified by its ID. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecSecretsInner +instance A.FromJSON TaskSpecContainerSpecSecretsInner where + parseJSON = A.withObject "TaskSpecContainerSpecSecretsInner" $ \o -> + TaskSpecContainerSpecSecretsInner + <$> (o .:? "File") + <*> (o .:? "SecretID") + <*> (o .:? "SecretName") + +-- | ToJSON TaskSpecContainerSpecSecretsInner +instance A.ToJSON TaskSpecContainerSpecSecretsInner where + toJSON TaskSpecContainerSpecSecretsInner {..} = + _omitNulls + [ "File" .= taskSpecContainerSpecSecretsInnerFile + , "SecretID" .= taskSpecContainerSpecSecretsInnerSecretId + , "SecretName" .= taskSpecContainerSpecSecretsInnerSecretName + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecSecretsInner' (by applying it's required fields, if any) +mkTaskSpecContainerSpecSecretsInner + :: TaskSpecContainerSpecSecretsInner +mkTaskSpecContainerSpecSecretsInner = + TaskSpecContainerSpecSecretsInner + { taskSpecContainerSpecSecretsInnerFile = Nothing + , taskSpecContainerSpecSecretsInnerSecretId = Nothing + , taskSpecContainerSpecSecretsInnerSecretName = Nothing + } + +-- ** TaskSpecContainerSpecSecretsInnerFile +-- | TaskSpecContainerSpecSecretsInnerFile +-- File represents a specific target that is backed by a file. +data TaskSpecContainerSpecSecretsInnerFile = TaskSpecContainerSpecSecretsInnerFile + { taskSpecContainerSpecSecretsInnerFileName :: !(Maybe Text) -- ^ "Name" - Name represents the final filename in the filesystem. + , taskSpecContainerSpecSecretsInnerFileUid :: !(Maybe Text) -- ^ "UID" - UID represents the file UID. + , taskSpecContainerSpecSecretsInnerFileGid :: !(Maybe Text) -- ^ "GID" - GID represents the file GID. + , taskSpecContainerSpecSecretsInnerFileMode :: !(Maybe Int) -- ^ "Mode" - Mode represents the FileMode of the file. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecContainerSpecSecretsInnerFile +instance A.FromJSON TaskSpecContainerSpecSecretsInnerFile where + parseJSON = A.withObject "TaskSpecContainerSpecSecretsInnerFile" $ \o -> + TaskSpecContainerSpecSecretsInnerFile + <$> (o .:? "Name") + <*> (o .:? "UID") + <*> (o .:? "GID") + <*> (o .:? "Mode") + +-- | ToJSON TaskSpecContainerSpecSecretsInnerFile +instance A.ToJSON TaskSpecContainerSpecSecretsInnerFile where + toJSON TaskSpecContainerSpecSecretsInnerFile {..} = + _omitNulls + [ "Name" .= taskSpecContainerSpecSecretsInnerFileName + , "UID" .= taskSpecContainerSpecSecretsInnerFileUid + , "GID" .= taskSpecContainerSpecSecretsInnerFileGid + , "Mode" .= taskSpecContainerSpecSecretsInnerFileMode + ] + + +-- | Construct a value of type 'TaskSpecContainerSpecSecretsInnerFile' (by applying it's required fields, if any) +mkTaskSpecContainerSpecSecretsInnerFile + :: TaskSpecContainerSpecSecretsInnerFile +mkTaskSpecContainerSpecSecretsInnerFile = + TaskSpecContainerSpecSecretsInnerFile + { taskSpecContainerSpecSecretsInnerFileName = Nothing + , taskSpecContainerSpecSecretsInnerFileUid = Nothing + , taskSpecContainerSpecSecretsInnerFileGid = Nothing + , taskSpecContainerSpecSecretsInnerFileMode = Nothing + } + +-- ** TaskSpecLogDriver +-- | TaskSpecLogDriver +-- 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. +data TaskSpecLogDriver = TaskSpecLogDriver + { taskSpecLogDriverName :: !(Maybe Text) -- ^ "Name" + , taskSpecLogDriverOptions :: !(Maybe (Map.Map String Text)) -- ^ "Options" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecLogDriver +instance A.FromJSON TaskSpecLogDriver where + parseJSON = A.withObject "TaskSpecLogDriver" $ \o -> + TaskSpecLogDriver + <$> (o .:? "Name") + <*> (o .:? "Options") + +-- | ToJSON TaskSpecLogDriver +instance A.ToJSON TaskSpecLogDriver where + toJSON TaskSpecLogDriver {..} = + _omitNulls + [ "Name" .= taskSpecLogDriverName + , "Options" .= taskSpecLogDriverOptions + ] + + +-- | Construct a value of type 'TaskSpecLogDriver' (by applying it's required fields, if any) +mkTaskSpecLogDriver + :: TaskSpecLogDriver +mkTaskSpecLogDriver = + TaskSpecLogDriver + { taskSpecLogDriverName = Nothing + , taskSpecLogDriverOptions = Nothing + } + +-- ** TaskSpecNetworkAttachmentSpec +-- | TaskSpecNetworkAttachmentSpec +-- 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`. +data TaskSpecNetworkAttachmentSpec = TaskSpecNetworkAttachmentSpec + { taskSpecNetworkAttachmentSpecContainerId :: !(Maybe Text) -- ^ "ContainerID" - ID of the container represented by this task + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecNetworkAttachmentSpec +instance A.FromJSON TaskSpecNetworkAttachmentSpec where + parseJSON = A.withObject "TaskSpecNetworkAttachmentSpec" $ \o -> + TaskSpecNetworkAttachmentSpec + <$> (o .:? "ContainerID") + +-- | ToJSON TaskSpecNetworkAttachmentSpec +instance A.ToJSON TaskSpecNetworkAttachmentSpec where + toJSON TaskSpecNetworkAttachmentSpec {..} = + _omitNulls + [ "ContainerID" .= taskSpecNetworkAttachmentSpecContainerId + ] + + +-- | Construct a value of type 'TaskSpecNetworkAttachmentSpec' (by applying it's required fields, if any) +mkTaskSpecNetworkAttachmentSpec + :: TaskSpecNetworkAttachmentSpec +mkTaskSpecNetworkAttachmentSpec = + TaskSpecNetworkAttachmentSpec + { taskSpecNetworkAttachmentSpecContainerId = Nothing + } + +-- ** TaskSpecPlacement +-- | TaskSpecPlacement +data TaskSpecPlacement = TaskSpecPlacement + { taskSpecPlacementConstraints :: !(Maybe [Text]) -- ^ "Constraints" - An array of constraint expressions to limit the set of nodes where a task can be scheduled. Constraint expressions can either use a _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find nodes that satisfy every expression (AND match). Constraints can match node or Docker Engine labels as follows: node attribute | matches | example ---------------------|--------------------------------|----------------------------------------------- `node.id` | Node ID | `node.id==2ivku8v2gvtg4` `node.hostname` | Node hostname | `node.hostname!=node-2` `node.role` | Node role (`manager`/`worker`) | `node.role==manager` `node.platform.os` | Node operating system | `node.platform.os==windows` `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` `node.labels` | User-defined node labels | `node.labels.security==high` `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-24.04` `engine.labels` apply to Docker Engine labels like operating system, drivers, etc. Swarm administrators add `node.labels` for operational purposes by using the [`node update endpoint`](#operation/NodeUpdate). + , taskSpecPlacementPreferences :: !(Maybe [TaskSpecPlacementPreferencesInner]) -- ^ "Preferences" - Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence. + , taskSpecPlacementMaxReplicas :: !(Maybe Integer) -- ^ "MaxReplicas" - Maximum number of replicas for per node (default value is 0, which is unlimited) + , taskSpecPlacementPlatforms :: !(Maybe [Platform]) -- ^ "Platforms" - Platforms stores all the platforms that the service's image can run on. This field is used in the platform filter for scheduling. If empty, then the platform filter is off, meaning there are no scheduling restrictions. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecPlacement +instance A.FromJSON TaskSpecPlacement where + parseJSON = A.withObject "TaskSpecPlacement" $ \o -> + TaskSpecPlacement + <$> (o .:? "Constraints") + <*> (o .:? "Preferences") + <*> (o .:? "MaxReplicas") + <*> (o .:? "Platforms") + +-- | ToJSON TaskSpecPlacement +instance A.ToJSON TaskSpecPlacement where + toJSON TaskSpecPlacement {..} = + _omitNulls + [ "Constraints" .= taskSpecPlacementConstraints + , "Preferences" .= taskSpecPlacementPreferences + , "MaxReplicas" .= taskSpecPlacementMaxReplicas + , "Platforms" .= taskSpecPlacementPlatforms + ] + + +-- | Construct a value of type 'TaskSpecPlacement' (by applying it's required fields, if any) +mkTaskSpecPlacement + :: TaskSpecPlacement +mkTaskSpecPlacement = + TaskSpecPlacement + { taskSpecPlacementConstraints = Nothing + , taskSpecPlacementPreferences = Nothing + , taskSpecPlacementMaxReplicas = Nothing + , taskSpecPlacementPlatforms = Nothing + } + +-- ** TaskSpecPlacementPreferencesInner +-- | TaskSpecPlacementPreferencesInner +data TaskSpecPlacementPreferencesInner = TaskSpecPlacementPreferencesInner + { taskSpecPlacementPreferencesInnerSpread :: !(Maybe TaskSpecPlacementPreferencesInnerSpread) -- ^ "Spread" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecPlacementPreferencesInner +instance A.FromJSON TaskSpecPlacementPreferencesInner where + parseJSON = A.withObject "TaskSpecPlacementPreferencesInner" $ \o -> + TaskSpecPlacementPreferencesInner + <$> (o .:? "Spread") + +-- | ToJSON TaskSpecPlacementPreferencesInner +instance A.ToJSON TaskSpecPlacementPreferencesInner where + toJSON TaskSpecPlacementPreferencesInner {..} = + _omitNulls + [ "Spread" .= taskSpecPlacementPreferencesInnerSpread + ] + + +-- | Construct a value of type 'TaskSpecPlacementPreferencesInner' (by applying it's required fields, if any) +mkTaskSpecPlacementPreferencesInner + :: TaskSpecPlacementPreferencesInner +mkTaskSpecPlacementPreferencesInner = + TaskSpecPlacementPreferencesInner + { taskSpecPlacementPreferencesInnerSpread = Nothing + } + +-- ** TaskSpecPlacementPreferencesInnerSpread +-- | TaskSpecPlacementPreferencesInnerSpread +data TaskSpecPlacementPreferencesInnerSpread = TaskSpecPlacementPreferencesInnerSpread + { taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor :: !(Maybe Text) -- ^ "SpreadDescriptor" - label descriptor, such as `engine.labels.az`. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecPlacementPreferencesInnerSpread +instance A.FromJSON TaskSpecPlacementPreferencesInnerSpread where + parseJSON = A.withObject "TaskSpecPlacementPreferencesInnerSpread" $ \o -> + TaskSpecPlacementPreferencesInnerSpread + <$> (o .:? "SpreadDescriptor") + +-- | ToJSON TaskSpecPlacementPreferencesInnerSpread +instance A.ToJSON TaskSpecPlacementPreferencesInnerSpread where + toJSON TaskSpecPlacementPreferencesInnerSpread {..} = + _omitNulls + [ "SpreadDescriptor" .= taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor + ] + + +-- | Construct a value of type 'TaskSpecPlacementPreferencesInnerSpread' (by applying it's required fields, if any) +mkTaskSpecPlacementPreferencesInnerSpread + :: TaskSpecPlacementPreferencesInnerSpread +mkTaskSpecPlacementPreferencesInnerSpread = + TaskSpecPlacementPreferencesInnerSpread + { taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor = Nothing + } + +-- ** TaskSpecPluginSpec +-- | TaskSpecPluginSpec +-- 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`. +data TaskSpecPluginSpec = TaskSpecPluginSpec + { taskSpecPluginSpecName :: !(Maybe Text) -- ^ "Name" - The name or 'alias' to use for the plugin. + , taskSpecPluginSpecRemote :: !(Maybe Text) -- ^ "Remote" - The plugin image reference to use. + , taskSpecPluginSpecDisabled :: !(Maybe Bool) -- ^ "Disabled" - Disable the plugin once scheduled. + , taskSpecPluginSpecPluginPrivilege :: !(Maybe [PluginPrivilege]) -- ^ "PluginPrivilege" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecPluginSpec +instance A.FromJSON TaskSpecPluginSpec where + parseJSON = A.withObject "TaskSpecPluginSpec" $ \o -> + TaskSpecPluginSpec + <$> (o .:? "Name") + <*> (o .:? "Remote") + <*> (o .:? "Disabled") + <*> (o .:? "PluginPrivilege") + +-- | ToJSON TaskSpecPluginSpec +instance A.ToJSON TaskSpecPluginSpec where + toJSON TaskSpecPluginSpec {..} = + _omitNulls + [ "Name" .= taskSpecPluginSpecName + , "Remote" .= taskSpecPluginSpecRemote + , "Disabled" .= taskSpecPluginSpecDisabled + , "PluginPrivilege" .= taskSpecPluginSpecPluginPrivilege + ] + + +-- | Construct a value of type 'TaskSpecPluginSpec' (by applying it's required fields, if any) +mkTaskSpecPluginSpec + :: TaskSpecPluginSpec +mkTaskSpecPluginSpec = + TaskSpecPluginSpec + { taskSpecPluginSpecName = Nothing + , taskSpecPluginSpecRemote = Nothing + , taskSpecPluginSpecDisabled = Nothing + , taskSpecPluginSpecPluginPrivilege = Nothing + } + +-- ** TaskSpecResources +-- | TaskSpecResources +-- Resource requirements which apply to each individual container created as part of the service. +data TaskSpecResources = TaskSpecResources + { taskSpecResourcesLimits :: !(Maybe Limit) -- ^ "Limits" + , taskSpecResourcesReservations :: !(Maybe ResourceObject) -- ^ "Reservations" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecResources +instance A.FromJSON TaskSpecResources where + parseJSON = A.withObject "TaskSpecResources" $ \o -> + TaskSpecResources + <$> (o .:? "Limits") + <*> (o .:? "Reservations") + +-- | ToJSON TaskSpecResources +instance A.ToJSON TaskSpecResources where + toJSON TaskSpecResources {..} = + _omitNulls + [ "Limits" .= taskSpecResourcesLimits + , "Reservations" .= taskSpecResourcesReservations + ] + + +-- | Construct a value of type 'TaskSpecResources' (by applying it's required fields, if any) +mkTaskSpecResources + :: TaskSpecResources +mkTaskSpecResources = + TaskSpecResources + { taskSpecResourcesLimits = Nothing + , taskSpecResourcesReservations = Nothing + } + +-- ** TaskSpecRestartPolicy +-- | TaskSpecRestartPolicy +-- Specification for the restart policy which applies to containers created as part of this service. +data TaskSpecRestartPolicy = TaskSpecRestartPolicy + { taskSpecRestartPolicyCondition :: !(Maybe E'Condition) -- ^ "Condition" - Condition for restart. + , taskSpecRestartPolicyDelay :: !(Maybe Integer) -- ^ "Delay" - Delay between restart attempts. + , taskSpecRestartPolicyMaxAttempts :: !(Maybe Integer) -- ^ "MaxAttempts" - Maximum attempts to restart a given container before giving up (default value is 0, which is ignored). + , taskSpecRestartPolicyWindow :: !(Maybe Integer) -- ^ "Window" - Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded). + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskSpecRestartPolicy +instance A.FromJSON TaskSpecRestartPolicy where + parseJSON = A.withObject "TaskSpecRestartPolicy" $ \o -> + TaskSpecRestartPolicy + <$> (o .:? "Condition") + <*> (o .:? "Delay") + <*> (o .:? "MaxAttempts") + <*> (o .:? "Window") + +-- | ToJSON TaskSpecRestartPolicy +instance A.ToJSON TaskSpecRestartPolicy where + toJSON TaskSpecRestartPolicy {..} = + _omitNulls + [ "Condition" .= taskSpecRestartPolicyCondition + , "Delay" .= taskSpecRestartPolicyDelay + , "MaxAttempts" .= taskSpecRestartPolicyMaxAttempts + , "Window" .= taskSpecRestartPolicyWindow + ] + + +-- | Construct a value of type 'TaskSpecRestartPolicy' (by applying it's required fields, if any) +mkTaskSpecRestartPolicy + :: TaskSpecRestartPolicy +mkTaskSpecRestartPolicy = + TaskSpecRestartPolicy + { taskSpecRestartPolicyCondition = Nothing + , taskSpecRestartPolicyDelay = Nothing + , taskSpecRestartPolicyMaxAttempts = Nothing + , taskSpecRestartPolicyWindow = Nothing + } + +-- ** TaskStatus +-- | TaskStatus +-- represents the status of a task. +data TaskStatus = TaskStatus + { taskStatusTimestamp :: !(Maybe Text) -- ^ "Timestamp" + , taskStatusState :: !(Maybe TaskState) -- ^ "State" + , taskStatusMessage :: !(Maybe Text) -- ^ "Message" + , taskStatusErr :: !(Maybe Text) -- ^ "Err" + , taskStatusContainerStatus :: !(Maybe ContainerStatus) -- ^ "ContainerStatus" + , taskStatusPortStatus :: !(Maybe PortStatus) -- ^ "PortStatus" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON TaskStatus +instance A.FromJSON TaskStatus where + parseJSON = A.withObject "TaskStatus" $ \o -> + TaskStatus + <$> (o .:? "Timestamp") + <*> (o .:? "State") + <*> (o .:? "Message") + <*> (o .:? "Err") + <*> (o .:? "ContainerStatus") + <*> (o .:? "PortStatus") + +-- | ToJSON TaskStatus +instance A.ToJSON TaskStatus where + toJSON TaskStatus {..} = + _omitNulls + [ "Timestamp" .= taskStatusTimestamp + , "State" .= taskStatusState + , "Message" .= taskStatusMessage + , "Err" .= taskStatusErr + , "ContainerStatus" .= taskStatusContainerStatus + , "PortStatus" .= taskStatusPortStatus + ] + + +-- | Construct a value of type 'TaskStatus' (by applying it's required fields, if any) +mkTaskStatus + :: TaskStatus +mkTaskStatus = + TaskStatus + { taskStatusTimestamp = Nothing + , taskStatusState = Nothing + , taskStatusMessage = Nothing + , taskStatusErr = Nothing + , taskStatusContainerStatus = Nothing + , taskStatusPortStatus = Nothing + } + +-- ** ThrottleDevice +-- | ThrottleDevice +data ThrottleDevice = ThrottleDevice + { throttleDevicePath :: !(Maybe Text) -- ^ "Path" - Device path + , throttleDeviceRate :: !(Maybe Integer) -- ^ "Rate" - Rate + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON ThrottleDevice +instance A.FromJSON ThrottleDevice where + parseJSON = A.withObject "ThrottleDevice" $ \o -> + ThrottleDevice + <$> (o .:? "Path") + <*> (o .:? "Rate") + +-- | ToJSON ThrottleDevice +instance A.ToJSON ThrottleDevice where + toJSON ThrottleDevice {..} = + _omitNulls + [ "Path" .= throttleDevicePath + , "Rate" .= throttleDeviceRate + ] + + +-- | Construct a value of type 'ThrottleDevice' (by applying it's required fields, if any) +mkThrottleDevice + :: ThrottleDevice +mkThrottleDevice = + ThrottleDevice + { throttleDevicePath = Nothing + , throttleDeviceRate = Nothing + } + +-- ** UnlockKeyResponse +-- | UnlockKeyResponse +-- UnlockKeyResponse +-- +data UnlockKeyResponse = UnlockKeyResponse + { unlockKeyResponseUnlockKey :: !(Maybe Text) -- ^ "UnlockKey" - The swarm's unlock key. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON UnlockKeyResponse +instance A.FromJSON UnlockKeyResponse where + parseJSON = A.withObject "UnlockKeyResponse" $ \o -> + UnlockKeyResponse + <$> (o .:? "UnlockKey") + +-- | ToJSON UnlockKeyResponse +instance A.ToJSON UnlockKeyResponse where + toJSON UnlockKeyResponse {..} = + _omitNulls + [ "UnlockKey" .= unlockKeyResponseUnlockKey + ] + + +-- | Construct a value of type 'UnlockKeyResponse' (by applying it's required fields, if any) +mkUnlockKeyResponse + :: UnlockKeyResponse +mkUnlockKeyResponse = + UnlockKeyResponse + { unlockKeyResponseUnlockKey = Nothing + } + +-- ** Volume +-- | Volume +data Volume = Volume + { volumeName :: !(Text) -- ^ /Required/ "Name" - Name of the volume. + , volumeDriver :: !(Text) -- ^ /Required/ "Driver" - Name of the volume driver used by the volume. + , volumeMountpoint :: !(Text) -- ^ /Required/ "Mountpoint" - Mount path of the volume on the host. + , volumeCreatedAt :: !(Maybe Text) -- ^ "CreatedAt" - Date/Time the volume was created. + , volumeStatus :: !(Maybe (Map.Map String A.Value)) -- ^ "Status" - Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. + , volumeLabels :: !((Map.Map String Text)) -- ^ /Required/ "Labels" - User-defined key/value metadata. + , volumeScope :: !(E'Scope) -- ^ /Required/ "Scope" - The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. + , volumeClusterVolume :: !(Maybe ClusterVolume) -- ^ "ClusterVolume" + , volumeOptions :: !((Map.Map String Text)) -- ^ /Required/ "Options" - The driver specific options used when creating the volume. + , volumeUsageData :: !(Maybe VolumeUsageData) -- ^ "UsageData" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON Volume +instance A.FromJSON Volume where + parseJSON = A.withObject "Volume" $ \o -> + Volume + <$> (o .: "Name") + <*> (o .: "Driver") + <*> (o .: "Mountpoint") + <*> (o .:? "CreatedAt") + <*> (o .:? "Status") + <*> (o .: "Labels") + <*> (o .: "Scope") + <*> (o .:? "ClusterVolume") + <*> (o .: "Options") + <*> (o .:? "UsageData") + +-- | ToJSON Volume +instance A.ToJSON Volume where + toJSON Volume {..} = + _omitNulls + [ "Name" .= volumeName + , "Driver" .= volumeDriver + , "Mountpoint" .= volumeMountpoint + , "CreatedAt" .= volumeCreatedAt + , "Status" .= volumeStatus + , "Labels" .= volumeLabels + , "Scope" .= volumeScope + , "ClusterVolume" .= volumeClusterVolume + , "Options" .= volumeOptions + , "UsageData" .= volumeUsageData + ] + + +-- | Construct a value of type 'Volume' (by applying it's required fields, if any) +mkVolume + :: Text -- ^ 'volumeName': Name of the volume. + -> Text -- ^ 'volumeDriver': Name of the volume driver used by the volume. + -> Text -- ^ 'volumeMountpoint': Mount path of the volume on the host. + -> (Map.Map String Text) -- ^ 'volumeLabels': User-defined key/value metadata. + -> E'Scope -- ^ 'volumeScope': The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. + -> (Map.Map String Text) -- ^ 'volumeOptions': The driver specific options used when creating the volume. + -> Volume +mkVolume volumeName volumeDriver volumeMountpoint volumeLabels volumeScope volumeOptions = + Volume + { volumeName + , volumeDriver + , volumeMountpoint + , volumeCreatedAt = Nothing + , volumeStatus = Nothing + , volumeLabels + , volumeScope + , volumeClusterVolume = Nothing + , volumeOptions + , volumeUsageData = Nothing + } + +-- ** VolumeCreateOptions +-- | VolumeCreateOptions +-- VolumeConfig +-- +-- Volume configuration +data VolumeCreateOptions = VolumeCreateOptions + { volumeCreateOptionsName :: !(Maybe Text) -- ^ "Name" - The new volume's name. If not specified, Docker generates a name. + , volumeCreateOptionsDriver :: !(Maybe Text) -- ^ "Driver" - Name of the volume driver to use. + , volumeCreateOptionsDriverOpts :: !(Maybe (Map.Map String Text)) -- ^ "DriverOpts" - A mapping of driver options and values. These options are passed directly to the driver and are driver specific. + , volumeCreateOptionsLabels :: !(Maybe (Map.Map String Text)) -- ^ "Labels" - User-defined key/value metadata. + , volumeCreateOptionsClusterVolumeSpec :: !(Maybe ClusterVolumeSpec) -- ^ "ClusterVolumeSpec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON VolumeCreateOptions +instance A.FromJSON VolumeCreateOptions where + parseJSON = A.withObject "VolumeCreateOptions" $ \o -> + VolumeCreateOptions + <$> (o .:? "Name") + <*> (o .:? "Driver") + <*> (o .:? "DriverOpts") + <*> (o .:? "Labels") + <*> (o .:? "ClusterVolumeSpec") + +-- | ToJSON VolumeCreateOptions +instance A.ToJSON VolumeCreateOptions where + toJSON VolumeCreateOptions {..} = + _omitNulls + [ "Name" .= volumeCreateOptionsName + , "Driver" .= volumeCreateOptionsDriver + , "DriverOpts" .= volumeCreateOptionsDriverOpts + , "Labels" .= volumeCreateOptionsLabels + , "ClusterVolumeSpec" .= volumeCreateOptionsClusterVolumeSpec + ] + + +-- | Construct a value of type 'VolumeCreateOptions' (by applying it's required fields, if any) +mkVolumeCreateOptions + :: VolumeCreateOptions +mkVolumeCreateOptions = + VolumeCreateOptions + { volumeCreateOptionsName = Nothing + , volumeCreateOptionsDriver = Nothing + , volumeCreateOptionsDriverOpts = Nothing + , volumeCreateOptionsLabels = Nothing + , volumeCreateOptionsClusterVolumeSpec = Nothing + } + +-- ** VolumeListResponse +-- | VolumeListResponse +-- VolumeListResponse +-- +-- Volume list response +data VolumeListResponse = VolumeListResponse + { volumeListResponseVolumes :: !(Maybe [Volume]) -- ^ "Volumes" - List of volumes + , volumeListResponseWarnings :: !(Maybe [Text]) -- ^ "Warnings" - Warnings that occurred when fetching the list of volumes. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON VolumeListResponse +instance A.FromJSON VolumeListResponse where + parseJSON = A.withObject "VolumeListResponse" $ \o -> + VolumeListResponse + <$> (o .:? "Volumes") + <*> (o .:? "Warnings") + +-- | ToJSON VolumeListResponse +instance A.ToJSON VolumeListResponse where + toJSON VolumeListResponse {..} = + _omitNulls + [ "Volumes" .= volumeListResponseVolumes + , "Warnings" .= volumeListResponseWarnings + ] + + +-- | Construct a value of type 'VolumeListResponse' (by applying it's required fields, if any) +mkVolumeListResponse + :: VolumeListResponse +mkVolumeListResponse = + VolumeListResponse + { volumeListResponseVolumes = Nothing + , volumeListResponseWarnings = Nothing + } + +-- ** VolumePruneResponse +-- | VolumePruneResponse +-- VolumePruneResponse +-- +data VolumePruneResponse = VolumePruneResponse + { volumePruneResponseVolumesDeleted :: !(Maybe [Text]) -- ^ "VolumesDeleted" - Volumes that were deleted + , volumePruneResponseSpaceReclaimed :: !(Maybe Integer) -- ^ "SpaceReclaimed" - Disk space reclaimed in bytes + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON VolumePruneResponse +instance A.FromJSON VolumePruneResponse where + parseJSON = A.withObject "VolumePruneResponse" $ \o -> + VolumePruneResponse + <$> (o .:? "VolumesDeleted") + <*> (o .:? "SpaceReclaimed") + +-- | ToJSON VolumePruneResponse +instance A.ToJSON VolumePruneResponse where + toJSON VolumePruneResponse {..} = + _omitNulls + [ "VolumesDeleted" .= volumePruneResponseVolumesDeleted + , "SpaceReclaimed" .= volumePruneResponseSpaceReclaimed + ] + + +-- | Construct a value of type 'VolumePruneResponse' (by applying it's required fields, if any) +mkVolumePruneResponse + :: VolumePruneResponse +mkVolumePruneResponse = + VolumePruneResponse + { volumePruneResponseVolumesDeleted = Nothing + , volumePruneResponseSpaceReclaimed = Nothing + } + +-- ** VolumeUpdateRequest +-- | VolumeUpdateRequest +-- Volume configuration +data VolumeUpdateRequest = VolumeUpdateRequest + { volumeUpdateRequestSpec :: !(Maybe ClusterVolumeSpec) -- ^ "Spec" + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON VolumeUpdateRequest +instance A.FromJSON VolumeUpdateRequest where + parseJSON = A.withObject "VolumeUpdateRequest" $ \o -> + VolumeUpdateRequest + <$> (o .:? "Spec") + +-- | ToJSON VolumeUpdateRequest +instance A.ToJSON VolumeUpdateRequest where + toJSON VolumeUpdateRequest {..} = + _omitNulls + [ "Spec" .= volumeUpdateRequestSpec + ] + + +-- | Construct a value of type 'VolumeUpdateRequest' (by applying it's required fields, if any) +mkVolumeUpdateRequest + :: VolumeUpdateRequest +mkVolumeUpdateRequest = + VolumeUpdateRequest + { volumeUpdateRequestSpec = Nothing + } + +-- ** VolumeUsageData +-- | VolumeUsageData +-- Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. +data VolumeUsageData = VolumeUsageData + { volumeUsageDataSize :: !(Integer) -- ^ /Required/ "Size" - Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") + , volumeUsageDataRefCount :: !(Integer) -- ^ /Required/ "RefCount" - The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. + } deriving (P.Show, P.Eq, P.Typeable) + +-- | FromJSON VolumeUsageData +instance A.FromJSON VolumeUsageData where + parseJSON = A.withObject "VolumeUsageData" $ \o -> + VolumeUsageData + <$> (o .: "Size") + <*> (o .: "RefCount") + +-- | ToJSON VolumeUsageData +instance A.ToJSON VolumeUsageData where + toJSON VolumeUsageData {..} = + _omitNulls + [ "Size" .= volumeUsageDataSize + , "RefCount" .= volumeUsageDataRefCount + ] + + +-- | Construct a value of type 'VolumeUsageData' (by applying it's required fields, if any) +mkVolumeUsageData + :: Integer -- ^ 'volumeUsageDataSize': Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") + -> Integer -- ^ 'volumeUsageDataRefCount': The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. + -> VolumeUsageData +mkVolumeUsageData volumeUsageDataSize volumeUsageDataRefCount = + VolumeUsageData + { volumeUsageDataSize + , volumeUsageDataRefCount + } + + +-- * Enums + + +-- ** ChangeType + +-- | Enum of 'Int' . +-- Kind of change Can be one of: - `0`: Modified (\"C\") - `1`: Added (\"A\") - `2`: Deleted (\"D\") +data ChangeType + = ChangeType'Num0 -- ^ @0@ + | ChangeType'Num1 -- ^ @1@ + | ChangeType'Num2 -- ^ @2@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON ChangeType where toJSON = A.toJSON . fromChangeType +instance A.FromJSON ChangeType where parseJSON o = P.either P.fail (pure . P.id) . toChangeType =<< A.parseJSON o +instance WH.ToHttpApiData ChangeType where toQueryParam = WH.toQueryParam . fromChangeType +instance WH.FromHttpApiData ChangeType where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toChangeType +instance MimeRender MimeMultipartFormData ChangeType where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'ChangeType' enum +fromChangeType :: ChangeType -> Int +fromChangeType = \case + ChangeType'Num0 -> 0 + ChangeType'Num1 -> 1 + ChangeType'Num2 -> 2 + +-- | parse 'ChangeType' enum +toChangeType :: Int -> P.Either String ChangeType +toChangeType = \case + 0 -> P.Right ChangeType'Num0 + 1 -> P.Right ChangeType'Num1 + 2 -> P.Right ChangeType'Num2 + s -> P.Left $ "toChangeType: enum parse failure: " P.++ P.show s + + +-- ** E'Availability + +-- | Enum of 'Text' . +-- Availability of the node. +data E'Availability + = E'Availability'Active -- ^ @"active"@ + | E'Availability'Pause -- ^ @"pause"@ + | E'Availability'Drain -- ^ @"drain"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Availability where toJSON = A.toJSON . fromE'Availability +instance A.FromJSON E'Availability where parseJSON o = P.either P.fail (pure . P.id) . toE'Availability =<< A.parseJSON o +instance WH.ToHttpApiData E'Availability where toQueryParam = WH.toQueryParam . fromE'Availability +instance WH.FromHttpApiData E'Availability where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Availability +instance MimeRender MimeMultipartFormData E'Availability where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Availability' enum +fromE'Availability :: E'Availability -> Text +fromE'Availability = \case + E'Availability'Active -> "active" + E'Availability'Pause -> "pause" + E'Availability'Drain -> "drain" + +-- | parse 'E'Availability' enum +toE'Availability :: Text -> P.Either String E'Availability +toE'Availability = \case + "active" -> P.Right E'Availability'Active + "pause" -> P.Right E'Availability'Pause + "drain" -> P.Right E'Availability'Drain + s -> P.Left $ "toE'Availability: enum parse failure: " P.++ P.show s + + +-- ** E'CgroupDriver + +-- | Enum of 'Text' . +-- The driver to use for managing cgroups. +data E'CgroupDriver + = E'CgroupDriver'Cgroupfs -- ^ @"cgroupfs"@ + | E'CgroupDriver'Systemd -- ^ @"systemd"@ + | E'CgroupDriver'None -- ^ @"none"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'CgroupDriver where toJSON = A.toJSON . fromE'CgroupDriver +instance A.FromJSON E'CgroupDriver where parseJSON o = P.either P.fail (pure . P.id) . toE'CgroupDriver =<< A.parseJSON o +instance WH.ToHttpApiData E'CgroupDriver where toQueryParam = WH.toQueryParam . fromE'CgroupDriver +instance WH.FromHttpApiData E'CgroupDriver where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'CgroupDriver +instance MimeRender MimeMultipartFormData E'CgroupDriver where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'CgroupDriver' enum +fromE'CgroupDriver :: E'CgroupDriver -> Text +fromE'CgroupDriver = \case + E'CgroupDriver'Cgroupfs -> "cgroupfs" + E'CgroupDriver'Systemd -> "systemd" + E'CgroupDriver'None -> "none" + +-- | parse 'E'CgroupDriver' enum +toE'CgroupDriver :: Text -> P.Either String E'CgroupDriver +toE'CgroupDriver = \case + "cgroupfs" -> P.Right E'CgroupDriver'Cgroupfs + "systemd" -> P.Right E'CgroupDriver'Systemd + "none" -> P.Right E'CgroupDriver'None + s -> P.Left $ "toE'CgroupDriver: enum parse failure: " P.++ P.show s + + +-- ** E'CgroupVersion + +-- | Enum of 'Text' . +-- The version of the cgroup. +data E'CgroupVersion + = E'CgroupVersion'1 -- ^ @"1"@ + | E'CgroupVersion'2 -- ^ @"2"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'CgroupVersion where toJSON = A.toJSON . fromE'CgroupVersion +instance A.FromJSON E'CgroupVersion where parseJSON o = P.either P.fail (pure . P.id) . toE'CgroupVersion =<< A.parseJSON o +instance WH.ToHttpApiData E'CgroupVersion where toQueryParam = WH.toQueryParam . fromE'CgroupVersion +instance WH.FromHttpApiData E'CgroupVersion where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'CgroupVersion +instance MimeRender MimeMultipartFormData E'CgroupVersion where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'CgroupVersion' enum +fromE'CgroupVersion :: E'CgroupVersion -> Text +fromE'CgroupVersion = \case + E'CgroupVersion'1 -> "1" + E'CgroupVersion'2 -> "2" + +-- | parse 'E'CgroupVersion' enum +toE'CgroupVersion :: Text -> P.Either String E'CgroupVersion +toE'CgroupVersion = \case + "1" -> P.Right E'CgroupVersion'1 + "2" -> P.Right E'CgroupVersion'2 + s -> P.Left $ "toE'CgroupVersion: enum parse failure: " P.++ P.show s + + +-- ** E'CgroupnsMode + +-- | Enum of 'Text' . +-- cgroup namespace mode for the container. Possible values are: - `\"private\"`: the container runs in its own private cgroup namespace - `\"host\"`: use the host system's cgroup namespace If not specified, the daemon default is used, which can either be `\"private\"` or `\"host\"`, depending on daemon version, kernel support and configuration. +data E'CgroupnsMode + = E'CgroupnsMode'Private -- ^ @"private"@ + | E'CgroupnsMode'Host -- ^ @"host"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'CgroupnsMode where toJSON = A.toJSON . fromE'CgroupnsMode +instance A.FromJSON E'CgroupnsMode where parseJSON o = P.either P.fail (pure . P.id) . toE'CgroupnsMode =<< A.parseJSON o +instance WH.ToHttpApiData E'CgroupnsMode where toQueryParam = WH.toQueryParam . fromE'CgroupnsMode +instance WH.FromHttpApiData E'CgroupnsMode where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'CgroupnsMode +instance MimeRender MimeMultipartFormData E'CgroupnsMode where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'CgroupnsMode' enum +fromE'CgroupnsMode :: E'CgroupnsMode -> Text +fromE'CgroupnsMode = \case + E'CgroupnsMode'Private -> "private" + E'CgroupnsMode'Host -> "host" + +-- | parse 'E'CgroupnsMode' enum +toE'CgroupnsMode :: Text -> P.Either String E'CgroupnsMode +toE'CgroupnsMode = \case + "private" -> P.Right E'CgroupnsMode'Private + "host" -> P.Right E'CgroupnsMode'Host + s -> P.Left $ "toE'CgroupnsMode: enum parse failure: " P.++ P.show s + + +-- ** E'Condition + +-- | Enum of 'Text' . +-- Condition for restart. +data E'Condition + = E'Condition'None -- ^ @"none"@ + | E'Condition'On_failure -- ^ @"on-failure"@ + | E'Condition'Any -- ^ @"any"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Condition where toJSON = A.toJSON . fromE'Condition +instance A.FromJSON E'Condition where parseJSON o = P.either P.fail (pure . P.id) . toE'Condition =<< A.parseJSON o +instance WH.ToHttpApiData E'Condition where toQueryParam = WH.toQueryParam . fromE'Condition +instance WH.FromHttpApiData E'Condition where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Condition +instance MimeRender MimeMultipartFormData E'Condition where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Condition' enum +fromE'Condition :: E'Condition -> Text +fromE'Condition = \case + E'Condition'None -> "none" + E'Condition'On_failure -> "on-failure" + E'Condition'Any -> "any" + +-- | parse 'E'Condition' enum +toE'Condition :: Text -> P.Either String E'Condition +toE'Condition = \case + "none" -> P.Right E'Condition'None + "on-failure" -> P.Right E'Condition'On_failure + "any" -> P.Right E'Condition'Any + s -> P.Left $ "toE'Condition: enum parse failure: " P.++ P.show s + + +-- ** E'Condition2 + +-- | Enum of 'Text' +data E'Condition2 + = E'Condition2'Not_running -- ^ @"not-running"@ + | E'Condition2'Next_exit -- ^ @"next-exit"@ + | E'Condition2'Removed -- ^ @"removed"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Condition2 where toJSON = A.toJSON . fromE'Condition2 +instance A.FromJSON E'Condition2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Condition2 =<< A.parseJSON o +instance WH.ToHttpApiData E'Condition2 where toQueryParam = WH.toQueryParam . fromE'Condition2 +instance WH.FromHttpApiData E'Condition2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Condition2 +instance MimeRender MimeMultipartFormData E'Condition2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Condition2' enum +fromE'Condition2 :: E'Condition2 -> Text +fromE'Condition2 = \case + E'Condition2'Not_running -> "not-running" + E'Condition2'Next_exit -> "next-exit" + E'Condition2'Removed -> "removed" + +-- | parse 'E'Condition2' enum +toE'Condition2 :: Text -> P.Either String E'Condition2 +toE'Condition2 = \case + "not-running" -> P.Right E'Condition2'Not_running + "next-exit" -> P.Right E'Condition2'Next_exit + "removed" -> P.Right E'Condition2'Removed + s -> P.Left $ "toE'Condition2: enum parse failure: " P.++ P.show s + + +-- ** E'ContentType + +-- | Enum of 'Text' +data E'ContentType + = E'ContentType'Application_x_tar -- ^ @"application/x-tar"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'ContentType where toJSON = A.toJSON . fromE'ContentType +instance A.FromJSON E'ContentType where parseJSON o = P.either P.fail (pure . P.id) . toE'ContentType =<< A.parseJSON o +instance WH.ToHttpApiData E'ContentType where toQueryParam = WH.toQueryParam . fromE'ContentType +instance WH.FromHttpApiData E'ContentType where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'ContentType +instance MimeRender MimeMultipartFormData E'ContentType where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'ContentType' enum +fromE'ContentType :: E'ContentType -> Text +fromE'ContentType = \case + E'ContentType'Application_x_tar -> "application/x-tar" + +-- | parse 'E'ContentType' enum +toE'ContentType :: Text -> P.Either String E'ContentType +toE'ContentType = \case + "application/x-tar" -> P.Right E'ContentType'Application_x_tar + s -> P.Left $ "toE'ContentType: enum parse failure: " P.++ P.show s + + +-- ** E'FailureAction + +-- | Enum of 'Text' . +-- Action to take if an updated task fails to run, or stops running during the update. +data E'FailureAction + = E'FailureAction'Continue -- ^ @"continue"@ + | E'FailureAction'Pause -- ^ @"pause"@ + | E'FailureAction'Rollback -- ^ @"rollback"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'FailureAction where toJSON = A.toJSON . fromE'FailureAction +instance A.FromJSON E'FailureAction where parseJSON o = P.either P.fail (pure . P.id) . toE'FailureAction =<< A.parseJSON o +instance WH.ToHttpApiData E'FailureAction where toQueryParam = WH.toQueryParam . fromE'FailureAction +instance WH.FromHttpApiData E'FailureAction where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'FailureAction +instance MimeRender MimeMultipartFormData E'FailureAction where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'FailureAction' enum +fromE'FailureAction :: E'FailureAction -> Text +fromE'FailureAction = \case + E'FailureAction'Continue -> "continue" + E'FailureAction'Pause -> "pause" + E'FailureAction'Rollback -> "rollback" + +-- | parse 'E'FailureAction' enum +toE'FailureAction :: Text -> P.Either String E'FailureAction +toE'FailureAction = \case + "continue" -> P.Right E'FailureAction'Continue + "pause" -> P.Right E'FailureAction'Pause + "rollback" -> P.Right E'FailureAction'Rollback + s -> P.Left $ "toE'FailureAction: enum parse failure: " P.++ P.show s + + +-- ** E'FailureAction2 + +-- | Enum of 'Text' . +-- Action to take if an rolled back task fails to run, or stops running during the rollback. +data E'FailureAction2 + = E'FailureAction2'Continue -- ^ @"continue"@ + | E'FailureAction2'Pause -- ^ @"pause"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'FailureAction2 where toJSON = A.toJSON . fromE'FailureAction2 +instance A.FromJSON E'FailureAction2 where parseJSON o = P.either P.fail (pure . P.id) . toE'FailureAction2 =<< A.parseJSON o +instance WH.ToHttpApiData E'FailureAction2 where toQueryParam = WH.toQueryParam . fromE'FailureAction2 +instance WH.FromHttpApiData E'FailureAction2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'FailureAction2 +instance MimeRender MimeMultipartFormData E'FailureAction2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'FailureAction2' enum +fromE'FailureAction2 :: E'FailureAction2 -> Text +fromE'FailureAction2 = \case + E'FailureAction2'Continue -> "continue" + E'FailureAction2'Pause -> "pause" + +-- | parse 'E'FailureAction2' enum +toE'FailureAction2 :: Text -> P.Either String E'FailureAction2 +toE'FailureAction2 = \case + "continue" -> P.Right E'FailureAction2'Continue + "pause" -> P.Right E'FailureAction2'Pause + s -> P.Left $ "toE'FailureAction2: enum parse failure: " P.++ P.show s + + +-- ** E'Isolation + +-- | Enum of 'Text' . +-- Isolation technology of the container. (Windows only) +data E'Isolation + = E'Isolation'Default -- ^ @"default"@ + | E'Isolation'Process -- ^ @"process"@ + | E'Isolation'Hyperv -- ^ @"hyperv"@ + | E'Isolation'Empty -- ^ @""@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Isolation where toJSON = A.toJSON . fromE'Isolation +instance A.FromJSON E'Isolation where parseJSON o = P.either P.fail (pure . P.id) . toE'Isolation =<< A.parseJSON o +instance WH.ToHttpApiData E'Isolation where toQueryParam = WH.toQueryParam . fromE'Isolation +instance WH.FromHttpApiData E'Isolation where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Isolation +instance MimeRender MimeMultipartFormData E'Isolation where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Isolation' enum +fromE'Isolation :: E'Isolation -> Text +fromE'Isolation = \case + E'Isolation'Default -> "default" + E'Isolation'Process -> "process" + E'Isolation'Hyperv -> "hyperv" + E'Isolation'Empty -> "" + +-- | parse 'E'Isolation' enum +toE'Isolation :: Text -> P.Either String E'Isolation +toE'Isolation = \case + "default" -> P.Right E'Isolation'Default + "process" -> P.Right E'Isolation'Process + "hyperv" -> P.Right E'Isolation'Hyperv + "" -> P.Right E'Isolation'Empty + s -> P.Left $ "toE'Isolation: enum parse failure: " P.++ P.show s + + +-- ** E'Isolation2 + +-- | Enum of 'Text' . +-- Represents the isolation technology to use as a default for containers. The supported values are platform-specific. If no isolation value is specified on daemon start, on Windows client, the default is `hyperv`, and on Windows server, the default is `process`. This option is currently not used on other platforms. +data E'Isolation2 + = E'Isolation2'Default -- ^ @"default"@ + | E'Isolation2'Hyperv -- ^ @"hyperv"@ + | E'Isolation2'Process -- ^ @"process"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Isolation2 where toJSON = A.toJSON . fromE'Isolation2 +instance A.FromJSON E'Isolation2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Isolation2 =<< A.parseJSON o +instance WH.ToHttpApiData E'Isolation2 where toQueryParam = WH.toQueryParam . fromE'Isolation2 +instance WH.FromHttpApiData E'Isolation2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Isolation2 +instance MimeRender MimeMultipartFormData E'Isolation2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Isolation2' enum +fromE'Isolation2 :: E'Isolation2 -> Text +fromE'Isolation2 = \case + E'Isolation2'Default -> "default" + E'Isolation2'Hyperv -> "hyperv" + E'Isolation2'Process -> "process" + +-- | parse 'E'Isolation2' enum +toE'Isolation2 :: Text -> P.Either String E'Isolation2 +toE'Isolation2 = \case + "default" -> P.Right E'Isolation2'Default + "hyperv" -> P.Right E'Isolation2'Hyperv + "process" -> P.Right E'Isolation2'Process + s -> P.Left $ "toE'Isolation2: enum parse failure: " P.++ P.show s + + +-- ** E'Isolation3 + +-- | Enum of 'Text' . +-- Isolation technology of the containers running the service. (Windows only) +data E'Isolation3 + = E'Isolation3'Default -- ^ @"default"@ + | E'Isolation3'Process -- ^ @"process"@ + | E'Isolation3'Hyperv -- ^ @"hyperv"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Isolation3 where toJSON = A.toJSON . fromE'Isolation3 +instance A.FromJSON E'Isolation3 where parseJSON o = P.either P.fail (pure . P.id) . toE'Isolation3 =<< A.parseJSON o +instance WH.ToHttpApiData E'Isolation3 where toQueryParam = WH.toQueryParam . fromE'Isolation3 +instance WH.FromHttpApiData E'Isolation3 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Isolation3 +instance MimeRender MimeMultipartFormData E'Isolation3 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Isolation3' enum +fromE'Isolation3 :: E'Isolation3 -> Text +fromE'Isolation3 = \case + E'Isolation3'Default -> "default" + E'Isolation3'Process -> "process" + E'Isolation3'Hyperv -> "hyperv" + +-- | parse 'E'Isolation3' enum +toE'Isolation3 :: Text -> P.Either String E'Isolation3 +toE'Isolation3 = \case + "default" -> P.Right E'Isolation3'Default + "process" -> P.Right E'Isolation3'Process + "hyperv" -> P.Right E'Isolation3'Hyperv + s -> P.Left $ "toE'Isolation3: enum parse failure: " P.++ P.show s + + +-- ** E'Mode + +-- | Enum of 'Text' . +-- The mode of resolution to use for internal load balancing between tasks. +data E'Mode + = E'Mode'Vip -- ^ @"vip"@ + | E'Mode'Dnsrr -- ^ @"dnsrr"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Mode where toJSON = A.toJSON . fromE'Mode +instance A.FromJSON E'Mode where parseJSON o = P.either P.fail (pure . P.id) . toE'Mode =<< A.parseJSON o +instance WH.ToHttpApiData E'Mode where toQueryParam = WH.toQueryParam . fromE'Mode +instance WH.FromHttpApiData E'Mode where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Mode +instance MimeRender MimeMultipartFormData E'Mode where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Mode' enum +fromE'Mode :: E'Mode -> Text +fromE'Mode = \case + E'Mode'Vip -> "vip" + E'Mode'Dnsrr -> "dnsrr" + +-- | parse 'E'Mode' enum +toE'Mode :: Text -> P.Either String E'Mode +toE'Mode = \case + "vip" -> P.Right E'Mode'Vip + "dnsrr" -> P.Right E'Mode'Dnsrr + s -> P.Left $ "toE'Mode: enum parse failure: " P.++ P.show s + + +-- ** E'Mode2 + +-- | Enum of 'Text' +data E'Mode2 + = E'Mode2'Default -- ^ @"default"@ + | E'Mode2'Unconfined -- ^ @"unconfined"@ + | E'Mode2'Custom -- ^ @"custom"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Mode2 where toJSON = A.toJSON . fromE'Mode2 +instance A.FromJSON E'Mode2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Mode2 =<< A.parseJSON o +instance WH.ToHttpApiData E'Mode2 where toQueryParam = WH.toQueryParam . fromE'Mode2 +instance WH.FromHttpApiData E'Mode2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Mode2 +instance MimeRender MimeMultipartFormData E'Mode2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Mode2' enum +fromE'Mode2 :: E'Mode2 -> Text +fromE'Mode2 = \case + E'Mode2'Default -> "default" + E'Mode2'Unconfined -> "unconfined" + E'Mode2'Custom -> "custom" + +-- | parse 'E'Mode2' enum +toE'Mode2 :: Text -> P.Either String E'Mode2 +toE'Mode2 = \case + "default" -> P.Right E'Mode2'Default + "unconfined" -> P.Right E'Mode2'Unconfined + "custom" -> P.Right E'Mode2'Custom + s -> P.Left $ "toE'Mode2: enum parse failure: " P.++ P.show s + + +-- ** E'Mode3 + +-- | Enum of 'Text' +data E'Mode3 + = E'Mode3'Default -- ^ @"default"@ + | E'Mode3'Disabled -- ^ @"disabled"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Mode3 where toJSON = A.toJSON . fromE'Mode3 +instance A.FromJSON E'Mode3 where parseJSON o = P.either P.fail (pure . P.id) . toE'Mode3 =<< A.parseJSON o +instance WH.ToHttpApiData E'Mode3 where toQueryParam = WH.toQueryParam . fromE'Mode3 +instance WH.FromHttpApiData E'Mode3 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Mode3 +instance MimeRender MimeMultipartFormData E'Mode3 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Mode3' enum +fromE'Mode3 :: E'Mode3 -> Text +fromE'Mode3 = \case + E'Mode3'Default -> "default" + E'Mode3'Disabled -> "disabled" + +-- | parse 'E'Mode3' enum +toE'Mode3 :: Text -> P.Either String E'Mode3 +toE'Mode3 = \case + "default" -> P.Right E'Mode3'Default + "disabled" -> P.Right E'Mode3'Disabled + s -> P.Left $ "toE'Mode3: enum parse failure: " P.++ P.show s + + +-- ** E'Name + +-- | Enum of 'Text' . +-- - Empty string means not to restart - `no` Do not automatically restart - `always` Always restart - `unless-stopped` Restart always except when the user has manually stopped the container - `on-failure` Restart only when the container exit code is non-zero +data E'Name + = E'Name'Empty -- ^ @""@ + | E'Name'No -- ^ @"no"@ + | E'Name'Always -- ^ @"always"@ + | E'Name'Unless_stopped -- ^ @"unless-stopped"@ + | E'Name'On_failure -- ^ @"on-failure"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Name where toJSON = A.toJSON . fromE'Name +instance A.FromJSON E'Name where parseJSON o = P.either P.fail (pure . P.id) . toE'Name =<< A.parseJSON o +instance WH.ToHttpApiData E'Name where toQueryParam = WH.toQueryParam . fromE'Name +instance WH.FromHttpApiData E'Name where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Name +instance MimeRender MimeMultipartFormData E'Name where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Name' enum +fromE'Name :: E'Name -> Text +fromE'Name = \case + E'Name'Empty -> "" + E'Name'No -> "no" + E'Name'Always -> "always" + E'Name'Unless_stopped -> "unless-stopped" + E'Name'On_failure -> "on-failure" + +-- | parse 'E'Name' enum +toE'Name :: Text -> P.Either String E'Name +toE'Name = \case + "" -> P.Right E'Name'Empty + "no" -> P.Right E'Name'No + "always" -> P.Right E'Name'Always + "unless-stopped" -> P.Right E'Name'Unless_stopped + "on-failure" -> P.Right E'Name'On_failure + s -> P.Left $ "toE'Name: enum parse failure: " P.++ P.show s + + +-- ** E'Order + +-- | Enum of 'Text' . +-- The order of operations when rolling out an updated task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down. +data E'Order + = E'Order'Stop_first -- ^ @"stop-first"@ + | E'Order'Start_first -- ^ @"start-first"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Order where toJSON = A.toJSON . fromE'Order +instance A.FromJSON E'Order where parseJSON o = P.either P.fail (pure . P.id) . toE'Order =<< A.parseJSON o +instance WH.ToHttpApiData E'Order where toQueryParam = WH.toQueryParam . fromE'Order +instance WH.FromHttpApiData E'Order where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Order +instance MimeRender MimeMultipartFormData E'Order where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Order' enum +fromE'Order :: E'Order -> Text +fromE'Order = \case + E'Order'Stop_first -> "stop-first" + E'Order'Start_first -> "start-first" + +-- | parse 'E'Order' enum +toE'Order :: Text -> P.Either String E'Order +toE'Order = \case + "stop-first" -> P.Right E'Order'Stop_first + "start-first" -> P.Right E'Order'Start_first + s -> P.Left $ "toE'Order: enum parse failure: " P.++ P.show s + + +-- ** E'Propagation + +-- | Enum of 'Text' . +-- A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`. +data E'Propagation + = E'Propagation'Private -- ^ @"private"@ + | E'Propagation'Rprivate -- ^ @"rprivate"@ + | E'Propagation'Shared -- ^ @"shared"@ + | E'Propagation'Rshared -- ^ @"rshared"@ + | E'Propagation'Slave -- ^ @"slave"@ + | E'Propagation'Rslave -- ^ @"rslave"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Propagation where toJSON = A.toJSON . fromE'Propagation +instance A.FromJSON E'Propagation where parseJSON o = P.either P.fail (pure . P.id) . toE'Propagation =<< A.parseJSON o +instance WH.ToHttpApiData E'Propagation where toQueryParam = WH.toQueryParam . fromE'Propagation +instance WH.FromHttpApiData E'Propagation where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Propagation +instance MimeRender MimeMultipartFormData E'Propagation where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Propagation' enum +fromE'Propagation :: E'Propagation -> Text +fromE'Propagation = \case + E'Propagation'Private -> "private" + E'Propagation'Rprivate -> "rprivate" + E'Propagation'Shared -> "shared" + E'Propagation'Rshared -> "rshared" + E'Propagation'Slave -> "slave" + E'Propagation'Rslave -> "rslave" + +-- | parse 'E'Propagation' enum +toE'Propagation :: Text -> P.Either String E'Propagation +toE'Propagation = \case + "private" -> P.Right E'Propagation'Private + "rprivate" -> P.Right E'Propagation'Rprivate + "shared" -> P.Right E'Propagation'Shared + "rshared" -> P.Right E'Propagation'Rshared + "slave" -> P.Right E'Propagation'Slave + "rslave" -> P.Right E'Propagation'Rslave + s -> P.Left $ "toE'Propagation: enum parse failure: " P.++ P.show s + + +-- ** E'Protocol + +-- | Enum of 'Text' . +-- Protocol for communication with the external CA (currently only `cfssl` is supported). +data E'Protocol + = E'Protocol'Cfssl -- ^ @"cfssl"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Protocol where toJSON = A.toJSON . fromE'Protocol +instance A.FromJSON E'Protocol where parseJSON o = P.either P.fail (pure . P.id) . toE'Protocol =<< A.parseJSON o +instance WH.ToHttpApiData E'Protocol where toQueryParam = WH.toQueryParam . fromE'Protocol +instance WH.FromHttpApiData E'Protocol where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Protocol +instance MimeRender MimeMultipartFormData E'Protocol where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Protocol' enum +fromE'Protocol :: E'Protocol -> Text +fromE'Protocol = \case + E'Protocol'Cfssl -> "cfssl" + +-- | parse 'E'Protocol' enum +toE'Protocol :: Text -> P.Either String E'Protocol +toE'Protocol = \case + "cfssl" -> P.Right E'Protocol'Cfssl + s -> P.Left $ "toE'Protocol: enum parse failure: " P.++ P.show s + + +-- ** E'ProtocolScheme + +-- | Enum of 'Text' . +-- Protocol to use for clients connecting to the plugin. +data E'ProtocolScheme + = E'ProtocolScheme'Empty -- ^ @""@ + | E'ProtocolScheme'Moby_plugins_http_v1 -- ^ @"moby.plugins.http/v1"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'ProtocolScheme where toJSON = A.toJSON . fromE'ProtocolScheme +instance A.FromJSON E'ProtocolScheme where parseJSON o = P.either P.fail (pure . P.id) . toE'ProtocolScheme =<< A.parseJSON o +instance WH.ToHttpApiData E'ProtocolScheme where toQueryParam = WH.toQueryParam . fromE'ProtocolScheme +instance WH.FromHttpApiData E'ProtocolScheme where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'ProtocolScheme +instance MimeRender MimeMultipartFormData E'ProtocolScheme where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'ProtocolScheme' enum +fromE'ProtocolScheme :: E'ProtocolScheme -> Text +fromE'ProtocolScheme = \case + E'ProtocolScheme'Empty -> "" + E'ProtocolScheme'Moby_plugins_http_v1 -> "moby.plugins.http/v1" + +-- | parse 'E'ProtocolScheme' enum +toE'ProtocolScheme :: Text -> P.Either String E'ProtocolScheme +toE'ProtocolScheme = \case + "" -> P.Right E'ProtocolScheme'Empty + "moby.plugins.http/v1" -> P.Right E'ProtocolScheme'Moby_plugins_http_v1 + s -> P.Left $ "toE'ProtocolScheme: enum parse failure: " P.++ P.show s + + +-- ** E'PublishMode + +-- | Enum of 'Text' . +-- The mode in which port is published.


- \"ingress\" makes the target port accessible on every node, regardless of whether there is a task for the service running on that node or not. - \"host\" bypasses the routing mesh and publish the port directly on the swarm node where that service is running. +data E'PublishMode + = E'PublishMode'Ingress -- ^ @"ingress"@ + | E'PublishMode'Host -- ^ @"host"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'PublishMode where toJSON = A.toJSON . fromE'PublishMode +instance A.FromJSON E'PublishMode where parseJSON o = P.either P.fail (pure . P.id) . toE'PublishMode =<< A.parseJSON o +instance WH.ToHttpApiData E'PublishMode where toQueryParam = WH.toQueryParam . fromE'PublishMode +instance WH.FromHttpApiData E'PublishMode where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'PublishMode +instance MimeRender MimeMultipartFormData E'PublishMode where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'PublishMode' enum +fromE'PublishMode :: E'PublishMode -> Text +fromE'PublishMode = \case + E'PublishMode'Ingress -> "ingress" + E'PublishMode'Host -> "host" + +-- | parse 'E'PublishMode' enum +toE'PublishMode :: Text -> P.Either String E'PublishMode +toE'PublishMode = \case + "ingress" -> P.Right E'PublishMode'Ingress + "host" -> P.Right E'PublishMode'Host + s -> P.Left $ "toE'PublishMode: enum parse failure: " P.++ P.show s + + +-- ** E'RegistryAuthFrom + +-- | Enum of 'Text' +data E'RegistryAuthFrom + = E'RegistryAuthFrom'Spec -- ^ @"spec"@ + | E'RegistryAuthFrom'Previous_spec -- ^ @"previous-spec"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'RegistryAuthFrom where toJSON = A.toJSON . fromE'RegistryAuthFrom +instance A.FromJSON E'RegistryAuthFrom where parseJSON o = P.either P.fail (pure . P.id) . toE'RegistryAuthFrom =<< A.parseJSON o +instance WH.ToHttpApiData E'RegistryAuthFrom where toQueryParam = WH.toQueryParam . fromE'RegistryAuthFrom +instance WH.FromHttpApiData E'RegistryAuthFrom where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'RegistryAuthFrom +instance MimeRender MimeMultipartFormData E'RegistryAuthFrom where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'RegistryAuthFrom' enum +fromE'RegistryAuthFrom :: E'RegistryAuthFrom -> Text +fromE'RegistryAuthFrom = \case + E'RegistryAuthFrom'Spec -> "spec" + E'RegistryAuthFrom'Previous_spec -> "previous-spec" + +-- | parse 'E'RegistryAuthFrom' enum +toE'RegistryAuthFrom :: Text -> P.Either String E'RegistryAuthFrom +toE'RegistryAuthFrom = \case + "spec" -> P.Right E'RegistryAuthFrom'Spec + "previous-spec" -> P.Right E'RegistryAuthFrom'Previous_spec + s -> P.Left $ "toE'RegistryAuthFrom: enum parse failure: " P.++ P.show s + + +-- ** E'Role + +-- | Enum of 'Text' . +-- Role of the node. +data E'Role + = E'Role'Worker -- ^ @"worker"@ + | E'Role'Manager -- ^ @"manager"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Role where toJSON = A.toJSON . fromE'Role +instance A.FromJSON E'Role where parseJSON o = P.either P.fail (pure . P.id) . toE'Role =<< A.parseJSON o +instance WH.ToHttpApiData E'Role where toQueryParam = WH.toQueryParam . fromE'Role +instance WH.FromHttpApiData E'Role where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Role +instance MimeRender MimeMultipartFormData E'Role where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Role' enum +fromE'Role :: E'Role -> Text +fromE'Role = \case + E'Role'Worker -> "worker" + E'Role'Manager -> "manager" + +-- | parse 'E'Role' enum +toE'Role :: Text -> P.Either String E'Role +toE'Role = \case + "worker" -> P.Right E'Role'Worker + "manager" -> P.Right E'Role'Manager + s -> P.Left $ "toE'Role: enum parse failure: " P.++ P.show s + + +-- ** E'Scope + +-- | Enum of 'Text' . +-- The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. +data E'Scope + = E'Scope'Local -- ^ @"local"@ + | E'Scope'Global -- ^ @"global"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Scope where toJSON = A.toJSON . fromE'Scope +instance A.FromJSON E'Scope where parseJSON o = P.either P.fail (pure . P.id) . toE'Scope =<< A.parseJSON o +instance WH.ToHttpApiData E'Scope where toQueryParam = WH.toQueryParam . fromE'Scope +instance WH.FromHttpApiData E'Scope where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Scope +instance MimeRender MimeMultipartFormData E'Scope where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Scope' enum +fromE'Scope :: E'Scope -> Text +fromE'Scope = \case + E'Scope'Local -> "local" + E'Scope'Global -> "global" + +-- | parse 'E'Scope' enum +toE'Scope :: Text -> P.Either String E'Scope +toE'Scope = \case + "local" -> P.Right E'Scope'Local + "global" -> P.Right E'Scope'Global + s -> P.Left $ "toE'Scope: enum parse failure: " P.++ P.show s + + +-- ** E'Scope2 + +-- | Enum of 'Text' . +-- Scope of the event. Engine events are `local` scope. Cluster (Swarm) events are `swarm` scope. +data E'Scope2 + = E'Scope2'Local -- ^ @"local"@ + | E'Scope2'Swarm -- ^ @"swarm"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Scope2 where toJSON = A.toJSON . fromE'Scope2 +instance A.FromJSON E'Scope2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Scope2 =<< A.parseJSON o +instance WH.ToHttpApiData E'Scope2 where toQueryParam = WH.toQueryParam . fromE'Scope2 +instance WH.FromHttpApiData E'Scope2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Scope2 +instance MimeRender MimeMultipartFormData E'Scope2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Scope2' enum +fromE'Scope2 :: E'Scope2 -> Text +fromE'Scope2 = \case + E'Scope2'Local -> "local" + E'Scope2'Swarm -> "swarm" + +-- | parse 'E'Scope2' enum +toE'Scope2 :: Text -> P.Either String E'Scope2 +toE'Scope2 = \case + "local" -> P.Right E'Scope2'Local + "swarm" -> P.Right E'Scope2'Swarm + s -> P.Left $ "toE'Scope2: enum parse failure: " P.++ P.show s + + +-- ** E'Scope3 + +-- | Enum of 'Text' . +-- The set of nodes this volume can be used on at one time. - `single` The volume may only be scheduled to one node at a time. - `multi` the volume may be scheduled to any supported number of nodes at a time. +data E'Scope3 + = E'Scope3'Single -- ^ @"single"@ + | E'Scope3'Multi -- ^ @"multi"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Scope3 where toJSON = A.toJSON . fromE'Scope3 +instance A.FromJSON E'Scope3 where parseJSON o = P.either P.fail (pure . P.id) . toE'Scope3 =<< A.parseJSON o +instance WH.ToHttpApiData E'Scope3 where toQueryParam = WH.toQueryParam . fromE'Scope3 +instance WH.FromHttpApiData E'Scope3 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Scope3 +instance MimeRender MimeMultipartFormData E'Scope3 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Scope3' enum +fromE'Scope3 :: E'Scope3 -> Text +fromE'Scope3 = \case + E'Scope3'Single -> "single" + E'Scope3'Multi -> "multi" + +-- | parse 'E'Scope3' enum +toE'Scope3 :: Text -> P.Either String E'Scope3 +toE'Scope3 = \case + "single" -> P.Right E'Scope3'Single + "multi" -> P.Right E'Scope3'Multi + s -> P.Left $ "toE'Scope3: enum parse failure: " P.++ P.show s + + +-- ** E'Sharing + +-- | Enum of 'Text' . +-- The number and way that different tasks can use this volume at one time. - `none` The volume may only be used by one task at a time. - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. - `all` The volume may have any number of readers and writers. +data E'Sharing + = E'Sharing'None -- ^ @"none"@ + | E'Sharing'Readonly -- ^ @"readonly"@ + | E'Sharing'Onewriter -- ^ @"onewriter"@ + | E'Sharing'All -- ^ @"all"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Sharing where toJSON = A.toJSON . fromE'Sharing +instance A.FromJSON E'Sharing where parseJSON o = P.either P.fail (pure . P.id) . toE'Sharing =<< A.parseJSON o +instance WH.ToHttpApiData E'Sharing where toQueryParam = WH.toQueryParam . fromE'Sharing +instance WH.FromHttpApiData E'Sharing where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Sharing +instance MimeRender MimeMultipartFormData E'Sharing where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Sharing' enum +fromE'Sharing :: E'Sharing -> Text +fromE'Sharing = \case + E'Sharing'None -> "none" + E'Sharing'Readonly -> "readonly" + E'Sharing'Onewriter -> "onewriter" + E'Sharing'All -> "all" + +-- | parse 'E'Sharing' enum +toE'Sharing :: Text -> P.Either String E'Sharing +toE'Sharing = \case + "none" -> P.Right E'Sharing'None + "readonly" -> P.Right E'Sharing'Readonly + "onewriter" -> P.Right E'Sharing'Onewriter + "all" -> P.Right E'Sharing'All + s -> P.Left $ "toE'Sharing: enum parse failure: " P.++ P.show s + + +-- ** E'State + +-- | Enum of 'Text' +data E'State + = E'State'Updating -- ^ @"updating"@ + | E'State'Paused -- ^ @"paused"@ + | E'State'Completed -- ^ @"completed"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'State where toJSON = A.toJSON . fromE'State +instance A.FromJSON E'State where parseJSON o = P.either P.fail (pure . P.id) . toE'State =<< A.parseJSON o +instance WH.ToHttpApiData E'State where toQueryParam = WH.toQueryParam . fromE'State +instance WH.FromHttpApiData E'State where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'State +instance MimeRender MimeMultipartFormData E'State where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'State' enum +fromE'State :: E'State -> Text +fromE'State = \case + E'State'Updating -> "updating" + E'State'Paused -> "paused" + E'State'Completed -> "completed" + +-- | parse 'E'State' enum +toE'State :: Text -> P.Either String E'State +toE'State = \case + "updating" -> P.Right E'State'Updating + "paused" -> P.Right E'State'Paused + "completed" -> P.Right E'State'Completed + s -> P.Left $ "toE'State: enum parse failure: " P.++ P.show s + + +-- ** E'State2 + +-- | Enum of 'Text' . +-- The published state of the volume. * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. * `published` The volume is published successfully to the node. * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. +data E'State2 + = E'State2'Pending_publish -- ^ @"pending-publish"@ + | E'State2'Published -- ^ @"published"@ + | E'State2'Pending_node_unpublish -- ^ @"pending-node-unpublish"@ + | E'State2'Pending_controller_unpublish -- ^ @"pending-controller-unpublish"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'State2 where toJSON = A.toJSON . fromE'State2 +instance A.FromJSON E'State2 where parseJSON o = P.either P.fail (pure . P.id) . toE'State2 =<< A.parseJSON o +instance WH.ToHttpApiData E'State2 where toQueryParam = WH.toQueryParam . fromE'State2 +instance WH.FromHttpApiData E'State2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'State2 +instance MimeRender MimeMultipartFormData E'State2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'State2' enum +fromE'State2 :: E'State2 -> Text +fromE'State2 = \case + E'State2'Pending_publish -> "pending-publish" + E'State2'Published -> "published" + E'State2'Pending_node_unpublish -> "pending-node-unpublish" + E'State2'Pending_controller_unpublish -> "pending-controller-unpublish" + +-- | parse 'E'State2' enum +toE'State2 :: Text -> P.Either String E'State2 +toE'State2 = \case + "pending-publish" -> P.Right E'State2'Pending_publish + "published" -> P.Right E'State2'Published + "pending-node-unpublish" -> P.Right E'State2'Pending_node_unpublish + "pending-controller-unpublish" -> P.Right E'State2'Pending_controller_unpublish + s -> P.Left $ "toE'State2: enum parse failure: " P.++ P.show s + + +-- ** E'Status + +-- | Enum of 'Text' . +-- Status is one of `none`, `starting`, `healthy` or `unhealthy` - \"none\" Indicates there is no healthcheck - \"starting\" Starting indicates that the container is not yet ready - \"healthy\" Healthy indicates that the container is running correctly - \"unhealthy\" Unhealthy indicates that the container has a problem +data E'Status + = E'Status'None -- ^ @"none"@ + | E'Status'Starting -- ^ @"starting"@ + | E'Status'Healthy -- ^ @"healthy"@ + | E'Status'Unhealthy -- ^ @"unhealthy"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Status where toJSON = A.toJSON . fromE'Status +instance A.FromJSON E'Status where parseJSON o = P.either P.fail (pure . P.id) . toE'Status =<< A.parseJSON o +instance WH.ToHttpApiData E'Status where toQueryParam = WH.toQueryParam . fromE'Status +instance WH.FromHttpApiData E'Status where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Status +instance MimeRender MimeMultipartFormData E'Status where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Status' enum +fromE'Status :: E'Status -> Text +fromE'Status = \case + E'Status'None -> "none" + E'Status'Starting -> "starting" + E'Status'Healthy -> "healthy" + E'Status'Unhealthy -> "unhealthy" + +-- | parse 'E'Status' enum +toE'Status :: Text -> P.Either String E'Status +toE'Status = \case + "none" -> P.Right E'Status'None + "starting" -> P.Right E'Status'Starting + "healthy" -> P.Right E'Status'Healthy + "unhealthy" -> P.Right E'Status'Unhealthy + s -> P.Left $ "toE'Status: enum parse failure: " P.++ P.show s + + +-- ** E'Status2 + +-- | Enum of 'Text' . +-- String representation of the container state. Can be one of \"created\", \"running\", \"paused\", \"restarting\", \"removing\", \"exited\", or \"dead\". +data E'Status2 + = E'Status2'Created -- ^ @"created"@ + | E'Status2'Running -- ^ @"running"@ + | E'Status2'Paused -- ^ @"paused"@ + | E'Status2'Restarting -- ^ @"restarting"@ + | E'Status2'Removing -- ^ @"removing"@ + | E'Status2'Exited -- ^ @"exited"@ + | E'Status2'Dead -- ^ @"dead"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Status2 where toJSON = A.toJSON . fromE'Status2 +instance A.FromJSON E'Status2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Status2 =<< A.parseJSON o +instance WH.ToHttpApiData E'Status2 where toQueryParam = WH.toQueryParam . fromE'Status2 +instance WH.FromHttpApiData E'Status2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Status2 +instance MimeRender MimeMultipartFormData E'Status2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Status2' enum +fromE'Status2 :: E'Status2 -> Text +fromE'Status2 = \case + E'Status2'Created -> "created" + E'Status2'Running -> "running" + E'Status2'Paused -> "paused" + E'Status2'Restarting -> "restarting" + E'Status2'Removing -> "removing" + E'Status2'Exited -> "exited" + E'Status2'Dead -> "dead" + +-- | parse 'E'Status2' enum +toE'Status2 :: Text -> P.Either String E'Status2 +toE'Status2 = \case + "created" -> P.Right E'Status2'Created + "running" -> P.Right E'Status2'Running + "paused" -> P.Right E'Status2'Paused + "restarting" -> P.Right E'Status2'Restarting + "removing" -> P.Right E'Status2'Removing + "exited" -> P.Right E'Status2'Exited + "dead" -> P.Right E'Status2'Dead + s -> P.Left $ "toE'Status2: enum parse failure: " P.++ P.show s + + +-- ** E'Swarm + +-- | Enum of 'Text' +data E'Swarm + = E'Swarm'Inactive -- ^ @"inactive"@ + | E'Swarm'Pending -- ^ @"pending"@ + | E'Swarm'Error -- ^ @"error"@ + | E'Swarm'Locked -- ^ @"locked"@ + | E'Swarm'Active_worker -- ^ @"active/worker"@ + | E'Swarm'Active_manager -- ^ @"active/manager"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Swarm where toJSON = A.toJSON . fromE'Swarm +instance A.FromJSON E'Swarm where parseJSON o = P.either P.fail (pure . P.id) . toE'Swarm =<< A.parseJSON o +instance WH.ToHttpApiData E'Swarm where toQueryParam = WH.toQueryParam . fromE'Swarm +instance WH.FromHttpApiData E'Swarm where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Swarm +instance MimeRender MimeMultipartFormData E'Swarm where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Swarm' enum +fromE'Swarm :: E'Swarm -> Text +fromE'Swarm = \case + E'Swarm'Inactive -> "inactive" + E'Swarm'Pending -> "pending" + E'Swarm'Error -> "error" + E'Swarm'Locked -> "locked" + E'Swarm'Active_worker -> "active/worker" + E'Swarm'Active_manager -> "active/manager" + +-- | parse 'E'Swarm' enum +toE'Swarm :: Text -> P.Either String E'Swarm +toE'Swarm = \case + "inactive" -> P.Right E'Swarm'Inactive + "pending" -> P.Right E'Swarm'Pending + "error" -> P.Right E'Swarm'Error + "locked" -> P.Right E'Swarm'Locked + "active/worker" -> P.Right E'Swarm'Active_worker + "active/manager" -> P.Right E'Swarm'Active_manager + s -> P.Left $ "toE'Swarm: enum parse failure: " P.++ P.show s + + +-- ** E'Type + +-- | Enum of 'Text' +data E'Type + = E'Type'Tcp -- ^ @"tcp"@ + | E'Type'Udp -- ^ @"udp"@ + | E'Type'Sctp -- ^ @"sctp"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Type where toJSON = A.toJSON . fromE'Type +instance A.FromJSON E'Type where parseJSON o = P.either P.fail (pure . P.id) . toE'Type =<< A.parseJSON o +instance WH.ToHttpApiData E'Type where toQueryParam = WH.toQueryParam . fromE'Type +instance WH.FromHttpApiData E'Type where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Type +instance MimeRender MimeMultipartFormData E'Type where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Type' enum +fromE'Type :: E'Type -> Text +fromE'Type = \case + E'Type'Tcp -> "tcp" + E'Type'Udp -> "udp" + E'Type'Sctp -> "sctp" + +-- | parse 'E'Type' enum +toE'Type :: Text -> P.Either String E'Type +toE'Type = \case + "tcp" -> P.Right E'Type'Tcp + "udp" -> P.Right E'Type'Udp + "sctp" -> P.Right E'Type'Sctp + s -> P.Left $ "toE'Type: enum parse failure: " P.++ P.show s + + +-- ** E'Type2 + +-- | Enum of 'Text' . +-- The mount type: - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `tmpfs` a `tmpfs`. - `npipe` a named pipe from the host into the container. - `cluster` a Swarm cluster volume +data E'Type2 + = E'Type2'Bind -- ^ @"bind"@ + | E'Type2'Volume -- ^ @"volume"@ + | E'Type2'Tmpfs -- ^ @"tmpfs"@ + | E'Type2'Npipe -- ^ @"npipe"@ + | E'Type2'Cluster -- ^ @"cluster"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Type2 where toJSON = A.toJSON . fromE'Type2 +instance A.FromJSON E'Type2 where parseJSON o = P.either P.fail (pure . P.id) . toE'Type2 =<< A.parseJSON o +instance WH.ToHttpApiData E'Type2 where toQueryParam = WH.toQueryParam . fromE'Type2 +instance WH.FromHttpApiData E'Type2 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Type2 +instance MimeRender MimeMultipartFormData E'Type2 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Type2' enum +fromE'Type2 :: E'Type2 -> Text +fromE'Type2 = \case + E'Type2'Bind -> "bind" + E'Type2'Volume -> "volume" + E'Type2'Tmpfs -> "tmpfs" + E'Type2'Npipe -> "npipe" + E'Type2'Cluster -> "cluster" + +-- | parse 'E'Type2' enum +toE'Type2 :: Text -> P.Either String E'Type2 +toE'Type2 = \case + "bind" -> P.Right E'Type2'Bind + "volume" -> P.Right E'Type2'Volume + "tmpfs" -> P.Right E'Type2'Tmpfs + "npipe" -> P.Right E'Type2'Npipe + "cluster" -> P.Right E'Type2'Cluster + s -> P.Left $ "toE'Type2: enum parse failure: " P.++ P.show s + + +-- ** E'Type3 + +-- | Enum of 'Text' . +-- Cache record type. +data E'Type3 + = E'Type3'Internal -- ^ @"internal"@ + | E'Type3'Frontend -- ^ @"frontend"@ + | E'Type3'Source_local -- ^ @"source.local"@ + | E'Type3'Source_git_checkout -- ^ @"source.git.checkout"@ + | E'Type3'Exec_cachemount -- ^ @"exec.cachemount"@ + | E'Type3'Regular -- ^ @"regular"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Type3 where toJSON = A.toJSON . fromE'Type3 +instance A.FromJSON E'Type3 where parseJSON o = P.either P.fail (pure . P.id) . toE'Type3 =<< A.parseJSON o +instance WH.ToHttpApiData E'Type3 where toQueryParam = WH.toQueryParam . fromE'Type3 +instance WH.FromHttpApiData E'Type3 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Type3 +instance MimeRender MimeMultipartFormData E'Type3 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Type3' enum +fromE'Type3 :: E'Type3 -> Text +fromE'Type3 = \case + E'Type3'Internal -> "internal" + E'Type3'Frontend -> "frontend" + E'Type3'Source_local -> "source.local" + E'Type3'Source_git_checkout -> "source.git.checkout" + E'Type3'Exec_cachemount -> "exec.cachemount" + E'Type3'Regular -> "regular" + +-- | parse 'E'Type3' enum +toE'Type3 :: Text -> P.Either String E'Type3 +toE'Type3 = \case + "internal" -> P.Right E'Type3'Internal + "frontend" -> P.Right E'Type3'Frontend + "source.local" -> P.Right E'Type3'Source_local + "source.git.checkout" -> P.Right E'Type3'Source_git_checkout + "exec.cachemount" -> P.Right E'Type3'Exec_cachemount + "regular" -> P.Right E'Type3'Regular + s -> P.Left $ "toE'Type3: enum parse failure: " P.++ P.show s + + +-- ** E'Type4 + +-- | Enum of 'Text' . +-- The type of object emitting the event +data E'Type4 + = E'Type4'Builder -- ^ @"builder"@ + | E'Type4'Config -- ^ @"config"@ + | E'Type4'Container -- ^ @"container"@ + | E'Type4'Daemon -- ^ @"daemon"@ + | E'Type4'Image -- ^ @"image"@ + | E'Type4'Network -- ^ @"network"@ + | E'Type4'Node -- ^ @"node"@ + | E'Type4'Plugin -- ^ @"plugin"@ + | E'Type4'Secret -- ^ @"secret"@ + | E'Type4'Service -- ^ @"service"@ + | E'Type4'Volume -- ^ @"volume"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Type4 where toJSON = A.toJSON . fromE'Type4 +instance A.FromJSON E'Type4 where parseJSON o = P.either P.fail (pure . P.id) . toE'Type4 =<< A.parseJSON o +instance WH.ToHttpApiData E'Type4 where toQueryParam = WH.toQueryParam . fromE'Type4 +instance WH.FromHttpApiData E'Type4 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Type4 +instance MimeRender MimeMultipartFormData E'Type4 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Type4' enum +fromE'Type4 :: E'Type4 -> Text +fromE'Type4 = \case + E'Type4'Builder -> "builder" + E'Type4'Config -> "config" + E'Type4'Container -> "container" + E'Type4'Daemon -> "daemon" + E'Type4'Image -> "image" + E'Type4'Network -> "network" + E'Type4'Node -> "node" + E'Type4'Plugin -> "plugin" + E'Type4'Secret -> "secret" + E'Type4'Service -> "service" + E'Type4'Volume -> "volume" + +-- | parse 'E'Type4' enum +toE'Type4 :: Text -> P.Either String E'Type4 +toE'Type4 = \case + "builder" -> P.Right E'Type4'Builder + "config" -> P.Right E'Type4'Config + "container" -> P.Right E'Type4'Container + "daemon" -> P.Right E'Type4'Daemon + "image" -> P.Right E'Type4'Image + "network" -> P.Right E'Type4'Network + "node" -> P.Right E'Type4'Node + "plugin" -> P.Right E'Type4'Plugin + "secret" -> P.Right E'Type4'Secret + "service" -> P.Right E'Type4'Service + "volume" -> P.Right E'Type4'Volume + s -> P.Left $ "toE'Type4: enum parse failure: " P.++ P.show s + + +-- ** E'Type5 + +-- | Enum of 'Text' +data E'Type5 + = E'Type5'Json_file -- ^ @"json-file"@ + | E'Type5'Syslog -- ^ @"syslog"@ + | E'Type5'Journald -- ^ @"journald"@ + | E'Type5'Gelf -- ^ @"gelf"@ + | E'Type5'Fluentd -- ^ @"fluentd"@ + | E'Type5'Awslogs -- ^ @"awslogs"@ + | E'Type5'Splunk -- ^ @"splunk"@ + | E'Type5'Etwlogs -- ^ @"etwlogs"@ + | E'Type5'None -- ^ @"none"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Type5 where toJSON = A.toJSON . fromE'Type5 +instance A.FromJSON E'Type5 where parseJSON o = P.either P.fail (pure . P.id) . toE'Type5 =<< A.parseJSON o +instance WH.ToHttpApiData E'Type5 where toQueryParam = WH.toQueryParam . fromE'Type5 +instance WH.FromHttpApiData E'Type5 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Type5 +instance MimeRender MimeMultipartFormData E'Type5 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Type5' enum +fromE'Type5 :: E'Type5 -> Text +fromE'Type5 = \case + E'Type5'Json_file -> "json-file" + E'Type5'Syslog -> "syslog" + E'Type5'Journald -> "journald" + E'Type5'Gelf -> "gelf" + E'Type5'Fluentd -> "fluentd" + E'Type5'Awslogs -> "awslogs" + E'Type5'Splunk -> "splunk" + E'Type5'Etwlogs -> "etwlogs" + E'Type5'None -> "none" + +-- | parse 'E'Type5' enum +toE'Type5 :: Text -> P.Either String E'Type5 +toE'Type5 = \case + "json-file" -> P.Right E'Type5'Json_file + "syslog" -> P.Right E'Type5'Syslog + "journald" -> P.Right E'Type5'Journald + "gelf" -> P.Right E'Type5'Gelf + "fluentd" -> P.Right E'Type5'Fluentd + "awslogs" -> P.Right E'Type5'Awslogs + "splunk" -> P.Right E'Type5'Splunk + "etwlogs" -> P.Right E'Type5'Etwlogs + "none" -> P.Right E'Type5'None + s -> P.Left $ "toE'Type5: enum parse failure: " P.++ P.show s + + +-- ** E'Type6 + +-- | Enum of 'Text' +data E'Type6 + = E'Type6'Container -- ^ @"container"@ + | E'Type6'Image -- ^ @"image"@ + | E'Type6'Volume -- ^ @"volume"@ + | E'Type6'Build_cache -- ^ @"build-cache"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON E'Type6 where toJSON = A.toJSON . fromE'Type6 +instance A.FromJSON E'Type6 where parseJSON o = P.either P.fail (pure . P.id) . toE'Type6 =<< A.parseJSON o +instance WH.ToHttpApiData E'Type6 where toQueryParam = WH.toQueryParam . fromE'Type6 +instance WH.FromHttpApiData E'Type6 where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toE'Type6 +instance MimeRender MimeMultipartFormData E'Type6 where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'E'Type6' enum +fromE'Type6 :: E'Type6 -> Text +fromE'Type6 = \case + E'Type6'Container -> "container" + E'Type6'Image -> "image" + E'Type6'Volume -> "volume" + E'Type6'Build_cache -> "build-cache" + +-- | parse 'E'Type6' enum +toE'Type6 :: Text -> P.Either String E'Type6 +toE'Type6 = \case + "container" -> P.Right E'Type6'Container + "image" -> P.Right E'Type6'Image + "volume" -> P.Right E'Type6'Volume + "build-cache" -> P.Right E'Type6'Build_cache + s -> P.Left $ "toE'Type6: enum parse failure: " P.++ P.show s + + +-- ** LocalNodeState + +-- | Enum of 'Text' . +-- Current local status of this node. +data LocalNodeState + = LocalNodeState'Empty -- ^ @""@ + | LocalNodeState'Inactive -- ^ @"inactive"@ + | LocalNodeState'Pending -- ^ @"pending"@ + | LocalNodeState'Active -- ^ @"active"@ + | LocalNodeState'Error -- ^ @"error"@ + | LocalNodeState'Locked -- ^ @"locked"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON LocalNodeState where toJSON = A.toJSON . fromLocalNodeState +instance A.FromJSON LocalNodeState where parseJSON o = P.either P.fail (pure . P.id) . toLocalNodeState =<< A.parseJSON o +instance WH.ToHttpApiData LocalNodeState where toQueryParam = WH.toQueryParam . fromLocalNodeState +instance WH.FromHttpApiData LocalNodeState where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toLocalNodeState +instance MimeRender MimeMultipartFormData LocalNodeState where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'LocalNodeState' enum +fromLocalNodeState :: LocalNodeState -> Text +fromLocalNodeState = \case + LocalNodeState'Empty -> "" + LocalNodeState'Inactive -> "inactive" + LocalNodeState'Pending -> "pending" + LocalNodeState'Active -> "active" + LocalNodeState'Error -> "error" + LocalNodeState'Locked -> "locked" + +-- | parse 'LocalNodeState' enum +toLocalNodeState :: Text -> P.Either String LocalNodeState +toLocalNodeState = \case + "" -> P.Right LocalNodeState'Empty + "inactive" -> P.Right LocalNodeState'Inactive + "pending" -> P.Right LocalNodeState'Pending + "active" -> P.Right LocalNodeState'Active + "error" -> P.Right LocalNodeState'Error + "locked" -> P.Right LocalNodeState'Locked + s -> P.Left $ "toLocalNodeState: enum parse failure: " P.++ P.show s + + +-- ** NodeState + +-- | Enum of 'Text' . +-- NodeState represents the state of a node. +data NodeState + = NodeState'Unknown -- ^ @"unknown"@ + | NodeState'Down -- ^ @"down"@ + | NodeState'Ready -- ^ @"ready"@ + | NodeState'Disconnected -- ^ @"disconnected"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON NodeState where toJSON = A.toJSON . fromNodeState +instance A.FromJSON NodeState where parseJSON o = P.either P.fail (pure . P.id) . toNodeState =<< A.parseJSON o +instance WH.ToHttpApiData NodeState where toQueryParam = WH.toQueryParam . fromNodeState +instance WH.FromHttpApiData NodeState where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toNodeState +instance MimeRender MimeMultipartFormData NodeState where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'NodeState' enum +fromNodeState :: NodeState -> Text +fromNodeState = \case + NodeState'Unknown -> "unknown" + NodeState'Down -> "down" + NodeState'Ready -> "ready" + NodeState'Disconnected -> "disconnected" + +-- | parse 'NodeState' enum +toNodeState :: Text -> P.Either String NodeState +toNodeState = \case + "unknown" -> P.Right NodeState'Unknown + "down" -> P.Right NodeState'Down + "ready" -> P.Right NodeState'Ready + "disconnected" -> P.Right NodeState'Disconnected + s -> P.Left $ "toNodeState: enum parse failure: " P.++ P.show s + + +-- ** Reachability + +-- | Enum of 'Text' . +-- Reachability represents the reachability of a node. +data Reachability + = Reachability'Unknown -- ^ @"unknown"@ + | Reachability'Unreachable -- ^ @"unreachable"@ + | Reachability'Reachable -- ^ @"reachable"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON Reachability where toJSON = A.toJSON . fromReachability +instance A.FromJSON Reachability where parseJSON o = P.either P.fail (pure . P.id) . toReachability =<< A.parseJSON o +instance WH.ToHttpApiData Reachability where toQueryParam = WH.toQueryParam . fromReachability +instance WH.FromHttpApiData Reachability where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toReachability +instance MimeRender MimeMultipartFormData Reachability where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'Reachability' enum +fromReachability :: Reachability -> Text +fromReachability = \case + Reachability'Unknown -> "unknown" + Reachability'Unreachable -> "unreachable" + Reachability'Reachable -> "reachable" + +-- | parse 'Reachability' enum +toReachability :: Text -> P.Either String Reachability +toReachability = \case + "unknown" -> P.Right Reachability'Unknown + "unreachable" -> P.Right Reachability'Unreachable + "reachable" -> P.Right Reachability'Reachable + s -> P.Left $ "toReachability: enum parse failure: " P.++ P.show s + + +-- ** TaskState + +-- | Enum of 'Text' +data TaskState + = TaskState'New -- ^ @"new"@ + | TaskState'Allocated -- ^ @"allocated"@ + | TaskState'Pending -- ^ @"pending"@ + | TaskState'Assigned -- ^ @"assigned"@ + | TaskState'Accepted -- ^ @"accepted"@ + | TaskState'Preparing -- ^ @"preparing"@ + | TaskState'Ready -- ^ @"ready"@ + | TaskState'Starting -- ^ @"starting"@ + | TaskState'Running -- ^ @"running"@ + | TaskState'Complete -- ^ @"complete"@ + | TaskState'Shutdown -- ^ @"shutdown"@ + | TaskState'Failed -- ^ @"failed"@ + | TaskState'Rejected -- ^ @"rejected"@ + | TaskState'Remove -- ^ @"remove"@ + | TaskState'Orphaned -- ^ @"orphaned"@ + deriving (P.Show, P.Eq, P.Typeable, P.Ord, P.Bounded, P.Enum) + +instance A.ToJSON TaskState where toJSON = A.toJSON . fromTaskState +instance A.FromJSON TaskState where parseJSON o = P.either P.fail (pure . P.id) . toTaskState =<< A.parseJSON o +instance WH.ToHttpApiData TaskState where toQueryParam = WH.toQueryParam . fromTaskState +instance WH.FromHttpApiData TaskState where parseQueryParam o = WH.parseQueryParam o >>= P.left T.pack . toTaskState +instance MimeRender MimeMultipartFormData TaskState where mimeRender _ = mimeRenderDefaultMultipartFormData + +-- | unwrap 'TaskState' enum +fromTaskState :: TaskState -> Text +fromTaskState = \case + TaskState'New -> "new" + TaskState'Allocated -> "allocated" + TaskState'Pending -> "pending" + TaskState'Assigned -> "assigned" + TaskState'Accepted -> "accepted" + TaskState'Preparing -> "preparing" + TaskState'Ready -> "ready" + TaskState'Starting -> "starting" + TaskState'Running -> "running" + TaskState'Complete -> "complete" + TaskState'Shutdown -> "shutdown" + TaskState'Failed -> "failed" + TaskState'Rejected -> "rejected" + TaskState'Remove -> "remove" + TaskState'Orphaned -> "orphaned" + +-- | parse 'TaskState' enum +toTaskState :: Text -> P.Either String TaskState +toTaskState = \case + "new" -> P.Right TaskState'New + "allocated" -> P.Right TaskState'Allocated + "pending" -> P.Right TaskState'Pending + "assigned" -> P.Right TaskState'Assigned + "accepted" -> P.Right TaskState'Accepted + "preparing" -> P.Right TaskState'Preparing + "ready" -> P.Right TaskState'Ready + "starting" -> P.Right TaskState'Starting + "running" -> P.Right TaskState'Running + "complete" -> P.Right TaskState'Complete + "shutdown" -> P.Right TaskState'Shutdown + "failed" -> P.Right TaskState'Failed + "rejected" -> P.Right TaskState'Rejected + "remove" -> P.Right TaskState'Remove + "orphaned" -> P.Right TaskState'Orphaned + s -> P.Left $ "toTaskState: enum parse failure: " P.++ P.show s + + + +type Map = HM.HashMap String String diff --git a/v1.46/lib/DockerEngine/ModelLens.hs b/v1.46/lib/DockerEngine/ModelLens.hs new file mode 100644 index 0000000..1eec72c --- /dev/null +++ b/v1.46/lib/DockerEngine/ModelLens.hs @@ -0,0 +1,6581 @@ +{- + Docker Engine API + + The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.46) is used. For example, calling `/info` is the same as calling `/v1.46/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + + OpenAPI Version: 3.0.1 + Docker Engine API API version: 1.46 + Generated by OpenAPI Generator (https://openapi-generator.tech) +-} + +{-| +Module : DockerEngine.Lens +-} + +{-# LANGUAGE KindSignatures #-} +{-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE RecordWildCards #-} +{-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-matches -fno-warn-unused-binds -fno-warn-unused-imports #-} + +module DockerEngine.ModelLens where + +import qualified Data.Aeson as A +import qualified Data.ByteString.Lazy as BL +import qualified Data.Data as P (Data, Typeable) +import qualified Data.Map as Map +import qualified Data.Set as Set +import qualified Data.Time as TI + +import Data.Text (Text) + +import Prelude (($), (.),(<$>),(<*>),(=<<),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) +import qualified Prelude as P + +import DockerEngine.Model +import DockerEngine.Core + + +-- * Address + +-- | 'addressAddr' Lens +addressAddrL :: Lens_' Address (Maybe Text) +addressAddrL f Address{..} = (\addressAddr -> Address { addressAddr, ..} ) <$> f addressAddr +{-# INLINE addressAddrL #-} + +-- | 'addressPrefixLen' Lens +addressPrefixLenL :: Lens_' Address (Maybe Int) +addressPrefixLenL f Address{..} = (\addressPrefixLen -> Address { addressPrefixLen, ..} ) <$> f addressPrefixLen +{-# INLINE addressPrefixLenL #-} + + + +-- * AuthConfig + +-- | 'authConfigUsername' Lens +authConfigUsernameL :: Lens_' AuthConfig (Maybe Text) +authConfigUsernameL f AuthConfig{..} = (\authConfigUsername -> AuthConfig { authConfigUsername, ..} ) <$> f authConfigUsername +{-# INLINE authConfigUsernameL #-} + +-- | 'authConfigPassword' Lens +authConfigPasswordL :: Lens_' AuthConfig (Maybe Text) +authConfigPasswordL f AuthConfig{..} = (\authConfigPassword -> AuthConfig { authConfigPassword, ..} ) <$> f authConfigPassword +{-# INLINE authConfigPasswordL #-} + +-- | 'authConfigEmail' Lens +authConfigEmailL :: Lens_' AuthConfig (Maybe Text) +authConfigEmailL f AuthConfig{..} = (\authConfigEmail -> AuthConfig { authConfigEmail, ..} ) <$> f authConfigEmail +{-# INLINE authConfigEmailL #-} + +-- | 'authConfigServeraddress' Lens +authConfigServeraddressL :: Lens_' AuthConfig (Maybe Text) +authConfigServeraddressL f AuthConfig{..} = (\authConfigServeraddress -> AuthConfig { authConfigServeraddress, ..} ) <$> f authConfigServeraddress +{-# INLINE authConfigServeraddressL #-} + + + +-- * BuildCache + +-- | 'buildCacheId' Lens +buildCacheIdL :: Lens_' BuildCache (Maybe Text) +buildCacheIdL f BuildCache{..} = (\buildCacheId -> BuildCache { buildCacheId, ..} ) <$> f buildCacheId +{-# INLINE buildCacheIdL #-} + +-- | 'buildCacheParent' Lens +buildCacheParentL :: Lens_' BuildCache (Maybe Text) +buildCacheParentL f BuildCache{..} = (\buildCacheParent -> BuildCache { buildCacheParent, ..} ) <$> f buildCacheParent +{-# INLINE buildCacheParentL #-} + +-- | 'buildCacheParents' Lens +buildCacheParentsL :: Lens_' BuildCache (Maybe [Text]) +buildCacheParentsL f BuildCache{..} = (\buildCacheParents -> BuildCache { buildCacheParents, ..} ) <$> f buildCacheParents +{-# INLINE buildCacheParentsL #-} + +-- | 'buildCacheType' Lens +buildCacheTypeL :: Lens_' BuildCache (Maybe E'Type3) +buildCacheTypeL f BuildCache{..} = (\buildCacheType -> BuildCache { buildCacheType, ..} ) <$> f buildCacheType +{-# INLINE buildCacheTypeL #-} + +-- | 'buildCacheDescription' Lens +buildCacheDescriptionL :: Lens_' BuildCache (Maybe Text) +buildCacheDescriptionL f BuildCache{..} = (\buildCacheDescription -> BuildCache { buildCacheDescription, ..} ) <$> f buildCacheDescription +{-# INLINE buildCacheDescriptionL #-} + +-- | 'buildCacheInUse' Lens +buildCacheInUseL :: Lens_' BuildCache (Maybe Bool) +buildCacheInUseL f BuildCache{..} = (\buildCacheInUse -> BuildCache { buildCacheInUse, ..} ) <$> f buildCacheInUse +{-# INLINE buildCacheInUseL #-} + +-- | 'buildCacheShared' Lens +buildCacheSharedL :: Lens_' BuildCache (Maybe Bool) +buildCacheSharedL f BuildCache{..} = (\buildCacheShared -> BuildCache { buildCacheShared, ..} ) <$> f buildCacheShared +{-# INLINE buildCacheSharedL #-} + +-- | 'buildCacheSize' Lens +buildCacheSizeL :: Lens_' BuildCache (Maybe Int) +buildCacheSizeL f BuildCache{..} = (\buildCacheSize -> BuildCache { buildCacheSize, ..} ) <$> f buildCacheSize +{-# INLINE buildCacheSizeL #-} + +-- | 'buildCacheCreatedAt' Lens +buildCacheCreatedAtL :: Lens_' BuildCache (Maybe Text) +buildCacheCreatedAtL f BuildCache{..} = (\buildCacheCreatedAt -> BuildCache { buildCacheCreatedAt, ..} ) <$> f buildCacheCreatedAt +{-# INLINE buildCacheCreatedAtL #-} + +-- | 'buildCacheLastUsedAt' Lens +buildCacheLastUsedAtL :: Lens_' BuildCache (Maybe Text) +buildCacheLastUsedAtL f BuildCache{..} = (\buildCacheLastUsedAt -> BuildCache { buildCacheLastUsedAt, ..} ) <$> f buildCacheLastUsedAt +{-# INLINE buildCacheLastUsedAtL #-} + +-- | 'buildCacheUsageCount' Lens +buildCacheUsageCountL :: Lens_' BuildCache (Maybe Int) +buildCacheUsageCountL f BuildCache{..} = (\buildCacheUsageCount -> BuildCache { buildCacheUsageCount, ..} ) <$> f buildCacheUsageCount +{-# INLINE buildCacheUsageCountL #-} + + + +-- * BuildInfo + +-- | 'buildInfoId' Lens +buildInfoIdL :: Lens_' BuildInfo (Maybe Text) +buildInfoIdL f BuildInfo{..} = (\buildInfoId -> BuildInfo { buildInfoId, ..} ) <$> f buildInfoId +{-# INLINE buildInfoIdL #-} + +-- | 'buildInfoStream' Lens +buildInfoStreamL :: Lens_' BuildInfo (Maybe Text) +buildInfoStreamL f BuildInfo{..} = (\buildInfoStream -> BuildInfo { buildInfoStream, ..} ) <$> f buildInfoStream +{-# INLINE buildInfoStreamL #-} + +-- | 'buildInfoError' Lens +buildInfoErrorL :: Lens_' BuildInfo (Maybe Text) +buildInfoErrorL f BuildInfo{..} = (\buildInfoError -> BuildInfo { buildInfoError, ..} ) <$> f buildInfoError +{-# INLINE buildInfoErrorL #-} + +-- | 'buildInfoErrorDetail' Lens +buildInfoErrorDetailL :: Lens_' BuildInfo (Maybe ErrorDetail) +buildInfoErrorDetailL f BuildInfo{..} = (\buildInfoErrorDetail -> BuildInfo { buildInfoErrorDetail, ..} ) <$> f buildInfoErrorDetail +{-# INLINE buildInfoErrorDetailL #-} + +-- | 'buildInfoStatus' Lens +buildInfoStatusL :: Lens_' BuildInfo (Maybe Text) +buildInfoStatusL f BuildInfo{..} = (\buildInfoStatus -> BuildInfo { buildInfoStatus, ..} ) <$> f buildInfoStatus +{-# INLINE buildInfoStatusL #-} + +-- | 'buildInfoProgress' Lens +buildInfoProgressL :: Lens_' BuildInfo (Maybe Text) +buildInfoProgressL f BuildInfo{..} = (\buildInfoProgress -> BuildInfo { buildInfoProgress, ..} ) <$> f buildInfoProgress +{-# INLINE buildInfoProgressL #-} + +-- | 'buildInfoProgressDetail' Lens +buildInfoProgressDetailL :: Lens_' BuildInfo (Maybe ProgressDetail) +buildInfoProgressDetailL f BuildInfo{..} = (\buildInfoProgressDetail -> BuildInfo { buildInfoProgressDetail, ..} ) <$> f buildInfoProgressDetail +{-# INLINE buildInfoProgressDetailL #-} + +-- | 'buildInfoAux' Lens +buildInfoAuxL :: Lens_' BuildInfo (Maybe ImageID) +buildInfoAuxL f BuildInfo{..} = (\buildInfoAux -> BuildInfo { buildInfoAux, ..} ) <$> f buildInfoAux +{-# INLINE buildInfoAuxL #-} + + + +-- * BuildPruneResponse + +-- | 'buildPruneResponseCachesDeleted' Lens +buildPruneResponseCachesDeletedL :: Lens_' BuildPruneResponse (Maybe [Text]) +buildPruneResponseCachesDeletedL f BuildPruneResponse{..} = (\buildPruneResponseCachesDeleted -> BuildPruneResponse { buildPruneResponseCachesDeleted, ..} ) <$> f buildPruneResponseCachesDeleted +{-# INLINE buildPruneResponseCachesDeletedL #-} + +-- | 'buildPruneResponseSpaceReclaimed' Lens +buildPruneResponseSpaceReclaimedL :: Lens_' BuildPruneResponse (Maybe Integer) +buildPruneResponseSpaceReclaimedL f BuildPruneResponse{..} = (\buildPruneResponseSpaceReclaimed -> BuildPruneResponse { buildPruneResponseSpaceReclaimed, ..} ) <$> f buildPruneResponseSpaceReclaimed +{-# INLINE buildPruneResponseSpaceReclaimedL #-} + + + +-- * ChangeType + + + +-- * ClusterInfo + +-- | 'clusterInfoId' Lens +clusterInfoIdL :: Lens_' ClusterInfo (Maybe Text) +clusterInfoIdL f ClusterInfo{..} = (\clusterInfoId -> ClusterInfo { clusterInfoId, ..} ) <$> f clusterInfoId +{-# INLINE clusterInfoIdL #-} + +-- | 'clusterInfoVersion' Lens +clusterInfoVersionL :: Lens_' ClusterInfo (Maybe ObjectVersion) +clusterInfoVersionL f ClusterInfo{..} = (\clusterInfoVersion -> ClusterInfo { clusterInfoVersion, ..} ) <$> f clusterInfoVersion +{-# INLINE clusterInfoVersionL #-} + +-- | 'clusterInfoCreatedAt' Lens +clusterInfoCreatedAtL :: Lens_' ClusterInfo (Maybe Text) +clusterInfoCreatedAtL f ClusterInfo{..} = (\clusterInfoCreatedAt -> ClusterInfo { clusterInfoCreatedAt, ..} ) <$> f clusterInfoCreatedAt +{-# INLINE clusterInfoCreatedAtL #-} + +-- | 'clusterInfoUpdatedAt' Lens +clusterInfoUpdatedAtL :: Lens_' ClusterInfo (Maybe Text) +clusterInfoUpdatedAtL f ClusterInfo{..} = (\clusterInfoUpdatedAt -> ClusterInfo { clusterInfoUpdatedAt, ..} ) <$> f clusterInfoUpdatedAt +{-# INLINE clusterInfoUpdatedAtL #-} + +-- | 'clusterInfoSpec' Lens +clusterInfoSpecL :: Lens_' ClusterInfo (Maybe SwarmSpec) +clusterInfoSpecL f ClusterInfo{..} = (\clusterInfoSpec -> ClusterInfo { clusterInfoSpec, ..} ) <$> f clusterInfoSpec +{-# INLINE clusterInfoSpecL #-} + +-- | 'clusterInfoTlsInfo' Lens +clusterInfoTlsInfoL :: Lens_' ClusterInfo (Maybe TLSInfo) +clusterInfoTlsInfoL f ClusterInfo{..} = (\clusterInfoTlsInfo -> ClusterInfo { clusterInfoTlsInfo, ..} ) <$> f clusterInfoTlsInfo +{-# INLINE clusterInfoTlsInfoL #-} + +-- | 'clusterInfoRootRotationInProgress' Lens +clusterInfoRootRotationInProgressL :: Lens_' ClusterInfo (Maybe Bool) +clusterInfoRootRotationInProgressL f ClusterInfo{..} = (\clusterInfoRootRotationInProgress -> ClusterInfo { clusterInfoRootRotationInProgress, ..} ) <$> f clusterInfoRootRotationInProgress +{-# INLINE clusterInfoRootRotationInProgressL #-} + +-- | 'clusterInfoDataPathPort' Lens +clusterInfoDataPathPortL :: Lens_' ClusterInfo (Maybe Int) +clusterInfoDataPathPortL f ClusterInfo{..} = (\clusterInfoDataPathPort -> ClusterInfo { clusterInfoDataPathPort, ..} ) <$> f clusterInfoDataPathPort +{-# INLINE clusterInfoDataPathPortL #-} + +-- | 'clusterInfoDefaultAddrPool' Lens +clusterInfoDefaultAddrPoolL :: Lens_' ClusterInfo (Maybe [Text]) +clusterInfoDefaultAddrPoolL f ClusterInfo{..} = (\clusterInfoDefaultAddrPool -> ClusterInfo { clusterInfoDefaultAddrPool, ..} ) <$> f clusterInfoDefaultAddrPool +{-# INLINE clusterInfoDefaultAddrPoolL #-} + +-- | 'clusterInfoSubnetSize' Lens +clusterInfoSubnetSizeL :: Lens_' ClusterInfo (Maybe Int) +clusterInfoSubnetSizeL f ClusterInfo{..} = (\clusterInfoSubnetSize -> ClusterInfo { clusterInfoSubnetSize, ..} ) <$> f clusterInfoSubnetSize +{-# INLINE clusterInfoSubnetSizeL #-} + + + +-- * ClusterVolume + +-- | 'clusterVolumeId' Lens +clusterVolumeIdL :: Lens_' ClusterVolume (Maybe Text) +clusterVolumeIdL f ClusterVolume{..} = (\clusterVolumeId -> ClusterVolume { clusterVolumeId, ..} ) <$> f clusterVolumeId +{-# INLINE clusterVolumeIdL #-} + +-- | 'clusterVolumeVersion' Lens +clusterVolumeVersionL :: Lens_' ClusterVolume (Maybe ObjectVersion) +clusterVolumeVersionL f ClusterVolume{..} = (\clusterVolumeVersion -> ClusterVolume { clusterVolumeVersion, ..} ) <$> f clusterVolumeVersion +{-# INLINE clusterVolumeVersionL #-} + +-- | 'clusterVolumeCreatedAt' Lens +clusterVolumeCreatedAtL :: Lens_' ClusterVolume (Maybe Text) +clusterVolumeCreatedAtL f ClusterVolume{..} = (\clusterVolumeCreatedAt -> ClusterVolume { clusterVolumeCreatedAt, ..} ) <$> f clusterVolumeCreatedAt +{-# INLINE clusterVolumeCreatedAtL #-} + +-- | 'clusterVolumeUpdatedAt' Lens +clusterVolumeUpdatedAtL :: Lens_' ClusterVolume (Maybe Text) +clusterVolumeUpdatedAtL f ClusterVolume{..} = (\clusterVolumeUpdatedAt -> ClusterVolume { clusterVolumeUpdatedAt, ..} ) <$> f clusterVolumeUpdatedAt +{-# INLINE clusterVolumeUpdatedAtL #-} + +-- | 'clusterVolumeSpec' Lens +clusterVolumeSpecL :: Lens_' ClusterVolume (Maybe ClusterVolumeSpec) +clusterVolumeSpecL f ClusterVolume{..} = (\clusterVolumeSpec -> ClusterVolume { clusterVolumeSpec, ..} ) <$> f clusterVolumeSpec +{-# INLINE clusterVolumeSpecL #-} + +-- | 'clusterVolumeInfo' Lens +clusterVolumeInfoL :: Lens_' ClusterVolume (Maybe ClusterVolumeInfo) +clusterVolumeInfoL f ClusterVolume{..} = (\clusterVolumeInfo -> ClusterVolume { clusterVolumeInfo, ..} ) <$> f clusterVolumeInfo +{-# INLINE clusterVolumeInfoL #-} + +-- | 'clusterVolumePublishStatus' Lens +clusterVolumePublishStatusL :: Lens_' ClusterVolume (Maybe [ClusterVolumePublishStatusInner]) +clusterVolumePublishStatusL f ClusterVolume{..} = (\clusterVolumePublishStatus -> ClusterVolume { clusterVolumePublishStatus, ..} ) <$> f clusterVolumePublishStatus +{-# INLINE clusterVolumePublishStatusL #-} + + + +-- * ClusterVolumeInfo + +-- | 'clusterVolumeInfoCapacityBytes' Lens +clusterVolumeInfoCapacityBytesL :: Lens_' ClusterVolumeInfo (Maybe Integer) +clusterVolumeInfoCapacityBytesL f ClusterVolumeInfo{..} = (\clusterVolumeInfoCapacityBytes -> ClusterVolumeInfo { clusterVolumeInfoCapacityBytes, ..} ) <$> f clusterVolumeInfoCapacityBytes +{-# INLINE clusterVolumeInfoCapacityBytesL #-} + +-- | 'clusterVolumeInfoVolumeContext' Lens +clusterVolumeInfoVolumeContextL :: Lens_' ClusterVolumeInfo (Maybe (Map.Map String Text)) +clusterVolumeInfoVolumeContextL f ClusterVolumeInfo{..} = (\clusterVolumeInfoVolumeContext -> ClusterVolumeInfo { clusterVolumeInfoVolumeContext, ..} ) <$> f clusterVolumeInfoVolumeContext +{-# INLINE clusterVolumeInfoVolumeContextL #-} + +-- | 'clusterVolumeInfoVolumeId' Lens +clusterVolumeInfoVolumeIdL :: Lens_' ClusterVolumeInfo (Maybe Text) +clusterVolumeInfoVolumeIdL f ClusterVolumeInfo{..} = (\clusterVolumeInfoVolumeId -> ClusterVolumeInfo { clusterVolumeInfoVolumeId, ..} ) <$> f clusterVolumeInfoVolumeId +{-# INLINE clusterVolumeInfoVolumeIdL #-} + +-- | 'clusterVolumeInfoAccessibleTopology' Lens +clusterVolumeInfoAccessibleTopologyL :: Lens_' ClusterVolumeInfo (Maybe [Map]) +clusterVolumeInfoAccessibleTopologyL f ClusterVolumeInfo{..} = (\clusterVolumeInfoAccessibleTopology -> ClusterVolumeInfo { clusterVolumeInfoAccessibleTopology, ..} ) <$> f clusterVolumeInfoAccessibleTopology +{-# INLINE clusterVolumeInfoAccessibleTopologyL #-} + + + +-- * ClusterVolumePublishStatusInner + +-- | 'clusterVolumePublishStatusInnerNodeId' Lens +clusterVolumePublishStatusInnerNodeIdL :: Lens_' ClusterVolumePublishStatusInner (Maybe Text) +clusterVolumePublishStatusInnerNodeIdL f ClusterVolumePublishStatusInner{..} = (\clusterVolumePublishStatusInnerNodeId -> ClusterVolumePublishStatusInner { clusterVolumePublishStatusInnerNodeId, ..} ) <$> f clusterVolumePublishStatusInnerNodeId +{-# INLINE clusterVolumePublishStatusInnerNodeIdL #-} + +-- | 'clusterVolumePublishStatusInnerState' Lens +clusterVolumePublishStatusInnerStateL :: Lens_' ClusterVolumePublishStatusInner (Maybe E'State2) +clusterVolumePublishStatusInnerStateL f ClusterVolumePublishStatusInner{..} = (\clusterVolumePublishStatusInnerState -> ClusterVolumePublishStatusInner { clusterVolumePublishStatusInnerState, ..} ) <$> f clusterVolumePublishStatusInnerState +{-# INLINE clusterVolumePublishStatusInnerStateL #-} + +-- | 'clusterVolumePublishStatusInnerPublishContext' Lens +clusterVolumePublishStatusInnerPublishContextL :: Lens_' ClusterVolumePublishStatusInner (Maybe (Map.Map String Text)) +clusterVolumePublishStatusInnerPublishContextL f ClusterVolumePublishStatusInner{..} = (\clusterVolumePublishStatusInnerPublishContext -> ClusterVolumePublishStatusInner { clusterVolumePublishStatusInnerPublishContext, ..} ) <$> f clusterVolumePublishStatusInnerPublishContext +{-# INLINE clusterVolumePublishStatusInnerPublishContextL #-} + + + +-- * ClusterVolumeSpec + +-- | 'clusterVolumeSpecGroup' Lens +clusterVolumeSpecGroupL :: Lens_' ClusterVolumeSpec (Maybe Text) +clusterVolumeSpecGroupL f ClusterVolumeSpec{..} = (\clusterVolumeSpecGroup -> ClusterVolumeSpec { clusterVolumeSpecGroup, ..} ) <$> f clusterVolumeSpecGroup +{-# INLINE clusterVolumeSpecGroupL #-} + +-- | 'clusterVolumeSpecAccessMode' Lens +clusterVolumeSpecAccessModeL :: Lens_' ClusterVolumeSpec (Maybe ClusterVolumeSpecAccessMode) +clusterVolumeSpecAccessModeL f ClusterVolumeSpec{..} = (\clusterVolumeSpecAccessMode -> ClusterVolumeSpec { clusterVolumeSpecAccessMode, ..} ) <$> f clusterVolumeSpecAccessMode +{-# INLINE clusterVolumeSpecAccessModeL #-} + + + +-- * ClusterVolumeSpecAccessMode + +-- | 'clusterVolumeSpecAccessModeScope' Lens +clusterVolumeSpecAccessModeScopeL :: Lens_' ClusterVolumeSpecAccessMode (Maybe E'Scope3) +clusterVolumeSpecAccessModeScopeL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeScope -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeScope, ..} ) <$> f clusterVolumeSpecAccessModeScope +{-# INLINE clusterVolumeSpecAccessModeScopeL #-} + +-- | 'clusterVolumeSpecAccessModeSharing' Lens +clusterVolumeSpecAccessModeSharingL :: Lens_' ClusterVolumeSpecAccessMode (Maybe E'Sharing) +clusterVolumeSpecAccessModeSharingL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeSharing -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeSharing, ..} ) <$> f clusterVolumeSpecAccessModeSharing +{-# INLINE clusterVolumeSpecAccessModeSharingL #-} + +-- | 'clusterVolumeSpecAccessModeMountVolume' Lens +clusterVolumeSpecAccessModeMountVolumeL :: Lens_' ClusterVolumeSpecAccessMode (Maybe A.Value) +clusterVolumeSpecAccessModeMountVolumeL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeMountVolume -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeMountVolume, ..} ) <$> f clusterVolumeSpecAccessModeMountVolume +{-# INLINE clusterVolumeSpecAccessModeMountVolumeL #-} + +-- | 'clusterVolumeSpecAccessModeSecrets' Lens +clusterVolumeSpecAccessModeSecretsL :: Lens_' ClusterVolumeSpecAccessMode (Maybe [ClusterVolumeSpecAccessModeSecretsInner]) +clusterVolumeSpecAccessModeSecretsL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeSecrets -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeSecrets, ..} ) <$> f clusterVolumeSpecAccessModeSecrets +{-# INLINE clusterVolumeSpecAccessModeSecretsL #-} + +-- | 'clusterVolumeSpecAccessModeAccessibilityRequirements' Lens +clusterVolumeSpecAccessModeAccessibilityRequirementsL :: Lens_' ClusterVolumeSpecAccessMode (Maybe ClusterVolumeSpecAccessModeAccessibilityRequirements) +clusterVolumeSpecAccessModeAccessibilityRequirementsL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeAccessibilityRequirements -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeAccessibilityRequirements, ..} ) <$> f clusterVolumeSpecAccessModeAccessibilityRequirements +{-# INLINE clusterVolumeSpecAccessModeAccessibilityRequirementsL #-} + +-- | 'clusterVolumeSpecAccessModeCapacityRange' Lens +clusterVolumeSpecAccessModeCapacityRangeL :: Lens_' ClusterVolumeSpecAccessMode (Maybe ClusterVolumeSpecAccessModeCapacityRange) +clusterVolumeSpecAccessModeCapacityRangeL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeCapacityRange -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeCapacityRange, ..} ) <$> f clusterVolumeSpecAccessModeCapacityRange +{-# INLINE clusterVolumeSpecAccessModeCapacityRangeL #-} + +-- | 'clusterVolumeSpecAccessModeAvailability' Lens +clusterVolumeSpecAccessModeAvailabilityL :: Lens_' ClusterVolumeSpecAccessMode (Maybe E'Availability) +clusterVolumeSpecAccessModeAvailabilityL f ClusterVolumeSpecAccessMode{..} = (\clusterVolumeSpecAccessModeAvailability -> ClusterVolumeSpecAccessMode { clusterVolumeSpecAccessModeAvailability, ..} ) <$> f clusterVolumeSpecAccessModeAvailability +{-# INLINE clusterVolumeSpecAccessModeAvailabilityL #-} + + + +-- * ClusterVolumeSpecAccessModeAccessibilityRequirements + +-- | 'clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite' Lens +clusterVolumeSpecAccessModeAccessibilityRequirementsRequisiteL :: Lens_' ClusterVolumeSpecAccessModeAccessibilityRequirements (Maybe [Map]) +clusterVolumeSpecAccessModeAccessibilityRequirementsRequisiteL f ClusterVolumeSpecAccessModeAccessibilityRequirements{..} = (\clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite -> ClusterVolumeSpecAccessModeAccessibilityRequirements { clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite, ..} ) <$> f clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite +{-# INLINE clusterVolumeSpecAccessModeAccessibilityRequirementsRequisiteL #-} + +-- | 'clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred' Lens +clusterVolumeSpecAccessModeAccessibilityRequirementsPreferredL :: Lens_' ClusterVolumeSpecAccessModeAccessibilityRequirements (Maybe [Map]) +clusterVolumeSpecAccessModeAccessibilityRequirementsPreferredL f ClusterVolumeSpecAccessModeAccessibilityRequirements{..} = (\clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred -> ClusterVolumeSpecAccessModeAccessibilityRequirements { clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred, ..} ) <$> f clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred +{-# INLINE clusterVolumeSpecAccessModeAccessibilityRequirementsPreferredL #-} + + + +-- * ClusterVolumeSpecAccessModeCapacityRange + +-- | 'clusterVolumeSpecAccessModeCapacityRangeRequiredBytes' Lens +clusterVolumeSpecAccessModeCapacityRangeRequiredBytesL :: Lens_' ClusterVolumeSpecAccessModeCapacityRange (Maybe Integer) +clusterVolumeSpecAccessModeCapacityRangeRequiredBytesL f ClusterVolumeSpecAccessModeCapacityRange{..} = (\clusterVolumeSpecAccessModeCapacityRangeRequiredBytes -> ClusterVolumeSpecAccessModeCapacityRange { clusterVolumeSpecAccessModeCapacityRangeRequiredBytes, ..} ) <$> f clusterVolumeSpecAccessModeCapacityRangeRequiredBytes +{-# INLINE clusterVolumeSpecAccessModeCapacityRangeRequiredBytesL #-} + +-- | 'clusterVolumeSpecAccessModeCapacityRangeLimitBytes' Lens +clusterVolumeSpecAccessModeCapacityRangeLimitBytesL :: Lens_' ClusterVolumeSpecAccessModeCapacityRange (Maybe Integer) +clusterVolumeSpecAccessModeCapacityRangeLimitBytesL f ClusterVolumeSpecAccessModeCapacityRange{..} = (\clusterVolumeSpecAccessModeCapacityRangeLimitBytes -> ClusterVolumeSpecAccessModeCapacityRange { clusterVolumeSpecAccessModeCapacityRangeLimitBytes, ..} ) <$> f clusterVolumeSpecAccessModeCapacityRangeLimitBytes +{-# INLINE clusterVolumeSpecAccessModeCapacityRangeLimitBytesL #-} + + + +-- * ClusterVolumeSpecAccessModeSecretsInner + +-- | 'clusterVolumeSpecAccessModeSecretsInnerKey' Lens +clusterVolumeSpecAccessModeSecretsInnerKeyL :: Lens_' ClusterVolumeSpecAccessModeSecretsInner (Maybe Text) +clusterVolumeSpecAccessModeSecretsInnerKeyL f ClusterVolumeSpecAccessModeSecretsInner{..} = (\clusterVolumeSpecAccessModeSecretsInnerKey -> ClusterVolumeSpecAccessModeSecretsInner { clusterVolumeSpecAccessModeSecretsInnerKey, ..} ) <$> f clusterVolumeSpecAccessModeSecretsInnerKey +{-# INLINE clusterVolumeSpecAccessModeSecretsInnerKeyL #-} + +-- | 'clusterVolumeSpecAccessModeSecretsInnerSecret' Lens +clusterVolumeSpecAccessModeSecretsInnerSecretL :: Lens_' ClusterVolumeSpecAccessModeSecretsInner (Maybe Text) +clusterVolumeSpecAccessModeSecretsInnerSecretL f ClusterVolumeSpecAccessModeSecretsInner{..} = (\clusterVolumeSpecAccessModeSecretsInnerSecret -> ClusterVolumeSpecAccessModeSecretsInner { clusterVolumeSpecAccessModeSecretsInnerSecret, ..} ) <$> f clusterVolumeSpecAccessModeSecretsInnerSecret +{-# INLINE clusterVolumeSpecAccessModeSecretsInnerSecretL #-} + + + +-- * Commit + +-- | 'commitId' Lens +commitIdL :: Lens_' Commit (Maybe Text) +commitIdL f Commit{..} = (\commitId -> Commit { commitId, ..} ) <$> f commitId +{-# INLINE commitIdL #-} + +-- | 'commitExpected' Lens +commitExpectedL :: Lens_' Commit (Maybe Text) +commitExpectedL f Commit{..} = (\commitExpected -> Commit { commitExpected, ..} ) <$> f commitExpected +{-# INLINE commitExpectedL #-} + + + +-- * Config + +-- | 'configId' Lens +configIdL :: Lens_' Config (Maybe Text) +configIdL f Config{..} = (\configId -> Config { configId, ..} ) <$> f configId +{-# INLINE configIdL #-} + +-- | 'configVersion' Lens +configVersionL :: Lens_' Config (Maybe ObjectVersion) +configVersionL f Config{..} = (\configVersion -> Config { configVersion, ..} ) <$> f configVersion +{-# INLINE configVersionL #-} + +-- | 'configCreatedAt' Lens +configCreatedAtL :: Lens_' Config (Maybe Text) +configCreatedAtL f Config{..} = (\configCreatedAt -> Config { configCreatedAt, ..} ) <$> f configCreatedAt +{-# INLINE configCreatedAtL #-} + +-- | 'configUpdatedAt' Lens +configUpdatedAtL :: Lens_' Config (Maybe Text) +configUpdatedAtL f Config{..} = (\configUpdatedAt -> Config { configUpdatedAt, ..} ) <$> f configUpdatedAt +{-# INLINE configUpdatedAtL #-} + +-- | 'configSpec' Lens +configSpecL :: Lens_' Config (Maybe ConfigSpec) +configSpecL f Config{..} = (\configSpec -> Config { configSpec, ..} ) <$> f configSpec +{-# INLINE configSpecL #-} + + + +-- * ConfigCreateRequest + +-- | 'configCreateRequestName' Lens +configCreateRequestNameL :: Lens_' ConfigCreateRequest (Maybe Text) +configCreateRequestNameL f ConfigCreateRequest{..} = (\configCreateRequestName -> ConfigCreateRequest { configCreateRequestName, ..} ) <$> f configCreateRequestName +{-# INLINE configCreateRequestNameL #-} + +-- | 'configCreateRequestLabels' Lens +configCreateRequestLabelsL :: Lens_' ConfigCreateRequest (Maybe (Map.Map String Text)) +configCreateRequestLabelsL f ConfigCreateRequest{..} = (\configCreateRequestLabels -> ConfigCreateRequest { configCreateRequestLabels, ..} ) <$> f configCreateRequestLabels +{-# INLINE configCreateRequestLabelsL #-} + +-- | 'configCreateRequestData' Lens +configCreateRequestDataL :: Lens_' ConfigCreateRequest (Maybe Text) +configCreateRequestDataL f ConfigCreateRequest{..} = (\configCreateRequestData -> ConfigCreateRequest { configCreateRequestData, ..} ) <$> f configCreateRequestData +{-# INLINE configCreateRequestDataL #-} + +-- | 'configCreateRequestTemplating' Lens +configCreateRequestTemplatingL :: Lens_' ConfigCreateRequest (Maybe Driver) +configCreateRequestTemplatingL f ConfigCreateRequest{..} = (\configCreateRequestTemplating -> ConfigCreateRequest { configCreateRequestTemplating, ..} ) <$> f configCreateRequestTemplating +{-# INLINE configCreateRequestTemplatingL #-} + + + +-- * ConfigReference + +-- | 'configReferenceNetwork' Lens +configReferenceNetworkL :: Lens_' ConfigReference (Maybe Text) +configReferenceNetworkL f ConfigReference{..} = (\configReferenceNetwork -> ConfigReference { configReferenceNetwork, ..} ) <$> f configReferenceNetwork +{-# INLINE configReferenceNetworkL #-} + + + +-- * ConfigSpec + +-- | 'configSpecName' Lens +configSpecNameL :: Lens_' ConfigSpec (Maybe Text) +configSpecNameL f ConfigSpec{..} = (\configSpecName -> ConfigSpec { configSpecName, ..} ) <$> f configSpecName +{-# INLINE configSpecNameL #-} + +-- | 'configSpecLabels' Lens +configSpecLabelsL :: Lens_' ConfigSpec (Maybe (Map.Map String Text)) +configSpecLabelsL f ConfigSpec{..} = (\configSpecLabels -> ConfigSpec { configSpecLabels, ..} ) <$> f configSpecLabels +{-# INLINE configSpecLabelsL #-} + +-- | 'configSpecData' Lens +configSpecDataL :: Lens_' ConfigSpec (Maybe Text) +configSpecDataL f ConfigSpec{..} = (\configSpecData -> ConfigSpec { configSpecData, ..} ) <$> f configSpecData +{-# INLINE configSpecDataL #-} + +-- | 'configSpecTemplating' Lens +configSpecTemplatingL :: Lens_' ConfigSpec (Maybe Driver) +configSpecTemplatingL f ConfigSpec{..} = (\configSpecTemplating -> ConfigSpec { configSpecTemplating, ..} ) <$> f configSpecTemplating +{-# INLINE configSpecTemplatingL #-} + + + +-- * ContainerConfig + +-- | 'containerConfigHostname' Lens +containerConfigHostnameL :: Lens_' ContainerConfig (Maybe Text) +containerConfigHostnameL f ContainerConfig{..} = (\containerConfigHostname -> ContainerConfig { containerConfigHostname, ..} ) <$> f containerConfigHostname +{-# INLINE containerConfigHostnameL #-} + +-- | 'containerConfigDomainname' Lens +containerConfigDomainnameL :: Lens_' ContainerConfig (Maybe Text) +containerConfigDomainnameL f ContainerConfig{..} = (\containerConfigDomainname -> ContainerConfig { containerConfigDomainname, ..} ) <$> f containerConfigDomainname +{-# INLINE containerConfigDomainnameL #-} + +-- | 'containerConfigUser' Lens +containerConfigUserL :: Lens_' ContainerConfig (Maybe Text) +containerConfigUserL f ContainerConfig{..} = (\containerConfigUser -> ContainerConfig { containerConfigUser, ..} ) <$> f containerConfigUser +{-# INLINE containerConfigUserL #-} + +-- | 'containerConfigAttachStdin' Lens +containerConfigAttachStdinL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigAttachStdinL f ContainerConfig{..} = (\containerConfigAttachStdin -> ContainerConfig { containerConfigAttachStdin, ..} ) <$> f containerConfigAttachStdin +{-# INLINE containerConfigAttachStdinL #-} + +-- | 'containerConfigAttachStdout' Lens +containerConfigAttachStdoutL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigAttachStdoutL f ContainerConfig{..} = (\containerConfigAttachStdout -> ContainerConfig { containerConfigAttachStdout, ..} ) <$> f containerConfigAttachStdout +{-# INLINE containerConfigAttachStdoutL #-} + +-- | 'containerConfigAttachStderr' Lens +containerConfigAttachStderrL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigAttachStderrL f ContainerConfig{..} = (\containerConfigAttachStderr -> ContainerConfig { containerConfigAttachStderr, ..} ) <$> f containerConfigAttachStderr +{-# INLINE containerConfigAttachStderrL #-} + +-- | 'containerConfigExposedPorts' Lens +containerConfigExposedPortsL :: Lens_' ContainerConfig (Maybe (Map.Map String A.Value)) +containerConfigExposedPortsL f ContainerConfig{..} = (\containerConfigExposedPorts -> ContainerConfig { containerConfigExposedPorts, ..} ) <$> f containerConfigExposedPorts +{-# INLINE containerConfigExposedPortsL #-} + +-- | 'containerConfigTty' Lens +containerConfigTtyL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigTtyL f ContainerConfig{..} = (\containerConfigTty -> ContainerConfig { containerConfigTty, ..} ) <$> f containerConfigTty +{-# INLINE containerConfigTtyL #-} + +-- | 'containerConfigOpenStdin' Lens +containerConfigOpenStdinL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigOpenStdinL f ContainerConfig{..} = (\containerConfigOpenStdin -> ContainerConfig { containerConfigOpenStdin, ..} ) <$> f containerConfigOpenStdin +{-# INLINE containerConfigOpenStdinL #-} + +-- | 'containerConfigStdinOnce' Lens +containerConfigStdinOnceL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigStdinOnceL f ContainerConfig{..} = (\containerConfigStdinOnce -> ContainerConfig { containerConfigStdinOnce, ..} ) <$> f containerConfigStdinOnce +{-# INLINE containerConfigStdinOnceL #-} + +-- | 'containerConfigEnv' Lens +containerConfigEnvL :: Lens_' ContainerConfig (Maybe [Text]) +containerConfigEnvL f ContainerConfig{..} = (\containerConfigEnv -> ContainerConfig { containerConfigEnv, ..} ) <$> f containerConfigEnv +{-# INLINE containerConfigEnvL #-} + +-- | 'containerConfigCmd' Lens +containerConfigCmdL :: Lens_' ContainerConfig (Maybe [Text]) +containerConfigCmdL f ContainerConfig{..} = (\containerConfigCmd -> ContainerConfig { containerConfigCmd, ..} ) <$> f containerConfigCmd +{-# INLINE containerConfigCmdL #-} + +-- | 'containerConfigHealthcheck' Lens +containerConfigHealthcheckL :: Lens_' ContainerConfig (Maybe HealthConfig) +containerConfigHealthcheckL f ContainerConfig{..} = (\containerConfigHealthcheck -> ContainerConfig { containerConfigHealthcheck, ..} ) <$> f containerConfigHealthcheck +{-# INLINE containerConfigHealthcheckL #-} + +-- | 'containerConfigArgsEscaped' Lens +containerConfigArgsEscapedL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigArgsEscapedL f ContainerConfig{..} = (\containerConfigArgsEscaped -> ContainerConfig { containerConfigArgsEscaped, ..} ) <$> f containerConfigArgsEscaped +{-# INLINE containerConfigArgsEscapedL #-} + +-- | 'containerConfigImage' Lens +containerConfigImageL :: Lens_' ContainerConfig (Maybe Text) +containerConfigImageL f ContainerConfig{..} = (\containerConfigImage -> ContainerConfig { containerConfigImage, ..} ) <$> f containerConfigImage +{-# INLINE containerConfigImageL #-} + +-- | 'containerConfigVolumes' Lens +containerConfigVolumesL :: Lens_' ContainerConfig (Maybe (Map.Map String A.Value)) +containerConfigVolumesL f ContainerConfig{..} = (\containerConfigVolumes -> ContainerConfig { containerConfigVolumes, ..} ) <$> f containerConfigVolumes +{-# INLINE containerConfigVolumesL #-} + +-- | 'containerConfigWorkingDir' Lens +containerConfigWorkingDirL :: Lens_' ContainerConfig (Maybe Text) +containerConfigWorkingDirL f ContainerConfig{..} = (\containerConfigWorkingDir -> ContainerConfig { containerConfigWorkingDir, ..} ) <$> f containerConfigWorkingDir +{-# INLINE containerConfigWorkingDirL #-} + +-- | 'containerConfigEntrypoint' Lens +containerConfigEntrypointL :: Lens_' ContainerConfig (Maybe [Text]) +containerConfigEntrypointL f ContainerConfig{..} = (\containerConfigEntrypoint -> ContainerConfig { containerConfigEntrypoint, ..} ) <$> f containerConfigEntrypoint +{-# INLINE containerConfigEntrypointL #-} + +-- | 'containerConfigNetworkDisabled' Lens +containerConfigNetworkDisabledL :: Lens_' ContainerConfig (Maybe Bool) +containerConfigNetworkDisabledL f ContainerConfig{..} = (\containerConfigNetworkDisabled -> ContainerConfig { containerConfigNetworkDisabled, ..} ) <$> f containerConfigNetworkDisabled +{-# INLINE containerConfigNetworkDisabledL #-} + +-- | 'containerConfigMacAddress' Lens +containerConfigMacAddressL :: Lens_' ContainerConfig (Maybe Text) +containerConfigMacAddressL f ContainerConfig{..} = (\containerConfigMacAddress -> ContainerConfig { containerConfigMacAddress, ..} ) <$> f containerConfigMacAddress +{-# INLINE containerConfigMacAddressL #-} + +-- | 'containerConfigOnBuild' Lens +containerConfigOnBuildL :: Lens_' ContainerConfig (Maybe [Text]) +containerConfigOnBuildL f ContainerConfig{..} = (\containerConfigOnBuild -> ContainerConfig { containerConfigOnBuild, ..} ) <$> f containerConfigOnBuild +{-# INLINE containerConfigOnBuildL #-} + +-- | 'containerConfigLabels' Lens +containerConfigLabelsL :: Lens_' ContainerConfig (Maybe (Map.Map String Text)) +containerConfigLabelsL f ContainerConfig{..} = (\containerConfigLabels -> ContainerConfig { containerConfigLabels, ..} ) <$> f containerConfigLabels +{-# INLINE containerConfigLabelsL #-} + +-- | 'containerConfigStopSignal' Lens +containerConfigStopSignalL :: Lens_' ContainerConfig (Maybe Text) +containerConfigStopSignalL f ContainerConfig{..} = (\containerConfigStopSignal -> ContainerConfig { containerConfigStopSignal, ..} ) <$> f containerConfigStopSignal +{-# INLINE containerConfigStopSignalL #-} + +-- | 'containerConfigStopTimeout' Lens +containerConfigStopTimeoutL :: Lens_' ContainerConfig (Maybe Int) +containerConfigStopTimeoutL f ContainerConfig{..} = (\containerConfigStopTimeout -> ContainerConfig { containerConfigStopTimeout, ..} ) <$> f containerConfigStopTimeout +{-# INLINE containerConfigStopTimeoutL #-} + +-- | 'containerConfigShell' Lens +containerConfigShellL :: Lens_' ContainerConfig (Maybe [Text]) +containerConfigShellL f ContainerConfig{..} = (\containerConfigShell -> ContainerConfig { containerConfigShell, ..} ) <$> f containerConfigShell +{-# INLINE containerConfigShellL #-} + + + +-- * ContainerCreateRequest + +-- | 'containerCreateRequestHostname' Lens +containerCreateRequestHostnameL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestHostnameL f ContainerCreateRequest{..} = (\containerCreateRequestHostname -> ContainerCreateRequest { containerCreateRequestHostname, ..} ) <$> f containerCreateRequestHostname +{-# INLINE containerCreateRequestHostnameL #-} + +-- | 'containerCreateRequestDomainname' Lens +containerCreateRequestDomainnameL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestDomainnameL f ContainerCreateRequest{..} = (\containerCreateRequestDomainname -> ContainerCreateRequest { containerCreateRequestDomainname, ..} ) <$> f containerCreateRequestDomainname +{-# INLINE containerCreateRequestDomainnameL #-} + +-- | 'containerCreateRequestUser' Lens +containerCreateRequestUserL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestUserL f ContainerCreateRequest{..} = (\containerCreateRequestUser -> ContainerCreateRequest { containerCreateRequestUser, ..} ) <$> f containerCreateRequestUser +{-# INLINE containerCreateRequestUserL #-} + +-- | 'containerCreateRequestAttachStdin' Lens +containerCreateRequestAttachStdinL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestAttachStdinL f ContainerCreateRequest{..} = (\containerCreateRequestAttachStdin -> ContainerCreateRequest { containerCreateRequestAttachStdin, ..} ) <$> f containerCreateRequestAttachStdin +{-# INLINE containerCreateRequestAttachStdinL #-} + +-- | 'containerCreateRequestAttachStdout' Lens +containerCreateRequestAttachStdoutL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestAttachStdoutL f ContainerCreateRequest{..} = (\containerCreateRequestAttachStdout -> ContainerCreateRequest { containerCreateRequestAttachStdout, ..} ) <$> f containerCreateRequestAttachStdout +{-# INLINE containerCreateRequestAttachStdoutL #-} + +-- | 'containerCreateRequestAttachStderr' Lens +containerCreateRequestAttachStderrL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestAttachStderrL f ContainerCreateRequest{..} = (\containerCreateRequestAttachStderr -> ContainerCreateRequest { containerCreateRequestAttachStderr, ..} ) <$> f containerCreateRequestAttachStderr +{-# INLINE containerCreateRequestAttachStderrL #-} + +-- | 'containerCreateRequestExposedPorts' Lens +containerCreateRequestExposedPortsL :: Lens_' ContainerCreateRequest (Maybe (Map.Map String A.Value)) +containerCreateRequestExposedPortsL f ContainerCreateRequest{..} = (\containerCreateRequestExposedPorts -> ContainerCreateRequest { containerCreateRequestExposedPorts, ..} ) <$> f containerCreateRequestExposedPorts +{-# INLINE containerCreateRequestExposedPortsL #-} + +-- | 'containerCreateRequestTty' Lens +containerCreateRequestTtyL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestTtyL f ContainerCreateRequest{..} = (\containerCreateRequestTty -> ContainerCreateRequest { containerCreateRequestTty, ..} ) <$> f containerCreateRequestTty +{-# INLINE containerCreateRequestTtyL #-} + +-- | 'containerCreateRequestOpenStdin' Lens +containerCreateRequestOpenStdinL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestOpenStdinL f ContainerCreateRequest{..} = (\containerCreateRequestOpenStdin -> ContainerCreateRequest { containerCreateRequestOpenStdin, ..} ) <$> f containerCreateRequestOpenStdin +{-# INLINE containerCreateRequestOpenStdinL #-} + +-- | 'containerCreateRequestStdinOnce' Lens +containerCreateRequestStdinOnceL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestStdinOnceL f ContainerCreateRequest{..} = (\containerCreateRequestStdinOnce -> ContainerCreateRequest { containerCreateRequestStdinOnce, ..} ) <$> f containerCreateRequestStdinOnce +{-# INLINE containerCreateRequestStdinOnceL #-} + +-- | 'containerCreateRequestEnv' Lens +containerCreateRequestEnvL :: Lens_' ContainerCreateRequest (Maybe [Text]) +containerCreateRequestEnvL f ContainerCreateRequest{..} = (\containerCreateRequestEnv -> ContainerCreateRequest { containerCreateRequestEnv, ..} ) <$> f containerCreateRequestEnv +{-# INLINE containerCreateRequestEnvL #-} + +-- | 'containerCreateRequestCmd' Lens +containerCreateRequestCmdL :: Lens_' ContainerCreateRequest (Maybe [Text]) +containerCreateRequestCmdL f ContainerCreateRequest{..} = (\containerCreateRequestCmd -> ContainerCreateRequest { containerCreateRequestCmd, ..} ) <$> f containerCreateRequestCmd +{-# INLINE containerCreateRequestCmdL #-} + +-- | 'containerCreateRequestHealthcheck' Lens +containerCreateRequestHealthcheckL :: Lens_' ContainerCreateRequest (Maybe HealthConfig) +containerCreateRequestHealthcheckL f ContainerCreateRequest{..} = (\containerCreateRequestHealthcheck -> ContainerCreateRequest { containerCreateRequestHealthcheck, ..} ) <$> f containerCreateRequestHealthcheck +{-# INLINE containerCreateRequestHealthcheckL #-} + +-- | 'containerCreateRequestArgsEscaped' Lens +containerCreateRequestArgsEscapedL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestArgsEscapedL f ContainerCreateRequest{..} = (\containerCreateRequestArgsEscaped -> ContainerCreateRequest { containerCreateRequestArgsEscaped, ..} ) <$> f containerCreateRequestArgsEscaped +{-# INLINE containerCreateRequestArgsEscapedL #-} + +-- | 'containerCreateRequestImage' Lens +containerCreateRequestImageL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestImageL f ContainerCreateRequest{..} = (\containerCreateRequestImage -> ContainerCreateRequest { containerCreateRequestImage, ..} ) <$> f containerCreateRequestImage +{-# INLINE containerCreateRequestImageL #-} + +-- | 'containerCreateRequestVolumes' Lens +containerCreateRequestVolumesL :: Lens_' ContainerCreateRequest (Maybe (Map.Map String A.Value)) +containerCreateRequestVolumesL f ContainerCreateRequest{..} = (\containerCreateRequestVolumes -> ContainerCreateRequest { containerCreateRequestVolumes, ..} ) <$> f containerCreateRequestVolumes +{-# INLINE containerCreateRequestVolumesL #-} + +-- | 'containerCreateRequestWorkingDir' Lens +containerCreateRequestWorkingDirL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestWorkingDirL f ContainerCreateRequest{..} = (\containerCreateRequestWorkingDir -> ContainerCreateRequest { containerCreateRequestWorkingDir, ..} ) <$> f containerCreateRequestWorkingDir +{-# INLINE containerCreateRequestWorkingDirL #-} + +-- | 'containerCreateRequestEntrypoint' Lens +containerCreateRequestEntrypointL :: Lens_' ContainerCreateRequest (Maybe [Text]) +containerCreateRequestEntrypointL f ContainerCreateRequest{..} = (\containerCreateRequestEntrypoint -> ContainerCreateRequest { containerCreateRequestEntrypoint, ..} ) <$> f containerCreateRequestEntrypoint +{-# INLINE containerCreateRequestEntrypointL #-} + +-- | 'containerCreateRequestNetworkDisabled' Lens +containerCreateRequestNetworkDisabledL :: Lens_' ContainerCreateRequest (Maybe Bool) +containerCreateRequestNetworkDisabledL f ContainerCreateRequest{..} = (\containerCreateRequestNetworkDisabled -> ContainerCreateRequest { containerCreateRequestNetworkDisabled, ..} ) <$> f containerCreateRequestNetworkDisabled +{-# INLINE containerCreateRequestNetworkDisabledL #-} + +-- | 'containerCreateRequestMacAddress' Lens +containerCreateRequestMacAddressL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestMacAddressL f ContainerCreateRequest{..} = (\containerCreateRequestMacAddress -> ContainerCreateRequest { containerCreateRequestMacAddress, ..} ) <$> f containerCreateRequestMacAddress +{-# INLINE containerCreateRequestMacAddressL #-} + +-- | 'containerCreateRequestOnBuild' Lens +containerCreateRequestOnBuildL :: Lens_' ContainerCreateRequest (Maybe [Text]) +containerCreateRequestOnBuildL f ContainerCreateRequest{..} = (\containerCreateRequestOnBuild -> ContainerCreateRequest { containerCreateRequestOnBuild, ..} ) <$> f containerCreateRequestOnBuild +{-# INLINE containerCreateRequestOnBuildL #-} + +-- | 'containerCreateRequestLabels' Lens +containerCreateRequestLabelsL :: Lens_' ContainerCreateRequest (Maybe (Map.Map String Text)) +containerCreateRequestLabelsL f ContainerCreateRequest{..} = (\containerCreateRequestLabels -> ContainerCreateRequest { containerCreateRequestLabels, ..} ) <$> f containerCreateRequestLabels +{-# INLINE containerCreateRequestLabelsL #-} + +-- | 'containerCreateRequestStopSignal' Lens +containerCreateRequestStopSignalL :: Lens_' ContainerCreateRequest (Maybe Text) +containerCreateRequestStopSignalL f ContainerCreateRequest{..} = (\containerCreateRequestStopSignal -> ContainerCreateRequest { containerCreateRequestStopSignal, ..} ) <$> f containerCreateRequestStopSignal +{-# INLINE containerCreateRequestStopSignalL #-} + +-- | 'containerCreateRequestStopTimeout' Lens +containerCreateRequestStopTimeoutL :: Lens_' ContainerCreateRequest (Maybe Int) +containerCreateRequestStopTimeoutL f ContainerCreateRequest{..} = (\containerCreateRequestStopTimeout -> ContainerCreateRequest { containerCreateRequestStopTimeout, ..} ) <$> f containerCreateRequestStopTimeout +{-# INLINE containerCreateRequestStopTimeoutL #-} + +-- | 'containerCreateRequestShell' Lens +containerCreateRequestShellL :: Lens_' ContainerCreateRequest (Maybe [Text]) +containerCreateRequestShellL f ContainerCreateRequest{..} = (\containerCreateRequestShell -> ContainerCreateRequest { containerCreateRequestShell, ..} ) <$> f containerCreateRequestShell +{-# INLINE containerCreateRequestShellL #-} + +-- | 'containerCreateRequestHostConfig' Lens +containerCreateRequestHostConfigL :: Lens_' ContainerCreateRequest (Maybe HostConfig) +containerCreateRequestHostConfigL f ContainerCreateRequest{..} = (\containerCreateRequestHostConfig -> ContainerCreateRequest { containerCreateRequestHostConfig, ..} ) <$> f containerCreateRequestHostConfig +{-# INLINE containerCreateRequestHostConfigL #-} + +-- | 'containerCreateRequestNetworkingConfig' Lens +containerCreateRequestNetworkingConfigL :: Lens_' ContainerCreateRequest (Maybe NetworkingConfig) +containerCreateRequestNetworkingConfigL f ContainerCreateRequest{..} = (\containerCreateRequestNetworkingConfig -> ContainerCreateRequest { containerCreateRequestNetworkingConfig, ..} ) <$> f containerCreateRequestNetworkingConfig +{-# INLINE containerCreateRequestNetworkingConfigL #-} + + + +-- * ContainerCreateResponse + +-- | 'containerCreateResponseId' Lens +containerCreateResponseIdL :: Lens_' ContainerCreateResponse (Text) +containerCreateResponseIdL f ContainerCreateResponse{..} = (\containerCreateResponseId -> ContainerCreateResponse { containerCreateResponseId, ..} ) <$> f containerCreateResponseId +{-# INLINE containerCreateResponseIdL #-} + +-- | 'containerCreateResponseWarnings' Lens +containerCreateResponseWarningsL :: Lens_' ContainerCreateResponse ([Text]) +containerCreateResponseWarningsL f ContainerCreateResponse{..} = (\containerCreateResponseWarnings -> ContainerCreateResponse { containerCreateResponseWarnings, ..} ) <$> f containerCreateResponseWarnings +{-# INLINE containerCreateResponseWarningsL #-} + + + +-- * ContainerInspectResponse + +-- | 'containerInspectResponseId' Lens +containerInspectResponseIdL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseIdL f ContainerInspectResponse{..} = (\containerInspectResponseId -> ContainerInspectResponse { containerInspectResponseId, ..} ) <$> f containerInspectResponseId +{-# INLINE containerInspectResponseIdL #-} + +-- | 'containerInspectResponseCreated' Lens +containerInspectResponseCreatedL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseCreatedL f ContainerInspectResponse{..} = (\containerInspectResponseCreated -> ContainerInspectResponse { containerInspectResponseCreated, ..} ) <$> f containerInspectResponseCreated +{-# INLINE containerInspectResponseCreatedL #-} + +-- | 'containerInspectResponsePath' Lens +containerInspectResponsePathL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponsePathL f ContainerInspectResponse{..} = (\containerInspectResponsePath -> ContainerInspectResponse { containerInspectResponsePath, ..} ) <$> f containerInspectResponsePath +{-# INLINE containerInspectResponsePathL #-} + +-- | 'containerInspectResponseArgs' Lens +containerInspectResponseArgsL :: Lens_' ContainerInspectResponse (Maybe [Text]) +containerInspectResponseArgsL f ContainerInspectResponse{..} = (\containerInspectResponseArgs -> ContainerInspectResponse { containerInspectResponseArgs, ..} ) <$> f containerInspectResponseArgs +{-# INLINE containerInspectResponseArgsL #-} + +-- | 'containerInspectResponseState' Lens +containerInspectResponseStateL :: Lens_' ContainerInspectResponse (Maybe ContainerState) +containerInspectResponseStateL f ContainerInspectResponse{..} = (\containerInspectResponseState -> ContainerInspectResponse { containerInspectResponseState, ..} ) <$> f containerInspectResponseState +{-# INLINE containerInspectResponseStateL #-} + +-- | 'containerInspectResponseImage' Lens +containerInspectResponseImageL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseImageL f ContainerInspectResponse{..} = (\containerInspectResponseImage -> ContainerInspectResponse { containerInspectResponseImage, ..} ) <$> f containerInspectResponseImage +{-# INLINE containerInspectResponseImageL #-} + +-- | 'containerInspectResponseResolvConfPath' Lens +containerInspectResponseResolvConfPathL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseResolvConfPathL f ContainerInspectResponse{..} = (\containerInspectResponseResolvConfPath -> ContainerInspectResponse { containerInspectResponseResolvConfPath, ..} ) <$> f containerInspectResponseResolvConfPath +{-# INLINE containerInspectResponseResolvConfPathL #-} + +-- | 'containerInspectResponseHostnamePath' Lens +containerInspectResponseHostnamePathL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseHostnamePathL f ContainerInspectResponse{..} = (\containerInspectResponseHostnamePath -> ContainerInspectResponse { containerInspectResponseHostnamePath, ..} ) <$> f containerInspectResponseHostnamePath +{-# INLINE containerInspectResponseHostnamePathL #-} + +-- | 'containerInspectResponseHostsPath' Lens +containerInspectResponseHostsPathL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseHostsPathL f ContainerInspectResponse{..} = (\containerInspectResponseHostsPath -> ContainerInspectResponse { containerInspectResponseHostsPath, ..} ) <$> f containerInspectResponseHostsPath +{-# INLINE containerInspectResponseHostsPathL #-} + +-- | 'containerInspectResponseLogPath' Lens +containerInspectResponseLogPathL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseLogPathL f ContainerInspectResponse{..} = (\containerInspectResponseLogPath -> ContainerInspectResponse { containerInspectResponseLogPath, ..} ) <$> f containerInspectResponseLogPath +{-# INLINE containerInspectResponseLogPathL #-} + +-- | 'containerInspectResponseName' Lens +containerInspectResponseNameL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseNameL f ContainerInspectResponse{..} = (\containerInspectResponseName -> ContainerInspectResponse { containerInspectResponseName, ..} ) <$> f containerInspectResponseName +{-# INLINE containerInspectResponseNameL #-} + +-- | 'containerInspectResponseRestartCount' Lens +containerInspectResponseRestartCountL :: Lens_' ContainerInspectResponse (Maybe Int) +containerInspectResponseRestartCountL f ContainerInspectResponse{..} = (\containerInspectResponseRestartCount -> ContainerInspectResponse { containerInspectResponseRestartCount, ..} ) <$> f containerInspectResponseRestartCount +{-# INLINE containerInspectResponseRestartCountL #-} + +-- | 'containerInspectResponseDriver' Lens +containerInspectResponseDriverL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseDriverL f ContainerInspectResponse{..} = (\containerInspectResponseDriver -> ContainerInspectResponse { containerInspectResponseDriver, ..} ) <$> f containerInspectResponseDriver +{-# INLINE containerInspectResponseDriverL #-} + +-- | 'containerInspectResponsePlatform' Lens +containerInspectResponsePlatformL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponsePlatformL f ContainerInspectResponse{..} = (\containerInspectResponsePlatform -> ContainerInspectResponse { containerInspectResponsePlatform, ..} ) <$> f containerInspectResponsePlatform +{-# INLINE containerInspectResponsePlatformL #-} + +-- | 'containerInspectResponseMountLabel' Lens +containerInspectResponseMountLabelL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseMountLabelL f ContainerInspectResponse{..} = (\containerInspectResponseMountLabel -> ContainerInspectResponse { containerInspectResponseMountLabel, ..} ) <$> f containerInspectResponseMountLabel +{-# INLINE containerInspectResponseMountLabelL #-} + +-- | 'containerInspectResponseProcessLabel' Lens +containerInspectResponseProcessLabelL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseProcessLabelL f ContainerInspectResponse{..} = (\containerInspectResponseProcessLabel -> ContainerInspectResponse { containerInspectResponseProcessLabel, ..} ) <$> f containerInspectResponseProcessLabel +{-# INLINE containerInspectResponseProcessLabelL #-} + +-- | 'containerInspectResponseAppArmorProfile' Lens +containerInspectResponseAppArmorProfileL :: Lens_' ContainerInspectResponse (Maybe Text) +containerInspectResponseAppArmorProfileL f ContainerInspectResponse{..} = (\containerInspectResponseAppArmorProfile -> ContainerInspectResponse { containerInspectResponseAppArmorProfile, ..} ) <$> f containerInspectResponseAppArmorProfile +{-# INLINE containerInspectResponseAppArmorProfileL #-} + +-- | 'containerInspectResponseExecIds' Lens +containerInspectResponseExecIdsL :: Lens_' ContainerInspectResponse (Maybe [Text]) +containerInspectResponseExecIdsL f ContainerInspectResponse{..} = (\containerInspectResponseExecIds -> ContainerInspectResponse { containerInspectResponseExecIds, ..} ) <$> f containerInspectResponseExecIds +{-# INLINE containerInspectResponseExecIdsL #-} + +-- | 'containerInspectResponseHostConfig' Lens +containerInspectResponseHostConfigL :: Lens_' ContainerInspectResponse (Maybe HostConfig) +containerInspectResponseHostConfigL f ContainerInspectResponse{..} = (\containerInspectResponseHostConfig -> ContainerInspectResponse { containerInspectResponseHostConfig, ..} ) <$> f containerInspectResponseHostConfig +{-# INLINE containerInspectResponseHostConfigL #-} + +-- | 'containerInspectResponseGraphDriver' Lens +containerInspectResponseGraphDriverL :: Lens_' ContainerInspectResponse (Maybe GraphDriverData) +containerInspectResponseGraphDriverL f ContainerInspectResponse{..} = (\containerInspectResponseGraphDriver -> ContainerInspectResponse { containerInspectResponseGraphDriver, ..} ) <$> f containerInspectResponseGraphDriver +{-# INLINE containerInspectResponseGraphDriverL #-} + +-- | 'containerInspectResponseSizeRw' Lens +containerInspectResponseSizeRwL :: Lens_' ContainerInspectResponse (Maybe Integer) +containerInspectResponseSizeRwL f ContainerInspectResponse{..} = (\containerInspectResponseSizeRw -> ContainerInspectResponse { containerInspectResponseSizeRw, ..} ) <$> f containerInspectResponseSizeRw +{-# INLINE containerInspectResponseSizeRwL #-} + +-- | 'containerInspectResponseSizeRootFs' Lens +containerInspectResponseSizeRootFsL :: Lens_' ContainerInspectResponse (Maybe Integer) +containerInspectResponseSizeRootFsL f ContainerInspectResponse{..} = (\containerInspectResponseSizeRootFs -> ContainerInspectResponse { containerInspectResponseSizeRootFs, ..} ) <$> f containerInspectResponseSizeRootFs +{-# INLINE containerInspectResponseSizeRootFsL #-} + +-- | 'containerInspectResponseMounts' Lens +containerInspectResponseMountsL :: Lens_' ContainerInspectResponse (Maybe [MountPoint]) +containerInspectResponseMountsL f ContainerInspectResponse{..} = (\containerInspectResponseMounts -> ContainerInspectResponse { containerInspectResponseMounts, ..} ) <$> f containerInspectResponseMounts +{-# INLINE containerInspectResponseMountsL #-} + +-- | 'containerInspectResponseConfig' Lens +containerInspectResponseConfigL :: Lens_' ContainerInspectResponse (Maybe ContainerConfig) +containerInspectResponseConfigL f ContainerInspectResponse{..} = (\containerInspectResponseConfig -> ContainerInspectResponse { containerInspectResponseConfig, ..} ) <$> f containerInspectResponseConfig +{-# INLINE containerInspectResponseConfigL #-} + +-- | 'containerInspectResponseNetworkSettings' Lens +containerInspectResponseNetworkSettingsL :: Lens_' ContainerInspectResponse (Maybe NetworkSettings) +containerInspectResponseNetworkSettingsL f ContainerInspectResponse{..} = (\containerInspectResponseNetworkSettings -> ContainerInspectResponse { containerInspectResponseNetworkSettings, ..} ) <$> f containerInspectResponseNetworkSettings +{-# INLINE containerInspectResponseNetworkSettingsL #-} + + + +-- * ContainerPruneResponse + +-- | 'containerPruneResponseContainersDeleted' Lens +containerPruneResponseContainersDeletedL :: Lens_' ContainerPruneResponse (Maybe [Text]) +containerPruneResponseContainersDeletedL f ContainerPruneResponse{..} = (\containerPruneResponseContainersDeleted -> ContainerPruneResponse { containerPruneResponseContainersDeleted, ..} ) <$> f containerPruneResponseContainersDeleted +{-# INLINE containerPruneResponseContainersDeletedL #-} + +-- | 'containerPruneResponseSpaceReclaimed' Lens +containerPruneResponseSpaceReclaimedL :: Lens_' ContainerPruneResponse (Maybe Integer) +containerPruneResponseSpaceReclaimedL f ContainerPruneResponse{..} = (\containerPruneResponseSpaceReclaimed -> ContainerPruneResponse { containerPruneResponseSpaceReclaimed, ..} ) <$> f containerPruneResponseSpaceReclaimed +{-# INLINE containerPruneResponseSpaceReclaimedL #-} + + + +-- * ContainerState + +-- | 'containerStateStatus' Lens +containerStateStatusL :: Lens_' ContainerState (Maybe E'Status2) +containerStateStatusL f ContainerState{..} = (\containerStateStatus -> ContainerState { containerStateStatus, ..} ) <$> f containerStateStatus +{-# INLINE containerStateStatusL #-} + +-- | 'containerStateRunning' Lens +containerStateRunningL :: Lens_' ContainerState (Maybe Bool) +containerStateRunningL f ContainerState{..} = (\containerStateRunning -> ContainerState { containerStateRunning, ..} ) <$> f containerStateRunning +{-# INLINE containerStateRunningL #-} + +-- | 'containerStatePaused' Lens +containerStatePausedL :: Lens_' ContainerState (Maybe Bool) +containerStatePausedL f ContainerState{..} = (\containerStatePaused -> ContainerState { containerStatePaused, ..} ) <$> f containerStatePaused +{-# INLINE containerStatePausedL #-} + +-- | 'containerStateRestarting' Lens +containerStateRestartingL :: Lens_' ContainerState (Maybe Bool) +containerStateRestartingL f ContainerState{..} = (\containerStateRestarting -> ContainerState { containerStateRestarting, ..} ) <$> f containerStateRestarting +{-# INLINE containerStateRestartingL #-} + +-- | 'containerStateOomKilled' Lens +containerStateOomKilledL :: Lens_' ContainerState (Maybe Bool) +containerStateOomKilledL f ContainerState{..} = (\containerStateOomKilled -> ContainerState { containerStateOomKilled, ..} ) <$> f containerStateOomKilled +{-# INLINE containerStateOomKilledL #-} + +-- | 'containerStateDead' Lens +containerStateDeadL :: Lens_' ContainerState (Maybe Bool) +containerStateDeadL f ContainerState{..} = (\containerStateDead -> ContainerState { containerStateDead, ..} ) <$> f containerStateDead +{-# INLINE containerStateDeadL #-} + +-- | 'containerStatePid' Lens +containerStatePidL :: Lens_' ContainerState (Maybe Int) +containerStatePidL f ContainerState{..} = (\containerStatePid -> ContainerState { containerStatePid, ..} ) <$> f containerStatePid +{-# INLINE containerStatePidL #-} + +-- | 'containerStateExitCode' Lens +containerStateExitCodeL :: Lens_' ContainerState (Maybe Int) +containerStateExitCodeL f ContainerState{..} = (\containerStateExitCode -> ContainerState { containerStateExitCode, ..} ) <$> f containerStateExitCode +{-# INLINE containerStateExitCodeL #-} + +-- | 'containerStateError' Lens +containerStateErrorL :: Lens_' ContainerState (Maybe Text) +containerStateErrorL f ContainerState{..} = (\containerStateError -> ContainerState { containerStateError, ..} ) <$> f containerStateError +{-# INLINE containerStateErrorL #-} + +-- | 'containerStateStartedAt' Lens +containerStateStartedAtL :: Lens_' ContainerState (Maybe Text) +containerStateStartedAtL f ContainerState{..} = (\containerStateStartedAt -> ContainerState { containerStateStartedAt, ..} ) <$> f containerStateStartedAt +{-# INLINE containerStateStartedAtL #-} + +-- | 'containerStateFinishedAt' Lens +containerStateFinishedAtL :: Lens_' ContainerState (Maybe Text) +containerStateFinishedAtL f ContainerState{..} = (\containerStateFinishedAt -> ContainerState { containerStateFinishedAt, ..} ) <$> f containerStateFinishedAt +{-# INLINE containerStateFinishedAtL #-} + +-- | 'containerStateHealth' Lens +containerStateHealthL :: Lens_' ContainerState (Maybe Health) +containerStateHealthL f ContainerState{..} = (\containerStateHealth -> ContainerState { containerStateHealth, ..} ) <$> f containerStateHealth +{-# INLINE containerStateHealthL #-} + + + +-- * ContainerStatus + +-- | 'containerStatusContainerId' Lens +containerStatusContainerIdL :: Lens_' ContainerStatus (Maybe Text) +containerStatusContainerIdL f ContainerStatus{..} = (\containerStatusContainerId -> ContainerStatus { containerStatusContainerId, ..} ) <$> f containerStatusContainerId +{-# INLINE containerStatusContainerIdL #-} + +-- | 'containerStatusPid' Lens +containerStatusPidL :: Lens_' ContainerStatus (Maybe Int) +containerStatusPidL f ContainerStatus{..} = (\containerStatusPid -> ContainerStatus { containerStatusPid, ..} ) <$> f containerStatusPid +{-# INLINE containerStatusPidL #-} + +-- | 'containerStatusExitCode' Lens +containerStatusExitCodeL :: Lens_' ContainerStatus (Maybe Int) +containerStatusExitCodeL f ContainerStatus{..} = (\containerStatusExitCode -> ContainerStatus { containerStatusExitCode, ..} ) <$> f containerStatusExitCode +{-# INLINE containerStatusExitCodeL #-} + + + +-- * ContainerSummary + +-- | 'containerSummaryId' Lens +containerSummaryIdL :: Lens_' ContainerSummary (Maybe Text) +containerSummaryIdL f ContainerSummary{..} = (\containerSummaryId -> ContainerSummary { containerSummaryId, ..} ) <$> f containerSummaryId +{-# INLINE containerSummaryIdL #-} + +-- | 'containerSummaryNames' Lens +containerSummaryNamesL :: Lens_' ContainerSummary (Maybe [Text]) +containerSummaryNamesL f ContainerSummary{..} = (\containerSummaryNames -> ContainerSummary { containerSummaryNames, ..} ) <$> f containerSummaryNames +{-# INLINE containerSummaryNamesL #-} + +-- | 'containerSummaryImage' Lens +containerSummaryImageL :: Lens_' ContainerSummary (Maybe Text) +containerSummaryImageL f ContainerSummary{..} = (\containerSummaryImage -> ContainerSummary { containerSummaryImage, ..} ) <$> f containerSummaryImage +{-# INLINE containerSummaryImageL #-} + +-- | 'containerSummaryImageId' Lens +containerSummaryImageIdL :: Lens_' ContainerSummary (Maybe Text) +containerSummaryImageIdL f ContainerSummary{..} = (\containerSummaryImageId -> ContainerSummary { containerSummaryImageId, ..} ) <$> f containerSummaryImageId +{-# INLINE containerSummaryImageIdL #-} + +-- | 'containerSummaryCommand' Lens +containerSummaryCommandL :: Lens_' ContainerSummary (Maybe Text) +containerSummaryCommandL f ContainerSummary{..} = (\containerSummaryCommand -> ContainerSummary { containerSummaryCommand, ..} ) <$> f containerSummaryCommand +{-# INLINE containerSummaryCommandL #-} + +-- | 'containerSummaryCreated' Lens +containerSummaryCreatedL :: Lens_' ContainerSummary (Maybe Integer) +containerSummaryCreatedL f ContainerSummary{..} = (\containerSummaryCreated -> ContainerSummary { containerSummaryCreated, ..} ) <$> f containerSummaryCreated +{-# INLINE containerSummaryCreatedL #-} + +-- | 'containerSummaryPorts' Lens +containerSummaryPortsL :: Lens_' ContainerSummary (Maybe [Port]) +containerSummaryPortsL f ContainerSummary{..} = (\containerSummaryPorts -> ContainerSummary { containerSummaryPorts, ..} ) <$> f containerSummaryPorts +{-# INLINE containerSummaryPortsL #-} + +-- | 'containerSummarySizeRw' Lens +containerSummarySizeRwL :: Lens_' ContainerSummary (Maybe Integer) +containerSummarySizeRwL f ContainerSummary{..} = (\containerSummarySizeRw -> ContainerSummary { containerSummarySizeRw, ..} ) <$> f containerSummarySizeRw +{-# INLINE containerSummarySizeRwL #-} + +-- | 'containerSummarySizeRootFs' Lens +containerSummarySizeRootFsL :: Lens_' ContainerSummary (Maybe Integer) +containerSummarySizeRootFsL f ContainerSummary{..} = (\containerSummarySizeRootFs -> ContainerSummary { containerSummarySizeRootFs, ..} ) <$> f containerSummarySizeRootFs +{-# INLINE containerSummarySizeRootFsL #-} + +-- | 'containerSummaryLabels' Lens +containerSummaryLabelsL :: Lens_' ContainerSummary (Maybe (Map.Map String Text)) +containerSummaryLabelsL f ContainerSummary{..} = (\containerSummaryLabels -> ContainerSummary { containerSummaryLabels, ..} ) <$> f containerSummaryLabels +{-# INLINE containerSummaryLabelsL #-} + +-- | 'containerSummaryState' Lens +containerSummaryStateL :: Lens_' ContainerSummary (Maybe Text) +containerSummaryStateL f ContainerSummary{..} = (\containerSummaryState -> ContainerSummary { containerSummaryState, ..} ) <$> f containerSummaryState +{-# INLINE containerSummaryStateL #-} + +-- | 'containerSummaryStatus' Lens +containerSummaryStatusL :: Lens_' ContainerSummary (Maybe Text) +containerSummaryStatusL f ContainerSummary{..} = (\containerSummaryStatus -> ContainerSummary { containerSummaryStatus, ..} ) <$> f containerSummaryStatus +{-# INLINE containerSummaryStatusL #-} + +-- | 'containerSummaryHostConfig' Lens +containerSummaryHostConfigL :: Lens_' ContainerSummary (Maybe ContainerSummaryHostConfig) +containerSummaryHostConfigL f ContainerSummary{..} = (\containerSummaryHostConfig -> ContainerSummary { containerSummaryHostConfig, ..} ) <$> f containerSummaryHostConfig +{-# INLINE containerSummaryHostConfigL #-} + +-- | 'containerSummaryNetworkSettings' Lens +containerSummaryNetworkSettingsL :: Lens_' ContainerSummary (Maybe ContainerSummaryNetworkSettings) +containerSummaryNetworkSettingsL f ContainerSummary{..} = (\containerSummaryNetworkSettings -> ContainerSummary { containerSummaryNetworkSettings, ..} ) <$> f containerSummaryNetworkSettings +{-# INLINE containerSummaryNetworkSettingsL #-} + +-- | 'containerSummaryMounts' Lens +containerSummaryMountsL :: Lens_' ContainerSummary (Maybe [MountPoint]) +containerSummaryMountsL f ContainerSummary{..} = (\containerSummaryMounts -> ContainerSummary { containerSummaryMounts, ..} ) <$> f containerSummaryMounts +{-# INLINE containerSummaryMountsL #-} + + + +-- * ContainerSummaryHostConfig + +-- | 'containerSummaryHostConfigNetworkMode' Lens +containerSummaryHostConfigNetworkModeL :: Lens_' ContainerSummaryHostConfig (Maybe Text) +containerSummaryHostConfigNetworkModeL f ContainerSummaryHostConfig{..} = (\containerSummaryHostConfigNetworkMode -> ContainerSummaryHostConfig { containerSummaryHostConfigNetworkMode, ..} ) <$> f containerSummaryHostConfigNetworkMode +{-# INLINE containerSummaryHostConfigNetworkModeL #-} + +-- | 'containerSummaryHostConfigAnnotations' Lens +containerSummaryHostConfigAnnotationsL :: Lens_' ContainerSummaryHostConfig (Maybe (Map.Map String Text)) +containerSummaryHostConfigAnnotationsL f ContainerSummaryHostConfig{..} = (\containerSummaryHostConfigAnnotations -> ContainerSummaryHostConfig { containerSummaryHostConfigAnnotations, ..} ) <$> f containerSummaryHostConfigAnnotations +{-# INLINE containerSummaryHostConfigAnnotationsL #-} + + + +-- * ContainerSummaryNetworkSettings + +-- | 'containerSummaryNetworkSettingsNetworks' Lens +containerSummaryNetworkSettingsNetworksL :: Lens_' ContainerSummaryNetworkSettings (Maybe (Map.Map String EndpointSettings)) +containerSummaryNetworkSettingsNetworksL f ContainerSummaryNetworkSettings{..} = (\containerSummaryNetworkSettingsNetworks -> ContainerSummaryNetworkSettings { containerSummaryNetworkSettingsNetworks, ..} ) <$> f containerSummaryNetworkSettingsNetworks +{-# INLINE containerSummaryNetworkSettingsNetworksL #-} + + + +-- * ContainerTopResponse + +-- | 'containerTopResponseTitles' Lens +containerTopResponseTitlesL :: Lens_' ContainerTopResponse (Maybe [Text]) +containerTopResponseTitlesL f ContainerTopResponse{..} = (\containerTopResponseTitles -> ContainerTopResponse { containerTopResponseTitles, ..} ) <$> f containerTopResponseTitles +{-# INLINE containerTopResponseTitlesL #-} + +-- | 'containerTopResponseProcesses' Lens +containerTopResponseProcessesL :: Lens_' ContainerTopResponse (Maybe [[Text]]) +containerTopResponseProcessesL f ContainerTopResponse{..} = (\containerTopResponseProcesses -> ContainerTopResponse { containerTopResponseProcesses, ..} ) <$> f containerTopResponseProcesses +{-# INLINE containerTopResponseProcessesL #-} + + + +-- * ContainerUpdateRequest + +-- | 'containerUpdateRequestCpuShares' Lens +containerUpdateRequestCpuSharesL :: Lens_' ContainerUpdateRequest (Maybe Int) +containerUpdateRequestCpuSharesL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuShares -> ContainerUpdateRequest { containerUpdateRequestCpuShares, ..} ) <$> f containerUpdateRequestCpuShares +{-# INLINE containerUpdateRequestCpuSharesL #-} + +-- | 'containerUpdateRequestMemory' Lens +containerUpdateRequestMemoryL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestMemoryL f ContainerUpdateRequest{..} = (\containerUpdateRequestMemory -> ContainerUpdateRequest { containerUpdateRequestMemory, ..} ) <$> f containerUpdateRequestMemory +{-# INLINE containerUpdateRequestMemoryL #-} + +-- | 'containerUpdateRequestCgroupParent' Lens +containerUpdateRequestCgroupParentL :: Lens_' ContainerUpdateRequest (Maybe Text) +containerUpdateRequestCgroupParentL f ContainerUpdateRequest{..} = (\containerUpdateRequestCgroupParent -> ContainerUpdateRequest { containerUpdateRequestCgroupParent, ..} ) <$> f containerUpdateRequestCgroupParent +{-# INLINE containerUpdateRequestCgroupParentL #-} + +-- | 'containerUpdateRequestBlkioWeight' Lens +containerUpdateRequestBlkioWeightL :: Lens_' ContainerUpdateRequest (Maybe Int) +containerUpdateRequestBlkioWeightL f ContainerUpdateRequest{..} = (\containerUpdateRequestBlkioWeight -> ContainerUpdateRequest { containerUpdateRequestBlkioWeight, ..} ) <$> f containerUpdateRequestBlkioWeight +{-# INLINE containerUpdateRequestBlkioWeightL #-} + +-- | 'containerUpdateRequestBlkioWeightDevice' Lens +containerUpdateRequestBlkioWeightDeviceL :: Lens_' ContainerUpdateRequest (Maybe [ResourcesBlkioWeightDeviceInner]) +containerUpdateRequestBlkioWeightDeviceL f ContainerUpdateRequest{..} = (\containerUpdateRequestBlkioWeightDevice -> ContainerUpdateRequest { containerUpdateRequestBlkioWeightDevice, ..} ) <$> f containerUpdateRequestBlkioWeightDevice +{-# INLINE containerUpdateRequestBlkioWeightDeviceL #-} + +-- | 'containerUpdateRequestBlkioDeviceReadBps' Lens +containerUpdateRequestBlkioDeviceReadBpsL :: Lens_' ContainerUpdateRequest (Maybe [ThrottleDevice]) +containerUpdateRequestBlkioDeviceReadBpsL f ContainerUpdateRequest{..} = (\containerUpdateRequestBlkioDeviceReadBps -> ContainerUpdateRequest { containerUpdateRequestBlkioDeviceReadBps, ..} ) <$> f containerUpdateRequestBlkioDeviceReadBps +{-# INLINE containerUpdateRequestBlkioDeviceReadBpsL #-} + +-- | 'containerUpdateRequestBlkioDeviceWriteBps' Lens +containerUpdateRequestBlkioDeviceWriteBpsL :: Lens_' ContainerUpdateRequest (Maybe [ThrottleDevice]) +containerUpdateRequestBlkioDeviceWriteBpsL f ContainerUpdateRequest{..} = (\containerUpdateRequestBlkioDeviceWriteBps -> ContainerUpdateRequest { containerUpdateRequestBlkioDeviceWriteBps, ..} ) <$> f containerUpdateRequestBlkioDeviceWriteBps +{-# INLINE containerUpdateRequestBlkioDeviceWriteBpsL #-} + +-- | 'containerUpdateRequestBlkioDeviceReadIOps' Lens +containerUpdateRequestBlkioDeviceReadIOpsL :: Lens_' ContainerUpdateRequest (Maybe [ThrottleDevice]) +containerUpdateRequestBlkioDeviceReadIOpsL f ContainerUpdateRequest{..} = (\containerUpdateRequestBlkioDeviceReadIOps -> ContainerUpdateRequest { containerUpdateRequestBlkioDeviceReadIOps, ..} ) <$> f containerUpdateRequestBlkioDeviceReadIOps +{-# INLINE containerUpdateRequestBlkioDeviceReadIOpsL #-} + +-- | 'containerUpdateRequestBlkioDeviceWriteIOps' Lens +containerUpdateRequestBlkioDeviceWriteIOpsL :: Lens_' ContainerUpdateRequest (Maybe [ThrottleDevice]) +containerUpdateRequestBlkioDeviceWriteIOpsL f ContainerUpdateRequest{..} = (\containerUpdateRequestBlkioDeviceWriteIOps -> ContainerUpdateRequest { containerUpdateRequestBlkioDeviceWriteIOps, ..} ) <$> f containerUpdateRequestBlkioDeviceWriteIOps +{-# INLINE containerUpdateRequestBlkioDeviceWriteIOpsL #-} + +-- | 'containerUpdateRequestCpuPeriod' Lens +containerUpdateRequestCpuPeriodL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestCpuPeriodL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuPeriod -> ContainerUpdateRequest { containerUpdateRequestCpuPeriod, ..} ) <$> f containerUpdateRequestCpuPeriod +{-# INLINE containerUpdateRequestCpuPeriodL #-} + +-- | 'containerUpdateRequestCpuQuota' Lens +containerUpdateRequestCpuQuotaL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestCpuQuotaL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuQuota -> ContainerUpdateRequest { containerUpdateRequestCpuQuota, ..} ) <$> f containerUpdateRequestCpuQuota +{-# INLINE containerUpdateRequestCpuQuotaL #-} + +-- | 'containerUpdateRequestCpuRealtimePeriod' Lens +containerUpdateRequestCpuRealtimePeriodL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestCpuRealtimePeriodL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuRealtimePeriod -> ContainerUpdateRequest { containerUpdateRequestCpuRealtimePeriod, ..} ) <$> f containerUpdateRequestCpuRealtimePeriod +{-# INLINE containerUpdateRequestCpuRealtimePeriodL #-} + +-- | 'containerUpdateRequestCpuRealtimeRuntime' Lens +containerUpdateRequestCpuRealtimeRuntimeL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestCpuRealtimeRuntimeL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuRealtimeRuntime -> ContainerUpdateRequest { containerUpdateRequestCpuRealtimeRuntime, ..} ) <$> f containerUpdateRequestCpuRealtimeRuntime +{-# INLINE containerUpdateRequestCpuRealtimeRuntimeL #-} + +-- | 'containerUpdateRequestCpusetCpus' Lens +containerUpdateRequestCpusetCpusL :: Lens_' ContainerUpdateRequest (Maybe Text) +containerUpdateRequestCpusetCpusL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpusetCpus -> ContainerUpdateRequest { containerUpdateRequestCpusetCpus, ..} ) <$> f containerUpdateRequestCpusetCpus +{-# INLINE containerUpdateRequestCpusetCpusL #-} + +-- | 'containerUpdateRequestCpusetMems' Lens +containerUpdateRequestCpusetMemsL :: Lens_' ContainerUpdateRequest (Maybe Text) +containerUpdateRequestCpusetMemsL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpusetMems -> ContainerUpdateRequest { containerUpdateRequestCpusetMems, ..} ) <$> f containerUpdateRequestCpusetMems +{-# INLINE containerUpdateRequestCpusetMemsL #-} + +-- | 'containerUpdateRequestDevices' Lens +containerUpdateRequestDevicesL :: Lens_' ContainerUpdateRequest (Maybe [DeviceMapping]) +containerUpdateRequestDevicesL f ContainerUpdateRequest{..} = (\containerUpdateRequestDevices -> ContainerUpdateRequest { containerUpdateRequestDevices, ..} ) <$> f containerUpdateRequestDevices +{-# INLINE containerUpdateRequestDevicesL #-} + +-- | 'containerUpdateRequestDeviceCgroupRules' Lens +containerUpdateRequestDeviceCgroupRulesL :: Lens_' ContainerUpdateRequest (Maybe [Text]) +containerUpdateRequestDeviceCgroupRulesL f ContainerUpdateRequest{..} = (\containerUpdateRequestDeviceCgroupRules -> ContainerUpdateRequest { containerUpdateRequestDeviceCgroupRules, ..} ) <$> f containerUpdateRequestDeviceCgroupRules +{-# INLINE containerUpdateRequestDeviceCgroupRulesL #-} + +-- | 'containerUpdateRequestDeviceRequests' Lens +containerUpdateRequestDeviceRequestsL :: Lens_' ContainerUpdateRequest (Maybe [DeviceRequest]) +containerUpdateRequestDeviceRequestsL f ContainerUpdateRequest{..} = (\containerUpdateRequestDeviceRequests -> ContainerUpdateRequest { containerUpdateRequestDeviceRequests, ..} ) <$> f containerUpdateRequestDeviceRequests +{-# INLINE containerUpdateRequestDeviceRequestsL #-} + +-- | 'containerUpdateRequestKernelMemoryTcp' Lens +containerUpdateRequestKernelMemoryTcpL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestKernelMemoryTcpL f ContainerUpdateRequest{..} = (\containerUpdateRequestKernelMemoryTcp -> ContainerUpdateRequest { containerUpdateRequestKernelMemoryTcp, ..} ) <$> f containerUpdateRequestKernelMemoryTcp +{-# INLINE containerUpdateRequestKernelMemoryTcpL #-} + +-- | 'containerUpdateRequestMemoryReservation' Lens +containerUpdateRequestMemoryReservationL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestMemoryReservationL f ContainerUpdateRequest{..} = (\containerUpdateRequestMemoryReservation -> ContainerUpdateRequest { containerUpdateRequestMemoryReservation, ..} ) <$> f containerUpdateRequestMemoryReservation +{-# INLINE containerUpdateRequestMemoryReservationL #-} + +-- | 'containerUpdateRequestMemorySwap' Lens +containerUpdateRequestMemorySwapL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestMemorySwapL f ContainerUpdateRequest{..} = (\containerUpdateRequestMemorySwap -> ContainerUpdateRequest { containerUpdateRequestMemorySwap, ..} ) <$> f containerUpdateRequestMemorySwap +{-# INLINE containerUpdateRequestMemorySwapL #-} + +-- | 'containerUpdateRequestMemorySwappiness' Lens +containerUpdateRequestMemorySwappinessL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestMemorySwappinessL f ContainerUpdateRequest{..} = (\containerUpdateRequestMemorySwappiness -> ContainerUpdateRequest { containerUpdateRequestMemorySwappiness, ..} ) <$> f containerUpdateRequestMemorySwappiness +{-# INLINE containerUpdateRequestMemorySwappinessL #-} + +-- | 'containerUpdateRequestNanoCpus' Lens +containerUpdateRequestNanoCpusL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestNanoCpusL f ContainerUpdateRequest{..} = (\containerUpdateRequestNanoCpus -> ContainerUpdateRequest { containerUpdateRequestNanoCpus, ..} ) <$> f containerUpdateRequestNanoCpus +{-# INLINE containerUpdateRequestNanoCpusL #-} + +-- | 'containerUpdateRequestOomKillDisable' Lens +containerUpdateRequestOomKillDisableL :: Lens_' ContainerUpdateRequest (Maybe Bool) +containerUpdateRequestOomKillDisableL f ContainerUpdateRequest{..} = (\containerUpdateRequestOomKillDisable -> ContainerUpdateRequest { containerUpdateRequestOomKillDisable, ..} ) <$> f containerUpdateRequestOomKillDisable +{-# INLINE containerUpdateRequestOomKillDisableL #-} + +-- | 'containerUpdateRequestInit' Lens +containerUpdateRequestInitL :: Lens_' ContainerUpdateRequest (Maybe Bool) +containerUpdateRequestInitL f ContainerUpdateRequest{..} = (\containerUpdateRequestInit -> ContainerUpdateRequest { containerUpdateRequestInit, ..} ) <$> f containerUpdateRequestInit +{-# INLINE containerUpdateRequestInitL #-} + +-- | 'containerUpdateRequestPidsLimit' Lens +containerUpdateRequestPidsLimitL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestPidsLimitL f ContainerUpdateRequest{..} = (\containerUpdateRequestPidsLimit -> ContainerUpdateRequest { containerUpdateRequestPidsLimit, ..} ) <$> f containerUpdateRequestPidsLimit +{-# INLINE containerUpdateRequestPidsLimitL #-} + +-- | 'containerUpdateRequestUlimits' Lens +containerUpdateRequestUlimitsL :: Lens_' ContainerUpdateRequest (Maybe [ResourcesUlimitsInner]) +containerUpdateRequestUlimitsL f ContainerUpdateRequest{..} = (\containerUpdateRequestUlimits -> ContainerUpdateRequest { containerUpdateRequestUlimits, ..} ) <$> f containerUpdateRequestUlimits +{-# INLINE containerUpdateRequestUlimitsL #-} + +-- | 'containerUpdateRequestCpuCount' Lens +containerUpdateRequestCpuCountL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestCpuCountL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuCount -> ContainerUpdateRequest { containerUpdateRequestCpuCount, ..} ) <$> f containerUpdateRequestCpuCount +{-# INLINE containerUpdateRequestCpuCountL #-} + +-- | 'containerUpdateRequestCpuPercent' Lens +containerUpdateRequestCpuPercentL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestCpuPercentL f ContainerUpdateRequest{..} = (\containerUpdateRequestCpuPercent -> ContainerUpdateRequest { containerUpdateRequestCpuPercent, ..} ) <$> f containerUpdateRequestCpuPercent +{-# INLINE containerUpdateRequestCpuPercentL #-} + +-- | 'containerUpdateRequestIoMaximumIOps' Lens +containerUpdateRequestIoMaximumIOpsL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestIoMaximumIOpsL f ContainerUpdateRequest{..} = (\containerUpdateRequestIoMaximumIOps -> ContainerUpdateRequest { containerUpdateRequestIoMaximumIOps, ..} ) <$> f containerUpdateRequestIoMaximumIOps +{-# INLINE containerUpdateRequestIoMaximumIOpsL #-} + +-- | 'containerUpdateRequestIoMaximumBandwidth' Lens +containerUpdateRequestIoMaximumBandwidthL :: Lens_' ContainerUpdateRequest (Maybe Integer) +containerUpdateRequestIoMaximumBandwidthL f ContainerUpdateRequest{..} = (\containerUpdateRequestIoMaximumBandwidth -> ContainerUpdateRequest { containerUpdateRequestIoMaximumBandwidth, ..} ) <$> f containerUpdateRequestIoMaximumBandwidth +{-# INLINE containerUpdateRequestIoMaximumBandwidthL #-} + +-- | 'containerUpdateRequestRestartPolicy' Lens +containerUpdateRequestRestartPolicyL :: Lens_' ContainerUpdateRequest (Maybe RestartPolicy) +containerUpdateRequestRestartPolicyL f ContainerUpdateRequest{..} = (\containerUpdateRequestRestartPolicy -> ContainerUpdateRequest { containerUpdateRequestRestartPolicy, ..} ) <$> f containerUpdateRequestRestartPolicy +{-# INLINE containerUpdateRequestRestartPolicyL #-} + + + +-- * ContainerUpdateResponse + +-- | 'containerUpdateResponseWarnings' Lens +containerUpdateResponseWarningsL :: Lens_' ContainerUpdateResponse (Maybe [Text]) +containerUpdateResponseWarningsL f ContainerUpdateResponse{..} = (\containerUpdateResponseWarnings -> ContainerUpdateResponse { containerUpdateResponseWarnings, ..} ) <$> f containerUpdateResponseWarnings +{-# INLINE containerUpdateResponseWarningsL #-} + + + +-- * ContainerWaitExitError + +-- | 'containerWaitExitErrorMessage' Lens +containerWaitExitErrorMessageL :: Lens_' ContainerWaitExitError (Maybe Text) +containerWaitExitErrorMessageL f ContainerWaitExitError{..} = (\containerWaitExitErrorMessage -> ContainerWaitExitError { containerWaitExitErrorMessage, ..} ) <$> f containerWaitExitErrorMessage +{-# INLINE containerWaitExitErrorMessageL #-} + + + +-- * ContainerWaitResponse + +-- | 'containerWaitResponseStatusCode' Lens +containerWaitResponseStatusCodeL :: Lens_' ContainerWaitResponse (Integer) +containerWaitResponseStatusCodeL f ContainerWaitResponse{..} = (\containerWaitResponseStatusCode -> ContainerWaitResponse { containerWaitResponseStatusCode, ..} ) <$> f containerWaitResponseStatusCode +{-# INLINE containerWaitResponseStatusCodeL #-} + +-- | 'containerWaitResponseError' Lens +containerWaitResponseErrorL :: Lens_' ContainerWaitResponse (Maybe ContainerWaitExitError) +containerWaitResponseErrorL f ContainerWaitResponse{..} = (\containerWaitResponseError -> ContainerWaitResponse { containerWaitResponseError, ..} ) <$> f containerWaitResponseError +{-# INLINE containerWaitResponseErrorL #-} + + + +-- * ContainerdInfo + +-- | 'containerdInfoAddress' Lens +containerdInfoAddressL :: Lens_' ContainerdInfo (Maybe Text) +containerdInfoAddressL f ContainerdInfo{..} = (\containerdInfoAddress -> ContainerdInfo { containerdInfoAddress, ..} ) <$> f containerdInfoAddress +{-# INLINE containerdInfoAddressL #-} + +-- | 'containerdInfoNamespaces' Lens +containerdInfoNamespacesL :: Lens_' ContainerdInfo (Maybe ContainerdInfoNamespaces) +containerdInfoNamespacesL f ContainerdInfo{..} = (\containerdInfoNamespaces -> ContainerdInfo { containerdInfoNamespaces, ..} ) <$> f containerdInfoNamespaces +{-# INLINE containerdInfoNamespacesL #-} + + + +-- * ContainerdInfoNamespaces + +-- | 'containerdInfoNamespacesContainers' Lens +containerdInfoNamespacesContainersL :: Lens_' ContainerdInfoNamespaces (Maybe Text) +containerdInfoNamespacesContainersL f ContainerdInfoNamespaces{..} = (\containerdInfoNamespacesContainers -> ContainerdInfoNamespaces { containerdInfoNamespacesContainers, ..} ) <$> f containerdInfoNamespacesContainers +{-# INLINE containerdInfoNamespacesContainersL #-} + +-- | 'containerdInfoNamespacesPlugins' Lens +containerdInfoNamespacesPluginsL :: Lens_' ContainerdInfoNamespaces (Maybe Text) +containerdInfoNamespacesPluginsL f ContainerdInfoNamespaces{..} = (\containerdInfoNamespacesPlugins -> ContainerdInfoNamespaces { containerdInfoNamespacesPlugins, ..} ) <$> f containerdInfoNamespacesPlugins +{-# INLINE containerdInfoNamespacesPluginsL #-} + + + +-- * CreateImageInfo + +-- | 'createImageInfoId' Lens +createImageInfoIdL :: Lens_' CreateImageInfo (Maybe Text) +createImageInfoIdL f CreateImageInfo{..} = (\createImageInfoId -> CreateImageInfo { createImageInfoId, ..} ) <$> f createImageInfoId +{-# INLINE createImageInfoIdL #-} + +-- | 'createImageInfoError' Lens +createImageInfoErrorL :: Lens_' CreateImageInfo (Maybe Text) +createImageInfoErrorL f CreateImageInfo{..} = (\createImageInfoError -> CreateImageInfo { createImageInfoError, ..} ) <$> f createImageInfoError +{-# INLINE createImageInfoErrorL #-} + +-- | 'createImageInfoErrorDetail' Lens +createImageInfoErrorDetailL :: Lens_' CreateImageInfo (Maybe ErrorDetail) +createImageInfoErrorDetailL f CreateImageInfo{..} = (\createImageInfoErrorDetail -> CreateImageInfo { createImageInfoErrorDetail, ..} ) <$> f createImageInfoErrorDetail +{-# INLINE createImageInfoErrorDetailL #-} + +-- | 'createImageInfoStatus' Lens +createImageInfoStatusL :: Lens_' CreateImageInfo (Maybe Text) +createImageInfoStatusL f CreateImageInfo{..} = (\createImageInfoStatus -> CreateImageInfo { createImageInfoStatus, ..} ) <$> f createImageInfoStatus +{-# INLINE createImageInfoStatusL #-} + +-- | 'createImageInfoProgress' Lens +createImageInfoProgressL :: Lens_' CreateImageInfo (Maybe Text) +createImageInfoProgressL f CreateImageInfo{..} = (\createImageInfoProgress -> CreateImageInfo { createImageInfoProgress, ..} ) <$> f createImageInfoProgress +{-# INLINE createImageInfoProgressL #-} + +-- | 'createImageInfoProgressDetail' Lens +createImageInfoProgressDetailL :: Lens_' CreateImageInfo (Maybe ProgressDetail) +createImageInfoProgressDetailL f CreateImageInfo{..} = (\createImageInfoProgressDetail -> CreateImageInfo { createImageInfoProgressDetail, ..} ) <$> f createImageInfoProgressDetail +{-# INLINE createImageInfoProgressDetailL #-} + + + +-- * DeviceMapping + +-- | 'deviceMappingPathOnHost' Lens +deviceMappingPathOnHostL :: Lens_' DeviceMapping (Maybe Text) +deviceMappingPathOnHostL f DeviceMapping{..} = (\deviceMappingPathOnHost -> DeviceMapping { deviceMappingPathOnHost, ..} ) <$> f deviceMappingPathOnHost +{-# INLINE deviceMappingPathOnHostL #-} + +-- | 'deviceMappingPathInContainer' Lens +deviceMappingPathInContainerL :: Lens_' DeviceMapping (Maybe Text) +deviceMappingPathInContainerL f DeviceMapping{..} = (\deviceMappingPathInContainer -> DeviceMapping { deviceMappingPathInContainer, ..} ) <$> f deviceMappingPathInContainer +{-# INLINE deviceMappingPathInContainerL #-} + +-- | 'deviceMappingCgroupPermissions' Lens +deviceMappingCgroupPermissionsL :: Lens_' DeviceMapping (Maybe Text) +deviceMappingCgroupPermissionsL f DeviceMapping{..} = (\deviceMappingCgroupPermissions -> DeviceMapping { deviceMappingCgroupPermissions, ..} ) <$> f deviceMappingCgroupPermissions +{-# INLINE deviceMappingCgroupPermissionsL #-} + + + +-- * DeviceRequest + +-- | 'deviceRequestDriver' Lens +deviceRequestDriverL :: Lens_' DeviceRequest (Maybe Text) +deviceRequestDriverL f DeviceRequest{..} = (\deviceRequestDriver -> DeviceRequest { deviceRequestDriver, ..} ) <$> f deviceRequestDriver +{-# INLINE deviceRequestDriverL #-} + +-- | 'deviceRequestCount' Lens +deviceRequestCountL :: Lens_' DeviceRequest (Maybe Int) +deviceRequestCountL f DeviceRequest{..} = (\deviceRequestCount -> DeviceRequest { deviceRequestCount, ..} ) <$> f deviceRequestCount +{-# INLINE deviceRequestCountL #-} + +-- | 'deviceRequestDeviceIds' Lens +deviceRequestDeviceIdsL :: Lens_' DeviceRequest (Maybe [Text]) +deviceRequestDeviceIdsL f DeviceRequest{..} = (\deviceRequestDeviceIds -> DeviceRequest { deviceRequestDeviceIds, ..} ) <$> f deviceRequestDeviceIds +{-# INLINE deviceRequestDeviceIdsL #-} + +-- | 'deviceRequestCapabilities' Lens +deviceRequestCapabilitiesL :: Lens_' DeviceRequest (Maybe [[Text]]) +deviceRequestCapabilitiesL f DeviceRequest{..} = (\deviceRequestCapabilities -> DeviceRequest { deviceRequestCapabilities, ..} ) <$> f deviceRequestCapabilities +{-# INLINE deviceRequestCapabilitiesL #-} + +-- | 'deviceRequestOptions' Lens +deviceRequestOptionsL :: Lens_' DeviceRequest (Maybe (Map.Map String Text)) +deviceRequestOptionsL f DeviceRequest{..} = (\deviceRequestOptions -> DeviceRequest { deviceRequestOptions, ..} ) <$> f deviceRequestOptions +{-# INLINE deviceRequestOptionsL #-} + + + +-- * DistributionInspect + +-- | 'distributionInspectDescriptor' Lens +distributionInspectDescriptorL :: Lens_' DistributionInspect (OCIDescriptor) +distributionInspectDescriptorL f DistributionInspect{..} = (\distributionInspectDescriptor -> DistributionInspect { distributionInspectDescriptor, ..} ) <$> f distributionInspectDescriptor +{-# INLINE distributionInspectDescriptorL #-} + +-- | 'distributionInspectPlatforms' Lens +distributionInspectPlatformsL :: Lens_' DistributionInspect ([OCIPlatform]) +distributionInspectPlatformsL f DistributionInspect{..} = (\distributionInspectPlatforms -> DistributionInspect { distributionInspectPlatforms, ..} ) <$> f distributionInspectPlatforms +{-# INLINE distributionInspectPlatformsL #-} + + + +-- * Driver + +-- | 'driverName' Lens +driverNameL :: Lens_' Driver (Text) +driverNameL f Driver{..} = (\driverName -> Driver { driverName, ..} ) <$> f driverName +{-# INLINE driverNameL #-} + +-- | 'driverOptions' Lens +driverOptionsL :: Lens_' Driver (Maybe (Map.Map String Text)) +driverOptionsL f Driver{..} = (\driverOptions -> Driver { driverOptions, ..} ) <$> f driverOptions +{-# INLINE driverOptionsL #-} + + + +-- * EndpointIPAMConfig + +-- | 'endpointIPAMConfigIpv4Address' Lens +endpointIPAMConfigIpv4AddressL :: Lens_' EndpointIPAMConfig (Maybe Text) +endpointIPAMConfigIpv4AddressL f EndpointIPAMConfig{..} = (\endpointIPAMConfigIpv4Address -> EndpointIPAMConfig { endpointIPAMConfigIpv4Address, ..} ) <$> f endpointIPAMConfigIpv4Address +{-# INLINE endpointIPAMConfigIpv4AddressL #-} + +-- | 'endpointIPAMConfigIpv6Address' Lens +endpointIPAMConfigIpv6AddressL :: Lens_' EndpointIPAMConfig (Maybe Text) +endpointIPAMConfigIpv6AddressL f EndpointIPAMConfig{..} = (\endpointIPAMConfigIpv6Address -> EndpointIPAMConfig { endpointIPAMConfigIpv6Address, ..} ) <$> f endpointIPAMConfigIpv6Address +{-# INLINE endpointIPAMConfigIpv6AddressL #-} + +-- | 'endpointIPAMConfigLinkLocalIps' Lens +endpointIPAMConfigLinkLocalIpsL :: Lens_' EndpointIPAMConfig (Maybe [Text]) +endpointIPAMConfigLinkLocalIpsL f EndpointIPAMConfig{..} = (\endpointIPAMConfigLinkLocalIps -> EndpointIPAMConfig { endpointIPAMConfigLinkLocalIps, ..} ) <$> f endpointIPAMConfigLinkLocalIps +{-# INLINE endpointIPAMConfigLinkLocalIpsL #-} + + + +-- * EndpointPortConfig + +-- | 'endpointPortConfigName' Lens +endpointPortConfigNameL :: Lens_' EndpointPortConfig (Maybe Text) +endpointPortConfigNameL f EndpointPortConfig{..} = (\endpointPortConfigName -> EndpointPortConfig { endpointPortConfigName, ..} ) <$> f endpointPortConfigName +{-# INLINE endpointPortConfigNameL #-} + +-- | 'endpointPortConfigProtocol' Lens +endpointPortConfigProtocolL :: Lens_' EndpointPortConfig (Maybe E'Type) +endpointPortConfigProtocolL f EndpointPortConfig{..} = (\endpointPortConfigProtocol -> EndpointPortConfig { endpointPortConfigProtocol, ..} ) <$> f endpointPortConfigProtocol +{-# INLINE endpointPortConfigProtocolL #-} + +-- | 'endpointPortConfigTargetPort' Lens +endpointPortConfigTargetPortL :: Lens_' EndpointPortConfig (Maybe Int) +endpointPortConfigTargetPortL f EndpointPortConfig{..} = (\endpointPortConfigTargetPort -> EndpointPortConfig { endpointPortConfigTargetPort, ..} ) <$> f endpointPortConfigTargetPort +{-# INLINE endpointPortConfigTargetPortL #-} + +-- | 'endpointPortConfigPublishedPort' Lens +endpointPortConfigPublishedPortL :: Lens_' EndpointPortConfig (Maybe Int) +endpointPortConfigPublishedPortL f EndpointPortConfig{..} = (\endpointPortConfigPublishedPort -> EndpointPortConfig { endpointPortConfigPublishedPort, ..} ) <$> f endpointPortConfigPublishedPort +{-# INLINE endpointPortConfigPublishedPortL #-} + +-- | 'endpointPortConfigPublishMode' Lens +endpointPortConfigPublishModeL :: Lens_' EndpointPortConfig (Maybe E'PublishMode) +endpointPortConfigPublishModeL f EndpointPortConfig{..} = (\endpointPortConfigPublishMode -> EndpointPortConfig { endpointPortConfigPublishMode, ..} ) <$> f endpointPortConfigPublishMode +{-# INLINE endpointPortConfigPublishModeL #-} + + + +-- * EndpointSettings + +-- | 'endpointSettingsIpamConfig' Lens +endpointSettingsIpamConfigL :: Lens_' EndpointSettings (Maybe EndpointIPAMConfig) +endpointSettingsIpamConfigL f EndpointSettings{..} = (\endpointSettingsIpamConfig -> EndpointSettings { endpointSettingsIpamConfig, ..} ) <$> f endpointSettingsIpamConfig +{-# INLINE endpointSettingsIpamConfigL #-} + +-- | 'endpointSettingsLinks' Lens +endpointSettingsLinksL :: Lens_' EndpointSettings (Maybe [Text]) +endpointSettingsLinksL f EndpointSettings{..} = (\endpointSettingsLinks -> EndpointSettings { endpointSettingsLinks, ..} ) <$> f endpointSettingsLinks +{-# INLINE endpointSettingsLinksL #-} + +-- | 'endpointSettingsMacAddress' Lens +endpointSettingsMacAddressL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsMacAddressL f EndpointSettings{..} = (\endpointSettingsMacAddress -> EndpointSettings { endpointSettingsMacAddress, ..} ) <$> f endpointSettingsMacAddress +{-# INLINE endpointSettingsMacAddressL #-} + +-- | 'endpointSettingsAliases' Lens +endpointSettingsAliasesL :: Lens_' EndpointSettings (Maybe [Text]) +endpointSettingsAliasesL f EndpointSettings{..} = (\endpointSettingsAliases -> EndpointSettings { endpointSettingsAliases, ..} ) <$> f endpointSettingsAliases +{-# INLINE endpointSettingsAliasesL #-} + +-- | 'endpointSettingsDriverOpts' Lens +endpointSettingsDriverOptsL :: Lens_' EndpointSettings (Maybe (Map.Map String Text)) +endpointSettingsDriverOptsL f EndpointSettings{..} = (\endpointSettingsDriverOpts -> EndpointSettings { endpointSettingsDriverOpts, ..} ) <$> f endpointSettingsDriverOpts +{-# INLINE endpointSettingsDriverOptsL #-} + +-- | 'endpointSettingsNetworkId' Lens +endpointSettingsNetworkIdL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsNetworkIdL f EndpointSettings{..} = (\endpointSettingsNetworkId -> EndpointSettings { endpointSettingsNetworkId, ..} ) <$> f endpointSettingsNetworkId +{-# INLINE endpointSettingsNetworkIdL #-} + +-- | 'endpointSettingsEndpointId' Lens +endpointSettingsEndpointIdL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsEndpointIdL f EndpointSettings{..} = (\endpointSettingsEndpointId -> EndpointSettings { endpointSettingsEndpointId, ..} ) <$> f endpointSettingsEndpointId +{-# INLINE endpointSettingsEndpointIdL #-} + +-- | 'endpointSettingsGateway' Lens +endpointSettingsGatewayL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsGatewayL f EndpointSettings{..} = (\endpointSettingsGateway -> EndpointSettings { endpointSettingsGateway, ..} ) <$> f endpointSettingsGateway +{-# INLINE endpointSettingsGatewayL #-} + +-- | 'endpointSettingsIpAddress' Lens +endpointSettingsIpAddressL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsIpAddressL f EndpointSettings{..} = (\endpointSettingsIpAddress -> EndpointSettings { endpointSettingsIpAddress, ..} ) <$> f endpointSettingsIpAddress +{-# INLINE endpointSettingsIpAddressL #-} + +-- | 'endpointSettingsIpPrefixLen' Lens +endpointSettingsIpPrefixLenL :: Lens_' EndpointSettings (Maybe Int) +endpointSettingsIpPrefixLenL f EndpointSettings{..} = (\endpointSettingsIpPrefixLen -> EndpointSettings { endpointSettingsIpPrefixLen, ..} ) <$> f endpointSettingsIpPrefixLen +{-# INLINE endpointSettingsIpPrefixLenL #-} + +-- | 'endpointSettingsIpv6Gateway' Lens +endpointSettingsIpv6GatewayL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsIpv6GatewayL f EndpointSettings{..} = (\endpointSettingsIpv6Gateway -> EndpointSettings { endpointSettingsIpv6Gateway, ..} ) <$> f endpointSettingsIpv6Gateway +{-# INLINE endpointSettingsIpv6GatewayL #-} + +-- | 'endpointSettingsGlobalIpv6Address' Lens +endpointSettingsGlobalIpv6AddressL :: Lens_' EndpointSettings (Maybe Text) +endpointSettingsGlobalIpv6AddressL f EndpointSettings{..} = (\endpointSettingsGlobalIpv6Address -> EndpointSettings { endpointSettingsGlobalIpv6Address, ..} ) <$> f endpointSettingsGlobalIpv6Address +{-# INLINE endpointSettingsGlobalIpv6AddressL #-} + +-- | 'endpointSettingsGlobalIpv6PrefixLen' Lens +endpointSettingsGlobalIpv6PrefixLenL :: Lens_' EndpointSettings (Maybe Integer) +endpointSettingsGlobalIpv6PrefixLenL f EndpointSettings{..} = (\endpointSettingsGlobalIpv6PrefixLen -> EndpointSettings { endpointSettingsGlobalIpv6PrefixLen, ..} ) <$> f endpointSettingsGlobalIpv6PrefixLen +{-# INLINE endpointSettingsGlobalIpv6PrefixLenL #-} + +-- | 'endpointSettingsDnsNames' Lens +endpointSettingsDnsNamesL :: Lens_' EndpointSettings (Maybe [Text]) +endpointSettingsDnsNamesL f EndpointSettings{..} = (\endpointSettingsDnsNames -> EndpointSettings { endpointSettingsDnsNames, ..} ) <$> f endpointSettingsDnsNames +{-# INLINE endpointSettingsDnsNamesL #-} + + + +-- * EndpointSpec + +-- | 'endpointSpecMode' Lens +endpointSpecModeL :: Lens_' EndpointSpec (Maybe E'Mode) +endpointSpecModeL f EndpointSpec{..} = (\endpointSpecMode -> EndpointSpec { endpointSpecMode, ..} ) <$> f endpointSpecMode +{-# INLINE endpointSpecModeL #-} + +-- | 'endpointSpecPorts' Lens +endpointSpecPortsL :: Lens_' EndpointSpec (Maybe [EndpointPortConfig]) +endpointSpecPortsL f EndpointSpec{..} = (\endpointSpecPorts -> EndpointSpec { endpointSpecPorts, ..} ) <$> f endpointSpecPorts +{-# INLINE endpointSpecPortsL #-} + + + +-- * EngineDescription + +-- | 'engineDescriptionEngineVersion' Lens +engineDescriptionEngineVersionL :: Lens_' EngineDescription (Maybe Text) +engineDescriptionEngineVersionL f EngineDescription{..} = (\engineDescriptionEngineVersion -> EngineDescription { engineDescriptionEngineVersion, ..} ) <$> f engineDescriptionEngineVersion +{-# INLINE engineDescriptionEngineVersionL #-} + +-- | 'engineDescriptionLabels' Lens +engineDescriptionLabelsL :: Lens_' EngineDescription (Maybe (Map.Map String Text)) +engineDescriptionLabelsL f EngineDescription{..} = (\engineDescriptionLabels -> EngineDescription { engineDescriptionLabels, ..} ) <$> f engineDescriptionLabels +{-# INLINE engineDescriptionLabelsL #-} + +-- | 'engineDescriptionPlugins' Lens +engineDescriptionPluginsL :: Lens_' EngineDescription (Maybe [EngineDescriptionPluginsInner]) +engineDescriptionPluginsL f EngineDescription{..} = (\engineDescriptionPlugins -> EngineDescription { engineDescriptionPlugins, ..} ) <$> f engineDescriptionPlugins +{-# INLINE engineDescriptionPluginsL #-} + + + +-- * EngineDescriptionPluginsInner + +-- | 'engineDescriptionPluginsInnerType' Lens +engineDescriptionPluginsInnerTypeL :: Lens_' EngineDescriptionPluginsInner (Maybe Text) +engineDescriptionPluginsInnerTypeL f EngineDescriptionPluginsInner{..} = (\engineDescriptionPluginsInnerType -> EngineDescriptionPluginsInner { engineDescriptionPluginsInnerType, ..} ) <$> f engineDescriptionPluginsInnerType +{-# INLINE engineDescriptionPluginsInnerTypeL #-} + +-- | 'engineDescriptionPluginsInnerName' Lens +engineDescriptionPluginsInnerNameL :: Lens_' EngineDescriptionPluginsInner (Maybe Text) +engineDescriptionPluginsInnerNameL f EngineDescriptionPluginsInner{..} = (\engineDescriptionPluginsInnerName -> EngineDescriptionPluginsInner { engineDescriptionPluginsInnerName, ..} ) <$> f engineDescriptionPluginsInnerName +{-# INLINE engineDescriptionPluginsInnerNameL #-} + + + +-- * ErrorDetail + +-- | 'errorDetailCode' Lens +errorDetailCodeL :: Lens_' ErrorDetail (Maybe Int) +errorDetailCodeL f ErrorDetail{..} = (\errorDetailCode -> ErrorDetail { errorDetailCode, ..} ) <$> f errorDetailCode +{-# INLINE errorDetailCodeL #-} + +-- | 'errorDetailMessage' Lens +errorDetailMessageL :: Lens_' ErrorDetail (Maybe Text) +errorDetailMessageL f ErrorDetail{..} = (\errorDetailMessage -> ErrorDetail { errorDetailMessage, ..} ) <$> f errorDetailMessage +{-# INLINE errorDetailMessageL #-} + + + +-- * ErrorResponse + +-- | 'errorResponseMessage' Lens +errorResponseMessageL :: Lens_' ErrorResponse (Text) +errorResponseMessageL f ErrorResponse{..} = (\errorResponseMessage -> ErrorResponse { errorResponseMessage, ..} ) <$> f errorResponseMessage +{-# INLINE errorResponseMessageL #-} + + + +-- * EventActor + +-- | 'eventActorId' Lens +eventActorIdL :: Lens_' EventActor (Maybe Text) +eventActorIdL f EventActor{..} = (\eventActorId -> EventActor { eventActorId, ..} ) <$> f eventActorId +{-# INLINE eventActorIdL #-} + +-- | 'eventActorAttributes' Lens +eventActorAttributesL :: Lens_' EventActor (Maybe (Map.Map String Text)) +eventActorAttributesL f EventActor{..} = (\eventActorAttributes -> EventActor { eventActorAttributes, ..} ) <$> f eventActorAttributes +{-# INLINE eventActorAttributesL #-} + + + +-- * EventMessage + +-- | 'eventMessageType' Lens +eventMessageTypeL :: Lens_' EventMessage (Maybe E'Type4) +eventMessageTypeL f EventMessage{..} = (\eventMessageType -> EventMessage { eventMessageType, ..} ) <$> f eventMessageType +{-# INLINE eventMessageTypeL #-} + +-- | 'eventMessageAction' Lens +eventMessageActionL :: Lens_' EventMessage (Maybe Text) +eventMessageActionL f EventMessage{..} = (\eventMessageAction -> EventMessage { eventMessageAction, ..} ) <$> f eventMessageAction +{-# INLINE eventMessageActionL #-} + +-- | 'eventMessageActor' Lens +eventMessageActorL :: Lens_' EventMessage (Maybe EventActor) +eventMessageActorL f EventMessage{..} = (\eventMessageActor -> EventMessage { eventMessageActor, ..} ) <$> f eventMessageActor +{-# INLINE eventMessageActorL #-} + +-- | 'eventMessageScope' Lens +eventMessageScopeL :: Lens_' EventMessage (Maybe E'Scope2) +eventMessageScopeL f EventMessage{..} = (\eventMessageScope -> EventMessage { eventMessageScope, ..} ) <$> f eventMessageScope +{-# INLINE eventMessageScopeL #-} + +-- | 'eventMessageTime' Lens +eventMessageTimeL :: Lens_' EventMessage (Maybe Integer) +eventMessageTimeL f EventMessage{..} = (\eventMessageTime -> EventMessage { eventMessageTime, ..} ) <$> f eventMessageTime +{-# INLINE eventMessageTimeL #-} + +-- | 'eventMessageTimeNano' Lens +eventMessageTimeNanoL :: Lens_' EventMessage (Maybe Integer) +eventMessageTimeNanoL f EventMessage{..} = (\eventMessageTimeNano -> EventMessage { eventMessageTimeNano, ..} ) <$> f eventMessageTimeNano +{-# INLINE eventMessageTimeNanoL #-} + + + +-- * ExecConfig + +-- | 'execConfigAttachStdin' Lens +execConfigAttachStdinL :: Lens_' ExecConfig (Maybe Bool) +execConfigAttachStdinL f ExecConfig{..} = (\execConfigAttachStdin -> ExecConfig { execConfigAttachStdin, ..} ) <$> f execConfigAttachStdin +{-# INLINE execConfigAttachStdinL #-} + +-- | 'execConfigAttachStdout' Lens +execConfigAttachStdoutL :: Lens_' ExecConfig (Maybe Bool) +execConfigAttachStdoutL f ExecConfig{..} = (\execConfigAttachStdout -> ExecConfig { execConfigAttachStdout, ..} ) <$> f execConfigAttachStdout +{-# INLINE execConfigAttachStdoutL #-} + +-- | 'execConfigAttachStderr' Lens +execConfigAttachStderrL :: Lens_' ExecConfig (Maybe Bool) +execConfigAttachStderrL f ExecConfig{..} = (\execConfigAttachStderr -> ExecConfig { execConfigAttachStderr, ..} ) <$> f execConfigAttachStderr +{-# INLINE execConfigAttachStderrL #-} + +-- | 'execConfigConsoleSize' Lens +execConfigConsoleSizeL :: Lens_' ExecConfig (Maybe [Int]) +execConfigConsoleSizeL f ExecConfig{..} = (\execConfigConsoleSize -> ExecConfig { execConfigConsoleSize, ..} ) <$> f execConfigConsoleSize +{-# INLINE execConfigConsoleSizeL #-} + +-- | 'execConfigDetachKeys' Lens +execConfigDetachKeysL :: Lens_' ExecConfig (Maybe Text) +execConfigDetachKeysL f ExecConfig{..} = (\execConfigDetachKeys -> ExecConfig { execConfigDetachKeys, ..} ) <$> f execConfigDetachKeys +{-# INLINE execConfigDetachKeysL #-} + +-- | 'execConfigTty' Lens +execConfigTtyL :: Lens_' ExecConfig (Maybe Bool) +execConfigTtyL f ExecConfig{..} = (\execConfigTty -> ExecConfig { execConfigTty, ..} ) <$> f execConfigTty +{-# INLINE execConfigTtyL #-} + +-- | 'execConfigEnv' Lens +execConfigEnvL :: Lens_' ExecConfig (Maybe [Text]) +execConfigEnvL f ExecConfig{..} = (\execConfigEnv -> ExecConfig { execConfigEnv, ..} ) <$> f execConfigEnv +{-# INLINE execConfigEnvL #-} + +-- | 'execConfigCmd' Lens +execConfigCmdL :: Lens_' ExecConfig (Maybe [Text]) +execConfigCmdL f ExecConfig{..} = (\execConfigCmd -> ExecConfig { execConfigCmd, ..} ) <$> f execConfigCmd +{-# INLINE execConfigCmdL #-} + +-- | 'execConfigPrivileged' Lens +execConfigPrivilegedL :: Lens_' ExecConfig (Maybe Bool) +execConfigPrivilegedL f ExecConfig{..} = (\execConfigPrivileged -> ExecConfig { execConfigPrivileged, ..} ) <$> f execConfigPrivileged +{-# INLINE execConfigPrivilegedL #-} + +-- | 'execConfigUser' Lens +execConfigUserL :: Lens_' ExecConfig (Maybe Text) +execConfigUserL f ExecConfig{..} = (\execConfigUser -> ExecConfig { execConfigUser, ..} ) <$> f execConfigUser +{-# INLINE execConfigUserL #-} + +-- | 'execConfigWorkingDir' Lens +execConfigWorkingDirL :: Lens_' ExecConfig (Maybe Text) +execConfigWorkingDirL f ExecConfig{..} = (\execConfigWorkingDir -> ExecConfig { execConfigWorkingDir, ..} ) <$> f execConfigWorkingDir +{-# INLINE execConfigWorkingDirL #-} + + + +-- * ExecInspectResponse + +-- | 'execInspectResponseCanRemove' Lens +execInspectResponseCanRemoveL :: Lens_' ExecInspectResponse (Maybe Bool) +execInspectResponseCanRemoveL f ExecInspectResponse{..} = (\execInspectResponseCanRemove -> ExecInspectResponse { execInspectResponseCanRemove, ..} ) <$> f execInspectResponseCanRemove +{-# INLINE execInspectResponseCanRemoveL #-} + +-- | 'execInspectResponseDetachKeys' Lens +execInspectResponseDetachKeysL :: Lens_' ExecInspectResponse (Maybe Text) +execInspectResponseDetachKeysL f ExecInspectResponse{..} = (\execInspectResponseDetachKeys -> ExecInspectResponse { execInspectResponseDetachKeys, ..} ) <$> f execInspectResponseDetachKeys +{-# INLINE execInspectResponseDetachKeysL #-} + +-- | 'execInspectResponseId' Lens +execInspectResponseIdL :: Lens_' ExecInspectResponse (Maybe Text) +execInspectResponseIdL f ExecInspectResponse{..} = (\execInspectResponseId -> ExecInspectResponse { execInspectResponseId, ..} ) <$> f execInspectResponseId +{-# INLINE execInspectResponseIdL #-} + +-- | 'execInspectResponseRunning' Lens +execInspectResponseRunningL :: Lens_' ExecInspectResponse (Maybe Bool) +execInspectResponseRunningL f ExecInspectResponse{..} = (\execInspectResponseRunning -> ExecInspectResponse { execInspectResponseRunning, ..} ) <$> f execInspectResponseRunning +{-# INLINE execInspectResponseRunningL #-} + +-- | 'execInspectResponseExitCode' Lens +execInspectResponseExitCodeL :: Lens_' ExecInspectResponse (Maybe Int) +execInspectResponseExitCodeL f ExecInspectResponse{..} = (\execInspectResponseExitCode -> ExecInspectResponse { execInspectResponseExitCode, ..} ) <$> f execInspectResponseExitCode +{-# INLINE execInspectResponseExitCodeL #-} + +-- | 'execInspectResponseProcessConfig' Lens +execInspectResponseProcessConfigL :: Lens_' ExecInspectResponse (Maybe ProcessConfig) +execInspectResponseProcessConfigL f ExecInspectResponse{..} = (\execInspectResponseProcessConfig -> ExecInspectResponse { execInspectResponseProcessConfig, ..} ) <$> f execInspectResponseProcessConfig +{-# INLINE execInspectResponseProcessConfigL #-} + +-- | 'execInspectResponseOpenStdin' Lens +execInspectResponseOpenStdinL :: Lens_' ExecInspectResponse (Maybe Bool) +execInspectResponseOpenStdinL f ExecInspectResponse{..} = (\execInspectResponseOpenStdin -> ExecInspectResponse { execInspectResponseOpenStdin, ..} ) <$> f execInspectResponseOpenStdin +{-# INLINE execInspectResponseOpenStdinL #-} + +-- | 'execInspectResponseOpenStderr' Lens +execInspectResponseOpenStderrL :: Lens_' ExecInspectResponse (Maybe Bool) +execInspectResponseOpenStderrL f ExecInspectResponse{..} = (\execInspectResponseOpenStderr -> ExecInspectResponse { execInspectResponseOpenStderr, ..} ) <$> f execInspectResponseOpenStderr +{-# INLINE execInspectResponseOpenStderrL #-} + +-- | 'execInspectResponseOpenStdout' Lens +execInspectResponseOpenStdoutL :: Lens_' ExecInspectResponse (Maybe Bool) +execInspectResponseOpenStdoutL f ExecInspectResponse{..} = (\execInspectResponseOpenStdout -> ExecInspectResponse { execInspectResponseOpenStdout, ..} ) <$> f execInspectResponseOpenStdout +{-# INLINE execInspectResponseOpenStdoutL #-} + +-- | 'execInspectResponseContainerId' Lens +execInspectResponseContainerIdL :: Lens_' ExecInspectResponse (Maybe Text) +execInspectResponseContainerIdL f ExecInspectResponse{..} = (\execInspectResponseContainerId -> ExecInspectResponse { execInspectResponseContainerId, ..} ) <$> f execInspectResponseContainerId +{-# INLINE execInspectResponseContainerIdL #-} + +-- | 'execInspectResponsePid' Lens +execInspectResponsePidL :: Lens_' ExecInspectResponse (Maybe Int) +execInspectResponsePidL f ExecInspectResponse{..} = (\execInspectResponsePid -> ExecInspectResponse { execInspectResponsePid, ..} ) <$> f execInspectResponsePid +{-# INLINE execInspectResponsePidL #-} + + + +-- * ExecStartConfig + +-- | 'execStartConfigDetach' Lens +execStartConfigDetachL :: Lens_' ExecStartConfig (Maybe Bool) +execStartConfigDetachL f ExecStartConfig{..} = (\execStartConfigDetach -> ExecStartConfig { execStartConfigDetach, ..} ) <$> f execStartConfigDetach +{-# INLINE execStartConfigDetachL #-} + +-- | 'execStartConfigTty' Lens +execStartConfigTtyL :: Lens_' ExecStartConfig (Maybe Bool) +execStartConfigTtyL f ExecStartConfig{..} = (\execStartConfigTty -> ExecStartConfig { execStartConfigTty, ..} ) <$> f execStartConfigTty +{-# INLINE execStartConfigTtyL #-} + +-- | 'execStartConfigConsoleSize' Lens +execStartConfigConsoleSizeL :: Lens_' ExecStartConfig (Maybe [Int]) +execStartConfigConsoleSizeL f ExecStartConfig{..} = (\execStartConfigConsoleSize -> ExecStartConfig { execStartConfigConsoleSize, ..} ) <$> f execStartConfigConsoleSize +{-# INLINE execStartConfigConsoleSizeL #-} + + + +-- * FilesystemChange + +-- | 'filesystemChangePath' Lens +filesystemChangePathL :: Lens_' FilesystemChange (Text) +filesystemChangePathL f FilesystemChange{..} = (\filesystemChangePath -> FilesystemChange { filesystemChangePath, ..} ) <$> f filesystemChangePath +{-# INLINE filesystemChangePathL #-} + +-- | 'filesystemChangeKind' Lens +filesystemChangeKindL :: Lens_' FilesystemChange (ChangeType) +filesystemChangeKindL f FilesystemChange{..} = (\filesystemChangeKind -> FilesystemChange { filesystemChangeKind, ..} ) <$> f filesystemChangeKind +{-# INLINE filesystemChangeKindL #-} + + + +-- * GenericResourcesInner + +-- | 'genericResourcesInnerNamedResourceSpec' Lens +genericResourcesInnerNamedResourceSpecL :: Lens_' GenericResourcesInner (Maybe GenericResourcesInnerNamedResourceSpec) +genericResourcesInnerNamedResourceSpecL f GenericResourcesInner{..} = (\genericResourcesInnerNamedResourceSpec -> GenericResourcesInner { genericResourcesInnerNamedResourceSpec, ..} ) <$> f genericResourcesInnerNamedResourceSpec +{-# INLINE genericResourcesInnerNamedResourceSpecL #-} + +-- | 'genericResourcesInnerDiscreteResourceSpec' Lens +genericResourcesInnerDiscreteResourceSpecL :: Lens_' GenericResourcesInner (Maybe GenericResourcesInnerDiscreteResourceSpec) +genericResourcesInnerDiscreteResourceSpecL f GenericResourcesInner{..} = (\genericResourcesInnerDiscreteResourceSpec -> GenericResourcesInner { genericResourcesInnerDiscreteResourceSpec, ..} ) <$> f genericResourcesInnerDiscreteResourceSpec +{-# INLINE genericResourcesInnerDiscreteResourceSpecL #-} + + + +-- * GenericResourcesInnerDiscreteResourceSpec + +-- | 'genericResourcesInnerDiscreteResourceSpecKind' Lens +genericResourcesInnerDiscreteResourceSpecKindL :: Lens_' GenericResourcesInnerDiscreteResourceSpec (Maybe Text) +genericResourcesInnerDiscreteResourceSpecKindL f GenericResourcesInnerDiscreteResourceSpec{..} = (\genericResourcesInnerDiscreteResourceSpecKind -> GenericResourcesInnerDiscreteResourceSpec { genericResourcesInnerDiscreteResourceSpecKind, ..} ) <$> f genericResourcesInnerDiscreteResourceSpecKind +{-# INLINE genericResourcesInnerDiscreteResourceSpecKindL #-} + +-- | 'genericResourcesInnerDiscreteResourceSpecValue' Lens +genericResourcesInnerDiscreteResourceSpecValueL :: Lens_' GenericResourcesInnerDiscreteResourceSpec (Maybe Integer) +genericResourcesInnerDiscreteResourceSpecValueL f GenericResourcesInnerDiscreteResourceSpec{..} = (\genericResourcesInnerDiscreteResourceSpecValue -> GenericResourcesInnerDiscreteResourceSpec { genericResourcesInnerDiscreteResourceSpecValue, ..} ) <$> f genericResourcesInnerDiscreteResourceSpecValue +{-# INLINE genericResourcesInnerDiscreteResourceSpecValueL #-} + + + +-- * GenericResourcesInnerNamedResourceSpec + +-- | 'genericResourcesInnerNamedResourceSpecKind' Lens +genericResourcesInnerNamedResourceSpecKindL :: Lens_' GenericResourcesInnerNamedResourceSpec (Maybe Text) +genericResourcesInnerNamedResourceSpecKindL f GenericResourcesInnerNamedResourceSpec{..} = (\genericResourcesInnerNamedResourceSpecKind -> GenericResourcesInnerNamedResourceSpec { genericResourcesInnerNamedResourceSpecKind, ..} ) <$> f genericResourcesInnerNamedResourceSpecKind +{-# INLINE genericResourcesInnerNamedResourceSpecKindL #-} + +-- | 'genericResourcesInnerNamedResourceSpecValue' Lens +genericResourcesInnerNamedResourceSpecValueL :: Lens_' GenericResourcesInnerNamedResourceSpec (Maybe Text) +genericResourcesInnerNamedResourceSpecValueL f GenericResourcesInnerNamedResourceSpec{..} = (\genericResourcesInnerNamedResourceSpecValue -> GenericResourcesInnerNamedResourceSpec { genericResourcesInnerNamedResourceSpecValue, ..} ) <$> f genericResourcesInnerNamedResourceSpecValue +{-# INLINE genericResourcesInnerNamedResourceSpecValueL #-} + + + +-- * GraphDriverData + +-- | 'graphDriverDataName' Lens +graphDriverDataNameL :: Lens_' GraphDriverData (Text) +graphDriverDataNameL f GraphDriverData{..} = (\graphDriverDataName -> GraphDriverData { graphDriverDataName, ..} ) <$> f graphDriverDataName +{-# INLINE graphDriverDataNameL #-} + +-- | 'graphDriverDataData' Lens +graphDriverDataDataL :: Lens_' GraphDriverData ((Map.Map String Text)) +graphDriverDataDataL f GraphDriverData{..} = (\graphDriverDataData -> GraphDriverData { graphDriverDataData, ..} ) <$> f graphDriverDataData +{-# INLINE graphDriverDataDataL #-} + + + +-- * Health + +-- | 'healthStatus' Lens +healthStatusL :: Lens_' Health (Maybe E'Status) +healthStatusL f Health{..} = (\healthStatus -> Health { healthStatus, ..} ) <$> f healthStatus +{-# INLINE healthStatusL #-} + +-- | 'healthFailingStreak' Lens +healthFailingStreakL :: Lens_' Health (Maybe Int) +healthFailingStreakL f Health{..} = (\healthFailingStreak -> Health { healthFailingStreak, ..} ) <$> f healthFailingStreak +{-# INLINE healthFailingStreakL #-} + +-- | 'healthLog' Lens +healthLogL :: Lens_' Health (Maybe [HealthcheckResult]) +healthLogL f Health{..} = (\healthLog -> Health { healthLog, ..} ) <$> f healthLog +{-# INLINE healthLogL #-} + + + +-- * HealthConfig + +-- | 'healthConfigTest' Lens +healthConfigTestL :: Lens_' HealthConfig (Maybe [Text]) +healthConfigTestL f HealthConfig{..} = (\healthConfigTest -> HealthConfig { healthConfigTest, ..} ) <$> f healthConfigTest +{-# INLINE healthConfigTestL #-} + +-- | 'healthConfigInterval' Lens +healthConfigIntervalL :: Lens_' HealthConfig (Maybe Integer) +healthConfigIntervalL f HealthConfig{..} = (\healthConfigInterval -> HealthConfig { healthConfigInterval, ..} ) <$> f healthConfigInterval +{-# INLINE healthConfigIntervalL #-} + +-- | 'healthConfigTimeout' Lens +healthConfigTimeoutL :: Lens_' HealthConfig (Maybe Integer) +healthConfigTimeoutL f HealthConfig{..} = (\healthConfigTimeout -> HealthConfig { healthConfigTimeout, ..} ) <$> f healthConfigTimeout +{-# INLINE healthConfigTimeoutL #-} + +-- | 'healthConfigRetries' Lens +healthConfigRetriesL :: Lens_' HealthConfig (Maybe Int) +healthConfigRetriesL f HealthConfig{..} = (\healthConfigRetries -> HealthConfig { healthConfigRetries, ..} ) <$> f healthConfigRetries +{-# INLINE healthConfigRetriesL #-} + +-- | 'healthConfigStartPeriod' Lens +healthConfigStartPeriodL :: Lens_' HealthConfig (Maybe Integer) +healthConfigStartPeriodL f HealthConfig{..} = (\healthConfigStartPeriod -> HealthConfig { healthConfigStartPeriod, ..} ) <$> f healthConfigStartPeriod +{-# INLINE healthConfigStartPeriodL #-} + +-- | 'healthConfigStartInterval' Lens +healthConfigStartIntervalL :: Lens_' HealthConfig (Maybe Integer) +healthConfigStartIntervalL f HealthConfig{..} = (\healthConfigStartInterval -> HealthConfig { healthConfigStartInterval, ..} ) <$> f healthConfigStartInterval +{-# INLINE healthConfigStartIntervalL #-} + + + +-- * HealthcheckResult + +-- | 'healthcheckResultStart' Lens +healthcheckResultStartL :: Lens_' HealthcheckResult (Maybe DateTime) +healthcheckResultStartL f HealthcheckResult{..} = (\healthcheckResultStart -> HealthcheckResult { healthcheckResultStart, ..} ) <$> f healthcheckResultStart +{-# INLINE healthcheckResultStartL #-} + +-- | 'healthcheckResultEnd' Lens +healthcheckResultEndL :: Lens_' HealthcheckResult (Maybe Text) +healthcheckResultEndL f HealthcheckResult{..} = (\healthcheckResultEnd -> HealthcheckResult { healthcheckResultEnd, ..} ) <$> f healthcheckResultEnd +{-# INLINE healthcheckResultEndL #-} + +-- | 'healthcheckResultExitCode' Lens +healthcheckResultExitCodeL :: Lens_' HealthcheckResult (Maybe Int) +healthcheckResultExitCodeL f HealthcheckResult{..} = (\healthcheckResultExitCode -> HealthcheckResult { healthcheckResultExitCode, ..} ) <$> f healthcheckResultExitCode +{-# INLINE healthcheckResultExitCodeL #-} + +-- | 'healthcheckResultOutput' Lens +healthcheckResultOutputL :: Lens_' HealthcheckResult (Maybe Text) +healthcheckResultOutputL f HealthcheckResult{..} = (\healthcheckResultOutput -> HealthcheckResult { healthcheckResultOutput, ..} ) <$> f healthcheckResultOutput +{-# INLINE healthcheckResultOutputL #-} + + + +-- * HistoryResponseItem + +-- | 'historyResponseItemId' Lens +historyResponseItemIdL :: Lens_' HistoryResponseItem (Text) +historyResponseItemIdL f HistoryResponseItem{..} = (\historyResponseItemId -> HistoryResponseItem { historyResponseItemId, ..} ) <$> f historyResponseItemId +{-# INLINE historyResponseItemIdL #-} + +-- | 'historyResponseItemCreated' Lens +historyResponseItemCreatedL :: Lens_' HistoryResponseItem (Integer) +historyResponseItemCreatedL f HistoryResponseItem{..} = (\historyResponseItemCreated -> HistoryResponseItem { historyResponseItemCreated, ..} ) <$> f historyResponseItemCreated +{-# INLINE historyResponseItemCreatedL #-} + +-- | 'historyResponseItemCreatedBy' Lens +historyResponseItemCreatedByL :: Lens_' HistoryResponseItem (Text) +historyResponseItemCreatedByL f HistoryResponseItem{..} = (\historyResponseItemCreatedBy -> HistoryResponseItem { historyResponseItemCreatedBy, ..} ) <$> f historyResponseItemCreatedBy +{-# INLINE historyResponseItemCreatedByL #-} + +-- | 'historyResponseItemTags' Lens +historyResponseItemTagsL :: Lens_' HistoryResponseItem ([Text]) +historyResponseItemTagsL f HistoryResponseItem{..} = (\historyResponseItemTags -> HistoryResponseItem { historyResponseItemTags, ..} ) <$> f historyResponseItemTags +{-# INLINE historyResponseItemTagsL #-} + +-- | 'historyResponseItemSize' Lens +historyResponseItemSizeL :: Lens_' HistoryResponseItem (Integer) +historyResponseItemSizeL f HistoryResponseItem{..} = (\historyResponseItemSize -> HistoryResponseItem { historyResponseItemSize, ..} ) <$> f historyResponseItemSize +{-# INLINE historyResponseItemSizeL #-} + +-- | 'historyResponseItemComment' Lens +historyResponseItemCommentL :: Lens_' HistoryResponseItem (Text) +historyResponseItemCommentL f HistoryResponseItem{..} = (\historyResponseItemComment -> HistoryResponseItem { historyResponseItemComment, ..} ) <$> f historyResponseItemComment +{-# INLINE historyResponseItemCommentL #-} + + + +-- * HostConfig + +-- | 'hostConfigCpuShares' Lens +hostConfigCpuSharesL :: Lens_' HostConfig (Maybe Int) +hostConfigCpuSharesL f HostConfig{..} = (\hostConfigCpuShares -> HostConfig { hostConfigCpuShares, ..} ) <$> f hostConfigCpuShares +{-# INLINE hostConfigCpuSharesL #-} + +-- | 'hostConfigMemory' Lens +hostConfigMemoryL :: Lens_' HostConfig (Maybe Integer) +hostConfigMemoryL f HostConfig{..} = (\hostConfigMemory -> HostConfig { hostConfigMemory, ..} ) <$> f hostConfigMemory +{-# INLINE hostConfigMemoryL #-} + +-- | 'hostConfigCgroupParent' Lens +hostConfigCgroupParentL :: Lens_' HostConfig (Maybe Text) +hostConfigCgroupParentL f HostConfig{..} = (\hostConfigCgroupParent -> HostConfig { hostConfigCgroupParent, ..} ) <$> f hostConfigCgroupParent +{-# INLINE hostConfigCgroupParentL #-} + +-- | 'hostConfigBlkioWeight' Lens +hostConfigBlkioWeightL :: Lens_' HostConfig (Maybe Int) +hostConfigBlkioWeightL f HostConfig{..} = (\hostConfigBlkioWeight -> HostConfig { hostConfigBlkioWeight, ..} ) <$> f hostConfigBlkioWeight +{-# INLINE hostConfigBlkioWeightL #-} + +-- | 'hostConfigBlkioWeightDevice' Lens +hostConfigBlkioWeightDeviceL :: Lens_' HostConfig (Maybe [ResourcesBlkioWeightDeviceInner]) +hostConfigBlkioWeightDeviceL f HostConfig{..} = (\hostConfigBlkioWeightDevice -> HostConfig { hostConfigBlkioWeightDevice, ..} ) <$> f hostConfigBlkioWeightDevice +{-# INLINE hostConfigBlkioWeightDeviceL #-} + +-- | 'hostConfigBlkioDeviceReadBps' Lens +hostConfigBlkioDeviceReadBpsL :: Lens_' HostConfig (Maybe [ThrottleDevice]) +hostConfigBlkioDeviceReadBpsL f HostConfig{..} = (\hostConfigBlkioDeviceReadBps -> HostConfig { hostConfigBlkioDeviceReadBps, ..} ) <$> f hostConfigBlkioDeviceReadBps +{-# INLINE hostConfigBlkioDeviceReadBpsL #-} + +-- | 'hostConfigBlkioDeviceWriteBps' Lens +hostConfigBlkioDeviceWriteBpsL :: Lens_' HostConfig (Maybe [ThrottleDevice]) +hostConfigBlkioDeviceWriteBpsL f HostConfig{..} = (\hostConfigBlkioDeviceWriteBps -> HostConfig { hostConfigBlkioDeviceWriteBps, ..} ) <$> f hostConfigBlkioDeviceWriteBps +{-# INLINE hostConfigBlkioDeviceWriteBpsL #-} + +-- | 'hostConfigBlkioDeviceReadIOps' Lens +hostConfigBlkioDeviceReadIOpsL :: Lens_' HostConfig (Maybe [ThrottleDevice]) +hostConfigBlkioDeviceReadIOpsL f HostConfig{..} = (\hostConfigBlkioDeviceReadIOps -> HostConfig { hostConfigBlkioDeviceReadIOps, ..} ) <$> f hostConfigBlkioDeviceReadIOps +{-# INLINE hostConfigBlkioDeviceReadIOpsL #-} + +-- | 'hostConfigBlkioDeviceWriteIOps' Lens +hostConfigBlkioDeviceWriteIOpsL :: Lens_' HostConfig (Maybe [ThrottleDevice]) +hostConfigBlkioDeviceWriteIOpsL f HostConfig{..} = (\hostConfigBlkioDeviceWriteIOps -> HostConfig { hostConfigBlkioDeviceWriteIOps, ..} ) <$> f hostConfigBlkioDeviceWriteIOps +{-# INLINE hostConfigBlkioDeviceWriteIOpsL #-} + +-- | 'hostConfigCpuPeriod' Lens +hostConfigCpuPeriodL :: Lens_' HostConfig (Maybe Integer) +hostConfigCpuPeriodL f HostConfig{..} = (\hostConfigCpuPeriod -> HostConfig { hostConfigCpuPeriod, ..} ) <$> f hostConfigCpuPeriod +{-# INLINE hostConfigCpuPeriodL #-} + +-- | 'hostConfigCpuQuota' Lens +hostConfigCpuQuotaL :: Lens_' HostConfig (Maybe Integer) +hostConfigCpuQuotaL f HostConfig{..} = (\hostConfigCpuQuota -> HostConfig { hostConfigCpuQuota, ..} ) <$> f hostConfigCpuQuota +{-# INLINE hostConfigCpuQuotaL #-} + +-- | 'hostConfigCpuRealtimePeriod' Lens +hostConfigCpuRealtimePeriodL :: Lens_' HostConfig (Maybe Integer) +hostConfigCpuRealtimePeriodL f HostConfig{..} = (\hostConfigCpuRealtimePeriod -> HostConfig { hostConfigCpuRealtimePeriod, ..} ) <$> f hostConfigCpuRealtimePeriod +{-# INLINE hostConfigCpuRealtimePeriodL #-} + +-- | 'hostConfigCpuRealtimeRuntime' Lens +hostConfigCpuRealtimeRuntimeL :: Lens_' HostConfig (Maybe Integer) +hostConfigCpuRealtimeRuntimeL f HostConfig{..} = (\hostConfigCpuRealtimeRuntime -> HostConfig { hostConfigCpuRealtimeRuntime, ..} ) <$> f hostConfigCpuRealtimeRuntime +{-# INLINE hostConfigCpuRealtimeRuntimeL #-} + +-- | 'hostConfigCpusetCpus' Lens +hostConfigCpusetCpusL :: Lens_' HostConfig (Maybe Text) +hostConfigCpusetCpusL f HostConfig{..} = (\hostConfigCpusetCpus -> HostConfig { hostConfigCpusetCpus, ..} ) <$> f hostConfigCpusetCpus +{-# INLINE hostConfigCpusetCpusL #-} + +-- | 'hostConfigCpusetMems' Lens +hostConfigCpusetMemsL :: Lens_' HostConfig (Maybe Text) +hostConfigCpusetMemsL f HostConfig{..} = (\hostConfigCpusetMems -> HostConfig { hostConfigCpusetMems, ..} ) <$> f hostConfigCpusetMems +{-# INLINE hostConfigCpusetMemsL #-} + +-- | 'hostConfigDevices' Lens +hostConfigDevicesL :: Lens_' HostConfig (Maybe [DeviceMapping]) +hostConfigDevicesL f HostConfig{..} = (\hostConfigDevices -> HostConfig { hostConfigDevices, ..} ) <$> f hostConfigDevices +{-# INLINE hostConfigDevicesL #-} + +-- | 'hostConfigDeviceCgroupRules' Lens +hostConfigDeviceCgroupRulesL :: Lens_' HostConfig (Maybe [Text]) +hostConfigDeviceCgroupRulesL f HostConfig{..} = (\hostConfigDeviceCgroupRules -> HostConfig { hostConfigDeviceCgroupRules, ..} ) <$> f hostConfigDeviceCgroupRules +{-# INLINE hostConfigDeviceCgroupRulesL #-} + +-- | 'hostConfigDeviceRequests' Lens +hostConfigDeviceRequestsL :: Lens_' HostConfig (Maybe [DeviceRequest]) +hostConfigDeviceRequestsL f HostConfig{..} = (\hostConfigDeviceRequests -> HostConfig { hostConfigDeviceRequests, ..} ) <$> f hostConfigDeviceRequests +{-# INLINE hostConfigDeviceRequestsL #-} + +-- | 'hostConfigKernelMemoryTcp' Lens +hostConfigKernelMemoryTcpL :: Lens_' HostConfig (Maybe Integer) +hostConfigKernelMemoryTcpL f HostConfig{..} = (\hostConfigKernelMemoryTcp -> HostConfig { hostConfigKernelMemoryTcp, ..} ) <$> f hostConfigKernelMemoryTcp +{-# INLINE hostConfigKernelMemoryTcpL #-} + +-- | 'hostConfigMemoryReservation' Lens +hostConfigMemoryReservationL :: Lens_' HostConfig (Maybe Integer) +hostConfigMemoryReservationL f HostConfig{..} = (\hostConfigMemoryReservation -> HostConfig { hostConfigMemoryReservation, ..} ) <$> f hostConfigMemoryReservation +{-# INLINE hostConfigMemoryReservationL #-} + +-- | 'hostConfigMemorySwap' Lens +hostConfigMemorySwapL :: Lens_' HostConfig (Maybe Integer) +hostConfigMemorySwapL f HostConfig{..} = (\hostConfigMemorySwap -> HostConfig { hostConfigMemorySwap, ..} ) <$> f hostConfigMemorySwap +{-# INLINE hostConfigMemorySwapL #-} + +-- | 'hostConfigMemorySwappiness' Lens +hostConfigMemorySwappinessL :: Lens_' HostConfig (Maybe Integer) +hostConfigMemorySwappinessL f HostConfig{..} = (\hostConfigMemorySwappiness -> HostConfig { hostConfigMemorySwappiness, ..} ) <$> f hostConfigMemorySwappiness +{-# INLINE hostConfigMemorySwappinessL #-} + +-- | 'hostConfigNanoCpus' Lens +hostConfigNanoCpusL :: Lens_' HostConfig (Maybe Integer) +hostConfigNanoCpusL f HostConfig{..} = (\hostConfigNanoCpus -> HostConfig { hostConfigNanoCpus, ..} ) <$> f hostConfigNanoCpus +{-# INLINE hostConfigNanoCpusL #-} + +-- | 'hostConfigOomKillDisable' Lens +hostConfigOomKillDisableL :: Lens_' HostConfig (Maybe Bool) +hostConfigOomKillDisableL f HostConfig{..} = (\hostConfigOomKillDisable -> HostConfig { hostConfigOomKillDisable, ..} ) <$> f hostConfigOomKillDisable +{-# INLINE hostConfigOomKillDisableL #-} + +-- | 'hostConfigInit' Lens +hostConfigInitL :: Lens_' HostConfig (Maybe Bool) +hostConfigInitL f HostConfig{..} = (\hostConfigInit -> HostConfig { hostConfigInit, ..} ) <$> f hostConfigInit +{-# INLINE hostConfigInitL #-} + +-- | 'hostConfigPidsLimit' Lens +hostConfigPidsLimitL :: Lens_' HostConfig (Maybe Integer) +hostConfigPidsLimitL f HostConfig{..} = (\hostConfigPidsLimit -> HostConfig { hostConfigPidsLimit, ..} ) <$> f hostConfigPidsLimit +{-# INLINE hostConfigPidsLimitL #-} + +-- | 'hostConfigUlimits' Lens +hostConfigUlimitsL :: Lens_' HostConfig (Maybe [ResourcesUlimitsInner]) +hostConfigUlimitsL f HostConfig{..} = (\hostConfigUlimits -> HostConfig { hostConfigUlimits, ..} ) <$> f hostConfigUlimits +{-# INLINE hostConfigUlimitsL #-} + +-- | 'hostConfigCpuCount' Lens +hostConfigCpuCountL :: Lens_' HostConfig (Maybe Integer) +hostConfigCpuCountL f HostConfig{..} = (\hostConfigCpuCount -> HostConfig { hostConfigCpuCount, ..} ) <$> f hostConfigCpuCount +{-# INLINE hostConfigCpuCountL #-} + +-- | 'hostConfigCpuPercent' Lens +hostConfigCpuPercentL :: Lens_' HostConfig (Maybe Integer) +hostConfigCpuPercentL f HostConfig{..} = (\hostConfigCpuPercent -> HostConfig { hostConfigCpuPercent, ..} ) <$> f hostConfigCpuPercent +{-# INLINE hostConfigCpuPercentL #-} + +-- | 'hostConfigIoMaximumIOps' Lens +hostConfigIoMaximumIOpsL :: Lens_' HostConfig (Maybe Integer) +hostConfigIoMaximumIOpsL f HostConfig{..} = (\hostConfigIoMaximumIOps -> HostConfig { hostConfigIoMaximumIOps, ..} ) <$> f hostConfigIoMaximumIOps +{-# INLINE hostConfigIoMaximumIOpsL #-} + +-- | 'hostConfigIoMaximumBandwidth' Lens +hostConfigIoMaximumBandwidthL :: Lens_' HostConfig (Maybe Integer) +hostConfigIoMaximumBandwidthL f HostConfig{..} = (\hostConfigIoMaximumBandwidth -> HostConfig { hostConfigIoMaximumBandwidth, ..} ) <$> f hostConfigIoMaximumBandwidth +{-# INLINE hostConfigIoMaximumBandwidthL #-} + +-- | 'hostConfigBinds' Lens +hostConfigBindsL :: Lens_' HostConfig (Maybe [Text]) +hostConfigBindsL f HostConfig{..} = (\hostConfigBinds -> HostConfig { hostConfigBinds, ..} ) <$> f hostConfigBinds +{-# INLINE hostConfigBindsL #-} + +-- | 'hostConfigContainerIdFile' Lens +hostConfigContainerIdFileL :: Lens_' HostConfig (Maybe Text) +hostConfigContainerIdFileL f HostConfig{..} = (\hostConfigContainerIdFile -> HostConfig { hostConfigContainerIdFile, ..} ) <$> f hostConfigContainerIdFile +{-# INLINE hostConfigContainerIdFileL #-} + +-- | 'hostConfigLogConfig' Lens +hostConfigLogConfigL :: Lens_' HostConfig (Maybe HostConfigAllOfLogConfig) +hostConfigLogConfigL f HostConfig{..} = (\hostConfigLogConfig -> HostConfig { hostConfigLogConfig, ..} ) <$> f hostConfigLogConfig +{-# INLINE hostConfigLogConfigL #-} + +-- | 'hostConfigNetworkMode' Lens +hostConfigNetworkModeL :: Lens_' HostConfig (Maybe Text) +hostConfigNetworkModeL f HostConfig{..} = (\hostConfigNetworkMode -> HostConfig { hostConfigNetworkMode, ..} ) <$> f hostConfigNetworkMode +{-# INLINE hostConfigNetworkModeL #-} + +-- | 'hostConfigPortBindings' Lens +hostConfigPortBindingsL :: Lens_' HostConfig (Maybe (Map.Map String [PortBinding])) +hostConfigPortBindingsL f HostConfig{..} = (\hostConfigPortBindings -> HostConfig { hostConfigPortBindings, ..} ) <$> f hostConfigPortBindings +{-# INLINE hostConfigPortBindingsL #-} + +-- | 'hostConfigRestartPolicy' Lens +hostConfigRestartPolicyL :: Lens_' HostConfig (Maybe RestartPolicy) +hostConfigRestartPolicyL f HostConfig{..} = (\hostConfigRestartPolicy -> HostConfig { hostConfigRestartPolicy, ..} ) <$> f hostConfigRestartPolicy +{-# INLINE hostConfigRestartPolicyL #-} + +-- | 'hostConfigAutoRemove' Lens +hostConfigAutoRemoveL :: Lens_' HostConfig (Maybe Bool) +hostConfigAutoRemoveL f HostConfig{..} = (\hostConfigAutoRemove -> HostConfig { hostConfigAutoRemove, ..} ) <$> f hostConfigAutoRemove +{-# INLINE hostConfigAutoRemoveL #-} + +-- | 'hostConfigVolumeDriver' Lens +hostConfigVolumeDriverL :: Lens_' HostConfig (Maybe Text) +hostConfigVolumeDriverL f HostConfig{..} = (\hostConfigVolumeDriver -> HostConfig { hostConfigVolumeDriver, ..} ) <$> f hostConfigVolumeDriver +{-# INLINE hostConfigVolumeDriverL #-} + +-- | 'hostConfigVolumesFrom' Lens +hostConfigVolumesFromL :: Lens_' HostConfig (Maybe [Text]) +hostConfigVolumesFromL f HostConfig{..} = (\hostConfigVolumesFrom -> HostConfig { hostConfigVolumesFrom, ..} ) <$> f hostConfigVolumesFrom +{-# INLINE hostConfigVolumesFromL #-} + +-- | 'hostConfigMounts' Lens +hostConfigMountsL :: Lens_' HostConfig (Maybe [Mount]) +hostConfigMountsL f HostConfig{..} = (\hostConfigMounts -> HostConfig { hostConfigMounts, ..} ) <$> f hostConfigMounts +{-# INLINE hostConfigMountsL #-} + +-- | 'hostConfigConsoleSize' Lens +hostConfigConsoleSizeL :: Lens_' HostConfig (Maybe [Int]) +hostConfigConsoleSizeL f HostConfig{..} = (\hostConfigConsoleSize -> HostConfig { hostConfigConsoleSize, ..} ) <$> f hostConfigConsoleSize +{-# INLINE hostConfigConsoleSizeL #-} + +-- | 'hostConfigAnnotations' Lens +hostConfigAnnotationsL :: Lens_' HostConfig (Maybe (Map.Map String Text)) +hostConfigAnnotationsL f HostConfig{..} = (\hostConfigAnnotations -> HostConfig { hostConfigAnnotations, ..} ) <$> f hostConfigAnnotations +{-# INLINE hostConfigAnnotationsL #-} + +-- | 'hostConfigCapAdd' Lens +hostConfigCapAddL :: Lens_' HostConfig (Maybe [Text]) +hostConfigCapAddL f HostConfig{..} = (\hostConfigCapAdd -> HostConfig { hostConfigCapAdd, ..} ) <$> f hostConfigCapAdd +{-# INLINE hostConfigCapAddL #-} + +-- | 'hostConfigCapDrop' Lens +hostConfigCapDropL :: Lens_' HostConfig (Maybe [Text]) +hostConfigCapDropL f HostConfig{..} = (\hostConfigCapDrop -> HostConfig { hostConfigCapDrop, ..} ) <$> f hostConfigCapDrop +{-# INLINE hostConfigCapDropL #-} + +-- | 'hostConfigCgroupnsMode' Lens +hostConfigCgroupnsModeL :: Lens_' HostConfig (Maybe E'CgroupnsMode) +hostConfigCgroupnsModeL f HostConfig{..} = (\hostConfigCgroupnsMode -> HostConfig { hostConfigCgroupnsMode, ..} ) <$> f hostConfigCgroupnsMode +{-# INLINE hostConfigCgroupnsModeL #-} + +-- | 'hostConfigDns' Lens +hostConfigDnsL :: Lens_' HostConfig (Maybe [Text]) +hostConfigDnsL f HostConfig{..} = (\hostConfigDns -> HostConfig { hostConfigDns, ..} ) <$> f hostConfigDns +{-# INLINE hostConfigDnsL #-} + +-- | 'hostConfigDnsOptions' Lens +hostConfigDnsOptionsL :: Lens_' HostConfig (Maybe [Text]) +hostConfigDnsOptionsL f HostConfig{..} = (\hostConfigDnsOptions -> HostConfig { hostConfigDnsOptions, ..} ) <$> f hostConfigDnsOptions +{-# INLINE hostConfigDnsOptionsL #-} + +-- | 'hostConfigDnsSearch' Lens +hostConfigDnsSearchL :: Lens_' HostConfig (Maybe [Text]) +hostConfigDnsSearchL f HostConfig{..} = (\hostConfigDnsSearch -> HostConfig { hostConfigDnsSearch, ..} ) <$> f hostConfigDnsSearch +{-# INLINE hostConfigDnsSearchL #-} + +-- | 'hostConfigExtraHosts' Lens +hostConfigExtraHostsL :: Lens_' HostConfig (Maybe [Text]) +hostConfigExtraHostsL f HostConfig{..} = (\hostConfigExtraHosts -> HostConfig { hostConfigExtraHosts, ..} ) <$> f hostConfigExtraHosts +{-# INLINE hostConfigExtraHostsL #-} + +-- | 'hostConfigGroupAdd' Lens +hostConfigGroupAddL :: Lens_' HostConfig (Maybe [Text]) +hostConfigGroupAddL f HostConfig{..} = (\hostConfigGroupAdd -> HostConfig { hostConfigGroupAdd, ..} ) <$> f hostConfigGroupAdd +{-# INLINE hostConfigGroupAddL #-} + +-- | 'hostConfigIpcMode' Lens +hostConfigIpcModeL :: Lens_' HostConfig (Maybe Text) +hostConfigIpcModeL f HostConfig{..} = (\hostConfigIpcMode -> HostConfig { hostConfigIpcMode, ..} ) <$> f hostConfigIpcMode +{-# INLINE hostConfigIpcModeL #-} + +-- | 'hostConfigCgroup' Lens +hostConfigCgroupL :: Lens_' HostConfig (Maybe Text) +hostConfigCgroupL f HostConfig{..} = (\hostConfigCgroup -> HostConfig { hostConfigCgroup, ..} ) <$> f hostConfigCgroup +{-# INLINE hostConfigCgroupL #-} + +-- | 'hostConfigLinks' Lens +hostConfigLinksL :: Lens_' HostConfig (Maybe [Text]) +hostConfigLinksL f HostConfig{..} = (\hostConfigLinks -> HostConfig { hostConfigLinks, ..} ) <$> f hostConfigLinks +{-# INLINE hostConfigLinksL #-} + +-- | 'hostConfigOomScoreAdj' Lens +hostConfigOomScoreAdjL :: Lens_' HostConfig (Maybe Int) +hostConfigOomScoreAdjL f HostConfig{..} = (\hostConfigOomScoreAdj -> HostConfig { hostConfigOomScoreAdj, ..} ) <$> f hostConfigOomScoreAdj +{-# INLINE hostConfigOomScoreAdjL #-} + +-- | 'hostConfigPidMode' Lens +hostConfigPidModeL :: Lens_' HostConfig (Maybe Text) +hostConfigPidModeL f HostConfig{..} = (\hostConfigPidMode -> HostConfig { hostConfigPidMode, ..} ) <$> f hostConfigPidMode +{-# INLINE hostConfigPidModeL #-} + +-- | 'hostConfigPrivileged' Lens +hostConfigPrivilegedL :: Lens_' HostConfig (Maybe Bool) +hostConfigPrivilegedL f HostConfig{..} = (\hostConfigPrivileged -> HostConfig { hostConfigPrivileged, ..} ) <$> f hostConfigPrivileged +{-# INLINE hostConfigPrivilegedL #-} + +-- | 'hostConfigPublishAllPorts' Lens +hostConfigPublishAllPortsL :: Lens_' HostConfig (Maybe Bool) +hostConfigPublishAllPortsL f HostConfig{..} = (\hostConfigPublishAllPorts -> HostConfig { hostConfigPublishAllPorts, ..} ) <$> f hostConfigPublishAllPorts +{-# INLINE hostConfigPublishAllPortsL #-} + +-- | 'hostConfigReadonlyRootfs' Lens +hostConfigReadonlyRootfsL :: Lens_' HostConfig (Maybe Bool) +hostConfigReadonlyRootfsL f HostConfig{..} = (\hostConfigReadonlyRootfs -> HostConfig { hostConfigReadonlyRootfs, ..} ) <$> f hostConfigReadonlyRootfs +{-# INLINE hostConfigReadonlyRootfsL #-} + +-- | 'hostConfigSecurityOpt' Lens +hostConfigSecurityOptL :: Lens_' HostConfig (Maybe [Text]) +hostConfigSecurityOptL f HostConfig{..} = (\hostConfigSecurityOpt -> HostConfig { hostConfigSecurityOpt, ..} ) <$> f hostConfigSecurityOpt +{-# INLINE hostConfigSecurityOptL #-} + +-- | 'hostConfigStorageOpt' Lens +hostConfigStorageOptL :: Lens_' HostConfig (Maybe (Map.Map String Text)) +hostConfigStorageOptL f HostConfig{..} = (\hostConfigStorageOpt -> HostConfig { hostConfigStorageOpt, ..} ) <$> f hostConfigStorageOpt +{-# INLINE hostConfigStorageOptL #-} + +-- | 'hostConfigTmpfs' Lens +hostConfigTmpfsL :: Lens_' HostConfig (Maybe (Map.Map String Text)) +hostConfigTmpfsL f HostConfig{..} = (\hostConfigTmpfs -> HostConfig { hostConfigTmpfs, ..} ) <$> f hostConfigTmpfs +{-# INLINE hostConfigTmpfsL #-} + +-- | 'hostConfigUtsMode' Lens +hostConfigUtsModeL :: Lens_' HostConfig (Maybe Text) +hostConfigUtsModeL f HostConfig{..} = (\hostConfigUtsMode -> HostConfig { hostConfigUtsMode, ..} ) <$> f hostConfigUtsMode +{-# INLINE hostConfigUtsModeL #-} + +-- | 'hostConfigUsernsMode' Lens +hostConfigUsernsModeL :: Lens_' HostConfig (Maybe Text) +hostConfigUsernsModeL f HostConfig{..} = (\hostConfigUsernsMode -> HostConfig { hostConfigUsernsMode, ..} ) <$> f hostConfigUsernsMode +{-# INLINE hostConfigUsernsModeL #-} + +-- | 'hostConfigShmSize' Lens +hostConfigShmSizeL :: Lens_' HostConfig (Maybe Integer) +hostConfigShmSizeL f HostConfig{..} = (\hostConfigShmSize -> HostConfig { hostConfigShmSize, ..} ) <$> f hostConfigShmSize +{-# INLINE hostConfigShmSizeL #-} + +-- | 'hostConfigSysctls' Lens +hostConfigSysctlsL :: Lens_' HostConfig (Maybe (Map.Map String Text)) +hostConfigSysctlsL f HostConfig{..} = (\hostConfigSysctls -> HostConfig { hostConfigSysctls, ..} ) <$> f hostConfigSysctls +{-# INLINE hostConfigSysctlsL #-} + +-- | 'hostConfigRuntime' Lens +hostConfigRuntimeL :: Lens_' HostConfig (Maybe Text) +hostConfigRuntimeL f HostConfig{..} = (\hostConfigRuntime -> HostConfig { hostConfigRuntime, ..} ) <$> f hostConfigRuntime +{-# INLINE hostConfigRuntimeL #-} + +-- | 'hostConfigIsolation' Lens +hostConfigIsolationL :: Lens_' HostConfig (Maybe E'Isolation) +hostConfigIsolationL f HostConfig{..} = (\hostConfigIsolation -> HostConfig { hostConfigIsolation, ..} ) <$> f hostConfigIsolation +{-# INLINE hostConfigIsolationL #-} + +-- | 'hostConfigMaskedPaths' Lens +hostConfigMaskedPathsL :: Lens_' HostConfig (Maybe [Text]) +hostConfigMaskedPathsL f HostConfig{..} = (\hostConfigMaskedPaths -> HostConfig { hostConfigMaskedPaths, ..} ) <$> f hostConfigMaskedPaths +{-# INLINE hostConfigMaskedPathsL #-} + +-- | 'hostConfigReadonlyPaths' Lens +hostConfigReadonlyPathsL :: Lens_' HostConfig (Maybe [Text]) +hostConfigReadonlyPathsL f HostConfig{..} = (\hostConfigReadonlyPaths -> HostConfig { hostConfigReadonlyPaths, ..} ) <$> f hostConfigReadonlyPaths +{-# INLINE hostConfigReadonlyPathsL #-} + + + +-- * HostConfigAllOfLogConfig + +-- | 'hostConfigAllOfLogConfigType' Lens +hostConfigAllOfLogConfigTypeL :: Lens_' HostConfigAllOfLogConfig (Maybe E'Type5) +hostConfigAllOfLogConfigTypeL f HostConfigAllOfLogConfig{..} = (\hostConfigAllOfLogConfigType -> HostConfigAllOfLogConfig { hostConfigAllOfLogConfigType, ..} ) <$> f hostConfigAllOfLogConfigType +{-# INLINE hostConfigAllOfLogConfigTypeL #-} + +-- | 'hostConfigAllOfLogConfigConfig' Lens +hostConfigAllOfLogConfigConfigL :: Lens_' HostConfigAllOfLogConfig (Maybe (Map.Map String Text)) +hostConfigAllOfLogConfigConfigL f HostConfigAllOfLogConfig{..} = (\hostConfigAllOfLogConfigConfig -> HostConfigAllOfLogConfig { hostConfigAllOfLogConfigConfig, ..} ) <$> f hostConfigAllOfLogConfigConfig +{-# INLINE hostConfigAllOfLogConfigConfigL #-} + + + +-- * IPAM + +-- | 'iPAMDriver' Lens +iPAMDriverL :: Lens_' IPAM (Maybe Text) +iPAMDriverL f IPAM{..} = (\iPAMDriver -> IPAM { iPAMDriver, ..} ) <$> f iPAMDriver +{-# INLINE iPAMDriverL #-} + +-- | 'iPAMConfig' Lens +iPAMConfigL :: Lens_' IPAM (Maybe [IPAMConfig]) +iPAMConfigL f IPAM{..} = (\iPAMConfig -> IPAM { iPAMConfig, ..} ) <$> f iPAMConfig +{-# INLINE iPAMConfigL #-} + +-- | 'iPAMOptions' Lens +iPAMOptionsL :: Lens_' IPAM (Maybe (Map.Map String Text)) +iPAMOptionsL f IPAM{..} = (\iPAMOptions -> IPAM { iPAMOptions, ..} ) <$> f iPAMOptions +{-# INLINE iPAMOptionsL #-} + + + +-- * IPAMConfig + +-- | 'iPAMConfigSubnet' Lens +iPAMConfigSubnetL :: Lens_' IPAMConfig (Maybe Text) +iPAMConfigSubnetL f IPAMConfig{..} = (\iPAMConfigSubnet -> IPAMConfig { iPAMConfigSubnet, ..} ) <$> f iPAMConfigSubnet +{-# INLINE iPAMConfigSubnetL #-} + +-- | 'iPAMConfigIpRange' Lens +iPAMConfigIpRangeL :: Lens_' IPAMConfig (Maybe Text) +iPAMConfigIpRangeL f IPAMConfig{..} = (\iPAMConfigIpRange -> IPAMConfig { iPAMConfigIpRange, ..} ) <$> f iPAMConfigIpRange +{-# INLINE iPAMConfigIpRangeL #-} + +-- | 'iPAMConfigGateway' Lens +iPAMConfigGatewayL :: Lens_' IPAMConfig (Maybe Text) +iPAMConfigGatewayL f IPAMConfig{..} = (\iPAMConfigGateway -> IPAMConfig { iPAMConfigGateway, ..} ) <$> f iPAMConfigGateway +{-# INLINE iPAMConfigGatewayL #-} + +-- | 'iPAMConfigAuxiliaryAddresses' Lens +iPAMConfigAuxiliaryAddressesL :: Lens_' IPAMConfig (Maybe (Map.Map String Text)) +iPAMConfigAuxiliaryAddressesL f IPAMConfig{..} = (\iPAMConfigAuxiliaryAddresses -> IPAMConfig { iPAMConfigAuxiliaryAddresses, ..} ) <$> f iPAMConfigAuxiliaryAddresses +{-# INLINE iPAMConfigAuxiliaryAddressesL #-} + + + +-- * IdResponse + +-- | 'idResponseId' Lens +idResponseIdL :: Lens_' IdResponse (Text) +idResponseIdL f IdResponse{..} = (\idResponseId -> IdResponse { idResponseId, ..} ) <$> f idResponseId +{-# INLINE idResponseIdL #-} + + + +-- * ImageConfig + +-- | 'imageConfigHostname' Lens +imageConfigHostnameL :: Lens_' ImageConfig (Maybe Text) +imageConfigHostnameL f ImageConfig{..} = (\imageConfigHostname -> ImageConfig { imageConfigHostname, ..} ) <$> f imageConfigHostname +{-# INLINE imageConfigHostnameL #-} + +-- | 'imageConfigDomainname' Lens +imageConfigDomainnameL :: Lens_' ImageConfig (Maybe Text) +imageConfigDomainnameL f ImageConfig{..} = (\imageConfigDomainname -> ImageConfig { imageConfigDomainname, ..} ) <$> f imageConfigDomainname +{-# INLINE imageConfigDomainnameL #-} + +-- | 'imageConfigUser' Lens +imageConfigUserL :: Lens_' ImageConfig (Maybe Text) +imageConfigUserL f ImageConfig{..} = (\imageConfigUser -> ImageConfig { imageConfigUser, ..} ) <$> f imageConfigUser +{-# INLINE imageConfigUserL #-} + +-- | 'imageConfigAttachStdin' Lens +imageConfigAttachStdinL :: Lens_' ImageConfig (Maybe Bool) +imageConfigAttachStdinL f ImageConfig{..} = (\imageConfigAttachStdin -> ImageConfig { imageConfigAttachStdin, ..} ) <$> f imageConfigAttachStdin +{-# INLINE imageConfigAttachStdinL #-} + +-- | 'imageConfigAttachStdout' Lens +imageConfigAttachStdoutL :: Lens_' ImageConfig (Maybe Bool) +imageConfigAttachStdoutL f ImageConfig{..} = (\imageConfigAttachStdout -> ImageConfig { imageConfigAttachStdout, ..} ) <$> f imageConfigAttachStdout +{-# INLINE imageConfigAttachStdoutL #-} + +-- | 'imageConfigAttachStderr' Lens +imageConfigAttachStderrL :: Lens_' ImageConfig (Maybe Bool) +imageConfigAttachStderrL f ImageConfig{..} = (\imageConfigAttachStderr -> ImageConfig { imageConfigAttachStderr, ..} ) <$> f imageConfigAttachStderr +{-# INLINE imageConfigAttachStderrL #-} + +-- | 'imageConfigExposedPorts' Lens +imageConfigExposedPortsL :: Lens_' ImageConfig (Maybe (Map.Map String A.Value)) +imageConfigExposedPortsL f ImageConfig{..} = (\imageConfigExposedPorts -> ImageConfig { imageConfigExposedPorts, ..} ) <$> f imageConfigExposedPorts +{-# INLINE imageConfigExposedPortsL #-} + +-- | 'imageConfigTty' Lens +imageConfigTtyL :: Lens_' ImageConfig (Maybe Bool) +imageConfigTtyL f ImageConfig{..} = (\imageConfigTty -> ImageConfig { imageConfigTty, ..} ) <$> f imageConfigTty +{-# INLINE imageConfigTtyL #-} + +-- | 'imageConfigOpenStdin' Lens +imageConfigOpenStdinL :: Lens_' ImageConfig (Maybe Bool) +imageConfigOpenStdinL f ImageConfig{..} = (\imageConfigOpenStdin -> ImageConfig { imageConfigOpenStdin, ..} ) <$> f imageConfigOpenStdin +{-# INLINE imageConfigOpenStdinL #-} + +-- | 'imageConfigStdinOnce' Lens +imageConfigStdinOnceL :: Lens_' ImageConfig (Maybe Bool) +imageConfigStdinOnceL f ImageConfig{..} = (\imageConfigStdinOnce -> ImageConfig { imageConfigStdinOnce, ..} ) <$> f imageConfigStdinOnce +{-# INLINE imageConfigStdinOnceL #-} + +-- | 'imageConfigEnv' Lens +imageConfigEnvL :: Lens_' ImageConfig (Maybe [Text]) +imageConfigEnvL f ImageConfig{..} = (\imageConfigEnv -> ImageConfig { imageConfigEnv, ..} ) <$> f imageConfigEnv +{-# INLINE imageConfigEnvL #-} + +-- | 'imageConfigCmd' Lens +imageConfigCmdL :: Lens_' ImageConfig (Maybe [Text]) +imageConfigCmdL f ImageConfig{..} = (\imageConfigCmd -> ImageConfig { imageConfigCmd, ..} ) <$> f imageConfigCmd +{-# INLINE imageConfigCmdL #-} + +-- | 'imageConfigHealthcheck' Lens +imageConfigHealthcheckL :: Lens_' ImageConfig (Maybe HealthConfig) +imageConfigHealthcheckL f ImageConfig{..} = (\imageConfigHealthcheck -> ImageConfig { imageConfigHealthcheck, ..} ) <$> f imageConfigHealthcheck +{-# INLINE imageConfigHealthcheckL #-} + +-- | 'imageConfigArgsEscaped' Lens +imageConfigArgsEscapedL :: Lens_' ImageConfig (Maybe Bool) +imageConfigArgsEscapedL f ImageConfig{..} = (\imageConfigArgsEscaped -> ImageConfig { imageConfigArgsEscaped, ..} ) <$> f imageConfigArgsEscaped +{-# INLINE imageConfigArgsEscapedL #-} + +-- | 'imageConfigImage' Lens +imageConfigImageL :: Lens_' ImageConfig (Maybe Text) +imageConfigImageL f ImageConfig{..} = (\imageConfigImage -> ImageConfig { imageConfigImage, ..} ) <$> f imageConfigImage +{-# INLINE imageConfigImageL #-} + +-- | 'imageConfigVolumes' Lens +imageConfigVolumesL :: Lens_' ImageConfig (Maybe (Map.Map String A.Value)) +imageConfigVolumesL f ImageConfig{..} = (\imageConfigVolumes -> ImageConfig { imageConfigVolumes, ..} ) <$> f imageConfigVolumes +{-# INLINE imageConfigVolumesL #-} + +-- | 'imageConfigWorkingDir' Lens +imageConfigWorkingDirL :: Lens_' ImageConfig (Maybe Text) +imageConfigWorkingDirL f ImageConfig{..} = (\imageConfigWorkingDir -> ImageConfig { imageConfigWorkingDir, ..} ) <$> f imageConfigWorkingDir +{-# INLINE imageConfigWorkingDirL #-} + +-- | 'imageConfigEntrypoint' Lens +imageConfigEntrypointL :: Lens_' ImageConfig (Maybe [Text]) +imageConfigEntrypointL f ImageConfig{..} = (\imageConfigEntrypoint -> ImageConfig { imageConfigEntrypoint, ..} ) <$> f imageConfigEntrypoint +{-# INLINE imageConfigEntrypointL #-} + +-- | 'imageConfigNetworkDisabled' Lens +imageConfigNetworkDisabledL :: Lens_' ImageConfig (Maybe Bool) +imageConfigNetworkDisabledL f ImageConfig{..} = (\imageConfigNetworkDisabled -> ImageConfig { imageConfigNetworkDisabled, ..} ) <$> f imageConfigNetworkDisabled +{-# INLINE imageConfigNetworkDisabledL #-} + +-- | 'imageConfigMacAddress' Lens +imageConfigMacAddressL :: Lens_' ImageConfig (Maybe Text) +imageConfigMacAddressL f ImageConfig{..} = (\imageConfigMacAddress -> ImageConfig { imageConfigMacAddress, ..} ) <$> f imageConfigMacAddress +{-# INLINE imageConfigMacAddressL #-} + +-- | 'imageConfigOnBuild' Lens +imageConfigOnBuildL :: Lens_' ImageConfig (Maybe [Text]) +imageConfigOnBuildL f ImageConfig{..} = (\imageConfigOnBuild -> ImageConfig { imageConfigOnBuild, ..} ) <$> f imageConfigOnBuild +{-# INLINE imageConfigOnBuildL #-} + +-- | 'imageConfigLabels' Lens +imageConfigLabelsL :: Lens_' ImageConfig (Maybe (Map.Map String Text)) +imageConfigLabelsL f ImageConfig{..} = (\imageConfigLabels -> ImageConfig { imageConfigLabels, ..} ) <$> f imageConfigLabels +{-# INLINE imageConfigLabelsL #-} + +-- | 'imageConfigStopSignal' Lens +imageConfigStopSignalL :: Lens_' ImageConfig (Maybe Text) +imageConfigStopSignalL f ImageConfig{..} = (\imageConfigStopSignal -> ImageConfig { imageConfigStopSignal, ..} ) <$> f imageConfigStopSignal +{-# INLINE imageConfigStopSignalL #-} + +-- | 'imageConfigStopTimeout' Lens +imageConfigStopTimeoutL :: Lens_' ImageConfig (Maybe Int) +imageConfigStopTimeoutL f ImageConfig{..} = (\imageConfigStopTimeout -> ImageConfig { imageConfigStopTimeout, ..} ) <$> f imageConfigStopTimeout +{-# INLINE imageConfigStopTimeoutL #-} + +-- | 'imageConfigShell' Lens +imageConfigShellL :: Lens_' ImageConfig (Maybe [Text]) +imageConfigShellL f ImageConfig{..} = (\imageConfigShell -> ImageConfig { imageConfigShell, ..} ) <$> f imageConfigShell +{-# INLINE imageConfigShellL #-} + + + +-- * ImageDeleteResponseItem + +-- | 'imageDeleteResponseItemUntagged' Lens +imageDeleteResponseItemUntaggedL :: Lens_' ImageDeleteResponseItem (Maybe Text) +imageDeleteResponseItemUntaggedL f ImageDeleteResponseItem{..} = (\imageDeleteResponseItemUntagged -> ImageDeleteResponseItem { imageDeleteResponseItemUntagged, ..} ) <$> f imageDeleteResponseItemUntagged +{-# INLINE imageDeleteResponseItemUntaggedL #-} + +-- | 'imageDeleteResponseItemDeleted' Lens +imageDeleteResponseItemDeletedL :: Lens_' ImageDeleteResponseItem (Maybe Text) +imageDeleteResponseItemDeletedL f ImageDeleteResponseItem{..} = (\imageDeleteResponseItemDeleted -> ImageDeleteResponseItem { imageDeleteResponseItemDeleted, ..} ) <$> f imageDeleteResponseItemDeleted +{-# INLINE imageDeleteResponseItemDeletedL #-} + + + +-- * ImageID + +-- | 'imageIDId' Lens +imageIDIdL :: Lens_' ImageID (Maybe Text) +imageIDIdL f ImageID{..} = (\imageIDId -> ImageID { imageIDId, ..} ) <$> f imageIDId +{-# INLINE imageIDIdL #-} + + + +-- * ImageInspect + +-- | 'imageInspectId' Lens +imageInspectIdL :: Lens_' ImageInspect (Maybe Text) +imageInspectIdL f ImageInspect{..} = (\imageInspectId -> ImageInspect { imageInspectId, ..} ) <$> f imageInspectId +{-# INLINE imageInspectIdL #-} + +-- | 'imageInspectRepoTags' Lens +imageInspectRepoTagsL :: Lens_' ImageInspect (Maybe [Text]) +imageInspectRepoTagsL f ImageInspect{..} = (\imageInspectRepoTags -> ImageInspect { imageInspectRepoTags, ..} ) <$> f imageInspectRepoTags +{-# INLINE imageInspectRepoTagsL #-} + +-- | 'imageInspectRepoDigests' Lens +imageInspectRepoDigestsL :: Lens_' ImageInspect (Maybe [Text]) +imageInspectRepoDigestsL f ImageInspect{..} = (\imageInspectRepoDigests -> ImageInspect { imageInspectRepoDigests, ..} ) <$> f imageInspectRepoDigests +{-# INLINE imageInspectRepoDigestsL #-} + +-- | 'imageInspectParent' Lens +imageInspectParentL :: Lens_' ImageInspect (Maybe Text) +imageInspectParentL f ImageInspect{..} = (\imageInspectParent -> ImageInspect { imageInspectParent, ..} ) <$> f imageInspectParent +{-# INLINE imageInspectParentL #-} + +-- | 'imageInspectComment' Lens +imageInspectCommentL :: Lens_' ImageInspect (Maybe Text) +imageInspectCommentL f ImageInspect{..} = (\imageInspectComment -> ImageInspect { imageInspectComment, ..} ) <$> f imageInspectComment +{-# INLINE imageInspectCommentL #-} + +-- | 'imageInspectCreated' Lens +imageInspectCreatedL :: Lens_' ImageInspect (Maybe Text) +imageInspectCreatedL f ImageInspect{..} = (\imageInspectCreated -> ImageInspect { imageInspectCreated, ..} ) <$> f imageInspectCreated +{-# INLINE imageInspectCreatedL #-} + +-- | 'imageInspectDockerVersion' Lens +imageInspectDockerVersionL :: Lens_' ImageInspect (Maybe Text) +imageInspectDockerVersionL f ImageInspect{..} = (\imageInspectDockerVersion -> ImageInspect { imageInspectDockerVersion, ..} ) <$> f imageInspectDockerVersion +{-# INLINE imageInspectDockerVersionL #-} + +-- | 'imageInspectAuthor' Lens +imageInspectAuthorL :: Lens_' ImageInspect (Maybe Text) +imageInspectAuthorL f ImageInspect{..} = (\imageInspectAuthor -> ImageInspect { imageInspectAuthor, ..} ) <$> f imageInspectAuthor +{-# INLINE imageInspectAuthorL #-} + +-- | 'imageInspectConfig' Lens +imageInspectConfigL :: Lens_' ImageInspect (Maybe ImageConfig) +imageInspectConfigL f ImageInspect{..} = (\imageInspectConfig -> ImageInspect { imageInspectConfig, ..} ) <$> f imageInspectConfig +{-# INLINE imageInspectConfigL #-} + +-- | 'imageInspectArchitecture' Lens +imageInspectArchitectureL :: Lens_' ImageInspect (Maybe Text) +imageInspectArchitectureL f ImageInspect{..} = (\imageInspectArchitecture -> ImageInspect { imageInspectArchitecture, ..} ) <$> f imageInspectArchitecture +{-# INLINE imageInspectArchitectureL #-} + +-- | 'imageInspectVariant' Lens +imageInspectVariantL :: Lens_' ImageInspect (Maybe Text) +imageInspectVariantL f ImageInspect{..} = (\imageInspectVariant -> ImageInspect { imageInspectVariant, ..} ) <$> f imageInspectVariant +{-# INLINE imageInspectVariantL #-} + +-- | 'imageInspectOs' Lens +imageInspectOsL :: Lens_' ImageInspect (Maybe Text) +imageInspectOsL f ImageInspect{..} = (\imageInspectOs -> ImageInspect { imageInspectOs, ..} ) <$> f imageInspectOs +{-# INLINE imageInspectOsL #-} + +-- | 'imageInspectOsVersion' Lens +imageInspectOsVersionL :: Lens_' ImageInspect (Maybe Text) +imageInspectOsVersionL f ImageInspect{..} = (\imageInspectOsVersion -> ImageInspect { imageInspectOsVersion, ..} ) <$> f imageInspectOsVersion +{-# INLINE imageInspectOsVersionL #-} + +-- | 'imageInspectSize' Lens +imageInspectSizeL :: Lens_' ImageInspect (Maybe Integer) +imageInspectSizeL f ImageInspect{..} = (\imageInspectSize -> ImageInspect { imageInspectSize, ..} ) <$> f imageInspectSize +{-# INLINE imageInspectSizeL #-} + +-- | 'imageInspectVirtualSize' Lens +imageInspectVirtualSizeL :: Lens_' ImageInspect (Maybe Integer) +imageInspectVirtualSizeL f ImageInspect{..} = (\imageInspectVirtualSize -> ImageInspect { imageInspectVirtualSize, ..} ) <$> f imageInspectVirtualSize +{-# INLINE imageInspectVirtualSizeL #-} + +-- | 'imageInspectGraphDriver' Lens +imageInspectGraphDriverL :: Lens_' ImageInspect (Maybe GraphDriverData) +imageInspectGraphDriverL f ImageInspect{..} = (\imageInspectGraphDriver -> ImageInspect { imageInspectGraphDriver, ..} ) <$> f imageInspectGraphDriver +{-# INLINE imageInspectGraphDriverL #-} + +-- | 'imageInspectRootFs' Lens +imageInspectRootFsL :: Lens_' ImageInspect (Maybe ImageInspectRootFS) +imageInspectRootFsL f ImageInspect{..} = (\imageInspectRootFs -> ImageInspect { imageInspectRootFs, ..} ) <$> f imageInspectRootFs +{-# INLINE imageInspectRootFsL #-} + +-- | 'imageInspectMetadata' Lens +imageInspectMetadataL :: Lens_' ImageInspect (Maybe ImageInspectMetadata) +imageInspectMetadataL f ImageInspect{..} = (\imageInspectMetadata -> ImageInspect { imageInspectMetadata, ..} ) <$> f imageInspectMetadata +{-# INLINE imageInspectMetadataL #-} + + + +-- * ImageInspectMetadata + +-- | 'imageInspectMetadataLastTagTime' Lens +imageInspectMetadataLastTagTimeL :: Lens_' ImageInspectMetadata (Maybe Text) +imageInspectMetadataLastTagTimeL f ImageInspectMetadata{..} = (\imageInspectMetadataLastTagTime -> ImageInspectMetadata { imageInspectMetadataLastTagTime, ..} ) <$> f imageInspectMetadataLastTagTime +{-# INLINE imageInspectMetadataLastTagTimeL #-} + + + +-- * ImageInspectRootFS + +-- | 'imageInspectRootFSType' Lens +imageInspectRootFSTypeL :: Lens_' ImageInspectRootFS (Text) +imageInspectRootFSTypeL f ImageInspectRootFS{..} = (\imageInspectRootFSType -> ImageInspectRootFS { imageInspectRootFSType, ..} ) <$> f imageInspectRootFSType +{-# INLINE imageInspectRootFSTypeL #-} + +-- | 'imageInspectRootFSLayers' Lens +imageInspectRootFSLayersL :: Lens_' ImageInspectRootFS (Maybe [Text]) +imageInspectRootFSLayersL f ImageInspectRootFS{..} = (\imageInspectRootFSLayers -> ImageInspectRootFS { imageInspectRootFSLayers, ..} ) <$> f imageInspectRootFSLayers +{-# INLINE imageInspectRootFSLayersL #-} + + + +-- * ImagePruneResponse + +-- | 'imagePruneResponseImagesDeleted' Lens +imagePruneResponseImagesDeletedL :: Lens_' ImagePruneResponse (Maybe [ImageDeleteResponseItem]) +imagePruneResponseImagesDeletedL f ImagePruneResponse{..} = (\imagePruneResponseImagesDeleted -> ImagePruneResponse { imagePruneResponseImagesDeleted, ..} ) <$> f imagePruneResponseImagesDeleted +{-# INLINE imagePruneResponseImagesDeletedL #-} + +-- | 'imagePruneResponseSpaceReclaimed' Lens +imagePruneResponseSpaceReclaimedL :: Lens_' ImagePruneResponse (Maybe Integer) +imagePruneResponseSpaceReclaimedL f ImagePruneResponse{..} = (\imagePruneResponseSpaceReclaimed -> ImagePruneResponse { imagePruneResponseSpaceReclaimed, ..} ) <$> f imagePruneResponseSpaceReclaimed +{-# INLINE imagePruneResponseSpaceReclaimedL #-} + + + +-- * ImageSearchResponseItem + +-- | 'imageSearchResponseItemDescription' Lens +imageSearchResponseItemDescriptionL :: Lens_' ImageSearchResponseItem (Maybe Text) +imageSearchResponseItemDescriptionL f ImageSearchResponseItem{..} = (\imageSearchResponseItemDescription -> ImageSearchResponseItem { imageSearchResponseItemDescription, ..} ) <$> f imageSearchResponseItemDescription +{-# INLINE imageSearchResponseItemDescriptionL #-} + +-- | 'imageSearchResponseItemIsOfficial' Lens +imageSearchResponseItemIsOfficialL :: Lens_' ImageSearchResponseItem (Maybe Bool) +imageSearchResponseItemIsOfficialL f ImageSearchResponseItem{..} = (\imageSearchResponseItemIsOfficial -> ImageSearchResponseItem { imageSearchResponseItemIsOfficial, ..} ) <$> f imageSearchResponseItemIsOfficial +{-# INLINE imageSearchResponseItemIsOfficialL #-} + +-- | 'imageSearchResponseItemIsAutomated' Lens +imageSearchResponseItemIsAutomatedL :: Lens_' ImageSearchResponseItem (Maybe Bool) +imageSearchResponseItemIsAutomatedL f ImageSearchResponseItem{..} = (\imageSearchResponseItemIsAutomated -> ImageSearchResponseItem { imageSearchResponseItemIsAutomated, ..} ) <$> f imageSearchResponseItemIsAutomated +{-# INLINE imageSearchResponseItemIsAutomatedL #-} + +-- | 'imageSearchResponseItemName' Lens +imageSearchResponseItemNameL :: Lens_' ImageSearchResponseItem (Maybe Text) +imageSearchResponseItemNameL f ImageSearchResponseItem{..} = (\imageSearchResponseItemName -> ImageSearchResponseItem { imageSearchResponseItemName, ..} ) <$> f imageSearchResponseItemName +{-# INLINE imageSearchResponseItemNameL #-} + +-- | 'imageSearchResponseItemStarCount' Lens +imageSearchResponseItemStarCountL :: Lens_' ImageSearchResponseItem (Maybe Int) +imageSearchResponseItemStarCountL f ImageSearchResponseItem{..} = (\imageSearchResponseItemStarCount -> ImageSearchResponseItem { imageSearchResponseItemStarCount, ..} ) <$> f imageSearchResponseItemStarCount +{-# INLINE imageSearchResponseItemStarCountL #-} + + + +-- * ImageSummary + +-- | 'imageSummaryId' Lens +imageSummaryIdL :: Lens_' ImageSummary (Text) +imageSummaryIdL f ImageSummary{..} = (\imageSummaryId -> ImageSummary { imageSummaryId, ..} ) <$> f imageSummaryId +{-# INLINE imageSummaryIdL #-} + +-- | 'imageSummaryParentId' Lens +imageSummaryParentIdL :: Lens_' ImageSummary (Text) +imageSummaryParentIdL f ImageSummary{..} = (\imageSummaryParentId -> ImageSummary { imageSummaryParentId, ..} ) <$> f imageSummaryParentId +{-# INLINE imageSummaryParentIdL #-} + +-- | 'imageSummaryRepoTags' Lens +imageSummaryRepoTagsL :: Lens_' ImageSummary ([Text]) +imageSummaryRepoTagsL f ImageSummary{..} = (\imageSummaryRepoTags -> ImageSummary { imageSummaryRepoTags, ..} ) <$> f imageSummaryRepoTags +{-# INLINE imageSummaryRepoTagsL #-} + +-- | 'imageSummaryRepoDigests' Lens +imageSummaryRepoDigestsL :: Lens_' ImageSummary ([Text]) +imageSummaryRepoDigestsL f ImageSummary{..} = (\imageSummaryRepoDigests -> ImageSummary { imageSummaryRepoDigests, ..} ) <$> f imageSummaryRepoDigests +{-# INLINE imageSummaryRepoDigestsL #-} + +-- | 'imageSummaryCreated' Lens +imageSummaryCreatedL :: Lens_' ImageSummary (Int) +imageSummaryCreatedL f ImageSummary{..} = (\imageSummaryCreated -> ImageSummary { imageSummaryCreated, ..} ) <$> f imageSummaryCreated +{-# INLINE imageSummaryCreatedL #-} + +-- | 'imageSummarySize' Lens +imageSummarySizeL :: Lens_' ImageSummary (Integer) +imageSummarySizeL f ImageSummary{..} = (\imageSummarySize -> ImageSummary { imageSummarySize, ..} ) <$> f imageSummarySize +{-# INLINE imageSummarySizeL #-} + +-- | 'imageSummarySharedSize' Lens +imageSummarySharedSizeL :: Lens_' ImageSummary (Integer) +imageSummarySharedSizeL f ImageSummary{..} = (\imageSummarySharedSize -> ImageSummary { imageSummarySharedSize, ..} ) <$> f imageSummarySharedSize +{-# INLINE imageSummarySharedSizeL #-} + +-- | 'imageSummaryVirtualSize' Lens +imageSummaryVirtualSizeL :: Lens_' ImageSummary (Maybe Integer) +imageSummaryVirtualSizeL f ImageSummary{..} = (\imageSummaryVirtualSize -> ImageSummary { imageSummaryVirtualSize, ..} ) <$> f imageSummaryVirtualSize +{-# INLINE imageSummaryVirtualSizeL #-} + +-- | 'imageSummaryLabels' Lens +imageSummaryLabelsL :: Lens_' ImageSummary ((Map.Map String Text)) +imageSummaryLabelsL f ImageSummary{..} = (\imageSummaryLabels -> ImageSummary { imageSummaryLabels, ..} ) <$> f imageSummaryLabels +{-# INLINE imageSummaryLabelsL #-} + +-- | 'imageSummaryContainers' Lens +imageSummaryContainersL :: Lens_' ImageSummary (Int) +imageSummaryContainersL f ImageSummary{..} = (\imageSummaryContainers -> ImageSummary { imageSummaryContainers, ..} ) <$> f imageSummaryContainers +{-# INLINE imageSummaryContainersL #-} + + + +-- * IndexInfo + +-- | 'indexInfoName' Lens +indexInfoNameL :: Lens_' IndexInfo (Maybe Text) +indexInfoNameL f IndexInfo{..} = (\indexInfoName -> IndexInfo { indexInfoName, ..} ) <$> f indexInfoName +{-# INLINE indexInfoNameL #-} + +-- | 'indexInfoMirrors' Lens +indexInfoMirrorsL :: Lens_' IndexInfo (Maybe [Text]) +indexInfoMirrorsL f IndexInfo{..} = (\indexInfoMirrors -> IndexInfo { indexInfoMirrors, ..} ) <$> f indexInfoMirrors +{-# INLINE indexInfoMirrorsL #-} + +-- | 'indexInfoSecure' Lens +indexInfoSecureL :: Lens_' IndexInfo (Maybe Bool) +indexInfoSecureL f IndexInfo{..} = (\indexInfoSecure -> IndexInfo { indexInfoSecure, ..} ) <$> f indexInfoSecure +{-# INLINE indexInfoSecureL #-} + +-- | 'indexInfoOfficial' Lens +indexInfoOfficialL :: Lens_' IndexInfo (Maybe Bool) +indexInfoOfficialL f IndexInfo{..} = (\indexInfoOfficial -> IndexInfo { indexInfoOfficial, ..} ) <$> f indexInfoOfficial +{-# INLINE indexInfoOfficialL #-} + + + +-- * JoinTokens + +-- | 'joinTokensWorker' Lens +joinTokensWorkerL :: Lens_' JoinTokens (Maybe Text) +joinTokensWorkerL f JoinTokens{..} = (\joinTokensWorker -> JoinTokens { joinTokensWorker, ..} ) <$> f joinTokensWorker +{-# INLINE joinTokensWorkerL #-} + +-- | 'joinTokensManager' Lens +joinTokensManagerL :: Lens_' JoinTokens (Maybe Text) +joinTokensManagerL f JoinTokens{..} = (\joinTokensManager -> JoinTokens { joinTokensManager, ..} ) <$> f joinTokensManager +{-# INLINE joinTokensManagerL #-} + + + +-- * Limit + +-- | 'limitNanoCpus' Lens +limitNanoCpusL :: Lens_' Limit (Maybe Integer) +limitNanoCpusL f Limit{..} = (\limitNanoCpus -> Limit { limitNanoCpus, ..} ) <$> f limitNanoCpus +{-# INLINE limitNanoCpusL #-} + +-- | 'limitMemoryBytes' Lens +limitMemoryBytesL :: Lens_' Limit (Maybe Integer) +limitMemoryBytesL f Limit{..} = (\limitMemoryBytes -> Limit { limitMemoryBytes, ..} ) <$> f limitMemoryBytes +{-# INLINE limitMemoryBytesL #-} + +-- | 'limitPids' Lens +limitPidsL :: Lens_' Limit (Maybe Integer) +limitPidsL f Limit{..} = (\limitPids -> Limit { limitPids, ..} ) <$> f limitPids +{-# INLINE limitPidsL #-} + + + +-- * LocalNodeState + + + +-- * ManagerStatus + +-- | 'managerStatusLeader' Lens +managerStatusLeaderL :: Lens_' ManagerStatus (Maybe Bool) +managerStatusLeaderL f ManagerStatus{..} = (\managerStatusLeader -> ManagerStatus { managerStatusLeader, ..} ) <$> f managerStatusLeader +{-# INLINE managerStatusLeaderL #-} + +-- | 'managerStatusReachability' Lens +managerStatusReachabilityL :: Lens_' ManagerStatus (Maybe Reachability) +managerStatusReachabilityL f ManagerStatus{..} = (\managerStatusReachability -> ManagerStatus { managerStatusReachability, ..} ) <$> f managerStatusReachability +{-# INLINE managerStatusReachabilityL #-} + +-- | 'managerStatusAddr' Lens +managerStatusAddrL :: Lens_' ManagerStatus (Maybe Text) +managerStatusAddrL f ManagerStatus{..} = (\managerStatusAddr -> ManagerStatus { managerStatusAddr, ..} ) <$> f managerStatusAddr +{-# INLINE managerStatusAddrL #-} + + + +-- * Mount + +-- | 'mountTarget' Lens +mountTargetL :: Lens_' Mount (Maybe Text) +mountTargetL f Mount{..} = (\mountTarget -> Mount { mountTarget, ..} ) <$> f mountTarget +{-# INLINE mountTargetL #-} + +-- | 'mountSource' Lens +mountSourceL :: Lens_' Mount (Maybe Text) +mountSourceL f Mount{..} = (\mountSource -> Mount { mountSource, ..} ) <$> f mountSource +{-# INLINE mountSourceL #-} + +-- | 'mountType' Lens +mountTypeL :: Lens_' Mount (Maybe E'Type2) +mountTypeL f Mount{..} = (\mountType -> Mount { mountType, ..} ) <$> f mountType +{-# INLINE mountTypeL #-} + +-- | 'mountReadOnly' Lens +mountReadOnlyL :: Lens_' Mount (Maybe Bool) +mountReadOnlyL f Mount{..} = (\mountReadOnly -> Mount { mountReadOnly, ..} ) <$> f mountReadOnly +{-# INLINE mountReadOnlyL #-} + +-- | 'mountConsistency' Lens +mountConsistencyL :: Lens_' Mount (Maybe Text) +mountConsistencyL f Mount{..} = (\mountConsistency -> Mount { mountConsistency, ..} ) <$> f mountConsistency +{-# INLINE mountConsistencyL #-} + +-- | 'mountBindOptions' Lens +mountBindOptionsL :: Lens_' Mount (Maybe MountBindOptions) +mountBindOptionsL f Mount{..} = (\mountBindOptions -> Mount { mountBindOptions, ..} ) <$> f mountBindOptions +{-# INLINE mountBindOptionsL #-} + +-- | 'mountVolumeOptions' Lens +mountVolumeOptionsL :: Lens_' Mount (Maybe MountVolumeOptions) +mountVolumeOptionsL f Mount{..} = (\mountVolumeOptions -> Mount { mountVolumeOptions, ..} ) <$> f mountVolumeOptions +{-# INLINE mountVolumeOptionsL #-} + +-- | 'mountTmpfsOptions' Lens +mountTmpfsOptionsL :: Lens_' Mount (Maybe MountTmpfsOptions) +mountTmpfsOptionsL f Mount{..} = (\mountTmpfsOptions -> Mount { mountTmpfsOptions, ..} ) <$> f mountTmpfsOptions +{-# INLINE mountTmpfsOptionsL #-} + + + +-- * MountBindOptions + +-- | 'mountBindOptionsPropagation' Lens +mountBindOptionsPropagationL :: Lens_' MountBindOptions (Maybe E'Propagation) +mountBindOptionsPropagationL f MountBindOptions{..} = (\mountBindOptionsPropagation -> MountBindOptions { mountBindOptionsPropagation, ..} ) <$> f mountBindOptionsPropagation +{-# INLINE mountBindOptionsPropagationL #-} + +-- | 'mountBindOptionsNonRecursive' Lens +mountBindOptionsNonRecursiveL :: Lens_' MountBindOptions (Maybe Bool) +mountBindOptionsNonRecursiveL f MountBindOptions{..} = (\mountBindOptionsNonRecursive -> MountBindOptions { mountBindOptionsNonRecursive, ..} ) <$> f mountBindOptionsNonRecursive +{-# INLINE mountBindOptionsNonRecursiveL #-} + +-- | 'mountBindOptionsCreateMountpoint' Lens +mountBindOptionsCreateMountpointL :: Lens_' MountBindOptions (Maybe Bool) +mountBindOptionsCreateMountpointL f MountBindOptions{..} = (\mountBindOptionsCreateMountpoint -> MountBindOptions { mountBindOptionsCreateMountpoint, ..} ) <$> f mountBindOptionsCreateMountpoint +{-# INLINE mountBindOptionsCreateMountpointL #-} + +-- | 'mountBindOptionsReadOnlyNonRecursive' Lens +mountBindOptionsReadOnlyNonRecursiveL :: Lens_' MountBindOptions (Maybe Bool) +mountBindOptionsReadOnlyNonRecursiveL f MountBindOptions{..} = (\mountBindOptionsReadOnlyNonRecursive -> MountBindOptions { mountBindOptionsReadOnlyNonRecursive, ..} ) <$> f mountBindOptionsReadOnlyNonRecursive +{-# INLINE mountBindOptionsReadOnlyNonRecursiveL #-} + +-- | 'mountBindOptionsReadOnlyForceRecursive' Lens +mountBindOptionsReadOnlyForceRecursiveL :: Lens_' MountBindOptions (Maybe Bool) +mountBindOptionsReadOnlyForceRecursiveL f MountBindOptions{..} = (\mountBindOptionsReadOnlyForceRecursive -> MountBindOptions { mountBindOptionsReadOnlyForceRecursive, ..} ) <$> f mountBindOptionsReadOnlyForceRecursive +{-# INLINE mountBindOptionsReadOnlyForceRecursiveL #-} + + + +-- * MountPoint + +-- | 'mountPointType' Lens +mountPointTypeL :: Lens_' MountPoint (Maybe E'Type2) +mountPointTypeL f MountPoint{..} = (\mountPointType -> MountPoint { mountPointType, ..} ) <$> f mountPointType +{-# INLINE mountPointTypeL #-} + +-- | 'mountPointName' Lens +mountPointNameL :: Lens_' MountPoint (Maybe Text) +mountPointNameL f MountPoint{..} = (\mountPointName -> MountPoint { mountPointName, ..} ) <$> f mountPointName +{-# INLINE mountPointNameL #-} + +-- | 'mountPointSource' Lens +mountPointSourceL :: Lens_' MountPoint (Maybe Text) +mountPointSourceL f MountPoint{..} = (\mountPointSource -> MountPoint { mountPointSource, ..} ) <$> f mountPointSource +{-# INLINE mountPointSourceL #-} + +-- | 'mountPointDestination' Lens +mountPointDestinationL :: Lens_' MountPoint (Maybe Text) +mountPointDestinationL f MountPoint{..} = (\mountPointDestination -> MountPoint { mountPointDestination, ..} ) <$> f mountPointDestination +{-# INLINE mountPointDestinationL #-} + +-- | 'mountPointDriver' Lens +mountPointDriverL :: Lens_' MountPoint (Maybe Text) +mountPointDriverL f MountPoint{..} = (\mountPointDriver -> MountPoint { mountPointDriver, ..} ) <$> f mountPointDriver +{-# INLINE mountPointDriverL #-} + +-- | 'mountPointMode' Lens +mountPointModeL :: Lens_' MountPoint (Maybe Text) +mountPointModeL f MountPoint{..} = (\mountPointMode -> MountPoint { mountPointMode, ..} ) <$> f mountPointMode +{-# INLINE mountPointModeL #-} + +-- | 'mountPointRw' Lens +mountPointRwL :: Lens_' MountPoint (Maybe Bool) +mountPointRwL f MountPoint{..} = (\mountPointRw -> MountPoint { mountPointRw, ..} ) <$> f mountPointRw +{-# INLINE mountPointRwL #-} + +-- | 'mountPointPropagation' Lens +mountPointPropagationL :: Lens_' MountPoint (Maybe Text) +mountPointPropagationL f MountPoint{..} = (\mountPointPropagation -> MountPoint { mountPointPropagation, ..} ) <$> f mountPointPropagation +{-# INLINE mountPointPropagationL #-} + + + +-- * MountTmpfsOptions + +-- | 'mountTmpfsOptionsSizeBytes' Lens +mountTmpfsOptionsSizeBytesL :: Lens_' MountTmpfsOptions (Maybe Integer) +mountTmpfsOptionsSizeBytesL f MountTmpfsOptions{..} = (\mountTmpfsOptionsSizeBytes -> MountTmpfsOptions { mountTmpfsOptionsSizeBytes, ..} ) <$> f mountTmpfsOptionsSizeBytes +{-# INLINE mountTmpfsOptionsSizeBytesL #-} + +-- | 'mountTmpfsOptionsMode' Lens +mountTmpfsOptionsModeL :: Lens_' MountTmpfsOptions (Maybe Int) +mountTmpfsOptionsModeL f MountTmpfsOptions{..} = (\mountTmpfsOptionsMode -> MountTmpfsOptions { mountTmpfsOptionsMode, ..} ) <$> f mountTmpfsOptionsMode +{-# INLINE mountTmpfsOptionsModeL #-} + +-- | 'mountTmpfsOptionsOptions' Lens +mountTmpfsOptionsOptionsL :: Lens_' MountTmpfsOptions (Maybe [[Text]]) +mountTmpfsOptionsOptionsL f MountTmpfsOptions{..} = (\mountTmpfsOptionsOptions -> MountTmpfsOptions { mountTmpfsOptionsOptions, ..} ) <$> f mountTmpfsOptionsOptions +{-# INLINE mountTmpfsOptionsOptionsL #-} + + + +-- * MountVolumeOptions + +-- | 'mountVolumeOptionsNoCopy' Lens +mountVolumeOptionsNoCopyL :: Lens_' MountVolumeOptions (Maybe Bool) +mountVolumeOptionsNoCopyL f MountVolumeOptions{..} = (\mountVolumeOptionsNoCopy -> MountVolumeOptions { mountVolumeOptionsNoCopy, ..} ) <$> f mountVolumeOptionsNoCopy +{-# INLINE mountVolumeOptionsNoCopyL #-} + +-- | 'mountVolumeOptionsLabels' Lens +mountVolumeOptionsLabelsL :: Lens_' MountVolumeOptions (Maybe (Map.Map String Text)) +mountVolumeOptionsLabelsL f MountVolumeOptions{..} = (\mountVolumeOptionsLabels -> MountVolumeOptions { mountVolumeOptionsLabels, ..} ) <$> f mountVolumeOptionsLabels +{-# INLINE mountVolumeOptionsLabelsL #-} + +-- | 'mountVolumeOptionsDriverConfig' Lens +mountVolumeOptionsDriverConfigL :: Lens_' MountVolumeOptions (Maybe MountVolumeOptionsDriverConfig) +mountVolumeOptionsDriverConfigL f MountVolumeOptions{..} = (\mountVolumeOptionsDriverConfig -> MountVolumeOptions { mountVolumeOptionsDriverConfig, ..} ) <$> f mountVolumeOptionsDriverConfig +{-# INLINE mountVolumeOptionsDriverConfigL #-} + +-- | 'mountVolumeOptionsSubpath' Lens +mountVolumeOptionsSubpathL :: Lens_' MountVolumeOptions (Maybe Text) +mountVolumeOptionsSubpathL f MountVolumeOptions{..} = (\mountVolumeOptionsSubpath -> MountVolumeOptions { mountVolumeOptionsSubpath, ..} ) <$> f mountVolumeOptionsSubpath +{-# INLINE mountVolumeOptionsSubpathL #-} + + + +-- * MountVolumeOptionsDriverConfig + +-- | 'mountVolumeOptionsDriverConfigName' Lens +mountVolumeOptionsDriverConfigNameL :: Lens_' MountVolumeOptionsDriverConfig (Maybe Text) +mountVolumeOptionsDriverConfigNameL f MountVolumeOptionsDriverConfig{..} = (\mountVolumeOptionsDriverConfigName -> MountVolumeOptionsDriverConfig { mountVolumeOptionsDriverConfigName, ..} ) <$> f mountVolumeOptionsDriverConfigName +{-# INLINE mountVolumeOptionsDriverConfigNameL #-} + +-- | 'mountVolumeOptionsDriverConfigOptions' Lens +mountVolumeOptionsDriverConfigOptionsL :: Lens_' MountVolumeOptionsDriverConfig (Maybe (Map.Map String Text)) +mountVolumeOptionsDriverConfigOptionsL f MountVolumeOptionsDriverConfig{..} = (\mountVolumeOptionsDriverConfigOptions -> MountVolumeOptionsDriverConfig { mountVolumeOptionsDriverConfigOptions, ..} ) <$> f mountVolumeOptionsDriverConfigOptions +{-# INLINE mountVolumeOptionsDriverConfigOptionsL #-} + + + +-- * Network + +-- | 'networkName' Lens +networkNameL :: Lens_' Network (Maybe Text) +networkNameL f Network{..} = (\networkName -> Network { networkName, ..} ) <$> f networkName +{-# INLINE networkNameL #-} + +-- | 'networkId' Lens +networkIdL :: Lens_' Network (Maybe Text) +networkIdL f Network{..} = (\networkId -> Network { networkId, ..} ) <$> f networkId +{-# INLINE networkIdL #-} + +-- | 'networkCreated' Lens +networkCreatedL :: Lens_' Network (Maybe Text) +networkCreatedL f Network{..} = (\networkCreated -> Network { networkCreated, ..} ) <$> f networkCreated +{-# INLINE networkCreatedL #-} + +-- | 'networkScope' Lens +networkScopeL :: Lens_' Network (Maybe Text) +networkScopeL f Network{..} = (\networkScope -> Network { networkScope, ..} ) <$> f networkScope +{-# INLINE networkScopeL #-} + +-- | 'networkDriver' Lens +networkDriverL :: Lens_' Network (Maybe Text) +networkDriverL f Network{..} = (\networkDriver -> Network { networkDriver, ..} ) <$> f networkDriver +{-# INLINE networkDriverL #-} + +-- | 'networkEnableIpv6' Lens +networkEnableIpv6L :: Lens_' Network (Maybe Bool) +networkEnableIpv6L f Network{..} = (\networkEnableIpv6 -> Network { networkEnableIpv6, ..} ) <$> f networkEnableIpv6 +{-# INLINE networkEnableIpv6L #-} + +-- | 'networkIpam' Lens +networkIpamL :: Lens_' Network (Maybe IPAM) +networkIpamL f Network{..} = (\networkIpam -> Network { networkIpam, ..} ) <$> f networkIpam +{-# INLINE networkIpamL #-} + +-- | 'networkInternal' Lens +networkInternalL :: Lens_' Network (Maybe Bool) +networkInternalL f Network{..} = (\networkInternal -> Network { networkInternal, ..} ) <$> f networkInternal +{-# INLINE networkInternalL #-} + +-- | 'networkAttachable' Lens +networkAttachableL :: Lens_' Network (Maybe Bool) +networkAttachableL f Network{..} = (\networkAttachable -> Network { networkAttachable, ..} ) <$> f networkAttachable +{-# INLINE networkAttachableL #-} + +-- | 'networkIngress' Lens +networkIngressL :: Lens_' Network (Maybe Bool) +networkIngressL f Network{..} = (\networkIngress -> Network { networkIngress, ..} ) <$> f networkIngress +{-# INLINE networkIngressL #-} + +-- | 'networkConfigFrom' Lens +networkConfigFromL :: Lens_' Network (Maybe ConfigReference) +networkConfigFromL f Network{..} = (\networkConfigFrom -> Network { networkConfigFrom, ..} ) <$> f networkConfigFrom +{-# INLINE networkConfigFromL #-} + +-- | 'networkConfigOnly' Lens +networkConfigOnlyL :: Lens_' Network (Maybe Bool) +networkConfigOnlyL f Network{..} = (\networkConfigOnly -> Network { networkConfigOnly, ..} ) <$> f networkConfigOnly +{-# INLINE networkConfigOnlyL #-} + +-- | 'networkContainers' Lens +networkContainersL :: Lens_' Network (Maybe (Map.Map String NetworkContainer)) +networkContainersL f Network{..} = (\networkContainers -> Network { networkContainers, ..} ) <$> f networkContainers +{-# INLINE networkContainersL #-} + +-- | 'networkOptions' Lens +networkOptionsL :: Lens_' Network (Maybe (Map.Map String Text)) +networkOptionsL f Network{..} = (\networkOptions -> Network { networkOptions, ..} ) <$> f networkOptions +{-# INLINE networkOptionsL #-} + +-- | 'networkLabels' Lens +networkLabelsL :: Lens_' Network (Maybe (Map.Map String Text)) +networkLabelsL f Network{..} = (\networkLabels -> Network { networkLabels, ..} ) <$> f networkLabels +{-# INLINE networkLabelsL #-} + +-- | 'networkPeers' Lens +networkPeersL :: Lens_' Network (Maybe [PeerInfo]) +networkPeersL f Network{..} = (\networkPeers -> Network { networkPeers, ..} ) <$> f networkPeers +{-# INLINE networkPeersL #-} + + + +-- * NetworkAttachmentConfig + +-- | 'networkAttachmentConfigTarget' Lens +networkAttachmentConfigTargetL :: Lens_' NetworkAttachmentConfig (Maybe Text) +networkAttachmentConfigTargetL f NetworkAttachmentConfig{..} = (\networkAttachmentConfigTarget -> NetworkAttachmentConfig { networkAttachmentConfigTarget, ..} ) <$> f networkAttachmentConfigTarget +{-# INLINE networkAttachmentConfigTargetL #-} + +-- | 'networkAttachmentConfigAliases' Lens +networkAttachmentConfigAliasesL :: Lens_' NetworkAttachmentConfig (Maybe [Text]) +networkAttachmentConfigAliasesL f NetworkAttachmentConfig{..} = (\networkAttachmentConfigAliases -> NetworkAttachmentConfig { networkAttachmentConfigAliases, ..} ) <$> f networkAttachmentConfigAliases +{-# INLINE networkAttachmentConfigAliasesL #-} + +-- | 'networkAttachmentConfigDriverOpts' Lens +networkAttachmentConfigDriverOptsL :: Lens_' NetworkAttachmentConfig (Maybe (Map.Map String Text)) +networkAttachmentConfigDriverOptsL f NetworkAttachmentConfig{..} = (\networkAttachmentConfigDriverOpts -> NetworkAttachmentConfig { networkAttachmentConfigDriverOpts, ..} ) <$> f networkAttachmentConfigDriverOpts +{-# INLINE networkAttachmentConfigDriverOptsL #-} + + + +-- * NetworkConnectRequest + +-- | 'networkConnectRequestContainer' Lens +networkConnectRequestContainerL :: Lens_' NetworkConnectRequest (Maybe Text) +networkConnectRequestContainerL f NetworkConnectRequest{..} = (\networkConnectRequestContainer -> NetworkConnectRequest { networkConnectRequestContainer, ..} ) <$> f networkConnectRequestContainer +{-# INLINE networkConnectRequestContainerL #-} + +-- | 'networkConnectRequestEndpointConfig' Lens +networkConnectRequestEndpointConfigL :: Lens_' NetworkConnectRequest (Maybe EndpointSettings) +networkConnectRequestEndpointConfigL f NetworkConnectRequest{..} = (\networkConnectRequestEndpointConfig -> NetworkConnectRequest { networkConnectRequestEndpointConfig, ..} ) <$> f networkConnectRequestEndpointConfig +{-# INLINE networkConnectRequestEndpointConfigL #-} + + + +-- * NetworkContainer + +-- | 'networkContainerName' Lens +networkContainerNameL :: Lens_' NetworkContainer (Maybe Text) +networkContainerNameL f NetworkContainer{..} = (\networkContainerName -> NetworkContainer { networkContainerName, ..} ) <$> f networkContainerName +{-# INLINE networkContainerNameL #-} + +-- | 'networkContainerEndpointId' Lens +networkContainerEndpointIdL :: Lens_' NetworkContainer (Maybe Text) +networkContainerEndpointIdL f NetworkContainer{..} = (\networkContainerEndpointId -> NetworkContainer { networkContainerEndpointId, ..} ) <$> f networkContainerEndpointId +{-# INLINE networkContainerEndpointIdL #-} + +-- | 'networkContainerMacAddress' Lens +networkContainerMacAddressL :: Lens_' NetworkContainer (Maybe Text) +networkContainerMacAddressL f NetworkContainer{..} = (\networkContainerMacAddress -> NetworkContainer { networkContainerMacAddress, ..} ) <$> f networkContainerMacAddress +{-# INLINE networkContainerMacAddressL #-} + +-- | 'networkContainerIpv4Address' Lens +networkContainerIpv4AddressL :: Lens_' NetworkContainer (Maybe Text) +networkContainerIpv4AddressL f NetworkContainer{..} = (\networkContainerIpv4Address -> NetworkContainer { networkContainerIpv4Address, ..} ) <$> f networkContainerIpv4Address +{-# INLINE networkContainerIpv4AddressL #-} + +-- | 'networkContainerIpv6Address' Lens +networkContainerIpv6AddressL :: Lens_' NetworkContainer (Maybe Text) +networkContainerIpv6AddressL f NetworkContainer{..} = (\networkContainerIpv6Address -> NetworkContainer { networkContainerIpv6Address, ..} ) <$> f networkContainerIpv6Address +{-# INLINE networkContainerIpv6AddressL #-} + + + +-- * NetworkCreateRequest + +-- | 'networkCreateRequestName' Lens +networkCreateRequestNameL :: Lens_' NetworkCreateRequest (Text) +networkCreateRequestNameL f NetworkCreateRequest{..} = (\networkCreateRequestName -> NetworkCreateRequest { networkCreateRequestName, ..} ) <$> f networkCreateRequestName +{-# INLINE networkCreateRequestNameL #-} + +-- | 'networkCreateRequestDriver' Lens +networkCreateRequestDriverL :: Lens_' NetworkCreateRequest (Maybe Text) +networkCreateRequestDriverL f NetworkCreateRequest{..} = (\networkCreateRequestDriver -> NetworkCreateRequest { networkCreateRequestDriver, ..} ) <$> f networkCreateRequestDriver +{-# INLINE networkCreateRequestDriverL #-} + +-- | 'networkCreateRequestScope' Lens +networkCreateRequestScopeL :: Lens_' NetworkCreateRequest (Maybe Text) +networkCreateRequestScopeL f NetworkCreateRequest{..} = (\networkCreateRequestScope -> NetworkCreateRequest { networkCreateRequestScope, ..} ) <$> f networkCreateRequestScope +{-# INLINE networkCreateRequestScopeL #-} + +-- | 'networkCreateRequestInternal' Lens +networkCreateRequestInternalL :: Lens_' NetworkCreateRequest (Maybe Bool) +networkCreateRequestInternalL f NetworkCreateRequest{..} = (\networkCreateRequestInternal -> NetworkCreateRequest { networkCreateRequestInternal, ..} ) <$> f networkCreateRequestInternal +{-# INLINE networkCreateRequestInternalL #-} + +-- | 'networkCreateRequestAttachable' Lens +networkCreateRequestAttachableL :: Lens_' NetworkCreateRequest (Maybe Bool) +networkCreateRequestAttachableL f NetworkCreateRequest{..} = (\networkCreateRequestAttachable -> NetworkCreateRequest { networkCreateRequestAttachable, ..} ) <$> f networkCreateRequestAttachable +{-# INLINE networkCreateRequestAttachableL #-} + +-- | 'networkCreateRequestIngress' Lens +networkCreateRequestIngressL :: Lens_' NetworkCreateRequest (Maybe Bool) +networkCreateRequestIngressL f NetworkCreateRequest{..} = (\networkCreateRequestIngress -> NetworkCreateRequest { networkCreateRequestIngress, ..} ) <$> f networkCreateRequestIngress +{-# INLINE networkCreateRequestIngressL #-} + +-- | 'networkCreateRequestConfigOnly' Lens +networkCreateRequestConfigOnlyL :: Lens_' NetworkCreateRequest (Maybe Bool) +networkCreateRequestConfigOnlyL f NetworkCreateRequest{..} = (\networkCreateRequestConfigOnly -> NetworkCreateRequest { networkCreateRequestConfigOnly, ..} ) <$> f networkCreateRequestConfigOnly +{-# INLINE networkCreateRequestConfigOnlyL #-} + +-- | 'networkCreateRequestConfigFrom' Lens +networkCreateRequestConfigFromL :: Lens_' NetworkCreateRequest (Maybe ConfigReference) +networkCreateRequestConfigFromL f NetworkCreateRequest{..} = (\networkCreateRequestConfigFrom -> NetworkCreateRequest { networkCreateRequestConfigFrom, ..} ) <$> f networkCreateRequestConfigFrom +{-# INLINE networkCreateRequestConfigFromL #-} + +-- | 'networkCreateRequestIpam' Lens +networkCreateRequestIpamL :: Lens_' NetworkCreateRequest (Maybe IPAM) +networkCreateRequestIpamL f NetworkCreateRequest{..} = (\networkCreateRequestIpam -> NetworkCreateRequest { networkCreateRequestIpam, ..} ) <$> f networkCreateRequestIpam +{-# INLINE networkCreateRequestIpamL #-} + +-- | 'networkCreateRequestEnableIpv6' Lens +networkCreateRequestEnableIpv6L :: Lens_' NetworkCreateRequest (Maybe Bool) +networkCreateRequestEnableIpv6L f NetworkCreateRequest{..} = (\networkCreateRequestEnableIpv6 -> NetworkCreateRequest { networkCreateRequestEnableIpv6, ..} ) <$> f networkCreateRequestEnableIpv6 +{-# INLINE networkCreateRequestEnableIpv6L #-} + +-- | 'networkCreateRequestOptions' Lens +networkCreateRequestOptionsL :: Lens_' NetworkCreateRequest (Maybe (Map.Map String Text)) +networkCreateRequestOptionsL f NetworkCreateRequest{..} = (\networkCreateRequestOptions -> NetworkCreateRequest { networkCreateRequestOptions, ..} ) <$> f networkCreateRequestOptions +{-# INLINE networkCreateRequestOptionsL #-} + +-- | 'networkCreateRequestLabels' Lens +networkCreateRequestLabelsL :: Lens_' NetworkCreateRequest (Maybe (Map.Map String Text)) +networkCreateRequestLabelsL f NetworkCreateRequest{..} = (\networkCreateRequestLabels -> NetworkCreateRequest { networkCreateRequestLabels, ..} ) <$> f networkCreateRequestLabels +{-# INLINE networkCreateRequestLabelsL #-} + + + +-- * NetworkCreateResponse + +-- | 'networkCreateResponseId' Lens +networkCreateResponseIdL :: Lens_' NetworkCreateResponse (Text) +networkCreateResponseIdL f NetworkCreateResponse{..} = (\networkCreateResponseId -> NetworkCreateResponse { networkCreateResponseId, ..} ) <$> f networkCreateResponseId +{-# INLINE networkCreateResponseIdL #-} + +-- | 'networkCreateResponseWarning' Lens +networkCreateResponseWarningL :: Lens_' NetworkCreateResponse (Text) +networkCreateResponseWarningL f NetworkCreateResponse{..} = (\networkCreateResponseWarning -> NetworkCreateResponse { networkCreateResponseWarning, ..} ) <$> f networkCreateResponseWarning +{-# INLINE networkCreateResponseWarningL #-} + + + +-- * NetworkDisconnectRequest + +-- | 'networkDisconnectRequestContainer' Lens +networkDisconnectRequestContainerL :: Lens_' NetworkDisconnectRequest (Maybe Text) +networkDisconnectRequestContainerL f NetworkDisconnectRequest{..} = (\networkDisconnectRequestContainer -> NetworkDisconnectRequest { networkDisconnectRequestContainer, ..} ) <$> f networkDisconnectRequestContainer +{-# INLINE networkDisconnectRequestContainerL #-} + +-- | 'networkDisconnectRequestForce' Lens +networkDisconnectRequestForceL :: Lens_' NetworkDisconnectRequest (Maybe Bool) +networkDisconnectRequestForceL f NetworkDisconnectRequest{..} = (\networkDisconnectRequestForce -> NetworkDisconnectRequest { networkDisconnectRequestForce, ..} ) <$> f networkDisconnectRequestForce +{-# INLINE networkDisconnectRequestForceL #-} + + + +-- * NetworkPruneResponse + +-- | 'networkPruneResponseNetworksDeleted' Lens +networkPruneResponseNetworksDeletedL :: Lens_' NetworkPruneResponse (Maybe [Text]) +networkPruneResponseNetworksDeletedL f NetworkPruneResponse{..} = (\networkPruneResponseNetworksDeleted -> NetworkPruneResponse { networkPruneResponseNetworksDeleted, ..} ) <$> f networkPruneResponseNetworksDeleted +{-# INLINE networkPruneResponseNetworksDeletedL #-} + + + +-- * NetworkSettings + +-- | 'networkSettingsBridge' Lens +networkSettingsBridgeL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsBridgeL f NetworkSettings{..} = (\networkSettingsBridge -> NetworkSettings { networkSettingsBridge, ..} ) <$> f networkSettingsBridge +{-# INLINE networkSettingsBridgeL #-} + +-- | 'networkSettingsSandboxId' Lens +networkSettingsSandboxIdL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsSandboxIdL f NetworkSettings{..} = (\networkSettingsSandboxId -> NetworkSettings { networkSettingsSandboxId, ..} ) <$> f networkSettingsSandboxId +{-# INLINE networkSettingsSandboxIdL #-} + +-- | 'networkSettingsHairpinMode' Lens +networkSettingsHairpinModeL :: Lens_' NetworkSettings (Maybe Bool) +networkSettingsHairpinModeL f NetworkSettings{..} = (\networkSettingsHairpinMode -> NetworkSettings { networkSettingsHairpinMode, ..} ) <$> f networkSettingsHairpinMode +{-# INLINE networkSettingsHairpinModeL #-} + +-- | 'networkSettingsLinkLocalIpv6Address' Lens +networkSettingsLinkLocalIpv6AddressL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsLinkLocalIpv6AddressL f NetworkSettings{..} = (\networkSettingsLinkLocalIpv6Address -> NetworkSettings { networkSettingsLinkLocalIpv6Address, ..} ) <$> f networkSettingsLinkLocalIpv6Address +{-# INLINE networkSettingsLinkLocalIpv6AddressL #-} + +-- | 'networkSettingsLinkLocalIpv6PrefixLen' Lens +networkSettingsLinkLocalIpv6PrefixLenL :: Lens_' NetworkSettings (Maybe Int) +networkSettingsLinkLocalIpv6PrefixLenL f NetworkSettings{..} = (\networkSettingsLinkLocalIpv6PrefixLen -> NetworkSettings { networkSettingsLinkLocalIpv6PrefixLen, ..} ) <$> f networkSettingsLinkLocalIpv6PrefixLen +{-# INLINE networkSettingsLinkLocalIpv6PrefixLenL #-} + +-- | 'networkSettingsPorts' Lens +networkSettingsPortsL :: Lens_' NetworkSettings (Maybe (Map.Map String [PortBinding])) +networkSettingsPortsL f NetworkSettings{..} = (\networkSettingsPorts -> NetworkSettings { networkSettingsPorts, ..} ) <$> f networkSettingsPorts +{-# INLINE networkSettingsPortsL #-} + +-- | 'networkSettingsSandboxKey' Lens +networkSettingsSandboxKeyL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsSandboxKeyL f NetworkSettings{..} = (\networkSettingsSandboxKey -> NetworkSettings { networkSettingsSandboxKey, ..} ) <$> f networkSettingsSandboxKey +{-# INLINE networkSettingsSandboxKeyL #-} + +-- | 'networkSettingsSecondaryIpAddresses' Lens +networkSettingsSecondaryIpAddressesL :: Lens_' NetworkSettings (Maybe [Address]) +networkSettingsSecondaryIpAddressesL f NetworkSettings{..} = (\networkSettingsSecondaryIpAddresses -> NetworkSettings { networkSettingsSecondaryIpAddresses, ..} ) <$> f networkSettingsSecondaryIpAddresses +{-# INLINE networkSettingsSecondaryIpAddressesL #-} + +-- | 'networkSettingsSecondaryIpv6Addresses' Lens +networkSettingsSecondaryIpv6AddressesL :: Lens_' NetworkSettings (Maybe [Address]) +networkSettingsSecondaryIpv6AddressesL f NetworkSettings{..} = (\networkSettingsSecondaryIpv6Addresses -> NetworkSettings { networkSettingsSecondaryIpv6Addresses, ..} ) <$> f networkSettingsSecondaryIpv6Addresses +{-# INLINE networkSettingsSecondaryIpv6AddressesL #-} + +-- | 'networkSettingsEndpointId' Lens +networkSettingsEndpointIdL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsEndpointIdL f NetworkSettings{..} = (\networkSettingsEndpointId -> NetworkSettings { networkSettingsEndpointId, ..} ) <$> f networkSettingsEndpointId +{-# INLINE networkSettingsEndpointIdL #-} + +-- | 'networkSettingsGateway' Lens +networkSettingsGatewayL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsGatewayL f NetworkSettings{..} = (\networkSettingsGateway -> NetworkSettings { networkSettingsGateway, ..} ) <$> f networkSettingsGateway +{-# INLINE networkSettingsGatewayL #-} + +-- | 'networkSettingsGlobalIpv6Address' Lens +networkSettingsGlobalIpv6AddressL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsGlobalIpv6AddressL f NetworkSettings{..} = (\networkSettingsGlobalIpv6Address -> NetworkSettings { networkSettingsGlobalIpv6Address, ..} ) <$> f networkSettingsGlobalIpv6Address +{-# INLINE networkSettingsGlobalIpv6AddressL #-} + +-- | 'networkSettingsGlobalIpv6PrefixLen' Lens +networkSettingsGlobalIpv6PrefixLenL :: Lens_' NetworkSettings (Maybe Int) +networkSettingsGlobalIpv6PrefixLenL f NetworkSettings{..} = (\networkSettingsGlobalIpv6PrefixLen -> NetworkSettings { networkSettingsGlobalIpv6PrefixLen, ..} ) <$> f networkSettingsGlobalIpv6PrefixLen +{-# INLINE networkSettingsGlobalIpv6PrefixLenL #-} + +-- | 'networkSettingsIpAddress' Lens +networkSettingsIpAddressL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsIpAddressL f NetworkSettings{..} = (\networkSettingsIpAddress -> NetworkSettings { networkSettingsIpAddress, ..} ) <$> f networkSettingsIpAddress +{-# INLINE networkSettingsIpAddressL #-} + +-- | 'networkSettingsIpPrefixLen' Lens +networkSettingsIpPrefixLenL :: Lens_' NetworkSettings (Maybe Int) +networkSettingsIpPrefixLenL f NetworkSettings{..} = (\networkSettingsIpPrefixLen -> NetworkSettings { networkSettingsIpPrefixLen, ..} ) <$> f networkSettingsIpPrefixLen +{-# INLINE networkSettingsIpPrefixLenL #-} + +-- | 'networkSettingsIpv6Gateway' Lens +networkSettingsIpv6GatewayL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsIpv6GatewayL f NetworkSettings{..} = (\networkSettingsIpv6Gateway -> NetworkSettings { networkSettingsIpv6Gateway, ..} ) <$> f networkSettingsIpv6Gateway +{-# INLINE networkSettingsIpv6GatewayL #-} + +-- | 'networkSettingsMacAddress' Lens +networkSettingsMacAddressL :: Lens_' NetworkSettings (Maybe Text) +networkSettingsMacAddressL f NetworkSettings{..} = (\networkSettingsMacAddress -> NetworkSettings { networkSettingsMacAddress, ..} ) <$> f networkSettingsMacAddress +{-# INLINE networkSettingsMacAddressL #-} + +-- | 'networkSettingsNetworks' Lens +networkSettingsNetworksL :: Lens_' NetworkSettings (Maybe (Map.Map String EndpointSettings)) +networkSettingsNetworksL f NetworkSettings{..} = (\networkSettingsNetworks -> NetworkSettings { networkSettingsNetworks, ..} ) <$> f networkSettingsNetworks +{-# INLINE networkSettingsNetworksL #-} + + + +-- * NetworkingConfig + +-- | 'networkingConfigEndpointsConfig' Lens +networkingConfigEndpointsConfigL :: Lens_' NetworkingConfig (Maybe (Map.Map String EndpointSettings)) +networkingConfigEndpointsConfigL f NetworkingConfig{..} = (\networkingConfigEndpointsConfig -> NetworkingConfig { networkingConfigEndpointsConfig, ..} ) <$> f networkingConfigEndpointsConfig +{-# INLINE networkingConfigEndpointsConfigL #-} + + + +-- * Node + +-- | 'nodeId' Lens +nodeIdL :: Lens_' Node (Maybe Text) +nodeIdL f Node{..} = (\nodeId -> Node { nodeId, ..} ) <$> f nodeId +{-# INLINE nodeIdL #-} + +-- | 'nodeVersion' Lens +nodeVersionL :: Lens_' Node (Maybe ObjectVersion) +nodeVersionL f Node{..} = (\nodeVersion -> Node { nodeVersion, ..} ) <$> f nodeVersion +{-# INLINE nodeVersionL #-} + +-- | 'nodeCreatedAt' Lens +nodeCreatedAtL :: Lens_' Node (Maybe Text) +nodeCreatedAtL f Node{..} = (\nodeCreatedAt -> Node { nodeCreatedAt, ..} ) <$> f nodeCreatedAt +{-# INLINE nodeCreatedAtL #-} + +-- | 'nodeUpdatedAt' Lens +nodeUpdatedAtL :: Lens_' Node (Maybe Text) +nodeUpdatedAtL f Node{..} = (\nodeUpdatedAt -> Node { nodeUpdatedAt, ..} ) <$> f nodeUpdatedAt +{-# INLINE nodeUpdatedAtL #-} + +-- | 'nodeSpec' Lens +nodeSpecL :: Lens_' Node (Maybe NodeSpec) +nodeSpecL f Node{..} = (\nodeSpec -> Node { nodeSpec, ..} ) <$> f nodeSpec +{-# INLINE nodeSpecL #-} + +-- | 'nodeDescription' Lens +nodeDescriptionL :: Lens_' Node (Maybe NodeDescription) +nodeDescriptionL f Node{..} = (\nodeDescription -> Node { nodeDescription, ..} ) <$> f nodeDescription +{-# INLINE nodeDescriptionL #-} + +-- | 'nodeStatus' Lens +nodeStatusL :: Lens_' Node (Maybe NodeStatus) +nodeStatusL f Node{..} = (\nodeStatus -> Node { nodeStatus, ..} ) <$> f nodeStatus +{-# INLINE nodeStatusL #-} + +-- | 'nodeManagerStatus' Lens +nodeManagerStatusL :: Lens_' Node (Maybe ManagerStatus) +nodeManagerStatusL f Node{..} = (\nodeManagerStatus -> Node { nodeManagerStatus, ..} ) <$> f nodeManagerStatus +{-# INLINE nodeManagerStatusL #-} + + + +-- * NodeDescription + +-- | 'nodeDescriptionHostname' Lens +nodeDescriptionHostnameL :: Lens_' NodeDescription (Maybe Text) +nodeDescriptionHostnameL f NodeDescription{..} = (\nodeDescriptionHostname -> NodeDescription { nodeDescriptionHostname, ..} ) <$> f nodeDescriptionHostname +{-# INLINE nodeDescriptionHostnameL #-} + +-- | 'nodeDescriptionPlatform' Lens +nodeDescriptionPlatformL :: Lens_' NodeDescription (Maybe Platform) +nodeDescriptionPlatformL f NodeDescription{..} = (\nodeDescriptionPlatform -> NodeDescription { nodeDescriptionPlatform, ..} ) <$> f nodeDescriptionPlatform +{-# INLINE nodeDescriptionPlatformL #-} + +-- | 'nodeDescriptionResources' Lens +nodeDescriptionResourcesL :: Lens_' NodeDescription (Maybe ResourceObject) +nodeDescriptionResourcesL f NodeDescription{..} = (\nodeDescriptionResources -> NodeDescription { nodeDescriptionResources, ..} ) <$> f nodeDescriptionResources +{-# INLINE nodeDescriptionResourcesL #-} + +-- | 'nodeDescriptionEngine' Lens +nodeDescriptionEngineL :: Lens_' NodeDescription (Maybe EngineDescription) +nodeDescriptionEngineL f NodeDescription{..} = (\nodeDescriptionEngine -> NodeDescription { nodeDescriptionEngine, ..} ) <$> f nodeDescriptionEngine +{-# INLINE nodeDescriptionEngineL #-} + +-- | 'nodeDescriptionTlsInfo' Lens +nodeDescriptionTlsInfoL :: Lens_' NodeDescription (Maybe TLSInfo) +nodeDescriptionTlsInfoL f NodeDescription{..} = (\nodeDescriptionTlsInfo -> NodeDescription { nodeDescriptionTlsInfo, ..} ) <$> f nodeDescriptionTlsInfo +{-# INLINE nodeDescriptionTlsInfoL #-} + + + +-- * NodeSpec + +-- | 'nodeSpecName' Lens +nodeSpecNameL :: Lens_' NodeSpec (Maybe Text) +nodeSpecNameL f NodeSpec{..} = (\nodeSpecName -> NodeSpec { nodeSpecName, ..} ) <$> f nodeSpecName +{-# INLINE nodeSpecNameL #-} + +-- | 'nodeSpecLabels' Lens +nodeSpecLabelsL :: Lens_' NodeSpec (Maybe (Map.Map String Text)) +nodeSpecLabelsL f NodeSpec{..} = (\nodeSpecLabels -> NodeSpec { nodeSpecLabels, ..} ) <$> f nodeSpecLabels +{-# INLINE nodeSpecLabelsL #-} + +-- | 'nodeSpecRole' Lens +nodeSpecRoleL :: Lens_' NodeSpec (Maybe E'Role) +nodeSpecRoleL f NodeSpec{..} = (\nodeSpecRole -> NodeSpec { nodeSpecRole, ..} ) <$> f nodeSpecRole +{-# INLINE nodeSpecRoleL #-} + +-- | 'nodeSpecAvailability' Lens +nodeSpecAvailabilityL :: Lens_' NodeSpec (Maybe E'Availability) +nodeSpecAvailabilityL f NodeSpec{..} = (\nodeSpecAvailability -> NodeSpec { nodeSpecAvailability, ..} ) <$> f nodeSpecAvailability +{-# INLINE nodeSpecAvailabilityL #-} + + + +-- * NodeState + + + +-- * NodeStatus + +-- | 'nodeStatusState' Lens +nodeStatusStateL :: Lens_' NodeStatus (Maybe NodeState) +nodeStatusStateL f NodeStatus{..} = (\nodeStatusState -> NodeStatus { nodeStatusState, ..} ) <$> f nodeStatusState +{-# INLINE nodeStatusStateL #-} + +-- | 'nodeStatusMessage' Lens +nodeStatusMessageL :: Lens_' NodeStatus (Maybe Text) +nodeStatusMessageL f NodeStatus{..} = (\nodeStatusMessage -> NodeStatus { nodeStatusMessage, ..} ) <$> f nodeStatusMessage +{-# INLINE nodeStatusMessageL #-} + +-- | 'nodeStatusAddr' Lens +nodeStatusAddrL :: Lens_' NodeStatus (Maybe Text) +nodeStatusAddrL f NodeStatus{..} = (\nodeStatusAddr -> NodeStatus { nodeStatusAddr, ..} ) <$> f nodeStatusAddr +{-# INLINE nodeStatusAddrL #-} + + + +-- * OCIDescriptor + +-- | 'oCIDescriptorMediaType' Lens +oCIDescriptorMediaTypeL :: Lens_' OCIDescriptor (Maybe Text) +oCIDescriptorMediaTypeL f OCIDescriptor{..} = (\oCIDescriptorMediaType -> OCIDescriptor { oCIDescriptorMediaType, ..} ) <$> f oCIDescriptorMediaType +{-# INLINE oCIDescriptorMediaTypeL #-} + +-- | 'oCIDescriptorDigest' Lens +oCIDescriptorDigestL :: Lens_' OCIDescriptor (Maybe Text) +oCIDescriptorDigestL f OCIDescriptor{..} = (\oCIDescriptorDigest -> OCIDescriptor { oCIDescriptorDigest, ..} ) <$> f oCIDescriptorDigest +{-# INLINE oCIDescriptorDigestL #-} + +-- | 'oCIDescriptorSize' Lens +oCIDescriptorSizeL :: Lens_' OCIDescriptor (Maybe Integer) +oCIDescriptorSizeL f OCIDescriptor{..} = (\oCIDescriptorSize -> OCIDescriptor { oCIDescriptorSize, ..} ) <$> f oCIDescriptorSize +{-# INLINE oCIDescriptorSizeL #-} + + + +-- * OCIPlatform + +-- | 'oCIPlatformArchitecture' Lens +oCIPlatformArchitectureL :: Lens_' OCIPlatform (Maybe Text) +oCIPlatformArchitectureL f OCIPlatform{..} = (\oCIPlatformArchitecture -> OCIPlatform { oCIPlatformArchitecture, ..} ) <$> f oCIPlatformArchitecture +{-# INLINE oCIPlatformArchitectureL #-} + +-- | 'oCIPlatformOs' Lens +oCIPlatformOsL :: Lens_' OCIPlatform (Maybe Text) +oCIPlatformOsL f OCIPlatform{..} = (\oCIPlatformOs -> OCIPlatform { oCIPlatformOs, ..} ) <$> f oCIPlatformOs +{-# INLINE oCIPlatformOsL #-} + +-- | 'oCIPlatformOsVersion' Lens +oCIPlatformOsVersionL :: Lens_' OCIPlatform (Maybe Text) +oCIPlatformOsVersionL f OCIPlatform{..} = (\oCIPlatformOsVersion -> OCIPlatform { oCIPlatformOsVersion, ..} ) <$> f oCIPlatformOsVersion +{-# INLINE oCIPlatformOsVersionL #-} + +-- | 'oCIPlatformOsFeatures' Lens +oCIPlatformOsFeaturesL :: Lens_' OCIPlatform (Maybe [Text]) +oCIPlatformOsFeaturesL f OCIPlatform{..} = (\oCIPlatformOsFeatures -> OCIPlatform { oCIPlatformOsFeatures, ..} ) <$> f oCIPlatformOsFeatures +{-# INLINE oCIPlatformOsFeaturesL #-} + +-- | 'oCIPlatformVariant' Lens +oCIPlatformVariantL :: Lens_' OCIPlatform (Maybe Text) +oCIPlatformVariantL f OCIPlatform{..} = (\oCIPlatformVariant -> OCIPlatform { oCIPlatformVariant, ..} ) <$> f oCIPlatformVariant +{-# INLINE oCIPlatformVariantL #-} + + + +-- * ObjectVersion + +-- | 'objectVersionIndex' Lens +objectVersionIndexL :: Lens_' ObjectVersion (Maybe Int) +objectVersionIndexL f ObjectVersion{..} = (\objectVersionIndex -> ObjectVersion { objectVersionIndex, ..} ) <$> f objectVersionIndex +{-# INLINE objectVersionIndexL #-} + + + +-- * PeerInfo + +-- | 'peerInfoName' Lens +peerInfoNameL :: Lens_' PeerInfo (Maybe Text) +peerInfoNameL f PeerInfo{..} = (\peerInfoName -> PeerInfo { peerInfoName, ..} ) <$> f peerInfoName +{-# INLINE peerInfoNameL #-} + +-- | 'peerInfoIp' Lens +peerInfoIpL :: Lens_' PeerInfo (Maybe Text) +peerInfoIpL f PeerInfo{..} = (\peerInfoIp -> PeerInfo { peerInfoIp, ..} ) <$> f peerInfoIp +{-# INLINE peerInfoIpL #-} + + + +-- * PeerNode + +-- | 'peerNodeNodeId' Lens +peerNodeNodeIdL :: Lens_' PeerNode (Maybe Text) +peerNodeNodeIdL f PeerNode{..} = (\peerNodeNodeId -> PeerNode { peerNodeNodeId, ..} ) <$> f peerNodeNodeId +{-# INLINE peerNodeNodeIdL #-} + +-- | 'peerNodeAddr' Lens +peerNodeAddrL :: Lens_' PeerNode (Maybe Text) +peerNodeAddrL f PeerNode{..} = (\peerNodeAddr -> PeerNode { peerNodeAddr, ..} ) <$> f peerNodeAddr +{-# INLINE peerNodeAddrL #-} + + + +-- * Platform + +-- | 'platformArchitecture' Lens +platformArchitectureL :: Lens_' Platform (Maybe Text) +platformArchitectureL f Platform{..} = (\platformArchitecture -> Platform { platformArchitecture, ..} ) <$> f platformArchitecture +{-# INLINE platformArchitectureL #-} + +-- | 'platformOs' Lens +platformOsL :: Lens_' Platform (Maybe Text) +platformOsL f Platform{..} = (\platformOs -> Platform { platformOs, ..} ) <$> f platformOs +{-# INLINE platformOsL #-} + + + +-- * Plugin + +-- | 'pluginId' Lens +pluginIdL :: Lens_' Plugin (Maybe Text) +pluginIdL f Plugin{..} = (\pluginId -> Plugin { pluginId, ..} ) <$> f pluginId +{-# INLINE pluginIdL #-} + +-- | 'pluginName' Lens +pluginNameL :: Lens_' Plugin (Text) +pluginNameL f Plugin{..} = (\pluginName -> Plugin { pluginName, ..} ) <$> f pluginName +{-# INLINE pluginNameL #-} + +-- | 'pluginEnabled' Lens +pluginEnabledL :: Lens_' Plugin (Bool) +pluginEnabledL f Plugin{..} = (\pluginEnabled -> Plugin { pluginEnabled, ..} ) <$> f pluginEnabled +{-# INLINE pluginEnabledL #-} + +-- | 'pluginSettings' Lens +pluginSettingsL :: Lens_' Plugin (PluginSettings) +pluginSettingsL f Plugin{..} = (\pluginSettings -> Plugin { pluginSettings, ..} ) <$> f pluginSettings +{-# INLINE pluginSettingsL #-} + +-- | 'pluginPluginReference' Lens +pluginPluginReferenceL :: Lens_' Plugin (Maybe Text) +pluginPluginReferenceL f Plugin{..} = (\pluginPluginReference -> Plugin { pluginPluginReference, ..} ) <$> f pluginPluginReference +{-# INLINE pluginPluginReferenceL #-} + +-- | 'pluginConfig' Lens +pluginConfigL :: Lens_' Plugin (PluginConfig) +pluginConfigL f Plugin{..} = (\pluginConfig -> Plugin { pluginConfig, ..} ) <$> f pluginConfig +{-# INLINE pluginConfigL #-} + + + +-- * PluginConfig + +-- | 'pluginConfigDockerVersion' Lens +pluginConfigDockerVersionL :: Lens_' PluginConfig (Maybe Text) +pluginConfigDockerVersionL f PluginConfig{..} = (\pluginConfigDockerVersion -> PluginConfig { pluginConfigDockerVersion, ..} ) <$> f pluginConfigDockerVersion +{-# INLINE pluginConfigDockerVersionL #-} + +-- | 'pluginConfigDescription' Lens +pluginConfigDescriptionL :: Lens_' PluginConfig (Text) +pluginConfigDescriptionL f PluginConfig{..} = (\pluginConfigDescription -> PluginConfig { pluginConfigDescription, ..} ) <$> f pluginConfigDescription +{-# INLINE pluginConfigDescriptionL #-} + +-- | 'pluginConfigDocumentation' Lens +pluginConfigDocumentationL :: Lens_' PluginConfig (Text) +pluginConfigDocumentationL f PluginConfig{..} = (\pluginConfigDocumentation -> PluginConfig { pluginConfigDocumentation, ..} ) <$> f pluginConfigDocumentation +{-# INLINE pluginConfigDocumentationL #-} + +-- | 'pluginConfigInterface' Lens +pluginConfigInterfaceL :: Lens_' PluginConfig (PluginConfigInterface) +pluginConfigInterfaceL f PluginConfig{..} = (\pluginConfigInterface -> PluginConfig { pluginConfigInterface, ..} ) <$> f pluginConfigInterface +{-# INLINE pluginConfigInterfaceL #-} + +-- | 'pluginConfigEntrypoint' Lens +pluginConfigEntrypointL :: Lens_' PluginConfig ([Text]) +pluginConfigEntrypointL f PluginConfig{..} = (\pluginConfigEntrypoint -> PluginConfig { pluginConfigEntrypoint, ..} ) <$> f pluginConfigEntrypoint +{-# INLINE pluginConfigEntrypointL #-} + +-- | 'pluginConfigWorkDir' Lens +pluginConfigWorkDirL :: Lens_' PluginConfig (Text) +pluginConfigWorkDirL f PluginConfig{..} = (\pluginConfigWorkDir -> PluginConfig { pluginConfigWorkDir, ..} ) <$> f pluginConfigWorkDir +{-# INLINE pluginConfigWorkDirL #-} + +-- | 'pluginConfigUser' Lens +pluginConfigUserL :: Lens_' PluginConfig (Maybe PluginConfigUser) +pluginConfigUserL f PluginConfig{..} = (\pluginConfigUser -> PluginConfig { pluginConfigUser, ..} ) <$> f pluginConfigUser +{-# INLINE pluginConfigUserL #-} + +-- | 'pluginConfigNetwork' Lens +pluginConfigNetworkL :: Lens_' PluginConfig (PluginConfigNetwork) +pluginConfigNetworkL f PluginConfig{..} = (\pluginConfigNetwork -> PluginConfig { pluginConfigNetwork, ..} ) <$> f pluginConfigNetwork +{-# INLINE pluginConfigNetworkL #-} + +-- | 'pluginConfigLinux' Lens +pluginConfigLinuxL :: Lens_' PluginConfig (PluginConfigLinux) +pluginConfigLinuxL f PluginConfig{..} = (\pluginConfigLinux -> PluginConfig { pluginConfigLinux, ..} ) <$> f pluginConfigLinux +{-# INLINE pluginConfigLinuxL #-} + +-- | 'pluginConfigPropagatedMount' Lens +pluginConfigPropagatedMountL :: Lens_' PluginConfig (Text) +pluginConfigPropagatedMountL f PluginConfig{..} = (\pluginConfigPropagatedMount -> PluginConfig { pluginConfigPropagatedMount, ..} ) <$> f pluginConfigPropagatedMount +{-# INLINE pluginConfigPropagatedMountL #-} + +-- | 'pluginConfigIpcHost' Lens +pluginConfigIpcHostL :: Lens_' PluginConfig (Bool) +pluginConfigIpcHostL f PluginConfig{..} = (\pluginConfigIpcHost -> PluginConfig { pluginConfigIpcHost, ..} ) <$> f pluginConfigIpcHost +{-# INLINE pluginConfigIpcHostL #-} + +-- | 'pluginConfigPidHost' Lens +pluginConfigPidHostL :: Lens_' PluginConfig (Bool) +pluginConfigPidHostL f PluginConfig{..} = (\pluginConfigPidHost -> PluginConfig { pluginConfigPidHost, ..} ) <$> f pluginConfigPidHost +{-# INLINE pluginConfigPidHostL #-} + +-- | 'pluginConfigMounts' Lens +pluginConfigMountsL :: Lens_' PluginConfig ([PluginMount]) +pluginConfigMountsL f PluginConfig{..} = (\pluginConfigMounts -> PluginConfig { pluginConfigMounts, ..} ) <$> f pluginConfigMounts +{-# INLINE pluginConfigMountsL #-} + +-- | 'pluginConfigEnv' Lens +pluginConfigEnvL :: Lens_' PluginConfig ([PluginEnv]) +pluginConfigEnvL f PluginConfig{..} = (\pluginConfigEnv -> PluginConfig { pluginConfigEnv, ..} ) <$> f pluginConfigEnv +{-# INLINE pluginConfigEnvL #-} + +-- | 'pluginConfigArgs' Lens +pluginConfigArgsL :: Lens_' PluginConfig (PluginConfigArgs) +pluginConfigArgsL f PluginConfig{..} = (\pluginConfigArgs -> PluginConfig { pluginConfigArgs, ..} ) <$> f pluginConfigArgs +{-# INLINE pluginConfigArgsL #-} + +-- | 'pluginConfigRootfs' Lens +pluginConfigRootfsL :: Lens_' PluginConfig (Maybe PluginConfigRootfs) +pluginConfigRootfsL f PluginConfig{..} = (\pluginConfigRootfs -> PluginConfig { pluginConfigRootfs, ..} ) <$> f pluginConfigRootfs +{-# INLINE pluginConfigRootfsL #-} + + + +-- * PluginConfigArgs + +-- | 'pluginConfigArgsName' Lens +pluginConfigArgsNameL :: Lens_' PluginConfigArgs (Text) +pluginConfigArgsNameL f PluginConfigArgs{..} = (\pluginConfigArgsName -> PluginConfigArgs { pluginConfigArgsName, ..} ) <$> f pluginConfigArgsName +{-# INLINE pluginConfigArgsNameL #-} + +-- | 'pluginConfigArgsDescription' Lens +pluginConfigArgsDescriptionL :: Lens_' PluginConfigArgs (Text) +pluginConfigArgsDescriptionL f PluginConfigArgs{..} = (\pluginConfigArgsDescription -> PluginConfigArgs { pluginConfigArgsDescription, ..} ) <$> f pluginConfigArgsDescription +{-# INLINE pluginConfigArgsDescriptionL #-} + +-- | 'pluginConfigArgsSettable' Lens +pluginConfigArgsSettableL :: Lens_' PluginConfigArgs ([Text]) +pluginConfigArgsSettableL f PluginConfigArgs{..} = (\pluginConfigArgsSettable -> PluginConfigArgs { pluginConfigArgsSettable, ..} ) <$> f pluginConfigArgsSettable +{-# INLINE pluginConfigArgsSettableL #-} + +-- | 'pluginConfigArgsValue' Lens +pluginConfigArgsValueL :: Lens_' PluginConfigArgs ([Text]) +pluginConfigArgsValueL f PluginConfigArgs{..} = (\pluginConfigArgsValue -> PluginConfigArgs { pluginConfigArgsValue, ..} ) <$> f pluginConfigArgsValue +{-# INLINE pluginConfigArgsValueL #-} + + + +-- * PluginConfigInterface + +-- | 'pluginConfigInterfaceTypes' Lens +pluginConfigInterfaceTypesL :: Lens_' PluginConfigInterface ([PluginInterfaceType]) +pluginConfigInterfaceTypesL f PluginConfigInterface{..} = (\pluginConfigInterfaceTypes -> PluginConfigInterface { pluginConfigInterfaceTypes, ..} ) <$> f pluginConfigInterfaceTypes +{-# INLINE pluginConfigInterfaceTypesL #-} + +-- | 'pluginConfigInterfaceSocket' Lens +pluginConfigInterfaceSocketL :: Lens_' PluginConfigInterface (Text) +pluginConfigInterfaceSocketL f PluginConfigInterface{..} = (\pluginConfigInterfaceSocket -> PluginConfigInterface { pluginConfigInterfaceSocket, ..} ) <$> f pluginConfigInterfaceSocket +{-# INLINE pluginConfigInterfaceSocketL #-} + +-- | 'pluginConfigInterfaceProtocolScheme' Lens +pluginConfigInterfaceProtocolSchemeL :: Lens_' PluginConfigInterface (Maybe E'ProtocolScheme) +pluginConfigInterfaceProtocolSchemeL f PluginConfigInterface{..} = (\pluginConfigInterfaceProtocolScheme -> PluginConfigInterface { pluginConfigInterfaceProtocolScheme, ..} ) <$> f pluginConfigInterfaceProtocolScheme +{-# INLINE pluginConfigInterfaceProtocolSchemeL #-} + + + +-- * PluginConfigLinux + +-- | 'pluginConfigLinuxCapabilities' Lens +pluginConfigLinuxCapabilitiesL :: Lens_' PluginConfigLinux ([Text]) +pluginConfigLinuxCapabilitiesL f PluginConfigLinux{..} = (\pluginConfigLinuxCapabilities -> PluginConfigLinux { pluginConfigLinuxCapabilities, ..} ) <$> f pluginConfigLinuxCapabilities +{-# INLINE pluginConfigLinuxCapabilitiesL #-} + +-- | 'pluginConfigLinuxAllowAllDevices' Lens +pluginConfigLinuxAllowAllDevicesL :: Lens_' PluginConfigLinux (Bool) +pluginConfigLinuxAllowAllDevicesL f PluginConfigLinux{..} = (\pluginConfigLinuxAllowAllDevices -> PluginConfigLinux { pluginConfigLinuxAllowAllDevices, ..} ) <$> f pluginConfigLinuxAllowAllDevices +{-# INLINE pluginConfigLinuxAllowAllDevicesL #-} + +-- | 'pluginConfigLinuxDevices' Lens +pluginConfigLinuxDevicesL :: Lens_' PluginConfigLinux ([PluginDevice]) +pluginConfigLinuxDevicesL f PluginConfigLinux{..} = (\pluginConfigLinuxDevices -> PluginConfigLinux { pluginConfigLinuxDevices, ..} ) <$> f pluginConfigLinuxDevices +{-# INLINE pluginConfigLinuxDevicesL #-} + + + +-- * PluginConfigNetwork + +-- | 'pluginConfigNetworkType' Lens +pluginConfigNetworkTypeL :: Lens_' PluginConfigNetwork (Text) +pluginConfigNetworkTypeL f PluginConfigNetwork{..} = (\pluginConfigNetworkType -> PluginConfigNetwork { pluginConfigNetworkType, ..} ) <$> f pluginConfigNetworkType +{-# INLINE pluginConfigNetworkTypeL #-} + + + +-- * PluginConfigRootfs + +-- | 'pluginConfigRootfsType' Lens +pluginConfigRootfsTypeL :: Lens_' PluginConfigRootfs (Maybe Text) +pluginConfigRootfsTypeL f PluginConfigRootfs{..} = (\pluginConfigRootfsType -> PluginConfigRootfs { pluginConfigRootfsType, ..} ) <$> f pluginConfigRootfsType +{-# INLINE pluginConfigRootfsTypeL #-} + +-- | 'pluginConfigRootfsDiffIds' Lens +pluginConfigRootfsDiffIdsL :: Lens_' PluginConfigRootfs (Maybe [Text]) +pluginConfigRootfsDiffIdsL f PluginConfigRootfs{..} = (\pluginConfigRootfsDiffIds -> PluginConfigRootfs { pluginConfigRootfsDiffIds, ..} ) <$> f pluginConfigRootfsDiffIds +{-# INLINE pluginConfigRootfsDiffIdsL #-} + + + +-- * PluginConfigUser + +-- | 'pluginConfigUserUid' Lens +pluginConfigUserUidL :: Lens_' PluginConfigUser (Maybe Int) +pluginConfigUserUidL f PluginConfigUser{..} = (\pluginConfigUserUid -> PluginConfigUser { pluginConfigUserUid, ..} ) <$> f pluginConfigUserUid +{-# INLINE pluginConfigUserUidL #-} + +-- | 'pluginConfigUserGid' Lens +pluginConfigUserGidL :: Lens_' PluginConfigUser (Maybe Int) +pluginConfigUserGidL f PluginConfigUser{..} = (\pluginConfigUserGid -> PluginConfigUser { pluginConfigUserGid, ..} ) <$> f pluginConfigUserGid +{-# INLINE pluginConfigUserGidL #-} + + + +-- * PluginDevice + +-- | 'pluginDeviceName' Lens +pluginDeviceNameL :: Lens_' PluginDevice (Text) +pluginDeviceNameL f PluginDevice{..} = (\pluginDeviceName -> PluginDevice { pluginDeviceName, ..} ) <$> f pluginDeviceName +{-# INLINE pluginDeviceNameL #-} + +-- | 'pluginDeviceDescription' Lens +pluginDeviceDescriptionL :: Lens_' PluginDevice (Text) +pluginDeviceDescriptionL f PluginDevice{..} = (\pluginDeviceDescription -> PluginDevice { pluginDeviceDescription, ..} ) <$> f pluginDeviceDescription +{-# INLINE pluginDeviceDescriptionL #-} + +-- | 'pluginDeviceSettable' Lens +pluginDeviceSettableL :: Lens_' PluginDevice ([Text]) +pluginDeviceSettableL f PluginDevice{..} = (\pluginDeviceSettable -> PluginDevice { pluginDeviceSettable, ..} ) <$> f pluginDeviceSettable +{-# INLINE pluginDeviceSettableL #-} + +-- | 'pluginDevicePath' Lens +pluginDevicePathL :: Lens_' PluginDevice (Text) +pluginDevicePathL f PluginDevice{..} = (\pluginDevicePath -> PluginDevice { pluginDevicePath, ..} ) <$> f pluginDevicePath +{-# INLINE pluginDevicePathL #-} + + + +-- * PluginEnv + +-- | 'pluginEnvName' Lens +pluginEnvNameL :: Lens_' PluginEnv (Text) +pluginEnvNameL f PluginEnv{..} = (\pluginEnvName -> PluginEnv { pluginEnvName, ..} ) <$> f pluginEnvName +{-# INLINE pluginEnvNameL #-} + +-- | 'pluginEnvDescription' Lens +pluginEnvDescriptionL :: Lens_' PluginEnv (Text) +pluginEnvDescriptionL f PluginEnv{..} = (\pluginEnvDescription -> PluginEnv { pluginEnvDescription, ..} ) <$> f pluginEnvDescription +{-# INLINE pluginEnvDescriptionL #-} + +-- | 'pluginEnvSettable' Lens +pluginEnvSettableL :: Lens_' PluginEnv ([Text]) +pluginEnvSettableL f PluginEnv{..} = (\pluginEnvSettable -> PluginEnv { pluginEnvSettable, ..} ) <$> f pluginEnvSettable +{-# INLINE pluginEnvSettableL #-} + +-- | 'pluginEnvValue' Lens +pluginEnvValueL :: Lens_' PluginEnv (Text) +pluginEnvValueL f PluginEnv{..} = (\pluginEnvValue -> PluginEnv { pluginEnvValue, ..} ) <$> f pluginEnvValue +{-# INLINE pluginEnvValueL #-} + + + +-- * PluginInterfaceType + +-- | 'pluginInterfaceTypePrefix' Lens +pluginInterfaceTypePrefixL :: Lens_' PluginInterfaceType (Text) +pluginInterfaceTypePrefixL f PluginInterfaceType{..} = (\pluginInterfaceTypePrefix -> PluginInterfaceType { pluginInterfaceTypePrefix, ..} ) <$> f pluginInterfaceTypePrefix +{-# INLINE pluginInterfaceTypePrefixL #-} + +-- | 'pluginInterfaceTypeCapability' Lens +pluginInterfaceTypeCapabilityL :: Lens_' PluginInterfaceType (Text) +pluginInterfaceTypeCapabilityL f PluginInterfaceType{..} = (\pluginInterfaceTypeCapability -> PluginInterfaceType { pluginInterfaceTypeCapability, ..} ) <$> f pluginInterfaceTypeCapability +{-# INLINE pluginInterfaceTypeCapabilityL #-} + +-- | 'pluginInterfaceTypeVersion' Lens +pluginInterfaceTypeVersionL :: Lens_' PluginInterfaceType (Text) +pluginInterfaceTypeVersionL f PluginInterfaceType{..} = (\pluginInterfaceTypeVersion -> PluginInterfaceType { pluginInterfaceTypeVersion, ..} ) <$> f pluginInterfaceTypeVersion +{-# INLINE pluginInterfaceTypeVersionL #-} + + + +-- * PluginMount + +-- | 'pluginMountName' Lens +pluginMountNameL :: Lens_' PluginMount (Text) +pluginMountNameL f PluginMount{..} = (\pluginMountName -> PluginMount { pluginMountName, ..} ) <$> f pluginMountName +{-# INLINE pluginMountNameL #-} + +-- | 'pluginMountDescription' Lens +pluginMountDescriptionL :: Lens_' PluginMount (Text) +pluginMountDescriptionL f PluginMount{..} = (\pluginMountDescription -> PluginMount { pluginMountDescription, ..} ) <$> f pluginMountDescription +{-# INLINE pluginMountDescriptionL #-} + +-- | 'pluginMountSettable' Lens +pluginMountSettableL :: Lens_' PluginMount ([Text]) +pluginMountSettableL f PluginMount{..} = (\pluginMountSettable -> PluginMount { pluginMountSettable, ..} ) <$> f pluginMountSettable +{-# INLINE pluginMountSettableL #-} + +-- | 'pluginMountSource' Lens +pluginMountSourceL :: Lens_' PluginMount (Text) +pluginMountSourceL f PluginMount{..} = (\pluginMountSource -> PluginMount { pluginMountSource, ..} ) <$> f pluginMountSource +{-# INLINE pluginMountSourceL #-} + +-- | 'pluginMountDestination' Lens +pluginMountDestinationL :: Lens_' PluginMount (Text) +pluginMountDestinationL f PluginMount{..} = (\pluginMountDestination -> PluginMount { pluginMountDestination, ..} ) <$> f pluginMountDestination +{-# INLINE pluginMountDestinationL #-} + +-- | 'pluginMountType' Lens +pluginMountTypeL :: Lens_' PluginMount (Text) +pluginMountTypeL f PluginMount{..} = (\pluginMountType -> PluginMount { pluginMountType, ..} ) <$> f pluginMountType +{-# INLINE pluginMountTypeL #-} + +-- | 'pluginMountOptions' Lens +pluginMountOptionsL :: Lens_' PluginMount ([Text]) +pluginMountOptionsL f PluginMount{..} = (\pluginMountOptions -> PluginMount { pluginMountOptions, ..} ) <$> f pluginMountOptions +{-# INLINE pluginMountOptionsL #-} + + + +-- * PluginPrivilege + +-- | 'pluginPrivilegeName' Lens +pluginPrivilegeNameL :: Lens_' PluginPrivilege (Maybe Text) +pluginPrivilegeNameL f PluginPrivilege{..} = (\pluginPrivilegeName -> PluginPrivilege { pluginPrivilegeName, ..} ) <$> f pluginPrivilegeName +{-# INLINE pluginPrivilegeNameL #-} + +-- | 'pluginPrivilegeDescription' Lens +pluginPrivilegeDescriptionL :: Lens_' PluginPrivilege (Maybe Text) +pluginPrivilegeDescriptionL f PluginPrivilege{..} = (\pluginPrivilegeDescription -> PluginPrivilege { pluginPrivilegeDescription, ..} ) <$> f pluginPrivilegeDescription +{-# INLINE pluginPrivilegeDescriptionL #-} + +-- | 'pluginPrivilegeValue' Lens +pluginPrivilegeValueL :: Lens_' PluginPrivilege (Maybe [Text]) +pluginPrivilegeValueL f PluginPrivilege{..} = (\pluginPrivilegeValue -> PluginPrivilege { pluginPrivilegeValue, ..} ) <$> f pluginPrivilegeValue +{-# INLINE pluginPrivilegeValueL #-} + + + +-- * PluginSettings + +-- | 'pluginSettingsMounts' Lens +pluginSettingsMountsL :: Lens_' PluginSettings ([PluginMount]) +pluginSettingsMountsL f PluginSettings{..} = (\pluginSettingsMounts -> PluginSettings { pluginSettingsMounts, ..} ) <$> f pluginSettingsMounts +{-# INLINE pluginSettingsMountsL #-} + +-- | 'pluginSettingsEnv' Lens +pluginSettingsEnvL :: Lens_' PluginSettings ([Text]) +pluginSettingsEnvL f PluginSettings{..} = (\pluginSettingsEnv -> PluginSettings { pluginSettingsEnv, ..} ) <$> f pluginSettingsEnv +{-# INLINE pluginSettingsEnvL #-} + +-- | 'pluginSettingsArgs' Lens +pluginSettingsArgsL :: Lens_' PluginSettings ([Text]) +pluginSettingsArgsL f PluginSettings{..} = (\pluginSettingsArgs -> PluginSettings { pluginSettingsArgs, ..} ) <$> f pluginSettingsArgs +{-# INLINE pluginSettingsArgsL #-} + +-- | 'pluginSettingsDevices' Lens +pluginSettingsDevicesL :: Lens_' PluginSettings ([PluginDevice]) +pluginSettingsDevicesL f PluginSettings{..} = (\pluginSettingsDevices -> PluginSettings { pluginSettingsDevices, ..} ) <$> f pluginSettingsDevices +{-# INLINE pluginSettingsDevicesL #-} + + + +-- * PluginsInfo + +-- | 'pluginsInfoVolume' Lens +pluginsInfoVolumeL :: Lens_' PluginsInfo (Maybe [Text]) +pluginsInfoVolumeL f PluginsInfo{..} = (\pluginsInfoVolume -> PluginsInfo { pluginsInfoVolume, ..} ) <$> f pluginsInfoVolume +{-# INLINE pluginsInfoVolumeL #-} + +-- | 'pluginsInfoNetwork' Lens +pluginsInfoNetworkL :: Lens_' PluginsInfo (Maybe [Text]) +pluginsInfoNetworkL f PluginsInfo{..} = (\pluginsInfoNetwork -> PluginsInfo { pluginsInfoNetwork, ..} ) <$> f pluginsInfoNetwork +{-# INLINE pluginsInfoNetworkL #-} + +-- | 'pluginsInfoAuthorization' Lens +pluginsInfoAuthorizationL :: Lens_' PluginsInfo (Maybe [Text]) +pluginsInfoAuthorizationL f PluginsInfo{..} = (\pluginsInfoAuthorization -> PluginsInfo { pluginsInfoAuthorization, ..} ) <$> f pluginsInfoAuthorization +{-# INLINE pluginsInfoAuthorizationL #-} + +-- | 'pluginsInfoLog' Lens +pluginsInfoLogL :: Lens_' PluginsInfo (Maybe [Text]) +pluginsInfoLogL f PluginsInfo{..} = (\pluginsInfoLog -> PluginsInfo { pluginsInfoLog, ..} ) <$> f pluginsInfoLog +{-# INLINE pluginsInfoLogL #-} + + + +-- * Port + +-- | 'portIp' Lens +portIpL :: Lens_' Port (Maybe Text) +portIpL f Port{..} = (\portIp -> Port { portIp, ..} ) <$> f portIp +{-# INLINE portIpL #-} + +-- | 'portPrivatePort' Lens +portPrivatePortL :: Lens_' Port (Int) +portPrivatePortL f Port{..} = (\portPrivatePort -> Port { portPrivatePort, ..} ) <$> f portPrivatePort +{-# INLINE portPrivatePortL #-} + +-- | 'portPublicPort' Lens +portPublicPortL :: Lens_' Port (Maybe Int) +portPublicPortL f Port{..} = (\portPublicPort -> Port { portPublicPort, ..} ) <$> f portPublicPort +{-# INLINE portPublicPortL #-} + +-- | 'portType' Lens +portTypeL :: Lens_' Port (E'Type) +portTypeL f Port{..} = (\portType -> Port { portType, ..} ) <$> f portType +{-# INLINE portTypeL #-} + + + +-- * PortBinding + +-- | 'portBindingHostIp' Lens +portBindingHostIpL :: Lens_' PortBinding (Maybe Text) +portBindingHostIpL f PortBinding{..} = (\portBindingHostIp -> PortBinding { portBindingHostIp, ..} ) <$> f portBindingHostIp +{-# INLINE portBindingHostIpL #-} + +-- | 'portBindingHostPort' Lens +portBindingHostPortL :: Lens_' PortBinding (Maybe Text) +portBindingHostPortL f PortBinding{..} = (\portBindingHostPort -> PortBinding { portBindingHostPort, ..} ) <$> f portBindingHostPort +{-# INLINE portBindingHostPortL #-} + + + +-- * PortStatus + +-- | 'portStatusPorts' Lens +portStatusPortsL :: Lens_' PortStatus (Maybe [EndpointPortConfig]) +portStatusPortsL f PortStatus{..} = (\portStatusPorts -> PortStatus { portStatusPorts, ..} ) <$> f portStatusPorts +{-# INLINE portStatusPortsL #-} + + + +-- * ProcessConfig + +-- | 'processConfigPrivileged' Lens +processConfigPrivilegedL :: Lens_' ProcessConfig (Maybe Bool) +processConfigPrivilegedL f ProcessConfig{..} = (\processConfigPrivileged -> ProcessConfig { processConfigPrivileged, ..} ) <$> f processConfigPrivileged +{-# INLINE processConfigPrivilegedL #-} + +-- | 'processConfigUser' Lens +processConfigUserL :: Lens_' ProcessConfig (Maybe Text) +processConfigUserL f ProcessConfig{..} = (\processConfigUser -> ProcessConfig { processConfigUser, ..} ) <$> f processConfigUser +{-# INLINE processConfigUserL #-} + +-- | 'processConfigTty' Lens +processConfigTtyL :: Lens_' ProcessConfig (Maybe Bool) +processConfigTtyL f ProcessConfig{..} = (\processConfigTty -> ProcessConfig { processConfigTty, ..} ) <$> f processConfigTty +{-# INLINE processConfigTtyL #-} + +-- | 'processConfigEntrypoint' Lens +processConfigEntrypointL :: Lens_' ProcessConfig (Maybe Text) +processConfigEntrypointL f ProcessConfig{..} = (\processConfigEntrypoint -> ProcessConfig { processConfigEntrypoint, ..} ) <$> f processConfigEntrypoint +{-# INLINE processConfigEntrypointL #-} + +-- | 'processConfigArguments' Lens +processConfigArgumentsL :: Lens_' ProcessConfig (Maybe [Text]) +processConfigArgumentsL f ProcessConfig{..} = (\processConfigArguments -> ProcessConfig { processConfigArguments, ..} ) <$> f processConfigArguments +{-# INLINE processConfigArgumentsL #-} + + + +-- * ProgressDetail + +-- | 'progressDetailCurrent' Lens +progressDetailCurrentL :: Lens_' ProgressDetail (Maybe Int) +progressDetailCurrentL f ProgressDetail{..} = (\progressDetailCurrent -> ProgressDetail { progressDetailCurrent, ..} ) <$> f progressDetailCurrent +{-# INLINE progressDetailCurrentL #-} + +-- | 'progressDetailTotal' Lens +progressDetailTotalL :: Lens_' ProgressDetail (Maybe Int) +progressDetailTotalL f ProgressDetail{..} = (\progressDetailTotal -> ProgressDetail { progressDetailTotal, ..} ) <$> f progressDetailTotal +{-# INLINE progressDetailTotalL #-} + + + +-- * PushImageInfo + +-- | 'pushImageInfoError' Lens +pushImageInfoErrorL :: Lens_' PushImageInfo (Maybe Text) +pushImageInfoErrorL f PushImageInfo{..} = (\pushImageInfoError -> PushImageInfo { pushImageInfoError, ..} ) <$> f pushImageInfoError +{-# INLINE pushImageInfoErrorL #-} + +-- | 'pushImageInfoStatus' Lens +pushImageInfoStatusL :: Lens_' PushImageInfo (Maybe Text) +pushImageInfoStatusL f PushImageInfo{..} = (\pushImageInfoStatus -> PushImageInfo { pushImageInfoStatus, ..} ) <$> f pushImageInfoStatus +{-# INLINE pushImageInfoStatusL #-} + +-- | 'pushImageInfoProgress' Lens +pushImageInfoProgressL :: Lens_' PushImageInfo (Maybe Text) +pushImageInfoProgressL f PushImageInfo{..} = (\pushImageInfoProgress -> PushImageInfo { pushImageInfoProgress, ..} ) <$> f pushImageInfoProgress +{-# INLINE pushImageInfoProgressL #-} + +-- | 'pushImageInfoProgressDetail' Lens +pushImageInfoProgressDetailL :: Lens_' PushImageInfo (Maybe ProgressDetail) +pushImageInfoProgressDetailL f PushImageInfo{..} = (\pushImageInfoProgressDetail -> PushImageInfo { pushImageInfoProgressDetail, ..} ) <$> f pushImageInfoProgressDetail +{-# INLINE pushImageInfoProgressDetailL #-} + + + +-- * Reachability + + + +-- * RegistryServiceConfig + +-- | 'registryServiceConfigAllowNondistributableArtifactsCidrs' Lens +registryServiceConfigAllowNondistributableArtifactsCidrsL :: Lens_' RegistryServiceConfig (Maybe [Text]) +registryServiceConfigAllowNondistributableArtifactsCidrsL f RegistryServiceConfig{..} = (\registryServiceConfigAllowNondistributableArtifactsCidrs -> RegistryServiceConfig { registryServiceConfigAllowNondistributableArtifactsCidrs, ..} ) <$> f registryServiceConfigAllowNondistributableArtifactsCidrs +{-# INLINE registryServiceConfigAllowNondistributableArtifactsCidrsL #-} + +-- | 'registryServiceConfigAllowNondistributableArtifactsHostnames' Lens +registryServiceConfigAllowNondistributableArtifactsHostnamesL :: Lens_' RegistryServiceConfig (Maybe [Text]) +registryServiceConfigAllowNondistributableArtifactsHostnamesL f RegistryServiceConfig{..} = (\registryServiceConfigAllowNondistributableArtifactsHostnames -> RegistryServiceConfig { registryServiceConfigAllowNondistributableArtifactsHostnames, ..} ) <$> f registryServiceConfigAllowNondistributableArtifactsHostnames +{-# INLINE registryServiceConfigAllowNondistributableArtifactsHostnamesL #-} + +-- | 'registryServiceConfigInsecureRegistryCidrs' Lens +registryServiceConfigInsecureRegistryCidrsL :: Lens_' RegistryServiceConfig (Maybe [Text]) +registryServiceConfigInsecureRegistryCidrsL f RegistryServiceConfig{..} = (\registryServiceConfigInsecureRegistryCidrs -> RegistryServiceConfig { registryServiceConfigInsecureRegistryCidrs, ..} ) <$> f registryServiceConfigInsecureRegistryCidrs +{-# INLINE registryServiceConfigInsecureRegistryCidrsL #-} + +-- | 'registryServiceConfigIndexConfigs' Lens +registryServiceConfigIndexConfigsL :: Lens_' RegistryServiceConfig (Maybe (Map.Map String IndexInfo)) +registryServiceConfigIndexConfigsL f RegistryServiceConfig{..} = (\registryServiceConfigIndexConfigs -> RegistryServiceConfig { registryServiceConfigIndexConfigs, ..} ) <$> f registryServiceConfigIndexConfigs +{-# INLINE registryServiceConfigIndexConfigsL #-} + +-- | 'registryServiceConfigMirrors' Lens +registryServiceConfigMirrorsL :: Lens_' RegistryServiceConfig (Maybe [Text]) +registryServiceConfigMirrorsL f RegistryServiceConfig{..} = (\registryServiceConfigMirrors -> RegistryServiceConfig { registryServiceConfigMirrors, ..} ) <$> f registryServiceConfigMirrors +{-# INLINE registryServiceConfigMirrorsL #-} + + + +-- * ResourceObject + +-- | 'resourceObjectNanoCpus' Lens +resourceObjectNanoCpusL :: Lens_' ResourceObject (Maybe Integer) +resourceObjectNanoCpusL f ResourceObject{..} = (\resourceObjectNanoCpus -> ResourceObject { resourceObjectNanoCpus, ..} ) <$> f resourceObjectNanoCpus +{-# INLINE resourceObjectNanoCpusL #-} + +-- | 'resourceObjectMemoryBytes' Lens +resourceObjectMemoryBytesL :: Lens_' ResourceObject (Maybe Integer) +resourceObjectMemoryBytesL f ResourceObject{..} = (\resourceObjectMemoryBytes -> ResourceObject { resourceObjectMemoryBytes, ..} ) <$> f resourceObjectMemoryBytes +{-# INLINE resourceObjectMemoryBytesL #-} + +-- | 'resourceObjectGenericResources' Lens +resourceObjectGenericResourcesL :: Lens_' ResourceObject (Maybe [GenericResourcesInner]) +resourceObjectGenericResourcesL f ResourceObject{..} = (\resourceObjectGenericResources -> ResourceObject { resourceObjectGenericResources, ..} ) <$> f resourceObjectGenericResources +{-# INLINE resourceObjectGenericResourcesL #-} + + + +-- * Resources + +-- | 'resourcesCpuShares' Lens +resourcesCpuSharesL :: Lens_' Resources (Maybe Int) +resourcesCpuSharesL f Resources{..} = (\resourcesCpuShares -> Resources { resourcesCpuShares, ..} ) <$> f resourcesCpuShares +{-# INLINE resourcesCpuSharesL #-} + +-- | 'resourcesMemory' Lens +resourcesMemoryL :: Lens_' Resources (Maybe Integer) +resourcesMemoryL f Resources{..} = (\resourcesMemory -> Resources { resourcesMemory, ..} ) <$> f resourcesMemory +{-# INLINE resourcesMemoryL #-} + +-- | 'resourcesCgroupParent' Lens +resourcesCgroupParentL :: Lens_' Resources (Maybe Text) +resourcesCgroupParentL f Resources{..} = (\resourcesCgroupParent -> Resources { resourcesCgroupParent, ..} ) <$> f resourcesCgroupParent +{-# INLINE resourcesCgroupParentL #-} + +-- | 'resourcesBlkioWeight' Lens +resourcesBlkioWeightL :: Lens_' Resources (Maybe Int) +resourcesBlkioWeightL f Resources{..} = (\resourcesBlkioWeight -> Resources { resourcesBlkioWeight, ..} ) <$> f resourcesBlkioWeight +{-# INLINE resourcesBlkioWeightL #-} + +-- | 'resourcesBlkioWeightDevice' Lens +resourcesBlkioWeightDeviceL :: Lens_' Resources (Maybe [ResourcesBlkioWeightDeviceInner]) +resourcesBlkioWeightDeviceL f Resources{..} = (\resourcesBlkioWeightDevice -> Resources { resourcesBlkioWeightDevice, ..} ) <$> f resourcesBlkioWeightDevice +{-# INLINE resourcesBlkioWeightDeviceL #-} + +-- | 'resourcesBlkioDeviceReadBps' Lens +resourcesBlkioDeviceReadBpsL :: Lens_' Resources (Maybe [ThrottleDevice]) +resourcesBlkioDeviceReadBpsL f Resources{..} = (\resourcesBlkioDeviceReadBps -> Resources { resourcesBlkioDeviceReadBps, ..} ) <$> f resourcesBlkioDeviceReadBps +{-# INLINE resourcesBlkioDeviceReadBpsL #-} + +-- | 'resourcesBlkioDeviceWriteBps' Lens +resourcesBlkioDeviceWriteBpsL :: Lens_' Resources (Maybe [ThrottleDevice]) +resourcesBlkioDeviceWriteBpsL f Resources{..} = (\resourcesBlkioDeviceWriteBps -> Resources { resourcesBlkioDeviceWriteBps, ..} ) <$> f resourcesBlkioDeviceWriteBps +{-# INLINE resourcesBlkioDeviceWriteBpsL #-} + +-- | 'resourcesBlkioDeviceReadIOps' Lens +resourcesBlkioDeviceReadIOpsL :: Lens_' Resources (Maybe [ThrottleDevice]) +resourcesBlkioDeviceReadIOpsL f Resources{..} = (\resourcesBlkioDeviceReadIOps -> Resources { resourcesBlkioDeviceReadIOps, ..} ) <$> f resourcesBlkioDeviceReadIOps +{-# INLINE resourcesBlkioDeviceReadIOpsL #-} + +-- | 'resourcesBlkioDeviceWriteIOps' Lens +resourcesBlkioDeviceWriteIOpsL :: Lens_' Resources (Maybe [ThrottleDevice]) +resourcesBlkioDeviceWriteIOpsL f Resources{..} = (\resourcesBlkioDeviceWriteIOps -> Resources { resourcesBlkioDeviceWriteIOps, ..} ) <$> f resourcesBlkioDeviceWriteIOps +{-# INLINE resourcesBlkioDeviceWriteIOpsL #-} + +-- | 'resourcesCpuPeriod' Lens +resourcesCpuPeriodL :: Lens_' Resources (Maybe Integer) +resourcesCpuPeriodL f Resources{..} = (\resourcesCpuPeriod -> Resources { resourcesCpuPeriod, ..} ) <$> f resourcesCpuPeriod +{-# INLINE resourcesCpuPeriodL #-} + +-- | 'resourcesCpuQuota' Lens +resourcesCpuQuotaL :: Lens_' Resources (Maybe Integer) +resourcesCpuQuotaL f Resources{..} = (\resourcesCpuQuota -> Resources { resourcesCpuQuota, ..} ) <$> f resourcesCpuQuota +{-# INLINE resourcesCpuQuotaL #-} + +-- | 'resourcesCpuRealtimePeriod' Lens +resourcesCpuRealtimePeriodL :: Lens_' Resources (Maybe Integer) +resourcesCpuRealtimePeriodL f Resources{..} = (\resourcesCpuRealtimePeriod -> Resources { resourcesCpuRealtimePeriod, ..} ) <$> f resourcesCpuRealtimePeriod +{-# INLINE resourcesCpuRealtimePeriodL #-} + +-- | 'resourcesCpuRealtimeRuntime' Lens +resourcesCpuRealtimeRuntimeL :: Lens_' Resources (Maybe Integer) +resourcesCpuRealtimeRuntimeL f Resources{..} = (\resourcesCpuRealtimeRuntime -> Resources { resourcesCpuRealtimeRuntime, ..} ) <$> f resourcesCpuRealtimeRuntime +{-# INLINE resourcesCpuRealtimeRuntimeL #-} + +-- | 'resourcesCpusetCpus' Lens +resourcesCpusetCpusL :: Lens_' Resources (Maybe Text) +resourcesCpusetCpusL f Resources{..} = (\resourcesCpusetCpus -> Resources { resourcesCpusetCpus, ..} ) <$> f resourcesCpusetCpus +{-# INLINE resourcesCpusetCpusL #-} + +-- | 'resourcesCpusetMems' Lens +resourcesCpusetMemsL :: Lens_' Resources (Maybe Text) +resourcesCpusetMemsL f Resources{..} = (\resourcesCpusetMems -> Resources { resourcesCpusetMems, ..} ) <$> f resourcesCpusetMems +{-# INLINE resourcesCpusetMemsL #-} + +-- | 'resourcesDevices' Lens +resourcesDevicesL :: Lens_' Resources (Maybe [DeviceMapping]) +resourcesDevicesL f Resources{..} = (\resourcesDevices -> Resources { resourcesDevices, ..} ) <$> f resourcesDevices +{-# INLINE resourcesDevicesL #-} + +-- | 'resourcesDeviceCgroupRules' Lens +resourcesDeviceCgroupRulesL :: Lens_' Resources (Maybe [Text]) +resourcesDeviceCgroupRulesL f Resources{..} = (\resourcesDeviceCgroupRules -> Resources { resourcesDeviceCgroupRules, ..} ) <$> f resourcesDeviceCgroupRules +{-# INLINE resourcesDeviceCgroupRulesL #-} + +-- | 'resourcesDeviceRequests' Lens +resourcesDeviceRequestsL :: Lens_' Resources (Maybe [DeviceRequest]) +resourcesDeviceRequestsL f Resources{..} = (\resourcesDeviceRequests -> Resources { resourcesDeviceRequests, ..} ) <$> f resourcesDeviceRequests +{-# INLINE resourcesDeviceRequestsL #-} + +-- | 'resourcesKernelMemoryTcp' Lens +resourcesKernelMemoryTcpL :: Lens_' Resources (Maybe Integer) +resourcesKernelMemoryTcpL f Resources{..} = (\resourcesKernelMemoryTcp -> Resources { resourcesKernelMemoryTcp, ..} ) <$> f resourcesKernelMemoryTcp +{-# INLINE resourcesKernelMemoryTcpL #-} + +-- | 'resourcesMemoryReservation' Lens +resourcesMemoryReservationL :: Lens_' Resources (Maybe Integer) +resourcesMemoryReservationL f Resources{..} = (\resourcesMemoryReservation -> Resources { resourcesMemoryReservation, ..} ) <$> f resourcesMemoryReservation +{-# INLINE resourcesMemoryReservationL #-} + +-- | 'resourcesMemorySwap' Lens +resourcesMemorySwapL :: Lens_' Resources (Maybe Integer) +resourcesMemorySwapL f Resources{..} = (\resourcesMemorySwap -> Resources { resourcesMemorySwap, ..} ) <$> f resourcesMemorySwap +{-# INLINE resourcesMemorySwapL #-} + +-- | 'resourcesMemorySwappiness' Lens +resourcesMemorySwappinessL :: Lens_' Resources (Maybe Integer) +resourcesMemorySwappinessL f Resources{..} = (\resourcesMemorySwappiness -> Resources { resourcesMemorySwappiness, ..} ) <$> f resourcesMemorySwappiness +{-# INLINE resourcesMemorySwappinessL #-} + +-- | 'resourcesNanoCpus' Lens +resourcesNanoCpusL :: Lens_' Resources (Maybe Integer) +resourcesNanoCpusL f Resources{..} = (\resourcesNanoCpus -> Resources { resourcesNanoCpus, ..} ) <$> f resourcesNanoCpus +{-# INLINE resourcesNanoCpusL #-} + +-- | 'resourcesOomKillDisable' Lens +resourcesOomKillDisableL :: Lens_' Resources (Maybe Bool) +resourcesOomKillDisableL f Resources{..} = (\resourcesOomKillDisable -> Resources { resourcesOomKillDisable, ..} ) <$> f resourcesOomKillDisable +{-# INLINE resourcesOomKillDisableL #-} + +-- | 'resourcesInit' Lens +resourcesInitL :: Lens_' Resources (Maybe Bool) +resourcesInitL f Resources{..} = (\resourcesInit -> Resources { resourcesInit, ..} ) <$> f resourcesInit +{-# INLINE resourcesInitL #-} + +-- | 'resourcesPidsLimit' Lens +resourcesPidsLimitL :: Lens_' Resources (Maybe Integer) +resourcesPidsLimitL f Resources{..} = (\resourcesPidsLimit -> Resources { resourcesPidsLimit, ..} ) <$> f resourcesPidsLimit +{-# INLINE resourcesPidsLimitL #-} + +-- | 'resourcesUlimits' Lens +resourcesUlimitsL :: Lens_' Resources (Maybe [ResourcesUlimitsInner]) +resourcesUlimitsL f Resources{..} = (\resourcesUlimits -> Resources { resourcesUlimits, ..} ) <$> f resourcesUlimits +{-# INLINE resourcesUlimitsL #-} + +-- | 'resourcesCpuCount' Lens +resourcesCpuCountL :: Lens_' Resources (Maybe Integer) +resourcesCpuCountL f Resources{..} = (\resourcesCpuCount -> Resources { resourcesCpuCount, ..} ) <$> f resourcesCpuCount +{-# INLINE resourcesCpuCountL #-} + +-- | 'resourcesCpuPercent' Lens +resourcesCpuPercentL :: Lens_' Resources (Maybe Integer) +resourcesCpuPercentL f Resources{..} = (\resourcesCpuPercent -> Resources { resourcesCpuPercent, ..} ) <$> f resourcesCpuPercent +{-# INLINE resourcesCpuPercentL #-} + +-- | 'resourcesIoMaximumIOps' Lens +resourcesIoMaximumIOpsL :: Lens_' Resources (Maybe Integer) +resourcesIoMaximumIOpsL f Resources{..} = (\resourcesIoMaximumIOps -> Resources { resourcesIoMaximumIOps, ..} ) <$> f resourcesIoMaximumIOps +{-# INLINE resourcesIoMaximumIOpsL #-} + +-- | 'resourcesIoMaximumBandwidth' Lens +resourcesIoMaximumBandwidthL :: Lens_' Resources (Maybe Integer) +resourcesIoMaximumBandwidthL f Resources{..} = (\resourcesIoMaximumBandwidth -> Resources { resourcesIoMaximumBandwidth, ..} ) <$> f resourcesIoMaximumBandwidth +{-# INLINE resourcesIoMaximumBandwidthL #-} + + + +-- * ResourcesBlkioWeightDeviceInner + +-- | 'resourcesBlkioWeightDeviceInnerPath' Lens +resourcesBlkioWeightDeviceInnerPathL :: Lens_' ResourcesBlkioWeightDeviceInner (Maybe Text) +resourcesBlkioWeightDeviceInnerPathL f ResourcesBlkioWeightDeviceInner{..} = (\resourcesBlkioWeightDeviceInnerPath -> ResourcesBlkioWeightDeviceInner { resourcesBlkioWeightDeviceInnerPath, ..} ) <$> f resourcesBlkioWeightDeviceInnerPath +{-# INLINE resourcesBlkioWeightDeviceInnerPathL #-} + +-- | 'resourcesBlkioWeightDeviceInnerWeight' Lens +resourcesBlkioWeightDeviceInnerWeightL :: Lens_' ResourcesBlkioWeightDeviceInner (Maybe Int) +resourcesBlkioWeightDeviceInnerWeightL f ResourcesBlkioWeightDeviceInner{..} = (\resourcesBlkioWeightDeviceInnerWeight -> ResourcesBlkioWeightDeviceInner { resourcesBlkioWeightDeviceInnerWeight, ..} ) <$> f resourcesBlkioWeightDeviceInnerWeight +{-# INLINE resourcesBlkioWeightDeviceInnerWeightL #-} + + + +-- * ResourcesUlimitsInner + +-- | 'resourcesUlimitsInnerName' Lens +resourcesUlimitsInnerNameL :: Lens_' ResourcesUlimitsInner (Maybe Text) +resourcesUlimitsInnerNameL f ResourcesUlimitsInner{..} = (\resourcesUlimitsInnerName -> ResourcesUlimitsInner { resourcesUlimitsInnerName, ..} ) <$> f resourcesUlimitsInnerName +{-# INLINE resourcesUlimitsInnerNameL #-} + +-- | 'resourcesUlimitsInnerSoft' Lens +resourcesUlimitsInnerSoftL :: Lens_' ResourcesUlimitsInner (Maybe Int) +resourcesUlimitsInnerSoftL f ResourcesUlimitsInner{..} = (\resourcesUlimitsInnerSoft -> ResourcesUlimitsInner { resourcesUlimitsInnerSoft, ..} ) <$> f resourcesUlimitsInnerSoft +{-# INLINE resourcesUlimitsInnerSoftL #-} + +-- | 'resourcesUlimitsInnerHard' Lens +resourcesUlimitsInnerHardL :: Lens_' ResourcesUlimitsInner (Maybe Int) +resourcesUlimitsInnerHardL f ResourcesUlimitsInner{..} = (\resourcesUlimitsInnerHard -> ResourcesUlimitsInner { resourcesUlimitsInnerHard, ..} ) <$> f resourcesUlimitsInnerHard +{-# INLINE resourcesUlimitsInnerHardL #-} + + + +-- * RestartPolicy + +-- | 'restartPolicyName' Lens +restartPolicyNameL :: Lens_' RestartPolicy (Maybe E'Name) +restartPolicyNameL f RestartPolicy{..} = (\restartPolicyName -> RestartPolicy { restartPolicyName, ..} ) <$> f restartPolicyName +{-# INLINE restartPolicyNameL #-} + +-- | 'restartPolicyMaximumRetryCount' Lens +restartPolicyMaximumRetryCountL :: Lens_' RestartPolicy (Maybe Int) +restartPolicyMaximumRetryCountL f RestartPolicy{..} = (\restartPolicyMaximumRetryCount -> RestartPolicy { restartPolicyMaximumRetryCount, ..} ) <$> f restartPolicyMaximumRetryCount +{-# INLINE restartPolicyMaximumRetryCountL #-} + + + +-- * Runtime + +-- | 'runtimePath' Lens +runtimePathL :: Lens_' Runtime (Maybe Text) +runtimePathL f Runtime{..} = (\runtimePath -> Runtime { runtimePath, ..} ) <$> f runtimePath +{-# INLINE runtimePathL #-} + +-- | 'runtimeRuntimeArgs' Lens +runtimeRuntimeArgsL :: Lens_' Runtime (Maybe [Text]) +runtimeRuntimeArgsL f Runtime{..} = (\runtimeRuntimeArgs -> Runtime { runtimeRuntimeArgs, ..} ) <$> f runtimeRuntimeArgs +{-# INLINE runtimeRuntimeArgsL #-} + +-- | 'runtimeStatus' Lens +runtimeStatusL :: Lens_' Runtime (Maybe (Map.Map String Text)) +runtimeStatusL f Runtime{..} = (\runtimeStatus -> Runtime { runtimeStatus, ..} ) <$> f runtimeStatus +{-# INLINE runtimeStatusL #-} + + + +-- * Secret + +-- | 'secretId' Lens +secretIdL :: Lens_' Secret (Maybe Text) +secretIdL f Secret{..} = (\secretId -> Secret { secretId, ..} ) <$> f secretId +{-# INLINE secretIdL #-} + +-- | 'secretVersion' Lens +secretVersionL :: Lens_' Secret (Maybe ObjectVersion) +secretVersionL f Secret{..} = (\secretVersion -> Secret { secretVersion, ..} ) <$> f secretVersion +{-# INLINE secretVersionL #-} + +-- | 'secretCreatedAt' Lens +secretCreatedAtL :: Lens_' Secret (Maybe Text) +secretCreatedAtL f Secret{..} = (\secretCreatedAt -> Secret { secretCreatedAt, ..} ) <$> f secretCreatedAt +{-# INLINE secretCreatedAtL #-} + +-- | 'secretUpdatedAt' Lens +secretUpdatedAtL :: Lens_' Secret (Maybe Text) +secretUpdatedAtL f Secret{..} = (\secretUpdatedAt -> Secret { secretUpdatedAt, ..} ) <$> f secretUpdatedAt +{-# INLINE secretUpdatedAtL #-} + +-- | 'secretSpec' Lens +secretSpecL :: Lens_' Secret (Maybe SecretSpec) +secretSpecL f Secret{..} = (\secretSpec -> Secret { secretSpec, ..} ) <$> f secretSpec +{-# INLINE secretSpecL #-} + + + +-- * SecretCreateRequest + +-- | 'secretCreateRequestName' Lens +secretCreateRequestNameL :: Lens_' SecretCreateRequest (Maybe Text) +secretCreateRequestNameL f SecretCreateRequest{..} = (\secretCreateRequestName -> SecretCreateRequest { secretCreateRequestName, ..} ) <$> f secretCreateRequestName +{-# INLINE secretCreateRequestNameL #-} + +-- | 'secretCreateRequestLabels' Lens +secretCreateRequestLabelsL :: Lens_' SecretCreateRequest (Maybe (Map.Map String Text)) +secretCreateRequestLabelsL f SecretCreateRequest{..} = (\secretCreateRequestLabels -> SecretCreateRequest { secretCreateRequestLabels, ..} ) <$> f secretCreateRequestLabels +{-# INLINE secretCreateRequestLabelsL #-} + +-- | 'secretCreateRequestData' Lens +secretCreateRequestDataL :: Lens_' SecretCreateRequest (Maybe Text) +secretCreateRequestDataL f SecretCreateRequest{..} = (\secretCreateRequestData -> SecretCreateRequest { secretCreateRequestData, ..} ) <$> f secretCreateRequestData +{-# INLINE secretCreateRequestDataL #-} + +-- | 'secretCreateRequestDriver' Lens +secretCreateRequestDriverL :: Lens_' SecretCreateRequest (Maybe Driver) +secretCreateRequestDriverL f SecretCreateRequest{..} = (\secretCreateRequestDriver -> SecretCreateRequest { secretCreateRequestDriver, ..} ) <$> f secretCreateRequestDriver +{-# INLINE secretCreateRequestDriverL #-} + +-- | 'secretCreateRequestTemplating' Lens +secretCreateRequestTemplatingL :: Lens_' SecretCreateRequest (Maybe Driver) +secretCreateRequestTemplatingL f SecretCreateRequest{..} = (\secretCreateRequestTemplating -> SecretCreateRequest { secretCreateRequestTemplating, ..} ) <$> f secretCreateRequestTemplating +{-# INLINE secretCreateRequestTemplatingL #-} + + + +-- * SecretSpec + +-- | 'secretSpecName' Lens +secretSpecNameL :: Lens_' SecretSpec (Maybe Text) +secretSpecNameL f SecretSpec{..} = (\secretSpecName -> SecretSpec { secretSpecName, ..} ) <$> f secretSpecName +{-# INLINE secretSpecNameL #-} + +-- | 'secretSpecLabels' Lens +secretSpecLabelsL :: Lens_' SecretSpec (Maybe (Map.Map String Text)) +secretSpecLabelsL f SecretSpec{..} = (\secretSpecLabels -> SecretSpec { secretSpecLabels, ..} ) <$> f secretSpecLabels +{-# INLINE secretSpecLabelsL #-} + +-- | 'secretSpecData' Lens +secretSpecDataL :: Lens_' SecretSpec (Maybe Text) +secretSpecDataL f SecretSpec{..} = (\secretSpecData -> SecretSpec { secretSpecData, ..} ) <$> f secretSpecData +{-# INLINE secretSpecDataL #-} + +-- | 'secretSpecDriver' Lens +secretSpecDriverL :: Lens_' SecretSpec (Maybe Driver) +secretSpecDriverL f SecretSpec{..} = (\secretSpecDriver -> SecretSpec { secretSpecDriver, ..} ) <$> f secretSpecDriver +{-# INLINE secretSpecDriverL #-} + +-- | 'secretSpecTemplating' Lens +secretSpecTemplatingL :: Lens_' SecretSpec (Maybe Driver) +secretSpecTemplatingL f SecretSpec{..} = (\secretSpecTemplating -> SecretSpec { secretSpecTemplating, ..} ) <$> f secretSpecTemplating +{-# INLINE secretSpecTemplatingL #-} + + + +-- * Service + +-- | 'serviceId' Lens +serviceIdL :: Lens_' Service (Maybe Text) +serviceIdL f Service{..} = (\serviceId -> Service { serviceId, ..} ) <$> f serviceId +{-# INLINE serviceIdL #-} + +-- | 'serviceVersion' Lens +serviceVersionL :: Lens_' Service (Maybe ObjectVersion) +serviceVersionL f Service{..} = (\serviceVersion -> Service { serviceVersion, ..} ) <$> f serviceVersion +{-# INLINE serviceVersionL #-} + +-- | 'serviceCreatedAt' Lens +serviceCreatedAtL :: Lens_' Service (Maybe Text) +serviceCreatedAtL f Service{..} = (\serviceCreatedAt -> Service { serviceCreatedAt, ..} ) <$> f serviceCreatedAt +{-# INLINE serviceCreatedAtL #-} + +-- | 'serviceUpdatedAt' Lens +serviceUpdatedAtL :: Lens_' Service (Maybe Text) +serviceUpdatedAtL f Service{..} = (\serviceUpdatedAt -> Service { serviceUpdatedAt, ..} ) <$> f serviceUpdatedAt +{-# INLINE serviceUpdatedAtL #-} + +-- | 'serviceSpec' Lens +serviceSpecL :: Lens_' Service (Maybe ServiceSpec) +serviceSpecL f Service{..} = (\serviceSpec -> Service { serviceSpec, ..} ) <$> f serviceSpec +{-# INLINE serviceSpecL #-} + +-- | 'serviceEndpoint' Lens +serviceEndpointL :: Lens_' Service (Maybe ServiceEndpoint) +serviceEndpointL f Service{..} = (\serviceEndpoint -> Service { serviceEndpoint, ..} ) <$> f serviceEndpoint +{-# INLINE serviceEndpointL #-} + +-- | 'serviceUpdateStatus' Lens +serviceUpdateStatusL :: Lens_' Service (Maybe ServiceUpdateStatus) +serviceUpdateStatusL f Service{..} = (\serviceUpdateStatus -> Service { serviceUpdateStatus, ..} ) <$> f serviceUpdateStatus +{-# INLINE serviceUpdateStatusL #-} + +-- | 'serviceServiceStatus' Lens +serviceServiceStatusL :: Lens_' Service (Maybe ServiceServiceStatus) +serviceServiceStatusL f Service{..} = (\serviceServiceStatus -> Service { serviceServiceStatus, ..} ) <$> f serviceServiceStatus +{-# INLINE serviceServiceStatusL #-} + +-- | 'serviceJobStatus' Lens +serviceJobStatusL :: Lens_' Service (Maybe ServiceJobStatus) +serviceJobStatusL f Service{..} = (\serviceJobStatus -> Service { serviceJobStatus, ..} ) <$> f serviceJobStatus +{-# INLINE serviceJobStatusL #-} + + + +-- * ServiceCreateRequest + +-- | 'serviceCreateRequestName' Lens +serviceCreateRequestNameL :: Lens_' ServiceCreateRequest (Maybe Text) +serviceCreateRequestNameL f ServiceCreateRequest{..} = (\serviceCreateRequestName -> ServiceCreateRequest { serviceCreateRequestName, ..} ) <$> f serviceCreateRequestName +{-# INLINE serviceCreateRequestNameL #-} + +-- | 'serviceCreateRequestLabels' Lens +serviceCreateRequestLabelsL :: Lens_' ServiceCreateRequest (Maybe (Map.Map String Text)) +serviceCreateRequestLabelsL f ServiceCreateRequest{..} = (\serviceCreateRequestLabels -> ServiceCreateRequest { serviceCreateRequestLabels, ..} ) <$> f serviceCreateRequestLabels +{-# INLINE serviceCreateRequestLabelsL #-} + +-- | 'serviceCreateRequestTaskTemplate' Lens +serviceCreateRequestTaskTemplateL :: Lens_' ServiceCreateRequest (Maybe TaskSpec) +serviceCreateRequestTaskTemplateL f ServiceCreateRequest{..} = (\serviceCreateRequestTaskTemplate -> ServiceCreateRequest { serviceCreateRequestTaskTemplate, ..} ) <$> f serviceCreateRequestTaskTemplate +{-# INLINE serviceCreateRequestTaskTemplateL #-} + +-- | 'serviceCreateRequestMode' Lens +serviceCreateRequestModeL :: Lens_' ServiceCreateRequest (Maybe ServiceSpecMode) +serviceCreateRequestModeL f ServiceCreateRequest{..} = (\serviceCreateRequestMode -> ServiceCreateRequest { serviceCreateRequestMode, ..} ) <$> f serviceCreateRequestMode +{-# INLINE serviceCreateRequestModeL #-} + +-- | 'serviceCreateRequestUpdateConfig' Lens +serviceCreateRequestUpdateConfigL :: Lens_' ServiceCreateRequest (Maybe ServiceSpecUpdateConfig) +serviceCreateRequestUpdateConfigL f ServiceCreateRequest{..} = (\serviceCreateRequestUpdateConfig -> ServiceCreateRequest { serviceCreateRequestUpdateConfig, ..} ) <$> f serviceCreateRequestUpdateConfig +{-# INLINE serviceCreateRequestUpdateConfigL #-} + +-- | 'serviceCreateRequestRollbackConfig' Lens +serviceCreateRequestRollbackConfigL :: Lens_' ServiceCreateRequest (Maybe ServiceSpecRollbackConfig) +serviceCreateRequestRollbackConfigL f ServiceCreateRequest{..} = (\serviceCreateRequestRollbackConfig -> ServiceCreateRequest { serviceCreateRequestRollbackConfig, ..} ) <$> f serviceCreateRequestRollbackConfig +{-# INLINE serviceCreateRequestRollbackConfigL #-} + +-- | 'serviceCreateRequestNetworks' Lens +serviceCreateRequestNetworksL :: Lens_' ServiceCreateRequest (Maybe [NetworkAttachmentConfig]) +serviceCreateRequestNetworksL f ServiceCreateRequest{..} = (\serviceCreateRequestNetworks -> ServiceCreateRequest { serviceCreateRequestNetworks, ..} ) <$> f serviceCreateRequestNetworks +{-# INLINE serviceCreateRequestNetworksL #-} + +-- | 'serviceCreateRequestEndpointSpec' Lens +serviceCreateRequestEndpointSpecL :: Lens_' ServiceCreateRequest (Maybe EndpointSpec) +serviceCreateRequestEndpointSpecL f ServiceCreateRequest{..} = (\serviceCreateRequestEndpointSpec -> ServiceCreateRequest { serviceCreateRequestEndpointSpec, ..} ) <$> f serviceCreateRequestEndpointSpec +{-# INLINE serviceCreateRequestEndpointSpecL #-} + + + +-- * ServiceCreateResponse + +-- | 'serviceCreateResponseId' Lens +serviceCreateResponseIdL :: Lens_' ServiceCreateResponse (Maybe Text) +serviceCreateResponseIdL f ServiceCreateResponse{..} = (\serviceCreateResponseId -> ServiceCreateResponse { serviceCreateResponseId, ..} ) <$> f serviceCreateResponseId +{-# INLINE serviceCreateResponseIdL #-} + +-- | 'serviceCreateResponseWarnings' Lens +serviceCreateResponseWarningsL :: Lens_' ServiceCreateResponse (Maybe [Text]) +serviceCreateResponseWarningsL f ServiceCreateResponse{..} = (\serviceCreateResponseWarnings -> ServiceCreateResponse { serviceCreateResponseWarnings, ..} ) <$> f serviceCreateResponseWarnings +{-# INLINE serviceCreateResponseWarningsL #-} + + + +-- * ServiceEndpoint + +-- | 'serviceEndpointSpec' Lens +serviceEndpointSpecL :: Lens_' ServiceEndpoint (Maybe EndpointSpec) +serviceEndpointSpecL f ServiceEndpoint{..} = (\serviceEndpointSpec -> ServiceEndpoint { serviceEndpointSpec, ..} ) <$> f serviceEndpointSpec +{-# INLINE serviceEndpointSpecL #-} + +-- | 'serviceEndpointPorts' Lens +serviceEndpointPortsL :: Lens_' ServiceEndpoint (Maybe [EndpointPortConfig]) +serviceEndpointPortsL f ServiceEndpoint{..} = (\serviceEndpointPorts -> ServiceEndpoint { serviceEndpointPorts, ..} ) <$> f serviceEndpointPorts +{-# INLINE serviceEndpointPortsL #-} + +-- | 'serviceEndpointVirtualIps' Lens +serviceEndpointVirtualIpsL :: Lens_' ServiceEndpoint (Maybe [ServiceEndpointVirtualIPsInner]) +serviceEndpointVirtualIpsL f ServiceEndpoint{..} = (\serviceEndpointVirtualIps -> ServiceEndpoint { serviceEndpointVirtualIps, ..} ) <$> f serviceEndpointVirtualIps +{-# INLINE serviceEndpointVirtualIpsL #-} + + + +-- * ServiceEndpointVirtualIPsInner + +-- | 'serviceEndpointVirtualIPsInnerNetworkId' Lens +serviceEndpointVirtualIPsInnerNetworkIdL :: Lens_' ServiceEndpointVirtualIPsInner (Maybe Text) +serviceEndpointVirtualIPsInnerNetworkIdL f ServiceEndpointVirtualIPsInner{..} = (\serviceEndpointVirtualIPsInnerNetworkId -> ServiceEndpointVirtualIPsInner { serviceEndpointVirtualIPsInnerNetworkId, ..} ) <$> f serviceEndpointVirtualIPsInnerNetworkId +{-# INLINE serviceEndpointVirtualIPsInnerNetworkIdL #-} + +-- | 'serviceEndpointVirtualIPsInnerAddr' Lens +serviceEndpointVirtualIPsInnerAddrL :: Lens_' ServiceEndpointVirtualIPsInner (Maybe Text) +serviceEndpointVirtualIPsInnerAddrL f ServiceEndpointVirtualIPsInner{..} = (\serviceEndpointVirtualIPsInnerAddr -> ServiceEndpointVirtualIPsInner { serviceEndpointVirtualIPsInnerAddr, ..} ) <$> f serviceEndpointVirtualIPsInnerAddr +{-# INLINE serviceEndpointVirtualIPsInnerAddrL #-} + + + +-- * ServiceJobStatus + +-- | 'serviceJobStatusJobIteration' Lens +serviceJobStatusJobIterationL :: Lens_' ServiceJobStatus (Maybe ObjectVersion) +serviceJobStatusJobIterationL f ServiceJobStatus{..} = (\serviceJobStatusJobIteration -> ServiceJobStatus { serviceJobStatusJobIteration, ..} ) <$> f serviceJobStatusJobIteration +{-# INLINE serviceJobStatusJobIterationL #-} + +-- | 'serviceJobStatusLastExecution' Lens +serviceJobStatusLastExecutionL :: Lens_' ServiceJobStatus (Maybe Text) +serviceJobStatusLastExecutionL f ServiceJobStatus{..} = (\serviceJobStatusLastExecution -> ServiceJobStatus { serviceJobStatusLastExecution, ..} ) <$> f serviceJobStatusLastExecution +{-# INLINE serviceJobStatusLastExecutionL #-} + + + +-- * ServiceServiceStatus + +-- | 'serviceServiceStatusRunningTasks' Lens +serviceServiceStatusRunningTasksL :: Lens_' ServiceServiceStatus (Maybe Int) +serviceServiceStatusRunningTasksL f ServiceServiceStatus{..} = (\serviceServiceStatusRunningTasks -> ServiceServiceStatus { serviceServiceStatusRunningTasks, ..} ) <$> f serviceServiceStatusRunningTasks +{-# INLINE serviceServiceStatusRunningTasksL #-} + +-- | 'serviceServiceStatusDesiredTasks' Lens +serviceServiceStatusDesiredTasksL :: Lens_' ServiceServiceStatus (Maybe Int) +serviceServiceStatusDesiredTasksL f ServiceServiceStatus{..} = (\serviceServiceStatusDesiredTasks -> ServiceServiceStatus { serviceServiceStatusDesiredTasks, ..} ) <$> f serviceServiceStatusDesiredTasks +{-# INLINE serviceServiceStatusDesiredTasksL #-} + +-- | 'serviceServiceStatusCompletedTasks' Lens +serviceServiceStatusCompletedTasksL :: Lens_' ServiceServiceStatus (Maybe Int) +serviceServiceStatusCompletedTasksL f ServiceServiceStatus{..} = (\serviceServiceStatusCompletedTasks -> ServiceServiceStatus { serviceServiceStatusCompletedTasks, ..} ) <$> f serviceServiceStatusCompletedTasks +{-# INLINE serviceServiceStatusCompletedTasksL #-} + + + +-- * ServiceSpec + +-- | 'serviceSpecName' Lens +serviceSpecNameL :: Lens_' ServiceSpec (Maybe Text) +serviceSpecNameL f ServiceSpec{..} = (\serviceSpecName -> ServiceSpec { serviceSpecName, ..} ) <$> f serviceSpecName +{-# INLINE serviceSpecNameL #-} + +-- | 'serviceSpecLabels' Lens +serviceSpecLabelsL :: Lens_' ServiceSpec (Maybe (Map.Map String Text)) +serviceSpecLabelsL f ServiceSpec{..} = (\serviceSpecLabels -> ServiceSpec { serviceSpecLabels, ..} ) <$> f serviceSpecLabels +{-# INLINE serviceSpecLabelsL #-} + +-- | 'serviceSpecTaskTemplate' Lens +serviceSpecTaskTemplateL :: Lens_' ServiceSpec (Maybe TaskSpec) +serviceSpecTaskTemplateL f ServiceSpec{..} = (\serviceSpecTaskTemplate -> ServiceSpec { serviceSpecTaskTemplate, ..} ) <$> f serviceSpecTaskTemplate +{-# INLINE serviceSpecTaskTemplateL #-} + +-- | 'serviceSpecMode' Lens +serviceSpecModeL :: Lens_' ServiceSpec (Maybe ServiceSpecMode) +serviceSpecModeL f ServiceSpec{..} = (\serviceSpecMode -> ServiceSpec { serviceSpecMode, ..} ) <$> f serviceSpecMode +{-# INLINE serviceSpecModeL #-} + +-- | 'serviceSpecUpdateConfig' Lens +serviceSpecUpdateConfigL :: Lens_' ServiceSpec (Maybe ServiceSpecUpdateConfig) +serviceSpecUpdateConfigL f ServiceSpec{..} = (\serviceSpecUpdateConfig -> ServiceSpec { serviceSpecUpdateConfig, ..} ) <$> f serviceSpecUpdateConfig +{-# INLINE serviceSpecUpdateConfigL #-} + +-- | 'serviceSpecRollbackConfig' Lens +serviceSpecRollbackConfigL :: Lens_' ServiceSpec (Maybe ServiceSpecRollbackConfig) +serviceSpecRollbackConfigL f ServiceSpec{..} = (\serviceSpecRollbackConfig -> ServiceSpec { serviceSpecRollbackConfig, ..} ) <$> f serviceSpecRollbackConfig +{-# INLINE serviceSpecRollbackConfigL #-} + +-- | 'serviceSpecNetworks' Lens +serviceSpecNetworksL :: Lens_' ServiceSpec (Maybe [NetworkAttachmentConfig]) +serviceSpecNetworksL f ServiceSpec{..} = (\serviceSpecNetworks -> ServiceSpec { serviceSpecNetworks, ..} ) <$> f serviceSpecNetworks +{-# INLINE serviceSpecNetworksL #-} + +-- | 'serviceSpecEndpointSpec' Lens +serviceSpecEndpointSpecL :: Lens_' ServiceSpec (Maybe EndpointSpec) +serviceSpecEndpointSpecL f ServiceSpec{..} = (\serviceSpecEndpointSpec -> ServiceSpec { serviceSpecEndpointSpec, ..} ) <$> f serviceSpecEndpointSpec +{-# INLINE serviceSpecEndpointSpecL #-} + + + +-- * ServiceSpecMode + +-- | 'serviceSpecModeReplicated' Lens +serviceSpecModeReplicatedL :: Lens_' ServiceSpecMode (Maybe ServiceSpecModeReplicated) +serviceSpecModeReplicatedL f ServiceSpecMode{..} = (\serviceSpecModeReplicated -> ServiceSpecMode { serviceSpecModeReplicated, ..} ) <$> f serviceSpecModeReplicated +{-# INLINE serviceSpecModeReplicatedL #-} + +-- | 'serviceSpecModeGlobal' Lens +serviceSpecModeGlobalL :: Lens_' ServiceSpecMode (Maybe A.Value) +serviceSpecModeGlobalL f ServiceSpecMode{..} = (\serviceSpecModeGlobal -> ServiceSpecMode { serviceSpecModeGlobal, ..} ) <$> f serviceSpecModeGlobal +{-# INLINE serviceSpecModeGlobalL #-} + +-- | 'serviceSpecModeReplicatedJob' Lens +serviceSpecModeReplicatedJobL :: Lens_' ServiceSpecMode (Maybe ServiceSpecModeReplicatedJob) +serviceSpecModeReplicatedJobL f ServiceSpecMode{..} = (\serviceSpecModeReplicatedJob -> ServiceSpecMode { serviceSpecModeReplicatedJob, ..} ) <$> f serviceSpecModeReplicatedJob +{-# INLINE serviceSpecModeReplicatedJobL #-} + +-- | 'serviceSpecModeGlobalJob' Lens +serviceSpecModeGlobalJobL :: Lens_' ServiceSpecMode (Maybe A.Value) +serviceSpecModeGlobalJobL f ServiceSpecMode{..} = (\serviceSpecModeGlobalJob -> ServiceSpecMode { serviceSpecModeGlobalJob, ..} ) <$> f serviceSpecModeGlobalJob +{-# INLINE serviceSpecModeGlobalJobL #-} + + + +-- * ServiceSpecModeReplicated + +-- | 'serviceSpecModeReplicatedReplicas' Lens +serviceSpecModeReplicatedReplicasL :: Lens_' ServiceSpecModeReplicated (Maybe Integer) +serviceSpecModeReplicatedReplicasL f ServiceSpecModeReplicated{..} = (\serviceSpecModeReplicatedReplicas -> ServiceSpecModeReplicated { serviceSpecModeReplicatedReplicas, ..} ) <$> f serviceSpecModeReplicatedReplicas +{-# INLINE serviceSpecModeReplicatedReplicasL #-} + + + +-- * ServiceSpecModeReplicatedJob + +-- | 'serviceSpecModeReplicatedJobMaxConcurrent' Lens +serviceSpecModeReplicatedJobMaxConcurrentL :: Lens_' ServiceSpecModeReplicatedJob (Maybe Integer) +serviceSpecModeReplicatedJobMaxConcurrentL f ServiceSpecModeReplicatedJob{..} = (\serviceSpecModeReplicatedJobMaxConcurrent -> ServiceSpecModeReplicatedJob { serviceSpecModeReplicatedJobMaxConcurrent, ..} ) <$> f serviceSpecModeReplicatedJobMaxConcurrent +{-# INLINE serviceSpecModeReplicatedJobMaxConcurrentL #-} + +-- | 'serviceSpecModeReplicatedJobTotalCompletions' Lens +serviceSpecModeReplicatedJobTotalCompletionsL :: Lens_' ServiceSpecModeReplicatedJob (Maybe Integer) +serviceSpecModeReplicatedJobTotalCompletionsL f ServiceSpecModeReplicatedJob{..} = (\serviceSpecModeReplicatedJobTotalCompletions -> ServiceSpecModeReplicatedJob { serviceSpecModeReplicatedJobTotalCompletions, ..} ) <$> f serviceSpecModeReplicatedJobTotalCompletions +{-# INLINE serviceSpecModeReplicatedJobTotalCompletionsL #-} + + + +-- * ServiceSpecRollbackConfig + +-- | 'serviceSpecRollbackConfigParallelism' Lens +serviceSpecRollbackConfigParallelismL :: Lens_' ServiceSpecRollbackConfig (Maybe Integer) +serviceSpecRollbackConfigParallelismL f ServiceSpecRollbackConfig{..} = (\serviceSpecRollbackConfigParallelism -> ServiceSpecRollbackConfig { serviceSpecRollbackConfigParallelism, ..} ) <$> f serviceSpecRollbackConfigParallelism +{-# INLINE serviceSpecRollbackConfigParallelismL #-} + +-- | 'serviceSpecRollbackConfigDelay' Lens +serviceSpecRollbackConfigDelayL :: Lens_' ServiceSpecRollbackConfig (Maybe Integer) +serviceSpecRollbackConfigDelayL f ServiceSpecRollbackConfig{..} = (\serviceSpecRollbackConfigDelay -> ServiceSpecRollbackConfig { serviceSpecRollbackConfigDelay, ..} ) <$> f serviceSpecRollbackConfigDelay +{-# INLINE serviceSpecRollbackConfigDelayL #-} + +-- | 'serviceSpecRollbackConfigFailureAction' Lens +serviceSpecRollbackConfigFailureActionL :: Lens_' ServiceSpecRollbackConfig (Maybe E'FailureAction2) +serviceSpecRollbackConfigFailureActionL f ServiceSpecRollbackConfig{..} = (\serviceSpecRollbackConfigFailureAction -> ServiceSpecRollbackConfig { serviceSpecRollbackConfigFailureAction, ..} ) <$> f serviceSpecRollbackConfigFailureAction +{-# INLINE serviceSpecRollbackConfigFailureActionL #-} + +-- | 'serviceSpecRollbackConfigMonitor' Lens +serviceSpecRollbackConfigMonitorL :: Lens_' ServiceSpecRollbackConfig (Maybe Integer) +serviceSpecRollbackConfigMonitorL f ServiceSpecRollbackConfig{..} = (\serviceSpecRollbackConfigMonitor -> ServiceSpecRollbackConfig { serviceSpecRollbackConfigMonitor, ..} ) <$> f serviceSpecRollbackConfigMonitor +{-# INLINE serviceSpecRollbackConfigMonitorL #-} + +-- | 'serviceSpecRollbackConfigMaxFailureRatio' Lens +serviceSpecRollbackConfigMaxFailureRatioL :: Lens_' ServiceSpecRollbackConfig (Maybe Double) +serviceSpecRollbackConfigMaxFailureRatioL f ServiceSpecRollbackConfig{..} = (\serviceSpecRollbackConfigMaxFailureRatio -> ServiceSpecRollbackConfig { serviceSpecRollbackConfigMaxFailureRatio, ..} ) <$> f serviceSpecRollbackConfigMaxFailureRatio +{-# INLINE serviceSpecRollbackConfigMaxFailureRatioL #-} + +-- | 'serviceSpecRollbackConfigOrder' Lens +serviceSpecRollbackConfigOrderL :: Lens_' ServiceSpecRollbackConfig (Maybe E'Order) +serviceSpecRollbackConfigOrderL f ServiceSpecRollbackConfig{..} = (\serviceSpecRollbackConfigOrder -> ServiceSpecRollbackConfig { serviceSpecRollbackConfigOrder, ..} ) <$> f serviceSpecRollbackConfigOrder +{-# INLINE serviceSpecRollbackConfigOrderL #-} + + + +-- * ServiceSpecUpdateConfig + +-- | 'serviceSpecUpdateConfigParallelism' Lens +serviceSpecUpdateConfigParallelismL :: Lens_' ServiceSpecUpdateConfig (Maybe Integer) +serviceSpecUpdateConfigParallelismL f ServiceSpecUpdateConfig{..} = (\serviceSpecUpdateConfigParallelism -> ServiceSpecUpdateConfig { serviceSpecUpdateConfigParallelism, ..} ) <$> f serviceSpecUpdateConfigParallelism +{-# INLINE serviceSpecUpdateConfigParallelismL #-} + +-- | 'serviceSpecUpdateConfigDelay' Lens +serviceSpecUpdateConfigDelayL :: Lens_' ServiceSpecUpdateConfig (Maybe Integer) +serviceSpecUpdateConfigDelayL f ServiceSpecUpdateConfig{..} = (\serviceSpecUpdateConfigDelay -> ServiceSpecUpdateConfig { serviceSpecUpdateConfigDelay, ..} ) <$> f serviceSpecUpdateConfigDelay +{-# INLINE serviceSpecUpdateConfigDelayL #-} + +-- | 'serviceSpecUpdateConfigFailureAction' Lens +serviceSpecUpdateConfigFailureActionL :: Lens_' ServiceSpecUpdateConfig (Maybe E'FailureAction) +serviceSpecUpdateConfigFailureActionL f ServiceSpecUpdateConfig{..} = (\serviceSpecUpdateConfigFailureAction -> ServiceSpecUpdateConfig { serviceSpecUpdateConfigFailureAction, ..} ) <$> f serviceSpecUpdateConfigFailureAction +{-# INLINE serviceSpecUpdateConfigFailureActionL #-} + +-- | 'serviceSpecUpdateConfigMonitor' Lens +serviceSpecUpdateConfigMonitorL :: Lens_' ServiceSpecUpdateConfig (Maybe Integer) +serviceSpecUpdateConfigMonitorL f ServiceSpecUpdateConfig{..} = (\serviceSpecUpdateConfigMonitor -> ServiceSpecUpdateConfig { serviceSpecUpdateConfigMonitor, ..} ) <$> f serviceSpecUpdateConfigMonitor +{-# INLINE serviceSpecUpdateConfigMonitorL #-} + +-- | 'serviceSpecUpdateConfigMaxFailureRatio' Lens +serviceSpecUpdateConfigMaxFailureRatioL :: Lens_' ServiceSpecUpdateConfig (Maybe Double) +serviceSpecUpdateConfigMaxFailureRatioL f ServiceSpecUpdateConfig{..} = (\serviceSpecUpdateConfigMaxFailureRatio -> ServiceSpecUpdateConfig { serviceSpecUpdateConfigMaxFailureRatio, ..} ) <$> f serviceSpecUpdateConfigMaxFailureRatio +{-# INLINE serviceSpecUpdateConfigMaxFailureRatioL #-} + +-- | 'serviceSpecUpdateConfigOrder' Lens +serviceSpecUpdateConfigOrderL :: Lens_' ServiceSpecUpdateConfig (Maybe E'Order) +serviceSpecUpdateConfigOrderL f ServiceSpecUpdateConfig{..} = (\serviceSpecUpdateConfigOrder -> ServiceSpecUpdateConfig { serviceSpecUpdateConfigOrder, ..} ) <$> f serviceSpecUpdateConfigOrder +{-# INLINE serviceSpecUpdateConfigOrderL #-} + + + +-- * ServiceUpdateRequest + +-- | 'serviceUpdateRequestName' Lens +serviceUpdateRequestNameL :: Lens_' ServiceUpdateRequest (Maybe Text) +serviceUpdateRequestNameL f ServiceUpdateRequest{..} = (\serviceUpdateRequestName -> ServiceUpdateRequest { serviceUpdateRequestName, ..} ) <$> f serviceUpdateRequestName +{-# INLINE serviceUpdateRequestNameL #-} + +-- | 'serviceUpdateRequestLabels' Lens +serviceUpdateRequestLabelsL :: Lens_' ServiceUpdateRequest (Maybe (Map.Map String Text)) +serviceUpdateRequestLabelsL f ServiceUpdateRequest{..} = (\serviceUpdateRequestLabels -> ServiceUpdateRequest { serviceUpdateRequestLabels, ..} ) <$> f serviceUpdateRequestLabels +{-# INLINE serviceUpdateRequestLabelsL #-} + +-- | 'serviceUpdateRequestTaskTemplate' Lens +serviceUpdateRequestTaskTemplateL :: Lens_' ServiceUpdateRequest (Maybe TaskSpec) +serviceUpdateRequestTaskTemplateL f ServiceUpdateRequest{..} = (\serviceUpdateRequestTaskTemplate -> ServiceUpdateRequest { serviceUpdateRequestTaskTemplate, ..} ) <$> f serviceUpdateRequestTaskTemplate +{-# INLINE serviceUpdateRequestTaskTemplateL #-} + +-- | 'serviceUpdateRequestMode' Lens +serviceUpdateRequestModeL :: Lens_' ServiceUpdateRequest (Maybe ServiceSpecMode) +serviceUpdateRequestModeL f ServiceUpdateRequest{..} = (\serviceUpdateRequestMode -> ServiceUpdateRequest { serviceUpdateRequestMode, ..} ) <$> f serviceUpdateRequestMode +{-# INLINE serviceUpdateRequestModeL #-} + +-- | 'serviceUpdateRequestUpdateConfig' Lens +serviceUpdateRequestUpdateConfigL :: Lens_' ServiceUpdateRequest (Maybe ServiceSpecUpdateConfig) +serviceUpdateRequestUpdateConfigL f ServiceUpdateRequest{..} = (\serviceUpdateRequestUpdateConfig -> ServiceUpdateRequest { serviceUpdateRequestUpdateConfig, ..} ) <$> f serviceUpdateRequestUpdateConfig +{-# INLINE serviceUpdateRequestUpdateConfigL #-} + +-- | 'serviceUpdateRequestRollbackConfig' Lens +serviceUpdateRequestRollbackConfigL :: Lens_' ServiceUpdateRequest (Maybe ServiceSpecRollbackConfig) +serviceUpdateRequestRollbackConfigL f ServiceUpdateRequest{..} = (\serviceUpdateRequestRollbackConfig -> ServiceUpdateRequest { serviceUpdateRequestRollbackConfig, ..} ) <$> f serviceUpdateRequestRollbackConfig +{-# INLINE serviceUpdateRequestRollbackConfigL #-} + +-- | 'serviceUpdateRequestNetworks' Lens +serviceUpdateRequestNetworksL :: Lens_' ServiceUpdateRequest (Maybe [NetworkAttachmentConfig]) +serviceUpdateRequestNetworksL f ServiceUpdateRequest{..} = (\serviceUpdateRequestNetworks -> ServiceUpdateRequest { serviceUpdateRequestNetworks, ..} ) <$> f serviceUpdateRequestNetworks +{-# INLINE serviceUpdateRequestNetworksL #-} + +-- | 'serviceUpdateRequestEndpointSpec' Lens +serviceUpdateRequestEndpointSpecL :: Lens_' ServiceUpdateRequest (Maybe EndpointSpec) +serviceUpdateRequestEndpointSpecL f ServiceUpdateRequest{..} = (\serviceUpdateRequestEndpointSpec -> ServiceUpdateRequest { serviceUpdateRequestEndpointSpec, ..} ) <$> f serviceUpdateRequestEndpointSpec +{-# INLINE serviceUpdateRequestEndpointSpecL #-} + + + +-- * ServiceUpdateResponse + +-- | 'serviceUpdateResponseWarnings' Lens +serviceUpdateResponseWarningsL :: Lens_' ServiceUpdateResponse (Maybe [Text]) +serviceUpdateResponseWarningsL f ServiceUpdateResponse{..} = (\serviceUpdateResponseWarnings -> ServiceUpdateResponse { serviceUpdateResponseWarnings, ..} ) <$> f serviceUpdateResponseWarnings +{-# INLINE serviceUpdateResponseWarningsL #-} + + + +-- * ServiceUpdateStatus + +-- | 'serviceUpdateStatusState' Lens +serviceUpdateStatusStateL :: Lens_' ServiceUpdateStatus (Maybe E'State) +serviceUpdateStatusStateL f ServiceUpdateStatus{..} = (\serviceUpdateStatusState -> ServiceUpdateStatus { serviceUpdateStatusState, ..} ) <$> f serviceUpdateStatusState +{-# INLINE serviceUpdateStatusStateL #-} + +-- | 'serviceUpdateStatusStartedAt' Lens +serviceUpdateStatusStartedAtL :: Lens_' ServiceUpdateStatus (Maybe Text) +serviceUpdateStatusStartedAtL f ServiceUpdateStatus{..} = (\serviceUpdateStatusStartedAt -> ServiceUpdateStatus { serviceUpdateStatusStartedAt, ..} ) <$> f serviceUpdateStatusStartedAt +{-# INLINE serviceUpdateStatusStartedAtL #-} + +-- | 'serviceUpdateStatusCompletedAt' Lens +serviceUpdateStatusCompletedAtL :: Lens_' ServiceUpdateStatus (Maybe Text) +serviceUpdateStatusCompletedAtL f ServiceUpdateStatus{..} = (\serviceUpdateStatusCompletedAt -> ServiceUpdateStatus { serviceUpdateStatusCompletedAt, ..} ) <$> f serviceUpdateStatusCompletedAt +{-# INLINE serviceUpdateStatusCompletedAtL #-} + +-- | 'serviceUpdateStatusMessage' Lens +serviceUpdateStatusMessageL :: Lens_' ServiceUpdateStatus (Maybe Text) +serviceUpdateStatusMessageL f ServiceUpdateStatus{..} = (\serviceUpdateStatusMessage -> ServiceUpdateStatus { serviceUpdateStatusMessage, ..} ) <$> f serviceUpdateStatusMessage +{-# INLINE serviceUpdateStatusMessageL #-} + + + +-- * Swarm + +-- | 'swarmId' Lens +swarmIdL :: Lens_' Swarm (Maybe Text) +swarmIdL f Swarm{..} = (\swarmId -> Swarm { swarmId, ..} ) <$> f swarmId +{-# INLINE swarmIdL #-} + +-- | 'swarmVersion' Lens +swarmVersionL :: Lens_' Swarm (Maybe ObjectVersion) +swarmVersionL f Swarm{..} = (\swarmVersion -> Swarm { swarmVersion, ..} ) <$> f swarmVersion +{-# INLINE swarmVersionL #-} + +-- | 'swarmCreatedAt' Lens +swarmCreatedAtL :: Lens_' Swarm (Maybe Text) +swarmCreatedAtL f Swarm{..} = (\swarmCreatedAt -> Swarm { swarmCreatedAt, ..} ) <$> f swarmCreatedAt +{-# INLINE swarmCreatedAtL #-} + +-- | 'swarmUpdatedAt' Lens +swarmUpdatedAtL :: Lens_' Swarm (Maybe Text) +swarmUpdatedAtL f Swarm{..} = (\swarmUpdatedAt -> Swarm { swarmUpdatedAt, ..} ) <$> f swarmUpdatedAt +{-# INLINE swarmUpdatedAtL #-} + +-- | 'swarmSpec' Lens +swarmSpecL :: Lens_' Swarm (Maybe SwarmSpec) +swarmSpecL f Swarm{..} = (\swarmSpec -> Swarm { swarmSpec, ..} ) <$> f swarmSpec +{-# INLINE swarmSpecL #-} + +-- | 'swarmTlsInfo' Lens +swarmTlsInfoL :: Lens_' Swarm (Maybe TLSInfo) +swarmTlsInfoL f Swarm{..} = (\swarmTlsInfo -> Swarm { swarmTlsInfo, ..} ) <$> f swarmTlsInfo +{-# INLINE swarmTlsInfoL #-} + +-- | 'swarmRootRotationInProgress' Lens +swarmRootRotationInProgressL :: Lens_' Swarm (Maybe Bool) +swarmRootRotationInProgressL f Swarm{..} = (\swarmRootRotationInProgress -> Swarm { swarmRootRotationInProgress, ..} ) <$> f swarmRootRotationInProgress +{-# INLINE swarmRootRotationInProgressL #-} + +-- | 'swarmDataPathPort' Lens +swarmDataPathPortL :: Lens_' Swarm (Maybe Int) +swarmDataPathPortL f Swarm{..} = (\swarmDataPathPort -> Swarm { swarmDataPathPort, ..} ) <$> f swarmDataPathPort +{-# INLINE swarmDataPathPortL #-} + +-- | 'swarmDefaultAddrPool' Lens +swarmDefaultAddrPoolL :: Lens_' Swarm (Maybe [Text]) +swarmDefaultAddrPoolL f Swarm{..} = (\swarmDefaultAddrPool -> Swarm { swarmDefaultAddrPool, ..} ) <$> f swarmDefaultAddrPool +{-# INLINE swarmDefaultAddrPoolL #-} + +-- | 'swarmSubnetSize' Lens +swarmSubnetSizeL :: Lens_' Swarm (Maybe Int) +swarmSubnetSizeL f Swarm{..} = (\swarmSubnetSize -> Swarm { swarmSubnetSize, ..} ) <$> f swarmSubnetSize +{-# INLINE swarmSubnetSizeL #-} + +-- | 'swarmJoinTokens' Lens +swarmJoinTokensL :: Lens_' Swarm (Maybe JoinTokens) +swarmJoinTokensL f Swarm{..} = (\swarmJoinTokens -> Swarm { swarmJoinTokens, ..} ) <$> f swarmJoinTokens +{-# INLINE swarmJoinTokensL #-} + + + +-- * SwarmInfo + +-- | 'swarmInfoNodeId' Lens +swarmInfoNodeIdL :: Lens_' SwarmInfo (Maybe Text) +swarmInfoNodeIdL f SwarmInfo{..} = (\swarmInfoNodeId -> SwarmInfo { swarmInfoNodeId, ..} ) <$> f swarmInfoNodeId +{-# INLINE swarmInfoNodeIdL #-} + +-- | 'swarmInfoNodeAddr' Lens +swarmInfoNodeAddrL :: Lens_' SwarmInfo (Maybe Text) +swarmInfoNodeAddrL f SwarmInfo{..} = (\swarmInfoNodeAddr -> SwarmInfo { swarmInfoNodeAddr, ..} ) <$> f swarmInfoNodeAddr +{-# INLINE swarmInfoNodeAddrL #-} + +-- | 'swarmInfoLocalNodeState' Lens +swarmInfoLocalNodeStateL :: Lens_' SwarmInfo (Maybe LocalNodeState) +swarmInfoLocalNodeStateL f SwarmInfo{..} = (\swarmInfoLocalNodeState -> SwarmInfo { swarmInfoLocalNodeState, ..} ) <$> f swarmInfoLocalNodeState +{-# INLINE swarmInfoLocalNodeStateL #-} + +-- | 'swarmInfoControlAvailable' Lens +swarmInfoControlAvailableL :: Lens_' SwarmInfo (Maybe Bool) +swarmInfoControlAvailableL f SwarmInfo{..} = (\swarmInfoControlAvailable -> SwarmInfo { swarmInfoControlAvailable, ..} ) <$> f swarmInfoControlAvailable +{-# INLINE swarmInfoControlAvailableL #-} + +-- | 'swarmInfoError' Lens +swarmInfoErrorL :: Lens_' SwarmInfo (Maybe Text) +swarmInfoErrorL f SwarmInfo{..} = (\swarmInfoError -> SwarmInfo { swarmInfoError, ..} ) <$> f swarmInfoError +{-# INLINE swarmInfoErrorL #-} + +-- | 'swarmInfoRemoteManagers' Lens +swarmInfoRemoteManagersL :: Lens_' SwarmInfo (Maybe [PeerNode]) +swarmInfoRemoteManagersL f SwarmInfo{..} = (\swarmInfoRemoteManagers -> SwarmInfo { swarmInfoRemoteManagers, ..} ) <$> f swarmInfoRemoteManagers +{-# INLINE swarmInfoRemoteManagersL #-} + +-- | 'swarmInfoNodes' Lens +swarmInfoNodesL :: Lens_' SwarmInfo (Maybe Int) +swarmInfoNodesL f SwarmInfo{..} = (\swarmInfoNodes -> SwarmInfo { swarmInfoNodes, ..} ) <$> f swarmInfoNodes +{-# INLINE swarmInfoNodesL #-} + +-- | 'swarmInfoManagers' Lens +swarmInfoManagersL :: Lens_' SwarmInfo (Maybe Int) +swarmInfoManagersL f SwarmInfo{..} = (\swarmInfoManagers -> SwarmInfo { swarmInfoManagers, ..} ) <$> f swarmInfoManagers +{-# INLINE swarmInfoManagersL #-} + +-- | 'swarmInfoCluster' Lens +swarmInfoClusterL :: Lens_' SwarmInfo (Maybe ClusterInfo) +swarmInfoClusterL f SwarmInfo{..} = (\swarmInfoCluster -> SwarmInfo { swarmInfoCluster, ..} ) <$> f swarmInfoCluster +{-# INLINE swarmInfoClusterL #-} + + + +-- * SwarmInitRequest + +-- | 'swarmInitRequestListenAddr' Lens +swarmInitRequestListenAddrL :: Lens_' SwarmInitRequest (Maybe Text) +swarmInitRequestListenAddrL f SwarmInitRequest{..} = (\swarmInitRequestListenAddr -> SwarmInitRequest { swarmInitRequestListenAddr, ..} ) <$> f swarmInitRequestListenAddr +{-# INLINE swarmInitRequestListenAddrL #-} + +-- | 'swarmInitRequestAdvertiseAddr' Lens +swarmInitRequestAdvertiseAddrL :: Lens_' SwarmInitRequest (Maybe Text) +swarmInitRequestAdvertiseAddrL f SwarmInitRequest{..} = (\swarmInitRequestAdvertiseAddr -> SwarmInitRequest { swarmInitRequestAdvertiseAddr, ..} ) <$> f swarmInitRequestAdvertiseAddr +{-# INLINE swarmInitRequestAdvertiseAddrL #-} + +-- | 'swarmInitRequestDataPathAddr' Lens +swarmInitRequestDataPathAddrL :: Lens_' SwarmInitRequest (Maybe Text) +swarmInitRequestDataPathAddrL f SwarmInitRequest{..} = (\swarmInitRequestDataPathAddr -> SwarmInitRequest { swarmInitRequestDataPathAddr, ..} ) <$> f swarmInitRequestDataPathAddr +{-# INLINE swarmInitRequestDataPathAddrL #-} + +-- | 'swarmInitRequestDataPathPort' Lens +swarmInitRequestDataPathPortL :: Lens_' SwarmInitRequest (Maybe Int) +swarmInitRequestDataPathPortL f SwarmInitRequest{..} = (\swarmInitRequestDataPathPort -> SwarmInitRequest { swarmInitRequestDataPathPort, ..} ) <$> f swarmInitRequestDataPathPort +{-# INLINE swarmInitRequestDataPathPortL #-} + +-- | 'swarmInitRequestDefaultAddrPool' Lens +swarmInitRequestDefaultAddrPoolL :: Lens_' SwarmInitRequest (Maybe [Text]) +swarmInitRequestDefaultAddrPoolL f SwarmInitRequest{..} = (\swarmInitRequestDefaultAddrPool -> SwarmInitRequest { swarmInitRequestDefaultAddrPool, ..} ) <$> f swarmInitRequestDefaultAddrPool +{-# INLINE swarmInitRequestDefaultAddrPoolL #-} + +-- | 'swarmInitRequestForceNewCluster' Lens +swarmInitRequestForceNewClusterL :: Lens_' SwarmInitRequest (Maybe Bool) +swarmInitRequestForceNewClusterL f SwarmInitRequest{..} = (\swarmInitRequestForceNewCluster -> SwarmInitRequest { swarmInitRequestForceNewCluster, ..} ) <$> f swarmInitRequestForceNewCluster +{-# INLINE swarmInitRequestForceNewClusterL #-} + +-- | 'swarmInitRequestSubnetSize' Lens +swarmInitRequestSubnetSizeL :: Lens_' SwarmInitRequest (Maybe Int) +swarmInitRequestSubnetSizeL f SwarmInitRequest{..} = (\swarmInitRequestSubnetSize -> SwarmInitRequest { swarmInitRequestSubnetSize, ..} ) <$> f swarmInitRequestSubnetSize +{-# INLINE swarmInitRequestSubnetSizeL #-} + +-- | 'swarmInitRequestSpec' Lens +swarmInitRequestSpecL :: Lens_' SwarmInitRequest (Maybe SwarmSpec) +swarmInitRequestSpecL f SwarmInitRequest{..} = (\swarmInitRequestSpec -> SwarmInitRequest { swarmInitRequestSpec, ..} ) <$> f swarmInitRequestSpec +{-# INLINE swarmInitRequestSpecL #-} + + + +-- * SwarmJoinRequest + +-- | 'swarmJoinRequestListenAddr' Lens +swarmJoinRequestListenAddrL :: Lens_' SwarmJoinRequest (Maybe Text) +swarmJoinRequestListenAddrL f SwarmJoinRequest{..} = (\swarmJoinRequestListenAddr -> SwarmJoinRequest { swarmJoinRequestListenAddr, ..} ) <$> f swarmJoinRequestListenAddr +{-# INLINE swarmJoinRequestListenAddrL #-} + +-- | 'swarmJoinRequestAdvertiseAddr' Lens +swarmJoinRequestAdvertiseAddrL :: Lens_' SwarmJoinRequest (Maybe Text) +swarmJoinRequestAdvertiseAddrL f SwarmJoinRequest{..} = (\swarmJoinRequestAdvertiseAddr -> SwarmJoinRequest { swarmJoinRequestAdvertiseAddr, ..} ) <$> f swarmJoinRequestAdvertiseAddr +{-# INLINE swarmJoinRequestAdvertiseAddrL #-} + +-- | 'swarmJoinRequestDataPathAddr' Lens +swarmJoinRequestDataPathAddrL :: Lens_' SwarmJoinRequest (Maybe Text) +swarmJoinRequestDataPathAddrL f SwarmJoinRequest{..} = (\swarmJoinRequestDataPathAddr -> SwarmJoinRequest { swarmJoinRequestDataPathAddr, ..} ) <$> f swarmJoinRequestDataPathAddr +{-# INLINE swarmJoinRequestDataPathAddrL #-} + +-- | 'swarmJoinRequestRemoteAddrs' Lens +swarmJoinRequestRemoteAddrsL :: Lens_' SwarmJoinRequest (Maybe [Text]) +swarmJoinRequestRemoteAddrsL f SwarmJoinRequest{..} = (\swarmJoinRequestRemoteAddrs -> SwarmJoinRequest { swarmJoinRequestRemoteAddrs, ..} ) <$> f swarmJoinRequestRemoteAddrs +{-# INLINE swarmJoinRequestRemoteAddrsL #-} + +-- | 'swarmJoinRequestJoinToken' Lens +swarmJoinRequestJoinTokenL :: Lens_' SwarmJoinRequest (Maybe Text) +swarmJoinRequestJoinTokenL f SwarmJoinRequest{..} = (\swarmJoinRequestJoinToken -> SwarmJoinRequest { swarmJoinRequestJoinToken, ..} ) <$> f swarmJoinRequestJoinToken +{-# INLINE swarmJoinRequestJoinTokenL #-} + + + +-- * SwarmSpec + +-- | 'swarmSpecName' Lens +swarmSpecNameL :: Lens_' SwarmSpec (Maybe Text) +swarmSpecNameL f SwarmSpec{..} = (\swarmSpecName -> SwarmSpec { swarmSpecName, ..} ) <$> f swarmSpecName +{-# INLINE swarmSpecNameL #-} + +-- | 'swarmSpecLabels' Lens +swarmSpecLabelsL :: Lens_' SwarmSpec (Maybe (Map.Map String Text)) +swarmSpecLabelsL f SwarmSpec{..} = (\swarmSpecLabels -> SwarmSpec { swarmSpecLabels, ..} ) <$> f swarmSpecLabels +{-# INLINE swarmSpecLabelsL #-} + +-- | 'swarmSpecOrchestration' Lens +swarmSpecOrchestrationL :: Lens_' SwarmSpec (Maybe SwarmSpecOrchestration) +swarmSpecOrchestrationL f SwarmSpec{..} = (\swarmSpecOrchestration -> SwarmSpec { swarmSpecOrchestration, ..} ) <$> f swarmSpecOrchestration +{-# INLINE swarmSpecOrchestrationL #-} + +-- | 'swarmSpecRaft' Lens +swarmSpecRaftL :: Lens_' SwarmSpec (Maybe SwarmSpecRaft) +swarmSpecRaftL f SwarmSpec{..} = (\swarmSpecRaft -> SwarmSpec { swarmSpecRaft, ..} ) <$> f swarmSpecRaft +{-# INLINE swarmSpecRaftL #-} + +-- | 'swarmSpecDispatcher' Lens +swarmSpecDispatcherL :: Lens_' SwarmSpec (Maybe SwarmSpecDispatcher) +swarmSpecDispatcherL f SwarmSpec{..} = (\swarmSpecDispatcher -> SwarmSpec { swarmSpecDispatcher, ..} ) <$> f swarmSpecDispatcher +{-# INLINE swarmSpecDispatcherL #-} + +-- | 'swarmSpecCaConfig' Lens +swarmSpecCaConfigL :: Lens_' SwarmSpec (Maybe SwarmSpecCAConfig) +swarmSpecCaConfigL f SwarmSpec{..} = (\swarmSpecCaConfig -> SwarmSpec { swarmSpecCaConfig, ..} ) <$> f swarmSpecCaConfig +{-# INLINE swarmSpecCaConfigL #-} + +-- | 'swarmSpecEncryptionConfig' Lens +swarmSpecEncryptionConfigL :: Lens_' SwarmSpec (Maybe SwarmSpecEncryptionConfig) +swarmSpecEncryptionConfigL f SwarmSpec{..} = (\swarmSpecEncryptionConfig -> SwarmSpec { swarmSpecEncryptionConfig, ..} ) <$> f swarmSpecEncryptionConfig +{-# INLINE swarmSpecEncryptionConfigL #-} + +-- | 'swarmSpecTaskDefaults' Lens +swarmSpecTaskDefaultsL :: Lens_' SwarmSpec (Maybe SwarmSpecTaskDefaults) +swarmSpecTaskDefaultsL f SwarmSpec{..} = (\swarmSpecTaskDefaults -> SwarmSpec { swarmSpecTaskDefaults, ..} ) <$> f swarmSpecTaskDefaults +{-# INLINE swarmSpecTaskDefaultsL #-} + + + +-- * SwarmSpecCAConfig + +-- | 'swarmSpecCAConfigNodeCertExpiry' Lens +swarmSpecCAConfigNodeCertExpiryL :: Lens_' SwarmSpecCAConfig (Maybe Integer) +swarmSpecCAConfigNodeCertExpiryL f SwarmSpecCAConfig{..} = (\swarmSpecCAConfigNodeCertExpiry -> SwarmSpecCAConfig { swarmSpecCAConfigNodeCertExpiry, ..} ) <$> f swarmSpecCAConfigNodeCertExpiry +{-# INLINE swarmSpecCAConfigNodeCertExpiryL #-} + +-- | 'swarmSpecCAConfigExternalCas' Lens +swarmSpecCAConfigExternalCasL :: Lens_' SwarmSpecCAConfig (Maybe [SwarmSpecCAConfigExternalCAsInner]) +swarmSpecCAConfigExternalCasL f SwarmSpecCAConfig{..} = (\swarmSpecCAConfigExternalCas -> SwarmSpecCAConfig { swarmSpecCAConfigExternalCas, ..} ) <$> f swarmSpecCAConfigExternalCas +{-# INLINE swarmSpecCAConfigExternalCasL #-} + +-- | 'swarmSpecCAConfigSigningCaCert' Lens +swarmSpecCAConfigSigningCaCertL :: Lens_' SwarmSpecCAConfig (Maybe Text) +swarmSpecCAConfigSigningCaCertL f SwarmSpecCAConfig{..} = (\swarmSpecCAConfigSigningCaCert -> SwarmSpecCAConfig { swarmSpecCAConfigSigningCaCert, ..} ) <$> f swarmSpecCAConfigSigningCaCert +{-# INLINE swarmSpecCAConfigSigningCaCertL #-} + +-- | 'swarmSpecCAConfigSigningCaKey' Lens +swarmSpecCAConfigSigningCaKeyL :: Lens_' SwarmSpecCAConfig (Maybe Text) +swarmSpecCAConfigSigningCaKeyL f SwarmSpecCAConfig{..} = (\swarmSpecCAConfigSigningCaKey -> SwarmSpecCAConfig { swarmSpecCAConfigSigningCaKey, ..} ) <$> f swarmSpecCAConfigSigningCaKey +{-# INLINE swarmSpecCAConfigSigningCaKeyL #-} + +-- | 'swarmSpecCAConfigForceRotate' Lens +swarmSpecCAConfigForceRotateL :: Lens_' SwarmSpecCAConfig (Maybe Int) +swarmSpecCAConfigForceRotateL f SwarmSpecCAConfig{..} = (\swarmSpecCAConfigForceRotate -> SwarmSpecCAConfig { swarmSpecCAConfigForceRotate, ..} ) <$> f swarmSpecCAConfigForceRotate +{-# INLINE swarmSpecCAConfigForceRotateL #-} + + + +-- * SwarmSpecCAConfigExternalCAsInner + +-- | 'swarmSpecCAConfigExternalCAsInnerProtocol' Lens +swarmSpecCAConfigExternalCAsInnerProtocolL :: Lens_' SwarmSpecCAConfigExternalCAsInner (Maybe E'Protocol) +swarmSpecCAConfigExternalCAsInnerProtocolL f SwarmSpecCAConfigExternalCAsInner{..} = (\swarmSpecCAConfigExternalCAsInnerProtocol -> SwarmSpecCAConfigExternalCAsInner { swarmSpecCAConfigExternalCAsInnerProtocol, ..} ) <$> f swarmSpecCAConfigExternalCAsInnerProtocol +{-# INLINE swarmSpecCAConfigExternalCAsInnerProtocolL #-} + +-- | 'swarmSpecCAConfigExternalCAsInnerUrl' Lens +swarmSpecCAConfigExternalCAsInnerUrlL :: Lens_' SwarmSpecCAConfigExternalCAsInner (Maybe Text) +swarmSpecCAConfigExternalCAsInnerUrlL f SwarmSpecCAConfigExternalCAsInner{..} = (\swarmSpecCAConfigExternalCAsInnerUrl -> SwarmSpecCAConfigExternalCAsInner { swarmSpecCAConfigExternalCAsInnerUrl, ..} ) <$> f swarmSpecCAConfigExternalCAsInnerUrl +{-# INLINE swarmSpecCAConfigExternalCAsInnerUrlL #-} + +-- | 'swarmSpecCAConfigExternalCAsInnerOptions' Lens +swarmSpecCAConfigExternalCAsInnerOptionsL :: Lens_' SwarmSpecCAConfigExternalCAsInner (Maybe (Map.Map String Text)) +swarmSpecCAConfigExternalCAsInnerOptionsL f SwarmSpecCAConfigExternalCAsInner{..} = (\swarmSpecCAConfigExternalCAsInnerOptions -> SwarmSpecCAConfigExternalCAsInner { swarmSpecCAConfigExternalCAsInnerOptions, ..} ) <$> f swarmSpecCAConfigExternalCAsInnerOptions +{-# INLINE swarmSpecCAConfigExternalCAsInnerOptionsL #-} + +-- | 'swarmSpecCAConfigExternalCAsInnerCaCert' Lens +swarmSpecCAConfigExternalCAsInnerCaCertL :: Lens_' SwarmSpecCAConfigExternalCAsInner (Maybe Text) +swarmSpecCAConfigExternalCAsInnerCaCertL f SwarmSpecCAConfigExternalCAsInner{..} = (\swarmSpecCAConfigExternalCAsInnerCaCert -> SwarmSpecCAConfigExternalCAsInner { swarmSpecCAConfigExternalCAsInnerCaCert, ..} ) <$> f swarmSpecCAConfigExternalCAsInnerCaCert +{-# INLINE swarmSpecCAConfigExternalCAsInnerCaCertL #-} + + + +-- * SwarmSpecDispatcher + +-- | 'swarmSpecDispatcherHeartbeatPeriod' Lens +swarmSpecDispatcherHeartbeatPeriodL :: Lens_' SwarmSpecDispatcher (Maybe Integer) +swarmSpecDispatcherHeartbeatPeriodL f SwarmSpecDispatcher{..} = (\swarmSpecDispatcherHeartbeatPeriod -> SwarmSpecDispatcher { swarmSpecDispatcherHeartbeatPeriod, ..} ) <$> f swarmSpecDispatcherHeartbeatPeriod +{-# INLINE swarmSpecDispatcherHeartbeatPeriodL #-} + + + +-- * SwarmSpecEncryptionConfig + +-- | 'swarmSpecEncryptionConfigAutoLockManagers' Lens +swarmSpecEncryptionConfigAutoLockManagersL :: Lens_' SwarmSpecEncryptionConfig (Maybe Bool) +swarmSpecEncryptionConfigAutoLockManagersL f SwarmSpecEncryptionConfig{..} = (\swarmSpecEncryptionConfigAutoLockManagers -> SwarmSpecEncryptionConfig { swarmSpecEncryptionConfigAutoLockManagers, ..} ) <$> f swarmSpecEncryptionConfigAutoLockManagers +{-# INLINE swarmSpecEncryptionConfigAutoLockManagersL #-} + + + +-- * SwarmSpecOrchestration + +-- | 'swarmSpecOrchestrationTaskHistoryRetentionLimit' Lens +swarmSpecOrchestrationTaskHistoryRetentionLimitL :: Lens_' SwarmSpecOrchestration (Maybe Integer) +swarmSpecOrchestrationTaskHistoryRetentionLimitL f SwarmSpecOrchestration{..} = (\swarmSpecOrchestrationTaskHistoryRetentionLimit -> SwarmSpecOrchestration { swarmSpecOrchestrationTaskHistoryRetentionLimit, ..} ) <$> f swarmSpecOrchestrationTaskHistoryRetentionLimit +{-# INLINE swarmSpecOrchestrationTaskHistoryRetentionLimitL #-} + + + +-- * SwarmSpecRaft + +-- | 'swarmSpecRaftSnapshotInterval' Lens +swarmSpecRaftSnapshotIntervalL :: Lens_' SwarmSpecRaft (Maybe Int) +swarmSpecRaftSnapshotIntervalL f SwarmSpecRaft{..} = (\swarmSpecRaftSnapshotInterval -> SwarmSpecRaft { swarmSpecRaftSnapshotInterval, ..} ) <$> f swarmSpecRaftSnapshotInterval +{-# INLINE swarmSpecRaftSnapshotIntervalL #-} + +-- | 'swarmSpecRaftKeepOldSnapshots' Lens +swarmSpecRaftKeepOldSnapshotsL :: Lens_' SwarmSpecRaft (Maybe Int) +swarmSpecRaftKeepOldSnapshotsL f SwarmSpecRaft{..} = (\swarmSpecRaftKeepOldSnapshots -> SwarmSpecRaft { swarmSpecRaftKeepOldSnapshots, ..} ) <$> f swarmSpecRaftKeepOldSnapshots +{-# INLINE swarmSpecRaftKeepOldSnapshotsL #-} + +-- | 'swarmSpecRaftLogEntriesForSlowFollowers' Lens +swarmSpecRaftLogEntriesForSlowFollowersL :: Lens_' SwarmSpecRaft (Maybe Int) +swarmSpecRaftLogEntriesForSlowFollowersL f SwarmSpecRaft{..} = (\swarmSpecRaftLogEntriesForSlowFollowers -> SwarmSpecRaft { swarmSpecRaftLogEntriesForSlowFollowers, ..} ) <$> f swarmSpecRaftLogEntriesForSlowFollowers +{-# INLINE swarmSpecRaftLogEntriesForSlowFollowersL #-} + +-- | 'swarmSpecRaftElectionTick' Lens +swarmSpecRaftElectionTickL :: Lens_' SwarmSpecRaft (Maybe Int) +swarmSpecRaftElectionTickL f SwarmSpecRaft{..} = (\swarmSpecRaftElectionTick -> SwarmSpecRaft { swarmSpecRaftElectionTick, ..} ) <$> f swarmSpecRaftElectionTick +{-# INLINE swarmSpecRaftElectionTickL #-} + +-- | 'swarmSpecRaftHeartbeatTick' Lens +swarmSpecRaftHeartbeatTickL :: Lens_' SwarmSpecRaft (Maybe Int) +swarmSpecRaftHeartbeatTickL f SwarmSpecRaft{..} = (\swarmSpecRaftHeartbeatTick -> SwarmSpecRaft { swarmSpecRaftHeartbeatTick, ..} ) <$> f swarmSpecRaftHeartbeatTick +{-# INLINE swarmSpecRaftHeartbeatTickL #-} + + + +-- * SwarmSpecTaskDefaults + +-- | 'swarmSpecTaskDefaultsLogDriver' Lens +swarmSpecTaskDefaultsLogDriverL :: Lens_' SwarmSpecTaskDefaults (Maybe SwarmSpecTaskDefaultsLogDriver) +swarmSpecTaskDefaultsLogDriverL f SwarmSpecTaskDefaults{..} = (\swarmSpecTaskDefaultsLogDriver -> SwarmSpecTaskDefaults { swarmSpecTaskDefaultsLogDriver, ..} ) <$> f swarmSpecTaskDefaultsLogDriver +{-# INLINE swarmSpecTaskDefaultsLogDriverL #-} + + + +-- * SwarmSpecTaskDefaultsLogDriver + +-- | 'swarmSpecTaskDefaultsLogDriverName' Lens +swarmSpecTaskDefaultsLogDriverNameL :: Lens_' SwarmSpecTaskDefaultsLogDriver (Maybe Text) +swarmSpecTaskDefaultsLogDriverNameL f SwarmSpecTaskDefaultsLogDriver{..} = (\swarmSpecTaskDefaultsLogDriverName -> SwarmSpecTaskDefaultsLogDriver { swarmSpecTaskDefaultsLogDriverName, ..} ) <$> f swarmSpecTaskDefaultsLogDriverName +{-# INLINE swarmSpecTaskDefaultsLogDriverNameL #-} + +-- | 'swarmSpecTaskDefaultsLogDriverOptions' Lens +swarmSpecTaskDefaultsLogDriverOptionsL :: Lens_' SwarmSpecTaskDefaultsLogDriver (Maybe (Map.Map String Text)) +swarmSpecTaskDefaultsLogDriverOptionsL f SwarmSpecTaskDefaultsLogDriver{..} = (\swarmSpecTaskDefaultsLogDriverOptions -> SwarmSpecTaskDefaultsLogDriver { swarmSpecTaskDefaultsLogDriverOptions, ..} ) <$> f swarmSpecTaskDefaultsLogDriverOptions +{-# INLINE swarmSpecTaskDefaultsLogDriverOptionsL #-} + + + +-- * SwarmUnlockRequest + +-- | 'swarmUnlockRequestUnlockKey' Lens +swarmUnlockRequestUnlockKeyL :: Lens_' SwarmUnlockRequest (Maybe Text) +swarmUnlockRequestUnlockKeyL f SwarmUnlockRequest{..} = (\swarmUnlockRequestUnlockKey -> SwarmUnlockRequest { swarmUnlockRequestUnlockKey, ..} ) <$> f swarmUnlockRequestUnlockKey +{-# INLINE swarmUnlockRequestUnlockKeyL #-} + + + +-- * SystemAuthResponse + +-- | 'systemAuthResponseStatus' Lens +systemAuthResponseStatusL :: Lens_' SystemAuthResponse (Text) +systemAuthResponseStatusL f SystemAuthResponse{..} = (\systemAuthResponseStatus -> SystemAuthResponse { systemAuthResponseStatus, ..} ) <$> f systemAuthResponseStatus +{-# INLINE systemAuthResponseStatusL #-} + +-- | 'systemAuthResponseIdentityToken' Lens +systemAuthResponseIdentityTokenL :: Lens_' SystemAuthResponse (Maybe Text) +systemAuthResponseIdentityTokenL f SystemAuthResponse{..} = (\systemAuthResponseIdentityToken -> SystemAuthResponse { systemAuthResponseIdentityToken, ..} ) <$> f systemAuthResponseIdentityToken +{-# INLINE systemAuthResponseIdentityTokenL #-} + + + +-- * SystemDataUsageResponse + +-- | 'systemDataUsageResponseLayersSize' Lens +systemDataUsageResponseLayersSizeL :: Lens_' SystemDataUsageResponse (Maybe Integer) +systemDataUsageResponseLayersSizeL f SystemDataUsageResponse{..} = (\systemDataUsageResponseLayersSize -> SystemDataUsageResponse { systemDataUsageResponseLayersSize, ..} ) <$> f systemDataUsageResponseLayersSize +{-# INLINE systemDataUsageResponseLayersSizeL #-} + +-- | 'systemDataUsageResponseImages' Lens +systemDataUsageResponseImagesL :: Lens_' SystemDataUsageResponse (Maybe [ImageSummary]) +systemDataUsageResponseImagesL f SystemDataUsageResponse{..} = (\systemDataUsageResponseImages -> SystemDataUsageResponse { systemDataUsageResponseImages, ..} ) <$> f systemDataUsageResponseImages +{-# INLINE systemDataUsageResponseImagesL #-} + +-- | 'systemDataUsageResponseContainers' Lens +systemDataUsageResponseContainersL :: Lens_' SystemDataUsageResponse (Maybe [ContainerSummary]) +systemDataUsageResponseContainersL f SystemDataUsageResponse{..} = (\systemDataUsageResponseContainers -> SystemDataUsageResponse { systemDataUsageResponseContainers, ..} ) <$> f systemDataUsageResponseContainers +{-# INLINE systemDataUsageResponseContainersL #-} + +-- | 'systemDataUsageResponseVolumes' Lens +systemDataUsageResponseVolumesL :: Lens_' SystemDataUsageResponse (Maybe [Volume]) +systemDataUsageResponseVolumesL f SystemDataUsageResponse{..} = (\systemDataUsageResponseVolumes -> SystemDataUsageResponse { systemDataUsageResponseVolumes, ..} ) <$> f systemDataUsageResponseVolumes +{-# INLINE systemDataUsageResponseVolumesL #-} + +-- | 'systemDataUsageResponseBuildCache' Lens +systemDataUsageResponseBuildCacheL :: Lens_' SystemDataUsageResponse (Maybe [BuildCache]) +systemDataUsageResponseBuildCacheL f SystemDataUsageResponse{..} = (\systemDataUsageResponseBuildCache -> SystemDataUsageResponse { systemDataUsageResponseBuildCache, ..} ) <$> f systemDataUsageResponseBuildCache +{-# INLINE systemDataUsageResponseBuildCacheL #-} + + + +-- * SystemInfo + +-- | 'systemInfoId' Lens +systemInfoIdL :: Lens_' SystemInfo (Maybe Text) +systemInfoIdL f SystemInfo{..} = (\systemInfoId -> SystemInfo { systemInfoId, ..} ) <$> f systemInfoId +{-# INLINE systemInfoIdL #-} + +-- | 'systemInfoContainers' Lens +systemInfoContainersL :: Lens_' SystemInfo (Maybe Int) +systemInfoContainersL f SystemInfo{..} = (\systemInfoContainers -> SystemInfo { systemInfoContainers, ..} ) <$> f systemInfoContainers +{-# INLINE systemInfoContainersL #-} + +-- | 'systemInfoContainersRunning' Lens +systemInfoContainersRunningL :: Lens_' SystemInfo (Maybe Int) +systemInfoContainersRunningL f SystemInfo{..} = (\systemInfoContainersRunning -> SystemInfo { systemInfoContainersRunning, ..} ) <$> f systemInfoContainersRunning +{-# INLINE systemInfoContainersRunningL #-} + +-- | 'systemInfoContainersPaused' Lens +systemInfoContainersPausedL :: Lens_' SystemInfo (Maybe Int) +systemInfoContainersPausedL f SystemInfo{..} = (\systemInfoContainersPaused -> SystemInfo { systemInfoContainersPaused, ..} ) <$> f systemInfoContainersPaused +{-# INLINE systemInfoContainersPausedL #-} + +-- | 'systemInfoContainersStopped' Lens +systemInfoContainersStoppedL :: Lens_' SystemInfo (Maybe Int) +systemInfoContainersStoppedL f SystemInfo{..} = (\systemInfoContainersStopped -> SystemInfo { systemInfoContainersStopped, ..} ) <$> f systemInfoContainersStopped +{-# INLINE systemInfoContainersStoppedL #-} + +-- | 'systemInfoImages' Lens +systemInfoImagesL :: Lens_' SystemInfo (Maybe Int) +systemInfoImagesL f SystemInfo{..} = (\systemInfoImages -> SystemInfo { systemInfoImages, ..} ) <$> f systemInfoImages +{-# INLINE systemInfoImagesL #-} + +-- | 'systemInfoDriver' Lens +systemInfoDriverL :: Lens_' SystemInfo (Maybe Text) +systemInfoDriverL f SystemInfo{..} = (\systemInfoDriver -> SystemInfo { systemInfoDriver, ..} ) <$> f systemInfoDriver +{-# INLINE systemInfoDriverL #-} + +-- | 'systemInfoDriverStatus' Lens +systemInfoDriverStatusL :: Lens_' SystemInfo (Maybe [[Text]]) +systemInfoDriverStatusL f SystemInfo{..} = (\systemInfoDriverStatus -> SystemInfo { systemInfoDriverStatus, ..} ) <$> f systemInfoDriverStatus +{-# INLINE systemInfoDriverStatusL #-} + +-- | 'systemInfoDockerRootDir' Lens +systemInfoDockerRootDirL :: Lens_' SystemInfo (Maybe Text) +systemInfoDockerRootDirL f SystemInfo{..} = (\systemInfoDockerRootDir -> SystemInfo { systemInfoDockerRootDir, ..} ) <$> f systemInfoDockerRootDir +{-# INLINE systemInfoDockerRootDirL #-} + +-- | 'systemInfoPlugins' Lens +systemInfoPluginsL :: Lens_' SystemInfo (Maybe PluginsInfo) +systemInfoPluginsL f SystemInfo{..} = (\systemInfoPlugins -> SystemInfo { systemInfoPlugins, ..} ) <$> f systemInfoPlugins +{-# INLINE systemInfoPluginsL #-} + +-- | 'systemInfoMemoryLimit' Lens +systemInfoMemoryLimitL :: Lens_' SystemInfo (Maybe Bool) +systemInfoMemoryLimitL f SystemInfo{..} = (\systemInfoMemoryLimit -> SystemInfo { systemInfoMemoryLimit, ..} ) <$> f systemInfoMemoryLimit +{-# INLINE systemInfoMemoryLimitL #-} + +-- | 'systemInfoSwapLimit' Lens +systemInfoSwapLimitL :: Lens_' SystemInfo (Maybe Bool) +systemInfoSwapLimitL f SystemInfo{..} = (\systemInfoSwapLimit -> SystemInfo { systemInfoSwapLimit, ..} ) <$> f systemInfoSwapLimit +{-# INLINE systemInfoSwapLimitL #-} + +-- | 'systemInfoKernelMemoryTcp' Lens +systemInfoKernelMemoryTcpL :: Lens_' SystemInfo (Maybe Bool) +systemInfoKernelMemoryTcpL f SystemInfo{..} = (\systemInfoKernelMemoryTcp -> SystemInfo { systemInfoKernelMemoryTcp, ..} ) <$> f systemInfoKernelMemoryTcp +{-# INLINE systemInfoKernelMemoryTcpL #-} + +-- | 'systemInfoCpuCfsPeriod' Lens +systemInfoCpuCfsPeriodL :: Lens_' SystemInfo (Maybe Bool) +systemInfoCpuCfsPeriodL f SystemInfo{..} = (\systemInfoCpuCfsPeriod -> SystemInfo { systemInfoCpuCfsPeriod, ..} ) <$> f systemInfoCpuCfsPeriod +{-# INLINE systemInfoCpuCfsPeriodL #-} + +-- | 'systemInfoCpuCfsQuota' Lens +systemInfoCpuCfsQuotaL :: Lens_' SystemInfo (Maybe Bool) +systemInfoCpuCfsQuotaL f SystemInfo{..} = (\systemInfoCpuCfsQuota -> SystemInfo { systemInfoCpuCfsQuota, ..} ) <$> f systemInfoCpuCfsQuota +{-# INLINE systemInfoCpuCfsQuotaL #-} + +-- | 'systemInfoCpuShares' Lens +systemInfoCpuSharesL :: Lens_' SystemInfo (Maybe Bool) +systemInfoCpuSharesL f SystemInfo{..} = (\systemInfoCpuShares -> SystemInfo { systemInfoCpuShares, ..} ) <$> f systemInfoCpuShares +{-# INLINE systemInfoCpuSharesL #-} + +-- | 'systemInfoCpuSet' Lens +systemInfoCpuSetL :: Lens_' SystemInfo (Maybe Bool) +systemInfoCpuSetL f SystemInfo{..} = (\systemInfoCpuSet -> SystemInfo { systemInfoCpuSet, ..} ) <$> f systemInfoCpuSet +{-# INLINE systemInfoCpuSetL #-} + +-- | 'systemInfoPidsLimit' Lens +systemInfoPidsLimitL :: Lens_' SystemInfo (Maybe Bool) +systemInfoPidsLimitL f SystemInfo{..} = (\systemInfoPidsLimit -> SystemInfo { systemInfoPidsLimit, ..} ) <$> f systemInfoPidsLimit +{-# INLINE systemInfoPidsLimitL #-} + +-- | 'systemInfoOomKillDisable' Lens +systemInfoOomKillDisableL :: Lens_' SystemInfo (Maybe Bool) +systemInfoOomKillDisableL f SystemInfo{..} = (\systemInfoOomKillDisable -> SystemInfo { systemInfoOomKillDisable, ..} ) <$> f systemInfoOomKillDisable +{-# INLINE systemInfoOomKillDisableL #-} + +-- | 'systemInfoIpv4Forwarding' Lens +systemInfoIpv4ForwardingL :: Lens_' SystemInfo (Maybe Bool) +systemInfoIpv4ForwardingL f SystemInfo{..} = (\systemInfoIpv4Forwarding -> SystemInfo { systemInfoIpv4Forwarding, ..} ) <$> f systemInfoIpv4Forwarding +{-# INLINE systemInfoIpv4ForwardingL #-} + +-- | 'systemInfoBridgeNfIptables' Lens +systemInfoBridgeNfIptablesL :: Lens_' SystemInfo (Maybe Bool) +systemInfoBridgeNfIptablesL f SystemInfo{..} = (\systemInfoBridgeNfIptables -> SystemInfo { systemInfoBridgeNfIptables, ..} ) <$> f systemInfoBridgeNfIptables +{-# INLINE systemInfoBridgeNfIptablesL #-} + +-- | 'systemInfoBridgeNfIp6tables' Lens +systemInfoBridgeNfIp6tablesL :: Lens_' SystemInfo (Maybe Bool) +systemInfoBridgeNfIp6tablesL f SystemInfo{..} = (\systemInfoBridgeNfIp6tables -> SystemInfo { systemInfoBridgeNfIp6tables, ..} ) <$> f systemInfoBridgeNfIp6tables +{-# INLINE systemInfoBridgeNfIp6tablesL #-} + +-- | 'systemInfoDebug' Lens +systemInfoDebugL :: Lens_' SystemInfo (Maybe Bool) +systemInfoDebugL f SystemInfo{..} = (\systemInfoDebug -> SystemInfo { systemInfoDebug, ..} ) <$> f systemInfoDebug +{-# INLINE systemInfoDebugL #-} + +-- | 'systemInfoNfd' Lens +systemInfoNfdL :: Lens_' SystemInfo (Maybe Int) +systemInfoNfdL f SystemInfo{..} = (\systemInfoNfd -> SystemInfo { systemInfoNfd, ..} ) <$> f systemInfoNfd +{-# INLINE systemInfoNfdL #-} + +-- | 'systemInfoNGoroutines' Lens +systemInfoNGoroutinesL :: Lens_' SystemInfo (Maybe Int) +systemInfoNGoroutinesL f SystemInfo{..} = (\systemInfoNGoroutines -> SystemInfo { systemInfoNGoroutines, ..} ) <$> f systemInfoNGoroutines +{-# INLINE systemInfoNGoroutinesL #-} + +-- | 'systemInfoSystemTime' Lens +systemInfoSystemTimeL :: Lens_' SystemInfo (Maybe Text) +systemInfoSystemTimeL f SystemInfo{..} = (\systemInfoSystemTime -> SystemInfo { systemInfoSystemTime, ..} ) <$> f systemInfoSystemTime +{-# INLINE systemInfoSystemTimeL #-} + +-- | 'systemInfoLoggingDriver' Lens +systemInfoLoggingDriverL :: Lens_' SystemInfo (Maybe Text) +systemInfoLoggingDriverL f SystemInfo{..} = (\systemInfoLoggingDriver -> SystemInfo { systemInfoLoggingDriver, ..} ) <$> f systemInfoLoggingDriver +{-# INLINE systemInfoLoggingDriverL #-} + +-- | 'systemInfoCgroupDriver' Lens +systemInfoCgroupDriverL :: Lens_' SystemInfo (Maybe E'CgroupDriver) +systemInfoCgroupDriverL f SystemInfo{..} = (\systemInfoCgroupDriver -> SystemInfo { systemInfoCgroupDriver, ..} ) <$> f systemInfoCgroupDriver +{-# INLINE systemInfoCgroupDriverL #-} + +-- | 'systemInfoCgroupVersion' Lens +systemInfoCgroupVersionL :: Lens_' SystemInfo (Maybe E'CgroupVersion) +systemInfoCgroupVersionL f SystemInfo{..} = (\systemInfoCgroupVersion -> SystemInfo { systemInfoCgroupVersion, ..} ) <$> f systemInfoCgroupVersion +{-# INLINE systemInfoCgroupVersionL #-} + +-- | 'systemInfoNEventsListener' Lens +systemInfoNEventsListenerL :: Lens_' SystemInfo (Maybe Int) +systemInfoNEventsListenerL f SystemInfo{..} = (\systemInfoNEventsListener -> SystemInfo { systemInfoNEventsListener, ..} ) <$> f systemInfoNEventsListener +{-# INLINE systemInfoNEventsListenerL #-} + +-- | 'systemInfoKernelVersion' Lens +systemInfoKernelVersionL :: Lens_' SystemInfo (Maybe Text) +systemInfoKernelVersionL f SystemInfo{..} = (\systemInfoKernelVersion -> SystemInfo { systemInfoKernelVersion, ..} ) <$> f systemInfoKernelVersion +{-# INLINE systemInfoKernelVersionL #-} + +-- | 'systemInfoOperatingSystem' Lens +systemInfoOperatingSystemL :: Lens_' SystemInfo (Maybe Text) +systemInfoOperatingSystemL f SystemInfo{..} = (\systemInfoOperatingSystem -> SystemInfo { systemInfoOperatingSystem, ..} ) <$> f systemInfoOperatingSystem +{-# INLINE systemInfoOperatingSystemL #-} + +-- | 'systemInfoOsVersion' Lens +systemInfoOsVersionL :: Lens_' SystemInfo (Maybe Text) +systemInfoOsVersionL f SystemInfo{..} = (\systemInfoOsVersion -> SystemInfo { systemInfoOsVersion, ..} ) <$> f systemInfoOsVersion +{-# INLINE systemInfoOsVersionL #-} + +-- | 'systemInfoOsType' Lens +systemInfoOsTypeL :: Lens_' SystemInfo (Maybe Text) +systemInfoOsTypeL f SystemInfo{..} = (\systemInfoOsType -> SystemInfo { systemInfoOsType, ..} ) <$> f systemInfoOsType +{-# INLINE systemInfoOsTypeL #-} + +-- | 'systemInfoArchitecture' Lens +systemInfoArchitectureL :: Lens_' SystemInfo (Maybe Text) +systemInfoArchitectureL f SystemInfo{..} = (\systemInfoArchitecture -> SystemInfo { systemInfoArchitecture, ..} ) <$> f systemInfoArchitecture +{-# INLINE systemInfoArchitectureL #-} + +-- | 'systemInfoNcpu' Lens +systemInfoNcpuL :: Lens_' SystemInfo (Maybe Int) +systemInfoNcpuL f SystemInfo{..} = (\systemInfoNcpu -> SystemInfo { systemInfoNcpu, ..} ) <$> f systemInfoNcpu +{-# INLINE systemInfoNcpuL #-} + +-- | 'systemInfoMemTotal' Lens +systemInfoMemTotalL :: Lens_' SystemInfo (Maybe Integer) +systemInfoMemTotalL f SystemInfo{..} = (\systemInfoMemTotal -> SystemInfo { systemInfoMemTotal, ..} ) <$> f systemInfoMemTotal +{-# INLINE systemInfoMemTotalL #-} + +-- | 'systemInfoIndexServerAddress' Lens +systemInfoIndexServerAddressL :: Lens_' SystemInfo (Maybe Text) +systemInfoIndexServerAddressL f SystemInfo{..} = (\systemInfoIndexServerAddress -> SystemInfo { systemInfoIndexServerAddress, ..} ) <$> f systemInfoIndexServerAddress +{-# INLINE systemInfoIndexServerAddressL #-} + +-- | 'systemInfoRegistryConfig' Lens +systemInfoRegistryConfigL :: Lens_' SystemInfo (Maybe RegistryServiceConfig) +systemInfoRegistryConfigL f SystemInfo{..} = (\systemInfoRegistryConfig -> SystemInfo { systemInfoRegistryConfig, ..} ) <$> f systemInfoRegistryConfig +{-# INLINE systemInfoRegistryConfigL #-} + +-- | 'systemInfoGenericResources' Lens +systemInfoGenericResourcesL :: Lens_' SystemInfo (Maybe [GenericResourcesInner]) +systemInfoGenericResourcesL f SystemInfo{..} = (\systemInfoGenericResources -> SystemInfo { systemInfoGenericResources, ..} ) <$> f systemInfoGenericResources +{-# INLINE systemInfoGenericResourcesL #-} + +-- | 'systemInfoHttpProxy' Lens +systemInfoHttpProxyL :: Lens_' SystemInfo (Maybe Text) +systemInfoHttpProxyL f SystemInfo{..} = (\systemInfoHttpProxy -> SystemInfo { systemInfoHttpProxy, ..} ) <$> f systemInfoHttpProxy +{-# INLINE systemInfoHttpProxyL #-} + +-- | 'systemInfoHttpsProxy' Lens +systemInfoHttpsProxyL :: Lens_' SystemInfo (Maybe Text) +systemInfoHttpsProxyL f SystemInfo{..} = (\systemInfoHttpsProxy -> SystemInfo { systemInfoHttpsProxy, ..} ) <$> f systemInfoHttpsProxy +{-# INLINE systemInfoHttpsProxyL #-} + +-- | 'systemInfoNoProxy' Lens +systemInfoNoProxyL :: Lens_' SystemInfo (Maybe Text) +systemInfoNoProxyL f SystemInfo{..} = (\systemInfoNoProxy -> SystemInfo { systemInfoNoProxy, ..} ) <$> f systemInfoNoProxy +{-# INLINE systemInfoNoProxyL #-} + +-- | 'systemInfoName' Lens +systemInfoNameL :: Lens_' SystemInfo (Maybe Text) +systemInfoNameL f SystemInfo{..} = (\systemInfoName -> SystemInfo { systemInfoName, ..} ) <$> f systemInfoName +{-# INLINE systemInfoNameL #-} + +-- | 'systemInfoLabels' Lens +systemInfoLabelsL :: Lens_' SystemInfo (Maybe [Text]) +systemInfoLabelsL f SystemInfo{..} = (\systemInfoLabels -> SystemInfo { systemInfoLabels, ..} ) <$> f systemInfoLabels +{-# INLINE systemInfoLabelsL #-} + +-- | 'systemInfoExperimentalBuild' Lens +systemInfoExperimentalBuildL :: Lens_' SystemInfo (Maybe Bool) +systemInfoExperimentalBuildL f SystemInfo{..} = (\systemInfoExperimentalBuild -> SystemInfo { systemInfoExperimentalBuild, ..} ) <$> f systemInfoExperimentalBuild +{-# INLINE systemInfoExperimentalBuildL #-} + +-- | 'systemInfoServerVersion' Lens +systemInfoServerVersionL :: Lens_' SystemInfo (Maybe Text) +systemInfoServerVersionL f SystemInfo{..} = (\systemInfoServerVersion -> SystemInfo { systemInfoServerVersion, ..} ) <$> f systemInfoServerVersion +{-# INLINE systemInfoServerVersionL #-} + +-- | 'systemInfoRuntimes' Lens +systemInfoRuntimesL :: Lens_' SystemInfo (Maybe (Map.Map String Runtime)) +systemInfoRuntimesL f SystemInfo{..} = (\systemInfoRuntimes -> SystemInfo { systemInfoRuntimes, ..} ) <$> f systemInfoRuntimes +{-# INLINE systemInfoRuntimesL #-} + +-- | 'systemInfoDefaultRuntime' Lens +systemInfoDefaultRuntimeL :: Lens_' SystemInfo (Maybe Text) +systemInfoDefaultRuntimeL f SystemInfo{..} = (\systemInfoDefaultRuntime -> SystemInfo { systemInfoDefaultRuntime, ..} ) <$> f systemInfoDefaultRuntime +{-# INLINE systemInfoDefaultRuntimeL #-} + +-- | 'systemInfoSwarm' Lens +systemInfoSwarmL :: Lens_' SystemInfo (Maybe SwarmInfo) +systemInfoSwarmL f SystemInfo{..} = (\systemInfoSwarm -> SystemInfo { systemInfoSwarm, ..} ) <$> f systemInfoSwarm +{-# INLINE systemInfoSwarmL #-} + +-- | 'systemInfoLiveRestoreEnabled' Lens +systemInfoLiveRestoreEnabledL :: Lens_' SystemInfo (Maybe Bool) +systemInfoLiveRestoreEnabledL f SystemInfo{..} = (\systemInfoLiveRestoreEnabled -> SystemInfo { systemInfoLiveRestoreEnabled, ..} ) <$> f systemInfoLiveRestoreEnabled +{-# INLINE systemInfoLiveRestoreEnabledL #-} + +-- | 'systemInfoIsolation' Lens +systemInfoIsolationL :: Lens_' SystemInfo (Maybe E'Isolation2) +systemInfoIsolationL f SystemInfo{..} = (\systemInfoIsolation -> SystemInfo { systemInfoIsolation, ..} ) <$> f systemInfoIsolation +{-# INLINE systemInfoIsolationL #-} + +-- | 'systemInfoInitBinary' Lens +systemInfoInitBinaryL :: Lens_' SystemInfo (Maybe Text) +systemInfoInitBinaryL f SystemInfo{..} = (\systemInfoInitBinary -> SystemInfo { systemInfoInitBinary, ..} ) <$> f systemInfoInitBinary +{-# INLINE systemInfoInitBinaryL #-} + +-- | 'systemInfoContainerdCommit' Lens +systemInfoContainerdCommitL :: Lens_' SystemInfo (Maybe Commit) +systemInfoContainerdCommitL f SystemInfo{..} = (\systemInfoContainerdCommit -> SystemInfo { systemInfoContainerdCommit, ..} ) <$> f systemInfoContainerdCommit +{-# INLINE systemInfoContainerdCommitL #-} + +-- | 'systemInfoRuncCommit' Lens +systemInfoRuncCommitL :: Lens_' SystemInfo (Maybe Commit) +systemInfoRuncCommitL f SystemInfo{..} = (\systemInfoRuncCommit -> SystemInfo { systemInfoRuncCommit, ..} ) <$> f systemInfoRuncCommit +{-# INLINE systemInfoRuncCommitL #-} + +-- | 'systemInfoInitCommit' Lens +systemInfoInitCommitL :: Lens_' SystemInfo (Maybe Commit) +systemInfoInitCommitL f SystemInfo{..} = (\systemInfoInitCommit -> SystemInfo { systemInfoInitCommit, ..} ) <$> f systemInfoInitCommit +{-# INLINE systemInfoInitCommitL #-} + +-- | 'systemInfoSecurityOptions' Lens +systemInfoSecurityOptionsL :: Lens_' SystemInfo (Maybe [Text]) +systemInfoSecurityOptionsL f SystemInfo{..} = (\systemInfoSecurityOptions -> SystemInfo { systemInfoSecurityOptions, ..} ) <$> f systemInfoSecurityOptions +{-# INLINE systemInfoSecurityOptionsL #-} + +-- | 'systemInfoProductLicense' Lens +systemInfoProductLicenseL :: Lens_' SystemInfo (Maybe Text) +systemInfoProductLicenseL f SystemInfo{..} = (\systemInfoProductLicense -> SystemInfo { systemInfoProductLicense, ..} ) <$> f systemInfoProductLicense +{-# INLINE systemInfoProductLicenseL #-} + +-- | 'systemInfoDefaultAddressPools' Lens +systemInfoDefaultAddressPoolsL :: Lens_' SystemInfo (Maybe [SystemInfoDefaultAddressPoolsInner]) +systemInfoDefaultAddressPoolsL f SystemInfo{..} = (\systemInfoDefaultAddressPools -> SystemInfo { systemInfoDefaultAddressPools, ..} ) <$> f systemInfoDefaultAddressPools +{-# INLINE systemInfoDefaultAddressPoolsL #-} + +-- | 'systemInfoWarnings' Lens +systemInfoWarningsL :: Lens_' SystemInfo (Maybe [Text]) +systemInfoWarningsL f SystemInfo{..} = (\systemInfoWarnings -> SystemInfo { systemInfoWarnings, ..} ) <$> f systemInfoWarnings +{-# INLINE systemInfoWarningsL #-} + +-- | 'systemInfoCdiSpecDirs' Lens +systemInfoCdiSpecDirsL :: Lens_' SystemInfo (Maybe [Text]) +systemInfoCdiSpecDirsL f SystemInfo{..} = (\systemInfoCdiSpecDirs -> SystemInfo { systemInfoCdiSpecDirs, ..} ) <$> f systemInfoCdiSpecDirs +{-# INLINE systemInfoCdiSpecDirsL #-} + +-- | 'systemInfoContainerd' Lens +systemInfoContainerdL :: Lens_' SystemInfo (Maybe ContainerdInfo) +systemInfoContainerdL f SystemInfo{..} = (\systemInfoContainerd -> SystemInfo { systemInfoContainerd, ..} ) <$> f systemInfoContainerd +{-# INLINE systemInfoContainerdL #-} + + + +-- * SystemInfoDefaultAddressPoolsInner + +-- | 'systemInfoDefaultAddressPoolsInnerBase' Lens +systemInfoDefaultAddressPoolsInnerBaseL :: Lens_' SystemInfoDefaultAddressPoolsInner (Maybe Text) +systemInfoDefaultAddressPoolsInnerBaseL f SystemInfoDefaultAddressPoolsInner{..} = (\systemInfoDefaultAddressPoolsInnerBase -> SystemInfoDefaultAddressPoolsInner { systemInfoDefaultAddressPoolsInnerBase, ..} ) <$> f systemInfoDefaultAddressPoolsInnerBase +{-# INLINE systemInfoDefaultAddressPoolsInnerBaseL #-} + +-- | 'systemInfoDefaultAddressPoolsInnerSize' Lens +systemInfoDefaultAddressPoolsInnerSizeL :: Lens_' SystemInfoDefaultAddressPoolsInner (Maybe Int) +systemInfoDefaultAddressPoolsInnerSizeL f SystemInfoDefaultAddressPoolsInner{..} = (\systemInfoDefaultAddressPoolsInnerSize -> SystemInfoDefaultAddressPoolsInner { systemInfoDefaultAddressPoolsInnerSize, ..} ) <$> f systemInfoDefaultAddressPoolsInnerSize +{-# INLINE systemInfoDefaultAddressPoolsInnerSizeL #-} + + + +-- * SystemVersion + +-- | 'systemVersionPlatform' Lens +systemVersionPlatformL :: Lens_' SystemVersion (Maybe SystemVersionPlatform) +systemVersionPlatformL f SystemVersion{..} = (\systemVersionPlatform -> SystemVersion { systemVersionPlatform, ..} ) <$> f systemVersionPlatform +{-# INLINE systemVersionPlatformL #-} + +-- | 'systemVersionComponents' Lens +systemVersionComponentsL :: Lens_' SystemVersion (Maybe [SystemVersionComponentsInner]) +systemVersionComponentsL f SystemVersion{..} = (\systemVersionComponents -> SystemVersion { systemVersionComponents, ..} ) <$> f systemVersionComponents +{-# INLINE systemVersionComponentsL #-} + +-- | 'systemVersionVersion' Lens +systemVersionVersionL :: Lens_' SystemVersion (Maybe Text) +systemVersionVersionL f SystemVersion{..} = (\systemVersionVersion -> SystemVersion { systemVersionVersion, ..} ) <$> f systemVersionVersion +{-# INLINE systemVersionVersionL #-} + +-- | 'systemVersionApiVersion' Lens +systemVersionApiVersionL :: Lens_' SystemVersion (Maybe Text) +systemVersionApiVersionL f SystemVersion{..} = (\systemVersionApiVersion -> SystemVersion { systemVersionApiVersion, ..} ) <$> f systemVersionApiVersion +{-# INLINE systemVersionApiVersionL #-} + +-- | 'systemVersionMinApiVersion' Lens +systemVersionMinApiVersionL :: Lens_' SystemVersion (Maybe Text) +systemVersionMinApiVersionL f SystemVersion{..} = (\systemVersionMinApiVersion -> SystemVersion { systemVersionMinApiVersion, ..} ) <$> f systemVersionMinApiVersion +{-# INLINE systemVersionMinApiVersionL #-} + +-- | 'systemVersionGitCommit' Lens +systemVersionGitCommitL :: Lens_' SystemVersion (Maybe Text) +systemVersionGitCommitL f SystemVersion{..} = (\systemVersionGitCommit -> SystemVersion { systemVersionGitCommit, ..} ) <$> f systemVersionGitCommit +{-# INLINE systemVersionGitCommitL #-} + +-- | 'systemVersionGoVersion' Lens +systemVersionGoVersionL :: Lens_' SystemVersion (Maybe Text) +systemVersionGoVersionL f SystemVersion{..} = (\systemVersionGoVersion -> SystemVersion { systemVersionGoVersion, ..} ) <$> f systemVersionGoVersion +{-# INLINE systemVersionGoVersionL #-} + +-- | 'systemVersionOs' Lens +systemVersionOsL :: Lens_' SystemVersion (Maybe Text) +systemVersionOsL f SystemVersion{..} = (\systemVersionOs -> SystemVersion { systemVersionOs, ..} ) <$> f systemVersionOs +{-# INLINE systemVersionOsL #-} + +-- | 'systemVersionArch' Lens +systemVersionArchL :: Lens_' SystemVersion (Maybe Text) +systemVersionArchL f SystemVersion{..} = (\systemVersionArch -> SystemVersion { systemVersionArch, ..} ) <$> f systemVersionArch +{-# INLINE systemVersionArchL #-} + +-- | 'systemVersionKernelVersion' Lens +systemVersionKernelVersionL :: Lens_' SystemVersion (Maybe Text) +systemVersionKernelVersionL f SystemVersion{..} = (\systemVersionKernelVersion -> SystemVersion { systemVersionKernelVersion, ..} ) <$> f systemVersionKernelVersion +{-# INLINE systemVersionKernelVersionL #-} + +-- | 'systemVersionExperimental' Lens +systemVersionExperimentalL :: Lens_' SystemVersion (Maybe Bool) +systemVersionExperimentalL f SystemVersion{..} = (\systemVersionExperimental -> SystemVersion { systemVersionExperimental, ..} ) <$> f systemVersionExperimental +{-# INLINE systemVersionExperimentalL #-} + +-- | 'systemVersionBuildTime' Lens +systemVersionBuildTimeL :: Lens_' SystemVersion (Maybe Text) +systemVersionBuildTimeL f SystemVersion{..} = (\systemVersionBuildTime -> SystemVersion { systemVersionBuildTime, ..} ) <$> f systemVersionBuildTime +{-# INLINE systemVersionBuildTimeL #-} + + + +-- * SystemVersionComponentsInner + +-- | 'systemVersionComponentsInnerName' Lens +systemVersionComponentsInnerNameL :: Lens_' SystemVersionComponentsInner (Text) +systemVersionComponentsInnerNameL f SystemVersionComponentsInner{..} = (\systemVersionComponentsInnerName -> SystemVersionComponentsInner { systemVersionComponentsInnerName, ..} ) <$> f systemVersionComponentsInnerName +{-# INLINE systemVersionComponentsInnerNameL #-} + +-- | 'systemVersionComponentsInnerVersion' Lens +systemVersionComponentsInnerVersionL :: Lens_' SystemVersionComponentsInner (Text) +systemVersionComponentsInnerVersionL f SystemVersionComponentsInner{..} = (\systemVersionComponentsInnerVersion -> SystemVersionComponentsInner { systemVersionComponentsInnerVersion, ..} ) <$> f systemVersionComponentsInnerVersion +{-# INLINE systemVersionComponentsInnerVersionL #-} + +-- | 'systemVersionComponentsInnerDetails' Lens +systemVersionComponentsInnerDetailsL :: Lens_' SystemVersionComponentsInner (Maybe A.Value) +systemVersionComponentsInnerDetailsL f SystemVersionComponentsInner{..} = (\systemVersionComponentsInnerDetails -> SystemVersionComponentsInner { systemVersionComponentsInnerDetails, ..} ) <$> f systemVersionComponentsInnerDetails +{-# INLINE systemVersionComponentsInnerDetailsL #-} + + + +-- * SystemVersionPlatform + +-- | 'systemVersionPlatformName' Lens +systemVersionPlatformNameL :: Lens_' SystemVersionPlatform (Text) +systemVersionPlatformNameL f SystemVersionPlatform{..} = (\systemVersionPlatformName -> SystemVersionPlatform { systemVersionPlatformName, ..} ) <$> f systemVersionPlatformName +{-# INLINE systemVersionPlatformNameL #-} + + + +-- * TLSInfo + +-- | 'tLSInfoTrustRoot' Lens +tLSInfoTrustRootL :: Lens_' TLSInfo (Maybe Text) +tLSInfoTrustRootL f TLSInfo{..} = (\tLSInfoTrustRoot -> TLSInfo { tLSInfoTrustRoot, ..} ) <$> f tLSInfoTrustRoot +{-# INLINE tLSInfoTrustRootL #-} + +-- | 'tLSInfoCertIssuerSubject' Lens +tLSInfoCertIssuerSubjectL :: Lens_' TLSInfo (Maybe Text) +tLSInfoCertIssuerSubjectL f TLSInfo{..} = (\tLSInfoCertIssuerSubject -> TLSInfo { tLSInfoCertIssuerSubject, ..} ) <$> f tLSInfoCertIssuerSubject +{-# INLINE tLSInfoCertIssuerSubjectL #-} + +-- | 'tLSInfoCertIssuerPublicKey' Lens +tLSInfoCertIssuerPublicKeyL :: Lens_' TLSInfo (Maybe Text) +tLSInfoCertIssuerPublicKeyL f TLSInfo{..} = (\tLSInfoCertIssuerPublicKey -> TLSInfo { tLSInfoCertIssuerPublicKey, ..} ) <$> f tLSInfoCertIssuerPublicKey +{-# INLINE tLSInfoCertIssuerPublicKeyL #-} + + + +-- * Task + +-- | 'taskId' Lens +taskIdL :: Lens_' Task (Maybe Text) +taskIdL f Task{..} = (\taskId -> Task { taskId, ..} ) <$> f taskId +{-# INLINE taskIdL #-} + +-- | 'taskVersion' Lens +taskVersionL :: Lens_' Task (Maybe ObjectVersion) +taskVersionL f Task{..} = (\taskVersion -> Task { taskVersion, ..} ) <$> f taskVersion +{-# INLINE taskVersionL #-} + +-- | 'taskCreatedAt' Lens +taskCreatedAtL :: Lens_' Task (Maybe Text) +taskCreatedAtL f Task{..} = (\taskCreatedAt -> Task { taskCreatedAt, ..} ) <$> f taskCreatedAt +{-# INLINE taskCreatedAtL #-} + +-- | 'taskUpdatedAt' Lens +taskUpdatedAtL :: Lens_' Task (Maybe Text) +taskUpdatedAtL f Task{..} = (\taskUpdatedAt -> Task { taskUpdatedAt, ..} ) <$> f taskUpdatedAt +{-# INLINE taskUpdatedAtL #-} + +-- | 'taskName' Lens +taskNameL :: Lens_' Task (Maybe Text) +taskNameL f Task{..} = (\taskName -> Task { taskName, ..} ) <$> f taskName +{-# INLINE taskNameL #-} + +-- | 'taskLabels' Lens +taskLabelsL :: Lens_' Task (Maybe (Map.Map String Text)) +taskLabelsL f Task{..} = (\taskLabels -> Task { taskLabels, ..} ) <$> f taskLabels +{-# INLINE taskLabelsL #-} + +-- | 'taskSpec' Lens +taskSpecL :: Lens_' Task (Maybe TaskSpec) +taskSpecL f Task{..} = (\taskSpec -> Task { taskSpec, ..} ) <$> f taskSpec +{-# INLINE taskSpecL #-} + +-- | 'taskServiceId' Lens +taskServiceIdL :: Lens_' Task (Maybe Text) +taskServiceIdL f Task{..} = (\taskServiceId -> Task { taskServiceId, ..} ) <$> f taskServiceId +{-# INLINE taskServiceIdL #-} + +-- | 'taskSlot' Lens +taskSlotL :: Lens_' Task (Maybe Int) +taskSlotL f Task{..} = (\taskSlot -> Task { taskSlot, ..} ) <$> f taskSlot +{-# INLINE taskSlotL #-} + +-- | 'taskNodeId' Lens +taskNodeIdL :: Lens_' Task (Maybe Text) +taskNodeIdL f Task{..} = (\taskNodeId -> Task { taskNodeId, ..} ) <$> f taskNodeId +{-# INLINE taskNodeIdL #-} + +-- | 'taskAssignedGenericResources' Lens +taskAssignedGenericResourcesL :: Lens_' Task (Maybe [GenericResourcesInner]) +taskAssignedGenericResourcesL f Task{..} = (\taskAssignedGenericResources -> Task { taskAssignedGenericResources, ..} ) <$> f taskAssignedGenericResources +{-# INLINE taskAssignedGenericResourcesL #-} + +-- | 'taskStatus' Lens +taskStatusL :: Lens_' Task (Maybe TaskStatus) +taskStatusL f Task{..} = (\taskStatus -> Task { taskStatus, ..} ) <$> f taskStatus +{-# INLINE taskStatusL #-} + +-- | 'taskDesiredState' Lens +taskDesiredStateL :: Lens_' Task (Maybe TaskState) +taskDesiredStateL f Task{..} = (\taskDesiredState -> Task { taskDesiredState, ..} ) <$> f taskDesiredState +{-# INLINE taskDesiredStateL #-} + +-- | 'taskJobIteration' Lens +taskJobIterationL :: Lens_' Task (Maybe ObjectVersion) +taskJobIterationL f Task{..} = (\taskJobIteration -> Task { taskJobIteration, ..} ) <$> f taskJobIteration +{-# INLINE taskJobIterationL #-} + + + +-- * TaskSpec + +-- | 'taskSpecPluginSpec' Lens +taskSpecPluginSpecL :: Lens_' TaskSpec (Maybe TaskSpecPluginSpec) +taskSpecPluginSpecL f TaskSpec{..} = (\taskSpecPluginSpec -> TaskSpec { taskSpecPluginSpec, ..} ) <$> f taskSpecPluginSpec +{-# INLINE taskSpecPluginSpecL #-} + +-- | 'taskSpecContainerSpec' Lens +taskSpecContainerSpecL :: Lens_' TaskSpec (Maybe TaskSpecContainerSpec) +taskSpecContainerSpecL f TaskSpec{..} = (\taskSpecContainerSpec -> TaskSpec { taskSpecContainerSpec, ..} ) <$> f taskSpecContainerSpec +{-# INLINE taskSpecContainerSpecL #-} + +-- | 'taskSpecNetworkAttachmentSpec' Lens +taskSpecNetworkAttachmentSpecL :: Lens_' TaskSpec (Maybe TaskSpecNetworkAttachmentSpec) +taskSpecNetworkAttachmentSpecL f TaskSpec{..} = (\taskSpecNetworkAttachmentSpec -> TaskSpec { taskSpecNetworkAttachmentSpec, ..} ) <$> f taskSpecNetworkAttachmentSpec +{-# INLINE taskSpecNetworkAttachmentSpecL #-} + +-- | 'taskSpecResources' Lens +taskSpecResourcesL :: Lens_' TaskSpec (Maybe TaskSpecResources) +taskSpecResourcesL f TaskSpec{..} = (\taskSpecResources -> TaskSpec { taskSpecResources, ..} ) <$> f taskSpecResources +{-# INLINE taskSpecResourcesL #-} + +-- | 'taskSpecRestartPolicy' Lens +taskSpecRestartPolicyL :: Lens_' TaskSpec (Maybe TaskSpecRestartPolicy) +taskSpecRestartPolicyL f TaskSpec{..} = (\taskSpecRestartPolicy -> TaskSpec { taskSpecRestartPolicy, ..} ) <$> f taskSpecRestartPolicy +{-# INLINE taskSpecRestartPolicyL #-} + +-- | 'taskSpecPlacement' Lens +taskSpecPlacementL :: Lens_' TaskSpec (Maybe TaskSpecPlacement) +taskSpecPlacementL f TaskSpec{..} = (\taskSpecPlacement -> TaskSpec { taskSpecPlacement, ..} ) <$> f taskSpecPlacement +{-# INLINE taskSpecPlacementL #-} + +-- | 'taskSpecForceUpdate' Lens +taskSpecForceUpdateL :: Lens_' TaskSpec (Maybe Int) +taskSpecForceUpdateL f TaskSpec{..} = (\taskSpecForceUpdate -> TaskSpec { taskSpecForceUpdate, ..} ) <$> f taskSpecForceUpdate +{-# INLINE taskSpecForceUpdateL #-} + +-- | 'taskSpecRuntime' Lens +taskSpecRuntimeL :: Lens_' TaskSpec (Maybe Text) +taskSpecRuntimeL f TaskSpec{..} = (\taskSpecRuntime -> TaskSpec { taskSpecRuntime, ..} ) <$> f taskSpecRuntime +{-# INLINE taskSpecRuntimeL #-} + +-- | 'taskSpecNetworks' Lens +taskSpecNetworksL :: Lens_' TaskSpec (Maybe [NetworkAttachmentConfig]) +taskSpecNetworksL f TaskSpec{..} = (\taskSpecNetworks -> TaskSpec { taskSpecNetworks, ..} ) <$> f taskSpecNetworks +{-# INLINE taskSpecNetworksL #-} + +-- | 'taskSpecLogDriver' Lens +taskSpecLogDriverL :: Lens_' TaskSpec (Maybe TaskSpecLogDriver) +taskSpecLogDriverL f TaskSpec{..} = (\taskSpecLogDriver -> TaskSpec { taskSpecLogDriver, ..} ) <$> f taskSpecLogDriver +{-# INLINE taskSpecLogDriverL #-} + + + +-- * TaskSpecContainerSpec + +-- | 'taskSpecContainerSpecImage' Lens +taskSpecContainerSpecImageL :: Lens_' TaskSpecContainerSpec (Maybe Text) +taskSpecContainerSpecImageL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecImage -> TaskSpecContainerSpec { taskSpecContainerSpecImage, ..} ) <$> f taskSpecContainerSpecImage +{-# INLINE taskSpecContainerSpecImageL #-} + +-- | 'taskSpecContainerSpecLabels' Lens +taskSpecContainerSpecLabelsL :: Lens_' TaskSpecContainerSpec (Maybe (Map.Map String Text)) +taskSpecContainerSpecLabelsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecLabels -> TaskSpecContainerSpec { taskSpecContainerSpecLabels, ..} ) <$> f taskSpecContainerSpecLabels +{-# INLINE taskSpecContainerSpecLabelsL #-} + +-- | 'taskSpecContainerSpecCommand' Lens +taskSpecContainerSpecCommandL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecCommandL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecCommand -> TaskSpecContainerSpec { taskSpecContainerSpecCommand, ..} ) <$> f taskSpecContainerSpecCommand +{-# INLINE taskSpecContainerSpecCommandL #-} + +-- | 'taskSpecContainerSpecArgs' Lens +taskSpecContainerSpecArgsL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecArgsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecArgs -> TaskSpecContainerSpec { taskSpecContainerSpecArgs, ..} ) <$> f taskSpecContainerSpecArgs +{-# INLINE taskSpecContainerSpecArgsL #-} + +-- | 'taskSpecContainerSpecHostname' Lens +taskSpecContainerSpecHostnameL :: Lens_' TaskSpecContainerSpec (Maybe Text) +taskSpecContainerSpecHostnameL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecHostname -> TaskSpecContainerSpec { taskSpecContainerSpecHostname, ..} ) <$> f taskSpecContainerSpecHostname +{-# INLINE taskSpecContainerSpecHostnameL #-} + +-- | 'taskSpecContainerSpecEnv' Lens +taskSpecContainerSpecEnvL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecEnvL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecEnv -> TaskSpecContainerSpec { taskSpecContainerSpecEnv, ..} ) <$> f taskSpecContainerSpecEnv +{-# INLINE taskSpecContainerSpecEnvL #-} + +-- | 'taskSpecContainerSpecDir' Lens +taskSpecContainerSpecDirL :: Lens_' TaskSpecContainerSpec (Maybe Text) +taskSpecContainerSpecDirL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecDir -> TaskSpecContainerSpec { taskSpecContainerSpecDir, ..} ) <$> f taskSpecContainerSpecDir +{-# INLINE taskSpecContainerSpecDirL #-} + +-- | 'taskSpecContainerSpecUser' Lens +taskSpecContainerSpecUserL :: Lens_' TaskSpecContainerSpec (Maybe Text) +taskSpecContainerSpecUserL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecUser -> TaskSpecContainerSpec { taskSpecContainerSpecUser, ..} ) <$> f taskSpecContainerSpecUser +{-# INLINE taskSpecContainerSpecUserL #-} + +-- | 'taskSpecContainerSpecGroups' Lens +taskSpecContainerSpecGroupsL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecGroupsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecGroups -> TaskSpecContainerSpec { taskSpecContainerSpecGroups, ..} ) <$> f taskSpecContainerSpecGroups +{-# INLINE taskSpecContainerSpecGroupsL #-} + +-- | 'taskSpecContainerSpecPrivileges' Lens +taskSpecContainerSpecPrivilegesL :: Lens_' TaskSpecContainerSpec (Maybe TaskSpecContainerSpecPrivileges) +taskSpecContainerSpecPrivilegesL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecPrivileges -> TaskSpecContainerSpec { taskSpecContainerSpecPrivileges, ..} ) <$> f taskSpecContainerSpecPrivileges +{-# INLINE taskSpecContainerSpecPrivilegesL #-} + +-- | 'taskSpecContainerSpecTty' Lens +taskSpecContainerSpecTtyL :: Lens_' TaskSpecContainerSpec (Maybe Bool) +taskSpecContainerSpecTtyL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecTty -> TaskSpecContainerSpec { taskSpecContainerSpecTty, ..} ) <$> f taskSpecContainerSpecTty +{-# INLINE taskSpecContainerSpecTtyL #-} + +-- | 'taskSpecContainerSpecOpenStdin' Lens +taskSpecContainerSpecOpenStdinL :: Lens_' TaskSpecContainerSpec (Maybe Bool) +taskSpecContainerSpecOpenStdinL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecOpenStdin -> TaskSpecContainerSpec { taskSpecContainerSpecOpenStdin, ..} ) <$> f taskSpecContainerSpecOpenStdin +{-# INLINE taskSpecContainerSpecOpenStdinL #-} + +-- | 'taskSpecContainerSpecReadOnly' Lens +taskSpecContainerSpecReadOnlyL :: Lens_' TaskSpecContainerSpec (Maybe Bool) +taskSpecContainerSpecReadOnlyL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecReadOnly -> TaskSpecContainerSpec { taskSpecContainerSpecReadOnly, ..} ) <$> f taskSpecContainerSpecReadOnly +{-# INLINE taskSpecContainerSpecReadOnlyL #-} + +-- | 'taskSpecContainerSpecMounts' Lens +taskSpecContainerSpecMountsL :: Lens_' TaskSpecContainerSpec (Maybe [Mount]) +taskSpecContainerSpecMountsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecMounts -> TaskSpecContainerSpec { taskSpecContainerSpecMounts, ..} ) <$> f taskSpecContainerSpecMounts +{-# INLINE taskSpecContainerSpecMountsL #-} + +-- | 'taskSpecContainerSpecStopSignal' Lens +taskSpecContainerSpecStopSignalL :: Lens_' TaskSpecContainerSpec (Maybe Text) +taskSpecContainerSpecStopSignalL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecStopSignal -> TaskSpecContainerSpec { taskSpecContainerSpecStopSignal, ..} ) <$> f taskSpecContainerSpecStopSignal +{-# INLINE taskSpecContainerSpecStopSignalL #-} + +-- | 'taskSpecContainerSpecStopGracePeriod' Lens +taskSpecContainerSpecStopGracePeriodL :: Lens_' TaskSpecContainerSpec (Maybe Integer) +taskSpecContainerSpecStopGracePeriodL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecStopGracePeriod -> TaskSpecContainerSpec { taskSpecContainerSpecStopGracePeriod, ..} ) <$> f taskSpecContainerSpecStopGracePeriod +{-# INLINE taskSpecContainerSpecStopGracePeriodL #-} + +-- | 'taskSpecContainerSpecHealthCheck' Lens +taskSpecContainerSpecHealthCheckL :: Lens_' TaskSpecContainerSpec (Maybe HealthConfig) +taskSpecContainerSpecHealthCheckL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecHealthCheck -> TaskSpecContainerSpec { taskSpecContainerSpecHealthCheck, ..} ) <$> f taskSpecContainerSpecHealthCheck +{-# INLINE taskSpecContainerSpecHealthCheckL #-} + +-- | 'taskSpecContainerSpecHosts' Lens +taskSpecContainerSpecHostsL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecHostsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecHosts -> TaskSpecContainerSpec { taskSpecContainerSpecHosts, ..} ) <$> f taskSpecContainerSpecHosts +{-# INLINE taskSpecContainerSpecHostsL #-} + +-- | 'taskSpecContainerSpecDnsConfig' Lens +taskSpecContainerSpecDnsConfigL :: Lens_' TaskSpecContainerSpec (Maybe TaskSpecContainerSpecDNSConfig) +taskSpecContainerSpecDnsConfigL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecDnsConfig -> TaskSpecContainerSpec { taskSpecContainerSpecDnsConfig, ..} ) <$> f taskSpecContainerSpecDnsConfig +{-# INLINE taskSpecContainerSpecDnsConfigL #-} + +-- | 'taskSpecContainerSpecSecrets' Lens +taskSpecContainerSpecSecretsL :: Lens_' TaskSpecContainerSpec (Maybe [TaskSpecContainerSpecSecretsInner]) +taskSpecContainerSpecSecretsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecSecrets -> TaskSpecContainerSpec { taskSpecContainerSpecSecrets, ..} ) <$> f taskSpecContainerSpecSecrets +{-# INLINE taskSpecContainerSpecSecretsL #-} + +-- | 'taskSpecContainerSpecOomScoreAdj' Lens +taskSpecContainerSpecOomScoreAdjL :: Lens_' TaskSpecContainerSpec (Maybe Integer) +taskSpecContainerSpecOomScoreAdjL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecOomScoreAdj -> TaskSpecContainerSpec { taskSpecContainerSpecOomScoreAdj, ..} ) <$> f taskSpecContainerSpecOomScoreAdj +{-# INLINE taskSpecContainerSpecOomScoreAdjL #-} + +-- | 'taskSpecContainerSpecConfigs' Lens +taskSpecContainerSpecConfigsL :: Lens_' TaskSpecContainerSpec (Maybe [TaskSpecContainerSpecConfigsInner]) +taskSpecContainerSpecConfigsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecConfigs -> TaskSpecContainerSpec { taskSpecContainerSpecConfigs, ..} ) <$> f taskSpecContainerSpecConfigs +{-# INLINE taskSpecContainerSpecConfigsL #-} + +-- | 'taskSpecContainerSpecIsolation' Lens +taskSpecContainerSpecIsolationL :: Lens_' TaskSpecContainerSpec (Maybe E'Isolation3) +taskSpecContainerSpecIsolationL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecIsolation -> TaskSpecContainerSpec { taskSpecContainerSpecIsolation, ..} ) <$> f taskSpecContainerSpecIsolation +{-# INLINE taskSpecContainerSpecIsolationL #-} + +-- | 'taskSpecContainerSpecInit' Lens +taskSpecContainerSpecInitL :: Lens_' TaskSpecContainerSpec (Maybe Bool) +taskSpecContainerSpecInitL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecInit -> TaskSpecContainerSpec { taskSpecContainerSpecInit, ..} ) <$> f taskSpecContainerSpecInit +{-# INLINE taskSpecContainerSpecInitL #-} + +-- | 'taskSpecContainerSpecSysctls' Lens +taskSpecContainerSpecSysctlsL :: Lens_' TaskSpecContainerSpec (Maybe (Map.Map String Text)) +taskSpecContainerSpecSysctlsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecSysctls -> TaskSpecContainerSpec { taskSpecContainerSpecSysctls, ..} ) <$> f taskSpecContainerSpecSysctls +{-# INLINE taskSpecContainerSpecSysctlsL #-} + +-- | 'taskSpecContainerSpecCapabilityAdd' Lens +taskSpecContainerSpecCapabilityAddL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecCapabilityAddL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecCapabilityAdd -> TaskSpecContainerSpec { taskSpecContainerSpecCapabilityAdd, ..} ) <$> f taskSpecContainerSpecCapabilityAdd +{-# INLINE taskSpecContainerSpecCapabilityAddL #-} + +-- | 'taskSpecContainerSpecCapabilityDrop' Lens +taskSpecContainerSpecCapabilityDropL :: Lens_' TaskSpecContainerSpec (Maybe [Text]) +taskSpecContainerSpecCapabilityDropL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecCapabilityDrop -> TaskSpecContainerSpec { taskSpecContainerSpecCapabilityDrop, ..} ) <$> f taskSpecContainerSpecCapabilityDrop +{-# INLINE taskSpecContainerSpecCapabilityDropL #-} + +-- | 'taskSpecContainerSpecUlimits' Lens +taskSpecContainerSpecUlimitsL :: Lens_' TaskSpecContainerSpec (Maybe [ResourcesUlimitsInner]) +taskSpecContainerSpecUlimitsL f TaskSpecContainerSpec{..} = (\taskSpecContainerSpecUlimits -> TaskSpecContainerSpec { taskSpecContainerSpecUlimits, ..} ) <$> f taskSpecContainerSpecUlimits +{-# INLINE taskSpecContainerSpecUlimitsL #-} + + + +-- * TaskSpecContainerSpecConfigsInner + +-- | 'taskSpecContainerSpecConfigsInnerFile' Lens +taskSpecContainerSpecConfigsInnerFileL :: Lens_' TaskSpecContainerSpecConfigsInner (Maybe TaskSpecContainerSpecConfigsInnerFile) +taskSpecContainerSpecConfigsInnerFileL f TaskSpecContainerSpecConfigsInner{..} = (\taskSpecContainerSpecConfigsInnerFile -> TaskSpecContainerSpecConfigsInner { taskSpecContainerSpecConfigsInnerFile, ..} ) <$> f taskSpecContainerSpecConfigsInnerFile +{-# INLINE taskSpecContainerSpecConfigsInnerFileL #-} + +-- | 'taskSpecContainerSpecConfigsInnerRuntime' Lens +taskSpecContainerSpecConfigsInnerRuntimeL :: Lens_' TaskSpecContainerSpecConfigsInner (Maybe A.Value) +taskSpecContainerSpecConfigsInnerRuntimeL f TaskSpecContainerSpecConfigsInner{..} = (\taskSpecContainerSpecConfigsInnerRuntime -> TaskSpecContainerSpecConfigsInner { taskSpecContainerSpecConfigsInnerRuntime, ..} ) <$> f taskSpecContainerSpecConfigsInnerRuntime +{-# INLINE taskSpecContainerSpecConfigsInnerRuntimeL #-} + +-- | 'taskSpecContainerSpecConfigsInnerConfigId' Lens +taskSpecContainerSpecConfigsInnerConfigIdL :: Lens_' TaskSpecContainerSpecConfigsInner (Maybe Text) +taskSpecContainerSpecConfigsInnerConfigIdL f TaskSpecContainerSpecConfigsInner{..} = (\taskSpecContainerSpecConfigsInnerConfigId -> TaskSpecContainerSpecConfigsInner { taskSpecContainerSpecConfigsInnerConfigId, ..} ) <$> f taskSpecContainerSpecConfigsInnerConfigId +{-# INLINE taskSpecContainerSpecConfigsInnerConfigIdL #-} + +-- | 'taskSpecContainerSpecConfigsInnerConfigName' Lens +taskSpecContainerSpecConfigsInnerConfigNameL :: Lens_' TaskSpecContainerSpecConfigsInner (Maybe Text) +taskSpecContainerSpecConfigsInnerConfigNameL f TaskSpecContainerSpecConfigsInner{..} = (\taskSpecContainerSpecConfigsInnerConfigName -> TaskSpecContainerSpecConfigsInner { taskSpecContainerSpecConfigsInnerConfigName, ..} ) <$> f taskSpecContainerSpecConfigsInnerConfigName +{-# INLINE taskSpecContainerSpecConfigsInnerConfigNameL #-} + + + +-- * TaskSpecContainerSpecConfigsInnerFile + +-- | 'taskSpecContainerSpecConfigsInnerFileName' Lens +taskSpecContainerSpecConfigsInnerFileNameL :: Lens_' TaskSpecContainerSpecConfigsInnerFile (Maybe Text) +taskSpecContainerSpecConfigsInnerFileNameL f TaskSpecContainerSpecConfigsInnerFile{..} = (\taskSpecContainerSpecConfigsInnerFileName -> TaskSpecContainerSpecConfigsInnerFile { taskSpecContainerSpecConfigsInnerFileName, ..} ) <$> f taskSpecContainerSpecConfigsInnerFileName +{-# INLINE taskSpecContainerSpecConfigsInnerFileNameL #-} + +-- | 'taskSpecContainerSpecConfigsInnerFileUid' Lens +taskSpecContainerSpecConfigsInnerFileUidL :: Lens_' TaskSpecContainerSpecConfigsInnerFile (Maybe Text) +taskSpecContainerSpecConfigsInnerFileUidL f TaskSpecContainerSpecConfigsInnerFile{..} = (\taskSpecContainerSpecConfigsInnerFileUid -> TaskSpecContainerSpecConfigsInnerFile { taskSpecContainerSpecConfigsInnerFileUid, ..} ) <$> f taskSpecContainerSpecConfigsInnerFileUid +{-# INLINE taskSpecContainerSpecConfigsInnerFileUidL #-} + +-- | 'taskSpecContainerSpecConfigsInnerFileGid' Lens +taskSpecContainerSpecConfigsInnerFileGidL :: Lens_' TaskSpecContainerSpecConfigsInnerFile (Maybe Text) +taskSpecContainerSpecConfigsInnerFileGidL f TaskSpecContainerSpecConfigsInnerFile{..} = (\taskSpecContainerSpecConfigsInnerFileGid -> TaskSpecContainerSpecConfigsInnerFile { taskSpecContainerSpecConfigsInnerFileGid, ..} ) <$> f taskSpecContainerSpecConfigsInnerFileGid +{-# INLINE taskSpecContainerSpecConfigsInnerFileGidL #-} + +-- | 'taskSpecContainerSpecConfigsInnerFileMode' Lens +taskSpecContainerSpecConfigsInnerFileModeL :: Lens_' TaskSpecContainerSpecConfigsInnerFile (Maybe Int) +taskSpecContainerSpecConfigsInnerFileModeL f TaskSpecContainerSpecConfigsInnerFile{..} = (\taskSpecContainerSpecConfigsInnerFileMode -> TaskSpecContainerSpecConfigsInnerFile { taskSpecContainerSpecConfigsInnerFileMode, ..} ) <$> f taskSpecContainerSpecConfigsInnerFileMode +{-# INLINE taskSpecContainerSpecConfigsInnerFileModeL #-} + + + +-- * TaskSpecContainerSpecDNSConfig + +-- | 'taskSpecContainerSpecDNSConfigNameservers' Lens +taskSpecContainerSpecDNSConfigNameserversL :: Lens_' TaskSpecContainerSpecDNSConfig (Maybe [Text]) +taskSpecContainerSpecDNSConfigNameserversL f TaskSpecContainerSpecDNSConfig{..} = (\taskSpecContainerSpecDNSConfigNameservers -> TaskSpecContainerSpecDNSConfig { taskSpecContainerSpecDNSConfigNameservers, ..} ) <$> f taskSpecContainerSpecDNSConfigNameservers +{-# INLINE taskSpecContainerSpecDNSConfigNameserversL #-} + +-- | 'taskSpecContainerSpecDNSConfigSearch' Lens +taskSpecContainerSpecDNSConfigSearchL :: Lens_' TaskSpecContainerSpecDNSConfig (Maybe [Text]) +taskSpecContainerSpecDNSConfigSearchL f TaskSpecContainerSpecDNSConfig{..} = (\taskSpecContainerSpecDNSConfigSearch -> TaskSpecContainerSpecDNSConfig { taskSpecContainerSpecDNSConfigSearch, ..} ) <$> f taskSpecContainerSpecDNSConfigSearch +{-# INLINE taskSpecContainerSpecDNSConfigSearchL #-} + +-- | 'taskSpecContainerSpecDNSConfigOptions' Lens +taskSpecContainerSpecDNSConfigOptionsL :: Lens_' TaskSpecContainerSpecDNSConfig (Maybe [Text]) +taskSpecContainerSpecDNSConfigOptionsL f TaskSpecContainerSpecDNSConfig{..} = (\taskSpecContainerSpecDNSConfigOptions -> TaskSpecContainerSpecDNSConfig { taskSpecContainerSpecDNSConfigOptions, ..} ) <$> f taskSpecContainerSpecDNSConfigOptions +{-# INLINE taskSpecContainerSpecDNSConfigOptionsL #-} + + + +-- * TaskSpecContainerSpecPrivileges + +-- | 'taskSpecContainerSpecPrivilegesCredentialSpec' Lens +taskSpecContainerSpecPrivilegesCredentialSpecL :: Lens_' TaskSpecContainerSpecPrivileges (Maybe TaskSpecContainerSpecPrivilegesCredentialSpec) +taskSpecContainerSpecPrivilegesCredentialSpecL f TaskSpecContainerSpecPrivileges{..} = (\taskSpecContainerSpecPrivilegesCredentialSpec -> TaskSpecContainerSpecPrivileges { taskSpecContainerSpecPrivilegesCredentialSpec, ..} ) <$> f taskSpecContainerSpecPrivilegesCredentialSpec +{-# INLINE taskSpecContainerSpecPrivilegesCredentialSpecL #-} + +-- | 'taskSpecContainerSpecPrivilegesSeLinuxContext' Lens +taskSpecContainerSpecPrivilegesSeLinuxContextL :: Lens_' TaskSpecContainerSpecPrivileges (Maybe TaskSpecContainerSpecPrivilegesSELinuxContext) +taskSpecContainerSpecPrivilegesSeLinuxContextL f TaskSpecContainerSpecPrivileges{..} = (\taskSpecContainerSpecPrivilegesSeLinuxContext -> TaskSpecContainerSpecPrivileges { taskSpecContainerSpecPrivilegesSeLinuxContext, ..} ) <$> f taskSpecContainerSpecPrivilegesSeLinuxContext +{-# INLINE taskSpecContainerSpecPrivilegesSeLinuxContextL #-} + +-- | 'taskSpecContainerSpecPrivilegesSeccomp' Lens +taskSpecContainerSpecPrivilegesSeccompL :: Lens_' TaskSpecContainerSpecPrivileges (Maybe TaskSpecContainerSpecPrivilegesSeccomp) +taskSpecContainerSpecPrivilegesSeccompL f TaskSpecContainerSpecPrivileges{..} = (\taskSpecContainerSpecPrivilegesSeccomp -> TaskSpecContainerSpecPrivileges { taskSpecContainerSpecPrivilegesSeccomp, ..} ) <$> f taskSpecContainerSpecPrivilegesSeccomp +{-# INLINE taskSpecContainerSpecPrivilegesSeccompL #-} + +-- | 'taskSpecContainerSpecPrivilegesAppArmor' Lens +taskSpecContainerSpecPrivilegesAppArmorL :: Lens_' TaskSpecContainerSpecPrivileges (Maybe TaskSpecContainerSpecPrivilegesAppArmor) +taskSpecContainerSpecPrivilegesAppArmorL f TaskSpecContainerSpecPrivileges{..} = (\taskSpecContainerSpecPrivilegesAppArmor -> TaskSpecContainerSpecPrivileges { taskSpecContainerSpecPrivilegesAppArmor, ..} ) <$> f taskSpecContainerSpecPrivilegesAppArmor +{-# INLINE taskSpecContainerSpecPrivilegesAppArmorL #-} + +-- | 'taskSpecContainerSpecPrivilegesNoNewPrivileges' Lens +taskSpecContainerSpecPrivilegesNoNewPrivilegesL :: Lens_' TaskSpecContainerSpecPrivileges (Maybe Bool) +taskSpecContainerSpecPrivilegesNoNewPrivilegesL f TaskSpecContainerSpecPrivileges{..} = (\taskSpecContainerSpecPrivilegesNoNewPrivileges -> TaskSpecContainerSpecPrivileges { taskSpecContainerSpecPrivilegesNoNewPrivileges, ..} ) <$> f taskSpecContainerSpecPrivilegesNoNewPrivileges +{-# INLINE taskSpecContainerSpecPrivilegesNoNewPrivilegesL #-} + + + +-- * TaskSpecContainerSpecPrivilegesAppArmor + +-- | 'taskSpecContainerSpecPrivilegesAppArmorMode' Lens +taskSpecContainerSpecPrivilegesAppArmorModeL :: Lens_' TaskSpecContainerSpecPrivilegesAppArmor (Maybe E'Mode3) +taskSpecContainerSpecPrivilegesAppArmorModeL f TaskSpecContainerSpecPrivilegesAppArmor{..} = (\taskSpecContainerSpecPrivilegesAppArmorMode -> TaskSpecContainerSpecPrivilegesAppArmor { taskSpecContainerSpecPrivilegesAppArmorMode, ..} ) <$> f taskSpecContainerSpecPrivilegesAppArmorMode +{-# INLINE taskSpecContainerSpecPrivilegesAppArmorModeL #-} + + + +-- * TaskSpecContainerSpecPrivilegesCredentialSpec + +-- | 'taskSpecContainerSpecPrivilegesCredentialSpecConfig' Lens +taskSpecContainerSpecPrivilegesCredentialSpecConfigL :: Lens_' TaskSpecContainerSpecPrivilegesCredentialSpec (Maybe Text) +taskSpecContainerSpecPrivilegesCredentialSpecConfigL f TaskSpecContainerSpecPrivilegesCredentialSpec{..} = (\taskSpecContainerSpecPrivilegesCredentialSpecConfig -> TaskSpecContainerSpecPrivilegesCredentialSpec { taskSpecContainerSpecPrivilegesCredentialSpecConfig, ..} ) <$> f taskSpecContainerSpecPrivilegesCredentialSpecConfig +{-# INLINE taskSpecContainerSpecPrivilegesCredentialSpecConfigL #-} + +-- | 'taskSpecContainerSpecPrivilegesCredentialSpecFile' Lens +taskSpecContainerSpecPrivilegesCredentialSpecFileL :: Lens_' TaskSpecContainerSpecPrivilegesCredentialSpec (Maybe Text) +taskSpecContainerSpecPrivilegesCredentialSpecFileL f TaskSpecContainerSpecPrivilegesCredentialSpec{..} = (\taskSpecContainerSpecPrivilegesCredentialSpecFile -> TaskSpecContainerSpecPrivilegesCredentialSpec { taskSpecContainerSpecPrivilegesCredentialSpecFile, ..} ) <$> f taskSpecContainerSpecPrivilegesCredentialSpecFile +{-# INLINE taskSpecContainerSpecPrivilegesCredentialSpecFileL #-} + +-- | 'taskSpecContainerSpecPrivilegesCredentialSpecRegistry' Lens +taskSpecContainerSpecPrivilegesCredentialSpecRegistryL :: Lens_' TaskSpecContainerSpecPrivilegesCredentialSpec (Maybe Text) +taskSpecContainerSpecPrivilegesCredentialSpecRegistryL f TaskSpecContainerSpecPrivilegesCredentialSpec{..} = (\taskSpecContainerSpecPrivilegesCredentialSpecRegistry -> TaskSpecContainerSpecPrivilegesCredentialSpec { taskSpecContainerSpecPrivilegesCredentialSpecRegistry, ..} ) <$> f taskSpecContainerSpecPrivilegesCredentialSpecRegistry +{-# INLINE taskSpecContainerSpecPrivilegesCredentialSpecRegistryL #-} + + + +-- * TaskSpecContainerSpecPrivilegesSELinuxContext + +-- | 'taskSpecContainerSpecPrivilegesSELinuxContextDisable' Lens +taskSpecContainerSpecPrivilegesSELinuxContextDisableL :: Lens_' TaskSpecContainerSpecPrivilegesSELinuxContext (Maybe Bool) +taskSpecContainerSpecPrivilegesSELinuxContextDisableL f TaskSpecContainerSpecPrivilegesSELinuxContext{..} = (\taskSpecContainerSpecPrivilegesSELinuxContextDisable -> TaskSpecContainerSpecPrivilegesSELinuxContext { taskSpecContainerSpecPrivilegesSELinuxContextDisable, ..} ) <$> f taskSpecContainerSpecPrivilegesSELinuxContextDisable +{-# INLINE taskSpecContainerSpecPrivilegesSELinuxContextDisableL #-} + +-- | 'taskSpecContainerSpecPrivilegesSELinuxContextUser' Lens +taskSpecContainerSpecPrivilegesSELinuxContextUserL :: Lens_' TaskSpecContainerSpecPrivilegesSELinuxContext (Maybe Text) +taskSpecContainerSpecPrivilegesSELinuxContextUserL f TaskSpecContainerSpecPrivilegesSELinuxContext{..} = (\taskSpecContainerSpecPrivilegesSELinuxContextUser -> TaskSpecContainerSpecPrivilegesSELinuxContext { taskSpecContainerSpecPrivilegesSELinuxContextUser, ..} ) <$> f taskSpecContainerSpecPrivilegesSELinuxContextUser +{-# INLINE taskSpecContainerSpecPrivilegesSELinuxContextUserL #-} + +-- | 'taskSpecContainerSpecPrivilegesSELinuxContextRole' Lens +taskSpecContainerSpecPrivilegesSELinuxContextRoleL :: Lens_' TaskSpecContainerSpecPrivilegesSELinuxContext (Maybe Text) +taskSpecContainerSpecPrivilegesSELinuxContextRoleL f TaskSpecContainerSpecPrivilegesSELinuxContext{..} = (\taskSpecContainerSpecPrivilegesSELinuxContextRole -> TaskSpecContainerSpecPrivilegesSELinuxContext { taskSpecContainerSpecPrivilegesSELinuxContextRole, ..} ) <$> f taskSpecContainerSpecPrivilegesSELinuxContextRole +{-# INLINE taskSpecContainerSpecPrivilegesSELinuxContextRoleL #-} + +-- | 'taskSpecContainerSpecPrivilegesSELinuxContextType' Lens +taskSpecContainerSpecPrivilegesSELinuxContextTypeL :: Lens_' TaskSpecContainerSpecPrivilegesSELinuxContext (Maybe Text) +taskSpecContainerSpecPrivilegesSELinuxContextTypeL f TaskSpecContainerSpecPrivilegesSELinuxContext{..} = (\taskSpecContainerSpecPrivilegesSELinuxContextType -> TaskSpecContainerSpecPrivilegesSELinuxContext { taskSpecContainerSpecPrivilegesSELinuxContextType, ..} ) <$> f taskSpecContainerSpecPrivilegesSELinuxContextType +{-# INLINE taskSpecContainerSpecPrivilegesSELinuxContextTypeL #-} + +-- | 'taskSpecContainerSpecPrivilegesSELinuxContextLevel' Lens +taskSpecContainerSpecPrivilegesSELinuxContextLevelL :: Lens_' TaskSpecContainerSpecPrivilegesSELinuxContext (Maybe Text) +taskSpecContainerSpecPrivilegesSELinuxContextLevelL f TaskSpecContainerSpecPrivilegesSELinuxContext{..} = (\taskSpecContainerSpecPrivilegesSELinuxContextLevel -> TaskSpecContainerSpecPrivilegesSELinuxContext { taskSpecContainerSpecPrivilegesSELinuxContextLevel, ..} ) <$> f taskSpecContainerSpecPrivilegesSELinuxContextLevel +{-# INLINE taskSpecContainerSpecPrivilegesSELinuxContextLevelL #-} + + + +-- * TaskSpecContainerSpecPrivilegesSeccomp + +-- | 'taskSpecContainerSpecPrivilegesSeccompMode' Lens +taskSpecContainerSpecPrivilegesSeccompModeL :: Lens_' TaskSpecContainerSpecPrivilegesSeccomp (Maybe E'Mode2) +taskSpecContainerSpecPrivilegesSeccompModeL f TaskSpecContainerSpecPrivilegesSeccomp{..} = (\taskSpecContainerSpecPrivilegesSeccompMode -> TaskSpecContainerSpecPrivilegesSeccomp { taskSpecContainerSpecPrivilegesSeccompMode, ..} ) <$> f taskSpecContainerSpecPrivilegesSeccompMode +{-# INLINE taskSpecContainerSpecPrivilegesSeccompModeL #-} + +-- | 'taskSpecContainerSpecPrivilegesSeccompProfile' Lens +taskSpecContainerSpecPrivilegesSeccompProfileL :: Lens_' TaskSpecContainerSpecPrivilegesSeccomp (Maybe Text) +taskSpecContainerSpecPrivilegesSeccompProfileL f TaskSpecContainerSpecPrivilegesSeccomp{..} = (\taskSpecContainerSpecPrivilegesSeccompProfile -> TaskSpecContainerSpecPrivilegesSeccomp { taskSpecContainerSpecPrivilegesSeccompProfile, ..} ) <$> f taskSpecContainerSpecPrivilegesSeccompProfile +{-# INLINE taskSpecContainerSpecPrivilegesSeccompProfileL #-} + + + +-- * TaskSpecContainerSpecSecretsInner + +-- | 'taskSpecContainerSpecSecretsInnerFile' Lens +taskSpecContainerSpecSecretsInnerFileL :: Lens_' TaskSpecContainerSpecSecretsInner (Maybe TaskSpecContainerSpecSecretsInnerFile) +taskSpecContainerSpecSecretsInnerFileL f TaskSpecContainerSpecSecretsInner{..} = (\taskSpecContainerSpecSecretsInnerFile -> TaskSpecContainerSpecSecretsInner { taskSpecContainerSpecSecretsInnerFile, ..} ) <$> f taskSpecContainerSpecSecretsInnerFile +{-# INLINE taskSpecContainerSpecSecretsInnerFileL #-} + +-- | 'taskSpecContainerSpecSecretsInnerSecretId' Lens +taskSpecContainerSpecSecretsInnerSecretIdL :: Lens_' TaskSpecContainerSpecSecretsInner (Maybe Text) +taskSpecContainerSpecSecretsInnerSecretIdL f TaskSpecContainerSpecSecretsInner{..} = (\taskSpecContainerSpecSecretsInnerSecretId -> TaskSpecContainerSpecSecretsInner { taskSpecContainerSpecSecretsInnerSecretId, ..} ) <$> f taskSpecContainerSpecSecretsInnerSecretId +{-# INLINE taskSpecContainerSpecSecretsInnerSecretIdL #-} + +-- | 'taskSpecContainerSpecSecretsInnerSecretName' Lens +taskSpecContainerSpecSecretsInnerSecretNameL :: Lens_' TaskSpecContainerSpecSecretsInner (Maybe Text) +taskSpecContainerSpecSecretsInnerSecretNameL f TaskSpecContainerSpecSecretsInner{..} = (\taskSpecContainerSpecSecretsInnerSecretName -> TaskSpecContainerSpecSecretsInner { taskSpecContainerSpecSecretsInnerSecretName, ..} ) <$> f taskSpecContainerSpecSecretsInnerSecretName +{-# INLINE taskSpecContainerSpecSecretsInnerSecretNameL #-} + + + +-- * TaskSpecContainerSpecSecretsInnerFile + +-- | 'taskSpecContainerSpecSecretsInnerFileName' Lens +taskSpecContainerSpecSecretsInnerFileNameL :: Lens_' TaskSpecContainerSpecSecretsInnerFile (Maybe Text) +taskSpecContainerSpecSecretsInnerFileNameL f TaskSpecContainerSpecSecretsInnerFile{..} = (\taskSpecContainerSpecSecretsInnerFileName -> TaskSpecContainerSpecSecretsInnerFile { taskSpecContainerSpecSecretsInnerFileName, ..} ) <$> f taskSpecContainerSpecSecretsInnerFileName +{-# INLINE taskSpecContainerSpecSecretsInnerFileNameL #-} + +-- | 'taskSpecContainerSpecSecretsInnerFileUid' Lens +taskSpecContainerSpecSecretsInnerFileUidL :: Lens_' TaskSpecContainerSpecSecretsInnerFile (Maybe Text) +taskSpecContainerSpecSecretsInnerFileUidL f TaskSpecContainerSpecSecretsInnerFile{..} = (\taskSpecContainerSpecSecretsInnerFileUid -> TaskSpecContainerSpecSecretsInnerFile { taskSpecContainerSpecSecretsInnerFileUid, ..} ) <$> f taskSpecContainerSpecSecretsInnerFileUid +{-# INLINE taskSpecContainerSpecSecretsInnerFileUidL #-} + +-- | 'taskSpecContainerSpecSecretsInnerFileGid' Lens +taskSpecContainerSpecSecretsInnerFileGidL :: Lens_' TaskSpecContainerSpecSecretsInnerFile (Maybe Text) +taskSpecContainerSpecSecretsInnerFileGidL f TaskSpecContainerSpecSecretsInnerFile{..} = (\taskSpecContainerSpecSecretsInnerFileGid -> TaskSpecContainerSpecSecretsInnerFile { taskSpecContainerSpecSecretsInnerFileGid, ..} ) <$> f taskSpecContainerSpecSecretsInnerFileGid +{-# INLINE taskSpecContainerSpecSecretsInnerFileGidL #-} + +-- | 'taskSpecContainerSpecSecretsInnerFileMode' Lens +taskSpecContainerSpecSecretsInnerFileModeL :: Lens_' TaskSpecContainerSpecSecretsInnerFile (Maybe Int) +taskSpecContainerSpecSecretsInnerFileModeL f TaskSpecContainerSpecSecretsInnerFile{..} = (\taskSpecContainerSpecSecretsInnerFileMode -> TaskSpecContainerSpecSecretsInnerFile { taskSpecContainerSpecSecretsInnerFileMode, ..} ) <$> f taskSpecContainerSpecSecretsInnerFileMode +{-# INLINE taskSpecContainerSpecSecretsInnerFileModeL #-} + + + +-- * TaskSpecLogDriver + +-- | 'taskSpecLogDriverName' Lens +taskSpecLogDriverNameL :: Lens_' TaskSpecLogDriver (Maybe Text) +taskSpecLogDriverNameL f TaskSpecLogDriver{..} = (\taskSpecLogDriverName -> TaskSpecLogDriver { taskSpecLogDriverName, ..} ) <$> f taskSpecLogDriverName +{-# INLINE taskSpecLogDriverNameL #-} + +-- | 'taskSpecLogDriverOptions' Lens +taskSpecLogDriverOptionsL :: Lens_' TaskSpecLogDriver (Maybe (Map.Map String Text)) +taskSpecLogDriverOptionsL f TaskSpecLogDriver{..} = (\taskSpecLogDriverOptions -> TaskSpecLogDriver { taskSpecLogDriverOptions, ..} ) <$> f taskSpecLogDriverOptions +{-# INLINE taskSpecLogDriverOptionsL #-} + + + +-- * TaskSpecNetworkAttachmentSpec + +-- | 'taskSpecNetworkAttachmentSpecContainerId' Lens +taskSpecNetworkAttachmentSpecContainerIdL :: Lens_' TaskSpecNetworkAttachmentSpec (Maybe Text) +taskSpecNetworkAttachmentSpecContainerIdL f TaskSpecNetworkAttachmentSpec{..} = (\taskSpecNetworkAttachmentSpecContainerId -> TaskSpecNetworkAttachmentSpec { taskSpecNetworkAttachmentSpecContainerId, ..} ) <$> f taskSpecNetworkAttachmentSpecContainerId +{-# INLINE taskSpecNetworkAttachmentSpecContainerIdL #-} + + + +-- * TaskSpecPlacement + +-- | 'taskSpecPlacementConstraints' Lens +taskSpecPlacementConstraintsL :: Lens_' TaskSpecPlacement (Maybe [Text]) +taskSpecPlacementConstraintsL f TaskSpecPlacement{..} = (\taskSpecPlacementConstraints -> TaskSpecPlacement { taskSpecPlacementConstraints, ..} ) <$> f taskSpecPlacementConstraints +{-# INLINE taskSpecPlacementConstraintsL #-} + +-- | 'taskSpecPlacementPreferences' Lens +taskSpecPlacementPreferencesL :: Lens_' TaskSpecPlacement (Maybe [TaskSpecPlacementPreferencesInner]) +taskSpecPlacementPreferencesL f TaskSpecPlacement{..} = (\taskSpecPlacementPreferences -> TaskSpecPlacement { taskSpecPlacementPreferences, ..} ) <$> f taskSpecPlacementPreferences +{-# INLINE taskSpecPlacementPreferencesL #-} + +-- | 'taskSpecPlacementMaxReplicas' Lens +taskSpecPlacementMaxReplicasL :: Lens_' TaskSpecPlacement (Maybe Integer) +taskSpecPlacementMaxReplicasL f TaskSpecPlacement{..} = (\taskSpecPlacementMaxReplicas -> TaskSpecPlacement { taskSpecPlacementMaxReplicas, ..} ) <$> f taskSpecPlacementMaxReplicas +{-# INLINE taskSpecPlacementMaxReplicasL #-} + +-- | 'taskSpecPlacementPlatforms' Lens +taskSpecPlacementPlatformsL :: Lens_' TaskSpecPlacement (Maybe [Platform]) +taskSpecPlacementPlatformsL f TaskSpecPlacement{..} = (\taskSpecPlacementPlatforms -> TaskSpecPlacement { taskSpecPlacementPlatforms, ..} ) <$> f taskSpecPlacementPlatforms +{-# INLINE taskSpecPlacementPlatformsL #-} + + + +-- * TaskSpecPlacementPreferencesInner + +-- | 'taskSpecPlacementPreferencesInnerSpread' Lens +taskSpecPlacementPreferencesInnerSpreadL :: Lens_' TaskSpecPlacementPreferencesInner (Maybe TaskSpecPlacementPreferencesInnerSpread) +taskSpecPlacementPreferencesInnerSpreadL f TaskSpecPlacementPreferencesInner{..} = (\taskSpecPlacementPreferencesInnerSpread -> TaskSpecPlacementPreferencesInner { taskSpecPlacementPreferencesInnerSpread, ..} ) <$> f taskSpecPlacementPreferencesInnerSpread +{-# INLINE taskSpecPlacementPreferencesInnerSpreadL #-} + + + +-- * TaskSpecPlacementPreferencesInnerSpread + +-- | 'taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor' Lens +taskSpecPlacementPreferencesInnerSpreadSpreadDescriptorL :: Lens_' TaskSpecPlacementPreferencesInnerSpread (Maybe Text) +taskSpecPlacementPreferencesInnerSpreadSpreadDescriptorL f TaskSpecPlacementPreferencesInnerSpread{..} = (\taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor -> TaskSpecPlacementPreferencesInnerSpread { taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor, ..} ) <$> f taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor +{-# INLINE taskSpecPlacementPreferencesInnerSpreadSpreadDescriptorL #-} + + + +-- * TaskSpecPluginSpec + +-- | 'taskSpecPluginSpecName' Lens +taskSpecPluginSpecNameL :: Lens_' TaskSpecPluginSpec (Maybe Text) +taskSpecPluginSpecNameL f TaskSpecPluginSpec{..} = (\taskSpecPluginSpecName -> TaskSpecPluginSpec { taskSpecPluginSpecName, ..} ) <$> f taskSpecPluginSpecName +{-# INLINE taskSpecPluginSpecNameL #-} + +-- | 'taskSpecPluginSpecRemote' Lens +taskSpecPluginSpecRemoteL :: Lens_' TaskSpecPluginSpec (Maybe Text) +taskSpecPluginSpecRemoteL f TaskSpecPluginSpec{..} = (\taskSpecPluginSpecRemote -> TaskSpecPluginSpec { taskSpecPluginSpecRemote, ..} ) <$> f taskSpecPluginSpecRemote +{-# INLINE taskSpecPluginSpecRemoteL #-} + +-- | 'taskSpecPluginSpecDisabled' Lens +taskSpecPluginSpecDisabledL :: Lens_' TaskSpecPluginSpec (Maybe Bool) +taskSpecPluginSpecDisabledL f TaskSpecPluginSpec{..} = (\taskSpecPluginSpecDisabled -> TaskSpecPluginSpec { taskSpecPluginSpecDisabled, ..} ) <$> f taskSpecPluginSpecDisabled +{-# INLINE taskSpecPluginSpecDisabledL #-} + +-- | 'taskSpecPluginSpecPluginPrivilege' Lens +taskSpecPluginSpecPluginPrivilegeL :: Lens_' TaskSpecPluginSpec (Maybe [PluginPrivilege]) +taskSpecPluginSpecPluginPrivilegeL f TaskSpecPluginSpec{..} = (\taskSpecPluginSpecPluginPrivilege -> TaskSpecPluginSpec { taskSpecPluginSpecPluginPrivilege, ..} ) <$> f taskSpecPluginSpecPluginPrivilege +{-# INLINE taskSpecPluginSpecPluginPrivilegeL #-} + + + +-- * TaskSpecResources + +-- | 'taskSpecResourcesLimits' Lens +taskSpecResourcesLimitsL :: Lens_' TaskSpecResources (Maybe Limit) +taskSpecResourcesLimitsL f TaskSpecResources{..} = (\taskSpecResourcesLimits -> TaskSpecResources { taskSpecResourcesLimits, ..} ) <$> f taskSpecResourcesLimits +{-# INLINE taskSpecResourcesLimitsL #-} + +-- | 'taskSpecResourcesReservations' Lens +taskSpecResourcesReservationsL :: Lens_' TaskSpecResources (Maybe ResourceObject) +taskSpecResourcesReservationsL f TaskSpecResources{..} = (\taskSpecResourcesReservations -> TaskSpecResources { taskSpecResourcesReservations, ..} ) <$> f taskSpecResourcesReservations +{-# INLINE taskSpecResourcesReservationsL #-} + + + +-- * TaskSpecRestartPolicy + +-- | 'taskSpecRestartPolicyCondition' Lens +taskSpecRestartPolicyConditionL :: Lens_' TaskSpecRestartPolicy (Maybe E'Condition) +taskSpecRestartPolicyConditionL f TaskSpecRestartPolicy{..} = (\taskSpecRestartPolicyCondition -> TaskSpecRestartPolicy { taskSpecRestartPolicyCondition, ..} ) <$> f taskSpecRestartPolicyCondition +{-# INLINE taskSpecRestartPolicyConditionL #-} + +-- | 'taskSpecRestartPolicyDelay' Lens +taskSpecRestartPolicyDelayL :: Lens_' TaskSpecRestartPolicy (Maybe Integer) +taskSpecRestartPolicyDelayL f TaskSpecRestartPolicy{..} = (\taskSpecRestartPolicyDelay -> TaskSpecRestartPolicy { taskSpecRestartPolicyDelay, ..} ) <$> f taskSpecRestartPolicyDelay +{-# INLINE taskSpecRestartPolicyDelayL #-} + +-- | 'taskSpecRestartPolicyMaxAttempts' Lens +taskSpecRestartPolicyMaxAttemptsL :: Lens_' TaskSpecRestartPolicy (Maybe Integer) +taskSpecRestartPolicyMaxAttemptsL f TaskSpecRestartPolicy{..} = (\taskSpecRestartPolicyMaxAttempts -> TaskSpecRestartPolicy { taskSpecRestartPolicyMaxAttempts, ..} ) <$> f taskSpecRestartPolicyMaxAttempts +{-# INLINE taskSpecRestartPolicyMaxAttemptsL #-} + +-- | 'taskSpecRestartPolicyWindow' Lens +taskSpecRestartPolicyWindowL :: Lens_' TaskSpecRestartPolicy (Maybe Integer) +taskSpecRestartPolicyWindowL f TaskSpecRestartPolicy{..} = (\taskSpecRestartPolicyWindow -> TaskSpecRestartPolicy { taskSpecRestartPolicyWindow, ..} ) <$> f taskSpecRestartPolicyWindow +{-# INLINE taskSpecRestartPolicyWindowL #-} + + + +-- * TaskState + + + +-- * TaskStatus + +-- | 'taskStatusTimestamp' Lens +taskStatusTimestampL :: Lens_' TaskStatus (Maybe Text) +taskStatusTimestampL f TaskStatus{..} = (\taskStatusTimestamp -> TaskStatus { taskStatusTimestamp, ..} ) <$> f taskStatusTimestamp +{-# INLINE taskStatusTimestampL #-} + +-- | 'taskStatusState' Lens +taskStatusStateL :: Lens_' TaskStatus (Maybe TaskState) +taskStatusStateL f TaskStatus{..} = (\taskStatusState -> TaskStatus { taskStatusState, ..} ) <$> f taskStatusState +{-# INLINE taskStatusStateL #-} + +-- | 'taskStatusMessage' Lens +taskStatusMessageL :: Lens_' TaskStatus (Maybe Text) +taskStatusMessageL f TaskStatus{..} = (\taskStatusMessage -> TaskStatus { taskStatusMessage, ..} ) <$> f taskStatusMessage +{-# INLINE taskStatusMessageL #-} + +-- | 'taskStatusErr' Lens +taskStatusErrL :: Lens_' TaskStatus (Maybe Text) +taskStatusErrL f TaskStatus{..} = (\taskStatusErr -> TaskStatus { taskStatusErr, ..} ) <$> f taskStatusErr +{-# INLINE taskStatusErrL #-} + +-- | 'taskStatusContainerStatus' Lens +taskStatusContainerStatusL :: Lens_' TaskStatus (Maybe ContainerStatus) +taskStatusContainerStatusL f TaskStatus{..} = (\taskStatusContainerStatus -> TaskStatus { taskStatusContainerStatus, ..} ) <$> f taskStatusContainerStatus +{-# INLINE taskStatusContainerStatusL #-} + +-- | 'taskStatusPortStatus' Lens +taskStatusPortStatusL :: Lens_' TaskStatus (Maybe PortStatus) +taskStatusPortStatusL f TaskStatus{..} = (\taskStatusPortStatus -> TaskStatus { taskStatusPortStatus, ..} ) <$> f taskStatusPortStatus +{-# INLINE taskStatusPortStatusL #-} + + + +-- * ThrottleDevice + +-- | 'throttleDevicePath' Lens +throttleDevicePathL :: Lens_' ThrottleDevice (Maybe Text) +throttleDevicePathL f ThrottleDevice{..} = (\throttleDevicePath -> ThrottleDevice { throttleDevicePath, ..} ) <$> f throttleDevicePath +{-# INLINE throttleDevicePathL #-} + +-- | 'throttleDeviceRate' Lens +throttleDeviceRateL :: Lens_' ThrottleDevice (Maybe Integer) +throttleDeviceRateL f ThrottleDevice{..} = (\throttleDeviceRate -> ThrottleDevice { throttleDeviceRate, ..} ) <$> f throttleDeviceRate +{-# INLINE throttleDeviceRateL #-} + + + +-- * UnlockKeyResponse + +-- | 'unlockKeyResponseUnlockKey' Lens +unlockKeyResponseUnlockKeyL :: Lens_' UnlockKeyResponse (Maybe Text) +unlockKeyResponseUnlockKeyL f UnlockKeyResponse{..} = (\unlockKeyResponseUnlockKey -> UnlockKeyResponse { unlockKeyResponseUnlockKey, ..} ) <$> f unlockKeyResponseUnlockKey +{-# INLINE unlockKeyResponseUnlockKeyL #-} + + + +-- * Volume + +-- | 'volumeName' Lens +volumeNameL :: Lens_' Volume (Text) +volumeNameL f Volume{..} = (\volumeName -> Volume { volumeName, ..} ) <$> f volumeName +{-# INLINE volumeNameL #-} + +-- | 'volumeDriver' Lens +volumeDriverL :: Lens_' Volume (Text) +volumeDriverL f Volume{..} = (\volumeDriver -> Volume { volumeDriver, ..} ) <$> f volumeDriver +{-# INLINE volumeDriverL #-} + +-- | 'volumeMountpoint' Lens +volumeMountpointL :: Lens_' Volume (Text) +volumeMountpointL f Volume{..} = (\volumeMountpoint -> Volume { volumeMountpoint, ..} ) <$> f volumeMountpoint +{-# INLINE volumeMountpointL #-} + +-- | 'volumeCreatedAt' Lens +volumeCreatedAtL :: Lens_' Volume (Maybe Text) +volumeCreatedAtL f Volume{..} = (\volumeCreatedAt -> Volume { volumeCreatedAt, ..} ) <$> f volumeCreatedAt +{-# INLINE volumeCreatedAtL #-} + +-- | 'volumeStatus' Lens +volumeStatusL :: Lens_' Volume (Maybe (Map.Map String A.Value)) +volumeStatusL f Volume{..} = (\volumeStatus -> Volume { volumeStatus, ..} ) <$> f volumeStatus +{-# INLINE volumeStatusL #-} + +-- | 'volumeLabels' Lens +volumeLabelsL :: Lens_' Volume ((Map.Map String Text)) +volumeLabelsL f Volume{..} = (\volumeLabels -> Volume { volumeLabels, ..} ) <$> f volumeLabels +{-# INLINE volumeLabelsL #-} + +-- | 'volumeScope' Lens +volumeScopeL :: Lens_' Volume (E'Scope) +volumeScopeL f Volume{..} = (\volumeScope -> Volume { volumeScope, ..} ) <$> f volumeScope +{-# INLINE volumeScopeL #-} + +-- | 'volumeClusterVolume' Lens +volumeClusterVolumeL :: Lens_' Volume (Maybe ClusterVolume) +volumeClusterVolumeL f Volume{..} = (\volumeClusterVolume -> Volume { volumeClusterVolume, ..} ) <$> f volumeClusterVolume +{-# INLINE volumeClusterVolumeL #-} + +-- | 'volumeOptions' Lens +volumeOptionsL :: Lens_' Volume ((Map.Map String Text)) +volumeOptionsL f Volume{..} = (\volumeOptions -> Volume { volumeOptions, ..} ) <$> f volumeOptions +{-# INLINE volumeOptionsL #-} + +-- | 'volumeUsageData' Lens +volumeUsageDataL :: Lens_' Volume (Maybe VolumeUsageData) +volumeUsageDataL f Volume{..} = (\volumeUsageData -> Volume { volumeUsageData, ..} ) <$> f volumeUsageData +{-# INLINE volumeUsageDataL #-} + + + +-- * VolumeCreateOptions + +-- | 'volumeCreateOptionsName' Lens +volumeCreateOptionsNameL :: Lens_' VolumeCreateOptions (Maybe Text) +volumeCreateOptionsNameL f VolumeCreateOptions{..} = (\volumeCreateOptionsName -> VolumeCreateOptions { volumeCreateOptionsName, ..} ) <$> f volumeCreateOptionsName +{-# INLINE volumeCreateOptionsNameL #-} + +-- | 'volumeCreateOptionsDriver' Lens +volumeCreateOptionsDriverL :: Lens_' VolumeCreateOptions (Maybe Text) +volumeCreateOptionsDriverL f VolumeCreateOptions{..} = (\volumeCreateOptionsDriver -> VolumeCreateOptions { volumeCreateOptionsDriver, ..} ) <$> f volumeCreateOptionsDriver +{-# INLINE volumeCreateOptionsDriverL #-} + +-- | 'volumeCreateOptionsDriverOpts' Lens +volumeCreateOptionsDriverOptsL :: Lens_' VolumeCreateOptions (Maybe (Map.Map String Text)) +volumeCreateOptionsDriverOptsL f VolumeCreateOptions{..} = (\volumeCreateOptionsDriverOpts -> VolumeCreateOptions { volumeCreateOptionsDriverOpts, ..} ) <$> f volumeCreateOptionsDriverOpts +{-# INLINE volumeCreateOptionsDriverOptsL #-} + +-- | 'volumeCreateOptionsLabels' Lens +volumeCreateOptionsLabelsL :: Lens_' VolumeCreateOptions (Maybe (Map.Map String Text)) +volumeCreateOptionsLabelsL f VolumeCreateOptions{..} = (\volumeCreateOptionsLabels -> VolumeCreateOptions { volumeCreateOptionsLabels, ..} ) <$> f volumeCreateOptionsLabels +{-# INLINE volumeCreateOptionsLabelsL #-} + +-- | 'volumeCreateOptionsClusterVolumeSpec' Lens +volumeCreateOptionsClusterVolumeSpecL :: Lens_' VolumeCreateOptions (Maybe ClusterVolumeSpec) +volumeCreateOptionsClusterVolumeSpecL f VolumeCreateOptions{..} = (\volumeCreateOptionsClusterVolumeSpec -> VolumeCreateOptions { volumeCreateOptionsClusterVolumeSpec, ..} ) <$> f volumeCreateOptionsClusterVolumeSpec +{-# INLINE volumeCreateOptionsClusterVolumeSpecL #-} + + + +-- * VolumeListResponse + +-- | 'volumeListResponseVolumes' Lens +volumeListResponseVolumesL :: Lens_' VolumeListResponse (Maybe [Volume]) +volumeListResponseVolumesL f VolumeListResponse{..} = (\volumeListResponseVolumes -> VolumeListResponse { volumeListResponseVolumes, ..} ) <$> f volumeListResponseVolumes +{-# INLINE volumeListResponseVolumesL #-} + +-- | 'volumeListResponseWarnings' Lens +volumeListResponseWarningsL :: Lens_' VolumeListResponse (Maybe [Text]) +volumeListResponseWarningsL f VolumeListResponse{..} = (\volumeListResponseWarnings -> VolumeListResponse { volumeListResponseWarnings, ..} ) <$> f volumeListResponseWarnings +{-# INLINE volumeListResponseWarningsL #-} + + + +-- * VolumePruneResponse + +-- | 'volumePruneResponseVolumesDeleted' Lens +volumePruneResponseVolumesDeletedL :: Lens_' VolumePruneResponse (Maybe [Text]) +volumePruneResponseVolumesDeletedL f VolumePruneResponse{..} = (\volumePruneResponseVolumesDeleted -> VolumePruneResponse { volumePruneResponseVolumesDeleted, ..} ) <$> f volumePruneResponseVolumesDeleted +{-# INLINE volumePruneResponseVolumesDeletedL #-} + +-- | 'volumePruneResponseSpaceReclaimed' Lens +volumePruneResponseSpaceReclaimedL :: Lens_' VolumePruneResponse (Maybe Integer) +volumePruneResponseSpaceReclaimedL f VolumePruneResponse{..} = (\volumePruneResponseSpaceReclaimed -> VolumePruneResponse { volumePruneResponseSpaceReclaimed, ..} ) <$> f volumePruneResponseSpaceReclaimed +{-# INLINE volumePruneResponseSpaceReclaimedL #-} + + + +-- * VolumeUpdateRequest + +-- | 'volumeUpdateRequestSpec' Lens +volumeUpdateRequestSpecL :: Lens_' VolumeUpdateRequest (Maybe ClusterVolumeSpec) +volumeUpdateRequestSpecL f VolumeUpdateRequest{..} = (\volumeUpdateRequestSpec -> VolumeUpdateRequest { volumeUpdateRequestSpec, ..} ) <$> f volumeUpdateRequestSpec +{-# INLINE volumeUpdateRequestSpecL #-} + + + +-- * VolumeUsageData + +-- | 'volumeUsageDataSize' Lens +volumeUsageDataSizeL :: Lens_' VolumeUsageData (Integer) +volumeUsageDataSizeL f VolumeUsageData{..} = (\volumeUsageDataSize -> VolumeUsageData { volumeUsageDataSize, ..} ) <$> f volumeUsageDataSize +{-# INLINE volumeUsageDataSizeL #-} + +-- | 'volumeUsageDataRefCount' Lens +volumeUsageDataRefCountL :: Lens_' VolumeUsageData (Integer) +volumeUsageDataRefCountL f VolumeUsageData{..} = (\volumeUsageDataRefCount -> VolumeUsageData { volumeUsageDataRefCount, ..} ) <$> f volumeUsageDataRefCount +{-# INLINE volumeUsageDataRefCountL #-} + + diff --git a/v1.46/tests/ApproxEq.hs b/v1.46/tests/ApproxEq.hs new file mode 100644 index 0000000..88ca211 --- /dev/null +++ b/v1.46/tests/ApproxEq.hs @@ -0,0 +1,81 @@ +{-# LANGUAGE DefaultSignatures #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE TypeOperators #-} +{-# OPTIONS_GHC -fno-warn-orphans #-} + +module ApproxEq where + +import Data.Text (Text) +import Data.Time.Clock +import Test.QuickCheck +import GHC.Generics as G + +(==~) + :: (ApproxEq a, Show a) + => a -> a -> Property +a ==~ b = counterexample (show a ++ " !=~ " ++ show b) (a =~ b) + +class GApproxEq f where + gApproxEq :: f a -> f a -> Bool + +instance GApproxEq U1 where + gApproxEq U1 U1 = True + +instance (GApproxEq a, GApproxEq b) => + GApproxEq (a :+: b) where + gApproxEq (L1 a) (L1 b) = gApproxEq a b + gApproxEq (R1 a) (R1 b) = gApproxEq a b + gApproxEq _ _ = False + +instance (GApproxEq a, GApproxEq b) => + GApproxEq (a :*: b) where + gApproxEq (a1 :*: b1) (a2 :*: b2) = gApproxEq a1 a2 && gApproxEq b1 b2 + +instance (ApproxEq a) => + GApproxEq (K1 i a) where + gApproxEq (K1 a) (K1 b) = a =~ b + +instance (GApproxEq f) => + GApproxEq (M1 i t f) where + gApproxEq (M1 a) (M1 b) = gApproxEq a b + +class ApproxEq a where + (=~) :: a -> a -> Bool + default (=~) :: (Generic a, GApproxEq (Rep a)) => a -> a -> Bool + a =~ b = gApproxEq (G.from a) (G.from b) + +instance ApproxEq Text where + (=~) = (==) + +instance ApproxEq Char where + (=~) = (==) + +instance ApproxEq Bool where + (=~) = (==) + +instance ApproxEq Int where + (=~) = (==) + +instance ApproxEq Double where + (=~) = (==) + +instance ApproxEq a => + ApproxEq (Maybe a) + +instance ApproxEq UTCTime where + (=~) = (==) + +instance ApproxEq a => + ApproxEq [a] where + as =~ bs = and (zipWith (=~) as bs) + +instance (ApproxEq l, ApproxEq r) => + ApproxEq (Either l r) where + Left a =~ Left b = a =~ b + Right a =~ Right b = a =~ b + _ =~ _ = False + +instance (ApproxEq l, ApproxEq r) => + ApproxEq (l, r) where + (=~) (l1, r1) (l2, r2) = l1 =~ l2 && r1 =~ r2 diff --git a/v1.46/tests/Instances.hs b/v1.46/tests/Instances.hs new file mode 100644 index 0000000..abbce10 --- /dev/null +++ b/v1.46/tests/Instances.hs @@ -0,0 +1,2831 @@ +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE CPP #-} +{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-unused-matches #-} + +module Instances where + +import DockerEngine.Model +import DockerEngine.Core + +import qualified Data.Aeson as A +import qualified Data.ByteString.Lazy as BL +import qualified Data.HashMap.Strict as HM +import qualified Data.Set as Set +import qualified Data.Text as T +import qualified Data.Time as TI +import qualified Data.Vector as V +import Data.String (fromString) + +import Control.Monad +import Data.Char (isSpace) +import Data.List (sort) +import Test.QuickCheck + +import ApproxEq + +instance Arbitrary T.Text where + arbitrary = T.pack <$> arbitrary + +instance Arbitrary TI.Day where + arbitrary = TI.ModifiedJulianDay . (2000 +) <$> arbitrary + shrink = (TI.ModifiedJulianDay <$>) . shrink . TI.toModifiedJulianDay + +instance Arbitrary TI.UTCTime where + arbitrary = + TI.UTCTime <$> arbitrary <*> (TI.secondsToDiffTime <$> choose (0, 86401)) + +instance Arbitrary BL.ByteString where + arbitrary = BL.pack <$> arbitrary + shrink xs = BL.pack <$> shrink (BL.unpack xs) + +instance Arbitrary ByteArray where + arbitrary = ByteArray <$> arbitrary + shrink (ByteArray xs) = ByteArray <$> shrink xs + +instance Arbitrary Binary where + arbitrary = Binary <$> arbitrary + shrink (Binary xs) = Binary <$> shrink xs + +instance Arbitrary DateTime where + arbitrary = DateTime <$> arbitrary + shrink (DateTime xs) = DateTime <$> shrink xs + +instance Arbitrary Date where + arbitrary = Date <$> arbitrary + shrink (Date xs) = Date <$> shrink xs + +#if MIN_VERSION_aeson(2,0,0) +#else +-- | A naive Arbitrary instance for A.Value: +instance Arbitrary A.Value where + arbitrary = arbitraryValue +#endif + +arbitraryValue :: Gen A.Value +arbitraryValue = + frequency [(3, simpleTypes), (1, arrayTypes), (1, objectTypes)] + where + simpleTypes :: Gen A.Value + simpleTypes = + frequency + [ (1, return A.Null) + , (2, liftM A.Bool (arbitrary :: Gen Bool)) + , (2, liftM (A.Number . fromIntegral) (arbitrary :: Gen Int)) + , (2, liftM (A.String . T.pack) (arbitrary :: Gen String)) + ] + mapF (k, v) = (fromString k, v) + simpleAndArrays = frequency [(1, sized sizedArray), (4, simpleTypes)] + arrayTypes = sized sizedArray + objectTypes = sized sizedObject + sizedArray n = liftM (A.Array . V.fromList) $ replicateM n simpleTypes + sizedObject n = + liftM (A.object . map mapF) $ + replicateM n $ (,) <$> (arbitrary :: Gen String) <*> simpleAndArrays + +-- | Checks if a given list has no duplicates in _O(n log n)_. +hasNoDups + :: (Ord a) + => [a] -> Bool +hasNoDups = go Set.empty + where + go _ [] = True + go s (x:xs) + | s' <- Set.insert x s + , Set.size s' > Set.size s = go s' xs + | otherwise = False + +instance ApproxEq TI.Day where + (=~) = (==) + +arbitraryReduced :: Arbitrary a => Int -> Gen a +arbitraryReduced n = resize (n `div` 2) arbitrary + +arbitraryReducedMaybe :: Arbitrary a => Int -> Gen (Maybe a) +arbitraryReducedMaybe 0 = elements [Nothing] +arbitraryReducedMaybe n = arbitraryReduced n + +arbitraryReducedMaybeValue :: Int -> Gen (Maybe A.Value) +arbitraryReducedMaybeValue 0 = elements [Nothing] +arbitraryReducedMaybeValue n = do + generated <- arbitraryReduced n + if generated == Just A.Null + then return Nothing + else return generated + +-- * Models + +instance Arbitrary Address where + arbitrary = sized genAddress + +genAddress :: Int -> Gen Address +genAddress n = + Address + <$> arbitraryReducedMaybe n -- addressAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- addressPrefixLen :: Maybe Int + +instance Arbitrary AuthConfig where + arbitrary = sized genAuthConfig + +genAuthConfig :: Int -> Gen AuthConfig +genAuthConfig n = + AuthConfig + <$> arbitraryReducedMaybe n -- authConfigUsername :: Maybe Text + <*> arbitraryReducedMaybe n -- authConfigPassword :: Maybe Text + <*> arbitraryReducedMaybe n -- authConfigEmail :: Maybe Text + <*> arbitraryReducedMaybe n -- authConfigServeraddress :: Maybe Text + +instance Arbitrary BuildCache where + arbitrary = sized genBuildCache + +genBuildCache :: Int -> Gen BuildCache +genBuildCache n = + BuildCache + <$> arbitraryReducedMaybe n -- buildCacheId :: Maybe Text + <*> arbitraryReducedMaybe n -- buildCacheParent :: Maybe Text + <*> arbitraryReducedMaybe n -- buildCacheParents :: Maybe [Text] + <*> arbitraryReducedMaybe n -- buildCacheType :: Maybe E'Type3 + <*> arbitraryReducedMaybe n -- buildCacheDescription :: Maybe Text + <*> arbitraryReducedMaybe n -- buildCacheInUse :: Maybe Bool + <*> arbitraryReducedMaybe n -- buildCacheShared :: Maybe Bool + <*> arbitraryReducedMaybe n -- buildCacheSize :: Maybe Int + <*> arbitraryReducedMaybe n -- buildCacheCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- buildCacheLastUsedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- buildCacheUsageCount :: Maybe Int + +instance Arbitrary BuildInfo where + arbitrary = sized genBuildInfo + +genBuildInfo :: Int -> Gen BuildInfo +genBuildInfo n = + BuildInfo + <$> arbitraryReducedMaybe n -- buildInfoId :: Maybe Text + <*> arbitraryReducedMaybe n -- buildInfoStream :: Maybe Text + <*> arbitraryReducedMaybe n -- buildInfoError :: Maybe Text + <*> arbitraryReducedMaybe n -- buildInfoErrorDetail :: Maybe ErrorDetail + <*> arbitraryReducedMaybe n -- buildInfoStatus :: Maybe Text + <*> arbitraryReducedMaybe n -- buildInfoProgress :: Maybe Text + <*> arbitraryReducedMaybe n -- buildInfoProgressDetail :: Maybe ProgressDetail + <*> arbitraryReducedMaybe n -- buildInfoAux :: Maybe ImageID + +instance Arbitrary BuildPruneResponse where + arbitrary = sized genBuildPruneResponse + +genBuildPruneResponse :: Int -> Gen BuildPruneResponse +genBuildPruneResponse n = + BuildPruneResponse + <$> arbitraryReducedMaybe n -- buildPruneResponseCachesDeleted :: Maybe [Text] + <*> arbitraryReducedMaybe n -- buildPruneResponseSpaceReclaimed :: Maybe Integer + +instance Arbitrary ClusterInfo where + arbitrary = sized genClusterInfo + +genClusterInfo :: Int -> Gen ClusterInfo +genClusterInfo n = + ClusterInfo + <$> arbitraryReducedMaybe n -- clusterInfoId :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterInfoVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- clusterInfoCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterInfoUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterInfoSpec :: Maybe SwarmSpec + <*> arbitraryReducedMaybe n -- clusterInfoTlsInfo :: Maybe TLSInfo + <*> arbitraryReducedMaybe n -- clusterInfoRootRotationInProgress :: Maybe Bool + <*> arbitraryReducedMaybe n -- clusterInfoDataPathPort :: Maybe Int + <*> arbitraryReducedMaybe n -- clusterInfoDefaultAddrPool :: Maybe [Text] + <*> arbitraryReducedMaybe n -- clusterInfoSubnetSize :: Maybe Int + +instance Arbitrary ClusterVolume where + arbitrary = sized genClusterVolume + +genClusterVolume :: Int -> Gen ClusterVolume +genClusterVolume n = + ClusterVolume + <$> arbitraryReducedMaybe n -- clusterVolumeId :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumeVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- clusterVolumeCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumeUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumeSpec :: Maybe ClusterVolumeSpec + <*> arbitraryReducedMaybe n -- clusterVolumeInfo :: Maybe ClusterVolumeInfo + <*> arbitraryReducedMaybe n -- clusterVolumePublishStatus :: Maybe [ClusterVolumePublishStatusInner] + +instance Arbitrary ClusterVolumeInfo where + arbitrary = sized genClusterVolumeInfo + +genClusterVolumeInfo :: Int -> Gen ClusterVolumeInfo +genClusterVolumeInfo n = + ClusterVolumeInfo + <$> arbitraryReducedMaybe n -- clusterVolumeInfoCapacityBytes :: Maybe Integer + <*> arbitraryReducedMaybe n -- clusterVolumeInfoVolumeContext :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- clusterVolumeInfoVolumeId :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumeInfoAccessibleTopology :: Maybe [Map] + +instance Arbitrary ClusterVolumePublishStatusInner where + arbitrary = sized genClusterVolumePublishStatusInner + +genClusterVolumePublishStatusInner :: Int -> Gen ClusterVolumePublishStatusInner +genClusterVolumePublishStatusInner n = + ClusterVolumePublishStatusInner + <$> arbitraryReducedMaybe n -- clusterVolumePublishStatusInnerNodeId :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumePublishStatusInnerState :: Maybe E'State2 + <*> arbitraryReducedMaybe n -- clusterVolumePublishStatusInnerPublishContext :: Maybe (Map.Map String Text) + +instance Arbitrary ClusterVolumeSpec where + arbitrary = sized genClusterVolumeSpec + +genClusterVolumeSpec :: Int -> Gen ClusterVolumeSpec +genClusterVolumeSpec n = + ClusterVolumeSpec + <$> arbitraryReducedMaybe n -- clusterVolumeSpecGroup :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessMode :: Maybe ClusterVolumeSpecAccessMode + +instance Arbitrary ClusterVolumeSpecAccessMode where + arbitrary = sized genClusterVolumeSpecAccessMode + +genClusterVolumeSpecAccessMode :: Int -> Gen ClusterVolumeSpecAccessMode +genClusterVolumeSpecAccessMode n = + ClusterVolumeSpecAccessMode + <$> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeScope :: Maybe E'Scope3 + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeSharing :: Maybe E'Sharing + <*> arbitraryReducedMaybeValue n -- clusterVolumeSpecAccessModeMountVolume :: Maybe A.Value + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeSecrets :: Maybe [ClusterVolumeSpecAccessModeSecretsInner] + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeAccessibilityRequirements :: Maybe ClusterVolumeSpecAccessModeAccessibilityRequirements + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeCapacityRange :: Maybe ClusterVolumeSpecAccessModeCapacityRange + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeAvailability :: Maybe E'Availability + +instance Arbitrary ClusterVolumeSpecAccessModeAccessibilityRequirements where + arbitrary = sized genClusterVolumeSpecAccessModeAccessibilityRequirements + +genClusterVolumeSpecAccessModeAccessibilityRequirements :: Int -> Gen ClusterVolumeSpecAccessModeAccessibilityRequirements +genClusterVolumeSpecAccessModeAccessibilityRequirements n = + ClusterVolumeSpecAccessModeAccessibilityRequirements + <$> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeAccessibilityRequirementsRequisite :: Maybe [Map] + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeAccessibilityRequirementsPreferred :: Maybe [Map] + +instance Arbitrary ClusterVolumeSpecAccessModeCapacityRange where + arbitrary = sized genClusterVolumeSpecAccessModeCapacityRange + +genClusterVolumeSpecAccessModeCapacityRange :: Int -> Gen ClusterVolumeSpecAccessModeCapacityRange +genClusterVolumeSpecAccessModeCapacityRange n = + ClusterVolumeSpecAccessModeCapacityRange + <$> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeCapacityRangeRequiredBytes :: Maybe Integer + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeCapacityRangeLimitBytes :: Maybe Integer + +instance Arbitrary ClusterVolumeSpecAccessModeSecretsInner where + arbitrary = sized genClusterVolumeSpecAccessModeSecretsInner + +genClusterVolumeSpecAccessModeSecretsInner :: Int -> Gen ClusterVolumeSpecAccessModeSecretsInner +genClusterVolumeSpecAccessModeSecretsInner n = + ClusterVolumeSpecAccessModeSecretsInner + <$> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeSecretsInnerKey :: Maybe Text + <*> arbitraryReducedMaybe n -- clusterVolumeSpecAccessModeSecretsInnerSecret :: Maybe Text + +instance Arbitrary Commit where + arbitrary = sized genCommit + +genCommit :: Int -> Gen Commit +genCommit n = + Commit + <$> arbitraryReducedMaybe n -- commitId :: Maybe Text + <*> arbitraryReducedMaybe n -- commitExpected :: Maybe Text + +instance Arbitrary Config where + arbitrary = sized genConfig + +genConfig :: Int -> Gen Config +genConfig n = + Config + <$> arbitraryReducedMaybe n -- configId :: Maybe Text + <*> arbitraryReducedMaybe n -- configVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- configCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- configUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- configSpec :: Maybe ConfigSpec + +instance Arbitrary ConfigCreateRequest where + arbitrary = sized genConfigCreateRequest + +genConfigCreateRequest :: Int -> Gen ConfigCreateRequest +genConfigCreateRequest n = + ConfigCreateRequest + <$> arbitraryReducedMaybe n -- configCreateRequestName :: Maybe Text + <*> arbitraryReducedMaybe n -- configCreateRequestLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- configCreateRequestData :: Maybe Text + <*> arbitraryReducedMaybe n -- configCreateRequestTemplating :: Maybe Driver + +instance Arbitrary ConfigReference where + arbitrary = sized genConfigReference + +genConfigReference :: Int -> Gen ConfigReference +genConfigReference n = + ConfigReference + <$> arbitraryReducedMaybe n -- configReferenceNetwork :: Maybe Text + +instance Arbitrary ConfigSpec where + arbitrary = sized genConfigSpec + +genConfigSpec :: Int -> Gen ConfigSpec +genConfigSpec n = + ConfigSpec + <$> arbitraryReducedMaybe n -- configSpecName :: Maybe Text + <*> arbitraryReducedMaybe n -- configSpecLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- configSpecData :: Maybe Text + <*> arbitraryReducedMaybe n -- configSpecTemplating :: Maybe Driver + +instance Arbitrary ContainerConfig where + arbitrary = sized genContainerConfig + +genContainerConfig :: Int -> Gen ContainerConfig +genContainerConfig n = + ContainerConfig + <$> arbitraryReducedMaybe n -- containerConfigHostname :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigDomainname :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigUser :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigAttachStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigAttachStdout :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigAttachStderr :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigExposedPorts :: Maybe (Map.Map String A.Value) + <*> arbitraryReducedMaybe n -- containerConfigTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigOpenStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigStdinOnce :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigEnv :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerConfigCmd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerConfigHealthcheck :: Maybe HealthConfig + <*> arbitraryReducedMaybe n -- containerConfigArgsEscaped :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigImage :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigVolumes :: Maybe (Map.Map String A.Value) + <*> arbitraryReducedMaybe n -- containerConfigWorkingDir :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigEntrypoint :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerConfigNetworkDisabled :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerConfigMacAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigOnBuild :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerConfigLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- containerConfigStopSignal :: Maybe Text + <*> arbitraryReducedMaybe n -- containerConfigStopTimeout :: Maybe Int + <*> arbitraryReducedMaybe n -- containerConfigShell :: Maybe [Text] + +instance Arbitrary ContainerCreateRequest where + arbitrary = sized genContainerCreateRequest + +genContainerCreateRequest :: Int -> Gen ContainerCreateRequest +genContainerCreateRequest n = + ContainerCreateRequest + <$> arbitraryReducedMaybe n -- containerCreateRequestHostname :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestDomainname :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestUser :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestAttachStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestAttachStdout :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestAttachStderr :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestExposedPorts :: Maybe (Map.Map String A.Value) + <*> arbitraryReducedMaybe n -- containerCreateRequestTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestOpenStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestStdinOnce :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestEnv :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerCreateRequestCmd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerCreateRequestHealthcheck :: Maybe HealthConfig + <*> arbitraryReducedMaybe n -- containerCreateRequestArgsEscaped :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestImage :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestVolumes :: Maybe (Map.Map String A.Value) + <*> arbitraryReducedMaybe n -- containerCreateRequestWorkingDir :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestEntrypoint :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerCreateRequestNetworkDisabled :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerCreateRequestMacAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestOnBuild :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerCreateRequestLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- containerCreateRequestStopSignal :: Maybe Text + <*> arbitraryReducedMaybe n -- containerCreateRequestStopTimeout :: Maybe Int + <*> arbitraryReducedMaybe n -- containerCreateRequestShell :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerCreateRequestHostConfig :: Maybe HostConfig + <*> arbitraryReducedMaybe n -- containerCreateRequestNetworkingConfig :: Maybe NetworkingConfig + +instance Arbitrary ContainerCreateResponse where + arbitrary = sized genContainerCreateResponse + +genContainerCreateResponse :: Int -> Gen ContainerCreateResponse +genContainerCreateResponse n = + ContainerCreateResponse + <$> arbitrary -- containerCreateResponseId :: Text + <*> arbitrary -- containerCreateResponseWarnings :: [Text] + +instance Arbitrary ContainerInspectResponse where + arbitrary = sized genContainerInspectResponse + +genContainerInspectResponse :: Int -> Gen ContainerInspectResponse +genContainerInspectResponse n = + ContainerInspectResponse + <$> arbitraryReducedMaybe n -- containerInspectResponseId :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseCreated :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponsePath :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseArgs :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerInspectResponseState :: Maybe ContainerState + <*> arbitraryReducedMaybe n -- containerInspectResponseImage :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseResolvConfPath :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseHostnamePath :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseHostsPath :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseLogPath :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseName :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseRestartCount :: Maybe Int + <*> arbitraryReducedMaybe n -- containerInspectResponseDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponsePlatform :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseMountLabel :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseProcessLabel :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseAppArmorProfile :: Maybe Text + <*> arbitraryReducedMaybe n -- containerInspectResponseExecIds :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerInspectResponseHostConfig :: Maybe HostConfig + <*> arbitraryReducedMaybe n -- containerInspectResponseGraphDriver :: Maybe GraphDriverData + <*> arbitraryReducedMaybe n -- containerInspectResponseSizeRw :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerInspectResponseSizeRootFs :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerInspectResponseMounts :: Maybe [MountPoint] + <*> arbitraryReducedMaybe n -- containerInspectResponseConfig :: Maybe ContainerConfig + <*> arbitraryReducedMaybe n -- containerInspectResponseNetworkSettings :: Maybe NetworkSettings + +instance Arbitrary ContainerPruneResponse where + arbitrary = sized genContainerPruneResponse + +genContainerPruneResponse :: Int -> Gen ContainerPruneResponse +genContainerPruneResponse n = + ContainerPruneResponse + <$> arbitraryReducedMaybe n -- containerPruneResponseContainersDeleted :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerPruneResponseSpaceReclaimed :: Maybe Integer + +instance Arbitrary ContainerState where + arbitrary = sized genContainerState + +genContainerState :: Int -> Gen ContainerState +genContainerState n = + ContainerState + <$> arbitraryReducedMaybe n -- containerStateStatus :: Maybe E'Status2 + <*> arbitraryReducedMaybe n -- containerStateRunning :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerStatePaused :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerStateRestarting :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerStateOomKilled :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerStateDead :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerStatePid :: Maybe Int + <*> arbitraryReducedMaybe n -- containerStateExitCode :: Maybe Int + <*> arbitraryReducedMaybe n -- containerStateError :: Maybe Text + <*> arbitraryReducedMaybe n -- containerStateStartedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- containerStateFinishedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- containerStateHealth :: Maybe Health + +instance Arbitrary ContainerStatus where + arbitrary = sized genContainerStatus + +genContainerStatus :: Int -> Gen ContainerStatus +genContainerStatus n = + ContainerStatus + <$> arbitraryReducedMaybe n -- containerStatusContainerId :: Maybe Text + <*> arbitraryReducedMaybe n -- containerStatusPid :: Maybe Int + <*> arbitraryReducedMaybe n -- containerStatusExitCode :: Maybe Int + +instance Arbitrary ContainerSummary where + arbitrary = sized genContainerSummary + +genContainerSummary :: Int -> Gen ContainerSummary +genContainerSummary n = + ContainerSummary + <$> arbitraryReducedMaybe n -- containerSummaryId :: Maybe Text + <*> arbitraryReducedMaybe n -- containerSummaryNames :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerSummaryImage :: Maybe Text + <*> arbitraryReducedMaybe n -- containerSummaryImageId :: Maybe Text + <*> arbitraryReducedMaybe n -- containerSummaryCommand :: Maybe Text + <*> arbitraryReducedMaybe n -- containerSummaryCreated :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerSummaryPorts :: Maybe [Port] + <*> arbitraryReducedMaybe n -- containerSummarySizeRw :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerSummarySizeRootFs :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerSummaryLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- containerSummaryState :: Maybe Text + <*> arbitraryReducedMaybe n -- containerSummaryStatus :: Maybe Text + <*> arbitraryReducedMaybe n -- containerSummaryHostConfig :: Maybe ContainerSummaryHostConfig + <*> arbitraryReducedMaybe n -- containerSummaryNetworkSettings :: Maybe ContainerSummaryNetworkSettings + <*> arbitraryReducedMaybe n -- containerSummaryMounts :: Maybe [MountPoint] + +instance Arbitrary ContainerSummaryHostConfig where + arbitrary = sized genContainerSummaryHostConfig + +genContainerSummaryHostConfig :: Int -> Gen ContainerSummaryHostConfig +genContainerSummaryHostConfig n = + ContainerSummaryHostConfig + <$> arbitraryReducedMaybe n -- containerSummaryHostConfigNetworkMode :: Maybe Text + <*> arbitraryReducedMaybe n -- containerSummaryHostConfigAnnotations :: Maybe (Map.Map String Text) + +instance Arbitrary ContainerSummaryNetworkSettings where + arbitrary = sized genContainerSummaryNetworkSettings + +genContainerSummaryNetworkSettings :: Int -> Gen ContainerSummaryNetworkSettings +genContainerSummaryNetworkSettings n = + ContainerSummaryNetworkSettings + <$> arbitraryReducedMaybe n -- containerSummaryNetworkSettingsNetworks :: Maybe (Map.Map String EndpointSettings) + +instance Arbitrary ContainerTopResponse where + arbitrary = sized genContainerTopResponse + +genContainerTopResponse :: Int -> Gen ContainerTopResponse +genContainerTopResponse n = + ContainerTopResponse + <$> arbitraryReducedMaybe n -- containerTopResponseTitles :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerTopResponseProcesses :: Maybe [[Text]] + +instance Arbitrary ContainerUpdateRequest where + arbitrary = sized genContainerUpdateRequest + +genContainerUpdateRequest :: Int -> Gen ContainerUpdateRequest +genContainerUpdateRequest n = + ContainerUpdateRequest + <$> arbitraryReducedMaybe n -- containerUpdateRequestCpuShares :: Maybe Int + <*> arbitraryReducedMaybe n -- containerUpdateRequestMemory :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestCgroupParent :: Maybe Text + <*> arbitraryReducedMaybe n -- containerUpdateRequestBlkioWeight :: Maybe Int + <*> arbitraryReducedMaybe n -- containerUpdateRequestBlkioWeightDevice :: Maybe [ResourcesBlkioWeightDeviceInner] + <*> arbitraryReducedMaybe n -- containerUpdateRequestBlkioDeviceReadBps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- containerUpdateRequestBlkioDeviceWriteBps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- containerUpdateRequestBlkioDeviceReadIOps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- containerUpdateRequestBlkioDeviceWriteIOps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpuPeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpuQuota :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpuRealtimePeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpuRealtimeRuntime :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpusetCpus :: Maybe Text + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpusetMems :: Maybe Text + <*> arbitraryReducedMaybe n -- containerUpdateRequestDevices :: Maybe [DeviceMapping] + <*> arbitraryReducedMaybe n -- containerUpdateRequestDeviceCgroupRules :: Maybe [Text] + <*> arbitraryReducedMaybe n -- containerUpdateRequestDeviceRequests :: Maybe [DeviceRequest] + <*> arbitraryReducedMaybe n -- containerUpdateRequestKernelMemoryTcp :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestMemoryReservation :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestMemorySwap :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestMemorySwappiness :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestNanoCpus :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestOomKillDisable :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerUpdateRequestInit :: Maybe Bool + <*> arbitraryReducedMaybe n -- containerUpdateRequestPidsLimit :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestUlimits :: Maybe [ResourcesUlimitsInner] + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpuCount :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestCpuPercent :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestIoMaximumIOps :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestIoMaximumBandwidth :: Maybe Integer + <*> arbitraryReducedMaybe n -- containerUpdateRequestRestartPolicy :: Maybe RestartPolicy + +instance Arbitrary ContainerUpdateResponse where + arbitrary = sized genContainerUpdateResponse + +genContainerUpdateResponse :: Int -> Gen ContainerUpdateResponse +genContainerUpdateResponse n = + ContainerUpdateResponse + <$> arbitraryReducedMaybe n -- containerUpdateResponseWarnings :: Maybe [Text] + +instance Arbitrary ContainerWaitExitError where + arbitrary = sized genContainerWaitExitError + +genContainerWaitExitError :: Int -> Gen ContainerWaitExitError +genContainerWaitExitError n = + ContainerWaitExitError + <$> arbitraryReducedMaybe n -- containerWaitExitErrorMessage :: Maybe Text + +instance Arbitrary ContainerWaitResponse where + arbitrary = sized genContainerWaitResponse + +genContainerWaitResponse :: Int -> Gen ContainerWaitResponse +genContainerWaitResponse n = + ContainerWaitResponse + <$> arbitrary -- containerWaitResponseStatusCode :: Integer + <*> arbitraryReducedMaybe n -- containerWaitResponseError :: Maybe ContainerWaitExitError + +instance Arbitrary ContainerdInfo where + arbitrary = sized genContainerdInfo + +genContainerdInfo :: Int -> Gen ContainerdInfo +genContainerdInfo n = + ContainerdInfo + <$> arbitraryReducedMaybe n -- containerdInfoAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- containerdInfoNamespaces :: Maybe ContainerdInfoNamespaces + +instance Arbitrary ContainerdInfoNamespaces where + arbitrary = sized genContainerdInfoNamespaces + +genContainerdInfoNamespaces :: Int -> Gen ContainerdInfoNamespaces +genContainerdInfoNamespaces n = + ContainerdInfoNamespaces + <$> arbitraryReducedMaybe n -- containerdInfoNamespacesContainers :: Maybe Text + <*> arbitraryReducedMaybe n -- containerdInfoNamespacesPlugins :: Maybe Text + +instance Arbitrary CreateImageInfo where + arbitrary = sized genCreateImageInfo + +genCreateImageInfo :: Int -> Gen CreateImageInfo +genCreateImageInfo n = + CreateImageInfo + <$> arbitraryReducedMaybe n -- createImageInfoId :: Maybe Text + <*> arbitraryReducedMaybe n -- createImageInfoError :: Maybe Text + <*> arbitraryReducedMaybe n -- createImageInfoErrorDetail :: Maybe ErrorDetail + <*> arbitraryReducedMaybe n -- createImageInfoStatus :: Maybe Text + <*> arbitraryReducedMaybe n -- createImageInfoProgress :: Maybe Text + <*> arbitraryReducedMaybe n -- createImageInfoProgressDetail :: Maybe ProgressDetail + +instance Arbitrary DeviceMapping where + arbitrary = sized genDeviceMapping + +genDeviceMapping :: Int -> Gen DeviceMapping +genDeviceMapping n = + DeviceMapping + <$> arbitraryReducedMaybe n -- deviceMappingPathOnHost :: Maybe Text + <*> arbitraryReducedMaybe n -- deviceMappingPathInContainer :: Maybe Text + <*> arbitraryReducedMaybe n -- deviceMappingCgroupPermissions :: Maybe Text + +instance Arbitrary DeviceRequest where + arbitrary = sized genDeviceRequest + +genDeviceRequest :: Int -> Gen DeviceRequest +genDeviceRequest n = + DeviceRequest + <$> arbitraryReducedMaybe n -- deviceRequestDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- deviceRequestCount :: Maybe Int + <*> arbitraryReducedMaybe n -- deviceRequestDeviceIds :: Maybe [Text] + <*> arbitraryReducedMaybe n -- deviceRequestCapabilities :: Maybe [[Text]] + <*> arbitraryReducedMaybe n -- deviceRequestOptions :: Maybe (Map.Map String Text) + +instance Arbitrary DistributionInspect where + arbitrary = sized genDistributionInspect + +genDistributionInspect :: Int -> Gen DistributionInspect +genDistributionInspect n = + DistributionInspect + <$> arbitraryReduced n -- distributionInspectDescriptor :: OCIDescriptor + <*> arbitraryReduced n -- distributionInspectPlatforms :: [OCIPlatform] + +instance Arbitrary Driver where + arbitrary = sized genDriver + +genDriver :: Int -> Gen Driver +genDriver n = + Driver + <$> arbitrary -- driverName :: Text + <*> arbitraryReducedMaybe n -- driverOptions :: Maybe (Map.Map String Text) + +instance Arbitrary EndpointIPAMConfig where + arbitrary = sized genEndpointIPAMConfig + +genEndpointIPAMConfig :: Int -> Gen EndpointIPAMConfig +genEndpointIPAMConfig n = + EndpointIPAMConfig + <$> arbitraryReducedMaybe n -- endpointIPAMConfigIpv4Address :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointIPAMConfigIpv6Address :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointIPAMConfigLinkLocalIps :: Maybe [Text] + +instance Arbitrary EndpointPortConfig where + arbitrary = sized genEndpointPortConfig + +genEndpointPortConfig :: Int -> Gen EndpointPortConfig +genEndpointPortConfig n = + EndpointPortConfig + <$> arbitraryReducedMaybe n -- endpointPortConfigName :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointPortConfigProtocol :: Maybe E'Type + <*> arbitraryReducedMaybe n -- endpointPortConfigTargetPort :: Maybe Int + <*> arbitraryReducedMaybe n -- endpointPortConfigPublishedPort :: Maybe Int + <*> arbitraryReducedMaybe n -- endpointPortConfigPublishMode :: Maybe E'PublishMode + +instance Arbitrary EndpointSettings where + arbitrary = sized genEndpointSettings + +genEndpointSettings :: Int -> Gen EndpointSettings +genEndpointSettings n = + EndpointSettings + <$> arbitraryReducedMaybe n -- endpointSettingsIpamConfig :: Maybe EndpointIPAMConfig + <*> arbitraryReducedMaybe n -- endpointSettingsLinks :: Maybe [Text] + <*> arbitraryReducedMaybe n -- endpointSettingsMacAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsAliases :: Maybe [Text] + <*> arbitraryReducedMaybe n -- endpointSettingsDriverOpts :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- endpointSettingsNetworkId :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsEndpointId :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsGateway :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsIpAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsIpPrefixLen :: Maybe Int + <*> arbitraryReducedMaybe n -- endpointSettingsIpv6Gateway :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsGlobalIpv6Address :: Maybe Text + <*> arbitraryReducedMaybe n -- endpointSettingsGlobalIpv6PrefixLen :: Maybe Integer + <*> arbitraryReducedMaybe n -- endpointSettingsDnsNames :: Maybe [Text] + +instance Arbitrary EndpointSpec where + arbitrary = sized genEndpointSpec + +genEndpointSpec :: Int -> Gen EndpointSpec +genEndpointSpec n = + EndpointSpec + <$> arbitraryReducedMaybe n -- endpointSpecMode :: Maybe E'Mode + <*> arbitraryReducedMaybe n -- endpointSpecPorts :: Maybe [EndpointPortConfig] + +instance Arbitrary EngineDescription where + arbitrary = sized genEngineDescription + +genEngineDescription :: Int -> Gen EngineDescription +genEngineDescription n = + EngineDescription + <$> arbitraryReducedMaybe n -- engineDescriptionEngineVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- engineDescriptionLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- engineDescriptionPlugins :: Maybe [EngineDescriptionPluginsInner] + +instance Arbitrary EngineDescriptionPluginsInner where + arbitrary = sized genEngineDescriptionPluginsInner + +genEngineDescriptionPluginsInner :: Int -> Gen EngineDescriptionPluginsInner +genEngineDescriptionPluginsInner n = + EngineDescriptionPluginsInner + <$> arbitraryReducedMaybe n -- engineDescriptionPluginsInnerType :: Maybe Text + <*> arbitraryReducedMaybe n -- engineDescriptionPluginsInnerName :: Maybe Text + +instance Arbitrary ErrorDetail where + arbitrary = sized genErrorDetail + +genErrorDetail :: Int -> Gen ErrorDetail +genErrorDetail n = + ErrorDetail + <$> arbitraryReducedMaybe n -- errorDetailCode :: Maybe Int + <*> arbitraryReducedMaybe n -- errorDetailMessage :: Maybe Text + +instance Arbitrary ErrorResponse where + arbitrary = sized genErrorResponse + +genErrorResponse :: Int -> Gen ErrorResponse +genErrorResponse n = + ErrorResponse + <$> arbitrary -- errorResponseMessage :: Text + +instance Arbitrary EventActor where + arbitrary = sized genEventActor + +genEventActor :: Int -> Gen EventActor +genEventActor n = + EventActor + <$> arbitraryReducedMaybe n -- eventActorId :: Maybe Text + <*> arbitraryReducedMaybe n -- eventActorAttributes :: Maybe (Map.Map String Text) + +instance Arbitrary EventMessage where + arbitrary = sized genEventMessage + +genEventMessage :: Int -> Gen EventMessage +genEventMessage n = + EventMessage + <$> arbitraryReducedMaybe n -- eventMessageType :: Maybe E'Type4 + <*> arbitraryReducedMaybe n -- eventMessageAction :: Maybe Text + <*> arbitraryReducedMaybe n -- eventMessageActor :: Maybe EventActor + <*> arbitraryReducedMaybe n -- eventMessageScope :: Maybe E'Scope2 + <*> arbitraryReducedMaybe n -- eventMessageTime :: Maybe Integer + <*> arbitraryReducedMaybe n -- eventMessageTimeNano :: Maybe Integer + +instance Arbitrary ExecConfig where + arbitrary = sized genExecConfig + +genExecConfig :: Int -> Gen ExecConfig +genExecConfig n = + ExecConfig + <$> arbitraryReducedMaybe n -- execConfigAttachStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- execConfigAttachStdout :: Maybe Bool + <*> arbitraryReducedMaybe n -- execConfigAttachStderr :: Maybe Bool + <*> arbitraryReducedMaybe n -- execConfigConsoleSize :: Maybe [Int] + <*> arbitraryReducedMaybe n -- execConfigDetachKeys :: Maybe Text + <*> arbitraryReducedMaybe n -- execConfigTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- execConfigEnv :: Maybe [Text] + <*> arbitraryReducedMaybe n -- execConfigCmd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- execConfigPrivileged :: Maybe Bool + <*> arbitraryReducedMaybe n -- execConfigUser :: Maybe Text + <*> arbitraryReducedMaybe n -- execConfigWorkingDir :: Maybe Text + +instance Arbitrary ExecInspectResponse where + arbitrary = sized genExecInspectResponse + +genExecInspectResponse :: Int -> Gen ExecInspectResponse +genExecInspectResponse n = + ExecInspectResponse + <$> arbitraryReducedMaybe n -- execInspectResponseCanRemove :: Maybe Bool + <*> arbitraryReducedMaybe n -- execInspectResponseDetachKeys :: Maybe Text + <*> arbitraryReducedMaybe n -- execInspectResponseId :: Maybe Text + <*> arbitraryReducedMaybe n -- execInspectResponseRunning :: Maybe Bool + <*> arbitraryReducedMaybe n -- execInspectResponseExitCode :: Maybe Int + <*> arbitraryReducedMaybe n -- execInspectResponseProcessConfig :: Maybe ProcessConfig + <*> arbitraryReducedMaybe n -- execInspectResponseOpenStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- execInspectResponseOpenStderr :: Maybe Bool + <*> arbitraryReducedMaybe n -- execInspectResponseOpenStdout :: Maybe Bool + <*> arbitraryReducedMaybe n -- execInspectResponseContainerId :: Maybe Text + <*> arbitraryReducedMaybe n -- execInspectResponsePid :: Maybe Int + +instance Arbitrary ExecStartConfig where + arbitrary = sized genExecStartConfig + +genExecStartConfig :: Int -> Gen ExecStartConfig +genExecStartConfig n = + ExecStartConfig + <$> arbitraryReducedMaybe n -- execStartConfigDetach :: Maybe Bool + <*> arbitraryReducedMaybe n -- execStartConfigTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- execStartConfigConsoleSize :: Maybe [Int] + +instance Arbitrary FilesystemChange where + arbitrary = sized genFilesystemChange + +genFilesystemChange :: Int -> Gen FilesystemChange +genFilesystemChange n = + FilesystemChange + <$> arbitrary -- filesystemChangePath :: Text + <*> arbitraryReduced n -- filesystemChangeKind :: ChangeType + +instance Arbitrary GenericResourcesInner where + arbitrary = sized genGenericResourcesInner + +genGenericResourcesInner :: Int -> Gen GenericResourcesInner +genGenericResourcesInner n = + GenericResourcesInner + <$> arbitraryReducedMaybe n -- genericResourcesInnerNamedResourceSpec :: Maybe GenericResourcesInnerNamedResourceSpec + <*> arbitraryReducedMaybe n -- genericResourcesInnerDiscreteResourceSpec :: Maybe GenericResourcesInnerDiscreteResourceSpec + +instance Arbitrary GenericResourcesInnerDiscreteResourceSpec where + arbitrary = sized genGenericResourcesInnerDiscreteResourceSpec + +genGenericResourcesInnerDiscreteResourceSpec :: Int -> Gen GenericResourcesInnerDiscreteResourceSpec +genGenericResourcesInnerDiscreteResourceSpec n = + GenericResourcesInnerDiscreteResourceSpec + <$> arbitraryReducedMaybe n -- genericResourcesInnerDiscreteResourceSpecKind :: Maybe Text + <*> arbitraryReducedMaybe n -- genericResourcesInnerDiscreteResourceSpecValue :: Maybe Integer + +instance Arbitrary GenericResourcesInnerNamedResourceSpec where + arbitrary = sized genGenericResourcesInnerNamedResourceSpec + +genGenericResourcesInnerNamedResourceSpec :: Int -> Gen GenericResourcesInnerNamedResourceSpec +genGenericResourcesInnerNamedResourceSpec n = + GenericResourcesInnerNamedResourceSpec + <$> arbitraryReducedMaybe n -- genericResourcesInnerNamedResourceSpecKind :: Maybe Text + <*> arbitraryReducedMaybe n -- genericResourcesInnerNamedResourceSpecValue :: Maybe Text + +instance Arbitrary GraphDriverData where + arbitrary = sized genGraphDriverData + +genGraphDriverData :: Int -> Gen GraphDriverData +genGraphDriverData n = + GraphDriverData + <$> arbitrary -- graphDriverDataName :: Text + <*> arbitrary -- graphDriverDataData :: (Map.Map String Text) + +instance Arbitrary Health where + arbitrary = sized genHealth + +genHealth :: Int -> Gen Health +genHealth n = + Health + <$> arbitraryReducedMaybe n -- healthStatus :: Maybe E'Status + <*> arbitraryReducedMaybe n -- healthFailingStreak :: Maybe Int + <*> arbitraryReducedMaybe n -- healthLog :: Maybe [HealthcheckResult] + +instance Arbitrary HealthConfig where + arbitrary = sized genHealthConfig + +genHealthConfig :: Int -> Gen HealthConfig +genHealthConfig n = + HealthConfig + <$> arbitraryReducedMaybe n -- healthConfigTest :: Maybe [Text] + <*> arbitraryReducedMaybe n -- healthConfigInterval :: Maybe Integer + <*> arbitraryReducedMaybe n -- healthConfigTimeout :: Maybe Integer + <*> arbitraryReducedMaybe n -- healthConfigRetries :: Maybe Int + <*> arbitraryReducedMaybe n -- healthConfigStartPeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- healthConfigStartInterval :: Maybe Integer + +instance Arbitrary HealthcheckResult where + arbitrary = sized genHealthcheckResult + +genHealthcheckResult :: Int -> Gen HealthcheckResult +genHealthcheckResult n = + HealthcheckResult + <$> arbitraryReducedMaybe n -- healthcheckResultStart :: Maybe DateTime + <*> arbitraryReducedMaybe n -- healthcheckResultEnd :: Maybe Text + <*> arbitraryReducedMaybe n -- healthcheckResultExitCode :: Maybe Int + <*> arbitraryReducedMaybe n -- healthcheckResultOutput :: Maybe Text + +instance Arbitrary HistoryResponseItem where + arbitrary = sized genHistoryResponseItem + +genHistoryResponseItem :: Int -> Gen HistoryResponseItem +genHistoryResponseItem n = + HistoryResponseItem + <$> arbitrary -- historyResponseItemId :: Text + <*> arbitrary -- historyResponseItemCreated :: Integer + <*> arbitrary -- historyResponseItemCreatedBy :: Text + <*> arbitrary -- historyResponseItemTags :: [Text] + <*> arbitrary -- historyResponseItemSize :: Integer + <*> arbitrary -- historyResponseItemComment :: Text + +instance Arbitrary HostConfig where + arbitrary = sized genHostConfig + +genHostConfig :: Int -> Gen HostConfig +genHostConfig n = + HostConfig + <$> arbitraryReducedMaybe n -- hostConfigCpuShares :: Maybe Int + <*> arbitraryReducedMaybe n -- hostConfigMemory :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigCgroupParent :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigBlkioWeight :: Maybe Int + <*> arbitraryReducedMaybe n -- hostConfigBlkioWeightDevice :: Maybe [ResourcesBlkioWeightDeviceInner] + <*> arbitraryReducedMaybe n -- hostConfigBlkioDeviceReadBps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- hostConfigBlkioDeviceWriteBps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- hostConfigBlkioDeviceReadIOps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- hostConfigBlkioDeviceWriteIOps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- hostConfigCpuPeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigCpuQuota :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigCpuRealtimePeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigCpuRealtimeRuntime :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigCpusetCpus :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigCpusetMems :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigDevices :: Maybe [DeviceMapping] + <*> arbitraryReducedMaybe n -- hostConfigDeviceCgroupRules :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigDeviceRequests :: Maybe [DeviceRequest] + <*> arbitraryReducedMaybe n -- hostConfigKernelMemoryTcp :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigMemoryReservation :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigMemorySwap :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigMemorySwappiness :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigNanoCpus :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigOomKillDisable :: Maybe Bool + <*> arbitraryReducedMaybe n -- hostConfigInit :: Maybe Bool + <*> arbitraryReducedMaybe n -- hostConfigPidsLimit :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigUlimits :: Maybe [ResourcesUlimitsInner] + <*> arbitraryReducedMaybe n -- hostConfigCpuCount :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigCpuPercent :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigIoMaximumIOps :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigIoMaximumBandwidth :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigBinds :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigContainerIdFile :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigLogConfig :: Maybe HostConfigAllOfLogConfig + <*> arbitraryReducedMaybe n -- hostConfigNetworkMode :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigPortBindings :: Maybe (Map.Map String [PortBinding]) + <*> arbitraryReducedMaybe n -- hostConfigRestartPolicy :: Maybe RestartPolicy + <*> arbitraryReducedMaybe n -- hostConfigAutoRemove :: Maybe Bool + <*> arbitraryReducedMaybe n -- hostConfigVolumeDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigVolumesFrom :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigMounts :: Maybe [Mount] + <*> arbitraryReducedMaybe n -- hostConfigConsoleSize :: Maybe [Int] + <*> arbitraryReducedMaybe n -- hostConfigAnnotations :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- hostConfigCapAdd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigCapDrop :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigCgroupnsMode :: Maybe E'CgroupnsMode + <*> arbitraryReducedMaybe n -- hostConfigDns :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigDnsOptions :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigDnsSearch :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigExtraHosts :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigGroupAdd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigIpcMode :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigCgroup :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigLinks :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigOomScoreAdj :: Maybe Int + <*> arbitraryReducedMaybe n -- hostConfigPidMode :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigPrivileged :: Maybe Bool + <*> arbitraryReducedMaybe n -- hostConfigPublishAllPorts :: Maybe Bool + <*> arbitraryReducedMaybe n -- hostConfigReadonlyRootfs :: Maybe Bool + <*> arbitraryReducedMaybe n -- hostConfigSecurityOpt :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigStorageOpt :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- hostConfigTmpfs :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- hostConfigUtsMode :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigUsernsMode :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigShmSize :: Maybe Integer + <*> arbitraryReducedMaybe n -- hostConfigSysctls :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- hostConfigRuntime :: Maybe Text + <*> arbitraryReducedMaybe n -- hostConfigIsolation :: Maybe E'Isolation + <*> arbitraryReducedMaybe n -- hostConfigMaskedPaths :: Maybe [Text] + <*> arbitraryReducedMaybe n -- hostConfigReadonlyPaths :: Maybe [Text] + +instance Arbitrary HostConfigAllOfLogConfig where + arbitrary = sized genHostConfigAllOfLogConfig + +genHostConfigAllOfLogConfig :: Int -> Gen HostConfigAllOfLogConfig +genHostConfigAllOfLogConfig n = + HostConfigAllOfLogConfig + <$> arbitraryReducedMaybe n -- hostConfigAllOfLogConfigType :: Maybe E'Type5 + <*> arbitraryReducedMaybe n -- hostConfigAllOfLogConfigConfig :: Maybe (Map.Map String Text) + +instance Arbitrary IPAM where + arbitrary = sized genIPAM + +genIPAM :: Int -> Gen IPAM +genIPAM n = + IPAM + <$> arbitraryReducedMaybe n -- iPAMDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- iPAMConfig :: Maybe [IPAMConfig] + <*> arbitraryReducedMaybe n -- iPAMOptions :: Maybe (Map.Map String Text) + +instance Arbitrary IPAMConfig where + arbitrary = sized genIPAMConfig + +genIPAMConfig :: Int -> Gen IPAMConfig +genIPAMConfig n = + IPAMConfig + <$> arbitraryReducedMaybe n -- iPAMConfigSubnet :: Maybe Text + <*> arbitraryReducedMaybe n -- iPAMConfigIpRange :: Maybe Text + <*> arbitraryReducedMaybe n -- iPAMConfigGateway :: Maybe Text + <*> arbitraryReducedMaybe n -- iPAMConfigAuxiliaryAddresses :: Maybe (Map.Map String Text) + +instance Arbitrary IdResponse where + arbitrary = sized genIdResponse + +genIdResponse :: Int -> Gen IdResponse +genIdResponse n = + IdResponse + <$> arbitrary -- idResponseId :: Text + +instance Arbitrary ImageConfig where + arbitrary = sized genImageConfig + +genImageConfig :: Int -> Gen ImageConfig +genImageConfig n = + ImageConfig + <$> arbitraryReducedMaybe n -- imageConfigHostname :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigDomainname :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigUser :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigAttachStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigAttachStdout :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigAttachStderr :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigExposedPorts :: Maybe (Map.Map String A.Value) + <*> arbitraryReducedMaybe n -- imageConfigTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigOpenStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigStdinOnce :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigEnv :: Maybe [Text] + <*> arbitraryReducedMaybe n -- imageConfigCmd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- imageConfigHealthcheck :: Maybe HealthConfig + <*> arbitraryReducedMaybe n -- imageConfigArgsEscaped :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigImage :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigVolumes :: Maybe (Map.Map String A.Value) + <*> arbitraryReducedMaybe n -- imageConfigWorkingDir :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigEntrypoint :: Maybe [Text] + <*> arbitraryReducedMaybe n -- imageConfigNetworkDisabled :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageConfigMacAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigOnBuild :: Maybe [Text] + <*> arbitraryReducedMaybe n -- imageConfigLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- imageConfigStopSignal :: Maybe Text + <*> arbitraryReducedMaybe n -- imageConfigStopTimeout :: Maybe Int + <*> arbitraryReducedMaybe n -- imageConfigShell :: Maybe [Text] + +instance Arbitrary ImageDeleteResponseItem where + arbitrary = sized genImageDeleteResponseItem + +genImageDeleteResponseItem :: Int -> Gen ImageDeleteResponseItem +genImageDeleteResponseItem n = + ImageDeleteResponseItem + <$> arbitraryReducedMaybe n -- imageDeleteResponseItemUntagged :: Maybe Text + <*> arbitraryReducedMaybe n -- imageDeleteResponseItemDeleted :: Maybe Text + +instance Arbitrary ImageID where + arbitrary = sized genImageID + +genImageID :: Int -> Gen ImageID +genImageID n = + ImageID + <$> arbitraryReducedMaybe n -- imageIDId :: Maybe Text + +instance Arbitrary ImageInspect where + arbitrary = sized genImageInspect + +genImageInspect :: Int -> Gen ImageInspect +genImageInspect n = + ImageInspect + <$> arbitraryReducedMaybe n -- imageInspectId :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectRepoTags :: Maybe [Text] + <*> arbitraryReducedMaybe n -- imageInspectRepoDigests :: Maybe [Text] + <*> arbitraryReducedMaybe n -- imageInspectParent :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectComment :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectCreated :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectDockerVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectAuthor :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectConfig :: Maybe ImageConfig + <*> arbitraryReducedMaybe n -- imageInspectArchitecture :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectVariant :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectOs :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectOsVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- imageInspectSize :: Maybe Integer + <*> arbitraryReducedMaybe n -- imageInspectVirtualSize :: Maybe Integer + <*> arbitraryReducedMaybe n -- imageInspectGraphDriver :: Maybe GraphDriverData + <*> arbitraryReducedMaybe n -- imageInspectRootFs :: Maybe ImageInspectRootFS + <*> arbitraryReducedMaybe n -- imageInspectMetadata :: Maybe ImageInspectMetadata + +instance Arbitrary ImageInspectMetadata where + arbitrary = sized genImageInspectMetadata + +genImageInspectMetadata :: Int -> Gen ImageInspectMetadata +genImageInspectMetadata n = + ImageInspectMetadata + <$> arbitraryReducedMaybe n -- imageInspectMetadataLastTagTime :: Maybe Text + +instance Arbitrary ImageInspectRootFS where + arbitrary = sized genImageInspectRootFS + +genImageInspectRootFS :: Int -> Gen ImageInspectRootFS +genImageInspectRootFS n = + ImageInspectRootFS + <$> arbitrary -- imageInspectRootFSType :: Text + <*> arbitraryReducedMaybe n -- imageInspectRootFSLayers :: Maybe [Text] + +instance Arbitrary ImagePruneResponse where + arbitrary = sized genImagePruneResponse + +genImagePruneResponse :: Int -> Gen ImagePruneResponse +genImagePruneResponse n = + ImagePruneResponse + <$> arbitraryReducedMaybe n -- imagePruneResponseImagesDeleted :: Maybe [ImageDeleteResponseItem] + <*> arbitraryReducedMaybe n -- imagePruneResponseSpaceReclaimed :: Maybe Integer + +instance Arbitrary ImageSearchResponseItem where + arbitrary = sized genImageSearchResponseItem + +genImageSearchResponseItem :: Int -> Gen ImageSearchResponseItem +genImageSearchResponseItem n = + ImageSearchResponseItem + <$> arbitraryReducedMaybe n -- imageSearchResponseItemDescription :: Maybe Text + <*> arbitraryReducedMaybe n -- imageSearchResponseItemIsOfficial :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageSearchResponseItemIsAutomated :: Maybe Bool + <*> arbitraryReducedMaybe n -- imageSearchResponseItemName :: Maybe Text + <*> arbitraryReducedMaybe n -- imageSearchResponseItemStarCount :: Maybe Int + +instance Arbitrary ImageSummary where + arbitrary = sized genImageSummary + +genImageSummary :: Int -> Gen ImageSummary +genImageSummary n = + ImageSummary + <$> arbitrary -- imageSummaryId :: Text + <*> arbitrary -- imageSummaryParentId :: Text + <*> arbitrary -- imageSummaryRepoTags :: [Text] + <*> arbitrary -- imageSummaryRepoDigests :: [Text] + <*> arbitrary -- imageSummaryCreated :: Int + <*> arbitrary -- imageSummarySize :: Integer + <*> arbitrary -- imageSummarySharedSize :: Integer + <*> arbitraryReducedMaybe n -- imageSummaryVirtualSize :: Maybe Integer + <*> arbitrary -- imageSummaryLabels :: (Map.Map String Text) + <*> arbitrary -- imageSummaryContainers :: Int + +instance Arbitrary IndexInfo where + arbitrary = sized genIndexInfo + +genIndexInfo :: Int -> Gen IndexInfo +genIndexInfo n = + IndexInfo + <$> arbitraryReducedMaybe n -- indexInfoName :: Maybe Text + <*> arbitraryReducedMaybe n -- indexInfoMirrors :: Maybe [Text] + <*> arbitraryReducedMaybe n -- indexInfoSecure :: Maybe Bool + <*> arbitraryReducedMaybe n -- indexInfoOfficial :: Maybe Bool + +instance Arbitrary JoinTokens where + arbitrary = sized genJoinTokens + +genJoinTokens :: Int -> Gen JoinTokens +genJoinTokens n = + JoinTokens + <$> arbitraryReducedMaybe n -- joinTokensWorker :: Maybe Text + <*> arbitraryReducedMaybe n -- joinTokensManager :: Maybe Text + +instance Arbitrary Limit where + arbitrary = sized genLimit + +genLimit :: Int -> Gen Limit +genLimit n = + Limit + <$> arbitraryReducedMaybe n -- limitNanoCpus :: Maybe Integer + <*> arbitraryReducedMaybe n -- limitMemoryBytes :: Maybe Integer + <*> arbitraryReducedMaybe n -- limitPids :: Maybe Integer + +instance Arbitrary ManagerStatus where + arbitrary = sized genManagerStatus + +genManagerStatus :: Int -> Gen ManagerStatus +genManagerStatus n = + ManagerStatus + <$> arbitraryReducedMaybe n -- managerStatusLeader :: Maybe Bool + <*> arbitraryReducedMaybe n -- managerStatusReachability :: Maybe Reachability + <*> arbitraryReducedMaybe n -- managerStatusAddr :: Maybe Text + +instance Arbitrary Mount where + arbitrary = sized genMount + +genMount :: Int -> Gen Mount +genMount n = + Mount + <$> arbitraryReducedMaybe n -- mountTarget :: Maybe Text + <*> arbitraryReducedMaybe n -- mountSource :: Maybe Text + <*> arbitraryReducedMaybe n -- mountType :: Maybe E'Type2 + <*> arbitraryReducedMaybe n -- mountReadOnly :: Maybe Bool + <*> arbitraryReducedMaybe n -- mountConsistency :: Maybe Text + <*> arbitraryReducedMaybe n -- mountBindOptions :: Maybe MountBindOptions + <*> arbitraryReducedMaybe n -- mountVolumeOptions :: Maybe MountVolumeOptions + <*> arbitraryReducedMaybe n -- mountTmpfsOptions :: Maybe MountTmpfsOptions + +instance Arbitrary MountBindOptions where + arbitrary = sized genMountBindOptions + +genMountBindOptions :: Int -> Gen MountBindOptions +genMountBindOptions n = + MountBindOptions + <$> arbitraryReducedMaybe n -- mountBindOptionsPropagation :: Maybe E'Propagation + <*> arbitraryReducedMaybe n -- mountBindOptionsNonRecursive :: Maybe Bool + <*> arbitraryReducedMaybe n -- mountBindOptionsCreateMountpoint :: Maybe Bool + <*> arbitraryReducedMaybe n -- mountBindOptionsReadOnlyNonRecursive :: Maybe Bool + <*> arbitraryReducedMaybe n -- mountBindOptionsReadOnlyForceRecursive :: Maybe Bool + +instance Arbitrary MountPoint where + arbitrary = sized genMountPoint + +genMountPoint :: Int -> Gen MountPoint +genMountPoint n = + MountPoint + <$> arbitraryReducedMaybe n -- mountPointType :: Maybe E'Type2 + <*> arbitraryReducedMaybe n -- mountPointName :: Maybe Text + <*> arbitraryReducedMaybe n -- mountPointSource :: Maybe Text + <*> arbitraryReducedMaybe n -- mountPointDestination :: Maybe Text + <*> arbitraryReducedMaybe n -- mountPointDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- mountPointMode :: Maybe Text + <*> arbitraryReducedMaybe n -- mountPointRw :: Maybe Bool + <*> arbitraryReducedMaybe n -- mountPointPropagation :: Maybe Text + +instance Arbitrary MountTmpfsOptions where + arbitrary = sized genMountTmpfsOptions + +genMountTmpfsOptions :: Int -> Gen MountTmpfsOptions +genMountTmpfsOptions n = + MountTmpfsOptions + <$> arbitraryReducedMaybe n -- mountTmpfsOptionsSizeBytes :: Maybe Integer + <*> arbitraryReducedMaybe n -- mountTmpfsOptionsMode :: Maybe Int + <*> arbitraryReducedMaybe n -- mountTmpfsOptionsOptions :: Maybe [[Text]] + +instance Arbitrary MountVolumeOptions where + arbitrary = sized genMountVolumeOptions + +genMountVolumeOptions :: Int -> Gen MountVolumeOptions +genMountVolumeOptions n = + MountVolumeOptions + <$> arbitraryReducedMaybe n -- mountVolumeOptionsNoCopy :: Maybe Bool + <*> arbitraryReducedMaybe n -- mountVolumeOptionsLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- mountVolumeOptionsDriverConfig :: Maybe MountVolumeOptionsDriverConfig + <*> arbitraryReducedMaybe n -- mountVolumeOptionsSubpath :: Maybe Text + +instance Arbitrary MountVolumeOptionsDriverConfig where + arbitrary = sized genMountVolumeOptionsDriverConfig + +genMountVolumeOptionsDriverConfig :: Int -> Gen MountVolumeOptionsDriverConfig +genMountVolumeOptionsDriverConfig n = + MountVolumeOptionsDriverConfig + <$> arbitraryReducedMaybe n -- mountVolumeOptionsDriverConfigName :: Maybe Text + <*> arbitraryReducedMaybe n -- mountVolumeOptionsDriverConfigOptions :: Maybe (Map.Map String Text) + +instance Arbitrary Network where + arbitrary = sized genNetwork + +genNetwork :: Int -> Gen Network +genNetwork n = + Network + <$> arbitraryReducedMaybe n -- networkName :: Maybe Text + <*> arbitraryReducedMaybe n -- networkId :: Maybe Text + <*> arbitraryReducedMaybe n -- networkCreated :: Maybe Text + <*> arbitraryReducedMaybe n -- networkScope :: Maybe Text + <*> arbitraryReducedMaybe n -- networkDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- networkEnableIpv6 :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkIpam :: Maybe IPAM + <*> arbitraryReducedMaybe n -- networkInternal :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkAttachable :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkIngress :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkConfigFrom :: Maybe ConfigReference + <*> arbitraryReducedMaybe n -- networkConfigOnly :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkContainers :: Maybe (Map.Map String NetworkContainer) + <*> arbitraryReducedMaybe n -- networkOptions :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- networkLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- networkPeers :: Maybe [PeerInfo] + +instance Arbitrary NetworkAttachmentConfig where + arbitrary = sized genNetworkAttachmentConfig + +genNetworkAttachmentConfig :: Int -> Gen NetworkAttachmentConfig +genNetworkAttachmentConfig n = + NetworkAttachmentConfig + <$> arbitraryReducedMaybe n -- networkAttachmentConfigTarget :: Maybe Text + <*> arbitraryReducedMaybe n -- networkAttachmentConfigAliases :: Maybe [Text] + <*> arbitraryReducedMaybe n -- networkAttachmentConfigDriverOpts :: Maybe (Map.Map String Text) + +instance Arbitrary NetworkConnectRequest where + arbitrary = sized genNetworkConnectRequest + +genNetworkConnectRequest :: Int -> Gen NetworkConnectRequest +genNetworkConnectRequest n = + NetworkConnectRequest + <$> arbitraryReducedMaybe n -- networkConnectRequestContainer :: Maybe Text + <*> arbitraryReducedMaybe n -- networkConnectRequestEndpointConfig :: Maybe EndpointSettings + +instance Arbitrary NetworkContainer where + arbitrary = sized genNetworkContainer + +genNetworkContainer :: Int -> Gen NetworkContainer +genNetworkContainer n = + NetworkContainer + <$> arbitraryReducedMaybe n -- networkContainerName :: Maybe Text + <*> arbitraryReducedMaybe n -- networkContainerEndpointId :: Maybe Text + <*> arbitraryReducedMaybe n -- networkContainerMacAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- networkContainerIpv4Address :: Maybe Text + <*> arbitraryReducedMaybe n -- networkContainerIpv6Address :: Maybe Text + +instance Arbitrary NetworkCreateRequest where + arbitrary = sized genNetworkCreateRequest + +genNetworkCreateRequest :: Int -> Gen NetworkCreateRequest +genNetworkCreateRequest n = + NetworkCreateRequest + <$> arbitrary -- networkCreateRequestName :: Text + <*> arbitraryReducedMaybe n -- networkCreateRequestDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- networkCreateRequestScope :: Maybe Text + <*> arbitraryReducedMaybe n -- networkCreateRequestInternal :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkCreateRequestAttachable :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkCreateRequestIngress :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkCreateRequestConfigOnly :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkCreateRequestConfigFrom :: Maybe ConfigReference + <*> arbitraryReducedMaybe n -- networkCreateRequestIpam :: Maybe IPAM + <*> arbitraryReducedMaybe n -- networkCreateRequestEnableIpv6 :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkCreateRequestOptions :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- networkCreateRequestLabels :: Maybe (Map.Map String Text) + +instance Arbitrary NetworkCreateResponse where + arbitrary = sized genNetworkCreateResponse + +genNetworkCreateResponse :: Int -> Gen NetworkCreateResponse +genNetworkCreateResponse n = + NetworkCreateResponse + <$> arbitrary -- networkCreateResponseId :: Text + <*> arbitrary -- networkCreateResponseWarning :: Text + +instance Arbitrary NetworkDisconnectRequest where + arbitrary = sized genNetworkDisconnectRequest + +genNetworkDisconnectRequest :: Int -> Gen NetworkDisconnectRequest +genNetworkDisconnectRequest n = + NetworkDisconnectRequest + <$> arbitraryReducedMaybe n -- networkDisconnectRequestContainer :: Maybe Text + <*> arbitraryReducedMaybe n -- networkDisconnectRequestForce :: Maybe Bool + +instance Arbitrary NetworkPruneResponse where + arbitrary = sized genNetworkPruneResponse + +genNetworkPruneResponse :: Int -> Gen NetworkPruneResponse +genNetworkPruneResponse n = + NetworkPruneResponse + <$> arbitraryReducedMaybe n -- networkPruneResponseNetworksDeleted :: Maybe [Text] + +instance Arbitrary NetworkSettings where + arbitrary = sized genNetworkSettings + +genNetworkSettings :: Int -> Gen NetworkSettings +genNetworkSettings n = + NetworkSettings + <$> arbitraryReducedMaybe n -- networkSettingsBridge :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsSandboxId :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsHairpinMode :: Maybe Bool + <*> arbitraryReducedMaybe n -- networkSettingsLinkLocalIpv6Address :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsLinkLocalIpv6PrefixLen :: Maybe Int + <*> arbitraryReducedMaybe n -- networkSettingsPorts :: Maybe (Map.Map String [PortBinding]) + <*> arbitraryReducedMaybe n -- networkSettingsSandboxKey :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsSecondaryIpAddresses :: Maybe [Address] + <*> arbitraryReducedMaybe n -- networkSettingsSecondaryIpv6Addresses :: Maybe [Address] + <*> arbitraryReducedMaybe n -- networkSettingsEndpointId :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsGateway :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsGlobalIpv6Address :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsGlobalIpv6PrefixLen :: Maybe Int + <*> arbitraryReducedMaybe n -- networkSettingsIpAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsIpPrefixLen :: Maybe Int + <*> arbitraryReducedMaybe n -- networkSettingsIpv6Gateway :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsMacAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- networkSettingsNetworks :: Maybe (Map.Map String EndpointSettings) + +instance Arbitrary NetworkingConfig where + arbitrary = sized genNetworkingConfig + +genNetworkingConfig :: Int -> Gen NetworkingConfig +genNetworkingConfig n = + NetworkingConfig + <$> arbitraryReducedMaybe n -- networkingConfigEndpointsConfig :: Maybe (Map.Map String EndpointSettings) + +instance Arbitrary Node where + arbitrary = sized genNode + +genNode :: Int -> Gen Node +genNode n = + Node + <$> arbitraryReducedMaybe n -- nodeId :: Maybe Text + <*> arbitraryReducedMaybe n -- nodeVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- nodeCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- nodeUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- nodeSpec :: Maybe NodeSpec + <*> arbitraryReducedMaybe n -- nodeDescription :: Maybe NodeDescription + <*> arbitraryReducedMaybe n -- nodeStatus :: Maybe NodeStatus + <*> arbitraryReducedMaybe n -- nodeManagerStatus :: Maybe ManagerStatus + +instance Arbitrary NodeDescription where + arbitrary = sized genNodeDescription + +genNodeDescription :: Int -> Gen NodeDescription +genNodeDescription n = + NodeDescription + <$> arbitraryReducedMaybe n -- nodeDescriptionHostname :: Maybe Text + <*> arbitraryReducedMaybe n -- nodeDescriptionPlatform :: Maybe Platform + <*> arbitraryReducedMaybe n -- nodeDescriptionResources :: Maybe ResourceObject + <*> arbitraryReducedMaybe n -- nodeDescriptionEngine :: Maybe EngineDescription + <*> arbitraryReducedMaybe n -- nodeDescriptionTlsInfo :: Maybe TLSInfo + +instance Arbitrary NodeSpec where + arbitrary = sized genNodeSpec + +genNodeSpec :: Int -> Gen NodeSpec +genNodeSpec n = + NodeSpec + <$> arbitraryReducedMaybe n -- nodeSpecName :: Maybe Text + <*> arbitraryReducedMaybe n -- nodeSpecLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- nodeSpecRole :: Maybe E'Role + <*> arbitraryReducedMaybe n -- nodeSpecAvailability :: Maybe E'Availability + +instance Arbitrary NodeStatus where + arbitrary = sized genNodeStatus + +genNodeStatus :: Int -> Gen NodeStatus +genNodeStatus n = + NodeStatus + <$> arbitraryReducedMaybe n -- nodeStatusState :: Maybe NodeState + <*> arbitraryReducedMaybe n -- nodeStatusMessage :: Maybe Text + <*> arbitraryReducedMaybe n -- nodeStatusAddr :: Maybe Text + +instance Arbitrary OCIDescriptor where + arbitrary = sized genOCIDescriptor + +genOCIDescriptor :: Int -> Gen OCIDescriptor +genOCIDescriptor n = + OCIDescriptor + <$> arbitraryReducedMaybe n -- oCIDescriptorMediaType :: Maybe Text + <*> arbitraryReducedMaybe n -- oCIDescriptorDigest :: Maybe Text + <*> arbitraryReducedMaybe n -- oCIDescriptorSize :: Maybe Integer + +instance Arbitrary OCIPlatform where + arbitrary = sized genOCIPlatform + +genOCIPlatform :: Int -> Gen OCIPlatform +genOCIPlatform n = + OCIPlatform + <$> arbitraryReducedMaybe n -- oCIPlatformArchitecture :: Maybe Text + <*> arbitraryReducedMaybe n -- oCIPlatformOs :: Maybe Text + <*> arbitraryReducedMaybe n -- oCIPlatformOsVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- oCIPlatformOsFeatures :: Maybe [Text] + <*> arbitraryReducedMaybe n -- oCIPlatformVariant :: Maybe Text + +instance Arbitrary ObjectVersion where + arbitrary = sized genObjectVersion + +genObjectVersion :: Int -> Gen ObjectVersion +genObjectVersion n = + ObjectVersion + <$> arbitraryReducedMaybe n -- objectVersionIndex :: Maybe Int + +instance Arbitrary PeerInfo where + arbitrary = sized genPeerInfo + +genPeerInfo :: Int -> Gen PeerInfo +genPeerInfo n = + PeerInfo + <$> arbitraryReducedMaybe n -- peerInfoName :: Maybe Text + <*> arbitraryReducedMaybe n -- peerInfoIp :: Maybe Text + +instance Arbitrary PeerNode where + arbitrary = sized genPeerNode + +genPeerNode :: Int -> Gen PeerNode +genPeerNode n = + PeerNode + <$> arbitraryReducedMaybe n -- peerNodeNodeId :: Maybe Text + <*> arbitraryReducedMaybe n -- peerNodeAddr :: Maybe Text + +instance Arbitrary Platform where + arbitrary = sized genPlatform + +genPlatform :: Int -> Gen Platform +genPlatform n = + Platform + <$> arbitraryReducedMaybe n -- platformArchitecture :: Maybe Text + <*> arbitraryReducedMaybe n -- platformOs :: Maybe Text + +instance Arbitrary Plugin where + arbitrary = sized genPlugin + +genPlugin :: Int -> Gen Plugin +genPlugin n = + Plugin + <$> arbitraryReducedMaybe n -- pluginId :: Maybe Text + <*> arbitrary -- pluginName :: Text + <*> arbitrary -- pluginEnabled :: Bool + <*> arbitraryReduced n -- pluginSettings :: PluginSettings + <*> arbitraryReducedMaybe n -- pluginPluginReference :: Maybe Text + <*> arbitraryReduced n -- pluginConfig :: PluginConfig + +instance Arbitrary PluginConfig where + arbitrary = sized genPluginConfig + +genPluginConfig :: Int -> Gen PluginConfig +genPluginConfig n = + PluginConfig + <$> arbitraryReducedMaybe n -- pluginConfigDockerVersion :: Maybe Text + <*> arbitrary -- pluginConfigDescription :: Text + <*> arbitrary -- pluginConfigDocumentation :: Text + <*> arbitraryReduced n -- pluginConfigInterface :: PluginConfigInterface + <*> arbitrary -- pluginConfigEntrypoint :: [Text] + <*> arbitrary -- pluginConfigWorkDir :: Text + <*> arbitraryReducedMaybe n -- pluginConfigUser :: Maybe PluginConfigUser + <*> arbitraryReduced n -- pluginConfigNetwork :: PluginConfigNetwork + <*> arbitraryReduced n -- pluginConfigLinux :: PluginConfigLinux + <*> arbitrary -- pluginConfigPropagatedMount :: Text + <*> arbitrary -- pluginConfigIpcHost :: Bool + <*> arbitrary -- pluginConfigPidHost :: Bool + <*> arbitraryReduced n -- pluginConfigMounts :: [PluginMount] + <*> arbitraryReduced n -- pluginConfigEnv :: [PluginEnv] + <*> arbitraryReduced n -- pluginConfigArgs :: PluginConfigArgs + <*> arbitraryReducedMaybe n -- pluginConfigRootfs :: Maybe PluginConfigRootfs + +instance Arbitrary PluginConfigArgs where + arbitrary = sized genPluginConfigArgs + +genPluginConfigArgs :: Int -> Gen PluginConfigArgs +genPluginConfigArgs n = + PluginConfigArgs + <$> arbitrary -- pluginConfigArgsName :: Text + <*> arbitrary -- pluginConfigArgsDescription :: Text + <*> arbitrary -- pluginConfigArgsSettable :: [Text] + <*> arbitrary -- pluginConfigArgsValue :: [Text] + +instance Arbitrary PluginConfigInterface where + arbitrary = sized genPluginConfigInterface + +genPluginConfigInterface :: Int -> Gen PluginConfigInterface +genPluginConfigInterface n = + PluginConfigInterface + <$> arbitraryReduced n -- pluginConfigInterfaceTypes :: [PluginInterfaceType] + <*> arbitrary -- pluginConfigInterfaceSocket :: Text + <*> arbitraryReducedMaybe n -- pluginConfigInterfaceProtocolScheme :: Maybe E'ProtocolScheme + +instance Arbitrary PluginConfigLinux where + arbitrary = sized genPluginConfigLinux + +genPluginConfigLinux :: Int -> Gen PluginConfigLinux +genPluginConfigLinux n = + PluginConfigLinux + <$> arbitrary -- pluginConfigLinuxCapabilities :: [Text] + <*> arbitrary -- pluginConfigLinuxAllowAllDevices :: Bool + <*> arbitraryReduced n -- pluginConfigLinuxDevices :: [PluginDevice] + +instance Arbitrary PluginConfigNetwork where + arbitrary = sized genPluginConfigNetwork + +genPluginConfigNetwork :: Int -> Gen PluginConfigNetwork +genPluginConfigNetwork n = + PluginConfigNetwork + <$> arbitrary -- pluginConfigNetworkType :: Text + +instance Arbitrary PluginConfigRootfs where + arbitrary = sized genPluginConfigRootfs + +genPluginConfigRootfs :: Int -> Gen PluginConfigRootfs +genPluginConfigRootfs n = + PluginConfigRootfs + <$> arbitraryReducedMaybe n -- pluginConfigRootfsType :: Maybe Text + <*> arbitraryReducedMaybe n -- pluginConfigRootfsDiffIds :: Maybe [Text] + +instance Arbitrary PluginConfigUser where + arbitrary = sized genPluginConfigUser + +genPluginConfigUser :: Int -> Gen PluginConfigUser +genPluginConfigUser n = + PluginConfigUser + <$> arbitraryReducedMaybe n -- pluginConfigUserUid :: Maybe Int + <*> arbitraryReducedMaybe n -- pluginConfigUserGid :: Maybe Int + +instance Arbitrary PluginDevice where + arbitrary = sized genPluginDevice + +genPluginDevice :: Int -> Gen PluginDevice +genPluginDevice n = + PluginDevice + <$> arbitrary -- pluginDeviceName :: Text + <*> arbitrary -- pluginDeviceDescription :: Text + <*> arbitrary -- pluginDeviceSettable :: [Text] + <*> arbitrary -- pluginDevicePath :: Text + +instance Arbitrary PluginEnv where + arbitrary = sized genPluginEnv + +genPluginEnv :: Int -> Gen PluginEnv +genPluginEnv n = + PluginEnv + <$> arbitrary -- pluginEnvName :: Text + <*> arbitrary -- pluginEnvDescription :: Text + <*> arbitrary -- pluginEnvSettable :: [Text] + <*> arbitrary -- pluginEnvValue :: Text + +instance Arbitrary PluginInterfaceType where + arbitrary = sized genPluginInterfaceType + +genPluginInterfaceType :: Int -> Gen PluginInterfaceType +genPluginInterfaceType n = + PluginInterfaceType + <$> arbitrary -- pluginInterfaceTypePrefix :: Text + <*> arbitrary -- pluginInterfaceTypeCapability :: Text + <*> arbitrary -- pluginInterfaceTypeVersion :: Text + +instance Arbitrary PluginMount where + arbitrary = sized genPluginMount + +genPluginMount :: Int -> Gen PluginMount +genPluginMount n = + PluginMount + <$> arbitrary -- pluginMountName :: Text + <*> arbitrary -- pluginMountDescription :: Text + <*> arbitrary -- pluginMountSettable :: [Text] + <*> arbitrary -- pluginMountSource :: Text + <*> arbitrary -- pluginMountDestination :: Text + <*> arbitrary -- pluginMountType :: Text + <*> arbitrary -- pluginMountOptions :: [Text] + +instance Arbitrary PluginPrivilege where + arbitrary = sized genPluginPrivilege + +genPluginPrivilege :: Int -> Gen PluginPrivilege +genPluginPrivilege n = + PluginPrivilege + <$> arbitraryReducedMaybe n -- pluginPrivilegeName :: Maybe Text + <*> arbitraryReducedMaybe n -- pluginPrivilegeDescription :: Maybe Text + <*> arbitraryReducedMaybe n -- pluginPrivilegeValue :: Maybe [Text] + +instance Arbitrary PluginSettings where + arbitrary = sized genPluginSettings + +genPluginSettings :: Int -> Gen PluginSettings +genPluginSettings n = + PluginSettings + <$> arbitraryReduced n -- pluginSettingsMounts :: [PluginMount] + <*> arbitrary -- pluginSettingsEnv :: [Text] + <*> arbitrary -- pluginSettingsArgs :: [Text] + <*> arbitraryReduced n -- pluginSettingsDevices :: [PluginDevice] + +instance Arbitrary PluginsInfo where + arbitrary = sized genPluginsInfo + +genPluginsInfo :: Int -> Gen PluginsInfo +genPluginsInfo n = + PluginsInfo + <$> arbitraryReducedMaybe n -- pluginsInfoVolume :: Maybe [Text] + <*> arbitraryReducedMaybe n -- pluginsInfoNetwork :: Maybe [Text] + <*> arbitraryReducedMaybe n -- pluginsInfoAuthorization :: Maybe [Text] + <*> arbitraryReducedMaybe n -- pluginsInfoLog :: Maybe [Text] + +instance Arbitrary Port where + arbitrary = sized genPort + +genPort :: Int -> Gen Port +genPort n = + Port + <$> arbitraryReducedMaybe n -- portIp :: Maybe Text + <*> arbitrary -- portPrivatePort :: Int + <*> arbitraryReducedMaybe n -- portPublicPort :: Maybe Int + <*> arbitrary -- portType :: E'Type + +instance Arbitrary PortBinding where + arbitrary = sized genPortBinding + +genPortBinding :: Int -> Gen PortBinding +genPortBinding n = + PortBinding + <$> arbitraryReducedMaybe n -- portBindingHostIp :: Maybe Text + <*> arbitraryReducedMaybe n -- portBindingHostPort :: Maybe Text + +instance Arbitrary PortStatus where + arbitrary = sized genPortStatus + +genPortStatus :: Int -> Gen PortStatus +genPortStatus n = + PortStatus + <$> arbitraryReducedMaybe n -- portStatusPorts :: Maybe [EndpointPortConfig] + +instance Arbitrary ProcessConfig where + arbitrary = sized genProcessConfig + +genProcessConfig :: Int -> Gen ProcessConfig +genProcessConfig n = + ProcessConfig + <$> arbitraryReducedMaybe n -- processConfigPrivileged :: Maybe Bool + <*> arbitraryReducedMaybe n -- processConfigUser :: Maybe Text + <*> arbitraryReducedMaybe n -- processConfigTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- processConfigEntrypoint :: Maybe Text + <*> arbitraryReducedMaybe n -- processConfigArguments :: Maybe [Text] + +instance Arbitrary ProgressDetail where + arbitrary = sized genProgressDetail + +genProgressDetail :: Int -> Gen ProgressDetail +genProgressDetail n = + ProgressDetail + <$> arbitraryReducedMaybe n -- progressDetailCurrent :: Maybe Int + <*> arbitraryReducedMaybe n -- progressDetailTotal :: Maybe Int + +instance Arbitrary PushImageInfo where + arbitrary = sized genPushImageInfo + +genPushImageInfo :: Int -> Gen PushImageInfo +genPushImageInfo n = + PushImageInfo + <$> arbitraryReducedMaybe n -- pushImageInfoError :: Maybe Text + <*> arbitraryReducedMaybe n -- pushImageInfoStatus :: Maybe Text + <*> arbitraryReducedMaybe n -- pushImageInfoProgress :: Maybe Text + <*> arbitraryReducedMaybe n -- pushImageInfoProgressDetail :: Maybe ProgressDetail + +instance Arbitrary RegistryServiceConfig where + arbitrary = sized genRegistryServiceConfig + +genRegistryServiceConfig :: Int -> Gen RegistryServiceConfig +genRegistryServiceConfig n = + RegistryServiceConfig + <$> arbitraryReducedMaybe n -- registryServiceConfigAllowNondistributableArtifactsCidrs :: Maybe [Text] + <*> arbitraryReducedMaybe n -- registryServiceConfigAllowNondistributableArtifactsHostnames :: Maybe [Text] + <*> arbitraryReducedMaybe n -- registryServiceConfigInsecureRegistryCidrs :: Maybe [Text] + <*> arbitraryReducedMaybe n -- registryServiceConfigIndexConfigs :: Maybe (Map.Map String IndexInfo) + <*> arbitraryReducedMaybe n -- registryServiceConfigMirrors :: Maybe [Text] + +instance Arbitrary ResourceObject where + arbitrary = sized genResourceObject + +genResourceObject :: Int -> Gen ResourceObject +genResourceObject n = + ResourceObject + <$> arbitraryReducedMaybe n -- resourceObjectNanoCpus :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourceObjectMemoryBytes :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourceObjectGenericResources :: Maybe [GenericResourcesInner] + +instance Arbitrary Resources where + arbitrary = sized genResources + +genResources :: Int -> Gen Resources +genResources n = + Resources + <$> arbitraryReducedMaybe n -- resourcesCpuShares :: Maybe Int + <*> arbitraryReducedMaybe n -- resourcesMemory :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesCgroupParent :: Maybe Text + <*> arbitraryReducedMaybe n -- resourcesBlkioWeight :: Maybe Int + <*> arbitraryReducedMaybe n -- resourcesBlkioWeightDevice :: Maybe [ResourcesBlkioWeightDeviceInner] + <*> arbitraryReducedMaybe n -- resourcesBlkioDeviceReadBps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- resourcesBlkioDeviceWriteBps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- resourcesBlkioDeviceReadIOps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- resourcesBlkioDeviceWriteIOps :: Maybe [ThrottleDevice] + <*> arbitraryReducedMaybe n -- resourcesCpuPeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesCpuQuota :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesCpuRealtimePeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesCpuRealtimeRuntime :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesCpusetCpus :: Maybe Text + <*> arbitraryReducedMaybe n -- resourcesCpusetMems :: Maybe Text + <*> arbitraryReducedMaybe n -- resourcesDevices :: Maybe [DeviceMapping] + <*> arbitraryReducedMaybe n -- resourcesDeviceCgroupRules :: Maybe [Text] + <*> arbitraryReducedMaybe n -- resourcesDeviceRequests :: Maybe [DeviceRequest] + <*> arbitraryReducedMaybe n -- resourcesKernelMemoryTcp :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesMemoryReservation :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesMemorySwap :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesMemorySwappiness :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesNanoCpus :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesOomKillDisable :: Maybe Bool + <*> arbitraryReducedMaybe n -- resourcesInit :: Maybe Bool + <*> arbitraryReducedMaybe n -- resourcesPidsLimit :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesUlimits :: Maybe [ResourcesUlimitsInner] + <*> arbitraryReducedMaybe n -- resourcesCpuCount :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesCpuPercent :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesIoMaximumIOps :: Maybe Integer + <*> arbitraryReducedMaybe n -- resourcesIoMaximumBandwidth :: Maybe Integer + +instance Arbitrary ResourcesBlkioWeightDeviceInner where + arbitrary = sized genResourcesBlkioWeightDeviceInner + +genResourcesBlkioWeightDeviceInner :: Int -> Gen ResourcesBlkioWeightDeviceInner +genResourcesBlkioWeightDeviceInner n = + ResourcesBlkioWeightDeviceInner + <$> arbitraryReducedMaybe n -- resourcesBlkioWeightDeviceInnerPath :: Maybe Text + <*> arbitraryReducedMaybe n -- resourcesBlkioWeightDeviceInnerWeight :: Maybe Int + +instance Arbitrary ResourcesUlimitsInner where + arbitrary = sized genResourcesUlimitsInner + +genResourcesUlimitsInner :: Int -> Gen ResourcesUlimitsInner +genResourcesUlimitsInner n = + ResourcesUlimitsInner + <$> arbitraryReducedMaybe n -- resourcesUlimitsInnerName :: Maybe Text + <*> arbitraryReducedMaybe n -- resourcesUlimitsInnerSoft :: Maybe Int + <*> arbitraryReducedMaybe n -- resourcesUlimitsInnerHard :: Maybe Int + +instance Arbitrary RestartPolicy where + arbitrary = sized genRestartPolicy + +genRestartPolicy :: Int -> Gen RestartPolicy +genRestartPolicy n = + RestartPolicy + <$> arbitraryReducedMaybe n -- restartPolicyName :: Maybe E'Name + <*> arbitraryReducedMaybe n -- restartPolicyMaximumRetryCount :: Maybe Int + +instance Arbitrary Runtime where + arbitrary = sized genRuntime + +genRuntime :: Int -> Gen Runtime +genRuntime n = + Runtime + <$> arbitraryReducedMaybe n -- runtimePath :: Maybe Text + <*> arbitraryReducedMaybe n -- runtimeRuntimeArgs :: Maybe [Text] + <*> arbitraryReducedMaybe n -- runtimeStatus :: Maybe (Map.Map String Text) + +instance Arbitrary Secret where + arbitrary = sized genSecret + +genSecret :: Int -> Gen Secret +genSecret n = + Secret + <$> arbitraryReducedMaybe n -- secretId :: Maybe Text + <*> arbitraryReducedMaybe n -- secretVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- secretCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- secretUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- secretSpec :: Maybe SecretSpec + +instance Arbitrary SecretCreateRequest where + arbitrary = sized genSecretCreateRequest + +genSecretCreateRequest :: Int -> Gen SecretCreateRequest +genSecretCreateRequest n = + SecretCreateRequest + <$> arbitraryReducedMaybe n -- secretCreateRequestName :: Maybe Text + <*> arbitraryReducedMaybe n -- secretCreateRequestLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- secretCreateRequestData :: Maybe Text + <*> arbitraryReducedMaybe n -- secretCreateRequestDriver :: Maybe Driver + <*> arbitraryReducedMaybe n -- secretCreateRequestTemplating :: Maybe Driver + +instance Arbitrary SecretSpec where + arbitrary = sized genSecretSpec + +genSecretSpec :: Int -> Gen SecretSpec +genSecretSpec n = + SecretSpec + <$> arbitraryReducedMaybe n -- secretSpecName :: Maybe Text + <*> arbitraryReducedMaybe n -- secretSpecLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- secretSpecData :: Maybe Text + <*> arbitraryReducedMaybe n -- secretSpecDriver :: Maybe Driver + <*> arbitraryReducedMaybe n -- secretSpecTemplating :: Maybe Driver + +instance Arbitrary Service where + arbitrary = sized genService + +genService :: Int -> Gen Service +genService n = + Service + <$> arbitraryReducedMaybe n -- serviceId :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- serviceCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceSpec :: Maybe ServiceSpec + <*> arbitraryReducedMaybe n -- serviceEndpoint :: Maybe ServiceEndpoint + <*> arbitraryReducedMaybe n -- serviceUpdateStatus :: Maybe ServiceUpdateStatus + <*> arbitraryReducedMaybe n -- serviceServiceStatus :: Maybe ServiceServiceStatus + <*> arbitraryReducedMaybe n -- serviceJobStatus :: Maybe ServiceJobStatus + +instance Arbitrary ServiceCreateRequest where + arbitrary = sized genServiceCreateRequest + +genServiceCreateRequest :: Int -> Gen ServiceCreateRequest +genServiceCreateRequest n = + ServiceCreateRequest + <$> arbitraryReducedMaybe n -- serviceCreateRequestName :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceCreateRequestLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- serviceCreateRequestTaskTemplate :: Maybe TaskSpec + <*> arbitraryReducedMaybe n -- serviceCreateRequestMode :: Maybe ServiceSpecMode + <*> arbitraryReducedMaybe n -- serviceCreateRequestUpdateConfig :: Maybe ServiceSpecUpdateConfig + <*> arbitraryReducedMaybe n -- serviceCreateRequestRollbackConfig :: Maybe ServiceSpecRollbackConfig + <*> arbitraryReducedMaybe n -- serviceCreateRequestNetworks :: Maybe [NetworkAttachmentConfig] + <*> arbitraryReducedMaybe n -- serviceCreateRequestEndpointSpec :: Maybe EndpointSpec + +instance Arbitrary ServiceCreateResponse where + arbitrary = sized genServiceCreateResponse + +genServiceCreateResponse :: Int -> Gen ServiceCreateResponse +genServiceCreateResponse n = + ServiceCreateResponse + <$> arbitraryReducedMaybe n -- serviceCreateResponseId :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceCreateResponseWarnings :: Maybe [Text] + +instance Arbitrary ServiceEndpoint where + arbitrary = sized genServiceEndpoint + +genServiceEndpoint :: Int -> Gen ServiceEndpoint +genServiceEndpoint n = + ServiceEndpoint + <$> arbitraryReducedMaybe n -- serviceEndpointSpec :: Maybe EndpointSpec + <*> arbitraryReducedMaybe n -- serviceEndpointPorts :: Maybe [EndpointPortConfig] + <*> arbitraryReducedMaybe n -- serviceEndpointVirtualIps :: Maybe [ServiceEndpointVirtualIPsInner] + +instance Arbitrary ServiceEndpointVirtualIPsInner where + arbitrary = sized genServiceEndpointVirtualIPsInner + +genServiceEndpointVirtualIPsInner :: Int -> Gen ServiceEndpointVirtualIPsInner +genServiceEndpointVirtualIPsInner n = + ServiceEndpointVirtualIPsInner + <$> arbitraryReducedMaybe n -- serviceEndpointVirtualIPsInnerNetworkId :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceEndpointVirtualIPsInnerAddr :: Maybe Text + +instance Arbitrary ServiceJobStatus where + arbitrary = sized genServiceJobStatus + +genServiceJobStatus :: Int -> Gen ServiceJobStatus +genServiceJobStatus n = + ServiceJobStatus + <$> arbitraryReducedMaybe n -- serviceJobStatusJobIteration :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- serviceJobStatusLastExecution :: Maybe Text + +instance Arbitrary ServiceServiceStatus where + arbitrary = sized genServiceServiceStatus + +genServiceServiceStatus :: Int -> Gen ServiceServiceStatus +genServiceServiceStatus n = + ServiceServiceStatus + <$> arbitraryReducedMaybe n -- serviceServiceStatusRunningTasks :: Maybe Int + <*> arbitraryReducedMaybe n -- serviceServiceStatusDesiredTasks :: Maybe Int + <*> arbitraryReducedMaybe n -- serviceServiceStatusCompletedTasks :: Maybe Int + +instance Arbitrary ServiceSpec where + arbitrary = sized genServiceSpec + +genServiceSpec :: Int -> Gen ServiceSpec +genServiceSpec n = + ServiceSpec + <$> arbitraryReducedMaybe n -- serviceSpecName :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceSpecLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- serviceSpecTaskTemplate :: Maybe TaskSpec + <*> arbitraryReducedMaybe n -- serviceSpecMode :: Maybe ServiceSpecMode + <*> arbitraryReducedMaybe n -- serviceSpecUpdateConfig :: Maybe ServiceSpecUpdateConfig + <*> arbitraryReducedMaybe n -- serviceSpecRollbackConfig :: Maybe ServiceSpecRollbackConfig + <*> arbitraryReducedMaybe n -- serviceSpecNetworks :: Maybe [NetworkAttachmentConfig] + <*> arbitraryReducedMaybe n -- serviceSpecEndpointSpec :: Maybe EndpointSpec + +instance Arbitrary ServiceSpecMode where + arbitrary = sized genServiceSpecMode + +genServiceSpecMode :: Int -> Gen ServiceSpecMode +genServiceSpecMode n = + ServiceSpecMode + <$> arbitraryReducedMaybe n -- serviceSpecModeReplicated :: Maybe ServiceSpecModeReplicated + <*> arbitraryReducedMaybeValue n -- serviceSpecModeGlobal :: Maybe A.Value + <*> arbitraryReducedMaybe n -- serviceSpecModeReplicatedJob :: Maybe ServiceSpecModeReplicatedJob + <*> arbitraryReducedMaybeValue n -- serviceSpecModeGlobalJob :: Maybe A.Value + +instance Arbitrary ServiceSpecModeReplicated where + arbitrary = sized genServiceSpecModeReplicated + +genServiceSpecModeReplicated :: Int -> Gen ServiceSpecModeReplicated +genServiceSpecModeReplicated n = + ServiceSpecModeReplicated + <$> arbitraryReducedMaybe n -- serviceSpecModeReplicatedReplicas :: Maybe Integer + +instance Arbitrary ServiceSpecModeReplicatedJob where + arbitrary = sized genServiceSpecModeReplicatedJob + +genServiceSpecModeReplicatedJob :: Int -> Gen ServiceSpecModeReplicatedJob +genServiceSpecModeReplicatedJob n = + ServiceSpecModeReplicatedJob + <$> arbitraryReducedMaybe n -- serviceSpecModeReplicatedJobMaxConcurrent :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecModeReplicatedJobTotalCompletions :: Maybe Integer + +instance Arbitrary ServiceSpecRollbackConfig where + arbitrary = sized genServiceSpecRollbackConfig + +genServiceSpecRollbackConfig :: Int -> Gen ServiceSpecRollbackConfig +genServiceSpecRollbackConfig n = + ServiceSpecRollbackConfig + <$> arbitraryReducedMaybe n -- serviceSpecRollbackConfigParallelism :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecRollbackConfigDelay :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecRollbackConfigFailureAction :: Maybe E'FailureAction2 + <*> arbitraryReducedMaybe n -- serviceSpecRollbackConfigMonitor :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecRollbackConfigMaxFailureRatio :: Maybe Double + <*> arbitraryReducedMaybe n -- serviceSpecRollbackConfigOrder :: Maybe E'Order + +instance Arbitrary ServiceSpecUpdateConfig where + arbitrary = sized genServiceSpecUpdateConfig + +genServiceSpecUpdateConfig :: Int -> Gen ServiceSpecUpdateConfig +genServiceSpecUpdateConfig n = + ServiceSpecUpdateConfig + <$> arbitraryReducedMaybe n -- serviceSpecUpdateConfigParallelism :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecUpdateConfigDelay :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecUpdateConfigFailureAction :: Maybe E'FailureAction + <*> arbitraryReducedMaybe n -- serviceSpecUpdateConfigMonitor :: Maybe Integer + <*> arbitraryReducedMaybe n -- serviceSpecUpdateConfigMaxFailureRatio :: Maybe Double + <*> arbitraryReducedMaybe n -- serviceSpecUpdateConfigOrder :: Maybe E'Order + +instance Arbitrary ServiceUpdateRequest where + arbitrary = sized genServiceUpdateRequest + +genServiceUpdateRequest :: Int -> Gen ServiceUpdateRequest +genServiceUpdateRequest n = + ServiceUpdateRequest + <$> arbitraryReducedMaybe n -- serviceUpdateRequestName :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceUpdateRequestLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- serviceUpdateRequestTaskTemplate :: Maybe TaskSpec + <*> arbitraryReducedMaybe n -- serviceUpdateRequestMode :: Maybe ServiceSpecMode + <*> arbitraryReducedMaybe n -- serviceUpdateRequestUpdateConfig :: Maybe ServiceSpecUpdateConfig + <*> arbitraryReducedMaybe n -- serviceUpdateRequestRollbackConfig :: Maybe ServiceSpecRollbackConfig + <*> arbitraryReducedMaybe n -- serviceUpdateRequestNetworks :: Maybe [NetworkAttachmentConfig] + <*> arbitraryReducedMaybe n -- serviceUpdateRequestEndpointSpec :: Maybe EndpointSpec + +instance Arbitrary ServiceUpdateResponse where + arbitrary = sized genServiceUpdateResponse + +genServiceUpdateResponse :: Int -> Gen ServiceUpdateResponse +genServiceUpdateResponse n = + ServiceUpdateResponse + <$> arbitraryReducedMaybe n -- serviceUpdateResponseWarnings :: Maybe [Text] + +instance Arbitrary ServiceUpdateStatus where + arbitrary = sized genServiceUpdateStatus + +genServiceUpdateStatus :: Int -> Gen ServiceUpdateStatus +genServiceUpdateStatus n = + ServiceUpdateStatus + <$> arbitraryReducedMaybe n -- serviceUpdateStatusState :: Maybe E'State + <*> arbitraryReducedMaybe n -- serviceUpdateStatusStartedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceUpdateStatusCompletedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- serviceUpdateStatusMessage :: Maybe Text + +instance Arbitrary Swarm where + arbitrary = sized genSwarm + +genSwarm :: Int -> Gen Swarm +genSwarm n = + Swarm + <$> arbitraryReducedMaybe n -- swarmId :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- swarmCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmSpec :: Maybe SwarmSpec + <*> arbitraryReducedMaybe n -- swarmTlsInfo :: Maybe TLSInfo + <*> arbitraryReducedMaybe n -- swarmRootRotationInProgress :: Maybe Bool + <*> arbitraryReducedMaybe n -- swarmDataPathPort :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmDefaultAddrPool :: Maybe [Text] + <*> arbitraryReducedMaybe n -- swarmSubnetSize :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmJoinTokens :: Maybe JoinTokens + +instance Arbitrary SwarmInfo where + arbitrary = sized genSwarmInfo + +genSwarmInfo :: Int -> Gen SwarmInfo +genSwarmInfo n = + SwarmInfo + <$> arbitraryReducedMaybe n -- swarmInfoNodeId :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmInfoNodeAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmInfoLocalNodeState :: Maybe LocalNodeState + <*> arbitraryReducedMaybe n -- swarmInfoControlAvailable :: Maybe Bool + <*> arbitraryReducedMaybe n -- swarmInfoError :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmInfoRemoteManagers :: Maybe [PeerNode] + <*> arbitraryReducedMaybe n -- swarmInfoNodes :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmInfoManagers :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmInfoCluster :: Maybe ClusterInfo + +instance Arbitrary SwarmInitRequest where + arbitrary = sized genSwarmInitRequest + +genSwarmInitRequest :: Int -> Gen SwarmInitRequest +genSwarmInitRequest n = + SwarmInitRequest + <$> arbitraryReducedMaybe n -- swarmInitRequestListenAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmInitRequestAdvertiseAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmInitRequestDataPathAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmInitRequestDataPathPort :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmInitRequestDefaultAddrPool :: Maybe [Text] + <*> arbitraryReducedMaybe n -- swarmInitRequestForceNewCluster :: Maybe Bool + <*> arbitraryReducedMaybe n -- swarmInitRequestSubnetSize :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmInitRequestSpec :: Maybe SwarmSpec + +instance Arbitrary SwarmJoinRequest where + arbitrary = sized genSwarmJoinRequest + +genSwarmJoinRequest :: Int -> Gen SwarmJoinRequest +genSwarmJoinRequest n = + SwarmJoinRequest + <$> arbitraryReducedMaybe n -- swarmJoinRequestListenAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmJoinRequestAdvertiseAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmJoinRequestDataPathAddr :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmJoinRequestRemoteAddrs :: Maybe [Text] + <*> arbitraryReducedMaybe n -- swarmJoinRequestJoinToken :: Maybe Text + +instance Arbitrary SwarmSpec where + arbitrary = sized genSwarmSpec + +genSwarmSpec :: Int -> Gen SwarmSpec +genSwarmSpec n = + SwarmSpec + <$> arbitraryReducedMaybe n -- swarmSpecName :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmSpecLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- swarmSpecOrchestration :: Maybe SwarmSpecOrchestration + <*> arbitraryReducedMaybe n -- swarmSpecRaft :: Maybe SwarmSpecRaft + <*> arbitraryReducedMaybe n -- swarmSpecDispatcher :: Maybe SwarmSpecDispatcher + <*> arbitraryReducedMaybe n -- swarmSpecCaConfig :: Maybe SwarmSpecCAConfig + <*> arbitraryReducedMaybe n -- swarmSpecEncryptionConfig :: Maybe SwarmSpecEncryptionConfig + <*> arbitraryReducedMaybe n -- swarmSpecTaskDefaults :: Maybe SwarmSpecTaskDefaults + +instance Arbitrary SwarmSpecCAConfig where + arbitrary = sized genSwarmSpecCAConfig + +genSwarmSpecCAConfig :: Int -> Gen SwarmSpecCAConfig +genSwarmSpecCAConfig n = + SwarmSpecCAConfig + <$> arbitraryReducedMaybe n -- swarmSpecCAConfigNodeCertExpiry :: Maybe Integer + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigExternalCas :: Maybe [SwarmSpecCAConfigExternalCAsInner] + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigSigningCaCert :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigSigningCaKey :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigForceRotate :: Maybe Int + +instance Arbitrary SwarmSpecCAConfigExternalCAsInner where + arbitrary = sized genSwarmSpecCAConfigExternalCAsInner + +genSwarmSpecCAConfigExternalCAsInner :: Int -> Gen SwarmSpecCAConfigExternalCAsInner +genSwarmSpecCAConfigExternalCAsInner n = + SwarmSpecCAConfigExternalCAsInner + <$> arbitraryReducedMaybe n -- swarmSpecCAConfigExternalCAsInnerProtocol :: Maybe E'Protocol + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigExternalCAsInnerUrl :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigExternalCAsInnerOptions :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- swarmSpecCAConfigExternalCAsInnerCaCert :: Maybe Text + +instance Arbitrary SwarmSpecDispatcher where + arbitrary = sized genSwarmSpecDispatcher + +genSwarmSpecDispatcher :: Int -> Gen SwarmSpecDispatcher +genSwarmSpecDispatcher n = + SwarmSpecDispatcher + <$> arbitraryReducedMaybe n -- swarmSpecDispatcherHeartbeatPeriod :: Maybe Integer + +instance Arbitrary SwarmSpecEncryptionConfig where + arbitrary = sized genSwarmSpecEncryptionConfig + +genSwarmSpecEncryptionConfig :: Int -> Gen SwarmSpecEncryptionConfig +genSwarmSpecEncryptionConfig n = + SwarmSpecEncryptionConfig + <$> arbitraryReducedMaybe n -- swarmSpecEncryptionConfigAutoLockManagers :: Maybe Bool + +instance Arbitrary SwarmSpecOrchestration where + arbitrary = sized genSwarmSpecOrchestration + +genSwarmSpecOrchestration :: Int -> Gen SwarmSpecOrchestration +genSwarmSpecOrchestration n = + SwarmSpecOrchestration + <$> arbitraryReducedMaybe n -- swarmSpecOrchestrationTaskHistoryRetentionLimit :: Maybe Integer + +instance Arbitrary SwarmSpecRaft where + arbitrary = sized genSwarmSpecRaft + +genSwarmSpecRaft :: Int -> Gen SwarmSpecRaft +genSwarmSpecRaft n = + SwarmSpecRaft + <$> arbitraryReducedMaybe n -- swarmSpecRaftSnapshotInterval :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmSpecRaftKeepOldSnapshots :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmSpecRaftLogEntriesForSlowFollowers :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmSpecRaftElectionTick :: Maybe Int + <*> arbitraryReducedMaybe n -- swarmSpecRaftHeartbeatTick :: Maybe Int + +instance Arbitrary SwarmSpecTaskDefaults where + arbitrary = sized genSwarmSpecTaskDefaults + +genSwarmSpecTaskDefaults :: Int -> Gen SwarmSpecTaskDefaults +genSwarmSpecTaskDefaults n = + SwarmSpecTaskDefaults + <$> arbitraryReducedMaybe n -- swarmSpecTaskDefaultsLogDriver :: Maybe SwarmSpecTaskDefaultsLogDriver + +instance Arbitrary SwarmSpecTaskDefaultsLogDriver where + arbitrary = sized genSwarmSpecTaskDefaultsLogDriver + +genSwarmSpecTaskDefaultsLogDriver :: Int -> Gen SwarmSpecTaskDefaultsLogDriver +genSwarmSpecTaskDefaultsLogDriver n = + SwarmSpecTaskDefaultsLogDriver + <$> arbitraryReducedMaybe n -- swarmSpecTaskDefaultsLogDriverName :: Maybe Text + <*> arbitraryReducedMaybe n -- swarmSpecTaskDefaultsLogDriverOptions :: Maybe (Map.Map String Text) + +instance Arbitrary SwarmUnlockRequest where + arbitrary = sized genSwarmUnlockRequest + +genSwarmUnlockRequest :: Int -> Gen SwarmUnlockRequest +genSwarmUnlockRequest n = + SwarmUnlockRequest + <$> arbitraryReducedMaybe n -- swarmUnlockRequestUnlockKey :: Maybe Text + +instance Arbitrary SystemAuthResponse where + arbitrary = sized genSystemAuthResponse + +genSystemAuthResponse :: Int -> Gen SystemAuthResponse +genSystemAuthResponse n = + SystemAuthResponse + <$> arbitrary -- systemAuthResponseStatus :: Text + <*> arbitraryReducedMaybe n -- systemAuthResponseIdentityToken :: Maybe Text + +instance Arbitrary SystemDataUsageResponse where + arbitrary = sized genSystemDataUsageResponse + +genSystemDataUsageResponse :: Int -> Gen SystemDataUsageResponse +genSystemDataUsageResponse n = + SystemDataUsageResponse + <$> arbitraryReducedMaybe n -- systemDataUsageResponseLayersSize :: Maybe Integer + <*> arbitraryReducedMaybe n -- systemDataUsageResponseImages :: Maybe [ImageSummary] + <*> arbitraryReducedMaybe n -- systemDataUsageResponseContainers :: Maybe [ContainerSummary] + <*> arbitraryReducedMaybe n -- systemDataUsageResponseVolumes :: Maybe [Volume] + <*> arbitraryReducedMaybe n -- systemDataUsageResponseBuildCache :: Maybe [BuildCache] + +instance Arbitrary SystemInfo where + arbitrary = sized genSystemInfo + +genSystemInfo :: Int -> Gen SystemInfo +genSystemInfo n = + SystemInfo + <$> arbitraryReducedMaybe n -- systemInfoId :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoContainers :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoContainersRunning :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoContainersPaused :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoContainersStopped :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoImages :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoDriverStatus :: Maybe [[Text]] + <*> arbitraryReducedMaybe n -- systemInfoDockerRootDir :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoPlugins :: Maybe PluginsInfo + <*> arbitraryReducedMaybe n -- systemInfoMemoryLimit :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoSwapLimit :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoKernelMemoryTcp :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoCpuCfsPeriod :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoCpuCfsQuota :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoCpuShares :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoCpuSet :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoPidsLimit :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoOomKillDisable :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoIpv4Forwarding :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoBridgeNfIptables :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoBridgeNfIp6tables :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoDebug :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoNfd :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoNGoroutines :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoSystemTime :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoLoggingDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoCgroupDriver :: Maybe E'CgroupDriver + <*> arbitraryReducedMaybe n -- systemInfoCgroupVersion :: Maybe E'CgroupVersion + <*> arbitraryReducedMaybe n -- systemInfoNEventsListener :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoKernelVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoOperatingSystem :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoOsVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoOsType :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoArchitecture :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoNcpu :: Maybe Int + <*> arbitraryReducedMaybe n -- systemInfoMemTotal :: Maybe Integer + <*> arbitraryReducedMaybe n -- systemInfoIndexServerAddress :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoRegistryConfig :: Maybe RegistryServiceConfig + <*> arbitraryReducedMaybe n -- systemInfoGenericResources :: Maybe [GenericResourcesInner] + <*> arbitraryReducedMaybe n -- systemInfoHttpProxy :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoHttpsProxy :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoNoProxy :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoName :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoLabels :: Maybe [Text] + <*> arbitraryReducedMaybe n -- systemInfoExperimentalBuild :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoServerVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoRuntimes :: Maybe (Map.Map String Runtime) + <*> arbitraryReducedMaybe n -- systemInfoDefaultRuntime :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoSwarm :: Maybe SwarmInfo + <*> arbitraryReducedMaybe n -- systemInfoLiveRestoreEnabled :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemInfoIsolation :: Maybe E'Isolation2 + <*> arbitraryReducedMaybe n -- systemInfoInitBinary :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoContainerdCommit :: Maybe Commit + <*> arbitraryReducedMaybe n -- systemInfoRuncCommit :: Maybe Commit + <*> arbitraryReducedMaybe n -- systemInfoInitCommit :: Maybe Commit + <*> arbitraryReducedMaybe n -- systemInfoSecurityOptions :: Maybe [Text] + <*> arbitraryReducedMaybe n -- systemInfoProductLicense :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoDefaultAddressPools :: Maybe [SystemInfoDefaultAddressPoolsInner] + <*> arbitraryReducedMaybe n -- systemInfoWarnings :: Maybe [Text] + <*> arbitraryReducedMaybe n -- systemInfoCdiSpecDirs :: Maybe [Text] + <*> arbitraryReducedMaybe n -- systemInfoContainerd :: Maybe ContainerdInfo + +instance Arbitrary SystemInfoDefaultAddressPoolsInner where + arbitrary = sized genSystemInfoDefaultAddressPoolsInner + +genSystemInfoDefaultAddressPoolsInner :: Int -> Gen SystemInfoDefaultAddressPoolsInner +genSystemInfoDefaultAddressPoolsInner n = + SystemInfoDefaultAddressPoolsInner + <$> arbitraryReducedMaybe n -- systemInfoDefaultAddressPoolsInnerBase :: Maybe Text + <*> arbitraryReducedMaybe n -- systemInfoDefaultAddressPoolsInnerSize :: Maybe Int + +instance Arbitrary SystemVersion where + arbitrary = sized genSystemVersion + +genSystemVersion :: Int -> Gen SystemVersion +genSystemVersion n = + SystemVersion + <$> arbitraryReducedMaybe n -- systemVersionPlatform :: Maybe SystemVersionPlatform + <*> arbitraryReducedMaybe n -- systemVersionComponents :: Maybe [SystemVersionComponentsInner] + <*> arbitraryReducedMaybe n -- systemVersionVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionApiVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionMinApiVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionGitCommit :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionGoVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionOs :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionArch :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionKernelVersion :: Maybe Text + <*> arbitraryReducedMaybe n -- systemVersionExperimental :: Maybe Bool + <*> arbitraryReducedMaybe n -- systemVersionBuildTime :: Maybe Text + +instance Arbitrary SystemVersionComponentsInner where + arbitrary = sized genSystemVersionComponentsInner + +genSystemVersionComponentsInner :: Int -> Gen SystemVersionComponentsInner +genSystemVersionComponentsInner n = + SystemVersionComponentsInner + <$> arbitrary -- systemVersionComponentsInnerName :: Text + <*> arbitrary -- systemVersionComponentsInnerVersion :: Text + <*> arbitraryReducedMaybeValue n -- systemVersionComponentsInnerDetails :: Maybe A.Value + +instance Arbitrary SystemVersionPlatform where + arbitrary = sized genSystemVersionPlatform + +genSystemVersionPlatform :: Int -> Gen SystemVersionPlatform +genSystemVersionPlatform n = + SystemVersionPlatform + <$> arbitrary -- systemVersionPlatformName :: Text + +instance Arbitrary TLSInfo where + arbitrary = sized genTLSInfo + +genTLSInfo :: Int -> Gen TLSInfo +genTLSInfo n = + TLSInfo + <$> arbitraryReducedMaybe n -- tLSInfoTrustRoot :: Maybe Text + <*> arbitraryReducedMaybe n -- tLSInfoCertIssuerSubject :: Maybe Text + <*> arbitraryReducedMaybe n -- tLSInfoCertIssuerPublicKey :: Maybe Text + +instance Arbitrary Task where + arbitrary = sized genTask + +genTask :: Int -> Gen Task +genTask n = + Task + <$> arbitraryReducedMaybe n -- taskId :: Maybe Text + <*> arbitraryReducedMaybe n -- taskVersion :: Maybe ObjectVersion + <*> arbitraryReducedMaybe n -- taskCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- taskUpdatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- taskName :: Maybe Text + <*> arbitraryReducedMaybe n -- taskLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- taskSpec :: Maybe TaskSpec + <*> arbitraryReducedMaybe n -- taskServiceId :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSlot :: Maybe Int + <*> arbitraryReducedMaybe n -- taskNodeId :: Maybe Text + <*> arbitraryReducedMaybe n -- taskAssignedGenericResources :: Maybe [GenericResourcesInner] + <*> arbitraryReducedMaybe n -- taskStatus :: Maybe TaskStatus + <*> arbitraryReducedMaybe n -- taskDesiredState :: Maybe TaskState + <*> arbitraryReducedMaybe n -- taskJobIteration :: Maybe ObjectVersion + +instance Arbitrary TaskSpec where + arbitrary = sized genTaskSpec + +genTaskSpec :: Int -> Gen TaskSpec +genTaskSpec n = + TaskSpec + <$> arbitraryReducedMaybe n -- taskSpecPluginSpec :: Maybe TaskSpecPluginSpec + <*> arbitraryReducedMaybe n -- taskSpecContainerSpec :: Maybe TaskSpecContainerSpec + <*> arbitraryReducedMaybe n -- taskSpecNetworkAttachmentSpec :: Maybe TaskSpecNetworkAttachmentSpec + <*> arbitraryReducedMaybe n -- taskSpecResources :: Maybe TaskSpecResources + <*> arbitraryReducedMaybe n -- taskSpecRestartPolicy :: Maybe TaskSpecRestartPolicy + <*> arbitraryReducedMaybe n -- taskSpecPlacement :: Maybe TaskSpecPlacement + <*> arbitraryReducedMaybe n -- taskSpecForceUpdate :: Maybe Int + <*> arbitraryReducedMaybe n -- taskSpecRuntime :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecNetworks :: Maybe [NetworkAttachmentConfig] + <*> arbitraryReducedMaybe n -- taskSpecLogDriver :: Maybe TaskSpecLogDriver + +instance Arbitrary TaskSpecContainerSpec where + arbitrary = sized genTaskSpecContainerSpec + +genTaskSpecContainerSpec :: Int -> Gen TaskSpecContainerSpec +genTaskSpecContainerSpec n = + TaskSpecContainerSpec + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecImage :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecCommand :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecArgs :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecHostname :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecEnv :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecDir :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecUser :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecGroups :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivileges :: Maybe TaskSpecContainerSpecPrivileges + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecTty :: Maybe Bool + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecOpenStdin :: Maybe Bool + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecReadOnly :: Maybe Bool + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecMounts :: Maybe [Mount] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecStopSignal :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecStopGracePeriod :: Maybe Integer + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecHealthCheck :: Maybe HealthConfig + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecHosts :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecDnsConfig :: Maybe TaskSpecContainerSpecDNSConfig + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSecrets :: Maybe [TaskSpecContainerSpecSecretsInner] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecOomScoreAdj :: Maybe Integer + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigs :: Maybe [TaskSpecContainerSpecConfigsInner] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecIsolation :: Maybe E'Isolation3 + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecInit :: Maybe Bool + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSysctls :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecCapabilityAdd :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecCapabilityDrop :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecUlimits :: Maybe [ResourcesUlimitsInner] + +instance Arbitrary TaskSpecContainerSpecConfigsInner where + arbitrary = sized genTaskSpecContainerSpecConfigsInner + +genTaskSpecContainerSpecConfigsInner :: Int -> Gen TaskSpecContainerSpecConfigsInner +genTaskSpecContainerSpecConfigsInner n = + TaskSpecContainerSpecConfigsInner + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerFile :: Maybe TaskSpecContainerSpecConfigsInnerFile + <*> arbitraryReducedMaybeValue n -- taskSpecContainerSpecConfigsInnerRuntime :: Maybe A.Value + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerConfigId :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerConfigName :: Maybe Text + +instance Arbitrary TaskSpecContainerSpecConfigsInnerFile where + arbitrary = sized genTaskSpecContainerSpecConfigsInnerFile + +genTaskSpecContainerSpecConfigsInnerFile :: Int -> Gen TaskSpecContainerSpecConfigsInnerFile +genTaskSpecContainerSpecConfigsInnerFile n = + TaskSpecContainerSpecConfigsInnerFile + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerFileName :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerFileUid :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerFileGid :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecConfigsInnerFileMode :: Maybe Int + +instance Arbitrary TaskSpecContainerSpecDNSConfig where + arbitrary = sized genTaskSpecContainerSpecDNSConfig + +genTaskSpecContainerSpecDNSConfig :: Int -> Gen TaskSpecContainerSpecDNSConfig +genTaskSpecContainerSpecDNSConfig n = + TaskSpecContainerSpecDNSConfig + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecDNSConfigNameservers :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecDNSConfigSearch :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecDNSConfigOptions :: Maybe [Text] + +instance Arbitrary TaskSpecContainerSpecPrivileges where + arbitrary = sized genTaskSpecContainerSpecPrivileges + +genTaskSpecContainerSpecPrivileges :: Int -> Gen TaskSpecContainerSpecPrivileges +genTaskSpecContainerSpecPrivileges n = + TaskSpecContainerSpecPrivileges + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesCredentialSpec :: Maybe TaskSpecContainerSpecPrivilegesCredentialSpec + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSeLinuxContext :: Maybe TaskSpecContainerSpecPrivilegesSELinuxContext + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSeccomp :: Maybe TaskSpecContainerSpecPrivilegesSeccomp + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesAppArmor :: Maybe TaskSpecContainerSpecPrivilegesAppArmor + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesNoNewPrivileges :: Maybe Bool + +instance Arbitrary TaskSpecContainerSpecPrivilegesAppArmor where + arbitrary = sized genTaskSpecContainerSpecPrivilegesAppArmor + +genTaskSpecContainerSpecPrivilegesAppArmor :: Int -> Gen TaskSpecContainerSpecPrivilegesAppArmor +genTaskSpecContainerSpecPrivilegesAppArmor n = + TaskSpecContainerSpecPrivilegesAppArmor + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesAppArmorMode :: Maybe E'Mode3 + +instance Arbitrary TaskSpecContainerSpecPrivilegesCredentialSpec where + arbitrary = sized genTaskSpecContainerSpecPrivilegesCredentialSpec + +genTaskSpecContainerSpecPrivilegesCredentialSpec :: Int -> Gen TaskSpecContainerSpecPrivilegesCredentialSpec +genTaskSpecContainerSpecPrivilegesCredentialSpec n = + TaskSpecContainerSpecPrivilegesCredentialSpec + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesCredentialSpecConfig :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesCredentialSpecFile :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesCredentialSpecRegistry :: Maybe Text + +instance Arbitrary TaskSpecContainerSpecPrivilegesSELinuxContext where + arbitrary = sized genTaskSpecContainerSpecPrivilegesSELinuxContext + +genTaskSpecContainerSpecPrivilegesSELinuxContext :: Int -> Gen TaskSpecContainerSpecPrivilegesSELinuxContext +genTaskSpecContainerSpecPrivilegesSELinuxContext n = + TaskSpecContainerSpecPrivilegesSELinuxContext + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSELinuxContextDisable :: Maybe Bool + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSELinuxContextUser :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSELinuxContextRole :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSELinuxContextType :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSELinuxContextLevel :: Maybe Text + +instance Arbitrary TaskSpecContainerSpecPrivilegesSeccomp where + arbitrary = sized genTaskSpecContainerSpecPrivilegesSeccomp + +genTaskSpecContainerSpecPrivilegesSeccomp :: Int -> Gen TaskSpecContainerSpecPrivilegesSeccomp +genTaskSpecContainerSpecPrivilegesSeccomp n = + TaskSpecContainerSpecPrivilegesSeccomp + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSeccompMode :: Maybe E'Mode2 + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecPrivilegesSeccompProfile :: Maybe Text + +instance Arbitrary TaskSpecContainerSpecSecretsInner where + arbitrary = sized genTaskSpecContainerSpecSecretsInner + +genTaskSpecContainerSpecSecretsInner :: Int -> Gen TaskSpecContainerSpecSecretsInner +genTaskSpecContainerSpecSecretsInner n = + TaskSpecContainerSpecSecretsInner + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerFile :: Maybe TaskSpecContainerSpecSecretsInnerFile + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerSecretId :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerSecretName :: Maybe Text + +instance Arbitrary TaskSpecContainerSpecSecretsInnerFile where + arbitrary = sized genTaskSpecContainerSpecSecretsInnerFile + +genTaskSpecContainerSpecSecretsInnerFile :: Int -> Gen TaskSpecContainerSpecSecretsInnerFile +genTaskSpecContainerSpecSecretsInnerFile n = + TaskSpecContainerSpecSecretsInnerFile + <$> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerFileName :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerFileUid :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerFileGid :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecContainerSpecSecretsInnerFileMode :: Maybe Int + +instance Arbitrary TaskSpecLogDriver where + arbitrary = sized genTaskSpecLogDriver + +genTaskSpecLogDriver :: Int -> Gen TaskSpecLogDriver +genTaskSpecLogDriver n = + TaskSpecLogDriver + <$> arbitraryReducedMaybe n -- taskSpecLogDriverName :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecLogDriverOptions :: Maybe (Map.Map String Text) + +instance Arbitrary TaskSpecNetworkAttachmentSpec where + arbitrary = sized genTaskSpecNetworkAttachmentSpec + +genTaskSpecNetworkAttachmentSpec :: Int -> Gen TaskSpecNetworkAttachmentSpec +genTaskSpecNetworkAttachmentSpec n = + TaskSpecNetworkAttachmentSpec + <$> arbitraryReducedMaybe n -- taskSpecNetworkAttachmentSpecContainerId :: Maybe Text + +instance Arbitrary TaskSpecPlacement where + arbitrary = sized genTaskSpecPlacement + +genTaskSpecPlacement :: Int -> Gen TaskSpecPlacement +genTaskSpecPlacement n = + TaskSpecPlacement + <$> arbitraryReducedMaybe n -- taskSpecPlacementConstraints :: Maybe [Text] + <*> arbitraryReducedMaybe n -- taskSpecPlacementPreferences :: Maybe [TaskSpecPlacementPreferencesInner] + <*> arbitraryReducedMaybe n -- taskSpecPlacementMaxReplicas :: Maybe Integer + <*> arbitraryReducedMaybe n -- taskSpecPlacementPlatforms :: Maybe [Platform] + +instance Arbitrary TaskSpecPlacementPreferencesInner where + arbitrary = sized genTaskSpecPlacementPreferencesInner + +genTaskSpecPlacementPreferencesInner :: Int -> Gen TaskSpecPlacementPreferencesInner +genTaskSpecPlacementPreferencesInner n = + TaskSpecPlacementPreferencesInner + <$> arbitraryReducedMaybe n -- taskSpecPlacementPreferencesInnerSpread :: Maybe TaskSpecPlacementPreferencesInnerSpread + +instance Arbitrary TaskSpecPlacementPreferencesInnerSpread where + arbitrary = sized genTaskSpecPlacementPreferencesInnerSpread + +genTaskSpecPlacementPreferencesInnerSpread :: Int -> Gen TaskSpecPlacementPreferencesInnerSpread +genTaskSpecPlacementPreferencesInnerSpread n = + TaskSpecPlacementPreferencesInnerSpread + <$> arbitraryReducedMaybe n -- taskSpecPlacementPreferencesInnerSpreadSpreadDescriptor :: Maybe Text + +instance Arbitrary TaskSpecPluginSpec where + arbitrary = sized genTaskSpecPluginSpec + +genTaskSpecPluginSpec :: Int -> Gen TaskSpecPluginSpec +genTaskSpecPluginSpec n = + TaskSpecPluginSpec + <$> arbitraryReducedMaybe n -- taskSpecPluginSpecName :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecPluginSpecRemote :: Maybe Text + <*> arbitraryReducedMaybe n -- taskSpecPluginSpecDisabled :: Maybe Bool + <*> arbitraryReducedMaybe n -- taskSpecPluginSpecPluginPrivilege :: Maybe [PluginPrivilege] + +instance Arbitrary TaskSpecResources where + arbitrary = sized genTaskSpecResources + +genTaskSpecResources :: Int -> Gen TaskSpecResources +genTaskSpecResources n = + TaskSpecResources + <$> arbitraryReducedMaybe n -- taskSpecResourcesLimits :: Maybe Limit + <*> arbitraryReducedMaybe n -- taskSpecResourcesReservations :: Maybe ResourceObject + +instance Arbitrary TaskSpecRestartPolicy where + arbitrary = sized genTaskSpecRestartPolicy + +genTaskSpecRestartPolicy :: Int -> Gen TaskSpecRestartPolicy +genTaskSpecRestartPolicy n = + TaskSpecRestartPolicy + <$> arbitraryReducedMaybe n -- taskSpecRestartPolicyCondition :: Maybe E'Condition + <*> arbitraryReducedMaybe n -- taskSpecRestartPolicyDelay :: Maybe Integer + <*> arbitraryReducedMaybe n -- taskSpecRestartPolicyMaxAttempts :: Maybe Integer + <*> arbitraryReducedMaybe n -- taskSpecRestartPolicyWindow :: Maybe Integer + +instance Arbitrary TaskStatus where + arbitrary = sized genTaskStatus + +genTaskStatus :: Int -> Gen TaskStatus +genTaskStatus n = + TaskStatus + <$> arbitraryReducedMaybe n -- taskStatusTimestamp :: Maybe Text + <*> arbitraryReducedMaybe n -- taskStatusState :: Maybe TaskState + <*> arbitraryReducedMaybe n -- taskStatusMessage :: Maybe Text + <*> arbitraryReducedMaybe n -- taskStatusErr :: Maybe Text + <*> arbitraryReducedMaybe n -- taskStatusContainerStatus :: Maybe ContainerStatus + <*> arbitraryReducedMaybe n -- taskStatusPortStatus :: Maybe PortStatus + +instance Arbitrary ThrottleDevice where + arbitrary = sized genThrottleDevice + +genThrottleDevice :: Int -> Gen ThrottleDevice +genThrottleDevice n = + ThrottleDevice + <$> arbitraryReducedMaybe n -- throttleDevicePath :: Maybe Text + <*> arbitraryReducedMaybe n -- throttleDeviceRate :: Maybe Integer + +instance Arbitrary UnlockKeyResponse where + arbitrary = sized genUnlockKeyResponse + +genUnlockKeyResponse :: Int -> Gen UnlockKeyResponse +genUnlockKeyResponse n = + UnlockKeyResponse + <$> arbitraryReducedMaybe n -- unlockKeyResponseUnlockKey :: Maybe Text + +instance Arbitrary Volume where + arbitrary = sized genVolume + +genVolume :: Int -> Gen Volume +genVolume n = + Volume + <$> arbitrary -- volumeName :: Text + <*> arbitrary -- volumeDriver :: Text + <*> arbitrary -- volumeMountpoint :: Text + <*> arbitraryReducedMaybe n -- volumeCreatedAt :: Maybe Text + <*> arbitraryReducedMaybe n -- volumeStatus :: Maybe (Map.Map String A.Value) + <*> arbitrary -- volumeLabels :: (Map.Map String Text) + <*> arbitrary -- volumeScope :: E'Scope + <*> arbitraryReducedMaybe n -- volumeClusterVolume :: Maybe ClusterVolume + <*> arbitrary -- volumeOptions :: (Map.Map String Text) + <*> arbitraryReducedMaybe n -- volumeUsageData :: Maybe VolumeUsageData + +instance Arbitrary VolumeCreateOptions where + arbitrary = sized genVolumeCreateOptions + +genVolumeCreateOptions :: Int -> Gen VolumeCreateOptions +genVolumeCreateOptions n = + VolumeCreateOptions + <$> arbitraryReducedMaybe n -- volumeCreateOptionsName :: Maybe Text + <*> arbitraryReducedMaybe n -- volumeCreateOptionsDriver :: Maybe Text + <*> arbitraryReducedMaybe n -- volumeCreateOptionsDriverOpts :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- volumeCreateOptionsLabels :: Maybe (Map.Map String Text) + <*> arbitraryReducedMaybe n -- volumeCreateOptionsClusterVolumeSpec :: Maybe ClusterVolumeSpec + +instance Arbitrary VolumeListResponse where + arbitrary = sized genVolumeListResponse + +genVolumeListResponse :: Int -> Gen VolumeListResponse +genVolumeListResponse n = + VolumeListResponse + <$> arbitraryReducedMaybe n -- volumeListResponseVolumes :: Maybe [Volume] + <*> arbitraryReducedMaybe n -- volumeListResponseWarnings :: Maybe [Text] + +instance Arbitrary VolumePruneResponse where + arbitrary = sized genVolumePruneResponse + +genVolumePruneResponse :: Int -> Gen VolumePruneResponse +genVolumePruneResponse n = + VolumePruneResponse + <$> arbitraryReducedMaybe n -- volumePruneResponseVolumesDeleted :: Maybe [Text] + <*> arbitraryReducedMaybe n -- volumePruneResponseSpaceReclaimed :: Maybe Integer + +instance Arbitrary VolumeUpdateRequest where + arbitrary = sized genVolumeUpdateRequest + +genVolumeUpdateRequest :: Int -> Gen VolumeUpdateRequest +genVolumeUpdateRequest n = + VolumeUpdateRequest + <$> arbitraryReducedMaybe n -- volumeUpdateRequestSpec :: Maybe ClusterVolumeSpec + +instance Arbitrary VolumeUsageData where + arbitrary = sized genVolumeUsageData + +genVolumeUsageData :: Int -> Gen VolumeUsageData +genVolumeUsageData n = + VolumeUsageData + <$> arbitrary -- volumeUsageDataSize :: Integer + <*> arbitrary -- volumeUsageDataRefCount :: Integer + + + + +instance Arbitrary ChangeType where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Availability where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'CgroupDriver where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'CgroupVersion where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'CgroupnsMode where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Condition where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Condition2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'ContentType where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'FailureAction where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'FailureAction2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Isolation where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Isolation2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Isolation3 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Mode where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Mode2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Mode3 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Name where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Order where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Propagation where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Protocol where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'ProtocolScheme where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'PublishMode where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'RegistryAuthFrom where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Role where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Scope where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Scope2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Scope3 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Sharing where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'State where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'State2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Status where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Status2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Swarm where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Type where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Type2 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Type3 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Type4 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Type5 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary E'Type6 where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary LocalNodeState where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary NodeState where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary Reachability where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary TaskState where + arbitrary = arbitraryBoundedEnum + +instance Arbitrary (HM.HashMap String String) where arbitrary = HM.fromList <$> arbitrary diff --git a/v1.46/tests/PropMime.hs b/v1.46/tests/PropMime.hs new file mode 100644 index 0000000..eca4411 --- /dev/null +++ b/v1.46/tests/PropMime.hs @@ -0,0 +1,51 @@ +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE ConstraintKinds #-} +{-# OPTIONS_GHC -fno-warn-unused-imports #-} + +module PropMime where + +import Data.Aeson +import Data.Aeson.Types (parseEither) +import Data.Monoid ((<>)) +import Data.Typeable (Proxy(..), typeOf, Typeable) +import qualified Data.ByteString.Lazy.Char8 as BL8 +import Test.Hspec +import Test.QuickCheck +import Test.QuickCheck.Property +import Test.Hspec.QuickCheck (prop) + +import DockerEngine.MimeTypes + +import ApproxEq + +-- * Type Aliases + +type ArbitraryMime mime a = ArbitraryRoundtrip (MimeUnrender mime) (MimeRender mime) a + +type ArbitraryRoundtrip from to a = (from a, to a, Arbitrary' a) + +type Arbitrary' a = (Arbitrary a, Show a, Typeable a) + +-- * Mime + +propMime + :: forall a b mime. + (ArbitraryMime mime a, Testable b) + => String -> (a -> a -> b) -> mime -> Proxy a -> Spec +propMime eqDescr eq m _ = + prop + (show (typeOf (undefined :: a)) <> " " <> show (typeOf (undefined :: mime)) <> " roundtrip " <> eqDescr) $ + \(x :: a) -> + let rendered = mimeRender' m x + actual = mimeUnrender' m rendered + expected = Right x + failMsg = + "ACTUAL: " <> show actual <> "\nRENDERED: " <> BL8.unpack rendered + in counterexample failMsg $ + either reject property (eq <$> actual <*> expected) + where + reject = property . const rejected + +propMimeEq :: (ArbitraryMime mime a, Eq a) => mime -> Proxy a -> Spec +propMimeEq = propMime "(EQ)" (==) diff --git a/v1.46/tests/Test.hs b/v1.46/tests/Test.hs new file mode 100644 index 0000000..f29fd85 --- /dev/null +++ b/v1.46/tests/Test.hs @@ -0,0 +1,234 @@ +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} +{-# LANGUAGE PartialTypeSignatures #-} + +module Main where + +import Data.Typeable (Proxy(..)) +import Test.Hspec +import Test.Hspec.QuickCheck + +import PropMime +import Instances () + +import DockerEngine.Model +import DockerEngine.MimeTypes + +main :: IO () +main = + hspec $ modifyMaxSize (const 10) $ do + describe "JSON instances" $ do + pure () + propMimeEq MimeJSON (Proxy :: Proxy Address) + propMimeEq MimeJSON (Proxy :: Proxy AuthConfig) + propMimeEq MimeJSON (Proxy :: Proxy BuildCache) + propMimeEq MimeJSON (Proxy :: Proxy BuildInfo) + propMimeEq MimeJSON (Proxy :: Proxy BuildPruneResponse) + propMimeEq MimeJSON (Proxy :: Proxy ChangeType) + propMimeEq MimeJSON (Proxy :: Proxy ClusterInfo) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolume) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumeInfo) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumePublishStatusInner) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumeSpec) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumeSpecAccessMode) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumeSpecAccessModeAccessibilityRequirements) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumeSpecAccessModeCapacityRange) + propMimeEq MimeJSON (Proxy :: Proxy ClusterVolumeSpecAccessModeSecretsInner) + propMimeEq MimeJSON (Proxy :: Proxy Commit) + propMimeEq MimeJSON (Proxy :: Proxy Config) + propMimeEq MimeJSON (Proxy :: Proxy ConfigCreateRequest) + propMimeEq MimeJSON (Proxy :: Proxy ConfigReference) + propMimeEq MimeJSON (Proxy :: Proxy ConfigSpec) + propMimeEq MimeJSON (Proxy :: Proxy ContainerConfig) + propMimeEq MimeJSON (Proxy :: Proxy ContainerCreateRequest) + propMimeEq MimeJSON (Proxy :: Proxy ContainerCreateResponse) + propMimeEq MimeJSON (Proxy :: Proxy ContainerInspectResponse) + propMimeEq MimeJSON (Proxy :: Proxy ContainerPruneResponse) + propMimeEq MimeJSON (Proxy :: Proxy ContainerState) + propMimeEq MimeJSON (Proxy :: Proxy ContainerStatus) + propMimeEq MimeJSON (Proxy :: Proxy ContainerSummary) + propMimeEq MimeJSON (Proxy :: Proxy ContainerSummaryHostConfig) + propMimeEq MimeJSON (Proxy :: Proxy ContainerSummaryNetworkSettings) + propMimeEq MimeJSON (Proxy :: Proxy ContainerTopResponse) + propMimeEq MimeJSON (Proxy :: Proxy ContainerUpdateRequest) + propMimeEq MimeJSON (Proxy :: Proxy ContainerUpdateResponse) + propMimeEq MimeJSON (Proxy :: Proxy ContainerWaitExitError) + propMimeEq MimeJSON (Proxy :: Proxy ContainerWaitResponse) + propMimeEq MimeJSON (Proxy :: Proxy ContainerdInfo) + propMimeEq MimeJSON (Proxy :: Proxy ContainerdInfoNamespaces) + propMimeEq MimeJSON (Proxy :: Proxy CreateImageInfo) + propMimeEq MimeJSON (Proxy :: Proxy DeviceMapping) + propMimeEq MimeJSON (Proxy :: Proxy DeviceRequest) + propMimeEq MimeJSON (Proxy :: Proxy DistributionInspect) + propMimeEq MimeJSON (Proxy :: Proxy Driver) + propMimeEq MimeJSON (Proxy :: Proxy EndpointIPAMConfig) + propMimeEq MimeJSON (Proxy :: Proxy EndpointPortConfig) + propMimeEq MimeJSON (Proxy :: Proxy EndpointSettings) + propMimeEq MimeJSON (Proxy :: Proxy EndpointSpec) + propMimeEq MimeJSON (Proxy :: Proxy EngineDescription) + propMimeEq MimeJSON (Proxy :: Proxy EngineDescriptionPluginsInner) + propMimeEq MimeJSON (Proxy :: Proxy ErrorDetail) + propMimeEq MimeJSON (Proxy :: Proxy ErrorResponse) + propMimeEq MimeJSON (Proxy :: Proxy EventActor) + propMimeEq MimeJSON (Proxy :: Proxy EventMessage) + propMimeEq MimeJSON (Proxy :: Proxy ExecConfig) + propMimeEq MimeJSON (Proxy :: Proxy ExecInspectResponse) + propMimeEq MimeJSON (Proxy :: Proxy ExecStartConfig) + propMimeEq MimeJSON (Proxy :: Proxy FilesystemChange) + propMimeEq MimeJSON (Proxy :: Proxy GenericResourcesInner) + propMimeEq MimeJSON (Proxy :: Proxy GenericResourcesInnerDiscreteResourceSpec) + propMimeEq MimeJSON (Proxy :: Proxy GenericResourcesInnerNamedResourceSpec) + propMimeEq MimeJSON (Proxy :: Proxy GraphDriverData) + propMimeEq MimeJSON (Proxy :: Proxy Health) + propMimeEq MimeJSON (Proxy :: Proxy HealthConfig) + propMimeEq MimeJSON (Proxy :: Proxy HealthcheckResult) + propMimeEq MimeJSON (Proxy :: Proxy HistoryResponseItem) + propMimeEq MimeJSON (Proxy :: Proxy HostConfig) + propMimeEq MimeJSON (Proxy :: Proxy HostConfigAllOfLogConfig) + propMimeEq MimeJSON (Proxy :: Proxy IPAM) + propMimeEq MimeJSON (Proxy :: Proxy IPAMConfig) + propMimeEq MimeJSON (Proxy :: Proxy IdResponse) + propMimeEq MimeJSON (Proxy :: Proxy ImageConfig) + propMimeEq MimeJSON (Proxy :: Proxy ImageDeleteResponseItem) + propMimeEq MimeJSON (Proxy :: Proxy ImageID) + propMimeEq MimeJSON (Proxy :: Proxy ImageInspect) + propMimeEq MimeJSON (Proxy :: Proxy ImageInspectMetadata) + propMimeEq MimeJSON (Proxy :: Proxy ImageInspectRootFS) + propMimeEq MimeJSON (Proxy :: Proxy ImagePruneResponse) + propMimeEq MimeJSON (Proxy :: Proxy ImageSearchResponseItem) + propMimeEq MimeJSON (Proxy :: Proxy ImageSummary) + propMimeEq MimeJSON (Proxy :: Proxy IndexInfo) + propMimeEq MimeJSON (Proxy :: Proxy JoinTokens) + propMimeEq MimeJSON (Proxy :: Proxy Limit) + propMimeEq MimeJSON (Proxy :: Proxy LocalNodeState) + propMimeEq MimeJSON (Proxy :: Proxy ManagerStatus) + propMimeEq MimeJSON (Proxy :: Proxy Mount) + propMimeEq MimeJSON (Proxy :: Proxy MountBindOptions) + propMimeEq MimeJSON (Proxy :: Proxy MountPoint) + propMimeEq MimeJSON (Proxy :: Proxy MountTmpfsOptions) + propMimeEq MimeJSON (Proxy :: Proxy MountVolumeOptions) + propMimeEq MimeJSON (Proxy :: Proxy MountVolumeOptionsDriverConfig) + propMimeEq MimeJSON (Proxy :: Proxy Network) + propMimeEq MimeJSON (Proxy :: Proxy NetworkAttachmentConfig) + propMimeEq MimeJSON (Proxy :: Proxy NetworkConnectRequest) + propMimeEq MimeJSON (Proxy :: Proxy NetworkContainer) + propMimeEq MimeJSON (Proxy :: Proxy NetworkCreateRequest) + propMimeEq MimeJSON (Proxy :: Proxy NetworkCreateResponse) + propMimeEq MimeJSON (Proxy :: Proxy NetworkDisconnectRequest) + propMimeEq MimeJSON (Proxy :: Proxy NetworkPruneResponse) + propMimeEq MimeJSON (Proxy :: Proxy NetworkSettings) + propMimeEq MimeJSON (Proxy :: Proxy NetworkingConfig) + propMimeEq MimeJSON (Proxy :: Proxy Node) + propMimeEq MimeJSON (Proxy :: Proxy NodeDescription) + propMimeEq MimeJSON (Proxy :: Proxy NodeSpec) + propMimeEq MimeJSON (Proxy :: Proxy NodeState) + propMimeEq MimeJSON (Proxy :: Proxy NodeStatus) + propMimeEq MimeJSON (Proxy :: Proxy OCIDescriptor) + propMimeEq MimeJSON (Proxy :: Proxy OCIPlatform) + propMimeEq MimeJSON (Proxy :: Proxy ObjectVersion) + propMimeEq MimeJSON (Proxy :: Proxy PeerInfo) + propMimeEq MimeJSON (Proxy :: Proxy PeerNode) + propMimeEq MimeJSON (Proxy :: Proxy Platform) + propMimeEq MimeJSON (Proxy :: Proxy Plugin) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfig) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfigArgs) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfigInterface) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfigLinux) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfigNetwork) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfigRootfs) + propMimeEq MimeJSON (Proxy :: Proxy PluginConfigUser) + propMimeEq MimeJSON (Proxy :: Proxy PluginDevice) + propMimeEq MimeJSON (Proxy :: Proxy PluginEnv) + propMimeEq MimeJSON (Proxy :: Proxy PluginInterfaceType) + propMimeEq MimeJSON (Proxy :: Proxy PluginMount) + propMimeEq MimeJSON (Proxy :: Proxy PluginPrivilege) + propMimeEq MimeJSON (Proxy :: Proxy PluginSettings) + propMimeEq MimeJSON (Proxy :: Proxy PluginsInfo) + propMimeEq MimeJSON (Proxy :: Proxy Port) + propMimeEq MimeJSON (Proxy :: Proxy PortBinding) + propMimeEq MimeJSON (Proxy :: Proxy PortStatus) + propMimeEq MimeJSON (Proxy :: Proxy ProcessConfig) + propMimeEq MimeJSON (Proxy :: Proxy ProgressDetail) + propMimeEq MimeJSON (Proxy :: Proxy PushImageInfo) + propMimeEq MimeJSON (Proxy :: Proxy Reachability) + propMimeEq MimeJSON (Proxy :: Proxy RegistryServiceConfig) + propMimeEq MimeJSON (Proxy :: Proxy ResourceObject) + propMimeEq MimeJSON (Proxy :: Proxy Resources) + propMimeEq MimeJSON (Proxy :: Proxy ResourcesBlkioWeightDeviceInner) + propMimeEq MimeJSON (Proxy :: Proxy ResourcesUlimitsInner) + propMimeEq MimeJSON (Proxy :: Proxy RestartPolicy) + propMimeEq MimeJSON (Proxy :: Proxy Runtime) + propMimeEq MimeJSON (Proxy :: Proxy Secret) + propMimeEq MimeJSON (Proxy :: Proxy SecretCreateRequest) + propMimeEq MimeJSON (Proxy :: Proxy SecretSpec) + propMimeEq MimeJSON (Proxy :: Proxy Service) + propMimeEq MimeJSON (Proxy :: Proxy ServiceCreateRequest) + propMimeEq MimeJSON (Proxy :: Proxy ServiceCreateResponse) + propMimeEq MimeJSON (Proxy :: Proxy ServiceEndpoint) + propMimeEq MimeJSON (Proxy :: Proxy ServiceEndpointVirtualIPsInner) + propMimeEq MimeJSON (Proxy :: Proxy ServiceJobStatus) + propMimeEq MimeJSON (Proxy :: Proxy ServiceServiceStatus) + propMimeEq MimeJSON (Proxy :: Proxy ServiceSpec) + propMimeEq MimeJSON (Proxy :: Proxy ServiceSpecMode) + propMimeEq MimeJSON (Proxy :: Proxy ServiceSpecModeReplicated) + propMimeEq MimeJSON (Proxy :: Proxy ServiceSpecModeReplicatedJob) + propMimeEq MimeJSON (Proxy :: Proxy ServiceSpecRollbackConfig) + propMimeEq MimeJSON (Proxy :: Proxy ServiceSpecUpdateConfig) + propMimeEq MimeJSON (Proxy :: Proxy ServiceUpdateRequest) + propMimeEq MimeJSON (Proxy :: Proxy ServiceUpdateResponse) + propMimeEq MimeJSON (Proxy :: Proxy ServiceUpdateStatus) + propMimeEq MimeJSON (Proxy :: Proxy Swarm) + propMimeEq MimeJSON (Proxy :: Proxy SwarmInfo) + propMimeEq MimeJSON (Proxy :: Proxy SwarmInitRequest) + propMimeEq MimeJSON (Proxy :: Proxy SwarmJoinRequest) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpec) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecCAConfig) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecCAConfigExternalCAsInner) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecDispatcher) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecEncryptionConfig) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecOrchestration) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecRaft) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecTaskDefaults) + propMimeEq MimeJSON (Proxy :: Proxy SwarmSpecTaskDefaultsLogDriver) + propMimeEq MimeJSON (Proxy :: Proxy SwarmUnlockRequest) + propMimeEq MimeJSON (Proxy :: Proxy SystemAuthResponse) + propMimeEq MimeJSON (Proxy :: Proxy SystemDataUsageResponse) + propMimeEq MimeJSON (Proxy :: Proxy SystemInfo) + propMimeEq MimeJSON (Proxy :: Proxy SystemInfoDefaultAddressPoolsInner) + propMimeEq MimeJSON (Proxy :: Proxy SystemVersion) + propMimeEq MimeJSON (Proxy :: Proxy SystemVersionComponentsInner) + propMimeEq MimeJSON (Proxy :: Proxy SystemVersionPlatform) + propMimeEq MimeJSON (Proxy :: Proxy TLSInfo) + propMimeEq MimeJSON (Proxy :: Proxy Task) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpec) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpec) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecConfigsInner) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecConfigsInnerFile) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecDNSConfig) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecPrivileges) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecPrivilegesAppArmor) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecPrivilegesCredentialSpec) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecPrivilegesSELinuxContext) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecPrivilegesSeccomp) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecSecretsInner) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecContainerSpecSecretsInnerFile) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecLogDriver) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecNetworkAttachmentSpec) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecPlacement) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecPlacementPreferencesInner) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecPlacementPreferencesInnerSpread) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecPluginSpec) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecResources) + propMimeEq MimeJSON (Proxy :: Proxy TaskSpecRestartPolicy) + propMimeEq MimeJSON (Proxy :: Proxy TaskState) + propMimeEq MimeJSON (Proxy :: Proxy TaskStatus) + propMimeEq MimeJSON (Proxy :: Proxy ThrottleDevice) + propMimeEq MimeJSON (Proxy :: Proxy UnlockKeyResponse) + propMimeEq MimeJSON (Proxy :: Proxy Volume) + propMimeEq MimeJSON (Proxy :: Proxy VolumeCreateOptions) + propMimeEq MimeJSON (Proxy :: Proxy VolumeListResponse) + propMimeEq MimeJSON (Proxy :: Proxy VolumePruneResponse) + propMimeEq MimeJSON (Proxy :: Proxy VolumeUpdateRequest) + propMimeEq MimeJSON (Proxy :: Proxy VolumeUsageData) +