{-# 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.CustomerProfiles.Types.FieldContentType
-- 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.CustomerProfiles.Types.FieldContentType
  ( FieldContentType
      ( ..,
        FieldContentType_EMAIL_ADDRESS,
        FieldContentType_NAME,
        FieldContentType_NUMBER,
        FieldContentType_PHONE_NUMBER,
        FieldContentType_STRING
      ),
  )
where

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

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

pattern FieldContentType_EMAIL_ADDRESS :: FieldContentType
pattern $bFieldContentType_EMAIL_ADDRESS :: FieldContentType
$mFieldContentType_EMAIL_ADDRESS :: forall r. FieldContentType -> (Void# -> r) -> (Void# -> r) -> r
FieldContentType_EMAIL_ADDRESS = FieldContentType' "EMAIL_ADDRESS"

pattern FieldContentType_NAME :: FieldContentType
pattern $bFieldContentType_NAME :: FieldContentType
$mFieldContentType_NAME :: forall r. FieldContentType -> (Void# -> r) -> (Void# -> r) -> r
FieldContentType_NAME = FieldContentType' "NAME"

pattern FieldContentType_NUMBER :: FieldContentType
pattern $bFieldContentType_NUMBER :: FieldContentType
$mFieldContentType_NUMBER :: forall r. FieldContentType -> (Void# -> r) -> (Void# -> r) -> r
FieldContentType_NUMBER = FieldContentType' "NUMBER"

pattern FieldContentType_PHONE_NUMBER :: FieldContentType
pattern $bFieldContentType_PHONE_NUMBER :: FieldContentType
$mFieldContentType_PHONE_NUMBER :: forall r. FieldContentType -> (Void# -> r) -> (Void# -> r) -> r
FieldContentType_PHONE_NUMBER = FieldContentType' "PHONE_NUMBER"

pattern FieldContentType_STRING :: FieldContentType
pattern $bFieldContentType_STRING :: FieldContentType
$mFieldContentType_STRING :: forall r. FieldContentType -> (Void# -> r) -> (Void# -> r) -> r
FieldContentType_STRING = FieldContentType' "STRING"

{-# COMPLETE
  FieldContentType_EMAIL_ADDRESS,
  FieldContentType_NAME,
  FieldContentType_NUMBER,
  FieldContentType_PHONE_NUMBER,
  FieldContentType_STRING,
  FieldContentType'
  #-}