{-# 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.Transfer.Types.ListedExecution 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
import Amazonka.Transfer.Types.ExecutionStatus
import Amazonka.Transfer.Types.FileLocation
import Amazonka.Transfer.Types.ServiceMetadata
data ListedExecution = ListedExecution'
{
ListedExecution -> Maybe Text
executionId :: Prelude.Maybe Prelude.Text,
ListedExecution -> Maybe FileLocation
initialFileLocation :: Prelude.Maybe FileLocation,
ListedExecution -> Maybe ServiceMetadata
serviceMetadata :: Prelude.Maybe ServiceMetadata,
ListedExecution -> Maybe ExecutionStatus
status :: Prelude.Maybe ExecutionStatus
}
deriving (ListedExecution -> ListedExecution -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListedExecution -> ListedExecution -> Bool
$c/= :: ListedExecution -> ListedExecution -> Bool
== :: ListedExecution -> ListedExecution -> Bool
$c== :: ListedExecution -> ListedExecution -> Bool
Prelude.Eq, ReadPrec [ListedExecution]
ReadPrec ListedExecution
Int -> ReadS ListedExecution
ReadS [ListedExecution]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListedExecution]
$creadListPrec :: ReadPrec [ListedExecution]
readPrec :: ReadPrec ListedExecution
$creadPrec :: ReadPrec ListedExecution
readList :: ReadS [ListedExecution]
$creadList :: ReadS [ListedExecution]
readsPrec :: Int -> ReadS ListedExecution
$creadsPrec :: Int -> ReadS ListedExecution
Prelude.Read, Int -> ListedExecution -> ShowS
[ListedExecution] -> ShowS
ListedExecution -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListedExecution] -> ShowS
$cshowList :: [ListedExecution] -> ShowS
show :: ListedExecution -> String
$cshow :: ListedExecution -> String
showsPrec :: Int -> ListedExecution -> ShowS
$cshowsPrec :: Int -> ListedExecution -> ShowS
Prelude.Show, forall x. Rep ListedExecution x -> ListedExecution
forall x. ListedExecution -> Rep ListedExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListedExecution x -> ListedExecution
$cfrom :: forall x. ListedExecution -> Rep ListedExecution x
Prelude.Generic)
newListedExecution ::
ListedExecution
newListedExecution :: ListedExecution
newListedExecution =
ListedExecution'
{ $sel:executionId:ListedExecution' :: Maybe Text
executionId = forall a. Maybe a
Prelude.Nothing,
$sel:initialFileLocation:ListedExecution' :: Maybe FileLocation
initialFileLocation = forall a. Maybe a
Prelude.Nothing,
$sel:serviceMetadata:ListedExecution' :: Maybe ServiceMetadata
serviceMetadata = forall a. Maybe a
Prelude.Nothing,
$sel:status:ListedExecution' :: Maybe ExecutionStatus
status = forall a. Maybe a
Prelude.Nothing
}
listedExecution_executionId :: Lens.Lens' ListedExecution (Prelude.Maybe Prelude.Text)
listedExecution_executionId :: Lens' ListedExecution (Maybe Text)
listedExecution_executionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedExecution' {Maybe Text
executionId :: Maybe Text
$sel:executionId:ListedExecution' :: ListedExecution -> Maybe Text
executionId} -> Maybe Text
executionId) (\s :: ListedExecution
s@ListedExecution' {} Maybe Text
a -> ListedExecution
s {$sel:executionId:ListedExecution' :: Maybe Text
executionId = Maybe Text
a} :: ListedExecution)
listedExecution_initialFileLocation :: Lens.Lens' ListedExecution (Prelude.Maybe FileLocation)
listedExecution_initialFileLocation :: Lens' ListedExecution (Maybe FileLocation)
listedExecution_initialFileLocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedExecution' {Maybe FileLocation
initialFileLocation :: Maybe FileLocation
$sel:initialFileLocation:ListedExecution' :: ListedExecution -> Maybe FileLocation
initialFileLocation} -> Maybe FileLocation
initialFileLocation) (\s :: ListedExecution
s@ListedExecution' {} Maybe FileLocation
a -> ListedExecution
s {$sel:initialFileLocation:ListedExecution' :: Maybe FileLocation
initialFileLocation = Maybe FileLocation
a} :: ListedExecution)
listedExecution_serviceMetadata :: Lens.Lens' ListedExecution (Prelude.Maybe ServiceMetadata)
listedExecution_serviceMetadata :: Lens' ListedExecution (Maybe ServiceMetadata)
listedExecution_serviceMetadata = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedExecution' {Maybe ServiceMetadata
serviceMetadata :: Maybe ServiceMetadata
$sel:serviceMetadata:ListedExecution' :: ListedExecution -> Maybe ServiceMetadata
serviceMetadata} -> Maybe ServiceMetadata
serviceMetadata) (\s :: ListedExecution
s@ListedExecution' {} Maybe ServiceMetadata
a -> ListedExecution
s {$sel:serviceMetadata:ListedExecution' :: Maybe ServiceMetadata
serviceMetadata = Maybe ServiceMetadata
a} :: ListedExecution)
listedExecution_status :: Lens.Lens' ListedExecution (Prelude.Maybe ExecutionStatus)
listedExecution_status :: Lens' ListedExecution (Maybe ExecutionStatus)
listedExecution_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListedExecution' {Maybe ExecutionStatus
status :: Maybe ExecutionStatus
$sel:status:ListedExecution' :: ListedExecution -> Maybe ExecutionStatus
status} -> Maybe ExecutionStatus
status) (\s :: ListedExecution
s@ListedExecution' {} Maybe ExecutionStatus
a -> ListedExecution
s {$sel:status:ListedExecution' :: Maybe ExecutionStatus
status = Maybe ExecutionStatus
a} :: ListedExecution)
instance Data.FromJSON ListedExecution where
parseJSON :: Value -> Parser ListedExecution
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ListedExecution"
( \Object
x ->
Maybe Text
-> Maybe FileLocation
-> Maybe ServiceMetadata
-> Maybe ExecutionStatus
-> ListedExecution
ListedExecution'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ExecutionId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InitialFileLocation")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ServiceMetadata")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
)
instance Prelude.Hashable ListedExecution where
hashWithSalt :: Int -> ListedExecution -> Int
hashWithSalt Int
_salt ListedExecution' {Maybe Text
Maybe ExecutionStatus
Maybe FileLocation
Maybe ServiceMetadata
status :: Maybe ExecutionStatus
serviceMetadata :: Maybe ServiceMetadata
initialFileLocation :: Maybe FileLocation
executionId :: Maybe Text
$sel:status:ListedExecution' :: ListedExecution -> Maybe ExecutionStatus
$sel:serviceMetadata:ListedExecution' :: ListedExecution -> Maybe ServiceMetadata
$sel:initialFileLocation:ListedExecution' :: ListedExecution -> Maybe FileLocation
$sel:executionId:ListedExecution' :: ListedExecution -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
executionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FileLocation
initialFileLocation
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ServiceMetadata
serviceMetadata
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ExecutionStatus
status
instance Prelude.NFData ListedExecution where
rnf :: ListedExecution -> ()
rnf ListedExecution' {Maybe Text
Maybe ExecutionStatus
Maybe FileLocation
Maybe ServiceMetadata
status :: Maybe ExecutionStatus
serviceMetadata :: Maybe ServiceMetadata
initialFileLocation :: Maybe FileLocation
executionId :: Maybe Text
$sel:status:ListedExecution' :: ListedExecution -> Maybe ExecutionStatus
$sel:serviceMetadata:ListedExecution' :: ListedExecution -> Maybe ServiceMetadata
$sel:initialFileLocation:ListedExecution' :: ListedExecution -> Maybe FileLocation
$sel:executionId:ListedExecution' :: ListedExecution -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
executionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FileLocation
initialFileLocation
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ServiceMetadata
serviceMetadata
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExecutionStatus
status