{-# 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.AwsVPCSecurityGroupViolation where
import qualified Amazonka.Core as Core
import Amazonka.FMS.Types.PartialMatch
import Amazonka.FMS.Types.SecurityGroupRemediationAction
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsVPCSecurityGroupViolation = AwsVPCSecurityGroupViolation'
{
AwsVPCSecurityGroupViolation -> Maybe Text
violationTargetDescription :: Prelude.Maybe Prelude.Text,
AwsVPCSecurityGroupViolation
-> Maybe [SecurityGroupRemediationAction]
possibleSecurityGroupRemediationActions :: Prelude.Maybe [SecurityGroupRemediationAction],
AwsVPCSecurityGroupViolation -> Maybe Text
violationTarget :: Prelude.Maybe Prelude.Text,
AwsVPCSecurityGroupViolation -> Maybe [PartialMatch]
partialMatches :: Prelude.Maybe [PartialMatch]
}
deriving (AwsVPCSecurityGroupViolation
-> AwsVPCSecurityGroupViolation -> Bool
(AwsVPCSecurityGroupViolation
-> AwsVPCSecurityGroupViolation -> Bool)
-> (AwsVPCSecurityGroupViolation
-> AwsVPCSecurityGroupViolation -> Bool)
-> Eq AwsVPCSecurityGroupViolation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsVPCSecurityGroupViolation
-> AwsVPCSecurityGroupViolation -> Bool
$c/= :: AwsVPCSecurityGroupViolation
-> AwsVPCSecurityGroupViolation -> Bool
== :: AwsVPCSecurityGroupViolation
-> AwsVPCSecurityGroupViolation -> Bool
$c== :: AwsVPCSecurityGroupViolation
-> AwsVPCSecurityGroupViolation -> Bool
Prelude.Eq, ReadPrec [AwsVPCSecurityGroupViolation]
ReadPrec AwsVPCSecurityGroupViolation
Int -> ReadS AwsVPCSecurityGroupViolation
ReadS [AwsVPCSecurityGroupViolation]
(Int -> ReadS AwsVPCSecurityGroupViolation)
-> ReadS [AwsVPCSecurityGroupViolation]
-> ReadPrec AwsVPCSecurityGroupViolation
-> ReadPrec [AwsVPCSecurityGroupViolation]
-> Read AwsVPCSecurityGroupViolation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsVPCSecurityGroupViolation]
$creadListPrec :: ReadPrec [AwsVPCSecurityGroupViolation]
readPrec :: ReadPrec AwsVPCSecurityGroupViolation
$creadPrec :: ReadPrec AwsVPCSecurityGroupViolation
readList :: ReadS [AwsVPCSecurityGroupViolation]
$creadList :: ReadS [AwsVPCSecurityGroupViolation]
readsPrec :: Int -> ReadS AwsVPCSecurityGroupViolation
$creadsPrec :: Int -> ReadS AwsVPCSecurityGroupViolation
Prelude.Read, Int -> AwsVPCSecurityGroupViolation -> ShowS
[AwsVPCSecurityGroupViolation] -> ShowS
AwsVPCSecurityGroupViolation -> String
(Int -> AwsVPCSecurityGroupViolation -> ShowS)
-> (AwsVPCSecurityGroupViolation -> String)
-> ([AwsVPCSecurityGroupViolation] -> ShowS)
-> Show AwsVPCSecurityGroupViolation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsVPCSecurityGroupViolation] -> ShowS
$cshowList :: [AwsVPCSecurityGroupViolation] -> ShowS
show :: AwsVPCSecurityGroupViolation -> String
$cshow :: AwsVPCSecurityGroupViolation -> String
showsPrec :: Int -> AwsVPCSecurityGroupViolation -> ShowS
$cshowsPrec :: Int -> AwsVPCSecurityGroupViolation -> ShowS
Prelude.Show, (forall x.
AwsVPCSecurityGroupViolation -> Rep AwsVPCSecurityGroupViolation x)
-> (forall x.
Rep AwsVPCSecurityGroupViolation x -> AwsVPCSecurityGroupViolation)
-> Generic AwsVPCSecurityGroupViolation
forall x.
Rep AwsVPCSecurityGroupViolation x -> AwsVPCSecurityGroupViolation
forall x.
AwsVPCSecurityGroupViolation -> Rep AwsVPCSecurityGroupViolation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsVPCSecurityGroupViolation x -> AwsVPCSecurityGroupViolation
$cfrom :: forall x.
AwsVPCSecurityGroupViolation -> Rep AwsVPCSecurityGroupViolation x
Prelude.Generic)
newAwsVPCSecurityGroupViolation ::
AwsVPCSecurityGroupViolation
newAwsVPCSecurityGroupViolation :: AwsVPCSecurityGroupViolation
newAwsVPCSecurityGroupViolation =
AwsVPCSecurityGroupViolation' :: Maybe Text
-> Maybe [SecurityGroupRemediationAction]
-> Maybe Text
-> Maybe [PartialMatch]
-> AwsVPCSecurityGroupViolation
AwsVPCSecurityGroupViolation'
{ $sel:violationTargetDescription:AwsVPCSecurityGroupViolation' :: Maybe Text
violationTargetDescription =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:possibleSecurityGroupRemediationActions:AwsVPCSecurityGroupViolation' :: Maybe [SecurityGroupRemediationAction]
possibleSecurityGroupRemediationActions =
Maybe [SecurityGroupRemediationAction]
forall a. Maybe a
Prelude.Nothing,
$sel:violationTarget:AwsVPCSecurityGroupViolation' :: Maybe Text
violationTarget = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:partialMatches:AwsVPCSecurityGroupViolation' :: Maybe [PartialMatch]
partialMatches = Maybe [PartialMatch]
forall a. Maybe a
Prelude.Nothing
}
awsVPCSecurityGroupViolation_violationTargetDescription :: Lens.Lens' AwsVPCSecurityGroupViolation (Prelude.Maybe Prelude.Text)
awsVPCSecurityGroupViolation_violationTargetDescription :: (Maybe Text -> f (Maybe Text))
-> AwsVPCSecurityGroupViolation -> f AwsVPCSecurityGroupViolation
awsVPCSecurityGroupViolation_violationTargetDescription = (AwsVPCSecurityGroupViolation -> Maybe Text)
-> (AwsVPCSecurityGroupViolation
-> Maybe Text -> AwsVPCSecurityGroupViolation)
-> Lens
AwsVPCSecurityGroupViolation
AwsVPCSecurityGroupViolation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsVPCSecurityGroupViolation' {Maybe Text
violationTargetDescription :: Maybe Text
$sel:violationTargetDescription:AwsVPCSecurityGroupViolation' :: AwsVPCSecurityGroupViolation -> Maybe Text
violationTargetDescription} -> Maybe Text
violationTargetDescription) (\s :: AwsVPCSecurityGroupViolation
s@AwsVPCSecurityGroupViolation' {} Maybe Text
a -> AwsVPCSecurityGroupViolation
s {$sel:violationTargetDescription:AwsVPCSecurityGroupViolation' :: Maybe Text
violationTargetDescription = Maybe Text
a} :: AwsVPCSecurityGroupViolation)
awsVPCSecurityGroupViolation_possibleSecurityGroupRemediationActions :: Lens.Lens' AwsVPCSecurityGroupViolation (Prelude.Maybe [SecurityGroupRemediationAction])
awsVPCSecurityGroupViolation_possibleSecurityGroupRemediationActions :: (Maybe [SecurityGroupRemediationAction]
-> f (Maybe [SecurityGroupRemediationAction]))
-> AwsVPCSecurityGroupViolation -> f AwsVPCSecurityGroupViolation
awsVPCSecurityGroupViolation_possibleSecurityGroupRemediationActions = (AwsVPCSecurityGroupViolation
-> Maybe [SecurityGroupRemediationAction])
-> (AwsVPCSecurityGroupViolation
-> Maybe [SecurityGroupRemediationAction]
-> AwsVPCSecurityGroupViolation)
-> Lens
AwsVPCSecurityGroupViolation
AwsVPCSecurityGroupViolation
(Maybe [SecurityGroupRemediationAction])
(Maybe [SecurityGroupRemediationAction])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsVPCSecurityGroupViolation' {Maybe [SecurityGroupRemediationAction]
possibleSecurityGroupRemediationActions :: Maybe [SecurityGroupRemediationAction]
$sel:possibleSecurityGroupRemediationActions:AwsVPCSecurityGroupViolation' :: AwsVPCSecurityGroupViolation
-> Maybe [SecurityGroupRemediationAction]
possibleSecurityGroupRemediationActions} -> Maybe [SecurityGroupRemediationAction]
possibleSecurityGroupRemediationActions) (\s :: AwsVPCSecurityGroupViolation
s@AwsVPCSecurityGroupViolation' {} Maybe [SecurityGroupRemediationAction]
a -> AwsVPCSecurityGroupViolation
s {$sel:possibleSecurityGroupRemediationActions:AwsVPCSecurityGroupViolation' :: Maybe [SecurityGroupRemediationAction]
possibleSecurityGroupRemediationActions = Maybe [SecurityGroupRemediationAction]
a} :: AwsVPCSecurityGroupViolation) ((Maybe [SecurityGroupRemediationAction]
-> f (Maybe [SecurityGroupRemediationAction]))
-> AwsVPCSecurityGroupViolation -> f AwsVPCSecurityGroupViolation)
-> ((Maybe [SecurityGroupRemediationAction]
-> f (Maybe [SecurityGroupRemediationAction]))
-> Maybe [SecurityGroupRemediationAction]
-> f (Maybe [SecurityGroupRemediationAction]))
-> (Maybe [SecurityGroupRemediationAction]
-> f (Maybe [SecurityGroupRemediationAction]))
-> AwsVPCSecurityGroupViolation
-> f AwsVPCSecurityGroupViolation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[SecurityGroupRemediationAction]
[SecurityGroupRemediationAction]
[SecurityGroupRemediationAction]
[SecurityGroupRemediationAction]
-> Iso
(Maybe [SecurityGroupRemediationAction])
(Maybe [SecurityGroupRemediationAction])
(Maybe [SecurityGroupRemediationAction])
(Maybe [SecurityGroupRemediationAction])
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
[SecurityGroupRemediationAction]
[SecurityGroupRemediationAction]
[SecurityGroupRemediationAction]
[SecurityGroupRemediationAction]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
awsVPCSecurityGroupViolation_violationTarget :: Lens.Lens' AwsVPCSecurityGroupViolation (Prelude.Maybe Prelude.Text)
awsVPCSecurityGroupViolation_violationTarget :: (Maybe Text -> f (Maybe Text))
-> AwsVPCSecurityGroupViolation -> f AwsVPCSecurityGroupViolation
awsVPCSecurityGroupViolation_violationTarget = (AwsVPCSecurityGroupViolation -> Maybe Text)
-> (AwsVPCSecurityGroupViolation
-> Maybe Text -> AwsVPCSecurityGroupViolation)
-> Lens
AwsVPCSecurityGroupViolation
AwsVPCSecurityGroupViolation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsVPCSecurityGroupViolation' {Maybe Text
violationTarget :: Maybe Text
$sel:violationTarget:AwsVPCSecurityGroupViolation' :: AwsVPCSecurityGroupViolation -> Maybe Text
violationTarget} -> Maybe Text
violationTarget) (\s :: AwsVPCSecurityGroupViolation
s@AwsVPCSecurityGroupViolation' {} Maybe Text
a -> AwsVPCSecurityGroupViolation
s {$sel:violationTarget:AwsVPCSecurityGroupViolation' :: Maybe Text
violationTarget = Maybe Text
a} :: AwsVPCSecurityGroupViolation)
awsVPCSecurityGroupViolation_partialMatches :: Lens.Lens' AwsVPCSecurityGroupViolation (Prelude.Maybe [PartialMatch])
awsVPCSecurityGroupViolation_partialMatches :: (Maybe [PartialMatch] -> f (Maybe [PartialMatch]))
-> AwsVPCSecurityGroupViolation -> f AwsVPCSecurityGroupViolation
awsVPCSecurityGroupViolation_partialMatches = (AwsVPCSecurityGroupViolation -> Maybe [PartialMatch])
-> (AwsVPCSecurityGroupViolation
-> Maybe [PartialMatch] -> AwsVPCSecurityGroupViolation)
-> Lens
AwsVPCSecurityGroupViolation
AwsVPCSecurityGroupViolation
(Maybe [PartialMatch])
(Maybe [PartialMatch])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsVPCSecurityGroupViolation' {Maybe [PartialMatch]
partialMatches :: Maybe [PartialMatch]
$sel:partialMatches:AwsVPCSecurityGroupViolation' :: AwsVPCSecurityGroupViolation -> Maybe [PartialMatch]
partialMatches} -> Maybe [PartialMatch]
partialMatches) (\s :: AwsVPCSecurityGroupViolation
s@AwsVPCSecurityGroupViolation' {} Maybe [PartialMatch]
a -> AwsVPCSecurityGroupViolation
s {$sel:partialMatches:AwsVPCSecurityGroupViolation' :: Maybe [PartialMatch]
partialMatches = Maybe [PartialMatch]
a} :: AwsVPCSecurityGroupViolation) ((Maybe [PartialMatch] -> f (Maybe [PartialMatch]))
-> AwsVPCSecurityGroupViolation -> f AwsVPCSecurityGroupViolation)
-> ((Maybe [PartialMatch] -> f (Maybe [PartialMatch]))
-> Maybe [PartialMatch] -> f (Maybe [PartialMatch]))
-> (Maybe [PartialMatch] -> f (Maybe [PartialMatch]))
-> AwsVPCSecurityGroupViolation
-> f AwsVPCSecurityGroupViolation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [PartialMatch] [PartialMatch] [PartialMatch] [PartialMatch]
-> Iso
(Maybe [PartialMatch])
(Maybe [PartialMatch])
(Maybe [PartialMatch])
(Maybe [PartialMatch])
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 [PartialMatch] [PartialMatch] [PartialMatch] [PartialMatch]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON AwsVPCSecurityGroupViolation where
parseJSON :: Value -> Parser AwsVPCSecurityGroupViolation
parseJSON =
String
-> (Object -> Parser AwsVPCSecurityGroupViolation)
-> Value
-> Parser AwsVPCSecurityGroupViolation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsVPCSecurityGroupViolation"
( \Object
x ->
Maybe Text
-> Maybe [SecurityGroupRemediationAction]
-> Maybe Text
-> Maybe [PartialMatch]
-> AwsVPCSecurityGroupViolation
AwsVPCSecurityGroupViolation'
(Maybe Text
-> Maybe [SecurityGroupRemediationAction]
-> Maybe Text
-> Maybe [PartialMatch]
-> AwsVPCSecurityGroupViolation)
-> Parser (Maybe Text)
-> Parser
(Maybe [SecurityGroupRemediationAction]
-> Maybe Text
-> Maybe [PartialMatch]
-> AwsVPCSecurityGroupViolation)
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
"ViolationTargetDescription")
Parser
(Maybe [SecurityGroupRemediationAction]
-> Maybe Text
-> Maybe [PartialMatch]
-> AwsVPCSecurityGroupViolation)
-> Parser (Maybe [SecurityGroupRemediationAction])
-> Parser
(Maybe Text
-> Maybe [PartialMatch] -> AwsVPCSecurityGroupViolation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [SecurityGroupRemediationAction]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PossibleSecurityGroupRemediationActions"
Parser (Maybe (Maybe [SecurityGroupRemediationAction]))
-> Maybe [SecurityGroupRemediationAction]
-> Parser (Maybe [SecurityGroupRemediationAction])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [SecurityGroupRemediationAction]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe [PartialMatch] -> AwsVPCSecurityGroupViolation)
-> Parser (Maybe Text)
-> Parser (Maybe [PartialMatch] -> AwsVPCSecurityGroupViolation)
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 [PartialMatch] -> AwsVPCSecurityGroupViolation)
-> Parser (Maybe [PartialMatch])
-> Parser AwsVPCSecurityGroupViolation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [PartialMatch]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PartialMatches"
Parser (Maybe (Maybe [PartialMatch]))
-> Maybe [PartialMatch] -> Parser (Maybe [PartialMatch])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [PartialMatch]
forall a. Monoid a => a
Prelude.mempty
)
)
instance
Prelude.Hashable
AwsVPCSecurityGroupViolation
instance Prelude.NFData AwsVPCSecurityGroupViolation