{-# 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.CodePipeline.Types.PipelineSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PipelineSummary = PipelineSummary'
{
PipelineSummary -> Maybe POSIX
created :: Prelude.Maybe Core.POSIX,
PipelineSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
PipelineSummary -> Maybe Natural
version :: Prelude.Maybe Prelude.Natural,
PipelineSummary -> Maybe POSIX
updated :: Prelude.Maybe Core.POSIX
}
deriving (PipelineSummary -> PipelineSummary -> Bool
(PipelineSummary -> PipelineSummary -> Bool)
-> (PipelineSummary -> PipelineSummary -> Bool)
-> Eq PipelineSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineSummary -> PipelineSummary -> Bool
$c/= :: PipelineSummary -> PipelineSummary -> Bool
== :: PipelineSummary -> PipelineSummary -> Bool
$c== :: PipelineSummary -> PipelineSummary -> Bool
Prelude.Eq, ReadPrec [PipelineSummary]
ReadPrec PipelineSummary
Int -> ReadS PipelineSummary
ReadS [PipelineSummary]
(Int -> ReadS PipelineSummary)
-> ReadS [PipelineSummary]
-> ReadPrec PipelineSummary
-> ReadPrec [PipelineSummary]
-> Read PipelineSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PipelineSummary]
$creadListPrec :: ReadPrec [PipelineSummary]
readPrec :: ReadPrec PipelineSummary
$creadPrec :: ReadPrec PipelineSummary
readList :: ReadS [PipelineSummary]
$creadList :: ReadS [PipelineSummary]
readsPrec :: Int -> ReadS PipelineSummary
$creadsPrec :: Int -> ReadS PipelineSummary
Prelude.Read, Int -> PipelineSummary -> ShowS
[PipelineSummary] -> ShowS
PipelineSummary -> String
(Int -> PipelineSummary -> ShowS)
-> (PipelineSummary -> String)
-> ([PipelineSummary] -> ShowS)
-> Show PipelineSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PipelineSummary] -> ShowS
$cshowList :: [PipelineSummary] -> ShowS
show :: PipelineSummary -> String
$cshow :: PipelineSummary -> String
showsPrec :: Int -> PipelineSummary -> ShowS
$cshowsPrec :: Int -> PipelineSummary -> ShowS
Prelude.Show, (forall x. PipelineSummary -> Rep PipelineSummary x)
-> (forall x. Rep PipelineSummary x -> PipelineSummary)
-> Generic PipelineSummary
forall x. Rep PipelineSummary x -> PipelineSummary
forall x. PipelineSummary -> Rep PipelineSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PipelineSummary x -> PipelineSummary
$cfrom :: forall x. PipelineSummary -> Rep PipelineSummary x
Prelude.Generic)
newPipelineSummary ::
PipelineSummary
newPipelineSummary :: PipelineSummary
newPipelineSummary =
PipelineSummary' :: Maybe POSIX
-> Maybe Text -> Maybe Natural -> Maybe POSIX -> PipelineSummary
PipelineSummary'
{ $sel:created:PipelineSummary' :: Maybe POSIX
created = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:name:PipelineSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:version:PipelineSummary' :: Maybe Natural
version = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:updated:PipelineSummary' :: Maybe POSIX
updated = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
pipelineSummary_created :: Lens.Lens' PipelineSummary (Prelude.Maybe Prelude.UTCTime)
pipelineSummary_created :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineSummary -> f PipelineSummary
pipelineSummary_created = (PipelineSummary -> Maybe POSIX)
-> (PipelineSummary -> Maybe POSIX -> PipelineSummary)
-> Lens PipelineSummary PipelineSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineSummary' {Maybe POSIX
created :: Maybe POSIX
$sel:created:PipelineSummary' :: PipelineSummary -> Maybe POSIX
created} -> Maybe POSIX
created) (\s :: PipelineSummary
s@PipelineSummary' {} Maybe POSIX
a -> PipelineSummary
s {$sel:created:PipelineSummary' :: Maybe POSIX
created = Maybe POSIX
a} :: PipelineSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> PipelineSummary -> f PipelineSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineSummary
-> f PipelineSummary
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
pipelineSummary_name :: Lens.Lens' PipelineSummary (Prelude.Maybe Prelude.Text)
pipelineSummary_name :: (Maybe Text -> f (Maybe Text))
-> PipelineSummary -> f PipelineSummary
pipelineSummary_name = (PipelineSummary -> Maybe Text)
-> (PipelineSummary -> Maybe Text -> PipelineSummary)
-> Lens PipelineSummary PipelineSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineSummary' {Maybe Text
name :: Maybe Text
$sel:name:PipelineSummary' :: PipelineSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: PipelineSummary
s@PipelineSummary' {} Maybe Text
a -> PipelineSummary
s {$sel:name:PipelineSummary' :: Maybe Text
name = Maybe Text
a} :: PipelineSummary)
pipelineSummary_version :: Lens.Lens' PipelineSummary (Prelude.Maybe Prelude.Natural)
pipelineSummary_version :: (Maybe Natural -> f (Maybe Natural))
-> PipelineSummary -> f PipelineSummary
pipelineSummary_version = (PipelineSummary -> Maybe Natural)
-> (PipelineSummary -> Maybe Natural -> PipelineSummary)
-> Lens
PipelineSummary PipelineSummary (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineSummary' {Maybe Natural
version :: Maybe Natural
$sel:version:PipelineSummary' :: PipelineSummary -> Maybe Natural
version} -> Maybe Natural
version) (\s :: PipelineSummary
s@PipelineSummary' {} Maybe Natural
a -> PipelineSummary
s {$sel:version:PipelineSummary' :: Maybe Natural
version = Maybe Natural
a} :: PipelineSummary)
pipelineSummary_updated :: Lens.Lens' PipelineSummary (Prelude.Maybe Prelude.UTCTime)
pipelineSummary_updated :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineSummary -> f PipelineSummary
pipelineSummary_updated = (PipelineSummary -> Maybe POSIX)
-> (PipelineSummary -> Maybe POSIX -> PipelineSummary)
-> Lens PipelineSummary PipelineSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineSummary' {Maybe POSIX
updated :: Maybe POSIX
$sel:updated:PipelineSummary' :: PipelineSummary -> Maybe POSIX
updated} -> Maybe POSIX
updated) (\s :: PipelineSummary
s@PipelineSummary' {} Maybe POSIX
a -> PipelineSummary
s {$sel:updated:PipelineSummary' :: Maybe POSIX
updated = Maybe POSIX
a} :: PipelineSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> PipelineSummary -> f PipelineSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PipelineSummary
-> f PipelineSummary
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
instance Core.FromJSON PipelineSummary where
parseJSON :: Value -> Parser PipelineSummary
parseJSON =
String
-> (Object -> Parser PipelineSummary)
-> Value
-> Parser PipelineSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PipelineSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text -> Maybe Natural -> Maybe POSIX -> PipelineSummary
PipelineSummary'
(Maybe POSIX
-> Maybe Text -> Maybe Natural -> Maybe POSIX -> PipelineSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text -> Maybe Natural -> Maybe POSIX -> PipelineSummary)
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
"created")
Parser
(Maybe Text -> Maybe Natural -> Maybe POSIX -> PipelineSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Natural -> Maybe POSIX -> PipelineSummary)
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
"name")
Parser (Maybe Natural -> Maybe POSIX -> PipelineSummary)
-> Parser (Maybe Natural)
-> Parser (Maybe POSIX -> PipelineSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"version")
Parser (Maybe POSIX -> PipelineSummary)
-> Parser (Maybe POSIX) -> Parser PipelineSummary
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
"updated")
)
instance Prelude.Hashable PipelineSummary
instance Prelude.NFData PipelineSummary