{-# 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.Glue.Types.PrincipalType
-- 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.Glue.Types.PrincipalType
  ( PrincipalType
      ( ..,
        PrincipalType_GROUP,
        PrincipalType_ROLE,
        PrincipalType_USER
      ),
  )
where

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

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

pattern PrincipalType_GROUP :: PrincipalType
pattern $bPrincipalType_GROUP :: PrincipalType
$mPrincipalType_GROUP :: forall r. PrincipalType -> (Void# -> r) -> (Void# -> r) -> r
PrincipalType_GROUP = PrincipalType' "GROUP"

pattern PrincipalType_ROLE :: PrincipalType
pattern $bPrincipalType_ROLE :: PrincipalType
$mPrincipalType_ROLE :: forall r. PrincipalType -> (Void# -> r) -> (Void# -> r) -> r
PrincipalType_ROLE = PrincipalType' "ROLE"

pattern PrincipalType_USER :: PrincipalType
pattern $bPrincipalType_USER :: PrincipalType
$mPrincipalType_USER :: forall r. PrincipalType -> (Void# -> r) -> (Void# -> r) -> r
PrincipalType_USER = PrincipalType' "USER"

{-# COMPLETE
  PrincipalType_GROUP,
  PrincipalType_ROLE,
  PrincipalType_USER,
  PrincipalType'
  #-}