{-# 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.GenericRevisionInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data GenericRevisionInfo = GenericRevisionInfo'
{
GenericRevisionInfo -> Maybe POSIX
registerTime :: Prelude.Maybe Core.POSIX,
GenericRevisionInfo -> Maybe POSIX
firstUsedTime :: Prelude.Maybe Core.POSIX,
GenericRevisionInfo -> Maybe [Text]
deploymentGroups :: Prelude.Maybe [Prelude.Text],
GenericRevisionInfo -> Maybe POSIX
lastUsedTime :: Prelude.Maybe Core.POSIX,
GenericRevisionInfo -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (GenericRevisionInfo -> GenericRevisionInfo -> Bool
(GenericRevisionInfo -> GenericRevisionInfo -> Bool)
-> (GenericRevisionInfo -> GenericRevisionInfo -> Bool)
-> Eq GenericRevisionInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GenericRevisionInfo -> GenericRevisionInfo -> Bool
$c/= :: GenericRevisionInfo -> GenericRevisionInfo -> Bool
== :: GenericRevisionInfo -> GenericRevisionInfo -> Bool
$c== :: GenericRevisionInfo -> GenericRevisionInfo -> Bool
Prelude.Eq, ReadPrec [GenericRevisionInfo]
ReadPrec GenericRevisionInfo
Int -> ReadS GenericRevisionInfo
ReadS [GenericRevisionInfo]
(Int -> ReadS GenericRevisionInfo)
-> ReadS [GenericRevisionInfo]
-> ReadPrec GenericRevisionInfo
-> ReadPrec [GenericRevisionInfo]
-> Read GenericRevisionInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GenericRevisionInfo]
$creadListPrec :: ReadPrec [GenericRevisionInfo]
readPrec :: ReadPrec GenericRevisionInfo
$creadPrec :: ReadPrec GenericRevisionInfo
readList :: ReadS [GenericRevisionInfo]
$creadList :: ReadS [GenericRevisionInfo]
readsPrec :: Int -> ReadS GenericRevisionInfo
$creadsPrec :: Int -> ReadS GenericRevisionInfo
Prelude.Read, Int -> GenericRevisionInfo -> ShowS
[GenericRevisionInfo] -> ShowS
GenericRevisionInfo -> String
(Int -> GenericRevisionInfo -> ShowS)
-> (GenericRevisionInfo -> String)
-> ([GenericRevisionInfo] -> ShowS)
-> Show GenericRevisionInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GenericRevisionInfo] -> ShowS
$cshowList :: [GenericRevisionInfo] -> ShowS
show :: GenericRevisionInfo -> String
$cshow :: GenericRevisionInfo -> String
showsPrec :: Int -> GenericRevisionInfo -> ShowS
$cshowsPrec :: Int -> GenericRevisionInfo -> ShowS
Prelude.Show, (forall x. GenericRevisionInfo -> Rep GenericRevisionInfo x)
-> (forall x. Rep GenericRevisionInfo x -> GenericRevisionInfo)
-> Generic GenericRevisionInfo
forall x. Rep GenericRevisionInfo x -> GenericRevisionInfo
forall x. GenericRevisionInfo -> Rep GenericRevisionInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GenericRevisionInfo x -> GenericRevisionInfo
$cfrom :: forall x. GenericRevisionInfo -> Rep GenericRevisionInfo x
Prelude.Generic)
newGenericRevisionInfo ::
GenericRevisionInfo
newGenericRevisionInfo :: GenericRevisionInfo
newGenericRevisionInfo =
GenericRevisionInfo' :: Maybe POSIX
-> Maybe POSIX
-> Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> GenericRevisionInfo
GenericRevisionInfo'
{ $sel:registerTime:GenericRevisionInfo' :: Maybe POSIX
registerTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:firstUsedTime:GenericRevisionInfo' :: Maybe POSIX
firstUsedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:deploymentGroups:GenericRevisionInfo' :: Maybe [Text]
deploymentGroups = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:lastUsedTime:GenericRevisionInfo' :: Maybe POSIX
lastUsedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:description:GenericRevisionInfo' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
genericRevisionInfo_registerTime :: Lens.Lens' GenericRevisionInfo (Prelude.Maybe Prelude.UTCTime)
genericRevisionInfo_registerTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GenericRevisionInfo -> f GenericRevisionInfo
genericRevisionInfo_registerTime = (GenericRevisionInfo -> Maybe POSIX)
-> (GenericRevisionInfo -> Maybe POSIX -> GenericRevisionInfo)
-> Lens
GenericRevisionInfo GenericRevisionInfo (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenericRevisionInfo' {Maybe POSIX
registerTime :: Maybe POSIX
$sel:registerTime:GenericRevisionInfo' :: GenericRevisionInfo -> Maybe POSIX
registerTime} -> Maybe POSIX
registerTime) (\s :: GenericRevisionInfo
s@GenericRevisionInfo' {} Maybe POSIX
a -> GenericRevisionInfo
s {$sel:registerTime:GenericRevisionInfo' :: Maybe POSIX
registerTime = Maybe POSIX
a} :: GenericRevisionInfo) ((Maybe POSIX -> f (Maybe POSIX))
-> GenericRevisionInfo -> f GenericRevisionInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GenericRevisionInfo
-> f GenericRevisionInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
genericRevisionInfo_firstUsedTime :: Lens.Lens' GenericRevisionInfo (Prelude.Maybe Prelude.UTCTime)
genericRevisionInfo_firstUsedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GenericRevisionInfo -> f GenericRevisionInfo
genericRevisionInfo_firstUsedTime = (GenericRevisionInfo -> Maybe POSIX)
-> (GenericRevisionInfo -> Maybe POSIX -> GenericRevisionInfo)
-> Lens
GenericRevisionInfo GenericRevisionInfo (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenericRevisionInfo' {Maybe POSIX
firstUsedTime :: Maybe POSIX
$sel:firstUsedTime:GenericRevisionInfo' :: GenericRevisionInfo -> Maybe POSIX
firstUsedTime} -> Maybe POSIX
firstUsedTime) (\s :: GenericRevisionInfo
s@GenericRevisionInfo' {} Maybe POSIX
a -> GenericRevisionInfo
s {$sel:firstUsedTime:GenericRevisionInfo' :: Maybe POSIX
firstUsedTime = Maybe POSIX
a} :: GenericRevisionInfo) ((Maybe POSIX -> f (Maybe POSIX))
-> GenericRevisionInfo -> f GenericRevisionInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GenericRevisionInfo
-> f GenericRevisionInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
genericRevisionInfo_deploymentGroups :: Lens.Lens' GenericRevisionInfo (Prelude.Maybe [Prelude.Text])
genericRevisionInfo_deploymentGroups :: (Maybe [Text] -> f (Maybe [Text]))
-> GenericRevisionInfo -> f GenericRevisionInfo
genericRevisionInfo_deploymentGroups = (GenericRevisionInfo -> Maybe [Text])
-> (GenericRevisionInfo -> Maybe [Text] -> GenericRevisionInfo)
-> Lens
GenericRevisionInfo
GenericRevisionInfo
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenericRevisionInfo' {Maybe [Text]
deploymentGroups :: Maybe [Text]
$sel:deploymentGroups:GenericRevisionInfo' :: GenericRevisionInfo -> Maybe [Text]
deploymentGroups} -> Maybe [Text]
deploymentGroups) (\s :: GenericRevisionInfo
s@GenericRevisionInfo' {} Maybe [Text]
a -> GenericRevisionInfo
s {$sel:deploymentGroups:GenericRevisionInfo' :: Maybe [Text]
deploymentGroups = Maybe [Text]
a} :: GenericRevisionInfo) ((Maybe [Text] -> f (Maybe [Text]))
-> GenericRevisionInfo -> f GenericRevisionInfo)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GenericRevisionInfo
-> f GenericRevisionInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
genericRevisionInfo_lastUsedTime :: Lens.Lens' GenericRevisionInfo (Prelude.Maybe Prelude.UTCTime)
genericRevisionInfo_lastUsedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GenericRevisionInfo -> f GenericRevisionInfo
genericRevisionInfo_lastUsedTime = (GenericRevisionInfo -> Maybe POSIX)
-> (GenericRevisionInfo -> Maybe POSIX -> GenericRevisionInfo)
-> Lens
GenericRevisionInfo GenericRevisionInfo (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenericRevisionInfo' {Maybe POSIX
lastUsedTime :: Maybe POSIX
$sel:lastUsedTime:GenericRevisionInfo' :: GenericRevisionInfo -> Maybe POSIX
lastUsedTime} -> Maybe POSIX
lastUsedTime) (\s :: GenericRevisionInfo
s@GenericRevisionInfo' {} Maybe POSIX
a -> GenericRevisionInfo
s {$sel:lastUsedTime:GenericRevisionInfo' :: Maybe POSIX
lastUsedTime = Maybe POSIX
a} :: GenericRevisionInfo) ((Maybe POSIX -> f (Maybe POSIX))
-> GenericRevisionInfo -> f GenericRevisionInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GenericRevisionInfo
-> f GenericRevisionInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
genericRevisionInfo_description :: Lens.Lens' GenericRevisionInfo (Prelude.Maybe Prelude.Text)
genericRevisionInfo_description :: (Maybe Text -> f (Maybe Text))
-> GenericRevisionInfo -> f GenericRevisionInfo
genericRevisionInfo_description = (GenericRevisionInfo -> Maybe Text)
-> (GenericRevisionInfo -> Maybe Text -> GenericRevisionInfo)
-> Lens
GenericRevisionInfo GenericRevisionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenericRevisionInfo' {Maybe Text
description :: Maybe Text
$sel:description:GenericRevisionInfo' :: GenericRevisionInfo -> Maybe Text
description} -> Maybe Text
description) (\s :: GenericRevisionInfo
s@GenericRevisionInfo' {} Maybe Text
a -> GenericRevisionInfo
s {$sel:description:GenericRevisionInfo' :: Maybe Text
description = Maybe Text
a} :: GenericRevisionInfo)
instance Core.FromJSON GenericRevisionInfo where
parseJSON :: Value -> Parser GenericRevisionInfo
parseJSON =
String
-> (Object -> Parser GenericRevisionInfo)
-> Value
-> Parser GenericRevisionInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"GenericRevisionInfo"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> GenericRevisionInfo
GenericRevisionInfo'
(Maybe POSIX
-> Maybe POSIX
-> Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> GenericRevisionInfo)
-> Parser (Maybe POSIX)
-> Parser
(Maybe POSIX
-> Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> GenericRevisionInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"registerTime")
Parser
(Maybe POSIX
-> Maybe [Text]
-> Maybe POSIX
-> Maybe Text
-> GenericRevisionInfo)
-> Parser (Maybe POSIX)
-> Parser
(Maybe [Text] -> Maybe POSIX -> Maybe Text -> GenericRevisionInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"firstUsedTime")
Parser
(Maybe [Text] -> Maybe POSIX -> Maybe Text -> GenericRevisionInfo)
-> Parser (Maybe [Text])
-> Parser (Maybe POSIX -> Maybe Text -> GenericRevisionInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deploymentGroups"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe POSIX -> Maybe Text -> GenericRevisionInfo)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> GenericRevisionInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUsedTime")
Parser (Maybe Text -> GenericRevisionInfo)
-> Parser (Maybe Text) -> Parser GenericRevisionInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
)
instance Prelude.Hashable GenericRevisionInfo
instance Prelude.NFData GenericRevisionInfo