{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Shield.Types.BlockAction
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Shield.Types.BlockAction where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Specifies that Shield Advanced should configure its WAF rules with the
-- WAF @Block@ action.
--
-- This is only used in the context of the @ResponseAction@ setting.
--
-- JSON specification: @\"Block\": {}@
--
-- /See:/ 'newBlockAction' smart constructor.
data BlockAction = BlockAction'
  {
  }
  deriving (BlockAction -> BlockAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BlockAction -> BlockAction -> Bool
$c/= :: BlockAction -> BlockAction -> Bool
== :: BlockAction -> BlockAction -> Bool
$c== :: BlockAction -> BlockAction -> Bool
Prelude.Eq, ReadPrec [BlockAction]
ReadPrec BlockAction
Int -> ReadS BlockAction
ReadS [BlockAction]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BlockAction]
$creadListPrec :: ReadPrec [BlockAction]
readPrec :: ReadPrec BlockAction
$creadPrec :: ReadPrec BlockAction
readList :: ReadS [BlockAction]
$creadList :: ReadS [BlockAction]
readsPrec :: Int -> ReadS BlockAction
$creadsPrec :: Int -> ReadS BlockAction
Prelude.Read, Int -> BlockAction -> ShowS
[BlockAction] -> ShowS
BlockAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BlockAction] -> ShowS
$cshowList :: [BlockAction] -> ShowS
show :: BlockAction -> String
$cshow :: BlockAction -> String
showsPrec :: Int -> BlockAction -> ShowS
$cshowsPrec :: Int -> BlockAction -> ShowS
Prelude.Show, forall x. Rep BlockAction x -> BlockAction
forall x. BlockAction -> Rep BlockAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BlockAction x -> BlockAction
$cfrom :: forall x. BlockAction -> Rep BlockAction x
Prelude.Generic)

-- |
-- Create a value of 'BlockAction' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
newBlockAction ::
  BlockAction
newBlockAction :: BlockAction
newBlockAction = BlockAction
BlockAction'

instance Data.FromJSON BlockAction where
  parseJSON :: Value -> Parser BlockAction
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BlockAction"
      (\Object
x -> forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure BlockAction
BlockAction')

instance Prelude.Hashable BlockAction where
  hashWithSalt :: Int -> BlockAction -> Int
hashWithSalt Int
_salt BlockAction
_ =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()

instance Prelude.NFData BlockAction where
  rnf :: BlockAction -> ()
rnf BlockAction
_ = ()

instance Data.ToJSON BlockAction where
  toJSON :: BlockAction -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)