----------
-- generated by podman-codegen version 0.0.0.1
-- from swagger file fetched from https://storage.googleapis.com/libpod-master-releases/swagger-v3.2.3.yaml
-- documenting podman API version 3.2.0
----------

{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}

-- |
--
-- generated by podman-codegen version 0.0.0.1
--
-- From a swagger file documenting podman API version 3.2.0
--
-- which was fetched from <https://storage.googleapis.com/libpod-master-releases/swagger-v3.2.3.yaml>
module Podman.Types
  ( module Podman.Types,
  )
where

import Data.Aeson (FromJSON (..), Options (fieldLabelModifier, omitNothingFields), ToJSON (..), Value (Number, String), defaultOptions, genericParseJSON, genericToJSON, withScientific, withText)
import qualified Data.Map as M
import Data.Text (Text)
import qualified Data.Text as T
import Data.Time.Clock (UTCTime)
import GHC.Generics (Generic)
import GHC.Int (Int32, Int64)
import GHC.Word (Word16, Word32, Word64, Word8)
import Lens.Micro.TH
import System.Linux.Capabilities (Capability (..))

newtype LinuxCapability = LinuxCapability Capability deriving newtype (Eq, Show)

instance ToJSON LinuxCapability where
  toJSON (LinuxCapability x) = String (T.pack (show x))

instance FromJSON LinuxCapability where
  parseJSON = withText "cap" $ \txt -> pure (LinuxCapability (read (T.unpack txt)))

data SystemdRestartPolicy
  = SystemdRestartPolicyNo
  | SystemdRestartPolicyOnSuccess
  | SystemdRestartPolicyOnAbnormal
  | SystemdRestartPolicyOnWatchdog
  | SystemdRestartPolicyOnAbort
  | SystemdRestartPolicyAlways
  deriving stock (Eq, Generic)

instance Show SystemdRestartPolicy where
  show SystemdRestartPolicyNo = "no"
  show SystemdRestartPolicyOnSuccess = "on-success"
  show SystemdRestartPolicyOnAbnormal = "on-abnormal"
  show SystemdRestartPolicyOnWatchdog = "on-watchdog"
  show SystemdRestartPolicyOnAbort = "on-abort"
  show SystemdRestartPolicyAlways = "always"

instance ToJSON SystemdRestartPolicy where
  toJSON SystemdRestartPolicyNo = String "no"
  toJSON SystemdRestartPolicyOnSuccess = String "on-success"
  toJSON SystemdRestartPolicyOnAbnormal = String "on-abnormal"
  toJSON SystemdRestartPolicyOnWatchdog = String "on-watchdog"
  toJSON SystemdRestartPolicyOnAbort = String "on-abort"
  toJSON SystemdRestartPolicyAlways = String "always"

instance FromJSON SystemdRestartPolicy where
  parseJSON = withText "SystemdRestartPolicy" $ \txt -> pure $ case txt of
    "no" -> SystemdRestartPolicyNo
    "on-success" -> SystemdRestartPolicyOnSuccess
    "on-abnormal" -> SystemdRestartPolicyOnAbnormal
    "on-watchdog" -> SystemdRestartPolicyOnWatchdog
    "on-abort" -> SystemdRestartPolicyOnAbort
    "always" -> SystemdRestartPolicyAlways
    x -> error ("Unknown SystemdRestartPolicy" <> T.unpack x)

newtype ExecResponse = ExecResponse
  { _execResponseId :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ExecResponse where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 13, omitNothingFields = True})

instance ToJSON ExecResponse where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 13, omitNothingFields = True})

newtype SecretCreateResponse = SecretCreateResponse
  { _secretCreateResponseID :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON SecretCreateResponse where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 21, omitNothingFields = True})

instance ToJSON SecretCreateResponse where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 21, omitNothingFields = True})

data ContainerChangeKind = Modified | Added | Deleted deriving stock (Show, Eq, Generic)

instance ToJSON ContainerChangeKind where
  toJSON Modified = Number 0
  toJSON Added = Number 1
  toJSON Deleted = Number 2

instance FromJSON ContainerChangeKind where
  parseJSON = withScientific "change" $ \num -> pure $ case num of
    0 -> Modified
    1 -> Added
    2 -> Deleted
    x -> error ("Unknown change kind " <> show x)

data ContainerStatus
  = StatusUnknown
  | StatusConfigured
  | StatusCreated
  | StatusRunning
  | StatusStopped
  | StatusPaused
  | StatusExited
  | StatusRemoving
  | StatusStopping
  deriving stock (Eq, Generic)

instance Show ContainerStatus where
  show StatusUnknown = "unknown"
  show StatusConfigured = "configured"
  show StatusCreated = "created"
  show StatusRunning = "running"
  show StatusStopped = "stopped"
  show StatusPaused = "paused"
  show StatusExited = "exited"
  show StatusRemoving = "removing"
  show StatusStopping = "stopping"

instance ToJSON ContainerStatus where
  toJSON StatusUnknown = String "unknown"
  toJSON StatusConfigured = String "configured"
  toJSON StatusCreated = String "created"
  toJSON StatusRunning = String "running"
  toJSON StatusStopped = String "stopped"
  toJSON StatusPaused = String "paused"
  toJSON StatusExited = String "exited"
  toJSON StatusRemoving = String "removing"
  toJSON StatusStopping = String "stopping"

instance FromJSON ContainerStatus where
  parseJSON = withText "ContainerStatus" $ \txt -> pure $ case txt of
    "unknown" -> StatusUnknown
    "configured" -> StatusConfigured
    "created" -> StatusCreated
    "running" -> StatusRunning
    "stopped" -> StatusStopped
    "paused" -> StatusPaused
    "exited" -> StatusExited
    "removing" -> StatusRemoving
    "stopping" -> StatusStopping
    x -> error ("Unknown ContainerStatus" <> T.unpack x)

-- | A type safe wrapper for [Word8]
newtype IP = IP [Word8]
  deriving stock (Generic)
  deriving newtype (Eq, Show)
  deriving anyclass (FromJSON, ToJSON)

-- | A type safe wrapper for Int64
newtype Signal = Signal Int64
  deriving stock (Generic)
  deriving newtype (Eq, Show)
  deriving anyclass (FromJSON, ToJSON)

-- | A type safe wrapper for Word32
newtype FileMode = FileMode Word32
  deriving stock (Generic)
  deriving newtype (Eq, Show)
  deriving anyclass (FromJSON, ToJSON)

-- | A type safe wrapper for Int64
newtype Duration = Duration Int64
  deriving stock (Generic)
  deriving newtype (Eq, Show)
  deriving anyclass (FromJSON, ToJSON)

-- | The API error record
data Error = Error
  { _errorcause :: Text,
    _errormessage :: Text,
    _errorresponse :: Int
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON Error where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 6, omitNothingFields = True})

instance ToJSON Error where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 6, omitNothingFields = True})

-- | The API Version information
data Version = Version
  { _versionApiVersion :: Text,
    _versionVersion :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON Version where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 8, omitNothingFields = True})

instance ToJSON Version where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 8, omitNothingFields = True})

-- | Health stores information about the container's healthcheck results
data Health = Health
  { _healthStatus :: Text,
    _healthLog :: [HealthcheckResult],
    _healthFailingStreak :: Int64
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON Health where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 7, omitNothingFields = True})

instance ToJSON Health where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 7, omitNothingFields = True})

-- | HealthConfig holds configuration settings for the HEALTHCHECK feature.
data HealthConfig = HealthConfig
  { _healthConfigStartPeriod :: Duration,
    -- | Test is the test to perform to check that the container is healthy.
    _healthConfigTest :: [Text],
    -- | Retries is the number of consecutive failures needed to consider a container as unhealthy.
    _healthConfigRetries :: Int64,
    _healthConfigInterval :: Duration,
    _healthConfigTimeout :: Duration
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON HealthConfig where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 13, omitNothingFields = True})

instance ToJSON HealthConfig where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 13, omitNothingFields = True})

-- | HealthcheckResult stores information about a single run of a healthcheck probe
data HealthcheckResult = HealthcheckResult
  { _healthcheckResultStart :: UTCTime,
    _healthcheckResultEnd :: UTCTime,
    _healthcheckResultOutput :: Text,
    _healthcheckResultExitCode :: Int64
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON HealthcheckResult where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 18, omitNothingFields = True})

instance ToJSON HealthcheckResult where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 18, omitNothingFields = True})

-- | HealthCheckResults describes the results/logs from a healthcheck
data HealthCheckResults = HealthCheckResults
  { -- | Status healthy or unhealthy.
    _healthCheckResultsStatus :: Text,
    -- | Log describes healthcheck attempts and results.
    _healthCheckResultsLog :: [HealthCheckLog],
    -- | FailingStreak is the number of consecutive failed healthchecks.
    _healthCheckResultsFailingStreak :: Int64
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON HealthCheckResults where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 19, omitNothingFields = True})

instance ToJSON HealthCheckResults where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 19, omitNothingFields = True})

-- | HealthCheckLog describes the results of a single healthcheck
data HealthCheckLog = HealthCheckLog
  { -- | Start time as string.
    _healthCheckLogStart :: Text,
    -- | End time as a string.
    _healthCheckLogEnd :: Text,
    -- | Output is the stdout\/stderr from the healthcheck command.
    _healthCheckLogOutput :: Text,
    -- | Exitcode is 0 or 1.
    _healthCheckLogExitCode :: Int64
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON HealthCheckLog where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 15, omitNothingFields = True})

instance ToJSON HealthCheckLog where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 15, omitNothingFields = True})

-- | Schema2HealthConfig is a HealthConfig, which holds configuration settings
-- for the HEALTHCHECK feature, from docker/docker/api/types/container.
data Schema2HealthConfig = Schema2HealthConfig
  { _schema2HealthConfigStartPeriod :: Duration,
    -- | Test is the test to perform to check that the container is healthy.
    _schema2HealthConfigTest :: [Text],
    -- | Retries is the number of consecutive failures needed to consider a container as unhealthy.
    _schema2HealthConfigRetries :: Int64,
    _schema2HealthConfigInterval :: Duration,
    _schema2HealthConfigTimeout :: Duration
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON Schema2HealthConfig where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 20, omitNothingFields = True})

instance ToJSON Schema2HealthConfig where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 20, omitNothingFields = True})

-- | IDMap contains a single entry for user namespace range remapping. An array
-- of IDMap entries represents the structure that will be provided to the Linux
-- kernel for creating a user namespace.
data IDMap = IDMap
  { _iDMapsize :: Int64,
    _iDMapcontainer_id :: Int64,
    _iDMaphost_id :: Int64
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON IDMap where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 6, omitNothingFields = True})

instance ToJSON IDMap where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 6, omitNothingFields = True})

-- | InspectContainerState provides a detailed record of a container's current
-- state. It is returned as part of InspectContainerData.
-- As with InspectContainerData, many portions of this struct are matched to
-- Docker, but here we see more fields that are unused (nonsensical in the
-- context of Libpod).
data InspectContainerState = InspectContainerState
  { _inspectContainerStateStatus :: ContainerStatus,
    _inspectContainerStateDead :: Bool,
    _inspectContainerStateOciVersion :: Text,
    _inspectContainerStateRestarting :: Bool,
    _inspectContainerStateError :: Text,
    _inspectContainerStateConmonPid :: Maybe Int64,
    _inspectContainerStateStartedAt :: UTCTime,
    _inspectContainerStateFinishedAt :: UTCTime,
    _inspectContainerStateRunning :: Bool,
    _inspectContainerStatePid :: Int64,
    _inspectContainerStateExitCode :: Int32,
    _inspectContainerStatePaused :: Bool,
    _inspectContainerStateOOMKilled :: Bool
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON InspectContainerState where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 22, omitNothingFields = True})

instance ToJSON InspectContainerState where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 22, omitNothingFields = True})

-- | InspectContainerConfig holds further data about how a container was initially
-- configured.
data InspectContainerConfig = InspectContainerConfig
  { -- | Container annotations.
    _inspectContainerConfigAnnotations :: M.Map Text Text,
    -- | Container hostname.
    _inspectContainerConfigHostname :: Text,
    -- | Container image.
    _inspectContainerConfigImage :: Text,
    -- | SystemdMode is whether the container is running in systemd mode.
    _inspectContainerConfigSystemdMode :: Maybe Bool,
    -- | Secrets are the secrets mounted in the container.
    _inspectContainerConfigSecrets :: Maybe [InspectSecret],
    -- | Container environment variables.
    _inspectContainerConfigEnv :: [Text],
    -- | Container entrypoint.
    _inspectContainerConfigEntrypoint :: Text,
    -- | StopTimeout is time before container is stopped when calling stop.
    _inspectContainerConfigStopTimeout :: Word64,
    -- | Whether STDIN is only left open once.
    _inspectContainerConfigStdinOnce :: Bool,
    -- | Container working directory.
    _inspectContainerConfigWorkingDir :: Text,
    -- | Container stop signal.
    _inspectContainerConfigStopSignal :: Word64,
    -- | Umask is the umask inside the container.
    _inspectContainerConfigUmask :: Text,
    -- | User the container was launched with.
    _inspectContainerConfigUser :: Text,
    -- | On-build arguments - presently unused.
    _inspectContainerConfigOnBuild :: Maybe Text,
    -- | Container domain name - unused at present.
    _inspectContainerConfigDomainname :: Text,
    -- | Unused, at present.
    _inspectContainerConfigAttachStdin :: Bool,
    -- | Container command.
    _inspectContainerConfigCmd :: [Text],
    -- | Container labels.
    _inspectContainerConfigLabels :: Maybe (M.Map Text Text),
    -- | Unused, at present.
    _inspectContainerConfigAttachStderr :: Bool,
    -- | Whether the container leaves STDIN open.
    _inspectContainerConfigOpenStdin :: Bool,
    -- | Timeout is time before container is killed by conmon.
    _inspectContainerConfigTimeout :: Word64,
    -- | CreateCommand is the full command plus arguments of the process the container has been created with.
    _inspectContainerConfigCreateCommand :: Maybe [Text],
    -- | Unused, at present.
    _inspectContainerConfigAttachStdout :: Bool,
    -- | Whether the container creates a TTY.
    _inspectContainerConfigTty :: Bool
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON InspectContainerConfig where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 23, omitNothingFields = True})

instance ToJSON InspectContainerConfig where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 23, omitNothingFields = True})

-- | SpecGenerator creates an OCI spec and Libpod configuration options to create
-- a container based on the given configuration.
data SpecGenerator = SpecGenerator
  { -- | StopTimeout is a timeout between the container's stop signal being sent and SIGKILL being sent.
    _specGeneratorstop_timeout :: Maybe Word64,
    -- | IO write rate limit per cgroup per device, bytes per second.
    _specGeneratorthrottleWriteBpsDevice :: Maybe (M.Map Text Text),
    -- | Annotations are key-value options passed into the container runtime that can be used to trigger special behavior.
    _specGeneratorannotations :: Maybe (M.Map Text Text),
    -- | RawImageName is the user-specified and unprocessed input referring to a local or a remote image.
    _specGeneratorraw_image_name :: Maybe Text,
    -- | CapAdd are capabilities which will be added to the container.
    _specGeneratorcap_add :: Maybe [LinuxCapability],
    _specGeneratoruserns :: Maybe Namespace,
    -- | PublishExposedPorts will publish ports specified in the image to random unused ports (guaranteed to be above 1024) on the host.
    _specGeneratorpublish_image_ports :: Maybe Bool,
    -- | Stdin is whether the container will keep its STDIN open.
    _specGeneratorstdin :: Maybe Bool,
    -- | Groups are a list of supplemental groups the container's user will be granted access to.
    _specGeneratorgroups :: Maybe [Text],
    _specGeneratoripcns :: Maybe Namespace,
    -- | Unmask is the path we want to unmask in the container.
    _specGeneratorunmask :: Maybe [Text],
    -- | UseImageHosts indicates that \/etc\/hosts should not be managed by Podman, and instead sourced from the image.
    _specGeneratoruse_image_hosts :: Maybe Bool,
    -- | Determine how to handle the NOTIFY_SOCKET - do we participate or pass it through "container" - let the OCI runtime deal with it, advertise conmon's MAINPID "conmon-only" - advertise conmon's MAINPID, send READY when started, don't pass to OCI "ignore" - unset NOTIFY_SOCKET.
    _specGeneratorsdnotifyMode :: Maybe Text,
    -- | Image is the image the container will be based on.
    _specGeneratorimage :: Text,
    -- | Command is the container's command.
    _specGeneratorcommand :: Maybe [Text],
    -- | SelinuxProcessLabel is the process label the container will use.
    _specGeneratorselinux_opts :: Maybe [Text],
    -- | Hostname is the container's hostname.
    _specGeneratorhostname :: Maybe Text,
    -- | VolumesFrom is a set of containers whose volumes will be added to this container.
    _specGeneratorvolumes_from :: Maybe [Text],
    -- | Init specifies that an init binary will be mounted into the container, and will be used as PID1.
    _specGeneratorinit :: Maybe Bool,
    -- | RootfsPropagation is the rootfs propagation mode for the container.
    _specGeneratorrootfs_propagation :: Maybe Text,
    -- | OOMScoreAdj adjusts the score used by the OOM killer to determine processes to kill for the container's process.
    _specGeneratoroom_score_adj :: Maybe Int64,
    _specGeneratornetns :: Maybe Namespace,
    -- | DNSOptions is a set of DNS options that will be used in the container's resolv.
    _specGeneratordns_option :: Maybe [Text],
    -- | Secrets are the secrets that will be added to the container Optional.
    _specGeneratorsecrets :: Maybe [Secret],
    -- | Env is a set of environment variables that will be set in the container.
    _specGeneratorenv :: Maybe (M.Map Text Text),
    -- | Entrypoint is the container's entrypoint.
    _specGeneratorentrypoint :: Maybe [Text],
    -- | Aliases are a list of network-scoped aliases for container Optional.
    _specGeneratoraliases :: Maybe (M.Map Text Text),
    -- | Weight per cgroup per device, can override BlkioWeight.
    _specGeneratorweightDevice :: Maybe (M.Map Text Text),
    -- | RestartPolicy is the container's restart policy - an action which will be taken when the container exits.
    _specGeneratorrestart_policy :: Maybe Text,
    -- | Volatile specifies whether the container storage can be optimized at the cost of not syncing all the dirty files in memory.
    _specGeneratorvolatile :: Maybe Bool,
    -- | DependencyContainers is an array of containers this container depends on.
    _specGeneratordependencyContainers :: Maybe [Text],
    -- | Rootfs is the path to a directory that will be used as the container's root filesystem.
    _specGeneratorrootfs :: Maybe Text,
    -- | UseImageResolvConf indicates that resolv.
    _specGeneratoruse_image_resolve_conf :: Maybe Bool,
    -- | SeccompPolicy determines which seccomp profile gets applied the container.
    _specGeneratorseccomp_policy :: Maybe Text,
    -- | Privileged is whether the container is privileged.
    _specGeneratorprivileged :: Maybe Bool,
    -- | Namespace is the libpod namespace the container will be placed in.
    _specGeneratornamespace :: Maybe Text,
    -- | DNSServers is a set of DNS servers that will be used in the container's resolv.
    _specGeneratordns_server :: Maybe [IP],
    -- | PortBindings is a set of ports to map into the container.
    _specGeneratorportmappings :: Maybe [PortMapping],
    -- | ApparmorProfile is the name of the Apparmor profile the container will use.
    _specGeneratorapparmor_profile :: Maybe Text,
    _specGeneratorstatic_ip :: Maybe IP,
    -- | Remove indicates if the container should be removed once it has been started and exits.
    _specGeneratorremove :: Maybe Bool,
    -- | Mounts are mounts that will be added to the container.
    _specGeneratormounts :: Maybe [Mount],
    _specGeneratorstatic_ipv6 :: Maybe IP,
    _specGeneratorcgroupns :: Maybe Namespace,
    -- | NetworkOptions are additional options for each network Optional.
    _specGeneratornetwork_options :: Maybe (M.Map Text Text),
    -- | NoNewPrivileges is whether the container will set the no new privileges flag on create, which disables gaining additional privileges (e.
    _specGeneratorno_new_privileges :: Maybe Bool,
    -- | Umask is the umask the init process of the container will be run with.
    _specGeneratorumask :: Maybe Text,
    -- | Systemd is whether the container will be started in systemd mode.
    _specGeneratorsystemd :: Maybe Text,
    _specGeneratorstop_signal :: Maybe Signal,
    -- | User is the user the container will be run as.
    _specGeneratoruser :: Maybe Text,
    -- | CgroupConf are key-value options passed into the container runtime that are used to configure cgroup v2.
    _specGeneratorunified :: Maybe (M.Map Text Text),
    -- | EnvHTTPProxy indicates that the http host proxy environment variables should be added to container Optional.
    _specGeneratorhttpproxy :: Maybe Bool,
    -- | CapDrop are capabilities which will be removed from the container.
    _specGeneratorcap_drop :: Maybe [LinuxCapability],
    -- | ContainerCreateCommand is the command that was used to create this container.
    _specGeneratorcontainerCreateCommand :: Maybe [Text],
    -- | Terminal is whether the container will create a PTY.
    _specGeneratorterminal :: Maybe Bool,
    -- | ProcOpts are the options used for the proc mount.
    _specGeneratorprocfs_opts :: Maybe [Text],
    -- | ImageVolumeMode indicates how image volumes will be created.
    _specGeneratorimage_volume_mode :: Maybe Text,
    -- | EnvSecrets are secrets that will be set as environment variables Optional.
    _specGeneratorsecret_env :: Maybe (M.Map Text Text),
    -- | Mask is the path we want to mask in the container.
    _specGeneratormask :: Maybe [Text],
    -- | ShmSize is the size of the tmpfs to mount in at \/dev\/shm, in bytes.
    _specGeneratorshm_size :: Maybe Int64,
    -- | Expose is a number of ports that will be forwarded to the container if PublishExposedPorts is set.
    _specGeneratorexpose :: Maybe (M.Map Word Text),
    _specGeneratorutsns :: Maybe Namespace,
    -- | Name is the name the container will be given.
    _specGeneratorname :: Maybe Text,
    -- | IO read rate limit per cgroup per device, IO per second.
    _specGeneratorthrottleReadIOPSDevice :: Maybe (M.Map Text Text),
    -- | CgroupParent is the container's CGroup parent.
    _specGeneratorcgroup_parent :: Maybe Text,
    -- | SeccompProfilePath is the path to a JSON file containing the container's Seccomp profile.
    _specGeneratorseccomp_profile_path :: Maybe Text,
    -- | EnvHost indicates that the host environment should be added to container Optional.
    _specGeneratorenv_host :: Maybe Bool,
    -- | Sysctl sets kernel parameters for the container.
    _specGeneratorsysctl :: Maybe (M.Map Text Text),
    -- | ConmonPidFile is a path at which a PID file for Conmon will be placed.
    _specGeneratorconmon_pid_file :: Maybe Text,
    -- | Labels are key-value pairs that are used to add metadata to containers.
    _specGeneratorlabels :: Maybe (M.Map Text Text),
    -- | ReadOnlyFilesystem indicates that everything will be mounted as read-only.
    _specGeneratorread_only_filesystem :: Maybe Bool,
    _specGeneratorpidns :: Maybe Namespace,
    -- | IO write rate limit per cgroup per device, IO per second.
    _specGeneratorthrottleWriteIOPSDevice :: Maybe (M.Map Text Text),
    -- | DNSSearch is a set of DNS search domains that will be used in the container's resolv.
    _specGeneratordns_search :: Maybe [Text],
    -- | InitPath specifies the path to the init binary that will be added if Init is specified above.
    _specGeneratorinit_path :: Maybe Text,
    -- | Rlimits are POSIX rlimits to apply to the container.
    _specGeneratorr_limits :: Maybe [POSIXRlimit],
    -- | Pod is the ID of the pod the container will join.
    _specGeneratorpod :: Maybe Text,
    -- | Devices are devices that will be added to the container.
    _specGeneratordevices :: Maybe [LinuxDevice],
    -- | IO read rate limit per cgroup per device, bytes per second.
    _specGeneratorthrottleReadBpsDevice :: Maybe (M.Map Text Text),
    -- | CgroupsMode sets a policy for how cgroups will be created in the container, including the ability to disable creation entirely.
    _specGeneratorcgroups_mode :: Maybe Text,
    -- | Timeout is a maximum time in seconds the container will run before main process is sent SIGKILL.
    _specGeneratortimeout :: Maybe Word64,
    -- | Timezone is the timezone inside the container.
    _specGeneratortimezone :: Maybe Text,
    -- | Volumes are named volumes that will be added to the container.
    _specGeneratorvolumes :: Maybe [NamedVolume],
    -- | Image volumes bind-mount a container-image mount into the container.
    _specGeneratorimage_volumes :: Maybe [ImageVolume],
    _specGeneratorlog_configuration :: Maybe LogConfig,
    _specGeneratorresource_limits :: Maybe LinuxResources,
    -- | OCIRuntime is the name of the OCI runtime that will be used to create the container.
    _specGeneratoroci_runtime :: Maybe Text,
    -- | Overlay volumes are named volumes that will be added to the container.
    _specGeneratoroverlay_volumes :: Maybe [OverlayVolume],
    -- | CNINetworks is a list of CNI networks to join the container to.
    _specGeneratorcni_networks :: Maybe [Text],
    -- | RestartRetries is the number of attempts that will be made to restart the container.
    _specGeneratorrestart_tries :: Maybe Word64,
    -- | WorkDir is the container's working directory.
    _specGeneratorwork_dir :: Maybe Text,
    -- | HostAdd is a set of hosts which will be added to the container's etc\/hosts file.
    _specGeneratorhostadd :: Maybe [Text]
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON SpecGenerator where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

instance ToJSON SpecGenerator where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

-- | PortMapping is one or more ports that will be mapped into the container.
data PortMapping = PortMapping
  { -- | HostPort is the port number that will be forwarded from the host into the container.
    _portMappinghost_port :: Word16,
    -- | Protocol is the protocol forward.
    _portMappingprotocol :: Text,
    -- | ContainerPort is the port number that will be exposed from the container.
    _portMappingcontainer_port :: Word16,
    -- | Range is the number of ports that will be forwarded, starting at HostPort and ContainerPort and counting up.
    _portMappingrange :: Word16,
    -- | HostIP is the IP that we will bind to on the host.
    _portMappinghost_ip :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON PortMapping where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

instance ToJSON PortMapping where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

-- | Listcontainer describes a container suitable for listing
data ListContainer = ListContainer
  { -- | If the container is part of Pod, the Pod name.
    _listContainerPodName :: Text,
    -- | Status is a human-readable approximation of a duration for json output.
    _listContainerStatus :: Text,
    -- | State of container.
    _listContainerState :: Text,
    -- | Container command.
    _listContainerCommand :: Maybe [Text],
    -- | Container image.
    _listContainerImage :: Text,
    _listContainerSize :: Maybe ContainerSize,
    -- | The network names assigned to the container.
    _listContainerNetworks :: Maybe [Text],
    -- | Human readable container creation time.
    _listContainerCreatedAt :: Text,
    -- | If this container is a Pod infra container.
    _listContainerIsInfra :: Bool,
    _listContainerNamespaces :: ListContainerNamespaces,
    -- | Container creation time.
    _listContainerCreated :: UTCTime,
    -- | Time when container started.
    _listContainerStartedAt :: Int64,
    -- | The names assigned to the container.
    _listContainerNames :: [Text],
    -- | Time container exited.
    _listContainerExitedAt :: Int64,
    -- | Port mappings.
    _listContainerPorts :: Maybe [PortMapping],
    -- | Container image ID.
    _listContainerImageID :: Text,
    -- | The process id of the container.
    _listContainerPid :: Int64,
    -- | The unique identifier for the container.
    _listContainerId :: Text,
    -- | Labels for container.
    _listContainerLabels :: Maybe (M.Map Text Text),
    -- | If container has exited, the return code from the command.
    _listContainerExitCode :: Int32,
    -- | If the container is part of Pod, the Pod ID.
    _listContainerPod :: Maybe Text,
    -- | If container has exited\/stopped.
    _listContainerExited :: Bool,
    -- | AutoRemove.
    _listContainerAutoRemove :: Bool
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ListContainer where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

instance ToJSON ListContainer where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

-- | ListContainer Namespaces contains the identifiers of the container's Linux namespaces
data ListContainerNamespaces = ListContainerNamespaces
  { -- | Cgroup namespace.
    _listContainerNamespacesCgroup :: Maybe Text,
    -- | Mount namespace.
    _listContainerNamespacesMnt :: Maybe Text,
    -- | Network namespace.
    _listContainerNamespacesNet :: Maybe Text,
    -- | IPC namespace.
    _listContainerNamespacesIpc :: Maybe Text,
    -- | User namespace.
    _listContainerNamespacesUser :: Maybe Text,
    -- | UTS namespace.
    _listContainerNamespacesUts :: Maybe Text,
    -- | PID namespace.
    _listContainerNamespacesPidns :: Maybe Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ListContainerNamespaces where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 24, omitNothingFields = True})

instance ToJSON ListContainerNamespaces where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 24, omitNothingFields = True})

-- | ContainerSize holds the size of the container's root filesystem and top
-- read-write layer.
data ContainerSize = ContainerSize
  { _containerSizerwSize :: Int64,
    _containerSizerootFsSize :: Int64
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ContainerSize where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

instance ToJSON ContainerSize where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

-- | Mount specifies a mount for a container.
data Mount = Mount
  { -- | Destination is the absolute path where the mount will be placed in the container.
    _mountdestination :: Text,
    -- | Source specifies the source path of the mount.
    _mountsource :: Text,
    -- | Options are fstab style mount options.
    _mountoptions :: [Text],
    -- | Type specifies the mount kind.
    _mounttype :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON Mount where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 6, omitNothingFields = True})

instance ToJSON Mount where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 6, omitNothingFields = True})

-- | Namespace describes the namespace
data Namespace = Namespace
  { _namespacevalue :: Text,
    _namespacensmode :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON Namespace where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 10, omitNothingFields = True})

instance ToJSON Namespace where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 10, omitNothingFields = True})

-- | LinuxDevice represents the mknod information for a Linux special device file
data LinuxDevice = LinuxDevice
  { -- | Minor is the device's minor number.
    _linuxDeviceminor :: Int64,
    -- | Path to the device.
    _linuxDevicepath :: Text,
    _linuxDevicefileMode :: FileMode,
    -- | UID of the device.
    _linuxDeviceuid :: Word32,
    -- | Major is the device's major number.
    _linuxDevicemajor :: Int64,
    -- | Gid of the device.
    _linuxDevicegid :: Word32,
    -- | Device type, block, char, etc.
    _linuxDevicetype :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LinuxDevice where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

instance ToJSON LinuxDevice where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

-- | LinuxCPU for Linux cgroup 'cpu' resource management
data LinuxCPU = LinuxCPU
  { -- | CPU period to be used for hardcapping (in usecs).
    _linuxCPUperiod :: Word64,
    -- | How much time realtime scheduling may use (in usecs).
    _linuxCPUrealtimeRuntime :: Int64,
    -- | CPU period to be used for realtime scheduling (in usecs).
    _linuxCPUrealtimePeriod :: Word64,
    -- | CPUs to use within the cpuset.
    _linuxCPUcpus :: Text,
    -- | CPU hardcap limit (in usecs).
    _linuxCPUquota :: Int64,
    -- | List of memory nodes in the cpuset.
    _linuxCPUmems :: Text,
    -- | CPU shares (relative weight (ratio) vs.
    _linuxCPUshares :: Word64
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LinuxCPU where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 9, omitNothingFields = True})

instance ToJSON LinuxCPU where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 9, omitNothingFields = True})

-- | LinuxThrottleDevice struct holds a `major:minor rate_per_second` pair
data LinuxThrottleDevice = LinuxThrottleDevice
  { -- | Minor is the device's minor number.
    _linuxThrottleDeviceminor :: Int64,
    -- | Major is the device's major number.
    _linuxThrottleDevicemajor :: Int64,
    -- | Rate is the IO rate limit per cgroup per device.
    _linuxThrottleDevicerate :: Word64
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LinuxThrottleDevice where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 20, omitNothingFields = True})

instance ToJSON LinuxThrottleDevice where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 20, omitNothingFields = True})

-- | LinuxWeightDevice struct holds a `major:minor weight` pair for weightDevice
data LinuxWeightDevice = LinuxWeightDevice
  { -- | Minor is the device's minor number.
    _linuxWeightDeviceminor :: Int64,
    -- | Weight is the bandwidth rate for the device.
    _linuxWeightDeviceweight :: Word16,
    -- | Major is the device's major number.
    _linuxWeightDevicemajor :: Int64,
    -- | LeafWeight is the bandwidth rate for the device while competing with the cgroup's child cgroups, CFQ scheduler only.
    _linuxWeightDeviceleafWeight :: Word16
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LinuxWeightDevice where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 18, omitNothingFields = True})

instance ToJSON LinuxWeightDevice where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 18, omitNothingFields = True})

-- | LinuxBlockIO for Linux cgroup 'blkio' resource management
data LinuxBlockIO = LinuxBlockIO
  { -- | IO write rate limit per cgroup per device, bytes per second.
    _linuxBlockIOthrottleWriteBpsDevice :: [LinuxThrottleDevice],
    -- | Specifies per cgroup weight.
    _linuxBlockIOweight :: Word16,
    -- | Weight per cgroup per device, can override BlkioWeight.
    _linuxBlockIOweightDevice :: [LinuxWeightDevice],
    -- | IO read rate limit per cgroup per device, IO per second.
    _linuxBlockIOthrottleReadIOPSDevice :: [LinuxThrottleDevice],
    -- | IO write rate limit per cgroup per device, IO per second.
    _linuxBlockIOthrottleWriteIOPSDevice :: [LinuxThrottleDevice],
    -- | IO read rate limit per cgroup per device, bytes per second.
    _linuxBlockIOthrottleReadBpsDevice :: [LinuxThrottleDevice],
    -- | Specifies tasks' weight in the given cgroup while competing with the cgroup's child cgroups, CFQ scheduler only.
    _linuxBlockIOleafWeight :: Word16
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LinuxBlockIO where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 13, omitNothingFields = True})

instance ToJSON LinuxBlockIO where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 13, omitNothingFields = True})

-- | LinuxDeviceCgroup represents a device rule for the devices specified to
-- the device controller
data LinuxDeviceCgroup = LinuxDeviceCgroup
  { -- | Cgroup access permissions format, rwm.
    _linuxDeviceCgroupaccess :: Text,
    -- | Minor is the device's minor number.
    _linuxDeviceCgroupminor :: Int64,
    -- | Major is the device's major number.
    _linuxDeviceCgroupmajor :: Int64,
    -- | Allow or deny.
    _linuxDeviceCgroupallow :: Bool,
    -- | Device type, block, char, etc.
    _linuxDeviceCgrouptype :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LinuxDeviceCgroup where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 18, omitNothingFields = True})

instance ToJSON LinuxDeviceCgroup where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 18, omitNothingFields = True})

-- | LinuxHugepageLimit structure corresponds to limiting kernel hugepages
data LinuxHugepageLimit = LinuxHugepageLimit
  { -- | Limit is the limit of "hugepagesize" hugetlb usage.
    _linuxHugepageLimitlimit :: Word64,
    -- | Pagesize is the hugepage size Format: "<size><unit-prefix>B' (e.
    _linuxHugepageLimitpageSize :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LinuxHugepageLimit where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 19, omitNothingFields = True})

instance ToJSON LinuxHugepageLimit where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 19, omitNothingFields = True})

-- | LinuxInterfacePriority for network interfaces
data LinuxInterfacePriority = LinuxInterfacePriority
  { -- | Priority for the interface.
    _linuxInterfacePrioritypriority :: Word32,
    -- | Name is the name of the network interface.
    _linuxInterfacePriorityname :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LinuxInterfacePriority where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 23, omitNothingFields = True})

instance ToJSON LinuxInterfacePriority where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 23, omitNothingFields = True})

-- | LinuxMemory for Linux cgroup 'memory' resource management
data LinuxMemory = LinuxMemory
  { -- | Enables hierarchical memory accounting.
    _linuxMemoryuseHierarchy :: Bool,
    -- | Kernel memory limit for tcp (in bytes).
    _linuxMemorykernelTCP :: Int64,
    -- | Memory reservation or soft_limit (in bytes).
    _linuxMemoryreservation :: Int64,
    -- | Kernel memory limit (in bytes).
    _linuxMemorykernel :: Int64,
    -- | DisableOOMKiller disables the OOM killer for out of memory conditions.
    _linuxMemorydisableOOMKiller :: Bool,
    -- | How aggressive the kernel will swap memory pages.
    _linuxMemoryswappiness :: Word64,
    -- | Memory limit (in bytes).
    _linuxMemorylimit :: Int64,
    -- | Total memory limit (memory + swap).
    _linuxMemoryswap :: Int64
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LinuxMemory where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

instance ToJSON LinuxMemory where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

-- | LinuxNetwork identification and priority configuration
data LinuxNetwork = LinuxNetwork
  { -- | Set priority of network traffic for container.
    _linuxNetworkpriorities :: [LinuxInterfacePriority],
    -- | Set class identifier for container's network packets.
    _linuxNetworkclassID :: Word32
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LinuxNetwork where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 13, omitNothingFields = True})

instance ToJSON LinuxNetwork where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 13, omitNothingFields = True})

-- | LinuxPids for Linux cgroup 'pids' resource management (Linux 4.3)
data LinuxPids = LinuxPids
  { -- | Maximum number of PIDs.
    _linuxPidslimit :: Int64
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LinuxPids where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 10, omitNothingFields = True})

instance ToJSON LinuxPids where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 10, omitNothingFields = True})

-- | LinuxResources has container runtime resource constraints
data LinuxResources = LinuxResources
  { _linuxResourcesnetwork :: LinuxNetwork,
    _linuxResourcespids :: LinuxPids,
    _linuxResourcesmemory :: LinuxMemory,
    -- | Unified resources.
    _linuxResourcesunified :: M.Map Text Text,
    _linuxResourcesblockIO :: LinuxBlockIO,
    -- | Rdma resource restriction configuration.
    _linuxResourcesrdma :: M.Map Text Text,
    -- | Hugetlb limit (in bytes).
    _linuxResourceshugepageLimits :: [LinuxHugepageLimit],
    -- | Devices configures the device allowlist.
    _linuxResourcesdevices :: [LinuxDeviceCgroup],
    _linuxResourcescpu :: LinuxCPU
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LinuxResources where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 15, omitNothingFields = True})

instance ToJSON LinuxResources where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 15, omitNothingFields = True})

-- | NamedVolume holds information about a named volume that will be mounted into
-- the container.
data NamedVolume = NamedVolume
  { -- | Destination to mount the named volume within the container.
    _namedVolumeDest :: Text,
    -- | Name is the name of the named volume to be mounted.
    _namedVolumeName :: Text,
    -- | Options are options that the named volume will be mounted with.
    _namedVolumeOptions :: [Text]
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON NamedVolume where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

instance ToJSON NamedVolume where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

-- | ImageVolume is a volume based on a container image.  The container image is
-- first mounted on the host and is then bind-mounted into the container.  An
-- ImageVolume is always mounted read only.
data ImageVolume = ImageVolume
  { -- | Destination is the absolute path of the mount in the container.
    _imageVolumeDestination :: Text,
    -- | ReadWrite sets the volume writable.
    _imageVolumeReadWrite :: Bool,
    -- | Source is the source of the image volume.
    _imageVolumeSource :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ImageVolume where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

instance ToJSON ImageVolume where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

-- | LogConfig describes the logging characteristics for a container
data LogConfig = LogConfig
  { -- | LogPath is the path the container's logs will be stored at.
    _logConfigpath :: Text,
    -- | Size is the maximum size of the log file Optional.
    _logConfigsize :: Int64,
    -- | LogDriver is the container's log driver.
    _logConfigdriver :: Text,
    -- | A set of options to accompany the log driver.
    _logConfigoptions :: M.Map Text Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LogConfig where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 10, omitNothingFields = True})

instance ToJSON LogConfig where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 10, omitNothingFields = True})

-- | OverlayVolume holds information about a overlay volume that will be mounted into
-- the container.
data OverlayVolume = OverlayVolume
  { -- | Destination is the absolute path where the mount will be placed in the container.
    _overlayVolumedestination :: Text,
    -- | Source specifies the source path of the mount.
    _overlayVolumesource :: Text,
    -- | Options holds overlay volume options.
    _overlayVolumeoptions :: [Text]
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON OverlayVolume where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

instance ToJSON OverlayVolume where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

-- | ImageSummary image summary
data ImageSummary = ImageSummary
  { -- | virtual size.
    _imageSummaryVirtualSize :: Int64,
    -- | shared size.
    _imageSummarySharedSize :: Int64,
    -- | size.
    _imageSummarySize :: Int64,
    -- | created.
    _imageSummaryCreated :: Int64,
    -- | repo tags.
    _imageSummaryRepoTags :: Maybe [Text],
    -- | containers.
    _imageSummaryContainers :: Int64,
    -- | Id.
    _imageSummaryId :: Text,
    -- | labels.
    _imageSummaryLabels :: Maybe (M.Map Text Text),
    -- | repo digests.
    _imageSummaryRepoDigests :: Maybe [Text],
    -- | parent Id.
    _imageSummaryParentId :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ImageSummary where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 13, omitNothingFields = True})

instance ToJSON ImageSummary where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 13, omitNothingFields = True})

data ImageTreeResponse = ImageTreeResponse
  { _imageTreeResponseTree :: Text,
    _imageTreeResponselayers :: Maybe [Text]
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ImageTreeResponse where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 18, omitNothingFields = True})

instance ToJSON ImageTreeResponse where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 18, omitNothingFields = True})

data ContainerChange = ContainerChange
  { _containerChangePath :: Text,
    _containerChangeKind :: ContainerChangeKind
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ContainerChange where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 16, omitNothingFields = True})

instance ToJSON ContainerChange where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 16, omitNothingFields = True})

data ImagesPullResponse = ImagesPullResponse
  { -- | Stream used to provide output from c\/image.
    _imagesPullResponsestream :: Maybe Text,
    -- | Images contains the ID's of the images pulled.
    _imagesPullResponseimages :: Maybe [Text],
    -- | Error contains text of errors from c\/image.
    _imagesPullResponseerror :: Maybe Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ImagesPullResponse where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 19, omitNothingFields = True})

instance ToJSON ImagesPullResponse where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 19, omitNothingFields = True})

-- | POSIXRlimit type and restrictions
data POSIXRlimit = POSIXRlimit
  { -- | Hard is the hard limit for the specified type.
    _pOSIXRlimithard :: Word64,
    -- | Type of the rlimit to set.
    _pOSIXRlimittype :: Text,
    -- | Soft is the soft limit for the specified type.
    _pOSIXRlimitsoft :: Word64
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON POSIXRlimit where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

instance ToJSON POSIXRlimit where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

-- | DNS contains values interesting for DNS resolvers
data Dns = Dns
  { _dnsdomain :: Maybe Text,
    _dnsoptions :: Maybe [Text],
    _dnssearch :: Maybe [Text],
    _dnsnameservers :: Maybe [Text]
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON Dns where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 4, omitNothingFields = True})

instance ToJSON Dns where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 4, omitNothingFields = True})

-- | NetConf describes a network.
data NetConf = NetConf
  { _netConfname :: Maybe Text,
    _netConfprevResult :: Maybe (M.Map Text Text),
    _netConftype :: Text,
    _netConfcniVersion :: Maybe Text,
    _netConfcapabilities :: Maybe (Maybe (M.Map Text Bool)),
    _netConfdns :: Maybe Dns
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON NetConf where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 8, omitNothingFields = True})

instance ToJSON NetConf where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 8, omitNothingFields = True})

data NetworkConfig = NetworkConfig
  { _networkConfigNetwork :: NetConf,
    _networkConfigBytes :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON NetworkConfig where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

instance ToJSON NetworkConfig where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

-- | NetworkListReport describes the results from listing networks
data NetworkListReport = NetworkListReport
  { _networkListReportDisableCheck :: Bool,
    _networkListReportName :: Text,
    _networkListReportPlugins :: [NetworkConfig],
    _networkListReportLabels :: Maybe (M.Map Text Text),
    _networkListReportCNIVersion :: Text,
    _networkListReportBytes :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON NetworkListReport where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 18, omitNothingFields = True})

instance ToJSON NetworkListReport where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 18, omitNothingFields = True})

-- | Volume volume
data Volume = Volume
  { -- | Low-level details about the volume, provided by the volume driver.
    _volumeStatus :: Maybe (M.Map Text Text),
    -- | Date\/Time the volume was created.
    _volumeCreatedAt :: UTCTime,
    -- | Name of the volume driver used by the volume.
    _volumeDriver :: Text,
    -- | Name of the volume.
    _volumeName :: Text,
    -- | The level at which the volume exists.
    _volumeScope :: Text,
    -- | User-defined key\/value metadata.
    _volumeLabels :: M.Map Text Text,
    _volumeUsageData :: Maybe VolumeUsageData,
    -- | The driver specific options used when creating the volume.
    _volumeOptions :: M.Map Text Text,
    -- | Mount path of the volume on the host.
    _volumeMountpoint :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON Volume where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 7, omitNothingFields = True})

instance ToJSON Volume where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 7, omitNothingFields = True})

-- | VolumeUsageData Usage details about the volume. This information is used by the
-- `GET /system/df` endpoint, and omitted in other endpoints.
data VolumeUsageData = VolumeUsageData
  { -- | The number of containers referencing this volume.
    _volumeUsageDataRefCount :: Int64,
    -- | Amount of disk space used by the volume (in bytes).
    _volumeUsageDataSize :: Int64
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON VolumeUsageData where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 16, omitNothingFields = True})

instance ToJSON VolumeUsageData where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 16, omitNothingFields = True})

-- | InspectSecret contains information on secrets mounted inside the container
data InspectSecret = InspectSecret
  { -- | ID is the UID of the mounted secret file.
    _inspectSecretUID :: Word32,
    -- | ID is the ID of the mode of the mounted secret file.
    _inspectSecretMode :: Word32,
    -- | Name is the name of the secret.
    _inspectSecretName :: Text,
    -- | ID is the GID of the mounted secret file.
    _inspectSecretGID :: Word32,
    -- | ID is the ID of the secret.
    _inspectSecretID :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON InspectSecret where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

instance ToJSON InspectSecret where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

data Secret = Secret
  { _secretUID :: Word32,
    _secretMode :: Word32,
    _secretGID :: Word32,
    _secretSource :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON Secret where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 7, omitNothingFields = True})

instance ToJSON Secret where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 7, omitNothingFields = True})

data SecretInfoReport = SecretInfoReport
  { _secretInfoReportCreatedAt :: UTCTime,
    _secretInfoReportID :: Text,
    _secretInfoReportSpec :: SecretSpec,
    _secretInfoReportUpdatedAt :: UTCTime
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON SecretInfoReport where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 17, omitNothingFields = True})

instance ToJSON SecretInfoReport where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 17, omitNothingFields = True})

data SecretSpec = SecretSpec
  { _secretSpecDriver :: SecretDriverSpec,
    _secretSpecName :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON SecretSpec where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 11, omitNothingFields = True})

instance ToJSON SecretSpec where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 11, omitNothingFields = True})

data SecretDriverSpec = SecretDriverSpec
  { _secretDriverSpecName :: Text,
    _secretDriverSpecOptions :: Maybe (M.Map Text Text)
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON SecretDriverSpec where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 17, omitNothingFields = True})

instance ToJSON SecretDriverSpec where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 17, omitNothingFields = True})

data ProcessConfig = ProcessConfig
  { _processConfigarguments :: [Text],
    _processConfigentrypoint :: Text,
    _processConfigprivileged :: Bool,
    _processConfigtty :: Bool,
    _processConfiguser :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ProcessConfig where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

instance ToJSON ProcessConfig where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 14, omitNothingFields = True})

data ExecInspectResponse = ExecInspectResponse
  { _execInspectResponseCanRemove :: Bool,
    _execInspectResponseContainerID :: Text,
    _execInspectResponseExitCode :: Int,
    _execInspectResponseID :: Text,
    _execInspectResponseOpenStderr :: Bool,
    _execInspectResponseOpenStdin :: Bool,
    _execInspectResponseOpenStdout :: Bool,
    _execInspectResponseRunning :: Bool,
    _execInspectResponsePid :: Word64,
    _execInspectResponseProcessConfig :: ProcessConfig
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ExecInspectResponse where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 20, omitNothingFields = True})

instance ToJSON ExecInspectResponse where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 20, omitNothingFields = True})

data InspectContainerResponse = InspectContainerResponse
  { _inspectContainerResponseEffectiveCaps :: [LinuxCapability],
    _inspectContainerResponseRestartCount :: Int32,
    _inspectContainerResponseState :: InspectContainerState,
    _inspectContainerResponseExitCommand :: [Text],
    _inspectContainerResponseStaticDir :: Text,
    _inspectContainerResponseArgs :: [Text],
    _inspectContainerResponseImage :: Text,
    _inspectContainerResponseConfig :: InspectContainerConfig,
    _inspectContainerResponseHostnamePath :: Text,
    _inspectContainerResponseOCIConfigPath :: Maybe Text,
    _inspectContainerResponseExecIDs :: [Text],
    _inspectContainerResponsePath :: Text,
    _inspectContainerResponseConmonPidFile :: Text,
    _inspectContainerResponseIsInfra :: Bool,
    _inspectContainerResponseCreated :: UTCTime,
    _inspectContainerResponseRootfs :: Text,
    _inspectContainerResponseNamespace :: Text,
    _inspectContainerResponseMountLabel :: Text,
    _inspectContainerResponseDriver :: Text,
    _inspectContainerResponseDependencies :: [Text],
    _inspectContainerResponseName :: Text,
    _inspectContainerResponseId :: Text,
    _inspectContainerResponseProcessLabel :: Text,
    _inspectContainerResponseResolvConfPath :: Text,
    _inspectContainerResponseSizeRw :: Maybe Int64,
    _inspectContainerResponseImageName :: Text,
    _inspectContainerResponsePidFile :: Text,
    _inspectContainerResponsePod :: Text,
    _inspectContainerResponseBoundingCaps :: [LinuxCapability],
    _inspectContainerResponseSizeRootFs :: Maybe Int64,
    _inspectContainerResponseHostsPath :: Text,
    _inspectContainerResponseOCIRuntime :: Text,
    _inspectContainerResponseAppArmorProfile :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON InspectContainerResponse where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 25, omitNothingFields = True})

instance ToJSON InspectContainerResponse where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 25, omitNothingFields = True})

data ContainerCreateResponse = ContainerCreateResponse
  { -- | Warnings during container creation.
    _containerCreateResponseWarnings :: [Text],
    -- | ID of the container created.
    _containerCreateResponseId :: Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ContainerCreateResponse where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 24, omitNothingFields = True})

instance ToJSON ContainerCreateResponse where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 24, omitNothingFields = True})

-- | List containers parameters
data ContainerListQuery = ContainerListQuery
  { -- | Return all containers.
    _containerListQueryall :: Maybe Bool,
    -- | Return this number of most recently created containers, including non-running ones.
    _containerListQuerylimit :: Maybe Int,
    -- | Return the size of container as fields SizeRw and SizeRootFs.
    _containerListQuerysize :: Maybe Bool,
    -- | Sync container state with OCI runtime.
    _containerListQuerysync :: Maybe Bool,
    -- | A JSON encoded value of the filters (a `map[string][]string`) to process on the containers list.
    _containerListQueryfilters :: Maybe Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ContainerListQuery where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 19, omitNothingFields = True})

instance ToJSON ContainerListQuery where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 19, omitNothingFields = True})

-- | An empty 'ContainerListQuery'
defaultContainerListQuery :: ContainerListQuery
defaultContainerListQuery = ContainerListQuery Nothing Nothing Nothing Nothing Nothing

-- | Generate Systemd Units parameters
data GenerateSystemdQuery = GenerateSystemdQuery
  { -- | Use container\/pod names instead of IDs.
    _generateSystemdQueryuseName :: Maybe Bool,
    -- | Create a new container instead of starting an existing one.
    _generateSystemdQuerynew :: Maybe Bool,
    -- | Do not generate the header including the Podman version and the timestamp.
    _generateSystemdQuerynoHeader :: Maybe Bool,
    -- | Stop timeout override.
    _generateSystemdQuerytime :: Maybe Int,
    -- | Systemd restart-policy.
    _generateSystemdQueryrestartPolicy :: Maybe SystemdRestartPolicy,
    -- | Systemd unit name prefix for containers.
    _generateSystemdQuerycontainerPrefix :: Maybe Text,
    -- | Systemd unit name prefix for pods.
    _generateSystemdQuerypodPrefix :: Maybe Text,
    -- | Systemd unit name separator between name\/id and prefix.
    _generateSystemdQueryseparator :: Maybe Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON GenerateSystemdQuery where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 21, omitNothingFields = True})

instance ToJSON GenerateSystemdQuery where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 21, omitNothingFields = True})

-- | An empty 'GenerateSystemdQuery'
defaultGenerateSystemdQuery :: GenerateSystemdQuery
defaultGenerateSystemdQuery = GenerateSystemdQuery Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing

-- | List Images parameters
data ImageListQuery = ImageListQuery
  { -- | Show all images.
    _imageListQueryall :: Maybe Bool,
    -- | A JSON encoded value of the filters (a `map[string][]string`) to process on the images list.
    _imageListQueryfilters :: Maybe Text
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ImageListQuery where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 15, omitNothingFields = True})

instance ToJSON ImageListQuery where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 15, omitNothingFields = True})

-- | An empty 'ImageListQuery'
defaultImageListQuery :: ImageListQuery
defaultImageListQuery = ImageListQuery Nothing Nothing

-- | Attach to a container parameters
data AttachQuery = AttachQuery
  { -- | keys to use for detaching from the container.
    _attachQuerydetachKeys :: Maybe Text,
    -- | Stream all logs from the container across the connection.
    _attachQuerylogs :: Maybe Bool,
    -- | Attach to the container.
    _attachQuerystream :: Maybe Bool,
    -- | Attach to container STDOUT.
    _attachQuerystdout :: Maybe Bool,
    -- | Attach to container STDERR.
    _attachQuerystderr :: Maybe Bool,
    -- | Attach to container STDIN.
    _attachQuerystdin :: Maybe Bool
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON AttachQuery where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

instance ToJSON AttachQuery where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 12, omitNothingFields = True})

-- | An empty 'AttachQuery'
defaultAttachQuery :: AttachQuery
defaultAttachQuery = AttachQuery Nothing Nothing Nothing Nothing Nothing Nothing

-- | Get container logs parameters
data LogsQuery = LogsQuery
  { -- | Keep connection after returning logs.
    _logsQueryfollow :: Maybe Bool,
    -- | Only return logs since this time, as a UNIX timestamp.
    _logsQuerysince :: Maybe UTCTime,
    -- | Only return logs before this time, as a UNIX timestamp.
    _logsQueryuntil :: Maybe UTCTime,
    -- | Add timestamps to every log line.
    _logsQuerytimestamps :: Maybe Bool,
    -- | Only return this number of log lines from the end of the logs.
    _logsQuerytail :: Maybe Word64
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON LogsQuery where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 10, omitNothingFields = True})

instance ToJSON LogsQuery where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 10, omitNothingFields = True})

-- | An empty 'LogsQuery'
defaultLogsQuery :: LogsQuery
defaultLogsQuery = LogsQuery Nothing Nothing Nothing Nothing Nothing

-- | Pull images parameters
data ImagePullQuery = ImagePullQuery
  { -- | Mandatory reference to the image (e.
    _imagePullQueryreference :: Text,
    -- | username:password for the registry.
    _imagePullQuerycredentials :: Maybe Text,
    -- | Pull image for the specified architecture.
    _imagePullQueryArch :: Maybe Text,
    -- | Pull image for the specified operating system.
    _imagePullQueryOS :: Maybe Text,
    -- | Pull image for the specified variant.
    _imagePullQueryVariant :: Maybe Text,
    -- | Pull policy, "always" (default), "missing", "newer", "never".
    _imagePullQuerypolicy :: Maybe Text,
    -- | Require TLS verification.
    _imagePullQuerytlsVerify :: Maybe Bool,
    -- | Pull all tagged images in the repository.
    _imagePullQueryallTags :: Maybe Bool
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ImagePullQuery where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 15, omitNothingFields = True})

instance ToJSON ImagePullQuery where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 15, omitNothingFields = True})

-- | Create an exec instance parameters
data ExecConfig = ExecConfig
  { -- | A list of environment variables in the form ["VAR=value", .
    _execConfigEnv :: Maybe [Text],
    -- | Runs the exec process with extended privileges.
    _execConfigPrivileged :: Maybe Bool,
    -- | The working directory for the exec process inside the container.
    _execConfigWorkingDir :: Maybe Text,
    -- | "The user, and optionally, group to run the exec process inside the container.
    _execConfigUser :: Maybe Text,
    -- | Attach to stdin of the exec command.
    _execConfigAttachStdin :: Maybe Bool,
    -- | Command to run, as a string or array of strings.
    _execConfigCmd :: [Text],
    -- | Attach to stderr of the exec command.
    _execConfigAttachStderr :: Maybe Bool,
    -- | "Override the key sequence for detaching a container.
    _execConfigDetachKeys :: Maybe Text,
    -- | Attach to stdout of the exec command.
    _execConfigAttachStdout :: Maybe Bool,
    -- | Allocate a pseudo-TTY.
    _execConfigTty :: Maybe Bool
  }
  deriving stock (Show, Eq, Generic)

instance FromJSON ExecConfig where
  parseJSON = genericParseJSON (defaultOptions {fieldLabelModifier = drop 11, omitNothingFields = True})

instance ToJSON ExecConfig where
  toJSON = genericToJSON (defaultOptions {fieldLabelModifier = drop 11, omitNothingFields = True})

-- | Creates a 'SpecGenerator' by setting all the optional attributes to Nothing
mkSpecGenerator ::
  -- | image
  Text ->
  SpecGenerator
mkSpecGenerator image = SpecGenerator Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing image Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing

-- | Creates a 'ExecConfig' by setting all the optional attributes to Nothing
mkExecConfig ::
  -- | cmd
  [Text] ->
  ExecConfig
mkExecConfig cmd = ExecConfig Nothing Nothing Nothing Nothing Nothing cmd Nothing Nothing Nothing Nothing

-- | Creates a 'ImagePullQuery' by setting all the optional attributes to Nothing
mkImagePullQuery ::
  -- | reference
  Text ->
  ImagePullQuery
mkImagePullQuery reference = ImagePullQuery reference Nothing Nothing Nothing Nothing Nothing Nothing Nothing

makeLenses ''AttachQuery
makeLenses ''ContainerChange
makeLenses ''ContainerCreateResponse
makeLenses ''ContainerListQuery
makeLenses ''ContainerSize
makeLenses ''Dns
makeLenses ''Error
makeLenses ''ExecConfig
makeLenses ''ExecInspectResponse
makeLenses ''ExecResponse
makeLenses ''GenerateSystemdQuery
makeLenses ''ImageListQuery
makeLenses ''ImagePullQuery
makeLenses ''ImagesPullResponse
makeLenses ''ImageSummary
makeLenses ''ImageTreeResponse
makeLenses ''ImageVolume
makeLenses ''InspectContainerConfig
makeLenses ''InspectContainerResponse
makeLenses ''InspectContainerState
makeLenses ''LinuxDevice
makeLenses ''ListContainer
makeLenses ''ListContainerNamespaces
makeLenses ''LogConfig
makeLenses ''LogsQuery
makeLenses ''Mount
makeLenses ''NamedVolume
makeLenses ''Namespace
makeLenses ''NetConf
makeLenses ''NetworkConfig
makeLenses ''NetworkListReport
makeLenses ''OverlayVolume
makeLenses ''PortMapping
makeLenses ''POSIXRlimit
makeLenses ''ProcessConfig
makeLenses ''SecretCreateResponse
makeLenses ''SecretDriverSpec
makeLenses ''SecretInfoReport
makeLenses ''SecretSpec
makeLenses ''SpecGenerator
makeLenses ''Version
makeLenses ''Volume
makeLenses ''VolumeUsageData