{-# 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.Shield.Types.AttackVectorDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AttackVectorDescription = AttackVectorDescription'
{
AttackVectorDescription -> Text
vectorType :: Prelude.Text
}
deriving (AttackVectorDescription -> AttackVectorDescription -> Bool
(AttackVectorDescription -> AttackVectorDescription -> Bool)
-> (AttackVectorDescription -> AttackVectorDescription -> Bool)
-> Eq AttackVectorDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttackVectorDescription -> AttackVectorDescription -> Bool
$c/= :: AttackVectorDescription -> AttackVectorDescription -> Bool
== :: AttackVectorDescription -> AttackVectorDescription -> Bool
$c== :: AttackVectorDescription -> AttackVectorDescription -> Bool
Prelude.Eq, ReadPrec [AttackVectorDescription]
ReadPrec AttackVectorDescription
Int -> ReadS AttackVectorDescription
ReadS [AttackVectorDescription]
(Int -> ReadS AttackVectorDescription)
-> ReadS [AttackVectorDescription]
-> ReadPrec AttackVectorDescription
-> ReadPrec [AttackVectorDescription]
-> Read AttackVectorDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AttackVectorDescription]
$creadListPrec :: ReadPrec [AttackVectorDescription]
readPrec :: ReadPrec AttackVectorDescription
$creadPrec :: ReadPrec AttackVectorDescription
readList :: ReadS [AttackVectorDescription]
$creadList :: ReadS [AttackVectorDescription]
readsPrec :: Int -> ReadS AttackVectorDescription
$creadsPrec :: Int -> ReadS AttackVectorDescription
Prelude.Read, Int -> AttackVectorDescription -> ShowS
[AttackVectorDescription] -> ShowS
AttackVectorDescription -> String
(Int -> AttackVectorDescription -> ShowS)
-> (AttackVectorDescription -> String)
-> ([AttackVectorDescription] -> ShowS)
-> Show AttackVectorDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttackVectorDescription] -> ShowS
$cshowList :: [AttackVectorDescription] -> ShowS
show :: AttackVectorDescription -> String
$cshow :: AttackVectorDescription -> String
showsPrec :: Int -> AttackVectorDescription -> ShowS
$cshowsPrec :: Int -> AttackVectorDescription -> ShowS
Prelude.Show, (forall x.
AttackVectorDescription -> Rep AttackVectorDescription x)
-> (forall x.
Rep AttackVectorDescription x -> AttackVectorDescription)
-> Generic AttackVectorDescription
forall x. Rep AttackVectorDescription x -> AttackVectorDescription
forall x. AttackVectorDescription -> Rep AttackVectorDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AttackVectorDescription x -> AttackVectorDescription
$cfrom :: forall x. AttackVectorDescription -> Rep AttackVectorDescription x
Prelude.Generic)
newAttackVectorDescription ::
Prelude.Text ->
AttackVectorDescription
newAttackVectorDescription :: Text -> AttackVectorDescription
newAttackVectorDescription Text
pVectorType_ =
AttackVectorDescription' :: Text -> AttackVectorDescription
AttackVectorDescription' {$sel:vectorType:AttackVectorDescription' :: Text
vectorType = Text
pVectorType_}
attackVectorDescription_vectorType :: Lens.Lens' AttackVectorDescription Prelude.Text
attackVectorDescription_vectorType :: (Text -> f Text)
-> AttackVectorDescription -> f AttackVectorDescription
attackVectorDescription_vectorType = (AttackVectorDescription -> Text)
-> (AttackVectorDescription -> Text -> AttackVectorDescription)
-> Lens AttackVectorDescription AttackVectorDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttackVectorDescription' {Text
vectorType :: Text
$sel:vectorType:AttackVectorDescription' :: AttackVectorDescription -> Text
vectorType} -> Text
vectorType) (\s :: AttackVectorDescription
s@AttackVectorDescription' {} Text
a -> AttackVectorDescription
s {$sel:vectorType:AttackVectorDescription' :: Text
vectorType = Text
a} :: AttackVectorDescription)
instance Core.FromJSON AttackVectorDescription where
parseJSON :: Value -> Parser AttackVectorDescription
parseJSON =
String
-> (Object -> Parser AttackVectorDescription)
-> Value
-> Parser AttackVectorDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AttackVectorDescription"
( \Object
x ->
Text -> AttackVectorDescription
AttackVectorDescription'
(Text -> AttackVectorDescription)
-> Parser Text -> Parser AttackVectorDescription
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"VectorType")
)
instance Prelude.Hashable AttackVectorDescription
instance Prelude.NFData AttackVectorDescription