module Stratosphere.AmplifyUIBuilder.Component.SortPropertyProperty (
        SortPropertyProperty(..), mkSortPropertyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SortPropertyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-sortproperty.html>
    SortPropertyProperty {SortPropertyProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-sortproperty.html#cfn-amplifyuibuilder-component-sortproperty-direction>
                          SortPropertyProperty -> Value Text
direction :: (Value Prelude.Text),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-sortproperty.html#cfn-amplifyuibuilder-component-sortproperty-field>
                          SortPropertyProperty -> Value Text
field :: (Value Prelude.Text)}
  deriving stock (SortPropertyProperty -> SortPropertyProperty -> Bool
(SortPropertyProperty -> SortPropertyProperty -> Bool)
-> (SortPropertyProperty -> SortPropertyProperty -> Bool)
-> Eq SortPropertyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SortPropertyProperty -> SortPropertyProperty -> Bool
== :: SortPropertyProperty -> SortPropertyProperty -> Bool
$c/= :: SortPropertyProperty -> SortPropertyProperty -> Bool
/= :: SortPropertyProperty -> SortPropertyProperty -> Bool
Prelude.Eq, Int -> SortPropertyProperty -> ShowS
[SortPropertyProperty] -> ShowS
SortPropertyProperty -> String
(Int -> SortPropertyProperty -> ShowS)
-> (SortPropertyProperty -> String)
-> ([SortPropertyProperty] -> ShowS)
-> Show SortPropertyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SortPropertyProperty -> ShowS
showsPrec :: Int -> SortPropertyProperty -> ShowS
$cshow :: SortPropertyProperty -> String
show :: SortPropertyProperty -> String
$cshowList :: [SortPropertyProperty] -> ShowS
showList :: [SortPropertyProperty] -> ShowS
Prelude.Show)
mkSortPropertyProperty ::
  Value Prelude.Text -> Value Prelude.Text -> SortPropertyProperty
mkSortPropertyProperty :: Value Text -> Value Text -> SortPropertyProperty
mkSortPropertyProperty Value Text
direction Value Text
field
  = SortPropertyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), direction :: Value Text
direction = Value Text
direction, field :: Value Text
field = Value Text
field}
instance ToResourceProperties SortPropertyProperty where
  toResourceProperties :: SortPropertyProperty -> ResourceProperties
toResourceProperties SortPropertyProperty {()
Value Text
haddock_workaround_ :: SortPropertyProperty -> ()
direction :: SortPropertyProperty -> Value Text
field :: SortPropertyProperty -> Value Text
haddock_workaround_ :: ()
direction :: Value Text
field :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AmplifyUIBuilder::Component.SortProperty",
         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
"Field" 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
field]}
instance JSON.ToJSON SortPropertyProperty where
  toJSON :: SortPropertyProperty -> Value
toJSON SortPropertyProperty {()
Value Text
haddock_workaround_ :: SortPropertyProperty -> ()
direction :: SortPropertyProperty -> Value Text
field :: SortPropertyProperty -> Value Text
haddock_workaround_ :: ()
direction :: Value Text
field :: 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
"Field" 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
field]
instance Property "Direction" SortPropertyProperty where
  type PropertyType "Direction" SortPropertyProperty = Value Prelude.Text
  set :: PropertyType "Direction" SortPropertyProperty
-> SortPropertyProperty -> SortPropertyProperty
set PropertyType "Direction" SortPropertyProperty
newValue SortPropertyProperty {()
Value Text
haddock_workaround_ :: SortPropertyProperty -> ()
direction :: SortPropertyProperty -> Value Text
field :: SortPropertyProperty -> Value Text
haddock_workaround_ :: ()
direction :: Value Text
field :: Value Text
..}
    = SortPropertyProperty {direction :: Value Text
direction = PropertyType "Direction" SortPropertyProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
field :: Value Text
haddock_workaround_ :: ()
field :: Value Text
..}
instance Property "Field" SortPropertyProperty where
  type PropertyType "Field" SortPropertyProperty = Value Prelude.Text
  set :: PropertyType "Field" SortPropertyProperty
-> SortPropertyProperty -> SortPropertyProperty
set PropertyType "Field" SortPropertyProperty
newValue SortPropertyProperty {()
Value Text
haddock_workaround_ :: SortPropertyProperty -> ()
direction :: SortPropertyProperty -> Value Text
field :: SortPropertyProperty -> Value Text
haddock_workaround_ :: ()
direction :: Value Text
field :: Value Text
..}
    = SortPropertyProperty {field :: Value Text
field = PropertyType "Field" SortPropertyProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
direction :: Value Text
haddock_workaround_ :: ()
direction :: Value Text
..}