{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CodeDeploy.Types.LastDeploymentInfo where
import Amazonka.CodeDeploy.Types.DeploymentStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data LastDeploymentInfo = LastDeploymentInfo'
{
LastDeploymentInfo -> Maybe POSIX
createTime :: Prelude.Maybe Data.POSIX,
LastDeploymentInfo -> Maybe Text
deploymentId :: Prelude.Maybe Prelude.Text,
LastDeploymentInfo -> Maybe POSIX
endTime :: Prelude.Maybe Data.POSIX,
LastDeploymentInfo -> Maybe DeploymentStatus
status :: Prelude.Maybe DeploymentStatus
}
deriving (LastDeploymentInfo -> LastDeploymentInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LastDeploymentInfo -> LastDeploymentInfo -> Bool
$c/= :: LastDeploymentInfo -> LastDeploymentInfo -> Bool
== :: LastDeploymentInfo -> LastDeploymentInfo -> Bool
$c== :: LastDeploymentInfo -> LastDeploymentInfo -> Bool
Prelude.Eq, ReadPrec [LastDeploymentInfo]
ReadPrec LastDeploymentInfo
Int -> ReadS LastDeploymentInfo
ReadS [LastDeploymentInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LastDeploymentInfo]
$creadListPrec :: ReadPrec [LastDeploymentInfo]
readPrec :: ReadPrec LastDeploymentInfo
$creadPrec :: ReadPrec LastDeploymentInfo
readList :: ReadS [LastDeploymentInfo]
$creadList :: ReadS [LastDeploymentInfo]
readsPrec :: Int -> ReadS LastDeploymentInfo
$creadsPrec :: Int -> ReadS LastDeploymentInfo
Prelude.Read, Int -> LastDeploymentInfo -> ShowS
[LastDeploymentInfo] -> ShowS
LastDeploymentInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LastDeploymentInfo] -> ShowS
$cshowList :: [LastDeploymentInfo] -> ShowS
show :: LastDeploymentInfo -> String
$cshow :: LastDeploymentInfo -> String
showsPrec :: Int -> LastDeploymentInfo -> ShowS
$cshowsPrec :: Int -> LastDeploymentInfo -> ShowS
Prelude.Show, forall x. Rep LastDeploymentInfo x -> LastDeploymentInfo
forall x. LastDeploymentInfo -> Rep LastDeploymentInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LastDeploymentInfo x -> LastDeploymentInfo
$cfrom :: forall x. LastDeploymentInfo -> Rep LastDeploymentInfo x
Prelude.Generic)
newLastDeploymentInfo ::
LastDeploymentInfo
newLastDeploymentInfo :: LastDeploymentInfo
newLastDeploymentInfo =
LastDeploymentInfo'
{ $sel:createTime:LastDeploymentInfo' :: Maybe POSIX
createTime = forall a. Maybe a
Prelude.Nothing,
$sel:deploymentId:LastDeploymentInfo' :: Maybe Text
deploymentId = forall a. Maybe a
Prelude.Nothing,
$sel:endTime:LastDeploymentInfo' :: Maybe POSIX
endTime = forall a. Maybe a
Prelude.Nothing,
$sel:status:LastDeploymentInfo' :: Maybe DeploymentStatus
status = forall a. Maybe a
Prelude.Nothing
}
lastDeploymentInfo_createTime :: Lens.Lens' LastDeploymentInfo (Prelude.Maybe Prelude.UTCTime)
lastDeploymentInfo_createTime :: Lens' LastDeploymentInfo (Maybe UTCTime)
lastDeploymentInfo_createTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LastDeploymentInfo' {Maybe POSIX
createTime :: Maybe POSIX
$sel:createTime:LastDeploymentInfo' :: LastDeploymentInfo -> Maybe POSIX
createTime} -> Maybe POSIX
createTime) (\s :: LastDeploymentInfo
s@LastDeploymentInfo' {} Maybe POSIX
a -> LastDeploymentInfo
s {$sel:createTime:LastDeploymentInfo' :: Maybe POSIX
createTime = Maybe POSIX
a} :: LastDeploymentInfo) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
lastDeploymentInfo_deploymentId :: Lens.Lens' LastDeploymentInfo (Prelude.Maybe Prelude.Text)
lastDeploymentInfo_deploymentId :: Lens' LastDeploymentInfo (Maybe Text)
lastDeploymentInfo_deploymentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LastDeploymentInfo' {Maybe Text
deploymentId :: Maybe Text
$sel:deploymentId:LastDeploymentInfo' :: LastDeploymentInfo -> Maybe Text
deploymentId} -> Maybe Text
deploymentId) (\s :: LastDeploymentInfo
s@LastDeploymentInfo' {} Maybe Text
a -> LastDeploymentInfo
s {$sel:deploymentId:LastDeploymentInfo' :: Maybe Text
deploymentId = Maybe Text
a} :: LastDeploymentInfo)
lastDeploymentInfo_endTime :: Lens.Lens' LastDeploymentInfo (Prelude.Maybe Prelude.UTCTime)
lastDeploymentInfo_endTime :: Lens' LastDeploymentInfo (Maybe UTCTime)
lastDeploymentInfo_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LastDeploymentInfo' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:LastDeploymentInfo' :: LastDeploymentInfo -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: LastDeploymentInfo
s@LastDeploymentInfo' {} Maybe POSIX
a -> LastDeploymentInfo
s {$sel:endTime:LastDeploymentInfo' :: Maybe POSIX
endTime = Maybe POSIX
a} :: LastDeploymentInfo) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
lastDeploymentInfo_status :: Lens.Lens' LastDeploymentInfo (Prelude.Maybe DeploymentStatus)
lastDeploymentInfo_status :: Lens' LastDeploymentInfo (Maybe DeploymentStatus)
lastDeploymentInfo_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LastDeploymentInfo' {Maybe DeploymentStatus
status :: Maybe DeploymentStatus
$sel:status:LastDeploymentInfo' :: LastDeploymentInfo -> Maybe DeploymentStatus
status} -> Maybe DeploymentStatus
status) (\s :: LastDeploymentInfo
s@LastDeploymentInfo' {} Maybe DeploymentStatus
a -> LastDeploymentInfo
s {$sel:status:LastDeploymentInfo' :: Maybe DeploymentStatus
status = Maybe DeploymentStatus
a} :: LastDeploymentInfo)
instance Data.FromJSON LastDeploymentInfo where
parseJSON :: Value -> Parser LastDeploymentInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LastDeploymentInfo"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe DeploymentStatus
-> LastDeploymentInfo
LastDeploymentInfo'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"createTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"deploymentId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"endTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"status")
)
instance Prelude.Hashable LastDeploymentInfo where
hashWithSalt :: Int -> LastDeploymentInfo -> Int
hashWithSalt Int
_salt LastDeploymentInfo' {Maybe Text
Maybe POSIX
Maybe DeploymentStatus
status :: Maybe DeploymentStatus
endTime :: Maybe POSIX
deploymentId :: Maybe Text
createTime :: Maybe POSIX
$sel:status:LastDeploymentInfo' :: LastDeploymentInfo -> Maybe DeploymentStatus
$sel:endTime:LastDeploymentInfo' :: LastDeploymentInfo -> Maybe POSIX
$sel:deploymentId:LastDeploymentInfo' :: LastDeploymentInfo -> Maybe Text
$sel:createTime:LastDeploymentInfo' :: LastDeploymentInfo -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deploymentId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
endTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DeploymentStatus
status
instance Prelude.NFData LastDeploymentInfo where
rnf :: LastDeploymentInfo -> ()
rnf LastDeploymentInfo' {Maybe Text
Maybe POSIX
Maybe DeploymentStatus
status :: Maybe DeploymentStatus
endTime :: Maybe POSIX
deploymentId :: Maybe Text
createTime :: Maybe POSIX
$sel:status:LastDeploymentInfo' :: LastDeploymentInfo -> Maybe DeploymentStatus
$sel:endTime:LastDeploymentInfo' :: LastDeploymentInfo -> Maybe POSIX
$sel:deploymentId:LastDeploymentInfo' :: LastDeploymentInfo -> Maybe Text
$sel:createTime:LastDeploymentInfo' :: LastDeploymentInfo -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deploymentId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
endTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DeploymentStatus
status