{-# 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.Greengrass.Types.UpdateAgentLogLevel
-- 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.Greengrass.Types.UpdateAgentLogLevel
  ( UpdateAgentLogLevel
      ( ..,
        UpdateAgentLogLevel_DEBUG,
        UpdateAgentLogLevel_ERROR,
        UpdateAgentLogLevel_FATAL,
        UpdateAgentLogLevel_INFO,
        UpdateAgentLogLevel_NONE,
        UpdateAgentLogLevel_TRACE,
        UpdateAgentLogLevel_VERBOSE,
        UpdateAgentLogLevel_WARN
      ),
  )
where

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

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

pattern UpdateAgentLogLevel_DEBUG :: UpdateAgentLogLevel
pattern $bUpdateAgentLogLevel_DEBUG :: UpdateAgentLogLevel
$mUpdateAgentLogLevel_DEBUG :: forall {r}.
UpdateAgentLogLevel -> ((# #) -> r) -> ((# #) -> r) -> r
UpdateAgentLogLevel_DEBUG = UpdateAgentLogLevel' "DEBUG"

pattern UpdateAgentLogLevel_ERROR :: UpdateAgentLogLevel
pattern $bUpdateAgentLogLevel_ERROR :: UpdateAgentLogLevel
$mUpdateAgentLogLevel_ERROR :: forall {r}.
UpdateAgentLogLevel -> ((# #) -> r) -> ((# #) -> r) -> r
UpdateAgentLogLevel_ERROR = UpdateAgentLogLevel' "ERROR"

pattern UpdateAgentLogLevel_FATAL :: UpdateAgentLogLevel
pattern $bUpdateAgentLogLevel_FATAL :: UpdateAgentLogLevel
$mUpdateAgentLogLevel_FATAL :: forall {r}.
UpdateAgentLogLevel -> ((# #) -> r) -> ((# #) -> r) -> r
UpdateAgentLogLevel_FATAL = UpdateAgentLogLevel' "FATAL"

pattern UpdateAgentLogLevel_INFO :: UpdateAgentLogLevel
pattern $bUpdateAgentLogLevel_INFO :: UpdateAgentLogLevel
$mUpdateAgentLogLevel_INFO :: forall {r}.
UpdateAgentLogLevel -> ((# #) -> r) -> ((# #) -> r) -> r
UpdateAgentLogLevel_INFO = UpdateAgentLogLevel' "INFO"

pattern UpdateAgentLogLevel_NONE :: UpdateAgentLogLevel
pattern $bUpdateAgentLogLevel_NONE :: UpdateAgentLogLevel
$mUpdateAgentLogLevel_NONE :: forall {r}.
UpdateAgentLogLevel -> ((# #) -> r) -> ((# #) -> r) -> r
UpdateAgentLogLevel_NONE = UpdateAgentLogLevel' "NONE"

pattern UpdateAgentLogLevel_TRACE :: UpdateAgentLogLevel
pattern $bUpdateAgentLogLevel_TRACE :: UpdateAgentLogLevel
$mUpdateAgentLogLevel_TRACE :: forall {r}.
UpdateAgentLogLevel -> ((# #) -> r) -> ((# #) -> r) -> r
UpdateAgentLogLevel_TRACE = UpdateAgentLogLevel' "TRACE"

pattern UpdateAgentLogLevel_VERBOSE :: UpdateAgentLogLevel
pattern $bUpdateAgentLogLevel_VERBOSE :: UpdateAgentLogLevel
$mUpdateAgentLogLevel_VERBOSE :: forall {r}.
UpdateAgentLogLevel -> ((# #) -> r) -> ((# #) -> r) -> r
UpdateAgentLogLevel_VERBOSE = UpdateAgentLogLevel' "VERBOSE"

pattern UpdateAgentLogLevel_WARN :: UpdateAgentLogLevel
pattern $bUpdateAgentLogLevel_WARN :: UpdateAgentLogLevel
$mUpdateAgentLogLevel_WARN :: forall {r}.
UpdateAgentLogLevel -> ((# #) -> r) -> ((# #) -> r) -> r
UpdateAgentLogLevel_WARN = UpdateAgentLogLevel' "WARN"

{-# COMPLETE
  UpdateAgentLogLevel_DEBUG,
  UpdateAgentLogLevel_ERROR,
  UpdateAgentLogLevel_FATAL,
  UpdateAgentLogLevel_INFO,
  UpdateAgentLogLevel_NONE,
  UpdateAgentLogLevel_TRACE,
  UpdateAgentLogLevel_VERBOSE,
  UpdateAgentLogLevel_WARN,
  UpdateAgentLogLevel'
  #-}