{-# 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.RoleMappingType
-- 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.CognitoIdentity.Types.RoleMappingType
  ( RoleMappingType
      ( ..,
        RoleMappingType_Rules,
        RoleMappingType_Token
      ),
  )
where

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

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

pattern RoleMappingType_Rules :: RoleMappingType
pattern $bRoleMappingType_Rules :: RoleMappingType
$mRoleMappingType_Rules :: forall r. RoleMappingType -> (Void# -> r) -> (Void# -> r) -> r
RoleMappingType_Rules = RoleMappingType' "Rules"

pattern RoleMappingType_Token :: RoleMappingType
pattern $bRoleMappingType_Token :: RoleMappingType
$mRoleMappingType_Token :: forall r. RoleMappingType -> (Void# -> r) -> (Void# -> r) -> r
RoleMappingType_Token = RoleMappingType' "Token"

{-# COMPLETE
  RoleMappingType_Rules,
  RoleMappingType_Token,
  RoleMappingType'
  #-}