{-# 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.S3.Types.JSONType
-- 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.S3.Types.JSONType
  ( JSONType
      ( ..,
        JSONType_DOCUMENT,
        JSONType_LINES
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal

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

pattern JSONType_DOCUMENT :: JSONType
pattern $bJSONType_DOCUMENT :: JSONType
$mJSONType_DOCUMENT :: forall {r}. JSONType -> ((# #) -> r) -> ((# #) -> r) -> r
JSONType_DOCUMENT = JSONType' "DOCUMENT"

pattern JSONType_LINES :: JSONType
pattern $bJSONType_LINES :: JSONType
$mJSONType_LINES :: forall {r}. JSONType -> ((# #) -> r) -> ((# #) -> r) -> r
JSONType_LINES = JSONType' "LINES"

{-# COMPLETE
  JSONType_DOCUMENT,
  JSONType_LINES,
  JSONType'
  #-}