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