{-# 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.AccessAnalyzer.Types.AclPermission
-- 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.AccessAnalyzer.Types.AclPermission
  ( AclPermission
      ( ..,
        AclPermission_FULL_CONTROL,
        AclPermission_READ,
        AclPermission_READ_ACP,
        AclPermission_WRITE,
        AclPermission_WRITE_ACP
      ),
  )
where

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

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

pattern AclPermission_FULL_CONTROL :: AclPermission
pattern $bAclPermission_FULL_CONTROL :: AclPermission
$mAclPermission_FULL_CONTROL :: forall r. AclPermission -> (Void# -> r) -> (Void# -> r) -> r
AclPermission_FULL_CONTROL = AclPermission' "FULL_CONTROL"

pattern AclPermission_READ :: AclPermission
pattern $bAclPermission_READ :: AclPermission
$mAclPermission_READ :: forall r. AclPermission -> (Void# -> r) -> (Void# -> r) -> r
AclPermission_READ = AclPermission' "READ"

pattern AclPermission_READ_ACP :: AclPermission
pattern $bAclPermission_READ_ACP :: AclPermission
$mAclPermission_READ_ACP :: forall r. AclPermission -> (Void# -> r) -> (Void# -> r) -> r
AclPermission_READ_ACP = AclPermission' "READ_ACP"

pattern AclPermission_WRITE :: AclPermission
pattern $bAclPermission_WRITE :: AclPermission
$mAclPermission_WRITE :: forall r. AclPermission -> (Void# -> r) -> (Void# -> r) -> r
AclPermission_WRITE = AclPermission' "WRITE"

pattern AclPermission_WRITE_ACP :: AclPermission
pattern $bAclPermission_WRITE_ACP :: AclPermission
$mAclPermission_WRITE_ACP :: forall r. AclPermission -> (Void# -> r) -> (Void# -> r) -> r
AclPermission_WRITE_ACP = AclPermission' "WRITE_ACP"

{-# COMPLETE
  AclPermission_FULL_CONTROL,
  AclPermission_READ,
  AclPermission_READ_ACP,
  AclPermission_WRITE,
  AclPermission_WRITE_ACP,
  AclPermission'
  #-}