module Stratosphere.SageMaker.CodeRepository (
        module Exports, CodeRepository(..), mkCodeRepository
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SageMaker.CodeRepository.GitConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data CodeRepository
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-coderepository.html>
    CodeRepository {CodeRepository -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-coderepository.html#cfn-sagemaker-coderepository-coderepositoryname>
                    CodeRepository -> Maybe (Value Text)
codeRepositoryName :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-coderepository.html#cfn-sagemaker-coderepository-gitconfig>
                    CodeRepository -> GitConfigProperty
gitConfig :: GitConfigProperty,
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-coderepository.html#cfn-sagemaker-coderepository-tags>
                    CodeRepository -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (CodeRepository -> CodeRepository -> Bool
(CodeRepository -> CodeRepository -> Bool)
-> (CodeRepository -> CodeRepository -> Bool) -> Eq CodeRepository
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CodeRepository -> CodeRepository -> Bool
== :: CodeRepository -> CodeRepository -> Bool
$c/= :: CodeRepository -> CodeRepository -> Bool
/= :: CodeRepository -> CodeRepository -> Bool
Prelude.Eq, Int -> CodeRepository -> ShowS
[CodeRepository] -> ShowS
CodeRepository -> String
(Int -> CodeRepository -> ShowS)
-> (CodeRepository -> String)
-> ([CodeRepository] -> ShowS)
-> Show CodeRepository
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CodeRepository -> ShowS
showsPrec :: Int -> CodeRepository -> ShowS
$cshow :: CodeRepository -> String
show :: CodeRepository -> String
$cshowList :: [CodeRepository] -> ShowS
showList :: [CodeRepository] -> ShowS
Prelude.Show)
mkCodeRepository :: GitConfigProperty -> CodeRepository
mkCodeRepository :: GitConfigProperty -> CodeRepository
mkCodeRepository GitConfigProperty
gitConfig
  = CodeRepository
      {haddock_workaround_ :: ()
haddock_workaround_ = (), gitConfig :: GitConfigProperty
gitConfig = GitConfigProperty
gitConfig,
       codeRepositoryName :: Maybe (Value Text)
codeRepositoryName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CodeRepository where
  toResourceProperties :: CodeRepository -> ResourceProperties
toResourceProperties CodeRepository {Maybe [Tag]
Maybe (Value Text)
()
GitConfigProperty
haddock_workaround_ :: CodeRepository -> ()
codeRepositoryName :: CodeRepository -> Maybe (Value Text)
gitConfig :: CodeRepository -> GitConfigProperty
tags :: CodeRepository -> Maybe [Tag]
haddock_workaround_ :: ()
codeRepositoryName :: Maybe (Value Text)
gitConfig :: GitConfigProperty
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::CodeRepository",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"GitConfig" Key -> GitConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= GitConfigProperty
gitConfig]
                           ([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
"CodeRepositoryName" (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)
codeRepositoryName,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON CodeRepository where
  toJSON :: CodeRepository -> Value
toJSON CodeRepository {Maybe [Tag]
Maybe (Value Text)
()
GitConfigProperty
haddock_workaround_ :: CodeRepository -> ()
codeRepositoryName :: CodeRepository -> Maybe (Value Text)
gitConfig :: CodeRepository -> GitConfigProperty
tags :: CodeRepository -> Maybe [Tag]
haddock_workaround_ :: ()
codeRepositoryName :: Maybe (Value Text)
gitConfig :: GitConfigProperty
tags :: Maybe [Tag]
..}
    = [(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
"GitConfig" Key -> GitConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= GitConfigProperty
gitConfig]
              ([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
"CodeRepositoryName" (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)
codeRepositoryName,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "CodeRepositoryName" CodeRepository where
  type PropertyType "CodeRepositoryName" CodeRepository = Value Prelude.Text
  set :: PropertyType "CodeRepositoryName" CodeRepository
-> CodeRepository -> CodeRepository
set PropertyType "CodeRepositoryName" CodeRepository
newValue CodeRepository {Maybe [Tag]
Maybe (Value Text)
()
GitConfigProperty
haddock_workaround_ :: CodeRepository -> ()
codeRepositoryName :: CodeRepository -> Maybe (Value Text)
gitConfig :: CodeRepository -> GitConfigProperty
tags :: CodeRepository -> Maybe [Tag]
haddock_workaround_ :: ()
codeRepositoryName :: Maybe (Value Text)
gitConfig :: GitConfigProperty
tags :: Maybe [Tag]
..}
    = CodeRepository {codeRepositoryName :: Maybe (Value Text)
codeRepositoryName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CodeRepositoryName" CodeRepository
Value Text
newValue, Maybe [Tag]
()
GitConfigProperty
haddock_workaround_ :: ()
gitConfig :: GitConfigProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
gitConfig :: GitConfigProperty
tags :: Maybe [Tag]
..}
instance Property "GitConfig" CodeRepository where
  type PropertyType "GitConfig" CodeRepository = GitConfigProperty
  set :: PropertyType "GitConfig" CodeRepository
-> CodeRepository -> CodeRepository
set PropertyType "GitConfig" CodeRepository
newValue CodeRepository {Maybe [Tag]
Maybe (Value Text)
()
GitConfigProperty
haddock_workaround_ :: CodeRepository -> ()
codeRepositoryName :: CodeRepository -> Maybe (Value Text)
gitConfig :: CodeRepository -> GitConfigProperty
tags :: CodeRepository -> Maybe [Tag]
haddock_workaround_ :: ()
codeRepositoryName :: Maybe (Value Text)
gitConfig :: GitConfigProperty
tags :: Maybe [Tag]
..}
    = CodeRepository {gitConfig :: GitConfigProperty
gitConfig = PropertyType "GitConfig" CodeRepository
GitConfigProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
codeRepositoryName :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
codeRepositoryName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" CodeRepository where
  type PropertyType "Tags" CodeRepository = [Tag]
  set :: PropertyType "Tags" CodeRepository
-> CodeRepository -> CodeRepository
set PropertyType "Tags" CodeRepository
newValue CodeRepository {Maybe [Tag]
Maybe (Value Text)
()
GitConfigProperty
haddock_workaround_ :: CodeRepository -> ()
codeRepositoryName :: CodeRepository -> Maybe (Value Text)
gitConfig :: CodeRepository -> GitConfigProperty
tags :: CodeRepository -> Maybe [Tag]
haddock_workaround_ :: ()
codeRepositoryName :: Maybe (Value Text)
gitConfig :: GitConfigProperty
tags :: Maybe [Tag]
..}
    = CodeRepository {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" CodeRepository
newValue, Maybe (Value Text)
()
GitConfigProperty
haddock_workaround_ :: ()
codeRepositoryName :: Maybe (Value Text)
gitConfig :: GitConfigProperty
haddock_workaround_ :: ()
codeRepositoryName :: Maybe (Value Text)
gitConfig :: GitConfigProperty
..}