{-# 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.IoTSiteWise.Types.PortalSummary where
import qualified Amazonka.Core as Core
import Amazonka.IoTSiteWise.Types.PortalStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PortalSummary = PortalSummary'
{
PortalSummary -> Maybe POSIX
lastUpdateDate :: Prelude.Maybe Core.POSIX,
PortalSummary -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
PortalSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
PortalSummary -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
PortalSummary -> Text
id :: Prelude.Text,
PortalSummary -> Text
name :: Prelude.Text,
PortalSummary -> Text
startUrl :: Prelude.Text,
PortalSummary -> PortalStatus
status :: PortalStatus
}
deriving (PortalSummary -> PortalSummary -> Bool
(PortalSummary -> PortalSummary -> Bool)
-> (PortalSummary -> PortalSummary -> Bool) -> Eq PortalSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PortalSummary -> PortalSummary -> Bool
$c/= :: PortalSummary -> PortalSummary -> Bool
== :: PortalSummary -> PortalSummary -> Bool
$c== :: PortalSummary -> PortalSummary -> Bool
Prelude.Eq, ReadPrec [PortalSummary]
ReadPrec PortalSummary
Int -> ReadS PortalSummary
ReadS [PortalSummary]
(Int -> ReadS PortalSummary)
-> ReadS [PortalSummary]
-> ReadPrec PortalSummary
-> ReadPrec [PortalSummary]
-> Read PortalSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PortalSummary]
$creadListPrec :: ReadPrec [PortalSummary]
readPrec :: ReadPrec PortalSummary
$creadPrec :: ReadPrec PortalSummary
readList :: ReadS [PortalSummary]
$creadList :: ReadS [PortalSummary]
readsPrec :: Int -> ReadS PortalSummary
$creadsPrec :: Int -> ReadS PortalSummary
Prelude.Read, Int -> PortalSummary -> ShowS
[PortalSummary] -> ShowS
PortalSummary -> String
(Int -> PortalSummary -> ShowS)
-> (PortalSummary -> String)
-> ([PortalSummary] -> ShowS)
-> Show PortalSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PortalSummary] -> ShowS
$cshowList :: [PortalSummary] -> ShowS
show :: PortalSummary -> String
$cshow :: PortalSummary -> String
showsPrec :: Int -> PortalSummary -> ShowS
$cshowsPrec :: Int -> PortalSummary -> ShowS
Prelude.Show, (forall x. PortalSummary -> Rep PortalSummary x)
-> (forall x. Rep PortalSummary x -> PortalSummary)
-> Generic PortalSummary
forall x. Rep PortalSummary x -> PortalSummary
forall x. PortalSummary -> Rep PortalSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PortalSummary x -> PortalSummary
$cfrom :: forall x. PortalSummary -> Rep PortalSummary x
Prelude.Generic)
newPortalSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
PortalStatus ->
PortalSummary
newPortalSummary :: Text -> Text -> Text -> PortalStatus -> PortalSummary
newPortalSummary Text
pId_ Text
pName_ Text
pStartUrl_ PortalStatus
pStatus_ =
PortalSummary' :: Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> PortalStatus
-> PortalSummary
PortalSummary'
{ $sel:lastUpdateDate:PortalSummary' :: Maybe POSIX
lastUpdateDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:creationDate:PortalSummary' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:description:PortalSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:roleArn:PortalSummary' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:PortalSummary' :: Text
id = Text
pId_,
$sel:name:PortalSummary' :: Text
name = Text
pName_,
$sel:startUrl:PortalSummary' :: Text
startUrl = Text
pStartUrl_,
$sel:status:PortalSummary' :: PortalStatus
status = PortalStatus
pStatus_
}
portalSummary_lastUpdateDate :: Lens.Lens' PortalSummary (Prelude.Maybe Prelude.UTCTime)
portalSummary_lastUpdateDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PortalSummary -> f PortalSummary
portalSummary_lastUpdateDate = (PortalSummary -> Maybe POSIX)
-> (PortalSummary -> Maybe POSIX -> PortalSummary)
-> Lens PortalSummary PortalSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortalSummary' {Maybe POSIX
lastUpdateDate :: Maybe POSIX
$sel:lastUpdateDate:PortalSummary' :: PortalSummary -> Maybe POSIX
lastUpdateDate} -> Maybe POSIX
lastUpdateDate) (\s :: PortalSummary
s@PortalSummary' {} Maybe POSIX
a -> PortalSummary
s {$sel:lastUpdateDate:PortalSummary' :: Maybe POSIX
lastUpdateDate = Maybe POSIX
a} :: PortalSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> PortalSummary -> f PortalSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PortalSummary
-> f PortalSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
portalSummary_creationDate :: Lens.Lens' PortalSummary (Prelude.Maybe Prelude.UTCTime)
portalSummary_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PortalSummary -> f PortalSummary
portalSummary_creationDate = (PortalSummary -> Maybe POSIX)
-> (PortalSummary -> Maybe POSIX -> PortalSummary)
-> Lens PortalSummary PortalSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortalSummary' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:PortalSummary' :: PortalSummary -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: PortalSummary
s@PortalSummary' {} Maybe POSIX
a -> PortalSummary
s {$sel:creationDate:PortalSummary' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: PortalSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> PortalSummary -> f PortalSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PortalSummary
-> f PortalSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
portalSummary_description :: Lens.Lens' PortalSummary (Prelude.Maybe Prelude.Text)
portalSummary_description :: (Maybe Text -> f (Maybe Text)) -> PortalSummary -> f PortalSummary
portalSummary_description = (PortalSummary -> Maybe Text)
-> (PortalSummary -> Maybe Text -> PortalSummary)
-> Lens PortalSummary PortalSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortalSummary' {Maybe Text
description :: Maybe Text
$sel:description:PortalSummary' :: PortalSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: PortalSummary
s@PortalSummary' {} Maybe Text
a -> PortalSummary
s {$sel:description:PortalSummary' :: Maybe Text
description = Maybe Text
a} :: PortalSummary)
portalSummary_roleArn :: Lens.Lens' PortalSummary (Prelude.Maybe Prelude.Text)
portalSummary_roleArn :: (Maybe Text -> f (Maybe Text)) -> PortalSummary -> f PortalSummary
portalSummary_roleArn = (PortalSummary -> Maybe Text)
-> (PortalSummary -> Maybe Text -> PortalSummary)
-> Lens PortalSummary PortalSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortalSummary' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:PortalSummary' :: PortalSummary -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: PortalSummary
s@PortalSummary' {} Maybe Text
a -> PortalSummary
s {$sel:roleArn:PortalSummary' :: Maybe Text
roleArn = Maybe Text
a} :: PortalSummary)
portalSummary_id :: Lens.Lens' PortalSummary Prelude.Text
portalSummary_id :: (Text -> f Text) -> PortalSummary -> f PortalSummary
portalSummary_id = (PortalSummary -> Text)
-> (PortalSummary -> Text -> PortalSummary)
-> Lens PortalSummary PortalSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortalSummary' {Text
id :: Text
$sel:id:PortalSummary' :: PortalSummary -> Text
id} -> Text
id) (\s :: PortalSummary
s@PortalSummary' {} Text
a -> PortalSummary
s {$sel:id:PortalSummary' :: Text
id = Text
a} :: PortalSummary)
portalSummary_name :: Lens.Lens' PortalSummary Prelude.Text
portalSummary_name :: (Text -> f Text) -> PortalSummary -> f PortalSummary
portalSummary_name = (PortalSummary -> Text)
-> (PortalSummary -> Text -> PortalSummary)
-> Lens PortalSummary PortalSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortalSummary' {Text
name :: Text
$sel:name:PortalSummary' :: PortalSummary -> Text
name} -> Text
name) (\s :: PortalSummary
s@PortalSummary' {} Text
a -> PortalSummary
s {$sel:name:PortalSummary' :: Text
name = Text
a} :: PortalSummary)
portalSummary_startUrl :: Lens.Lens' PortalSummary Prelude.Text
portalSummary_startUrl :: (Text -> f Text) -> PortalSummary -> f PortalSummary
portalSummary_startUrl = (PortalSummary -> Text)
-> (PortalSummary -> Text -> PortalSummary)
-> Lens PortalSummary PortalSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortalSummary' {Text
startUrl :: Text
$sel:startUrl:PortalSummary' :: PortalSummary -> Text
startUrl} -> Text
startUrl) (\s :: PortalSummary
s@PortalSummary' {} Text
a -> PortalSummary
s {$sel:startUrl:PortalSummary' :: Text
startUrl = Text
a} :: PortalSummary)
portalSummary_status :: Lens.Lens' PortalSummary PortalStatus
portalSummary_status :: (PortalStatus -> f PortalStatus)
-> PortalSummary -> f PortalSummary
portalSummary_status = (PortalSummary -> PortalStatus)
-> (PortalSummary -> PortalStatus -> PortalSummary)
-> Lens PortalSummary PortalSummary PortalStatus PortalStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PortalSummary' {PortalStatus
status :: PortalStatus
$sel:status:PortalSummary' :: PortalSummary -> PortalStatus
status} -> PortalStatus
status) (\s :: PortalSummary
s@PortalSummary' {} PortalStatus
a -> PortalSummary
s {$sel:status:PortalSummary' :: PortalStatus
status = PortalStatus
a} :: PortalSummary)
instance Core.FromJSON PortalSummary where
parseJSON :: Value -> Parser PortalSummary
parseJSON =
String
-> (Object -> Parser PortalSummary)
-> Value
-> Parser PortalSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PortalSummary"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> PortalStatus
-> PortalSummary
PortalSummary'
(Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> PortalStatus
-> PortalSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> PortalStatus
-> PortalSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdateDate")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> PortalStatus
-> PortalSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> PortalStatus
-> PortalSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"creationDate")
Parser
(Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> PortalStatus
-> PortalSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Text -> Text -> Text -> PortalStatus -> PortalSummary)
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
"description")
Parser
(Maybe Text
-> Text -> Text -> Text -> PortalStatus -> PortalSummary)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> Text -> PortalStatus -> PortalSummary)
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
"roleArn")
Parser (Text -> Text -> Text -> PortalStatus -> PortalSummary)
-> Parser Text
-> Parser (Text -> Text -> PortalStatus -> PortalSummary)
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
"id")
Parser (Text -> Text -> PortalStatus -> PortalSummary)
-> Parser Text -> Parser (Text -> PortalStatus -> PortalSummary)
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")
Parser (Text -> PortalStatus -> PortalSummary)
-> Parser Text -> Parser (PortalStatus -> PortalSummary)
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
"startUrl")
Parser (PortalStatus -> PortalSummary)
-> Parser PortalStatus -> Parser PortalSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser PortalStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"status")
)
instance Prelude.Hashable PortalSummary
instance Prelude.NFData PortalSummary