module Stratosphere.Route53RecoveryReadiness.ResourceSet.TargetResourceProperty (
module Exports, TargetResourceProperty(..),
mkTargetResourceProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Route53RecoveryReadiness.ResourceSet.NLBResourceProperty as Exports
import {-# SOURCE #-} Stratosphere.Route53RecoveryReadiness.ResourceSet.R53ResourceRecordProperty as Exports
import Stratosphere.ResourceProperties
data TargetResourceProperty
=
TargetResourceProperty {TargetResourceProperty -> ()
haddock_workaround_ :: (),
TargetResourceProperty -> Maybe NLBResourceProperty
nLBResource :: (Prelude.Maybe NLBResourceProperty),
TargetResourceProperty -> Maybe R53ResourceRecordProperty
r53Resource :: (Prelude.Maybe R53ResourceRecordProperty)}
deriving stock (TargetResourceProperty -> TargetResourceProperty -> Bool
(TargetResourceProperty -> TargetResourceProperty -> Bool)
-> (TargetResourceProperty -> TargetResourceProperty -> Bool)
-> Eq TargetResourceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TargetResourceProperty -> TargetResourceProperty -> Bool
== :: TargetResourceProperty -> TargetResourceProperty -> Bool
$c/= :: TargetResourceProperty -> TargetResourceProperty -> Bool
/= :: TargetResourceProperty -> TargetResourceProperty -> Bool
Prelude.Eq, Int -> TargetResourceProperty -> ShowS
[TargetResourceProperty] -> ShowS
TargetResourceProperty -> String
(Int -> TargetResourceProperty -> ShowS)
-> (TargetResourceProperty -> String)
-> ([TargetResourceProperty] -> ShowS)
-> Show TargetResourceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TargetResourceProperty -> ShowS
showsPrec :: Int -> TargetResourceProperty -> ShowS
$cshow :: TargetResourceProperty -> String
show :: TargetResourceProperty -> String
$cshowList :: [TargetResourceProperty] -> ShowS
showList :: [TargetResourceProperty] -> ShowS
Prelude.Show)
mkTargetResourceProperty :: TargetResourceProperty
mkTargetResourceProperty :: TargetResourceProperty
mkTargetResourceProperty
= TargetResourceProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), nLBResource :: Maybe NLBResourceProperty
nLBResource = Maybe NLBResourceProperty
forall a. Maybe a
Prelude.Nothing,
r53Resource :: Maybe R53ResourceRecordProperty
r53Resource = Maybe R53ResourceRecordProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TargetResourceProperty where
toResourceProperties :: TargetResourceProperty -> ResourceProperties
toResourceProperties TargetResourceProperty {Maybe NLBResourceProperty
Maybe R53ResourceRecordProperty
()
haddock_workaround_ :: TargetResourceProperty -> ()
nLBResource :: TargetResourceProperty -> Maybe NLBResourceProperty
r53Resource :: TargetResourceProperty -> Maybe R53ResourceRecordProperty
haddock_workaround_ :: ()
nLBResource :: Maybe NLBResourceProperty
r53Resource :: Maybe R53ResourceRecordProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Route53RecoveryReadiness::ResourceSet.TargetResource",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> NLBResourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NLBResource" (NLBResourceProperty -> (Key, Value))
-> Maybe NLBResourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NLBResourceProperty
nLBResource,
Key -> R53ResourceRecordProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"R53Resource" (R53ResourceRecordProperty -> (Key, Value))
-> Maybe R53ResourceRecordProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe R53ResourceRecordProperty
r53Resource])}
instance JSON.ToJSON TargetResourceProperty where
toJSON :: TargetResourceProperty -> Value
toJSON TargetResourceProperty {Maybe NLBResourceProperty
Maybe R53ResourceRecordProperty
()
haddock_workaround_ :: TargetResourceProperty -> ()
nLBResource :: TargetResourceProperty -> Maybe NLBResourceProperty
r53Resource :: TargetResourceProperty -> Maybe R53ResourceRecordProperty
haddock_workaround_ :: ()
nLBResource :: Maybe NLBResourceProperty
r53Resource :: Maybe R53ResourceRecordProperty
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> NLBResourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NLBResource" (NLBResourceProperty -> (Key, Value))
-> Maybe NLBResourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NLBResourceProperty
nLBResource,
Key -> R53ResourceRecordProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"R53Resource" (R53ResourceRecordProperty -> (Key, Value))
-> Maybe R53ResourceRecordProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe R53ResourceRecordProperty
r53Resource]))
instance Property "NLBResource" TargetResourceProperty where
type PropertyType "NLBResource" TargetResourceProperty = NLBResourceProperty
set :: PropertyType "NLBResource" TargetResourceProperty
-> TargetResourceProperty -> TargetResourceProperty
set PropertyType "NLBResource" TargetResourceProperty
newValue TargetResourceProperty {Maybe NLBResourceProperty
Maybe R53ResourceRecordProperty
()
haddock_workaround_ :: TargetResourceProperty -> ()
nLBResource :: TargetResourceProperty -> Maybe NLBResourceProperty
r53Resource :: TargetResourceProperty -> Maybe R53ResourceRecordProperty
haddock_workaround_ :: ()
nLBResource :: Maybe NLBResourceProperty
r53Resource :: Maybe R53ResourceRecordProperty
..}
= TargetResourceProperty {nLBResource :: Maybe NLBResourceProperty
nLBResource = NLBResourceProperty -> Maybe NLBResourceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NLBResource" TargetResourceProperty
NLBResourceProperty
newValue, Maybe R53ResourceRecordProperty
()
haddock_workaround_ :: ()
r53Resource :: Maybe R53ResourceRecordProperty
haddock_workaround_ :: ()
r53Resource :: Maybe R53ResourceRecordProperty
..}
instance Property "R53Resource" TargetResourceProperty where
type PropertyType "R53Resource" TargetResourceProperty = R53ResourceRecordProperty
set :: PropertyType "R53Resource" TargetResourceProperty
-> TargetResourceProperty -> TargetResourceProperty
set PropertyType "R53Resource" TargetResourceProperty
newValue TargetResourceProperty {Maybe NLBResourceProperty
Maybe R53ResourceRecordProperty
()
haddock_workaround_ :: TargetResourceProperty -> ()
nLBResource :: TargetResourceProperty -> Maybe NLBResourceProperty
r53Resource :: TargetResourceProperty -> Maybe R53ResourceRecordProperty
haddock_workaround_ :: ()
nLBResource :: Maybe NLBResourceProperty
r53Resource :: Maybe R53ResourceRecordProperty
..}
= TargetResourceProperty {r53Resource :: Maybe R53ResourceRecordProperty
r53Resource = R53ResourceRecordProperty -> Maybe R53ResourceRecordProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "R53Resource" TargetResourceProperty
R53ResourceRecordProperty
newValue, Maybe NLBResourceProperty
()
haddock_workaround_ :: ()
nLBResource :: Maybe NLBResourceProperty
haddock_workaround_ :: ()
nLBResource :: Maybe NLBResourceProperty
..}