{-# 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.GameLift.DescribeScalingPolicies
(
DescribeScalingPolicies (..),
newDescribeScalingPolicies,
describeScalingPolicies_location,
describeScalingPolicies_nextToken,
describeScalingPolicies_statusFilter,
describeScalingPolicies_limit,
describeScalingPolicies_fleetId,
DescribeScalingPoliciesResponse (..),
newDescribeScalingPoliciesResponse,
describeScalingPoliciesResponse_nextToken,
describeScalingPoliciesResponse_scalingPolicies,
describeScalingPoliciesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.GameLift.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 DescribeScalingPolicies = DescribeScalingPolicies'
{
DescribeScalingPolicies -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
DescribeScalingPolicies -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeScalingPolicies -> Maybe ScalingStatusType
statusFilter :: Prelude.Maybe ScalingStatusType,
DescribeScalingPolicies -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
DescribeScalingPolicies -> Text
fleetId :: Prelude.Text
}
deriving (DescribeScalingPolicies -> DescribeScalingPolicies -> Bool
(DescribeScalingPolicies -> DescribeScalingPolicies -> Bool)
-> (DescribeScalingPolicies -> DescribeScalingPolicies -> Bool)
-> Eq DescribeScalingPolicies
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeScalingPolicies -> DescribeScalingPolicies -> Bool
$c/= :: DescribeScalingPolicies -> DescribeScalingPolicies -> Bool
== :: DescribeScalingPolicies -> DescribeScalingPolicies -> Bool
$c== :: DescribeScalingPolicies -> DescribeScalingPolicies -> Bool
Prelude.Eq, ReadPrec [DescribeScalingPolicies]
ReadPrec DescribeScalingPolicies
Int -> ReadS DescribeScalingPolicies
ReadS [DescribeScalingPolicies]
(Int -> ReadS DescribeScalingPolicies)
-> ReadS [DescribeScalingPolicies]
-> ReadPrec DescribeScalingPolicies
-> ReadPrec [DescribeScalingPolicies]
-> Read DescribeScalingPolicies
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeScalingPolicies]
$creadListPrec :: ReadPrec [DescribeScalingPolicies]
readPrec :: ReadPrec DescribeScalingPolicies
$creadPrec :: ReadPrec DescribeScalingPolicies
readList :: ReadS [DescribeScalingPolicies]
$creadList :: ReadS [DescribeScalingPolicies]
readsPrec :: Int -> ReadS DescribeScalingPolicies
$creadsPrec :: Int -> ReadS DescribeScalingPolicies
Prelude.Read, Int -> DescribeScalingPolicies -> ShowS
[DescribeScalingPolicies] -> ShowS
DescribeScalingPolicies -> String
(Int -> DescribeScalingPolicies -> ShowS)
-> (DescribeScalingPolicies -> String)
-> ([DescribeScalingPolicies] -> ShowS)
-> Show DescribeScalingPolicies
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeScalingPolicies] -> ShowS
$cshowList :: [DescribeScalingPolicies] -> ShowS
show :: DescribeScalingPolicies -> String
$cshow :: DescribeScalingPolicies -> String
showsPrec :: Int -> DescribeScalingPolicies -> ShowS
$cshowsPrec :: Int -> DescribeScalingPolicies -> ShowS
Prelude.Show, (forall x.
DescribeScalingPolicies -> Rep DescribeScalingPolicies x)
-> (forall x.
Rep DescribeScalingPolicies x -> DescribeScalingPolicies)
-> Generic DescribeScalingPolicies
forall x. Rep DescribeScalingPolicies x -> DescribeScalingPolicies
forall x. DescribeScalingPolicies -> Rep DescribeScalingPolicies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeScalingPolicies x -> DescribeScalingPolicies
$cfrom :: forall x. DescribeScalingPolicies -> Rep DescribeScalingPolicies x
Prelude.Generic)
newDescribeScalingPolicies ::
Prelude.Text ->
DescribeScalingPolicies
newDescribeScalingPolicies :: Text -> DescribeScalingPolicies
newDescribeScalingPolicies Text
pFleetId_ =
DescribeScalingPolicies' :: Maybe Text
-> Maybe Text
-> Maybe ScalingStatusType
-> Maybe Natural
-> Text
-> DescribeScalingPolicies
DescribeScalingPolicies'
{ $sel:location:DescribeScalingPolicies' :: Maybe Text
location =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeScalingPolicies' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusFilter:DescribeScalingPolicies' :: Maybe ScalingStatusType
statusFilter = Maybe ScalingStatusType
forall a. Maybe a
Prelude.Nothing,
$sel:limit:DescribeScalingPolicies' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:fleetId:DescribeScalingPolicies' :: Text
fleetId = Text
pFleetId_
}
describeScalingPolicies_location :: Lens.Lens' DescribeScalingPolicies (Prelude.Maybe Prelude.Text)
describeScalingPolicies_location :: (Maybe Text -> f (Maybe Text))
-> DescribeScalingPolicies -> f DescribeScalingPolicies
describeScalingPolicies_location = (DescribeScalingPolicies -> Maybe Text)
-> (DescribeScalingPolicies
-> Maybe Text -> DescribeScalingPolicies)
-> Lens
DescribeScalingPolicies
DescribeScalingPolicies
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingPolicies' {Maybe Text
location :: Maybe Text
$sel:location:DescribeScalingPolicies' :: DescribeScalingPolicies -> Maybe Text
location} -> Maybe Text
location) (\s :: DescribeScalingPolicies
s@DescribeScalingPolicies' {} Maybe Text
a -> DescribeScalingPolicies
s {$sel:location:DescribeScalingPolicies' :: Maybe Text
location = Maybe Text
a} :: DescribeScalingPolicies)
describeScalingPolicies_nextToken :: Lens.Lens' DescribeScalingPolicies (Prelude.Maybe Prelude.Text)
describeScalingPolicies_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeScalingPolicies -> f DescribeScalingPolicies
describeScalingPolicies_nextToken = (DescribeScalingPolicies -> Maybe Text)
-> (DescribeScalingPolicies
-> Maybe Text -> DescribeScalingPolicies)
-> Lens
DescribeScalingPolicies
DescribeScalingPolicies
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingPolicies' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeScalingPolicies' :: DescribeScalingPolicies -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeScalingPolicies
s@DescribeScalingPolicies' {} Maybe Text
a -> DescribeScalingPolicies
s {$sel:nextToken:DescribeScalingPolicies' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeScalingPolicies)
describeScalingPolicies_statusFilter :: Lens.Lens' DescribeScalingPolicies (Prelude.Maybe ScalingStatusType)
describeScalingPolicies_statusFilter :: (Maybe ScalingStatusType -> f (Maybe ScalingStatusType))
-> DescribeScalingPolicies -> f DescribeScalingPolicies
describeScalingPolicies_statusFilter = (DescribeScalingPolicies -> Maybe ScalingStatusType)
-> (DescribeScalingPolicies
-> Maybe ScalingStatusType -> DescribeScalingPolicies)
-> Lens
DescribeScalingPolicies
DescribeScalingPolicies
(Maybe ScalingStatusType)
(Maybe ScalingStatusType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingPolicies' {Maybe ScalingStatusType
statusFilter :: Maybe ScalingStatusType
$sel:statusFilter:DescribeScalingPolicies' :: DescribeScalingPolicies -> Maybe ScalingStatusType
statusFilter} -> Maybe ScalingStatusType
statusFilter) (\s :: DescribeScalingPolicies
s@DescribeScalingPolicies' {} Maybe ScalingStatusType
a -> DescribeScalingPolicies
s {$sel:statusFilter:DescribeScalingPolicies' :: Maybe ScalingStatusType
statusFilter = Maybe ScalingStatusType
a} :: DescribeScalingPolicies)
describeScalingPolicies_limit :: Lens.Lens' DescribeScalingPolicies (Prelude.Maybe Prelude.Natural)
describeScalingPolicies_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeScalingPolicies -> f DescribeScalingPolicies
describeScalingPolicies_limit = (DescribeScalingPolicies -> Maybe Natural)
-> (DescribeScalingPolicies
-> Maybe Natural -> DescribeScalingPolicies)
-> Lens
DescribeScalingPolicies
DescribeScalingPolicies
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingPolicies' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeScalingPolicies' :: DescribeScalingPolicies -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeScalingPolicies
s@DescribeScalingPolicies' {} Maybe Natural
a -> DescribeScalingPolicies
s {$sel:limit:DescribeScalingPolicies' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeScalingPolicies)
describeScalingPolicies_fleetId :: Lens.Lens' DescribeScalingPolicies Prelude.Text
describeScalingPolicies_fleetId :: (Text -> f Text)
-> DescribeScalingPolicies -> f DescribeScalingPolicies
describeScalingPolicies_fleetId = (DescribeScalingPolicies -> Text)
-> (DescribeScalingPolicies -> Text -> DescribeScalingPolicies)
-> Lens DescribeScalingPolicies DescribeScalingPolicies Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingPolicies' {Text
fleetId :: Text
$sel:fleetId:DescribeScalingPolicies' :: DescribeScalingPolicies -> Text
fleetId} -> Text
fleetId) (\s :: DescribeScalingPolicies
s@DescribeScalingPolicies' {} Text
a -> DescribeScalingPolicies
s {$sel:fleetId:DescribeScalingPolicies' :: Text
fleetId = Text
a} :: DescribeScalingPolicies)
instance Core.AWSPager DescribeScalingPolicies where
page :: DescribeScalingPolicies
-> AWSResponse DescribeScalingPolicies
-> Maybe DescribeScalingPolicies
page DescribeScalingPolicies
rq AWSResponse DescribeScalingPolicies
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeScalingPolicies
DescribeScalingPoliciesResponse
rs
DescribeScalingPoliciesResponse
-> Getting (First Text) DescribeScalingPoliciesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScalingPoliciesResponse
-> Const (First Text) DescribeScalingPoliciesResponse
Lens' DescribeScalingPoliciesResponse (Maybe Text)
describeScalingPoliciesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScalingPoliciesResponse
-> Const (First Text) DescribeScalingPoliciesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeScalingPoliciesResponse 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 DescribeScalingPolicies
forall a. Maybe a
Prelude.Nothing
| Maybe [ScalingPolicy] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeScalingPolicies
DescribeScalingPoliciesResponse
rs
DescribeScalingPoliciesResponse
-> Getting
(First [ScalingPolicy])
DescribeScalingPoliciesResponse
[ScalingPolicy]
-> Maybe [ScalingPolicy]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ScalingPolicy]
-> Const (First [ScalingPolicy]) (Maybe [ScalingPolicy]))
-> DescribeScalingPoliciesResponse
-> Const (First [ScalingPolicy]) DescribeScalingPoliciesResponse
Lens' DescribeScalingPoliciesResponse (Maybe [ScalingPolicy])
describeScalingPoliciesResponse_scalingPolicies
((Maybe [ScalingPolicy]
-> Const (First [ScalingPolicy]) (Maybe [ScalingPolicy]))
-> DescribeScalingPoliciesResponse
-> Const (First [ScalingPolicy]) DescribeScalingPoliciesResponse)
-> (([ScalingPolicy]
-> Const (First [ScalingPolicy]) [ScalingPolicy])
-> Maybe [ScalingPolicy]
-> Const (First [ScalingPolicy]) (Maybe [ScalingPolicy]))
-> Getting
(First [ScalingPolicy])
DescribeScalingPoliciesResponse
[ScalingPolicy]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ScalingPolicy] -> Const (First [ScalingPolicy]) [ScalingPolicy])
-> Maybe [ScalingPolicy]
-> Const (First [ScalingPolicy]) (Maybe [ScalingPolicy])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeScalingPolicies
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeScalingPolicies -> Maybe DescribeScalingPolicies
forall a. a -> Maybe a
Prelude.Just (DescribeScalingPolicies -> Maybe DescribeScalingPolicies)
-> DescribeScalingPolicies -> Maybe DescribeScalingPolicies
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeScalingPolicies
rq
DescribeScalingPolicies
-> (DescribeScalingPolicies -> DescribeScalingPolicies)
-> DescribeScalingPolicies
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeScalingPolicies -> Identity DescribeScalingPolicies
Lens
DescribeScalingPolicies
DescribeScalingPolicies
(Maybe Text)
(Maybe Text)
describeScalingPolicies_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeScalingPolicies -> Identity DescribeScalingPolicies)
-> Maybe Text -> DescribeScalingPolicies -> DescribeScalingPolicies
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeScalingPolicies
DescribeScalingPoliciesResponse
rs
DescribeScalingPoliciesResponse
-> Getting (First Text) DescribeScalingPoliciesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScalingPoliciesResponse
-> Const (First Text) DescribeScalingPoliciesResponse
Lens' DescribeScalingPoliciesResponse (Maybe Text)
describeScalingPoliciesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScalingPoliciesResponse
-> Const (First Text) DescribeScalingPoliciesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeScalingPoliciesResponse 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 DescribeScalingPolicies where
type
AWSResponse DescribeScalingPolicies =
DescribeScalingPoliciesResponse
request :: DescribeScalingPolicies -> Request DescribeScalingPolicies
request = Service
-> DescribeScalingPolicies -> Request DescribeScalingPolicies
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeScalingPolicies
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeScalingPolicies)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeScalingPolicies))
-> Logger
-> Service
-> Proxy DescribeScalingPolicies
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeScalingPolicies)))
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 Text
-> Maybe [ScalingPolicy] -> Int -> DescribeScalingPoliciesResponse
DescribeScalingPoliciesResponse'
(Maybe Text
-> Maybe [ScalingPolicy] -> Int -> DescribeScalingPoliciesResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [ScalingPolicy] -> Int -> DescribeScalingPoliciesResponse)
forall (f :: * -> *) a b. Functor 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
(Maybe [ScalingPolicy] -> Int -> DescribeScalingPoliciesResponse)
-> Either String (Maybe [ScalingPolicy])
-> Either String (Int -> DescribeScalingPoliciesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [ScalingPolicy]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ScalingPolicies"
Either String (Maybe (Maybe [ScalingPolicy]))
-> Maybe [ScalingPolicy] -> Either String (Maybe [ScalingPolicy])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ScalingPolicy]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Int -> DescribeScalingPoliciesResponse)
-> Either String Int
-> Either String DescribeScalingPoliciesResponse
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 DescribeScalingPolicies
instance Prelude.NFData DescribeScalingPolicies
instance Core.ToHeaders DescribeScalingPolicies where
toHeaders :: DescribeScalingPolicies -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeScalingPolicies -> 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
"GameLift.DescribeScalingPolicies" ::
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 DescribeScalingPolicies where
toJSON :: DescribeScalingPolicies -> Value
toJSON DescribeScalingPolicies' {Maybe Natural
Maybe Text
Maybe ScalingStatusType
Text
fleetId :: Text
limit :: Maybe Natural
statusFilter :: Maybe ScalingStatusType
nextToken :: Maybe Text
location :: Maybe Text
$sel:fleetId:DescribeScalingPolicies' :: DescribeScalingPolicies -> Text
$sel:limit:DescribeScalingPolicies' :: DescribeScalingPolicies -> Maybe Natural
$sel:statusFilter:DescribeScalingPolicies' :: DescribeScalingPolicies -> Maybe ScalingStatusType
$sel:nextToken:DescribeScalingPolicies' :: DescribeScalingPolicies -> Maybe Text
$sel:location:DescribeScalingPolicies' :: DescribeScalingPolicies -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Location" 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
location,
(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
"StatusFilter" Text -> ScalingStatusType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ScalingStatusType -> Pair)
-> Maybe ScalingStatusType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ScalingStatusType
statusFilter,
(Text
"Limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"FleetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fleetId)
]
)
instance Core.ToPath DescribeScalingPolicies where
toPath :: DescribeScalingPolicies -> ByteString
toPath = ByteString -> DescribeScalingPolicies -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeScalingPolicies where
toQuery :: DescribeScalingPolicies -> QueryString
toQuery = QueryString -> DescribeScalingPolicies -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeScalingPoliciesResponse = DescribeScalingPoliciesResponse'
{
DescribeScalingPoliciesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeScalingPoliciesResponse -> Maybe [ScalingPolicy]
scalingPolicies :: Prelude.Maybe [ScalingPolicy],
DescribeScalingPoliciesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeScalingPoliciesResponse
-> DescribeScalingPoliciesResponse -> Bool
(DescribeScalingPoliciesResponse
-> DescribeScalingPoliciesResponse -> Bool)
-> (DescribeScalingPoliciesResponse
-> DescribeScalingPoliciesResponse -> Bool)
-> Eq DescribeScalingPoliciesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeScalingPoliciesResponse
-> DescribeScalingPoliciesResponse -> Bool
$c/= :: DescribeScalingPoliciesResponse
-> DescribeScalingPoliciesResponse -> Bool
== :: DescribeScalingPoliciesResponse
-> DescribeScalingPoliciesResponse -> Bool
$c== :: DescribeScalingPoliciesResponse
-> DescribeScalingPoliciesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeScalingPoliciesResponse]
ReadPrec DescribeScalingPoliciesResponse
Int -> ReadS DescribeScalingPoliciesResponse
ReadS [DescribeScalingPoliciesResponse]
(Int -> ReadS DescribeScalingPoliciesResponse)
-> ReadS [DescribeScalingPoliciesResponse]
-> ReadPrec DescribeScalingPoliciesResponse
-> ReadPrec [DescribeScalingPoliciesResponse]
-> Read DescribeScalingPoliciesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeScalingPoliciesResponse]
$creadListPrec :: ReadPrec [DescribeScalingPoliciesResponse]
readPrec :: ReadPrec DescribeScalingPoliciesResponse
$creadPrec :: ReadPrec DescribeScalingPoliciesResponse
readList :: ReadS [DescribeScalingPoliciesResponse]
$creadList :: ReadS [DescribeScalingPoliciesResponse]
readsPrec :: Int -> ReadS DescribeScalingPoliciesResponse
$creadsPrec :: Int -> ReadS DescribeScalingPoliciesResponse
Prelude.Read, Int -> DescribeScalingPoliciesResponse -> ShowS
[DescribeScalingPoliciesResponse] -> ShowS
DescribeScalingPoliciesResponse -> String
(Int -> DescribeScalingPoliciesResponse -> ShowS)
-> (DescribeScalingPoliciesResponse -> String)
-> ([DescribeScalingPoliciesResponse] -> ShowS)
-> Show DescribeScalingPoliciesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeScalingPoliciesResponse] -> ShowS
$cshowList :: [DescribeScalingPoliciesResponse] -> ShowS
show :: DescribeScalingPoliciesResponse -> String
$cshow :: DescribeScalingPoliciesResponse -> String
showsPrec :: Int -> DescribeScalingPoliciesResponse -> ShowS
$cshowsPrec :: Int -> DescribeScalingPoliciesResponse -> ShowS
Prelude.Show, (forall x.
DescribeScalingPoliciesResponse
-> Rep DescribeScalingPoliciesResponse x)
-> (forall x.
Rep DescribeScalingPoliciesResponse x
-> DescribeScalingPoliciesResponse)
-> Generic DescribeScalingPoliciesResponse
forall x.
Rep DescribeScalingPoliciesResponse x
-> DescribeScalingPoliciesResponse
forall x.
DescribeScalingPoliciesResponse
-> Rep DescribeScalingPoliciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeScalingPoliciesResponse x
-> DescribeScalingPoliciesResponse
$cfrom :: forall x.
DescribeScalingPoliciesResponse
-> Rep DescribeScalingPoliciesResponse x
Prelude.Generic)
newDescribeScalingPoliciesResponse ::
Prelude.Int ->
DescribeScalingPoliciesResponse
newDescribeScalingPoliciesResponse :: Int -> DescribeScalingPoliciesResponse
newDescribeScalingPoliciesResponse Int
pHttpStatus_ =
DescribeScalingPoliciesResponse' :: Maybe Text
-> Maybe [ScalingPolicy] -> Int -> DescribeScalingPoliciesResponse
DescribeScalingPoliciesResponse'
{ $sel:nextToken:DescribeScalingPoliciesResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:scalingPolicies:DescribeScalingPoliciesResponse' :: Maybe [ScalingPolicy]
scalingPolicies = Maybe [ScalingPolicy]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeScalingPoliciesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeScalingPoliciesResponse_nextToken :: Lens.Lens' DescribeScalingPoliciesResponse (Prelude.Maybe Prelude.Text)
describeScalingPoliciesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeScalingPoliciesResponse
-> f DescribeScalingPoliciesResponse
describeScalingPoliciesResponse_nextToken = (DescribeScalingPoliciesResponse -> Maybe Text)
-> (DescribeScalingPoliciesResponse
-> Maybe Text -> DescribeScalingPoliciesResponse)
-> Lens' DescribeScalingPoliciesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingPoliciesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeScalingPoliciesResponse' :: DescribeScalingPoliciesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeScalingPoliciesResponse
s@DescribeScalingPoliciesResponse' {} Maybe Text
a -> DescribeScalingPoliciesResponse
s {$sel:nextToken:DescribeScalingPoliciesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeScalingPoliciesResponse)
describeScalingPoliciesResponse_scalingPolicies :: Lens.Lens' DescribeScalingPoliciesResponse (Prelude.Maybe [ScalingPolicy])
describeScalingPoliciesResponse_scalingPolicies :: (Maybe [ScalingPolicy] -> f (Maybe [ScalingPolicy]))
-> DescribeScalingPoliciesResponse
-> f DescribeScalingPoliciesResponse
describeScalingPoliciesResponse_scalingPolicies = (DescribeScalingPoliciesResponse -> Maybe [ScalingPolicy])
-> (DescribeScalingPoliciesResponse
-> Maybe [ScalingPolicy] -> DescribeScalingPoliciesResponse)
-> Lens' DescribeScalingPoliciesResponse (Maybe [ScalingPolicy])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingPoliciesResponse' {Maybe [ScalingPolicy]
scalingPolicies :: Maybe [ScalingPolicy]
$sel:scalingPolicies:DescribeScalingPoliciesResponse' :: DescribeScalingPoliciesResponse -> Maybe [ScalingPolicy]
scalingPolicies} -> Maybe [ScalingPolicy]
scalingPolicies) (\s :: DescribeScalingPoliciesResponse
s@DescribeScalingPoliciesResponse' {} Maybe [ScalingPolicy]
a -> DescribeScalingPoliciesResponse
s {$sel:scalingPolicies:DescribeScalingPoliciesResponse' :: Maybe [ScalingPolicy]
scalingPolicies = Maybe [ScalingPolicy]
a} :: DescribeScalingPoliciesResponse) ((Maybe [ScalingPolicy] -> f (Maybe [ScalingPolicy]))
-> DescribeScalingPoliciesResponse
-> f DescribeScalingPoliciesResponse)
-> ((Maybe [ScalingPolicy] -> f (Maybe [ScalingPolicy]))
-> Maybe [ScalingPolicy] -> f (Maybe [ScalingPolicy]))
-> (Maybe [ScalingPolicy] -> f (Maybe [ScalingPolicy]))
-> DescribeScalingPoliciesResponse
-> f DescribeScalingPoliciesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ScalingPolicy] [ScalingPolicy] [ScalingPolicy] [ScalingPolicy]
-> Iso
(Maybe [ScalingPolicy])
(Maybe [ScalingPolicy])
(Maybe [ScalingPolicy])
(Maybe [ScalingPolicy])
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
[ScalingPolicy] [ScalingPolicy] [ScalingPolicy] [ScalingPolicy]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeScalingPoliciesResponse_httpStatus :: Lens.Lens' DescribeScalingPoliciesResponse Prelude.Int
describeScalingPoliciesResponse_httpStatus :: (Int -> f Int)
-> DescribeScalingPoliciesResponse
-> f DescribeScalingPoliciesResponse
describeScalingPoliciesResponse_httpStatus = (DescribeScalingPoliciesResponse -> Int)
-> (DescribeScalingPoliciesResponse
-> Int -> DescribeScalingPoliciesResponse)
-> Lens
DescribeScalingPoliciesResponse
DescribeScalingPoliciesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScalingPoliciesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeScalingPoliciesResponse' :: DescribeScalingPoliciesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeScalingPoliciesResponse
s@DescribeScalingPoliciesResponse' {} Int
a -> DescribeScalingPoliciesResponse
s {$sel:httpStatus:DescribeScalingPoliciesResponse' :: Int
httpStatus = Int
a} :: DescribeScalingPoliciesResponse)
instance
Prelude.NFData
DescribeScalingPoliciesResponse