{-# 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.IAM.Types.PolicyOwnerEntityType
-- 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.IAM.Types.PolicyOwnerEntityType
  ( PolicyOwnerEntityType
      ( ..,
        PolicyOwnerEntityType_GROUP,
        PolicyOwnerEntityType_ROLE,
        PolicyOwnerEntityType_USER
      ),
  )
where

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

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

pattern PolicyOwnerEntityType_GROUP :: PolicyOwnerEntityType
pattern $bPolicyOwnerEntityType_GROUP :: PolicyOwnerEntityType
$mPolicyOwnerEntityType_GROUP :: forall r.
PolicyOwnerEntityType -> (Void# -> r) -> (Void# -> r) -> r
PolicyOwnerEntityType_GROUP = PolicyOwnerEntityType' "GROUP"

pattern PolicyOwnerEntityType_ROLE :: PolicyOwnerEntityType
pattern $bPolicyOwnerEntityType_ROLE :: PolicyOwnerEntityType
$mPolicyOwnerEntityType_ROLE :: forall r.
PolicyOwnerEntityType -> (Void# -> r) -> (Void# -> r) -> r
PolicyOwnerEntityType_ROLE = PolicyOwnerEntityType' "ROLE"

pattern PolicyOwnerEntityType_USER :: PolicyOwnerEntityType
pattern $bPolicyOwnerEntityType_USER :: PolicyOwnerEntityType
$mPolicyOwnerEntityType_USER :: forall r.
PolicyOwnerEntityType -> (Void# -> r) -> (Void# -> r) -> r
PolicyOwnerEntityType_USER = PolicyOwnerEntityType' "USER"

{-# COMPLETE
  PolicyOwnerEntityType_GROUP,
  PolicyOwnerEntityType_ROLE,
  PolicyOwnerEntityType_USER,
  PolicyOwnerEntityType'
  #-}