{-# 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.CodeArtifact.Types.SuccessfulPackageVersionInfo where
import Amazonka.CodeArtifact.Types.PackageVersionStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SuccessfulPackageVersionInfo = SuccessfulPackageVersionInfo'
{
SuccessfulPackageVersionInfo -> Maybe PackageVersionStatus
status :: Prelude.Maybe PackageVersionStatus,
SuccessfulPackageVersionInfo -> Maybe Text
revision :: Prelude.Maybe Prelude.Text
}
deriving (SuccessfulPackageVersionInfo
-> SuccessfulPackageVersionInfo -> Bool
(SuccessfulPackageVersionInfo
-> SuccessfulPackageVersionInfo -> Bool)
-> (SuccessfulPackageVersionInfo
-> SuccessfulPackageVersionInfo -> Bool)
-> Eq SuccessfulPackageVersionInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SuccessfulPackageVersionInfo
-> SuccessfulPackageVersionInfo -> Bool
$c/= :: SuccessfulPackageVersionInfo
-> SuccessfulPackageVersionInfo -> Bool
== :: SuccessfulPackageVersionInfo
-> SuccessfulPackageVersionInfo -> Bool
$c== :: SuccessfulPackageVersionInfo
-> SuccessfulPackageVersionInfo -> Bool
Prelude.Eq, ReadPrec [SuccessfulPackageVersionInfo]
ReadPrec SuccessfulPackageVersionInfo
Int -> ReadS SuccessfulPackageVersionInfo
ReadS [SuccessfulPackageVersionInfo]
(Int -> ReadS SuccessfulPackageVersionInfo)
-> ReadS [SuccessfulPackageVersionInfo]
-> ReadPrec SuccessfulPackageVersionInfo
-> ReadPrec [SuccessfulPackageVersionInfo]
-> Read SuccessfulPackageVersionInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SuccessfulPackageVersionInfo]
$creadListPrec :: ReadPrec [SuccessfulPackageVersionInfo]
readPrec :: ReadPrec SuccessfulPackageVersionInfo
$creadPrec :: ReadPrec SuccessfulPackageVersionInfo
readList :: ReadS [SuccessfulPackageVersionInfo]
$creadList :: ReadS [SuccessfulPackageVersionInfo]
readsPrec :: Int -> ReadS SuccessfulPackageVersionInfo
$creadsPrec :: Int -> ReadS SuccessfulPackageVersionInfo
Prelude.Read, Int -> SuccessfulPackageVersionInfo -> ShowS
[SuccessfulPackageVersionInfo] -> ShowS
SuccessfulPackageVersionInfo -> String
(Int -> SuccessfulPackageVersionInfo -> ShowS)
-> (SuccessfulPackageVersionInfo -> String)
-> ([SuccessfulPackageVersionInfo] -> ShowS)
-> Show SuccessfulPackageVersionInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SuccessfulPackageVersionInfo] -> ShowS
$cshowList :: [SuccessfulPackageVersionInfo] -> ShowS
show :: SuccessfulPackageVersionInfo -> String
$cshow :: SuccessfulPackageVersionInfo -> String
showsPrec :: Int -> SuccessfulPackageVersionInfo -> ShowS
$cshowsPrec :: Int -> SuccessfulPackageVersionInfo -> ShowS
Prelude.Show, (forall x.
SuccessfulPackageVersionInfo -> Rep SuccessfulPackageVersionInfo x)
-> (forall x.
Rep SuccessfulPackageVersionInfo x -> SuccessfulPackageVersionInfo)
-> Generic SuccessfulPackageVersionInfo
forall x.
Rep SuccessfulPackageVersionInfo x -> SuccessfulPackageVersionInfo
forall x.
SuccessfulPackageVersionInfo -> Rep SuccessfulPackageVersionInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SuccessfulPackageVersionInfo x -> SuccessfulPackageVersionInfo
$cfrom :: forall x.
SuccessfulPackageVersionInfo -> Rep SuccessfulPackageVersionInfo x
Prelude.Generic)
newSuccessfulPackageVersionInfo ::
SuccessfulPackageVersionInfo
newSuccessfulPackageVersionInfo :: SuccessfulPackageVersionInfo
newSuccessfulPackageVersionInfo =
SuccessfulPackageVersionInfo' :: Maybe PackageVersionStatus
-> Maybe Text -> SuccessfulPackageVersionInfo
SuccessfulPackageVersionInfo'
{ $sel:status:SuccessfulPackageVersionInfo' :: Maybe PackageVersionStatus
status =
Maybe PackageVersionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:revision:SuccessfulPackageVersionInfo' :: Maybe Text
revision = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
successfulPackageVersionInfo_status :: Lens.Lens' SuccessfulPackageVersionInfo (Prelude.Maybe PackageVersionStatus)
successfulPackageVersionInfo_status :: (Maybe PackageVersionStatus -> f (Maybe PackageVersionStatus))
-> SuccessfulPackageVersionInfo -> f SuccessfulPackageVersionInfo
successfulPackageVersionInfo_status = (SuccessfulPackageVersionInfo -> Maybe PackageVersionStatus)
-> (SuccessfulPackageVersionInfo
-> Maybe PackageVersionStatus -> SuccessfulPackageVersionInfo)
-> Lens
SuccessfulPackageVersionInfo
SuccessfulPackageVersionInfo
(Maybe PackageVersionStatus)
(Maybe PackageVersionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuccessfulPackageVersionInfo' {Maybe PackageVersionStatus
status :: Maybe PackageVersionStatus
$sel:status:SuccessfulPackageVersionInfo' :: SuccessfulPackageVersionInfo -> Maybe PackageVersionStatus
status} -> Maybe PackageVersionStatus
status) (\s :: SuccessfulPackageVersionInfo
s@SuccessfulPackageVersionInfo' {} Maybe PackageVersionStatus
a -> SuccessfulPackageVersionInfo
s {$sel:status:SuccessfulPackageVersionInfo' :: Maybe PackageVersionStatus
status = Maybe PackageVersionStatus
a} :: SuccessfulPackageVersionInfo)
successfulPackageVersionInfo_revision :: Lens.Lens' SuccessfulPackageVersionInfo (Prelude.Maybe Prelude.Text)
successfulPackageVersionInfo_revision :: (Maybe Text -> f (Maybe Text))
-> SuccessfulPackageVersionInfo -> f SuccessfulPackageVersionInfo
successfulPackageVersionInfo_revision = (SuccessfulPackageVersionInfo -> Maybe Text)
-> (SuccessfulPackageVersionInfo
-> Maybe Text -> SuccessfulPackageVersionInfo)
-> Lens
SuccessfulPackageVersionInfo
SuccessfulPackageVersionInfo
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuccessfulPackageVersionInfo' {Maybe Text
revision :: Maybe Text
$sel:revision:SuccessfulPackageVersionInfo' :: SuccessfulPackageVersionInfo -> Maybe Text
revision} -> Maybe Text
revision) (\s :: SuccessfulPackageVersionInfo
s@SuccessfulPackageVersionInfo' {} Maybe Text
a -> SuccessfulPackageVersionInfo
s {$sel:revision:SuccessfulPackageVersionInfo' :: Maybe Text
revision = Maybe Text
a} :: SuccessfulPackageVersionInfo)
instance Core.FromJSON SuccessfulPackageVersionInfo where
parseJSON :: Value -> Parser SuccessfulPackageVersionInfo
parseJSON =
String
-> (Object -> Parser SuccessfulPackageVersionInfo)
-> Value
-> Parser SuccessfulPackageVersionInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SuccessfulPackageVersionInfo"
( \Object
x ->
Maybe PackageVersionStatus
-> Maybe Text -> SuccessfulPackageVersionInfo
SuccessfulPackageVersionInfo'
(Maybe PackageVersionStatus
-> Maybe Text -> SuccessfulPackageVersionInfo)
-> Parser (Maybe PackageVersionStatus)
-> Parser (Maybe Text -> SuccessfulPackageVersionInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe PackageVersionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser (Maybe Text -> SuccessfulPackageVersionInfo)
-> Parser (Maybe Text) -> Parser SuccessfulPackageVersionInfo
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
"revision")
)
instance
Prelude.Hashable
SuccessfulPackageVersionInfo
instance Prelude.NFData SuccessfulPackageVersionInfo