{-# 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.Kendra.Types.Interval
-- 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.Kendra.Types.Interval
  ( Interval
      ( ..,
        Interval_ONE_MONTH_AGO,
        Interval_ONE_WEEK_AGO,
        Interval_THIS_MONTH,
        Interval_THIS_WEEK,
        Interval_TWO_MONTHS_AGO,
        Interval_TWO_WEEKS_AGO
      ),
  )
where

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

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

pattern Interval_ONE_MONTH_AGO :: Interval
pattern $bInterval_ONE_MONTH_AGO :: Interval
$mInterval_ONE_MONTH_AGO :: forall {r}. Interval -> ((# #) -> r) -> ((# #) -> r) -> r
Interval_ONE_MONTH_AGO = Interval' "ONE_MONTH_AGO"

pattern Interval_ONE_WEEK_AGO :: Interval
pattern $bInterval_ONE_WEEK_AGO :: Interval
$mInterval_ONE_WEEK_AGO :: forall {r}. Interval -> ((# #) -> r) -> ((# #) -> r) -> r
Interval_ONE_WEEK_AGO = Interval' "ONE_WEEK_AGO"

pattern Interval_THIS_MONTH :: Interval
pattern $bInterval_THIS_MONTH :: Interval
$mInterval_THIS_MONTH :: forall {r}. Interval -> ((# #) -> r) -> ((# #) -> r) -> r
Interval_THIS_MONTH = Interval' "THIS_MONTH"

pattern Interval_THIS_WEEK :: Interval
pattern $bInterval_THIS_WEEK :: Interval
$mInterval_THIS_WEEK :: forall {r}. Interval -> ((# #) -> r) -> ((# #) -> r) -> r
Interval_THIS_WEEK = Interval' "THIS_WEEK"

pattern Interval_TWO_MONTHS_AGO :: Interval
pattern $bInterval_TWO_MONTHS_AGO :: Interval
$mInterval_TWO_MONTHS_AGO :: forall {r}. Interval -> ((# #) -> r) -> ((# #) -> r) -> r
Interval_TWO_MONTHS_AGO = Interval' "TWO_MONTHS_AGO"

pattern Interval_TWO_WEEKS_AGO :: Interval
pattern $bInterval_TWO_WEEKS_AGO :: Interval
$mInterval_TWO_WEEKS_AGO :: forall {r}. Interval -> ((# #) -> r) -> ((# #) -> r) -> r
Interval_TWO_WEEKS_AGO = Interval' "TWO_WEEKS_AGO"

{-# COMPLETE
  Interval_ONE_MONTH_AGO,
  Interval_ONE_WEEK_AGO,
  Interval_THIS_MONTH,
  Interval_THIS_WEEK,
  Interval_TWO_MONTHS_AGO,
  Interval_TWO_WEEKS_AGO,
  Interval'
  #-}