{-# 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.SMS.Types.LaunchDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LaunchDetails = LaunchDetails'
{
LaunchDetails -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
LaunchDetails -> Maybe POSIX
latestLaunchTime :: Prelude.Maybe Core.POSIX,
LaunchDetails -> Maybe Text
stackName :: Prelude.Maybe Prelude.Text
}
deriving (LaunchDetails -> LaunchDetails -> Bool
(LaunchDetails -> LaunchDetails -> Bool)
-> (LaunchDetails -> LaunchDetails -> Bool) -> Eq LaunchDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LaunchDetails -> LaunchDetails -> Bool
$c/= :: LaunchDetails -> LaunchDetails -> Bool
== :: LaunchDetails -> LaunchDetails -> Bool
$c== :: LaunchDetails -> LaunchDetails -> Bool
Prelude.Eq, ReadPrec [LaunchDetails]
ReadPrec LaunchDetails
Int -> ReadS LaunchDetails
ReadS [LaunchDetails]
(Int -> ReadS LaunchDetails)
-> ReadS [LaunchDetails]
-> ReadPrec LaunchDetails
-> ReadPrec [LaunchDetails]
-> Read LaunchDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LaunchDetails]
$creadListPrec :: ReadPrec [LaunchDetails]
readPrec :: ReadPrec LaunchDetails
$creadPrec :: ReadPrec LaunchDetails
readList :: ReadS [LaunchDetails]
$creadList :: ReadS [LaunchDetails]
readsPrec :: Int -> ReadS LaunchDetails
$creadsPrec :: Int -> ReadS LaunchDetails
Prelude.Read, Int -> LaunchDetails -> ShowS
[LaunchDetails] -> ShowS
LaunchDetails -> String
(Int -> LaunchDetails -> ShowS)
-> (LaunchDetails -> String)
-> ([LaunchDetails] -> ShowS)
-> Show LaunchDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LaunchDetails] -> ShowS
$cshowList :: [LaunchDetails] -> ShowS
show :: LaunchDetails -> String
$cshow :: LaunchDetails -> String
showsPrec :: Int -> LaunchDetails -> ShowS
$cshowsPrec :: Int -> LaunchDetails -> ShowS
Prelude.Show, (forall x. LaunchDetails -> Rep LaunchDetails x)
-> (forall x. Rep LaunchDetails x -> LaunchDetails)
-> Generic LaunchDetails
forall x. Rep LaunchDetails x -> LaunchDetails
forall x. LaunchDetails -> Rep LaunchDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LaunchDetails x -> LaunchDetails
$cfrom :: forall x. LaunchDetails -> Rep LaunchDetails x
Prelude.Generic)
newLaunchDetails ::
LaunchDetails
newLaunchDetails :: LaunchDetails
newLaunchDetails =
LaunchDetails' :: Maybe Text -> Maybe POSIX -> Maybe Text -> LaunchDetails
LaunchDetails'
{ $sel:stackId:LaunchDetails' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:latestLaunchTime:LaunchDetails' :: Maybe POSIX
latestLaunchTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:stackName:LaunchDetails' :: Maybe Text
stackName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
launchDetails_stackId :: Lens.Lens' LaunchDetails (Prelude.Maybe Prelude.Text)
launchDetails_stackId :: (Maybe Text -> f (Maybe Text)) -> LaunchDetails -> f LaunchDetails
launchDetails_stackId = (LaunchDetails -> Maybe Text)
-> (LaunchDetails -> Maybe Text -> LaunchDetails)
-> Lens LaunchDetails LaunchDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchDetails' {Maybe Text
stackId :: Maybe Text
$sel:stackId:LaunchDetails' :: LaunchDetails -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: LaunchDetails
s@LaunchDetails' {} Maybe Text
a -> LaunchDetails
s {$sel:stackId:LaunchDetails' :: Maybe Text
stackId = Maybe Text
a} :: LaunchDetails)
launchDetails_latestLaunchTime :: Lens.Lens' LaunchDetails (Prelude.Maybe Prelude.UTCTime)
launchDetails_latestLaunchTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> LaunchDetails -> f LaunchDetails
launchDetails_latestLaunchTime = (LaunchDetails -> Maybe POSIX)
-> (LaunchDetails -> Maybe POSIX -> LaunchDetails)
-> Lens LaunchDetails LaunchDetails (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchDetails' {Maybe POSIX
latestLaunchTime :: Maybe POSIX
$sel:latestLaunchTime:LaunchDetails' :: LaunchDetails -> Maybe POSIX
latestLaunchTime} -> Maybe POSIX
latestLaunchTime) (\s :: LaunchDetails
s@LaunchDetails' {} Maybe POSIX
a -> LaunchDetails
s {$sel:latestLaunchTime:LaunchDetails' :: Maybe POSIX
latestLaunchTime = Maybe POSIX
a} :: LaunchDetails) ((Maybe POSIX -> f (Maybe POSIX))
-> LaunchDetails -> f LaunchDetails)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> LaunchDetails
-> f LaunchDetails
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
launchDetails_stackName :: Lens.Lens' LaunchDetails (Prelude.Maybe Prelude.Text)
launchDetails_stackName :: (Maybe Text -> f (Maybe Text)) -> LaunchDetails -> f LaunchDetails
launchDetails_stackName = (LaunchDetails -> Maybe Text)
-> (LaunchDetails -> Maybe Text -> LaunchDetails)
-> Lens LaunchDetails LaunchDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchDetails' {Maybe Text
stackName :: Maybe Text
$sel:stackName:LaunchDetails' :: LaunchDetails -> Maybe Text
stackName} -> Maybe Text
stackName) (\s :: LaunchDetails
s@LaunchDetails' {} Maybe Text
a -> LaunchDetails
s {$sel:stackName:LaunchDetails' :: Maybe Text
stackName = Maybe Text
a} :: LaunchDetails)
instance Core.FromJSON LaunchDetails where
parseJSON :: Value -> Parser LaunchDetails
parseJSON =
String
-> (Object -> Parser LaunchDetails)
-> Value
-> Parser LaunchDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LaunchDetails"
( \Object
x ->
Maybe Text -> Maybe POSIX -> Maybe Text -> LaunchDetails
LaunchDetails'
(Maybe Text -> Maybe POSIX -> Maybe Text -> LaunchDetails)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> LaunchDetails)
forall (f :: * -> *) a b. Functor 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
"stackId")
Parser (Maybe POSIX -> Maybe Text -> LaunchDetails)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> LaunchDetails)
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
"latestLaunchTime")
Parser (Maybe Text -> LaunchDetails)
-> Parser (Maybe Text) -> Parser LaunchDetails
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
"stackName")
)
instance Prelude.Hashable LaunchDetails
instance Prelude.NFData LaunchDetails