{-# 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.OutputArtifact 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 OutputArtifact = OutputArtifact'
{
OutputArtifact -> Text
name :: Prelude.Text
}
deriving (OutputArtifact -> OutputArtifact -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OutputArtifact -> OutputArtifact -> Bool
$c/= :: OutputArtifact -> OutputArtifact -> Bool
== :: OutputArtifact -> OutputArtifact -> Bool
$c== :: OutputArtifact -> OutputArtifact -> Bool
Prelude.Eq, ReadPrec [OutputArtifact]
ReadPrec OutputArtifact
Int -> ReadS OutputArtifact
ReadS [OutputArtifact]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OutputArtifact]
$creadListPrec :: ReadPrec [OutputArtifact]
readPrec :: ReadPrec OutputArtifact
$creadPrec :: ReadPrec OutputArtifact
readList :: ReadS [OutputArtifact]
$creadList :: ReadS [OutputArtifact]
readsPrec :: Int -> ReadS OutputArtifact
$creadsPrec :: Int -> ReadS OutputArtifact
Prelude.Read, Int -> OutputArtifact -> ShowS
[OutputArtifact] -> ShowS
OutputArtifact -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OutputArtifact] -> ShowS
$cshowList :: [OutputArtifact] -> ShowS
show :: OutputArtifact -> String
$cshow :: OutputArtifact -> String
showsPrec :: Int -> OutputArtifact -> ShowS
$cshowsPrec :: Int -> OutputArtifact -> ShowS
Prelude.Show, forall x. Rep OutputArtifact x -> OutputArtifact
forall x. OutputArtifact -> Rep OutputArtifact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OutputArtifact x -> OutputArtifact
$cfrom :: forall x. OutputArtifact -> Rep OutputArtifact x
Prelude.Generic)
newOutputArtifact ::
Prelude.Text ->
OutputArtifact
newOutputArtifact :: Text -> OutputArtifact
newOutputArtifact Text
pName_ =
OutputArtifact' {$sel:name:OutputArtifact' :: Text
name = Text
pName_}
outputArtifact_name :: Lens.Lens' OutputArtifact Prelude.Text
outputArtifact_name :: Lens' OutputArtifact Text
outputArtifact_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputArtifact' {Text
name :: Text
$sel:name:OutputArtifact' :: OutputArtifact -> Text
name} -> Text
name) (\s :: OutputArtifact
s@OutputArtifact' {} Text
a -> OutputArtifact
s {$sel:name:OutputArtifact' :: Text
name = Text
a} :: OutputArtifact)
instance Data.FromJSON OutputArtifact where
parseJSON :: Value -> Parser OutputArtifact
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"OutputArtifact"
( \Object
x ->
Text -> OutputArtifact
OutputArtifact' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"name")
)
instance Prelude.Hashable OutputArtifact where
hashWithSalt :: Int -> OutputArtifact -> Int
hashWithSalt Int
_salt OutputArtifact' {Text
name :: Text
$sel:name:OutputArtifact' :: OutputArtifact -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData OutputArtifact where
rnf :: OutputArtifact -> ()
rnf OutputArtifact' {Text
name :: Text
$sel:name:OutputArtifact' :: OutputArtifact -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
name
instance Data.ToJSON OutputArtifact where
toJSON :: OutputArtifact -> Value
toJSON OutputArtifact' {Text
name :: Text
$sel:name:OutputArtifact' :: OutputArtifact -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)]
)