{-# 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.IoT.Types.AuthDecision
-- 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.IoT.Types.AuthDecision
  ( AuthDecision
      ( ..,
        AuthDecision_ALLOWED,
        AuthDecision_EXPLICIT_DENY,
        AuthDecision_IMPLICIT_DENY
      ),
  )
where

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

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

pattern AuthDecision_ALLOWED :: AuthDecision
pattern $bAuthDecision_ALLOWED :: AuthDecision
$mAuthDecision_ALLOWED :: forall {r}. AuthDecision -> ((# #) -> r) -> ((# #) -> r) -> r
AuthDecision_ALLOWED = AuthDecision' "ALLOWED"

pattern AuthDecision_EXPLICIT_DENY :: AuthDecision
pattern $bAuthDecision_EXPLICIT_DENY :: AuthDecision
$mAuthDecision_EXPLICIT_DENY :: forall {r}. AuthDecision -> ((# #) -> r) -> ((# #) -> r) -> r
AuthDecision_EXPLICIT_DENY = AuthDecision' "EXPLICIT_DENY"

pattern AuthDecision_IMPLICIT_DENY :: AuthDecision
pattern $bAuthDecision_IMPLICIT_DENY :: AuthDecision
$mAuthDecision_IMPLICIT_DENY :: forall {r}. AuthDecision -> ((# #) -> r) -> ((# #) -> r) -> r
AuthDecision_IMPLICIT_DENY = AuthDecision' "IMPLICIT_DENY"

{-# COMPLETE
  AuthDecision_ALLOWED,
  AuthDecision_EXPLICIT_DENY,
  AuthDecision_IMPLICIT_DENY,
  AuthDecision'
  #-}