module Stratosphere.ServiceDiscovery.Service.HealthCheckCustomConfigProperty (
        HealthCheckCustomConfigProperty(..),
        mkHealthCheckCustomConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data HealthCheckCustomConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckcustomconfig.html>
    HealthCheckCustomConfigProperty {HealthCheckCustomConfigProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-healthcheckcustomconfig.html#cfn-servicediscovery-service-healthcheckcustomconfig-failurethreshold>
                                     HealthCheckCustomConfigProperty -> Maybe (Value Double)
failureThreshold :: (Prelude.Maybe (Value Prelude.Double))}
  deriving stock (HealthCheckCustomConfigProperty
-> HealthCheckCustomConfigProperty -> Bool
(HealthCheckCustomConfigProperty
 -> HealthCheckCustomConfigProperty -> Bool)
-> (HealthCheckCustomConfigProperty
    -> HealthCheckCustomConfigProperty -> Bool)
-> Eq HealthCheckCustomConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HealthCheckCustomConfigProperty
-> HealthCheckCustomConfigProperty -> Bool
== :: HealthCheckCustomConfigProperty
-> HealthCheckCustomConfigProperty -> Bool
$c/= :: HealthCheckCustomConfigProperty
-> HealthCheckCustomConfigProperty -> Bool
/= :: HealthCheckCustomConfigProperty
-> HealthCheckCustomConfigProperty -> Bool
Prelude.Eq, Int -> HealthCheckCustomConfigProperty -> ShowS
[HealthCheckCustomConfigProperty] -> ShowS
HealthCheckCustomConfigProperty -> String
(Int -> HealthCheckCustomConfigProperty -> ShowS)
-> (HealthCheckCustomConfigProperty -> String)
-> ([HealthCheckCustomConfigProperty] -> ShowS)
-> Show HealthCheckCustomConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HealthCheckCustomConfigProperty -> ShowS
showsPrec :: Int -> HealthCheckCustomConfigProperty -> ShowS
$cshow :: HealthCheckCustomConfigProperty -> String
show :: HealthCheckCustomConfigProperty -> String
$cshowList :: [HealthCheckCustomConfigProperty] -> ShowS
showList :: [HealthCheckCustomConfigProperty] -> ShowS
Prelude.Show)
mkHealthCheckCustomConfigProperty ::
  HealthCheckCustomConfigProperty
mkHealthCheckCustomConfigProperty :: HealthCheckCustomConfigProperty
mkHealthCheckCustomConfigProperty
  = HealthCheckCustomConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), failureThreshold :: Maybe (Value Double)
failureThreshold = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties HealthCheckCustomConfigProperty where
  toResourceProperties :: HealthCheckCustomConfigProperty -> ResourceProperties
toResourceProperties HealthCheckCustomConfigProperty {Maybe (Value Double)
()
haddock_workaround_ :: HealthCheckCustomConfigProperty -> ()
failureThreshold :: HealthCheckCustomConfigProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
failureThreshold :: Maybe (Value Double)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ServiceDiscovery::Service.HealthCheckCustomConfig",
         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 -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FailureThreshold" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
failureThreshold])}
instance JSON.ToJSON HealthCheckCustomConfigProperty where
  toJSON :: HealthCheckCustomConfigProperty -> Value
toJSON HealthCheckCustomConfigProperty {Maybe (Value Double)
()
haddock_workaround_ :: HealthCheckCustomConfigProperty -> ()
failureThreshold :: HealthCheckCustomConfigProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
failureThreshold :: Maybe (Value Double)
..}
    = [(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 -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FailureThreshold" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
failureThreshold]))
instance Property "FailureThreshold" HealthCheckCustomConfigProperty where
  type PropertyType "FailureThreshold" HealthCheckCustomConfigProperty = Value Prelude.Double
  set :: PropertyType "FailureThreshold" HealthCheckCustomConfigProperty
-> HealthCheckCustomConfigProperty
-> HealthCheckCustomConfigProperty
set PropertyType "FailureThreshold" HealthCheckCustomConfigProperty
newValue HealthCheckCustomConfigProperty {Maybe (Value Double)
()
haddock_workaround_ :: HealthCheckCustomConfigProperty -> ()
failureThreshold :: HealthCheckCustomConfigProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
failureThreshold :: Maybe (Value Double)
..}
    = HealthCheckCustomConfigProperty
        {failureThreshold :: Maybe (Value Double)
failureThreshold = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FailureThreshold" HealthCheckCustomConfigProperty
Value Double
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}