{-# 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.RetentionAction
-- 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.RetentionAction
  ( RetentionAction
      ( ..,
        RetentionAction_DELETE,
        RetentionAction_NONE,
        RetentionAction_PERMANENTLY_DELETE
      ),
  )
where

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

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

pattern RetentionAction_DELETE :: RetentionAction
pattern $bRetentionAction_DELETE :: RetentionAction
$mRetentionAction_DELETE :: forall r. RetentionAction -> (Void# -> r) -> (Void# -> r) -> r
RetentionAction_DELETE = RetentionAction' "DELETE"

pattern RetentionAction_NONE :: RetentionAction
pattern $bRetentionAction_NONE :: RetentionAction
$mRetentionAction_NONE :: forall r. RetentionAction -> (Void# -> r) -> (Void# -> r) -> r
RetentionAction_NONE = RetentionAction' "NONE"

pattern RetentionAction_PERMANENTLY_DELETE :: RetentionAction
pattern $bRetentionAction_PERMANENTLY_DELETE :: RetentionAction
$mRetentionAction_PERMANENTLY_DELETE :: forall r. RetentionAction -> (Void# -> r) -> (Void# -> r) -> r
RetentionAction_PERMANENTLY_DELETE = RetentionAction' "PERMANENTLY_DELETE"

{-# COMPLETE
  RetentionAction_DELETE,
  RetentionAction_NONE,
  RetentionAction_PERMANENTLY_DELETE,
  RetentionAction'
  #-}