{-# 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.Pinpoint.Types.DefinitionFormat
-- 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.Pinpoint.Types.DefinitionFormat
  ( DefinitionFormat
      ( ..,
        DefinitionFormat_CSV,
        DefinitionFormat_JSON
      ),
  )
where

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

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

pattern DefinitionFormat_CSV :: DefinitionFormat
pattern $bDefinitionFormat_CSV :: DefinitionFormat
$mDefinitionFormat_CSV :: forall r. DefinitionFormat -> (Void# -> r) -> (Void# -> r) -> r
DefinitionFormat_CSV = DefinitionFormat' "CSV"

pattern DefinitionFormat_JSON :: DefinitionFormat
pattern $bDefinitionFormat_JSON :: DefinitionFormat
$mDefinitionFormat_JSON :: forall r. DefinitionFormat -> (Void# -> r) -> (Void# -> r) -> r
DefinitionFormat_JSON = DefinitionFormat' "JSON"

{-# COMPLETE
  DefinitionFormat_CSV,
  DefinitionFormat_JSON,
  DefinitionFormat'
  #-}