{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Redshift.ModifyScheduledAction
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Modifies a scheduled action.
module Amazonka.Redshift.ModifyScheduledAction
  ( -- * Creating a Request
    ModifyScheduledAction (..),
    newModifyScheduledAction,

    -- * Request Lenses
    modifyScheduledAction_targetAction,
    modifyScheduledAction_startTime,
    modifyScheduledAction_schedule,
    modifyScheduledAction_scheduledActionDescription,
    modifyScheduledAction_enable,
    modifyScheduledAction_endTime,
    modifyScheduledAction_iamRole,
    modifyScheduledAction_scheduledActionName,

    -- * Destructuring the Response
    ScheduledAction (..),
    newScheduledAction,

    -- * Response Lenses
    scheduledAction_state,
    scheduledAction_targetAction,
    scheduledAction_startTime,
    scheduledAction_schedule,
    scheduledAction_scheduledActionName,
    scheduledAction_scheduledActionDescription,
    scheduledAction_nextInvocations,
    scheduledAction_endTime,
    scheduledAction_iamRole,
  )
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

-- | /See:/ 'newModifyScheduledAction' smart constructor.
data ModifyScheduledAction = ModifyScheduledAction'
  { -- | A modified JSON format of the scheduled action. For more information
    -- about this parameter, see ScheduledAction.
    ModifyScheduledAction -> Maybe ScheduledActionType
targetAction :: Prelude.Maybe ScheduledActionType,
    -- | A modified start time of the scheduled action. For more information
    -- about this parameter, see ScheduledAction.
    ModifyScheduledAction -> Maybe ISO8601
startTime :: Prelude.Maybe Core.ISO8601,
    -- | A modified schedule in either @at( )@ or @cron( )@ format. For more
    -- information about this parameter, see ScheduledAction.
    ModifyScheduledAction -> Maybe Text
schedule :: Prelude.Maybe Prelude.Text,
    -- | A modified description of the scheduled action.
    ModifyScheduledAction -> Maybe Text
scheduledActionDescription :: Prelude.Maybe Prelude.Text,
    -- | A modified enable flag of the scheduled action. If true, the scheduled
    -- action is active. If false, the scheduled action is disabled.
    ModifyScheduledAction -> Maybe Bool
enable :: Prelude.Maybe Prelude.Bool,
    -- | A modified end time of the scheduled action. For more information about
    -- this parameter, see ScheduledAction.
    ModifyScheduledAction -> Maybe ISO8601
endTime :: Prelude.Maybe Core.ISO8601,
    -- | A different IAM role to assume to run the target action. For more
    -- information about this parameter, see ScheduledAction.
    ModifyScheduledAction -> Maybe Text
iamRole :: Prelude.Maybe Prelude.Text,
    -- | The name of the scheduled action to modify.
    ModifyScheduledAction -> Text
scheduledActionName :: Prelude.Text
  }
  deriving (ModifyScheduledAction -> ModifyScheduledAction -> Bool
(ModifyScheduledAction -> ModifyScheduledAction -> Bool)
-> (ModifyScheduledAction -> ModifyScheduledAction -> Bool)
-> Eq ModifyScheduledAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyScheduledAction -> ModifyScheduledAction -> Bool
$c/= :: ModifyScheduledAction -> ModifyScheduledAction -> Bool
== :: ModifyScheduledAction -> ModifyScheduledAction -> Bool
$c== :: ModifyScheduledAction -> ModifyScheduledAction -> Bool
Prelude.Eq, ReadPrec [ModifyScheduledAction]
ReadPrec ModifyScheduledAction
Int -> ReadS ModifyScheduledAction
ReadS [ModifyScheduledAction]
(Int -> ReadS ModifyScheduledAction)
-> ReadS [ModifyScheduledAction]
-> ReadPrec ModifyScheduledAction
-> ReadPrec [ModifyScheduledAction]
-> Read ModifyScheduledAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyScheduledAction]
$creadListPrec :: ReadPrec [ModifyScheduledAction]
readPrec :: ReadPrec ModifyScheduledAction
$creadPrec :: ReadPrec ModifyScheduledAction
readList :: ReadS [ModifyScheduledAction]
$creadList :: ReadS [ModifyScheduledAction]
readsPrec :: Int -> ReadS ModifyScheduledAction
$creadsPrec :: Int -> ReadS ModifyScheduledAction
Prelude.Read, Int -> ModifyScheduledAction -> ShowS
[ModifyScheduledAction] -> ShowS
ModifyScheduledAction -> String
(Int -> ModifyScheduledAction -> ShowS)
-> (ModifyScheduledAction -> String)
-> ([ModifyScheduledAction] -> ShowS)
-> Show ModifyScheduledAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyScheduledAction] -> ShowS
$cshowList :: [ModifyScheduledAction] -> ShowS
show :: ModifyScheduledAction -> String
$cshow :: ModifyScheduledAction -> String
showsPrec :: Int -> ModifyScheduledAction -> ShowS
$cshowsPrec :: Int -> ModifyScheduledAction -> ShowS
Prelude.Show, (forall x. ModifyScheduledAction -> Rep ModifyScheduledAction x)
-> (forall x. Rep ModifyScheduledAction x -> ModifyScheduledAction)
-> Generic ModifyScheduledAction
forall x. Rep ModifyScheduledAction x -> ModifyScheduledAction
forall x. ModifyScheduledAction -> Rep ModifyScheduledAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyScheduledAction x -> ModifyScheduledAction
$cfrom :: forall x. ModifyScheduledAction -> Rep ModifyScheduledAction x
Prelude.Generic)

-- |
-- Create a value of 'ModifyScheduledAction' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'targetAction', 'modifyScheduledAction_targetAction' - A modified JSON format of the scheduled action. For more information
-- about this parameter, see ScheduledAction.
--
-- 'startTime', 'modifyScheduledAction_startTime' - A modified start time of the scheduled action. For more information
-- about this parameter, see ScheduledAction.
--
-- 'schedule', 'modifyScheduledAction_schedule' - A modified schedule in either @at( )@ or @cron( )@ format. For more
-- information about this parameter, see ScheduledAction.
--
-- 'scheduledActionDescription', 'modifyScheduledAction_scheduledActionDescription' - A modified description of the scheduled action.
--
-- 'enable', 'modifyScheduledAction_enable' - A modified enable flag of the scheduled action. If true, the scheduled
-- action is active. If false, the scheduled action is disabled.
--
-- 'endTime', 'modifyScheduledAction_endTime' - A modified end time of the scheduled action. For more information about
-- this parameter, see ScheduledAction.
--
-- 'iamRole', 'modifyScheduledAction_iamRole' - A different IAM role to assume to run the target action. For more
-- information about this parameter, see ScheduledAction.
--
-- 'scheduledActionName', 'modifyScheduledAction_scheduledActionName' - The name of the scheduled action to modify.
newModifyScheduledAction ::
  -- | 'scheduledActionName'
  Prelude.Text ->
  ModifyScheduledAction
newModifyScheduledAction :: Text -> ModifyScheduledAction
newModifyScheduledAction Text
pScheduledActionName_ =
  ModifyScheduledAction' :: Maybe ScheduledActionType
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe ISO8601
-> Maybe Text
-> Text
-> ModifyScheduledAction
ModifyScheduledAction'
    { $sel:targetAction:ModifyScheduledAction' :: Maybe ScheduledActionType
targetAction =
        Maybe ScheduledActionType
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:ModifyScheduledAction' :: Maybe ISO8601
startTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:schedule:ModifyScheduledAction' :: Maybe Text
schedule = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduledActionDescription:ModifyScheduledAction' :: Maybe Text
scheduledActionDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enable:ModifyScheduledAction' :: Maybe Bool
enable = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:ModifyScheduledAction' :: Maybe ISO8601
endTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:iamRole:ModifyScheduledAction' :: Maybe Text
iamRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduledActionName:ModifyScheduledAction' :: Text
scheduledActionName = Text
pScheduledActionName_
    }

-- | A modified JSON format of the scheduled action. For more information
-- about this parameter, see ScheduledAction.
modifyScheduledAction_targetAction :: Lens.Lens' ModifyScheduledAction (Prelude.Maybe ScheduledActionType)
modifyScheduledAction_targetAction :: (Maybe ScheduledActionType -> f (Maybe ScheduledActionType))
-> ModifyScheduledAction -> f ModifyScheduledAction
modifyScheduledAction_targetAction = (ModifyScheduledAction -> Maybe ScheduledActionType)
-> (ModifyScheduledAction
    -> Maybe ScheduledActionType -> ModifyScheduledAction)
-> Lens
     ModifyScheduledAction
     ModifyScheduledAction
     (Maybe ScheduledActionType)
     (Maybe ScheduledActionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyScheduledAction' {Maybe ScheduledActionType
targetAction :: Maybe ScheduledActionType
$sel:targetAction:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe ScheduledActionType
targetAction} -> Maybe ScheduledActionType
targetAction) (\s :: ModifyScheduledAction
s@ModifyScheduledAction' {} Maybe ScheduledActionType
a -> ModifyScheduledAction
s {$sel:targetAction:ModifyScheduledAction' :: Maybe ScheduledActionType
targetAction = Maybe ScheduledActionType
a} :: ModifyScheduledAction)

-- | A modified start time of the scheduled action. For more information
-- about this parameter, see ScheduledAction.
modifyScheduledAction_startTime :: Lens.Lens' ModifyScheduledAction (Prelude.Maybe Prelude.UTCTime)
modifyScheduledAction_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ModifyScheduledAction -> f ModifyScheduledAction
modifyScheduledAction_startTime = (ModifyScheduledAction -> Maybe ISO8601)
-> (ModifyScheduledAction
    -> Maybe ISO8601 -> ModifyScheduledAction)
-> Lens
     ModifyScheduledAction
     ModifyScheduledAction
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyScheduledAction' {Maybe ISO8601
startTime :: Maybe ISO8601
$sel:startTime:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe ISO8601
startTime} -> Maybe ISO8601
startTime) (\s :: ModifyScheduledAction
s@ModifyScheduledAction' {} Maybe ISO8601
a -> ModifyScheduledAction
s {$sel:startTime:ModifyScheduledAction' :: Maybe ISO8601
startTime = Maybe ISO8601
a} :: ModifyScheduledAction) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> ModifyScheduledAction -> f ModifyScheduledAction)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ModifyScheduledAction
-> f ModifyScheduledAction
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

-- | A modified schedule in either @at( )@ or @cron( )@ format. For more
-- information about this parameter, see ScheduledAction.
modifyScheduledAction_schedule :: Lens.Lens' ModifyScheduledAction (Prelude.Maybe Prelude.Text)
modifyScheduledAction_schedule :: (Maybe Text -> f (Maybe Text))
-> ModifyScheduledAction -> f ModifyScheduledAction
modifyScheduledAction_schedule = (ModifyScheduledAction -> Maybe Text)
-> (ModifyScheduledAction -> Maybe Text -> ModifyScheduledAction)
-> Lens
     ModifyScheduledAction
     ModifyScheduledAction
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyScheduledAction' {Maybe Text
schedule :: Maybe Text
$sel:schedule:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe Text
schedule} -> Maybe Text
schedule) (\s :: ModifyScheduledAction
s@ModifyScheduledAction' {} Maybe Text
a -> ModifyScheduledAction
s {$sel:schedule:ModifyScheduledAction' :: Maybe Text
schedule = Maybe Text
a} :: ModifyScheduledAction)

-- | A modified description of the scheduled action.
modifyScheduledAction_scheduledActionDescription :: Lens.Lens' ModifyScheduledAction (Prelude.Maybe Prelude.Text)
modifyScheduledAction_scheduledActionDescription :: (Maybe Text -> f (Maybe Text))
-> ModifyScheduledAction -> f ModifyScheduledAction
modifyScheduledAction_scheduledActionDescription = (ModifyScheduledAction -> Maybe Text)
-> (ModifyScheduledAction -> Maybe Text -> ModifyScheduledAction)
-> Lens
     ModifyScheduledAction
     ModifyScheduledAction
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyScheduledAction' {Maybe Text
scheduledActionDescription :: Maybe Text
$sel:scheduledActionDescription:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe Text
scheduledActionDescription} -> Maybe Text
scheduledActionDescription) (\s :: ModifyScheduledAction
s@ModifyScheduledAction' {} Maybe Text
a -> ModifyScheduledAction
s {$sel:scheduledActionDescription:ModifyScheduledAction' :: Maybe Text
scheduledActionDescription = Maybe Text
a} :: ModifyScheduledAction)

-- | A modified enable flag of the scheduled action. If true, the scheduled
-- action is active. If false, the scheduled action is disabled.
modifyScheduledAction_enable :: Lens.Lens' ModifyScheduledAction (Prelude.Maybe Prelude.Bool)
modifyScheduledAction_enable :: (Maybe Bool -> f (Maybe Bool))
-> ModifyScheduledAction -> f ModifyScheduledAction
modifyScheduledAction_enable = (ModifyScheduledAction -> Maybe Bool)
-> (ModifyScheduledAction -> Maybe Bool -> ModifyScheduledAction)
-> Lens
     ModifyScheduledAction
     ModifyScheduledAction
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyScheduledAction' {Maybe Bool
enable :: Maybe Bool
$sel:enable:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe Bool
enable} -> Maybe Bool
enable) (\s :: ModifyScheduledAction
s@ModifyScheduledAction' {} Maybe Bool
a -> ModifyScheduledAction
s {$sel:enable:ModifyScheduledAction' :: Maybe Bool
enable = Maybe Bool
a} :: ModifyScheduledAction)

-- | A modified end time of the scheduled action. For more information about
-- this parameter, see ScheduledAction.
modifyScheduledAction_endTime :: Lens.Lens' ModifyScheduledAction (Prelude.Maybe Prelude.UTCTime)
modifyScheduledAction_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ModifyScheduledAction -> f ModifyScheduledAction
modifyScheduledAction_endTime = (ModifyScheduledAction -> Maybe ISO8601)
-> (ModifyScheduledAction
    -> Maybe ISO8601 -> ModifyScheduledAction)
-> Lens
     ModifyScheduledAction
     ModifyScheduledAction
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyScheduledAction' {Maybe ISO8601
endTime :: Maybe ISO8601
$sel:endTime:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe ISO8601
endTime} -> Maybe ISO8601
endTime) (\s :: ModifyScheduledAction
s@ModifyScheduledAction' {} Maybe ISO8601
a -> ModifyScheduledAction
s {$sel:endTime:ModifyScheduledAction' :: Maybe ISO8601
endTime = Maybe ISO8601
a} :: ModifyScheduledAction) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> ModifyScheduledAction -> f ModifyScheduledAction)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ModifyScheduledAction
-> f ModifyScheduledAction
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

-- | A different IAM role to assume to run the target action. For more
-- information about this parameter, see ScheduledAction.
modifyScheduledAction_iamRole :: Lens.Lens' ModifyScheduledAction (Prelude.Maybe Prelude.Text)
modifyScheduledAction_iamRole :: (Maybe Text -> f (Maybe Text))
-> ModifyScheduledAction -> f ModifyScheduledAction
modifyScheduledAction_iamRole = (ModifyScheduledAction -> Maybe Text)
-> (ModifyScheduledAction -> Maybe Text -> ModifyScheduledAction)
-> Lens
     ModifyScheduledAction
     ModifyScheduledAction
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyScheduledAction' {Maybe Text
iamRole :: Maybe Text
$sel:iamRole:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe Text
iamRole} -> Maybe Text
iamRole) (\s :: ModifyScheduledAction
s@ModifyScheduledAction' {} Maybe Text
a -> ModifyScheduledAction
s {$sel:iamRole:ModifyScheduledAction' :: Maybe Text
iamRole = Maybe Text
a} :: ModifyScheduledAction)

-- | The name of the scheduled action to modify.
modifyScheduledAction_scheduledActionName :: Lens.Lens' ModifyScheduledAction Prelude.Text
modifyScheduledAction_scheduledActionName :: (Text -> f Text)
-> ModifyScheduledAction -> f ModifyScheduledAction
modifyScheduledAction_scheduledActionName = (ModifyScheduledAction -> Text)
-> (ModifyScheduledAction -> Text -> ModifyScheduledAction)
-> Lens ModifyScheduledAction ModifyScheduledAction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyScheduledAction' {Text
scheduledActionName :: Text
$sel:scheduledActionName:ModifyScheduledAction' :: ModifyScheduledAction -> Text
scheduledActionName} -> Text
scheduledActionName) (\s :: ModifyScheduledAction
s@ModifyScheduledAction' {} Text
a -> ModifyScheduledAction
s {$sel:scheduledActionName:ModifyScheduledAction' :: Text
scheduledActionName = Text
a} :: ModifyScheduledAction)

instance Core.AWSRequest ModifyScheduledAction where
  type
    AWSResponse ModifyScheduledAction =
      ScheduledAction
  request :: ModifyScheduledAction -> Request ModifyScheduledAction
request = Service -> ModifyScheduledAction -> Request ModifyScheduledAction
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ModifyScheduledAction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyScheduledAction)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ModifyScheduledAction))
-> Logger
-> Service
-> Proxy ModifyScheduledAction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyScheduledAction)))
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
"ModifyScheduledActionResult"
      (\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String ScheduledAction
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)

instance Prelude.Hashable ModifyScheduledAction

instance Prelude.NFData ModifyScheduledAction

instance Core.ToHeaders ModifyScheduledAction where
  toHeaders :: ModifyScheduledAction -> ResponseHeaders
toHeaders = ResponseHeaders -> ModifyScheduledAction -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath ModifyScheduledAction where
  toPath :: ModifyScheduledAction -> ByteString
toPath = ByteString -> ModifyScheduledAction -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery ModifyScheduledAction where
  toQuery :: ModifyScheduledAction -> QueryString
toQuery ModifyScheduledAction' {Maybe Bool
Maybe Text
Maybe ISO8601
Maybe ScheduledActionType
Text
scheduledActionName :: Text
iamRole :: Maybe Text
endTime :: Maybe ISO8601
enable :: Maybe Bool
scheduledActionDescription :: Maybe Text
schedule :: Maybe Text
startTime :: Maybe ISO8601
targetAction :: Maybe ScheduledActionType
$sel:scheduledActionName:ModifyScheduledAction' :: ModifyScheduledAction -> Text
$sel:iamRole:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe Text
$sel:endTime:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe ISO8601
$sel:enable:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe Bool
$sel:scheduledActionDescription:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe Text
$sel:schedule:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe Text
$sel:startTime:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe ISO8601
$sel:targetAction:ModifyScheduledAction' :: ModifyScheduledAction -> Maybe ScheduledActionType
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ModifyScheduledAction" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"TargetAction" ByteString -> Maybe ScheduledActionType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ScheduledActionType
targetAction,
        ByteString
"StartTime" ByteString -> Maybe ISO8601 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ISO8601
startTime,
        ByteString
"Schedule" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
schedule,
        ByteString
"ScheduledActionDescription"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
scheduledActionDescription,
        ByteString
"Enable" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
enable,
        ByteString
"EndTime" ByteString -> Maybe ISO8601 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ISO8601
endTime,
        ByteString
"IamRole" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
iamRole,
        ByteString
"ScheduledActionName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
scheduledActionName
      ]