module Stratosphere.AppSync.GraphQLSchema (
        GraphQLSchema(..), mkGraphQLSchema
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GraphQLSchema
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlschema.html>
    GraphQLSchema {GraphQLSchema -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlschema.html#cfn-appsync-graphqlschema-apiid>
                   GraphQLSchema -> Value Text
apiId :: (Value Prelude.Text),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlschema.html#cfn-appsync-graphqlschema-definition>
                   GraphQLSchema -> Maybe (Value Text)
definition :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlschema.html#cfn-appsync-graphqlschema-definitions3location>
                   GraphQLSchema -> Maybe (Value Text)
definitionS3Location :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (GraphQLSchema -> GraphQLSchema -> Bool
(GraphQLSchema -> GraphQLSchema -> Bool)
-> (GraphQLSchema -> GraphQLSchema -> Bool) -> Eq GraphQLSchema
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GraphQLSchema -> GraphQLSchema -> Bool
== :: GraphQLSchema -> GraphQLSchema -> Bool
$c/= :: GraphQLSchema -> GraphQLSchema -> Bool
/= :: GraphQLSchema -> GraphQLSchema -> Bool
Prelude.Eq, Int -> GraphQLSchema -> ShowS
[GraphQLSchema] -> ShowS
GraphQLSchema -> String
(Int -> GraphQLSchema -> ShowS)
-> (GraphQLSchema -> String)
-> ([GraphQLSchema] -> ShowS)
-> Show GraphQLSchema
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GraphQLSchema -> ShowS
showsPrec :: Int -> GraphQLSchema -> ShowS
$cshow :: GraphQLSchema -> String
show :: GraphQLSchema -> String
$cshowList :: [GraphQLSchema] -> ShowS
showList :: [GraphQLSchema] -> ShowS
Prelude.Show)
mkGraphQLSchema :: Value Prelude.Text -> GraphQLSchema
mkGraphQLSchema :: Value Text -> GraphQLSchema
mkGraphQLSchema Value Text
apiId
  = GraphQLSchema
      {haddock_workaround_ :: ()
haddock_workaround_ = (), apiId :: Value Text
apiId = Value Text
apiId,
       definition :: Maybe (Value Text)
definition = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       definitionS3Location :: Maybe (Value Text)
definitionS3Location = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GraphQLSchema where
  toResourceProperties :: GraphQLSchema -> ResourceProperties
toResourceProperties GraphQLSchema {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GraphQLSchema -> ()
apiId :: GraphQLSchema -> Value Text
definition :: GraphQLSchema -> Maybe (Value Text)
definitionS3Location :: GraphQLSchema -> Maybe (Value Text)
haddock_workaround_ :: ()
apiId :: Value Text
definition :: Maybe (Value Text)
definitionS3Location :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppSync::GraphQLSchema",
         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]
                           ([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
"Definition" (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)
definition,
                               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
"DefinitionS3Location"
                                 (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)
definitionS3Location]))}
instance JSON.ToJSON GraphQLSchema where
  toJSON :: GraphQLSchema -> Value
toJSON GraphQLSchema {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GraphQLSchema -> ()
apiId :: GraphQLSchema -> Value Text
definition :: GraphQLSchema -> Maybe (Value Text)
definitionS3Location :: GraphQLSchema -> Maybe (Value Text)
haddock_workaround_ :: ()
apiId :: Value Text
definition :: Maybe (Value Text)
definitionS3Location :: Maybe (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
"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]
              ([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
"Definition" (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)
definition,
                  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
"DefinitionS3Location"
                    (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)
definitionS3Location])))
instance Property "ApiId" GraphQLSchema where
  type PropertyType "ApiId" GraphQLSchema = Value Prelude.Text
  set :: PropertyType "ApiId" GraphQLSchema
-> GraphQLSchema -> GraphQLSchema
set PropertyType "ApiId" GraphQLSchema
newValue GraphQLSchema {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GraphQLSchema -> ()
apiId :: GraphQLSchema -> Value Text
definition :: GraphQLSchema -> Maybe (Value Text)
definitionS3Location :: GraphQLSchema -> Maybe (Value Text)
haddock_workaround_ :: ()
apiId :: Value Text
definition :: Maybe (Value Text)
definitionS3Location :: Maybe (Value Text)
..}
    = GraphQLSchema {apiId :: Value Text
apiId = PropertyType "ApiId" GraphQLSchema
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
definition :: Maybe (Value Text)
definitionS3Location :: Maybe (Value Text)
haddock_workaround_ :: ()
definition :: Maybe (Value Text)
definitionS3Location :: Maybe (Value Text)
..}
instance Property "Definition" GraphQLSchema where
  type PropertyType "Definition" GraphQLSchema = Value Prelude.Text
  set :: PropertyType "Definition" GraphQLSchema
-> GraphQLSchema -> GraphQLSchema
set PropertyType "Definition" GraphQLSchema
newValue GraphQLSchema {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GraphQLSchema -> ()
apiId :: GraphQLSchema -> Value Text
definition :: GraphQLSchema -> Maybe (Value Text)
definitionS3Location :: GraphQLSchema -> Maybe (Value Text)
haddock_workaround_ :: ()
apiId :: Value Text
definition :: Maybe (Value Text)
definitionS3Location :: Maybe (Value Text)
..}
    = GraphQLSchema {definition :: Maybe (Value Text)
definition = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Definition" GraphQLSchema
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
apiId :: Value Text
definitionS3Location :: Maybe (Value Text)
haddock_workaround_ :: ()
apiId :: Value Text
definitionS3Location :: Maybe (Value Text)
..}
instance Property "DefinitionS3Location" GraphQLSchema where
  type PropertyType "DefinitionS3Location" GraphQLSchema = Value Prelude.Text
  set :: PropertyType "DefinitionS3Location" GraphQLSchema
-> GraphQLSchema -> GraphQLSchema
set PropertyType "DefinitionS3Location" GraphQLSchema
newValue GraphQLSchema {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GraphQLSchema -> ()
apiId :: GraphQLSchema -> Value Text
definition :: GraphQLSchema -> Maybe (Value Text)
definitionS3Location :: GraphQLSchema -> Maybe (Value Text)
haddock_workaround_ :: ()
apiId :: Value Text
definition :: Maybe (Value Text)
definitionS3Location :: Maybe (Value Text)
..}
    = GraphQLSchema {definitionS3Location :: Maybe (Value Text)
definitionS3Location = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DefinitionS3Location" GraphQLSchema
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
apiId :: Value Text
definition :: Maybe (Value Text)
haddock_workaround_ :: ()
apiId :: Value Text
definition :: Maybe (Value Text)
..}