{-# 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.DescribeScheduledActions
(
DescribeScheduledActions (..),
newDescribeScheduledActions,
describeScheduledActions_scalableDimension,
describeScheduledActions_resourceId,
describeScheduledActions_nextToken,
describeScheduledActions_scheduledActionNames,
describeScheduledActions_maxResults,
describeScheduledActions_serviceNamespace,
DescribeScheduledActionsResponse (..),
newDescribeScheduledActionsResponse,
describeScheduledActionsResponse_nextToken,
describeScheduledActionsResponse_scheduledActions,
describeScheduledActionsResponse_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 DescribeScheduledActions = DescribeScheduledActions'
{
DescribeScheduledActions -> Maybe ScalableDimension
scalableDimension :: Prelude.Maybe ScalableDimension,
DescribeScheduledActions -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
DescribeScheduledActions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeScheduledActions -> Maybe [Text]
scheduledActionNames :: Prelude.Maybe [Prelude.Text],
DescribeScheduledActions -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
DescribeScheduledActions -> ServiceNamespace
serviceNamespace :: ServiceNamespace
}
deriving (DescribeScheduledActions -> DescribeScheduledActions -> Bool
(DescribeScheduledActions -> DescribeScheduledActions -> Bool)
-> (DescribeScheduledActions -> DescribeScheduledActions -> Bool)
-> Eq DescribeScheduledActions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeScheduledActions -> DescribeScheduledActions -> Bool
$c/= :: DescribeScheduledActions -> DescribeScheduledActions -> Bool
== :: DescribeScheduledActions -> DescribeScheduledActions -> Bool
$c== :: DescribeScheduledActions -> DescribeScheduledActions -> Bool
Prelude.Eq, ReadPrec [DescribeScheduledActions]
ReadPrec DescribeScheduledActions
Int -> ReadS DescribeScheduledActions
ReadS [DescribeScheduledActions]
(Int -> ReadS DescribeScheduledActions)
-> ReadS [DescribeScheduledActions]
-> ReadPrec DescribeScheduledActions
-> ReadPrec [DescribeScheduledActions]
-> Read DescribeScheduledActions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeScheduledActions]
$creadListPrec :: ReadPrec [DescribeScheduledActions]
readPrec :: ReadPrec DescribeScheduledActions
$creadPrec :: ReadPrec DescribeScheduledActions
readList :: ReadS [DescribeScheduledActions]
$creadList :: ReadS [DescribeScheduledActions]
readsPrec :: Int -> ReadS DescribeScheduledActions
$creadsPrec :: Int -> ReadS DescribeScheduledActions
Prelude.Read, Int -> DescribeScheduledActions -> ShowS
[DescribeScheduledActions] -> ShowS
DescribeScheduledActions -> String
(Int -> DescribeScheduledActions -> ShowS)
-> (DescribeScheduledActions -> String)
-> ([DescribeScheduledActions] -> ShowS)
-> Show DescribeScheduledActions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeScheduledActions] -> ShowS
$cshowList :: [DescribeScheduledActions] -> ShowS
show :: DescribeScheduledActions -> String
$cshow :: DescribeScheduledActions -> String
showsPrec :: Int -> DescribeScheduledActions -> ShowS
$cshowsPrec :: Int -> DescribeScheduledActions -> ShowS
Prelude.Show, (forall x.
DescribeScheduledActions -> Rep DescribeScheduledActions x)
-> (forall x.
Rep DescribeScheduledActions x -> DescribeScheduledActions)
-> Generic DescribeScheduledActions
forall x.
Rep DescribeScheduledActions x -> DescribeScheduledActions
forall x.
DescribeScheduledActions -> Rep DescribeScheduledActions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeScheduledActions x -> DescribeScheduledActions
$cfrom :: forall x.
DescribeScheduledActions -> Rep DescribeScheduledActions x
Prelude.Generic)
newDescribeScheduledActions ::
ServiceNamespace ->
DescribeScheduledActions
newDescribeScheduledActions :: ServiceNamespace -> DescribeScheduledActions
newDescribeScheduledActions ServiceNamespace
pServiceNamespace_ =
DescribeScheduledActions' :: Maybe ScalableDimension
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> ServiceNamespace
-> DescribeScheduledActions
DescribeScheduledActions'
{ $sel:scalableDimension:DescribeScheduledActions' :: Maybe ScalableDimension
scalableDimension =
Maybe ScalableDimension
forall a. Maybe a
Prelude.Nothing,
$sel:resourceId:DescribeScheduledActions' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeScheduledActions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:scheduledActionNames:DescribeScheduledActions' :: Maybe [Text]
scheduledActionNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeScheduledActions' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:serviceNamespace:DescribeScheduledActions' :: ServiceNamespace
serviceNamespace = ServiceNamespace
pServiceNamespace_
}
describeScheduledActions_scalableDimension :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe ScalableDimension)
describeScheduledActions_scalableDimension :: (Maybe ScalableDimension -> f (Maybe ScalableDimension))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_scalableDimension = (DescribeScheduledActions -> Maybe ScalableDimension)
-> (DescribeScheduledActions
-> Maybe ScalableDimension -> DescribeScheduledActions)
-> Lens
DescribeScheduledActions
DescribeScheduledActions
(Maybe ScalableDimension)
(Maybe ScalableDimension)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe ScalableDimension
scalableDimension :: Maybe ScalableDimension
$sel:scalableDimension:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe ScalableDimension
scalableDimension} -> Maybe ScalableDimension
scalableDimension) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe ScalableDimension
a -> DescribeScheduledActions
s {$sel:scalableDimension:DescribeScheduledActions' :: Maybe ScalableDimension
scalableDimension = Maybe ScalableDimension
a} :: DescribeScheduledActions)
describeScheduledActions_resourceId :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe Prelude.Text)
describeScheduledActions_resourceId :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_resourceId = (DescribeScheduledActions -> Maybe Text)
-> (DescribeScheduledActions
-> Maybe Text -> DescribeScheduledActions)
-> Lens
DescribeScheduledActions
DescribeScheduledActions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe Text
a -> DescribeScheduledActions
s {$sel:resourceId:DescribeScheduledActions' :: Maybe Text
resourceId = Maybe Text
a} :: DescribeScheduledActions)
describeScheduledActions_nextToken :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe Prelude.Text)
describeScheduledActions_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_nextToken = (DescribeScheduledActions -> Maybe Text)
-> (DescribeScheduledActions
-> Maybe Text -> DescribeScheduledActions)
-> Lens
DescribeScheduledActions
DescribeScheduledActions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe Text
a -> DescribeScheduledActions
s {$sel:nextToken:DescribeScheduledActions' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeScheduledActions)
describeScheduledActions_scheduledActionNames :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe [Prelude.Text])
describeScheduledActions_scheduledActionNames :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_scheduledActionNames = (DescribeScheduledActions -> Maybe [Text])
-> (DescribeScheduledActions
-> Maybe [Text] -> DescribeScheduledActions)
-> Lens
DescribeScheduledActions
DescribeScheduledActions
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe [Text]
scheduledActionNames :: Maybe [Text]
$sel:scheduledActionNames:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe [Text]
scheduledActionNames} -> Maybe [Text]
scheduledActionNames) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe [Text]
a -> DescribeScheduledActions
s {$sel:scheduledActionNames:DescribeScheduledActions' :: Maybe [Text]
scheduledActionNames = Maybe [Text]
a} :: DescribeScheduledActions) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeScheduledActions -> f DescribeScheduledActions)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeScheduledActions
-> f DescribeScheduledActions
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
describeScheduledActions_maxResults :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe Prelude.Int)
describeScheduledActions_maxResults :: (Maybe Int -> f (Maybe Int))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_maxResults = (DescribeScheduledActions -> Maybe Int)
-> (DescribeScheduledActions
-> Maybe Int -> DescribeScheduledActions)
-> Lens
DescribeScheduledActions
DescribeScheduledActions
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe Int
a -> DescribeScheduledActions
s {$sel:maxResults:DescribeScheduledActions' :: Maybe Int
maxResults = Maybe Int
a} :: DescribeScheduledActions)
describeScheduledActions_serviceNamespace :: Lens.Lens' DescribeScheduledActions ServiceNamespace
describeScheduledActions_serviceNamespace :: (ServiceNamespace -> f ServiceNamespace)
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_serviceNamespace = (DescribeScheduledActions -> ServiceNamespace)
-> (DescribeScheduledActions
-> ServiceNamespace -> DescribeScheduledActions)
-> Lens
DescribeScheduledActions
DescribeScheduledActions
ServiceNamespace
ServiceNamespace
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {ServiceNamespace
serviceNamespace :: ServiceNamespace
$sel:serviceNamespace:DescribeScheduledActions' :: DescribeScheduledActions -> ServiceNamespace
serviceNamespace} -> ServiceNamespace
serviceNamespace) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} ServiceNamespace
a -> DescribeScheduledActions
s {$sel:serviceNamespace:DescribeScheduledActions' :: ServiceNamespace
serviceNamespace = ServiceNamespace
a} :: DescribeScheduledActions)
instance Core.AWSPager DescribeScheduledActions where
page :: DescribeScheduledActions
-> AWSResponse DescribeScheduledActions
-> Maybe DescribeScheduledActions
page DescribeScheduledActions
rq AWSResponse DescribeScheduledActions
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeScheduledActions
DescribeScheduledActionsResponse
rs
DescribeScheduledActionsResponse
-> Getting (First Text) DescribeScheduledActionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScheduledActionsResponse
-> Const (First Text) DescribeScheduledActionsResponse
Lens' DescribeScheduledActionsResponse (Maybe Text)
describeScheduledActionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScheduledActionsResponse
-> Const (First Text) DescribeScheduledActionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeScheduledActionsResponse 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 DescribeScheduledActions
forall a. Maybe a
Prelude.Nothing
| Maybe [ScheduledAction] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeScheduledActions
DescribeScheduledActionsResponse
rs
DescribeScheduledActionsResponse
-> Getting
(First [ScheduledAction])
DescribeScheduledActionsResponse
[ScheduledAction]
-> Maybe [ScheduledAction]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ScheduledAction]
-> Const (First [ScheduledAction]) (Maybe [ScheduledAction]))
-> DescribeScheduledActionsResponse
-> Const (First [ScheduledAction]) DescribeScheduledActionsResponse
Lens' DescribeScheduledActionsResponse (Maybe [ScheduledAction])
describeScheduledActionsResponse_scheduledActions
((Maybe [ScheduledAction]
-> Const (First [ScheduledAction]) (Maybe [ScheduledAction]))
-> DescribeScheduledActionsResponse
-> Const
(First [ScheduledAction]) DescribeScheduledActionsResponse)
-> (([ScheduledAction]
-> Const (First [ScheduledAction]) [ScheduledAction])
-> Maybe [ScheduledAction]
-> Const (First [ScheduledAction]) (Maybe [ScheduledAction]))
-> Getting
(First [ScheduledAction])
DescribeScheduledActionsResponse
[ScheduledAction]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ScheduledAction]
-> Const (First [ScheduledAction]) [ScheduledAction])
-> Maybe [ScheduledAction]
-> Const (First [ScheduledAction]) (Maybe [ScheduledAction])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeScheduledActions
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeScheduledActions -> Maybe DescribeScheduledActions
forall a. a -> Maybe a
Prelude.Just (DescribeScheduledActions -> Maybe DescribeScheduledActions)
-> DescribeScheduledActions -> Maybe DescribeScheduledActions
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeScheduledActions
rq
DescribeScheduledActions
-> (DescribeScheduledActions -> DescribeScheduledActions)
-> DescribeScheduledActions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeScheduledActions -> Identity DescribeScheduledActions
Lens
DescribeScheduledActions
DescribeScheduledActions
(Maybe Text)
(Maybe Text)
describeScheduledActions_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeScheduledActions -> Identity DescribeScheduledActions)
-> Maybe Text
-> DescribeScheduledActions
-> DescribeScheduledActions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeScheduledActions
DescribeScheduledActionsResponse
rs
DescribeScheduledActionsResponse
-> Getting (First Text) DescribeScheduledActionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScheduledActionsResponse
-> Const (First Text) DescribeScheduledActionsResponse
Lens' DescribeScheduledActionsResponse (Maybe Text)
describeScheduledActionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeScheduledActionsResponse
-> Const (First Text) DescribeScheduledActionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeScheduledActionsResponse 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 DescribeScheduledActions where
type
AWSResponse DescribeScheduledActions =
DescribeScheduledActionsResponse
request :: DescribeScheduledActions -> Request DescribeScheduledActions
request = Service
-> DescribeScheduledActions -> Request DescribeScheduledActions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeScheduledActions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeScheduledActions)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeScheduledActions))
-> Logger
-> Service
-> Proxy DescribeScheduledActions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeScheduledActions)))
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 [ScheduledAction]
-> Int
-> DescribeScheduledActionsResponse
DescribeScheduledActionsResponse'
(Maybe Text
-> Maybe [ScheduledAction]
-> Int
-> DescribeScheduledActionsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [ScheduledAction]
-> Int -> DescribeScheduledActionsResponse)
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 [ScheduledAction]
-> Int -> DescribeScheduledActionsResponse)
-> Either String (Maybe [ScheduledAction])
-> Either String (Int -> DescribeScheduledActionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [ScheduledAction]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ScheduledActions"
Either String (Maybe (Maybe [ScheduledAction]))
-> Maybe [ScheduledAction]
-> Either String (Maybe [ScheduledAction])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ScheduledAction]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Int -> DescribeScheduledActionsResponse)
-> Either String Int
-> Either String DescribeScheduledActionsResponse
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 DescribeScheduledActions
instance Prelude.NFData DescribeScheduledActions
instance Core.ToHeaders DescribeScheduledActions where
toHeaders :: DescribeScheduledActions -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeScheduledActions -> 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.DescribeScheduledActions" ::
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 DescribeScheduledActions where
toJSON :: DescribeScheduledActions -> Value
toJSON DescribeScheduledActions' {Maybe Int
Maybe [Text]
Maybe Text
Maybe ScalableDimension
ServiceNamespace
serviceNamespace :: ServiceNamespace
maxResults :: Maybe Int
scheduledActionNames :: Maybe [Text]
nextToken :: Maybe Text
resourceId :: Maybe Text
scalableDimension :: Maybe ScalableDimension
$sel:serviceNamespace:DescribeScheduledActions' :: DescribeScheduledActions -> ServiceNamespace
$sel:maxResults:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Int
$sel:scheduledActionNames:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe [Text]
$sel:nextToken:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Text
$sel:resourceId:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Text
$sel:scalableDimension:DescribeScheduledActions' :: DescribeScheduledActions -> 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
"ScheduledActionNames" 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]
scheduledActionNames,
(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 DescribeScheduledActions where
toPath :: DescribeScheduledActions -> ByteString
toPath = ByteString -> DescribeScheduledActions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeScheduledActions where
toQuery :: DescribeScheduledActions -> QueryString
toQuery = QueryString -> DescribeScheduledActions -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeScheduledActionsResponse = DescribeScheduledActionsResponse'
{
DescribeScheduledActionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeScheduledActionsResponse -> Maybe [ScheduledAction]
scheduledActions :: Prelude.Maybe [ScheduledAction],
DescribeScheduledActionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeScheduledActionsResponse
-> DescribeScheduledActionsResponse -> Bool
(DescribeScheduledActionsResponse
-> DescribeScheduledActionsResponse -> Bool)
-> (DescribeScheduledActionsResponse
-> DescribeScheduledActionsResponse -> Bool)
-> Eq DescribeScheduledActionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeScheduledActionsResponse
-> DescribeScheduledActionsResponse -> Bool
$c/= :: DescribeScheduledActionsResponse
-> DescribeScheduledActionsResponse -> Bool
== :: DescribeScheduledActionsResponse
-> DescribeScheduledActionsResponse -> Bool
$c== :: DescribeScheduledActionsResponse
-> DescribeScheduledActionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeScheduledActionsResponse]
ReadPrec DescribeScheduledActionsResponse
Int -> ReadS DescribeScheduledActionsResponse
ReadS [DescribeScheduledActionsResponse]
(Int -> ReadS DescribeScheduledActionsResponse)
-> ReadS [DescribeScheduledActionsResponse]
-> ReadPrec DescribeScheduledActionsResponse
-> ReadPrec [DescribeScheduledActionsResponse]
-> Read DescribeScheduledActionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeScheduledActionsResponse]
$creadListPrec :: ReadPrec [DescribeScheduledActionsResponse]
readPrec :: ReadPrec DescribeScheduledActionsResponse
$creadPrec :: ReadPrec DescribeScheduledActionsResponse
readList :: ReadS [DescribeScheduledActionsResponse]
$creadList :: ReadS [DescribeScheduledActionsResponse]
readsPrec :: Int -> ReadS DescribeScheduledActionsResponse
$creadsPrec :: Int -> ReadS DescribeScheduledActionsResponse
Prelude.Read, Int -> DescribeScheduledActionsResponse -> ShowS
[DescribeScheduledActionsResponse] -> ShowS
DescribeScheduledActionsResponse -> String
(Int -> DescribeScheduledActionsResponse -> ShowS)
-> (DescribeScheduledActionsResponse -> String)
-> ([DescribeScheduledActionsResponse] -> ShowS)
-> Show DescribeScheduledActionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeScheduledActionsResponse] -> ShowS
$cshowList :: [DescribeScheduledActionsResponse] -> ShowS
show :: DescribeScheduledActionsResponse -> String
$cshow :: DescribeScheduledActionsResponse -> String
showsPrec :: Int -> DescribeScheduledActionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeScheduledActionsResponse -> ShowS
Prelude.Show, (forall x.
DescribeScheduledActionsResponse
-> Rep DescribeScheduledActionsResponse x)
-> (forall x.
Rep DescribeScheduledActionsResponse x
-> DescribeScheduledActionsResponse)
-> Generic DescribeScheduledActionsResponse
forall x.
Rep DescribeScheduledActionsResponse x
-> DescribeScheduledActionsResponse
forall x.
DescribeScheduledActionsResponse
-> Rep DescribeScheduledActionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeScheduledActionsResponse x
-> DescribeScheduledActionsResponse
$cfrom :: forall x.
DescribeScheduledActionsResponse
-> Rep DescribeScheduledActionsResponse x
Prelude.Generic)
newDescribeScheduledActionsResponse ::
Prelude.Int ->
DescribeScheduledActionsResponse
newDescribeScheduledActionsResponse :: Int -> DescribeScheduledActionsResponse
newDescribeScheduledActionsResponse Int
pHttpStatus_ =
DescribeScheduledActionsResponse' :: Maybe Text
-> Maybe [ScheduledAction]
-> Int
-> DescribeScheduledActionsResponse
DescribeScheduledActionsResponse'
{ $sel:nextToken:DescribeScheduledActionsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:scheduledActions:DescribeScheduledActionsResponse' :: Maybe [ScheduledAction]
scheduledActions = Maybe [ScheduledAction]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeScheduledActionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeScheduledActionsResponse_nextToken :: Lens.Lens' DescribeScheduledActionsResponse (Prelude.Maybe Prelude.Text)
describeScheduledActionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduledActionsResponse
-> f DescribeScheduledActionsResponse
describeScheduledActionsResponse_nextToken = (DescribeScheduledActionsResponse -> Maybe Text)
-> (DescribeScheduledActionsResponse
-> Maybe Text -> DescribeScheduledActionsResponse)
-> Lens' DescribeScheduledActionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeScheduledActionsResponse' :: DescribeScheduledActionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeScheduledActionsResponse
s@DescribeScheduledActionsResponse' {} Maybe Text
a -> DescribeScheduledActionsResponse
s {$sel:nextToken:DescribeScheduledActionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeScheduledActionsResponse)
describeScheduledActionsResponse_scheduledActions :: Lens.Lens' DescribeScheduledActionsResponse (Prelude.Maybe [ScheduledAction])
describeScheduledActionsResponse_scheduledActions :: (Maybe [ScheduledAction] -> f (Maybe [ScheduledAction]))
-> DescribeScheduledActionsResponse
-> f DescribeScheduledActionsResponse
describeScheduledActionsResponse_scheduledActions = (DescribeScheduledActionsResponse -> Maybe [ScheduledAction])
-> (DescribeScheduledActionsResponse
-> Maybe [ScheduledAction] -> DescribeScheduledActionsResponse)
-> Lens' DescribeScheduledActionsResponse (Maybe [ScheduledAction])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActionsResponse' {Maybe [ScheduledAction]
scheduledActions :: Maybe [ScheduledAction]
$sel:scheduledActions:DescribeScheduledActionsResponse' :: DescribeScheduledActionsResponse -> Maybe [ScheduledAction]
scheduledActions} -> Maybe [ScheduledAction]
scheduledActions) (\s :: DescribeScheduledActionsResponse
s@DescribeScheduledActionsResponse' {} Maybe [ScheduledAction]
a -> DescribeScheduledActionsResponse
s {$sel:scheduledActions:DescribeScheduledActionsResponse' :: Maybe [ScheduledAction]
scheduledActions = Maybe [ScheduledAction]
a} :: DescribeScheduledActionsResponse) ((Maybe [ScheduledAction] -> f (Maybe [ScheduledAction]))
-> DescribeScheduledActionsResponse
-> f DescribeScheduledActionsResponse)
-> ((Maybe [ScheduledAction] -> f (Maybe [ScheduledAction]))
-> Maybe [ScheduledAction] -> f (Maybe [ScheduledAction]))
-> (Maybe [ScheduledAction] -> f (Maybe [ScheduledAction]))
-> DescribeScheduledActionsResponse
-> f DescribeScheduledActionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ScheduledAction]
[ScheduledAction]
[ScheduledAction]
[ScheduledAction]
-> Iso
(Maybe [ScheduledAction])
(Maybe [ScheduledAction])
(Maybe [ScheduledAction])
(Maybe [ScheduledAction])
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
[ScheduledAction]
[ScheduledAction]
[ScheduledAction]
[ScheduledAction]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeScheduledActionsResponse_httpStatus :: Lens.Lens' DescribeScheduledActionsResponse Prelude.Int
describeScheduledActionsResponse_httpStatus :: (Int -> f Int)
-> DescribeScheduledActionsResponse
-> f DescribeScheduledActionsResponse
describeScheduledActionsResponse_httpStatus = (DescribeScheduledActionsResponse -> Int)
-> (DescribeScheduledActionsResponse
-> Int -> DescribeScheduledActionsResponse)
-> Lens
DescribeScheduledActionsResponse
DescribeScheduledActionsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeScheduledActionsResponse' :: DescribeScheduledActionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeScheduledActionsResponse
s@DescribeScheduledActionsResponse' {} Int
a -> DescribeScheduledActionsResponse
s {$sel:httpStatus:DescribeScheduledActionsResponse' :: Int
httpStatus = Int
a} :: DescribeScheduledActionsResponse)
instance
Prelude.NFData
DescribeScheduledActionsResponse