{-# 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.CodeDeploy.Types.LifecycleErrorCode
-- 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.CodeDeploy.Types.LifecycleErrorCode
  ( LifecycleErrorCode
      ( ..,
        LifecycleErrorCode_ScriptFailed,
        LifecycleErrorCode_ScriptMissing,
        LifecycleErrorCode_ScriptNotExecutable,
        LifecycleErrorCode_ScriptTimedOut,
        LifecycleErrorCode_Success,
        LifecycleErrorCode_UnknownError
      ),
  )
where

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

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

pattern LifecycleErrorCode_ScriptFailed :: LifecycleErrorCode
pattern $bLifecycleErrorCode_ScriptFailed :: LifecycleErrorCode
$mLifecycleErrorCode_ScriptFailed :: forall {r}. LifecycleErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
LifecycleErrorCode_ScriptFailed = LifecycleErrorCode' "ScriptFailed"

pattern LifecycleErrorCode_ScriptMissing :: LifecycleErrorCode
pattern $bLifecycleErrorCode_ScriptMissing :: LifecycleErrorCode
$mLifecycleErrorCode_ScriptMissing :: forall {r}. LifecycleErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
LifecycleErrorCode_ScriptMissing = LifecycleErrorCode' "ScriptMissing"

pattern LifecycleErrorCode_ScriptNotExecutable :: LifecycleErrorCode
pattern $bLifecycleErrorCode_ScriptNotExecutable :: LifecycleErrorCode
$mLifecycleErrorCode_ScriptNotExecutable :: forall {r}. LifecycleErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
LifecycleErrorCode_ScriptNotExecutable = LifecycleErrorCode' "ScriptNotExecutable"

pattern LifecycleErrorCode_ScriptTimedOut :: LifecycleErrorCode
pattern $bLifecycleErrorCode_ScriptTimedOut :: LifecycleErrorCode
$mLifecycleErrorCode_ScriptTimedOut :: forall {r}. LifecycleErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
LifecycleErrorCode_ScriptTimedOut = LifecycleErrorCode' "ScriptTimedOut"

pattern LifecycleErrorCode_Success :: LifecycleErrorCode
pattern $bLifecycleErrorCode_Success :: LifecycleErrorCode
$mLifecycleErrorCode_Success :: forall {r}. LifecycleErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
LifecycleErrorCode_Success = LifecycleErrorCode' "Success"

pattern LifecycleErrorCode_UnknownError :: LifecycleErrorCode
pattern $bLifecycleErrorCode_UnknownError :: LifecycleErrorCode
$mLifecycleErrorCode_UnknownError :: forall {r}. LifecycleErrorCode -> ((# #) -> r) -> ((# #) -> r) -> r
LifecycleErrorCode_UnknownError = LifecycleErrorCode' "UnknownError"

{-# COMPLETE
  LifecycleErrorCode_ScriptFailed,
  LifecycleErrorCode_ScriptMissing,
  LifecycleErrorCode_ScriptNotExecutable,
  LifecycleErrorCode_ScriptTimedOut,
  LifecycleErrorCode_Success,
  LifecycleErrorCode_UnknownError,
  LifecycleErrorCode'
  #-}