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