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