{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AppSync.Types.TypeDefinitionFormat
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.AppSync.Types.TypeDefinitionFormat
  ( TypeDefinitionFormat
      ( ..,
        TypeDefinitionFormat_JSON,
        TypeDefinitionFormat_SDL
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude

newtype TypeDefinitionFormat = TypeDefinitionFormat'
  { TypeDefinitionFormat -> Text
fromTypeDefinitionFormat ::
      Core.Text
  }
  deriving stock
    ( Int -> TypeDefinitionFormat -> ShowS
[TypeDefinitionFormat] -> ShowS
TypeDefinitionFormat -> String
(Int -> TypeDefinitionFormat -> ShowS)
-> (TypeDefinitionFormat -> String)
-> ([TypeDefinitionFormat] -> ShowS)
-> Show TypeDefinitionFormat
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TypeDefinitionFormat] -> ShowS
$cshowList :: [TypeDefinitionFormat] -> ShowS
show :: TypeDefinitionFormat -> String
$cshow :: TypeDefinitionFormat -> String
showsPrec :: Int -> TypeDefinitionFormat -> ShowS
$cshowsPrec :: Int -> TypeDefinitionFormat -> ShowS
Prelude.Show,
      ReadPrec [TypeDefinitionFormat]
ReadPrec TypeDefinitionFormat
Int -> ReadS TypeDefinitionFormat
ReadS [TypeDefinitionFormat]
(Int -> ReadS TypeDefinitionFormat)
-> ReadS [TypeDefinitionFormat]
-> ReadPrec TypeDefinitionFormat
-> ReadPrec [TypeDefinitionFormat]
-> Read TypeDefinitionFormat
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TypeDefinitionFormat]
$creadListPrec :: ReadPrec [TypeDefinitionFormat]
readPrec :: ReadPrec TypeDefinitionFormat
$creadPrec :: ReadPrec TypeDefinitionFormat
readList :: ReadS [TypeDefinitionFormat]
$creadList :: ReadS [TypeDefinitionFormat]
readsPrec :: Int -> ReadS TypeDefinitionFormat
$creadsPrec :: Int -> ReadS TypeDefinitionFormat
Prelude.Read,
      TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
(TypeDefinitionFormat -> TypeDefinitionFormat -> Bool)
-> (TypeDefinitionFormat -> TypeDefinitionFormat -> Bool)
-> Eq TypeDefinitionFormat
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
$c/= :: TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
== :: TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
$c== :: TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
Prelude.Eq,
      Eq TypeDefinitionFormat
Eq TypeDefinitionFormat
-> (TypeDefinitionFormat -> TypeDefinitionFormat -> Ordering)
-> (TypeDefinitionFormat -> TypeDefinitionFormat -> Bool)
-> (TypeDefinitionFormat -> TypeDefinitionFormat -> Bool)
-> (TypeDefinitionFormat -> TypeDefinitionFormat -> Bool)
-> (TypeDefinitionFormat -> TypeDefinitionFormat -> Bool)
-> (TypeDefinitionFormat
    -> TypeDefinitionFormat -> TypeDefinitionFormat)
-> (TypeDefinitionFormat
    -> TypeDefinitionFormat -> TypeDefinitionFormat)
-> Ord TypeDefinitionFormat
TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
TypeDefinitionFormat -> TypeDefinitionFormat -> Ordering
TypeDefinitionFormat
-> TypeDefinitionFormat -> TypeDefinitionFormat
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: TypeDefinitionFormat
-> TypeDefinitionFormat -> TypeDefinitionFormat
$cmin :: TypeDefinitionFormat
-> TypeDefinitionFormat -> TypeDefinitionFormat
max :: TypeDefinitionFormat
-> TypeDefinitionFormat -> TypeDefinitionFormat
$cmax :: TypeDefinitionFormat
-> TypeDefinitionFormat -> TypeDefinitionFormat
>= :: TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
$c>= :: TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
> :: TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
$c> :: TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
<= :: TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
$c<= :: TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
< :: TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
$c< :: TypeDefinitionFormat -> TypeDefinitionFormat -> Bool
compare :: TypeDefinitionFormat -> TypeDefinitionFormat -> Ordering
$ccompare :: TypeDefinitionFormat -> TypeDefinitionFormat -> Ordering
$cp1Ord :: Eq TypeDefinitionFormat
Prelude.Ord,
      (forall x. TypeDefinitionFormat -> Rep TypeDefinitionFormat x)
-> (forall x. Rep TypeDefinitionFormat x -> TypeDefinitionFormat)
-> Generic TypeDefinitionFormat
forall x. Rep TypeDefinitionFormat x -> TypeDefinitionFormat
forall x. TypeDefinitionFormat -> Rep TypeDefinitionFormat x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TypeDefinitionFormat x -> TypeDefinitionFormat
$cfrom :: forall x. TypeDefinitionFormat -> Rep TypeDefinitionFormat x
Prelude.Generic
    )
  deriving newtype
    ( Int -> TypeDefinitionFormat -> Int
TypeDefinitionFormat -> Int
(Int -> TypeDefinitionFormat -> Int)
-> (TypeDefinitionFormat -> Int) -> Hashable TypeDefinitionFormat
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: TypeDefinitionFormat -> Int
$chash :: TypeDefinitionFormat -> Int
hashWithSalt :: Int -> TypeDefinitionFormat -> Int
$chashWithSalt :: Int -> TypeDefinitionFormat -> Int
Prelude.Hashable,
      TypeDefinitionFormat -> ()
(TypeDefinitionFormat -> ()) -> NFData TypeDefinitionFormat
forall a. (a -> ()) -> NFData a
rnf :: TypeDefinitionFormat -> ()
$crnf :: TypeDefinitionFormat -> ()
Prelude.NFData,
      Text -> Either String TypeDefinitionFormat
(Text -> Either String TypeDefinitionFormat)
-> FromText TypeDefinitionFormat
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String TypeDefinitionFormat
$cfromText :: Text -> Either String TypeDefinitionFormat
Core.FromText,
      TypeDefinitionFormat -> Text
(TypeDefinitionFormat -> Text) -> ToText TypeDefinitionFormat
forall a. (a -> Text) -> ToText a
toText :: TypeDefinitionFormat -> Text
$ctoText :: TypeDefinitionFormat -> Text
Core.ToText,
      TypeDefinitionFormat -> ByteString
(TypeDefinitionFormat -> ByteString)
-> ToByteString TypeDefinitionFormat
forall a. (a -> ByteString) -> ToByteString a
toBS :: TypeDefinitionFormat -> ByteString
$ctoBS :: TypeDefinitionFormat -> ByteString
Core.ToByteString,
      TypeDefinitionFormat -> ByteStringBuilder
(TypeDefinitionFormat -> ByteStringBuilder)
-> ToLog TypeDefinitionFormat
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: TypeDefinitionFormat -> ByteStringBuilder
$cbuild :: TypeDefinitionFormat -> ByteStringBuilder
Core.ToLog,
      HeaderName -> TypeDefinitionFormat -> [Header]
(HeaderName -> TypeDefinitionFormat -> [Header])
-> ToHeader TypeDefinitionFormat
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> TypeDefinitionFormat -> [Header]
$ctoHeader :: HeaderName -> TypeDefinitionFormat -> [Header]
Core.ToHeader,
      TypeDefinitionFormat -> QueryString
(TypeDefinitionFormat -> QueryString)
-> ToQuery TypeDefinitionFormat
forall a. (a -> QueryString) -> ToQuery a
toQuery :: TypeDefinitionFormat -> QueryString
$ctoQuery :: TypeDefinitionFormat -> QueryString
Core.ToQuery,
      Value -> Parser [TypeDefinitionFormat]
Value -> Parser TypeDefinitionFormat
(Value -> Parser TypeDefinitionFormat)
-> (Value -> Parser [TypeDefinitionFormat])
-> FromJSON TypeDefinitionFormat
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [TypeDefinitionFormat]
$cparseJSONList :: Value -> Parser [TypeDefinitionFormat]
parseJSON :: Value -> Parser TypeDefinitionFormat
$cparseJSON :: Value -> Parser TypeDefinitionFormat
Core.FromJSON,
      FromJSONKeyFunction [TypeDefinitionFormat]
FromJSONKeyFunction TypeDefinitionFormat
FromJSONKeyFunction TypeDefinitionFormat
-> FromJSONKeyFunction [TypeDefinitionFormat]
-> FromJSONKey TypeDefinitionFormat
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [TypeDefinitionFormat]
$cfromJSONKeyList :: FromJSONKeyFunction [TypeDefinitionFormat]
fromJSONKey :: FromJSONKeyFunction TypeDefinitionFormat
$cfromJSONKey :: FromJSONKeyFunction TypeDefinitionFormat
Core.FromJSONKey,
      [TypeDefinitionFormat] -> Encoding
[TypeDefinitionFormat] -> Value
TypeDefinitionFormat -> Encoding
TypeDefinitionFormat -> Value
(TypeDefinitionFormat -> Value)
-> (TypeDefinitionFormat -> Encoding)
-> ([TypeDefinitionFormat] -> Value)
-> ([TypeDefinitionFormat] -> Encoding)
-> ToJSON TypeDefinitionFormat
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [TypeDefinitionFormat] -> Encoding
$ctoEncodingList :: [TypeDefinitionFormat] -> Encoding
toJSONList :: [TypeDefinitionFormat] -> Value
$ctoJSONList :: [TypeDefinitionFormat] -> Value
toEncoding :: TypeDefinitionFormat -> Encoding
$ctoEncoding :: TypeDefinitionFormat -> Encoding
toJSON :: TypeDefinitionFormat -> Value
$ctoJSON :: TypeDefinitionFormat -> Value
Core.ToJSON,
      ToJSONKeyFunction [TypeDefinitionFormat]
ToJSONKeyFunction TypeDefinitionFormat
ToJSONKeyFunction TypeDefinitionFormat
-> ToJSONKeyFunction [TypeDefinitionFormat]
-> ToJSONKey TypeDefinitionFormat
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [TypeDefinitionFormat]
$ctoJSONKeyList :: ToJSONKeyFunction [TypeDefinitionFormat]
toJSONKey :: ToJSONKeyFunction TypeDefinitionFormat
$ctoJSONKey :: ToJSONKeyFunction TypeDefinitionFormat
Core.ToJSONKey,
      [Node] -> Either String TypeDefinitionFormat
([Node] -> Either String TypeDefinitionFormat)
-> FromXML TypeDefinitionFormat
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String TypeDefinitionFormat
$cparseXML :: [Node] -> Either String TypeDefinitionFormat
Core.FromXML,
      TypeDefinitionFormat -> XML
(TypeDefinitionFormat -> XML) -> ToXML TypeDefinitionFormat
forall a. (a -> XML) -> ToXML a
toXML :: TypeDefinitionFormat -> XML
$ctoXML :: TypeDefinitionFormat -> XML
Core.ToXML
    )

pattern TypeDefinitionFormat_JSON :: TypeDefinitionFormat
pattern $bTypeDefinitionFormat_JSON :: TypeDefinitionFormat
$mTypeDefinitionFormat_JSON :: forall r. TypeDefinitionFormat -> (Void# -> r) -> (Void# -> r) -> r
TypeDefinitionFormat_JSON = TypeDefinitionFormat' "JSON"

pattern TypeDefinitionFormat_SDL :: TypeDefinitionFormat
pattern $bTypeDefinitionFormat_SDL :: TypeDefinitionFormat
$mTypeDefinitionFormat_SDL :: forall r. TypeDefinitionFormat -> (Void# -> r) -> (Void# -> r) -> r
TypeDefinitionFormat_SDL = TypeDefinitionFormat' "SDL"

{-# COMPLETE
  TypeDefinitionFormat_JSON,
  TypeDefinitionFormat_SDL,
  TypeDefinitionFormat'
  #-}