{-# 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.IoTFleetHub.Types.ApplicationSummary where
import qualified Amazonka.Core as Core
import Amazonka.IoTFleetHub.Types.ApplicationState
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ApplicationSummary = ApplicationSummary'
{
ApplicationSummary -> Maybe Text
applicationDescription :: Prelude.Maybe Prelude.Text,
ApplicationSummary -> Maybe ApplicationState
applicationState :: Prelude.Maybe ApplicationState,
ApplicationSummary -> Maybe Integer
applicationCreationDate :: Prelude.Maybe Prelude.Integer,
ApplicationSummary -> Maybe Integer
applicationLastUpdateDate :: Prelude.Maybe Prelude.Integer,
ApplicationSummary -> Text
applicationId :: Prelude.Text,
ApplicationSummary -> Text
applicationName :: Prelude.Text,
ApplicationSummary -> Text
applicationUrl :: 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 ->
ApplicationSummary
newApplicationSummary :: Text -> Text -> Text -> ApplicationSummary
newApplicationSummary
Text
pApplicationId_
Text
pApplicationName_
Text
pApplicationUrl_ =
ApplicationSummary' :: Maybe Text
-> Maybe ApplicationState
-> Maybe Integer
-> Maybe Integer
-> Text
-> Text
-> Text
-> ApplicationSummary
ApplicationSummary'
{ $sel:applicationDescription:ApplicationSummary' :: Maybe Text
applicationDescription =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:applicationState:ApplicationSummary' :: Maybe ApplicationState
applicationState = Maybe ApplicationState
forall a. Maybe a
Prelude.Nothing,
$sel:applicationCreationDate:ApplicationSummary' :: Maybe Integer
applicationCreationDate = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:applicationLastUpdateDate:ApplicationSummary' :: Maybe Integer
applicationLastUpdateDate = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:applicationId:ApplicationSummary' :: Text
applicationId = Text
pApplicationId_,
$sel:applicationName:ApplicationSummary' :: Text
applicationName = Text
pApplicationName_,
$sel:applicationUrl:ApplicationSummary' :: Text
applicationUrl = Text
pApplicationUrl_
}
applicationSummary_applicationDescription :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.Text)
applicationSummary_applicationDescription :: (Maybe Text -> f (Maybe Text))
-> ApplicationSummary -> f ApplicationSummary
applicationSummary_applicationDescription = (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
applicationDescription :: Maybe Text
$sel:applicationDescription:ApplicationSummary' :: ApplicationSummary -> Maybe Text
applicationDescription} -> Maybe Text
applicationDescription) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe Text
a -> ApplicationSummary
s {$sel:applicationDescription:ApplicationSummary' :: Maybe Text
applicationDescription = Maybe Text
a} :: ApplicationSummary)
applicationSummary_applicationState :: Lens.Lens' ApplicationSummary (Prelude.Maybe ApplicationState)
applicationSummary_applicationState :: (Maybe ApplicationState -> f (Maybe ApplicationState))
-> ApplicationSummary -> f ApplicationSummary
applicationSummary_applicationState = (ApplicationSummary -> Maybe ApplicationState)
-> (ApplicationSummary
-> Maybe ApplicationState -> ApplicationSummary)
-> Lens
ApplicationSummary
ApplicationSummary
(Maybe ApplicationState)
(Maybe ApplicationState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe ApplicationState
applicationState :: Maybe ApplicationState
$sel:applicationState:ApplicationSummary' :: ApplicationSummary -> Maybe ApplicationState
applicationState} -> Maybe ApplicationState
applicationState) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe ApplicationState
a -> ApplicationSummary
s {$sel:applicationState:ApplicationSummary' :: Maybe ApplicationState
applicationState = Maybe ApplicationState
a} :: ApplicationSummary)
applicationSummary_applicationCreationDate :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.Integer)
applicationSummary_applicationCreationDate :: (Maybe Integer -> f (Maybe Integer))
-> ApplicationSummary -> f ApplicationSummary
applicationSummary_applicationCreationDate = (ApplicationSummary -> Maybe Integer)
-> (ApplicationSummary -> Maybe Integer -> ApplicationSummary)
-> Lens
ApplicationSummary
ApplicationSummary
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe Integer
applicationCreationDate :: Maybe Integer
$sel:applicationCreationDate:ApplicationSummary' :: ApplicationSummary -> Maybe Integer
applicationCreationDate} -> Maybe Integer
applicationCreationDate) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe Integer
a -> ApplicationSummary
s {$sel:applicationCreationDate:ApplicationSummary' :: Maybe Integer
applicationCreationDate = Maybe Integer
a} :: ApplicationSummary)
applicationSummary_applicationLastUpdateDate :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.Integer)
applicationSummary_applicationLastUpdateDate :: (Maybe Integer -> f (Maybe Integer))
-> ApplicationSummary -> f ApplicationSummary
applicationSummary_applicationLastUpdateDate = (ApplicationSummary -> Maybe Integer)
-> (ApplicationSummary -> Maybe Integer -> ApplicationSummary)
-> Lens
ApplicationSummary
ApplicationSummary
(Maybe Integer)
(Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe Integer
applicationLastUpdateDate :: Maybe Integer
$sel:applicationLastUpdateDate:ApplicationSummary' :: ApplicationSummary -> Maybe Integer
applicationLastUpdateDate} -> Maybe Integer
applicationLastUpdateDate) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe Integer
a -> ApplicationSummary
s {$sel:applicationLastUpdateDate:ApplicationSummary' :: Maybe Integer
applicationLastUpdateDate = Maybe Integer
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_applicationName :: Lens.Lens' ApplicationSummary Prelude.Text
applicationSummary_applicationName :: (Text -> f Text) -> ApplicationSummary -> f ApplicationSummary
applicationSummary_applicationName = (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
applicationName :: Text
$sel:applicationName:ApplicationSummary' :: ApplicationSummary -> Text
applicationName} -> Text
applicationName) (\s :: ApplicationSummary
s@ApplicationSummary' {} Text
a -> ApplicationSummary
s {$sel:applicationName:ApplicationSummary' :: Text
applicationName = Text
a} :: ApplicationSummary)
applicationSummary_applicationUrl :: Lens.Lens' ApplicationSummary Prelude.Text
applicationSummary_applicationUrl :: (Text -> f Text) -> ApplicationSummary -> f ApplicationSummary
applicationSummary_applicationUrl = (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
applicationUrl :: Text
$sel:applicationUrl:ApplicationSummary' :: ApplicationSummary -> Text
applicationUrl} -> Text
applicationUrl) (\s :: ApplicationSummary
s@ApplicationSummary' {} Text
a -> ApplicationSummary
s {$sel:applicationUrl:ApplicationSummary' :: Text
applicationUrl = 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 ApplicationState
-> Maybe Integer
-> Maybe Integer
-> Text
-> Text
-> Text
-> ApplicationSummary
ApplicationSummary'
(Maybe Text
-> Maybe ApplicationState
-> Maybe Integer
-> Maybe Integer
-> Text
-> Text
-> Text
-> ApplicationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe ApplicationState
-> Maybe Integer
-> Maybe Integer
-> 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
"applicationDescription")
Parser
(Maybe ApplicationState
-> Maybe Integer
-> Maybe Integer
-> Text
-> Text
-> Text
-> ApplicationSummary)
-> Parser (Maybe ApplicationState)
-> Parser
(Maybe Integer
-> Maybe Integer -> Text -> Text -> Text -> ApplicationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ApplicationState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"applicationState")
Parser
(Maybe Integer
-> Maybe Integer -> Text -> Text -> Text -> ApplicationSummary)
-> Parser (Maybe Integer)
-> Parser
(Maybe Integer -> Text -> Text -> Text -> ApplicationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"applicationCreationDate")
Parser
(Maybe Integer -> Text -> Text -> Text -> ApplicationSummary)
-> Parser (Maybe Integer)
-> Parser (Text -> Text -> Text -> ApplicationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"applicationLastUpdateDate")
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
"applicationId")
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
"applicationName")
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
"applicationUrl")
)
instance Prelude.Hashable ApplicationSummary
instance Prelude.NFData ApplicationSummary