module Stratosphere.CodeCommit.Repository.CodeProperty (
module Exports, CodeProperty(..), mkCodeProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.CodeCommit.Repository.S3Property as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CodeProperty
=
CodeProperty {CodeProperty -> ()
haddock_workaround_ :: (),
CodeProperty -> Maybe (Value Text)
branchName :: (Prelude.Maybe (Value Prelude.Text)),
CodeProperty -> S3Property
s3 :: S3Property}
deriving stock (CodeProperty -> CodeProperty -> Bool
(CodeProperty -> CodeProperty -> Bool)
-> (CodeProperty -> CodeProperty -> Bool) -> Eq CodeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CodeProperty -> CodeProperty -> Bool
== :: CodeProperty -> CodeProperty -> Bool
$c/= :: CodeProperty -> CodeProperty -> Bool
/= :: CodeProperty -> CodeProperty -> Bool
Prelude.Eq, Int -> CodeProperty -> ShowS
[CodeProperty] -> ShowS
CodeProperty -> String
(Int -> CodeProperty -> ShowS)
-> (CodeProperty -> String)
-> ([CodeProperty] -> ShowS)
-> Show CodeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CodeProperty -> ShowS
showsPrec :: Int -> CodeProperty -> ShowS
$cshow :: CodeProperty -> String
show :: CodeProperty -> String
$cshowList :: [CodeProperty] -> ShowS
showList :: [CodeProperty] -> ShowS
Prelude.Show)
mkCodeProperty :: S3Property -> CodeProperty
mkCodeProperty :: S3Property -> CodeProperty
mkCodeProperty S3Property
s3
= CodeProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), s3 :: S3Property
s3 = S3Property
s3, branchName :: Maybe (Value Text)
branchName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CodeProperty where
toResourceProperties :: CodeProperty -> ResourceProperties
toResourceProperties CodeProperty {Maybe (Value Text)
()
S3Property
haddock_workaround_ :: CodeProperty -> ()
branchName :: CodeProperty -> Maybe (Value Text)
s3 :: CodeProperty -> S3Property
haddock_workaround_ :: ()
branchName :: Maybe (Value Text)
s3 :: S3Property
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CodeCommit::Repository.Code",
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
"S3" Key -> S3Property -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= S3Property
s3]
([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
"BranchName" (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)
branchName]))}
instance JSON.ToJSON CodeProperty where
toJSON :: CodeProperty -> Value
toJSON CodeProperty {Maybe (Value Text)
()
S3Property
haddock_workaround_ :: CodeProperty -> ()
branchName :: CodeProperty -> Maybe (Value Text)
s3 :: CodeProperty -> S3Property
haddock_workaround_ :: ()
branchName :: Maybe (Value Text)
s3 :: S3Property
..}
= [(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
"S3" Key -> S3Property -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= S3Property
s3]
([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
"BranchName" (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)
branchName])))
instance Property "BranchName" CodeProperty where
type PropertyType "BranchName" CodeProperty = Value Prelude.Text
set :: PropertyType "BranchName" CodeProperty
-> CodeProperty -> CodeProperty
set PropertyType "BranchName" CodeProperty
newValue CodeProperty {Maybe (Value Text)
()
S3Property
haddock_workaround_ :: CodeProperty -> ()
branchName :: CodeProperty -> Maybe (Value Text)
s3 :: CodeProperty -> S3Property
haddock_workaround_ :: ()
branchName :: Maybe (Value Text)
s3 :: S3Property
..}
= CodeProperty {branchName :: Maybe (Value Text)
branchName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BranchName" CodeProperty
Value Text
newValue, ()
S3Property
haddock_workaround_ :: ()
s3 :: S3Property
haddock_workaround_ :: ()
s3 :: S3Property
..}
instance Property "S3" CodeProperty where
type PropertyType "S3" CodeProperty = S3Property
set :: PropertyType "S3" CodeProperty -> CodeProperty -> CodeProperty
set PropertyType "S3" CodeProperty
newValue CodeProperty {Maybe (Value Text)
()
S3Property
haddock_workaround_ :: CodeProperty -> ()
branchName :: CodeProperty -> Maybe (Value Text)
s3 :: CodeProperty -> S3Property
haddock_workaround_ :: ()
branchName :: Maybe (Value Text)
s3 :: S3Property
..} = CodeProperty {s3 :: S3Property
s3 = PropertyType "S3" CodeProperty
S3Property
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
branchName :: Maybe (Value Text)
haddock_workaround_ :: ()
branchName :: Maybe (Value Text)
..}