{-# 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.EC2.Types.PrincipalType
-- 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.EC2.Types.PrincipalType
  ( PrincipalType
      ( ..,
        PrincipalType_Account,
        PrincipalType_All,
        PrincipalType_OrganizationUnit,
        PrincipalType_Role,
        PrincipalType_Service,
        PrincipalType_User
      ),
  )
where

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

newtype PrincipalType = PrincipalType'
  { PrincipalType -> Text
fromPrincipalType ::
      Data.Text
  }
  deriving stock
    ( Int -> PrincipalType -> ShowS
[PrincipalType] -> ShowS
PrincipalType -> String
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]
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
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
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
Prelude.Ord,
      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
    ( Eq PrincipalType
Int -> PrincipalType -> Int
PrincipalType -> Int
forall a. Eq 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 -> ()
forall a. (a -> ()) -> NFData a
rnf :: PrincipalType -> ()
$crnf :: PrincipalType -> ()
Prelude.NFData,
      Text -> Either String PrincipalType
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String PrincipalType
$cfromText :: Text -> Either String PrincipalType
Data.FromText,
      PrincipalType -> Text
forall a. (a -> Text) -> ToText a
toText :: PrincipalType -> Text
$ctoText :: PrincipalType -> Text
Data.ToText,
      PrincipalType -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: PrincipalType -> ByteString
$ctoBS :: PrincipalType -> ByteString
Data.ToByteString,
      PrincipalType -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: PrincipalType -> ByteStringBuilder
$cbuild :: PrincipalType -> ByteStringBuilder
Data.ToLog,
      HeaderName -> PrincipalType -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> PrincipalType -> [Header]
$ctoHeader :: HeaderName -> PrincipalType -> [Header]
Data.ToHeader,
      PrincipalType -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: PrincipalType -> QueryString
$ctoQuery :: PrincipalType -> QueryString
Data.ToQuery,
      Value -> Parser [PrincipalType]
Value -> Parser 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
Data.FromJSON,
      FromJSONKeyFunction [PrincipalType]
FromJSONKeyFunction PrincipalType
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [PrincipalType]
$cfromJSONKeyList :: FromJSONKeyFunction [PrincipalType]
fromJSONKey :: FromJSONKeyFunction PrincipalType
$cfromJSONKey :: FromJSONKeyFunction PrincipalType
Data.FromJSONKey,
      [PrincipalType] -> Encoding
[PrincipalType] -> Value
PrincipalType -> Encoding
PrincipalType -> Value
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
Data.ToJSON,
      ToJSONKeyFunction [PrincipalType]
ToJSONKeyFunction PrincipalType
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [PrincipalType]
$ctoJSONKeyList :: ToJSONKeyFunction [PrincipalType]
toJSONKey :: ToJSONKeyFunction PrincipalType
$ctoJSONKey :: ToJSONKeyFunction PrincipalType
Data.ToJSONKey,
      [Node] -> Either String PrincipalType
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String PrincipalType
$cparseXML :: [Node] -> Either String PrincipalType
Data.FromXML,
      PrincipalType -> XML
forall a. (a -> XML) -> ToXML a
toXML :: PrincipalType -> XML
$ctoXML :: PrincipalType -> XML
Data.ToXML
    )

pattern PrincipalType_Account :: PrincipalType
pattern $bPrincipalType_Account :: PrincipalType
$mPrincipalType_Account :: forall {r}. PrincipalType -> ((# #) -> r) -> ((# #) -> r) -> r
PrincipalType_Account = PrincipalType' "Account"

pattern PrincipalType_All :: PrincipalType
pattern $bPrincipalType_All :: PrincipalType
$mPrincipalType_All :: forall {r}. PrincipalType -> ((# #) -> r) -> ((# #) -> r) -> r
PrincipalType_All = PrincipalType' "All"

pattern PrincipalType_OrganizationUnit :: PrincipalType
pattern $bPrincipalType_OrganizationUnit :: PrincipalType
$mPrincipalType_OrganizationUnit :: forall {r}. PrincipalType -> ((# #) -> r) -> ((# #) -> r) -> r
PrincipalType_OrganizationUnit = PrincipalType' "OrganizationUnit"

pattern PrincipalType_Role :: PrincipalType
pattern $bPrincipalType_Role :: PrincipalType
$mPrincipalType_Role :: forall {r}. PrincipalType -> ((# #) -> r) -> ((# #) -> r) -> r
PrincipalType_Role = PrincipalType' "Role"

pattern PrincipalType_Service :: PrincipalType
pattern $bPrincipalType_Service :: PrincipalType
$mPrincipalType_Service :: forall {r}. PrincipalType -> ((# #) -> r) -> ((# #) -> r) -> r
PrincipalType_Service = PrincipalType' "Service"

pattern PrincipalType_User :: PrincipalType
pattern $bPrincipalType_User :: PrincipalType
$mPrincipalType_User :: forall {r}. PrincipalType -> ((# #) -> r) -> ((# #) -> r) -> r
PrincipalType_User = PrincipalType' "User"

{-# COMPLETE
  PrincipalType_Account,
  PrincipalType_All,
  PrincipalType_OrganizationUnit,
  PrincipalType_Role,
  PrincipalType_Service,
  PrincipalType_User,
  PrincipalType'
  #-}