module Stratosphere.SageMaker.CodeRepository.GitConfigProperty (
        GitConfigProperty(..), mkGitConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GitConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-coderepository-gitconfig.html>
    GitConfigProperty {GitConfigProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-coderepository-gitconfig.html#cfn-sagemaker-coderepository-gitconfig-branch>
                       GitConfigProperty -> Maybe (Value Text)
branch :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-coderepository-gitconfig.html#cfn-sagemaker-coderepository-gitconfig-repositoryurl>
                       GitConfigProperty -> Value Text
repositoryUrl :: (Value Prelude.Text),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-coderepository-gitconfig.html#cfn-sagemaker-coderepository-gitconfig-secretarn>
                       GitConfigProperty -> Maybe (Value Text)
secretArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (GitConfigProperty -> GitConfigProperty -> Bool
(GitConfigProperty -> GitConfigProperty -> Bool)
-> (GitConfigProperty -> GitConfigProperty -> Bool)
-> Eq GitConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GitConfigProperty -> GitConfigProperty -> Bool
== :: GitConfigProperty -> GitConfigProperty -> Bool
$c/= :: GitConfigProperty -> GitConfigProperty -> Bool
/= :: GitConfigProperty -> GitConfigProperty -> Bool
Prelude.Eq, Int -> GitConfigProperty -> ShowS
[GitConfigProperty] -> ShowS
GitConfigProperty -> String
(Int -> GitConfigProperty -> ShowS)
-> (GitConfigProperty -> String)
-> ([GitConfigProperty] -> ShowS)
-> Show GitConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GitConfigProperty -> ShowS
showsPrec :: Int -> GitConfigProperty -> ShowS
$cshow :: GitConfigProperty -> String
show :: GitConfigProperty -> String
$cshowList :: [GitConfigProperty] -> ShowS
showList :: [GitConfigProperty] -> ShowS
Prelude.Show)
mkGitConfigProperty :: Value Prelude.Text -> GitConfigProperty
mkGitConfigProperty :: Value Text -> GitConfigProperty
mkGitConfigProperty Value Text
repositoryUrl
  = GitConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), repositoryUrl :: Value Text
repositoryUrl = Value Text
repositoryUrl,
       branch :: Maybe (Value Text)
branch = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, secretArn :: Maybe (Value Text)
secretArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GitConfigProperty where
  toResourceProperties :: GitConfigProperty -> ResourceProperties
toResourceProperties GitConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GitConfigProperty -> ()
branch :: GitConfigProperty -> Maybe (Value Text)
repositoryUrl :: GitConfigProperty -> Value Text
secretArn :: GitConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
branch :: Maybe (Value Text)
repositoryUrl :: Value Text
secretArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::CodeRepository.GitConfig",
         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]
                           ([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
"Branch" (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)
branch,
                               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
"SecretArn" (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)
secretArn]))}
instance JSON.ToJSON GitConfigProperty where
  toJSON :: GitConfigProperty -> Value
toJSON GitConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GitConfigProperty -> ()
branch :: GitConfigProperty -> Maybe (Value Text)
repositoryUrl :: GitConfigProperty -> Value Text
secretArn :: GitConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
branch :: Maybe (Value Text)
repositoryUrl :: Value Text
secretArn :: 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]
              ([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
"Branch" (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)
branch,
                  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
"SecretArn" (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)
secretArn])))
instance Property "Branch" GitConfigProperty where
  type PropertyType "Branch" GitConfigProperty = Value Prelude.Text
  set :: PropertyType "Branch" GitConfigProperty
-> GitConfigProperty -> GitConfigProperty
set PropertyType "Branch" GitConfigProperty
newValue GitConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GitConfigProperty -> ()
branch :: GitConfigProperty -> Maybe (Value Text)
repositoryUrl :: GitConfigProperty -> Value Text
secretArn :: GitConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
branch :: Maybe (Value Text)
repositoryUrl :: Value Text
secretArn :: Maybe (Value Text)
..}
    = GitConfigProperty {branch :: Maybe (Value Text)
branch = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Branch" GitConfigProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
repositoryUrl :: Value Text
secretArn :: Maybe (Value Text)
haddock_workaround_ :: ()
repositoryUrl :: Value Text
secretArn :: Maybe (Value Text)
..}
instance Property "RepositoryUrl" GitConfigProperty where
  type PropertyType "RepositoryUrl" GitConfigProperty = Value Prelude.Text
  set :: PropertyType "RepositoryUrl" GitConfigProperty
-> GitConfigProperty -> GitConfigProperty
set PropertyType "RepositoryUrl" GitConfigProperty
newValue GitConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GitConfigProperty -> ()
branch :: GitConfigProperty -> Maybe (Value Text)
repositoryUrl :: GitConfigProperty -> Value Text
secretArn :: GitConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
branch :: Maybe (Value Text)
repositoryUrl :: Value Text
secretArn :: Maybe (Value Text)
..}
    = GitConfigProperty {repositoryUrl :: Value Text
repositoryUrl = PropertyType "RepositoryUrl" GitConfigProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
branch :: Maybe (Value Text)
secretArn :: Maybe (Value Text)
haddock_workaround_ :: ()
branch :: Maybe (Value Text)
secretArn :: Maybe (Value Text)
..}
instance Property "SecretArn" GitConfigProperty where
  type PropertyType "SecretArn" GitConfigProperty = Value Prelude.Text
  set :: PropertyType "SecretArn" GitConfigProperty
-> GitConfigProperty -> GitConfigProperty
set PropertyType "SecretArn" GitConfigProperty
newValue GitConfigProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GitConfigProperty -> ()
branch :: GitConfigProperty -> Maybe (Value Text)
repositoryUrl :: GitConfigProperty -> Value Text
secretArn :: GitConfigProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
branch :: Maybe (Value Text)
repositoryUrl :: Value Text
secretArn :: Maybe (Value Text)
..}
    = GitConfigProperty {secretArn :: Maybe (Value Text)
secretArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SecretArn" GitConfigProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
branch :: Maybe (Value Text)
repositoryUrl :: Value Text
haddock_workaround_ :: ()
branch :: Maybe (Value Text)
repositoryUrl :: Value Text
..}