{-# 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.IoT.Types.MitigationActionType
-- 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.IoT.Types.MitigationActionType
  ( MitigationActionType
      ( ..,
        MitigationActionType_ADD_THINGS_TO_THING_GROUP,
        MitigationActionType_ENABLE_IOT_LOGGING,
        MitigationActionType_PUBLISH_FINDING_TO_SNS,
        MitigationActionType_REPLACE_DEFAULT_POLICY_VERSION,
        MitigationActionType_UPDATE_CA_CERTIFICATE,
        MitigationActionType_UPDATE_DEVICE_CERTIFICATE
      ),
  )
where

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

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

pattern MitigationActionType_ADD_THINGS_TO_THING_GROUP :: MitigationActionType
pattern $bMitigationActionType_ADD_THINGS_TO_THING_GROUP :: MitigationActionType
$mMitigationActionType_ADD_THINGS_TO_THING_GROUP :: forall r. MitigationActionType -> (Void# -> r) -> (Void# -> r) -> r
MitigationActionType_ADD_THINGS_TO_THING_GROUP = MitigationActionType' "ADD_THINGS_TO_THING_GROUP"

pattern MitigationActionType_ENABLE_IOT_LOGGING :: MitigationActionType
pattern $bMitigationActionType_ENABLE_IOT_LOGGING :: MitigationActionType
$mMitigationActionType_ENABLE_IOT_LOGGING :: forall r. MitigationActionType -> (Void# -> r) -> (Void# -> r) -> r
MitigationActionType_ENABLE_IOT_LOGGING = MitigationActionType' "ENABLE_IOT_LOGGING"

pattern MitigationActionType_PUBLISH_FINDING_TO_SNS :: MitigationActionType
pattern $bMitigationActionType_PUBLISH_FINDING_TO_SNS :: MitigationActionType
$mMitigationActionType_PUBLISH_FINDING_TO_SNS :: forall r. MitigationActionType -> (Void# -> r) -> (Void# -> r) -> r
MitigationActionType_PUBLISH_FINDING_TO_SNS = MitigationActionType' "PUBLISH_FINDING_TO_SNS"

pattern MitigationActionType_REPLACE_DEFAULT_POLICY_VERSION :: MitigationActionType
pattern $bMitigationActionType_REPLACE_DEFAULT_POLICY_VERSION :: MitigationActionType
$mMitigationActionType_REPLACE_DEFAULT_POLICY_VERSION :: forall r. MitigationActionType -> (Void# -> r) -> (Void# -> r) -> r
MitigationActionType_REPLACE_DEFAULT_POLICY_VERSION = MitigationActionType' "REPLACE_DEFAULT_POLICY_VERSION"

pattern MitigationActionType_UPDATE_CA_CERTIFICATE :: MitigationActionType
pattern $bMitigationActionType_UPDATE_CA_CERTIFICATE :: MitigationActionType
$mMitigationActionType_UPDATE_CA_CERTIFICATE :: forall r. MitigationActionType -> (Void# -> r) -> (Void# -> r) -> r
MitigationActionType_UPDATE_CA_CERTIFICATE = MitigationActionType' "UPDATE_CA_CERTIFICATE"

pattern MitigationActionType_UPDATE_DEVICE_CERTIFICATE :: MitigationActionType
pattern $bMitigationActionType_UPDATE_DEVICE_CERTIFICATE :: MitigationActionType
$mMitigationActionType_UPDATE_DEVICE_CERTIFICATE :: forall r. MitigationActionType -> (Void# -> r) -> (Void# -> r) -> r
MitigationActionType_UPDATE_DEVICE_CERTIFICATE = MitigationActionType' "UPDATE_DEVICE_CERTIFICATE"

{-# COMPLETE
  MitigationActionType_ADD_THINGS_TO_THING_GROUP,
  MitigationActionType_ENABLE_IOT_LOGGING,
  MitigationActionType_PUBLISH_FINDING_TO_SNS,
  MitigationActionType_REPLACE_DEFAULT_POLICY_VERSION,
  MitigationActionType_UPDATE_CA_CERTIFICATE,
  MitigationActionType_UPDATE_DEVICE_CERTIFICATE,
  MitigationActionType'
  #-}