{-# 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.Redshift.Types.UsageLimitBreachAction
-- 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.Redshift.Types.UsageLimitBreachAction
  ( UsageLimitBreachAction
      ( ..,
        UsageLimitBreachAction_Disable,
        UsageLimitBreachAction_Emit_metric,
        UsageLimitBreachAction_Log
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal

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

pattern UsageLimitBreachAction_Disable :: UsageLimitBreachAction
pattern $bUsageLimitBreachAction_Disable :: UsageLimitBreachAction
$mUsageLimitBreachAction_Disable :: forall r.
UsageLimitBreachAction -> (Void# -> r) -> (Void# -> r) -> r
UsageLimitBreachAction_Disable = UsageLimitBreachAction' "disable"

pattern UsageLimitBreachAction_Emit_metric :: UsageLimitBreachAction
pattern $bUsageLimitBreachAction_Emit_metric :: UsageLimitBreachAction
$mUsageLimitBreachAction_Emit_metric :: forall r.
UsageLimitBreachAction -> (Void# -> r) -> (Void# -> r) -> r
UsageLimitBreachAction_Emit_metric = UsageLimitBreachAction' "emit-metric"

pattern UsageLimitBreachAction_Log :: UsageLimitBreachAction
pattern $bUsageLimitBreachAction_Log :: UsageLimitBreachAction
$mUsageLimitBreachAction_Log :: forall r.
UsageLimitBreachAction -> (Void# -> r) -> (Void# -> r) -> r
UsageLimitBreachAction_Log = UsageLimitBreachAction' "log"

{-# COMPLETE
  UsageLimitBreachAction_Disable,
  UsageLimitBreachAction_Emit_metric,
  UsageLimitBreachAction_Log,
  UsageLimitBreachAction'
  #-}