{-# 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.PolicyEvaluationDecisionType
-- 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.PolicyEvaluationDecisionType
  ( PolicyEvaluationDecisionType
      ( ..,
        PolicyEvaluationDecisionType_Allowed,
        PolicyEvaluationDecisionType_ExplicitDeny,
        PolicyEvaluationDecisionType_ImplicitDeny
      ),
  )
where

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

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

pattern PolicyEvaluationDecisionType_Allowed :: PolicyEvaluationDecisionType
pattern $bPolicyEvaluationDecisionType_Allowed :: PolicyEvaluationDecisionType
$mPolicyEvaluationDecisionType_Allowed :: forall r.
PolicyEvaluationDecisionType -> (Void# -> r) -> (Void# -> r) -> r
PolicyEvaluationDecisionType_Allowed = PolicyEvaluationDecisionType' "allowed"

pattern PolicyEvaluationDecisionType_ExplicitDeny :: PolicyEvaluationDecisionType
pattern $bPolicyEvaluationDecisionType_ExplicitDeny :: PolicyEvaluationDecisionType
$mPolicyEvaluationDecisionType_ExplicitDeny :: forall r.
PolicyEvaluationDecisionType -> (Void# -> r) -> (Void# -> r) -> r
PolicyEvaluationDecisionType_ExplicitDeny = PolicyEvaluationDecisionType' "explicitDeny"

pattern PolicyEvaluationDecisionType_ImplicitDeny :: PolicyEvaluationDecisionType
pattern $bPolicyEvaluationDecisionType_ImplicitDeny :: PolicyEvaluationDecisionType
$mPolicyEvaluationDecisionType_ImplicitDeny :: forall r.
PolicyEvaluationDecisionType -> (Void# -> r) -> (Void# -> r) -> r
PolicyEvaluationDecisionType_ImplicitDeny = PolicyEvaluationDecisionType' "implicitDeny"

{-# COMPLETE
  PolicyEvaluationDecisionType_Allowed,
  PolicyEvaluationDecisionType_ExplicitDeny,
  PolicyEvaluationDecisionType_ImplicitDeny,
  PolicyEvaluationDecisionType'
  #-}