module Stratosphere.QuickSight.Dashboard.FieldSortProperty (
        FieldSortProperty(..), mkFieldSortProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FieldSortProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-fieldsort.html>
    FieldSortProperty {FieldSortProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-fieldsort.html#cfn-quicksight-dashboard-fieldsort-direction>
                       FieldSortProperty -> Value Text
direction :: (Value Prelude.Text),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-quicksight-dashboard-fieldsort.html#cfn-quicksight-dashboard-fieldsort-fieldid>
                       FieldSortProperty -> Value Text
fieldId :: (Value Prelude.Text)}
  deriving stock (FieldSortProperty -> FieldSortProperty -> Bool
(FieldSortProperty -> FieldSortProperty -> Bool)
-> (FieldSortProperty -> FieldSortProperty -> Bool)
-> Eq FieldSortProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FieldSortProperty -> FieldSortProperty -> Bool
== :: FieldSortProperty -> FieldSortProperty -> Bool
$c/= :: FieldSortProperty -> FieldSortProperty -> Bool
/= :: FieldSortProperty -> FieldSortProperty -> Bool
Prelude.Eq, Int -> FieldSortProperty -> ShowS
[FieldSortProperty] -> ShowS
FieldSortProperty -> String
(Int -> FieldSortProperty -> ShowS)
-> (FieldSortProperty -> String)
-> ([FieldSortProperty] -> ShowS)
-> Show FieldSortProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FieldSortProperty -> ShowS
showsPrec :: Int -> FieldSortProperty -> ShowS
$cshow :: FieldSortProperty -> String
show :: FieldSortProperty -> String
$cshowList :: [FieldSortProperty] -> ShowS
showList :: [FieldSortProperty] -> ShowS
Prelude.Show)
mkFieldSortProperty ::
  Value Prelude.Text -> Value Prelude.Text -> FieldSortProperty
mkFieldSortProperty :: Value Text -> Value Text -> FieldSortProperty
mkFieldSortProperty Value Text
direction Value Text
fieldId
  = FieldSortProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), direction :: Value Text
direction = Value Text
direction,
       fieldId :: Value Text
fieldId = Value Text
fieldId}
instance ToResourceProperties FieldSortProperty where
  toResourceProperties :: FieldSortProperty -> ResourceProperties
toResourceProperties FieldSortProperty {()
Value Text
haddock_workaround_ :: FieldSortProperty -> ()
direction :: FieldSortProperty -> Value Text
fieldId :: FieldSortProperty -> Value Text
haddock_workaround_ :: ()
direction :: Value Text
fieldId :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QuickSight::Dashboard.FieldSort",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"Direction" 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
direction,
                       Key
"FieldId" 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
fieldId]}
instance JSON.ToJSON FieldSortProperty where
  toJSON :: FieldSortProperty -> Value
toJSON FieldSortProperty {()
Value Text
haddock_workaround_ :: FieldSortProperty -> ()
direction :: FieldSortProperty -> Value Text
fieldId :: FieldSortProperty -> Value Text
haddock_workaround_ :: ()
direction :: Value Text
fieldId :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        [Key
"Direction" 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
direction, Key
"FieldId" 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
fieldId]
instance Property "Direction" FieldSortProperty where
  type PropertyType "Direction" FieldSortProperty = Value Prelude.Text
  set :: PropertyType "Direction" FieldSortProperty
-> FieldSortProperty -> FieldSortProperty
set PropertyType "Direction" FieldSortProperty
newValue FieldSortProperty {()
Value Text
haddock_workaround_ :: FieldSortProperty -> ()
direction :: FieldSortProperty -> Value Text
fieldId :: FieldSortProperty -> Value Text
haddock_workaround_ :: ()
direction :: Value Text
fieldId :: Value Text
..}
    = FieldSortProperty {direction :: Value Text
direction = PropertyType "Direction" FieldSortProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
fieldId :: Value Text
haddock_workaround_ :: ()
fieldId :: Value Text
..}
instance Property "FieldId" FieldSortProperty where
  type PropertyType "FieldId" FieldSortProperty = Value Prelude.Text
  set :: PropertyType "FieldId" FieldSortProperty
-> FieldSortProperty -> FieldSortProperty
set PropertyType "FieldId" FieldSortProperty
newValue FieldSortProperty {()
Value Text
haddock_workaround_ :: FieldSortProperty -> ()
direction :: FieldSortProperty -> Value Text
fieldId :: FieldSortProperty -> Value Text
haddock_workaround_ :: ()
direction :: Value Text
fieldId :: Value Text
..}
    = FieldSortProperty {fieldId :: Value Text
fieldId = PropertyType "FieldId" FieldSortProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
direction :: Value Text
haddock_workaround_ :: ()
direction :: Value Text
..}