{-# 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.PipelineMetadata where
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 PipelineMetadata = PipelineMetadata'
{
PipelineMetadata -> Maybe POSIX
created :: Prelude.Maybe Data.POSIX,
PipelineMetadata -> Maybe Text
pipelineArn :: Prelude.Maybe Prelude.Text,
PipelineMetadata -> Maybe POSIX
updated :: Prelude.Maybe Data.POSIX
}
deriving (PipelineMetadata -> PipelineMetadata -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipelineMetadata -> PipelineMetadata -> Bool
$c/= :: PipelineMetadata -> PipelineMetadata -> Bool
== :: PipelineMetadata -> PipelineMetadata -> Bool
$c== :: PipelineMetadata -> PipelineMetadata -> Bool
Prelude.Eq, ReadPrec [PipelineMetadata]
ReadPrec PipelineMetadata
Int -> ReadS PipelineMetadata
ReadS [PipelineMetadata]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PipelineMetadata]
$creadListPrec :: ReadPrec [PipelineMetadata]
readPrec :: ReadPrec PipelineMetadata
$creadPrec :: ReadPrec PipelineMetadata
readList :: ReadS [PipelineMetadata]
$creadList :: ReadS [PipelineMetadata]
readsPrec :: Int -> ReadS PipelineMetadata
$creadsPrec :: Int -> ReadS PipelineMetadata
Prelude.Read, Int -> PipelineMetadata -> ShowS
[PipelineMetadata] -> ShowS
PipelineMetadata -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PipelineMetadata] -> ShowS
$cshowList :: [PipelineMetadata] -> ShowS
show :: PipelineMetadata -> String
$cshow :: PipelineMetadata -> String
showsPrec :: Int -> PipelineMetadata -> ShowS
$cshowsPrec :: Int -> PipelineMetadata -> ShowS
Prelude.Show, forall x. Rep PipelineMetadata x -> PipelineMetadata
forall x. PipelineMetadata -> Rep PipelineMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PipelineMetadata x -> PipelineMetadata
$cfrom :: forall x. PipelineMetadata -> Rep PipelineMetadata x
Prelude.Generic)
newPipelineMetadata ::
PipelineMetadata
newPipelineMetadata :: PipelineMetadata
newPipelineMetadata =
PipelineMetadata'
{ $sel:created:PipelineMetadata' :: Maybe POSIX
created = forall a. Maybe a
Prelude.Nothing,
$sel:pipelineArn:PipelineMetadata' :: Maybe Text
pipelineArn = forall a. Maybe a
Prelude.Nothing,
$sel:updated:PipelineMetadata' :: Maybe POSIX
updated = forall a. Maybe a
Prelude.Nothing
}
pipelineMetadata_created :: Lens.Lens' PipelineMetadata (Prelude.Maybe Prelude.UTCTime)
pipelineMetadata_created :: Lens' PipelineMetadata (Maybe UTCTime)
pipelineMetadata_created = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineMetadata' {Maybe POSIX
created :: Maybe POSIX
$sel:created:PipelineMetadata' :: PipelineMetadata -> Maybe POSIX
created} -> Maybe POSIX
created) (\s :: PipelineMetadata
s@PipelineMetadata' {} Maybe POSIX
a -> PipelineMetadata
s {$sel:created:PipelineMetadata' :: Maybe POSIX
created = Maybe POSIX
a} :: PipelineMetadata) 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
pipelineMetadata_pipelineArn :: Lens.Lens' PipelineMetadata (Prelude.Maybe Prelude.Text)
pipelineMetadata_pipelineArn :: Lens' PipelineMetadata (Maybe Text)
pipelineMetadata_pipelineArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineMetadata' {Maybe Text
pipelineArn :: Maybe Text
$sel:pipelineArn:PipelineMetadata' :: PipelineMetadata -> Maybe Text
pipelineArn} -> Maybe Text
pipelineArn) (\s :: PipelineMetadata
s@PipelineMetadata' {} Maybe Text
a -> PipelineMetadata
s {$sel:pipelineArn:PipelineMetadata' :: Maybe Text
pipelineArn = Maybe Text
a} :: PipelineMetadata)
pipelineMetadata_updated :: Lens.Lens' PipelineMetadata (Prelude.Maybe Prelude.UTCTime)
pipelineMetadata_updated :: Lens' PipelineMetadata (Maybe UTCTime)
pipelineMetadata_updated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipelineMetadata' {Maybe POSIX
updated :: Maybe POSIX
$sel:updated:PipelineMetadata' :: PipelineMetadata -> Maybe POSIX
updated} -> Maybe POSIX
updated) (\s :: PipelineMetadata
s@PipelineMetadata' {} Maybe POSIX
a -> PipelineMetadata
s {$sel:updated:PipelineMetadata' :: Maybe POSIX
updated = Maybe POSIX
a} :: PipelineMetadata) 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
instance Data.FromJSON PipelineMetadata where
parseJSON :: Value -> Parser PipelineMetadata
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PipelineMetadata"
( \Object
x ->
Maybe POSIX -> Maybe Text -> Maybe POSIX -> PipelineMetadata
PipelineMetadata'
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
"created")
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
"pipelineArn")
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
"updated")
)
instance Prelude.Hashable PipelineMetadata where
hashWithSalt :: Int -> PipelineMetadata -> Int
hashWithSalt Int
_salt PipelineMetadata' {Maybe Text
Maybe POSIX
updated :: Maybe POSIX
pipelineArn :: Maybe Text
created :: Maybe POSIX
$sel:updated:PipelineMetadata' :: PipelineMetadata -> Maybe POSIX
$sel:pipelineArn:PipelineMetadata' :: PipelineMetadata -> Maybe Text
$sel:created:PipelineMetadata' :: PipelineMetadata -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
created
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pipelineArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
updated
instance Prelude.NFData PipelineMetadata where
rnf :: PipelineMetadata -> ()
rnf PipelineMetadata' {Maybe Text
Maybe POSIX
updated :: Maybe POSIX
pipelineArn :: Maybe Text
created :: Maybe POSIX
$sel:updated:PipelineMetadata' :: PipelineMetadata -> Maybe POSIX
$sel:pipelineArn:PipelineMetadata' :: PipelineMetadata -> Maybe Text
$sel:created:PipelineMetadata' :: PipelineMetadata -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
created
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pipelineArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
updated