{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.Data as Data
import qualified Amazonka.Prelude as Prelude

newtype RetentionAction = RetentionAction'
  { RetentionAction -> Text
fromRetentionAction ::
      Data.Text
  }
  deriving stock
    ( Int -> RetentionAction -> ShowS
[RetentionAction] -> ShowS
RetentionAction -> String
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]
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
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
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
Prelude.Ord,
      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
    ( Eq RetentionAction
Int -> RetentionAction -> Int
RetentionAction -> Int
forall a. Eq 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 -> ()
forall a. (a -> ()) -> NFData a
rnf :: RetentionAction -> ()
$crnf :: RetentionAction -> ()
Prelude.NFData,
      Text -> Either String RetentionAction
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String RetentionAction
$cfromText :: Text -> Either String RetentionAction
Data.FromText,
      RetentionAction -> Text
forall a. (a -> Text) -> ToText a
toText :: RetentionAction -> Text
$ctoText :: RetentionAction -> Text
Data.ToText,
      RetentionAction -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: RetentionAction -> ByteString
$ctoBS :: RetentionAction -> ByteString
Data.ToByteString,
      RetentionAction -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: RetentionAction -> ByteStringBuilder
$cbuild :: RetentionAction -> ByteStringBuilder
Data.ToLog,
      HeaderName -> RetentionAction -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> RetentionAction -> [Header]
$ctoHeader :: HeaderName -> RetentionAction -> [Header]
Data.ToHeader,
      RetentionAction -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: RetentionAction -> QueryString
$ctoQuery :: RetentionAction -> QueryString
Data.ToQuery,
      Value -> Parser [RetentionAction]
Value -> Parser 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
Data.FromJSON,
      FromJSONKeyFunction [RetentionAction]
FromJSONKeyFunction RetentionAction
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [RetentionAction]
$cfromJSONKeyList :: FromJSONKeyFunction [RetentionAction]
fromJSONKey :: FromJSONKeyFunction RetentionAction
$cfromJSONKey :: FromJSONKeyFunction RetentionAction
Data.FromJSONKey,
      [RetentionAction] -> Encoding
[RetentionAction] -> Value
RetentionAction -> Encoding
RetentionAction -> Value
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
Data.ToJSON,
      ToJSONKeyFunction [RetentionAction]
ToJSONKeyFunction RetentionAction
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [RetentionAction]
$ctoJSONKeyList :: ToJSONKeyFunction [RetentionAction]
toJSONKey :: ToJSONKeyFunction RetentionAction
$ctoJSONKey :: ToJSONKeyFunction RetentionAction
Data.ToJSONKey,
      [Node] -> Either String RetentionAction
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String RetentionAction
$cparseXML :: [Node] -> Either String RetentionAction
Data.FromXML,
      RetentionAction -> XML
forall a. (a -> XML) -> ToXML a
toXML :: RetentionAction -> XML
$ctoXML :: RetentionAction -> XML
Data.ToXML
    )

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

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

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

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