{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InspectorServiceAttributes = InspectorServiceAttributes'
{
InspectorServiceAttributes -> Maybe Text
rulesPackageArn :: Prelude.Maybe Prelude.Text,
InspectorServiceAttributes -> Maybe Text
assessmentRunArn :: Prelude.Maybe Prelude.Text,
InspectorServiceAttributes -> Natural
schemaVersion :: Prelude.Natural
}
deriving (InspectorServiceAttributes -> InspectorServiceAttributes -> Bool
(InspectorServiceAttributes -> InspectorServiceAttributes -> Bool)
-> (InspectorServiceAttributes
-> InspectorServiceAttributes -> Bool)
-> Eq InspectorServiceAttributes
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]
(Int -> ReadS InspectorServiceAttributes)
-> ReadS [InspectorServiceAttributes]
-> ReadPrec InspectorServiceAttributes
-> ReadPrec [InspectorServiceAttributes]
-> Read 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
(Int -> InspectorServiceAttributes -> ShowS)
-> (InspectorServiceAttributes -> String)
-> ([InspectorServiceAttributes] -> ShowS)
-> Show InspectorServiceAttributes
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.
InspectorServiceAttributes -> Rep InspectorServiceAttributes x)
-> (forall x.
Rep InspectorServiceAttributes x -> InspectorServiceAttributes)
-> Generic InspectorServiceAttributes
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' :: Maybe Text -> Maybe Text -> Natural -> InspectorServiceAttributes
InspectorServiceAttributes'
{ $sel:rulesPackageArn:InspectorServiceAttributes' :: Maybe Text
rulesPackageArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:assessmentRunArn:InspectorServiceAttributes' :: Maybe Text
assessmentRunArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:schemaVersion:InspectorServiceAttributes' :: Natural
schemaVersion = Natural
pSchemaVersion_
}
inspectorServiceAttributes_rulesPackageArn :: Lens.Lens' InspectorServiceAttributes (Prelude.Maybe Prelude.Text)
inspectorServiceAttributes_rulesPackageArn :: (Maybe Text -> f (Maybe Text))
-> InspectorServiceAttributes -> f InspectorServiceAttributes
inspectorServiceAttributes_rulesPackageArn = (InspectorServiceAttributes -> Maybe Text)
-> (InspectorServiceAttributes
-> Maybe Text -> InspectorServiceAttributes)
-> Lens
InspectorServiceAttributes
InspectorServiceAttributes
(Maybe Text)
(Maybe Text)
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_assessmentRunArn :: Lens.Lens' InspectorServiceAttributes (Prelude.Maybe Prelude.Text)
inspectorServiceAttributes_assessmentRunArn :: (Maybe Text -> f (Maybe Text))
-> InspectorServiceAttributes -> f InspectorServiceAttributes
inspectorServiceAttributes_assessmentRunArn = (InspectorServiceAttributes -> Maybe Text)
-> (InspectorServiceAttributes
-> Maybe Text -> InspectorServiceAttributes)
-> Lens
InspectorServiceAttributes
InspectorServiceAttributes
(Maybe Text)
(Maybe Text)
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_schemaVersion :: Lens.Lens' InspectorServiceAttributes Prelude.Natural
inspectorServiceAttributes_schemaVersion :: (Natural -> f Natural)
-> InspectorServiceAttributes -> f InspectorServiceAttributes
inspectorServiceAttributes_schemaVersion = (InspectorServiceAttributes -> Natural)
-> (InspectorServiceAttributes
-> Natural -> InspectorServiceAttributes)
-> Lens
InspectorServiceAttributes
InspectorServiceAttributes
Natural
Natural
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 Core.FromJSON InspectorServiceAttributes where
parseJSON :: Value -> Parser InspectorServiceAttributes
parseJSON =
String
-> (Object -> Parser InspectorServiceAttributes)
-> Value
-> Parser InspectorServiceAttributes
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InspectorServiceAttributes"
( \Object
x ->
Maybe Text -> Maybe Text -> Natural -> InspectorServiceAttributes
InspectorServiceAttributes'
(Maybe Text -> Maybe Text -> Natural -> InspectorServiceAttributes)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Natural -> InspectorServiceAttributes)
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
"rulesPackageArn")
Parser (Maybe Text -> Natural -> InspectorServiceAttributes)
-> Parser (Maybe Text)
-> Parser (Natural -> InspectorServiceAttributes)
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
"assessmentRunArn")
Parser (Natural -> InspectorServiceAttributes)
-> Parser Natural -> Parser InspectorServiceAttributes
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"schemaVersion")
)
instance Prelude.Hashable InspectorServiceAttributes
instance Prelude.NFData InspectorServiceAttributes