{-# 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.ServiceCatalog.Types.CodeStarParameters 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 CodeStarParameters = CodeStarParameters'
{
CodeStarParameters -> Text
connectionArn :: Prelude.Text,
CodeStarParameters -> Text
repository :: Prelude.Text,
CodeStarParameters -> Text
branch :: Prelude.Text,
CodeStarParameters -> Text
artifactPath :: Prelude.Text
}
deriving (CodeStarParameters -> CodeStarParameters -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CodeStarParameters -> CodeStarParameters -> Bool
$c/= :: CodeStarParameters -> CodeStarParameters -> Bool
== :: CodeStarParameters -> CodeStarParameters -> Bool
$c== :: CodeStarParameters -> CodeStarParameters -> Bool
Prelude.Eq, ReadPrec [CodeStarParameters]
ReadPrec CodeStarParameters
Int -> ReadS CodeStarParameters
ReadS [CodeStarParameters]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CodeStarParameters]
$creadListPrec :: ReadPrec [CodeStarParameters]
readPrec :: ReadPrec CodeStarParameters
$creadPrec :: ReadPrec CodeStarParameters
readList :: ReadS [CodeStarParameters]
$creadList :: ReadS [CodeStarParameters]
readsPrec :: Int -> ReadS CodeStarParameters
$creadsPrec :: Int -> ReadS CodeStarParameters
Prelude.Read, Int -> CodeStarParameters -> ShowS
[CodeStarParameters] -> ShowS
CodeStarParameters -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CodeStarParameters] -> ShowS
$cshowList :: [CodeStarParameters] -> ShowS
show :: CodeStarParameters -> String
$cshow :: CodeStarParameters -> String
showsPrec :: Int -> CodeStarParameters -> ShowS
$cshowsPrec :: Int -> CodeStarParameters -> ShowS
Prelude.Show, forall x. Rep CodeStarParameters x -> CodeStarParameters
forall x. CodeStarParameters -> Rep CodeStarParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CodeStarParameters x -> CodeStarParameters
$cfrom :: forall x. CodeStarParameters -> Rep CodeStarParameters x
Prelude.Generic)
newCodeStarParameters ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CodeStarParameters
newCodeStarParameters :: Text -> Text -> Text -> Text -> CodeStarParameters
newCodeStarParameters
Text
pConnectionArn_
Text
pRepository_
Text
pBranch_
Text
pArtifactPath_ =
CodeStarParameters'
{ $sel:connectionArn:CodeStarParameters' :: Text
connectionArn =
Text
pConnectionArn_,
$sel:repository:CodeStarParameters' :: Text
repository = Text
pRepository_,
$sel:branch:CodeStarParameters' :: Text
branch = Text
pBranch_,
$sel:artifactPath:CodeStarParameters' :: Text
artifactPath = Text
pArtifactPath_
}
codeStarParameters_connectionArn :: Lens.Lens' CodeStarParameters Prelude.Text
codeStarParameters_connectionArn :: Lens' CodeStarParameters Text
codeStarParameters_connectionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeStarParameters' {Text
connectionArn :: Text
$sel:connectionArn:CodeStarParameters' :: CodeStarParameters -> Text
connectionArn} -> Text
connectionArn) (\s :: CodeStarParameters
s@CodeStarParameters' {} Text
a -> CodeStarParameters
s {$sel:connectionArn:CodeStarParameters' :: Text
connectionArn = Text
a} :: CodeStarParameters)
codeStarParameters_repository :: Lens.Lens' CodeStarParameters Prelude.Text
codeStarParameters_repository :: Lens' CodeStarParameters Text
codeStarParameters_repository = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeStarParameters' {Text
repository :: Text
$sel:repository:CodeStarParameters' :: CodeStarParameters -> Text
repository} -> Text
repository) (\s :: CodeStarParameters
s@CodeStarParameters' {} Text
a -> CodeStarParameters
s {$sel:repository:CodeStarParameters' :: Text
repository = Text
a} :: CodeStarParameters)
codeStarParameters_branch :: Lens.Lens' CodeStarParameters Prelude.Text
codeStarParameters_branch :: Lens' CodeStarParameters Text
codeStarParameters_branch = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeStarParameters' {Text
branch :: Text
$sel:branch:CodeStarParameters' :: CodeStarParameters -> Text
branch} -> Text
branch) (\s :: CodeStarParameters
s@CodeStarParameters' {} Text
a -> CodeStarParameters
s {$sel:branch:CodeStarParameters' :: Text
branch = Text
a} :: CodeStarParameters)
codeStarParameters_artifactPath :: Lens.Lens' CodeStarParameters Prelude.Text
codeStarParameters_artifactPath :: Lens' CodeStarParameters Text
codeStarParameters_artifactPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CodeStarParameters' {Text
artifactPath :: Text
$sel:artifactPath:CodeStarParameters' :: CodeStarParameters -> Text
artifactPath} -> Text
artifactPath) (\s :: CodeStarParameters
s@CodeStarParameters' {} Text
a -> CodeStarParameters
s {$sel:artifactPath:CodeStarParameters' :: Text
artifactPath = Text
a} :: CodeStarParameters)
instance Data.FromJSON CodeStarParameters where
parseJSON :: Value -> Parser CodeStarParameters
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CodeStarParameters"
( \Object
x ->
Text -> Text -> Text -> Text -> CodeStarParameters
CodeStarParameters'
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
"ConnectionArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Repository")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Branch")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ArtifactPath")
)
instance Prelude.Hashable CodeStarParameters where
hashWithSalt :: Int -> CodeStarParameters -> Int
hashWithSalt Int
_salt CodeStarParameters' {Text
artifactPath :: Text
branch :: Text
repository :: Text
connectionArn :: Text
$sel:artifactPath:CodeStarParameters' :: CodeStarParameters -> Text
$sel:branch:CodeStarParameters' :: CodeStarParameters -> Text
$sel:repository:CodeStarParameters' :: CodeStarParameters -> Text
$sel:connectionArn:CodeStarParameters' :: CodeStarParameters -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
connectionArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
repository
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
branch
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
artifactPath
instance Prelude.NFData CodeStarParameters where
rnf :: CodeStarParameters -> ()
rnf CodeStarParameters' {Text
artifactPath :: Text
branch :: Text
repository :: Text
connectionArn :: Text
$sel:artifactPath:CodeStarParameters' :: CodeStarParameters -> Text
$sel:branch:CodeStarParameters' :: CodeStarParameters -> Text
$sel:repository:CodeStarParameters' :: CodeStarParameters -> Text
$sel:connectionArn:CodeStarParameters' :: CodeStarParameters -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
connectionArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
repository
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
branch
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
artifactPath
instance Data.ToJSON CodeStarParameters where
toJSON :: CodeStarParameters -> Value
toJSON CodeStarParameters' {Text
artifactPath :: Text
branch :: Text
repository :: Text
connectionArn :: Text
$sel:artifactPath:CodeStarParameters' :: CodeStarParameters -> Text
$sel:branch:CodeStarParameters' :: CodeStarParameters -> Text
$sel:repository:CodeStarParameters' :: CodeStarParameters -> Text
$sel:connectionArn:CodeStarParameters' :: CodeStarParameters -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"ConnectionArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
connectionArn),
forall a. a -> Maybe a
Prelude.Just (Key
"Repository" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
repository),
forall a. a -> Maybe a
Prelude.Just (Key
"Branch" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
branch),
forall a. a -> Maybe a
Prelude.Just (Key
"ArtifactPath" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
artifactPath)
]
)