{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoTSiteWise.Types.PortalStatus
import qualified Amazonka.Prelude as Prelude
data PortalSummary = PortalSummary'
{
PortalSummary -> Maybe POSIX
creationDate :: Prelude.Maybe Data.POSIX,
PortalSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
PortalSummary -> Maybe POSIX
lastUpdateDate :: Prelude.Maybe Data.POSIX,
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
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]
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
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. 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'
{ $sel:creationDate:PortalSummary' :: Maybe POSIX
creationDate = forall a. Maybe a
Prelude.Nothing,
$sel:description:PortalSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdateDate:PortalSummary' :: Maybe POSIX
lastUpdateDate = forall a. Maybe a
Prelude.Nothing,
$sel:roleArn:PortalSummary' :: Maybe Text
roleArn = 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_creationDate :: Lens.Lens' PortalSummary (Prelude.Maybe Prelude.UTCTime)
portalSummary_creationDate :: Lens' PortalSummary (Maybe UTCTime)
portalSummary_creationDate = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
portalSummary_description :: Lens.Lens' PortalSummary (Prelude.Maybe Prelude.Text)
portalSummary_description :: Lens' PortalSummary (Maybe Text)
portalSummary_description = 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_lastUpdateDate :: Lens.Lens' PortalSummary (Prelude.Maybe Prelude.UTCTime)
portalSummary_lastUpdateDate :: Lens' PortalSummary (Maybe UTCTime)
portalSummary_lastUpdateDate = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
portalSummary_roleArn :: Lens.Lens' PortalSummary (Prelude.Maybe Prelude.Text)
portalSummary_roleArn :: Lens' PortalSummary (Maybe Text)
portalSummary_roleArn = 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 :: Lens' PortalSummary Text
portalSummary_id = 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 :: Lens' PortalSummary Text
portalSummary_name = 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 :: Lens' PortalSummary Text
portalSummary_startUrl = 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 :: Lens' PortalSummary PortalStatus
portalSummary_status = 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 Data.FromJSON PortalSummary where
parseJSON :: Value -> Parser PortalSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PortalSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Text
-> Text
-> Text
-> PortalStatus
-> PortalSummary
PortalSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"creationDate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"lastUpdateDate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"roleArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"startUrl")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"status")
)
instance Prelude.Hashable PortalSummary where
hashWithSalt :: Int -> PortalSummary -> Int
hashWithSalt Int
_salt PortalSummary' {Maybe Text
Maybe POSIX
Text
PortalStatus
status :: PortalStatus
startUrl :: Text
name :: Text
id :: Text
roleArn :: Maybe Text
lastUpdateDate :: Maybe POSIX
description :: Maybe Text
creationDate :: Maybe POSIX
$sel:status:PortalSummary' :: PortalSummary -> PortalStatus
$sel:startUrl:PortalSummary' :: PortalSummary -> Text
$sel:name:PortalSummary' :: PortalSummary -> Text
$sel:id:PortalSummary' :: PortalSummary -> Text
$sel:roleArn:PortalSummary' :: PortalSummary -> Maybe Text
$sel:lastUpdateDate:PortalSummary' :: PortalSummary -> Maybe POSIX
$sel:description:PortalSummary' :: PortalSummary -> Maybe Text
$sel:creationDate:PortalSummary' :: PortalSummary -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdateDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
startUrl
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` PortalStatus
status
instance Prelude.NFData PortalSummary where
rnf :: PortalSummary -> ()
rnf PortalSummary' {Maybe Text
Maybe POSIX
Text
PortalStatus
status :: PortalStatus
startUrl :: Text
name :: Text
id :: Text
roleArn :: Maybe Text
lastUpdateDate :: Maybe POSIX
description :: Maybe Text
creationDate :: Maybe POSIX
$sel:status:PortalSummary' :: PortalSummary -> PortalStatus
$sel:startUrl:PortalSummary' :: PortalSummary -> Text
$sel:name:PortalSummary' :: PortalSummary -> Text
$sel:id:PortalSummary' :: PortalSummary -> Text
$sel:roleArn:PortalSummary' :: PortalSummary -> Maybe Text
$sel:lastUpdateDate:PortalSummary' :: PortalSummary -> Maybe POSIX
$sel:description:PortalSummary' :: PortalSummary -> Maybe Text
$sel:creationDate:PortalSummary' :: PortalSummary -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdateDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
startUrl
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf PortalStatus
status