{-# 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.BatchState
-- 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.BatchState
  ( BatchState
      ( ..,
        BatchState_Active,
        BatchState_Cancelled,
        BatchState_Cancelled_running,
        BatchState_Cancelled_terminating,
        BatchState_Failed,
        BatchState_Modifying,
        BatchState_Submitted
      ),
  )
where

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

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

pattern BatchState_Active :: BatchState
pattern $bBatchState_Active :: BatchState
$mBatchState_Active :: forall {r}. BatchState -> ((# #) -> r) -> ((# #) -> r) -> r
BatchState_Active = BatchState' "active"

pattern BatchState_Cancelled :: BatchState
pattern $bBatchState_Cancelled :: BatchState
$mBatchState_Cancelled :: forall {r}. BatchState -> ((# #) -> r) -> ((# #) -> r) -> r
BatchState_Cancelled = BatchState' "cancelled"

pattern BatchState_Cancelled_running :: BatchState
pattern $bBatchState_Cancelled_running :: BatchState
$mBatchState_Cancelled_running :: forall {r}. BatchState -> ((# #) -> r) -> ((# #) -> r) -> r
BatchState_Cancelled_running = BatchState' "cancelled_running"

pattern BatchState_Cancelled_terminating :: BatchState
pattern $bBatchState_Cancelled_terminating :: BatchState
$mBatchState_Cancelled_terminating :: forall {r}. BatchState -> ((# #) -> r) -> ((# #) -> r) -> r
BatchState_Cancelled_terminating = BatchState' "cancelled_terminating"

pattern BatchState_Failed :: BatchState
pattern $bBatchState_Failed :: BatchState
$mBatchState_Failed :: forall {r}. BatchState -> ((# #) -> r) -> ((# #) -> r) -> r
BatchState_Failed = BatchState' "failed"

pattern BatchState_Modifying :: BatchState
pattern $bBatchState_Modifying :: BatchState
$mBatchState_Modifying :: forall {r}. BatchState -> ((# #) -> r) -> ((# #) -> r) -> r
BatchState_Modifying = BatchState' "modifying"

pattern BatchState_Submitted :: BatchState
pattern $bBatchState_Submitted :: BatchState
$mBatchState_Submitted :: forall {r}. BatchState -> ((# #) -> r) -> ((# #) -> r) -> r
BatchState_Submitted = BatchState' "submitted"

{-# COMPLETE
  BatchState_Active,
  BatchState_Cancelled,
  BatchState_Cancelled_running,
  BatchState_Cancelled_terminating,
  BatchState_Failed,
  BatchState_Modifying,
  BatchState_Submitted,
  BatchState'
  #-}