{-# 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.CloudWatchLogs.Types.QueryStatus
-- 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.CloudWatchLogs.Types.QueryStatus
  ( QueryStatus
      ( ..,
        QueryStatus_Cancelled,
        QueryStatus_Complete,
        QueryStatus_Failed,
        QueryStatus_Running,
        QueryStatus_Scheduled,
        QueryStatus_Timeout,
        QueryStatus_Unknown
      ),
  )
where

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

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

pattern QueryStatus_Cancelled :: QueryStatus
pattern $bQueryStatus_Cancelled :: QueryStatus
$mQueryStatus_Cancelled :: forall r. QueryStatus -> (Void# -> r) -> (Void# -> r) -> r
QueryStatus_Cancelled = QueryStatus' "Cancelled"

pattern QueryStatus_Complete :: QueryStatus
pattern $bQueryStatus_Complete :: QueryStatus
$mQueryStatus_Complete :: forall r. QueryStatus -> (Void# -> r) -> (Void# -> r) -> r
QueryStatus_Complete = QueryStatus' "Complete"

pattern QueryStatus_Failed :: QueryStatus
pattern $bQueryStatus_Failed :: QueryStatus
$mQueryStatus_Failed :: forall r. QueryStatus -> (Void# -> r) -> (Void# -> r) -> r
QueryStatus_Failed = QueryStatus' "Failed"

pattern QueryStatus_Running :: QueryStatus
pattern $bQueryStatus_Running :: QueryStatus
$mQueryStatus_Running :: forall r. QueryStatus -> (Void# -> r) -> (Void# -> r) -> r
QueryStatus_Running = QueryStatus' "Running"

pattern QueryStatus_Scheduled :: QueryStatus
pattern $bQueryStatus_Scheduled :: QueryStatus
$mQueryStatus_Scheduled :: forall r. QueryStatus -> (Void# -> r) -> (Void# -> r) -> r
QueryStatus_Scheduled = QueryStatus' "Scheduled"

pattern QueryStatus_Timeout :: QueryStatus
pattern $bQueryStatus_Timeout :: QueryStatus
$mQueryStatus_Timeout :: forall r. QueryStatus -> (Void# -> r) -> (Void# -> r) -> r
QueryStatus_Timeout = QueryStatus' "Timeout"

pattern QueryStatus_Unknown :: QueryStatus
pattern $bQueryStatus_Unknown :: QueryStatus
$mQueryStatus_Unknown :: forall r. QueryStatus -> (Void# -> r) -> (Void# -> r) -> r
QueryStatus_Unknown = QueryStatus' "Unknown"

{-# COMPLETE
  QueryStatus_Cancelled,
  QueryStatus_Complete,
  QueryStatus_Failed,
  QueryStatus_Running,
  QueryStatus_Scheduled,
  QueryStatus_Timeout,
  QueryStatus_Unknown,
  QueryStatus'
  #-}