{-# 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-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.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.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 ::
      Core.Text
  }
  deriving stock
    ( Int -> UpdateAgentLogLevel -> ShowS
[UpdateAgentLogLevel] -> ShowS
UpdateAgentLogLevel -> String
(Int -> UpdateAgentLogLevel -> ShowS)
-> (UpdateAgentLogLevel -> String)
-> ([UpdateAgentLogLevel] -> ShowS)
-> Show UpdateAgentLogLevel
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]
(Int -> ReadS UpdateAgentLogLevel)
-> ReadS [UpdateAgentLogLevel]
-> ReadPrec UpdateAgentLogLevel
-> ReadPrec [UpdateAgentLogLevel]
-> Read 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
(UpdateAgentLogLevel -> UpdateAgentLogLevel -> Bool)
-> (UpdateAgentLogLevel -> UpdateAgentLogLevel -> Bool)
-> Eq UpdateAgentLogLevel
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
Eq UpdateAgentLogLevel
-> (UpdateAgentLogLevel -> UpdateAgentLogLevel -> Ordering)
-> (UpdateAgentLogLevel -> UpdateAgentLogLevel -> Bool)
-> (UpdateAgentLogLevel -> UpdateAgentLogLevel -> Bool)
-> (UpdateAgentLogLevel -> UpdateAgentLogLevel -> Bool)
-> (UpdateAgentLogLevel -> UpdateAgentLogLevel -> Bool)
-> (UpdateAgentLogLevel
    -> UpdateAgentLogLevel -> UpdateAgentLogLevel)
-> (UpdateAgentLogLevel
    -> UpdateAgentLogLevel -> UpdateAgentLogLevel)
-> Ord 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
$cp1Ord :: Eq UpdateAgentLogLevel
Prelude.Ord,
      (forall x. UpdateAgentLogLevel -> Rep UpdateAgentLogLevel x)
-> (forall x. Rep UpdateAgentLogLevel x -> UpdateAgentLogLevel)
-> Generic UpdateAgentLogLevel
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
    ( Int -> UpdateAgentLogLevel -> Int
UpdateAgentLogLevel -> Int
(Int -> UpdateAgentLogLevel -> Int)
-> (UpdateAgentLogLevel -> Int) -> Hashable UpdateAgentLogLevel
forall 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 -> ()
(UpdateAgentLogLevel -> ()) -> NFData UpdateAgentLogLevel
forall a. (a -> ()) -> NFData a
rnf :: UpdateAgentLogLevel -> ()
$crnf :: UpdateAgentLogLevel -> ()
Prelude.NFData,
      Text -> Either String UpdateAgentLogLevel
(Text -> Either String UpdateAgentLogLevel)
-> FromText UpdateAgentLogLevel
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String UpdateAgentLogLevel
$cfromText :: Text -> Either String UpdateAgentLogLevel
Core.FromText,
      UpdateAgentLogLevel -> Text
(UpdateAgentLogLevel -> Text) -> ToText UpdateAgentLogLevel
forall a. (a -> Text) -> ToText a
toText :: UpdateAgentLogLevel -> Text
$ctoText :: UpdateAgentLogLevel -> Text
Core.ToText,
      UpdateAgentLogLevel -> ByteString
(UpdateAgentLogLevel -> ByteString)
-> ToByteString UpdateAgentLogLevel
forall a. (a -> ByteString) -> ToByteString a
toBS :: UpdateAgentLogLevel -> ByteString
$ctoBS :: UpdateAgentLogLevel -> ByteString
Core.ToByteString,
      UpdateAgentLogLevel -> ByteStringBuilder
(UpdateAgentLogLevel -> ByteStringBuilder)
-> ToLog UpdateAgentLogLevel
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: UpdateAgentLogLevel -> ByteStringBuilder
$cbuild :: UpdateAgentLogLevel -> ByteStringBuilder
Core.ToLog,
      HeaderName -> UpdateAgentLogLevel -> [Header]
(HeaderName -> UpdateAgentLogLevel -> [Header])
-> ToHeader UpdateAgentLogLevel
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> UpdateAgentLogLevel -> [Header]
$ctoHeader :: HeaderName -> UpdateAgentLogLevel -> [Header]
Core.ToHeader,
      UpdateAgentLogLevel -> QueryString
(UpdateAgentLogLevel -> QueryString) -> ToQuery UpdateAgentLogLevel
forall a. (a -> QueryString) -> ToQuery a
toQuery :: UpdateAgentLogLevel -> QueryString
$ctoQuery :: UpdateAgentLogLevel -> QueryString
Core.ToQuery,
      Value -> Parser [UpdateAgentLogLevel]
Value -> Parser UpdateAgentLogLevel
(Value -> Parser UpdateAgentLogLevel)
-> (Value -> Parser [UpdateAgentLogLevel])
-> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [UpdateAgentLogLevel]
FromJSONKeyFunction UpdateAgentLogLevel
FromJSONKeyFunction UpdateAgentLogLevel
-> FromJSONKeyFunction [UpdateAgentLogLevel]
-> FromJSONKey UpdateAgentLogLevel
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [UpdateAgentLogLevel]
$cfromJSONKeyList :: FromJSONKeyFunction [UpdateAgentLogLevel]
fromJSONKey :: FromJSONKeyFunction UpdateAgentLogLevel
$cfromJSONKey :: FromJSONKeyFunction UpdateAgentLogLevel
Core.FromJSONKey,
      [UpdateAgentLogLevel] -> Encoding
[UpdateAgentLogLevel] -> Value
UpdateAgentLogLevel -> Encoding
UpdateAgentLogLevel -> Value
(UpdateAgentLogLevel -> Value)
-> (UpdateAgentLogLevel -> Encoding)
-> ([UpdateAgentLogLevel] -> Value)
-> ([UpdateAgentLogLevel] -> Encoding)
-> ToJSON UpdateAgentLogLevel
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
Core.ToJSON,
      ToJSONKeyFunction [UpdateAgentLogLevel]
ToJSONKeyFunction UpdateAgentLogLevel
ToJSONKeyFunction UpdateAgentLogLevel
-> ToJSONKeyFunction [UpdateAgentLogLevel]
-> ToJSONKey UpdateAgentLogLevel
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [UpdateAgentLogLevel]
$ctoJSONKeyList :: ToJSONKeyFunction [UpdateAgentLogLevel]
toJSONKey :: ToJSONKeyFunction UpdateAgentLogLevel
$ctoJSONKey :: ToJSONKeyFunction UpdateAgentLogLevel
Core.ToJSONKey,
      [Node] -> Either String UpdateAgentLogLevel
([Node] -> Either String UpdateAgentLogLevel)
-> FromXML UpdateAgentLogLevel
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String UpdateAgentLogLevel
$cparseXML :: [Node] -> Either String UpdateAgentLogLevel
Core.FromXML,
      UpdateAgentLogLevel -> XML
(UpdateAgentLogLevel -> XML) -> ToXML UpdateAgentLogLevel
forall a. (a -> XML) -> ToXML a
toXML :: UpdateAgentLogLevel -> XML
$ctoXML :: UpdateAgentLogLevel -> XML
Core.ToXML
    )

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

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

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

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

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

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

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

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

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