module Stratosphere.XRay.TransactionSearchConfig (
        TransactionSearchConfig(..), mkTransactionSearchConfig
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TransactionSearchConfig
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-xray-transactionsearchconfig.html>
    TransactionSearchConfig {TransactionSearchConfig -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-xray-transactionsearchconfig.html#cfn-xray-transactionsearchconfig-indexingpercentage>
                             TransactionSearchConfig -> Maybe (Value Double)
indexingPercentage :: (Prelude.Maybe (Value Prelude.Double))}
  deriving stock (TransactionSearchConfig -> TransactionSearchConfig -> Bool
(TransactionSearchConfig -> TransactionSearchConfig -> Bool)
-> (TransactionSearchConfig -> TransactionSearchConfig -> Bool)
-> Eq TransactionSearchConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransactionSearchConfig -> TransactionSearchConfig -> Bool
== :: TransactionSearchConfig -> TransactionSearchConfig -> Bool
$c/= :: TransactionSearchConfig -> TransactionSearchConfig -> Bool
/= :: TransactionSearchConfig -> TransactionSearchConfig -> Bool
Prelude.Eq, Int -> TransactionSearchConfig -> ShowS
[TransactionSearchConfig] -> ShowS
TransactionSearchConfig -> String
(Int -> TransactionSearchConfig -> ShowS)
-> (TransactionSearchConfig -> String)
-> ([TransactionSearchConfig] -> ShowS)
-> Show TransactionSearchConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransactionSearchConfig -> ShowS
showsPrec :: Int -> TransactionSearchConfig -> ShowS
$cshow :: TransactionSearchConfig -> String
show :: TransactionSearchConfig -> String
$cshowList :: [TransactionSearchConfig] -> ShowS
showList :: [TransactionSearchConfig] -> ShowS
Prelude.Show)
mkTransactionSearchConfig :: TransactionSearchConfig
mkTransactionSearchConfig :: TransactionSearchConfig
mkTransactionSearchConfig
  = TransactionSearchConfig
      {haddock_workaround_ :: ()
haddock_workaround_ = (), indexingPercentage :: Maybe (Value Double)
indexingPercentage = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TransactionSearchConfig where
  toResourceProperties :: TransactionSearchConfig -> ResourceProperties
toResourceProperties TransactionSearchConfig {Maybe (Value Double)
()
haddock_workaround_ :: TransactionSearchConfig -> ()
indexingPercentage :: TransactionSearchConfig -> Maybe (Value Double)
haddock_workaround_ :: ()
indexingPercentage :: Maybe (Value Double)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::XRay::TransactionSearchConfig",
         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
"IndexingPercentage" (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)
indexingPercentage])}
instance JSON.ToJSON TransactionSearchConfig where
  toJSON :: TransactionSearchConfig -> Value
toJSON TransactionSearchConfig {Maybe (Value Double)
()
haddock_workaround_ :: TransactionSearchConfig -> ()
indexingPercentage :: TransactionSearchConfig -> Maybe (Value Double)
haddock_workaround_ :: ()
indexingPercentage :: 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
"IndexingPercentage" (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)
indexingPercentage]))
instance Property "IndexingPercentage" TransactionSearchConfig where
  type PropertyType "IndexingPercentage" TransactionSearchConfig = Value Prelude.Double
  set :: PropertyType "IndexingPercentage" TransactionSearchConfig
-> TransactionSearchConfig -> TransactionSearchConfig
set PropertyType "IndexingPercentage" TransactionSearchConfig
newValue TransactionSearchConfig {Maybe (Value Double)
()
haddock_workaround_ :: TransactionSearchConfig -> ()
indexingPercentage :: TransactionSearchConfig -> Maybe (Value Double)
haddock_workaround_ :: ()
indexingPercentage :: Maybe (Value Double)
..}
    = TransactionSearchConfig
        {indexingPercentage :: Maybe (Value Double)
indexingPercentage = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IndexingPercentage" TransactionSearchConfig
Value Double
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}