{-# 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.ArtifactRevision where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ArtifactRevision = ArtifactRevision'
{
ArtifactRevision -> Maybe Text
revisionSummary :: Prelude.Maybe Prelude.Text,
ArtifactRevision -> Maybe Text
revisionUrl :: Prelude.Maybe Prelude.Text,
ArtifactRevision -> Maybe POSIX
created :: Prelude.Maybe Core.POSIX,
ArtifactRevision -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ArtifactRevision -> Maybe Text
revisionId :: Prelude.Maybe Prelude.Text,
ArtifactRevision -> Maybe Text
revisionChangeIdentifier :: Prelude.Maybe Prelude.Text
}
deriving (ArtifactRevision -> ArtifactRevision -> Bool
(ArtifactRevision -> ArtifactRevision -> Bool)
-> (ArtifactRevision -> ArtifactRevision -> Bool)
-> Eq ArtifactRevision
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ArtifactRevision -> ArtifactRevision -> Bool
$c/= :: ArtifactRevision -> ArtifactRevision -> Bool
== :: ArtifactRevision -> ArtifactRevision -> Bool
$c== :: ArtifactRevision -> ArtifactRevision -> Bool
Prelude.Eq, ReadPrec [ArtifactRevision]
ReadPrec ArtifactRevision
Int -> ReadS ArtifactRevision
ReadS [ArtifactRevision]
(Int -> ReadS ArtifactRevision)
-> ReadS [ArtifactRevision]
-> ReadPrec ArtifactRevision
-> ReadPrec [ArtifactRevision]
-> Read ArtifactRevision
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ArtifactRevision]
$creadListPrec :: ReadPrec [ArtifactRevision]
readPrec :: ReadPrec ArtifactRevision
$creadPrec :: ReadPrec ArtifactRevision
readList :: ReadS [ArtifactRevision]
$creadList :: ReadS [ArtifactRevision]
readsPrec :: Int -> ReadS ArtifactRevision
$creadsPrec :: Int -> ReadS ArtifactRevision
Prelude.Read, Int -> ArtifactRevision -> ShowS
[ArtifactRevision] -> ShowS
ArtifactRevision -> String
(Int -> ArtifactRevision -> ShowS)
-> (ArtifactRevision -> String)
-> ([ArtifactRevision] -> ShowS)
-> Show ArtifactRevision
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ArtifactRevision] -> ShowS
$cshowList :: [ArtifactRevision] -> ShowS
show :: ArtifactRevision -> String
$cshow :: ArtifactRevision -> String
showsPrec :: Int -> ArtifactRevision -> ShowS
$cshowsPrec :: Int -> ArtifactRevision -> ShowS
Prelude.Show, (forall x. ArtifactRevision -> Rep ArtifactRevision x)
-> (forall x. Rep ArtifactRevision x -> ArtifactRevision)
-> Generic ArtifactRevision
forall x. Rep ArtifactRevision x -> ArtifactRevision
forall x. ArtifactRevision -> Rep ArtifactRevision x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ArtifactRevision x -> ArtifactRevision
$cfrom :: forall x. ArtifactRevision -> Rep ArtifactRevision x
Prelude.Generic)
newArtifactRevision ::
ArtifactRevision
newArtifactRevision :: ArtifactRevision
newArtifactRevision =
ArtifactRevision' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ArtifactRevision
ArtifactRevision'
{ $sel:revisionSummary:ArtifactRevision' :: Maybe Text
revisionSummary =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:revisionUrl:ArtifactRevision' :: Maybe Text
revisionUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:created:ArtifactRevision' :: Maybe POSIX
created = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:name:ArtifactRevision' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:revisionId:ArtifactRevision' :: Maybe Text
revisionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:revisionChangeIdentifier:ArtifactRevision' :: Maybe Text
revisionChangeIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
artifactRevision_revisionSummary :: Lens.Lens' ArtifactRevision (Prelude.Maybe Prelude.Text)
artifactRevision_revisionSummary :: (Maybe Text -> f (Maybe Text))
-> ArtifactRevision -> f ArtifactRevision
artifactRevision_revisionSummary = (ArtifactRevision -> Maybe Text)
-> (ArtifactRevision -> Maybe Text -> ArtifactRevision)
-> Lens ArtifactRevision ArtifactRevision (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArtifactRevision' {Maybe Text
revisionSummary :: Maybe Text
$sel:revisionSummary:ArtifactRevision' :: ArtifactRevision -> Maybe Text
revisionSummary} -> Maybe Text
revisionSummary) (\s :: ArtifactRevision
s@ArtifactRevision' {} Maybe Text
a -> ArtifactRevision
s {$sel:revisionSummary:ArtifactRevision' :: Maybe Text
revisionSummary = Maybe Text
a} :: ArtifactRevision)
artifactRevision_revisionUrl :: Lens.Lens' ArtifactRevision (Prelude.Maybe Prelude.Text)
artifactRevision_revisionUrl :: (Maybe Text -> f (Maybe Text))
-> ArtifactRevision -> f ArtifactRevision
artifactRevision_revisionUrl = (ArtifactRevision -> Maybe Text)
-> (ArtifactRevision -> Maybe Text -> ArtifactRevision)
-> Lens ArtifactRevision ArtifactRevision (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArtifactRevision' {Maybe Text
revisionUrl :: Maybe Text
$sel:revisionUrl:ArtifactRevision' :: ArtifactRevision -> Maybe Text
revisionUrl} -> Maybe Text
revisionUrl) (\s :: ArtifactRevision
s@ArtifactRevision' {} Maybe Text
a -> ArtifactRevision
s {$sel:revisionUrl:ArtifactRevision' :: Maybe Text
revisionUrl = Maybe Text
a} :: ArtifactRevision)
artifactRevision_created :: Lens.Lens' ArtifactRevision (Prelude.Maybe Prelude.UTCTime)
artifactRevision_created :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ArtifactRevision -> f ArtifactRevision
artifactRevision_created = (ArtifactRevision -> Maybe POSIX)
-> (ArtifactRevision -> Maybe POSIX -> ArtifactRevision)
-> Lens
ArtifactRevision ArtifactRevision (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArtifactRevision' {Maybe POSIX
created :: Maybe POSIX
$sel:created:ArtifactRevision' :: ArtifactRevision -> Maybe POSIX
created} -> Maybe POSIX
created) (\s :: ArtifactRevision
s@ArtifactRevision' {} Maybe POSIX
a -> ArtifactRevision
s {$sel:created:ArtifactRevision' :: Maybe POSIX
created = Maybe POSIX
a} :: ArtifactRevision) ((Maybe POSIX -> f (Maybe POSIX))
-> ArtifactRevision -> f ArtifactRevision)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ArtifactRevision
-> f ArtifactRevision
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
artifactRevision_name :: Lens.Lens' ArtifactRevision (Prelude.Maybe Prelude.Text)
artifactRevision_name :: (Maybe Text -> f (Maybe Text))
-> ArtifactRevision -> f ArtifactRevision
artifactRevision_name = (ArtifactRevision -> Maybe Text)
-> (ArtifactRevision -> Maybe Text -> ArtifactRevision)
-> Lens ArtifactRevision ArtifactRevision (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArtifactRevision' {Maybe Text
name :: Maybe Text
$sel:name:ArtifactRevision' :: ArtifactRevision -> Maybe Text
name} -> Maybe Text
name) (\s :: ArtifactRevision
s@ArtifactRevision' {} Maybe Text
a -> ArtifactRevision
s {$sel:name:ArtifactRevision' :: Maybe Text
name = Maybe Text
a} :: ArtifactRevision)
artifactRevision_revisionId :: Lens.Lens' ArtifactRevision (Prelude.Maybe Prelude.Text)
artifactRevision_revisionId :: (Maybe Text -> f (Maybe Text))
-> ArtifactRevision -> f ArtifactRevision
artifactRevision_revisionId = (ArtifactRevision -> Maybe Text)
-> (ArtifactRevision -> Maybe Text -> ArtifactRevision)
-> Lens ArtifactRevision ArtifactRevision (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArtifactRevision' {Maybe Text
revisionId :: Maybe Text
$sel:revisionId:ArtifactRevision' :: ArtifactRevision -> Maybe Text
revisionId} -> Maybe Text
revisionId) (\s :: ArtifactRevision
s@ArtifactRevision' {} Maybe Text
a -> ArtifactRevision
s {$sel:revisionId:ArtifactRevision' :: Maybe Text
revisionId = Maybe Text
a} :: ArtifactRevision)
artifactRevision_revisionChangeIdentifier :: Lens.Lens' ArtifactRevision (Prelude.Maybe Prelude.Text)
artifactRevision_revisionChangeIdentifier :: (Maybe Text -> f (Maybe Text))
-> ArtifactRevision -> f ArtifactRevision
artifactRevision_revisionChangeIdentifier = (ArtifactRevision -> Maybe Text)
-> (ArtifactRevision -> Maybe Text -> ArtifactRevision)
-> Lens ArtifactRevision ArtifactRevision (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ArtifactRevision' {Maybe Text
revisionChangeIdentifier :: Maybe Text
$sel:revisionChangeIdentifier:ArtifactRevision' :: ArtifactRevision -> Maybe Text
revisionChangeIdentifier} -> Maybe Text
revisionChangeIdentifier) (\s :: ArtifactRevision
s@ArtifactRevision' {} Maybe Text
a -> ArtifactRevision
s {$sel:revisionChangeIdentifier:ArtifactRevision' :: Maybe Text
revisionChangeIdentifier = Maybe Text
a} :: ArtifactRevision)
instance Core.FromJSON ArtifactRevision where
parseJSON :: Value -> Parser ArtifactRevision
parseJSON =
String
-> (Object -> Parser ArtifactRevision)
-> Value
-> Parser ArtifactRevision
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ArtifactRevision"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ArtifactRevision
ArtifactRevision'
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ArtifactRevision)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ArtifactRevision)
forall (f :: * -> *) a b. Functor 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
"revisionSummary")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ArtifactRevision)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe Text -> ArtifactRevision)
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
"revisionUrl")
Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> Maybe Text -> ArtifactRevision)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ArtifactRevision)
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
"created")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> ArtifactRevision)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ArtifactRevision)
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 Text -> Maybe Text -> ArtifactRevision)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ArtifactRevision)
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
"revisionId")
Parser (Maybe Text -> ArtifactRevision)
-> Parser (Maybe Text) -> Parser ArtifactRevision
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
"revisionChangeIdentifier")
)
instance Prelude.Hashable ArtifactRevision
instance Prelude.NFData ArtifactRevision