{-# 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.ResourceSetOutput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Route53RecoveryReadiness.Types.Resource
data ResourceSetOutput = ResourceSetOutput'
{ ResourceSetOutput -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
ResourceSetOutput -> Text
resourceSetType :: Prelude.Text,
ResourceSetOutput -> Text
resourceSetName :: Prelude.Text,
ResourceSetOutput -> Text
resourceSetArn :: Prelude.Text,
ResourceSetOutput -> [Resource]
resources :: [Resource]
}
deriving (ResourceSetOutput -> ResourceSetOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceSetOutput -> ResourceSetOutput -> Bool
$c/= :: ResourceSetOutput -> ResourceSetOutput -> Bool
== :: ResourceSetOutput -> ResourceSetOutput -> Bool
$c== :: ResourceSetOutput -> ResourceSetOutput -> Bool
Prelude.Eq, ReadPrec [ResourceSetOutput]
ReadPrec ResourceSetOutput
Int -> ReadS ResourceSetOutput
ReadS [ResourceSetOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceSetOutput]
$creadListPrec :: ReadPrec [ResourceSetOutput]
readPrec :: ReadPrec ResourceSetOutput
$creadPrec :: ReadPrec ResourceSetOutput
readList :: ReadS [ResourceSetOutput]
$creadList :: ReadS [ResourceSetOutput]
readsPrec :: Int -> ReadS ResourceSetOutput
$creadsPrec :: Int -> ReadS ResourceSetOutput
Prelude.Read, Int -> ResourceSetOutput -> ShowS
[ResourceSetOutput] -> ShowS
ResourceSetOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceSetOutput] -> ShowS
$cshowList :: [ResourceSetOutput] -> ShowS
show :: ResourceSetOutput -> String
$cshow :: ResourceSetOutput -> String
showsPrec :: Int -> ResourceSetOutput -> ShowS
$cshowsPrec :: Int -> ResourceSetOutput -> ShowS
Prelude.Show, forall x. Rep ResourceSetOutput x -> ResourceSetOutput
forall x. ResourceSetOutput -> Rep ResourceSetOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResourceSetOutput x -> ResourceSetOutput
$cfrom :: forall x. ResourceSetOutput -> Rep ResourceSetOutput x
Prelude.Generic)
newResourceSetOutput ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ResourceSetOutput
newResourceSetOutput :: Text -> Text -> Text -> ResourceSetOutput
newResourceSetOutput
Text
pResourceSetType_
Text
pResourceSetName_
Text
pResourceSetArn_ =
ResourceSetOutput'
{ $sel:tags:ResourceSetOutput' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:resourceSetType:ResourceSetOutput' :: Text
resourceSetType = Text
pResourceSetType_,
$sel:resourceSetName:ResourceSetOutput' :: Text
resourceSetName = Text
pResourceSetName_,
$sel:resourceSetArn:ResourceSetOutput' :: Text
resourceSetArn = Text
pResourceSetArn_,
$sel:resources:ResourceSetOutput' :: [Resource]
resources = forall a. Monoid a => a
Prelude.mempty
}
resourceSetOutput_tags :: Lens.Lens' ResourceSetOutput (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
resourceSetOutput_tags :: Lens' ResourceSetOutput (Maybe (HashMap Text Text))
resourceSetOutput_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSetOutput' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ResourceSetOutput' :: ResourceSetOutput -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ResourceSetOutput
s@ResourceSetOutput' {} Maybe (HashMap Text Text)
a -> ResourceSetOutput
s {$sel:tags:ResourceSetOutput' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ResourceSetOutput) 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 s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
resourceSetOutput_resourceSetType :: Lens.Lens' ResourceSetOutput Prelude.Text
resourceSetOutput_resourceSetType :: Lens' ResourceSetOutput Text
resourceSetOutput_resourceSetType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSetOutput' {Text
resourceSetType :: Text
$sel:resourceSetType:ResourceSetOutput' :: ResourceSetOutput -> Text
resourceSetType} -> Text
resourceSetType) (\s :: ResourceSetOutput
s@ResourceSetOutput' {} Text
a -> ResourceSetOutput
s {$sel:resourceSetType:ResourceSetOutput' :: Text
resourceSetType = Text
a} :: ResourceSetOutput)
resourceSetOutput_resourceSetName :: Lens.Lens' ResourceSetOutput Prelude.Text
resourceSetOutput_resourceSetName :: Lens' ResourceSetOutput Text
resourceSetOutput_resourceSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSetOutput' {Text
resourceSetName :: Text
$sel:resourceSetName:ResourceSetOutput' :: ResourceSetOutput -> Text
resourceSetName} -> Text
resourceSetName) (\s :: ResourceSetOutput
s@ResourceSetOutput' {} Text
a -> ResourceSetOutput
s {$sel:resourceSetName:ResourceSetOutput' :: Text
resourceSetName = Text
a} :: ResourceSetOutput)
resourceSetOutput_resourceSetArn :: Lens.Lens' ResourceSetOutput Prelude.Text
resourceSetOutput_resourceSetArn :: Lens' ResourceSetOutput Text
resourceSetOutput_resourceSetArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSetOutput' {Text
resourceSetArn :: Text
$sel:resourceSetArn:ResourceSetOutput' :: ResourceSetOutput -> Text
resourceSetArn} -> Text
resourceSetArn) (\s :: ResourceSetOutput
s@ResourceSetOutput' {} Text
a -> ResourceSetOutput
s {$sel:resourceSetArn:ResourceSetOutput' :: Text
resourceSetArn = Text
a} :: ResourceSetOutput)
resourceSetOutput_resources :: Lens.Lens' ResourceSetOutput [Resource]
resourceSetOutput_resources :: Lens' ResourceSetOutput [Resource]
resourceSetOutput_resources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceSetOutput' {[Resource]
resources :: [Resource]
$sel:resources:ResourceSetOutput' :: ResourceSetOutput -> [Resource]
resources} -> [Resource]
resources) (\s :: ResourceSetOutput
s@ResourceSetOutput' {} [Resource]
a -> ResourceSetOutput
s {$sel:resources:ResourceSetOutput' :: [Resource]
resources = [Resource]
a} :: ResourceSetOutput) 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 ResourceSetOutput where
parseJSON :: Value -> Parser ResourceSetOutput
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ResourceSetOutput"
( \Object
x ->
Maybe (HashMap Text Text)
-> Text -> Text -> Text -> [Resource] -> ResourceSetOutput
ResourceSetOutput'
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
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"resourceSetType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"resourceSetName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"resourceSetArn")
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
"resources" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable ResourceSetOutput where
hashWithSalt :: Int -> ResourceSetOutput -> Int
hashWithSalt Int
_salt ResourceSetOutput' {[Resource]
Maybe (HashMap Text Text)
Text
resources :: [Resource]
resourceSetArn :: Text
resourceSetName :: Text
resourceSetType :: Text
tags :: Maybe (HashMap Text Text)
$sel:resources:ResourceSetOutput' :: ResourceSetOutput -> [Resource]
$sel:resourceSetArn:ResourceSetOutput' :: ResourceSetOutput -> Text
$sel:resourceSetName:ResourceSetOutput' :: ResourceSetOutput -> Text
$sel:resourceSetType:ResourceSetOutput' :: ResourceSetOutput -> Text
$sel:tags:ResourceSetOutput' :: ResourceSetOutput -> Maybe (HashMap Text Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceSetType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceSetName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceSetArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Resource]
resources
instance Prelude.NFData ResourceSetOutput where
rnf :: ResourceSetOutput -> ()
rnf ResourceSetOutput' {[Resource]
Maybe (HashMap Text Text)
Text
resources :: [Resource]
resourceSetArn :: Text
resourceSetName :: Text
resourceSetType :: Text
tags :: Maybe (HashMap Text Text)
$sel:resources:ResourceSetOutput' :: ResourceSetOutput -> [Resource]
$sel:resourceSetArn:ResourceSetOutput' :: ResourceSetOutput -> Text
$sel:resourceSetName:ResourceSetOutput' :: ResourceSetOutput -> Text
$sel:resourceSetType:ResourceSetOutput' :: ResourceSetOutput -> Text
$sel:tags:ResourceSetOutput' :: ResourceSetOutput -> Maybe (HashMap Text Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resourceSetType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resourceSetName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resourceSetArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Resource]
resources