{-# 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.WAFV2.Types.NoneAction
-- 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.WAFV2.Types.NoneAction 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 WAF should do nothing. This is used for the
-- @OverrideAction@ setting on a Rule when the rule uses a rule group
-- reference statement.
--
-- This is used in the context of other settings, for example to specify
-- values for RuleAction and web ACL DefaultAction.
--
-- JSON specification: @\"None\": {}@
--
-- /See:/ 'newNoneAction' smart constructor.
data NoneAction = NoneAction'
  {
  }
  deriving (NoneAction -> NoneAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NoneAction -> NoneAction -> Bool
$c/= :: NoneAction -> NoneAction -> Bool
== :: NoneAction -> NoneAction -> Bool
$c== :: NoneAction -> NoneAction -> Bool
Prelude.Eq, ReadPrec [NoneAction]
ReadPrec NoneAction
Int -> ReadS NoneAction
ReadS [NoneAction]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NoneAction]
$creadListPrec :: ReadPrec [NoneAction]
readPrec :: ReadPrec NoneAction
$creadPrec :: ReadPrec NoneAction
readList :: ReadS [NoneAction]
$creadList :: ReadS [NoneAction]
readsPrec :: Int -> ReadS NoneAction
$creadsPrec :: Int -> ReadS NoneAction
Prelude.Read, Int -> NoneAction -> ShowS
[NoneAction] -> ShowS
NoneAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NoneAction] -> ShowS
$cshowList :: [NoneAction] -> ShowS
show :: NoneAction -> String
$cshow :: NoneAction -> String
showsPrec :: Int -> NoneAction -> ShowS
$cshowsPrec :: Int -> NoneAction -> ShowS
Prelude.Show, forall x. Rep NoneAction x -> NoneAction
forall x. NoneAction -> Rep NoneAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NoneAction x -> NoneAction
$cfrom :: forall x. NoneAction -> Rep NoneAction x
Prelude.Generic)

-- |
-- Create a value of 'NoneAction' 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.
newNoneAction ::
  NoneAction
newNoneAction :: NoneAction
newNoneAction = NoneAction
NoneAction'

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

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

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

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