{-# 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.WorkMail.Types.ImpersonationRoleType
-- 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.WorkMail.Types.ImpersonationRoleType
  ( ImpersonationRoleType
      ( ..,
        ImpersonationRoleType_FULL_ACCESS,
        ImpersonationRoleType_READ_ONLY
      ),
  )
where

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

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

pattern ImpersonationRoleType_FULL_ACCESS :: ImpersonationRoleType
pattern $bImpersonationRoleType_FULL_ACCESS :: ImpersonationRoleType
$mImpersonationRoleType_FULL_ACCESS :: forall {r}.
ImpersonationRoleType -> ((# #) -> r) -> ((# #) -> r) -> r
ImpersonationRoleType_FULL_ACCESS = ImpersonationRoleType' "FULL_ACCESS"

pattern ImpersonationRoleType_READ_ONLY :: ImpersonationRoleType
pattern $bImpersonationRoleType_READ_ONLY :: ImpersonationRoleType
$mImpersonationRoleType_READ_ONLY :: forall {r}.
ImpersonationRoleType -> ((# #) -> r) -> ((# #) -> r) -> r
ImpersonationRoleType_READ_ONLY = ImpersonationRoleType' "READ_ONLY"

{-# COMPLETE
  ImpersonationRoleType_FULL_ACCESS,
  ImpersonationRoleType_READ_ONLY,
  ImpersonationRoleType'
  #-}