{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ElasticBeanstalk.ComposeEnvironments
(
ComposeEnvironments (..),
newComposeEnvironments,
composeEnvironments_versionLabels,
composeEnvironments_applicationName,
composeEnvironments_groupName,
EnvironmentDescriptionsMessage (..),
newEnvironmentDescriptionsMessage,
environmentDescriptionsMessage_nextToken,
environmentDescriptionsMessage_environments,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ElasticBeanstalk.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ComposeEnvironments = ComposeEnvironments'
{
ComposeEnvironments -> Maybe [Text]
versionLabels :: Prelude.Maybe [Prelude.Text],
ComposeEnvironments -> Maybe Text
applicationName :: Prelude.Maybe Prelude.Text,
ComposeEnvironments -> Maybe Text
groupName :: Prelude.Maybe Prelude.Text
}
deriving (ComposeEnvironments -> ComposeEnvironments -> Bool
(ComposeEnvironments -> ComposeEnvironments -> Bool)
-> (ComposeEnvironments -> ComposeEnvironments -> Bool)
-> Eq ComposeEnvironments
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComposeEnvironments -> ComposeEnvironments -> Bool
$c/= :: ComposeEnvironments -> ComposeEnvironments -> Bool
== :: ComposeEnvironments -> ComposeEnvironments -> Bool
$c== :: ComposeEnvironments -> ComposeEnvironments -> Bool
Prelude.Eq, ReadPrec [ComposeEnvironments]
ReadPrec ComposeEnvironments
Int -> ReadS ComposeEnvironments
ReadS [ComposeEnvironments]
(Int -> ReadS ComposeEnvironments)
-> ReadS [ComposeEnvironments]
-> ReadPrec ComposeEnvironments
-> ReadPrec [ComposeEnvironments]
-> Read ComposeEnvironments
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ComposeEnvironments]
$creadListPrec :: ReadPrec [ComposeEnvironments]
readPrec :: ReadPrec ComposeEnvironments
$creadPrec :: ReadPrec ComposeEnvironments
readList :: ReadS [ComposeEnvironments]
$creadList :: ReadS [ComposeEnvironments]
readsPrec :: Int -> ReadS ComposeEnvironments
$creadsPrec :: Int -> ReadS ComposeEnvironments
Prelude.Read, Int -> ComposeEnvironments -> ShowS
[ComposeEnvironments] -> ShowS
ComposeEnvironments -> String
(Int -> ComposeEnvironments -> ShowS)
-> (ComposeEnvironments -> String)
-> ([ComposeEnvironments] -> ShowS)
-> Show ComposeEnvironments
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComposeEnvironments] -> ShowS
$cshowList :: [ComposeEnvironments] -> ShowS
show :: ComposeEnvironments -> String
$cshow :: ComposeEnvironments -> String
showsPrec :: Int -> ComposeEnvironments -> ShowS
$cshowsPrec :: Int -> ComposeEnvironments -> ShowS
Prelude.Show, (forall x. ComposeEnvironments -> Rep ComposeEnvironments x)
-> (forall x. Rep ComposeEnvironments x -> ComposeEnvironments)
-> Generic ComposeEnvironments
forall x. Rep ComposeEnvironments x -> ComposeEnvironments
forall x. ComposeEnvironments -> Rep ComposeEnvironments x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ComposeEnvironments x -> ComposeEnvironments
$cfrom :: forall x. ComposeEnvironments -> Rep ComposeEnvironments x
Prelude.Generic)
newComposeEnvironments ::
ComposeEnvironments
newComposeEnvironments :: ComposeEnvironments
newComposeEnvironments =
ComposeEnvironments' :: Maybe [Text] -> Maybe Text -> Maybe Text -> ComposeEnvironments
ComposeEnvironments'
{ $sel:versionLabels:ComposeEnvironments' :: Maybe [Text]
versionLabels =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:applicationName:ComposeEnvironments' :: Maybe Text
applicationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:groupName:ComposeEnvironments' :: Maybe Text
groupName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
composeEnvironments_versionLabels :: Lens.Lens' ComposeEnvironments (Prelude.Maybe [Prelude.Text])
composeEnvironments_versionLabels :: (Maybe [Text] -> f (Maybe [Text]))
-> ComposeEnvironments -> f ComposeEnvironments
composeEnvironments_versionLabels = (ComposeEnvironments -> Maybe [Text])
-> (ComposeEnvironments -> Maybe [Text] -> ComposeEnvironments)
-> Lens
ComposeEnvironments
ComposeEnvironments
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComposeEnvironments' {Maybe [Text]
versionLabels :: Maybe [Text]
$sel:versionLabels:ComposeEnvironments' :: ComposeEnvironments -> Maybe [Text]
versionLabels} -> Maybe [Text]
versionLabels) (\s :: ComposeEnvironments
s@ComposeEnvironments' {} Maybe [Text]
a -> ComposeEnvironments
s {$sel:versionLabels:ComposeEnvironments' :: Maybe [Text]
versionLabels = Maybe [Text]
a} :: ComposeEnvironments) ((Maybe [Text] -> f (Maybe [Text]))
-> ComposeEnvironments -> f ComposeEnvironments)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ComposeEnvironments
-> f ComposeEnvironments
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
composeEnvironments_applicationName :: Lens.Lens' ComposeEnvironments (Prelude.Maybe Prelude.Text)
composeEnvironments_applicationName :: (Maybe Text -> f (Maybe Text))
-> ComposeEnvironments -> f ComposeEnvironments
composeEnvironments_applicationName = (ComposeEnvironments -> Maybe Text)
-> (ComposeEnvironments -> Maybe Text -> ComposeEnvironments)
-> Lens
ComposeEnvironments ComposeEnvironments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComposeEnvironments' {Maybe Text
applicationName :: Maybe Text
$sel:applicationName:ComposeEnvironments' :: ComposeEnvironments -> Maybe Text
applicationName} -> Maybe Text
applicationName) (\s :: ComposeEnvironments
s@ComposeEnvironments' {} Maybe Text
a -> ComposeEnvironments
s {$sel:applicationName:ComposeEnvironments' :: Maybe Text
applicationName = Maybe Text
a} :: ComposeEnvironments)
composeEnvironments_groupName :: Lens.Lens' ComposeEnvironments (Prelude.Maybe Prelude.Text)
composeEnvironments_groupName :: (Maybe Text -> f (Maybe Text))
-> ComposeEnvironments -> f ComposeEnvironments
composeEnvironments_groupName = (ComposeEnvironments -> Maybe Text)
-> (ComposeEnvironments -> Maybe Text -> ComposeEnvironments)
-> Lens
ComposeEnvironments ComposeEnvironments (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComposeEnvironments' {Maybe Text
groupName :: Maybe Text
$sel:groupName:ComposeEnvironments' :: ComposeEnvironments -> Maybe Text
groupName} -> Maybe Text
groupName) (\s :: ComposeEnvironments
s@ComposeEnvironments' {} Maybe Text
a -> ComposeEnvironments
s {$sel:groupName:ComposeEnvironments' :: Maybe Text
groupName = Maybe Text
a} :: ComposeEnvironments)
instance Core.AWSRequest ComposeEnvironments where
type
AWSResponse ComposeEnvironments =
EnvironmentDescriptionsMessage
request :: ComposeEnvironments -> Request ComposeEnvironments
request = Service -> ComposeEnvironments -> Request ComposeEnvironments
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ComposeEnvironments
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ComposeEnvironments)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ComposeEnvironments))
-> Logger
-> Service
-> Proxy ComposeEnvironments
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ComposeEnvironments)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"ComposeEnvironmentsResult"
(\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String EnvironmentDescriptionsMessage
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
instance Prelude.Hashable ComposeEnvironments
instance Prelude.NFData ComposeEnvironments
instance Core.ToHeaders ComposeEnvironments where
toHeaders :: ComposeEnvironments -> ResponseHeaders
toHeaders = ResponseHeaders -> ComposeEnvironments -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ComposeEnvironments where
toPath :: ComposeEnvironments -> ByteString
toPath = ByteString -> ComposeEnvironments -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ComposeEnvironments where
toQuery :: ComposeEnvironments -> QueryString
toQuery ComposeEnvironments' {Maybe [Text]
Maybe Text
groupName :: Maybe Text
applicationName :: Maybe Text
versionLabels :: Maybe [Text]
$sel:groupName:ComposeEnvironments' :: ComposeEnvironments -> Maybe Text
$sel:applicationName:ComposeEnvironments' :: ComposeEnvironments -> Maybe Text
$sel:versionLabels:ComposeEnvironments' :: ComposeEnvironments -> Maybe [Text]
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ComposeEnvironments" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"VersionLabels"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
versionLabels
),
ByteString
"ApplicationName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
applicationName,
ByteString
"GroupName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
groupName
]