{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.DrS.Types.RecoveryInstance
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DrS.Types.RecoveryInstance where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DrS.Types.EC2InstanceState
import Amazonka.DrS.Types.OriginEnvironment
import Amazonka.DrS.Types.RecoveryInstanceDataReplicationInfo
import Amazonka.DrS.Types.RecoveryInstanceFailback
import Amazonka.DrS.Types.RecoveryInstanceProperties
import qualified Amazonka.Prelude as Prelude

-- | A Recovery Instance is a replica of a Source Server running on EC2.
--
-- /See:/ 'newRecoveryInstance' smart constructor.
data RecoveryInstance = RecoveryInstance'
  { -- | The ARN of the Recovery Instance.
    RecoveryInstance -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The Data Replication Info of the Recovery Instance.
    RecoveryInstance -> Maybe RecoveryInstanceDataReplicationInfo
dataReplicationInfo :: Prelude.Maybe RecoveryInstanceDataReplicationInfo,
    -- | The EC2 instance ID of the Recovery Instance.
    RecoveryInstance -> Maybe Text
ec2InstanceID :: Prelude.Maybe Prelude.Text,
    -- | The state of the EC2 instance for this Recovery Instance.
    RecoveryInstance -> Maybe EC2InstanceState
ec2InstanceState :: Prelude.Maybe EC2InstanceState,
    -- | An object representing failback related information of the Recovery
    -- Instance.
    RecoveryInstance -> Maybe RecoveryInstanceFailback
failback :: Prelude.Maybe RecoveryInstanceFailback,
    -- | Whether this Recovery Instance was created for a drill or for an actual
    -- Recovery event.
    RecoveryInstance -> Maybe Bool
isDrill :: Prelude.Maybe Prelude.Bool,
    -- | The ID of the Job that created the Recovery Instance.
    RecoveryInstance -> Maybe Text
jobID :: Prelude.Maybe Prelude.Text,
    -- | Environment (On Premises \/ AWS) of the instance that the recovery
    -- instance originated from.
    RecoveryInstance -> Maybe OriginEnvironment
originEnvironment :: Prelude.Maybe OriginEnvironment,
    -- | The date and time of the Point in Time (PIT) snapshot that this Recovery
    -- Instance was launched from.
    RecoveryInstance -> Maybe Text
pointInTimeSnapshotDateTime :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Recovery Instance.
    RecoveryInstance -> Maybe Text
recoveryInstanceID :: Prelude.Maybe Prelude.Text,
    -- | Properties of the Recovery Instance machine.
    RecoveryInstance -> Maybe RecoveryInstanceProperties
recoveryInstanceProperties :: Prelude.Maybe RecoveryInstanceProperties,
    -- | The Source Server ID that this Recovery Instance is associated with.
    RecoveryInstance -> Maybe Text
sourceServerID :: Prelude.Maybe Prelude.Text,
    -- | An array of tags that are associated with the Recovery Instance.
    RecoveryInstance -> Maybe (Sensitive (HashMap Text Text))
tags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text))
  }
  deriving (RecoveryInstance -> RecoveryInstance -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecoveryInstance -> RecoveryInstance -> Bool
$c/= :: RecoveryInstance -> RecoveryInstance -> Bool
== :: RecoveryInstance -> RecoveryInstance -> Bool
$c== :: RecoveryInstance -> RecoveryInstance -> Bool
Prelude.Eq, Int -> RecoveryInstance -> ShowS
[RecoveryInstance] -> ShowS
RecoveryInstance -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecoveryInstance] -> ShowS
$cshowList :: [RecoveryInstance] -> ShowS
show :: RecoveryInstance -> String
$cshow :: RecoveryInstance -> String
showsPrec :: Int -> RecoveryInstance -> ShowS
$cshowsPrec :: Int -> RecoveryInstance -> ShowS
Prelude.Show, forall x. Rep RecoveryInstance x -> RecoveryInstance
forall x. RecoveryInstance -> Rep RecoveryInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RecoveryInstance x -> RecoveryInstance
$cfrom :: forall x. RecoveryInstance -> Rep RecoveryInstance x
Prelude.Generic)

-- |
-- Create a value of 'RecoveryInstance' 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:
--
-- 'arn', 'recoveryInstance_arn' - The ARN of the Recovery Instance.
--
-- 'dataReplicationInfo', 'recoveryInstance_dataReplicationInfo' - The Data Replication Info of the Recovery Instance.
--
-- 'ec2InstanceID', 'recoveryInstance_ec2InstanceID' - The EC2 instance ID of the Recovery Instance.
--
-- 'ec2InstanceState', 'recoveryInstance_ec2InstanceState' - The state of the EC2 instance for this Recovery Instance.
--
-- 'failback', 'recoveryInstance_failback' - An object representing failback related information of the Recovery
-- Instance.
--
-- 'isDrill', 'recoveryInstance_isDrill' - Whether this Recovery Instance was created for a drill or for an actual
-- Recovery event.
--
-- 'jobID', 'recoveryInstance_jobID' - The ID of the Job that created the Recovery Instance.
--
-- 'originEnvironment', 'recoveryInstance_originEnvironment' - Environment (On Premises \/ AWS) of the instance that the recovery
-- instance originated from.
--
-- 'pointInTimeSnapshotDateTime', 'recoveryInstance_pointInTimeSnapshotDateTime' - The date and time of the Point in Time (PIT) snapshot that this Recovery
-- Instance was launched from.
--
-- 'recoveryInstanceID', 'recoveryInstance_recoveryInstanceID' - The ID of the Recovery Instance.
--
-- 'recoveryInstanceProperties', 'recoveryInstance_recoveryInstanceProperties' - Properties of the Recovery Instance machine.
--
-- 'sourceServerID', 'recoveryInstance_sourceServerID' - The Source Server ID that this Recovery Instance is associated with.
--
-- 'tags', 'recoveryInstance_tags' - An array of tags that are associated with the Recovery Instance.
newRecoveryInstance ::
  RecoveryInstance
newRecoveryInstance :: RecoveryInstance
newRecoveryInstance =
  RecoveryInstance'
    { $sel:arn:RecoveryInstance' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:dataReplicationInfo:RecoveryInstance' :: Maybe RecoveryInstanceDataReplicationInfo
dataReplicationInfo = forall a. Maybe a
Prelude.Nothing,
      $sel:ec2InstanceID:RecoveryInstance' :: Maybe Text
ec2InstanceID = forall a. Maybe a
Prelude.Nothing,
      $sel:ec2InstanceState:RecoveryInstance' :: Maybe EC2InstanceState
ec2InstanceState = forall a. Maybe a
Prelude.Nothing,
      $sel:failback:RecoveryInstance' :: Maybe RecoveryInstanceFailback
failback = forall a. Maybe a
Prelude.Nothing,
      $sel:isDrill:RecoveryInstance' :: Maybe Bool
isDrill = forall a. Maybe a
Prelude.Nothing,
      $sel:jobID:RecoveryInstance' :: Maybe Text
jobID = forall a. Maybe a
Prelude.Nothing,
      $sel:originEnvironment:RecoveryInstance' :: Maybe OriginEnvironment
originEnvironment = forall a. Maybe a
Prelude.Nothing,
      $sel:pointInTimeSnapshotDateTime:RecoveryInstance' :: Maybe Text
pointInTimeSnapshotDateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:recoveryInstanceID:RecoveryInstance' :: Maybe Text
recoveryInstanceID = forall a. Maybe a
Prelude.Nothing,
      $sel:recoveryInstanceProperties:RecoveryInstance' :: Maybe RecoveryInstanceProperties
recoveryInstanceProperties = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceServerID:RecoveryInstance' :: Maybe Text
sourceServerID = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:RecoveryInstance' :: Maybe (Sensitive (HashMap Text Text))
tags = forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the Recovery Instance.
recoveryInstance_arn :: Lens.Lens' RecoveryInstance (Prelude.Maybe Prelude.Text)
recoveryInstance_arn :: Lens' RecoveryInstance (Maybe Text)
recoveryInstance_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryInstance' {Maybe Text
arn :: Maybe Text
$sel:arn:RecoveryInstance' :: RecoveryInstance -> Maybe Text
arn} -> Maybe Text
arn) (\s :: RecoveryInstance
s@RecoveryInstance' {} Maybe Text
a -> RecoveryInstance
s {$sel:arn:RecoveryInstance' :: Maybe Text
arn = Maybe Text
a} :: RecoveryInstance)

-- | The Data Replication Info of the Recovery Instance.
recoveryInstance_dataReplicationInfo :: Lens.Lens' RecoveryInstance (Prelude.Maybe RecoveryInstanceDataReplicationInfo)
recoveryInstance_dataReplicationInfo :: Lens' RecoveryInstance (Maybe RecoveryInstanceDataReplicationInfo)
recoveryInstance_dataReplicationInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryInstance' {Maybe RecoveryInstanceDataReplicationInfo
dataReplicationInfo :: Maybe RecoveryInstanceDataReplicationInfo
$sel:dataReplicationInfo:RecoveryInstance' :: RecoveryInstance -> Maybe RecoveryInstanceDataReplicationInfo
dataReplicationInfo} -> Maybe RecoveryInstanceDataReplicationInfo
dataReplicationInfo) (\s :: RecoveryInstance
s@RecoveryInstance' {} Maybe RecoveryInstanceDataReplicationInfo
a -> RecoveryInstance
s {$sel:dataReplicationInfo:RecoveryInstance' :: Maybe RecoveryInstanceDataReplicationInfo
dataReplicationInfo = Maybe RecoveryInstanceDataReplicationInfo
a} :: RecoveryInstance)

-- | The EC2 instance ID of the Recovery Instance.
recoveryInstance_ec2InstanceID :: Lens.Lens' RecoveryInstance (Prelude.Maybe Prelude.Text)
recoveryInstance_ec2InstanceID :: Lens' RecoveryInstance (Maybe Text)
recoveryInstance_ec2InstanceID = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryInstance' {Maybe Text
ec2InstanceID :: Maybe Text
$sel:ec2InstanceID:RecoveryInstance' :: RecoveryInstance -> Maybe Text
ec2InstanceID} -> Maybe Text
ec2InstanceID) (\s :: RecoveryInstance
s@RecoveryInstance' {} Maybe Text
a -> RecoveryInstance
s {$sel:ec2InstanceID:RecoveryInstance' :: Maybe Text
ec2InstanceID = Maybe Text
a} :: RecoveryInstance)

-- | The state of the EC2 instance for this Recovery Instance.
recoveryInstance_ec2InstanceState :: Lens.Lens' RecoveryInstance (Prelude.Maybe EC2InstanceState)
recoveryInstance_ec2InstanceState :: Lens' RecoveryInstance (Maybe EC2InstanceState)
recoveryInstance_ec2InstanceState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryInstance' {Maybe EC2InstanceState
ec2InstanceState :: Maybe EC2InstanceState
$sel:ec2InstanceState:RecoveryInstance' :: RecoveryInstance -> Maybe EC2InstanceState
ec2InstanceState} -> Maybe EC2InstanceState
ec2InstanceState) (\s :: RecoveryInstance
s@RecoveryInstance' {} Maybe EC2InstanceState
a -> RecoveryInstance
s {$sel:ec2InstanceState:RecoveryInstance' :: Maybe EC2InstanceState
ec2InstanceState = Maybe EC2InstanceState
a} :: RecoveryInstance)

-- | An object representing failback related information of the Recovery
-- Instance.
recoveryInstance_failback :: Lens.Lens' RecoveryInstance (Prelude.Maybe RecoveryInstanceFailback)
recoveryInstance_failback :: Lens' RecoveryInstance (Maybe RecoveryInstanceFailback)
recoveryInstance_failback = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryInstance' {Maybe RecoveryInstanceFailback
failback :: Maybe RecoveryInstanceFailback
$sel:failback:RecoveryInstance' :: RecoveryInstance -> Maybe RecoveryInstanceFailback
failback} -> Maybe RecoveryInstanceFailback
failback) (\s :: RecoveryInstance
s@RecoveryInstance' {} Maybe RecoveryInstanceFailback
a -> RecoveryInstance
s {$sel:failback:RecoveryInstance' :: Maybe RecoveryInstanceFailback
failback = Maybe RecoveryInstanceFailback
a} :: RecoveryInstance)

-- | Whether this Recovery Instance was created for a drill or for an actual
-- Recovery event.
recoveryInstance_isDrill :: Lens.Lens' RecoveryInstance (Prelude.Maybe Prelude.Bool)
recoveryInstance_isDrill :: Lens' RecoveryInstance (Maybe Bool)
recoveryInstance_isDrill = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryInstance' {Maybe Bool
isDrill :: Maybe Bool
$sel:isDrill:RecoveryInstance' :: RecoveryInstance -> Maybe Bool
isDrill} -> Maybe Bool
isDrill) (\s :: RecoveryInstance
s@RecoveryInstance' {} Maybe Bool
a -> RecoveryInstance
s {$sel:isDrill:RecoveryInstance' :: Maybe Bool
isDrill = Maybe Bool
a} :: RecoveryInstance)

-- | The ID of the Job that created the Recovery Instance.
recoveryInstance_jobID :: Lens.Lens' RecoveryInstance (Prelude.Maybe Prelude.Text)
recoveryInstance_jobID :: Lens' RecoveryInstance (Maybe Text)
recoveryInstance_jobID = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryInstance' {Maybe Text
jobID :: Maybe Text
$sel:jobID:RecoveryInstance' :: RecoveryInstance -> Maybe Text
jobID} -> Maybe Text
jobID) (\s :: RecoveryInstance
s@RecoveryInstance' {} Maybe Text
a -> RecoveryInstance
s {$sel:jobID:RecoveryInstance' :: Maybe Text
jobID = Maybe Text
a} :: RecoveryInstance)

-- | Environment (On Premises \/ AWS) of the instance that the recovery
-- instance originated from.
recoveryInstance_originEnvironment :: Lens.Lens' RecoveryInstance (Prelude.Maybe OriginEnvironment)
recoveryInstance_originEnvironment :: Lens' RecoveryInstance (Maybe OriginEnvironment)
recoveryInstance_originEnvironment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryInstance' {Maybe OriginEnvironment
originEnvironment :: Maybe OriginEnvironment
$sel:originEnvironment:RecoveryInstance' :: RecoveryInstance -> Maybe OriginEnvironment
originEnvironment} -> Maybe OriginEnvironment
originEnvironment) (\s :: RecoveryInstance
s@RecoveryInstance' {} Maybe OriginEnvironment
a -> RecoveryInstance
s {$sel:originEnvironment:RecoveryInstance' :: Maybe OriginEnvironment
originEnvironment = Maybe OriginEnvironment
a} :: RecoveryInstance)

-- | The date and time of the Point in Time (PIT) snapshot that this Recovery
-- Instance was launched from.
recoveryInstance_pointInTimeSnapshotDateTime :: Lens.Lens' RecoveryInstance (Prelude.Maybe Prelude.Text)
recoveryInstance_pointInTimeSnapshotDateTime :: Lens' RecoveryInstance (Maybe Text)
recoveryInstance_pointInTimeSnapshotDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryInstance' {Maybe Text
pointInTimeSnapshotDateTime :: Maybe Text
$sel:pointInTimeSnapshotDateTime:RecoveryInstance' :: RecoveryInstance -> Maybe Text
pointInTimeSnapshotDateTime} -> Maybe Text
pointInTimeSnapshotDateTime) (\s :: RecoveryInstance
s@RecoveryInstance' {} Maybe Text
a -> RecoveryInstance
s {$sel:pointInTimeSnapshotDateTime:RecoveryInstance' :: Maybe Text
pointInTimeSnapshotDateTime = Maybe Text
a} :: RecoveryInstance)

-- | The ID of the Recovery Instance.
recoveryInstance_recoveryInstanceID :: Lens.Lens' RecoveryInstance (Prelude.Maybe Prelude.Text)
recoveryInstance_recoveryInstanceID :: Lens' RecoveryInstance (Maybe Text)
recoveryInstance_recoveryInstanceID = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryInstance' {Maybe Text
recoveryInstanceID :: Maybe Text
$sel:recoveryInstanceID:RecoveryInstance' :: RecoveryInstance -> Maybe Text
recoveryInstanceID} -> Maybe Text
recoveryInstanceID) (\s :: RecoveryInstance
s@RecoveryInstance' {} Maybe Text
a -> RecoveryInstance
s {$sel:recoveryInstanceID:RecoveryInstance' :: Maybe Text
recoveryInstanceID = Maybe Text
a} :: RecoveryInstance)

-- | Properties of the Recovery Instance machine.
recoveryInstance_recoveryInstanceProperties :: Lens.Lens' RecoveryInstance (Prelude.Maybe RecoveryInstanceProperties)
recoveryInstance_recoveryInstanceProperties :: Lens' RecoveryInstance (Maybe RecoveryInstanceProperties)
recoveryInstance_recoveryInstanceProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryInstance' {Maybe RecoveryInstanceProperties
recoveryInstanceProperties :: Maybe RecoveryInstanceProperties
$sel:recoveryInstanceProperties:RecoveryInstance' :: RecoveryInstance -> Maybe RecoveryInstanceProperties
recoveryInstanceProperties} -> Maybe RecoveryInstanceProperties
recoveryInstanceProperties) (\s :: RecoveryInstance
s@RecoveryInstance' {} Maybe RecoveryInstanceProperties
a -> RecoveryInstance
s {$sel:recoveryInstanceProperties:RecoveryInstance' :: Maybe RecoveryInstanceProperties
recoveryInstanceProperties = Maybe RecoveryInstanceProperties
a} :: RecoveryInstance)

-- | The Source Server ID that this Recovery Instance is associated with.
recoveryInstance_sourceServerID :: Lens.Lens' RecoveryInstance (Prelude.Maybe Prelude.Text)
recoveryInstance_sourceServerID :: Lens' RecoveryInstance (Maybe Text)
recoveryInstance_sourceServerID = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryInstance' {Maybe Text
sourceServerID :: Maybe Text
$sel:sourceServerID:RecoveryInstance' :: RecoveryInstance -> Maybe Text
sourceServerID} -> Maybe Text
sourceServerID) (\s :: RecoveryInstance
s@RecoveryInstance' {} Maybe Text
a -> RecoveryInstance
s {$sel:sourceServerID:RecoveryInstance' :: Maybe Text
sourceServerID = Maybe Text
a} :: RecoveryInstance)

-- | An array of tags that are associated with the Recovery Instance.
recoveryInstance_tags :: Lens.Lens' RecoveryInstance (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
recoveryInstance_tags :: Lens' RecoveryInstance (Maybe (HashMap Text Text))
recoveryInstance_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecoveryInstance' {Maybe (Sensitive (HashMap Text Text))
tags :: Maybe (Sensitive (HashMap Text Text))
$sel:tags:RecoveryInstance' :: RecoveryInstance -> Maybe (Sensitive (HashMap Text Text))
tags} -> Maybe (Sensitive (HashMap Text Text))
tags) (\s :: RecoveryInstance
s@RecoveryInstance' {} Maybe (Sensitive (HashMap Text Text))
a -> RecoveryInstance
s {$sel:tags:RecoveryInstance' :: Maybe (Sensitive (HashMap Text Text))
tags = Maybe (Sensitive (HashMap Text Text))
a} :: RecoveryInstance) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

instance Data.FromJSON RecoveryInstance where
  parseJSON :: Value -> Parser RecoveryInstance
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"RecoveryInstance"
      ( \Object
x ->
          Maybe Text
-> Maybe RecoveryInstanceDataReplicationInfo
-> Maybe Text
-> Maybe EC2InstanceState
-> Maybe RecoveryInstanceFailback
-> Maybe Bool
-> Maybe Text
-> Maybe OriginEnvironment
-> Maybe Text
-> Maybe Text
-> Maybe RecoveryInstanceProperties
-> Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> RecoveryInstance
RecoveryInstance'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"dataReplicationInfo")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ec2InstanceID")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ec2InstanceState")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"failback")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"isDrill")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"jobID")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"originEnvironment")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"pointInTimeSnapshotDateTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"recoveryInstanceID")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"recoveryInstanceProperties")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"sourceServerID")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable RecoveryInstance where
  hashWithSalt :: Int -> RecoveryInstance -> Int
hashWithSalt Int
_salt RecoveryInstance' {Maybe Bool
Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe EC2InstanceState
Maybe OriginEnvironment
Maybe RecoveryInstanceDataReplicationInfo
Maybe RecoveryInstanceFailback
Maybe RecoveryInstanceProperties
tags :: Maybe (Sensitive (HashMap Text Text))
sourceServerID :: Maybe Text
recoveryInstanceProperties :: Maybe RecoveryInstanceProperties
recoveryInstanceID :: Maybe Text
pointInTimeSnapshotDateTime :: Maybe Text
originEnvironment :: Maybe OriginEnvironment
jobID :: Maybe Text
isDrill :: Maybe Bool
failback :: Maybe RecoveryInstanceFailback
ec2InstanceState :: Maybe EC2InstanceState
ec2InstanceID :: Maybe Text
dataReplicationInfo :: Maybe RecoveryInstanceDataReplicationInfo
arn :: Maybe Text
$sel:tags:RecoveryInstance' :: RecoveryInstance -> Maybe (Sensitive (HashMap Text Text))
$sel:sourceServerID:RecoveryInstance' :: RecoveryInstance -> Maybe Text
$sel:recoveryInstanceProperties:RecoveryInstance' :: RecoveryInstance -> Maybe RecoveryInstanceProperties
$sel:recoveryInstanceID:RecoveryInstance' :: RecoveryInstance -> Maybe Text
$sel:pointInTimeSnapshotDateTime:RecoveryInstance' :: RecoveryInstance -> Maybe Text
$sel:originEnvironment:RecoveryInstance' :: RecoveryInstance -> Maybe OriginEnvironment
$sel:jobID:RecoveryInstance' :: RecoveryInstance -> Maybe Text
$sel:isDrill:RecoveryInstance' :: RecoveryInstance -> Maybe Bool
$sel:failback:RecoveryInstance' :: RecoveryInstance -> Maybe RecoveryInstanceFailback
$sel:ec2InstanceState:RecoveryInstance' :: RecoveryInstance -> Maybe EC2InstanceState
$sel:ec2InstanceID:RecoveryInstance' :: RecoveryInstance -> Maybe Text
$sel:dataReplicationInfo:RecoveryInstance' :: RecoveryInstance -> Maybe RecoveryInstanceDataReplicationInfo
$sel:arn:RecoveryInstance' :: RecoveryInstance -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RecoveryInstanceDataReplicationInfo
dataReplicationInfo
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ec2InstanceID
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EC2InstanceState
ec2InstanceState
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RecoveryInstanceFailback
failback
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isDrill
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobID
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OriginEnvironment
originEnvironment
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pointInTimeSnapshotDateTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
recoveryInstanceID
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RecoveryInstanceProperties
recoveryInstanceProperties
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceServerID
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (HashMap Text Text))
tags

instance Prelude.NFData RecoveryInstance where
  rnf :: RecoveryInstance -> ()
rnf RecoveryInstance' {Maybe Bool
Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe EC2InstanceState
Maybe OriginEnvironment
Maybe RecoveryInstanceDataReplicationInfo
Maybe RecoveryInstanceFailback
Maybe RecoveryInstanceProperties
tags :: Maybe (Sensitive (HashMap Text Text))
sourceServerID :: Maybe Text
recoveryInstanceProperties :: Maybe RecoveryInstanceProperties
recoveryInstanceID :: Maybe Text
pointInTimeSnapshotDateTime :: Maybe Text
originEnvironment :: Maybe OriginEnvironment
jobID :: Maybe Text
isDrill :: Maybe Bool
failback :: Maybe RecoveryInstanceFailback
ec2InstanceState :: Maybe EC2InstanceState
ec2InstanceID :: Maybe Text
dataReplicationInfo :: Maybe RecoveryInstanceDataReplicationInfo
arn :: Maybe Text
$sel:tags:RecoveryInstance' :: RecoveryInstance -> Maybe (Sensitive (HashMap Text Text))
$sel:sourceServerID:RecoveryInstance' :: RecoveryInstance -> Maybe Text
$sel:recoveryInstanceProperties:RecoveryInstance' :: RecoveryInstance -> Maybe RecoveryInstanceProperties
$sel:recoveryInstanceID:RecoveryInstance' :: RecoveryInstance -> Maybe Text
$sel:pointInTimeSnapshotDateTime:RecoveryInstance' :: RecoveryInstance -> Maybe Text
$sel:originEnvironment:RecoveryInstance' :: RecoveryInstance -> Maybe OriginEnvironment
$sel:jobID:RecoveryInstance' :: RecoveryInstance -> Maybe Text
$sel:isDrill:RecoveryInstance' :: RecoveryInstance -> Maybe Bool
$sel:failback:RecoveryInstance' :: RecoveryInstance -> Maybe RecoveryInstanceFailback
$sel:ec2InstanceState:RecoveryInstance' :: RecoveryInstance -> Maybe EC2InstanceState
$sel:ec2InstanceID:RecoveryInstance' :: RecoveryInstance -> Maybe Text
$sel:dataReplicationInfo:RecoveryInstance' :: RecoveryInstance -> Maybe RecoveryInstanceDataReplicationInfo
$sel:arn:RecoveryInstance' :: RecoveryInstance -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RecoveryInstanceDataReplicationInfo
dataReplicationInfo
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ec2InstanceID
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EC2InstanceState
ec2InstanceState
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RecoveryInstanceFailback
failback
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isDrill
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobID
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OriginEnvironment
originEnvironment
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
pointInTimeSnapshotDateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
recoveryInstanceID
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RecoveryInstanceProperties
recoveryInstanceProperties
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceServerID
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text Text))
tags