{-# 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.CustomStepDetails 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
data CustomStepDetails = CustomStepDetails'
{
CustomStepDetails -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CustomStepDetails -> Maybe Text
sourceFileLocation :: Prelude.Maybe Prelude.Text,
CustomStepDetails -> Maybe Text
target :: Prelude.Maybe Prelude.Text,
CustomStepDetails -> Maybe Natural
timeoutSeconds :: Prelude.Maybe Prelude.Natural
}
deriving (CustomStepDetails -> CustomStepDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomStepDetails -> CustomStepDetails -> Bool
$c/= :: CustomStepDetails -> CustomStepDetails -> Bool
== :: CustomStepDetails -> CustomStepDetails -> Bool
$c== :: CustomStepDetails -> CustomStepDetails -> Bool
Prelude.Eq, ReadPrec [CustomStepDetails]
ReadPrec CustomStepDetails
Int -> ReadS CustomStepDetails
ReadS [CustomStepDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomStepDetails]
$creadListPrec :: ReadPrec [CustomStepDetails]
readPrec :: ReadPrec CustomStepDetails
$creadPrec :: ReadPrec CustomStepDetails
readList :: ReadS [CustomStepDetails]
$creadList :: ReadS [CustomStepDetails]
readsPrec :: Int -> ReadS CustomStepDetails
$creadsPrec :: Int -> ReadS CustomStepDetails
Prelude.Read, Int -> CustomStepDetails -> ShowS
[CustomStepDetails] -> ShowS
CustomStepDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomStepDetails] -> ShowS
$cshowList :: [CustomStepDetails] -> ShowS
show :: CustomStepDetails -> String
$cshow :: CustomStepDetails -> String
showsPrec :: Int -> CustomStepDetails -> ShowS
$cshowsPrec :: Int -> CustomStepDetails -> ShowS
Prelude.Show, forall x. Rep CustomStepDetails x -> CustomStepDetails
forall x. CustomStepDetails -> Rep CustomStepDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CustomStepDetails x -> CustomStepDetails
$cfrom :: forall x. CustomStepDetails -> Rep CustomStepDetails x
Prelude.Generic)
newCustomStepDetails ::
CustomStepDetails
newCustomStepDetails :: CustomStepDetails
newCustomStepDetails =
CustomStepDetails'
{ $sel:name:CustomStepDetails' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:sourceFileLocation:CustomStepDetails' :: Maybe Text
sourceFileLocation = forall a. Maybe a
Prelude.Nothing,
$sel:target:CustomStepDetails' :: Maybe Text
target = forall a. Maybe a
Prelude.Nothing,
$sel:timeoutSeconds:CustomStepDetails' :: Maybe Natural
timeoutSeconds = forall a. Maybe a
Prelude.Nothing
}
customStepDetails_name :: Lens.Lens' CustomStepDetails (Prelude.Maybe Prelude.Text)
customStepDetails_name :: Lens' CustomStepDetails (Maybe Text)
customStepDetails_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomStepDetails' {Maybe Text
name :: Maybe Text
$sel:name:CustomStepDetails' :: CustomStepDetails -> Maybe Text
name} -> Maybe Text
name) (\s :: CustomStepDetails
s@CustomStepDetails' {} Maybe Text
a -> CustomStepDetails
s {$sel:name:CustomStepDetails' :: Maybe Text
name = Maybe Text
a} :: CustomStepDetails)
customStepDetails_sourceFileLocation :: Lens.Lens' CustomStepDetails (Prelude.Maybe Prelude.Text)
customStepDetails_sourceFileLocation :: Lens' CustomStepDetails (Maybe Text)
customStepDetails_sourceFileLocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomStepDetails' {Maybe Text
sourceFileLocation :: Maybe Text
$sel:sourceFileLocation:CustomStepDetails' :: CustomStepDetails -> Maybe Text
sourceFileLocation} -> Maybe Text
sourceFileLocation) (\s :: CustomStepDetails
s@CustomStepDetails' {} Maybe Text
a -> CustomStepDetails
s {$sel:sourceFileLocation:CustomStepDetails' :: Maybe Text
sourceFileLocation = Maybe Text
a} :: CustomStepDetails)
customStepDetails_target :: Lens.Lens' CustomStepDetails (Prelude.Maybe Prelude.Text)
customStepDetails_target :: Lens' CustomStepDetails (Maybe Text)
customStepDetails_target = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomStepDetails' {Maybe Text
target :: Maybe Text
$sel:target:CustomStepDetails' :: CustomStepDetails -> Maybe Text
target} -> Maybe Text
target) (\s :: CustomStepDetails
s@CustomStepDetails' {} Maybe Text
a -> CustomStepDetails
s {$sel:target:CustomStepDetails' :: Maybe Text
target = Maybe Text
a} :: CustomStepDetails)
customStepDetails_timeoutSeconds :: Lens.Lens' CustomStepDetails (Prelude.Maybe Prelude.Natural)
customStepDetails_timeoutSeconds :: Lens' CustomStepDetails (Maybe Natural)
customStepDetails_timeoutSeconds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomStepDetails' {Maybe Natural
timeoutSeconds :: Maybe Natural
$sel:timeoutSeconds:CustomStepDetails' :: CustomStepDetails -> Maybe Natural
timeoutSeconds} -> Maybe Natural
timeoutSeconds) (\s :: CustomStepDetails
s@CustomStepDetails' {} Maybe Natural
a -> CustomStepDetails
s {$sel:timeoutSeconds:CustomStepDetails' :: Maybe Natural
timeoutSeconds = Maybe Natural
a} :: CustomStepDetails)
instance Data.FromJSON CustomStepDetails where
parseJSON :: Value -> Parser CustomStepDetails
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CustomStepDetails"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Natural -> CustomStepDetails
CustomStepDetails'
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
"Name")
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
"SourceFileLocation")
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
"Target")
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
"TimeoutSeconds")
)
instance Prelude.Hashable CustomStepDetails where
hashWithSalt :: Int -> CustomStepDetails -> Int
hashWithSalt Int
_salt CustomStepDetails' {Maybe Natural
Maybe Text
timeoutSeconds :: Maybe Natural
target :: Maybe Text
sourceFileLocation :: Maybe Text
name :: Maybe Text
$sel:timeoutSeconds:CustomStepDetails' :: CustomStepDetails -> Maybe Natural
$sel:target:CustomStepDetails' :: CustomStepDetails -> Maybe Text
$sel:sourceFileLocation:CustomStepDetails' :: CustomStepDetails -> Maybe Text
$sel:name:CustomStepDetails' :: CustomStepDetails -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceFileLocation
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
target
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
timeoutSeconds
instance Prelude.NFData CustomStepDetails where
rnf :: CustomStepDetails -> ()
rnf CustomStepDetails' {Maybe Natural
Maybe Text
timeoutSeconds :: Maybe Natural
target :: Maybe Text
sourceFileLocation :: Maybe Text
name :: Maybe Text
$sel:timeoutSeconds:CustomStepDetails' :: CustomStepDetails -> Maybe Natural
$sel:target:CustomStepDetails' :: CustomStepDetails -> Maybe Text
$sel:sourceFileLocation:CustomStepDetails' :: CustomStepDetails -> Maybe Text
$sel:name:CustomStepDetails' :: CustomStepDetails -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceFileLocation
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
target
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
timeoutSeconds
instance Data.ToJSON CustomStepDetails where
toJSON :: CustomStepDetails -> Value
toJSON CustomStepDetails' {Maybe Natural
Maybe Text
timeoutSeconds :: Maybe Natural
target :: Maybe Text
sourceFileLocation :: Maybe Text
name :: Maybe Text
$sel:timeoutSeconds:CustomStepDetails' :: CustomStepDetails -> Maybe Natural
$sel:target:CustomStepDetails' :: CustomStepDetails -> Maybe Text
$sel:sourceFileLocation:CustomStepDetails' :: CustomStepDetails -> Maybe Text
$sel:name:CustomStepDetails' :: CustomStepDetails -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
(Key
"SourceFileLocation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sourceFileLocation,
(Key
"Target" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
target,
(Key
"TimeoutSeconds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
timeoutSeconds
]
)