{-# 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.Kafka.Types.StorageMode
-- 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.Kafka.Types.StorageMode
  ( StorageMode
      ( ..,
        StorageMode_LOCAL,
        StorageMode_TIERED
      ),
  )
where

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

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

pattern StorageMode_LOCAL :: StorageMode
pattern $bStorageMode_LOCAL :: StorageMode
$mStorageMode_LOCAL :: forall {r}. StorageMode -> ((# #) -> r) -> ((# #) -> r) -> r
StorageMode_LOCAL = StorageMode' "LOCAL"

pattern StorageMode_TIERED :: StorageMode
pattern $bStorageMode_TIERED :: StorageMode
$mStorageMode_TIERED :: forall {r}. StorageMode -> ((# #) -> r) -> ((# #) -> r) -> r
StorageMode_TIERED = StorageMode' "TIERED"

{-# COMPLETE
  StorageMode_LOCAL,
  StorageMode_TIERED,
  StorageMode'
  #-}