module Stratosphere.ApiGateway.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
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html>
    Model {Model -> ()
haddock_workaround_ :: (),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html#cfn-apigateway-model-contenttype>
           Model -> Maybe (Value Text)
contentType :: (Prelude.Maybe (Value Prelude.Text)),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html#cfn-apigateway-model-description>
           Model -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html#cfn-apigateway-model-name>
           Model -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html#cfn-apigateway-model-restapiid>
           Model -> Value Text
restApiId :: (Value Prelude.Text),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-model.html#cfn-apigateway-model-schema>
           Model -> Maybe Object
schema :: (Prelude.Maybe 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 -> Model
mkModel :: Value Text -> Model
mkModel Value Text
restApiId
  = Model
      {haddock_workaround_ :: ()
haddock_workaround_ = (), restApiId :: Value Text
restApiId = Value Text
restApiId,
       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,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, schema :: Maybe Object
schema = Maybe Object
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Model where
  toResourceProperties :: Model -> ResourceProperties
toResourceProperties Model {Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Model -> ()
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Maybe (Value Text)
restApiId :: Model -> Value Text
schema :: Model -> Maybe Object
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Maybe (Value Text)
restApiId :: Value Text
schema :: Maybe Object
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApiGateway::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
"RestApiId" 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
restApiId]
                           ([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,
                               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
"Name" (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)
name,
                               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..=) Key
"Schema" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
schema]))}
instance JSON.ToJSON Model where
  toJSON :: Model -> Value
toJSON Model {Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Model -> ()
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Maybe (Value Text)
restApiId :: Model -> Value Text
schema :: Model -> Maybe Object
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Maybe (Value Text)
restApiId :: Value Text
schema :: Maybe 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
"RestApiId" 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
restApiId]
              ([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,
                  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
"Name" (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)
name,
                  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..=) Key
"Schema" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
schema])))
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 Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Model -> ()
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Maybe (Value Text)
restApiId :: Model -> Value Text
schema :: Model -> Maybe Object
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Maybe (Value Text)
restApiId :: Value Text
schema :: Maybe 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 Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
restApiId :: Value Text
schema :: Maybe Object
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Maybe (Value Text)
restApiId :: Value Text
schema :: Maybe 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 Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Model -> ()
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Maybe (Value Text)
restApiId :: Model -> Value Text
schema :: Model -> Maybe Object
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Maybe (Value Text)
restApiId :: Value Text
schema :: Maybe 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 Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
name :: Maybe (Value Text)
restApiId :: Value Text
schema :: Maybe Object
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
name :: Maybe (Value Text)
restApiId :: Value Text
schema :: Maybe 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 Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Model -> ()
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Maybe (Value Text)
restApiId :: Model -> Value Text
schema :: Model -> Maybe Object
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Maybe (Value Text)
restApiId :: Value Text
schema :: Maybe Object
..} = Model {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" Model
Value Text
newValue, Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
restApiId :: Value Text
schema :: Maybe Object
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
restApiId :: Value Text
schema :: Maybe Object
..}
instance Property "RestApiId" Model where
  type PropertyType "RestApiId" Model = Value Prelude.Text
  set :: PropertyType "RestApiId" Model -> Model -> Model
set PropertyType "RestApiId" Model
newValue Model {Maybe Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Model -> ()
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Maybe (Value Text)
restApiId :: Model -> Value Text
schema :: Model -> Maybe Object
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Maybe (Value Text)
restApiId :: Value Text
schema :: Maybe Object
..} = Model {restApiId :: Value Text
restApiId = PropertyType "RestApiId" Model
Value Text
newValue, Maybe Object
Maybe (Value Text)
()
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Maybe (Value Text)
schema :: Maybe Object
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Maybe (Value Text)
schema :: Maybe 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 Object
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Model -> ()
contentType :: Model -> Maybe (Value Text)
description :: Model -> Maybe (Value Text)
name :: Model -> Maybe (Value Text)
restApiId :: Model -> Value Text
schema :: Model -> Maybe Object
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Maybe (Value Text)
restApiId :: Value Text
schema :: Maybe Object
..}
    = Model {schema :: Maybe Object
schema = Object -> Maybe Object
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Object
PropertyType "Schema" Model
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Maybe (Value Text)
restApiId :: Value Text
haddock_workaround_ :: ()
contentType :: Maybe (Value Text)
description :: Maybe (Value Text)
name :: Maybe (Value Text)
restApiId :: Value Text
..}