{-# 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.RepositorySyncDefinition 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
data RepositorySyncDefinition = RepositorySyncDefinition'
{
RepositorySyncDefinition -> Text
branch :: Prelude.Text,
RepositorySyncDefinition -> Text
directory :: Prelude.Text,
RepositorySyncDefinition -> Text
parent :: Prelude.Text,
RepositorySyncDefinition -> Text
target :: Prelude.Text
}
deriving (RepositorySyncDefinition -> RepositorySyncDefinition -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RepositorySyncDefinition -> RepositorySyncDefinition -> Bool
$c/= :: RepositorySyncDefinition -> RepositorySyncDefinition -> Bool
== :: RepositorySyncDefinition -> RepositorySyncDefinition -> Bool
$c== :: RepositorySyncDefinition -> RepositorySyncDefinition -> Bool
Prelude.Eq, ReadPrec [RepositorySyncDefinition]
ReadPrec RepositorySyncDefinition
Int -> ReadS RepositorySyncDefinition
ReadS [RepositorySyncDefinition]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RepositorySyncDefinition]
$creadListPrec :: ReadPrec [RepositorySyncDefinition]
readPrec :: ReadPrec RepositorySyncDefinition
$creadPrec :: ReadPrec RepositorySyncDefinition
readList :: ReadS [RepositorySyncDefinition]
$creadList :: ReadS [RepositorySyncDefinition]
readsPrec :: Int -> ReadS RepositorySyncDefinition
$creadsPrec :: Int -> ReadS RepositorySyncDefinition
Prelude.Read, Int -> RepositorySyncDefinition -> ShowS
[RepositorySyncDefinition] -> ShowS
RepositorySyncDefinition -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RepositorySyncDefinition] -> ShowS
$cshowList :: [RepositorySyncDefinition] -> ShowS
show :: RepositorySyncDefinition -> String
$cshow :: RepositorySyncDefinition -> String
showsPrec :: Int -> RepositorySyncDefinition -> ShowS
$cshowsPrec :: Int -> RepositorySyncDefinition -> ShowS
Prelude.Show, forall x.
Rep RepositorySyncDefinition x -> RepositorySyncDefinition
forall x.
RepositorySyncDefinition -> Rep RepositorySyncDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RepositorySyncDefinition x -> RepositorySyncDefinition
$cfrom :: forall x.
RepositorySyncDefinition -> Rep RepositorySyncDefinition x
Prelude.Generic)
newRepositorySyncDefinition ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
RepositorySyncDefinition
newRepositorySyncDefinition :: Text -> Text -> Text -> Text -> RepositorySyncDefinition
newRepositorySyncDefinition
Text
pBranch_
Text
pDirectory_
Text
pParent_
Text
pTarget_ =
RepositorySyncDefinition'
{ $sel:branch:RepositorySyncDefinition' :: Text
branch = Text
pBranch_,
$sel:directory:RepositorySyncDefinition' :: Text
directory = Text
pDirectory_,
$sel:parent:RepositorySyncDefinition' :: Text
parent = Text
pParent_,
$sel:target:RepositorySyncDefinition' :: Text
target = Text
pTarget_
}
repositorySyncDefinition_branch :: Lens.Lens' RepositorySyncDefinition Prelude.Text
repositorySyncDefinition_branch :: Lens' RepositorySyncDefinition Text
repositorySyncDefinition_branch = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositorySyncDefinition' {Text
branch :: Text
$sel:branch:RepositorySyncDefinition' :: RepositorySyncDefinition -> Text
branch} -> Text
branch) (\s :: RepositorySyncDefinition
s@RepositorySyncDefinition' {} Text
a -> RepositorySyncDefinition
s {$sel:branch:RepositorySyncDefinition' :: Text
branch = Text
a} :: RepositorySyncDefinition)
repositorySyncDefinition_directory :: Lens.Lens' RepositorySyncDefinition Prelude.Text
repositorySyncDefinition_directory :: Lens' RepositorySyncDefinition Text
repositorySyncDefinition_directory = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositorySyncDefinition' {Text
directory :: Text
$sel:directory:RepositorySyncDefinition' :: RepositorySyncDefinition -> Text
directory} -> Text
directory) (\s :: RepositorySyncDefinition
s@RepositorySyncDefinition' {} Text
a -> RepositorySyncDefinition
s {$sel:directory:RepositorySyncDefinition' :: Text
directory = Text
a} :: RepositorySyncDefinition)
repositorySyncDefinition_parent :: Lens.Lens' RepositorySyncDefinition Prelude.Text
repositorySyncDefinition_parent :: Lens' RepositorySyncDefinition Text
repositorySyncDefinition_parent = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositorySyncDefinition' {Text
parent :: Text
$sel:parent:RepositorySyncDefinition' :: RepositorySyncDefinition -> Text
parent} -> Text
parent) (\s :: RepositorySyncDefinition
s@RepositorySyncDefinition' {} Text
a -> RepositorySyncDefinition
s {$sel:parent:RepositorySyncDefinition' :: Text
parent = Text
a} :: RepositorySyncDefinition)
repositorySyncDefinition_target :: Lens.Lens' RepositorySyncDefinition Prelude.Text
repositorySyncDefinition_target :: Lens' RepositorySyncDefinition Text
repositorySyncDefinition_target = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositorySyncDefinition' {Text
target :: Text
$sel:target:RepositorySyncDefinition' :: RepositorySyncDefinition -> Text
target} -> Text
target) (\s :: RepositorySyncDefinition
s@RepositorySyncDefinition' {} Text
a -> RepositorySyncDefinition
s {$sel:target:RepositorySyncDefinition' :: Text
target = Text
a} :: RepositorySyncDefinition)
instance Data.FromJSON RepositorySyncDefinition where
parseJSON :: Value -> Parser RepositorySyncDefinition
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RepositorySyncDefinition"
( \Object
x ->
Text -> Text -> Text -> Text -> RepositorySyncDefinition
RepositorySyncDefinition'
forall (f :: * -> *) a b. Functor 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
"directory")
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
"parent")
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
"target")
)
instance Prelude.Hashable RepositorySyncDefinition where
hashWithSalt :: Int -> RepositorySyncDefinition -> Int
hashWithSalt Int
_salt RepositorySyncDefinition' {Text
target :: Text
parent :: Text
directory :: Text
branch :: Text
$sel:target:RepositorySyncDefinition' :: RepositorySyncDefinition -> Text
$sel:parent:RepositorySyncDefinition' :: RepositorySyncDefinition -> Text
$sel:directory:RepositorySyncDefinition' :: RepositorySyncDefinition -> Text
$sel:branch:RepositorySyncDefinition' :: RepositorySyncDefinition -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
branch
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
directory
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
parent
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
target
instance Prelude.NFData RepositorySyncDefinition where
rnf :: RepositorySyncDefinition -> ()
rnf RepositorySyncDefinition' {Text
target :: Text
parent :: Text
directory :: Text
branch :: Text
$sel:target:RepositorySyncDefinition' :: RepositorySyncDefinition -> Text
$sel:parent:RepositorySyncDefinition' :: RepositorySyncDefinition -> Text
$sel:directory:RepositorySyncDefinition' :: RepositorySyncDefinition -> Text
$sel:branch:RepositorySyncDefinition' :: RepositorySyncDefinition -> Text
..} =
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
directory
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
parent
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
target