{-# 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.DescribedExecution where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Transfer.Types.ExecutionResults
import Amazonka.Transfer.Types.ExecutionStatus
import Amazonka.Transfer.Types.FileLocation
import Amazonka.Transfer.Types.LoggingConfiguration
import Amazonka.Transfer.Types.PosixProfile
import Amazonka.Transfer.Types.ServiceMetadata
data DescribedExecution = DescribedExecution'
{
DescribedExecution -> Maybe ExecutionStatus
status :: Prelude.Maybe ExecutionStatus,
DescribedExecution -> Maybe Text
executionId :: Prelude.Maybe Prelude.Text,
DescribedExecution -> Maybe ExecutionResults
results :: Prelude.Maybe ExecutionResults,
DescribedExecution -> Maybe FileLocation
initialFileLocation :: Prelude.Maybe FileLocation,
DescribedExecution -> Maybe PosixProfile
posixProfile :: Prelude.Maybe PosixProfile,
DescribedExecution -> Maybe ServiceMetadata
serviceMetadata :: Prelude.Maybe ServiceMetadata,
DescribedExecution -> Maybe LoggingConfiguration
loggingConfiguration :: Prelude.Maybe LoggingConfiguration,
DescribedExecution -> Maybe Text
executionRole :: Prelude.Maybe Prelude.Text
}
deriving (DescribedExecution -> DescribedExecution -> Bool
(DescribedExecution -> DescribedExecution -> Bool)
-> (DescribedExecution -> DescribedExecution -> Bool)
-> Eq DescribedExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribedExecution -> DescribedExecution -> Bool
$c/= :: DescribedExecution -> DescribedExecution -> Bool
== :: DescribedExecution -> DescribedExecution -> Bool
$c== :: DescribedExecution -> DescribedExecution -> Bool
Prelude.Eq, ReadPrec [DescribedExecution]
ReadPrec DescribedExecution
Int -> ReadS DescribedExecution
ReadS [DescribedExecution]
(Int -> ReadS DescribedExecution)
-> ReadS [DescribedExecution]
-> ReadPrec DescribedExecution
-> ReadPrec [DescribedExecution]
-> Read DescribedExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribedExecution]
$creadListPrec :: ReadPrec [DescribedExecution]
readPrec :: ReadPrec DescribedExecution
$creadPrec :: ReadPrec DescribedExecution
readList :: ReadS [DescribedExecution]
$creadList :: ReadS [DescribedExecution]
readsPrec :: Int -> ReadS DescribedExecution
$creadsPrec :: Int -> ReadS DescribedExecution
Prelude.Read, Int -> DescribedExecution -> ShowS
[DescribedExecution] -> ShowS
DescribedExecution -> String
(Int -> DescribedExecution -> ShowS)
-> (DescribedExecution -> String)
-> ([DescribedExecution] -> ShowS)
-> Show DescribedExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribedExecution] -> ShowS
$cshowList :: [DescribedExecution] -> ShowS
show :: DescribedExecution -> String
$cshow :: DescribedExecution -> String
showsPrec :: Int -> DescribedExecution -> ShowS
$cshowsPrec :: Int -> DescribedExecution -> ShowS
Prelude.Show, (forall x. DescribedExecution -> Rep DescribedExecution x)
-> (forall x. Rep DescribedExecution x -> DescribedExecution)
-> Generic DescribedExecution
forall x. Rep DescribedExecution x -> DescribedExecution
forall x. DescribedExecution -> Rep DescribedExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribedExecution x -> DescribedExecution
$cfrom :: forall x. DescribedExecution -> Rep DescribedExecution x
Prelude.Generic)
newDescribedExecution ::
DescribedExecution
newDescribedExecution :: DescribedExecution
newDescribedExecution =
DescribedExecution' :: Maybe ExecutionStatus
-> Maybe Text
-> Maybe ExecutionResults
-> Maybe FileLocation
-> Maybe PosixProfile
-> Maybe ServiceMetadata
-> Maybe LoggingConfiguration
-> Maybe Text
-> DescribedExecution
DescribedExecution'
{ $sel:status:DescribedExecution' :: Maybe ExecutionStatus
status = Maybe ExecutionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:executionId:DescribedExecution' :: Maybe Text
executionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:results:DescribedExecution' :: Maybe ExecutionResults
results = Maybe ExecutionResults
forall a. Maybe a
Prelude.Nothing,
$sel:initialFileLocation:DescribedExecution' :: Maybe FileLocation
initialFileLocation = Maybe FileLocation
forall a. Maybe a
Prelude.Nothing,
$sel:posixProfile:DescribedExecution' :: Maybe PosixProfile
posixProfile = Maybe PosixProfile
forall a. Maybe a
Prelude.Nothing,
$sel:serviceMetadata:DescribedExecution' :: Maybe ServiceMetadata
serviceMetadata = Maybe ServiceMetadata
forall a. Maybe a
Prelude.Nothing,
$sel:loggingConfiguration:DescribedExecution' :: Maybe LoggingConfiguration
loggingConfiguration = Maybe LoggingConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:executionRole:DescribedExecution' :: Maybe Text
executionRole = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
describedExecution_status :: Lens.Lens' DescribedExecution (Prelude.Maybe ExecutionStatus)
describedExecution_status :: (Maybe ExecutionStatus -> f (Maybe ExecutionStatus))
-> DescribedExecution -> f DescribedExecution
describedExecution_status = (DescribedExecution -> Maybe ExecutionStatus)
-> (DescribedExecution
-> Maybe ExecutionStatus -> DescribedExecution)
-> Lens
DescribedExecution
DescribedExecution
(Maybe ExecutionStatus)
(Maybe ExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedExecution' {Maybe ExecutionStatus
status :: Maybe ExecutionStatus
$sel:status:DescribedExecution' :: DescribedExecution -> Maybe ExecutionStatus
status} -> Maybe ExecutionStatus
status) (\s :: DescribedExecution
s@DescribedExecution' {} Maybe ExecutionStatus
a -> DescribedExecution
s {$sel:status:DescribedExecution' :: Maybe ExecutionStatus
status = Maybe ExecutionStatus
a} :: DescribedExecution)
describedExecution_executionId :: Lens.Lens' DescribedExecution (Prelude.Maybe Prelude.Text)
describedExecution_executionId :: (Maybe Text -> f (Maybe Text))
-> DescribedExecution -> f DescribedExecution
describedExecution_executionId = (DescribedExecution -> Maybe Text)
-> (DescribedExecution -> Maybe Text -> DescribedExecution)
-> Lens
DescribedExecution DescribedExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedExecution' {Maybe Text
executionId :: Maybe Text
$sel:executionId:DescribedExecution' :: DescribedExecution -> Maybe Text
executionId} -> Maybe Text
executionId) (\s :: DescribedExecution
s@DescribedExecution' {} Maybe Text
a -> DescribedExecution
s {$sel:executionId:DescribedExecution' :: Maybe Text
executionId = Maybe Text
a} :: DescribedExecution)
describedExecution_results :: Lens.Lens' DescribedExecution (Prelude.Maybe ExecutionResults)
describedExecution_results :: (Maybe ExecutionResults -> f (Maybe ExecutionResults))
-> DescribedExecution -> f DescribedExecution
describedExecution_results = (DescribedExecution -> Maybe ExecutionResults)
-> (DescribedExecution
-> Maybe ExecutionResults -> DescribedExecution)
-> Lens
DescribedExecution
DescribedExecution
(Maybe ExecutionResults)
(Maybe ExecutionResults)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedExecution' {Maybe ExecutionResults
results :: Maybe ExecutionResults
$sel:results:DescribedExecution' :: DescribedExecution -> Maybe ExecutionResults
results} -> Maybe ExecutionResults
results) (\s :: DescribedExecution
s@DescribedExecution' {} Maybe ExecutionResults
a -> DescribedExecution
s {$sel:results:DescribedExecution' :: Maybe ExecutionResults
results = Maybe ExecutionResults
a} :: DescribedExecution)
describedExecution_initialFileLocation :: Lens.Lens' DescribedExecution (Prelude.Maybe FileLocation)
describedExecution_initialFileLocation :: (Maybe FileLocation -> f (Maybe FileLocation))
-> DescribedExecution -> f DescribedExecution
describedExecution_initialFileLocation = (DescribedExecution -> Maybe FileLocation)
-> (DescribedExecution -> Maybe FileLocation -> DescribedExecution)
-> Lens
DescribedExecution
DescribedExecution
(Maybe FileLocation)
(Maybe FileLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedExecution' {Maybe FileLocation
initialFileLocation :: Maybe FileLocation
$sel:initialFileLocation:DescribedExecution' :: DescribedExecution -> Maybe FileLocation
initialFileLocation} -> Maybe FileLocation
initialFileLocation) (\s :: DescribedExecution
s@DescribedExecution' {} Maybe FileLocation
a -> DescribedExecution
s {$sel:initialFileLocation:DescribedExecution' :: Maybe FileLocation
initialFileLocation = Maybe FileLocation
a} :: DescribedExecution)
describedExecution_posixProfile :: Lens.Lens' DescribedExecution (Prelude.Maybe PosixProfile)
describedExecution_posixProfile :: (Maybe PosixProfile -> f (Maybe PosixProfile))
-> DescribedExecution -> f DescribedExecution
describedExecution_posixProfile = (DescribedExecution -> Maybe PosixProfile)
-> (DescribedExecution -> Maybe PosixProfile -> DescribedExecution)
-> Lens
DescribedExecution
DescribedExecution
(Maybe PosixProfile)
(Maybe PosixProfile)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedExecution' {Maybe PosixProfile
posixProfile :: Maybe PosixProfile
$sel:posixProfile:DescribedExecution' :: DescribedExecution -> Maybe PosixProfile
posixProfile} -> Maybe PosixProfile
posixProfile) (\s :: DescribedExecution
s@DescribedExecution' {} Maybe PosixProfile
a -> DescribedExecution
s {$sel:posixProfile:DescribedExecution' :: Maybe PosixProfile
posixProfile = Maybe PosixProfile
a} :: DescribedExecution)
describedExecution_serviceMetadata :: Lens.Lens' DescribedExecution (Prelude.Maybe ServiceMetadata)
describedExecution_serviceMetadata :: (Maybe ServiceMetadata -> f (Maybe ServiceMetadata))
-> DescribedExecution -> f DescribedExecution
describedExecution_serviceMetadata = (DescribedExecution -> Maybe ServiceMetadata)
-> (DescribedExecution
-> Maybe ServiceMetadata -> DescribedExecution)
-> Lens
DescribedExecution
DescribedExecution
(Maybe ServiceMetadata)
(Maybe ServiceMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedExecution' {Maybe ServiceMetadata
serviceMetadata :: Maybe ServiceMetadata
$sel:serviceMetadata:DescribedExecution' :: DescribedExecution -> Maybe ServiceMetadata
serviceMetadata} -> Maybe ServiceMetadata
serviceMetadata) (\s :: DescribedExecution
s@DescribedExecution' {} Maybe ServiceMetadata
a -> DescribedExecution
s {$sel:serviceMetadata:DescribedExecution' :: Maybe ServiceMetadata
serviceMetadata = Maybe ServiceMetadata
a} :: DescribedExecution)
describedExecution_loggingConfiguration :: Lens.Lens' DescribedExecution (Prelude.Maybe LoggingConfiguration)
describedExecution_loggingConfiguration :: (Maybe LoggingConfiguration -> f (Maybe LoggingConfiguration))
-> DescribedExecution -> f DescribedExecution
describedExecution_loggingConfiguration = (DescribedExecution -> Maybe LoggingConfiguration)
-> (DescribedExecution
-> Maybe LoggingConfiguration -> DescribedExecution)
-> Lens
DescribedExecution
DescribedExecution
(Maybe LoggingConfiguration)
(Maybe LoggingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedExecution' {Maybe LoggingConfiguration
loggingConfiguration :: Maybe LoggingConfiguration
$sel:loggingConfiguration:DescribedExecution' :: DescribedExecution -> Maybe LoggingConfiguration
loggingConfiguration} -> Maybe LoggingConfiguration
loggingConfiguration) (\s :: DescribedExecution
s@DescribedExecution' {} Maybe LoggingConfiguration
a -> DescribedExecution
s {$sel:loggingConfiguration:DescribedExecution' :: Maybe LoggingConfiguration
loggingConfiguration = Maybe LoggingConfiguration
a} :: DescribedExecution)
describedExecution_executionRole :: Lens.Lens' DescribedExecution (Prelude.Maybe Prelude.Text)
describedExecution_executionRole :: (Maybe Text -> f (Maybe Text))
-> DescribedExecution -> f DescribedExecution
describedExecution_executionRole = (DescribedExecution -> Maybe Text)
-> (DescribedExecution -> Maybe Text -> DescribedExecution)
-> Lens
DescribedExecution DescribedExecution (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedExecution' {Maybe Text
executionRole :: Maybe Text
$sel:executionRole:DescribedExecution' :: DescribedExecution -> Maybe Text
executionRole} -> Maybe Text
executionRole) (\s :: DescribedExecution
s@DescribedExecution' {} Maybe Text
a -> DescribedExecution
s {$sel:executionRole:DescribedExecution' :: Maybe Text
executionRole = Maybe Text
a} :: DescribedExecution)
instance Core.FromJSON DescribedExecution where
parseJSON :: Value -> Parser DescribedExecution
parseJSON =
String
-> (Object -> Parser DescribedExecution)
-> Value
-> Parser DescribedExecution
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DescribedExecution"
( \Object
x ->
Maybe ExecutionStatus
-> Maybe Text
-> Maybe ExecutionResults
-> Maybe FileLocation
-> Maybe PosixProfile
-> Maybe ServiceMetadata
-> Maybe LoggingConfiguration
-> Maybe Text
-> DescribedExecution
DescribedExecution'
(Maybe ExecutionStatus
-> Maybe Text
-> Maybe ExecutionResults
-> Maybe FileLocation
-> Maybe PosixProfile
-> Maybe ServiceMetadata
-> Maybe LoggingConfiguration
-> Maybe Text
-> DescribedExecution)
-> Parser (Maybe ExecutionStatus)
-> Parser
(Maybe Text
-> Maybe ExecutionResults
-> Maybe FileLocation
-> Maybe PosixProfile
-> Maybe ServiceMetadata
-> Maybe LoggingConfiguration
-> Maybe Text
-> DescribedExecution)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ExecutionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe ExecutionResults
-> Maybe FileLocation
-> Maybe PosixProfile
-> Maybe ServiceMetadata
-> Maybe LoggingConfiguration
-> Maybe Text
-> DescribedExecution)
-> Parser (Maybe Text)
-> Parser
(Maybe ExecutionResults
-> Maybe FileLocation
-> Maybe PosixProfile
-> Maybe ServiceMetadata
-> Maybe LoggingConfiguration
-> Maybe Text
-> DescribedExecution)
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
"ExecutionId")
Parser
(Maybe ExecutionResults
-> Maybe FileLocation
-> Maybe PosixProfile
-> Maybe ServiceMetadata
-> Maybe LoggingConfiguration
-> Maybe Text
-> DescribedExecution)
-> Parser (Maybe ExecutionResults)
-> Parser
(Maybe FileLocation
-> Maybe PosixProfile
-> Maybe ServiceMetadata
-> Maybe LoggingConfiguration
-> Maybe Text
-> DescribedExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ExecutionResults)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Results")
Parser
(Maybe FileLocation
-> Maybe PosixProfile
-> Maybe ServiceMetadata
-> Maybe LoggingConfiguration
-> Maybe Text
-> DescribedExecution)
-> Parser (Maybe FileLocation)
-> Parser
(Maybe PosixProfile
-> Maybe ServiceMetadata
-> Maybe LoggingConfiguration
-> Maybe Text
-> DescribedExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FileLocation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InitialFileLocation")
Parser
(Maybe PosixProfile
-> Maybe ServiceMetadata
-> Maybe LoggingConfiguration
-> Maybe Text
-> DescribedExecution)
-> Parser (Maybe PosixProfile)
-> Parser
(Maybe ServiceMetadata
-> Maybe LoggingConfiguration -> Maybe Text -> DescribedExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PosixProfile)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PosixProfile")
Parser
(Maybe ServiceMetadata
-> Maybe LoggingConfiguration -> Maybe Text -> DescribedExecution)
-> Parser (Maybe ServiceMetadata)
-> Parser
(Maybe LoggingConfiguration -> Maybe Text -> DescribedExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ServiceMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceMetadata")
Parser
(Maybe LoggingConfiguration -> Maybe Text -> DescribedExecution)
-> Parser (Maybe LoggingConfiguration)
-> Parser (Maybe Text -> DescribedExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LoggingConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LoggingConfiguration")
Parser (Maybe Text -> DescribedExecution)
-> Parser (Maybe Text) -> Parser DescribedExecution
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
"ExecutionRole")
)
instance Prelude.Hashable DescribedExecution
instance Prelude.NFData DescribedExecution