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