{-# 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.DLM.Types.RetentionIntervalUnitValues
-- 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.DLM.Types.RetentionIntervalUnitValues
  ( RetentionIntervalUnitValues
      ( ..,
        RetentionIntervalUnitValues_DAYS,
        RetentionIntervalUnitValues_MONTHS,
        RetentionIntervalUnitValues_WEEKS,
        RetentionIntervalUnitValues_YEARS
      ),
  )
where

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

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

pattern RetentionIntervalUnitValues_DAYS :: RetentionIntervalUnitValues
pattern $bRetentionIntervalUnitValues_DAYS :: RetentionIntervalUnitValues
$mRetentionIntervalUnitValues_DAYS :: forall r.
RetentionIntervalUnitValues -> (Void# -> r) -> (Void# -> r) -> r
RetentionIntervalUnitValues_DAYS = RetentionIntervalUnitValues' "DAYS"

pattern RetentionIntervalUnitValues_MONTHS :: RetentionIntervalUnitValues
pattern $bRetentionIntervalUnitValues_MONTHS :: RetentionIntervalUnitValues
$mRetentionIntervalUnitValues_MONTHS :: forall r.
RetentionIntervalUnitValues -> (Void# -> r) -> (Void# -> r) -> r
RetentionIntervalUnitValues_MONTHS = RetentionIntervalUnitValues' "MONTHS"

pattern RetentionIntervalUnitValues_WEEKS :: RetentionIntervalUnitValues
pattern $bRetentionIntervalUnitValues_WEEKS :: RetentionIntervalUnitValues
$mRetentionIntervalUnitValues_WEEKS :: forall r.
RetentionIntervalUnitValues -> (Void# -> r) -> (Void# -> r) -> r
RetentionIntervalUnitValues_WEEKS = RetentionIntervalUnitValues' "WEEKS"

pattern RetentionIntervalUnitValues_YEARS :: RetentionIntervalUnitValues
pattern $bRetentionIntervalUnitValues_YEARS :: RetentionIntervalUnitValues
$mRetentionIntervalUnitValues_YEARS :: forall r.
RetentionIntervalUnitValues -> (Void# -> r) -> (Void# -> r) -> r
RetentionIntervalUnitValues_YEARS = RetentionIntervalUnitValues' "YEARS"

{-# COMPLETE
  RetentionIntervalUnitValues_DAYS,
  RetentionIntervalUnitValues_MONTHS,
  RetentionIntervalUnitValues_WEEKS,
  RetentionIntervalUnitValues_YEARS,
  RetentionIntervalUnitValues'
  #-}