{-# 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 Amazonka.ElasticBeanstalk.Types.SourceRepository
import Amazonka.ElasticBeanstalk.Types.SourceType
import qualified Amazonka.Lens as Lens
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
(SourceBuildInformation -> SourceBuildInformation -> Bool)
-> (SourceBuildInformation -> SourceBuildInformation -> Bool)
-> Eq SourceBuildInformation
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]
(Int -> ReadS SourceBuildInformation)
-> ReadS [SourceBuildInformation]
-> ReadPrec SourceBuildInformation
-> ReadPrec [SourceBuildInformation]
-> Read 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
(Int -> SourceBuildInformation -> ShowS)
-> (SourceBuildInformation -> String)
-> ([SourceBuildInformation] -> ShowS)
-> Show SourceBuildInformation
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. SourceBuildInformation -> Rep SourceBuildInformation x)
-> (forall x.
Rep SourceBuildInformation x -> SourceBuildInformation)
-> Generic SourceBuildInformation
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' :: SourceType -> SourceRepository -> Text -> SourceBuildInformation
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 :: (SourceType -> f SourceType)
-> SourceBuildInformation -> f SourceBuildInformation
sourceBuildInformation_sourceType = (SourceBuildInformation -> SourceType)
-> (SourceBuildInformation -> SourceType -> SourceBuildInformation)
-> Lens
SourceBuildInformation SourceBuildInformation SourceType 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 :: (SourceRepository -> f SourceRepository)
-> SourceBuildInformation -> f SourceBuildInformation
sourceBuildInformation_sourceRepository = (SourceBuildInformation -> SourceRepository)
-> (SourceBuildInformation
-> SourceRepository -> SourceBuildInformation)
-> Lens
SourceBuildInformation
SourceBuildInformation
SourceRepository
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 :: (Text -> f Text)
-> SourceBuildInformation -> f SourceBuildInformation
sourceBuildInformation_sourceLocation = (SourceBuildInformation -> Text)
-> (SourceBuildInformation -> Text -> SourceBuildInformation)
-> Lens SourceBuildInformation SourceBuildInformation Text Text
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 Core.FromXML SourceBuildInformation where
parseXML :: [Node] -> Either String SourceBuildInformation
parseXML [Node]
x =
SourceType -> SourceRepository -> Text -> SourceBuildInformation
SourceBuildInformation'
(SourceType -> SourceRepository -> Text -> SourceBuildInformation)
-> Either String SourceType
-> Either
String (SourceRepository -> Text -> SourceBuildInformation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String SourceType
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"SourceType")
Either String (SourceRepository -> Text -> SourceBuildInformation)
-> Either String SourceRepository
-> Either String (Text -> SourceBuildInformation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String SourceRepository
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"SourceRepository")
Either String (Text -> SourceBuildInformation)
-> Either String Text -> Either String SourceBuildInformation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"SourceLocation")
instance Prelude.Hashable SourceBuildInformation
instance Prelude.NFData SourceBuildInformation
instance Core.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
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"SourceType" ByteString -> SourceType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: SourceType
sourceType,
ByteString
"SourceRepository" ByteString -> SourceRepository -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: SourceRepository
sourceRepository,
ByteString
"SourceLocation" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
sourceLocation
]