{-# 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.ManagedBlockChain.Types.VoteValue
-- 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.ManagedBlockChain.Types.VoteValue
  ( VoteValue
      ( ..,
        VoteValue_NO,
        VoteValue_YES
      ),
  )
where

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

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

pattern VoteValue_NO :: VoteValue
pattern $bVoteValue_NO :: VoteValue
$mVoteValue_NO :: forall r. VoteValue -> (Void# -> r) -> (Void# -> r) -> r
VoteValue_NO = VoteValue' "NO"

pattern VoteValue_YES :: VoteValue
pattern $bVoteValue_YES :: VoteValue
$mVoteValue_YES :: forall r. VoteValue -> (Void# -> r) -> (Void# -> r) -> r
VoteValue_YES = VoteValue' "YES"

{-# COMPLETE
  VoteValue_NO,
  VoteValue_YES,
  VoteValue'
  #-}