{-# 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.ElastiCache.Types.LogFormat
-- 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.ElastiCache.Types.LogFormat
  ( LogFormat
      ( ..,
        LogFormat_Json,
        LogFormat_Text
      ),
  )
where

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

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

pattern LogFormat_Json :: LogFormat
pattern $bLogFormat_Json :: LogFormat
$mLogFormat_Json :: forall {r}. LogFormat -> ((# #) -> r) -> ((# #) -> r) -> r
LogFormat_Json = LogFormat' "json"

pattern LogFormat_Text :: LogFormat
pattern $bLogFormat_Text :: LogFormat
$mLogFormat_Text :: forall {r}. LogFormat -> ((# #) -> r) -> ((# #) -> r) -> r
LogFormat_Text = LogFormat' "text"

{-# COMPLETE
  LogFormat_Json,
  LogFormat_Text,
  LogFormat'
  #-}