{-# 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.InventoryFrequency
-- 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.InventoryFrequency
  ( InventoryFrequency
      ( ..,
        InventoryFrequency_Daily,
        InventoryFrequency_Weekly
      ),
  )
where

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

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

pattern InventoryFrequency_Daily :: InventoryFrequency
pattern $bInventoryFrequency_Daily :: InventoryFrequency
$mInventoryFrequency_Daily :: forall r. InventoryFrequency -> (Void# -> r) -> (Void# -> r) -> r
InventoryFrequency_Daily = InventoryFrequency' "Daily"

pattern InventoryFrequency_Weekly :: InventoryFrequency
pattern $bInventoryFrequency_Weekly :: InventoryFrequency
$mInventoryFrequency_Weekly :: forall r. InventoryFrequency -> (Void# -> r) -> (Void# -> r) -> r
InventoryFrequency_Weekly = InventoryFrequency' "Weekly"

{-# COMPLETE
  InventoryFrequency_Daily,
  InventoryFrequency_Weekly,
  InventoryFrequency'
  #-}