{-# 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.M2.Types.FileBatchJobIdentifier 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 FileBatchJobIdentifier = FileBatchJobIdentifier'
{
FileBatchJobIdentifier -> Maybe Text
folderPath :: Prelude.Maybe Prelude.Text,
FileBatchJobIdentifier -> Text
fileName :: Prelude.Text
}
deriving (FileBatchJobIdentifier -> FileBatchJobIdentifier -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileBatchJobIdentifier -> FileBatchJobIdentifier -> Bool
$c/= :: FileBatchJobIdentifier -> FileBatchJobIdentifier -> Bool
== :: FileBatchJobIdentifier -> FileBatchJobIdentifier -> Bool
$c== :: FileBatchJobIdentifier -> FileBatchJobIdentifier -> Bool
Prelude.Eq, ReadPrec [FileBatchJobIdentifier]
ReadPrec FileBatchJobIdentifier
Int -> ReadS FileBatchJobIdentifier
ReadS [FileBatchJobIdentifier]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FileBatchJobIdentifier]
$creadListPrec :: ReadPrec [FileBatchJobIdentifier]
readPrec :: ReadPrec FileBatchJobIdentifier
$creadPrec :: ReadPrec FileBatchJobIdentifier
readList :: ReadS [FileBatchJobIdentifier]
$creadList :: ReadS [FileBatchJobIdentifier]
readsPrec :: Int -> ReadS FileBatchJobIdentifier
$creadsPrec :: Int -> ReadS FileBatchJobIdentifier
Prelude.Read, Int -> FileBatchJobIdentifier -> ShowS
[FileBatchJobIdentifier] -> ShowS
FileBatchJobIdentifier -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileBatchJobIdentifier] -> ShowS
$cshowList :: [FileBatchJobIdentifier] -> ShowS
show :: FileBatchJobIdentifier -> String
$cshow :: FileBatchJobIdentifier -> String
showsPrec :: Int -> FileBatchJobIdentifier -> ShowS
$cshowsPrec :: Int -> FileBatchJobIdentifier -> ShowS
Prelude.Show, forall x. Rep FileBatchJobIdentifier x -> FileBatchJobIdentifier
forall x. FileBatchJobIdentifier -> Rep FileBatchJobIdentifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FileBatchJobIdentifier x -> FileBatchJobIdentifier
$cfrom :: forall x. FileBatchJobIdentifier -> Rep FileBatchJobIdentifier x
Prelude.Generic)
newFileBatchJobIdentifier ::
Prelude.Text ->
FileBatchJobIdentifier
newFileBatchJobIdentifier :: Text -> FileBatchJobIdentifier
newFileBatchJobIdentifier Text
pFileName_ =
FileBatchJobIdentifier'
{ $sel:folderPath:FileBatchJobIdentifier' :: Maybe Text
folderPath =
forall a. Maybe a
Prelude.Nothing,
$sel:fileName:FileBatchJobIdentifier' :: Text
fileName = Text
pFileName_
}
fileBatchJobIdentifier_folderPath :: Lens.Lens' FileBatchJobIdentifier (Prelude.Maybe Prelude.Text)
fileBatchJobIdentifier_folderPath :: Lens' FileBatchJobIdentifier (Maybe Text)
fileBatchJobIdentifier_folderPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileBatchJobIdentifier' {Maybe Text
folderPath :: Maybe Text
$sel:folderPath:FileBatchJobIdentifier' :: FileBatchJobIdentifier -> Maybe Text
folderPath} -> Maybe Text
folderPath) (\s :: FileBatchJobIdentifier
s@FileBatchJobIdentifier' {} Maybe Text
a -> FileBatchJobIdentifier
s {$sel:folderPath:FileBatchJobIdentifier' :: Maybe Text
folderPath = Maybe Text
a} :: FileBatchJobIdentifier)
fileBatchJobIdentifier_fileName :: Lens.Lens' FileBatchJobIdentifier Prelude.Text
fileBatchJobIdentifier_fileName :: Lens' FileBatchJobIdentifier Text
fileBatchJobIdentifier_fileName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileBatchJobIdentifier' {Text
fileName :: Text
$sel:fileName:FileBatchJobIdentifier' :: FileBatchJobIdentifier -> Text
fileName} -> Text
fileName) (\s :: FileBatchJobIdentifier
s@FileBatchJobIdentifier' {} Text
a -> FileBatchJobIdentifier
s {$sel:fileName:FileBatchJobIdentifier' :: Text
fileName = Text
a} :: FileBatchJobIdentifier)
instance Prelude.Hashable FileBatchJobIdentifier where
hashWithSalt :: Int -> FileBatchJobIdentifier -> Int
hashWithSalt Int
_salt FileBatchJobIdentifier' {Maybe Text
Text
fileName :: Text
folderPath :: Maybe Text
$sel:fileName:FileBatchJobIdentifier' :: FileBatchJobIdentifier -> Text
$sel:folderPath:FileBatchJobIdentifier' :: FileBatchJobIdentifier -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
folderPath
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
fileName
instance Prelude.NFData FileBatchJobIdentifier where
rnf :: FileBatchJobIdentifier -> ()
rnf FileBatchJobIdentifier' {Maybe Text
Text
fileName :: Text
folderPath :: Maybe Text
$sel:fileName:FileBatchJobIdentifier' :: FileBatchJobIdentifier -> Text
$sel:folderPath:FileBatchJobIdentifier' :: FileBatchJobIdentifier -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
folderPath
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
fileName
instance Data.ToJSON FileBatchJobIdentifier where
toJSON :: FileBatchJobIdentifier -> Value
toJSON FileBatchJobIdentifier' {Maybe Text
Text
fileName :: Text
folderPath :: Maybe Text
$sel:fileName:FileBatchJobIdentifier' :: FileBatchJobIdentifier -> Text
$sel:folderPath:FileBatchJobIdentifier' :: FileBatchJobIdentifier -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"folderPath" 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
folderPath,
forall a. a -> Maybe a
Prelude.Just (Key
"fileName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
fileName)
]
)