{-# LANGUAGE DeriveAnyClass #-}

module Cachix.Types.Deploy where

import Data.Aeson
  ( FromJSON,
    ToJSON,
  )
import Data.HashMap.Strict
import Data.Swagger (ToSchema)
import Protolude

newtype Deploy = Deploy
  { Deploy -> HashMap Text Text
agents :: HashMap Text Text
  }
  deriving (Int -> Deploy -> ShowS
[Deploy] -> ShowS
Deploy -> String
(Int -> Deploy -> ShowS)
-> (Deploy -> String) -> ([Deploy] -> ShowS) -> Show Deploy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Deploy] -> ShowS
$cshowList :: [Deploy] -> ShowS
show :: Deploy -> String
$cshow :: Deploy -> String
showsPrec :: Int -> Deploy -> ShowS
$cshowsPrec :: Int -> Deploy -> ShowS
Show, (forall x. Deploy -> Rep Deploy x)
-> (forall x. Rep Deploy x -> Deploy) -> Generic Deploy
forall x. Rep Deploy x -> Deploy
forall x. Deploy -> Rep Deploy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Deploy x -> Deploy
$cfrom :: forall x. Deploy -> Rep Deploy x
Generic, Value -> Parser [Deploy]
Value -> Parser Deploy
(Value -> Parser Deploy)
-> (Value -> Parser [Deploy]) -> FromJSON Deploy
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Deploy]
$cparseJSONList :: Value -> Parser [Deploy]
parseJSON :: Value -> Parser Deploy
$cparseJSON :: Value -> Parser Deploy
FromJSON, [Deploy] -> Encoding
[Deploy] -> Value
Deploy -> Encoding
Deploy -> Value
(Deploy -> Value)
-> (Deploy -> Encoding)
-> ([Deploy] -> Value)
-> ([Deploy] -> Encoding)
-> ToJSON Deploy
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Deploy] -> Encoding
$ctoEncodingList :: [Deploy] -> Encoding
toJSONList :: [Deploy] -> Value
$ctoJSONList :: [Deploy] -> Value
toEncoding :: Deploy -> Encoding
$ctoEncoding :: Deploy -> Encoding
toJSON :: Deploy -> Value
$ctoJSON :: Deploy -> Value
ToJSON, Proxy Deploy -> Declare (Definitions Schema) NamedSchema
(Proxy Deploy -> Declare (Definitions Schema) NamedSchema)
-> ToSchema Deploy
forall a.
(Proxy a -> Declare (Definitions Schema) NamedSchema) -> ToSchema a
declareNamedSchema :: Proxy Deploy -> Declare (Definitions Schema) NamedSchema
$cdeclareNamedSchema :: Proxy Deploy -> Declare (Definitions Schema) NamedSchema
ToSchema)