{-# 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.CellOutput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CellOutput = CellOutput'
{ CellOutput -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CellOutput -> [Text]
parentReadinessScopes :: [Prelude.Text],
CellOutput -> Text
cellArn :: Prelude.Text,
CellOutput -> Text
cellName :: Prelude.Text,
CellOutput -> [Text]
cells :: [Prelude.Text]
}
deriving (CellOutput -> CellOutput -> Bool
(CellOutput -> CellOutput -> Bool)
-> (CellOutput -> CellOutput -> Bool) -> Eq CellOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CellOutput -> CellOutput -> Bool
$c/= :: CellOutput -> CellOutput -> Bool
== :: CellOutput -> CellOutput -> Bool
$c== :: CellOutput -> CellOutput -> Bool
Prelude.Eq, ReadPrec [CellOutput]
ReadPrec CellOutput
Int -> ReadS CellOutput
ReadS [CellOutput]
(Int -> ReadS CellOutput)
-> ReadS [CellOutput]
-> ReadPrec CellOutput
-> ReadPrec [CellOutput]
-> Read CellOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CellOutput]
$creadListPrec :: ReadPrec [CellOutput]
readPrec :: ReadPrec CellOutput
$creadPrec :: ReadPrec CellOutput
readList :: ReadS [CellOutput]
$creadList :: ReadS [CellOutput]
readsPrec :: Int -> ReadS CellOutput
$creadsPrec :: Int -> ReadS CellOutput
Prelude.Read, Int -> CellOutput -> ShowS
[CellOutput] -> ShowS
CellOutput -> String
(Int -> CellOutput -> ShowS)
-> (CellOutput -> String)
-> ([CellOutput] -> ShowS)
-> Show CellOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CellOutput] -> ShowS
$cshowList :: [CellOutput] -> ShowS
show :: CellOutput -> String
$cshow :: CellOutput -> String
showsPrec :: Int -> CellOutput -> ShowS
$cshowsPrec :: Int -> CellOutput -> ShowS
Prelude.Show, (forall x. CellOutput -> Rep CellOutput x)
-> (forall x. Rep CellOutput x -> CellOutput) -> Generic CellOutput
forall x. Rep CellOutput x -> CellOutput
forall x. CellOutput -> Rep CellOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CellOutput x -> CellOutput
$cfrom :: forall x. CellOutput -> Rep CellOutput x
Prelude.Generic)
newCellOutput ::
Prelude.Text ->
Prelude.Text ->
CellOutput
newCellOutput :: Text -> Text -> CellOutput
newCellOutput Text
pCellArn_ Text
pCellName_ =
CellOutput' :: Maybe (HashMap Text Text)
-> [Text] -> Text -> Text -> [Text] -> CellOutput
CellOutput'
{ $sel:tags:CellOutput' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:parentReadinessScopes:CellOutput' :: [Text]
parentReadinessScopes = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:cellArn:CellOutput' :: Text
cellArn = Text
pCellArn_,
$sel:cellName:CellOutput' :: Text
cellName = Text
pCellName_,
$sel:cells:CellOutput' :: [Text]
cells = [Text]
forall a. Monoid a => a
Prelude.mempty
}
cellOutput_tags :: Lens.Lens' CellOutput (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
cellOutput_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CellOutput -> f CellOutput
cellOutput_tags = (CellOutput -> Maybe (HashMap Text Text))
-> (CellOutput -> Maybe (HashMap Text Text) -> CellOutput)
-> Lens
CellOutput
CellOutput
(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 (\CellOutput' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CellOutput' :: CellOutput -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CellOutput
s@CellOutput' {} Maybe (HashMap Text Text)
a -> CellOutput
s {$sel:tags:CellOutput' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CellOutput) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CellOutput -> f CellOutput)
-> ((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)))
-> CellOutput
-> f CellOutput
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
cellOutput_parentReadinessScopes :: Lens.Lens' CellOutput [Prelude.Text]
cellOutput_parentReadinessScopes :: ([Text] -> f [Text]) -> CellOutput -> f CellOutput
cellOutput_parentReadinessScopes = (CellOutput -> [Text])
-> (CellOutput -> [Text] -> CellOutput)
-> Lens CellOutput CellOutput [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CellOutput' {[Text]
parentReadinessScopes :: [Text]
$sel:parentReadinessScopes:CellOutput' :: CellOutput -> [Text]
parentReadinessScopes} -> [Text]
parentReadinessScopes) (\s :: CellOutput
s@CellOutput' {} [Text]
a -> CellOutput
s {$sel:parentReadinessScopes:CellOutput' :: [Text]
parentReadinessScopes = [Text]
a} :: CellOutput) (([Text] -> f [Text]) -> CellOutput -> f CellOutput)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> CellOutput
-> f CellOutput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
cellOutput_cellArn :: Lens.Lens' CellOutput Prelude.Text
cellOutput_cellArn :: (Text -> f Text) -> CellOutput -> f CellOutput
cellOutput_cellArn = (CellOutput -> Text)
-> (CellOutput -> Text -> CellOutput)
-> Lens CellOutput CellOutput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CellOutput' {Text
cellArn :: Text
$sel:cellArn:CellOutput' :: CellOutput -> Text
cellArn} -> Text
cellArn) (\s :: CellOutput
s@CellOutput' {} Text
a -> CellOutput
s {$sel:cellArn:CellOutput' :: Text
cellArn = Text
a} :: CellOutput)
cellOutput_cellName :: Lens.Lens' CellOutput Prelude.Text
cellOutput_cellName :: (Text -> f Text) -> CellOutput -> f CellOutput
cellOutput_cellName = (CellOutput -> Text)
-> (CellOutput -> Text -> CellOutput)
-> Lens CellOutput CellOutput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CellOutput' {Text
cellName :: Text
$sel:cellName:CellOutput' :: CellOutput -> Text
cellName} -> Text
cellName) (\s :: CellOutput
s@CellOutput' {} Text
a -> CellOutput
s {$sel:cellName:CellOutput' :: Text
cellName = Text
a} :: CellOutput)
cellOutput_cells :: Lens.Lens' CellOutput [Prelude.Text]
cellOutput_cells :: ([Text] -> f [Text]) -> CellOutput -> f CellOutput
cellOutput_cells = (CellOutput -> [Text])
-> (CellOutput -> [Text] -> CellOutput)
-> Lens CellOutput CellOutput [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CellOutput' {[Text]
cells :: [Text]
$sel:cells:CellOutput' :: CellOutput -> [Text]
cells} -> [Text]
cells) (\s :: CellOutput
s@CellOutput' {} [Text]
a -> CellOutput
s {$sel:cells:CellOutput' :: [Text]
cells = [Text]
a} :: CellOutput) (([Text] -> f [Text]) -> CellOutput -> f CellOutput)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> CellOutput
-> f CellOutput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON CellOutput where
parseJSON :: Value -> Parser CellOutput
parseJSON =
String
-> (Object -> Parser CellOutput) -> Value -> Parser CellOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CellOutput"
( \Object
x ->
Maybe (HashMap Text Text)
-> [Text] -> Text -> Text -> [Text] -> CellOutput
CellOutput'
(Maybe (HashMap Text Text)
-> [Text] -> Text -> Text -> [Text] -> CellOutput)
-> Parser (Maybe (HashMap Text Text))
-> Parser ([Text] -> Text -> Text -> [Text] -> CellOutput)
forall (f :: * -> *) a b. Functor 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 -> Text -> [Text] -> CellOutput)
-> Parser [Text] -> Parser (Text -> Text -> [Text] -> CellOutput)
forall (f :: * -> *) a b. Applicative f => 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
"parentReadinessScopes"
Parser (Maybe [Text]) -> [Text] -> Parser [Text]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Text -> Text -> [Text] -> CellOutput)
-> Parser Text -> Parser (Text -> [Text] -> CellOutput)
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
"cellArn")
Parser (Text -> [Text] -> CellOutput)
-> Parser Text -> Parser ([Text] -> CellOutput)
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
"cellName")
Parser ([Text] -> CellOutput) -> Parser [Text] -> Parser CellOutput
forall (f :: * -> *) a b. Applicative f => 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
"cells" Parser (Maybe [Text]) -> [Text] -> Parser [Text]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [Text]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable CellOutput
instance Prelude.NFData CellOutput