{-# 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.Chime.Types.SipRuleTriggerType
-- 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.Chime.Types.SipRuleTriggerType
  ( SipRuleTriggerType
      ( ..,
        SipRuleTriggerType_RequestUriHostname,
        SipRuleTriggerType_ToPhoneNumber
      ),
  )
where

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

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

pattern SipRuleTriggerType_RequestUriHostname :: SipRuleTriggerType
pattern $bSipRuleTriggerType_RequestUriHostname :: SipRuleTriggerType
$mSipRuleTriggerType_RequestUriHostname :: forall r. SipRuleTriggerType -> (Void# -> r) -> (Void# -> r) -> r
SipRuleTriggerType_RequestUriHostname = SipRuleTriggerType' "RequestUriHostname"

pattern SipRuleTriggerType_ToPhoneNumber :: SipRuleTriggerType
pattern $bSipRuleTriggerType_ToPhoneNumber :: SipRuleTriggerType
$mSipRuleTriggerType_ToPhoneNumber :: forall r. SipRuleTriggerType -> (Void# -> r) -> (Void# -> r) -> r
SipRuleTriggerType_ToPhoneNumber = SipRuleTriggerType' "ToPhoneNumber"

{-# COMPLETE
  SipRuleTriggerType_RequestUriHostname,
  SipRuleTriggerType_ToPhoneNumber,
  SipRuleTriggerType'
  #-}