module Stratosphere.CodeBuild.Project.ProjectSourceVersionProperty (
ProjectSourceVersionProperty(..), mkProjectSourceVersionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ProjectSourceVersionProperty
=
ProjectSourceVersionProperty {ProjectSourceVersionProperty -> ()
haddock_workaround_ :: (),
ProjectSourceVersionProperty -> Value Text
sourceIdentifier :: (Value Prelude.Text),
ProjectSourceVersionProperty -> Maybe (Value Text)
sourceVersion :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (ProjectSourceVersionProperty
-> ProjectSourceVersionProperty -> Bool
(ProjectSourceVersionProperty
-> ProjectSourceVersionProperty -> Bool)
-> (ProjectSourceVersionProperty
-> ProjectSourceVersionProperty -> Bool)
-> Eq ProjectSourceVersionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ProjectSourceVersionProperty
-> ProjectSourceVersionProperty -> Bool
== :: ProjectSourceVersionProperty
-> ProjectSourceVersionProperty -> Bool
$c/= :: ProjectSourceVersionProperty
-> ProjectSourceVersionProperty -> Bool
/= :: ProjectSourceVersionProperty
-> ProjectSourceVersionProperty -> Bool
Prelude.Eq, Int -> ProjectSourceVersionProperty -> ShowS
[ProjectSourceVersionProperty] -> ShowS
ProjectSourceVersionProperty -> String
(Int -> ProjectSourceVersionProperty -> ShowS)
-> (ProjectSourceVersionProperty -> String)
-> ([ProjectSourceVersionProperty] -> ShowS)
-> Show ProjectSourceVersionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ProjectSourceVersionProperty -> ShowS
showsPrec :: Int -> ProjectSourceVersionProperty -> ShowS
$cshow :: ProjectSourceVersionProperty -> String
show :: ProjectSourceVersionProperty -> String
$cshowList :: [ProjectSourceVersionProperty] -> ShowS
showList :: [ProjectSourceVersionProperty] -> ShowS
Prelude.Show)
mkProjectSourceVersionProperty ::
Value Prelude.Text -> ProjectSourceVersionProperty
mkProjectSourceVersionProperty :: Value Text -> ProjectSourceVersionProperty
mkProjectSourceVersionProperty Value Text
sourceIdentifier
= ProjectSourceVersionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), sourceIdentifier :: Value Text
sourceIdentifier = Value Text
sourceIdentifier,
sourceVersion :: Maybe (Value Text)
sourceVersion = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ProjectSourceVersionProperty where
toResourceProperties :: ProjectSourceVersionProperty -> ResourceProperties
toResourceProperties ProjectSourceVersionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ProjectSourceVersionProperty -> ()
sourceIdentifier :: ProjectSourceVersionProperty -> Value Text
sourceVersion :: ProjectSourceVersionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sourceIdentifier :: Value Text
sourceVersion :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CodeBuild::Project.ProjectSourceVersion",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"SourceIdentifier" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
sourceIdentifier]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourceVersion" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
sourceVersion]))}
instance JSON.ToJSON ProjectSourceVersionProperty where
toJSON :: ProjectSourceVersionProperty -> Value
toJSON ProjectSourceVersionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ProjectSourceVersionProperty -> ()
sourceIdentifier :: ProjectSourceVersionProperty -> Value Text
sourceVersion :: ProjectSourceVersionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sourceIdentifier :: Value Text
sourceVersion :: Maybe (Value Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"SourceIdentifier" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
sourceIdentifier]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SourceVersion" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
sourceVersion])))
instance Property "SourceIdentifier" ProjectSourceVersionProperty where
type PropertyType "SourceIdentifier" ProjectSourceVersionProperty = Value Prelude.Text
set :: PropertyType "SourceIdentifier" ProjectSourceVersionProperty
-> ProjectSourceVersionProperty -> ProjectSourceVersionProperty
set PropertyType "SourceIdentifier" ProjectSourceVersionProperty
newValue ProjectSourceVersionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ProjectSourceVersionProperty -> ()
sourceIdentifier :: ProjectSourceVersionProperty -> Value Text
sourceVersion :: ProjectSourceVersionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sourceIdentifier :: Value Text
sourceVersion :: Maybe (Value Text)
..}
= ProjectSourceVersionProperty {sourceIdentifier :: Value Text
sourceIdentifier = PropertyType "SourceIdentifier" ProjectSourceVersionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
sourceVersion :: Maybe (Value Text)
haddock_workaround_ :: ()
sourceVersion :: Maybe (Value Text)
..}
instance Property "SourceVersion" ProjectSourceVersionProperty where
type PropertyType "SourceVersion" ProjectSourceVersionProperty = Value Prelude.Text
set :: PropertyType "SourceVersion" ProjectSourceVersionProperty
-> ProjectSourceVersionProperty -> ProjectSourceVersionProperty
set PropertyType "SourceVersion" ProjectSourceVersionProperty
newValue ProjectSourceVersionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ProjectSourceVersionProperty -> ()
sourceIdentifier :: ProjectSourceVersionProperty -> Value Text
sourceVersion :: ProjectSourceVersionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
sourceIdentifier :: Value Text
sourceVersion :: Maybe (Value Text)
..}
= ProjectSourceVersionProperty
{sourceVersion :: Maybe (Value Text)
sourceVersion = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourceVersion" ProjectSourceVersionProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
sourceIdentifier :: Value Text
haddock_workaround_ :: ()
sourceIdentifier :: Value Text
..}