{-# 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.DMS.ApplyPendingMaintenanceAction
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Applies a pending maintenance action to a resource (for example, to a
-- replication instance).
module Amazonka.DMS.ApplyPendingMaintenanceAction
  ( -- * Creating a Request
    ApplyPendingMaintenanceAction (..),
    newApplyPendingMaintenanceAction,

    -- * Request Lenses
    applyPendingMaintenanceAction_replicationInstanceArn,
    applyPendingMaintenanceAction_applyAction,
    applyPendingMaintenanceAction_optInType,

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

    -- * Response Lenses
    applyPendingMaintenanceActionResponse_resourcePendingMaintenanceActions,
    applyPendingMaintenanceActionResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.DMS.Types
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- |
--
-- /See:/ 'newApplyPendingMaintenanceAction' smart constructor.
data ApplyPendingMaintenanceAction = ApplyPendingMaintenanceAction'
  { -- | The Amazon Resource Name (ARN) of the DMS resource that the pending
    -- maintenance action applies to.
    ApplyPendingMaintenanceAction -> Text
replicationInstanceArn :: Prelude.Text,
    -- | The pending maintenance action to apply to this resource.
    --
    -- Valid values: @os-upgrade@, @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. You can\'t undo an opt-in request of type @immediate@.
    --
    -- 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
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]
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
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.
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:
--
-- 'replicationInstanceArn', 'applyPendingMaintenanceAction_replicationInstanceArn' - The Amazon Resource Name (ARN) of the DMS resource that the pending
-- maintenance action applies to.
--
-- 'applyAction', 'applyPendingMaintenanceAction_applyAction' - The pending maintenance action to apply to this resource.
--
-- Valid values: @os-upgrade@, @system-update@, @db-upgrade@
--
-- 'optInType', 'applyPendingMaintenanceAction_optInType' - A value that specifies the type of opt-in request, or undoes an opt-in
-- request. You can\'t undo an opt-in request of type @immediate@.
--
-- 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 ::
  -- | 'replicationInstanceArn'
  Prelude.Text ->
  -- | 'applyAction'
  Prelude.Text ->
  -- | 'optInType'
  Prelude.Text ->
  ApplyPendingMaintenanceAction
newApplyPendingMaintenanceAction :: Text -> Text -> Text -> ApplyPendingMaintenanceAction
newApplyPendingMaintenanceAction
  Text
pReplicationInstanceArn_
  Text
pApplyAction_
  Text
pOptInType_ =
    ApplyPendingMaintenanceAction'
      { $sel:replicationInstanceArn:ApplyPendingMaintenanceAction' :: Text
replicationInstanceArn =
          Text
pReplicationInstanceArn_,
        $sel:applyAction:ApplyPendingMaintenanceAction' :: Text
applyAction = Text
pApplyAction_,
        $sel:optInType:ApplyPendingMaintenanceAction' :: Text
optInType = Text
pOptInType_
      }

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

-- | The pending maintenance action to apply to this resource.
--
-- Valid values: @os-upgrade@, @system-update@, @db-upgrade@
applyPendingMaintenanceAction_applyAction :: Lens.Lens' ApplyPendingMaintenanceAction Prelude.Text
applyPendingMaintenanceAction_applyAction :: Lens' ApplyPendingMaintenanceAction Text
applyPendingMaintenanceAction_applyAction = 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. You can\'t undo an opt-in request of type @immediate@.
--
-- 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 :: Lens' ApplyPendingMaintenanceAction Text
applyPendingMaintenanceAction_optInType = 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 :: (Service -> Service)
-> ApplyPendingMaintenanceAction
-> Request ApplyPendingMaintenanceAction
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ApplyPendingMaintenanceAction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ApplyPendingMaintenanceAction)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe ResourcePendingMaintenanceActions
-> Int -> ApplyPendingMaintenanceActionResponse
ApplyPendingMaintenanceActionResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ResourcePendingMaintenanceActions")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ApplyPendingMaintenanceAction
  where
  hashWithSalt :: Int -> ApplyPendingMaintenanceAction -> Int
hashWithSalt Int
_salt ApplyPendingMaintenanceAction' {Text
optInType :: Text
applyAction :: Text
replicationInstanceArn :: Text
$sel:optInType:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
$sel:applyAction:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
$sel:replicationInstanceArn:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
replicationInstanceArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applyAction
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
optInType

instance Prelude.NFData ApplyPendingMaintenanceAction where
  rnf :: ApplyPendingMaintenanceAction -> ()
rnf ApplyPendingMaintenanceAction' {Text
optInType :: Text
applyAction :: Text
replicationInstanceArn :: Text
$sel:optInType:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
$sel:applyAction:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
$sel:replicationInstanceArn:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
replicationInstanceArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
applyAction
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
optInType

instance Data.ToHeaders ApplyPendingMaintenanceAction where
  toHeaders :: ApplyPendingMaintenanceAction -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AmazonDMSv20160101.ApplyPendingMaintenanceAction" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ApplyPendingMaintenanceAction where
  toJSON :: ApplyPendingMaintenanceAction -> Value
toJSON ApplyPendingMaintenanceAction' {Text
optInType :: Text
applyAction :: Text
replicationInstanceArn :: Text
$sel:optInType:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
$sel:applyAction:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
$sel:replicationInstanceArn:ApplyPendingMaintenanceAction' :: ApplyPendingMaintenanceAction -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just
              ( Key
"ReplicationInstanceArn"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
replicationInstanceArn
              ),
            forall a. a -> Maybe a
Prelude.Just (Key
"ApplyAction" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
applyAction),
            forall a. a -> Maybe a
Prelude.Just (Key
"OptInType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
optInType)
          ]
      )

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

instance Data.ToQuery ApplyPendingMaintenanceAction where
  toQuery :: ApplyPendingMaintenanceAction -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- |
--
-- /See:/ 'newApplyPendingMaintenanceActionResponse' smart constructor.
data ApplyPendingMaintenanceActionResponse = ApplyPendingMaintenanceActionResponse'
  { -- | The DMS resource that the pending maintenance action will be applied to.
    ApplyPendingMaintenanceActionResponse
-> Maybe ResourcePendingMaintenanceActions
resourcePendingMaintenanceActions :: Prelude.Maybe ResourcePendingMaintenanceActions,
    -- | The response's http status code.
    ApplyPendingMaintenanceActionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ApplyPendingMaintenanceActionResponse
-> ApplyPendingMaintenanceActionResponse -> Bool
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]
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
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.
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' - The DMS resource that the pending maintenance action will be applied to.
--
-- 'httpStatus', 'applyPendingMaintenanceActionResponse_httpStatus' - The response's http status code.
newApplyPendingMaintenanceActionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ApplyPendingMaintenanceActionResponse
newApplyPendingMaintenanceActionResponse :: Int -> ApplyPendingMaintenanceActionResponse
newApplyPendingMaintenanceActionResponse Int
pHttpStatus_ =
  ApplyPendingMaintenanceActionResponse'
    { $sel:resourcePendingMaintenanceActions:ApplyPendingMaintenanceActionResponse' :: Maybe ResourcePendingMaintenanceActions
resourcePendingMaintenanceActions =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ApplyPendingMaintenanceActionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The DMS resource that the pending maintenance action will be applied to.
applyPendingMaintenanceActionResponse_resourcePendingMaintenanceActions :: Lens.Lens' ApplyPendingMaintenanceActionResponse (Prelude.Maybe ResourcePendingMaintenanceActions)
applyPendingMaintenanceActionResponse_resourcePendingMaintenanceActions :: Lens'
  ApplyPendingMaintenanceActionResponse
  (Maybe ResourcePendingMaintenanceActions)
applyPendingMaintenanceActionResponse_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 :: Lens' ApplyPendingMaintenanceActionResponse Int
applyPendingMaintenanceActionResponse_httpStatus = 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
  where
  rnf :: ApplyPendingMaintenanceActionResponse -> ()
rnf ApplyPendingMaintenanceActionResponse' {Int
Maybe ResourcePendingMaintenanceActions
httpStatus :: Int
resourcePendingMaintenanceActions :: Maybe ResourcePendingMaintenanceActions
$sel:httpStatus:ApplyPendingMaintenanceActionResponse' :: ApplyPendingMaintenanceActionResponse -> Int
$sel:resourcePendingMaintenanceActions:ApplyPendingMaintenanceActionResponse' :: ApplyPendingMaintenanceActionResponse
-> Maybe ResourcePendingMaintenanceActions
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourcePendingMaintenanceActions
resourcePendingMaintenanceActions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus