{-# 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.AZMode
-- 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.AZMode
  ( AZMode
      ( ..,
        AZMode_Cross_az,
        AZMode_Single_az
      ),
  )
where

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

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

pattern AZMode_Cross_az :: AZMode
pattern $bAZMode_Cross_az :: AZMode
$mAZMode_Cross_az :: forall r. AZMode -> (Void# -> r) -> (Void# -> r) -> r
AZMode_Cross_az = AZMode' "cross-az"

pattern AZMode_Single_az :: AZMode
pattern $bAZMode_Single_az :: AZMode
$mAZMode_Single_az :: forall r. AZMode -> (Void# -> r) -> (Void# -> r) -> r
AZMode_Single_az = AZMode' "single-az"

{-# COMPLETE
  AZMode_Cross_az,
  AZMode_Single_az,
  AZMode'
  #-}