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