{-# 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 #-}
module Amazonka.FMS.Types.NetworkFirewallPolicyModifiedViolation where
import qualified Amazonka.Core as Core
import Amazonka.FMS.Types.NetworkFirewallPolicyDescription
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NetworkFirewallPolicyModifiedViolation = NetworkFirewallPolicyModifiedViolation'
{
NetworkFirewallPolicyModifiedViolation
-> Maybe NetworkFirewallPolicyDescription
currentPolicyDescription :: Prelude.Maybe NetworkFirewallPolicyDescription,
NetworkFirewallPolicyModifiedViolation -> Maybe Text
violationTarget :: Prelude.Maybe Prelude.Text,
NetworkFirewallPolicyModifiedViolation
-> Maybe NetworkFirewallPolicyDescription
expectedPolicyDescription :: Prelude.Maybe NetworkFirewallPolicyDescription
}
deriving (NetworkFirewallPolicyModifiedViolation
-> NetworkFirewallPolicyModifiedViolation -> Bool
(NetworkFirewallPolicyModifiedViolation
-> NetworkFirewallPolicyModifiedViolation -> Bool)
-> (NetworkFirewallPolicyModifiedViolation
-> NetworkFirewallPolicyModifiedViolation -> Bool)
-> Eq NetworkFirewallPolicyModifiedViolation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkFirewallPolicyModifiedViolation
-> NetworkFirewallPolicyModifiedViolation -> Bool
$c/= :: NetworkFirewallPolicyModifiedViolation
-> NetworkFirewallPolicyModifiedViolation -> Bool
== :: NetworkFirewallPolicyModifiedViolation
-> NetworkFirewallPolicyModifiedViolation -> Bool
$c== :: NetworkFirewallPolicyModifiedViolation
-> NetworkFirewallPolicyModifiedViolation -> Bool
Prelude.Eq, ReadPrec [NetworkFirewallPolicyModifiedViolation]
ReadPrec NetworkFirewallPolicyModifiedViolation
Int -> ReadS NetworkFirewallPolicyModifiedViolation
ReadS [NetworkFirewallPolicyModifiedViolation]
(Int -> ReadS NetworkFirewallPolicyModifiedViolation)
-> ReadS [NetworkFirewallPolicyModifiedViolation]
-> ReadPrec NetworkFirewallPolicyModifiedViolation
-> ReadPrec [NetworkFirewallPolicyModifiedViolation]
-> Read NetworkFirewallPolicyModifiedViolation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkFirewallPolicyModifiedViolation]
$creadListPrec :: ReadPrec [NetworkFirewallPolicyModifiedViolation]
readPrec :: ReadPrec NetworkFirewallPolicyModifiedViolation
$creadPrec :: ReadPrec NetworkFirewallPolicyModifiedViolation
readList :: ReadS [NetworkFirewallPolicyModifiedViolation]
$creadList :: ReadS [NetworkFirewallPolicyModifiedViolation]
readsPrec :: Int -> ReadS NetworkFirewallPolicyModifiedViolation
$creadsPrec :: Int -> ReadS NetworkFirewallPolicyModifiedViolation
Prelude.Read, Int -> NetworkFirewallPolicyModifiedViolation -> ShowS
[NetworkFirewallPolicyModifiedViolation] -> ShowS
NetworkFirewallPolicyModifiedViolation -> String
(Int -> NetworkFirewallPolicyModifiedViolation -> ShowS)
-> (NetworkFirewallPolicyModifiedViolation -> String)
-> ([NetworkFirewallPolicyModifiedViolation] -> ShowS)
-> Show NetworkFirewallPolicyModifiedViolation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkFirewallPolicyModifiedViolation] -> ShowS
$cshowList :: [NetworkFirewallPolicyModifiedViolation] -> ShowS
show :: NetworkFirewallPolicyModifiedViolation -> String
$cshow :: NetworkFirewallPolicyModifiedViolation -> String
showsPrec :: Int -> NetworkFirewallPolicyModifiedViolation -> ShowS
$cshowsPrec :: Int -> NetworkFirewallPolicyModifiedViolation -> ShowS
Prelude.Show, (forall x.
NetworkFirewallPolicyModifiedViolation
-> Rep NetworkFirewallPolicyModifiedViolation x)
-> (forall x.
Rep NetworkFirewallPolicyModifiedViolation x
-> NetworkFirewallPolicyModifiedViolation)
-> Generic NetworkFirewallPolicyModifiedViolation
forall x.
Rep NetworkFirewallPolicyModifiedViolation x
-> NetworkFirewallPolicyModifiedViolation
forall x.
NetworkFirewallPolicyModifiedViolation
-> Rep NetworkFirewallPolicyModifiedViolation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NetworkFirewallPolicyModifiedViolation x
-> NetworkFirewallPolicyModifiedViolation
$cfrom :: forall x.
NetworkFirewallPolicyModifiedViolation
-> Rep NetworkFirewallPolicyModifiedViolation x
Prelude.Generic)
newNetworkFirewallPolicyModifiedViolation ::
NetworkFirewallPolicyModifiedViolation
newNetworkFirewallPolicyModifiedViolation :: NetworkFirewallPolicyModifiedViolation
newNetworkFirewallPolicyModifiedViolation =
NetworkFirewallPolicyModifiedViolation' :: Maybe NetworkFirewallPolicyDescription
-> Maybe Text
-> Maybe NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyModifiedViolation
NetworkFirewallPolicyModifiedViolation'
{ $sel:currentPolicyDescription:NetworkFirewallPolicyModifiedViolation' :: Maybe NetworkFirewallPolicyDescription
currentPolicyDescription =
Maybe NetworkFirewallPolicyDescription
forall a. Maybe a
Prelude.Nothing,
$sel:violationTarget:NetworkFirewallPolicyModifiedViolation' :: Maybe Text
violationTarget = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:expectedPolicyDescription:NetworkFirewallPolicyModifiedViolation' :: Maybe NetworkFirewallPolicyDescription
expectedPolicyDescription =
Maybe NetworkFirewallPolicyDescription
forall a. Maybe a
Prelude.Nothing
}
networkFirewallPolicyModifiedViolation_currentPolicyDescription :: Lens.Lens' NetworkFirewallPolicyModifiedViolation (Prelude.Maybe NetworkFirewallPolicyDescription)
networkFirewallPolicyModifiedViolation_currentPolicyDescription :: (Maybe NetworkFirewallPolicyDescription
-> f (Maybe NetworkFirewallPolicyDescription))
-> NetworkFirewallPolicyModifiedViolation
-> f NetworkFirewallPolicyModifiedViolation
networkFirewallPolicyModifiedViolation_currentPolicyDescription = (NetworkFirewallPolicyModifiedViolation
-> Maybe NetworkFirewallPolicyDescription)
-> (NetworkFirewallPolicyModifiedViolation
-> Maybe NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyModifiedViolation)
-> Lens
NetworkFirewallPolicyModifiedViolation
NetworkFirewallPolicyModifiedViolation
(Maybe NetworkFirewallPolicyDescription)
(Maybe NetworkFirewallPolicyDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallPolicyModifiedViolation' {Maybe NetworkFirewallPolicyDescription
currentPolicyDescription :: Maybe NetworkFirewallPolicyDescription
$sel:currentPolicyDescription:NetworkFirewallPolicyModifiedViolation' :: NetworkFirewallPolicyModifiedViolation
-> Maybe NetworkFirewallPolicyDescription
currentPolicyDescription} -> Maybe NetworkFirewallPolicyDescription
currentPolicyDescription) (\s :: NetworkFirewallPolicyModifiedViolation
s@NetworkFirewallPolicyModifiedViolation' {} Maybe NetworkFirewallPolicyDescription
a -> NetworkFirewallPolicyModifiedViolation
s {$sel:currentPolicyDescription:NetworkFirewallPolicyModifiedViolation' :: Maybe NetworkFirewallPolicyDescription
currentPolicyDescription = Maybe NetworkFirewallPolicyDescription
a} :: NetworkFirewallPolicyModifiedViolation)
networkFirewallPolicyModifiedViolation_violationTarget :: Lens.Lens' NetworkFirewallPolicyModifiedViolation (Prelude.Maybe Prelude.Text)
networkFirewallPolicyModifiedViolation_violationTarget :: (Maybe Text -> f (Maybe Text))
-> NetworkFirewallPolicyModifiedViolation
-> f NetworkFirewallPolicyModifiedViolation
networkFirewallPolicyModifiedViolation_violationTarget = (NetworkFirewallPolicyModifiedViolation -> Maybe Text)
-> (NetworkFirewallPolicyModifiedViolation
-> Maybe Text -> NetworkFirewallPolicyModifiedViolation)
-> Lens
NetworkFirewallPolicyModifiedViolation
NetworkFirewallPolicyModifiedViolation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallPolicyModifiedViolation' {Maybe Text
violationTarget :: Maybe Text
$sel:violationTarget:NetworkFirewallPolicyModifiedViolation' :: NetworkFirewallPolicyModifiedViolation -> Maybe Text
violationTarget} -> Maybe Text
violationTarget) (\s :: NetworkFirewallPolicyModifiedViolation
s@NetworkFirewallPolicyModifiedViolation' {} Maybe Text
a -> NetworkFirewallPolicyModifiedViolation
s {$sel:violationTarget:NetworkFirewallPolicyModifiedViolation' :: Maybe Text
violationTarget = Maybe Text
a} :: NetworkFirewallPolicyModifiedViolation)
networkFirewallPolicyModifiedViolation_expectedPolicyDescription :: Lens.Lens' NetworkFirewallPolicyModifiedViolation (Prelude.Maybe NetworkFirewallPolicyDescription)
networkFirewallPolicyModifiedViolation_expectedPolicyDescription :: (Maybe NetworkFirewallPolicyDescription
-> f (Maybe NetworkFirewallPolicyDescription))
-> NetworkFirewallPolicyModifiedViolation
-> f NetworkFirewallPolicyModifiedViolation
networkFirewallPolicyModifiedViolation_expectedPolicyDescription = (NetworkFirewallPolicyModifiedViolation
-> Maybe NetworkFirewallPolicyDescription)
-> (NetworkFirewallPolicyModifiedViolation
-> Maybe NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyModifiedViolation)
-> Lens
NetworkFirewallPolicyModifiedViolation
NetworkFirewallPolicyModifiedViolation
(Maybe NetworkFirewallPolicyDescription)
(Maybe NetworkFirewallPolicyDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallPolicyModifiedViolation' {Maybe NetworkFirewallPolicyDescription
expectedPolicyDescription :: Maybe NetworkFirewallPolicyDescription
$sel:expectedPolicyDescription:NetworkFirewallPolicyModifiedViolation' :: NetworkFirewallPolicyModifiedViolation
-> Maybe NetworkFirewallPolicyDescription
expectedPolicyDescription} -> Maybe NetworkFirewallPolicyDescription
expectedPolicyDescription) (\s :: NetworkFirewallPolicyModifiedViolation
s@NetworkFirewallPolicyModifiedViolation' {} Maybe NetworkFirewallPolicyDescription
a -> NetworkFirewallPolicyModifiedViolation
s {$sel:expectedPolicyDescription:NetworkFirewallPolicyModifiedViolation' :: Maybe NetworkFirewallPolicyDescription
expectedPolicyDescription = Maybe NetworkFirewallPolicyDescription
a} :: NetworkFirewallPolicyModifiedViolation)
instance
Core.FromJSON
NetworkFirewallPolicyModifiedViolation
where
parseJSON :: Value -> Parser NetworkFirewallPolicyModifiedViolation
parseJSON =
String
-> (Object -> Parser NetworkFirewallPolicyModifiedViolation)
-> Value
-> Parser NetworkFirewallPolicyModifiedViolation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NetworkFirewallPolicyModifiedViolation"
( \Object
x ->
Maybe NetworkFirewallPolicyDescription
-> Maybe Text
-> Maybe NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyModifiedViolation
NetworkFirewallPolicyModifiedViolation'
(Maybe NetworkFirewallPolicyDescription
-> Maybe Text
-> Maybe NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyModifiedViolation)
-> Parser (Maybe NetworkFirewallPolicyDescription)
-> Parser
(Maybe Text
-> Maybe NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyModifiedViolation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe NetworkFirewallPolicyDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CurrentPolicyDescription")
Parser
(Maybe Text
-> Maybe NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyModifiedViolation)
-> Parser (Maybe Text)
-> Parser
(Maybe NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyModifiedViolation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ViolationTarget")
Parser
(Maybe NetworkFirewallPolicyDescription
-> NetworkFirewallPolicyModifiedViolation)
-> Parser (Maybe NetworkFirewallPolicyDescription)
-> Parser NetworkFirewallPolicyModifiedViolation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NetworkFirewallPolicyDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExpectedPolicyDescription")
)
instance
Prelude.Hashable
NetworkFirewallPolicyModifiedViolation
instance
Prelude.NFData
NetworkFirewallPolicyModifiedViolation