{-# 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.CloudWatch.Types.StatusCode
-- 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.CloudWatch.Types.StatusCode
  ( StatusCode
      ( ..,
        StatusCode_Complete,
        StatusCode_InternalError,
        StatusCode_PartialData
      ),
  )
where

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

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

pattern StatusCode_Complete :: StatusCode
pattern $bStatusCode_Complete :: StatusCode
$mStatusCode_Complete :: forall r. StatusCode -> (Void# -> r) -> (Void# -> r) -> r
StatusCode_Complete = StatusCode' "Complete"

pattern StatusCode_InternalError :: StatusCode
pattern $bStatusCode_InternalError :: StatusCode
$mStatusCode_InternalError :: forall r. StatusCode -> (Void# -> r) -> (Void# -> r) -> r
StatusCode_InternalError = StatusCode' "InternalError"

pattern StatusCode_PartialData :: StatusCode
pattern $bStatusCode_PartialData :: StatusCode
$mStatusCode_PartialData :: forall r. StatusCode -> (Void# -> r) -> (Void# -> r) -> r
StatusCode_PartialData = StatusCode' "PartialData"

{-# COMPLETE
  StatusCode_Complete,
  StatusCode_InternalError,
  StatusCode_PartialData,
  StatusCode'
  #-}