{-# 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.RefreshStrategy
-- 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.RefreshStrategy
  ( RefreshStrategy
      ( ..,
        RefreshStrategy_Rolling
      ),
  )
where

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

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

pattern RefreshStrategy_Rolling :: RefreshStrategy
pattern $bRefreshStrategy_Rolling :: RefreshStrategy
$mRefreshStrategy_Rolling :: forall r. RefreshStrategy -> (Void# -> r) -> (Void# -> r) -> r
RefreshStrategy_Rolling = RefreshStrategy' "Rolling"

{-# COMPLETE
  RefreshStrategy_Rolling,
  RefreshStrategy'
  #-}