{-# 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.DnsRuleGroupLimitExceededViolation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DnsRuleGroupLimitExceededViolation = DnsRuleGroupLimitExceededViolation'
{
DnsRuleGroupLimitExceededViolation -> Maybe Text
violationTargetDescription :: Prelude.Maybe Prelude.Text,
DnsRuleGroupLimitExceededViolation -> Maybe Text
violationTarget :: Prelude.Maybe Prelude.Text,
DnsRuleGroupLimitExceededViolation -> Maybe Int
numberOfRuleGroupsAlreadyAssociated :: Prelude.Maybe Prelude.Int
}
deriving (DnsRuleGroupLimitExceededViolation
-> DnsRuleGroupLimitExceededViolation -> Bool
(DnsRuleGroupLimitExceededViolation
-> DnsRuleGroupLimitExceededViolation -> Bool)
-> (DnsRuleGroupLimitExceededViolation
-> DnsRuleGroupLimitExceededViolation -> Bool)
-> Eq DnsRuleGroupLimitExceededViolation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DnsRuleGroupLimitExceededViolation
-> DnsRuleGroupLimitExceededViolation -> Bool
$c/= :: DnsRuleGroupLimitExceededViolation
-> DnsRuleGroupLimitExceededViolation -> Bool
== :: DnsRuleGroupLimitExceededViolation
-> DnsRuleGroupLimitExceededViolation -> Bool
$c== :: DnsRuleGroupLimitExceededViolation
-> DnsRuleGroupLimitExceededViolation -> Bool
Prelude.Eq, ReadPrec [DnsRuleGroupLimitExceededViolation]
ReadPrec DnsRuleGroupLimitExceededViolation
Int -> ReadS DnsRuleGroupLimitExceededViolation
ReadS [DnsRuleGroupLimitExceededViolation]
(Int -> ReadS DnsRuleGroupLimitExceededViolation)
-> ReadS [DnsRuleGroupLimitExceededViolation]
-> ReadPrec DnsRuleGroupLimitExceededViolation
-> ReadPrec [DnsRuleGroupLimitExceededViolation]
-> Read DnsRuleGroupLimitExceededViolation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DnsRuleGroupLimitExceededViolation]
$creadListPrec :: ReadPrec [DnsRuleGroupLimitExceededViolation]
readPrec :: ReadPrec DnsRuleGroupLimitExceededViolation
$creadPrec :: ReadPrec DnsRuleGroupLimitExceededViolation
readList :: ReadS [DnsRuleGroupLimitExceededViolation]
$creadList :: ReadS [DnsRuleGroupLimitExceededViolation]
readsPrec :: Int -> ReadS DnsRuleGroupLimitExceededViolation
$creadsPrec :: Int -> ReadS DnsRuleGroupLimitExceededViolation
Prelude.Read, Int -> DnsRuleGroupLimitExceededViolation -> ShowS
[DnsRuleGroupLimitExceededViolation] -> ShowS
DnsRuleGroupLimitExceededViolation -> String
(Int -> DnsRuleGroupLimitExceededViolation -> ShowS)
-> (DnsRuleGroupLimitExceededViolation -> String)
-> ([DnsRuleGroupLimitExceededViolation] -> ShowS)
-> Show DnsRuleGroupLimitExceededViolation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DnsRuleGroupLimitExceededViolation] -> ShowS
$cshowList :: [DnsRuleGroupLimitExceededViolation] -> ShowS
show :: DnsRuleGroupLimitExceededViolation -> String
$cshow :: DnsRuleGroupLimitExceededViolation -> String
showsPrec :: Int -> DnsRuleGroupLimitExceededViolation -> ShowS
$cshowsPrec :: Int -> DnsRuleGroupLimitExceededViolation -> ShowS
Prelude.Show, (forall x.
DnsRuleGroupLimitExceededViolation
-> Rep DnsRuleGroupLimitExceededViolation x)
-> (forall x.
Rep DnsRuleGroupLimitExceededViolation x
-> DnsRuleGroupLimitExceededViolation)
-> Generic DnsRuleGroupLimitExceededViolation
forall x.
Rep DnsRuleGroupLimitExceededViolation x
-> DnsRuleGroupLimitExceededViolation
forall x.
DnsRuleGroupLimitExceededViolation
-> Rep DnsRuleGroupLimitExceededViolation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DnsRuleGroupLimitExceededViolation x
-> DnsRuleGroupLimitExceededViolation
$cfrom :: forall x.
DnsRuleGroupLimitExceededViolation
-> Rep DnsRuleGroupLimitExceededViolation x
Prelude.Generic)
newDnsRuleGroupLimitExceededViolation ::
DnsRuleGroupLimitExceededViolation
newDnsRuleGroupLimitExceededViolation :: DnsRuleGroupLimitExceededViolation
newDnsRuleGroupLimitExceededViolation =
DnsRuleGroupLimitExceededViolation' :: Maybe Text
-> Maybe Text -> Maybe Int -> DnsRuleGroupLimitExceededViolation
DnsRuleGroupLimitExceededViolation'
{ $sel:violationTargetDescription:DnsRuleGroupLimitExceededViolation' :: Maybe Text
violationTargetDescription =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:violationTarget:DnsRuleGroupLimitExceededViolation' :: Maybe Text
violationTarget = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfRuleGroupsAlreadyAssociated:DnsRuleGroupLimitExceededViolation' :: Maybe Int
numberOfRuleGroupsAlreadyAssociated =
Maybe Int
forall a. Maybe a
Prelude.Nothing
}
dnsRuleGroupLimitExceededViolation_violationTargetDescription :: Lens.Lens' DnsRuleGroupLimitExceededViolation (Prelude.Maybe Prelude.Text)
dnsRuleGroupLimitExceededViolation_violationTargetDescription :: (Maybe Text -> f (Maybe Text))
-> DnsRuleGroupLimitExceededViolation
-> f DnsRuleGroupLimitExceededViolation
dnsRuleGroupLimitExceededViolation_violationTargetDescription = (DnsRuleGroupLimitExceededViolation -> Maybe Text)
-> (DnsRuleGroupLimitExceededViolation
-> Maybe Text -> DnsRuleGroupLimitExceededViolation)
-> Lens
DnsRuleGroupLimitExceededViolation
DnsRuleGroupLimitExceededViolation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DnsRuleGroupLimitExceededViolation' {Maybe Text
violationTargetDescription :: Maybe Text
$sel:violationTargetDescription:DnsRuleGroupLimitExceededViolation' :: DnsRuleGroupLimitExceededViolation -> Maybe Text
violationTargetDescription} -> Maybe Text
violationTargetDescription) (\s :: DnsRuleGroupLimitExceededViolation
s@DnsRuleGroupLimitExceededViolation' {} Maybe Text
a -> DnsRuleGroupLimitExceededViolation
s {$sel:violationTargetDescription:DnsRuleGroupLimitExceededViolation' :: Maybe Text
violationTargetDescription = Maybe Text
a} :: DnsRuleGroupLimitExceededViolation)
dnsRuleGroupLimitExceededViolation_violationTarget :: Lens.Lens' DnsRuleGroupLimitExceededViolation (Prelude.Maybe Prelude.Text)
dnsRuleGroupLimitExceededViolation_violationTarget :: (Maybe Text -> f (Maybe Text))
-> DnsRuleGroupLimitExceededViolation
-> f DnsRuleGroupLimitExceededViolation
dnsRuleGroupLimitExceededViolation_violationTarget = (DnsRuleGroupLimitExceededViolation -> Maybe Text)
-> (DnsRuleGroupLimitExceededViolation
-> Maybe Text -> DnsRuleGroupLimitExceededViolation)
-> Lens
DnsRuleGroupLimitExceededViolation
DnsRuleGroupLimitExceededViolation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DnsRuleGroupLimitExceededViolation' {Maybe Text
violationTarget :: Maybe Text
$sel:violationTarget:DnsRuleGroupLimitExceededViolation' :: DnsRuleGroupLimitExceededViolation -> Maybe Text
violationTarget} -> Maybe Text
violationTarget) (\s :: DnsRuleGroupLimitExceededViolation
s@DnsRuleGroupLimitExceededViolation' {} Maybe Text
a -> DnsRuleGroupLimitExceededViolation
s {$sel:violationTarget:DnsRuleGroupLimitExceededViolation' :: Maybe Text
violationTarget = Maybe Text
a} :: DnsRuleGroupLimitExceededViolation)
dnsRuleGroupLimitExceededViolation_numberOfRuleGroupsAlreadyAssociated :: Lens.Lens' DnsRuleGroupLimitExceededViolation (Prelude.Maybe Prelude.Int)
dnsRuleGroupLimitExceededViolation_numberOfRuleGroupsAlreadyAssociated :: (Maybe Int -> f (Maybe Int))
-> DnsRuleGroupLimitExceededViolation
-> f DnsRuleGroupLimitExceededViolation
dnsRuleGroupLimitExceededViolation_numberOfRuleGroupsAlreadyAssociated = (DnsRuleGroupLimitExceededViolation -> Maybe Int)
-> (DnsRuleGroupLimitExceededViolation
-> Maybe Int -> DnsRuleGroupLimitExceededViolation)
-> Lens
DnsRuleGroupLimitExceededViolation
DnsRuleGroupLimitExceededViolation
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DnsRuleGroupLimitExceededViolation' {Maybe Int
numberOfRuleGroupsAlreadyAssociated :: Maybe Int
$sel:numberOfRuleGroupsAlreadyAssociated:DnsRuleGroupLimitExceededViolation' :: DnsRuleGroupLimitExceededViolation -> Maybe Int
numberOfRuleGroupsAlreadyAssociated} -> Maybe Int
numberOfRuleGroupsAlreadyAssociated) (\s :: DnsRuleGroupLimitExceededViolation
s@DnsRuleGroupLimitExceededViolation' {} Maybe Int
a -> DnsRuleGroupLimitExceededViolation
s {$sel:numberOfRuleGroupsAlreadyAssociated:DnsRuleGroupLimitExceededViolation' :: Maybe Int
numberOfRuleGroupsAlreadyAssociated = Maybe Int
a} :: DnsRuleGroupLimitExceededViolation)
instance
Core.FromJSON
DnsRuleGroupLimitExceededViolation
where
parseJSON :: Value -> Parser DnsRuleGroupLimitExceededViolation
parseJSON =
String
-> (Object -> Parser DnsRuleGroupLimitExceededViolation)
-> Value
-> Parser DnsRuleGroupLimitExceededViolation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DnsRuleGroupLimitExceededViolation"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Int -> DnsRuleGroupLimitExceededViolation
DnsRuleGroupLimitExceededViolation'
(Maybe Text
-> Maybe Text -> Maybe Int -> DnsRuleGroupLimitExceededViolation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Int -> DnsRuleGroupLimitExceededViolation)
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 Text -> Maybe Int -> DnsRuleGroupLimitExceededViolation)
-> Parser (Maybe Text)
-> Parser (Maybe Int -> DnsRuleGroupLimitExceededViolation)
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 Int -> DnsRuleGroupLimitExceededViolation)
-> Parser (Maybe Int) -> Parser DnsRuleGroupLimitExceededViolation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumberOfRuleGroupsAlreadyAssociated")
)
instance
Prelude.Hashable
DnsRuleGroupLimitExceededViolation
instance
Prelude.NFData
DnsRuleGroupLimitExceededViolation