{-# 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.RebootReplicationInstance
-- 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)
--
-- Reboots a replication instance. Rebooting results in a momentary outage,
-- until the replication instance becomes available again.
module Amazonka.DMS.RebootReplicationInstance
  ( -- * Creating a Request
    RebootReplicationInstance (..),
    newRebootReplicationInstance,

    -- * Request Lenses
    rebootReplicationInstance_forcePlannedFailover,
    rebootReplicationInstance_forceFailover,
    rebootReplicationInstance_replicationInstanceArn,

    -- * Destructuring the Response
    RebootReplicationInstanceResponse (..),
    newRebootReplicationInstanceResponse,

    -- * Response Lenses
    rebootReplicationInstanceResponse_replicationInstance,
    rebootReplicationInstanceResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DMS.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

-- | /See:/ 'newRebootReplicationInstance' smart constructor.
data RebootReplicationInstance = RebootReplicationInstance'
  { -- | If this parameter is @true@, the reboot is conducted through a planned
    -- Multi-AZ failover where resources are released and cleaned up prior to
    -- conducting the failover. If the instance isn\'\'t configured for
    -- Multi-AZ, then you can\'t specify @true@. ( @--force-planned-failover@
    -- and @--force-failover@ can\'t both be set to @true@.)
    RebootReplicationInstance -> Maybe Bool
forcePlannedFailover :: Prelude.Maybe Prelude.Bool,
    -- | If this parameter is @true@, the reboot is conducted through a Multi-AZ
    -- failover. If the instance isn\'t configured for Multi-AZ, then you
    -- can\'t specify @true@. ( @--force-planned-failover@ and
    -- @--force-failover@ can\'t both be set to @true@.)
    RebootReplicationInstance -> Maybe Bool
forceFailover :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) of the replication instance.
    RebootReplicationInstance -> Text
replicationInstanceArn :: Prelude.Text
  }
  deriving (RebootReplicationInstance -> RebootReplicationInstance -> Bool
(RebootReplicationInstance -> RebootReplicationInstance -> Bool)
-> (RebootReplicationInstance -> RebootReplicationInstance -> Bool)
-> Eq RebootReplicationInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RebootReplicationInstance -> RebootReplicationInstance -> Bool
$c/= :: RebootReplicationInstance -> RebootReplicationInstance -> Bool
== :: RebootReplicationInstance -> RebootReplicationInstance -> Bool
$c== :: RebootReplicationInstance -> RebootReplicationInstance -> Bool
Prelude.Eq, ReadPrec [RebootReplicationInstance]
ReadPrec RebootReplicationInstance
Int -> ReadS RebootReplicationInstance
ReadS [RebootReplicationInstance]
(Int -> ReadS RebootReplicationInstance)
-> ReadS [RebootReplicationInstance]
-> ReadPrec RebootReplicationInstance
-> ReadPrec [RebootReplicationInstance]
-> Read RebootReplicationInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RebootReplicationInstance]
$creadListPrec :: ReadPrec [RebootReplicationInstance]
readPrec :: ReadPrec RebootReplicationInstance
$creadPrec :: ReadPrec RebootReplicationInstance
readList :: ReadS [RebootReplicationInstance]
$creadList :: ReadS [RebootReplicationInstance]
readsPrec :: Int -> ReadS RebootReplicationInstance
$creadsPrec :: Int -> ReadS RebootReplicationInstance
Prelude.Read, Int -> RebootReplicationInstance -> ShowS
[RebootReplicationInstance] -> ShowS
RebootReplicationInstance -> String
(Int -> RebootReplicationInstance -> ShowS)
-> (RebootReplicationInstance -> String)
-> ([RebootReplicationInstance] -> ShowS)
-> Show RebootReplicationInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RebootReplicationInstance] -> ShowS
$cshowList :: [RebootReplicationInstance] -> ShowS
show :: RebootReplicationInstance -> String
$cshow :: RebootReplicationInstance -> String
showsPrec :: Int -> RebootReplicationInstance -> ShowS
$cshowsPrec :: Int -> RebootReplicationInstance -> ShowS
Prelude.Show, (forall x.
 RebootReplicationInstance -> Rep RebootReplicationInstance x)
-> (forall x.
    Rep RebootReplicationInstance x -> RebootReplicationInstance)
-> Generic RebootReplicationInstance
forall x.
Rep RebootReplicationInstance x -> RebootReplicationInstance
forall x.
RebootReplicationInstance -> Rep RebootReplicationInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RebootReplicationInstance x -> RebootReplicationInstance
$cfrom :: forall x.
RebootReplicationInstance -> Rep RebootReplicationInstance x
Prelude.Generic)

-- |
-- Create a value of 'RebootReplicationInstance' 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:
--
-- 'forcePlannedFailover', 'rebootReplicationInstance_forcePlannedFailover' - If this parameter is @true@, the reboot is conducted through a planned
-- Multi-AZ failover where resources are released and cleaned up prior to
-- conducting the failover. If the instance isn\'\'t configured for
-- Multi-AZ, then you can\'t specify @true@. ( @--force-planned-failover@
-- and @--force-failover@ can\'t both be set to @true@.)
--
-- 'forceFailover', 'rebootReplicationInstance_forceFailover' - If this parameter is @true@, the reboot is conducted through a Multi-AZ
-- failover. If the instance isn\'t configured for Multi-AZ, then you
-- can\'t specify @true@. ( @--force-planned-failover@ and
-- @--force-failover@ can\'t both be set to @true@.)
--
-- 'replicationInstanceArn', 'rebootReplicationInstance_replicationInstanceArn' - The Amazon Resource Name (ARN) of the replication instance.
newRebootReplicationInstance ::
  -- | 'replicationInstanceArn'
  Prelude.Text ->
  RebootReplicationInstance
newRebootReplicationInstance :: Text -> RebootReplicationInstance
newRebootReplicationInstance Text
pReplicationInstanceArn_ =
  RebootReplicationInstance' :: Maybe Bool -> Maybe Bool -> Text -> RebootReplicationInstance
RebootReplicationInstance'
    { $sel:forcePlannedFailover:RebootReplicationInstance' :: Maybe Bool
forcePlannedFailover =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:forceFailover:RebootReplicationInstance' :: Maybe Bool
forceFailover = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationInstanceArn:RebootReplicationInstance' :: Text
replicationInstanceArn =
        Text
pReplicationInstanceArn_
    }

-- | If this parameter is @true@, the reboot is conducted through a planned
-- Multi-AZ failover where resources are released and cleaned up prior to
-- conducting the failover. If the instance isn\'\'t configured for
-- Multi-AZ, then you can\'t specify @true@. ( @--force-planned-failover@
-- and @--force-failover@ can\'t both be set to @true@.)
rebootReplicationInstance_forcePlannedFailover :: Lens.Lens' RebootReplicationInstance (Prelude.Maybe Prelude.Bool)
rebootReplicationInstance_forcePlannedFailover :: (Maybe Bool -> f (Maybe Bool))
-> RebootReplicationInstance -> f RebootReplicationInstance
rebootReplicationInstance_forcePlannedFailover = (RebootReplicationInstance -> Maybe Bool)
-> (RebootReplicationInstance
    -> Maybe Bool -> RebootReplicationInstance)
-> Lens
     RebootReplicationInstance
     RebootReplicationInstance
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RebootReplicationInstance' {Maybe Bool
forcePlannedFailover :: Maybe Bool
$sel:forcePlannedFailover:RebootReplicationInstance' :: RebootReplicationInstance -> Maybe Bool
forcePlannedFailover} -> Maybe Bool
forcePlannedFailover) (\s :: RebootReplicationInstance
s@RebootReplicationInstance' {} Maybe Bool
a -> RebootReplicationInstance
s {$sel:forcePlannedFailover:RebootReplicationInstance' :: Maybe Bool
forcePlannedFailover = Maybe Bool
a} :: RebootReplicationInstance)

-- | If this parameter is @true@, the reboot is conducted through a Multi-AZ
-- failover. If the instance isn\'t configured for Multi-AZ, then you
-- can\'t specify @true@. ( @--force-planned-failover@ and
-- @--force-failover@ can\'t both be set to @true@.)
rebootReplicationInstance_forceFailover :: Lens.Lens' RebootReplicationInstance (Prelude.Maybe Prelude.Bool)
rebootReplicationInstance_forceFailover :: (Maybe Bool -> f (Maybe Bool))
-> RebootReplicationInstance -> f RebootReplicationInstance
rebootReplicationInstance_forceFailover = (RebootReplicationInstance -> Maybe Bool)
-> (RebootReplicationInstance
    -> Maybe Bool -> RebootReplicationInstance)
-> Lens
     RebootReplicationInstance
     RebootReplicationInstance
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RebootReplicationInstance' {Maybe Bool
forceFailover :: Maybe Bool
$sel:forceFailover:RebootReplicationInstance' :: RebootReplicationInstance -> Maybe Bool
forceFailover} -> Maybe Bool
forceFailover) (\s :: RebootReplicationInstance
s@RebootReplicationInstance' {} Maybe Bool
a -> RebootReplicationInstance
s {$sel:forceFailover:RebootReplicationInstance' :: Maybe Bool
forceFailover = Maybe Bool
a} :: RebootReplicationInstance)

-- | The Amazon Resource Name (ARN) of the replication instance.
rebootReplicationInstance_replicationInstanceArn :: Lens.Lens' RebootReplicationInstance Prelude.Text
rebootReplicationInstance_replicationInstanceArn :: (Text -> f Text)
-> RebootReplicationInstance -> f RebootReplicationInstance
rebootReplicationInstance_replicationInstanceArn = (RebootReplicationInstance -> Text)
-> (RebootReplicationInstance -> Text -> RebootReplicationInstance)
-> Lens
     RebootReplicationInstance RebootReplicationInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RebootReplicationInstance' {Text
replicationInstanceArn :: Text
$sel:replicationInstanceArn:RebootReplicationInstance' :: RebootReplicationInstance -> Text
replicationInstanceArn} -> Text
replicationInstanceArn) (\s :: RebootReplicationInstance
s@RebootReplicationInstance' {} Text
a -> RebootReplicationInstance
s {$sel:replicationInstanceArn:RebootReplicationInstance' :: Text
replicationInstanceArn = Text
a} :: RebootReplicationInstance)

instance Core.AWSRequest RebootReplicationInstance where
  type
    AWSResponse RebootReplicationInstance =
      RebootReplicationInstanceResponse
  request :: RebootReplicationInstance -> Request RebootReplicationInstance
request = Service
-> RebootReplicationInstance -> Request RebootReplicationInstance
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy RebootReplicationInstance
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RebootReplicationInstance)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse RebootReplicationInstance))
-> Logger
-> Service
-> Proxy RebootReplicationInstance
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RebootReplicationInstance)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe ReplicationInstance
-> Int -> RebootReplicationInstanceResponse
RebootReplicationInstanceResponse'
            (Maybe ReplicationInstance
 -> Int -> RebootReplicationInstanceResponse)
-> Either String (Maybe ReplicationInstance)
-> Either String (Int -> RebootReplicationInstanceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ReplicationInstance)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ReplicationInstance")
            Either String (Int -> RebootReplicationInstanceResponse)
-> Either String Int
-> Either String RebootReplicationInstanceResponse
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 RebootReplicationInstance

instance Prelude.NFData RebootReplicationInstance

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

instance Core.ToJSON RebootReplicationInstance where
  toJSON :: RebootReplicationInstance -> Value
toJSON RebootReplicationInstance' {Maybe Bool
Text
replicationInstanceArn :: Text
forceFailover :: Maybe Bool
forcePlannedFailover :: Maybe Bool
$sel:replicationInstanceArn:RebootReplicationInstance' :: RebootReplicationInstance -> Text
$sel:forceFailover:RebootReplicationInstance' :: RebootReplicationInstance -> Maybe Bool
$sel:forcePlannedFailover:RebootReplicationInstance' :: RebootReplicationInstance -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ForcePlannedFailover" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
forcePlannedFailover,
            (Text
"ForceFailover" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
forceFailover,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"ReplicationInstanceArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
replicationInstanceArn
              )
          ]
      )

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

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

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

-- |
-- Create a value of 'RebootReplicationInstanceResponse' 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:
--
-- 'replicationInstance', 'rebootReplicationInstanceResponse_replicationInstance' - The replication instance that is being rebooted.
--
-- 'httpStatus', 'rebootReplicationInstanceResponse_httpStatus' - The response's http status code.
newRebootReplicationInstanceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RebootReplicationInstanceResponse
newRebootReplicationInstanceResponse :: Int -> RebootReplicationInstanceResponse
newRebootReplicationInstanceResponse Int
pHttpStatus_ =
  RebootReplicationInstanceResponse' :: Maybe ReplicationInstance
-> Int -> RebootReplicationInstanceResponse
RebootReplicationInstanceResponse'
    { $sel:replicationInstance:RebootReplicationInstanceResponse' :: Maybe ReplicationInstance
replicationInstance =
        Maybe ReplicationInstance
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RebootReplicationInstanceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The replication instance that is being rebooted.
rebootReplicationInstanceResponse_replicationInstance :: Lens.Lens' RebootReplicationInstanceResponse (Prelude.Maybe ReplicationInstance)
rebootReplicationInstanceResponse_replicationInstance :: (Maybe ReplicationInstance -> f (Maybe ReplicationInstance))
-> RebootReplicationInstanceResponse
-> f RebootReplicationInstanceResponse
rebootReplicationInstanceResponse_replicationInstance = (RebootReplicationInstanceResponse -> Maybe ReplicationInstance)
-> (RebootReplicationInstanceResponse
    -> Maybe ReplicationInstance -> RebootReplicationInstanceResponse)
-> Lens
     RebootReplicationInstanceResponse
     RebootReplicationInstanceResponse
     (Maybe ReplicationInstance)
     (Maybe ReplicationInstance)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RebootReplicationInstanceResponse' {Maybe ReplicationInstance
replicationInstance :: Maybe ReplicationInstance
$sel:replicationInstance:RebootReplicationInstanceResponse' :: RebootReplicationInstanceResponse -> Maybe ReplicationInstance
replicationInstance} -> Maybe ReplicationInstance
replicationInstance) (\s :: RebootReplicationInstanceResponse
s@RebootReplicationInstanceResponse' {} Maybe ReplicationInstance
a -> RebootReplicationInstanceResponse
s {$sel:replicationInstance:RebootReplicationInstanceResponse' :: Maybe ReplicationInstance
replicationInstance = Maybe ReplicationInstance
a} :: RebootReplicationInstanceResponse)

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

instance
  Prelude.NFData
    RebootReplicationInstanceResponse