{-# 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.WellArchitected.Types.ChoiceReason
-- 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.WellArchitected.Types.ChoiceReason
  ( ChoiceReason
      ( ..,
        ChoiceReason_ARCHITECTURE_CONSTRAINTS,
        ChoiceReason_BUSINESS_PRIORITIES,
        ChoiceReason_NONE,
        ChoiceReason_OTHER,
        ChoiceReason_OUT_OF_SCOPE
      ),
  )
where

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

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

pattern ChoiceReason_ARCHITECTURE_CONSTRAINTS :: ChoiceReason
pattern $bChoiceReason_ARCHITECTURE_CONSTRAINTS :: ChoiceReason
$mChoiceReason_ARCHITECTURE_CONSTRAINTS :: forall r. ChoiceReason -> (Void# -> r) -> (Void# -> r) -> r
ChoiceReason_ARCHITECTURE_CONSTRAINTS = ChoiceReason' "ARCHITECTURE_CONSTRAINTS"

pattern ChoiceReason_BUSINESS_PRIORITIES :: ChoiceReason
pattern $bChoiceReason_BUSINESS_PRIORITIES :: ChoiceReason
$mChoiceReason_BUSINESS_PRIORITIES :: forall r. ChoiceReason -> (Void# -> r) -> (Void# -> r) -> r
ChoiceReason_BUSINESS_PRIORITIES = ChoiceReason' "BUSINESS_PRIORITIES"

pattern ChoiceReason_NONE :: ChoiceReason
pattern $bChoiceReason_NONE :: ChoiceReason
$mChoiceReason_NONE :: forall r. ChoiceReason -> (Void# -> r) -> (Void# -> r) -> r
ChoiceReason_NONE = ChoiceReason' "NONE"

pattern ChoiceReason_OTHER :: ChoiceReason
pattern $bChoiceReason_OTHER :: ChoiceReason
$mChoiceReason_OTHER :: forall r. ChoiceReason -> (Void# -> r) -> (Void# -> r) -> r
ChoiceReason_OTHER = ChoiceReason' "OTHER"

pattern ChoiceReason_OUT_OF_SCOPE :: ChoiceReason
pattern $bChoiceReason_OUT_OF_SCOPE :: ChoiceReason
$mChoiceReason_OUT_OF_SCOPE :: forall r. ChoiceReason -> (Void# -> r) -> (Void# -> r) -> r
ChoiceReason_OUT_OF_SCOPE = ChoiceReason' "OUT_OF_SCOPE"

{-# COMPLETE
  ChoiceReason_ARCHITECTURE_CONSTRAINTS,
  ChoiceReason_BUSINESS_PRIORITIES,
  ChoiceReason_NONE,
  ChoiceReason_OTHER,
  ChoiceReason_OUT_OF_SCOPE,
  ChoiceReason'
  #-}