{-# 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.AuditManager.Types.RoleType
-- 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.AuditManager.Types.RoleType
  ( RoleType
      ( ..,
        RoleType_PROCESS_OWNER,
        RoleType_RESOURCE_OWNER
      ),
  )
where

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

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

pattern RoleType_PROCESS_OWNER :: RoleType
pattern $bRoleType_PROCESS_OWNER :: RoleType
$mRoleType_PROCESS_OWNER :: forall r. RoleType -> (Void# -> r) -> (Void# -> r) -> r
RoleType_PROCESS_OWNER = RoleType' "PROCESS_OWNER"

pattern RoleType_RESOURCE_OWNER :: RoleType
pattern $bRoleType_RESOURCE_OWNER :: RoleType
$mRoleType_RESOURCE_OWNER :: forall r. RoleType -> (Void# -> r) -> (Void# -> r) -> r
RoleType_RESOURCE_OWNER = RoleType' "RESOURCE_OWNER"

{-# COMPLETE
  RoleType_PROCESS_OWNER,
  RoleType_RESOURCE_OWNER,
  RoleType'
  #-}