{-# 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.MacieV2.Types.EffectivePermission
-- 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.MacieV2.Types.EffectivePermission
  ( EffectivePermission
      ( ..,
        EffectivePermission_NOT_PUBLIC,
        EffectivePermission_PUBLIC,
        EffectivePermission_UNKNOWN
      ),
  )
where

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

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

pattern EffectivePermission_NOT_PUBLIC :: EffectivePermission
pattern $bEffectivePermission_NOT_PUBLIC :: EffectivePermission
$mEffectivePermission_NOT_PUBLIC :: forall r. EffectivePermission -> (Void# -> r) -> (Void# -> r) -> r
EffectivePermission_NOT_PUBLIC = EffectivePermission' "NOT_PUBLIC"

pattern EffectivePermission_PUBLIC :: EffectivePermission
pattern $bEffectivePermission_PUBLIC :: EffectivePermission
$mEffectivePermission_PUBLIC :: forall r. EffectivePermission -> (Void# -> r) -> (Void# -> r) -> r
EffectivePermission_PUBLIC = EffectivePermission' "PUBLIC"

pattern EffectivePermission_UNKNOWN :: EffectivePermission
pattern $bEffectivePermission_UNKNOWN :: EffectivePermission
$mEffectivePermission_UNKNOWN :: forall r. EffectivePermission -> (Void# -> r) -> (Void# -> r) -> r
EffectivePermission_UNKNOWN = EffectivePermission' "UNKNOWN"

{-# COMPLETE
  EffectivePermission_NOT_PUBLIC,
  EffectivePermission_PUBLIC,
  EffectivePermission_UNKNOWN,
  EffectivePermission'
  #-}