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