{-# 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.Forecast.Types.TimePointGranularity
-- 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.Forecast.Types.TimePointGranularity
  ( TimePointGranularity
      ( ..,
        TimePointGranularity_ALL,
        TimePointGranularity_SPECIFIC
      ),
  )
where

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

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

pattern TimePointGranularity_ALL :: TimePointGranularity
pattern $bTimePointGranularity_ALL :: TimePointGranularity
$mTimePointGranularity_ALL :: forall {r}.
TimePointGranularity -> ((# #) -> r) -> ((# #) -> r) -> r
TimePointGranularity_ALL = TimePointGranularity' "ALL"

pattern TimePointGranularity_SPECIFIC :: TimePointGranularity
pattern $bTimePointGranularity_SPECIFIC :: TimePointGranularity
$mTimePointGranularity_SPECIFIC :: forall {r}.
TimePointGranularity -> ((# #) -> r) -> ((# #) -> r) -> r
TimePointGranularity_SPECIFIC = TimePointGranularity' "SPECIFIC"

{-# COMPLETE
  TimePointGranularity_ALL,
  TimePointGranularity_SPECIFIC,
  TimePointGranularity'
  #-}