{-# 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 #-}
module Amazonka.DocumentDB.Types.DBInstanceStatusInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DBInstanceStatusInfo = DBInstanceStatusInfo'
{
DBInstanceStatusInfo -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
DBInstanceStatusInfo -> Maybe Bool
normal :: Prelude.Maybe Prelude.Bool,
DBInstanceStatusInfo -> Maybe Text
statusType :: Prelude.Maybe Prelude.Text,
DBInstanceStatusInfo -> Maybe Text
message :: Prelude.Maybe Prelude.Text
}
deriving (DBInstanceStatusInfo -> DBInstanceStatusInfo -> Bool
(DBInstanceStatusInfo -> DBInstanceStatusInfo -> Bool)
-> (DBInstanceStatusInfo -> DBInstanceStatusInfo -> Bool)
-> Eq DBInstanceStatusInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBInstanceStatusInfo -> DBInstanceStatusInfo -> Bool
$c/= :: DBInstanceStatusInfo -> DBInstanceStatusInfo -> Bool
== :: DBInstanceStatusInfo -> DBInstanceStatusInfo -> Bool
$c== :: DBInstanceStatusInfo -> DBInstanceStatusInfo -> Bool
Prelude.Eq, ReadPrec [DBInstanceStatusInfo]
ReadPrec DBInstanceStatusInfo
Int -> ReadS DBInstanceStatusInfo
ReadS [DBInstanceStatusInfo]
(Int -> ReadS DBInstanceStatusInfo)
-> ReadS [DBInstanceStatusInfo]
-> ReadPrec DBInstanceStatusInfo
-> ReadPrec [DBInstanceStatusInfo]
-> Read DBInstanceStatusInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBInstanceStatusInfo]
$creadListPrec :: ReadPrec [DBInstanceStatusInfo]
readPrec :: ReadPrec DBInstanceStatusInfo
$creadPrec :: ReadPrec DBInstanceStatusInfo
readList :: ReadS [DBInstanceStatusInfo]
$creadList :: ReadS [DBInstanceStatusInfo]
readsPrec :: Int -> ReadS DBInstanceStatusInfo
$creadsPrec :: Int -> ReadS DBInstanceStatusInfo
Prelude.Read, Int -> DBInstanceStatusInfo -> ShowS
[DBInstanceStatusInfo] -> ShowS
DBInstanceStatusInfo -> String
(Int -> DBInstanceStatusInfo -> ShowS)
-> (DBInstanceStatusInfo -> String)
-> ([DBInstanceStatusInfo] -> ShowS)
-> Show DBInstanceStatusInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBInstanceStatusInfo] -> ShowS
$cshowList :: [DBInstanceStatusInfo] -> ShowS
show :: DBInstanceStatusInfo -> String
$cshow :: DBInstanceStatusInfo -> String
showsPrec :: Int -> DBInstanceStatusInfo -> ShowS
$cshowsPrec :: Int -> DBInstanceStatusInfo -> ShowS
Prelude.Show, (forall x. DBInstanceStatusInfo -> Rep DBInstanceStatusInfo x)
-> (forall x. Rep DBInstanceStatusInfo x -> DBInstanceStatusInfo)
-> Generic DBInstanceStatusInfo
forall x. Rep DBInstanceStatusInfo x -> DBInstanceStatusInfo
forall x. DBInstanceStatusInfo -> Rep DBInstanceStatusInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DBInstanceStatusInfo x -> DBInstanceStatusInfo
$cfrom :: forall x. DBInstanceStatusInfo -> Rep DBInstanceStatusInfo x
Prelude.Generic)
newDBInstanceStatusInfo ::
DBInstanceStatusInfo
newDBInstanceStatusInfo :: DBInstanceStatusInfo
newDBInstanceStatusInfo =
DBInstanceStatusInfo' :: Maybe Text
-> Maybe Bool -> Maybe Text -> Maybe Text -> DBInstanceStatusInfo
DBInstanceStatusInfo'
{ $sel:status:DBInstanceStatusInfo' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:normal:DBInstanceStatusInfo' :: Maybe Bool
normal = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:statusType:DBInstanceStatusInfo' :: Maybe Text
statusType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:message:DBInstanceStatusInfo' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
dbInstanceStatusInfo_status :: Lens.Lens' DBInstanceStatusInfo (Prelude.Maybe Prelude.Text)
dbInstanceStatusInfo_status :: (Maybe Text -> f (Maybe Text))
-> DBInstanceStatusInfo -> f DBInstanceStatusInfo
dbInstanceStatusInfo_status = (DBInstanceStatusInfo -> Maybe Text)
-> (DBInstanceStatusInfo -> Maybe Text -> DBInstanceStatusInfo)
-> Lens
DBInstanceStatusInfo DBInstanceStatusInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBInstanceStatusInfo' {Maybe Text
status :: Maybe Text
$sel:status:DBInstanceStatusInfo' :: DBInstanceStatusInfo -> Maybe Text
status} -> Maybe Text
status) (\s :: DBInstanceStatusInfo
s@DBInstanceStatusInfo' {} Maybe Text
a -> DBInstanceStatusInfo
s {$sel:status:DBInstanceStatusInfo' :: Maybe Text
status = Maybe Text
a} :: DBInstanceStatusInfo)
dbInstanceStatusInfo_normal :: Lens.Lens' DBInstanceStatusInfo (Prelude.Maybe Prelude.Bool)
dbInstanceStatusInfo_normal :: (Maybe Bool -> f (Maybe Bool))
-> DBInstanceStatusInfo -> f DBInstanceStatusInfo
dbInstanceStatusInfo_normal = (DBInstanceStatusInfo -> Maybe Bool)
-> (DBInstanceStatusInfo -> Maybe Bool -> DBInstanceStatusInfo)
-> Lens
DBInstanceStatusInfo DBInstanceStatusInfo (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBInstanceStatusInfo' {Maybe Bool
normal :: Maybe Bool
$sel:normal:DBInstanceStatusInfo' :: DBInstanceStatusInfo -> Maybe Bool
normal} -> Maybe Bool
normal) (\s :: DBInstanceStatusInfo
s@DBInstanceStatusInfo' {} Maybe Bool
a -> DBInstanceStatusInfo
s {$sel:normal:DBInstanceStatusInfo' :: Maybe Bool
normal = Maybe Bool
a} :: DBInstanceStatusInfo)
dbInstanceStatusInfo_statusType :: Lens.Lens' DBInstanceStatusInfo (Prelude.Maybe Prelude.Text)
dbInstanceStatusInfo_statusType :: (Maybe Text -> f (Maybe Text))
-> DBInstanceStatusInfo -> f DBInstanceStatusInfo
dbInstanceStatusInfo_statusType = (DBInstanceStatusInfo -> Maybe Text)
-> (DBInstanceStatusInfo -> Maybe Text -> DBInstanceStatusInfo)
-> Lens
DBInstanceStatusInfo DBInstanceStatusInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBInstanceStatusInfo' {Maybe Text
statusType :: Maybe Text
$sel:statusType:DBInstanceStatusInfo' :: DBInstanceStatusInfo -> Maybe Text
statusType} -> Maybe Text
statusType) (\s :: DBInstanceStatusInfo
s@DBInstanceStatusInfo' {} Maybe Text
a -> DBInstanceStatusInfo
s {$sel:statusType:DBInstanceStatusInfo' :: Maybe Text
statusType = Maybe Text
a} :: DBInstanceStatusInfo)
dbInstanceStatusInfo_message :: Lens.Lens' DBInstanceStatusInfo (Prelude.Maybe Prelude.Text)
dbInstanceStatusInfo_message :: (Maybe Text -> f (Maybe Text))
-> DBInstanceStatusInfo -> f DBInstanceStatusInfo
dbInstanceStatusInfo_message = (DBInstanceStatusInfo -> Maybe Text)
-> (DBInstanceStatusInfo -> Maybe Text -> DBInstanceStatusInfo)
-> Lens
DBInstanceStatusInfo DBInstanceStatusInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBInstanceStatusInfo' {Maybe Text
message :: Maybe Text
$sel:message:DBInstanceStatusInfo' :: DBInstanceStatusInfo -> Maybe Text
message} -> Maybe Text
message) (\s :: DBInstanceStatusInfo
s@DBInstanceStatusInfo' {} Maybe Text
a -> DBInstanceStatusInfo
s {$sel:message:DBInstanceStatusInfo' :: Maybe Text
message = Maybe Text
a} :: DBInstanceStatusInfo)
instance Core.FromXML DBInstanceStatusInfo where
parseXML :: [Node] -> Either String DBInstanceStatusInfo
parseXML [Node]
x =
Maybe Text
-> Maybe Bool -> Maybe Text -> Maybe Text -> DBInstanceStatusInfo
DBInstanceStatusInfo'
(Maybe Text
-> Maybe Bool -> Maybe Text -> Maybe Text -> DBInstanceStatusInfo)
-> Either String (Maybe Text)
-> Either
String
(Maybe Bool -> Maybe Text -> Maybe Text -> DBInstanceStatusInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
Either
String
(Maybe Bool -> Maybe Text -> Maybe Text -> DBInstanceStatusInfo)
-> Either String (Maybe Bool)
-> Either String (Maybe Text -> Maybe Text -> DBInstanceStatusInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Normal")
Either String (Maybe Text -> Maybe Text -> DBInstanceStatusInfo)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> DBInstanceStatusInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StatusType")
Either String (Maybe Text -> DBInstanceStatusInfo)
-> Either String (Maybe Text) -> Either String DBInstanceStatusInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Message")
instance Prelude.Hashable DBInstanceStatusInfo
instance Prelude.NFData DBInstanceStatusInfo