module Stratosphere.ApiGatewayV2.Model (
Model(..), mkModel
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Model
=
Model {Model -> ()
haddock_workaround_ :: (),
Model -> Value Text
apiId :: (Value Prelude.Text),
Model -> Maybe (Value Text)
contentType :: (Prelude.Maybe (Value Prelude.Text)),
Model -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
Model -> Value Text
name :: (Value Prelude.Text),
Model -> Object
schema :: JSON.Object}
deriving stock (Model -> Model -> Bool
(Model -> Model -> Bool) -> (Model -> Model -> Bool) -> Eq Model
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Model -> Model -> Bool
== :: Model -> Model -> Bool
$c/= :: Model -> Model -> Bool
/= :: Model -> Model -> Bool
Prelude.Eq, Int -> Model -> ShowS
[Model] -> ShowS
Model -> String
(Int -> Model -> ShowS)
-> (Model -> String) -> ([Model] -> ShowS) -> Show Model
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Model -> ShowS
showsPrec :: Int -> Model -> ShowS
$cshow :: Model -> String
show :: Model -> String
$cshowList :: [Model] -> ShowS
showList :: [Model] -> ShowS
Prelude.Show)
mkModel ::
Value Prelude.Text -> Value Prelude.Text -> JSON.Object -> Model
mkModel :: Value Text -> Value Text -> Object -> Model
mkModel Value Text
apiId Value Text
name Object
schema
= Model
{haddock_workaround_ :: ()
haddock_workaround_ = (), apiId :: Value Text
apiId = Value Text
apiId, name :: Value Text
name = Value Text
name,
schema :: Object
schema = Object
schema, contentType :: Maybe (Value Text)
contentType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Model where
toResourceProperties :: Model -> ResourceProperties
toResourceProperties Model {Maybe (Value Text)
()
Object
Value Text
haddock_workaround_ :: Model -> ()
apiId :: Model -> Value Text
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Value Text
schema :: Model -> Object
haddock_workaround_ :: ()
apiId :: Value Text
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
schema :: Object
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ApiGatewayV2::Model",
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
"ApiId" 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
apiId, 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
"Schema" Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Object
schema]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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..=) Key
"ContentType" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
contentType,
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..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description]))}
instance JSON.ToJSON Model where
toJSON :: Model -> Value
toJSON Model {Maybe (Value Text)
()
Object
Value Text
haddock_workaround_ :: Model -> ()
apiId :: Model -> Value Text
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Value Text
schema :: Model -> Object
haddock_workaround_ :: ()
apiId :: Value Text
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
schema :: Object
..}
= [(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
"ApiId" 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
apiId, 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
"Schema" Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Object
schema]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[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..=) Key
"ContentType" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
contentType,
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..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description])))
instance Property "ApiId" Model where
type PropertyType "ApiId" Model = Value Prelude.Text
set :: PropertyType "ApiId" Model -> Model -> Model
set PropertyType "ApiId" Model
newValue Model {Maybe (Value Text)
()
Object
Value Text
haddock_workaround_ :: Model -> ()
apiId :: Model -> Value Text
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Value Text
schema :: Model -> Object
haddock_workaround_ :: ()
apiId :: Value Text
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
schema :: Object
..} = Model {apiId :: Value Text
apiId = PropertyType "ApiId" Model
Value Text
newValue, Maybe (Value Text)
()
Object
Value Text
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
schema :: Object
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
schema :: Object
..}
instance Property "ContentType" Model where
type PropertyType "ContentType" Model = Value Prelude.Text
set :: PropertyType "ContentType" Model -> Model -> Model
set PropertyType "ContentType" Model
newValue Model {Maybe (Value Text)
()
Object
Value Text
haddock_workaround_ :: Model -> ()
apiId :: Model -> Value Text
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Value Text
schema :: Model -> Object
haddock_workaround_ :: ()
apiId :: Value Text
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
schema :: Object
..}
= Model {contentType :: Maybe (Value Text)
contentType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContentType" Model
Value Text
newValue, Maybe (Value Text)
()
Object
Value Text
haddock_workaround_ :: ()
apiId :: Value Text
description :: Maybe (Value Text)
name :: Value Text
schema :: Object
haddock_workaround_ :: ()
apiId :: Value Text
description :: Maybe (Value Text)
name :: Value Text
schema :: Object
..}
instance Property "Description" Model where
type PropertyType "Description" Model = Value Prelude.Text
set :: PropertyType "Description" Model -> Model -> Model
set PropertyType "Description" Model
newValue Model {Maybe (Value Text)
()
Object
Value Text
haddock_workaround_ :: Model -> ()
apiId :: Model -> Value Text
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Value Text
schema :: Model -> Object
haddock_workaround_ :: ()
apiId :: Value Text
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
schema :: Object
..}
= Model {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" Model
Value Text
newValue, Maybe (Value Text)
()
Object
Value Text
haddock_workaround_ :: ()
apiId :: Value Text
contentType :: Maybe (Value Text)
name :: Value Text
schema :: Object
haddock_workaround_ :: ()
apiId :: Value Text
contentType :: Maybe (Value Text)
name :: Value Text
schema :: Object
..}
instance Property "Name" Model where
type PropertyType "Name" Model = Value Prelude.Text
set :: PropertyType "Name" Model -> Model -> Model
set PropertyType "Name" Model
newValue Model {Maybe (Value Text)
()
Object
Value Text
haddock_workaround_ :: Model -> ()
apiId :: Model -> Value Text
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Value Text
schema :: Model -> Object
haddock_workaround_ :: ()
apiId :: Value Text
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
schema :: Object
..} = Model {name :: Value Text
name = PropertyType "Name" Model
Value Text
newValue, Maybe (Value Text)
()
Object
Value Text
haddock_workaround_ :: ()
apiId :: Value Text
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
schema :: Object
haddock_workaround_ :: ()
apiId :: Value Text
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
schema :: Object
..}
instance Property "Schema" Model where
type PropertyType "Schema" Model = JSON.Object
set :: PropertyType "Schema" Model -> Model -> Model
set PropertyType "Schema" Model
newValue Model {Maybe (Value Text)
()
Object
Value Text
haddock_workaround_ :: Model -> ()
apiId :: Model -> Value Text
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Value Text
schema :: Model -> Object
haddock_workaround_ :: ()
apiId :: Value Text
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
schema :: Object
..} = Model {schema :: Object
schema = Object
PropertyType "Schema" Model
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
apiId :: Value Text
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
apiId :: Value Text
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Value Text
..}