{-# 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.EC2.Types.CancelBatchErrorCode
-- 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.EC2.Types.CancelBatchErrorCode
  ( CancelBatchErrorCode
      ( ..,
        CancelBatchErrorCode_FleetRequestIdDoesNotExist,
        CancelBatchErrorCode_FleetRequestIdMalformed,
        CancelBatchErrorCode_FleetRequestNotInCancellableState,
        CancelBatchErrorCode_UnexpectedError
      ),
  )
where

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

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

pattern CancelBatchErrorCode_FleetRequestIdDoesNotExist :: CancelBatchErrorCode
pattern $bCancelBatchErrorCode_FleetRequestIdDoesNotExist :: CancelBatchErrorCode
$mCancelBatchErrorCode_FleetRequestIdDoesNotExist :: forall {r}.
CancelBatchErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
CancelBatchErrorCode_FleetRequestIdDoesNotExist = CancelBatchErrorCode' "fleetRequestIdDoesNotExist"

pattern CancelBatchErrorCode_FleetRequestIdMalformed :: CancelBatchErrorCode
pattern $bCancelBatchErrorCode_FleetRequestIdMalformed :: CancelBatchErrorCode
$mCancelBatchErrorCode_FleetRequestIdMalformed :: forall {r}.
CancelBatchErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
CancelBatchErrorCode_FleetRequestIdMalformed = CancelBatchErrorCode' "fleetRequestIdMalformed"

pattern CancelBatchErrorCode_FleetRequestNotInCancellableState :: CancelBatchErrorCode
pattern $bCancelBatchErrorCode_FleetRequestNotInCancellableState :: CancelBatchErrorCode
$mCancelBatchErrorCode_FleetRequestNotInCancellableState :: forall {r}.
CancelBatchErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
CancelBatchErrorCode_FleetRequestNotInCancellableState = CancelBatchErrorCode' "fleetRequestNotInCancellableState"

pattern CancelBatchErrorCode_UnexpectedError :: CancelBatchErrorCode
pattern $bCancelBatchErrorCode_UnexpectedError :: CancelBatchErrorCode
$mCancelBatchErrorCode_UnexpectedError :: forall {r}.
CancelBatchErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
CancelBatchErrorCode_UnexpectedError = CancelBatchErrorCode' "unexpectedError"

{-# COMPLETE
  CancelBatchErrorCode_FleetRequestIdDoesNotExist,
  CancelBatchErrorCode_FleetRequestIdMalformed,
  CancelBatchErrorCode_FleetRequestNotInCancellableState,
  CancelBatchErrorCode_UnexpectedError,
  CancelBatchErrorCode'
  #-}