{-# 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.ModifyClusterMaintenance
-- 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 the maintenance settings of a cluster.
module Amazonka.Redshift.ModifyClusterMaintenance
  ( -- * Creating a Request
    ModifyClusterMaintenance (..),
    newModifyClusterMaintenance,

    -- * Request Lenses
    modifyClusterMaintenance_deferMaintenanceEndTime,
    modifyClusterMaintenance_deferMaintenance,
    modifyClusterMaintenance_deferMaintenanceDuration,
    modifyClusterMaintenance_deferMaintenanceStartTime,
    modifyClusterMaintenance_deferMaintenanceIdentifier,
    modifyClusterMaintenance_clusterIdentifier,

    -- * Destructuring the Response
    ModifyClusterMaintenanceResponse (..),
    newModifyClusterMaintenanceResponse,

    -- * Response Lenses
    modifyClusterMaintenanceResponse_cluster,
    modifyClusterMaintenanceResponse_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

-- | /See:/ 'newModifyClusterMaintenance' smart constructor.
data ModifyClusterMaintenance = ModifyClusterMaintenance'
  { -- | A timestamp indicating end time for the deferred maintenance window. If
    -- you specify an end time, you can\'t specify a duration.
    ModifyClusterMaintenance -> Maybe ISO8601
deferMaintenanceEndTime :: Prelude.Maybe Core.ISO8601,
    -- | A boolean indicating whether to enable the deferred maintenance window.
    ModifyClusterMaintenance -> Maybe Bool
deferMaintenance :: Prelude.Maybe Prelude.Bool,
    -- | An integer indicating the duration of the maintenance window in days. If
    -- you specify a duration, you can\'t specify an end time. The duration
    -- must be 45 days or less.
    ModifyClusterMaintenance -> Maybe Int
deferMaintenanceDuration :: Prelude.Maybe Prelude.Int,
    -- | A timestamp indicating the start time for the deferred maintenance
    -- window.
    ModifyClusterMaintenance -> Maybe ISO8601
deferMaintenanceStartTime :: Prelude.Maybe Core.ISO8601,
    -- | A unique identifier for the deferred maintenance window.
    ModifyClusterMaintenance -> Maybe Text
deferMaintenanceIdentifier :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier for the cluster.
    ModifyClusterMaintenance -> Text
clusterIdentifier :: Prelude.Text
  }
  deriving (ModifyClusterMaintenance -> ModifyClusterMaintenance -> Bool
(ModifyClusterMaintenance -> ModifyClusterMaintenance -> Bool)
-> (ModifyClusterMaintenance -> ModifyClusterMaintenance -> Bool)
-> Eq ModifyClusterMaintenance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyClusterMaintenance -> ModifyClusterMaintenance -> Bool
$c/= :: ModifyClusterMaintenance -> ModifyClusterMaintenance -> Bool
== :: ModifyClusterMaintenance -> ModifyClusterMaintenance -> Bool
$c== :: ModifyClusterMaintenance -> ModifyClusterMaintenance -> Bool
Prelude.Eq, ReadPrec [ModifyClusterMaintenance]
ReadPrec ModifyClusterMaintenance
Int -> ReadS ModifyClusterMaintenance
ReadS [ModifyClusterMaintenance]
(Int -> ReadS ModifyClusterMaintenance)
-> ReadS [ModifyClusterMaintenance]
-> ReadPrec ModifyClusterMaintenance
-> ReadPrec [ModifyClusterMaintenance]
-> Read ModifyClusterMaintenance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyClusterMaintenance]
$creadListPrec :: ReadPrec [ModifyClusterMaintenance]
readPrec :: ReadPrec ModifyClusterMaintenance
$creadPrec :: ReadPrec ModifyClusterMaintenance
readList :: ReadS [ModifyClusterMaintenance]
$creadList :: ReadS [ModifyClusterMaintenance]
readsPrec :: Int -> ReadS ModifyClusterMaintenance
$creadsPrec :: Int -> ReadS ModifyClusterMaintenance
Prelude.Read, Int -> ModifyClusterMaintenance -> ShowS
[ModifyClusterMaintenance] -> ShowS
ModifyClusterMaintenance -> String
(Int -> ModifyClusterMaintenance -> ShowS)
-> (ModifyClusterMaintenance -> String)
-> ([ModifyClusterMaintenance] -> ShowS)
-> Show ModifyClusterMaintenance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyClusterMaintenance] -> ShowS
$cshowList :: [ModifyClusterMaintenance] -> ShowS
show :: ModifyClusterMaintenance -> String
$cshow :: ModifyClusterMaintenance -> String
showsPrec :: Int -> ModifyClusterMaintenance -> ShowS
$cshowsPrec :: Int -> ModifyClusterMaintenance -> ShowS
Prelude.Show, (forall x.
 ModifyClusterMaintenance -> Rep ModifyClusterMaintenance x)
-> (forall x.
    Rep ModifyClusterMaintenance x -> ModifyClusterMaintenance)
-> Generic ModifyClusterMaintenance
forall x.
Rep ModifyClusterMaintenance x -> ModifyClusterMaintenance
forall x.
ModifyClusterMaintenance -> Rep ModifyClusterMaintenance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyClusterMaintenance x -> ModifyClusterMaintenance
$cfrom :: forall x.
ModifyClusterMaintenance -> Rep ModifyClusterMaintenance x
Prelude.Generic)

-- |
-- Create a value of 'ModifyClusterMaintenance' 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:
--
-- 'deferMaintenanceEndTime', 'modifyClusterMaintenance_deferMaintenanceEndTime' - A timestamp indicating end time for the deferred maintenance window. If
-- you specify an end time, you can\'t specify a duration.
--
-- 'deferMaintenance', 'modifyClusterMaintenance_deferMaintenance' - A boolean indicating whether to enable the deferred maintenance window.
--
-- 'deferMaintenanceDuration', 'modifyClusterMaintenance_deferMaintenanceDuration' - An integer indicating the duration of the maintenance window in days. If
-- you specify a duration, you can\'t specify an end time. The duration
-- must be 45 days or less.
--
-- 'deferMaintenanceStartTime', 'modifyClusterMaintenance_deferMaintenanceStartTime' - A timestamp indicating the start time for the deferred maintenance
-- window.
--
-- 'deferMaintenanceIdentifier', 'modifyClusterMaintenance_deferMaintenanceIdentifier' - A unique identifier for the deferred maintenance window.
--
-- 'clusterIdentifier', 'modifyClusterMaintenance_clusterIdentifier' - A unique identifier for the cluster.
newModifyClusterMaintenance ::
  -- | 'clusterIdentifier'
  Prelude.Text ->
  ModifyClusterMaintenance
newModifyClusterMaintenance :: Text -> ModifyClusterMaintenance
newModifyClusterMaintenance Text
pClusterIdentifier_ =
  ModifyClusterMaintenance' :: Maybe ISO8601
-> Maybe Bool
-> Maybe Int
-> Maybe ISO8601
-> Maybe Text
-> Text
-> ModifyClusterMaintenance
ModifyClusterMaintenance'
    { $sel:deferMaintenanceEndTime:ModifyClusterMaintenance' :: Maybe ISO8601
deferMaintenanceEndTime =
        Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:deferMaintenance:ModifyClusterMaintenance' :: Maybe Bool
deferMaintenance = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:deferMaintenanceDuration:ModifyClusterMaintenance' :: Maybe Int
deferMaintenanceDuration = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:deferMaintenanceStartTime:ModifyClusterMaintenance' :: Maybe ISO8601
deferMaintenanceStartTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:deferMaintenanceIdentifier:ModifyClusterMaintenance' :: Maybe Text
deferMaintenanceIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterIdentifier:ModifyClusterMaintenance' :: Text
clusterIdentifier = Text
pClusterIdentifier_
    }

-- | A timestamp indicating end time for the deferred maintenance window. If
-- you specify an end time, you can\'t specify a duration.
modifyClusterMaintenance_deferMaintenanceEndTime :: Lens.Lens' ModifyClusterMaintenance (Prelude.Maybe Prelude.UTCTime)
modifyClusterMaintenance_deferMaintenanceEndTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ModifyClusterMaintenance -> f ModifyClusterMaintenance
modifyClusterMaintenance_deferMaintenanceEndTime = (ModifyClusterMaintenance -> Maybe ISO8601)
-> (ModifyClusterMaintenance
    -> Maybe ISO8601 -> ModifyClusterMaintenance)
-> Lens
     ModifyClusterMaintenance
     ModifyClusterMaintenance
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterMaintenance' {Maybe ISO8601
deferMaintenanceEndTime :: Maybe ISO8601
$sel:deferMaintenanceEndTime:ModifyClusterMaintenance' :: ModifyClusterMaintenance -> Maybe ISO8601
deferMaintenanceEndTime} -> Maybe ISO8601
deferMaintenanceEndTime) (\s :: ModifyClusterMaintenance
s@ModifyClusterMaintenance' {} Maybe ISO8601
a -> ModifyClusterMaintenance
s {$sel:deferMaintenanceEndTime:ModifyClusterMaintenance' :: Maybe ISO8601
deferMaintenanceEndTime = Maybe ISO8601
a} :: ModifyClusterMaintenance) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> ModifyClusterMaintenance -> f ModifyClusterMaintenance)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ModifyClusterMaintenance
-> f ModifyClusterMaintenance
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 boolean indicating whether to enable the deferred maintenance window.
modifyClusterMaintenance_deferMaintenance :: Lens.Lens' ModifyClusterMaintenance (Prelude.Maybe Prelude.Bool)
modifyClusterMaintenance_deferMaintenance :: (Maybe Bool -> f (Maybe Bool))
-> ModifyClusterMaintenance -> f ModifyClusterMaintenance
modifyClusterMaintenance_deferMaintenance = (ModifyClusterMaintenance -> Maybe Bool)
-> (ModifyClusterMaintenance
    -> Maybe Bool -> ModifyClusterMaintenance)
-> Lens
     ModifyClusterMaintenance
     ModifyClusterMaintenance
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterMaintenance' {Maybe Bool
deferMaintenance :: Maybe Bool
$sel:deferMaintenance:ModifyClusterMaintenance' :: ModifyClusterMaintenance -> Maybe Bool
deferMaintenance} -> Maybe Bool
deferMaintenance) (\s :: ModifyClusterMaintenance
s@ModifyClusterMaintenance' {} Maybe Bool
a -> ModifyClusterMaintenance
s {$sel:deferMaintenance:ModifyClusterMaintenance' :: Maybe Bool
deferMaintenance = Maybe Bool
a} :: ModifyClusterMaintenance)

-- | An integer indicating the duration of the maintenance window in days. If
-- you specify a duration, you can\'t specify an end time. The duration
-- must be 45 days or less.
modifyClusterMaintenance_deferMaintenanceDuration :: Lens.Lens' ModifyClusterMaintenance (Prelude.Maybe Prelude.Int)
modifyClusterMaintenance_deferMaintenanceDuration :: (Maybe Int -> f (Maybe Int))
-> ModifyClusterMaintenance -> f ModifyClusterMaintenance
modifyClusterMaintenance_deferMaintenanceDuration = (ModifyClusterMaintenance -> Maybe Int)
-> (ModifyClusterMaintenance
    -> Maybe Int -> ModifyClusterMaintenance)
-> Lens
     ModifyClusterMaintenance
     ModifyClusterMaintenance
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterMaintenance' {Maybe Int
deferMaintenanceDuration :: Maybe Int
$sel:deferMaintenanceDuration:ModifyClusterMaintenance' :: ModifyClusterMaintenance -> Maybe Int
deferMaintenanceDuration} -> Maybe Int
deferMaintenanceDuration) (\s :: ModifyClusterMaintenance
s@ModifyClusterMaintenance' {} Maybe Int
a -> ModifyClusterMaintenance
s {$sel:deferMaintenanceDuration:ModifyClusterMaintenance' :: Maybe Int
deferMaintenanceDuration = Maybe Int
a} :: ModifyClusterMaintenance)

-- | A timestamp indicating the start time for the deferred maintenance
-- window.
modifyClusterMaintenance_deferMaintenanceStartTime :: Lens.Lens' ModifyClusterMaintenance (Prelude.Maybe Prelude.UTCTime)
modifyClusterMaintenance_deferMaintenanceStartTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ModifyClusterMaintenance -> f ModifyClusterMaintenance
modifyClusterMaintenance_deferMaintenanceStartTime = (ModifyClusterMaintenance -> Maybe ISO8601)
-> (ModifyClusterMaintenance
    -> Maybe ISO8601 -> ModifyClusterMaintenance)
-> Lens
     ModifyClusterMaintenance
     ModifyClusterMaintenance
     (Maybe ISO8601)
     (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterMaintenance' {Maybe ISO8601
deferMaintenanceStartTime :: Maybe ISO8601
$sel:deferMaintenanceStartTime:ModifyClusterMaintenance' :: ModifyClusterMaintenance -> Maybe ISO8601
deferMaintenanceStartTime} -> Maybe ISO8601
deferMaintenanceStartTime) (\s :: ModifyClusterMaintenance
s@ModifyClusterMaintenance' {} Maybe ISO8601
a -> ModifyClusterMaintenance
s {$sel:deferMaintenanceStartTime:ModifyClusterMaintenance' :: Maybe ISO8601
deferMaintenanceStartTime = Maybe ISO8601
a} :: ModifyClusterMaintenance) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> ModifyClusterMaintenance -> f ModifyClusterMaintenance)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ModifyClusterMaintenance
-> f ModifyClusterMaintenance
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 unique identifier for the deferred maintenance window.
modifyClusterMaintenance_deferMaintenanceIdentifier :: Lens.Lens' ModifyClusterMaintenance (Prelude.Maybe Prelude.Text)
modifyClusterMaintenance_deferMaintenanceIdentifier :: (Maybe Text -> f (Maybe Text))
-> ModifyClusterMaintenance -> f ModifyClusterMaintenance
modifyClusterMaintenance_deferMaintenanceIdentifier = (ModifyClusterMaintenance -> Maybe Text)
-> (ModifyClusterMaintenance
    -> Maybe Text -> ModifyClusterMaintenance)
-> Lens
     ModifyClusterMaintenance
     ModifyClusterMaintenance
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterMaintenance' {Maybe Text
deferMaintenanceIdentifier :: Maybe Text
$sel:deferMaintenanceIdentifier:ModifyClusterMaintenance' :: ModifyClusterMaintenance -> Maybe Text
deferMaintenanceIdentifier} -> Maybe Text
deferMaintenanceIdentifier) (\s :: ModifyClusterMaintenance
s@ModifyClusterMaintenance' {} Maybe Text
a -> ModifyClusterMaintenance
s {$sel:deferMaintenanceIdentifier:ModifyClusterMaintenance' :: Maybe Text
deferMaintenanceIdentifier = Maybe Text
a} :: ModifyClusterMaintenance)

-- | A unique identifier for the cluster.
modifyClusterMaintenance_clusterIdentifier :: Lens.Lens' ModifyClusterMaintenance Prelude.Text
modifyClusterMaintenance_clusterIdentifier :: (Text -> f Text)
-> ModifyClusterMaintenance -> f ModifyClusterMaintenance
modifyClusterMaintenance_clusterIdentifier = (ModifyClusterMaintenance -> Text)
-> (ModifyClusterMaintenance -> Text -> ModifyClusterMaintenance)
-> Lens ModifyClusterMaintenance ModifyClusterMaintenance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterMaintenance' {Text
clusterIdentifier :: Text
$sel:clusterIdentifier:ModifyClusterMaintenance' :: ModifyClusterMaintenance -> Text
clusterIdentifier} -> Text
clusterIdentifier) (\s :: ModifyClusterMaintenance
s@ModifyClusterMaintenance' {} Text
a -> ModifyClusterMaintenance
s {$sel:clusterIdentifier:ModifyClusterMaintenance' :: Text
clusterIdentifier = Text
a} :: ModifyClusterMaintenance)

instance Core.AWSRequest ModifyClusterMaintenance where
  type
    AWSResponse ModifyClusterMaintenance =
      ModifyClusterMaintenanceResponse
  request :: ModifyClusterMaintenance -> Request ModifyClusterMaintenance
request = Service
-> ModifyClusterMaintenance -> Request ModifyClusterMaintenance
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ModifyClusterMaintenance
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyClusterMaintenance)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ModifyClusterMaintenance))
-> Logger
-> Service
-> Proxy ModifyClusterMaintenance
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyClusterMaintenance)))
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
"ModifyClusterMaintenanceResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Cluster -> Int -> ModifyClusterMaintenanceResponse
ModifyClusterMaintenanceResponse'
            (Maybe Cluster -> Int -> ModifyClusterMaintenanceResponse)
-> Either String (Maybe Cluster)
-> Either String (Int -> ModifyClusterMaintenanceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Cluster)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Cluster")
            Either String (Int -> ModifyClusterMaintenanceResponse)
-> Either String Int
-> Either String ModifyClusterMaintenanceResponse
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 ModifyClusterMaintenance

instance Prelude.NFData ModifyClusterMaintenance

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

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

instance Core.ToQuery ModifyClusterMaintenance where
  toQuery :: ModifyClusterMaintenance -> QueryString
toQuery ModifyClusterMaintenance' {Maybe Bool
Maybe Int
Maybe Text
Maybe ISO8601
Text
clusterIdentifier :: Text
deferMaintenanceIdentifier :: Maybe Text
deferMaintenanceStartTime :: Maybe ISO8601
deferMaintenanceDuration :: Maybe Int
deferMaintenance :: Maybe Bool
deferMaintenanceEndTime :: Maybe ISO8601
$sel:clusterIdentifier:ModifyClusterMaintenance' :: ModifyClusterMaintenance -> Text
$sel:deferMaintenanceIdentifier:ModifyClusterMaintenance' :: ModifyClusterMaintenance -> Maybe Text
$sel:deferMaintenanceStartTime:ModifyClusterMaintenance' :: ModifyClusterMaintenance -> Maybe ISO8601
$sel:deferMaintenanceDuration:ModifyClusterMaintenance' :: ModifyClusterMaintenance -> Maybe Int
$sel:deferMaintenance:ModifyClusterMaintenance' :: ModifyClusterMaintenance -> Maybe Bool
$sel:deferMaintenanceEndTime:ModifyClusterMaintenance' :: ModifyClusterMaintenance -> 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
"ModifyClusterMaintenance" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"DeferMaintenanceEndTime"
          ByteString -> Maybe ISO8601 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ISO8601
deferMaintenanceEndTime,
        ByteString
"DeferMaintenance" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
deferMaintenance,
        ByteString
"DeferMaintenanceDuration"
          ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
deferMaintenanceDuration,
        ByteString
"DeferMaintenanceStartTime"
          ByteString -> Maybe ISO8601 -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ISO8601
deferMaintenanceStartTime,
        ByteString
"DeferMaintenanceIdentifier"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
deferMaintenanceIdentifier,
        ByteString
"ClusterIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
clusterIdentifier
      ]

-- | /See:/ 'newModifyClusterMaintenanceResponse' smart constructor.
data ModifyClusterMaintenanceResponse = ModifyClusterMaintenanceResponse'
  { ModifyClusterMaintenanceResponse -> Maybe Cluster
cluster :: Prelude.Maybe Cluster,
    -- | The response's http status code.
    ModifyClusterMaintenanceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ModifyClusterMaintenanceResponse
-> ModifyClusterMaintenanceResponse -> Bool
(ModifyClusterMaintenanceResponse
 -> ModifyClusterMaintenanceResponse -> Bool)
-> (ModifyClusterMaintenanceResponse
    -> ModifyClusterMaintenanceResponse -> Bool)
-> Eq ModifyClusterMaintenanceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyClusterMaintenanceResponse
-> ModifyClusterMaintenanceResponse -> Bool
$c/= :: ModifyClusterMaintenanceResponse
-> ModifyClusterMaintenanceResponse -> Bool
== :: ModifyClusterMaintenanceResponse
-> ModifyClusterMaintenanceResponse -> Bool
$c== :: ModifyClusterMaintenanceResponse
-> ModifyClusterMaintenanceResponse -> Bool
Prelude.Eq, ReadPrec [ModifyClusterMaintenanceResponse]
ReadPrec ModifyClusterMaintenanceResponse
Int -> ReadS ModifyClusterMaintenanceResponse
ReadS [ModifyClusterMaintenanceResponse]
(Int -> ReadS ModifyClusterMaintenanceResponse)
-> ReadS [ModifyClusterMaintenanceResponse]
-> ReadPrec ModifyClusterMaintenanceResponse
-> ReadPrec [ModifyClusterMaintenanceResponse]
-> Read ModifyClusterMaintenanceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyClusterMaintenanceResponse]
$creadListPrec :: ReadPrec [ModifyClusterMaintenanceResponse]
readPrec :: ReadPrec ModifyClusterMaintenanceResponse
$creadPrec :: ReadPrec ModifyClusterMaintenanceResponse
readList :: ReadS [ModifyClusterMaintenanceResponse]
$creadList :: ReadS [ModifyClusterMaintenanceResponse]
readsPrec :: Int -> ReadS ModifyClusterMaintenanceResponse
$creadsPrec :: Int -> ReadS ModifyClusterMaintenanceResponse
Prelude.Read, Int -> ModifyClusterMaintenanceResponse -> ShowS
[ModifyClusterMaintenanceResponse] -> ShowS
ModifyClusterMaintenanceResponse -> String
(Int -> ModifyClusterMaintenanceResponse -> ShowS)
-> (ModifyClusterMaintenanceResponse -> String)
-> ([ModifyClusterMaintenanceResponse] -> ShowS)
-> Show ModifyClusterMaintenanceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyClusterMaintenanceResponse] -> ShowS
$cshowList :: [ModifyClusterMaintenanceResponse] -> ShowS
show :: ModifyClusterMaintenanceResponse -> String
$cshow :: ModifyClusterMaintenanceResponse -> String
showsPrec :: Int -> ModifyClusterMaintenanceResponse -> ShowS
$cshowsPrec :: Int -> ModifyClusterMaintenanceResponse -> ShowS
Prelude.Show, (forall x.
 ModifyClusterMaintenanceResponse
 -> Rep ModifyClusterMaintenanceResponse x)
-> (forall x.
    Rep ModifyClusterMaintenanceResponse x
    -> ModifyClusterMaintenanceResponse)
-> Generic ModifyClusterMaintenanceResponse
forall x.
Rep ModifyClusterMaintenanceResponse x
-> ModifyClusterMaintenanceResponse
forall x.
ModifyClusterMaintenanceResponse
-> Rep ModifyClusterMaintenanceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyClusterMaintenanceResponse x
-> ModifyClusterMaintenanceResponse
$cfrom :: forall x.
ModifyClusterMaintenanceResponse
-> Rep ModifyClusterMaintenanceResponse x
Prelude.Generic)

-- |
-- Create a value of 'ModifyClusterMaintenanceResponse' 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:
--
-- 'cluster', 'modifyClusterMaintenanceResponse_cluster' - Undocumented member.
--
-- 'httpStatus', 'modifyClusterMaintenanceResponse_httpStatus' - The response's http status code.
newModifyClusterMaintenanceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ModifyClusterMaintenanceResponse
newModifyClusterMaintenanceResponse :: Int -> ModifyClusterMaintenanceResponse
newModifyClusterMaintenanceResponse Int
pHttpStatus_ =
  ModifyClusterMaintenanceResponse' :: Maybe Cluster -> Int -> ModifyClusterMaintenanceResponse
ModifyClusterMaintenanceResponse'
    { $sel:cluster:ModifyClusterMaintenanceResponse' :: Maybe Cluster
cluster =
        Maybe Cluster
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ModifyClusterMaintenanceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
modifyClusterMaintenanceResponse_cluster :: Lens.Lens' ModifyClusterMaintenanceResponse (Prelude.Maybe Cluster)
modifyClusterMaintenanceResponse_cluster :: (Maybe Cluster -> f (Maybe Cluster))
-> ModifyClusterMaintenanceResponse
-> f ModifyClusterMaintenanceResponse
modifyClusterMaintenanceResponse_cluster = (ModifyClusterMaintenanceResponse -> Maybe Cluster)
-> (ModifyClusterMaintenanceResponse
    -> Maybe Cluster -> ModifyClusterMaintenanceResponse)
-> Lens
     ModifyClusterMaintenanceResponse
     ModifyClusterMaintenanceResponse
     (Maybe Cluster)
     (Maybe Cluster)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterMaintenanceResponse' {Maybe Cluster
cluster :: Maybe Cluster
$sel:cluster:ModifyClusterMaintenanceResponse' :: ModifyClusterMaintenanceResponse -> Maybe Cluster
cluster} -> Maybe Cluster
cluster) (\s :: ModifyClusterMaintenanceResponse
s@ModifyClusterMaintenanceResponse' {} Maybe Cluster
a -> ModifyClusterMaintenanceResponse
s {$sel:cluster:ModifyClusterMaintenanceResponse' :: Maybe Cluster
cluster = Maybe Cluster
a} :: ModifyClusterMaintenanceResponse)

-- | The response's http status code.
modifyClusterMaintenanceResponse_httpStatus :: Lens.Lens' ModifyClusterMaintenanceResponse Prelude.Int
modifyClusterMaintenanceResponse_httpStatus :: (Int -> f Int)
-> ModifyClusterMaintenanceResponse
-> f ModifyClusterMaintenanceResponse
modifyClusterMaintenanceResponse_httpStatus = (ModifyClusterMaintenanceResponse -> Int)
-> (ModifyClusterMaintenanceResponse
    -> Int -> ModifyClusterMaintenanceResponse)
-> Lens
     ModifyClusterMaintenanceResponse
     ModifyClusterMaintenanceResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterMaintenanceResponse' {Int
httpStatus :: Int
$sel:httpStatus:ModifyClusterMaintenanceResponse' :: ModifyClusterMaintenanceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ModifyClusterMaintenanceResponse
s@ModifyClusterMaintenanceResponse' {} Int
a -> ModifyClusterMaintenanceResponse
s {$sel:httpStatus:ModifyClusterMaintenanceResponse' :: Int
httpStatus = Int
a} :: ModifyClusterMaintenanceResponse)

instance
  Prelude.NFData
    ModifyClusterMaintenanceResponse