{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data AttackVectorDescription = AttackVectorDescription'
{
AttackVectorDescription -> Text
vectorType :: Prelude.Text
}
deriving (AttackVectorDescription -> AttackVectorDescription -> Bool
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]
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
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. 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' {$sel:vectorType:AttackVectorDescription' :: Text
vectorType = Text
pVectorType_}
attackVectorDescription_vectorType :: Lens.Lens' AttackVectorDescription Prelude.Text
attackVectorDescription_vectorType :: Lens' AttackVectorDescription Text
attackVectorDescription_vectorType = 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 Data.FromJSON AttackVectorDescription where
parseJSON :: Value -> Parser AttackVectorDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AttackVectorDescription"
( \Object
x ->
Text -> AttackVectorDescription
AttackVectorDescription'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"VectorType")
)
instance Prelude.Hashable AttackVectorDescription where
hashWithSalt :: Int -> AttackVectorDescription -> Int
hashWithSalt Int
_salt AttackVectorDescription' {Text
vectorType :: Text
$sel:vectorType:AttackVectorDescription' :: AttackVectorDescription -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vectorType
instance Prelude.NFData AttackVectorDescription where
rnf :: AttackVectorDescription -> ()
rnf AttackVectorDescription' {Text
vectorType :: Text
$sel:vectorType:AttackVectorDescription' :: AttackVectorDescription -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
vectorType