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