{-# LANGUAGE LambdaCase #-}

module GitHub.Data.Deployments
    ( DeploymentQueryOption (..)
    , renderDeploymentQueryOption

    , Deployment (..)
    , CreateDeployment (..)

    , DeploymentStatus (..)
    , DeploymentStatusState (..)
    , CreateDeploymentStatus (..)
    ) where


import GitHub.Internal.Prelude
import Prelude ()

import Control.Arrow (second)

import Data.ByteString (ByteString)

import GitHub.Data.Definitions (SimpleUser)
import GitHub.Data.Id          (Id)
import GitHub.Data.Name        (Name)
import GitHub.Data.URL         (URL)

import qualified Data.Aeson         as JSON
import qualified Data.Text          as T
import qualified Data.Text.Encoding as T

data DeploymentQueryOption
    = DeploymentQuerySha         !Text
    | DeploymentQueryRef         !Text
    | DeploymentQueryTask        !Text
    | DeploymentQueryEnvironment !Text
      deriving (Int -> DeploymentQueryOption -> ShowS
[DeploymentQueryOption] -> ShowS
DeploymentQueryOption -> String
(Int -> DeploymentQueryOption -> ShowS)
-> (DeploymentQueryOption -> String)
-> ([DeploymentQueryOption] -> ShowS)
-> Show DeploymentQueryOption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeploymentQueryOption] -> ShowS
$cshowList :: [DeploymentQueryOption] -> ShowS
show :: DeploymentQueryOption -> String
$cshow :: DeploymentQueryOption -> String
showsPrec :: Int -> DeploymentQueryOption -> ShowS
$cshowsPrec :: Int -> DeploymentQueryOption -> ShowS
Show, Typeable DeploymentQueryOption
DataType
Constr
Typeable DeploymentQueryOption
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> DeploymentQueryOption
    -> c DeploymentQueryOption)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DeploymentQueryOption)
-> (DeploymentQueryOption -> Constr)
-> (DeploymentQueryOption -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DeploymentQueryOption))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DeploymentQueryOption))
-> ((forall b. Data b => b -> b)
    -> DeploymentQueryOption -> DeploymentQueryOption)
-> (forall r r'.
    (r -> r' -> r)
    -> r
    -> (forall d. Data d => d -> r')
    -> DeploymentQueryOption
    -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r
    -> (forall d. Data d => d -> r')
    -> DeploymentQueryOption
    -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> DeploymentQueryOption -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> DeploymentQueryOption -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> DeploymentQueryOption -> m DeploymentQueryOption)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> DeploymentQueryOption -> m DeploymentQueryOption)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> DeploymentQueryOption -> m DeploymentQueryOption)
-> Data DeploymentQueryOption
DeploymentQueryOption -> DataType
DeploymentQueryOption -> Constr
(forall b. Data b => b -> b)
-> DeploymentQueryOption -> DeploymentQueryOption
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> DeploymentQueryOption
-> c DeploymentQueryOption
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentQueryOption
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> DeploymentQueryOption -> u
forall u.
(forall d. Data d => d -> u) -> DeploymentQueryOption -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentQueryOption -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentQueryOption -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DeploymentQueryOption -> m DeploymentQueryOption
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentQueryOption -> m DeploymentQueryOption
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentQueryOption
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> DeploymentQueryOption
-> c DeploymentQueryOption
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeploymentQueryOption)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentQueryOption)
$cDeploymentQueryEnvironment :: Constr
$cDeploymentQueryTask :: Constr
$cDeploymentQueryRef :: Constr
$cDeploymentQuerySha :: Constr
$tDeploymentQueryOption :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> DeploymentQueryOption -> m DeploymentQueryOption
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentQueryOption -> m DeploymentQueryOption
gmapMp :: (forall d. Data d => d -> m d)
-> DeploymentQueryOption -> m DeploymentQueryOption
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentQueryOption -> m DeploymentQueryOption
gmapM :: (forall d. Data d => d -> m d)
-> DeploymentQueryOption -> m DeploymentQueryOption
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DeploymentQueryOption -> m DeploymentQueryOption
gmapQi :: Int -> (forall d. Data d => d -> u) -> DeploymentQueryOption -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> DeploymentQueryOption -> u
gmapQ :: (forall d. Data d => d -> u) -> DeploymentQueryOption -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> DeploymentQueryOption -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentQueryOption -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentQueryOption -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentQueryOption -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentQueryOption -> r
gmapT :: (forall b. Data b => b -> b)
-> DeploymentQueryOption -> DeploymentQueryOption
$cgmapT :: (forall b. Data b => b -> b)
-> DeploymentQueryOption -> DeploymentQueryOption
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentQueryOption)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentQueryOption)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c DeploymentQueryOption)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeploymentQueryOption)
dataTypeOf :: DeploymentQueryOption -> DataType
$cdataTypeOf :: DeploymentQueryOption -> DataType
toConstr :: DeploymentQueryOption -> Constr
$ctoConstr :: DeploymentQueryOption -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentQueryOption
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentQueryOption
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> DeploymentQueryOption
-> c DeploymentQueryOption
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> DeploymentQueryOption
-> c DeploymentQueryOption
$cp1Data :: Typeable DeploymentQueryOption
Data, Typeable, DeploymentQueryOption -> DeploymentQueryOption -> Bool
(DeploymentQueryOption -> DeploymentQueryOption -> Bool)
-> (DeploymentQueryOption -> DeploymentQueryOption -> Bool)
-> Eq DeploymentQueryOption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeploymentQueryOption -> DeploymentQueryOption -> Bool
$c/= :: DeploymentQueryOption -> DeploymentQueryOption -> Bool
== :: DeploymentQueryOption -> DeploymentQueryOption -> Bool
$c== :: DeploymentQueryOption -> DeploymentQueryOption -> Bool
Eq, Eq DeploymentQueryOption
Eq DeploymentQueryOption
-> (DeploymentQueryOption -> DeploymentQueryOption -> Ordering)
-> (DeploymentQueryOption -> DeploymentQueryOption -> Bool)
-> (DeploymentQueryOption -> DeploymentQueryOption -> Bool)
-> (DeploymentQueryOption -> DeploymentQueryOption -> Bool)
-> (DeploymentQueryOption -> DeploymentQueryOption -> Bool)
-> (DeploymentQueryOption
    -> DeploymentQueryOption -> DeploymentQueryOption)
-> (DeploymentQueryOption
    -> DeploymentQueryOption -> DeploymentQueryOption)
-> Ord DeploymentQueryOption
DeploymentQueryOption -> DeploymentQueryOption -> Bool
DeploymentQueryOption -> DeploymentQueryOption -> Ordering
DeploymentQueryOption
-> DeploymentQueryOption -> DeploymentQueryOption
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DeploymentQueryOption
-> DeploymentQueryOption -> DeploymentQueryOption
$cmin :: DeploymentQueryOption
-> DeploymentQueryOption -> DeploymentQueryOption
max :: DeploymentQueryOption
-> DeploymentQueryOption -> DeploymentQueryOption
$cmax :: DeploymentQueryOption
-> DeploymentQueryOption -> DeploymentQueryOption
>= :: DeploymentQueryOption -> DeploymentQueryOption -> Bool
$c>= :: DeploymentQueryOption -> DeploymentQueryOption -> Bool
> :: DeploymentQueryOption -> DeploymentQueryOption -> Bool
$c> :: DeploymentQueryOption -> DeploymentQueryOption -> Bool
<= :: DeploymentQueryOption -> DeploymentQueryOption -> Bool
$c<= :: DeploymentQueryOption -> DeploymentQueryOption -> Bool
< :: DeploymentQueryOption -> DeploymentQueryOption -> Bool
$c< :: DeploymentQueryOption -> DeploymentQueryOption -> Bool
compare :: DeploymentQueryOption -> DeploymentQueryOption -> Ordering
$ccompare :: DeploymentQueryOption -> DeploymentQueryOption -> Ordering
$cp1Ord :: Eq DeploymentQueryOption
Ord, (forall x. DeploymentQueryOption -> Rep DeploymentQueryOption x)
-> (forall x. Rep DeploymentQueryOption x -> DeploymentQueryOption)
-> Generic DeploymentQueryOption
forall x. Rep DeploymentQueryOption x -> DeploymentQueryOption
forall x. DeploymentQueryOption -> Rep DeploymentQueryOption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeploymentQueryOption x -> DeploymentQueryOption
$cfrom :: forall x. DeploymentQueryOption -> Rep DeploymentQueryOption x
Generic)

instance NFData DeploymentQueryOption where rnf :: DeploymentQueryOption -> ()
rnf = DeploymentQueryOption -> ()
forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf
instance Binary DeploymentQueryOption

renderDeploymentQueryOption :: DeploymentQueryOption -> (ByteString, ByteString)
renderDeploymentQueryOption :: DeploymentQueryOption -> (ByteString, ByteString)
renderDeploymentQueryOption =
    (Text -> ByteString)
-> (ByteString, Text) -> (ByteString, ByteString)
forall (a :: * -> * -> *) b c d.
Arrow a =>
a b c -> a (d, b) (d, c)
second Text -> ByteString
T.encodeUtf8 ((ByteString, Text) -> (ByteString, ByteString))
-> (DeploymentQueryOption -> (ByteString, Text))
-> DeploymentQueryOption
-> (ByteString, ByteString)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. \case
        DeploymentQuerySha         Text
sha  -> (ByteString
"sha",         Text
sha)
        DeploymentQueryRef         Text
ref  -> (ByteString
"ref",         Text
ref)
        DeploymentQueryTask        Text
task -> (ByteString
"task",        Text
task)
        DeploymentQueryEnvironment Text
env  -> (ByteString
"environment", Text
env)

data Deployment a = Deployment
    { Deployment a -> URL
deploymentUrl           :: !URL
    , Deployment a -> Id (Deployment a)
deploymentId            :: !(Id   (Deployment a))
    , Deployment a -> Name (Deployment a)
deploymentSha           :: !(Name (Deployment a))
    , Deployment a -> Text
deploymentRef           :: !Text
    , Deployment a -> Text
deploymentTask          :: !Text
    , Deployment a -> Maybe a
deploymentPayload       :: !(Maybe a)
    , Deployment a -> Text
deploymentEnvironment   :: !Text
    , Deployment a -> Text
deploymentDescription   :: !Text
    , Deployment a -> SimpleUser
deploymentCreator       :: !SimpleUser
    , Deployment a -> UTCTime
deploymentCreatedAt     :: !UTCTime
    , Deployment a -> UTCTime
deploymentUpdatedAt     :: !UTCTime
    , Deployment a -> URL
deploymentStatusesUrl   :: !URL
    , Deployment a -> URL
deploymentRepositoryUrl :: !URL
    } deriving (Int -> Deployment a -> ShowS
[Deployment a] -> ShowS
Deployment a -> String
(Int -> Deployment a -> ShowS)
-> (Deployment a -> String)
-> ([Deployment a] -> ShowS)
-> Show (Deployment a)
forall a. Show a => Int -> Deployment a -> ShowS
forall a. Show a => [Deployment a] -> ShowS
forall a. Show a => Deployment a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Deployment a] -> ShowS
$cshowList :: forall a. Show a => [Deployment a] -> ShowS
show :: Deployment a -> String
$cshow :: forall a. Show a => Deployment a -> String
showsPrec :: Int -> Deployment a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> Deployment a -> ShowS
Show, Typeable (Deployment a)
DataType
Constr
Typeable (Deployment a)
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Deployment a -> c (Deployment a))
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (Deployment a))
-> (Deployment a -> Constr)
-> (Deployment a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (Deployment a)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (Deployment a)))
-> ((forall b. Data b => b -> b) -> Deployment a -> Deployment a)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Deployment a -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Deployment a -> r)
-> (forall u. (forall d. Data d => d -> u) -> Deployment a -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> Deployment a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Deployment a -> m (Deployment a))
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Deployment a -> m (Deployment a))
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Deployment a -> m (Deployment a))
-> Data (Deployment a)
Deployment a -> DataType
Deployment a -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (Deployment a))
(forall b. Data b => b -> b) -> Deployment a -> Deployment a
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Deployment a -> c (Deployment a)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Deployment a)
forall a. Data a => Typeable (Deployment a)
forall a. Data a => Deployment a -> DataType
forall a. Data a => Deployment a -> Constr
forall a.
Data a =>
(forall b. Data b => b -> b) -> Deployment a -> Deployment a
forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> Deployment a -> u
forall a u.
Data a =>
(forall d. Data d => d -> u) -> Deployment a -> [u]
forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Deployment a -> r
forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Deployment a -> r
forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> Deployment a -> m (Deployment a)
forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Deployment a -> m (Deployment a)
forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Deployment a)
forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Deployment a -> c (Deployment a)
forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Deployment a))
forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Deployment a))
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> Deployment a -> u
forall u. (forall d. Data d => d -> u) -> Deployment a -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Deployment a -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Deployment a -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> Deployment a -> m (Deployment a)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> Deployment a -> m (Deployment a)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Deployment a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Deployment a -> c (Deployment a)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (Deployment a))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Deployment a))
$cDeployment :: Constr
$tDeployment :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> Deployment a -> m (Deployment a)
$cgmapMo :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Deployment a -> m (Deployment a)
gmapMp :: (forall d. Data d => d -> m d) -> Deployment a -> m (Deployment a)
$cgmapMp :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> Deployment a -> m (Deployment a)
gmapM :: (forall d. Data d => d -> m d) -> Deployment a -> m (Deployment a)
$cgmapM :: forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> Deployment a -> m (Deployment a)
gmapQi :: Int -> (forall d. Data d => d -> u) -> Deployment a -> u
$cgmapQi :: forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> Deployment a -> u
gmapQ :: (forall d. Data d => d -> u) -> Deployment a -> [u]
$cgmapQ :: forall a u.
Data a =>
(forall d. Data d => d -> u) -> Deployment a -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Deployment a -> r
$cgmapQr :: forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> Deployment a -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Deployment a -> r
$cgmapQl :: forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> Deployment a -> r
gmapT :: (forall b. Data b => b -> b) -> Deployment a -> Deployment a
$cgmapT :: forall a.
Data a =>
(forall b. Data b => b -> b) -> Deployment a -> Deployment a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Deployment a))
$cdataCast2 :: forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (Deployment a))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (Deployment a))
$cdataCast1 :: forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (Deployment a))
dataTypeOf :: Deployment a -> DataType
$cdataTypeOf :: forall a. Data a => Deployment a -> DataType
toConstr :: Deployment a -> Constr
$ctoConstr :: forall a. Data a => Deployment a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Deployment a)
$cgunfold :: forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (Deployment a)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Deployment a -> c (Deployment a)
$cgfoldl :: forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> Deployment a -> c (Deployment a)
$cp1Data :: forall a. Data a => Typeable (Deployment a)
Data, Typeable, Deployment a -> Deployment a -> Bool
(Deployment a -> Deployment a -> Bool)
-> (Deployment a -> Deployment a -> Bool) -> Eq (Deployment a)
forall a. Eq a => Deployment a -> Deployment a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Deployment a -> Deployment a -> Bool
$c/= :: forall a. Eq a => Deployment a -> Deployment a -> Bool
== :: Deployment a -> Deployment a -> Bool
$c== :: forall a. Eq a => Deployment a -> Deployment a -> Bool
Eq, Eq (Deployment a)
Eq (Deployment a)
-> (Deployment a -> Deployment a -> Ordering)
-> (Deployment a -> Deployment a -> Bool)
-> (Deployment a -> Deployment a -> Bool)
-> (Deployment a -> Deployment a -> Bool)
-> (Deployment a -> Deployment a -> Bool)
-> (Deployment a -> Deployment a -> Deployment a)
-> (Deployment a -> Deployment a -> Deployment a)
-> Ord (Deployment a)
Deployment a -> Deployment a -> Bool
Deployment a -> Deployment a -> Ordering
Deployment a -> Deployment a -> Deployment a
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (Deployment a)
forall a. Ord a => Deployment a -> Deployment a -> Bool
forall a. Ord a => Deployment a -> Deployment a -> Ordering
forall a. Ord a => Deployment a -> Deployment a -> Deployment a
min :: Deployment a -> Deployment a -> Deployment a
$cmin :: forall a. Ord a => Deployment a -> Deployment a -> Deployment a
max :: Deployment a -> Deployment a -> Deployment a
$cmax :: forall a. Ord a => Deployment a -> Deployment a -> Deployment a
>= :: Deployment a -> Deployment a -> Bool
$c>= :: forall a. Ord a => Deployment a -> Deployment a -> Bool
> :: Deployment a -> Deployment a -> Bool
$c> :: forall a. Ord a => Deployment a -> Deployment a -> Bool
<= :: Deployment a -> Deployment a -> Bool
$c<= :: forall a. Ord a => Deployment a -> Deployment a -> Bool
< :: Deployment a -> Deployment a -> Bool
$c< :: forall a. Ord a => Deployment a -> Deployment a -> Bool
compare :: Deployment a -> Deployment a -> Ordering
$ccompare :: forall a. Ord a => Deployment a -> Deployment a -> Ordering
$cp1Ord :: forall a. Ord a => Eq (Deployment a)
Ord, (forall x. Deployment a -> Rep (Deployment a) x)
-> (forall x. Rep (Deployment a) x -> Deployment a)
-> Generic (Deployment a)
forall x. Rep (Deployment a) x -> Deployment a
forall x. Deployment a -> Rep (Deployment a) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall a x. Rep (Deployment a) x -> Deployment a
forall a x. Deployment a -> Rep (Deployment a) x
$cto :: forall a x. Rep (Deployment a) x -> Deployment a
$cfrom :: forall a x. Deployment a -> Rep (Deployment a) x
Generic)

instance NFData a => NFData (Deployment a) where rnf :: Deployment a -> ()
rnf = Deployment a -> ()
forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf
instance Binary a => Binary (Deployment a)

instance FromJSON a => FromJSON (Deployment a) where
    parseJSON :: Value -> Parser (Deployment a)
parseJSON = String
-> (Object -> Parser (Deployment a))
-> Value
-> Parser (Deployment a)
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"GitHub Deployment" ((Object -> Parser (Deployment a))
 -> Value -> Parser (Deployment a))
-> (Object -> Parser (Deployment a))
-> Value
-> Parser (Deployment a)
forall a b. (a -> b) -> a -> b
$ \Object
o ->
        URL
-> Id (Deployment a)
-> Name (Deployment a)
-> Text
-> Text
-> Maybe a
-> Text
-> Text
-> SimpleUser
-> UTCTime
-> UTCTime
-> URL
-> URL
-> Deployment a
forall a.
URL
-> Id (Deployment a)
-> Name (Deployment a)
-> Text
-> Text
-> Maybe a
-> Text
-> Text
-> SimpleUser
-> UTCTime
-> UTCTime
-> URL
-> URL
-> Deployment a
Deployment
            (URL
 -> Id (Deployment a)
 -> Name (Deployment a)
 -> Text
 -> Text
 -> Maybe a
 -> Text
 -> Text
 -> SimpleUser
 -> UTCTime
 -> UTCTime
 -> URL
 -> URL
 -> Deployment a)
-> Parser URL
-> Parser
     (Id (Deployment a)
      -> Name (Deployment a)
      -> Text
      -> Text
      -> Maybe a
      -> Text
      -> Text
      -> SimpleUser
      -> UTCTime
      -> UTCTime
      -> URL
      -> URL
      -> Deployment a)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"url"
            Parser
  (Id (Deployment a)
   -> Name (Deployment a)
   -> Text
   -> Text
   -> Maybe a
   -> Text
   -> Text
   -> SimpleUser
   -> UTCTime
   -> UTCTime
   -> URL
   -> URL
   -> Deployment a)
-> Parser (Id (Deployment a))
-> Parser
     (Name (Deployment a)
      -> Text
      -> Text
      -> Maybe a
      -> Text
      -> Text
      -> SimpleUser
      -> UTCTime
      -> UTCTime
      -> URL
      -> URL
      -> Deployment a)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Id (Deployment a))
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
            Parser
  (Name (Deployment a)
   -> Text
   -> Text
   -> Maybe a
   -> Text
   -> Text
   -> SimpleUser
   -> UTCTime
   -> UTCTime
   -> URL
   -> URL
   -> Deployment a)
-> Parser (Name (Deployment a))
-> Parser
     (Text
      -> Text
      -> Maybe a
      -> Text
      -> Text
      -> SimpleUser
      -> UTCTime
      -> UTCTime
      -> URL
      -> URL
      -> Deployment a)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Name (Deployment a))
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"sha"
            Parser
  (Text
   -> Text
   -> Maybe a
   -> Text
   -> Text
   -> SimpleUser
   -> UTCTime
   -> UTCTime
   -> URL
   -> URL
   -> Deployment a)
-> Parser Text
-> Parser
     (Text
      -> Maybe a
      -> Text
      -> Text
      -> SimpleUser
      -> UTCTime
      -> UTCTime
      -> URL
      -> URL
      -> Deployment a)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"ref"
            Parser
  (Text
   -> Maybe a
   -> Text
   -> Text
   -> SimpleUser
   -> UTCTime
   -> UTCTime
   -> URL
   -> URL
   -> Deployment a)
-> Parser Text
-> Parser
     (Maybe a
      -> Text
      -> Text
      -> SimpleUser
      -> UTCTime
      -> UTCTime
      -> URL
      -> URL
      -> Deployment a)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"task"
            Parser
  (Maybe a
   -> Text
   -> Text
   -> SimpleUser
   -> UTCTime
   -> UTCTime
   -> URL
   -> URL
   -> Deployment a)
-> Parser (Maybe a)
-> Parser
     (Text
      -> Text
      -> SimpleUser
      -> UTCTime
      -> UTCTime
      -> URL
      -> URL
      -> Deployment a)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Maybe a)
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
.:? Key
"payload"
            Parser
  (Text
   -> Text
   -> SimpleUser
   -> UTCTime
   -> UTCTime
   -> URL
   -> URL
   -> Deployment a)
-> Parser Text
-> Parser
     (Text
      -> SimpleUser -> UTCTime -> UTCTime -> URL -> URL -> Deployment a)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"environment"
            Parser
  (Text
   -> SimpleUser -> UTCTime -> UTCTime -> URL -> URL -> Deployment a)
-> Parser Text
-> Parser
     (SimpleUser -> UTCTime -> UTCTime -> URL -> URL -> Deployment a)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"description"
            Parser
  (SimpleUser -> UTCTime -> UTCTime -> URL -> URL -> Deployment a)
-> Parser SimpleUser
-> Parser (UTCTime -> UTCTime -> URL -> URL -> Deployment a)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser SimpleUser
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"creator"
            Parser (UTCTime -> UTCTime -> URL -> URL -> Deployment a)
-> Parser UTCTime -> Parser (UTCTime -> URL -> URL -> Deployment a)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"created_at"
            Parser (UTCTime -> URL -> URL -> Deployment a)
-> Parser UTCTime -> Parser (URL -> URL -> Deployment a)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"updated_at"
            Parser (URL -> URL -> Deployment a)
-> Parser URL -> Parser (URL -> Deployment a)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"statuses_url"
            Parser (URL -> Deployment a) -> Parser URL -> Parser (Deployment a)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository_url"

data CreateDeployment a = CreateDeployment
    { CreateDeployment a -> Text
createDeploymentRef              :: !Text
    -- ^ Required. The ref to deploy. This can be a branch, tag, or SHA.
    , CreateDeployment a -> Maybe Text
createDeploymentTask             :: !(Maybe Text)
    -- ^ Specifies a task to execute (e.g., deploy or deploy:migrations).
    -- Default: deploy
    , CreateDeployment a -> Maybe Bool
createDeploymentAutoMerge        :: !(Maybe Bool)
    -- ^ Attempts to automatically merge the default branch into the requested
    -- ref, if it is behind the default branch. Default: true
    , CreateDeployment a -> Maybe (Vector Text)
createDeploymentRequiredContexts :: !(Maybe (Vector Text))
    -- ^ The status contexts to verify against commit status checks. If this
    -- parameter is omitted, then all unique contexts will be verified before a
    -- deployment is created. To bypass checking entirely pass an empty array.
    -- Defaults to all unique contexts.
    , CreateDeployment a -> Maybe a
createDeploymentPayload          :: !(Maybe a)
    -- ^ JSON payload with extra information about the deployment. Default: ""
    , CreateDeployment a -> Maybe Text
createDeploymentEnvironment      :: !(Maybe Text)
    -- ^ Name for the target deployment environment (e.g., production, staging,
    -- qa). Default: production
    , CreateDeployment a -> Maybe Text
createDeploymentDescription      :: !(Maybe Text)
    -- ^ Short description of the deployment. Default: ""
    } deriving (Int -> CreateDeployment a -> ShowS
[CreateDeployment a] -> ShowS
CreateDeployment a -> String
(Int -> CreateDeployment a -> ShowS)
-> (CreateDeployment a -> String)
-> ([CreateDeployment a] -> ShowS)
-> Show (CreateDeployment a)
forall a. Show a => Int -> CreateDeployment a -> ShowS
forall a. Show a => [CreateDeployment a] -> ShowS
forall a. Show a => CreateDeployment a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDeployment a] -> ShowS
$cshowList :: forall a. Show a => [CreateDeployment a] -> ShowS
show :: CreateDeployment a -> String
$cshow :: forall a. Show a => CreateDeployment a -> String
showsPrec :: Int -> CreateDeployment a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> CreateDeployment a -> ShowS
Show, Typeable (CreateDeployment a)
DataType
Constr
Typeable (CreateDeployment a)
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> CreateDeployment a
    -> c (CreateDeployment a))
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c (CreateDeployment a))
-> (CreateDeployment a -> Constr)
-> (CreateDeployment a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c (CreateDeployment a)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c (CreateDeployment a)))
-> ((forall b. Data b => b -> b)
    -> CreateDeployment a -> CreateDeployment a)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> CreateDeployment a -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> CreateDeployment a -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> CreateDeployment a -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> CreateDeployment a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> CreateDeployment a -> m (CreateDeployment a))
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> CreateDeployment a -> m (CreateDeployment a))
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> CreateDeployment a -> m (CreateDeployment a))
-> Data (CreateDeployment a)
CreateDeployment a -> DataType
CreateDeployment a -> Constr
(forall d. Data d => c (t d)) -> Maybe (c (CreateDeployment a))
(forall b. Data b => b -> b)
-> CreateDeployment a -> CreateDeployment a
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CreateDeployment a
-> c (CreateDeployment a)
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (CreateDeployment a)
forall a. Data a => Typeable (CreateDeployment a)
forall a. Data a => CreateDeployment a -> DataType
forall a. Data a => CreateDeployment a -> Constr
forall a.
Data a =>
(forall b. Data b => b -> b)
-> CreateDeployment a -> CreateDeployment a
forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> CreateDeployment a -> u
forall a u.
Data a =>
(forall d. Data d => d -> u) -> CreateDeployment a -> [u]
forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CreateDeployment a -> r
forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CreateDeployment a -> r
forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d)
-> CreateDeployment a -> m (CreateDeployment a)
forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> CreateDeployment a -> m (CreateDeployment a)
forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (CreateDeployment a)
forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CreateDeployment a
-> c (CreateDeployment a)
forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (CreateDeployment a))
forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (CreateDeployment a))
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> CreateDeployment a -> u
forall u. (forall d. Data d => d -> u) -> CreateDeployment a -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CreateDeployment a -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CreateDeployment a -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CreateDeployment a -> m (CreateDeployment a)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CreateDeployment a -> m (CreateDeployment a)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (CreateDeployment a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CreateDeployment a
-> c (CreateDeployment a)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (CreateDeployment a))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (CreateDeployment a))
$cCreateDeployment :: Constr
$tCreateDeployment :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> CreateDeployment a -> m (CreateDeployment a)
$cgmapMo :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> CreateDeployment a -> m (CreateDeployment a)
gmapMp :: (forall d. Data d => d -> m d)
-> CreateDeployment a -> m (CreateDeployment a)
$cgmapMp :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> CreateDeployment a -> m (CreateDeployment a)
gmapM :: (forall d. Data d => d -> m d)
-> CreateDeployment a -> m (CreateDeployment a)
$cgmapM :: forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d)
-> CreateDeployment a -> m (CreateDeployment a)
gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateDeployment a -> u
$cgmapQi :: forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> CreateDeployment a -> u
gmapQ :: (forall d. Data d => d -> u) -> CreateDeployment a -> [u]
$cgmapQ :: forall a u.
Data a =>
(forall d. Data d => d -> u) -> CreateDeployment a -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CreateDeployment a -> r
$cgmapQr :: forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CreateDeployment a -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CreateDeployment a -> r
$cgmapQl :: forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CreateDeployment a -> r
gmapT :: (forall b. Data b => b -> b)
-> CreateDeployment a -> CreateDeployment a
$cgmapT :: forall a.
Data a =>
(forall b. Data b => b -> b)
-> CreateDeployment a -> CreateDeployment a
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (CreateDeployment a))
$cdataCast2 :: forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (CreateDeployment a))
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c (CreateDeployment a))
$cdataCast1 :: forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (CreateDeployment a))
dataTypeOf :: CreateDeployment a -> DataType
$cdataTypeOf :: forall a. Data a => CreateDeployment a -> DataType
toConstr :: CreateDeployment a -> Constr
$ctoConstr :: forall a. Data a => CreateDeployment a -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (CreateDeployment a)
$cgunfold :: forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (CreateDeployment a)
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CreateDeployment a
-> c (CreateDeployment a)
$cgfoldl :: forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CreateDeployment a
-> c (CreateDeployment a)
$cp1Data :: forall a. Data a => Typeable (CreateDeployment a)
Data, Typeable, CreateDeployment a -> CreateDeployment a -> Bool
(CreateDeployment a -> CreateDeployment a -> Bool)
-> (CreateDeployment a -> CreateDeployment a -> Bool)
-> Eq (CreateDeployment a)
forall a. Eq a => CreateDeployment a -> CreateDeployment a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDeployment a -> CreateDeployment a -> Bool
$c/= :: forall a. Eq a => CreateDeployment a -> CreateDeployment a -> Bool
== :: CreateDeployment a -> CreateDeployment a -> Bool
$c== :: forall a. Eq a => CreateDeployment a -> CreateDeployment a -> Bool
Eq, Eq (CreateDeployment a)
Eq (CreateDeployment a)
-> (CreateDeployment a -> CreateDeployment a -> Ordering)
-> (CreateDeployment a -> CreateDeployment a -> Bool)
-> (CreateDeployment a -> CreateDeployment a -> Bool)
-> (CreateDeployment a -> CreateDeployment a -> Bool)
-> (CreateDeployment a -> CreateDeployment a -> Bool)
-> (CreateDeployment a -> CreateDeployment a -> CreateDeployment a)
-> (CreateDeployment a -> CreateDeployment a -> CreateDeployment a)
-> Ord (CreateDeployment a)
CreateDeployment a -> CreateDeployment a -> Bool
CreateDeployment a -> CreateDeployment a -> Ordering
CreateDeployment a -> CreateDeployment a -> CreateDeployment a
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (CreateDeployment a)
forall a. Ord a => CreateDeployment a -> CreateDeployment a -> Bool
forall a.
Ord a =>
CreateDeployment a -> CreateDeployment a -> Ordering
forall a.
Ord a =>
CreateDeployment a -> CreateDeployment a -> CreateDeployment a
min :: CreateDeployment a -> CreateDeployment a -> CreateDeployment a
$cmin :: forall a.
Ord a =>
CreateDeployment a -> CreateDeployment a -> CreateDeployment a
max :: CreateDeployment a -> CreateDeployment a -> CreateDeployment a
$cmax :: forall a.
Ord a =>
CreateDeployment a -> CreateDeployment a -> CreateDeployment a
>= :: CreateDeployment a -> CreateDeployment a -> Bool
$c>= :: forall a. Ord a => CreateDeployment a -> CreateDeployment a -> Bool
> :: CreateDeployment a -> CreateDeployment a -> Bool
$c> :: forall a. Ord a => CreateDeployment a -> CreateDeployment a -> Bool
<= :: CreateDeployment a -> CreateDeployment a -> Bool
$c<= :: forall a. Ord a => CreateDeployment a -> CreateDeployment a -> Bool
< :: CreateDeployment a -> CreateDeployment a -> Bool
$c< :: forall a. Ord a => CreateDeployment a -> CreateDeployment a -> Bool
compare :: CreateDeployment a -> CreateDeployment a -> Ordering
$ccompare :: forall a.
Ord a =>
CreateDeployment a -> CreateDeployment a -> Ordering
$cp1Ord :: forall a. Ord a => Eq (CreateDeployment a)
Ord, (forall x. CreateDeployment a -> Rep (CreateDeployment a) x)
-> (forall x. Rep (CreateDeployment a) x -> CreateDeployment a)
-> Generic (CreateDeployment a)
forall x. Rep (CreateDeployment a) x -> CreateDeployment a
forall x. CreateDeployment a -> Rep (CreateDeployment a) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall a x. Rep (CreateDeployment a) x -> CreateDeployment a
forall a x. CreateDeployment a -> Rep (CreateDeployment a) x
$cto :: forall a x. Rep (CreateDeployment a) x -> CreateDeployment a
$cfrom :: forall a x. CreateDeployment a -> Rep (CreateDeployment a) x
Generic)

instance NFData a => NFData (CreateDeployment a) where rnf :: CreateDeployment a -> ()
rnf = CreateDeployment a -> ()
forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf
instance Binary a => Binary (CreateDeployment a)

instance ToJSON a => ToJSON (CreateDeployment a) where
    toJSON :: CreateDeployment a -> Value
toJSON CreateDeployment a
x =
        [Pair] -> Value
JSON.object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$ [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
catMaybes
            [ Pair -> Maybe Pair
forall a. a -> Maybe a
Just (Key
"ref"          Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.=      CreateDeployment a -> Text
forall a. CreateDeployment a -> Text
createDeploymentRef CreateDeployment a
x)
            , (Key
"task"              Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CreateDeployment a -> Maybe Text
forall a. CreateDeployment a -> Maybe Text
createDeploymentTask CreateDeployment a
x
            , (Key
"auto_merge"        Key -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CreateDeployment a -> Maybe Bool
forall a. CreateDeployment a -> Maybe Bool
createDeploymentAutoMerge CreateDeployment a
x
            , (Key
"required_contexts" Key -> Vector Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.=) (Vector Text -> Pair) -> Maybe (Vector Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CreateDeployment a -> Maybe (Vector Text)
forall a. CreateDeployment a -> Maybe (Vector Text)
createDeploymentRequiredContexts CreateDeployment a
x
            , (Key
"payload"           Key -> a -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.=) (a -> Pair) -> Maybe a -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CreateDeployment a -> Maybe a
forall a. CreateDeployment a -> Maybe a
createDeploymentPayload CreateDeployment a
x
            , (Key
"environment"       Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CreateDeployment a -> Maybe Text
forall a. CreateDeployment a -> Maybe Text
createDeploymentEnvironment CreateDeployment a
x
            , (Key
"description"       Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CreateDeployment a -> Maybe Text
forall a. CreateDeployment a -> Maybe Text
createDeploymentDescription CreateDeployment a
x
            ]

data DeploymentStatus = DeploymentStatus
    { DeploymentStatus -> URL
deploymentStatusUrl           :: !URL
    , DeploymentStatus -> Id DeploymentStatus
deploymentStatusId            :: !(Id DeploymentStatus)
    , DeploymentStatus -> DeploymentStatusState
deploymentStatusState         :: !DeploymentStatusState
    , DeploymentStatus -> SimpleUser
deploymentStatusCreator       :: !SimpleUser
    , DeploymentStatus -> Text
deploymentStatusDescription   :: !Text
    , DeploymentStatus -> URL
deploymentStatusTargetUrl     :: !URL
    , DeploymentStatus -> UTCTime
deploymentStatusCreatedAt     :: !UTCTime
    , DeploymentStatus -> UTCTime
deploymentStatusUpdatedAt     :: !UTCTime
    , DeploymentStatus -> URL
deploymentStatusDeploymentUrl :: !URL
    , DeploymentStatus -> URL
deploymentStatusRepositoryUrl :: !URL
    } deriving (Int -> DeploymentStatus -> ShowS
[DeploymentStatus] -> ShowS
DeploymentStatus -> String
(Int -> DeploymentStatus -> ShowS)
-> (DeploymentStatus -> String)
-> ([DeploymentStatus] -> ShowS)
-> Show DeploymentStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeploymentStatus] -> ShowS
$cshowList :: [DeploymentStatus] -> ShowS
show :: DeploymentStatus -> String
$cshow :: DeploymentStatus -> String
showsPrec :: Int -> DeploymentStatus -> ShowS
$cshowsPrec :: Int -> DeploymentStatus -> ShowS
Show, Typeable DeploymentStatus
DataType
Constr
Typeable DeploymentStatus
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> DeploymentStatus -> c DeploymentStatus)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DeploymentStatus)
-> (DeploymentStatus -> Constr)
-> (DeploymentStatus -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DeploymentStatus))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DeploymentStatus))
-> ((forall b. Data b => b -> b)
    -> DeploymentStatus -> DeploymentStatus)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> DeploymentStatus -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> DeploymentStatus -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> DeploymentStatus -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> DeploymentStatus -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> DeploymentStatus -> m DeploymentStatus)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> DeploymentStatus -> m DeploymentStatus)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> DeploymentStatus -> m DeploymentStatus)
-> Data DeploymentStatus
DeploymentStatus -> DataType
DeploymentStatus -> Constr
(forall b. Data b => b -> b)
-> DeploymentStatus -> DeploymentStatus
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DeploymentStatus -> c DeploymentStatus
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentStatus
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> DeploymentStatus -> u
forall u. (forall d. Data d => d -> u) -> DeploymentStatus -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatus -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatus -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DeploymentStatus -> m DeploymentStatus
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentStatus -> m DeploymentStatus
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentStatus
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DeploymentStatus -> c DeploymentStatus
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeploymentStatus)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentStatus)
$cDeploymentStatus :: Constr
$tDeploymentStatus :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> DeploymentStatus -> m DeploymentStatus
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentStatus -> m DeploymentStatus
gmapMp :: (forall d. Data d => d -> m d)
-> DeploymentStatus -> m DeploymentStatus
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentStatus -> m DeploymentStatus
gmapM :: (forall d. Data d => d -> m d)
-> DeploymentStatus -> m DeploymentStatus
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DeploymentStatus -> m DeploymentStatus
gmapQi :: Int -> (forall d. Data d => d -> u) -> DeploymentStatus -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> DeploymentStatus -> u
gmapQ :: (forall d. Data d => d -> u) -> DeploymentStatus -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> DeploymentStatus -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatus -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatus -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatus -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatus -> r
gmapT :: (forall b. Data b => b -> b)
-> DeploymentStatus -> DeploymentStatus
$cgmapT :: (forall b. Data b => b -> b)
-> DeploymentStatus -> DeploymentStatus
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentStatus)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentStatus)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c DeploymentStatus)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeploymentStatus)
dataTypeOf :: DeploymentStatus -> DataType
$cdataTypeOf :: DeploymentStatus -> DataType
toConstr :: DeploymentStatus -> Constr
$ctoConstr :: DeploymentStatus -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentStatus
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentStatus
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DeploymentStatus -> c DeploymentStatus
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DeploymentStatus -> c DeploymentStatus
$cp1Data :: Typeable DeploymentStatus
Data, Typeable, DeploymentStatus -> DeploymentStatus -> Bool
(DeploymentStatus -> DeploymentStatus -> Bool)
-> (DeploymentStatus -> DeploymentStatus -> Bool)
-> Eq DeploymentStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeploymentStatus -> DeploymentStatus -> Bool
$c/= :: DeploymentStatus -> DeploymentStatus -> Bool
== :: DeploymentStatus -> DeploymentStatus -> Bool
$c== :: DeploymentStatus -> DeploymentStatus -> Bool
Eq, Eq DeploymentStatus
Eq DeploymentStatus
-> (DeploymentStatus -> DeploymentStatus -> Ordering)
-> (DeploymentStatus -> DeploymentStatus -> Bool)
-> (DeploymentStatus -> DeploymentStatus -> Bool)
-> (DeploymentStatus -> DeploymentStatus -> Bool)
-> (DeploymentStatus -> DeploymentStatus -> Bool)
-> (DeploymentStatus -> DeploymentStatus -> DeploymentStatus)
-> (DeploymentStatus -> DeploymentStatus -> DeploymentStatus)
-> Ord DeploymentStatus
DeploymentStatus -> DeploymentStatus -> Bool
DeploymentStatus -> DeploymentStatus -> Ordering
DeploymentStatus -> DeploymentStatus -> DeploymentStatus
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DeploymentStatus -> DeploymentStatus -> DeploymentStatus
$cmin :: DeploymentStatus -> DeploymentStatus -> DeploymentStatus
max :: DeploymentStatus -> DeploymentStatus -> DeploymentStatus
$cmax :: DeploymentStatus -> DeploymentStatus -> DeploymentStatus
>= :: DeploymentStatus -> DeploymentStatus -> Bool
$c>= :: DeploymentStatus -> DeploymentStatus -> Bool
> :: DeploymentStatus -> DeploymentStatus -> Bool
$c> :: DeploymentStatus -> DeploymentStatus -> Bool
<= :: DeploymentStatus -> DeploymentStatus -> Bool
$c<= :: DeploymentStatus -> DeploymentStatus -> Bool
< :: DeploymentStatus -> DeploymentStatus -> Bool
$c< :: DeploymentStatus -> DeploymentStatus -> Bool
compare :: DeploymentStatus -> DeploymentStatus -> Ordering
$ccompare :: DeploymentStatus -> DeploymentStatus -> Ordering
$cp1Ord :: Eq DeploymentStatus
Ord, (forall x. DeploymentStatus -> Rep DeploymentStatus x)
-> (forall x. Rep DeploymentStatus x -> DeploymentStatus)
-> Generic DeploymentStatus
forall x. Rep DeploymentStatus x -> DeploymentStatus
forall x. DeploymentStatus -> Rep DeploymentStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeploymentStatus x -> DeploymentStatus
$cfrom :: forall x. DeploymentStatus -> Rep DeploymentStatus x
Generic)

instance NFData DeploymentStatus where rnf :: DeploymentStatus -> ()
rnf = DeploymentStatus -> ()
forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf
instance Binary DeploymentStatus

instance FromJSON DeploymentStatus where
    parseJSON :: Value -> Parser DeploymentStatus
parseJSON = String
-> (Object -> Parser DeploymentStatus)
-> Value
-> Parser DeploymentStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
withObject String
"GitHub DeploymentStatus" ((Object -> Parser DeploymentStatus)
 -> Value -> Parser DeploymentStatus)
-> (Object -> Parser DeploymentStatus)
-> Value
-> Parser DeploymentStatus
forall a b. (a -> b) -> a -> b
$ \Object
o ->
        URL
-> Id DeploymentStatus
-> DeploymentStatusState
-> SimpleUser
-> Text
-> URL
-> UTCTime
-> UTCTime
-> URL
-> URL
-> DeploymentStatus
DeploymentStatus
            (URL
 -> Id DeploymentStatus
 -> DeploymentStatusState
 -> SimpleUser
 -> Text
 -> URL
 -> UTCTime
 -> UTCTime
 -> URL
 -> URL
 -> DeploymentStatus)
-> Parser URL
-> Parser
     (Id DeploymentStatus
      -> DeploymentStatusState
      -> SimpleUser
      -> Text
      -> URL
      -> UTCTime
      -> UTCTime
      -> URL
      -> URL
      -> DeploymentStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"url"
            Parser
  (Id DeploymentStatus
   -> DeploymentStatusState
   -> SimpleUser
   -> Text
   -> URL
   -> UTCTime
   -> UTCTime
   -> URL
   -> URL
   -> DeploymentStatus)
-> Parser (Id DeploymentStatus)
-> Parser
     (DeploymentStatusState
      -> SimpleUser
      -> Text
      -> URL
      -> UTCTime
      -> UTCTime
      -> URL
      -> URL
      -> DeploymentStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser (Id DeploymentStatus)
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"id"
            Parser
  (DeploymentStatusState
   -> SimpleUser
   -> Text
   -> URL
   -> UTCTime
   -> UTCTime
   -> URL
   -> URL
   -> DeploymentStatus)
-> Parser DeploymentStatusState
-> Parser
     (SimpleUser
      -> Text
      -> URL
      -> UTCTime
      -> UTCTime
      -> URL
      -> URL
      -> DeploymentStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser DeploymentStatusState
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"state"
            Parser
  (SimpleUser
   -> Text
   -> URL
   -> UTCTime
   -> UTCTime
   -> URL
   -> URL
   -> DeploymentStatus)
-> Parser SimpleUser
-> Parser
     (Text
      -> URL -> UTCTime -> UTCTime -> URL -> URL -> DeploymentStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser SimpleUser
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"creator"
            Parser
  (Text
   -> URL -> UTCTime -> UTCTime -> URL -> URL -> DeploymentStatus)
-> Parser Text
-> Parser
     (URL -> UTCTime -> UTCTime -> URL -> URL -> DeploymentStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser Text
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"description"
            Parser
  (URL -> UTCTime -> UTCTime -> URL -> URL -> DeploymentStatus)
-> Parser URL
-> Parser (UTCTime -> UTCTime -> URL -> URL -> DeploymentStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"target_url"
            Parser (UTCTime -> UTCTime -> URL -> URL -> DeploymentStatus)
-> Parser UTCTime
-> Parser (UTCTime -> URL -> URL -> DeploymentStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"created_at"
            Parser (UTCTime -> URL -> URL -> DeploymentStatus)
-> Parser UTCTime -> Parser (URL -> URL -> DeploymentStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser UTCTime
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"updated_at"
            Parser (URL -> URL -> DeploymentStatus)
-> Parser URL -> Parser (URL -> DeploymentStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"deployment_url"
            Parser (URL -> DeploymentStatus)
-> Parser URL -> Parser DeploymentStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object
o Object -> Key -> Parser URL
forall a. FromJSON a => Object -> Key -> Parser a
.: Key
"repository_url"

data DeploymentStatusState
    = DeploymentStatusError
    | DeploymentStatusFailure
    | DeploymentStatusPending
    | DeploymentStatusSuccess
    | DeploymentStatusInactive
      deriving (Int -> DeploymentStatusState -> ShowS
[DeploymentStatusState] -> ShowS
DeploymentStatusState -> String
(Int -> DeploymentStatusState -> ShowS)
-> (DeploymentStatusState -> String)
-> ([DeploymentStatusState] -> ShowS)
-> Show DeploymentStatusState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeploymentStatusState] -> ShowS
$cshowList :: [DeploymentStatusState] -> ShowS
show :: DeploymentStatusState -> String
$cshow :: DeploymentStatusState -> String
showsPrec :: Int -> DeploymentStatusState -> ShowS
$cshowsPrec :: Int -> DeploymentStatusState -> ShowS
Show, Typeable DeploymentStatusState
DataType
Constr
Typeable DeploymentStatusState
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> DeploymentStatusState
    -> c DeploymentStatusState)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c DeploymentStatusState)
-> (DeploymentStatusState -> Constr)
-> (DeploymentStatusState -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c DeploymentStatusState))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c DeploymentStatusState))
-> ((forall b. Data b => b -> b)
    -> DeploymentStatusState -> DeploymentStatusState)
-> (forall r r'.
    (r -> r' -> r)
    -> r
    -> (forall d. Data d => d -> r')
    -> DeploymentStatusState
    -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r
    -> (forall d. Data d => d -> r')
    -> DeploymentStatusState
    -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> DeploymentStatusState -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> DeploymentStatusState -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> DeploymentStatusState -> m DeploymentStatusState)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> DeploymentStatusState -> m DeploymentStatusState)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> DeploymentStatusState -> m DeploymentStatusState)
-> Data DeploymentStatusState
DeploymentStatusState -> DataType
DeploymentStatusState -> Constr
(forall b. Data b => b -> b)
-> DeploymentStatusState -> DeploymentStatusState
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> DeploymentStatusState
-> c DeploymentStatusState
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentStatusState
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> DeploymentStatusState -> u
forall u.
(forall d. Data d => d -> u) -> DeploymentStatusState -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatusState -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatusState -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DeploymentStatusState -> m DeploymentStatusState
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentStatusState -> m DeploymentStatusState
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentStatusState
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> DeploymentStatusState
-> c DeploymentStatusState
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeploymentStatusState)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentStatusState)
$cDeploymentStatusInactive :: Constr
$cDeploymentStatusSuccess :: Constr
$cDeploymentStatusPending :: Constr
$cDeploymentStatusFailure :: Constr
$cDeploymentStatusError :: Constr
$tDeploymentStatusState :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> DeploymentStatusState -> m DeploymentStatusState
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentStatusState -> m DeploymentStatusState
gmapMp :: (forall d. Data d => d -> m d)
-> DeploymentStatusState -> m DeploymentStatusState
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DeploymentStatusState -> m DeploymentStatusState
gmapM :: (forall d. Data d => d -> m d)
-> DeploymentStatusState -> m DeploymentStatusState
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DeploymentStatusState -> m DeploymentStatusState
gmapQi :: Int -> (forall d. Data d => d -> u) -> DeploymentStatusState -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> DeploymentStatusState -> u
gmapQ :: (forall d. Data d => d -> u) -> DeploymentStatusState -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> DeploymentStatusState -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatusState -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatusState -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatusState -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DeploymentStatusState -> r
gmapT :: (forall b. Data b => b -> b)
-> DeploymentStatusState -> DeploymentStatusState
$cgmapT :: (forall b. Data b => b -> b)
-> DeploymentStatusState -> DeploymentStatusState
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentStatusState)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DeploymentStatusState)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c DeploymentStatusState)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DeploymentStatusState)
dataTypeOf :: DeploymentStatusState -> DataType
$cdataTypeOf :: DeploymentStatusState -> DataType
toConstr :: DeploymentStatusState -> Constr
$ctoConstr :: DeploymentStatusState -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentStatusState
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DeploymentStatusState
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> DeploymentStatusState
-> c DeploymentStatusState
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> DeploymentStatusState
-> c DeploymentStatusState
$cp1Data :: Typeable DeploymentStatusState
Data, Typeable, DeploymentStatusState -> DeploymentStatusState -> Bool
(DeploymentStatusState -> DeploymentStatusState -> Bool)
-> (DeploymentStatusState -> DeploymentStatusState -> Bool)
-> Eq DeploymentStatusState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeploymentStatusState -> DeploymentStatusState -> Bool
$c/= :: DeploymentStatusState -> DeploymentStatusState -> Bool
== :: DeploymentStatusState -> DeploymentStatusState -> Bool
$c== :: DeploymentStatusState -> DeploymentStatusState -> Bool
Eq, Eq DeploymentStatusState
Eq DeploymentStatusState
-> (DeploymentStatusState -> DeploymentStatusState -> Ordering)
-> (DeploymentStatusState -> DeploymentStatusState -> Bool)
-> (DeploymentStatusState -> DeploymentStatusState -> Bool)
-> (DeploymentStatusState -> DeploymentStatusState -> Bool)
-> (DeploymentStatusState -> DeploymentStatusState -> Bool)
-> (DeploymentStatusState
    -> DeploymentStatusState -> DeploymentStatusState)
-> (DeploymentStatusState
    -> DeploymentStatusState -> DeploymentStatusState)
-> Ord DeploymentStatusState
DeploymentStatusState -> DeploymentStatusState -> Bool
DeploymentStatusState -> DeploymentStatusState -> Ordering
DeploymentStatusState
-> DeploymentStatusState -> DeploymentStatusState
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DeploymentStatusState
-> DeploymentStatusState -> DeploymentStatusState
$cmin :: DeploymentStatusState
-> DeploymentStatusState -> DeploymentStatusState
max :: DeploymentStatusState
-> DeploymentStatusState -> DeploymentStatusState
$cmax :: DeploymentStatusState
-> DeploymentStatusState -> DeploymentStatusState
>= :: DeploymentStatusState -> DeploymentStatusState -> Bool
$c>= :: DeploymentStatusState -> DeploymentStatusState -> Bool
> :: DeploymentStatusState -> DeploymentStatusState -> Bool
$c> :: DeploymentStatusState -> DeploymentStatusState -> Bool
<= :: DeploymentStatusState -> DeploymentStatusState -> Bool
$c<= :: DeploymentStatusState -> DeploymentStatusState -> Bool
< :: DeploymentStatusState -> DeploymentStatusState -> Bool
$c< :: DeploymentStatusState -> DeploymentStatusState -> Bool
compare :: DeploymentStatusState -> DeploymentStatusState -> Ordering
$ccompare :: DeploymentStatusState -> DeploymentStatusState -> Ordering
$cp1Ord :: Eq DeploymentStatusState
Ord, (forall x. DeploymentStatusState -> Rep DeploymentStatusState x)
-> (forall x. Rep DeploymentStatusState x -> DeploymentStatusState)
-> Generic DeploymentStatusState
forall x. Rep DeploymentStatusState x -> DeploymentStatusState
forall x. DeploymentStatusState -> Rep DeploymentStatusState x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeploymentStatusState x -> DeploymentStatusState
$cfrom :: forall x. DeploymentStatusState -> Rep DeploymentStatusState x
Generic)

instance NFData DeploymentStatusState where rnf :: DeploymentStatusState -> ()
rnf = DeploymentStatusState -> ()
forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf
instance Binary DeploymentStatusState

instance ToJSON DeploymentStatusState where
    toJSON :: DeploymentStatusState -> Value
toJSON = \case
        DeploymentStatusState
DeploymentStatusError    -> Value
"error"
        DeploymentStatusState
DeploymentStatusFailure  -> Value
"failure"
        DeploymentStatusState
DeploymentStatusPending  -> Value
"pending"
        DeploymentStatusState
DeploymentStatusSuccess  -> Value
"success"
        DeploymentStatusState
DeploymentStatusInactive -> Value
"inactive"

instance FromJSON DeploymentStatusState where
    parseJSON :: Value -> Parser DeploymentStatusState
parseJSON = String
-> (Text -> Parser DeploymentStatusState)
-> Value
-> Parser DeploymentStatusState
forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"DeploymentStatusState" ((Text -> Parser DeploymentStatusState)
 -> Value -> Parser DeploymentStatusState)
-> (Text -> Parser DeploymentStatusState)
-> Value
-> Parser DeploymentStatusState
forall a b. (a -> b) -> a -> b
$ \Text
t -> case Text -> Text
T.toLower Text
t of
        Text
"error"    -> DeploymentStatusState -> Parser DeploymentStatusState
forall (f :: * -> *) a. Applicative f => a -> f a
pure DeploymentStatusState
DeploymentStatusError
        Text
"failure"  -> DeploymentStatusState -> Parser DeploymentStatusState
forall (f :: * -> *) a. Applicative f => a -> f a
pure DeploymentStatusState
DeploymentStatusFailure
        Text
"pending"  -> DeploymentStatusState -> Parser DeploymentStatusState
forall (f :: * -> *) a. Applicative f => a -> f a
pure DeploymentStatusState
DeploymentStatusPending
        Text
"success"  -> DeploymentStatusState -> Parser DeploymentStatusState
forall (f :: * -> *) a. Applicative f => a -> f a
pure DeploymentStatusState
DeploymentStatusSuccess
        Text
"inactive" -> DeploymentStatusState -> Parser DeploymentStatusState
forall (f :: * -> *) a. Applicative f => a -> f a
pure DeploymentStatusState
DeploymentStatusInactive
        Text
_          -> String -> Parser DeploymentStatusState
forall (m :: * -> *) a. MonadFail m => String -> m a
fail (String -> Parser DeploymentStatusState)
-> String -> Parser DeploymentStatusState
forall a b. (a -> b) -> a -> b
$ String
"Unknown DeploymentStatusState: " String -> ShowS
forall a. Semigroup a => a -> a -> a
<> Text -> String
T.unpack Text
t

data CreateDeploymentStatus = CreateDeploymentStatus
    { CreateDeploymentStatus -> DeploymentStatusState
createDeploymentStatusState       :: !DeploymentStatusState
    -- ^ Required. The state of the status. Can be one of error, failure,
    -- pending, or success.
    , CreateDeploymentStatus -> Maybe Text
createDeploymentStatusTargetUrl   :: !(Maybe Text) -- TODO: should this be URL?
    -- ^ The target URL to associate with this status. This URL should contain
    -- output to keep the user updated while the task is running or serve as
    -- historical information for what happened in the deployment. Default: ""
    , CreateDeploymentStatus -> Maybe Text
createDeploymentStatusDescription :: !(Maybe Text)
    -- ^ A short description of the status. Maximum length of 140 characters.
    -- Default: ""
    } deriving (Int -> CreateDeploymentStatus -> ShowS
[CreateDeploymentStatus] -> ShowS
CreateDeploymentStatus -> String
(Int -> CreateDeploymentStatus -> ShowS)
-> (CreateDeploymentStatus -> String)
-> ([CreateDeploymentStatus] -> ShowS)
-> Show CreateDeploymentStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDeploymentStatus] -> ShowS
$cshowList :: [CreateDeploymentStatus] -> ShowS
show :: CreateDeploymentStatus -> String
$cshow :: CreateDeploymentStatus -> String
showsPrec :: Int -> CreateDeploymentStatus -> ShowS
$cshowsPrec :: Int -> CreateDeploymentStatus -> ShowS
Show, Typeable CreateDeploymentStatus
DataType
Constr
Typeable CreateDeploymentStatus
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g)
    -> CreateDeploymentStatus
    -> c CreateDeploymentStatus)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c CreateDeploymentStatus)
-> (CreateDeploymentStatus -> Constr)
-> (CreateDeploymentStatus -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c CreateDeploymentStatus))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c CreateDeploymentStatus))
-> ((forall b. Data b => b -> b)
    -> CreateDeploymentStatus -> CreateDeploymentStatus)
-> (forall r r'.
    (r -> r' -> r)
    -> r
    -> (forall d. Data d => d -> r')
    -> CreateDeploymentStatus
    -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r
    -> (forall d. Data d => d -> r')
    -> CreateDeploymentStatus
    -> r)
-> (forall u.
    (forall d. Data d => d -> u) -> CreateDeploymentStatus -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> CreateDeploymentStatus -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d)
    -> CreateDeploymentStatus -> m CreateDeploymentStatus)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> CreateDeploymentStatus -> m CreateDeploymentStatus)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d)
    -> CreateDeploymentStatus -> m CreateDeploymentStatus)
-> Data CreateDeploymentStatus
CreateDeploymentStatus -> DataType
CreateDeploymentStatus -> Constr
(forall b. Data b => b -> b)
-> CreateDeploymentStatus -> CreateDeploymentStatus
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CreateDeploymentStatus
-> c CreateDeploymentStatus
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CreateDeploymentStatus
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> CreateDeploymentStatus -> u
forall u.
(forall d. Data d => d -> u) -> CreateDeploymentStatus -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> CreateDeploymentStatus
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> CreateDeploymentStatus
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CreateDeploymentStatus -> m CreateDeploymentStatus
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CreateDeploymentStatus -> m CreateDeploymentStatus
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CreateDeploymentStatus
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CreateDeploymentStatus
-> c CreateDeploymentStatus
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CreateDeploymentStatus)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CreateDeploymentStatus)
$cCreateDeploymentStatus :: Constr
$tCreateDeploymentStatus :: DataType
gmapMo :: (forall d. Data d => d -> m d)
-> CreateDeploymentStatus -> m CreateDeploymentStatus
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CreateDeploymentStatus -> m CreateDeploymentStatus
gmapMp :: (forall d. Data d => d -> m d)
-> CreateDeploymentStatus -> m CreateDeploymentStatus
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> CreateDeploymentStatus -> m CreateDeploymentStatus
gmapM :: (forall d. Data d => d -> m d)
-> CreateDeploymentStatus -> m CreateDeploymentStatus
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> CreateDeploymentStatus -> m CreateDeploymentStatus
gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateDeploymentStatus -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> CreateDeploymentStatus -> u
gmapQ :: (forall d. Data d => d -> u) -> CreateDeploymentStatus -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> CreateDeploymentStatus -> [u]
gmapQr :: (r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> CreateDeploymentStatus
-> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> CreateDeploymentStatus
-> r
gmapQl :: (r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> CreateDeploymentStatus
-> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> CreateDeploymentStatus
-> r
gmapT :: (forall b. Data b => b -> b)
-> CreateDeploymentStatus -> CreateDeploymentStatus
$cgmapT :: (forall b. Data b => b -> b)
-> CreateDeploymentStatus -> CreateDeploymentStatus
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CreateDeploymentStatus)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CreateDeploymentStatus)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c CreateDeploymentStatus)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CreateDeploymentStatus)
dataTypeOf :: CreateDeploymentStatus -> DataType
$cdataTypeOf :: CreateDeploymentStatus -> DataType
toConstr :: CreateDeploymentStatus -> Constr
$ctoConstr :: CreateDeploymentStatus -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CreateDeploymentStatus
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CreateDeploymentStatus
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CreateDeploymentStatus
-> c CreateDeploymentStatus
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> CreateDeploymentStatus
-> c CreateDeploymentStatus
$cp1Data :: Typeable CreateDeploymentStatus
Data, Typeable, CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
(CreateDeploymentStatus -> CreateDeploymentStatus -> Bool)
-> (CreateDeploymentStatus -> CreateDeploymentStatus -> Bool)
-> Eq CreateDeploymentStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
$c/= :: CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
== :: CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
$c== :: CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
Eq, Eq CreateDeploymentStatus
Eq CreateDeploymentStatus
-> (CreateDeploymentStatus -> CreateDeploymentStatus -> Ordering)
-> (CreateDeploymentStatus -> CreateDeploymentStatus -> Bool)
-> (CreateDeploymentStatus -> CreateDeploymentStatus -> Bool)
-> (CreateDeploymentStatus -> CreateDeploymentStatus -> Bool)
-> (CreateDeploymentStatus -> CreateDeploymentStatus -> Bool)
-> (CreateDeploymentStatus
    -> CreateDeploymentStatus -> CreateDeploymentStatus)
-> (CreateDeploymentStatus
    -> CreateDeploymentStatus -> CreateDeploymentStatus)
-> Ord CreateDeploymentStatus
CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
CreateDeploymentStatus -> CreateDeploymentStatus -> Ordering
CreateDeploymentStatus
-> CreateDeploymentStatus -> CreateDeploymentStatus
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: CreateDeploymentStatus
-> CreateDeploymentStatus -> CreateDeploymentStatus
$cmin :: CreateDeploymentStatus
-> CreateDeploymentStatus -> CreateDeploymentStatus
max :: CreateDeploymentStatus
-> CreateDeploymentStatus -> CreateDeploymentStatus
$cmax :: CreateDeploymentStatus
-> CreateDeploymentStatus -> CreateDeploymentStatus
>= :: CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
$c>= :: CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
> :: CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
$c> :: CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
<= :: CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
$c<= :: CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
< :: CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
$c< :: CreateDeploymentStatus -> CreateDeploymentStatus -> Bool
compare :: CreateDeploymentStatus -> CreateDeploymentStatus -> Ordering
$ccompare :: CreateDeploymentStatus -> CreateDeploymentStatus -> Ordering
$cp1Ord :: Eq CreateDeploymentStatus
Ord, (forall x. CreateDeploymentStatus -> Rep CreateDeploymentStatus x)
-> (forall x.
    Rep CreateDeploymentStatus x -> CreateDeploymentStatus)
-> Generic CreateDeploymentStatus
forall x. Rep CreateDeploymentStatus x -> CreateDeploymentStatus
forall x. CreateDeploymentStatus -> Rep CreateDeploymentStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDeploymentStatus x -> CreateDeploymentStatus
$cfrom :: forall x. CreateDeploymentStatus -> Rep CreateDeploymentStatus x
Generic)

instance NFData CreateDeploymentStatus where rnf :: CreateDeploymentStatus -> ()
rnf = CreateDeploymentStatus -> ()
forall a. (Generic a, GNFData (Rep a)) => a -> ()
genericRnf
instance Binary CreateDeploymentStatus

instance ToJSON CreateDeploymentStatus where
    toJSON :: CreateDeploymentStatus -> Value
toJSON CreateDeploymentStatus
x =
        [Pair] -> Value
JSON.object ([Pair] -> Value) -> [Pair] -> Value
forall a b. (a -> b) -> a -> b
$ [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
catMaybes
            [ Pair -> Maybe Pair
forall a. a -> Maybe a
Just (Key
"state"  Key -> DeploymentStatusState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CreateDeploymentStatus -> DeploymentStatusState
createDeploymentStatusState CreateDeploymentStatus
x)
            , (Key
"target_url"  Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CreateDeploymentStatus -> Maybe Text
createDeploymentStatusTargetUrl CreateDeploymentStatus
x
            , (Key
"description" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> CreateDeploymentStatus -> Maybe Text
createDeploymentStatusDescription CreateDeploymentStatus
x
            ]