{-# 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.Inspector.Types.FailedItemErrorCode
-- 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.Inspector.Types.FailedItemErrorCode
  ( FailedItemErrorCode
      ( ..,
        FailedItemErrorCode_ACCESS_DENIED,
        FailedItemErrorCode_DUPLICATE_ARN,
        FailedItemErrorCode_INTERNAL_ERROR,
        FailedItemErrorCode_INVALID_ARN,
        FailedItemErrorCode_ITEM_DOES_NOT_EXIST,
        FailedItemErrorCode_LIMIT_EXCEEDED
      ),
  )
where

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

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

pattern FailedItemErrorCode_ACCESS_DENIED :: FailedItemErrorCode
pattern $bFailedItemErrorCode_ACCESS_DENIED :: FailedItemErrorCode
$mFailedItemErrorCode_ACCESS_DENIED :: forall r. FailedItemErrorCode -> (Void# -> r) -> (Void# -> r) -> r
FailedItemErrorCode_ACCESS_DENIED = FailedItemErrorCode' "ACCESS_DENIED"

pattern FailedItemErrorCode_DUPLICATE_ARN :: FailedItemErrorCode
pattern $bFailedItemErrorCode_DUPLICATE_ARN :: FailedItemErrorCode
$mFailedItemErrorCode_DUPLICATE_ARN :: forall r. FailedItemErrorCode -> (Void# -> r) -> (Void# -> r) -> r
FailedItemErrorCode_DUPLICATE_ARN = FailedItemErrorCode' "DUPLICATE_ARN"

pattern FailedItemErrorCode_INTERNAL_ERROR :: FailedItemErrorCode
pattern $bFailedItemErrorCode_INTERNAL_ERROR :: FailedItemErrorCode
$mFailedItemErrorCode_INTERNAL_ERROR :: forall r. FailedItemErrorCode -> (Void# -> r) -> (Void# -> r) -> r
FailedItemErrorCode_INTERNAL_ERROR = FailedItemErrorCode' "INTERNAL_ERROR"

pattern FailedItemErrorCode_INVALID_ARN :: FailedItemErrorCode
pattern $bFailedItemErrorCode_INVALID_ARN :: FailedItemErrorCode
$mFailedItemErrorCode_INVALID_ARN :: forall r. FailedItemErrorCode -> (Void# -> r) -> (Void# -> r) -> r
FailedItemErrorCode_INVALID_ARN = FailedItemErrorCode' "INVALID_ARN"

pattern FailedItemErrorCode_ITEM_DOES_NOT_EXIST :: FailedItemErrorCode
pattern $bFailedItemErrorCode_ITEM_DOES_NOT_EXIST :: FailedItemErrorCode
$mFailedItemErrorCode_ITEM_DOES_NOT_EXIST :: forall r. FailedItemErrorCode -> (Void# -> r) -> (Void# -> r) -> r
FailedItemErrorCode_ITEM_DOES_NOT_EXIST = FailedItemErrorCode' "ITEM_DOES_NOT_EXIST"

pattern FailedItemErrorCode_LIMIT_EXCEEDED :: FailedItemErrorCode
pattern $bFailedItemErrorCode_LIMIT_EXCEEDED :: FailedItemErrorCode
$mFailedItemErrorCode_LIMIT_EXCEEDED :: forall r. FailedItemErrorCode -> (Void# -> r) -> (Void# -> r) -> r
FailedItemErrorCode_LIMIT_EXCEEDED = FailedItemErrorCode' "LIMIT_EXCEEDED"

{-# COMPLETE
  FailedItemErrorCode_ACCESS_DENIED,
  FailedItemErrorCode_DUPLICATE_ARN,
  FailedItemErrorCode_INTERNAL_ERROR,
  FailedItemErrorCode_INVALID_ARN,
  FailedItemErrorCode_ITEM_DOES_NOT_EXIST,
  FailedItemErrorCode_LIMIT_EXCEEDED,
  FailedItemErrorCode'
  #-}