{-# 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.ServerlessApplicationRepository.Types.ApplicationSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ApplicationSummary = ApplicationSummary'
{
ApplicationSummary -> Maybe Text
creationTime :: Prelude.Maybe Prelude.Text,
ApplicationSummary -> Maybe Text
homePageUrl :: Prelude.Maybe Prelude.Text,
ApplicationSummary -> Maybe [Text]
labels :: Prelude.Maybe [Prelude.Text],
ApplicationSummary -> Maybe Text
spdxLicenseId :: Prelude.Maybe Prelude.Text,
ApplicationSummary -> Text
description :: Prelude.Text,
ApplicationSummary -> Text
author :: Prelude.Text,
ApplicationSummary -> Text
applicationId :: Prelude.Text,
ApplicationSummary -> Text
name :: Prelude.Text
}
deriving (ApplicationSummary -> ApplicationSummary -> Bool
(ApplicationSummary -> ApplicationSummary -> Bool)
-> (ApplicationSummary -> ApplicationSummary -> Bool)
-> Eq ApplicationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationSummary -> ApplicationSummary -> Bool
$c/= :: ApplicationSummary -> ApplicationSummary -> Bool
== :: ApplicationSummary -> ApplicationSummary -> Bool
$c== :: ApplicationSummary -> ApplicationSummary -> Bool
Prelude.Eq, ReadPrec [ApplicationSummary]
ReadPrec ApplicationSummary
Int -> ReadS ApplicationSummary
ReadS [ApplicationSummary]
(Int -> ReadS ApplicationSummary)
-> ReadS [ApplicationSummary]
-> ReadPrec ApplicationSummary
-> ReadPrec [ApplicationSummary]
-> Read ApplicationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationSummary]
$creadListPrec :: ReadPrec [ApplicationSummary]
readPrec :: ReadPrec ApplicationSummary
$creadPrec :: ReadPrec ApplicationSummary
readList :: ReadS [ApplicationSummary]
$creadList :: ReadS [ApplicationSummary]
readsPrec :: Int -> ReadS ApplicationSummary
$creadsPrec :: Int -> ReadS ApplicationSummary
Prelude.Read, Int -> ApplicationSummary -> ShowS
[ApplicationSummary] -> ShowS
ApplicationSummary -> String
(Int -> ApplicationSummary -> ShowS)
-> (ApplicationSummary -> String)
-> ([ApplicationSummary] -> ShowS)
-> Show ApplicationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationSummary] -> ShowS
$cshowList :: [ApplicationSummary] -> ShowS
show :: ApplicationSummary -> String
$cshow :: ApplicationSummary -> String
showsPrec :: Int -> ApplicationSummary -> ShowS
$cshowsPrec :: Int -> ApplicationSummary -> ShowS
Prelude.Show, (forall x. ApplicationSummary -> Rep ApplicationSummary x)
-> (forall x. Rep ApplicationSummary x -> ApplicationSummary)
-> Generic ApplicationSummary
forall x. Rep ApplicationSummary x -> ApplicationSummary
forall x. ApplicationSummary -> Rep ApplicationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ApplicationSummary x -> ApplicationSummary
$cfrom :: forall x. ApplicationSummary -> Rep ApplicationSummary x
Prelude.Generic)
newApplicationSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ApplicationSummary
newApplicationSummary :: Text -> Text -> Text -> Text -> ApplicationSummary
newApplicationSummary
Text
pDescription_
Text
pAuthor_
Text
pApplicationId_
Text
pName_ =
ApplicationSummary' :: Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> ApplicationSummary
ApplicationSummary'
{ $sel:creationTime:ApplicationSummary' :: Maybe Text
creationTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:homePageUrl:ApplicationSummary' :: Maybe Text
homePageUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:labels:ApplicationSummary' :: Maybe [Text]
labels = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:spdxLicenseId:ApplicationSummary' :: Maybe Text
spdxLicenseId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:ApplicationSummary' :: Text
description = Text
pDescription_,
$sel:author:ApplicationSummary' :: Text
author = Text
pAuthor_,
$sel:applicationId:ApplicationSummary' :: Text
applicationId = Text
pApplicationId_,
$sel:name:ApplicationSummary' :: Text
name = Text
pName_
}
applicationSummary_creationTime :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.Text)
applicationSummary_creationTime :: (Maybe Text -> f (Maybe Text))
-> ApplicationSummary -> f ApplicationSummary
applicationSummary_creationTime = (ApplicationSummary -> Maybe Text)
-> (ApplicationSummary -> Maybe Text -> ApplicationSummary)
-> Lens
ApplicationSummary ApplicationSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe Text
creationTime :: Maybe Text
$sel:creationTime:ApplicationSummary' :: ApplicationSummary -> Maybe Text
creationTime} -> Maybe Text
creationTime) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe Text
a -> ApplicationSummary
s {$sel:creationTime:ApplicationSummary' :: Maybe Text
creationTime = Maybe Text
a} :: ApplicationSummary)
applicationSummary_homePageUrl :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.Text)
applicationSummary_homePageUrl :: (Maybe Text -> f (Maybe Text))
-> ApplicationSummary -> f ApplicationSummary
applicationSummary_homePageUrl = (ApplicationSummary -> Maybe Text)
-> (ApplicationSummary -> Maybe Text -> ApplicationSummary)
-> Lens
ApplicationSummary ApplicationSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe Text
homePageUrl :: Maybe Text
$sel:homePageUrl:ApplicationSummary' :: ApplicationSummary -> Maybe Text
homePageUrl} -> Maybe Text
homePageUrl) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe Text
a -> ApplicationSummary
s {$sel:homePageUrl:ApplicationSummary' :: Maybe Text
homePageUrl = Maybe Text
a} :: ApplicationSummary)
applicationSummary_labels :: Lens.Lens' ApplicationSummary (Prelude.Maybe [Prelude.Text])
applicationSummary_labels :: (Maybe [Text] -> f (Maybe [Text]))
-> ApplicationSummary -> f ApplicationSummary
applicationSummary_labels = (ApplicationSummary -> Maybe [Text])
-> (ApplicationSummary -> Maybe [Text] -> ApplicationSummary)
-> Lens
ApplicationSummary ApplicationSummary (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe [Text]
labels :: Maybe [Text]
$sel:labels:ApplicationSummary' :: ApplicationSummary -> Maybe [Text]
labels} -> Maybe [Text]
labels) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe [Text]
a -> ApplicationSummary
s {$sel:labels:ApplicationSummary' :: Maybe [Text]
labels = Maybe [Text]
a} :: ApplicationSummary) ((Maybe [Text] -> f (Maybe [Text]))
-> ApplicationSummary -> f ApplicationSummary)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ApplicationSummary
-> f ApplicationSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
applicationSummary_spdxLicenseId :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.Text)
applicationSummary_spdxLicenseId :: (Maybe Text -> f (Maybe Text))
-> ApplicationSummary -> f ApplicationSummary
applicationSummary_spdxLicenseId = (ApplicationSummary -> Maybe Text)
-> (ApplicationSummary -> Maybe Text -> ApplicationSummary)
-> Lens
ApplicationSummary ApplicationSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe Text
spdxLicenseId :: Maybe Text
$sel:spdxLicenseId:ApplicationSummary' :: ApplicationSummary -> Maybe Text
spdxLicenseId} -> Maybe Text
spdxLicenseId) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe Text
a -> ApplicationSummary
s {$sel:spdxLicenseId:ApplicationSummary' :: Maybe Text
spdxLicenseId = Maybe Text
a} :: ApplicationSummary)
applicationSummary_description :: Lens.Lens' ApplicationSummary Prelude.Text
applicationSummary_description :: (Text -> f Text) -> ApplicationSummary -> f ApplicationSummary
applicationSummary_description = (ApplicationSummary -> Text)
-> (ApplicationSummary -> Text -> ApplicationSummary)
-> Lens ApplicationSummary ApplicationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Text
description :: Text
$sel:description:ApplicationSummary' :: ApplicationSummary -> Text
description} -> Text
description) (\s :: ApplicationSummary
s@ApplicationSummary' {} Text
a -> ApplicationSummary
s {$sel:description:ApplicationSummary' :: Text
description = Text
a} :: ApplicationSummary)
applicationSummary_author :: Lens.Lens' ApplicationSummary Prelude.Text
applicationSummary_author :: (Text -> f Text) -> ApplicationSummary -> f ApplicationSummary
applicationSummary_author = (ApplicationSummary -> Text)
-> (ApplicationSummary -> Text -> ApplicationSummary)
-> Lens ApplicationSummary ApplicationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Text
author :: Text
$sel:author:ApplicationSummary' :: ApplicationSummary -> Text
author} -> Text
author) (\s :: ApplicationSummary
s@ApplicationSummary' {} Text
a -> ApplicationSummary
s {$sel:author:ApplicationSummary' :: Text
author = Text
a} :: ApplicationSummary)
applicationSummary_applicationId :: Lens.Lens' ApplicationSummary Prelude.Text
applicationSummary_applicationId :: (Text -> f Text) -> ApplicationSummary -> f ApplicationSummary
applicationSummary_applicationId = (ApplicationSummary -> Text)
-> (ApplicationSummary -> Text -> ApplicationSummary)
-> Lens ApplicationSummary ApplicationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Text
applicationId :: Text
$sel:applicationId:ApplicationSummary' :: ApplicationSummary -> Text
applicationId} -> Text
applicationId) (\s :: ApplicationSummary
s@ApplicationSummary' {} Text
a -> ApplicationSummary
s {$sel:applicationId:ApplicationSummary' :: Text
applicationId = Text
a} :: ApplicationSummary)
applicationSummary_name :: Lens.Lens' ApplicationSummary Prelude.Text
applicationSummary_name :: (Text -> f Text) -> ApplicationSummary -> f ApplicationSummary
applicationSummary_name = (ApplicationSummary -> Text)
-> (ApplicationSummary -> Text -> ApplicationSummary)
-> Lens ApplicationSummary ApplicationSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Text
name :: Text
$sel:name:ApplicationSummary' :: ApplicationSummary -> Text
name} -> Text
name) (\s :: ApplicationSummary
s@ApplicationSummary' {} Text
a -> ApplicationSummary
s {$sel:name:ApplicationSummary' :: Text
name = Text
a} :: ApplicationSummary)
instance Core.FromJSON ApplicationSummary where
parseJSON :: Value -> Parser ApplicationSummary
parseJSON =
String
-> (Object -> Parser ApplicationSummary)
-> Value
-> Parser ApplicationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ApplicationSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> ApplicationSummary
ApplicationSummary'
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> ApplicationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> ApplicationSummary)
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
"creationTime")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> ApplicationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> ApplicationSummary)
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
"homePageUrl")
Parser
(Maybe [Text]
-> Maybe Text
-> Text
-> Text
-> Text
-> Text
-> ApplicationSummary)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text -> Text -> Text -> Text -> Text -> ApplicationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"labels" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text -> Text -> Text -> Text -> Text -> ApplicationSummary)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> Text -> Text -> ApplicationSummary)
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
"spdxLicenseId")
Parser (Text -> Text -> Text -> Text -> ApplicationSummary)
-> Parser Text
-> Parser (Text -> Text -> Text -> ApplicationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"description")
Parser (Text -> Text -> Text -> ApplicationSummary)
-> Parser Text -> Parser (Text -> Text -> ApplicationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"author")
Parser (Text -> Text -> ApplicationSummary)
-> Parser Text -> Parser (Text -> ApplicationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"applicationId")
Parser (Text -> ApplicationSummary)
-> Parser Text -> Parser ApplicationSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
)
instance Prelude.Hashable ApplicationSummary
instance Prelude.NFData ApplicationSummary