{-# 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.ServiceCatalog.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.ServiceCatalog.Types.PrincipalType
  ( PrincipalType
      ( ..,
        PrincipalType_IAM,
        PrincipalType_IAM_PATTERN
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Data as Data
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_IAM :: PrincipalType
pattern $bPrincipalType_IAM :: PrincipalType
$mPrincipalType_IAM :: forall {r}. PrincipalType -> ((# #) -> r) -> ((# #) -> r) -> r
PrincipalType_IAM = PrincipalType' "IAM"

pattern PrincipalType_IAM_PATTERN :: PrincipalType
pattern $bPrincipalType_IAM_PATTERN :: PrincipalType
$mPrincipalType_IAM_PATTERN :: forall {r}. PrincipalType -> ((# #) -> r) -> ((# #) -> r) -> r
PrincipalType_IAM_PATTERN = PrincipalType' "IAM_PATTERN"

{-# COMPLETE
  PrincipalType_IAM,
  PrincipalType_IAM_PATTERN,
  PrincipalType'
  #-}