{-# 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.Risk
-- 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.Risk
  ( Risk
      ( ..,
        Risk_HIGH,
        Risk_MEDIUM,
        Risk_NONE,
        Risk_NOT_APPLICABLE,
        Risk_UNANSWERED
      ),
  )
where

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

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

pattern Risk_HIGH :: Risk
pattern $bRisk_HIGH :: Risk
$mRisk_HIGH :: forall r. Risk -> (Void# -> r) -> (Void# -> r) -> r
Risk_HIGH = Risk' "HIGH"

pattern Risk_MEDIUM :: Risk
pattern $bRisk_MEDIUM :: Risk
$mRisk_MEDIUM :: forall r. Risk -> (Void# -> r) -> (Void# -> r) -> r
Risk_MEDIUM = Risk' "MEDIUM"

pattern Risk_NONE :: Risk
pattern $bRisk_NONE :: Risk
$mRisk_NONE :: forall r. Risk -> (Void# -> r) -> (Void# -> r) -> r
Risk_NONE = Risk' "NONE"

pattern Risk_NOT_APPLICABLE :: Risk
pattern $bRisk_NOT_APPLICABLE :: Risk
$mRisk_NOT_APPLICABLE :: forall r. Risk -> (Void# -> r) -> (Void# -> r) -> r
Risk_NOT_APPLICABLE = Risk' "NOT_APPLICABLE"

pattern Risk_UNANSWERED :: Risk
pattern $bRisk_UNANSWERED :: Risk
$mRisk_UNANSWERED :: forall r. Risk -> (Void# -> r) -> (Void# -> r) -> r
Risk_UNANSWERED = Risk' "UNANSWERED"

{-# COMPLETE
  Risk_HIGH,
  Risk_MEDIUM,
  Risk_NONE,
  Risk_NOT_APPLICABLE,
  Risk_UNANSWERED,
  Risk'
  #-}