{-# 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.ApplicationAutoScaling.DescribeScalingActivities
(
DescribeScalingActivities (..),
newDescribeScalingActivities,
describeScalingActivities_scalableDimension,
describeScalingActivities_resourceId,
describeScalingActivities_nextToken,
describeScalingActivities_maxResults,
describeScalingActivities_serviceNamespace,
DescribeScalingActivitiesResponse (..),
newDescribeScalingActivitiesResponse,
describeScalingActivitiesResponse_scalingActivities,
describeScalingActivitiesResponse_nextToken,
describeScalingActivitiesResponse_httpStatus,
)
where
import Amazonka.ApplicationAutoScaling.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 DescribeScalingActivities = DescribeScalingActivities'
{
DescribeScalingActivities -> Maybe ScalableDimension
scalableDimension :: Prelude.Maybe ScalableDimension,
DescribeScalingActivities -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
DescribeScalingActivities -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeScalingActivities -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
DescribeScalingActivities -> ServiceNamespace
serviceNamespace :: ServiceNamespace
}
deriving (DescribeScalingActivities -> DescribeScalingActivities -> Bool
(DescribeScalingActivities -> DescribeScalingActivities -> Bool)
-> (DescribeScalingActivities -> DescribeScalingActivities -> Bool)
-> Eq DescribeScalingActivities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeScalingActivities -> DescribeScalingActivities -> Bool
$c/= :: DescribeScalingActivities -> DescribeScalingActivities -> Bool
== :: DescribeScalingActivities -> DescribeScalingActivities -> Bool
$c== :: DescribeScalingActivities -> DescribeScalingActivities -> Bool
Prelude.Eq, ReadPrec [DescribeScalingActivities]
ReadPrec DescribeScalingActivities
Int -> ReadS DescribeScalingActivities
ReadS [DescribeScalingActivities]
(Int -> ReadS DescribeScalingActivities)
-> ReadS [DescribeScalingActivities]
-> ReadPrec DescribeScalingActivities
-> ReadPrec [DescribeScalingActivities]
-> Read DescribeScalingActivities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeScalingActivities]
$creadListPrec :: ReadPrec [DescribeScalingActivities]
readPrec :: ReadPrec DescribeScalingActivities
$creadPrec :: ReadPrec DescribeScalingActivities
readList :: ReadS [DescribeScalingActivities]
$creadList :: ReadS [DescribeScalingActivities]
readsPrec :: Int -> ReadS DescribeScalingActivities
$creadsPrec :: Int -> ReadS DescribeScalingActivities
Prelude.Read, Int -> DescribeScalingActivities -> ShowS
[DescribeScalingActivities] -> ShowS
DescribeScalingActivities -> String
(Int -> DescribeScalingActivities -> ShowS)
-> (DescribeScalingActivities -> String)
-> ([DescribeScalingActivities] -> ShowS)
-> Show DescribeScalingActivities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeScalingActivities] -> ShowS
$cshowList :: [DescribeScalingActivities] -> ShowS
show :: DescribeScalingActivities -> String
$cshow :: DescribeScalingActivities -> String
showsPrec :: Int -> DescribeScalingActivities -> ShowS
$cshowsPrec :: Int -> DescribeScalingActivities -> ShowS
Prelude.Show, (forall x.
DescribeScalingActivities -> Rep DescribeScalingActivities x)
-> (forall x.
Rep DescribeScalingActivities x -> DescribeScalingActivities)
-> Generic DescribeScalingActivities
forall x.
Rep DescribeScalingActivities x -> DescribeScalingActivities
forall x.
DescribeScalingActivities -> Rep DescribeScalingActivities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeScalingActivities x -> DescribeScalingActivities
$cfrom :: forall x.
DescribeScalingActivities -> Rep DescribeScalingActivities x
Prelude.Generic)
newDescribeScalingActivities ::
ServiceNamespace ->
DescribeScalingActivities
newDescribeScalingActivities :: ServiceNamespace -> DescribeScalingActivities
newDescribeScalingActivities ServiceNamespace
pServiceNamespace_ =
DescribeScalingActivities' :: Maybe ScalableDimension
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> ServiceNamespace
-> DescribeScalingActivities
DescribeScalingActivities'
{ $sel:scalableDimension:DescribeScalingActivities' :: Maybe ScalableDimension
scalableDimension =
Maybe ScalableDimension
forall a. Maybe a
Prelude.Nothing,
$sel:resourceId:DescribeScalingActivities' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeScalingActivities' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeScalingActivities' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:serviceNamespace:DescribeScalingActivities' :: ServiceNamespace
serviceNamespace = ServiceNamespace
pServiceNamespace_
}
describeScalingActivities_scalableDimension :: Lens.Lens' DescribeScalingActivities (Prelude.Maybe ScalableDimension)
describeScalingActivities_scalableDimension :: (Maybe ScalableDimension -> f (Maybe ScalableDimension))
-> DescribeScalingActivities -> f DescribeScalingActivities
describeScalingActivities_scalableDimension = (DescribeScalingActivities -> Maybe ScalableDimension)
-> (DescribeScalingActivities
-> Maybe ScalableDimension -> DescribeScalingActivities)
-> Lens
DescribeScalingActivities
DescribeScalingActivities
(Maybe ScalableDimension)
(Maybe ScalableDimension)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivities' {Maybe ScalableDimension
scalableDimension :: Maybe ScalableDimension
$sel:scalableDimension:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe ScalableDimension
scalableDimension} -> Maybe ScalableDimension
scalableDimension) (\s :: DescribeScalingActivities
s@DescribeScalingActivities' {} Maybe ScalableDimension
a -> DescribeScalingActivities
s {$sel:scalableDimension:DescribeScalingActivities' :: Maybe ScalableDimension
scalableDimension = Maybe ScalableDimension
a} :: DescribeScalingActivities)
describeScalingActivities_resourceId :: Lens.Lens' DescribeScalingActivities (Prelude.Maybe Prelude.Text)
describeScalingActivities_resourceId :: (Maybe Text -> f (Maybe Text))
-> DescribeScalingActivities -> f DescribeScalingActivities
describeScalingActivities_resourceId = (DescribeScalingActivities -> Maybe Text)
-> (DescribeScalingActivities
-> Maybe Text -> DescribeScalingActivities)
-> Lens
DescribeScalingActivities
DescribeScalingActivities
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivities' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: DescribeScalingActivities
s@DescribeScalingActivities' {} Maybe Text
a -> DescribeScalingActivities
s {$sel:resourceId:DescribeScalingActivities' :: Maybe Text
resourceId = Maybe Text
a} :: DescribeScalingActivities)
describeScalingActivities_nextToken :: Lens.Lens' DescribeScalingActivities (Prelude.Maybe Prelude.Text)
describeScalingActivities_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeScalingActivities -> f DescribeScalingActivities
describeScalingActivities_nextToken = (DescribeScalingActivities -> Maybe Text)
-> (DescribeScalingActivities
-> Maybe Text -> DescribeScalingActivities)
-> Lens
DescribeScalingActivities
DescribeScalingActivities
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivities' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeScalingActivities
s@DescribeScalingActivities' {} Maybe Text
a -> DescribeScalingActivities
s {$sel:nextToken:DescribeScalingActivities' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeScalingActivities)
describeScalingActivities_maxResults :: Lens.Lens' DescribeScalingActivities (Prelude.Maybe Prelude.Int)
describeScalingActivities_maxResults :: (Maybe Int -> f (Maybe Int))
-> DescribeScalingActivities -> f DescribeScalingActivities
describeScalingActivities_maxResults = (DescribeScalingActivities -> Maybe Int)
-> (DescribeScalingActivities
-> Maybe Int -> DescribeScalingActivities)
-> Lens
DescribeScalingActivities
DescribeScalingActivities
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivities' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeScalingActivities
s@DescribeScalingActivities' {} Maybe Int
a -> DescribeScalingActivities
s {$sel:maxResults:DescribeScalingActivities' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeScalingActivities)
describeScalingActivities_serviceNamespace :: Lens.Lens' DescribeScalingActivities ServiceNamespace
describeScalingActivities_serviceNamespace :: (ServiceNamespace -> f ServiceNamespace)
-> DescribeScalingActivities -> f DescribeScalingActivities
describeScalingActivities_serviceNamespace = (DescribeScalingActivities -> ServiceNamespace)
-> (DescribeScalingActivities
-> ServiceNamespace -> DescribeScalingActivities)
-> Lens
DescribeScalingActivities
DescribeScalingActivities
ServiceNamespace
ServiceNamespace
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivities' {ServiceNamespace
serviceNamespace :: ServiceNamespace
$sel:serviceNamespace:DescribeScalingActivities' :: DescribeScalingActivities -> ServiceNamespace
serviceNamespace} -> ServiceNamespace
serviceNamespace) (\s :: DescribeScalingActivities
s@DescribeScalingActivities' {} ServiceNamespace
a -> DescribeScalingActivities
s {$sel:serviceNamespace:DescribeScalingActivities' :: ServiceNamespace
serviceNamespace = ServiceNamespace
a} :: DescribeScalingActivities)
instance Core.AWSPager DescribeScalingActivities where
page :: DescribeScalingActivities
-> AWSResponse DescribeScalingActivities
-> Maybe DescribeScalingActivities
page DescribeScalingActivities
rq AWSResponse DescribeScalingActivities
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeScalingActivities
DescribeScalingActivitiesResponse
rs
DescribeScalingActivitiesResponse
-> Getting (First Text) DescribeScalingActivitiesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScalingActivitiesResponse
-> Const (First Text) DescribeScalingActivitiesResponse
Lens' DescribeScalingActivitiesResponse (Maybe Text)
describeScalingActivitiesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScalingActivitiesResponse
-> Const (First Text) DescribeScalingActivitiesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeScalingActivitiesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeScalingActivities
forall a. Maybe a
Prelude.Nothing
| Maybe [ScalingActivity] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeScalingActivities
DescribeScalingActivitiesResponse
rs
DescribeScalingActivitiesResponse
-> Getting
(First [ScalingActivity])
DescribeScalingActivitiesResponse
[ScalingActivity]
-> Maybe [ScalingActivity]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ScalingActivity]
-> Const (First [ScalingActivity]) (Maybe [ScalingActivity]))
-> DescribeScalingActivitiesResponse
-> Const
(First [ScalingActivity]) DescribeScalingActivitiesResponse
Lens' DescribeScalingActivitiesResponse (Maybe [ScalingActivity])
describeScalingActivitiesResponse_scalingActivities
((Maybe [ScalingActivity]
-> Const (First [ScalingActivity]) (Maybe [ScalingActivity]))
-> DescribeScalingActivitiesResponse
-> Const
(First [ScalingActivity]) DescribeScalingActivitiesResponse)
-> (([ScalingActivity]
-> Const (First [ScalingActivity]) [ScalingActivity])
-> Maybe [ScalingActivity]
-> Const (First [ScalingActivity]) (Maybe [ScalingActivity]))
-> Getting
(First [ScalingActivity])
DescribeScalingActivitiesResponse
[ScalingActivity]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ScalingActivity]
-> Const (First [ScalingActivity]) [ScalingActivity])
-> Maybe [ScalingActivity]
-> Const (First [ScalingActivity]) (Maybe [ScalingActivity])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeScalingActivities
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeScalingActivities -> Maybe DescribeScalingActivities
forall a. a -> Maybe a
Prelude.Just (DescribeScalingActivities -> Maybe DescribeScalingActivities)
-> DescribeScalingActivities -> Maybe DescribeScalingActivities
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeScalingActivities
rq
DescribeScalingActivities
-> (DescribeScalingActivities -> DescribeScalingActivities)
-> DescribeScalingActivities
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeScalingActivities -> Identity DescribeScalingActivities
Lens
DescribeScalingActivities
DescribeScalingActivities
(Maybe Text)
(Maybe Text)
describeScalingActivities_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeScalingActivities -> Identity DescribeScalingActivities)
-> Maybe Text
-> DescribeScalingActivities
-> DescribeScalingActivities
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeScalingActivities
DescribeScalingActivitiesResponse
rs
DescribeScalingActivitiesResponse
-> Getting (First Text) DescribeScalingActivitiesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScalingActivitiesResponse
-> Const (First Text) DescribeScalingActivitiesResponse
Lens' DescribeScalingActivitiesResponse (Maybe Text)
describeScalingActivitiesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScalingActivitiesResponse
-> Const (First Text) DescribeScalingActivitiesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeScalingActivitiesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest DescribeScalingActivities where
type
AWSResponse DescribeScalingActivities =
DescribeScalingActivitiesResponse
request :: DescribeScalingActivities -> Request DescribeScalingActivities
request = Service
-> DescribeScalingActivities -> Request DescribeScalingActivities
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeScalingActivities
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeScalingActivities)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeScalingActivities))
-> Logger
-> Service
-> Proxy DescribeScalingActivities
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeScalingActivities)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [ScalingActivity]
-> Maybe Text -> Int -> DescribeScalingActivitiesResponse
DescribeScalingActivitiesResponse'
(Maybe [ScalingActivity]
-> Maybe Text -> Int -> DescribeScalingActivitiesResponse)
-> Either String (Maybe [ScalingActivity])
-> Either
String (Maybe Text -> Int -> DescribeScalingActivitiesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [ScalingActivity]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ScalingActivities"
Either String (Maybe (Maybe [ScalingActivity]))
-> Maybe [ScalingActivity]
-> Either String (Maybe [ScalingActivity])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ScalingActivity]
forall a. Monoid a => a
Prelude.mempty
)
Either
String (Maybe Text -> Int -> DescribeScalingActivitiesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeScalingActivitiesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
Either String (Int -> DescribeScalingActivitiesResponse)
-> Either String Int
-> Either String DescribeScalingActivitiesResponse
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 DescribeScalingActivities
instance Prelude.NFData DescribeScalingActivities
instance Core.ToHeaders DescribeScalingActivities where
toHeaders :: DescribeScalingActivities -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeScalingActivities -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AnyScaleFrontendService.DescribeScalingActivities" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DescribeScalingActivities where
toJSON :: DescribeScalingActivities -> Value
toJSON DescribeScalingActivities' {Maybe Int
Maybe Text
Maybe ScalableDimension
ServiceNamespace
serviceNamespace :: ServiceNamespace
maxResults :: Maybe Int
nextToken :: Maybe Text
resourceId :: Maybe Text
scalableDimension :: Maybe ScalableDimension
$sel:serviceNamespace:DescribeScalingActivities' :: DescribeScalingActivities -> ServiceNamespace
$sel:maxResults:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Int
$sel:nextToken:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Text
$sel:resourceId:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe Text
$sel:scalableDimension:DescribeScalingActivities' :: DescribeScalingActivities -> Maybe ScalableDimension
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ScalableDimension" Text -> ScalableDimension -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ScalableDimension -> Pair)
-> Maybe ScalableDimension -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ScalableDimension
scalableDimension,
(Text
"ResourceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resourceId,
(Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Text
"MaxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ServiceNamespace" Text -> ServiceNamespace -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ServiceNamespace
serviceNamespace)
]
)
instance Core.ToPath DescribeScalingActivities where
toPath :: DescribeScalingActivities -> ByteString
toPath = ByteString -> DescribeScalingActivities -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeScalingActivities where
toQuery :: DescribeScalingActivities -> QueryString
toQuery = QueryString -> DescribeScalingActivities -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeScalingActivitiesResponse = DescribeScalingActivitiesResponse'
{
DescribeScalingActivitiesResponse -> Maybe [ScalingActivity]
scalingActivities :: Prelude.Maybe [ScalingActivity],
DescribeScalingActivitiesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeScalingActivitiesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeScalingActivitiesResponse
-> DescribeScalingActivitiesResponse -> Bool
(DescribeScalingActivitiesResponse
-> DescribeScalingActivitiesResponse -> Bool)
-> (DescribeScalingActivitiesResponse
-> DescribeScalingActivitiesResponse -> Bool)
-> Eq DescribeScalingActivitiesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeScalingActivitiesResponse
-> DescribeScalingActivitiesResponse -> Bool
$c/= :: DescribeScalingActivitiesResponse
-> DescribeScalingActivitiesResponse -> Bool
== :: DescribeScalingActivitiesResponse
-> DescribeScalingActivitiesResponse -> Bool
$c== :: DescribeScalingActivitiesResponse
-> DescribeScalingActivitiesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeScalingActivitiesResponse]
ReadPrec DescribeScalingActivitiesResponse
Int -> ReadS DescribeScalingActivitiesResponse
ReadS [DescribeScalingActivitiesResponse]
(Int -> ReadS DescribeScalingActivitiesResponse)
-> ReadS [DescribeScalingActivitiesResponse]
-> ReadPrec DescribeScalingActivitiesResponse
-> ReadPrec [DescribeScalingActivitiesResponse]
-> Read DescribeScalingActivitiesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeScalingActivitiesResponse]
$creadListPrec :: ReadPrec [DescribeScalingActivitiesResponse]
readPrec :: ReadPrec DescribeScalingActivitiesResponse
$creadPrec :: ReadPrec DescribeScalingActivitiesResponse
readList :: ReadS [DescribeScalingActivitiesResponse]
$creadList :: ReadS [DescribeScalingActivitiesResponse]
readsPrec :: Int -> ReadS DescribeScalingActivitiesResponse
$creadsPrec :: Int -> ReadS DescribeScalingActivitiesResponse
Prelude.Read, Int -> DescribeScalingActivitiesResponse -> ShowS
[DescribeScalingActivitiesResponse] -> ShowS
DescribeScalingActivitiesResponse -> String
(Int -> DescribeScalingActivitiesResponse -> ShowS)
-> (DescribeScalingActivitiesResponse -> String)
-> ([DescribeScalingActivitiesResponse] -> ShowS)
-> Show DescribeScalingActivitiesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeScalingActivitiesResponse] -> ShowS
$cshowList :: [DescribeScalingActivitiesResponse] -> ShowS
show :: DescribeScalingActivitiesResponse -> String
$cshow :: DescribeScalingActivitiesResponse -> String
showsPrec :: Int -> DescribeScalingActivitiesResponse -> ShowS
$cshowsPrec :: Int -> DescribeScalingActivitiesResponse -> ShowS
Prelude.Show, (forall x.
DescribeScalingActivitiesResponse
-> Rep DescribeScalingActivitiesResponse x)
-> (forall x.
Rep DescribeScalingActivitiesResponse x
-> DescribeScalingActivitiesResponse)
-> Generic DescribeScalingActivitiesResponse
forall x.
Rep DescribeScalingActivitiesResponse x
-> DescribeScalingActivitiesResponse
forall x.
DescribeScalingActivitiesResponse
-> Rep DescribeScalingActivitiesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeScalingActivitiesResponse x
-> DescribeScalingActivitiesResponse
$cfrom :: forall x.
DescribeScalingActivitiesResponse
-> Rep DescribeScalingActivitiesResponse x
Prelude.Generic)
newDescribeScalingActivitiesResponse ::
Prelude.Int ->
DescribeScalingActivitiesResponse
newDescribeScalingActivitiesResponse :: Int -> DescribeScalingActivitiesResponse
newDescribeScalingActivitiesResponse Int
pHttpStatus_ =
DescribeScalingActivitiesResponse' :: Maybe [ScalingActivity]
-> Maybe Text -> Int -> DescribeScalingActivitiesResponse
DescribeScalingActivitiesResponse'
{ $sel:scalingActivities:DescribeScalingActivitiesResponse' :: Maybe [ScalingActivity]
scalingActivities =
Maybe [ScalingActivity]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeScalingActivitiesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeScalingActivitiesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeScalingActivitiesResponse_scalingActivities :: Lens.Lens' DescribeScalingActivitiesResponse (Prelude.Maybe [ScalingActivity])
describeScalingActivitiesResponse_scalingActivities :: (Maybe [ScalingActivity] -> f (Maybe [ScalingActivity]))
-> DescribeScalingActivitiesResponse
-> f DescribeScalingActivitiesResponse
describeScalingActivitiesResponse_scalingActivities = (DescribeScalingActivitiesResponse -> Maybe [ScalingActivity])
-> (DescribeScalingActivitiesResponse
-> Maybe [ScalingActivity] -> DescribeScalingActivitiesResponse)
-> Lens'
DescribeScalingActivitiesResponse (Maybe [ScalingActivity])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivitiesResponse' {Maybe [ScalingActivity]
scalingActivities :: Maybe [ScalingActivity]
$sel:scalingActivities:DescribeScalingActivitiesResponse' :: DescribeScalingActivitiesResponse -> Maybe [ScalingActivity]
scalingActivities} -> Maybe [ScalingActivity]
scalingActivities) (\s :: DescribeScalingActivitiesResponse
s@DescribeScalingActivitiesResponse' {} Maybe [ScalingActivity]
a -> DescribeScalingActivitiesResponse
s {$sel:scalingActivities:DescribeScalingActivitiesResponse' :: Maybe [ScalingActivity]
scalingActivities = Maybe [ScalingActivity]
a} :: DescribeScalingActivitiesResponse) ((Maybe [ScalingActivity] -> f (Maybe [ScalingActivity]))
-> DescribeScalingActivitiesResponse
-> f DescribeScalingActivitiesResponse)
-> ((Maybe [ScalingActivity] -> f (Maybe [ScalingActivity]))
-> Maybe [ScalingActivity] -> f (Maybe [ScalingActivity]))
-> (Maybe [ScalingActivity] -> f (Maybe [ScalingActivity]))
-> DescribeScalingActivitiesResponse
-> f DescribeScalingActivitiesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ScalingActivity]
[ScalingActivity]
[ScalingActivity]
[ScalingActivity]
-> Iso
(Maybe [ScalingActivity])
(Maybe [ScalingActivity])
(Maybe [ScalingActivity])
(Maybe [ScalingActivity])
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
[ScalingActivity]
[ScalingActivity]
[ScalingActivity]
[ScalingActivity]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeScalingActivitiesResponse_nextToken :: Lens.Lens' DescribeScalingActivitiesResponse (Prelude.Maybe Prelude.Text)
describeScalingActivitiesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeScalingActivitiesResponse
-> f DescribeScalingActivitiesResponse
describeScalingActivitiesResponse_nextToken = (DescribeScalingActivitiesResponse -> Maybe Text)
-> (DescribeScalingActivitiesResponse
-> Maybe Text -> DescribeScalingActivitiesResponse)
-> Lens' DescribeScalingActivitiesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivitiesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeScalingActivitiesResponse' :: DescribeScalingActivitiesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeScalingActivitiesResponse
s@DescribeScalingActivitiesResponse' {} Maybe Text
a -> DescribeScalingActivitiesResponse
s {$sel:nextToken:DescribeScalingActivitiesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeScalingActivitiesResponse)
describeScalingActivitiesResponse_httpStatus :: Lens.Lens' DescribeScalingActivitiesResponse Prelude.Int
describeScalingActivitiesResponse_httpStatus :: (Int -> f Int)
-> DescribeScalingActivitiesResponse
-> f DescribeScalingActivitiesResponse
describeScalingActivitiesResponse_httpStatus = (DescribeScalingActivitiesResponse -> Int)
-> (DescribeScalingActivitiesResponse
-> Int -> DescribeScalingActivitiesResponse)
-> Lens
DescribeScalingActivitiesResponse
DescribeScalingActivitiesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingActivitiesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeScalingActivitiesResponse' :: DescribeScalingActivitiesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeScalingActivitiesResponse
s@DescribeScalingActivitiesResponse' {} Int
a -> DescribeScalingActivitiesResponse
s {$sel:httpStatus:DescribeScalingActivitiesResponse' :: Int
httpStatus = Int
a} :: DescribeScalingActivitiesResponse)
instance
Prelude.NFData
DescribeScalingActivitiesResponse