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