{-# 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.NetworkFirewallBlackHoleRouteDetectedViolation where
import qualified Amazonka.Core as Core
import Amazonka.FMS.Types.Route
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NetworkFirewallBlackHoleRouteDetectedViolation = NetworkFirewallBlackHoleRouteDetectedViolation'
{
NetworkFirewallBlackHoleRouteDetectedViolation -> Maybe Text
routeTableId :: Prelude.Maybe Prelude.Text,
NetworkFirewallBlackHoleRouteDetectedViolation -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
NetworkFirewallBlackHoleRouteDetectedViolation -> Maybe [Route]
violatingRoutes :: Prelude.Maybe [Route],
NetworkFirewallBlackHoleRouteDetectedViolation -> Maybe Text
violationTarget :: Prelude.Maybe Prelude.Text
}
deriving (NetworkFirewallBlackHoleRouteDetectedViolation
-> NetworkFirewallBlackHoleRouteDetectedViolation -> Bool
(NetworkFirewallBlackHoleRouteDetectedViolation
-> NetworkFirewallBlackHoleRouteDetectedViolation -> Bool)
-> (NetworkFirewallBlackHoleRouteDetectedViolation
-> NetworkFirewallBlackHoleRouteDetectedViolation -> Bool)
-> Eq NetworkFirewallBlackHoleRouteDetectedViolation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkFirewallBlackHoleRouteDetectedViolation
-> NetworkFirewallBlackHoleRouteDetectedViolation -> Bool
$c/= :: NetworkFirewallBlackHoleRouteDetectedViolation
-> NetworkFirewallBlackHoleRouteDetectedViolation -> Bool
== :: NetworkFirewallBlackHoleRouteDetectedViolation
-> NetworkFirewallBlackHoleRouteDetectedViolation -> Bool
$c== :: NetworkFirewallBlackHoleRouteDetectedViolation
-> NetworkFirewallBlackHoleRouteDetectedViolation -> Bool
Prelude.Eq, ReadPrec [NetworkFirewallBlackHoleRouteDetectedViolation]
ReadPrec NetworkFirewallBlackHoleRouteDetectedViolation
Int -> ReadS NetworkFirewallBlackHoleRouteDetectedViolation
ReadS [NetworkFirewallBlackHoleRouteDetectedViolation]
(Int -> ReadS NetworkFirewallBlackHoleRouteDetectedViolation)
-> ReadS [NetworkFirewallBlackHoleRouteDetectedViolation]
-> ReadPrec NetworkFirewallBlackHoleRouteDetectedViolation
-> ReadPrec [NetworkFirewallBlackHoleRouteDetectedViolation]
-> Read NetworkFirewallBlackHoleRouteDetectedViolation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkFirewallBlackHoleRouteDetectedViolation]
$creadListPrec :: ReadPrec [NetworkFirewallBlackHoleRouteDetectedViolation]
readPrec :: ReadPrec NetworkFirewallBlackHoleRouteDetectedViolation
$creadPrec :: ReadPrec NetworkFirewallBlackHoleRouteDetectedViolation
readList :: ReadS [NetworkFirewallBlackHoleRouteDetectedViolation]
$creadList :: ReadS [NetworkFirewallBlackHoleRouteDetectedViolation]
readsPrec :: Int -> ReadS NetworkFirewallBlackHoleRouteDetectedViolation
$creadsPrec :: Int -> ReadS NetworkFirewallBlackHoleRouteDetectedViolation
Prelude.Read, Int -> NetworkFirewallBlackHoleRouteDetectedViolation -> ShowS
[NetworkFirewallBlackHoleRouteDetectedViolation] -> ShowS
NetworkFirewallBlackHoleRouteDetectedViolation -> String
(Int -> NetworkFirewallBlackHoleRouteDetectedViolation -> ShowS)
-> (NetworkFirewallBlackHoleRouteDetectedViolation -> String)
-> ([NetworkFirewallBlackHoleRouteDetectedViolation] -> ShowS)
-> Show NetworkFirewallBlackHoleRouteDetectedViolation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkFirewallBlackHoleRouteDetectedViolation] -> ShowS
$cshowList :: [NetworkFirewallBlackHoleRouteDetectedViolation] -> ShowS
show :: NetworkFirewallBlackHoleRouteDetectedViolation -> String
$cshow :: NetworkFirewallBlackHoleRouteDetectedViolation -> String
showsPrec :: Int -> NetworkFirewallBlackHoleRouteDetectedViolation -> ShowS
$cshowsPrec :: Int -> NetworkFirewallBlackHoleRouteDetectedViolation -> ShowS
Prelude.Show, (forall x.
NetworkFirewallBlackHoleRouteDetectedViolation
-> Rep NetworkFirewallBlackHoleRouteDetectedViolation x)
-> (forall x.
Rep NetworkFirewallBlackHoleRouteDetectedViolation x
-> NetworkFirewallBlackHoleRouteDetectedViolation)
-> Generic NetworkFirewallBlackHoleRouteDetectedViolation
forall x.
Rep NetworkFirewallBlackHoleRouteDetectedViolation x
-> NetworkFirewallBlackHoleRouteDetectedViolation
forall x.
NetworkFirewallBlackHoleRouteDetectedViolation
-> Rep NetworkFirewallBlackHoleRouteDetectedViolation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NetworkFirewallBlackHoleRouteDetectedViolation x
-> NetworkFirewallBlackHoleRouteDetectedViolation
$cfrom :: forall x.
NetworkFirewallBlackHoleRouteDetectedViolation
-> Rep NetworkFirewallBlackHoleRouteDetectedViolation x
Prelude.Generic)
newNetworkFirewallBlackHoleRouteDetectedViolation ::
NetworkFirewallBlackHoleRouteDetectedViolation
newNetworkFirewallBlackHoleRouteDetectedViolation :: NetworkFirewallBlackHoleRouteDetectedViolation
newNetworkFirewallBlackHoleRouteDetectedViolation =
NetworkFirewallBlackHoleRouteDetectedViolation' :: Maybe Text
-> Maybe Text
-> Maybe [Route]
-> Maybe Text
-> NetworkFirewallBlackHoleRouteDetectedViolation
NetworkFirewallBlackHoleRouteDetectedViolation'
{ $sel:routeTableId:NetworkFirewallBlackHoleRouteDetectedViolation' :: Maybe Text
routeTableId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcId:NetworkFirewallBlackHoleRouteDetectedViolation' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:violatingRoutes:NetworkFirewallBlackHoleRouteDetectedViolation' :: Maybe [Route]
violatingRoutes =
Maybe [Route]
forall a. Maybe a
Prelude.Nothing,
$sel:violationTarget:NetworkFirewallBlackHoleRouteDetectedViolation' :: Maybe Text
violationTarget =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
networkFirewallBlackHoleRouteDetectedViolation_routeTableId :: Lens.Lens' NetworkFirewallBlackHoleRouteDetectedViolation (Prelude.Maybe Prelude.Text)
networkFirewallBlackHoleRouteDetectedViolation_routeTableId :: (Maybe Text -> f (Maybe Text))
-> NetworkFirewallBlackHoleRouteDetectedViolation
-> f NetworkFirewallBlackHoleRouteDetectedViolation
networkFirewallBlackHoleRouteDetectedViolation_routeTableId = (NetworkFirewallBlackHoleRouteDetectedViolation -> Maybe Text)
-> (NetworkFirewallBlackHoleRouteDetectedViolation
-> Maybe Text -> NetworkFirewallBlackHoleRouteDetectedViolation)
-> Lens
NetworkFirewallBlackHoleRouteDetectedViolation
NetworkFirewallBlackHoleRouteDetectedViolation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallBlackHoleRouteDetectedViolation' {Maybe Text
routeTableId :: Maybe Text
$sel:routeTableId:NetworkFirewallBlackHoleRouteDetectedViolation' :: NetworkFirewallBlackHoleRouteDetectedViolation -> Maybe Text
routeTableId} -> Maybe Text
routeTableId) (\s :: NetworkFirewallBlackHoleRouteDetectedViolation
s@NetworkFirewallBlackHoleRouteDetectedViolation' {} Maybe Text
a -> NetworkFirewallBlackHoleRouteDetectedViolation
s {$sel:routeTableId:NetworkFirewallBlackHoleRouteDetectedViolation' :: Maybe Text
routeTableId = Maybe Text
a} :: NetworkFirewallBlackHoleRouteDetectedViolation)
networkFirewallBlackHoleRouteDetectedViolation_vpcId :: Lens.Lens' NetworkFirewallBlackHoleRouteDetectedViolation (Prelude.Maybe Prelude.Text)
networkFirewallBlackHoleRouteDetectedViolation_vpcId :: (Maybe Text -> f (Maybe Text))
-> NetworkFirewallBlackHoleRouteDetectedViolation
-> f NetworkFirewallBlackHoleRouteDetectedViolation
networkFirewallBlackHoleRouteDetectedViolation_vpcId = (NetworkFirewallBlackHoleRouteDetectedViolation -> Maybe Text)
-> (NetworkFirewallBlackHoleRouteDetectedViolation
-> Maybe Text -> NetworkFirewallBlackHoleRouteDetectedViolation)
-> Lens
NetworkFirewallBlackHoleRouteDetectedViolation
NetworkFirewallBlackHoleRouteDetectedViolation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallBlackHoleRouteDetectedViolation' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:NetworkFirewallBlackHoleRouteDetectedViolation' :: NetworkFirewallBlackHoleRouteDetectedViolation -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: NetworkFirewallBlackHoleRouteDetectedViolation
s@NetworkFirewallBlackHoleRouteDetectedViolation' {} Maybe Text
a -> NetworkFirewallBlackHoleRouteDetectedViolation
s {$sel:vpcId:NetworkFirewallBlackHoleRouteDetectedViolation' :: Maybe Text
vpcId = Maybe Text
a} :: NetworkFirewallBlackHoleRouteDetectedViolation)
networkFirewallBlackHoleRouteDetectedViolation_violatingRoutes :: Lens.Lens' NetworkFirewallBlackHoleRouteDetectedViolation (Prelude.Maybe [Route])
networkFirewallBlackHoleRouteDetectedViolation_violatingRoutes :: (Maybe [Route] -> f (Maybe [Route]))
-> NetworkFirewallBlackHoleRouteDetectedViolation
-> f NetworkFirewallBlackHoleRouteDetectedViolation
networkFirewallBlackHoleRouteDetectedViolation_violatingRoutes = (NetworkFirewallBlackHoleRouteDetectedViolation -> Maybe [Route])
-> (NetworkFirewallBlackHoleRouteDetectedViolation
-> Maybe [Route] -> NetworkFirewallBlackHoleRouteDetectedViolation)
-> Lens
NetworkFirewallBlackHoleRouteDetectedViolation
NetworkFirewallBlackHoleRouteDetectedViolation
(Maybe [Route])
(Maybe [Route])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallBlackHoleRouteDetectedViolation' {Maybe [Route]
violatingRoutes :: Maybe [Route]
$sel:violatingRoutes:NetworkFirewallBlackHoleRouteDetectedViolation' :: NetworkFirewallBlackHoleRouteDetectedViolation -> Maybe [Route]
violatingRoutes} -> Maybe [Route]
violatingRoutes) (\s :: NetworkFirewallBlackHoleRouteDetectedViolation
s@NetworkFirewallBlackHoleRouteDetectedViolation' {} Maybe [Route]
a -> NetworkFirewallBlackHoleRouteDetectedViolation
s {$sel:violatingRoutes:NetworkFirewallBlackHoleRouteDetectedViolation' :: Maybe [Route]
violatingRoutes = Maybe [Route]
a} :: NetworkFirewallBlackHoleRouteDetectedViolation) ((Maybe [Route] -> f (Maybe [Route]))
-> NetworkFirewallBlackHoleRouteDetectedViolation
-> f NetworkFirewallBlackHoleRouteDetectedViolation)
-> ((Maybe [Route] -> f (Maybe [Route]))
-> Maybe [Route] -> f (Maybe [Route]))
-> (Maybe [Route] -> f (Maybe [Route]))
-> NetworkFirewallBlackHoleRouteDetectedViolation
-> f NetworkFirewallBlackHoleRouteDetectedViolation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Route] [Route] [Route] [Route]
-> Iso
(Maybe [Route]) (Maybe [Route]) (Maybe [Route]) (Maybe [Route])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Route] [Route] [Route] [Route]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
networkFirewallBlackHoleRouteDetectedViolation_violationTarget :: Lens.Lens' NetworkFirewallBlackHoleRouteDetectedViolation (Prelude.Maybe Prelude.Text)
networkFirewallBlackHoleRouteDetectedViolation_violationTarget :: (Maybe Text -> f (Maybe Text))
-> NetworkFirewallBlackHoleRouteDetectedViolation
-> f NetworkFirewallBlackHoleRouteDetectedViolation
networkFirewallBlackHoleRouteDetectedViolation_violationTarget = (NetworkFirewallBlackHoleRouteDetectedViolation -> Maybe Text)
-> (NetworkFirewallBlackHoleRouteDetectedViolation
-> Maybe Text -> NetworkFirewallBlackHoleRouteDetectedViolation)
-> Lens
NetworkFirewallBlackHoleRouteDetectedViolation
NetworkFirewallBlackHoleRouteDetectedViolation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkFirewallBlackHoleRouteDetectedViolation' {Maybe Text
violationTarget :: Maybe Text
$sel:violationTarget:NetworkFirewallBlackHoleRouteDetectedViolation' :: NetworkFirewallBlackHoleRouteDetectedViolation -> Maybe Text
violationTarget} -> Maybe Text
violationTarget) (\s :: NetworkFirewallBlackHoleRouteDetectedViolation
s@NetworkFirewallBlackHoleRouteDetectedViolation' {} Maybe Text
a -> NetworkFirewallBlackHoleRouteDetectedViolation
s {$sel:violationTarget:NetworkFirewallBlackHoleRouteDetectedViolation' :: Maybe Text
violationTarget = Maybe Text
a} :: NetworkFirewallBlackHoleRouteDetectedViolation)
instance
Core.FromJSON
NetworkFirewallBlackHoleRouteDetectedViolation
where
parseJSON :: Value -> Parser NetworkFirewallBlackHoleRouteDetectedViolation
parseJSON =
String
-> (Object
-> Parser NetworkFirewallBlackHoleRouteDetectedViolation)
-> Value
-> Parser NetworkFirewallBlackHoleRouteDetectedViolation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NetworkFirewallBlackHoleRouteDetectedViolation"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe [Route]
-> Maybe Text
-> NetworkFirewallBlackHoleRouteDetectedViolation
NetworkFirewallBlackHoleRouteDetectedViolation'
(Maybe Text
-> Maybe Text
-> Maybe [Route]
-> Maybe Text
-> NetworkFirewallBlackHoleRouteDetectedViolation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [Route]
-> Maybe Text
-> NetworkFirewallBlackHoleRouteDetectedViolation)
forall (f :: * -> *) a b. Functor 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
"RouteTableId")
Parser
(Maybe Text
-> Maybe [Route]
-> Maybe Text
-> NetworkFirewallBlackHoleRouteDetectedViolation)
-> Parser (Maybe Text)
-> Parser
(Maybe [Route]
-> Maybe Text -> NetworkFirewallBlackHoleRouteDetectedViolation)
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
"VpcId")
Parser
(Maybe [Route]
-> Maybe Text -> NetworkFirewallBlackHoleRouteDetectedViolation)
-> Parser (Maybe [Route])
-> Parser
(Maybe Text -> NetworkFirewallBlackHoleRouteDetectedViolation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Route]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ViolatingRoutes"
Parser (Maybe (Maybe [Route]))
-> Maybe [Route] -> Parser (Maybe [Route])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Route]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text -> NetworkFirewallBlackHoleRouteDetectedViolation)
-> Parser (Maybe Text)
-> Parser NetworkFirewallBlackHoleRouteDetectedViolation
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")
)
instance
Prelude.Hashable
NetworkFirewallBlackHoleRouteDetectedViolation
instance
Prelude.NFData
NetworkFirewallBlackHoleRouteDetectedViolation