{-# 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.IoT1ClickProjects.Types.PlacementSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PlacementSummary = PlacementSummary'
{
PlacementSummary -> Text
projectName :: Prelude.Text,
PlacementSummary -> Text
placementName :: Prelude.Text,
PlacementSummary -> POSIX
createdDate :: Core.POSIX,
PlacementSummary -> POSIX
updatedDate :: Core.POSIX
}
deriving (PlacementSummary -> PlacementSummary -> Bool
(PlacementSummary -> PlacementSummary -> Bool)
-> (PlacementSummary -> PlacementSummary -> Bool)
-> Eq PlacementSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PlacementSummary -> PlacementSummary -> Bool
$c/= :: PlacementSummary -> PlacementSummary -> Bool
== :: PlacementSummary -> PlacementSummary -> Bool
$c== :: PlacementSummary -> PlacementSummary -> Bool
Prelude.Eq, ReadPrec [PlacementSummary]
ReadPrec PlacementSummary
Int -> ReadS PlacementSummary
ReadS [PlacementSummary]
(Int -> ReadS PlacementSummary)
-> ReadS [PlacementSummary]
-> ReadPrec PlacementSummary
-> ReadPrec [PlacementSummary]
-> Read PlacementSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PlacementSummary]
$creadListPrec :: ReadPrec [PlacementSummary]
readPrec :: ReadPrec PlacementSummary
$creadPrec :: ReadPrec PlacementSummary
readList :: ReadS [PlacementSummary]
$creadList :: ReadS [PlacementSummary]
readsPrec :: Int -> ReadS PlacementSummary
$creadsPrec :: Int -> ReadS PlacementSummary
Prelude.Read, Int -> PlacementSummary -> ShowS
[PlacementSummary] -> ShowS
PlacementSummary -> String
(Int -> PlacementSummary -> ShowS)
-> (PlacementSummary -> String)
-> ([PlacementSummary] -> ShowS)
-> Show PlacementSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PlacementSummary] -> ShowS
$cshowList :: [PlacementSummary] -> ShowS
show :: PlacementSummary -> String
$cshow :: PlacementSummary -> String
showsPrec :: Int -> PlacementSummary -> ShowS
$cshowsPrec :: Int -> PlacementSummary -> ShowS
Prelude.Show, (forall x. PlacementSummary -> Rep PlacementSummary x)
-> (forall x. Rep PlacementSummary x -> PlacementSummary)
-> Generic PlacementSummary
forall x. Rep PlacementSummary x -> PlacementSummary
forall x. PlacementSummary -> Rep PlacementSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PlacementSummary x -> PlacementSummary
$cfrom :: forall x. PlacementSummary -> Rep PlacementSummary x
Prelude.Generic)
newPlacementSummary ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.UTCTime ->
PlacementSummary
newPlacementSummary :: Text -> Text -> UTCTime -> UTCTime -> PlacementSummary
newPlacementSummary
Text
pProjectName_
Text
pPlacementName_
UTCTime
pCreatedDate_
UTCTime
pUpdatedDate_ =
PlacementSummary' :: Text -> Text -> POSIX -> POSIX -> PlacementSummary
PlacementSummary'
{ $sel:projectName:PlacementSummary' :: Text
projectName = Text
pProjectName_,
$sel:placementName:PlacementSummary' :: Text
placementName = Text
pPlacementName_,
$sel:createdDate:PlacementSummary' :: POSIX
createdDate = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedDate_,
$sel:updatedDate:PlacementSummary' :: POSIX
updatedDate = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdatedDate_
}
placementSummary_projectName :: Lens.Lens' PlacementSummary Prelude.Text
placementSummary_projectName :: (Text -> f Text) -> PlacementSummary -> f PlacementSummary
placementSummary_projectName = (PlacementSummary -> Text)
-> (PlacementSummary -> Text -> PlacementSummary)
-> Lens PlacementSummary PlacementSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlacementSummary' {Text
projectName :: Text
$sel:projectName:PlacementSummary' :: PlacementSummary -> Text
projectName} -> Text
projectName) (\s :: PlacementSummary
s@PlacementSummary' {} Text
a -> PlacementSummary
s {$sel:projectName:PlacementSummary' :: Text
projectName = Text
a} :: PlacementSummary)
placementSummary_placementName :: Lens.Lens' PlacementSummary Prelude.Text
placementSummary_placementName :: (Text -> f Text) -> PlacementSummary -> f PlacementSummary
placementSummary_placementName = (PlacementSummary -> Text)
-> (PlacementSummary -> Text -> PlacementSummary)
-> Lens PlacementSummary PlacementSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlacementSummary' {Text
placementName :: Text
$sel:placementName:PlacementSummary' :: PlacementSummary -> Text
placementName} -> Text
placementName) (\s :: PlacementSummary
s@PlacementSummary' {} Text
a -> PlacementSummary
s {$sel:placementName:PlacementSummary' :: Text
placementName = Text
a} :: PlacementSummary)
placementSummary_createdDate :: Lens.Lens' PlacementSummary Prelude.UTCTime
placementSummary_createdDate :: (UTCTime -> f UTCTime) -> PlacementSummary -> f PlacementSummary
placementSummary_createdDate = (PlacementSummary -> POSIX)
-> (PlacementSummary -> POSIX -> PlacementSummary)
-> Lens PlacementSummary PlacementSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlacementSummary' {POSIX
createdDate :: POSIX
$sel:createdDate:PlacementSummary' :: PlacementSummary -> POSIX
createdDate} -> POSIX
createdDate) (\s :: PlacementSummary
s@PlacementSummary' {} POSIX
a -> PlacementSummary
s {$sel:createdDate:PlacementSummary' :: POSIX
createdDate = POSIX
a} :: PlacementSummary) ((POSIX -> f POSIX) -> PlacementSummary -> f PlacementSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> PlacementSummary
-> f PlacementSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
placementSummary_updatedDate :: Lens.Lens' PlacementSummary Prelude.UTCTime
placementSummary_updatedDate :: (UTCTime -> f UTCTime) -> PlacementSummary -> f PlacementSummary
placementSummary_updatedDate = (PlacementSummary -> POSIX)
-> (PlacementSummary -> POSIX -> PlacementSummary)
-> Lens PlacementSummary PlacementSummary POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlacementSummary' {POSIX
updatedDate :: POSIX
$sel:updatedDate:PlacementSummary' :: PlacementSummary -> POSIX
updatedDate} -> POSIX
updatedDate) (\s :: PlacementSummary
s@PlacementSummary' {} POSIX
a -> PlacementSummary
s {$sel:updatedDate:PlacementSummary' :: POSIX
updatedDate = POSIX
a} :: PlacementSummary) ((POSIX -> f POSIX) -> PlacementSummary -> f PlacementSummary)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> PlacementSummary
-> f PlacementSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON PlacementSummary where
parseJSON :: Value -> Parser PlacementSummary
parseJSON =
String
-> (Object -> Parser PlacementSummary)
-> Value
-> Parser PlacementSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PlacementSummary"
( \Object
x ->
Text -> Text -> POSIX -> POSIX -> PlacementSummary
PlacementSummary'
(Text -> Text -> POSIX -> POSIX -> PlacementSummary)
-> Parser Text
-> Parser (Text -> POSIX -> POSIX -> PlacementSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"projectName")
Parser (Text -> POSIX -> POSIX -> PlacementSummary)
-> Parser Text -> Parser (POSIX -> POSIX -> PlacementSummary)
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
"placementName")
Parser (POSIX -> POSIX -> PlacementSummary)
-> Parser POSIX -> Parser (POSIX -> PlacementSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"createdDate")
Parser (POSIX -> PlacementSummary)
-> Parser POSIX -> Parser PlacementSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"updatedDate")
)
instance Prelude.Hashable PlacementSummary
instance Prelude.NFData PlacementSummary