{-# 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.Condition
-- 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.Condition
  ( Condition
      ( ..,
        Condition_EQUALS,
        Condition_GREATER_THAN,
        Condition_LESS_THAN,
        Condition_NOT_EQUALS
      ),
  )
where

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

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

pattern Condition_EQUALS :: Condition
pattern $bCondition_EQUALS :: Condition
$mCondition_EQUALS :: forall {r}. Condition -> ((# #) -> r) -> ((# #) -> r) -> r
Condition_EQUALS = Condition' "EQUALS"

pattern Condition_GREATER_THAN :: Condition
pattern $bCondition_GREATER_THAN :: Condition
$mCondition_GREATER_THAN :: forall {r}. Condition -> ((# #) -> r) -> ((# #) -> r) -> r
Condition_GREATER_THAN = Condition' "GREATER_THAN"

pattern Condition_LESS_THAN :: Condition
pattern $bCondition_LESS_THAN :: Condition
$mCondition_LESS_THAN :: forall {r}. Condition -> ((# #) -> r) -> ((# #) -> r) -> r
Condition_LESS_THAN = Condition' "LESS_THAN"

pattern Condition_NOT_EQUALS :: Condition
pattern $bCondition_NOT_EQUALS :: Condition
$mCondition_NOT_EQUALS :: forall {r}. Condition -> ((# #) -> r) -> ((# #) -> r) -> r
Condition_NOT_EQUALS = Condition' "NOT_EQUALS"

{-# COMPLETE
  Condition_EQUALS,
  Condition_GREATER_THAN,
  Condition_LESS_THAN,
  Condition_NOT_EQUALS,
  Condition'
  #-}