{-# 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.AuditManager.Types.ManualEvidence where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ManualEvidence = ManualEvidence'
{
ManualEvidence -> Maybe Text
s3ResourcePath :: Prelude.Maybe Prelude.Text
}
deriving (ManualEvidence -> ManualEvidence -> Bool
(ManualEvidence -> ManualEvidence -> Bool)
-> (ManualEvidence -> ManualEvidence -> Bool) -> Eq ManualEvidence
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ManualEvidence -> ManualEvidence -> Bool
$c/= :: ManualEvidence -> ManualEvidence -> Bool
== :: ManualEvidence -> ManualEvidence -> Bool
$c== :: ManualEvidence -> ManualEvidence -> Bool
Prelude.Eq, ReadPrec [ManualEvidence]
ReadPrec ManualEvidence
Int -> ReadS ManualEvidence
ReadS [ManualEvidence]
(Int -> ReadS ManualEvidence)
-> ReadS [ManualEvidence]
-> ReadPrec ManualEvidence
-> ReadPrec [ManualEvidence]
-> Read ManualEvidence
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ManualEvidence]
$creadListPrec :: ReadPrec [ManualEvidence]
readPrec :: ReadPrec ManualEvidence
$creadPrec :: ReadPrec ManualEvidence
readList :: ReadS [ManualEvidence]
$creadList :: ReadS [ManualEvidence]
readsPrec :: Int -> ReadS ManualEvidence
$creadsPrec :: Int -> ReadS ManualEvidence
Prelude.Read, Int -> ManualEvidence -> ShowS
[ManualEvidence] -> ShowS
ManualEvidence -> String
(Int -> ManualEvidence -> ShowS)
-> (ManualEvidence -> String)
-> ([ManualEvidence] -> ShowS)
-> Show ManualEvidence
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ManualEvidence] -> ShowS
$cshowList :: [ManualEvidence] -> ShowS
show :: ManualEvidence -> String
$cshow :: ManualEvidence -> String
showsPrec :: Int -> ManualEvidence -> ShowS
$cshowsPrec :: Int -> ManualEvidence -> ShowS
Prelude.Show, (forall x. ManualEvidence -> Rep ManualEvidence x)
-> (forall x. Rep ManualEvidence x -> ManualEvidence)
-> Generic ManualEvidence
forall x. Rep ManualEvidence x -> ManualEvidence
forall x. ManualEvidence -> Rep ManualEvidence x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ManualEvidence x -> ManualEvidence
$cfrom :: forall x. ManualEvidence -> Rep ManualEvidence x
Prelude.Generic)
newManualEvidence ::
ManualEvidence
newManualEvidence :: ManualEvidence
newManualEvidence =
ManualEvidence' :: Maybe Text -> ManualEvidence
ManualEvidence' {$sel:s3ResourcePath:ManualEvidence' :: Maybe Text
s3ResourcePath = Maybe Text
forall a. Maybe a
Prelude.Nothing}
manualEvidence_s3ResourcePath :: Lens.Lens' ManualEvidence (Prelude.Maybe Prelude.Text)
manualEvidence_s3ResourcePath :: (Maybe Text -> f (Maybe Text))
-> ManualEvidence -> f ManualEvidence
manualEvidence_s3ResourcePath = (ManualEvidence -> Maybe Text)
-> (ManualEvidence -> Maybe Text -> ManualEvidence)
-> Lens ManualEvidence ManualEvidence (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManualEvidence' {Maybe Text
s3ResourcePath :: Maybe Text
$sel:s3ResourcePath:ManualEvidence' :: ManualEvidence -> Maybe Text
s3ResourcePath} -> Maybe Text
s3ResourcePath) (\s :: ManualEvidence
s@ManualEvidence' {} Maybe Text
a -> ManualEvidence
s {$sel:s3ResourcePath:ManualEvidence' :: Maybe Text
s3ResourcePath = Maybe Text
a} :: ManualEvidence)
instance Core.FromJSON ManualEvidence where
parseJSON :: Value -> Parser ManualEvidence
parseJSON =
String
-> (Object -> Parser ManualEvidence)
-> Value
-> Parser ManualEvidence
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ManualEvidence"
( \Object
x ->
Maybe Text -> ManualEvidence
ManualEvidence'
(Maybe Text -> ManualEvidence)
-> Parser (Maybe Text) -> Parser ManualEvidence
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
"s3ResourcePath")
)
instance Prelude.Hashable ManualEvidence
instance Prelude.NFData ManualEvidence
instance Core.ToJSON ManualEvidence where
toJSON :: ManualEvidence -> Value
toJSON ManualEvidence' {Maybe Text
s3ResourcePath :: Maybe Text
$sel:s3ResourcePath:ManualEvidence' :: ManualEvidence -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"s3ResourcePath" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
s3ResourcePath
]
)