{-# 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.DeleteStepDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DeleteStepDetails = DeleteStepDetails'
{
DeleteStepDetails -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (DeleteStepDetails -> DeleteStepDetails -> Bool
(DeleteStepDetails -> DeleteStepDetails -> Bool)
-> (DeleteStepDetails -> DeleteStepDetails -> Bool)
-> Eq DeleteStepDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteStepDetails -> DeleteStepDetails -> Bool
$c/= :: DeleteStepDetails -> DeleteStepDetails -> Bool
== :: DeleteStepDetails -> DeleteStepDetails -> Bool
$c== :: DeleteStepDetails -> DeleteStepDetails -> Bool
Prelude.Eq, ReadPrec [DeleteStepDetails]
ReadPrec DeleteStepDetails
Int -> ReadS DeleteStepDetails
ReadS [DeleteStepDetails]
(Int -> ReadS DeleteStepDetails)
-> ReadS [DeleteStepDetails]
-> ReadPrec DeleteStepDetails
-> ReadPrec [DeleteStepDetails]
-> Read DeleteStepDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteStepDetails]
$creadListPrec :: ReadPrec [DeleteStepDetails]
readPrec :: ReadPrec DeleteStepDetails
$creadPrec :: ReadPrec DeleteStepDetails
readList :: ReadS [DeleteStepDetails]
$creadList :: ReadS [DeleteStepDetails]
readsPrec :: Int -> ReadS DeleteStepDetails
$creadsPrec :: Int -> ReadS DeleteStepDetails
Prelude.Read, Int -> DeleteStepDetails -> ShowS
[DeleteStepDetails] -> ShowS
DeleteStepDetails -> String
(Int -> DeleteStepDetails -> ShowS)
-> (DeleteStepDetails -> String)
-> ([DeleteStepDetails] -> ShowS)
-> Show DeleteStepDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteStepDetails] -> ShowS
$cshowList :: [DeleteStepDetails] -> ShowS
show :: DeleteStepDetails -> String
$cshow :: DeleteStepDetails -> String
showsPrec :: Int -> DeleteStepDetails -> ShowS
$cshowsPrec :: Int -> DeleteStepDetails -> ShowS
Prelude.Show, (forall x. DeleteStepDetails -> Rep DeleteStepDetails x)
-> (forall x. Rep DeleteStepDetails x -> DeleteStepDetails)
-> Generic DeleteStepDetails
forall x. Rep DeleteStepDetails x -> DeleteStepDetails
forall x. DeleteStepDetails -> Rep DeleteStepDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteStepDetails x -> DeleteStepDetails
$cfrom :: forall x. DeleteStepDetails -> Rep DeleteStepDetails x
Prelude.Generic)
newDeleteStepDetails ::
DeleteStepDetails
newDeleteStepDetails :: DeleteStepDetails
newDeleteStepDetails =
DeleteStepDetails' :: Maybe Text -> DeleteStepDetails
DeleteStepDetails' {$sel:name:DeleteStepDetails' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing}
deleteStepDetails_name :: Lens.Lens' DeleteStepDetails (Prelude.Maybe Prelude.Text)
deleteStepDetails_name :: (Maybe Text -> f (Maybe Text))
-> DeleteStepDetails -> f DeleteStepDetails
deleteStepDetails_name = (DeleteStepDetails -> Maybe Text)
-> (DeleteStepDetails -> Maybe Text -> DeleteStepDetails)
-> Lens
DeleteStepDetails DeleteStepDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteStepDetails' {Maybe Text
name :: Maybe Text
$sel:name:DeleteStepDetails' :: DeleteStepDetails -> Maybe Text
name} -> Maybe Text
name) (\s :: DeleteStepDetails
s@DeleteStepDetails' {} Maybe Text
a -> DeleteStepDetails
s {$sel:name:DeleteStepDetails' :: Maybe Text
name = Maybe Text
a} :: DeleteStepDetails)
instance Core.FromJSON DeleteStepDetails where
parseJSON :: Value -> Parser DeleteStepDetails
parseJSON =
String
-> (Object -> Parser DeleteStepDetails)
-> Value
-> Parser DeleteStepDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DeleteStepDetails"
( \Object
x ->
Maybe Text -> DeleteStepDetails
DeleteStepDetails' (Maybe Text -> DeleteStepDetails)
-> Parser (Maybe Text) -> Parser DeleteStepDetails
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
"Name")
)
instance Prelude.Hashable DeleteStepDetails
instance Prelude.NFData DeleteStepDetails
instance Core.ToJSON DeleteStepDetails where
toJSON :: DeleteStepDetails -> Value
toJSON DeleteStepDetails' {Maybe Text
name :: Maybe Text
$sel:name:DeleteStepDetails' :: DeleteStepDetails -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name]
)