{-# 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.Batch.Types.RetryAction
-- 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.Batch.Types.RetryAction
  ( RetryAction
      ( ..,
        RetryAction_EXIT,
        RetryAction_RETRY
      ),
  )
where

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

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

pattern RetryAction_EXIT :: RetryAction
pattern $bRetryAction_EXIT :: RetryAction
$mRetryAction_EXIT :: forall r. RetryAction -> (Void# -> r) -> (Void# -> r) -> r
RetryAction_EXIT = RetryAction' "EXIT"

pattern RetryAction_RETRY :: RetryAction
pattern $bRetryAction_RETRY :: RetryAction
$mRetryAction_RETRY :: forall r. RetryAction -> (Void# -> r) -> (Void# -> r) -> r
RetryAction_RETRY = RetryAction' "RETRY"

{-# COMPLETE
  RetryAction_EXIT,
  RetryAction_RETRY,
  RetryAction'
  #-}