{-# 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.CloudHSMV2.Types.BackupRetentionType
-- 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.CloudHSMV2.Types.BackupRetentionType
  ( BackupRetentionType
      ( ..,
        BackupRetentionType_DAYS
      ),
  )
where

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

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

pattern BackupRetentionType_DAYS :: BackupRetentionType
pattern $bBackupRetentionType_DAYS :: BackupRetentionType
$mBackupRetentionType_DAYS :: forall r. BackupRetentionType -> (Void# -> r) -> (Void# -> r) -> r
BackupRetentionType_DAYS = BackupRetentionType' "DAYS"

{-# COMPLETE
  BackupRetentionType_DAYS,
  BackupRetentionType'
  #-}