{-# 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.CodeStar.Types.CodeCommitCodeDestination where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CodeCommitCodeDestination = CodeCommitCodeDestination'
{
CodeCommitCodeDestination -> Text
name :: Prelude.Text
}
deriving (CodeCommitCodeDestination -> CodeCommitCodeDestination -> Bool
(CodeCommitCodeDestination -> CodeCommitCodeDestination -> Bool)
-> (CodeCommitCodeDestination -> CodeCommitCodeDestination -> Bool)
-> Eq CodeCommitCodeDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeCommitCodeDestination -> CodeCommitCodeDestination -> Bool
$c/= :: CodeCommitCodeDestination -> CodeCommitCodeDestination -> Bool
== :: CodeCommitCodeDestination -> CodeCommitCodeDestination -> Bool
$c== :: CodeCommitCodeDestination -> CodeCommitCodeDestination -> Bool
Prelude.Eq, ReadPrec [CodeCommitCodeDestination]
ReadPrec CodeCommitCodeDestination
Int -> ReadS CodeCommitCodeDestination
ReadS [CodeCommitCodeDestination]
(Int -> ReadS CodeCommitCodeDestination)
-> ReadS [CodeCommitCodeDestination]
-> ReadPrec CodeCommitCodeDestination
-> ReadPrec [CodeCommitCodeDestination]
-> Read CodeCommitCodeDestination
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CodeCommitCodeDestination]
$creadListPrec :: ReadPrec [CodeCommitCodeDestination]
readPrec :: ReadPrec CodeCommitCodeDestination
$creadPrec :: ReadPrec CodeCommitCodeDestination
readList :: ReadS [CodeCommitCodeDestination]
$creadList :: ReadS [CodeCommitCodeDestination]
readsPrec :: Int -> ReadS CodeCommitCodeDestination
$creadsPrec :: Int -> ReadS CodeCommitCodeDestination
Prelude.Read, Int -> CodeCommitCodeDestination -> ShowS
[CodeCommitCodeDestination] -> ShowS
CodeCommitCodeDestination -> String
(Int -> CodeCommitCodeDestination -> ShowS)
-> (CodeCommitCodeDestination -> String)
-> ([CodeCommitCodeDestination] -> ShowS)
-> Show CodeCommitCodeDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeCommitCodeDestination] -> ShowS
$cshowList :: [CodeCommitCodeDestination] -> ShowS
show :: CodeCommitCodeDestination -> String
$cshow :: CodeCommitCodeDestination -> String
showsPrec :: Int -> CodeCommitCodeDestination -> ShowS
$cshowsPrec :: Int -> CodeCommitCodeDestination -> ShowS
Prelude.Show, (forall x.
CodeCommitCodeDestination -> Rep CodeCommitCodeDestination x)
-> (forall x.
Rep CodeCommitCodeDestination x -> CodeCommitCodeDestination)
-> Generic CodeCommitCodeDestination
forall x.
Rep CodeCommitCodeDestination x -> CodeCommitCodeDestination
forall x.
CodeCommitCodeDestination -> Rep CodeCommitCodeDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CodeCommitCodeDestination x -> CodeCommitCodeDestination
$cfrom :: forall x.
CodeCommitCodeDestination -> Rep CodeCommitCodeDestination x
Prelude.Generic)
newCodeCommitCodeDestination ::
Prelude.Text ->
CodeCommitCodeDestination
newCodeCommitCodeDestination :: Text -> CodeCommitCodeDestination
newCodeCommitCodeDestination Text
pName_ =
CodeCommitCodeDestination' :: Text -> CodeCommitCodeDestination
CodeCommitCodeDestination' {$sel:name:CodeCommitCodeDestination' :: Text
name = Text
pName_}
codeCommitCodeDestination_name :: Lens.Lens' CodeCommitCodeDestination Prelude.Text
codeCommitCodeDestination_name :: (Text -> f Text)
-> CodeCommitCodeDestination -> f CodeCommitCodeDestination
codeCommitCodeDestination_name = (CodeCommitCodeDestination -> Text)
-> (CodeCommitCodeDestination -> Text -> CodeCommitCodeDestination)
-> Lens
CodeCommitCodeDestination CodeCommitCodeDestination Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeCommitCodeDestination' {Text
name :: Text
$sel:name:CodeCommitCodeDestination' :: CodeCommitCodeDestination -> Text
name} -> Text
name) (\s :: CodeCommitCodeDestination
s@CodeCommitCodeDestination' {} Text
a -> CodeCommitCodeDestination
s {$sel:name:CodeCommitCodeDestination' :: Text
name = Text
a} :: CodeCommitCodeDestination)
instance Prelude.Hashable CodeCommitCodeDestination
instance Prelude.NFData CodeCommitCodeDestination
instance Core.ToJSON CodeCommitCodeDestination where
toJSON :: CodeCommitCodeDestination -> Value
toJSON CodeCommitCodeDestination' {Text
name :: Text
$sel:name:CodeCommitCodeDestination' :: CodeCommitCodeDestination -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)]
)