{-# 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.Lambda.Types.State
-- 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.Lambda.Types.State
  ( State
      ( ..,
        State_Active,
        State_Failed,
        State_Inactive,
        State_Pending
      ),
  )
where

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

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

pattern State_Active :: State
pattern $bState_Active :: State
$mState_Active :: forall r. State -> (Void# -> r) -> (Void# -> r) -> r
State_Active = State' "Active"

pattern State_Failed :: State
pattern $bState_Failed :: State
$mState_Failed :: forall r. State -> (Void# -> r) -> (Void# -> r) -> r
State_Failed = State' "Failed"

pattern State_Inactive :: State
pattern $bState_Inactive :: State
$mState_Inactive :: forall r. State -> (Void# -> r) -> (Void# -> r) -> r
State_Inactive = State' "Inactive"

pattern State_Pending :: State
pattern $bState_Pending :: State
$mState_Pending :: forall r. State -> (Void# -> r) -> (Void# -> r) -> r
State_Pending = State' "Pending"

{-# COMPLETE
  State_Active,
  State_Failed,
  State_Inactive,
  State_Pending,
  State'
  #-}