{-# 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.IoTEvents.Types.InputSummary where
import qualified Amazonka.Core as Core
import Amazonka.IoTEvents.Types.InputStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data InputSummary = InputSummary'
{
InputSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
InputSummary -> Maybe InputStatus
status :: Prelude.Maybe InputStatus,
InputSummary -> Maybe Text
inputName :: Prelude.Maybe Prelude.Text,
InputSummary -> Maybe Text
inputDescription :: Prelude.Maybe Prelude.Text,
InputSummary -> Maybe Text
inputArn :: Prelude.Maybe Prelude.Text,
InputSummary -> Maybe POSIX
lastUpdateTime :: Prelude.Maybe Core.POSIX
}
deriving (InputSummary -> InputSummary -> Bool
(InputSummary -> InputSummary -> Bool)
-> (InputSummary -> InputSummary -> Bool) -> Eq InputSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InputSummary -> InputSummary -> Bool
$c/= :: InputSummary -> InputSummary -> Bool
== :: InputSummary -> InputSummary -> Bool
$c== :: InputSummary -> InputSummary -> Bool
Prelude.Eq, ReadPrec [InputSummary]
ReadPrec InputSummary
Int -> ReadS InputSummary
ReadS [InputSummary]
(Int -> ReadS InputSummary)
-> ReadS [InputSummary]
-> ReadPrec InputSummary
-> ReadPrec [InputSummary]
-> Read InputSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InputSummary]
$creadListPrec :: ReadPrec [InputSummary]
readPrec :: ReadPrec InputSummary
$creadPrec :: ReadPrec InputSummary
readList :: ReadS [InputSummary]
$creadList :: ReadS [InputSummary]
readsPrec :: Int -> ReadS InputSummary
$creadsPrec :: Int -> ReadS InputSummary
Prelude.Read, Int -> InputSummary -> ShowS
[InputSummary] -> ShowS
InputSummary -> String
(Int -> InputSummary -> ShowS)
-> (InputSummary -> String)
-> ([InputSummary] -> ShowS)
-> Show InputSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InputSummary] -> ShowS
$cshowList :: [InputSummary] -> ShowS
show :: InputSummary -> String
$cshow :: InputSummary -> String
showsPrec :: Int -> InputSummary -> ShowS
$cshowsPrec :: Int -> InputSummary -> ShowS
Prelude.Show, (forall x. InputSummary -> Rep InputSummary x)
-> (forall x. Rep InputSummary x -> InputSummary)
-> Generic InputSummary
forall x. Rep InputSummary x -> InputSummary
forall x. InputSummary -> Rep InputSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InputSummary x -> InputSummary
$cfrom :: forall x. InputSummary -> Rep InputSummary x
Prelude.Generic)
newInputSummary ::
InputSummary
newInputSummary :: InputSummary
newInputSummary =
InputSummary' :: Maybe POSIX
-> Maybe InputStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> InputSummary
InputSummary'
{ $sel:creationTime:InputSummary' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:status:InputSummary' :: Maybe InputStatus
status = Maybe InputStatus
forall a. Maybe a
Prelude.Nothing,
$sel:inputName:InputSummary' :: Maybe Text
inputName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:inputDescription:InputSummary' :: Maybe Text
inputDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:inputArn:InputSummary' :: Maybe Text
inputArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdateTime:InputSummary' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
inputSummary_creationTime :: Lens.Lens' InputSummary (Prelude.Maybe Prelude.UTCTime)
inputSummary_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InputSummary -> f InputSummary
inputSummary_creationTime = (InputSummary -> Maybe POSIX)
-> (InputSummary -> Maybe POSIX -> InputSummary)
-> Lens InputSummary InputSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:InputSummary' :: InputSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: InputSummary
s@InputSummary' {} Maybe POSIX
a -> InputSummary
s {$sel:creationTime:InputSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: InputSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> InputSummary -> f InputSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InputSummary
-> f InputSummary
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
inputSummary_status :: Lens.Lens' InputSummary (Prelude.Maybe InputStatus)
inputSummary_status :: (Maybe InputStatus -> f (Maybe InputStatus))
-> InputSummary -> f InputSummary
inputSummary_status = (InputSummary -> Maybe InputStatus)
-> (InputSummary -> Maybe InputStatus -> InputSummary)
-> Lens
InputSummary InputSummary (Maybe InputStatus) (Maybe InputStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputSummary' {Maybe InputStatus
status :: Maybe InputStatus
$sel:status:InputSummary' :: InputSummary -> Maybe InputStatus
status} -> Maybe InputStatus
status) (\s :: InputSummary
s@InputSummary' {} Maybe InputStatus
a -> InputSummary
s {$sel:status:InputSummary' :: Maybe InputStatus
status = Maybe InputStatus
a} :: InputSummary)
inputSummary_inputName :: Lens.Lens' InputSummary (Prelude.Maybe Prelude.Text)
inputSummary_inputName :: (Maybe Text -> f (Maybe Text)) -> InputSummary -> f InputSummary
inputSummary_inputName = (InputSummary -> Maybe Text)
-> (InputSummary -> Maybe Text -> InputSummary)
-> Lens InputSummary InputSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputSummary' {Maybe Text
inputName :: Maybe Text
$sel:inputName:InputSummary' :: InputSummary -> Maybe Text
inputName} -> Maybe Text
inputName) (\s :: InputSummary
s@InputSummary' {} Maybe Text
a -> InputSummary
s {$sel:inputName:InputSummary' :: Maybe Text
inputName = Maybe Text
a} :: InputSummary)
inputSummary_inputDescription :: Lens.Lens' InputSummary (Prelude.Maybe Prelude.Text)
inputSummary_inputDescription :: (Maybe Text -> f (Maybe Text)) -> InputSummary -> f InputSummary
inputSummary_inputDescription = (InputSummary -> Maybe Text)
-> (InputSummary -> Maybe Text -> InputSummary)
-> Lens InputSummary InputSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputSummary' {Maybe Text
inputDescription :: Maybe Text
$sel:inputDescription:InputSummary' :: InputSummary -> Maybe Text
inputDescription} -> Maybe Text
inputDescription) (\s :: InputSummary
s@InputSummary' {} Maybe Text
a -> InputSummary
s {$sel:inputDescription:InputSummary' :: Maybe Text
inputDescription = Maybe Text
a} :: InputSummary)
inputSummary_inputArn :: Lens.Lens' InputSummary (Prelude.Maybe Prelude.Text)
inputSummary_inputArn :: (Maybe Text -> f (Maybe Text)) -> InputSummary -> f InputSummary
inputSummary_inputArn = (InputSummary -> Maybe Text)
-> (InputSummary -> Maybe Text -> InputSummary)
-> Lens InputSummary InputSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputSummary' {Maybe Text
inputArn :: Maybe Text
$sel:inputArn:InputSummary' :: InputSummary -> Maybe Text
inputArn} -> Maybe Text
inputArn) (\s :: InputSummary
s@InputSummary' {} Maybe Text
a -> InputSummary
s {$sel:inputArn:InputSummary' :: Maybe Text
inputArn = Maybe Text
a} :: InputSummary)
inputSummary_lastUpdateTime :: Lens.Lens' InputSummary (Prelude.Maybe Prelude.UTCTime)
inputSummary_lastUpdateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InputSummary -> f InputSummary
inputSummary_lastUpdateTime = (InputSummary -> Maybe POSIX)
-> (InputSummary -> Maybe POSIX -> InputSummary)
-> Lens InputSummary InputSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InputSummary' {Maybe POSIX
lastUpdateTime :: Maybe POSIX
$sel:lastUpdateTime:InputSummary' :: InputSummary -> Maybe POSIX
lastUpdateTime} -> Maybe POSIX
lastUpdateTime) (\s :: InputSummary
s@InputSummary' {} Maybe POSIX
a -> InputSummary
s {$sel:lastUpdateTime:InputSummary' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
a} :: InputSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> InputSummary -> f InputSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InputSummary
-> f InputSummary
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
instance Core.FromJSON InputSummary where
parseJSON :: Value -> Parser InputSummary
parseJSON =
String
-> (Object -> Parser InputSummary) -> Value -> Parser InputSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"InputSummary"
( \Object
x ->
Maybe POSIX
-> Maybe InputStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> InputSummary
InputSummary'
(Maybe POSIX
-> Maybe InputStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> InputSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe InputStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> InputSummary)
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
"creationTime")
Parser
(Maybe InputStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> InputSummary)
-> Parser (Maybe InputStatus)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe POSIX -> InputSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe POSIX -> InputSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe POSIX -> InputSummary)
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
"inputName")
Parser (Maybe Text -> Maybe Text -> Maybe POSIX -> InputSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> InputSummary)
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
"inputDescription")
Parser (Maybe Text -> Maybe POSIX -> InputSummary)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> InputSummary)
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
"inputArn")
Parser (Maybe POSIX -> InputSummary)
-> Parser (Maybe POSIX) -> Parser InputSummary
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
"lastUpdateTime")
)
instance Prelude.Hashable InputSummary
instance Prelude.NFData InputSummary