{-# 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.StorageGateway.Types.RetentionLockType
-- 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.StorageGateway.Types.RetentionLockType
  ( RetentionLockType
      ( ..,
        RetentionLockType_COMPLIANCE,
        RetentionLockType_GOVERNANCE,
        RetentionLockType_NONE
      ),
  )
where

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

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

pattern RetentionLockType_COMPLIANCE :: RetentionLockType
pattern $bRetentionLockType_COMPLIANCE :: RetentionLockType
$mRetentionLockType_COMPLIANCE :: forall r. RetentionLockType -> (Void# -> r) -> (Void# -> r) -> r
RetentionLockType_COMPLIANCE = RetentionLockType' "COMPLIANCE"

pattern RetentionLockType_GOVERNANCE :: RetentionLockType
pattern $bRetentionLockType_GOVERNANCE :: RetentionLockType
$mRetentionLockType_GOVERNANCE :: forall r. RetentionLockType -> (Void# -> r) -> (Void# -> r) -> r
RetentionLockType_GOVERNANCE = RetentionLockType' "GOVERNANCE"

pattern RetentionLockType_NONE :: RetentionLockType
pattern $bRetentionLockType_NONE :: RetentionLockType
$mRetentionLockType_NONE :: forall r. RetentionLockType -> (Void# -> r) -> (Void# -> r) -> r
RetentionLockType_NONE = RetentionLockType' "NONE"

{-# COMPLETE
  RetentionLockType_COMPLIANCE,
  RetentionLockType_GOVERNANCE,
  RetentionLockType_NONE,
  RetentionLockType'
  #-}