{-# 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.SageMakerMetrics.Types.PutMetricsErrorCode
-- 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.SageMakerMetrics.Types.PutMetricsErrorCode
  ( PutMetricsErrorCode
      ( ..,
        PutMetricsErrorCode_CONFLICT_ERROR,
        PutMetricsErrorCode_INTERNAL_ERROR,
        PutMetricsErrorCode_METRIC_LIMIT_EXCEEDED,
        PutMetricsErrorCode_VALIDATION_ERROR
      ),
  )
where

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

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

pattern PutMetricsErrorCode_CONFLICT_ERROR :: PutMetricsErrorCode
pattern $bPutMetricsErrorCode_CONFLICT_ERROR :: PutMetricsErrorCode
$mPutMetricsErrorCode_CONFLICT_ERROR :: forall {r}.
PutMetricsErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
PutMetricsErrorCode_CONFLICT_ERROR = PutMetricsErrorCode' "CONFLICT_ERROR"

pattern PutMetricsErrorCode_INTERNAL_ERROR :: PutMetricsErrorCode
pattern $bPutMetricsErrorCode_INTERNAL_ERROR :: PutMetricsErrorCode
$mPutMetricsErrorCode_INTERNAL_ERROR :: forall {r}.
PutMetricsErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
PutMetricsErrorCode_INTERNAL_ERROR = PutMetricsErrorCode' "INTERNAL_ERROR"

pattern PutMetricsErrorCode_METRIC_LIMIT_EXCEEDED :: PutMetricsErrorCode
pattern $bPutMetricsErrorCode_METRIC_LIMIT_EXCEEDED :: PutMetricsErrorCode
$mPutMetricsErrorCode_METRIC_LIMIT_EXCEEDED :: forall {r}.
PutMetricsErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
PutMetricsErrorCode_METRIC_LIMIT_EXCEEDED = PutMetricsErrorCode' "METRIC_LIMIT_EXCEEDED"

pattern PutMetricsErrorCode_VALIDATION_ERROR :: PutMetricsErrorCode
pattern $bPutMetricsErrorCode_VALIDATION_ERROR :: PutMetricsErrorCode
$mPutMetricsErrorCode_VALIDATION_ERROR :: forall {r}.
PutMetricsErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
PutMetricsErrorCode_VALIDATION_ERROR = PutMetricsErrorCode' "VALIDATION_ERROR"

{-# COMPLETE
  PutMetricsErrorCode_CONFLICT_ERROR,
  PutMetricsErrorCode_INTERNAL_ERROR,
  PutMetricsErrorCode_METRIC_LIMIT_EXCEEDED,
  PutMetricsErrorCode_VALIDATION_ERROR,
  PutMetricsErrorCode'
  #-}