{-# 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.ObjectLockMode
-- 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.ObjectLockMode
  ( ObjectLockMode
      ( ..,
        ObjectLockMode_COMPLIANCE,
        ObjectLockMode_GOVERNANCE
      ),
  )
where

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

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

pattern ObjectLockMode_COMPLIANCE :: ObjectLockMode
pattern $bObjectLockMode_COMPLIANCE :: ObjectLockMode
$mObjectLockMode_COMPLIANCE :: forall r. ObjectLockMode -> (Void# -> r) -> (Void# -> r) -> r
ObjectLockMode_COMPLIANCE = ObjectLockMode' "COMPLIANCE"

pattern ObjectLockMode_GOVERNANCE :: ObjectLockMode
pattern $bObjectLockMode_GOVERNANCE :: ObjectLockMode
$mObjectLockMode_GOVERNANCE :: forall r. ObjectLockMode -> (Void# -> r) -> (Void# -> r) -> r
ObjectLockMode_GOVERNANCE = ObjectLockMode' "GOVERNANCE"

{-# COMPLETE
  ObjectLockMode_COMPLIANCE,
  ObjectLockMode_GOVERNANCE,
  ObjectLockMode'
  #-}