{-# 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.Route53RecoveryReadiness.Types.ReadinessCheckOutput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ReadinessCheckOutput = ReadinessCheckOutput'
{
ReadinessCheckOutput -> Maybe Text
readinessCheckName :: Prelude.Maybe Prelude.Text,
ReadinessCheckOutput -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
ReadinessCheckOutput -> Text
readinessCheckArn :: Prelude.Text,
ReadinessCheckOutput -> Text
resourceSet :: Prelude.Text
}
deriving (ReadinessCheckOutput -> ReadinessCheckOutput -> Bool
(ReadinessCheckOutput -> ReadinessCheckOutput -> Bool)
-> (ReadinessCheckOutput -> ReadinessCheckOutput -> Bool)
-> Eq ReadinessCheckOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReadinessCheckOutput -> ReadinessCheckOutput -> Bool
$c/= :: ReadinessCheckOutput -> ReadinessCheckOutput -> Bool
== :: ReadinessCheckOutput -> ReadinessCheckOutput -> Bool
$c== :: ReadinessCheckOutput -> ReadinessCheckOutput -> Bool
Prelude.Eq, ReadPrec [ReadinessCheckOutput]
ReadPrec ReadinessCheckOutput
Int -> ReadS ReadinessCheckOutput
ReadS [ReadinessCheckOutput]
(Int -> ReadS ReadinessCheckOutput)
-> ReadS [ReadinessCheckOutput]
-> ReadPrec ReadinessCheckOutput
-> ReadPrec [ReadinessCheckOutput]
-> Read ReadinessCheckOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReadinessCheckOutput]
$creadListPrec :: ReadPrec [ReadinessCheckOutput]
readPrec :: ReadPrec ReadinessCheckOutput
$creadPrec :: ReadPrec ReadinessCheckOutput
readList :: ReadS [ReadinessCheckOutput]
$creadList :: ReadS [ReadinessCheckOutput]
readsPrec :: Int -> ReadS ReadinessCheckOutput
$creadsPrec :: Int -> ReadS ReadinessCheckOutput
Prelude.Read, Int -> ReadinessCheckOutput -> ShowS
[ReadinessCheckOutput] -> ShowS
ReadinessCheckOutput -> String
(Int -> ReadinessCheckOutput -> ShowS)
-> (ReadinessCheckOutput -> String)
-> ([ReadinessCheckOutput] -> ShowS)
-> Show ReadinessCheckOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReadinessCheckOutput] -> ShowS
$cshowList :: [ReadinessCheckOutput] -> ShowS
show :: ReadinessCheckOutput -> String
$cshow :: ReadinessCheckOutput -> String
showsPrec :: Int -> ReadinessCheckOutput -> ShowS
$cshowsPrec :: Int -> ReadinessCheckOutput -> ShowS
Prelude.Show, (forall x. ReadinessCheckOutput -> Rep ReadinessCheckOutput x)
-> (forall x. Rep ReadinessCheckOutput x -> ReadinessCheckOutput)
-> Generic ReadinessCheckOutput
forall x. Rep ReadinessCheckOutput x -> ReadinessCheckOutput
forall x. ReadinessCheckOutput -> Rep ReadinessCheckOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReadinessCheckOutput x -> ReadinessCheckOutput
$cfrom :: forall x. ReadinessCheckOutput -> Rep ReadinessCheckOutput x
Prelude.Generic)
newReadinessCheckOutput ::
Prelude.Text ->
Prelude.Text ->
ReadinessCheckOutput
newReadinessCheckOutput :: Text -> Text -> ReadinessCheckOutput
newReadinessCheckOutput
Text
pReadinessCheckArn_
Text
pResourceSet_ =
ReadinessCheckOutput' :: Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ReadinessCheckOutput
ReadinessCheckOutput'
{ $sel:readinessCheckName:ReadinessCheckOutput' :: Maybe Text
readinessCheckName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:ReadinessCheckOutput' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:readinessCheckArn:ReadinessCheckOutput' :: Text
readinessCheckArn = Text
pReadinessCheckArn_,
$sel:resourceSet:ReadinessCheckOutput' :: Text
resourceSet = Text
pResourceSet_
}
readinessCheckOutput_readinessCheckName :: Lens.Lens' ReadinessCheckOutput (Prelude.Maybe Prelude.Text)
readinessCheckOutput_readinessCheckName :: (Maybe Text -> f (Maybe Text))
-> ReadinessCheckOutput -> f ReadinessCheckOutput
readinessCheckOutput_readinessCheckName = (ReadinessCheckOutput -> Maybe Text)
-> (ReadinessCheckOutput -> Maybe Text -> ReadinessCheckOutput)
-> Lens
ReadinessCheckOutput ReadinessCheckOutput (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReadinessCheckOutput' {Maybe Text
readinessCheckName :: Maybe Text
$sel:readinessCheckName:ReadinessCheckOutput' :: ReadinessCheckOutput -> Maybe Text
readinessCheckName} -> Maybe Text
readinessCheckName) (\s :: ReadinessCheckOutput
s@ReadinessCheckOutput' {} Maybe Text
a -> ReadinessCheckOutput
s {$sel:readinessCheckName:ReadinessCheckOutput' :: Maybe Text
readinessCheckName = Maybe Text
a} :: ReadinessCheckOutput)
readinessCheckOutput_tags :: Lens.Lens' ReadinessCheckOutput (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
readinessCheckOutput_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ReadinessCheckOutput -> f ReadinessCheckOutput
readinessCheckOutput_tags = (ReadinessCheckOutput -> Maybe (HashMap Text Text))
-> (ReadinessCheckOutput
-> Maybe (HashMap Text Text) -> ReadinessCheckOutput)
-> Lens
ReadinessCheckOutput
ReadinessCheckOutput
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReadinessCheckOutput' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ReadinessCheckOutput' :: ReadinessCheckOutput -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ReadinessCheckOutput
s@ReadinessCheckOutput' {} Maybe (HashMap Text Text)
a -> ReadinessCheckOutput
s {$sel:tags:ReadinessCheckOutput' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ReadinessCheckOutput) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ReadinessCheckOutput -> f ReadinessCheckOutput)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ReadinessCheckOutput
-> f ReadinessCheckOutput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
readinessCheckOutput_readinessCheckArn :: Lens.Lens' ReadinessCheckOutput Prelude.Text
readinessCheckOutput_readinessCheckArn :: (Text -> f Text) -> ReadinessCheckOutput -> f ReadinessCheckOutput
readinessCheckOutput_readinessCheckArn = (ReadinessCheckOutput -> Text)
-> (ReadinessCheckOutput -> Text -> ReadinessCheckOutput)
-> Lens ReadinessCheckOutput ReadinessCheckOutput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReadinessCheckOutput' {Text
readinessCheckArn :: Text
$sel:readinessCheckArn:ReadinessCheckOutput' :: ReadinessCheckOutput -> Text
readinessCheckArn} -> Text
readinessCheckArn) (\s :: ReadinessCheckOutput
s@ReadinessCheckOutput' {} Text
a -> ReadinessCheckOutput
s {$sel:readinessCheckArn:ReadinessCheckOutput' :: Text
readinessCheckArn = Text
a} :: ReadinessCheckOutput)
readinessCheckOutput_resourceSet :: Lens.Lens' ReadinessCheckOutput Prelude.Text
readinessCheckOutput_resourceSet :: (Text -> f Text) -> ReadinessCheckOutput -> f ReadinessCheckOutput
readinessCheckOutput_resourceSet = (ReadinessCheckOutput -> Text)
-> (ReadinessCheckOutput -> Text -> ReadinessCheckOutput)
-> Lens ReadinessCheckOutput ReadinessCheckOutput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReadinessCheckOutput' {Text
resourceSet :: Text
$sel:resourceSet:ReadinessCheckOutput' :: ReadinessCheckOutput -> Text
resourceSet} -> Text
resourceSet) (\s :: ReadinessCheckOutput
s@ReadinessCheckOutput' {} Text
a -> ReadinessCheckOutput
s {$sel:resourceSet:ReadinessCheckOutput' :: Text
resourceSet = Text
a} :: ReadinessCheckOutput)
instance Core.FromJSON ReadinessCheckOutput where
parseJSON :: Value -> Parser ReadinessCheckOutput
parseJSON =
String
-> (Object -> Parser ReadinessCheckOutput)
-> Value
-> Parser ReadinessCheckOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ReadinessCheckOutput"
( \Object
x ->
Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ReadinessCheckOutput
ReadinessCheckOutput'
(Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ReadinessCheckOutput)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text) -> Text -> Text -> ReadinessCheckOutput)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"readinessCheckName")
Parser
(Maybe (HashMap Text Text) -> Text -> Text -> ReadinessCheckOutput)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Text -> Text -> ReadinessCheckOutput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser (Text -> Text -> ReadinessCheckOutput)
-> Parser Text -> Parser (Text -> ReadinessCheckOutput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"readinessCheckArn")
Parser (Text -> ReadinessCheckOutput)
-> Parser Text -> Parser ReadinessCheckOutput
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"resourceSet")
)
instance Prelude.Hashable ReadinessCheckOutput
instance Prelude.NFData ReadinessCheckOutput