{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data PlacementSummary = PlacementSummary'
{
PlacementSummary -> Text
projectName :: Prelude.Text,
PlacementSummary -> Text
placementName :: Prelude.Text,
PlacementSummary -> POSIX
createdDate :: Data.POSIX,
PlacementSummary -> POSIX
updatedDate :: Data.POSIX
}
deriving (PlacementSummary -> PlacementSummary -> Bool
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]
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
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. 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'
{ $sel:projectName:PlacementSummary' :: Text
projectName = Text
pProjectName_,
$sel:placementName:PlacementSummary' :: Text
placementName = Text
pPlacementName_,
$sel:createdDate:PlacementSummary' :: POSIX
createdDate = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedDate_,
$sel:updatedDate:PlacementSummary' :: POSIX
updatedDate = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdatedDate_
}
placementSummary_projectName :: Lens.Lens' PlacementSummary Prelude.Text
placementSummary_projectName :: Lens' PlacementSummary Text
placementSummary_projectName = 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 :: Lens' PlacementSummary Text
placementSummary_placementName = 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 :: Lens' PlacementSummary UTCTime
placementSummary_createdDate = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
placementSummary_updatedDate :: Lens.Lens' PlacementSummary Prelude.UTCTime
placementSummary_updatedDate :: Lens' PlacementSummary UTCTime
placementSummary_updatedDate = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
instance Data.FromJSON PlacementSummary where
parseJSON :: Value -> Parser PlacementSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PlacementSummary"
( \Object
x ->
Text -> Text -> POSIX -> POSIX -> PlacementSummary
PlacementSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"projectName")
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
"placementName")
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
"createdDate")
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
"updatedDate")
)
instance Prelude.Hashable PlacementSummary where
hashWithSalt :: Int -> PlacementSummary -> Int
hashWithSalt Int
_salt PlacementSummary' {Text
POSIX
updatedDate :: POSIX
createdDate :: POSIX
placementName :: Text
projectName :: Text
$sel:updatedDate:PlacementSummary' :: PlacementSummary -> POSIX
$sel:createdDate:PlacementSummary' :: PlacementSummary -> POSIX
$sel:placementName:PlacementSummary' :: PlacementSummary -> Text
$sel:projectName:PlacementSummary' :: PlacementSummary -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
projectName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
placementName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
createdDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` POSIX
updatedDate
instance Prelude.NFData PlacementSummary where
rnf :: PlacementSummary -> ()
rnf PlacementSummary' {Text
POSIX
updatedDate :: POSIX
createdDate :: POSIX
placementName :: Text
projectName :: Text
$sel:updatedDate:PlacementSummary' :: PlacementSummary -> POSIX
$sel:createdDate:PlacementSummary' :: PlacementSummary -> POSIX
$sel:placementName:PlacementSummary' :: PlacementSummary -> Text
$sel:projectName:PlacementSummary' :: PlacementSummary -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
projectName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
placementName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
createdDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
updatedDate