{-# 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.AlexaBusiness.Types.PhoneNumberType
-- 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.AlexaBusiness.Types.PhoneNumberType
  ( PhoneNumberType
      ( ..,
        PhoneNumberType_HOME,
        PhoneNumberType_MOBILE,
        PhoneNumberType_WORK
      ),
  )
where

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

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

pattern PhoneNumberType_HOME :: PhoneNumberType
pattern $bPhoneNumberType_HOME :: PhoneNumberType
$mPhoneNumberType_HOME :: forall r. PhoneNumberType -> (Void# -> r) -> (Void# -> r) -> r
PhoneNumberType_HOME = PhoneNumberType' "HOME"

pattern PhoneNumberType_MOBILE :: PhoneNumberType
pattern $bPhoneNumberType_MOBILE :: PhoneNumberType
$mPhoneNumberType_MOBILE :: forall r. PhoneNumberType -> (Void# -> r) -> (Void# -> r) -> r
PhoneNumberType_MOBILE = PhoneNumberType' "MOBILE"

pattern PhoneNumberType_WORK :: PhoneNumberType
pattern $bPhoneNumberType_WORK :: PhoneNumberType
$mPhoneNumberType_WORK :: forall r. PhoneNumberType -> (Void# -> r) -> (Void# -> r) -> r
PhoneNumberType_WORK = PhoneNumberType' "WORK"

{-# COMPLETE
  PhoneNumberType_HOME,
  PhoneNumberType_MOBILE,
  PhoneNumberType_WORK,
  PhoneNumberType'
  #-}