{-# 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.GreengrassV2.Types.InstalledComponentLifecycleState
-- 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.GreengrassV2.Types.InstalledComponentLifecycleState
  ( InstalledComponentLifecycleState
      ( ..,
        InstalledComponentLifecycleState_BROKEN,
        InstalledComponentLifecycleState_ERRORED,
        InstalledComponentLifecycleState_FINISHED,
        InstalledComponentLifecycleState_INSTALLED,
        InstalledComponentLifecycleState_NEW,
        InstalledComponentLifecycleState_RUNNING,
        InstalledComponentLifecycleState_STARTING,
        InstalledComponentLifecycleState_STOPPING
      ),
  )
where

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

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

pattern InstalledComponentLifecycleState_BROKEN :: InstalledComponentLifecycleState
pattern $bInstalledComponentLifecycleState_BROKEN :: InstalledComponentLifecycleState
$mInstalledComponentLifecycleState_BROKEN :: forall {r}.
InstalledComponentLifecycleState
-> ((# #) -> r) -> ((# #) -> r) -> r
InstalledComponentLifecycleState_BROKEN = InstalledComponentLifecycleState' "BROKEN"

pattern InstalledComponentLifecycleState_ERRORED :: InstalledComponentLifecycleState
pattern $bInstalledComponentLifecycleState_ERRORED :: InstalledComponentLifecycleState
$mInstalledComponentLifecycleState_ERRORED :: forall {r}.
InstalledComponentLifecycleState
-> ((# #) -> r) -> ((# #) -> r) -> r
InstalledComponentLifecycleState_ERRORED = InstalledComponentLifecycleState' "ERRORED"

pattern InstalledComponentLifecycleState_FINISHED :: InstalledComponentLifecycleState
pattern $bInstalledComponentLifecycleState_FINISHED :: InstalledComponentLifecycleState
$mInstalledComponentLifecycleState_FINISHED :: forall {r}.
InstalledComponentLifecycleState
-> ((# #) -> r) -> ((# #) -> r) -> r
InstalledComponentLifecycleState_FINISHED = InstalledComponentLifecycleState' "FINISHED"

pattern InstalledComponentLifecycleState_INSTALLED :: InstalledComponentLifecycleState
pattern $bInstalledComponentLifecycleState_INSTALLED :: InstalledComponentLifecycleState
$mInstalledComponentLifecycleState_INSTALLED :: forall {r}.
InstalledComponentLifecycleState
-> ((# #) -> r) -> ((# #) -> r) -> r
InstalledComponentLifecycleState_INSTALLED = InstalledComponentLifecycleState' "INSTALLED"

pattern InstalledComponentLifecycleState_NEW :: InstalledComponentLifecycleState
pattern $bInstalledComponentLifecycleState_NEW :: InstalledComponentLifecycleState
$mInstalledComponentLifecycleState_NEW :: forall {r}.
InstalledComponentLifecycleState
-> ((# #) -> r) -> ((# #) -> r) -> r
InstalledComponentLifecycleState_NEW = InstalledComponentLifecycleState' "NEW"

pattern InstalledComponentLifecycleState_RUNNING :: InstalledComponentLifecycleState
pattern $bInstalledComponentLifecycleState_RUNNING :: InstalledComponentLifecycleState
$mInstalledComponentLifecycleState_RUNNING :: forall {r}.
InstalledComponentLifecycleState
-> ((# #) -> r) -> ((# #) -> r) -> r
InstalledComponentLifecycleState_RUNNING = InstalledComponentLifecycleState' "RUNNING"

pattern InstalledComponentLifecycleState_STARTING :: InstalledComponentLifecycleState
pattern $bInstalledComponentLifecycleState_STARTING :: InstalledComponentLifecycleState
$mInstalledComponentLifecycleState_STARTING :: forall {r}.
InstalledComponentLifecycleState
-> ((# #) -> r) -> ((# #) -> r) -> r
InstalledComponentLifecycleState_STARTING = InstalledComponentLifecycleState' "STARTING"

pattern InstalledComponentLifecycleState_STOPPING :: InstalledComponentLifecycleState
pattern $bInstalledComponentLifecycleState_STOPPING :: InstalledComponentLifecycleState
$mInstalledComponentLifecycleState_STOPPING :: forall {r}.
InstalledComponentLifecycleState
-> ((# #) -> r) -> ((# #) -> r) -> r
InstalledComponentLifecycleState_STOPPING = InstalledComponentLifecycleState' "STOPPING"

{-# COMPLETE
  InstalledComponentLifecycleState_BROKEN,
  InstalledComponentLifecycleState_ERRORED,
  InstalledComponentLifecycleState_FINISHED,
  InstalledComponentLifecycleState_INSTALLED,
  InstalledComponentLifecycleState_NEW,
  InstalledComponentLifecycleState_RUNNING,
  InstalledComponentLifecycleState_STARTING,
  InstalledComponentLifecycleState_STOPPING,
  InstalledComponentLifecycleState'
  #-}