{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.Data as Data
import qualified Amazonka.Prelude as Prelude

newtype TypeDefinitionFormat = TypeDefinitionFormat'
  { TypeDefinitionFormat -> Text
fromTypeDefinitionFormat ::
      Data.Text
  }
  deriving stock
    ( Int -> TypeDefinitionFormat -> ShowS
[TypeDefinitionFormat] -> ShowS
TypeDefinitionFormat -> String
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]
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
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
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
Prelude.Ord,
      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
    ( Eq TypeDefinitionFormat
Int -> TypeDefinitionFormat -> Int
TypeDefinitionFormat -> Int
forall a. Eq 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 -> ()
forall a. (a -> ()) -> NFData a
rnf :: TypeDefinitionFormat -> ()
$crnf :: TypeDefinitionFormat -> ()
Prelude.NFData,
      Text -> Either String TypeDefinitionFormat
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String TypeDefinitionFormat
$cfromText :: Text -> Either String TypeDefinitionFormat
Data.FromText,
      TypeDefinitionFormat -> Text
forall a. (a -> Text) -> ToText a
toText :: TypeDefinitionFormat -> Text
$ctoText :: TypeDefinitionFormat -> Text
Data.ToText,
      TypeDefinitionFormat -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: TypeDefinitionFormat -> ByteString
$ctoBS :: TypeDefinitionFormat -> ByteString
Data.ToByteString,
      TypeDefinitionFormat -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: TypeDefinitionFormat -> ByteStringBuilder
$cbuild :: TypeDefinitionFormat -> ByteStringBuilder
Data.ToLog,
      HeaderName -> TypeDefinitionFormat -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> TypeDefinitionFormat -> [Header]
$ctoHeader :: HeaderName -> TypeDefinitionFormat -> [Header]
Data.ToHeader,
      TypeDefinitionFormat -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: TypeDefinitionFormat -> QueryString
$ctoQuery :: TypeDefinitionFormat -> QueryString
Data.ToQuery,
      Value -> Parser [TypeDefinitionFormat]
Value -> Parser 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
Data.FromJSON,
      FromJSONKeyFunction [TypeDefinitionFormat]
FromJSONKeyFunction TypeDefinitionFormat
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [TypeDefinitionFormat]
$cfromJSONKeyList :: FromJSONKeyFunction [TypeDefinitionFormat]
fromJSONKey :: FromJSONKeyFunction TypeDefinitionFormat
$cfromJSONKey :: FromJSONKeyFunction TypeDefinitionFormat
Data.FromJSONKey,
      [TypeDefinitionFormat] -> Encoding
[TypeDefinitionFormat] -> Value
TypeDefinitionFormat -> Encoding
TypeDefinitionFormat -> Value
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
Data.ToJSON,
      ToJSONKeyFunction [TypeDefinitionFormat]
ToJSONKeyFunction TypeDefinitionFormat
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [TypeDefinitionFormat]
$ctoJSONKeyList :: ToJSONKeyFunction [TypeDefinitionFormat]
toJSONKey :: ToJSONKeyFunction TypeDefinitionFormat
$ctoJSONKey :: ToJSONKeyFunction TypeDefinitionFormat
Data.ToJSONKey,
      [Node] -> Either String TypeDefinitionFormat
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String TypeDefinitionFormat
$cparseXML :: [Node] -> Either String TypeDefinitionFormat
Data.FromXML,
      TypeDefinitionFormat -> XML
forall a. (a -> XML) -> ToXML a
toXML :: TypeDefinitionFormat -> XML
$ctoXML :: TypeDefinitionFormat -> XML
Data.ToXML
    )

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

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

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