{-# 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.Redshift.DescribeScheduledActions
(
DescribeScheduledActions (..),
newDescribeScheduledActions,
describeScheduledActions_startTime,
describeScheduledActions_scheduledActionName,
describeScheduledActions_filters,
describeScheduledActions_active,
describeScheduledActions_targetActionType,
describeScheduledActions_marker,
describeScheduledActions_maxRecords,
describeScheduledActions_endTime,
DescribeScheduledActionsResponse (..),
newDescribeScheduledActionsResponse,
describeScheduledActionsResponse_scheduledActions,
describeScheduledActionsResponse_marker,
describeScheduledActionsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeScheduledActions = DescribeScheduledActions'
{
DescribeScheduledActions -> Maybe ISO8601
startTime :: Prelude.Maybe Core.ISO8601,
DescribeScheduledActions -> Maybe Text
scheduledActionName :: Prelude.Maybe Prelude.Text,
DescribeScheduledActions -> Maybe [ScheduledActionFilter]
filters :: Prelude.Maybe [ScheduledActionFilter],
DescribeScheduledActions -> Maybe Bool
active :: Prelude.Maybe Prelude.Bool,
DescribeScheduledActions -> Maybe ScheduledActionTypeValues
targetActionType :: Prelude.Maybe ScheduledActionTypeValues,
DescribeScheduledActions -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeScheduledActions -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
DescribeScheduledActions -> Maybe ISO8601
endTime :: Prelude.Maybe Core.ISO8601
}
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 ::
DescribeScheduledActions
newDescribeScheduledActions :: DescribeScheduledActions
newDescribeScheduledActions =
DescribeScheduledActions' :: Maybe ISO8601
-> Maybe Text
-> Maybe [ScheduledActionFilter]
-> Maybe Bool
-> Maybe ScheduledActionTypeValues
-> Maybe Text
-> Maybe Int
-> Maybe ISO8601
-> DescribeScheduledActions
DescribeScheduledActions'
{ $sel:startTime:DescribeScheduledActions' :: Maybe ISO8601
startTime =
Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
$sel:scheduledActionName:DescribeScheduledActions' :: Maybe Text
scheduledActionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:filters:DescribeScheduledActions' :: Maybe [ScheduledActionFilter]
filters = Maybe [ScheduledActionFilter]
forall a. Maybe a
Prelude.Nothing,
$sel:active:DescribeScheduledActions' :: Maybe Bool
active = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:targetActionType:DescribeScheduledActions' :: Maybe ScheduledActionTypeValues
targetActionType = Maybe ScheduledActionTypeValues
forall a. Maybe a
Prelude.Nothing,
$sel:marker:DescribeScheduledActions' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxRecords:DescribeScheduledActions' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:DescribeScheduledActions' :: Maybe ISO8601
endTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing
}
describeScheduledActions_startTime :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe Prelude.UTCTime)
describeScheduledActions_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_startTime = (DescribeScheduledActions -> Maybe ISO8601)
-> (DescribeScheduledActions
-> Maybe ISO8601 -> DescribeScheduledActions)
-> Lens
DescribeScheduledActions
DescribeScheduledActions
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe ISO8601
startTime :: Maybe ISO8601
$sel:startTime:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe ISO8601
startTime} -> Maybe ISO8601
startTime) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe ISO8601
a -> DescribeScheduledActions
s {$sel:startTime:DescribeScheduledActions' :: Maybe ISO8601
startTime = Maybe ISO8601
a} :: DescribeScheduledActions) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> DescribeScheduledActions -> f DescribeScheduledActions)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeScheduledActions
-> f DescribeScheduledActions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
describeScheduledActions_scheduledActionName :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe Prelude.Text)
describeScheduledActions_scheduledActionName :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_scheduledActionName = (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
scheduledActionName :: Maybe Text
$sel:scheduledActionName:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Text
scheduledActionName} -> Maybe Text
scheduledActionName) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe Text
a -> DescribeScheduledActions
s {$sel:scheduledActionName:DescribeScheduledActions' :: Maybe Text
scheduledActionName = Maybe Text
a} :: DescribeScheduledActions)
describeScheduledActions_filters :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe [ScheduledActionFilter])
describeScheduledActions_filters :: (Maybe [ScheduledActionFilter]
-> f (Maybe [ScheduledActionFilter]))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_filters = (DescribeScheduledActions -> Maybe [ScheduledActionFilter])
-> (DescribeScheduledActions
-> Maybe [ScheduledActionFilter] -> DescribeScheduledActions)
-> Lens
DescribeScheduledActions
DescribeScheduledActions
(Maybe [ScheduledActionFilter])
(Maybe [ScheduledActionFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe [ScheduledActionFilter]
filters :: Maybe [ScheduledActionFilter]
$sel:filters:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe [ScheduledActionFilter]
filters} -> Maybe [ScheduledActionFilter]
filters) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe [ScheduledActionFilter]
a -> DescribeScheduledActions
s {$sel:filters:DescribeScheduledActions' :: Maybe [ScheduledActionFilter]
filters = Maybe [ScheduledActionFilter]
a} :: DescribeScheduledActions) ((Maybe [ScheduledActionFilter]
-> f (Maybe [ScheduledActionFilter]))
-> DescribeScheduledActions -> f DescribeScheduledActions)
-> ((Maybe [ScheduledActionFilter]
-> f (Maybe [ScheduledActionFilter]))
-> Maybe [ScheduledActionFilter]
-> f (Maybe [ScheduledActionFilter]))
-> (Maybe [ScheduledActionFilter]
-> f (Maybe [ScheduledActionFilter]))
-> DescribeScheduledActions
-> f DescribeScheduledActions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ScheduledActionFilter]
[ScheduledActionFilter]
[ScheduledActionFilter]
[ScheduledActionFilter]
-> Iso
(Maybe [ScheduledActionFilter])
(Maybe [ScheduledActionFilter])
(Maybe [ScheduledActionFilter])
(Maybe [ScheduledActionFilter])
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
[ScheduledActionFilter]
[ScheduledActionFilter]
[ScheduledActionFilter]
[ScheduledActionFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeScheduledActions_active :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe Prelude.Bool)
describeScheduledActions_active :: (Maybe Bool -> f (Maybe Bool))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_active = (DescribeScheduledActions -> Maybe Bool)
-> (DescribeScheduledActions
-> Maybe Bool -> DescribeScheduledActions)
-> Lens
DescribeScheduledActions
DescribeScheduledActions
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe Bool
active :: Maybe Bool
$sel:active:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Bool
active} -> Maybe Bool
active) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe Bool
a -> DescribeScheduledActions
s {$sel:active:DescribeScheduledActions' :: Maybe Bool
active = Maybe Bool
a} :: DescribeScheduledActions)
describeScheduledActions_targetActionType :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe ScheduledActionTypeValues)
describeScheduledActions_targetActionType :: (Maybe ScheduledActionTypeValues
-> f (Maybe ScheduledActionTypeValues))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_targetActionType = (DescribeScheduledActions -> Maybe ScheduledActionTypeValues)
-> (DescribeScheduledActions
-> Maybe ScheduledActionTypeValues -> DescribeScheduledActions)
-> Lens
DescribeScheduledActions
DescribeScheduledActions
(Maybe ScheduledActionTypeValues)
(Maybe ScheduledActionTypeValues)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe ScheduledActionTypeValues
targetActionType :: Maybe ScheduledActionTypeValues
$sel:targetActionType:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe ScheduledActionTypeValues
targetActionType} -> Maybe ScheduledActionTypeValues
targetActionType) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe ScheduledActionTypeValues
a -> DescribeScheduledActions
s {$sel:targetActionType:DescribeScheduledActions' :: Maybe ScheduledActionTypeValues
targetActionType = Maybe ScheduledActionTypeValues
a} :: DescribeScheduledActions)
describeScheduledActions_marker :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe Prelude.Text)
describeScheduledActions_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_marker = (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
marker :: Maybe Text
$sel:marker:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe Text
a -> DescribeScheduledActions
s {$sel:marker:DescribeScheduledActions' :: Maybe Text
marker = Maybe Text
a} :: DescribeScheduledActions)
describeScheduledActions_maxRecords :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe Prelude.Int)
describeScheduledActions_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_maxRecords = (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
maxRecords :: Maybe Int
$sel:maxRecords:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe Int
a -> DescribeScheduledActions
s {$sel:maxRecords:DescribeScheduledActions' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeScheduledActions)
describeScheduledActions_endTime :: Lens.Lens' DescribeScheduledActions (Prelude.Maybe Prelude.UTCTime)
describeScheduledActions_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeScheduledActions -> f DescribeScheduledActions
describeScheduledActions_endTime = (DescribeScheduledActions -> Maybe ISO8601)
-> (DescribeScheduledActions
-> Maybe ISO8601 -> DescribeScheduledActions)
-> Lens
DescribeScheduledActions
DescribeScheduledActions
(Maybe ISO8601)
(Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeScheduledActions' {Maybe ISO8601
endTime :: Maybe ISO8601
$sel:endTime:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe ISO8601
endTime} -> Maybe ISO8601
endTime) (\s :: DescribeScheduledActions
s@DescribeScheduledActions' {} Maybe ISO8601
a -> DescribeScheduledActions
s {$sel:endTime:DescribeScheduledActions' :: Maybe ISO8601
endTime = Maybe ISO8601
a} :: DescribeScheduledActions) ((Maybe ISO8601 -> f (Maybe ISO8601))
-> DescribeScheduledActions -> f DescribeScheduledActions)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeScheduledActions
-> f DescribeScheduledActions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
(Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
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_marker
((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_marker
((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_marker
((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 => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeScheduledActions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeScheduledActions)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeScheduledActions))
-> Logger
-> Service
-> Proxy DescribeScheduledActions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeScheduledActions)))
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
"DescribeScheduledActionsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [ScheduledAction]
-> Maybe Text -> Int -> DescribeScheduledActionsResponse
DescribeScheduledActionsResponse'
(Maybe [ScheduledAction]
-> Maybe Text -> Int -> DescribeScheduledActionsResponse)
-> Either String (Maybe [ScheduledAction])
-> Either
String (Maybe Text -> Int -> DescribeScheduledActionsResponse)
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
"ScheduledActions"
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 [ScheduledAction]))
-> Either String (Maybe [ScheduledAction])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ScheduledAction])
-> [Node] -> Either String (Maybe [ScheduledAction])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [ScheduledAction]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"ScheduledAction")
)
Either
String (Maybe Text -> Int -> DescribeScheduledActionsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeScheduledActionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Marker")
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
forall a. Monoid a => a
Prelude.mempty
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 DescribeScheduledActions' {Maybe Bool
Maybe Int
Maybe [ScheduledActionFilter]
Maybe Text
Maybe ISO8601
Maybe ScheduledActionTypeValues
endTime :: Maybe ISO8601
maxRecords :: Maybe Int
marker :: Maybe Text
targetActionType :: Maybe ScheduledActionTypeValues
active :: Maybe Bool
filters :: Maybe [ScheduledActionFilter]
scheduledActionName :: Maybe Text
startTime :: Maybe ISO8601
$sel:endTime:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe ISO8601
$sel:maxRecords:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Int
$sel:marker:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Text
$sel:targetActionType:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe ScheduledActionTypeValues
$sel:active:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Bool
$sel:filters:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe [ScheduledActionFilter]
$sel:scheduledActionName:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe Text
$sel:startTime:DescribeScheduledActions' :: DescribeScheduledActions -> Maybe ISO8601
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeScheduledActions" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
ByteString
"StartTime" ByteString -> Maybe ISO8601 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ISO8601
startTime,
ByteString
"ScheduledActionName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
scheduledActionName,
ByteString
"Filters"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [ScheduledActionFilter] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"ScheduledActionFilter"
([ScheduledActionFilter] -> QueryString)
-> Maybe [ScheduledActionFilter] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ScheduledActionFilter]
filters
),
ByteString
"Active" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
active,
ByteString
"TargetActionType" ByteString -> Maybe ScheduledActionTypeValues -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ScheduledActionTypeValues
targetActionType,
ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
ByteString
"MaxRecords" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxRecords,
ByteString
"EndTime" ByteString -> Maybe ISO8601 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ISO8601
endTime
]
data DescribeScheduledActionsResponse = DescribeScheduledActionsResponse'
{
DescribeScheduledActionsResponse -> Maybe [ScheduledAction]
scheduledActions :: Prelude.Maybe [ScheduledAction],
DescribeScheduledActionsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
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 [ScheduledAction]
-> Maybe Text -> Int -> DescribeScheduledActionsResponse
DescribeScheduledActionsResponse'
{ $sel:scheduledActions:DescribeScheduledActionsResponse' :: Maybe [ScheduledAction]
scheduledActions =
Maybe [ScheduledAction]
forall a. Maybe a
Prelude.Nothing,
$sel:marker:DescribeScheduledActionsResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeScheduledActionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
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_marker :: Lens.Lens' DescribeScheduledActionsResponse (Prelude.Maybe Prelude.Text)
describeScheduledActionsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeScheduledActionsResponse
-> f DescribeScheduledActionsResponse
describeScheduledActionsResponse_marker = (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
marker :: Maybe Text
$sel:marker:DescribeScheduledActionsResponse' :: DescribeScheduledActionsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeScheduledActionsResponse
s@DescribeScheduledActionsResponse' {} Maybe Text
a -> DescribeScheduledActionsResponse
s {$sel:marker:DescribeScheduledActionsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeScheduledActionsResponse)
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