{-# 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.SourceConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SourceConfiguration = SourceConfiguration'
{
SourceConfiguration -> Maybe Text
templateName :: Prelude.Maybe Prelude.Text,
SourceConfiguration -> Maybe Text
applicationName :: Prelude.Maybe Prelude.Text
}
deriving (SourceConfiguration -> SourceConfiguration -> Bool
(SourceConfiguration -> SourceConfiguration -> Bool)
-> (SourceConfiguration -> SourceConfiguration -> Bool)
-> Eq SourceConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SourceConfiguration -> SourceConfiguration -> Bool
$c/= :: SourceConfiguration -> SourceConfiguration -> Bool
== :: SourceConfiguration -> SourceConfiguration -> Bool
$c== :: SourceConfiguration -> SourceConfiguration -> Bool
Prelude.Eq, ReadPrec [SourceConfiguration]
ReadPrec SourceConfiguration
Int -> ReadS SourceConfiguration
ReadS [SourceConfiguration]
(Int -> ReadS SourceConfiguration)
-> ReadS [SourceConfiguration]
-> ReadPrec SourceConfiguration
-> ReadPrec [SourceConfiguration]
-> Read SourceConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SourceConfiguration]
$creadListPrec :: ReadPrec [SourceConfiguration]
readPrec :: ReadPrec SourceConfiguration
$creadPrec :: ReadPrec SourceConfiguration
readList :: ReadS [SourceConfiguration]
$creadList :: ReadS [SourceConfiguration]
readsPrec :: Int -> ReadS SourceConfiguration
$creadsPrec :: Int -> ReadS SourceConfiguration
Prelude.Read, Int -> SourceConfiguration -> ShowS
[SourceConfiguration] -> ShowS
SourceConfiguration -> String
(Int -> SourceConfiguration -> ShowS)
-> (SourceConfiguration -> String)
-> ([SourceConfiguration] -> ShowS)
-> Show SourceConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SourceConfiguration] -> ShowS
$cshowList :: [SourceConfiguration] -> ShowS
show :: SourceConfiguration -> String
$cshow :: SourceConfiguration -> String
showsPrec :: Int -> SourceConfiguration -> ShowS
$cshowsPrec :: Int -> SourceConfiguration -> ShowS
Prelude.Show, (forall x. SourceConfiguration -> Rep SourceConfiguration x)
-> (forall x. Rep SourceConfiguration x -> SourceConfiguration)
-> Generic SourceConfiguration
forall x. Rep SourceConfiguration x -> SourceConfiguration
forall x. SourceConfiguration -> Rep SourceConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SourceConfiguration x -> SourceConfiguration
$cfrom :: forall x. SourceConfiguration -> Rep SourceConfiguration x
Prelude.Generic)
newSourceConfiguration ::
SourceConfiguration
newSourceConfiguration :: SourceConfiguration
newSourceConfiguration =
SourceConfiguration' :: Maybe Text -> Maybe Text -> SourceConfiguration
SourceConfiguration'
{ $sel:templateName:SourceConfiguration' :: Maybe Text
templateName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:applicationName:SourceConfiguration' :: Maybe Text
applicationName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
sourceConfiguration_templateName :: Lens.Lens' SourceConfiguration (Prelude.Maybe Prelude.Text)
sourceConfiguration_templateName :: (Maybe Text -> f (Maybe Text))
-> SourceConfiguration -> f SourceConfiguration
sourceConfiguration_templateName = (SourceConfiguration -> Maybe Text)
-> (SourceConfiguration -> Maybe Text -> SourceConfiguration)
-> Lens
SourceConfiguration SourceConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceConfiguration' {Maybe Text
templateName :: Maybe Text
$sel:templateName:SourceConfiguration' :: SourceConfiguration -> Maybe Text
templateName} -> Maybe Text
templateName) (\s :: SourceConfiguration
s@SourceConfiguration' {} Maybe Text
a -> SourceConfiguration
s {$sel:templateName:SourceConfiguration' :: Maybe Text
templateName = Maybe Text
a} :: SourceConfiguration)
sourceConfiguration_applicationName :: Lens.Lens' SourceConfiguration (Prelude.Maybe Prelude.Text)
sourceConfiguration_applicationName :: (Maybe Text -> f (Maybe Text))
-> SourceConfiguration -> f SourceConfiguration
sourceConfiguration_applicationName = (SourceConfiguration -> Maybe Text)
-> (SourceConfiguration -> Maybe Text -> SourceConfiguration)
-> Lens
SourceConfiguration SourceConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SourceConfiguration' {Maybe Text
applicationName :: Maybe Text
$sel:applicationName:SourceConfiguration' :: SourceConfiguration -> Maybe Text
applicationName} -> Maybe Text
applicationName) (\s :: SourceConfiguration
s@SourceConfiguration' {} Maybe Text
a -> SourceConfiguration
s {$sel:applicationName:SourceConfiguration' :: Maybe Text
applicationName = Maybe Text
a} :: SourceConfiguration)
instance Prelude.Hashable SourceConfiguration
instance Prelude.NFData SourceConfiguration
instance Core.ToQuery SourceConfiguration where
toQuery :: SourceConfiguration -> QueryString
toQuery SourceConfiguration' {Maybe Text
applicationName :: Maybe Text
templateName :: Maybe Text
$sel:applicationName:SourceConfiguration' :: SourceConfiguration -> Maybe Text
$sel:templateName:SourceConfiguration' :: SourceConfiguration -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"TemplateName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
templateName,
ByteString
"ApplicationName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
applicationName
]