{-# 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.CostExplorer.Types.RightsizingType
-- 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.CostExplorer.Types.RightsizingType
  ( RightsizingType
      ( ..,
        RightsizingType_MODIFY,
        RightsizingType_TERMINATE
      ),
  )
where

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

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

pattern RightsizingType_MODIFY :: RightsizingType
pattern $bRightsizingType_MODIFY :: RightsizingType
$mRightsizingType_MODIFY :: forall r. RightsizingType -> (Void# -> r) -> (Void# -> r) -> r
RightsizingType_MODIFY = RightsizingType' "MODIFY"

pattern RightsizingType_TERMINATE :: RightsizingType
pattern $bRightsizingType_TERMINATE :: RightsizingType
$mRightsizingType_TERMINATE :: forall r. RightsizingType -> (Void# -> r) -> (Void# -> r) -> r
RightsizingType_TERMINATE = RightsizingType' "TERMINATE"

{-# COMPLETE
  RightsizingType_MODIFY,
  RightsizingType_TERMINATE,
  RightsizingType'
  #-}