{-# 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.Firehose.Types.ElasticsearchIndexRotationPeriod
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Firehose.Types.ElasticsearchIndexRotationPeriod
  ( ElasticsearchIndexRotationPeriod
      ( ..,
        ElasticsearchIndexRotationPeriod_NoRotation,
        ElasticsearchIndexRotationPeriod_OneDay,
        ElasticsearchIndexRotationPeriod_OneHour,
        ElasticsearchIndexRotationPeriod_OneMonth,
        ElasticsearchIndexRotationPeriod_OneWeek
      ),
  )
where

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

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

pattern ElasticsearchIndexRotationPeriod_NoRotation :: ElasticsearchIndexRotationPeriod
pattern $bElasticsearchIndexRotationPeriod_NoRotation :: ElasticsearchIndexRotationPeriod
$mElasticsearchIndexRotationPeriod_NoRotation :: forall {r}.
ElasticsearchIndexRotationPeriod
-> ((# #) -> r) -> ((# #) -> r) -> r
ElasticsearchIndexRotationPeriod_NoRotation = ElasticsearchIndexRotationPeriod' "NoRotation"

pattern ElasticsearchIndexRotationPeriod_OneDay :: ElasticsearchIndexRotationPeriod
pattern $bElasticsearchIndexRotationPeriod_OneDay :: ElasticsearchIndexRotationPeriod
$mElasticsearchIndexRotationPeriod_OneDay :: forall {r}.
ElasticsearchIndexRotationPeriod
-> ((# #) -> r) -> ((# #) -> r) -> r
ElasticsearchIndexRotationPeriod_OneDay = ElasticsearchIndexRotationPeriod' "OneDay"

pattern ElasticsearchIndexRotationPeriod_OneHour :: ElasticsearchIndexRotationPeriod
pattern $bElasticsearchIndexRotationPeriod_OneHour :: ElasticsearchIndexRotationPeriod
$mElasticsearchIndexRotationPeriod_OneHour :: forall {r}.
ElasticsearchIndexRotationPeriod
-> ((# #) -> r) -> ((# #) -> r) -> r
ElasticsearchIndexRotationPeriod_OneHour = ElasticsearchIndexRotationPeriod' "OneHour"

pattern ElasticsearchIndexRotationPeriod_OneMonth :: ElasticsearchIndexRotationPeriod
pattern $bElasticsearchIndexRotationPeriod_OneMonth :: ElasticsearchIndexRotationPeriod
$mElasticsearchIndexRotationPeriod_OneMonth :: forall {r}.
ElasticsearchIndexRotationPeriod
-> ((# #) -> r) -> ((# #) -> r) -> r
ElasticsearchIndexRotationPeriod_OneMonth = ElasticsearchIndexRotationPeriod' "OneMonth"

pattern ElasticsearchIndexRotationPeriod_OneWeek :: ElasticsearchIndexRotationPeriod
pattern $bElasticsearchIndexRotationPeriod_OneWeek :: ElasticsearchIndexRotationPeriod
$mElasticsearchIndexRotationPeriod_OneWeek :: forall {r}.
ElasticsearchIndexRotationPeriod
-> ((# #) -> r) -> ((# #) -> r) -> r
ElasticsearchIndexRotationPeriod_OneWeek = ElasticsearchIndexRotationPeriod' "OneWeek"

{-# COMPLETE
  ElasticsearchIndexRotationPeriod_NoRotation,
  ElasticsearchIndexRotationPeriod_OneDay,
  ElasticsearchIndexRotationPeriod_OneHour,
  ElasticsearchIndexRotationPeriod_OneMonth,
  ElasticsearchIndexRotationPeriod_OneWeek,
  ElasticsearchIndexRotationPeriod'
  #-}