{-# 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.Inspector.Types.InspectorServiceAttributes 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 InspectorServiceAttributes = InspectorServiceAttributes'
{
InspectorServiceAttributes -> Maybe Text
assessmentRunArn :: Prelude.Maybe Prelude.Text,
InspectorServiceAttributes -> Maybe Text
rulesPackageArn :: Prelude.Maybe Prelude.Text,
InspectorServiceAttributes -> Natural
schemaVersion :: Prelude.Natural
}
deriving (InspectorServiceAttributes -> InspectorServiceAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InspectorServiceAttributes -> InspectorServiceAttributes -> Bool
$c/= :: InspectorServiceAttributes -> InspectorServiceAttributes -> Bool
== :: InspectorServiceAttributes -> InspectorServiceAttributes -> Bool
$c== :: InspectorServiceAttributes -> InspectorServiceAttributes -> Bool
Prelude.Eq, ReadPrec [InspectorServiceAttributes]
ReadPrec InspectorServiceAttributes
Int -> ReadS InspectorServiceAttributes
ReadS [InspectorServiceAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InspectorServiceAttributes]
$creadListPrec :: ReadPrec [InspectorServiceAttributes]
readPrec :: ReadPrec InspectorServiceAttributes
$creadPrec :: ReadPrec InspectorServiceAttributes
readList :: ReadS [InspectorServiceAttributes]
$creadList :: ReadS [InspectorServiceAttributes]
readsPrec :: Int -> ReadS InspectorServiceAttributes
$creadsPrec :: Int -> ReadS InspectorServiceAttributes
Prelude.Read, Int -> InspectorServiceAttributes -> ShowS
[InspectorServiceAttributes] -> ShowS
InspectorServiceAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InspectorServiceAttributes] -> ShowS
$cshowList :: [InspectorServiceAttributes] -> ShowS
show :: InspectorServiceAttributes -> String
$cshow :: InspectorServiceAttributes -> String
showsPrec :: Int -> InspectorServiceAttributes -> ShowS
$cshowsPrec :: Int -> InspectorServiceAttributes -> ShowS
Prelude.Show, forall x.
Rep InspectorServiceAttributes x -> InspectorServiceAttributes
forall x.
InspectorServiceAttributes -> Rep InspectorServiceAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InspectorServiceAttributes x -> InspectorServiceAttributes
$cfrom :: forall x.
InspectorServiceAttributes -> Rep InspectorServiceAttributes x
Prelude.Generic)
newInspectorServiceAttributes ::
Prelude.Natural ->
InspectorServiceAttributes
newInspectorServiceAttributes :: Natural -> InspectorServiceAttributes
newInspectorServiceAttributes Natural
pSchemaVersion_ =
InspectorServiceAttributes'
{ $sel:assessmentRunArn:InspectorServiceAttributes' :: Maybe Text
assessmentRunArn =
forall a. Maybe a
Prelude.Nothing,
$sel:rulesPackageArn:InspectorServiceAttributes' :: Maybe Text
rulesPackageArn = forall a. Maybe a
Prelude.Nothing,
$sel:schemaVersion:InspectorServiceAttributes' :: Natural
schemaVersion = Natural
pSchemaVersion_
}
inspectorServiceAttributes_assessmentRunArn :: Lens.Lens' InspectorServiceAttributes (Prelude.Maybe Prelude.Text)
inspectorServiceAttributes_assessmentRunArn :: Lens' InspectorServiceAttributes (Maybe Text)
inspectorServiceAttributes_assessmentRunArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InspectorServiceAttributes' {Maybe Text
assessmentRunArn :: Maybe Text
$sel:assessmentRunArn:InspectorServiceAttributes' :: InspectorServiceAttributes -> Maybe Text
assessmentRunArn} -> Maybe Text
assessmentRunArn) (\s :: InspectorServiceAttributes
s@InspectorServiceAttributes' {} Maybe Text
a -> InspectorServiceAttributes
s {$sel:assessmentRunArn:InspectorServiceAttributes' :: Maybe Text
assessmentRunArn = Maybe Text
a} :: InspectorServiceAttributes)
inspectorServiceAttributes_rulesPackageArn :: Lens.Lens' InspectorServiceAttributes (Prelude.Maybe Prelude.Text)
inspectorServiceAttributes_rulesPackageArn :: Lens' InspectorServiceAttributes (Maybe Text)
inspectorServiceAttributes_rulesPackageArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InspectorServiceAttributes' {Maybe Text
rulesPackageArn :: Maybe Text
$sel:rulesPackageArn:InspectorServiceAttributes' :: InspectorServiceAttributes -> Maybe Text
rulesPackageArn} -> Maybe Text
rulesPackageArn) (\s :: InspectorServiceAttributes
s@InspectorServiceAttributes' {} Maybe Text
a -> InspectorServiceAttributes
s {$sel:rulesPackageArn:InspectorServiceAttributes' :: Maybe Text
rulesPackageArn = Maybe Text
a} :: InspectorServiceAttributes)
inspectorServiceAttributes_schemaVersion :: Lens.Lens' InspectorServiceAttributes Prelude.Natural
inspectorServiceAttributes_schemaVersion :: Lens' InspectorServiceAttributes Natural
inspectorServiceAttributes_schemaVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InspectorServiceAttributes' {Natural
schemaVersion :: Natural
$sel:schemaVersion:InspectorServiceAttributes' :: InspectorServiceAttributes -> Natural
schemaVersion} -> Natural
schemaVersion) (\s :: InspectorServiceAttributes
s@InspectorServiceAttributes' {} Natural
a -> InspectorServiceAttributes
s {$sel:schemaVersion:InspectorServiceAttributes' :: Natural
schemaVersion = Natural
a} :: InspectorServiceAttributes)
instance Data.FromJSON InspectorServiceAttributes where
parseJSON :: Value -> Parser InspectorServiceAttributes
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"InspectorServiceAttributes"
( \Object
x ->
Maybe Text -> Maybe Text -> Natural -> InspectorServiceAttributes
InspectorServiceAttributes'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"assessmentRunArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"rulesPackageArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"schemaVersion")
)
instance Prelude.Hashable InspectorServiceAttributes where
hashWithSalt :: Int -> InspectorServiceAttributes -> Int
hashWithSalt Int
_salt InspectorServiceAttributes' {Natural
Maybe Text
schemaVersion :: Natural
rulesPackageArn :: Maybe Text
assessmentRunArn :: Maybe Text
$sel:schemaVersion:InspectorServiceAttributes' :: InspectorServiceAttributes -> Natural
$sel:rulesPackageArn:InspectorServiceAttributes' :: InspectorServiceAttributes -> Maybe Text
$sel:assessmentRunArn:InspectorServiceAttributes' :: InspectorServiceAttributes -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
assessmentRunArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
rulesPackageArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
schemaVersion
instance Prelude.NFData InspectorServiceAttributes where
rnf :: InspectorServiceAttributes -> ()
rnf InspectorServiceAttributes' {Natural
Maybe Text
schemaVersion :: Natural
rulesPackageArn :: Maybe Text
assessmentRunArn :: Maybe Text
$sel:schemaVersion:InspectorServiceAttributes' :: InspectorServiceAttributes -> Natural
$sel:rulesPackageArn:InspectorServiceAttributes' :: InspectorServiceAttributes -> Maybe Text
$sel:assessmentRunArn:InspectorServiceAttributes' :: InspectorServiceAttributes -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
assessmentRunArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
rulesPackageArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
schemaVersion