{-# 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.ElasticBeanstalk.Types.SourceBuildInformation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElasticBeanstalk.Types.SourceRepository
import Amazonka.ElasticBeanstalk.Types.SourceType
import qualified Amazonka.Prelude as Prelude
data SourceBuildInformation = SourceBuildInformation'
{
SourceBuildInformation -> SourceType
sourceType :: SourceType,
SourceBuildInformation -> SourceRepository
sourceRepository :: SourceRepository,
SourceBuildInformation -> Text
sourceLocation :: Prelude.Text
}
deriving (SourceBuildInformation -> SourceBuildInformation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SourceBuildInformation -> SourceBuildInformation -> Bool
$c/= :: SourceBuildInformation -> SourceBuildInformation -> Bool
== :: SourceBuildInformation -> SourceBuildInformation -> Bool
$c== :: SourceBuildInformation -> SourceBuildInformation -> Bool
Prelude.Eq, ReadPrec [SourceBuildInformation]
ReadPrec SourceBuildInformation
Int -> ReadS SourceBuildInformation
ReadS [SourceBuildInformation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SourceBuildInformation]
$creadListPrec :: ReadPrec [SourceBuildInformation]
readPrec :: ReadPrec SourceBuildInformation
$creadPrec :: ReadPrec SourceBuildInformation
readList :: ReadS [SourceBuildInformation]
$creadList :: ReadS [SourceBuildInformation]
readsPrec :: Int -> ReadS SourceBuildInformation
$creadsPrec :: Int -> ReadS SourceBuildInformation
Prelude.Read, Int -> SourceBuildInformation -> ShowS
[SourceBuildInformation] -> ShowS
SourceBuildInformation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SourceBuildInformation] -> ShowS
$cshowList :: [SourceBuildInformation] -> ShowS
show :: SourceBuildInformation -> String
$cshow :: SourceBuildInformation -> String
showsPrec :: Int -> SourceBuildInformation -> ShowS
$cshowsPrec :: Int -> SourceBuildInformation -> ShowS
Prelude.Show, forall x. Rep SourceBuildInformation x -> SourceBuildInformation
forall x. SourceBuildInformation -> Rep SourceBuildInformation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SourceBuildInformation x -> SourceBuildInformation
$cfrom :: forall x. SourceBuildInformation -> Rep SourceBuildInformation x
Prelude.Generic)
newSourceBuildInformation ::
SourceType ->
SourceRepository ->
Prelude.Text ->
SourceBuildInformation
newSourceBuildInformation :: SourceType -> SourceRepository -> Text -> SourceBuildInformation
newSourceBuildInformation
SourceType
pSourceType_
SourceRepository
pSourceRepository_
Text
pSourceLocation_ =
SourceBuildInformation'
{ $sel:sourceType:SourceBuildInformation' :: SourceType
sourceType = SourceType
pSourceType_,
$sel:sourceRepository:SourceBuildInformation' :: SourceRepository
sourceRepository = SourceRepository
pSourceRepository_,
$sel:sourceLocation:SourceBuildInformation' :: Text
sourceLocation = Text
pSourceLocation_
}
sourceBuildInformation_sourceType :: Lens.Lens' SourceBuildInformation SourceType
sourceBuildInformation_sourceType :: Lens' SourceBuildInformation SourceType
sourceBuildInformation_sourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceBuildInformation' {SourceType
sourceType :: SourceType
$sel:sourceType:SourceBuildInformation' :: SourceBuildInformation -> SourceType
sourceType} -> SourceType
sourceType) (\s :: SourceBuildInformation
s@SourceBuildInformation' {} SourceType
a -> SourceBuildInformation
s {$sel:sourceType:SourceBuildInformation' :: SourceType
sourceType = SourceType
a} :: SourceBuildInformation)
sourceBuildInformation_sourceRepository :: Lens.Lens' SourceBuildInformation SourceRepository
sourceBuildInformation_sourceRepository :: Lens' SourceBuildInformation SourceRepository
sourceBuildInformation_sourceRepository = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceBuildInformation' {SourceRepository
sourceRepository :: SourceRepository
$sel:sourceRepository:SourceBuildInformation' :: SourceBuildInformation -> SourceRepository
sourceRepository} -> SourceRepository
sourceRepository) (\s :: SourceBuildInformation
s@SourceBuildInformation' {} SourceRepository
a -> SourceBuildInformation
s {$sel:sourceRepository:SourceBuildInformation' :: SourceRepository
sourceRepository = SourceRepository
a} :: SourceBuildInformation)
sourceBuildInformation_sourceLocation :: Lens.Lens' SourceBuildInformation Prelude.Text
sourceBuildInformation_sourceLocation :: Lens' SourceBuildInformation Text
sourceBuildInformation_sourceLocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceBuildInformation' {Text
sourceLocation :: Text
$sel:sourceLocation:SourceBuildInformation' :: SourceBuildInformation -> Text
sourceLocation} -> Text
sourceLocation) (\s :: SourceBuildInformation
s@SourceBuildInformation' {} Text
a -> SourceBuildInformation
s {$sel:sourceLocation:SourceBuildInformation' :: Text
sourceLocation = Text
a} :: SourceBuildInformation)
instance Data.FromXML SourceBuildInformation where
parseXML :: [Node] -> Either String SourceBuildInformation
parseXML [Node]
x =
SourceType -> SourceRepository -> Text -> SourceBuildInformation
SourceBuildInformation'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"SourceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"SourceRepository")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"SourceLocation")
instance Prelude.Hashable SourceBuildInformation where
hashWithSalt :: Int -> SourceBuildInformation -> Int
hashWithSalt Int
_salt SourceBuildInformation' {Text
SourceRepository
SourceType
sourceLocation :: Text
sourceRepository :: SourceRepository
sourceType :: SourceType
$sel:sourceLocation:SourceBuildInformation' :: SourceBuildInformation -> Text
$sel:sourceRepository:SourceBuildInformation' :: SourceBuildInformation -> SourceRepository
$sel:sourceType:SourceBuildInformation' :: SourceBuildInformation -> SourceType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` SourceType
sourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` SourceRepository
sourceRepository
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sourceLocation
instance Prelude.NFData SourceBuildInformation where
rnf :: SourceBuildInformation -> ()
rnf SourceBuildInformation' {Text
SourceRepository
SourceType
sourceLocation :: Text
sourceRepository :: SourceRepository
sourceType :: SourceType
$sel:sourceLocation:SourceBuildInformation' :: SourceBuildInformation -> Text
$sel:sourceRepository:SourceBuildInformation' :: SourceBuildInformation -> SourceRepository
$sel:sourceType:SourceBuildInformation' :: SourceBuildInformation -> SourceType
..} =
forall a. NFData a => a -> ()
Prelude.rnf SourceType
sourceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf SourceRepository
sourceRepository
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sourceLocation
instance Data.ToQuery SourceBuildInformation where
toQuery :: SourceBuildInformation -> QueryString
toQuery SourceBuildInformation' {Text
SourceRepository
SourceType
sourceLocation :: Text
sourceRepository :: SourceRepository
sourceType :: SourceType
$sel:sourceLocation:SourceBuildInformation' :: SourceBuildInformation -> Text
$sel:sourceRepository:SourceBuildInformation' :: SourceBuildInformation -> SourceRepository
$sel:sourceType:SourceBuildInformation' :: SourceBuildInformation -> SourceType
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"SourceType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: SourceType
sourceType,
ByteString
"SourceRepository" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: SourceRepository
sourceRepository,
ByteString
"SourceLocation" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
sourceLocation
]