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