{-# 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.PartyType
-- 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.PartyType
  ( PartyType
      ( ..,
        PartyType_BUSINESS,
        PartyType_INDIVIDUAL,
        PartyType_OTHER
      ),
  )
where

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

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

pattern PartyType_BUSINESS :: PartyType
pattern $bPartyType_BUSINESS :: PartyType
$mPartyType_BUSINESS :: forall r. PartyType -> (Void# -> r) -> (Void# -> r) -> r
PartyType_BUSINESS = PartyType' "BUSINESS"

pattern PartyType_INDIVIDUAL :: PartyType
pattern $bPartyType_INDIVIDUAL :: PartyType
$mPartyType_INDIVIDUAL :: forall r. PartyType -> (Void# -> r) -> (Void# -> r) -> r
PartyType_INDIVIDUAL = PartyType' "INDIVIDUAL"

pattern PartyType_OTHER :: PartyType
pattern $bPartyType_OTHER :: PartyType
$mPartyType_OTHER :: forall r. PartyType -> (Void# -> r) -> (Void# -> r) -> r
PartyType_OTHER = PartyType' "OTHER"

{-# COMPLETE
  PartyType_BUSINESS,
  PartyType_INDIVIDUAL,
  PartyType_OTHER,
  PartyType'
  #-}