-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | LXD client written in Haskell.
--   
--   Implementation of the LXD client protocol in Haskell.
--   
--   This module implements the LXD client protocol in Haskell using
--   servant and websockets. It allows you to manage LXD containers and
--   other resources directly from Haskell.
--   
--   More information and a tutorial is in
--   <a>Network.LXD.Client.Commands</a>.
--   
--   Accompanying blog post:
--   <a>https://deliquus.com/posts/2017-10-02-using-servant-to-orchestrate-lxd-containers.html</a>
@package lxd-client
@version 0.1.0.6

module Network.LXD.Client.Internal.Compatibility
class Compatibility a b | a -> b
compat :: Compatibility a b => a -> b


-- | Internal prelude.
module Network.LXD.Client.Internal.Prelude

-- | The strategy of combining computations that can throw exceptions by
--   bypassing bound functions from the point an exception is thrown to the
--   point that it is handled.
--   
--   Is parameterized over the type of error information and the monad type
--   constructor. It is common to use <tt><a>Either</a> String</tt> as the
--   monad type constructor for an error monad in which error descriptions
--   take the form of strings. In that case and many other common cases the
--   resulting monad is already defined as an instance of the
--   <a>MonadError</a> class. You can also define your own error type
--   and/or use a monad type constructor other than <tt><a>Either</a>
--   <tt>String</tt></tt> or <tt><a>Either</a> <tt>IOError</tt></tt>. In
--   these cases you will have to explicitly define instances of the
--   <a>MonadError</a> class. (If you are using the deprecated
--   <a>Control.Monad.Error</a> or <a>Control.Monad.Trans.Error</a>, you
--   may also have to define an <a>Error</a> instance.)
class Monad m => MonadError e (m :: * -> *) | m -> e

-- | Is used within a monadic computation to begin exception processing.
throwError :: MonadError e m => e -> m a

-- | A monad transformer that adds exceptions to other monads.
--   
--   <tt>ExceptT</tt> constructs a monad parameterized over two things:
--   
--   <ul>
--   <li>e - The exception type.</li>
--   <li>m - The inner monad.</li>
--   </ul>
--   
--   The <a>return</a> function yields a computation that produces the
--   given value, while <tt>&gt;&gt;=</tt> sequences two subcomputations,
--   exiting on the first exception.
data ExceptT e (m :: * -> *) a :: * -> (* -> *) -> * -> *

-- | The inverse of <a>ExceptT</a>.
runExceptT :: () => ExceptT e m a -> m Either e a

-- | Is used within a monadic computation to begin exception processing.
throwError :: MonadError e m => forall a. () => e -> m a

-- | Monads in which <a>IO</a> computations may be embedded. Any monad
--   built by applying a sequence of monad transformers to the <a>IO</a>
--   monad will be an instance of this class.
--   
--   Instances should satisfy the following laws, which state that
--   <a>liftIO</a> is a transformer of monads:
--   
--   <ul>
--   <li><pre><a>liftIO</a> . <a>return</a> = <a>return</a></pre></li>
--   <li><pre><a>liftIO</a> (m &gt;&gt;= f) = <a>liftIO</a> m &gt;&gt;=
--   (<a>liftIO</a> . f)</pre></li>
--   </ul>
class Monad m => MonadIO (m :: * -> *)

-- | Lift a computation from the <a>IO</a> monad.
liftIO :: MonadIO m => IO a -> m a

-- | Lift a computation from the <a>IO</a> monad.
liftIO :: MonadIO m => forall a. () => IO a -> m a

-- | Minimal definition is either both of <tt>get</tt> and <tt>put</tt> or
--   just <tt>state</tt>
class Monad m => MonadState s (m :: * -> *) | m -> s

-- | Return the state from the internals of the monad.
get :: MonadState s m => m s

-- | Replace the state inside the monad.
put :: MonadState s m => s -> m ()

-- | A state transformer monad parameterized by:
--   
--   <ul>
--   <li><tt>s</tt> - The state.</li>
--   <li><tt>m</tt> - The inner monad.</li>
--   </ul>
--   
--   The <a>return</a> function leaves the state unchanged, while
--   <tt>&gt;&gt;=</tt> uses the final state of the first computation as
--   the initial state of the second.
newtype StateT s (m :: * -> *) a :: * -> (* -> *) -> * -> *
StateT :: (s -> m (a, s)) -> StateT s a
[runStateT] :: StateT s a -> s -> m (a, s)

-- | Monadic state transformer.
--   
--   Maps an old state to a new state inside a state monad. The old state
--   is thrown away.
--   
--   <pre>
--   Main&gt; :t modify ((+1) :: Int -&gt; Int)
--   modify (...) :: (MonadState Int a) =&gt; a ()
--   </pre>
--   
--   This says that <tt>modify (+1)</tt> acts over any Monad that is a
--   member of the <tt>MonadState</tt> class, with an <tt>Int</tt> state.
modify :: MonadState s m => (s -> s) -> m ()

-- | Return the state from the internals of the monad.
get :: MonadState s m => m s

-- | Replace the state inside the monad.
put :: MonadState s m => s -> m ()

-- | The class of monad transformers. Instances should satisfy the
--   following laws, which state that <a>lift</a> is a monad
--   transformation:
--   
--   <ul>
--   <li><pre><a>lift</a> . <a>return</a> = <a>return</a></pre></li>
--   <li><pre><a>lift</a> (m &gt;&gt;= f) = <a>lift</a> m &gt;&gt;=
--   (<a>lift</a> . f)</pre></li>
--   </ul>
class MonadTrans (t :: (* -> *) -> * -> *)

-- | Lift a computation from the argument monad to the constructed monad.
lift :: (MonadTrans t, Monad m) => m a -> t m a

-- | Lift a computation from the argument monad to the constructed monad.
lift :: MonadTrans t => forall (m :: * -> *) a. Monad m => m a -> t m a

-- | Monadic fold over the elements of a structure, associating to the
--   left, i.e. from left to right.
foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b

-- | Class for string-like datastructures; used by the overloaded string
--   extension (-XOverloadedStrings in GHC).
class IsString a
fromString :: IsString a => String -> a

module Network.LXD.Client.Internal.Compatibility.WebSockets
data DataMessage
Text :: ByteString -> DataMessage
Binary :: ByteString -> DataMessage
instance GHC.Show.Show Network.LXD.Client.Internal.Compatibility.WebSockets.DataMessage
instance GHC.Classes.Eq Network.LXD.Client.Internal.Compatibility.WebSockets.DataMessage
instance Network.LXD.Client.Internal.Compatibility.Compatibility Network.WebSockets.Types.DataMessage Network.LXD.Client.Internal.Compatibility.WebSockets.DataMessage


-- | A collection of default remotes.
--   
--   These remotes are installed on an LXD instance by default.
--   
--   Run <tt>lxc image list</tt> for more information.
module Network.LXD.Client.Remotes
imagesRemote :: String
ubuntuRemote :: String
ubuntuDailyRemote :: String


-- | This module implements all types used to communicate with the LXD
--   daemon REST end-point.
--   
--   These types are e.g. used in the <a>Network.LXD.Client.Commands</a>
--   module.
module Network.LXD.Client.Types

-- | Generic LXD API response object.
data GenericResponse op a
Response :: ResponseType -> String -> StatusCode -> op -> Int -> String -> a -> GenericResponse op a
[responseType] :: GenericResponse op a -> ResponseType
[status] :: GenericResponse op a -> String
[statusCode] :: GenericResponse op a -> StatusCode
[responseOperation] :: GenericResponse op a -> op
[errorCode] :: GenericResponse op a -> Int
[error] :: GenericResponse op a -> String
[metadata] :: GenericResponse op a -> a

-- | LXD API synchronous repsonse object, without resulting operation.
type Response a = GenericResponse String a

-- | LXD API asynchronous response object, with resulting operation
type AsyncResponse a = GenericResponse OperationId (BackgroundOperation a)

-- | The type of a generic response object.
data ResponseType
Sync :: ResponseType
Async :: ResponseType
data StatusCode
SCreated :: StatusCode
SStopped :: StatusCode
SRunning :: StatusCode
SSuccess :: StatusCode
SFailure :: StatusCode
SCancelled :: StatusCode
SOther :: Int -> StatusCode

-- | Background operation response object, with metadata of type
--   <tt>m</tt>.
data BackgroundOperation m
BackgroundOperation :: String -> String -> String -> String -> String -> StatusCode -> m -> Bool -> String -> BackgroundOperation m
[backgroundOperationId] :: BackgroundOperation m -> String
[backgroundOperationClass] :: BackgroundOperation m -> String
[backgroundOperationCreatedAt] :: BackgroundOperation m -> String
[backgroundOperationUpdatedAt] :: BackgroundOperation m -> String
[backgroundOperationStatus] :: BackgroundOperation m -> String
[backgroundOperationStatusCode] :: BackgroundOperation m -> StatusCode
[backgroundOperationMetadata] :: BackgroundOperation m -> m
[backgroundOperationMayCancel] :: BackgroundOperation m -> Bool
[backgroundOperationeErr] :: BackgroundOperation m -> String

-- | LXD API configuration object.
--   
--   Returend when querying <tt>GET /1.0</tt>. Some objects may not be
--   present if an untrusted requeset was made.
data ApiConfig
ApiConfig :: [ApiExtension] -> ApiStatus -> String -> AuthStatus -> Maybe Value -> Maybe Value -> Bool -> ApiConfig
[apiExtensions] :: ApiConfig -> [ApiExtension]
[apiStatus] :: ApiConfig -> ApiStatus
[apiVersion] :: ApiConfig -> String
[authStatus] :: ApiConfig -> AuthStatus
[serverConfig] :: ApiConfig -> Maybe Value
[serverEnv] :: ApiConfig -> Maybe Value
[serverPublic] :: ApiConfig -> Bool
data ApiStatus
Development :: ApiStatus
Stable :: ApiStatus
Deprecated :: ApiStatus
data AuthStatus
Guest :: AuthStatus
Untrusted :: AuthStatus
Trusted :: AuthStatus

-- | LXD API version string, e.g. 1.0.
newtype ApiVersion
ApiVersion :: String -> ApiVersion

-- | LXD API extension identifier.
data ApiExtension
ExtPatch :: ApiExtension
ExtCertificateUpdate :: ApiExtension
ExtContainerExecRecording :: ApiExtension
ExtFileAppend :: ApiExtension
ExtFileDelete :: ApiExtension
ExtContainerEditMetadata :: ApiExtension
ExtImageCreateAliases :: ApiExtension
ExtNetwork :: ApiExtension
ExtStorage :: ApiExtension
ExtOther :: String -> ApiExtension

-- | LXD trusted certificate hash.
newtype CertificateHash
CertificateHash :: String -> CertificateHash

-- | LXD container name.
newtype ContainerName
ContainerName :: String -> ContainerName

-- | LXD container information.
--   
--   Returned when querying <tt>GET /1.0/containers/&lt;name&gt;</tt>.
data Container
Container :: String -> String -> Map String String -> String -> Map String (Map String String) -> Bool -> [String] -> Bool -> Map String String -> Map String (Map String String) -> String -> Int -> String -> Container
[containerArchitecture] :: Container -> String
[containerName] :: Container -> String
[containerConfig] :: Container -> Map String String
[containerCreatedAt] :: Container -> String
[containerDevices] :: Container -> Map String (Map String String)
[containerEphemeral] :: Container -> Bool
[containerProfiles] :: Container -> [String]
[containerStateful] :: Container -> Bool
[containerExpandedConfig] :: Container -> Map String String
[containerExpandedDevices] :: Container -> Map String (Map String String)
[containerStatus] :: Container -> String
[containerSatusCode] :: Container -> Int
[containerLastUsedAt] :: Container -> String

-- | Used to set the configuration of an LXD container.
--   
--   Used when querying <tt>PUT /1.0/containers/&lt;name&gt;</tt>.
data ContainerPut
ContainerPut :: String -> Map String String -> Map String (Map String String) -> Bool -> [String] -> ContainerPut
[containerPutArchitecture] :: ContainerPut -> String
[containerPutConfig] :: ContainerPut -> Map String String
[containerPutDevices] :: ContainerPut -> Map String (Map String String)
[containerPutEphemeral] :: ContainerPut -> Bool
[containerPutProfiles] :: ContainerPut -> [String]

-- | Used to patch the configuration of an LXD container.
--   
--   Used when querying <tt>PATCH /1.0/containers/&lt;name&gt;</tt>.
data ContainerPatch
ContainerPatch :: Maybe String -> Maybe (Map String String) -> Maybe (Map String (Map String String)) -> Maybe Bool -> Maybe [String] -> ContainerPatch
[containerPatchArchitecture] :: ContainerPatch -> Maybe String
[containerPatchConfig] :: ContainerPatch -> Maybe (Map String String)
[containerPatchDevices] :: ContainerPatch -> Maybe (Map String (Map String String))
[containerPatchEphemeral] :: ContainerPatch -> Maybe Bool
[containerPatchProfiles] :: ContainerPatch -> Maybe [String]

-- | Used to rename a container to the given name.
--   
--   Used when querying <tt>POST /1.0/containers/&lt;name&gt;</tt>.
newtype ContainerRename
ContainerRename :: String -> ContainerRename

-- | Memory state of an LXD container. As used by <a>ContainerState</a>.
data MemoryState
MemoryState :: Integer -> Integer -> Integer -> Integer -> MemoryState
[memoryStateUsage] :: MemoryState -> Integer
[memoryStateUsagePeak] :: MemoryState -> Integer
[memoryStateSwapUsage] :: MemoryState -> Integer
[memoryStateSwapUsagePeak] :: MemoryState -> Integer

-- | Network state of an LXD container network device. As used by
--   <a>ContainerState</a>.
data NetworkState
NetworkState :: [NetworkAddress] -> NetworkCounters -> String -> String -> Int -> String -> String -> NetworkState
[networkStateAddresses] :: NetworkState -> [NetworkAddress]
[networkStateCounters] :: NetworkState -> NetworkCounters
[networkStateHwaddr] :: NetworkState -> String
[networkStateHostName] :: NetworkState -> String
[networkStateMtu] :: NetworkState -> Int
[networkStateState] :: NetworkState -> String
[networkStateType] :: NetworkState -> String

-- | Network address of an LXD container network device. As used by
--   <a>NetworkState</a>.
data NetworkAddress
NetworkAddress :: String -> String -> String -> String -> NetworkAddress
[networkAddressFamily] :: NetworkAddress -> String
[networkAddressAddress] :: NetworkAddress -> String
[networkAddressNetmask] :: NetworkAddress -> String
[networkAddressScope] :: NetworkAddress -> String

-- | Collection of statistics of an LXD container network device. As used
--   by <a>NetworkState</a>.
data NetworkCounters
NetworkCounters :: Integer -> Integer -> Integer -> Integer -> NetworkCounters
[networkCountersBytesReceived] :: NetworkCounters -> Integer
[networkCountersBytesSent] :: NetworkCounters -> Integer
[networkCountersPacketsReceived] :: NetworkCounters -> Integer
[networkCountersPacketsSent] :: NetworkCounters -> Integer

-- | State of an LXD container.
--   
--   Used when querying <tt>GET /1.0/container/&lt;name&gt;/state</tt>.
data ContainerState
ContainerState :: String -> StatusCode -> Integer -> Map String Integer -> MemoryState -> Map String NetworkState -> Int -> Int -> ContainerState
[containerStateStatus] :: ContainerState -> String
[containerStateStatusCode] :: ContainerState -> StatusCode
[containerStateCpu] :: ContainerState -> Integer
[containerStateDisk] :: ContainerState -> Map String Integer
[containerStateMemory] :: ContainerState -> MemoryState
[containerStateNetwork] :: ContainerState -> Map String NetworkState
[containerStatePid] :: ContainerState -> Int
[containerStateProcesses] :: ContainerState -> Int

-- | State change action for an LXD container, as used by
--   <a>ContainerPutState</a>.
data StateAction
Stop :: StateAction
Start :: StateAction
Restart :: StateAction
Freeze :: StateAction
Unfreeze :: StateAction

-- | State change request for an LXD container.
--   
--   Used when querying <tt>PUT /1.0/container/&lt;name&gt;/state</tt>.
data ContainerPutState
ContainerPutState :: StateAction -> Int -> Bool -> Bool -> ContainerPutState
[containerPutStateAction] :: ContainerPutState -> StateAction
[containerPutStateTimeout] :: ContainerPutState -> Int
[containerPutStateForce] :: ContainerPutState -> Bool
[containerPutStateStateful] :: ContainerPutState -> Bool
containerNewState :: StateAction -> Bool -> ContainerPutState

-- | LXD create container request object.
--   
--   Used when querying <tt>POST /1.0/containers</tt>.
data ContainerCreateRequest
ContainerCreateRequest :: String -> String -> [String] -> Bool -> Map String String -> Map String (Map String String) -> Maybe String -> ContainerSource -> ContainerCreateRequest
[containerCreateRequestName] :: ContainerCreateRequest -> String
[containerCreateRequestArchitecture] :: ContainerCreateRequest -> String
[containerCreateRequestProfiles] :: ContainerCreateRequest -> [String]
[containerCreateRequestEphemeral] :: ContainerCreateRequest -> Bool
[containerCreateRequestConfig] :: ContainerCreateRequest -> Map String String
[containerCreateRequestDevices] :: ContainerCreateRequest -> Map String (Map String String)
[containerCreateRequestInstanceType] :: ContainerCreateRequest -> Maybe String
[containerCreateRequestSource] :: ContainerCreateRequest -> ContainerSource

-- | Create a default <a>ContainerCreateRequest</a>.
containerCreateRequest :: String -> ContainerSource -> ContainerCreateRequest

-- | Source for creating a container, as used by
--   <a>ContainerCreateRequest</a>.
data ContainerSource

-- | Container based on a local image with a certain alias.
ContainerSourceLocalByAlias :: LocalImageByAlias -> ContainerSource

-- | Container based on a local image with a certain alias.
ContainerSourceLocalByFingerprint :: LocalImageByFingerprint -> ContainerSource

-- | Container without a pre-populated rootfs.
ContainerSourceNone :: ContainerSource

-- | Continer based on a public remote image.
ContainerSourceRemote :: RemoteImage -> ContainerSource

-- | LXD delete container request object.
--   
--   Used when querying <tt>DELETE /1.0/containers/&lt;name&gt;</tt>.
data ContainerDeleteRequest
ContainerDeleteRequest :: ContainerDeleteRequest

-- | Configuration parameter to <a>ExecRequest</a> and
--   <tt>ExecResponse</tt>.
data ExecParams

-- | Don't wait for a websocket connection before executing.
ExecImmediate :: ExecParams

-- | Wait for websocket, allocate PTY.
ExecWebsocketInteractive :: ExecParams

-- | Wait for websocket, don't allocate PTY.
ExecWebsocketNonInteractive :: ExecParams

-- | LXD container exec request, configured using <a>ExecParams</a> as type
--   parameter.
--   
--   Request body when querying <tt>POST
--   /1.0/containers/&lt;name&gt;/exec</tt>.
data ExecRequest (params :: ExecParams)
ExecRequest :: [String] -> Map String String -> Bool -> Int -> Int -> ExecRequest
[execRequestCommand] :: ExecRequest -> [String]
[execRequestEnvironment] :: ExecRequest -> Map String String
[execRequestRecordOutput] :: ExecRequest -> Bool
[execRequestWidth] :: ExecRequest -> Int
[execRequestHeight] :: ExecRequest -> Int

-- | Metadata of an immediate exec response.
--   
--   Returned when querying <tt>POST /1.0/containers/&lt;name&gt;/exec</tt>
--   with <a>ExecImmediate</a> as configuration.
type ExecResponseMetadataImmediate = Value

-- | Metadata of a websocket exec repsonse.
--   
--   Returned when querying <tt>POST /1.0/containers/&lt;name&gt;/exec</tt>
--   with <a>ExecWebsocketInteractive</a> or
--   <a>ExecWebsocketNonInteractive</a> as configuration.
--   
--   Paramtrized by a file descriptor set <a>FdSet</a>, see also the type
--   family <a>ExecFds</a>.
newtype ExecResponseMetadataWebsocket fdset
ExecResponseMetadataWebsocket :: Fds fdset -> ExecResponseMetadataWebsocket fdset
[execResponseMetadataWebsocketFds] :: ExecResponseMetadataWebsocket fdset -> Fds fdset

-- | Type family converting an <a>ExecParams</a> to the corresponding
--   response type.

-- | A secret used to connect to a websocket.
newtype Secret
Secret :: String -> Secret

-- | A set of selected file descriptors.
data FdSet
FdAll :: FdSet
FdPty :: FdSet

-- | A set of file descriptors.
data Fds set
[FdsAll] :: {fdsAllStdin :: Secret, fdsAllStdout :: Secret, fdsAllStderr :: Secret, fdsAllControl :: Secret} -> Fds  'FdAll
[FdsPty] :: {fdsPty :: Secret, fdsPtyControl :: Secret} -> Fds  'FdPty

-- | Type family converting an <a>ExecParams</a> to an <a>FdSet</a>.

-- | Group ID of a container file.
newtype Gid
Gid :: Int -> Gid

-- | User ID of a container file.
newtype Uid
Uid :: Int -> Uid

-- | Mode of a container file. Encoded in standard octal notation, e.g.
--   <tt>0644</tt>.
newtype FileMode
FileMode :: String -> FileMode

-- | Type of a container file. Can be one of <tt>directory</tt>,
--   <tt>file</tt> or <tt>symlink</tt>.
newtype FileType
FileType :: String -> FileType

-- | Raw file response, not yet decoded, used because of a bug in Servant.
--   
--   Use headers to get actual content type.
data RawFileResponse
RawFileResponse :: MediaType -> ByteString -> RawFileResponse

-- | Get the body of a <a>RawFileResponse</a>.
rawFileResponseBody :: RawFileResponse -> ByteString

-- | Construct a file response from a type and a <a>ByteString</a>.
fileResponse :: FileType -> ByteString -> Either String FileResponse

-- | LXD file response object, representing either a file or a directory.
--   
--   Used by the <tt>GET
--   /1.0/containers/&lt;name&gt;/files/&lt;filename&gt;</tt> endpoints.
data FileResponse
File :: ByteString -> FileResponse
Directory :: (Response [String]) -> FileResponse

-- | LXD path response object, which is a file and metadata.
--   
--   Used by the <tt>/1.0/containers/&lt;name&gt;/files/...</tt> endpoints.
data PathResponse
PathResponse :: Uid -> Gid -> FileMode -> FileType -> FileResponse -> PathResponse
[pathUid] :: PathResponse -> Uid
[pathGid] :: PathResponse -> Gid
[pathMode] :: PathResponse -> FileMode
[pathType] :: PathResponse -> FileType
[getFile] :: PathResponse -> FileResponse

-- | Reference to a local container, as used by <a>ImageSource</a>.
newtype LocalContainer
LocalContainer :: ContainerName -> LocalContainer

-- | LXD image identifier.
newtype ImageId
ImageId :: String -> ImageId

-- | LXD image information.
--   
--   Returned when querying <tt>GET /1.0/images/&lt;fingerprint&gt;</tt>.
data Image
Image :: [ImageAlias] -> String -> Bool -> Bool -> String -> String -> ImageProperties -> Bool -> Integer -> String -> String -> String -> String -> Image
[imageAllAliases] :: Image -> [ImageAlias]
[imageArchitecture] :: Image -> String
[imageAutoUpdate] :: Image -> Bool
[imageCached] :: Image -> Bool
[imageFingerprint] :: Image -> String
[imageFilename] :: Image -> String
[imageProperties] :: Image -> ImageProperties
[imagePublic] :: Image -> Bool
[imageSize] :: Image -> Integer
[imageCreatedAt] :: Image -> String
[imageExpiresAt] :: Image -> String
[imageLastUsedAt] :: Image -> String
[imageUplaodedAt] :: Image -> String

-- | Alias of an image.
--   
--   Returned when querying <tt>GET /1.0/images/aliases/&lt;name&gt;</tt>,
--   and as a part of <tt>GET /1.0/images/&lt;fingerprint&gt;</tt>.
data ImageAlias
ImageAlias :: String -> String -> Maybe String -> ImageAlias
[imageAliasName] :: ImageAlias -> String
[imageAliasDescription] :: ImageAlias -> String
[imageAliasTarget] :: ImageAlias -> Maybe String

-- | Create a default <a>ImageAlias</a>, with empty description and target.
defaultImageAlias :: String -> ImageAlias

-- | Properties of an image.
data ImageProperties
ImageProperties :: Maybe String -> Maybe String -> Maybe String -> Maybe String -> ImageProperties
[imagePropertiesArchitecture] :: ImageProperties -> Maybe String
[imagePropertiesDescription] :: ImageProperties -> Maybe String
[imagePropertiesOs] :: ImageProperties -> Maybe String
[imagePropertiesRelease] :: ImageProperties -> Maybe String

-- | LXD alias name.
--   
--   Returned when querying <tt>GET /1.0/images/aliases</tt>.
newtype ImageAliasName
ImageAliasName :: String -> ImageAliasName

-- | LXD image create request object.
--   
--   Used when querying <tt>POST /1.0/images</tt>.
data ImageCreateRequest
ImageCreateRequest :: Bool -> Bool -> Value -> [ImageAlias] -> ImageSource -> ImageCreateRequest
[imageCreateRequestPublic] :: ImageCreateRequest -> Bool
[imageCreateRequestAutoUpdate] :: ImageCreateRequest -> Bool
[imageCreateRequestProperties] :: ImageCreateRequest -> Value
[imageCreateRequestAliases] :: ImageCreateRequest -> [ImageAlias]
[imageCreateRequestSource] :: ImageCreateRequest -> ImageSource

-- | Construct a new default <a>ImageCreateRequest</a>.
imageCreateRequest :: ImageSource -> ImageCreateRequest

-- | A generic image source, used by <a>ImageCreateRequest</a>.
data ImageSource
ImageSourceRemoteImage :: RemoteImage -> ImageSource
ImageSourceLocalContainer :: LocalContainer -> ImageSource

-- | LXD image delete request object.
--   
--   Used when querying <tt>DELETE /1.0/images/&lt;fingerprint&gt;</tt>.
data ImageDeleteRequest
ImageDeleteRequest :: ImageDeleteRequest

-- | Source for a local image, specified by its alias.
newtype LocalImageByAlias
LocalImageByAlias :: ImageAliasName -> LocalImageByAlias

-- | Source for a local image, specified by its fingerprint
newtype LocalImageByFingerprint
LocalImageByFingerprint :: ImageId -> LocalImageByFingerprint

-- | Source for an image from a public or private remote.
data RemoteImage
RemoteImage :: String -> Maybe String -> Maybe String -> Either ImageAliasName ImageId -> RemoteImage
[remoteImageServer] :: RemoteImage -> String
[remoteImageSecret] :: RemoteImage -> Maybe String
[remoteImageCertificate] :: RemoteImage -> Maybe String
[remoteImageAliasOrFingerprint] :: RemoteImage -> Either ImageAliasName ImageId

-- | Create a remote image reference form a public remote.
remoteImage :: String -> ImageAliasName -> RemoteImage

-- | Create a remote image reference form a public remote, using an image
--   ID.
remoteImageId :: String -> ImageId -> RemoteImage

-- | LXD network name.
newtype NetworkName
NetworkName :: String -> NetworkName

-- | LXD network.
--   
--   Returned when querying <tt>GET /1.0/networks/&lt;name&gt;</tt>.
data Network
Network :: String -> Map String String -> Bool -> String -> [ContainerName] -> Network
[networkName] :: Network -> String
[networkConfig] :: Network -> Map String String
[networkManaged] :: Network -> Bool
[networkType] :: Network -> String
[networkUsedBy] :: Network -> [ContainerName]

-- | LXD network create request.
--   
--   Used when querying <tt>POST /1.0/networks</tt>.
data NetworkCreateRequest
NetworkCreateRequest :: NetworkName -> String -> Map String String -> NetworkCreateRequest
[networkCreateRequestName] :: NetworkCreateRequest -> NetworkName
[networkCreateRequestDescription] :: NetworkCreateRequest -> String
[networkCreateRequestConfig] :: NetworkCreateRequest -> Map String String

-- | LXD network config update request.
--   
--   Used when querying <tt>PUT/PATCH /1.0/networks/&lt;name&gt;</tt>.
newtype NetworkConfigRequest
NetworkConfigRequest :: Map String String -> NetworkConfigRequest
[networkConfigRequestConfig] :: NetworkConfigRequest -> Map String String

-- | LXD profile name.
--   
--   Returned by <tt>GET /1.0/profiles</tt>.
newtype ProfileName
ProfileName :: String -> ProfileName

-- | LXD profile.
--   
--   Returned by <tt>GET /1.0/profiles/&lt;name&gt;</tt>.
data Profile
Profile :: String -> String -> Map String String -> Map String (Map String String) -> [ContainerName] -> Profile
[profileName] :: Profile -> String
[profileDescription] :: Profile -> String
[profileConfig] :: Profile -> Map String String
[profileDevices] :: Profile -> Map String (Map String String)
[profileUsedBy] :: Profile -> [ContainerName]

-- | LXD profile create request.
--   
--   Used when querying <tt>POST /1.0/profiles</tt>.
data ProfileCreateRequest
ProfileCreateRequest :: String -> String -> Map String String -> Map String (Map String String) -> ProfileCreateRequest
[profileCreateRequestName] :: ProfileCreateRequest -> String
[profileCreateRequestDescription] :: ProfileCreateRequest -> String
[profileCreateRequestConfig] :: ProfileCreateRequest -> Map String String
[profileCreateRequestDevices] :: ProfileCreateRequest -> Map String (Map String String)

-- | LXD profile config request.
--   
--   Used when querying <tt>PUT/PATCH /1.0/profiles/&lt;name&gt;</tt>.
data ProfileConfigRequest
ProfileConfigRequest :: Maybe (Map String String) -> Maybe String -> Maybe (Map String (Map String String)) -> ProfileConfigRequest
[profileConfigRequestConfig] :: ProfileConfigRequest -> Maybe (Map String String)
[profileConfigRequestDescription] :: ProfileConfigRequest -> Maybe String
[profileConfigRequestDevices] :: ProfileConfigRequest -> Maybe (Map String (Map String String))

-- | LXD storage pool name.
--   
--   Returned by <tt>GET /1.0/storage-pools</tt>.
newtype PoolName
PoolName :: String -> PoolName

-- | LXD pool.
--   
--   Returned by <tt>GET /1.0/storage-pools/&lt;name&gt;</tt>.
data Pool
Pool :: String -> String -> String -> Map String String -> [ContainerName] -> Pool
[poolName] :: Pool -> String
[poolDescription] :: Pool -> String
[poolDriver] :: Pool -> String
[poolConfig] :: Pool -> Map String String
[poolUsedBy] :: Pool -> [ContainerName]

-- | LXD pool create request.
--   
--   Used when querying <tt>POST /1.0/storage-pools</tt>.
data PoolCreateRequest
PoolCreateRequest :: String -> String -> Map String String -> PoolCreateRequest
[poolCreateRequestName] :: PoolCreateRequest -> String
[poolCreateRequestDriver] :: PoolCreateRequest -> String
[poolCreateRequestConfig] :: PoolCreateRequest -> Map String String

-- | LXD pool config request.
--   
--   Used when querying <tt>PUT/PATCH /1.0/storage-pools/&lt;name&gt;</tt>.
newtype PoolConfigRequest
PoolConfigRequest :: Map String String -> PoolConfigRequest
[poolConfigRequestConfig] :: PoolConfigRequest -> Map String String

-- | Type of a volume.
type VolumeType = String

-- | LXD volume name, and its type.
--   
--   Returned by <tt>GET /1.0/storage-pools/&lt;name&gt;/volumes</tt>.
data VolumeName
VolumeName :: VolumeType -> String -> VolumeName

-- | LXD volume.
--   
--   Returend by <tt>GET
--   /1.0/storage-pools/&lt;name&gt;/volumes/&lt;type&gt;/&lt;volume&gt;</tt>.
data Volume
Volume :: String -> String -> Map String String -> [ContainerName] -> Volume
[volumeName] :: Volume -> String
[volumeType] :: Volume -> String
[volumeConfig] :: Volume -> Map String String
[volumeUsedBy] :: Volume -> [ContainerName]

-- | LXD volume create request.
--   
--   Used when querying <tt>POST
--   /1.0/storage-pools/&lt;name&gt;/volumes</tt>.
data VolumeCreateRequest
VolumeCreateRequest :: Map String String -> String -> String -> String -> VolumeCreateRequest
[volumeCreateRequestConfig] :: VolumeCreateRequest -> Map String String
[volumeCreateRequestPool] :: VolumeCreateRequest -> String
[volumeCreateRequestName] :: VolumeCreateRequest -> String
[volumeCreateRequestType] :: VolumeCreateRequest -> String

-- | LXD volume config request.
--   
--   Returend by <tt>PUT/PATCH
--   /1.0/storage-pools/&lt;name&gt;/volumes/&lt;type&gt;/&lt;volume&gt;</tt>.
newtype VolumeConfigRequest
VolumeConfigRequest :: Map String String -> VolumeConfigRequest
[volumeConfigRequestConfig] :: VolumeConfigRequest -> Map String String

-- | LXD operation identifier.
newtype OperationId
OperationId :: String -> OperationId

-- | LXD operation status.
type OperationStatus = String

-- | LXD list of all operations.
newtype AllOperations
AllOperations :: (Map OperationStatus [OperationId]) -> AllOperations

-- | LXD operation.
--   
--   Returned when querying <tt>GET /1.0/operations/&lt;uuid&gt;</tt>.
data Operation
Operation :: String -> String -> String -> String -> OperationStatus -> StatusCode -> Value -> Bool -> String -> Operation
[operationId] :: Operation -> String
[operationClass] :: Operation -> String
[operationCreatedAt] :: Operation -> String
[operationUpdatedAt] :: Operation -> String
[operationStatus] :: Operation -> OperationStatus
[operationStatusCode] :: Operation -> StatusCode
[operationMetadata] :: Operation -> Value
[operationMayCancel] :: Operation -> Bool
[operationErr] :: Operation -> String

-- | Progress of an LXD operation.
--   
--   You can try to decode <a>operationMetadata</a> if the
--   <a>operationStatusCode</a> is <a>SRunning</a> to see of the operation
--   contains progress information.
--   
--   The embedded <a>String</a> value is in the format <tt>87% (12.04
--   MB/s)</tt>.
newtype OperationProgress
OperationProgress :: String -> OperationProgress

-- | Type of an LXD event from the <tt>/1.0/events</tt> handle.
data EventType
EventTypeLogging :: EventType
EventTypeOperation :: EventType

-- | An event received from <tt>/1.0/events</tt>.
data Event
Event :: String -> EventType -> EventMetadata -> Event
[eventTimestamp] :: Event -> String
[eventType] :: Event -> EventType
[eventMetadata] :: Event -> EventMetadata

-- | Metadata of an event.
data EventMetadata
EventLoggingMetadata :: Value -> EventMetadata
EventOperationMetadata :: Operation -> EventMetadata
data JsonOrBinary
instance GHC.Show.Show Network.LXD.Client.Types.ApiConfig
instance GHC.Show.Show Network.LXD.Client.Types.AuthStatus
instance GHC.Classes.Eq Network.LXD.Client.Types.AuthStatus
instance GHC.Show.Show Network.LXD.Client.Types.ApiStatus
instance GHC.Classes.Eq Network.LXD.Client.Types.ApiStatus
instance GHC.Show.Show Network.LXD.Client.Types.ApiVersion
instance GHC.Classes.Eq Network.LXD.Client.Types.ApiVersion
instance GHC.Show.Show Network.LXD.Client.Types.PathResponse
instance GHC.Show.Show Network.LXD.Client.Types.FileResponse
instance (GHC.Show.Show a, GHC.Show.Show op) => GHC.Show.Show (Network.LXD.Client.Types.GenericResponse op a)
instance GHC.Show.Show Network.LXD.Client.Types.ContainerState
instance GHC.Show.Show Network.LXD.Client.Types.Event
instance GHC.Show.Show Network.LXD.Client.Types.EventMetadata
instance GHC.Show.Show Network.LXD.Client.Types.Operation
instance GHC.Show.Show Network.LXD.Client.Types.StatusCode
instance GHC.Classes.Ord Network.LXD.Client.Types.StatusCode
instance GHC.Classes.Eq Network.LXD.Client.Types.StatusCode
instance GHC.Show.Show Network.LXD.Client.Types.ResponseType
instance GHC.Classes.Eq Network.LXD.Client.Types.ResponseType
instance GHC.Show.Show Network.LXD.Client.Types.EventType
instance GHC.Classes.Eq Network.LXD.Client.Types.EventType
instance GHC.Show.Show Network.LXD.Client.Types.OperationProgress
instance GHC.Show.Show Network.LXD.Client.Types.AllOperations
instance GHC.Show.Show Network.LXD.Client.Types.OperationId
instance GHC.Classes.Eq Network.LXD.Client.Types.OperationId
instance GHC.Show.Show Network.LXD.Client.Types.VolumeConfigRequest
instance GHC.Show.Show Network.LXD.Client.Types.VolumeCreateRequest
instance GHC.Show.Show Network.LXD.Client.Types.Volume
instance GHC.Show.Show Network.LXD.Client.Types.PoolConfigRequest
instance GHC.Show.Show Network.LXD.Client.Types.PoolCreateRequest
instance GHC.Show.Show Network.LXD.Client.Types.Pool
instance GHC.Show.Show Network.LXD.Client.Types.PoolName
instance GHC.Classes.Eq Network.LXD.Client.Types.PoolName
instance GHC.Show.Show Network.LXD.Client.Types.ProfileConfigRequest
instance GHC.Show.Show Network.LXD.Client.Types.ProfileCreateRequest
instance GHC.Show.Show Network.LXD.Client.Types.Profile
instance GHC.Show.Show Network.LXD.Client.Types.ProfileName
instance GHC.Classes.Eq Network.LXD.Client.Types.ProfileName
instance GHC.Show.Show Network.LXD.Client.Types.NetworkConfigRequest
instance GHC.Show.Show Network.LXD.Client.Types.NetworkCreateRequest
instance GHC.Show.Show Network.LXD.Client.Types.Network
instance GHC.Show.Show Network.LXD.Client.Types.NetworkName
instance GHC.Classes.Eq Network.LXD.Client.Types.NetworkName
instance GHC.Show.Show Network.LXD.Client.Types.ImageCreateRequest
instance GHC.Show.Show Network.LXD.Client.Types.ImageSource
instance GHC.Show.Show Network.LXD.Client.Types.ContainerCreateRequest
instance GHC.Show.Show Network.LXD.Client.Types.ContainerSource
instance GHC.Show.Show Network.LXD.Client.Types.LocalImageByAlias
instance GHC.Show.Show Network.LXD.Client.Types.RemoteImage
instance GHC.Show.Show Network.LXD.Client.Types.ImageAliasName
instance GHC.Classes.Eq Network.LXD.Client.Types.ImageAliasName
instance GHC.Show.Show Network.LXD.Client.Types.Image
instance GHC.Show.Show Network.LXD.Client.Types.ImageProperties
instance GHC.Show.Show Network.LXD.Client.Types.ImageAlias
instance GHC.Show.Show Network.LXD.Client.Types.LocalImageByFingerprint
instance GHC.Show.Show Network.LXD.Client.Types.ImageId
instance GHC.Classes.Eq Network.LXD.Client.Types.ImageId
instance GHC.Show.Show Network.LXD.Client.Types.LocalContainer
instance GHC.Show.Show Network.LXD.Client.Types.RawFileResponse
instance Web.Internal.HttpApiData.ToHttpApiData Network.LXD.Client.Types.FileType
instance GHC.Show.Show Network.LXD.Client.Types.FileType
instance GHC.Read.Read Network.LXD.Client.Types.FileType
instance GHC.Classes.Ord Network.LXD.Client.Types.FileType
instance Data.String.IsString Network.LXD.Client.Types.FileType
instance Web.Internal.HttpApiData.FromHttpApiData Network.LXD.Client.Types.FileType
instance GHC.Classes.Eq Network.LXD.Client.Types.FileType
instance Web.Internal.HttpApiData.ToHttpApiData Network.LXD.Client.Types.FileMode
instance GHC.Show.Show Network.LXD.Client.Types.FileMode
instance GHC.Read.Read Network.LXD.Client.Types.FileMode
instance GHC.Classes.Ord Network.LXD.Client.Types.FileMode
instance Data.String.IsString Network.LXD.Client.Types.FileMode
instance Web.Internal.HttpApiData.FromHttpApiData Network.LXD.Client.Types.FileMode
instance GHC.Classes.Eq Network.LXD.Client.Types.FileMode
instance Web.Internal.HttpApiData.ToHttpApiData Network.LXD.Client.Types.Uid
instance GHC.Show.Show Network.LXD.Client.Types.Uid
instance GHC.Real.Real Network.LXD.Client.Types.Uid
instance GHC.Read.Read Network.LXD.Client.Types.Uid
instance GHC.Classes.Ord Network.LXD.Client.Types.Uid
instance GHC.Num.Num Network.LXD.Client.Types.Uid
instance GHC.Real.Integral Network.LXD.Client.Types.Uid
instance Web.Internal.HttpApiData.FromHttpApiData Network.LXD.Client.Types.Uid
instance GHC.Classes.Eq Network.LXD.Client.Types.Uid
instance GHC.Enum.Enum Network.LXD.Client.Types.Uid
instance GHC.Enum.Bounded Network.LXD.Client.Types.Uid
instance Web.Internal.HttpApiData.ToHttpApiData Network.LXD.Client.Types.Gid
instance GHC.Show.Show Network.LXD.Client.Types.Gid
instance GHC.Real.Real Network.LXD.Client.Types.Gid
instance GHC.Read.Read Network.LXD.Client.Types.Gid
instance GHC.Classes.Ord Network.LXD.Client.Types.Gid
instance GHC.Num.Num Network.LXD.Client.Types.Gid
instance GHC.Real.Integral Network.LXD.Client.Types.Gid
instance Web.Internal.HttpApiData.FromHttpApiData Network.LXD.Client.Types.Gid
instance GHC.Classes.Eq Network.LXD.Client.Types.Gid
instance GHC.Enum.Enum Network.LXD.Client.Types.Gid
instance GHC.Enum.Bounded Network.LXD.Client.Types.Gid
instance GHC.Show.Show (Network.LXD.Client.Types.ExecResponseMetadataWebsocket fdset)
instance GHC.Show.Show Network.LXD.Client.Types.FdSet
instance GHC.Show.Show Network.LXD.Client.Types.Secret
instance GHC.Classes.Eq Network.LXD.Client.Types.Secret
instance GHC.Show.Show (Network.LXD.Client.Types.ExecRequest params)
instance GHC.Show.Show Network.LXD.Client.Types.ExecParams
instance GHC.Show.Show Network.LXD.Client.Types.ContainerPutState
instance GHC.Show.Show Network.LXD.Client.Types.StateAction
instance GHC.Classes.Eq Network.LXD.Client.Types.StateAction
instance GHC.Show.Show Network.LXD.Client.Types.NetworkState
instance GHC.Show.Show Network.LXD.Client.Types.NetworkCounters
instance GHC.Show.Show Network.LXD.Client.Types.NetworkAddress
instance GHC.Show.Show Network.LXD.Client.Types.MemoryState
instance GHC.Show.Show Network.LXD.Client.Types.ContainerRename
instance GHC.Show.Show Network.LXD.Client.Types.ContainerPatch
instance GHC.Show.Show Network.LXD.Client.Types.ContainerPut
instance GHC.Show.Show Network.LXD.Client.Types.Container
instance GHC.Show.Show Network.LXD.Client.Types.ContainerName
instance GHC.Classes.Eq Network.LXD.Client.Types.ContainerName
instance GHC.Show.Show Network.LXD.Client.Types.CertificateHash
instance GHC.Classes.Eq Network.LXD.Client.Types.CertificateHash
instance GHC.Show.Show Network.LXD.Client.Types.ApiExtension
instance GHC.Classes.Ord Network.LXD.Client.Types.ApiExtension
instance GHC.Classes.Eq Network.LXD.Client.Types.ApiExtension
instance GHC.Show.Show (Network.LXD.Client.Types.Fds set)
instance Servant.API.ContentTypes.MimeUnrender Network.LXD.Client.Types.JsonOrBinary Network.LXD.Client.Types.RawFileResponse
instance Servant.API.ContentTypes.Accept Network.LXD.Client.Types.JsonOrBinary
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.ApiConfig
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.AuthStatus
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.ApiStatus
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.ApiVersion
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.FileResponse
instance (Data.Aeson.Types.FromJSON.FromJSON op, Data.Aeson.Types.FromJSON.FromJSON a) => Data.Aeson.Types.FromJSON.FromJSON (Network.LXD.Client.Types.GenericResponse op a)
instance Data.Aeson.Types.FromJSON.FromJSON m => Data.Aeson.Types.FromJSON.FromJSON (Network.LXD.Client.Types.BackgroundOperation m)
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.ContainerState
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.Event
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.Operation
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.StatusCode
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.StatusCode
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.ResponseType
instance Web.Internal.HttpApiData.ToHttpApiData Network.LXD.Client.Types.EventType
instance Web.Internal.HttpApiData.FromHttpApiData Network.LXD.Client.Types.EventType
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.EventType
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.OperationProgress
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.AllOperations
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.OperationId
instance Data.String.IsString Network.LXD.Client.Types.OperationId
instance Web.Internal.HttpApiData.ToHttpApiData Network.LXD.Client.Types.OperationId
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.VolumeConfigRequest
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.VolumeCreateRequest
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.Volume
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.VolumeName
instance Web.Internal.HttpApiData.ToHttpApiData Network.LXD.Client.Types.VolumeName
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.PoolConfigRequest
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.PoolCreateRequest
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.Pool
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.PoolName
instance Data.String.IsString Network.LXD.Client.Types.PoolName
instance Web.Internal.HttpApiData.ToHttpApiData Network.LXD.Client.Types.PoolName
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ProfileConfigRequest
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ProfileCreateRequest
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.Profile
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.ProfileName
instance Data.String.IsString Network.LXD.Client.Types.ProfileName
instance Web.Internal.HttpApiData.ToHttpApiData Network.LXD.Client.Types.ProfileName
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.NetworkConfigRequest
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.NetworkCreateRequest
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.Network
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.NetworkName
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.NetworkName
instance Data.String.IsString Network.LXD.Client.Types.NetworkName
instance Web.Internal.HttpApiData.ToHttpApiData Network.LXD.Client.Types.NetworkName
instance Data.Default.Class.Default Network.LXD.Client.Types.ImageDeleteRequest
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ImageDeleteRequest
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ImageCreateRequest
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ImageSource
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ContainerCreateRequest
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ContainerSource
instance Data.String.IsString Network.LXD.Client.Types.LocalImageByAlias
instance Data.String.IsString Network.LXD.Client.Types.ImageAliasName
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.ImageAliasName
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ImageAliasName
instance Web.Internal.HttpApiData.ToHttpApiData Network.LXD.Client.Types.ImageAliasName
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.Image
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.ImageProperties
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.ImageAlias
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ImageAlias
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.ImageId
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ImageId
instance Web.Internal.HttpApiData.ToHttpApiData Network.LXD.Client.Types.ImageId
instance Data.String.IsString Network.LXD.Client.Types.LocalContainer
instance Data.Aeson.Types.FromJSON.FromJSON (Network.LXD.Client.Types.ExecResponseMetadataWebsocket 'Network.LXD.Client.Types.FdPty)
instance Data.Aeson.Types.FromJSON.FromJSON (Network.LXD.Client.Types.ExecResponseMetadataWebsocket 'Network.LXD.Client.Types.FdAll)
instance Data.Aeson.Types.FromJSON.FromJSON (Network.LXD.Client.Types.Fds 'Network.LXD.Client.Types.FdAll)
instance Data.Aeson.Types.FromJSON.FromJSON (Network.LXD.Client.Types.Fds 'Network.LXD.Client.Types.FdPty)
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.Secret
instance Data.Default.Class.Default (Network.LXD.Client.Types.ExecRequest a)
instance Data.Aeson.Types.ToJSON.ToJSON (Network.LXD.Client.Types.ExecRequest 'Network.LXD.Client.Types.ExecImmediate)
instance Data.Aeson.Types.ToJSON.ToJSON (Network.LXD.Client.Types.ExecRequest 'Network.LXD.Client.Types.ExecWebsocketInteractive)
instance Data.Aeson.Types.ToJSON.ToJSON (Network.LXD.Client.Types.ExecRequest 'Network.LXD.Client.Types.ExecWebsocketNonInteractive)
instance Data.Default.Class.Default Network.LXD.Client.Types.ContainerDeleteRequest
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ContainerDeleteRequest
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ContainerPutState
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.StateAction
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.NetworkState
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.NetworkCounters
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.NetworkAddress
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.MemoryState
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ContainerRename
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ContainerPatch
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ContainerPut
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.Container
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.ContainerName
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ContainerName
instance Data.String.IsString Network.LXD.Client.Types.ContainerName
instance Web.Internal.HttpApiData.ToHttpApiData Network.LXD.Client.Types.ContainerName
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.CertificateHash
instance Data.Aeson.Types.FromJSON.FromJSON Network.LXD.Client.Types.ApiExtension
instance Data.Aeson.Types.ToJSON.ToJSON Network.LXD.Client.Types.ApiExtension


-- | This module implements high-level client for the LXD daemon events
--   end-points.
module Network.LXD.Client.Events
eventsPath :: [EventType] -> String
operationsPath :: String
readAllEvents :: (Maybe Event -> IO ()) -> ClientApp ()
listenForOperation :: MVar OperationId -> MVar Operation -> ClientApp ()
newtype LXDMessageError
LXDMessageError :: String -> LXDMessageError
instance GHC.Show.Show Network.LXD.Client.Events.LXDMessageError
instance GHC.Exception.Exception Network.LXD.Client.Events.LXDMessageError


-- | This module exposes a low-level Servant-built API for the LXD daemon.
--   
--   You can query this API using Servant functions and a client created
--   from <a>Network.LXD.Client</a>.
--   
--   You probably want to use the commands exposed in
--   <a>Network.LXD.Client.Commands</a> instead.
module Network.LXD.Client.API

-- | Exception thrown in <a>containerGetPath</a>,
--   <a>containerDeletePath</a> and <a>containerPostPath</a>.
data FailureResponse
FailureResponse :: Request -> (Response ByteString) -> FailureResponse
supportedVersions :: ClientM (Response [ApiVersion])
apiConfig :: ClientM (Response ApiConfig)
trustedCertificates :: ClientM (Response [CertificateHash])
containerNames :: ClientM (Response [ContainerName])
containerCreate :: ContainerCreateRequest -> ClientM (AsyncResponse Value)
container :: ContainerName -> ClientM (Response Container)
containerDelete :: ContainerName -> ContainerDeleteRequest -> ClientM (AsyncResponse Value)
containerPut :: ContainerName -> ContainerPut -> ClientM (AsyncResponse Value)
containerPatch :: ContainerName -> ContainerPatch -> ClientM (Response Value)
containerRename :: ContainerName -> ContainerRename -> ClientM (AsyncResponse Value)
containerState :: ContainerName -> ClientM (Response ContainerState)
containerPutState :: ContainerName -> ContainerPutState -> ClientM (AsyncResponse Value)
containerExecImmediate :: ExecClient  'ExecImmediate
containerExecWebsocketInteractive :: ExecClient  'ExecWebsocketInteractive
containerExecWebsocketNonInteractive :: ExecClient  'ExecWebsocketNonInteractive
data WriteMode
ModeOverwrite :: WriteMode
ModeAppend :: WriteMode
containerGetPath :: ContainerName -> FilePath -> ClientM PathResponse
containerPostPath :: ContainerName -> FilePath -> Maybe Uid -> Maybe Gid -> Maybe FileMode -> FileType -> Maybe WriteMode -> ByteString -> ClientM (Response Value)
containerDeletePath :: ContainerName -> FilePath -> ClientM (Response Value)
imageIds :: ClientM (Response [ImageId])
imageCreate :: ImageCreateRequest -> ClientM (AsyncResponse Value)
imageAliases :: ClientM (Response [ImageAliasName])
imageAlias :: ImageAliasName -> ClientM (Response ImageAlias)
image :: ImageId -> ClientM (Response Image)
imageDelete :: ImageId -> ImageDeleteRequest -> ClientM (AsyncResponse Value)
networkList :: ClientM (Response [NetworkName])
networkCreate :: NetworkCreateRequest -> ClientM (Response Value)
network :: NetworkName -> ClientM (Response Network)
networkPut :: NetworkName -> NetworkConfigRequest -> ClientM (Response Value)
networkPatch :: NetworkName -> NetworkConfigRequest -> ClientM (Response Value)
networkDelete :: NetworkName -> ClientM (Response Value)
profileList :: ClientM (Response [ProfileName])
profileCreate :: ProfileCreateRequest -> ClientM (Response Value)
profile :: ProfileName -> ClientM (Response Profile)
profilePut :: ProfileName -> ProfileConfigRequest -> ClientM (Response Value)
profilePatch :: ProfileName -> ProfileConfigRequest -> ClientM (Response Value)
profileDelete :: ProfileName -> ClientM (Response Value)
poolList :: ClientM (Response [PoolName])
poolCreate :: PoolCreateRequest -> ClientM (Response Value)
pool :: PoolName -> ClientM (Response Pool)
poolPut :: PoolName -> PoolConfigRequest -> ClientM (Response Value)
poolPatch :: PoolName -> PoolConfigRequest -> ClientM (Response Value)
poolDelete :: PoolName -> ClientM (Response Value)
volumeList :: PoolName -> ClientM (Response [VolumeName])
volumeCreate :: PoolName -> VolumeCreateRequest -> ClientM (Response Value)
volume :: PoolName -> VolumeName -> ClientM (Response Volume)
volumePut :: PoolName -> VolumeName -> VolumeConfigRequest -> ClientM (Response Value)
volumePatch :: PoolName -> VolumeName -> VolumeConfigRequest -> ClientM (Response Value)
volumeDelete :: PoolName -> VolumeName -> ClientM (Response Value)
operationIds :: ClientM (Response AllOperations)
operation :: OperationId -> ClientM (Response Operation)
operationCancel :: OperationId -> ClientM (Response Value)
operationWait :: OperationId -> ClientM (Response Operation)
operationWebSocket :: OperationId -> Secret -> String
readAllWebSocket :: (ByteString -> IO ()) -> ClientApp ()
writeAllWebSocket :: MVar (Maybe ByteString) -> ClientApp ()
type ExecClient a = ContainerName -> ExecRequest a -> ClientM (AsyncResponse (ExecResponseMetadata a))
instance GHC.Show.Show Network.LXD.Client.API.DecodeError
instance GHC.Show.Show Network.LXD.Client.API.FailureResponse
instance GHC.Show.Show Network.LXD.Client.API.WriteMode
instance GHC.Exception.Exception Network.LXD.Client.API.DecodeError
instance GHC.Exception.Exception Network.LXD.Client.API.FailureResponse


-- | This module exposes functionality to create LXD clients. These can be
--   used to communciate to an LXD daemon, either using the high-level
--   <a>Network.LXD.Client.Commands</a> module, or the low-level
--   <a>Network.LXD.Client.API</a> module.
--   
--   <b>You are probably looking for
--   <a>Network.LXD.Client.Commands</a></b>, which exposes a high-level
--   interface to communicate with the LXD daemon.
--   
--   If you are simply connecting to the LXD daemon on your local host, you
--   shouldn't import this module. The <a>Network.LXD.Client.Commands</a>
--   module probably re-exports enough functionality for your needs.
module Network.LXD.Client

-- | A structure containing everything to connect to a remote LXD host.
data RemoteHost
RemoteHost :: Host -> Int -> String -> ClientAuth -> ServerAuth -> RemoteHost

-- | The remote host to use when querying the HTTP endpoint.
--   (default=<tt>127.0.0.1</tt>)
[remoteHostHost] :: RemoteHost -> Host

-- | The remote port to use when querying the HTTP endpoint.
--   (default=<tt>8443</tt>)
[remoteHostPort] :: RemoteHost -> Int

-- | The base path to use when querying the HTTP endpoint.
--   (default=<tt>/</tt>)
[remoteHostBasePath] :: RemoteHost -> String

-- | The client authentication to use when connecting.
[remoteHostClientKey] :: RemoteHost -> ClientAuth

-- | The server certificate to trust.
[remoteHostCertificate] :: RemoteHost -> ServerAuth

-- | Specifies the client authentication method.
data ClientAuth

-- | Do not authenticate the client.
NoClientAuth :: ClientAuth

-- | Look in <tt>~<i>.config</i>lxc</tt> and fetch the client certificate.
DefaultClientAuth :: ClientAuth

-- | Use a custom private key.
ClientAuthKey :: PrivateKey -> ClientAuth

-- | Specifies the server authentication method.
data ServerAuth

-- | Use the default CA store when checking the certificate.
DefaultCAStore :: ServerAuth

-- | Look in <tt>~<i>.config</i>lxc/servercerts</tt> and fetch the server
--   certificate for the specified remote.
DefaultServerAuth :: RemoteName -> ServerAuth

-- | Use a custom server certificate.
ServerAuth :: Certificate -> ServerAuth
type Host = String
type RemoteName = String
type Certificate = FilePath
type Key = FilePath
data PrivateKey
PrivateKey :: Certificate -> Key -> PrivateKey
remoteHostClient :: (MonadError String m, MonadIO m) => RemoteHost -> m ClientEnv
remoteHostManager :: (MonadError String m, MonadIO m) => RemoteHost -> m Manager
clientManager :: (MonadError String m, MonadIO m) => Host -> Maybe PrivateKey -> Maybe Certificate -> m Manager

-- | A structure containing everything to connect to a lcoal LXD host.
newtype LocalHost
LocalHost :: FilePath -> LocalHost

-- | The path to the local unix socket.
[localHostUnix] :: LocalHost -> FilePath
localHostClient :: MonadIO m => LocalHost -> m ClientEnv
runWebSocketsRemote :: (MonadError String m, MonadIO m) => RemoteHost -> String -> ClientApp a -> m a
runWebSocketsLocal :: (MonadError String m, MonadIO m) => LocalHost -> String -> ClientApp a -> m a
instance Data.Default.Class.Default Network.LXD.Client.RemoteHost
instance Data.Default.Class.Default Network.LXD.Client.LocalHost


-- | This module implements commands to communicate with the LXD daemon
--   over its REST API.
--   
--   More information about LXD: <a>https://github.com/lxc/lxd</a>
--   
--   This module implements a high-level interface, and is probably what
--   you need. It uses the lower-level interface implemented in
--   <a>Network.LXD.Client.API</a>, but unless you are a power user, you
--   shouldn't need this module.
--   
--   Accompanying blog post:
--   <a>https://deliquus.com/posts/2017-10-02-using-servant-to-orchestrate-lxd-containers.html</a>
module Network.LXD.Client.Commands

-- | The default value for this type.
def :: Default a => a

-- | A host that can be connected to.
data Host
HLocalHost :: LocalHost -> Host
HRemoteHost :: RemoteHost -> Host

-- | Monad with access to a <a>ClientEnv</a>.
class (MonadIO m, MonadMask m) => HasClient m

-- | Return the LXD remote host to connect to.
askHost :: HasClient m => m Host

-- | Return the <a>ClientEnv</a> to use when connecting to the LXD host.
--   
--   Returns <a>defaultClientEnv</a> by default.
askClientEnv :: HasClient m => m ClientEnv

-- | Create a default <a>ClientEnv</a>.
defaultClientEnv :: HasClient m => m ClientEnv

-- | Monad with access to a local host.
data WithLocalHost a

-- | Run a <a>WithLocalHost</a> monad
runWithLocalHost :: LocalHost -> WithLocalHost a -> IO a

-- | Monad with access to a remote host.
data WithRemoteHost a

-- | Run a <a>WithRemoteHost</a> monad
runWithRemoteHost :: RemoteHost -> WithRemoteHost a -> IO a

-- | Get information about the API.
lxcApi :: HasClient m => m ApiConfig

-- | List all container names.
lxcList :: HasClient m => m [ContainerName]

-- | Create a new container.
lxcCreate :: HasClient m => ContainerCreateRequest -> m ()

-- | Delete a container.
lxcDelete :: HasClient m => ContainerName -> m ()

-- | Get information about a container.
lxcInfo :: HasClient m => ContainerName -> m Container

-- | Start a contianer.
lxcStart :: HasClient m => ContainerName -> m ()

-- | Stop a container.
--   
--   The second flag forces the action.
lxcStop :: HasClient m => ContainerName -> Bool -> m ()

-- | Restart a container.
--   
--   The second flag forces the action.
lxcRestart :: HasClient m => ContainerName -> Bool -> m ()

-- | Freeze a container.
lxcFreeze :: HasClient m => ContainerName -> m ()

-- | Unfreeze a container.
lxcUnfreeze :: HasClient m => ContainerName -> m ()

-- | Execute a command, catch standard output, print stderr.
lxcExec :: HasClient m => ContainerName -> String -> [String] -> ByteString -> m ByteString

-- | Execute a command, provide environment variables, catch standard
--   output, print stderr.
lxcExecEnv :: HasClient m => ContainerName -> String -> [String] -> Map String String -> ByteString -> m ByteString

-- | Execute a command, with given environment variables.
lxcExecRaw :: HasClient m => ContainerName -> String -> [String] -> Map String String -> MVar (Maybe ByteString) -> MVar ByteString -> MVar ByteString -> m (Async ())

-- | Delete a file or empty directory from an LXD container.
lxcFileDelete :: HasClient m => ContainerName -> FilePath -> m ()

-- | Pull the file contents from an LXD container.
lxcFilePull :: HasClient m => ContainerName -> FilePath -> FilePath -> m ()

-- | Pull the file contents from an LXD container, return the lazy
--   bytestring.
lxcFilePullRaw :: HasClient m => ContainerName -> FilePath -> m ByteString

-- | Push the file contents to an LXD container.
lxcFilePush :: HasClient m => ContainerName -> FilePath -> FilePath -> m ()

-- | Push the fole contents to an LXD container, with the given attributes.
lxcFilePushAttrs :: HasClient m => ContainerName -> FilePath -> FilePath -> Maybe Uid -> Maybe Gid -> m ()

-- | Write the lazy bytestring to a file in an LXD container.
lxcFilePushRaw :: HasClient m => ContainerName -> FilePath -> ByteString -> m ()

-- | Write the lazy bytestring to a file in an LXD container, with given
--   file attributes.
lxcFilePushRawAttrs :: HasClient m => ContainerName -> FilePath -> Maybe Uid -> Maybe Gid -> Maybe FileMode -> FileType -> Maybe WriteMode -> ByteString -> m ()

-- | List all entries in a directory, without <tt>.</tt> or <tt>..</tt>.
lxcFileListDir :: HasClient m => ContainerName -> FilePath -> m [String]

-- | Create a directory.
lxcFileMkdir :: HasClient m => ContainerName -> String -> Bool -> m ()

-- | Create a directory using a host directory as a template.
--   
--   Note that this function doesn't copy the directory contents. Use
--   <a>lxcFilePushRecursive</a> if you want to copy the directory contents
--   as well.
lxcFileMkdirTemplate :: HasClient m => ContainerName -> FilePath -> FilePath -> m ()

-- | Create a directory, with given attributes.
lxcFileMkdirAttrs :: HasClient m => ContainerName -> String -> Bool -> Maybe Uid -> Maybe Gid -> Maybe FileMode -> m ()

-- | Recursively pull a directory (or file) from a container.
lxcFilePullRecursive :: HasClient m => ContainerName -> FilePath -> FilePath -> m ()

-- | Recursively push a directory (or file) to a container.
lxcFilePushRecursive :: HasClient m => ContainerName -> FilePath -> FilePath -> m ()

-- | Recursively push a directory (or file) to a container, with given file
--   attributes.
lxcFilePushRecursiveAttrs :: HasClient m => ContainerName -> FilePath -> FilePath -> Maybe Uid -> Maybe Gid -> m ()

-- | List all image IDs.
lxcImageList :: HasClient m => m [ImageId]

-- | List al image aliases.
lxcImageAliases :: HasClient m => m [ImageAliasName]

-- | Get image information.
lxcImageInfo :: HasClient m => ImageId -> m Image

-- | Get image alias information.
lxcImageAlias :: HasClient m => ImageAliasName -> m ImageAlias

-- | Create an image.
lxcImageCreate :: HasClient m => ImageCreateRequest -> m ()

-- | Delete an image.
lxcImageDelete :: HasClient m => ImageId -> m ()

-- | List all networks
lxcNetworkList :: HasClient m => m [NetworkName]

-- | Create a network.
lxcNetworkCreate :: HasClient m => NetworkCreateRequest -> m ()

-- | Get network information.
lxcNetworkInfo :: HasClient m => NetworkName -> m Network

-- | Configure a network.
lxcNetworkConfig :: HasClient m => NetworkName -> NetworkConfigRequest -> m ()

-- | Delete a network
lxcNetworkDelete :: HasClient m => NetworkName -> m ()

-- | List all profiles
lxcProfileList :: HasClient m => m [ProfileName]

-- | Create a profile.
lxcProfileCreate :: HasClient m => ProfileCreateRequest -> m ()

-- | Get profile information.
lxcProfileInfo :: HasClient m => ProfileName -> m Profile

-- | Configure a profile.
lxcProfileConfig :: HasClient m => ProfileName -> ProfileConfigRequest -> m ()

-- | Delete a profile
lxcProfileDelete :: HasClient m => ProfileName -> m ()

-- | List all storage pools
lxcStorageList :: HasClient m => m [PoolName]

-- | Create a storage pool.
lxcStorageCreate :: HasClient m => PoolCreateRequest -> m ()

-- | Get storage pool information.
lxcStorageInfo :: HasClient m => PoolName -> m Pool

-- | Configure a storage pool.
lxcStorageConfig :: HasClient m => PoolName -> PoolConfigRequest -> m ()

-- | Delete a storage pool
lxcStorageDelete :: HasClient m => PoolName -> m ()

-- | List all volumes
lxcVolumeList :: HasClient m => PoolName -> m [VolumeName]

-- | Create a volume.
lxcVolumeCreate :: HasClient m => PoolName -> VolumeCreateRequest -> m ()

-- | Get volume information.
lxcVolumeInfo :: HasClient m => PoolName -> VolumeName -> m Volume

-- | Configure a volume.
lxcVolumeConfig :: HasClient m => PoolName -> VolumeName -> VolumeConfigRequest -> m ()

-- | Delete a volume
lxcVolumeDelete :: HasClient m => PoolName -> VolumeName -> m ()
instance Control.Monad.Catch.MonadMask Network.LXD.Client.Commands.WithRemoteHost
instance Control.Monad.Catch.MonadThrow Network.LXD.Client.Commands.WithRemoteHost
instance Control.Monad.Catch.MonadCatch Network.LXD.Client.Commands.WithRemoteHost
instance Control.Monad.IO.Class.MonadIO Network.LXD.Client.Commands.WithRemoteHost
instance GHC.Base.Monad Network.LXD.Client.Commands.WithRemoteHost
instance GHC.Base.Functor Network.LXD.Client.Commands.WithRemoteHost
instance GHC.Base.Applicative Network.LXD.Client.Commands.WithRemoteHost
instance Control.Monad.Catch.MonadMask Network.LXD.Client.Commands.WithLocalHost
instance Control.Monad.Catch.MonadThrow Network.LXD.Client.Commands.WithLocalHost
instance Control.Monad.Catch.MonadCatch Network.LXD.Client.Commands.WithLocalHost
instance Control.Monad.IO.Class.MonadIO Network.LXD.Client.Commands.WithLocalHost
instance GHC.Base.Monad Network.LXD.Client.Commands.WithLocalHost
instance GHC.Base.Functor Network.LXD.Client.Commands.WithLocalHost
instance GHC.Base.Applicative Network.LXD.Client.Commands.WithLocalHost
instance GHC.Show.Show Network.LXD.Client.Commands.OperationError
instance GHC.Exception.Exception Network.LXD.Client.Commands.OperationError
instance GHC.Show.Show Network.LXD.Client.Commands.StatusError
instance GHC.Exception.Exception Network.LXD.Client.Commands.StatusError
instance GHC.Show.Show Network.LXD.Client.Commands.ClientError
instance GHC.Exception.Exception Network.LXD.Client.Commands.ClientError
instance Network.LXD.Client.Commands.HasClient Network.LXD.Client.Commands.WithRemoteHost
instance Network.LXD.Client.Commands.HasClient Network.LXD.Client.Commands.WithLocalHost
