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

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

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

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

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

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