{-# 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.Connect.Types.TrafficType
-- 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.Connect.Types.TrafficType
  ( TrafficType
      ( ..,
        TrafficType_CAMPAIGN,
        TrafficType_GENERAL
      ),
  )
where

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

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

pattern TrafficType_CAMPAIGN :: TrafficType
pattern $bTrafficType_CAMPAIGN :: TrafficType
$mTrafficType_CAMPAIGN :: forall r. TrafficType -> (Void# -> r) -> (Void# -> r) -> r
TrafficType_CAMPAIGN = TrafficType' "CAMPAIGN"

pattern TrafficType_GENERAL :: TrafficType
pattern $bTrafficType_GENERAL :: TrafficType
$mTrafficType_GENERAL :: forall r. TrafficType -> (Void# -> r) -> (Void# -> r) -> r
TrafficType_GENERAL = TrafficType' "GENERAL"

{-# COMPLETE
  TrafficType_CAMPAIGN,
  TrafficType_GENERAL,
  TrafficType'
  #-}