{-# LANGUAGE DataKinds #-}

module Cachix.Types.Deploy where

import Data.HashMap.Strict
import Data.Swagger (ToSchema)
import Deriving.Aeson
import Protolude

data Deploy = Deploy
  { Deploy -> HashMap Text Text
agents :: HashMap Text Text,
    Deploy -> Maybe (HashMap Text Text)
rollbackScript :: Maybe (HashMap Text Text)
  }
  deriving (Int -> Deploy -> ShowS
[Deploy] -> ShowS
Deploy -> String
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, Deploy -> Deploy -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Deploy -> Deploy -> Bool
$c/= :: Deploy -> Deploy -> Bool
== :: Deploy -> Deploy -> Bool
$c== :: Deploy -> Deploy -> Bool
Eq, 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
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, Proxy Deploy -> Declare (Definitions Schema) NamedSchema
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)
  deriving ([Deploy] -> Encoding
[Deploy] -> Value
Deploy -> Encoding
Deploy -> Value
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) via CustomJSON '[OmitNothingFields] Deploy