{-# 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.AutoScaling.Types.PredictiveScalingMode
-- 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.AutoScaling.Types.PredictiveScalingMode
  ( PredictiveScalingMode
      ( ..,
        PredictiveScalingMode_ForecastAndScale,
        PredictiveScalingMode_ForecastOnly
      ),
  )
where

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

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

pattern PredictiveScalingMode_ForecastAndScale :: PredictiveScalingMode
pattern $bPredictiveScalingMode_ForecastAndScale :: PredictiveScalingMode
$mPredictiveScalingMode_ForecastAndScale :: forall r.
PredictiveScalingMode -> (Void# -> r) -> (Void# -> r) -> r
PredictiveScalingMode_ForecastAndScale = PredictiveScalingMode' "ForecastAndScale"

pattern PredictiveScalingMode_ForecastOnly :: PredictiveScalingMode
pattern $bPredictiveScalingMode_ForecastOnly :: PredictiveScalingMode
$mPredictiveScalingMode_ForecastOnly :: forall r.
PredictiveScalingMode -> (Void# -> r) -> (Void# -> r) -> r
PredictiveScalingMode_ForecastOnly = PredictiveScalingMode' "ForecastOnly"

{-# COMPLETE
  PredictiveScalingMode_ForecastAndScale,
  PredictiveScalingMode_ForecastOnly,
  PredictiveScalingMode'
  #-}