{-# 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.S3.Types.ObjectLockRetentionMode
-- 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.S3.Types.ObjectLockRetentionMode
  ( ObjectLockRetentionMode
      ( ..,
        ObjectLockRetentionMode_COMPLIANCE,
        ObjectLockRetentionMode_GOVERNANCE
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal

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

pattern ObjectLockRetentionMode_COMPLIANCE :: ObjectLockRetentionMode
pattern $bObjectLockRetentionMode_COMPLIANCE :: ObjectLockRetentionMode
$mObjectLockRetentionMode_COMPLIANCE :: forall r.
ObjectLockRetentionMode -> (Void# -> r) -> (Void# -> r) -> r
ObjectLockRetentionMode_COMPLIANCE = ObjectLockRetentionMode' "COMPLIANCE"

pattern ObjectLockRetentionMode_GOVERNANCE :: ObjectLockRetentionMode
pattern $bObjectLockRetentionMode_GOVERNANCE :: ObjectLockRetentionMode
$mObjectLockRetentionMode_GOVERNANCE :: forall r.
ObjectLockRetentionMode -> (Void# -> r) -> (Void# -> r) -> r
ObjectLockRetentionMode_GOVERNANCE = ObjectLockRetentionMode' "GOVERNANCE"

{-# COMPLETE
  ObjectLockRetentionMode_COMPLIANCE,
  ObjectLockRetentionMode_GOVERNANCE,
  ObjectLockRetentionMode'
  #-}