{-# 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.WorkMail.Types.AccessControlRuleEffect
-- 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.WorkMail.Types.AccessControlRuleEffect
  ( AccessControlRuleEffect
      ( ..,
        AccessControlRuleEffect_ALLOW,
        AccessControlRuleEffect_DENY
      ),
  )
where

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

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

pattern AccessControlRuleEffect_ALLOW :: AccessControlRuleEffect
pattern $bAccessControlRuleEffect_ALLOW :: AccessControlRuleEffect
$mAccessControlRuleEffect_ALLOW :: forall r.
AccessControlRuleEffect -> (Void# -> r) -> (Void# -> r) -> r
AccessControlRuleEffect_ALLOW = AccessControlRuleEffect' "ALLOW"

pattern AccessControlRuleEffect_DENY :: AccessControlRuleEffect
pattern $bAccessControlRuleEffect_DENY :: AccessControlRuleEffect
$mAccessControlRuleEffect_DENY :: forall r.
AccessControlRuleEffect -> (Void# -> r) -> (Void# -> r) -> r
AccessControlRuleEffect_DENY = AccessControlRuleEffect' "DENY"

{-# COMPLETE
  AccessControlRuleEffect_ALLOW,
  AccessControlRuleEffect_DENY,
  AccessControlRuleEffect'
  #-}