{-# 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.RobOMaker.Types.WorldExportJobSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RobOMaker.Types.WorldExportJobStatus
data WorldExportJobSummary = WorldExportJobSummary'
{
WorldExportJobSummary -> Maybe WorldExportJobStatus
status :: Prelude.Maybe WorldExportJobStatus,
WorldExportJobSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
WorldExportJobSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
WorldExportJobSummary -> Maybe (NonEmpty Text)
worlds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text)
}
deriving (WorldExportJobSummary -> WorldExportJobSummary -> Bool
(WorldExportJobSummary -> WorldExportJobSummary -> Bool)
-> (WorldExportJobSummary -> WorldExportJobSummary -> Bool)
-> Eq WorldExportJobSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorldExportJobSummary -> WorldExportJobSummary -> Bool
$c/= :: WorldExportJobSummary -> WorldExportJobSummary -> Bool
== :: WorldExportJobSummary -> WorldExportJobSummary -> Bool
$c== :: WorldExportJobSummary -> WorldExportJobSummary -> Bool
Prelude.Eq, ReadPrec [WorldExportJobSummary]
ReadPrec WorldExportJobSummary
Int -> ReadS WorldExportJobSummary
ReadS [WorldExportJobSummary]
(Int -> ReadS WorldExportJobSummary)
-> ReadS [WorldExportJobSummary]
-> ReadPrec WorldExportJobSummary
-> ReadPrec [WorldExportJobSummary]
-> Read WorldExportJobSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorldExportJobSummary]
$creadListPrec :: ReadPrec [WorldExportJobSummary]
readPrec :: ReadPrec WorldExportJobSummary
$creadPrec :: ReadPrec WorldExportJobSummary
readList :: ReadS [WorldExportJobSummary]
$creadList :: ReadS [WorldExportJobSummary]
readsPrec :: Int -> ReadS WorldExportJobSummary
$creadsPrec :: Int -> ReadS WorldExportJobSummary
Prelude.Read, Int -> WorldExportJobSummary -> ShowS
[WorldExportJobSummary] -> ShowS
WorldExportJobSummary -> String
(Int -> WorldExportJobSummary -> ShowS)
-> (WorldExportJobSummary -> String)
-> ([WorldExportJobSummary] -> ShowS)
-> Show WorldExportJobSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorldExportJobSummary] -> ShowS
$cshowList :: [WorldExportJobSummary] -> ShowS
show :: WorldExportJobSummary -> String
$cshow :: WorldExportJobSummary -> String
showsPrec :: Int -> WorldExportJobSummary -> ShowS
$cshowsPrec :: Int -> WorldExportJobSummary -> ShowS
Prelude.Show, (forall x. WorldExportJobSummary -> Rep WorldExportJobSummary x)
-> (forall x. Rep WorldExportJobSummary x -> WorldExportJobSummary)
-> Generic WorldExportJobSummary
forall x. Rep WorldExportJobSummary x -> WorldExportJobSummary
forall x. WorldExportJobSummary -> Rep WorldExportJobSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WorldExportJobSummary x -> WorldExportJobSummary
$cfrom :: forall x. WorldExportJobSummary -> Rep WorldExportJobSummary x
Prelude.Generic)
newWorldExportJobSummary ::
WorldExportJobSummary
newWorldExportJobSummary :: WorldExportJobSummary
newWorldExportJobSummary =
WorldExportJobSummary' :: Maybe WorldExportJobStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe (NonEmpty Text)
-> WorldExportJobSummary
WorldExportJobSummary'
{ $sel:status:WorldExportJobSummary' :: Maybe WorldExportJobStatus
status = Maybe WorldExportJobStatus
forall a. Maybe a
Prelude.Nothing,
$sel:arn:WorldExportJobSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:WorldExportJobSummary' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:worlds:WorldExportJobSummary' :: Maybe (NonEmpty Text)
worlds = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing
}
worldExportJobSummary_status :: Lens.Lens' WorldExportJobSummary (Prelude.Maybe WorldExportJobStatus)
worldExportJobSummary_status :: (Maybe WorldExportJobStatus -> f (Maybe WorldExportJobStatus))
-> WorldExportJobSummary -> f WorldExportJobSummary
worldExportJobSummary_status = (WorldExportJobSummary -> Maybe WorldExportJobStatus)
-> (WorldExportJobSummary
-> Maybe WorldExportJobStatus -> WorldExportJobSummary)
-> Lens
WorldExportJobSummary
WorldExportJobSummary
(Maybe WorldExportJobStatus)
(Maybe WorldExportJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldExportJobSummary' {Maybe WorldExportJobStatus
status :: Maybe WorldExportJobStatus
$sel:status:WorldExportJobSummary' :: WorldExportJobSummary -> Maybe WorldExportJobStatus
status} -> Maybe WorldExportJobStatus
status) (\s :: WorldExportJobSummary
s@WorldExportJobSummary' {} Maybe WorldExportJobStatus
a -> WorldExportJobSummary
s {$sel:status:WorldExportJobSummary' :: Maybe WorldExportJobStatus
status = Maybe WorldExportJobStatus
a} :: WorldExportJobSummary)
worldExportJobSummary_arn :: Lens.Lens' WorldExportJobSummary (Prelude.Maybe Prelude.Text)
worldExportJobSummary_arn :: (Maybe Text -> f (Maybe Text))
-> WorldExportJobSummary -> f WorldExportJobSummary
worldExportJobSummary_arn = (WorldExportJobSummary -> Maybe Text)
-> (WorldExportJobSummary -> Maybe Text -> WorldExportJobSummary)
-> Lens
WorldExportJobSummary
WorldExportJobSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldExportJobSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:WorldExportJobSummary' :: WorldExportJobSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: WorldExportJobSummary
s@WorldExportJobSummary' {} Maybe Text
a -> WorldExportJobSummary
s {$sel:arn:WorldExportJobSummary' :: Maybe Text
arn = Maybe Text
a} :: WorldExportJobSummary)
worldExportJobSummary_createdAt :: Lens.Lens' WorldExportJobSummary (Prelude.Maybe Prelude.UTCTime)
worldExportJobSummary_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> WorldExportJobSummary -> f WorldExportJobSummary
worldExportJobSummary_createdAt = (WorldExportJobSummary -> Maybe POSIX)
-> (WorldExportJobSummary -> Maybe POSIX -> WorldExportJobSummary)
-> Lens
WorldExportJobSummary
WorldExportJobSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldExportJobSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:WorldExportJobSummary' :: WorldExportJobSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: WorldExportJobSummary
s@WorldExportJobSummary' {} Maybe POSIX
a -> WorldExportJobSummary
s {$sel:createdAt:WorldExportJobSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: WorldExportJobSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> WorldExportJobSummary -> f WorldExportJobSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> WorldExportJobSummary
-> f WorldExportJobSummary
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
worldExportJobSummary_worlds :: Lens.Lens' WorldExportJobSummary (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
worldExportJobSummary_worlds :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> WorldExportJobSummary -> f WorldExportJobSummary
worldExportJobSummary_worlds = (WorldExportJobSummary -> Maybe (NonEmpty Text))
-> (WorldExportJobSummary
-> Maybe (NonEmpty Text) -> WorldExportJobSummary)
-> Lens
WorldExportJobSummary
WorldExportJobSummary
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorldExportJobSummary' {Maybe (NonEmpty Text)
worlds :: Maybe (NonEmpty Text)
$sel:worlds:WorldExportJobSummary' :: WorldExportJobSummary -> Maybe (NonEmpty Text)
worlds} -> Maybe (NonEmpty Text)
worlds) (\s :: WorldExportJobSummary
s@WorldExportJobSummary' {} Maybe (NonEmpty Text)
a -> WorldExportJobSummary
s {$sel:worlds:WorldExportJobSummary' :: Maybe (NonEmpty Text)
worlds = Maybe (NonEmpty Text)
a} :: WorldExportJobSummary) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> WorldExportJobSummary -> f WorldExportJobSummary)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> WorldExportJobSummary
-> f WorldExportJobSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON WorldExportJobSummary where
parseJSON :: Value -> Parser WorldExportJobSummary
parseJSON =
String
-> (Object -> Parser WorldExportJobSummary)
-> Value
-> Parser WorldExportJobSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorldExportJobSummary"
( \Object
x ->
Maybe WorldExportJobStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe (NonEmpty Text)
-> WorldExportJobSummary
WorldExportJobSummary'
(Maybe WorldExportJobStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe (NonEmpty Text)
-> WorldExportJobSummary)
-> Parser (Maybe WorldExportJobStatus)
-> Parser
(Maybe Text
-> Maybe POSIX -> Maybe (NonEmpty Text) -> WorldExportJobSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe WorldExportJobStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text
-> Maybe POSIX -> Maybe (NonEmpty Text) -> WorldExportJobSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX -> Maybe (NonEmpty Text) -> WorldExportJobSummary)
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
"arn")
Parser
(Maybe POSIX -> Maybe (NonEmpty Text) -> WorldExportJobSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe (NonEmpty Text) -> WorldExportJobSummary)
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
"createdAt")
Parser (Maybe (NonEmpty Text) -> WorldExportJobSummary)
-> Parser (Maybe (NonEmpty Text)) -> Parser WorldExportJobSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"worlds")
)
instance Prelude.Hashable WorldExportJobSummary
instance Prelude.NFData WorldExportJobSummary