{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Proton.Types.TemplateSyncConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Proton.Types.RepositoryProvider
import Amazonka.Proton.Types.TemplateType
data TemplateSyncConfig = TemplateSyncConfig'
{
TemplateSyncConfig -> Maybe Text
subdirectory :: Prelude.Maybe Prelude.Text,
TemplateSyncConfig -> Text
branch :: Prelude.Text,
TemplateSyncConfig -> Text
repositoryName :: Prelude.Text,
TemplateSyncConfig -> RepositoryProvider
repositoryProvider :: RepositoryProvider,
TemplateSyncConfig -> Text
templateName :: Prelude.Text,
TemplateSyncConfig -> TemplateType
templateType :: TemplateType
}
deriving (TemplateSyncConfig -> TemplateSyncConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TemplateSyncConfig -> TemplateSyncConfig -> Bool
$c/= :: TemplateSyncConfig -> TemplateSyncConfig -> Bool
== :: TemplateSyncConfig -> TemplateSyncConfig -> Bool
$c== :: TemplateSyncConfig -> TemplateSyncConfig -> Bool
Prelude.Eq, ReadPrec [TemplateSyncConfig]
ReadPrec TemplateSyncConfig
Int -> ReadS TemplateSyncConfig
ReadS [TemplateSyncConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TemplateSyncConfig]
$creadListPrec :: ReadPrec [TemplateSyncConfig]
readPrec :: ReadPrec TemplateSyncConfig
$creadPrec :: ReadPrec TemplateSyncConfig
readList :: ReadS [TemplateSyncConfig]
$creadList :: ReadS [TemplateSyncConfig]
readsPrec :: Int -> ReadS TemplateSyncConfig
$creadsPrec :: Int -> ReadS TemplateSyncConfig
Prelude.Read, Int -> TemplateSyncConfig -> ShowS
[TemplateSyncConfig] -> ShowS
TemplateSyncConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TemplateSyncConfig] -> ShowS
$cshowList :: [TemplateSyncConfig] -> ShowS
show :: TemplateSyncConfig -> String
$cshow :: TemplateSyncConfig -> String
showsPrec :: Int -> TemplateSyncConfig -> ShowS
$cshowsPrec :: Int -> TemplateSyncConfig -> ShowS
Prelude.Show, forall x. Rep TemplateSyncConfig x -> TemplateSyncConfig
forall x. TemplateSyncConfig -> Rep TemplateSyncConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TemplateSyncConfig x -> TemplateSyncConfig
$cfrom :: forall x. TemplateSyncConfig -> Rep TemplateSyncConfig x
Prelude.Generic)
newTemplateSyncConfig ::
Prelude.Text ->
Prelude.Text ->
RepositoryProvider ->
Prelude.Text ->
TemplateType ->
TemplateSyncConfig
newTemplateSyncConfig :: Text
-> Text
-> RepositoryProvider
-> Text
-> TemplateType
-> TemplateSyncConfig
newTemplateSyncConfig
Text
pBranch_
Text
pRepositoryName_
RepositoryProvider
pRepositoryProvider_
Text
pTemplateName_
TemplateType
pTemplateType_ =
TemplateSyncConfig'
{ $sel:subdirectory:TemplateSyncConfig' :: Maybe Text
subdirectory = forall a. Maybe a
Prelude.Nothing,
$sel:branch:TemplateSyncConfig' :: Text
branch = Text
pBranch_,
$sel:repositoryName:TemplateSyncConfig' :: Text
repositoryName = Text
pRepositoryName_,
$sel:repositoryProvider:TemplateSyncConfig' :: RepositoryProvider
repositoryProvider = RepositoryProvider
pRepositoryProvider_,
$sel:templateName:TemplateSyncConfig' :: Text
templateName = Text
pTemplateName_,
$sel:templateType:TemplateSyncConfig' :: TemplateType
templateType = TemplateType
pTemplateType_
}
templateSyncConfig_subdirectory :: Lens.Lens' TemplateSyncConfig (Prelude.Maybe Prelude.Text)
templateSyncConfig_subdirectory :: Lens' TemplateSyncConfig (Maybe Text)
templateSyncConfig_subdirectory = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateSyncConfig' {Maybe Text
subdirectory :: Maybe Text
$sel:subdirectory:TemplateSyncConfig' :: TemplateSyncConfig -> Maybe Text
subdirectory} -> Maybe Text
subdirectory) (\s :: TemplateSyncConfig
s@TemplateSyncConfig' {} Maybe Text
a -> TemplateSyncConfig
s {$sel:subdirectory:TemplateSyncConfig' :: Maybe Text
subdirectory = Maybe Text
a} :: TemplateSyncConfig)
templateSyncConfig_branch :: Lens.Lens' TemplateSyncConfig Prelude.Text
templateSyncConfig_branch :: Lens' TemplateSyncConfig Text
templateSyncConfig_branch = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateSyncConfig' {Text
branch :: Text
$sel:branch:TemplateSyncConfig' :: TemplateSyncConfig -> Text
branch} -> Text
branch) (\s :: TemplateSyncConfig
s@TemplateSyncConfig' {} Text
a -> TemplateSyncConfig
s {$sel:branch:TemplateSyncConfig' :: Text
branch = Text
a} :: TemplateSyncConfig)
templateSyncConfig_repositoryName :: Lens.Lens' TemplateSyncConfig Prelude.Text
templateSyncConfig_repositoryName :: Lens' TemplateSyncConfig Text
templateSyncConfig_repositoryName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateSyncConfig' {Text
repositoryName :: Text
$sel:repositoryName:TemplateSyncConfig' :: TemplateSyncConfig -> Text
repositoryName} -> Text
repositoryName) (\s :: TemplateSyncConfig
s@TemplateSyncConfig' {} Text
a -> TemplateSyncConfig
s {$sel:repositoryName:TemplateSyncConfig' :: Text
repositoryName = Text
a} :: TemplateSyncConfig)
templateSyncConfig_repositoryProvider :: Lens.Lens' TemplateSyncConfig RepositoryProvider
templateSyncConfig_repositoryProvider :: Lens' TemplateSyncConfig RepositoryProvider
templateSyncConfig_repositoryProvider = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateSyncConfig' {RepositoryProvider
repositoryProvider :: RepositoryProvider
$sel:repositoryProvider:TemplateSyncConfig' :: TemplateSyncConfig -> RepositoryProvider
repositoryProvider} -> RepositoryProvider
repositoryProvider) (\s :: TemplateSyncConfig
s@TemplateSyncConfig' {} RepositoryProvider
a -> TemplateSyncConfig
s {$sel:repositoryProvider:TemplateSyncConfig' :: RepositoryProvider
repositoryProvider = RepositoryProvider
a} :: TemplateSyncConfig)
templateSyncConfig_templateName :: Lens.Lens' TemplateSyncConfig Prelude.Text
templateSyncConfig_templateName :: Lens' TemplateSyncConfig Text
templateSyncConfig_templateName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateSyncConfig' {Text
templateName :: Text
$sel:templateName:TemplateSyncConfig' :: TemplateSyncConfig -> Text
templateName} -> Text
templateName) (\s :: TemplateSyncConfig
s@TemplateSyncConfig' {} Text
a -> TemplateSyncConfig
s {$sel:templateName:TemplateSyncConfig' :: Text
templateName = Text
a} :: TemplateSyncConfig)
templateSyncConfig_templateType :: Lens.Lens' TemplateSyncConfig TemplateType
templateSyncConfig_templateType :: Lens' TemplateSyncConfig TemplateType
templateSyncConfig_templateType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TemplateSyncConfig' {TemplateType
templateType :: TemplateType
$sel:templateType:TemplateSyncConfig' :: TemplateSyncConfig -> TemplateType
templateType} -> TemplateType
templateType) (\s :: TemplateSyncConfig
s@TemplateSyncConfig' {} TemplateType
a -> TemplateSyncConfig
s {$sel:templateType:TemplateSyncConfig' :: TemplateType
templateType = TemplateType
a} :: TemplateSyncConfig)
instance Data.FromJSON TemplateSyncConfig where
parseJSON :: Value -> Parser TemplateSyncConfig
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TemplateSyncConfig"
( \Object
x ->
Maybe Text
-> Text
-> Text
-> RepositoryProvider
-> Text
-> TemplateType
-> TemplateSyncConfig
TemplateSyncConfig'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"subdirectory")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"branch")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"repositoryName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"repositoryProvider")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"templateName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"templateType")
)
instance Prelude.Hashable TemplateSyncConfig where
hashWithSalt :: Int -> TemplateSyncConfig -> Int
hashWithSalt Int
_salt TemplateSyncConfig' {Maybe Text
Text
RepositoryProvider
TemplateType
templateType :: TemplateType
templateName :: Text
repositoryProvider :: RepositoryProvider
repositoryName :: Text
branch :: Text
subdirectory :: Maybe Text
$sel:templateType:TemplateSyncConfig' :: TemplateSyncConfig -> TemplateType
$sel:templateName:TemplateSyncConfig' :: TemplateSyncConfig -> Text
$sel:repositoryProvider:TemplateSyncConfig' :: TemplateSyncConfig -> RepositoryProvider
$sel:repositoryName:TemplateSyncConfig' :: TemplateSyncConfig -> Text
$sel:branch:TemplateSyncConfig' :: TemplateSyncConfig -> Text
$sel:subdirectory:TemplateSyncConfig' :: TemplateSyncConfig -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
subdirectory
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
branch
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
repositoryName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` RepositoryProvider
repositoryProvider
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
templateName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` TemplateType
templateType
instance Prelude.NFData TemplateSyncConfig where
rnf :: TemplateSyncConfig -> ()
rnf TemplateSyncConfig' {Maybe Text
Text
RepositoryProvider
TemplateType
templateType :: TemplateType
templateName :: Text
repositoryProvider :: RepositoryProvider
repositoryName :: Text
branch :: Text
subdirectory :: Maybe Text
$sel:templateType:TemplateSyncConfig' :: TemplateSyncConfig -> TemplateType
$sel:templateName:TemplateSyncConfig' :: TemplateSyncConfig -> Text
$sel:repositoryProvider:TemplateSyncConfig' :: TemplateSyncConfig -> RepositoryProvider
$sel:repositoryName:TemplateSyncConfig' :: TemplateSyncConfig -> Text
$sel:branch:TemplateSyncConfig' :: TemplateSyncConfig -> Text
$sel:subdirectory:TemplateSyncConfig' :: TemplateSyncConfig -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
subdirectory
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
branch
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
repositoryName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf RepositoryProvider
repositoryProvider
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
templateName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf TemplateType
templateType