{-# 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.DocumentDB.ApplyPendingMaintenanceAction
-- 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)
--
-- Applies a pending maintenance action to a resource (for example, to an
-- Amazon DocumentDB instance).
module Amazonka.DocumentDB.ApplyPendingMaintenanceAction
  ( -- * Creating a Request
    ApplyPendingMaintenanceAction (..),
    newApplyPendingMaintenanceAction,

    -- * Request Lenses
    applyPendingMaintenanceAction_resourceIdentifier,
    applyPendingMaintenanceAction_applyAction,
    applyPendingMaintenanceAction_optInType,

    -- * Destructuring the Response
    ApplyPendingMaintenanceActionResponse (..),
    newApplyPendingMaintenanceActionResponse,

    -- * Response Lenses
    applyPendingMaintenanceActionResponse_resourcePendingMaintenanceActions,
    applyPendingMaintenanceActionResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DocumentDB.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Represents the input to ApplyPendingMaintenanceAction.
--
-- /See:/ 'newApplyPendingMaintenanceAction' smart constructor.
data ApplyPendingMaintenanceAction = ApplyPendingMaintenanceAction'
  { -- | The Amazon Resource Name (ARN) of the resource that the pending
    -- maintenance action applies to.
    ApplyPendingMaintenanceAction -> Text
resourceIdentifier :: Prelude.Text,
    -- | The pending maintenance action to apply to this resource.
    --
    -- Valid values: @system-update@, @db-upgrade@
    ApplyPendingMaintenanceAction -> Text
applyAction :: Prelude.Text,
    -- | A value that specifies the type of opt-in request or undoes an opt-in
    -- request. An opt-in request of type @immediate@ can\'t be undone.
    --
    -- Valid values:
    --
    -- -   @immediate@ - Apply the maintenance action immediately.
    --
    -- -   @next-maintenance@ - Apply the maintenance action during the next
    --     maintenance window for the resource.
    --
    -- -   @undo-opt-in@ - Cancel any existing @next-maintenance@ opt-in
    --     requests.
    ApplyPendingMaintenanceAction -> Text
optInType :: Prelude.Text
  }
  deriving (ApplyPendingMaintenanceAction
-> ApplyPendingMaintenanceAction -> Bool
(ApplyPendingMaintenanceAction
 -> ApplyPendingMaintenanceAction -> Bool)
-> (ApplyPendingMaintenanceAction
    -> ApplyPendingMaintenanceAction -> Bool)
-> Eq ApplyPendingMaintenanceAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplyPendingMaintenanceAction
-> ApplyPendingMaintenanceAction -> Bool
$c/= :: ApplyPendingMaintenanceAction
-> ApplyPendingMaintenanceAction -> Bool
== :: ApplyPendingMaintenanceAction
-> ApplyPendingMaintenanceAction -> Bool
$c== :: ApplyPendingMaintenanceAction
-> ApplyPendingMaintenanceAction -> Bool
Prelude.Eq, ReadPrec [ApplyPendingMaintenanceAction]
ReadPrec ApplyPendingMaintenanceAction
Int -> ReadS ApplyPendingMaintenanceAction
ReadS [ApplyPendingMaintenanceAction]
(Int -> ReadS ApplyPendingMaintenanceAction)
-> ReadS [ApplyPendingMaintenanceAction]
-> ReadPrec ApplyPendingMaintenanceAction
-> ReadPrec [ApplyPendingMaintenanceAction]
-> Read ApplyPendingMaintenanceAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplyPendingMaintenanceAction]
$creadListPrec :: ReadPrec [ApplyPendingMaintenanceAction]
readPrec :: ReadPrec ApplyPendingMaintenanceAction
$creadPrec :: ReadPrec ApplyPendingMaintenanceAction
readList :: ReadS [ApplyPendingMaintenanceAction]
$creadList :: ReadS [ApplyPendingMaintenanceAction]
readsPrec :: Int -> ReadS ApplyPendingMaintenanceAction
$creadsPrec :: Int -> ReadS ApplyPendingMaintenanceAction
Prelude.Read, Int -> ApplyPendingMaintenanceAction -> ShowS
[ApplyPendingMaintenanceAction] -> ShowS
ApplyPendingMaintenanceAction -> String
(Int -> ApplyPendingMaintenanceAction -> ShowS)
-> (ApplyPendingMaintenanceAction -> String)
-> ([ApplyPendingMaintenanceAction] -> ShowS)
-> Show ApplyPendingMaintenanceAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplyPendingMaintenanceAction] -> ShowS
$cshowList :: [ApplyPendingMaintenanceAction] -> ShowS
show :: ApplyPendingMaintenanceAction -> String
$cshow :: ApplyPendingMaintenanceAction -> String
showsPrec :: Int -> ApplyPendingMaintenanceAction -> ShowS
$cshowsPrec :: Int -> ApplyPendingMaintenanceAction -> ShowS
Prelude.Show, (forall x.
 ApplyPendingMaintenanceAction
 -> Rep ApplyPendingMaintenanceAction x)
-> (forall x.
    Rep ApplyPendingMaintenanceAction x
    -> ApplyPendingMaintenanceAction)
-> Generic ApplyPendingMaintenanceAction
forall x.
Rep ApplyPendingMaintenanceAction x
-> ApplyPendingMaintenanceAction
forall x.
ApplyPendingMaintenanceAction
-> Rep ApplyPendingMaintenanceAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ApplyPendingMaintenanceAction x
-> ApplyPendingMaintenanceAction
$cfrom :: forall x.
ApplyPendingMaintenanceAction
-> Rep ApplyPendingMaintenanceAction x
Prelude.Generic)

-- |
-- Create a value of 'ApplyPendingMaintenanceAction' 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:
--
-- 'resourceIdentifier', 'applyPendingMaintenanceAction_resourceIdentifier' - The Amazon Resource Name (ARN) of the resource that the pending
-- maintenance action applies to.
--
-- 'applyAction', 'applyPendingMaintenanceAction_applyAction' - The pending maintenance action to apply to this resource.
--
-- Valid values: @system-update@, @db-upgrade@
--
-- 'optInType', 'applyPendingMaintenanceAction_optInType' - A value that specifies the type of opt-in request or undoes an opt-in
-- request. An opt-in request of type @immediate@ can\'t be undone.
--
-- Valid values:
--
-- -   @immediate@ - Apply the maintenance action immediately.
--
-- -   @next-maintenance@ - Apply the maintenance action during the next
--     maintenance window for the resource.
--
-- -   @undo-opt-in@ - Cancel any existing @next-maintenance@ opt-in
--     requests.
newApplyPendingMaintenanceAction ::
  -- | 'resourceIdentifier'
  Prelude.Text ->
  -- | 'applyAction'
  Prelude.Text ->
  -- | 'optInType'
  Prelude.Text ->
  ApplyPendingMaintenanceAction
newApplyPendingMaintenanceAction :: Text -> Text -> Text -> ApplyPendingMaintenanceAction
newApplyPendingMaintenanceAction
  Text
pResourceIdentifier_
  Text
pApplyAction_
  Text
pOptInType_ =
    ApplyPendingMaintenanceAction' :: Text -> Text -> Text -> ApplyPendingMaintenanceAction
ApplyPendingMaintenanceAction'
      { $sel:resourceIdentifier:ApplyPendingMaintenanceAction' :: Text
resourceIdentifier =
          Text
pResourceIdentifier_,
        $sel:applyAction:ApplyPendingMaintenanceAction' :: Text
applyAction = Text
pApplyAction_,
        $sel:optInType:ApplyPendingMaintenanceAction' :: Text
optInType = Text
pOptInType_
      }

-- | The Amazon Resource Name (ARN) of the resource that the pending
-- maintenance action applies to.
applyPendingMaintenanceAction_resourceIdentifier :: Lens.Lens' ApplyPendingMaintenanceAction Prelude.Text
applyPendingMaintenanceAction_resourceIdentifier :: (Text -> f Text)
-> ApplyPendingMaintenanceAction -> f ApplyPendingMaintenanceAction
applyPendingMaintenanceAction_resourceIdentifier = (ApplyPendingMaintenanceAction -> Text)
-> (ApplyPendingMaintenanceAction
    -> Text -> ApplyPendingMaintenanceAction)
-> Lens
     ApplyPendingMaintenanceAction
     ApplyPendingMaintenanceAction
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplyPendingMaintenanceAction' {Text
resourceIdentifier :: Text
$sel:resourceIdentifier:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
resourceIdentifier} -> Text
resourceIdentifier) (\s :: ApplyPendingMaintenanceAction
s@ApplyPendingMaintenanceAction' {} Text
a -> ApplyPendingMaintenanceAction
s {$sel:resourceIdentifier:ApplyPendingMaintenanceAction' :: Text
resourceIdentifier = Text
a} :: ApplyPendingMaintenanceAction)

-- | The pending maintenance action to apply to this resource.
--
-- Valid values: @system-update@, @db-upgrade@
applyPendingMaintenanceAction_applyAction :: Lens.Lens' ApplyPendingMaintenanceAction Prelude.Text
applyPendingMaintenanceAction_applyAction :: (Text -> f Text)
-> ApplyPendingMaintenanceAction -> f ApplyPendingMaintenanceAction
applyPendingMaintenanceAction_applyAction = (ApplyPendingMaintenanceAction -> Text)
-> (ApplyPendingMaintenanceAction
    -> Text -> ApplyPendingMaintenanceAction)
-> Lens
     ApplyPendingMaintenanceAction
     ApplyPendingMaintenanceAction
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplyPendingMaintenanceAction' {Text
applyAction :: Text
$sel:applyAction:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
applyAction} -> Text
applyAction) (\s :: ApplyPendingMaintenanceAction
s@ApplyPendingMaintenanceAction' {} Text
a -> ApplyPendingMaintenanceAction
s {$sel:applyAction:ApplyPendingMaintenanceAction' :: Text
applyAction = Text
a} :: ApplyPendingMaintenanceAction)

-- | A value that specifies the type of opt-in request or undoes an opt-in
-- request. An opt-in request of type @immediate@ can\'t be undone.
--
-- Valid values:
--
-- -   @immediate@ - Apply the maintenance action immediately.
--
-- -   @next-maintenance@ - Apply the maintenance action during the next
--     maintenance window for the resource.
--
-- -   @undo-opt-in@ - Cancel any existing @next-maintenance@ opt-in
--     requests.
applyPendingMaintenanceAction_optInType :: Lens.Lens' ApplyPendingMaintenanceAction Prelude.Text
applyPendingMaintenanceAction_optInType :: (Text -> f Text)
-> ApplyPendingMaintenanceAction -> f ApplyPendingMaintenanceAction
applyPendingMaintenanceAction_optInType = (ApplyPendingMaintenanceAction -> Text)
-> (ApplyPendingMaintenanceAction
    -> Text -> ApplyPendingMaintenanceAction)
-> Lens
     ApplyPendingMaintenanceAction
     ApplyPendingMaintenanceAction
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplyPendingMaintenanceAction' {Text
optInType :: Text
$sel:optInType:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
optInType} -> Text
optInType) (\s :: ApplyPendingMaintenanceAction
s@ApplyPendingMaintenanceAction' {} Text
a -> ApplyPendingMaintenanceAction
s {$sel:optInType:ApplyPendingMaintenanceAction' :: Text
optInType = Text
a} :: ApplyPendingMaintenanceAction)

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

instance Prelude.NFData ApplyPendingMaintenanceAction

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

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

instance Core.ToQuery ApplyPendingMaintenanceAction where
  toQuery :: ApplyPendingMaintenanceAction -> QueryString
toQuery ApplyPendingMaintenanceAction' {Text
optInType :: Text
applyAction :: Text
resourceIdentifier :: Text
$sel:optInType:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
$sel:applyAction:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
$sel:resourceIdentifier:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"ApplyPendingMaintenanceAction" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"ResourceIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
resourceIdentifier,
        ByteString
"ApplyAction" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
applyAction,
        ByteString
"OptInType" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
optInType
      ]

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

-- |
-- Create a value of 'ApplyPendingMaintenanceActionResponse' 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:
--
-- 'resourcePendingMaintenanceActions', 'applyPendingMaintenanceActionResponse_resourcePendingMaintenanceActions' - Undocumented member.
--
-- 'httpStatus', 'applyPendingMaintenanceActionResponse_httpStatus' - The response's http status code.
newApplyPendingMaintenanceActionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ApplyPendingMaintenanceActionResponse
newApplyPendingMaintenanceActionResponse :: Int -> ApplyPendingMaintenanceActionResponse
newApplyPendingMaintenanceActionResponse Int
pHttpStatus_ =
  ApplyPendingMaintenanceActionResponse' :: Maybe ResourcePendingMaintenanceActions
-> Int -> ApplyPendingMaintenanceActionResponse
ApplyPendingMaintenanceActionResponse'
    { $sel:resourcePendingMaintenanceActions:ApplyPendingMaintenanceActionResponse' :: Maybe ResourcePendingMaintenanceActions
resourcePendingMaintenanceActions =
        Maybe ResourcePendingMaintenanceActions
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ApplyPendingMaintenanceActionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
applyPendingMaintenanceActionResponse_resourcePendingMaintenanceActions :: Lens.Lens' ApplyPendingMaintenanceActionResponse (Prelude.Maybe ResourcePendingMaintenanceActions)
applyPendingMaintenanceActionResponse_resourcePendingMaintenanceActions :: (Maybe ResourcePendingMaintenanceActions
 -> f (Maybe ResourcePendingMaintenanceActions))
-> ApplyPendingMaintenanceActionResponse
-> f ApplyPendingMaintenanceActionResponse
applyPendingMaintenanceActionResponse_resourcePendingMaintenanceActions = (ApplyPendingMaintenanceActionResponse
 -> Maybe ResourcePendingMaintenanceActions)
-> (ApplyPendingMaintenanceActionResponse
    -> Maybe ResourcePendingMaintenanceActions
    -> ApplyPendingMaintenanceActionResponse)
-> Lens
     ApplyPendingMaintenanceActionResponse
     ApplyPendingMaintenanceActionResponse
     (Maybe ResourcePendingMaintenanceActions)
     (Maybe ResourcePendingMaintenanceActions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplyPendingMaintenanceActionResponse' {Maybe ResourcePendingMaintenanceActions
resourcePendingMaintenanceActions :: Maybe ResourcePendingMaintenanceActions
$sel:resourcePendingMaintenanceActions:ApplyPendingMaintenanceActionResponse' :: ApplyPendingMaintenanceActionResponse
-> Maybe ResourcePendingMaintenanceActions
resourcePendingMaintenanceActions} -> Maybe ResourcePendingMaintenanceActions
resourcePendingMaintenanceActions) (\s :: ApplyPendingMaintenanceActionResponse
s@ApplyPendingMaintenanceActionResponse' {} Maybe ResourcePendingMaintenanceActions
a -> ApplyPendingMaintenanceActionResponse
s {$sel:resourcePendingMaintenanceActions:ApplyPendingMaintenanceActionResponse' :: Maybe ResourcePendingMaintenanceActions
resourcePendingMaintenanceActions = Maybe ResourcePendingMaintenanceActions
a} :: ApplyPendingMaintenanceActionResponse)

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

instance
  Prelude.NFData
    ApplyPendingMaintenanceActionResponse