{-# 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.Glacier.Types.JobParameters where
import qualified Amazonka.Core as Core
import Amazonka.Glacier.Types.InventoryRetrievalJobInput
import Amazonka.Glacier.Types.OutputLocation
import Amazonka.Glacier.Types.SelectParameters
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data JobParameters = JobParameters'
{
JobParameters -> Maybe Text
archiveId :: Prelude.Maybe Prelude.Text,
JobParameters -> Maybe SelectParameters
selectParameters :: Prelude.Maybe SelectParameters,
JobParameters -> Maybe Text
format :: Prelude.Maybe Prelude.Text,
JobParameters -> Maybe Text
retrievalByteRange :: Prelude.Maybe Prelude.Text,
JobParameters -> Maybe InventoryRetrievalJobInput
inventoryRetrievalParameters :: Prelude.Maybe InventoryRetrievalJobInput,
JobParameters -> Maybe Text
sNSTopic :: Prelude.Maybe Prelude.Text,
JobParameters -> Maybe OutputLocation
outputLocation :: Prelude.Maybe OutputLocation,
JobParameters -> Maybe Text
tier :: Prelude.Maybe Prelude.Text,
JobParameters -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
JobParameters -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (JobParameters -> JobParameters -> Bool
(JobParameters -> JobParameters -> Bool)
-> (JobParameters -> JobParameters -> Bool) -> Eq JobParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobParameters -> JobParameters -> Bool
$c/= :: JobParameters -> JobParameters -> Bool
== :: JobParameters -> JobParameters -> Bool
$c== :: JobParameters -> JobParameters -> Bool
Prelude.Eq, ReadPrec [JobParameters]
ReadPrec JobParameters
Int -> ReadS JobParameters
ReadS [JobParameters]
(Int -> ReadS JobParameters)
-> ReadS [JobParameters]
-> ReadPrec JobParameters
-> ReadPrec [JobParameters]
-> Read JobParameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobParameters]
$creadListPrec :: ReadPrec [JobParameters]
readPrec :: ReadPrec JobParameters
$creadPrec :: ReadPrec JobParameters
readList :: ReadS [JobParameters]
$creadList :: ReadS [JobParameters]
readsPrec :: Int -> ReadS JobParameters
$creadsPrec :: Int -> ReadS JobParameters
Prelude.Read, Int -> JobParameters -> ShowS
[JobParameters] -> ShowS
JobParameters -> String
(Int -> JobParameters -> ShowS)
-> (JobParameters -> String)
-> ([JobParameters] -> ShowS)
-> Show JobParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobParameters] -> ShowS
$cshowList :: [JobParameters] -> ShowS
show :: JobParameters -> String
$cshow :: JobParameters -> String
showsPrec :: Int -> JobParameters -> ShowS
$cshowsPrec :: Int -> JobParameters -> ShowS
Prelude.Show, (forall x. JobParameters -> Rep JobParameters x)
-> (forall x. Rep JobParameters x -> JobParameters)
-> Generic JobParameters
forall x. Rep JobParameters x -> JobParameters
forall x. JobParameters -> Rep JobParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobParameters x -> JobParameters
$cfrom :: forall x. JobParameters -> Rep JobParameters x
Prelude.Generic)
newJobParameters ::
JobParameters
newJobParameters :: JobParameters
newJobParameters =
JobParameters' :: Maybe Text
-> Maybe SelectParameters
-> Maybe Text
-> Maybe Text
-> Maybe InventoryRetrievalJobInput
-> Maybe Text
-> Maybe OutputLocation
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> JobParameters
JobParameters'
{ $sel:archiveId:JobParameters' :: Maybe Text
archiveId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:selectParameters:JobParameters' :: Maybe SelectParameters
selectParameters = Maybe SelectParameters
forall a. Maybe a
Prelude.Nothing,
$sel:format:JobParameters' :: Maybe Text
format = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:retrievalByteRange:JobParameters' :: Maybe Text
retrievalByteRange = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:inventoryRetrievalParameters:JobParameters' :: Maybe InventoryRetrievalJobInput
inventoryRetrievalParameters = Maybe InventoryRetrievalJobInput
forall a. Maybe a
Prelude.Nothing,
$sel:sNSTopic:JobParameters' :: Maybe Text
sNSTopic = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:outputLocation:JobParameters' :: Maybe OutputLocation
outputLocation = Maybe OutputLocation
forall a. Maybe a
Prelude.Nothing,
$sel:tier:JobParameters' :: Maybe Text
tier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':JobParameters' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:JobParameters' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
jobParameters_archiveId :: Lens.Lens' JobParameters (Prelude.Maybe Prelude.Text)
jobParameters_archiveId :: (Maybe Text -> f (Maybe Text)) -> JobParameters -> f JobParameters
jobParameters_archiveId = (JobParameters -> Maybe Text)
-> (JobParameters -> Maybe Text -> JobParameters)
-> Lens JobParameters JobParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobParameters' {Maybe Text
archiveId :: Maybe Text
$sel:archiveId:JobParameters' :: JobParameters -> Maybe Text
archiveId} -> Maybe Text
archiveId) (\s :: JobParameters
s@JobParameters' {} Maybe Text
a -> JobParameters
s {$sel:archiveId:JobParameters' :: Maybe Text
archiveId = Maybe Text
a} :: JobParameters)
jobParameters_selectParameters :: Lens.Lens' JobParameters (Prelude.Maybe SelectParameters)
jobParameters_selectParameters :: (Maybe SelectParameters -> f (Maybe SelectParameters))
-> JobParameters -> f JobParameters
jobParameters_selectParameters = (JobParameters -> Maybe SelectParameters)
-> (JobParameters -> Maybe SelectParameters -> JobParameters)
-> Lens
JobParameters
JobParameters
(Maybe SelectParameters)
(Maybe SelectParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobParameters' {Maybe SelectParameters
selectParameters :: Maybe SelectParameters
$sel:selectParameters:JobParameters' :: JobParameters -> Maybe SelectParameters
selectParameters} -> Maybe SelectParameters
selectParameters) (\s :: JobParameters
s@JobParameters' {} Maybe SelectParameters
a -> JobParameters
s {$sel:selectParameters:JobParameters' :: Maybe SelectParameters
selectParameters = Maybe SelectParameters
a} :: JobParameters)
jobParameters_format :: Lens.Lens' JobParameters (Prelude.Maybe Prelude.Text)
jobParameters_format :: (Maybe Text -> f (Maybe Text)) -> JobParameters -> f JobParameters
jobParameters_format = (JobParameters -> Maybe Text)
-> (JobParameters -> Maybe Text -> JobParameters)
-> Lens JobParameters JobParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobParameters' {Maybe Text
format :: Maybe Text
$sel:format:JobParameters' :: JobParameters -> Maybe Text
format} -> Maybe Text
format) (\s :: JobParameters
s@JobParameters' {} Maybe Text
a -> JobParameters
s {$sel:format:JobParameters' :: Maybe Text
format = Maybe Text
a} :: JobParameters)
jobParameters_retrievalByteRange :: Lens.Lens' JobParameters (Prelude.Maybe Prelude.Text)
jobParameters_retrievalByteRange :: (Maybe Text -> f (Maybe Text)) -> JobParameters -> f JobParameters
jobParameters_retrievalByteRange = (JobParameters -> Maybe Text)
-> (JobParameters -> Maybe Text -> JobParameters)
-> Lens JobParameters JobParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobParameters' {Maybe Text
retrievalByteRange :: Maybe Text
$sel:retrievalByteRange:JobParameters' :: JobParameters -> Maybe Text
retrievalByteRange} -> Maybe Text
retrievalByteRange) (\s :: JobParameters
s@JobParameters' {} Maybe Text
a -> JobParameters
s {$sel:retrievalByteRange:JobParameters' :: Maybe Text
retrievalByteRange = Maybe Text
a} :: JobParameters)
jobParameters_inventoryRetrievalParameters :: Lens.Lens' JobParameters (Prelude.Maybe InventoryRetrievalJobInput)
jobParameters_inventoryRetrievalParameters :: (Maybe InventoryRetrievalJobInput
-> f (Maybe InventoryRetrievalJobInput))
-> JobParameters -> f JobParameters
jobParameters_inventoryRetrievalParameters = (JobParameters -> Maybe InventoryRetrievalJobInput)
-> (JobParameters
-> Maybe InventoryRetrievalJobInput -> JobParameters)
-> Lens
JobParameters
JobParameters
(Maybe InventoryRetrievalJobInput)
(Maybe InventoryRetrievalJobInput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobParameters' {Maybe InventoryRetrievalJobInput
inventoryRetrievalParameters :: Maybe InventoryRetrievalJobInput
$sel:inventoryRetrievalParameters:JobParameters' :: JobParameters -> Maybe InventoryRetrievalJobInput
inventoryRetrievalParameters} -> Maybe InventoryRetrievalJobInput
inventoryRetrievalParameters) (\s :: JobParameters
s@JobParameters' {} Maybe InventoryRetrievalJobInput
a -> JobParameters
s {$sel:inventoryRetrievalParameters:JobParameters' :: Maybe InventoryRetrievalJobInput
inventoryRetrievalParameters = Maybe InventoryRetrievalJobInput
a} :: JobParameters)
jobParameters_sNSTopic :: Lens.Lens' JobParameters (Prelude.Maybe Prelude.Text)
jobParameters_sNSTopic :: (Maybe Text -> f (Maybe Text)) -> JobParameters -> f JobParameters
jobParameters_sNSTopic = (JobParameters -> Maybe Text)
-> (JobParameters -> Maybe Text -> JobParameters)
-> Lens JobParameters JobParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobParameters' {Maybe Text
sNSTopic :: Maybe Text
$sel:sNSTopic:JobParameters' :: JobParameters -> Maybe Text
sNSTopic} -> Maybe Text
sNSTopic) (\s :: JobParameters
s@JobParameters' {} Maybe Text
a -> JobParameters
s {$sel:sNSTopic:JobParameters' :: Maybe Text
sNSTopic = Maybe Text
a} :: JobParameters)
jobParameters_outputLocation :: Lens.Lens' JobParameters (Prelude.Maybe OutputLocation)
jobParameters_outputLocation :: (Maybe OutputLocation -> f (Maybe OutputLocation))
-> JobParameters -> f JobParameters
jobParameters_outputLocation = (JobParameters -> Maybe OutputLocation)
-> (JobParameters -> Maybe OutputLocation -> JobParameters)
-> Lens
JobParameters
JobParameters
(Maybe OutputLocation)
(Maybe OutputLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobParameters' {Maybe OutputLocation
outputLocation :: Maybe OutputLocation
$sel:outputLocation:JobParameters' :: JobParameters -> Maybe OutputLocation
outputLocation} -> Maybe OutputLocation
outputLocation) (\s :: JobParameters
s@JobParameters' {} Maybe OutputLocation
a -> JobParameters
s {$sel:outputLocation:JobParameters' :: Maybe OutputLocation
outputLocation = Maybe OutputLocation
a} :: JobParameters)
jobParameters_tier :: Lens.Lens' JobParameters (Prelude.Maybe Prelude.Text)
jobParameters_tier :: (Maybe Text -> f (Maybe Text)) -> JobParameters -> f JobParameters
jobParameters_tier = (JobParameters -> Maybe Text)
-> (JobParameters -> Maybe Text -> JobParameters)
-> Lens JobParameters JobParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobParameters' {Maybe Text
tier :: Maybe Text
$sel:tier:JobParameters' :: JobParameters -> Maybe Text
tier} -> Maybe Text
tier) (\s :: JobParameters
s@JobParameters' {} Maybe Text
a -> JobParameters
s {$sel:tier:JobParameters' :: Maybe Text
tier = Maybe Text
a} :: JobParameters)
jobParameters_type :: Lens.Lens' JobParameters (Prelude.Maybe Prelude.Text)
jobParameters_type :: (Maybe Text -> f (Maybe Text)) -> JobParameters -> f JobParameters
jobParameters_type = (JobParameters -> Maybe Text)
-> (JobParameters -> Maybe Text -> JobParameters)
-> Lens JobParameters JobParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobParameters' {Maybe Text
type' :: Maybe Text
$sel:type':JobParameters' :: JobParameters -> Maybe Text
type'} -> Maybe Text
type') (\s :: JobParameters
s@JobParameters' {} Maybe Text
a -> JobParameters
s {$sel:type':JobParameters' :: Maybe Text
type' = Maybe Text
a} :: JobParameters)
jobParameters_description :: Lens.Lens' JobParameters (Prelude.Maybe Prelude.Text)
jobParameters_description :: (Maybe Text -> f (Maybe Text)) -> JobParameters -> f JobParameters
jobParameters_description = (JobParameters -> Maybe Text)
-> (JobParameters -> Maybe Text -> JobParameters)
-> Lens JobParameters JobParameters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobParameters' {Maybe Text
description :: Maybe Text
$sel:description:JobParameters' :: JobParameters -> Maybe Text
description} -> Maybe Text
description) (\s :: JobParameters
s@JobParameters' {} Maybe Text
a -> JobParameters
s {$sel:description:JobParameters' :: Maybe Text
description = Maybe Text
a} :: JobParameters)
instance Prelude.Hashable JobParameters
instance Prelude.NFData JobParameters
instance Core.ToJSON JobParameters where
toJSON :: JobParameters -> Value
toJSON JobParameters' {Maybe Text
Maybe InventoryRetrievalJobInput
Maybe SelectParameters
Maybe OutputLocation
description :: Maybe Text
type' :: Maybe Text
tier :: Maybe Text
outputLocation :: Maybe OutputLocation
sNSTopic :: Maybe Text
inventoryRetrievalParameters :: Maybe InventoryRetrievalJobInput
retrievalByteRange :: Maybe Text
format :: Maybe Text
selectParameters :: Maybe SelectParameters
archiveId :: Maybe Text
$sel:description:JobParameters' :: JobParameters -> Maybe Text
$sel:type':JobParameters' :: JobParameters -> Maybe Text
$sel:tier:JobParameters' :: JobParameters -> Maybe Text
$sel:outputLocation:JobParameters' :: JobParameters -> Maybe OutputLocation
$sel:sNSTopic:JobParameters' :: JobParameters -> Maybe Text
$sel:inventoryRetrievalParameters:JobParameters' :: JobParameters -> Maybe InventoryRetrievalJobInput
$sel:retrievalByteRange:JobParameters' :: JobParameters -> Maybe Text
$sel:format:JobParameters' :: JobParameters -> Maybe Text
$sel:selectParameters:JobParameters' :: JobParameters -> Maybe SelectParameters
$sel:archiveId:JobParameters' :: JobParameters -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ArchiveId" 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
archiveId,
(Text
"SelectParameters" Text -> SelectParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SelectParameters -> Pair) -> Maybe SelectParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SelectParameters
selectParameters,
(Text
"Format" 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
format,
(Text
"RetrievalByteRange" 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
retrievalByteRange,
(Text
"InventoryRetrievalParameters" Text -> InventoryRetrievalJobInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(InventoryRetrievalJobInput -> Pair)
-> Maybe InventoryRetrievalJobInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InventoryRetrievalJobInput
inventoryRetrievalParameters,
(Text
"SNSTopic" 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
sNSTopic,
(Text
"OutputLocation" Text -> OutputLocation -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(OutputLocation -> Pair) -> Maybe OutputLocation -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OutputLocation
outputLocation,
(Text
"Tier" 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
tier,
(Text
"Type" 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
type',
(Text
"Description" 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
description
]
)