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