module Stratosphere.AppRunner.Service.CodeRepositoryProperty (
        module Exports, CodeRepositoryProperty(..),
        mkCodeRepositoryProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppRunner.Service.CodeConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.AppRunner.Service.SourceCodeVersionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CodeRepositoryProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-coderepository.html>
    CodeRepositoryProperty {CodeRepositoryProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-coderepository.html#cfn-apprunner-service-coderepository-codeconfiguration>
                            CodeRepositoryProperty -> Maybe CodeConfigurationProperty
codeConfiguration :: (Prelude.Maybe CodeConfigurationProperty),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-coderepository.html#cfn-apprunner-service-coderepository-repositoryurl>
                            CodeRepositoryProperty -> Value Text
repositoryUrl :: (Value Prelude.Text),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-coderepository.html#cfn-apprunner-service-coderepository-sourcecodeversion>
                            CodeRepositoryProperty -> SourceCodeVersionProperty
sourceCodeVersion :: SourceCodeVersionProperty,
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-coderepository.html#cfn-apprunner-service-coderepository-sourcedirectory>
                            CodeRepositoryProperty -> Maybe (Value Text)
sourceDirectory :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CodeRepositoryProperty -> CodeRepositoryProperty -> Bool
(CodeRepositoryProperty -> CodeRepositoryProperty -> Bool)
-> (CodeRepositoryProperty -> CodeRepositoryProperty -> Bool)
-> Eq CodeRepositoryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CodeRepositoryProperty -> CodeRepositoryProperty -> Bool
== :: CodeRepositoryProperty -> CodeRepositoryProperty -> Bool
$c/= :: CodeRepositoryProperty -> CodeRepositoryProperty -> Bool
/= :: CodeRepositoryProperty -> CodeRepositoryProperty -> Bool
Prelude.Eq, Int -> CodeRepositoryProperty -> ShowS
[CodeRepositoryProperty] -> ShowS
CodeRepositoryProperty -> String
(Int -> CodeRepositoryProperty -> ShowS)
-> (CodeRepositoryProperty -> String)
-> ([CodeRepositoryProperty] -> ShowS)
-> Show CodeRepositoryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CodeRepositoryProperty -> ShowS
showsPrec :: Int -> CodeRepositoryProperty -> ShowS
$cshow :: CodeRepositoryProperty -> String
show :: CodeRepositoryProperty -> String
$cshowList :: [CodeRepositoryProperty] -> ShowS
showList :: [CodeRepositoryProperty] -> ShowS
Prelude.Show)
mkCodeRepositoryProperty ::
  Value Prelude.Text
  -> SourceCodeVersionProperty -> CodeRepositoryProperty
mkCodeRepositoryProperty :: Value Text -> SourceCodeVersionProperty -> CodeRepositoryProperty
mkCodeRepositoryProperty Value Text
repositoryUrl SourceCodeVersionProperty
sourceCodeVersion
  = CodeRepositoryProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), repositoryUrl :: Value Text
repositoryUrl = Value Text
repositoryUrl,
       sourceCodeVersion :: SourceCodeVersionProperty
sourceCodeVersion = SourceCodeVersionProperty
sourceCodeVersion,
       codeConfiguration :: Maybe CodeConfigurationProperty
codeConfiguration = Maybe CodeConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       sourceDirectory :: Maybe (Value Text)
sourceDirectory = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CodeRepositoryProperty where
  toResourceProperties :: CodeRepositoryProperty -> ResourceProperties
toResourceProperties CodeRepositoryProperty {Maybe (Value Text)
Maybe CodeConfigurationProperty
()
Value Text
SourceCodeVersionProperty
haddock_workaround_ :: CodeRepositoryProperty -> ()
codeConfiguration :: CodeRepositoryProperty -> Maybe CodeConfigurationProperty
repositoryUrl :: CodeRepositoryProperty -> Value Text
sourceCodeVersion :: CodeRepositoryProperty -> SourceCodeVersionProperty
sourceDirectory :: CodeRepositoryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
codeConfiguration :: Maybe CodeConfigurationProperty
repositoryUrl :: Value Text
sourceCodeVersion :: SourceCodeVersionProperty
sourceDirectory :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppRunner::Service.CodeRepository",
         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
"RepositoryUrl" 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
repositoryUrl,
                            Key
"SourceCodeVersion" Key -> SourceCodeVersionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= SourceCodeVersionProperty
sourceCodeVersion]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> CodeConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CodeConfiguration" (CodeConfigurationProperty -> (Key, Value))
-> Maybe CodeConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CodeConfigurationProperty
codeConfiguration,
                               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
"SourceDirectory" (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)
sourceDirectory]))}
instance JSON.ToJSON CodeRepositoryProperty where
  toJSON :: CodeRepositoryProperty -> Value
toJSON CodeRepositoryProperty {Maybe (Value Text)
Maybe CodeConfigurationProperty
()
Value Text
SourceCodeVersionProperty
haddock_workaround_ :: CodeRepositoryProperty -> ()
codeConfiguration :: CodeRepositoryProperty -> Maybe CodeConfigurationProperty
repositoryUrl :: CodeRepositoryProperty -> Value Text
sourceCodeVersion :: CodeRepositoryProperty -> SourceCodeVersionProperty
sourceDirectory :: CodeRepositoryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
codeConfiguration :: Maybe CodeConfigurationProperty
repositoryUrl :: Value Text
sourceCodeVersion :: SourceCodeVersionProperty
sourceDirectory :: 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
"RepositoryUrl" 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
repositoryUrl,
               Key
"SourceCodeVersion" Key -> SourceCodeVersionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= SourceCodeVersionProperty
sourceCodeVersion]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> CodeConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CodeConfiguration" (CodeConfigurationProperty -> (Key, Value))
-> Maybe CodeConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CodeConfigurationProperty
codeConfiguration,
                  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
"SourceDirectory" (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)
sourceDirectory])))
instance Property "CodeConfiguration" CodeRepositoryProperty where
  type PropertyType "CodeConfiguration" CodeRepositoryProperty = CodeConfigurationProperty
  set :: PropertyType "CodeConfiguration" CodeRepositoryProperty
-> CodeRepositoryProperty -> CodeRepositoryProperty
set PropertyType "CodeConfiguration" CodeRepositoryProperty
newValue CodeRepositoryProperty {Maybe (Value Text)
Maybe CodeConfigurationProperty
()
Value Text
SourceCodeVersionProperty
haddock_workaround_ :: CodeRepositoryProperty -> ()
codeConfiguration :: CodeRepositoryProperty -> Maybe CodeConfigurationProperty
repositoryUrl :: CodeRepositoryProperty -> Value Text
sourceCodeVersion :: CodeRepositoryProperty -> SourceCodeVersionProperty
sourceDirectory :: CodeRepositoryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
codeConfiguration :: Maybe CodeConfigurationProperty
repositoryUrl :: Value Text
sourceCodeVersion :: SourceCodeVersionProperty
sourceDirectory :: Maybe (Value Text)
..}
    = CodeRepositoryProperty
        {codeConfiguration :: Maybe CodeConfigurationProperty
codeConfiguration = CodeConfigurationProperty -> Maybe CodeConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CodeConfiguration" CodeRepositoryProperty
CodeConfigurationProperty
newValue, Maybe (Value Text)
()
Value Text
SourceCodeVersionProperty
haddock_workaround_ :: ()
repositoryUrl :: Value Text
sourceCodeVersion :: SourceCodeVersionProperty
sourceDirectory :: Maybe (Value Text)
haddock_workaround_ :: ()
repositoryUrl :: Value Text
sourceCodeVersion :: SourceCodeVersionProperty
sourceDirectory :: Maybe (Value Text)
..}
instance Property "RepositoryUrl" CodeRepositoryProperty where
  type PropertyType "RepositoryUrl" CodeRepositoryProperty = Value Prelude.Text
  set :: PropertyType "RepositoryUrl" CodeRepositoryProperty
-> CodeRepositoryProperty -> CodeRepositoryProperty
set PropertyType "RepositoryUrl" CodeRepositoryProperty
newValue CodeRepositoryProperty {Maybe (Value Text)
Maybe CodeConfigurationProperty
()
Value Text
SourceCodeVersionProperty
haddock_workaround_ :: CodeRepositoryProperty -> ()
codeConfiguration :: CodeRepositoryProperty -> Maybe CodeConfigurationProperty
repositoryUrl :: CodeRepositoryProperty -> Value Text
sourceCodeVersion :: CodeRepositoryProperty -> SourceCodeVersionProperty
sourceDirectory :: CodeRepositoryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
codeConfiguration :: Maybe CodeConfigurationProperty
repositoryUrl :: Value Text
sourceCodeVersion :: SourceCodeVersionProperty
sourceDirectory :: Maybe (Value Text)
..}
    = CodeRepositoryProperty {repositoryUrl :: Value Text
repositoryUrl = PropertyType "RepositoryUrl" CodeRepositoryProperty
Value Text
newValue, Maybe (Value Text)
Maybe CodeConfigurationProperty
()
SourceCodeVersionProperty
haddock_workaround_ :: ()
codeConfiguration :: Maybe CodeConfigurationProperty
sourceCodeVersion :: SourceCodeVersionProperty
sourceDirectory :: Maybe (Value Text)
haddock_workaround_ :: ()
codeConfiguration :: Maybe CodeConfigurationProperty
sourceCodeVersion :: SourceCodeVersionProperty
sourceDirectory :: Maybe (Value Text)
..}
instance Property "SourceCodeVersion" CodeRepositoryProperty where
  type PropertyType "SourceCodeVersion" CodeRepositoryProperty = SourceCodeVersionProperty
  set :: PropertyType "SourceCodeVersion" CodeRepositoryProperty
-> CodeRepositoryProperty -> CodeRepositoryProperty
set PropertyType "SourceCodeVersion" CodeRepositoryProperty
newValue CodeRepositoryProperty {Maybe (Value Text)
Maybe CodeConfigurationProperty
()
Value Text
SourceCodeVersionProperty
haddock_workaround_ :: CodeRepositoryProperty -> ()
codeConfiguration :: CodeRepositoryProperty -> Maybe CodeConfigurationProperty
repositoryUrl :: CodeRepositoryProperty -> Value Text
sourceCodeVersion :: CodeRepositoryProperty -> SourceCodeVersionProperty
sourceDirectory :: CodeRepositoryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
codeConfiguration :: Maybe CodeConfigurationProperty
repositoryUrl :: Value Text
sourceCodeVersion :: SourceCodeVersionProperty
sourceDirectory :: Maybe (Value Text)
..}
    = CodeRepositoryProperty {sourceCodeVersion :: SourceCodeVersionProperty
sourceCodeVersion = PropertyType "SourceCodeVersion" CodeRepositoryProperty
SourceCodeVersionProperty
newValue, Maybe (Value Text)
Maybe CodeConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
codeConfiguration :: Maybe CodeConfigurationProperty
repositoryUrl :: Value Text
sourceDirectory :: Maybe (Value Text)
haddock_workaround_ :: ()
codeConfiguration :: Maybe CodeConfigurationProperty
repositoryUrl :: Value Text
sourceDirectory :: Maybe (Value Text)
..}
instance Property "SourceDirectory" CodeRepositoryProperty where
  type PropertyType "SourceDirectory" CodeRepositoryProperty = Value Prelude.Text
  set :: PropertyType "SourceDirectory" CodeRepositoryProperty
-> CodeRepositoryProperty -> CodeRepositoryProperty
set PropertyType "SourceDirectory" CodeRepositoryProperty
newValue CodeRepositoryProperty {Maybe (Value Text)
Maybe CodeConfigurationProperty
()
Value Text
SourceCodeVersionProperty
haddock_workaround_ :: CodeRepositoryProperty -> ()
codeConfiguration :: CodeRepositoryProperty -> Maybe CodeConfigurationProperty
repositoryUrl :: CodeRepositoryProperty -> Value Text
sourceCodeVersion :: CodeRepositoryProperty -> SourceCodeVersionProperty
sourceDirectory :: CodeRepositoryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
codeConfiguration :: Maybe CodeConfigurationProperty
repositoryUrl :: Value Text
sourceCodeVersion :: SourceCodeVersionProperty
sourceDirectory :: Maybe (Value Text)
..}
    = CodeRepositoryProperty
        {sourceDirectory :: Maybe (Value Text)
sourceDirectory = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SourceDirectory" CodeRepositoryProperty
Value Text
newValue, Maybe CodeConfigurationProperty
()
Value Text
SourceCodeVersionProperty
haddock_workaround_ :: ()
codeConfiguration :: Maybe CodeConfigurationProperty
repositoryUrl :: Value Text
sourceCodeVersion :: SourceCodeVersionProperty
haddock_workaround_ :: ()
codeConfiguration :: Maybe CodeConfigurationProperty
repositoryUrl :: Value Text
sourceCodeVersion :: SourceCodeVersionProperty
..}