{-# 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.CognitoIdentity.Types.MappingRuleMatchType
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CognitoIdentity.Types.MappingRuleMatchType
  ( MappingRuleMatchType
      ( ..,
        MappingRuleMatchType_Contains,
        MappingRuleMatchType_Equals,
        MappingRuleMatchType_NotEqual,
        MappingRuleMatchType_StartsWith
      ),
  )
where

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

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

pattern MappingRuleMatchType_Contains :: MappingRuleMatchType
pattern $bMappingRuleMatchType_Contains :: MappingRuleMatchType
$mMappingRuleMatchType_Contains :: forall {r}.
MappingRuleMatchType -> ((# #) -> r) -> ((# #) -> r) -> r
MappingRuleMatchType_Contains = MappingRuleMatchType' "Contains"

pattern MappingRuleMatchType_Equals :: MappingRuleMatchType
pattern $bMappingRuleMatchType_Equals :: MappingRuleMatchType
$mMappingRuleMatchType_Equals :: forall {r}.
MappingRuleMatchType -> ((# #) -> r) -> ((# #) -> r) -> r
MappingRuleMatchType_Equals = MappingRuleMatchType' "Equals"

pattern MappingRuleMatchType_NotEqual :: MappingRuleMatchType
pattern $bMappingRuleMatchType_NotEqual :: MappingRuleMatchType
$mMappingRuleMatchType_NotEqual :: forall {r}.
MappingRuleMatchType -> ((# #) -> r) -> ((# #) -> r) -> r
MappingRuleMatchType_NotEqual = MappingRuleMatchType' "NotEqual"

pattern MappingRuleMatchType_StartsWith :: MappingRuleMatchType
pattern $bMappingRuleMatchType_StartsWith :: MappingRuleMatchType
$mMappingRuleMatchType_StartsWith :: forall {r}.
MappingRuleMatchType -> ((# #) -> r) -> ((# #) -> r) -> r
MappingRuleMatchType_StartsWith = MappingRuleMatchType' "StartsWith"

{-# COMPLETE
  MappingRuleMatchType_Contains,
  MappingRuleMatchType_Equals,
  MappingRuleMatchType_NotEqual,
  MappingRuleMatchType_StartsWith,
  MappingRuleMatchType'
  #-}