{-# 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.MarketplaceCatalog.Types.EntitySummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EntitySummary = EntitySummary'
{
EntitySummary -> Maybe Text
lastModifiedDate :: Prelude.Maybe Prelude.Text,
EntitySummary -> Maybe Text
entityType :: Prelude.Maybe Prelude.Text,
EntitySummary -> Maybe Text
visibility :: Prelude.Maybe Prelude.Text,
EntitySummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
EntitySummary -> Maybe Text
entityId :: Prelude.Maybe Prelude.Text,
EntitySummary -> Maybe Text
entityArn :: Prelude.Maybe Prelude.Text
}
deriving (EntitySummary -> EntitySummary -> Bool
(EntitySummary -> EntitySummary -> Bool)
-> (EntitySummary -> EntitySummary -> Bool) -> Eq EntitySummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EntitySummary -> EntitySummary -> Bool
$c/= :: EntitySummary -> EntitySummary -> Bool
== :: EntitySummary -> EntitySummary -> Bool
$c== :: EntitySummary -> EntitySummary -> Bool
Prelude.Eq, ReadPrec [EntitySummary]
ReadPrec EntitySummary
Int -> ReadS EntitySummary
ReadS [EntitySummary]
(Int -> ReadS EntitySummary)
-> ReadS [EntitySummary]
-> ReadPrec EntitySummary
-> ReadPrec [EntitySummary]
-> Read EntitySummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EntitySummary]
$creadListPrec :: ReadPrec [EntitySummary]
readPrec :: ReadPrec EntitySummary
$creadPrec :: ReadPrec EntitySummary
readList :: ReadS [EntitySummary]
$creadList :: ReadS [EntitySummary]
readsPrec :: Int -> ReadS EntitySummary
$creadsPrec :: Int -> ReadS EntitySummary
Prelude.Read, Int -> EntitySummary -> ShowS
[EntitySummary] -> ShowS
EntitySummary -> String
(Int -> EntitySummary -> ShowS)
-> (EntitySummary -> String)
-> ([EntitySummary] -> ShowS)
-> Show EntitySummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EntitySummary] -> ShowS
$cshowList :: [EntitySummary] -> ShowS
show :: EntitySummary -> String
$cshow :: EntitySummary -> String
showsPrec :: Int -> EntitySummary -> ShowS
$cshowsPrec :: Int -> EntitySummary -> ShowS
Prelude.Show, (forall x. EntitySummary -> Rep EntitySummary x)
-> (forall x. Rep EntitySummary x -> EntitySummary)
-> Generic EntitySummary
forall x. Rep EntitySummary x -> EntitySummary
forall x. EntitySummary -> Rep EntitySummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EntitySummary x -> EntitySummary
$cfrom :: forall x. EntitySummary -> Rep EntitySummary x
Prelude.Generic)
newEntitySummary ::
EntitySummary
newEntitySummary :: EntitySummary
newEntitySummary =
EntitySummary' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EntitySummary
EntitySummary'
{ $sel:lastModifiedDate:EntitySummary' :: Maybe Text
lastModifiedDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:entityType:EntitySummary' :: Maybe Text
entityType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:visibility:EntitySummary' :: Maybe Text
visibility = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:EntitySummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:entityId:EntitySummary' :: Maybe Text
entityId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:entityArn:EntitySummary' :: Maybe Text
entityArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
entitySummary_lastModifiedDate :: Lens.Lens' EntitySummary (Prelude.Maybe Prelude.Text)
entitySummary_lastModifiedDate :: (Maybe Text -> f (Maybe Text)) -> EntitySummary -> f EntitySummary
entitySummary_lastModifiedDate = (EntitySummary -> Maybe Text)
-> (EntitySummary -> Maybe Text -> EntitySummary)
-> Lens EntitySummary EntitySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntitySummary' {Maybe Text
lastModifiedDate :: Maybe Text
$sel:lastModifiedDate:EntitySummary' :: EntitySummary -> Maybe Text
lastModifiedDate} -> Maybe Text
lastModifiedDate) (\s :: EntitySummary
s@EntitySummary' {} Maybe Text
a -> EntitySummary
s {$sel:lastModifiedDate:EntitySummary' :: Maybe Text
lastModifiedDate = Maybe Text
a} :: EntitySummary)
entitySummary_entityType :: Lens.Lens' EntitySummary (Prelude.Maybe Prelude.Text)
entitySummary_entityType :: (Maybe Text -> f (Maybe Text)) -> EntitySummary -> f EntitySummary
entitySummary_entityType = (EntitySummary -> Maybe Text)
-> (EntitySummary -> Maybe Text -> EntitySummary)
-> Lens EntitySummary EntitySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntitySummary' {Maybe Text
entityType :: Maybe Text
$sel:entityType:EntitySummary' :: EntitySummary -> Maybe Text
entityType} -> Maybe Text
entityType) (\s :: EntitySummary
s@EntitySummary' {} Maybe Text
a -> EntitySummary
s {$sel:entityType:EntitySummary' :: Maybe Text
entityType = Maybe Text
a} :: EntitySummary)
entitySummary_visibility :: Lens.Lens' EntitySummary (Prelude.Maybe Prelude.Text)
entitySummary_visibility :: (Maybe Text -> f (Maybe Text)) -> EntitySummary -> f EntitySummary
entitySummary_visibility = (EntitySummary -> Maybe Text)
-> (EntitySummary -> Maybe Text -> EntitySummary)
-> Lens EntitySummary EntitySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntitySummary' {Maybe Text
visibility :: Maybe Text
$sel:visibility:EntitySummary' :: EntitySummary -> Maybe Text
visibility} -> Maybe Text
visibility) (\s :: EntitySummary
s@EntitySummary' {} Maybe Text
a -> EntitySummary
s {$sel:visibility:EntitySummary' :: Maybe Text
visibility = Maybe Text
a} :: EntitySummary)
entitySummary_name :: Lens.Lens' EntitySummary (Prelude.Maybe Prelude.Text)
entitySummary_name :: (Maybe Text -> f (Maybe Text)) -> EntitySummary -> f EntitySummary
entitySummary_name = (EntitySummary -> Maybe Text)
-> (EntitySummary -> Maybe Text -> EntitySummary)
-> Lens EntitySummary EntitySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntitySummary' {Maybe Text
name :: Maybe Text
$sel:name:EntitySummary' :: EntitySummary -> Maybe Text
name} -> Maybe Text
name) (\s :: EntitySummary
s@EntitySummary' {} Maybe Text
a -> EntitySummary
s {$sel:name:EntitySummary' :: Maybe Text
name = Maybe Text
a} :: EntitySummary)
entitySummary_entityId :: Lens.Lens' EntitySummary (Prelude.Maybe Prelude.Text)
entitySummary_entityId :: (Maybe Text -> f (Maybe Text)) -> EntitySummary -> f EntitySummary
entitySummary_entityId = (EntitySummary -> Maybe Text)
-> (EntitySummary -> Maybe Text -> EntitySummary)
-> Lens EntitySummary EntitySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntitySummary' {Maybe Text
entityId :: Maybe Text
$sel:entityId:EntitySummary' :: EntitySummary -> Maybe Text
entityId} -> Maybe Text
entityId) (\s :: EntitySummary
s@EntitySummary' {} Maybe Text
a -> EntitySummary
s {$sel:entityId:EntitySummary' :: Maybe Text
entityId = Maybe Text
a} :: EntitySummary)
entitySummary_entityArn :: Lens.Lens' EntitySummary (Prelude.Maybe Prelude.Text)
entitySummary_entityArn :: (Maybe Text -> f (Maybe Text)) -> EntitySummary -> f EntitySummary
entitySummary_entityArn = (EntitySummary -> Maybe Text)
-> (EntitySummary -> Maybe Text -> EntitySummary)
-> Lens EntitySummary EntitySummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntitySummary' {Maybe Text
entityArn :: Maybe Text
$sel:entityArn:EntitySummary' :: EntitySummary -> Maybe Text
entityArn} -> Maybe Text
entityArn) (\s :: EntitySummary
s@EntitySummary' {} Maybe Text
a -> EntitySummary
s {$sel:entityArn:EntitySummary' :: Maybe Text
entityArn = Maybe Text
a} :: EntitySummary)
instance Core.FromJSON EntitySummary where
parseJSON :: Value -> Parser EntitySummary
parseJSON =
String
-> (Object -> Parser EntitySummary)
-> Value
-> Parser EntitySummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EntitySummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EntitySummary
EntitySummary'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EntitySummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EntitySummary)
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
"LastModifiedDate")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EntitySummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> EntitySummary)
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
"EntityType")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> EntitySummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> EntitySummary)
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
"Visibility")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> EntitySummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> EntitySummary)
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 -> EntitySummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> EntitySummary)
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
"EntityId")
Parser (Maybe Text -> EntitySummary)
-> Parser (Maybe Text) -> Parser EntitySummary
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
"EntityArn")
)
instance Prelude.Hashable EntitySummary
instance Prelude.NFData EntitySummary