{-# 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.ComputeOptimizer.Types.Finding
-- 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.ComputeOptimizer.Types.Finding
  ( Finding
      ( ..,
        Finding_NotOptimized,
        Finding_Optimized,
        Finding_Overprovisioned,
        Finding_Underprovisioned
      ),
  )
where

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

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

pattern Finding_NotOptimized :: Finding
pattern $bFinding_NotOptimized :: Finding
$mFinding_NotOptimized :: forall r. Finding -> (Void# -> r) -> (Void# -> r) -> r
Finding_NotOptimized = Finding' "NotOptimized"

pattern Finding_Optimized :: Finding
pattern $bFinding_Optimized :: Finding
$mFinding_Optimized :: forall r. Finding -> (Void# -> r) -> (Void# -> r) -> r
Finding_Optimized = Finding' "Optimized"

pattern Finding_Overprovisioned :: Finding
pattern $bFinding_Overprovisioned :: Finding
$mFinding_Overprovisioned :: forall r. Finding -> (Void# -> r) -> (Void# -> r) -> r
Finding_Overprovisioned = Finding' "Overprovisioned"

pattern Finding_Underprovisioned :: Finding
pattern $bFinding_Underprovisioned :: Finding
$mFinding_Underprovisioned :: forall r. Finding -> (Void# -> r) -> (Void# -> r) -> r
Finding_Underprovisioned = Finding' "Underprovisioned"

{-# COMPLETE
  Finding_NotOptimized,
  Finding_Optimized,
  Finding_Overprovisioned,
  Finding_Underprovisioned,
  Finding'
  #-}