{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CodeCommitCodeDestination = CodeCommitCodeDestination'
{
CodeCommitCodeDestination -> Text
name :: Prelude.Text
}
deriving (CodeCommitCodeDestination -> CodeCommitCodeDestination -> Bool
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]
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
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.
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' {$sel:name:CodeCommitCodeDestination' :: Text
name = Text
pName_}
codeCommitCodeDestination_name :: Lens.Lens' CodeCommitCodeDestination Prelude.Text
codeCommitCodeDestination_name :: Lens' CodeCommitCodeDestination Text
codeCommitCodeDestination_name = 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 where
hashWithSalt :: Int -> CodeCommitCodeDestination -> Int
hashWithSalt Int
_salt CodeCommitCodeDestination' {Text
name :: Text
$sel:name:CodeCommitCodeDestination' :: CodeCommitCodeDestination -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData CodeCommitCodeDestination where
rnf :: CodeCommitCodeDestination -> ()
rnf CodeCommitCodeDestination' {Text
name :: Text
$sel:name:CodeCommitCodeDestination' :: CodeCommitCodeDestination -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
name
instance Data.ToJSON CodeCommitCodeDestination where
toJSON :: CodeCommitCodeDestination -> Value
toJSON CodeCommitCodeDestination' {Text
name :: Text
$sel:name:CodeCommitCodeDestination' :: CodeCommitCodeDestination -> 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)]
)