module Stratosphere.S3Tables.Table.SchemaFieldProperty (
        SchemaFieldProperty(..), mkSchemaFieldProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SchemaFieldProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-table-schemafield.html>
    SchemaFieldProperty {SchemaFieldProperty -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-table-schemafield.html#cfn-s3tables-table-schemafield-name>
                         SchemaFieldProperty -> Value Text
name :: (Value Prelude.Text),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-table-schemafield.html#cfn-s3tables-table-schemafield-required>
                         SchemaFieldProperty -> Maybe (Value Bool)
required :: (Prelude.Maybe (Value Prelude.Bool)),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-table-schemafield.html#cfn-s3tables-table-schemafield-type>
                         SchemaFieldProperty -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (SchemaFieldProperty -> SchemaFieldProperty -> Bool
(SchemaFieldProperty -> SchemaFieldProperty -> Bool)
-> (SchemaFieldProperty -> SchemaFieldProperty -> Bool)
-> Eq SchemaFieldProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SchemaFieldProperty -> SchemaFieldProperty -> Bool
== :: SchemaFieldProperty -> SchemaFieldProperty -> Bool
$c/= :: SchemaFieldProperty -> SchemaFieldProperty -> Bool
/= :: SchemaFieldProperty -> SchemaFieldProperty -> Bool
Prelude.Eq, Int -> SchemaFieldProperty -> ShowS
[SchemaFieldProperty] -> ShowS
SchemaFieldProperty -> String
(Int -> SchemaFieldProperty -> ShowS)
-> (SchemaFieldProperty -> String)
-> ([SchemaFieldProperty] -> ShowS)
-> Show SchemaFieldProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SchemaFieldProperty -> ShowS
showsPrec :: Int -> SchemaFieldProperty -> ShowS
$cshow :: SchemaFieldProperty -> String
show :: SchemaFieldProperty -> String
$cshowList :: [SchemaFieldProperty] -> ShowS
showList :: [SchemaFieldProperty] -> ShowS
Prelude.Show)
mkSchemaFieldProperty ::
  Value Prelude.Text -> Value Prelude.Text -> SchemaFieldProperty
mkSchemaFieldProperty :: Value Text -> Value Text -> SchemaFieldProperty
mkSchemaFieldProperty Value Text
name Value Text
type'
  = SchemaFieldProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, type' :: Value Text
type' = Value Text
type',
       required :: Maybe (Value Bool)
required = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SchemaFieldProperty where
  toResourceProperties :: SchemaFieldProperty -> ResourceProperties
toResourceProperties SchemaFieldProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: SchemaFieldProperty -> ()
name :: SchemaFieldProperty -> Value Text
required :: SchemaFieldProperty -> Maybe (Value Bool)
type' :: SchemaFieldProperty -> Value Text
haddock_workaround_ :: ()
name :: Value Text
required :: Maybe (Value Bool)
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3Tables::Table.SchemaField",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Name" 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
name, Key
"Type" 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
type']
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Required" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
required]))}
instance JSON.ToJSON SchemaFieldProperty where
  toJSON :: SchemaFieldProperty -> Value
toJSON SchemaFieldProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: SchemaFieldProperty -> ()
name :: SchemaFieldProperty -> Value Text
required :: SchemaFieldProperty -> Maybe (Value Bool)
type' :: SchemaFieldProperty -> Value Text
haddock_workaround_ :: ()
name :: Value Text
required :: Maybe (Value Bool)
type' :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Name" 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
name, Key
"Type" 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
type']
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Required" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
required])))
instance Property "Name" SchemaFieldProperty where
  type PropertyType "Name" SchemaFieldProperty = Value Prelude.Text
  set :: PropertyType "Name" SchemaFieldProperty
-> SchemaFieldProperty -> SchemaFieldProperty
set PropertyType "Name" SchemaFieldProperty
newValue SchemaFieldProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: SchemaFieldProperty -> ()
name :: SchemaFieldProperty -> Value Text
required :: SchemaFieldProperty -> Maybe (Value Bool)
type' :: SchemaFieldProperty -> Value Text
haddock_workaround_ :: ()
name :: Value Text
required :: Maybe (Value Bool)
type' :: Value Text
..}
    = SchemaFieldProperty {name :: Value Text
name = PropertyType "Name" SchemaFieldProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
required :: Maybe (Value Bool)
type' :: Value Text
haddock_workaround_ :: ()
required :: Maybe (Value Bool)
type' :: Value Text
..}
instance Property "Required" SchemaFieldProperty where
  type PropertyType "Required" SchemaFieldProperty = Value Prelude.Bool
  set :: PropertyType "Required" SchemaFieldProperty
-> SchemaFieldProperty -> SchemaFieldProperty
set PropertyType "Required" SchemaFieldProperty
newValue SchemaFieldProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: SchemaFieldProperty -> ()
name :: SchemaFieldProperty -> Value Text
required :: SchemaFieldProperty -> Maybe (Value Bool)
type' :: SchemaFieldProperty -> Value Text
haddock_workaround_ :: ()
name :: Value Text
required :: Maybe (Value Bool)
type' :: Value Text
..}
    = SchemaFieldProperty {required :: Maybe (Value Bool)
required = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Required" SchemaFieldProperty
Value Bool
newValue, ()
Value Text
haddock_workaround_ :: ()
name :: Value Text
type' :: Value Text
haddock_workaround_ :: ()
name :: Value Text
type' :: Value Text
..}
instance Property "Type" SchemaFieldProperty where
  type PropertyType "Type" SchemaFieldProperty = Value Prelude.Text
  set :: PropertyType "Type" SchemaFieldProperty
-> SchemaFieldProperty -> SchemaFieldProperty
set PropertyType "Type" SchemaFieldProperty
newValue SchemaFieldProperty {Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: SchemaFieldProperty -> ()
name :: SchemaFieldProperty -> Value Text
required :: SchemaFieldProperty -> Maybe (Value Bool)
type' :: SchemaFieldProperty -> Value Text
haddock_workaround_ :: ()
name :: Value Text
required :: Maybe (Value Bool)
type' :: Value Text
..}
    = SchemaFieldProperty {type' :: Value Text
type' = PropertyType "Type" SchemaFieldProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
required :: Maybe (Value Bool)
haddock_workaround_ :: ()
name :: Value Text
required :: Maybe (Value Bool)
..}