{-# 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.AutoScaling.DescribeAutoScalingNotificationTypes
(
DescribeAutoScalingNotificationTypes (..),
newDescribeAutoScalingNotificationTypes,
DescribeAutoScalingNotificationTypesResponse (..),
newDescribeAutoScalingNotificationTypesResponse,
describeAutoScalingNotificationTypesResponse_autoScalingNotificationTypes,
describeAutoScalingNotificationTypesResponse_httpStatus,
)
where
import Amazonka.AutoScaling.Types
import qualified Amazonka.Core as Core
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 DescribeAutoScalingNotificationTypes = DescribeAutoScalingNotificationTypes'
{
}
deriving (DescribeAutoScalingNotificationTypes
-> DescribeAutoScalingNotificationTypes -> Bool
(DescribeAutoScalingNotificationTypes
-> DescribeAutoScalingNotificationTypes -> Bool)
-> (DescribeAutoScalingNotificationTypes
-> DescribeAutoScalingNotificationTypes -> Bool)
-> Eq DescribeAutoScalingNotificationTypes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAutoScalingNotificationTypes
-> DescribeAutoScalingNotificationTypes -> Bool
$c/= :: DescribeAutoScalingNotificationTypes
-> DescribeAutoScalingNotificationTypes -> Bool
== :: DescribeAutoScalingNotificationTypes
-> DescribeAutoScalingNotificationTypes -> Bool
$c== :: DescribeAutoScalingNotificationTypes
-> DescribeAutoScalingNotificationTypes -> Bool
Prelude.Eq, ReadPrec [DescribeAutoScalingNotificationTypes]
ReadPrec DescribeAutoScalingNotificationTypes
Int -> ReadS DescribeAutoScalingNotificationTypes
ReadS [DescribeAutoScalingNotificationTypes]
(Int -> ReadS DescribeAutoScalingNotificationTypes)
-> ReadS [DescribeAutoScalingNotificationTypes]
-> ReadPrec DescribeAutoScalingNotificationTypes
-> ReadPrec [DescribeAutoScalingNotificationTypes]
-> Read DescribeAutoScalingNotificationTypes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAutoScalingNotificationTypes]
$creadListPrec :: ReadPrec [DescribeAutoScalingNotificationTypes]
readPrec :: ReadPrec DescribeAutoScalingNotificationTypes
$creadPrec :: ReadPrec DescribeAutoScalingNotificationTypes
readList :: ReadS [DescribeAutoScalingNotificationTypes]
$creadList :: ReadS [DescribeAutoScalingNotificationTypes]
readsPrec :: Int -> ReadS DescribeAutoScalingNotificationTypes
$creadsPrec :: Int -> ReadS DescribeAutoScalingNotificationTypes
Prelude.Read, Int -> DescribeAutoScalingNotificationTypes -> ShowS
[DescribeAutoScalingNotificationTypes] -> ShowS
DescribeAutoScalingNotificationTypes -> String
(Int -> DescribeAutoScalingNotificationTypes -> ShowS)
-> (DescribeAutoScalingNotificationTypes -> String)
-> ([DescribeAutoScalingNotificationTypes] -> ShowS)
-> Show DescribeAutoScalingNotificationTypes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAutoScalingNotificationTypes] -> ShowS
$cshowList :: [DescribeAutoScalingNotificationTypes] -> ShowS
show :: DescribeAutoScalingNotificationTypes -> String
$cshow :: DescribeAutoScalingNotificationTypes -> String
showsPrec :: Int -> DescribeAutoScalingNotificationTypes -> ShowS
$cshowsPrec :: Int -> DescribeAutoScalingNotificationTypes -> ShowS
Prelude.Show, (forall x.
DescribeAutoScalingNotificationTypes
-> Rep DescribeAutoScalingNotificationTypes x)
-> (forall x.
Rep DescribeAutoScalingNotificationTypes x
-> DescribeAutoScalingNotificationTypes)
-> Generic DescribeAutoScalingNotificationTypes
forall x.
Rep DescribeAutoScalingNotificationTypes x
-> DescribeAutoScalingNotificationTypes
forall x.
DescribeAutoScalingNotificationTypes
-> Rep DescribeAutoScalingNotificationTypes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAutoScalingNotificationTypes x
-> DescribeAutoScalingNotificationTypes
$cfrom :: forall x.
DescribeAutoScalingNotificationTypes
-> Rep DescribeAutoScalingNotificationTypes x
Prelude.Generic)
newDescribeAutoScalingNotificationTypes ::
DescribeAutoScalingNotificationTypes
newDescribeAutoScalingNotificationTypes :: DescribeAutoScalingNotificationTypes
newDescribeAutoScalingNotificationTypes =
DescribeAutoScalingNotificationTypes
DescribeAutoScalingNotificationTypes'
instance
Core.AWSRequest
DescribeAutoScalingNotificationTypes
where
type
AWSResponse DescribeAutoScalingNotificationTypes =
DescribeAutoScalingNotificationTypesResponse
request :: DescribeAutoScalingNotificationTypes
-> Request DescribeAutoScalingNotificationTypes
request = Service
-> DescribeAutoScalingNotificationTypes
-> Request DescribeAutoScalingNotificationTypes
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeAutoScalingNotificationTypes
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DescribeAutoScalingNotificationTypes)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either
String (AWSResponse DescribeAutoScalingNotificationTypes))
-> Logger
-> Service
-> Proxy DescribeAutoScalingNotificationTypes
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse DescribeAutoScalingNotificationTypes)))
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
"DescribeAutoScalingNotificationTypesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [Text] -> Int -> DescribeAutoScalingNotificationTypesResponse
DescribeAutoScalingNotificationTypesResponse'
(Maybe [Text]
-> Int -> DescribeAutoScalingNotificationTypesResponse)
-> Either String (Maybe [Text])
-> Either
String (Int -> DescribeAutoScalingNotificationTypesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AutoScalingNotificationTypes"
Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
)
Either String (Int -> DescribeAutoScalingNotificationTypesResponse)
-> Either String Int
-> Either String DescribeAutoScalingNotificationTypesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
DescribeAutoScalingNotificationTypes
instance
Prelude.NFData
DescribeAutoScalingNotificationTypes
instance
Core.ToHeaders
DescribeAutoScalingNotificationTypes
where
toHeaders :: DescribeAutoScalingNotificationTypes -> ResponseHeaders
toHeaders = ResponseHeaders
-> DescribeAutoScalingNotificationTypes -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
DescribeAutoScalingNotificationTypes
where
toPath :: DescribeAutoScalingNotificationTypes -> ByteString
toPath = ByteString -> DescribeAutoScalingNotificationTypes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
DescribeAutoScalingNotificationTypes
where
toQuery :: DescribeAutoScalingNotificationTypes -> QueryString
toQuery =
QueryString -> DescribeAutoScalingNotificationTypes -> QueryString
forall a b. a -> b -> a
Prelude.const
( [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"DescribeAutoScalingNotificationTypes" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2011-01-01" :: Prelude.ByteString)
]
)
data DescribeAutoScalingNotificationTypesResponse = DescribeAutoScalingNotificationTypesResponse'
{
DescribeAutoScalingNotificationTypesResponse -> Maybe [Text]
autoScalingNotificationTypes :: Prelude.Maybe [Prelude.Text],
DescribeAutoScalingNotificationTypesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeAutoScalingNotificationTypesResponse
-> DescribeAutoScalingNotificationTypesResponse -> Bool
(DescribeAutoScalingNotificationTypesResponse
-> DescribeAutoScalingNotificationTypesResponse -> Bool)
-> (DescribeAutoScalingNotificationTypesResponse
-> DescribeAutoScalingNotificationTypesResponse -> Bool)
-> Eq DescribeAutoScalingNotificationTypesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAutoScalingNotificationTypesResponse
-> DescribeAutoScalingNotificationTypesResponse -> Bool
$c/= :: DescribeAutoScalingNotificationTypesResponse
-> DescribeAutoScalingNotificationTypesResponse -> Bool
== :: DescribeAutoScalingNotificationTypesResponse
-> DescribeAutoScalingNotificationTypesResponse -> Bool
$c== :: DescribeAutoScalingNotificationTypesResponse
-> DescribeAutoScalingNotificationTypesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAutoScalingNotificationTypesResponse]
ReadPrec DescribeAutoScalingNotificationTypesResponse
Int -> ReadS DescribeAutoScalingNotificationTypesResponse
ReadS [DescribeAutoScalingNotificationTypesResponse]
(Int -> ReadS DescribeAutoScalingNotificationTypesResponse)
-> ReadS [DescribeAutoScalingNotificationTypesResponse]
-> ReadPrec DescribeAutoScalingNotificationTypesResponse
-> ReadPrec [DescribeAutoScalingNotificationTypesResponse]
-> Read DescribeAutoScalingNotificationTypesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAutoScalingNotificationTypesResponse]
$creadListPrec :: ReadPrec [DescribeAutoScalingNotificationTypesResponse]
readPrec :: ReadPrec DescribeAutoScalingNotificationTypesResponse
$creadPrec :: ReadPrec DescribeAutoScalingNotificationTypesResponse
readList :: ReadS [DescribeAutoScalingNotificationTypesResponse]
$creadList :: ReadS [DescribeAutoScalingNotificationTypesResponse]
readsPrec :: Int -> ReadS DescribeAutoScalingNotificationTypesResponse
$creadsPrec :: Int -> ReadS DescribeAutoScalingNotificationTypesResponse
Prelude.Read, Int -> DescribeAutoScalingNotificationTypesResponse -> ShowS
[DescribeAutoScalingNotificationTypesResponse] -> ShowS
DescribeAutoScalingNotificationTypesResponse -> String
(Int -> DescribeAutoScalingNotificationTypesResponse -> ShowS)
-> (DescribeAutoScalingNotificationTypesResponse -> String)
-> ([DescribeAutoScalingNotificationTypesResponse] -> ShowS)
-> Show DescribeAutoScalingNotificationTypesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAutoScalingNotificationTypesResponse] -> ShowS
$cshowList :: [DescribeAutoScalingNotificationTypesResponse] -> ShowS
show :: DescribeAutoScalingNotificationTypesResponse -> String
$cshow :: DescribeAutoScalingNotificationTypesResponse -> String
showsPrec :: Int -> DescribeAutoScalingNotificationTypesResponse -> ShowS
$cshowsPrec :: Int -> DescribeAutoScalingNotificationTypesResponse -> ShowS
Prelude.Show, (forall x.
DescribeAutoScalingNotificationTypesResponse
-> Rep DescribeAutoScalingNotificationTypesResponse x)
-> (forall x.
Rep DescribeAutoScalingNotificationTypesResponse x
-> DescribeAutoScalingNotificationTypesResponse)
-> Generic DescribeAutoScalingNotificationTypesResponse
forall x.
Rep DescribeAutoScalingNotificationTypesResponse x
-> DescribeAutoScalingNotificationTypesResponse
forall x.
DescribeAutoScalingNotificationTypesResponse
-> Rep DescribeAutoScalingNotificationTypesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAutoScalingNotificationTypesResponse x
-> DescribeAutoScalingNotificationTypesResponse
$cfrom :: forall x.
DescribeAutoScalingNotificationTypesResponse
-> Rep DescribeAutoScalingNotificationTypesResponse x
Prelude.Generic)
newDescribeAutoScalingNotificationTypesResponse ::
Prelude.Int ->
DescribeAutoScalingNotificationTypesResponse
newDescribeAutoScalingNotificationTypesResponse :: Int -> DescribeAutoScalingNotificationTypesResponse
newDescribeAutoScalingNotificationTypesResponse
Int
pHttpStatus_ =
DescribeAutoScalingNotificationTypesResponse' :: Maybe [Text] -> Int -> DescribeAutoScalingNotificationTypesResponse
DescribeAutoScalingNotificationTypesResponse'
{ $sel:autoScalingNotificationTypes:DescribeAutoScalingNotificationTypesResponse' :: Maybe [Text]
autoScalingNotificationTypes =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeAutoScalingNotificationTypesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeAutoScalingNotificationTypesResponse_autoScalingNotificationTypes :: Lens.Lens' DescribeAutoScalingNotificationTypesResponse (Prelude.Maybe [Prelude.Text])
describeAutoScalingNotificationTypesResponse_autoScalingNotificationTypes :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeAutoScalingNotificationTypesResponse
-> f DescribeAutoScalingNotificationTypesResponse
describeAutoScalingNotificationTypesResponse_autoScalingNotificationTypes = (DescribeAutoScalingNotificationTypesResponse -> Maybe [Text])
-> (DescribeAutoScalingNotificationTypesResponse
-> Maybe [Text] -> DescribeAutoScalingNotificationTypesResponse)
-> Lens
DescribeAutoScalingNotificationTypesResponse
DescribeAutoScalingNotificationTypesResponse
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAutoScalingNotificationTypesResponse' {Maybe [Text]
autoScalingNotificationTypes :: Maybe [Text]
$sel:autoScalingNotificationTypes:DescribeAutoScalingNotificationTypesResponse' :: DescribeAutoScalingNotificationTypesResponse -> Maybe [Text]
autoScalingNotificationTypes} -> Maybe [Text]
autoScalingNotificationTypes) (\s :: DescribeAutoScalingNotificationTypesResponse
s@DescribeAutoScalingNotificationTypesResponse' {} Maybe [Text]
a -> DescribeAutoScalingNotificationTypesResponse
s {$sel:autoScalingNotificationTypes:DescribeAutoScalingNotificationTypesResponse' :: Maybe [Text]
autoScalingNotificationTypes = Maybe [Text]
a} :: DescribeAutoScalingNotificationTypesResponse) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeAutoScalingNotificationTypesResponse
-> f DescribeAutoScalingNotificationTypesResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeAutoScalingNotificationTypesResponse
-> f DescribeAutoScalingNotificationTypesResponse
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
describeAutoScalingNotificationTypesResponse_httpStatus :: Lens.Lens' DescribeAutoScalingNotificationTypesResponse Prelude.Int
describeAutoScalingNotificationTypesResponse_httpStatus :: (Int -> f Int)
-> DescribeAutoScalingNotificationTypesResponse
-> f DescribeAutoScalingNotificationTypesResponse
describeAutoScalingNotificationTypesResponse_httpStatus = (DescribeAutoScalingNotificationTypesResponse -> Int)
-> (DescribeAutoScalingNotificationTypesResponse
-> Int -> DescribeAutoScalingNotificationTypesResponse)
-> Lens
DescribeAutoScalingNotificationTypesResponse
DescribeAutoScalingNotificationTypesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAutoScalingNotificationTypesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeAutoScalingNotificationTypesResponse' :: DescribeAutoScalingNotificationTypesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeAutoScalingNotificationTypesResponse
s@DescribeAutoScalingNotificationTypesResponse' {} Int
a -> DescribeAutoScalingNotificationTypesResponse
s {$sel:httpStatus:DescribeAutoScalingNotificationTypesResponse' :: Int
httpStatus = Int
a} :: DescribeAutoScalingNotificationTypesResponse)
instance
Prelude.NFData
DescribeAutoScalingNotificationTypesResponse