{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Glacier.Types.JobParameters
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | Provides options for defining a job.
--
-- /See:/ 'newJobParameters' smart constructor.
data JobParameters = JobParameters'
  { -- | The ID of the archive that you want to retrieve. This field is required
    -- only if @Type@ is set to @select@ or @archive-retrieval@code>. An error
    -- occurs if you specify this request parameter for an inventory retrieval
    -- job request.
    JobParameters -> Maybe Text
archiveId :: Prelude.Maybe Prelude.Text,
    -- | Contains the parameters that define a job.
    JobParameters -> Maybe SelectParameters
selectParameters :: Prelude.Maybe SelectParameters,
    -- | When initiating a job to retrieve a vault inventory, you can optionally
    -- add this parameter to your request to specify the output format. If you
    -- are initiating an inventory job and do not specify a Format field, JSON
    -- is the default format. Valid values are \"CSV\" and \"JSON\".
    JobParameters -> Maybe Text
format :: Prelude.Maybe Prelude.Text,
    -- | The byte range to retrieve for an archive retrieval. in the form
    -- \"/StartByteValue/-/EndByteValue/\" If not specified, the whole archive
    -- is retrieved. If specified, the byte range must be megabyte (1024*1024)
    -- aligned which means that /StartByteValue/ must be divisible by 1 MB and
    -- /EndByteValue/ plus 1 must be divisible by 1 MB or be the end of the
    -- archive specified as the archive byte size value minus 1. If
    -- RetrievalByteRange is not megabyte aligned, this operation returns a 400
    -- response.
    --
    -- An error occurs if you specify this field for an inventory retrieval job
    -- request.
    JobParameters -> Maybe Text
retrievalByteRange :: Prelude.Maybe Prelude.Text,
    -- | Input parameters used for range inventory retrieval.
    JobParameters -> Maybe InventoryRetrievalJobInput
inventoryRetrievalParameters :: Prelude.Maybe InventoryRetrievalJobInput,
    -- | The Amazon SNS topic ARN to which Amazon S3 Glacier sends a notification
    -- when the job is completed and the output is ready for you to download.
    -- The specified topic publishes the notification to its subscribers. The
    -- SNS topic must exist.
    JobParameters -> Maybe Text
sNSTopic :: Prelude.Maybe Prelude.Text,
    -- | Contains information about the location where the select job results are
    -- stored.
    JobParameters -> Maybe OutputLocation
outputLocation :: Prelude.Maybe OutputLocation,
    -- | The tier to use for a select or an archive retrieval job. Valid values
    -- are @Expedited@, @Standard@, or @Bulk@. @Standard@ is the default.
    JobParameters -> Maybe Text
tier :: Prelude.Maybe Prelude.Text,
    -- | The job type. You can initiate a job to perform a select query on an
    -- archive, retrieve an archive, or get an inventory of a vault. Valid
    -- values are \"select\", \"archive-retrieval\" and
    -- \"inventory-retrieval\".
    JobParameters -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
    -- | The optional description for the job. The description must be less than
    -- or equal to 1,024 bytes. The allowable characters are 7-bit ASCII
    -- without control codes-specifically, ASCII values 32-126 decimal or
    -- 0x20-0x7E hexadecimal.
    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)

-- |
-- Create a value of 'JobParameters' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'archiveId', 'jobParameters_archiveId' - The ID of the archive that you want to retrieve. This field is required
-- only if @Type@ is set to @select@ or @archive-retrieval@code>. An error
-- occurs if you specify this request parameter for an inventory retrieval
-- job request.
--
-- 'selectParameters', 'jobParameters_selectParameters' - Contains the parameters that define a job.
--
-- 'format', 'jobParameters_format' - When initiating a job to retrieve a vault inventory, you can optionally
-- add this parameter to your request to specify the output format. If you
-- are initiating an inventory job and do not specify a Format field, JSON
-- is the default format. Valid values are \"CSV\" and \"JSON\".
--
-- 'retrievalByteRange', 'jobParameters_retrievalByteRange' - The byte range to retrieve for an archive retrieval. in the form
-- \"/StartByteValue/-/EndByteValue/\" If not specified, the whole archive
-- is retrieved. If specified, the byte range must be megabyte (1024*1024)
-- aligned which means that /StartByteValue/ must be divisible by 1 MB and
-- /EndByteValue/ plus 1 must be divisible by 1 MB or be the end of the
-- archive specified as the archive byte size value minus 1. If
-- RetrievalByteRange is not megabyte aligned, this operation returns a 400
-- response.
--
-- An error occurs if you specify this field for an inventory retrieval job
-- request.
--
-- 'inventoryRetrievalParameters', 'jobParameters_inventoryRetrievalParameters' - Input parameters used for range inventory retrieval.
--
-- 'sNSTopic', 'jobParameters_sNSTopic' - The Amazon SNS topic ARN to which Amazon S3 Glacier sends a notification
-- when the job is completed and the output is ready for you to download.
-- The specified topic publishes the notification to its subscribers. The
-- SNS topic must exist.
--
-- 'outputLocation', 'jobParameters_outputLocation' - Contains information about the location where the select job results are
-- stored.
--
-- 'tier', 'jobParameters_tier' - The tier to use for a select or an archive retrieval job. Valid values
-- are @Expedited@, @Standard@, or @Bulk@. @Standard@ is the default.
--
-- 'type'', 'jobParameters_type' - The job type. You can initiate a job to perform a select query on an
-- archive, retrieve an archive, or get an inventory of a vault. Valid
-- values are \"select\", \"archive-retrieval\" and
-- \"inventory-retrieval\".
--
-- 'description', 'jobParameters_description' - The optional description for the job. The description must be less than
-- or equal to 1,024 bytes. The allowable characters are 7-bit ASCII
-- without control codes-specifically, ASCII values 32-126 decimal or
-- 0x20-0x7E hexadecimal.
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
    }

-- | The ID of the archive that you want to retrieve. This field is required
-- only if @Type@ is set to @select@ or @archive-retrieval@code>. An error
-- occurs if you specify this request parameter for an inventory retrieval
-- job request.
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)

-- | Contains the parameters that define a job.
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)

-- | When initiating a job to retrieve a vault inventory, you can optionally
-- add this parameter to your request to specify the output format. If you
-- are initiating an inventory job and do not specify a Format field, JSON
-- is the default format. Valid values are \"CSV\" and \"JSON\".
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)

-- | The byte range to retrieve for an archive retrieval. in the form
-- \"/StartByteValue/-/EndByteValue/\" If not specified, the whole archive
-- is retrieved. If specified, the byte range must be megabyte (1024*1024)
-- aligned which means that /StartByteValue/ must be divisible by 1 MB and
-- /EndByteValue/ plus 1 must be divisible by 1 MB or be the end of the
-- archive specified as the archive byte size value minus 1. If
-- RetrievalByteRange is not megabyte aligned, this operation returns a 400
-- response.
--
-- An error occurs if you specify this field for an inventory retrieval job
-- request.
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)

-- | Input parameters used for range inventory retrieval.
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)

-- | The Amazon SNS topic ARN to which Amazon S3 Glacier sends a notification
-- when the job is completed and the output is ready for you to download.
-- The specified topic publishes the notification to its subscribers. The
-- SNS topic must exist.
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)

-- | Contains information about the location where the select job results are
-- stored.
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)

-- | The tier to use for a select or an archive retrieval job. Valid values
-- are @Expedited@, @Standard@, or @Bulk@. @Standard@ is the default.
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)

-- | The job type. You can initiate a job to perform a select query on an
-- archive, retrieve an archive, or get an inventory of a vault. Valid
-- values are \"select\", \"archive-retrieval\" and
-- \"inventory-retrieval\".
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)

-- | The optional description for the job. The description must be less than
-- or equal to 1,024 bytes. The allowable characters are 7-bit ASCII
-- without control codes-specifically, ASCII values 32-126 decimal or
-- 0x20-0x7E hexadecimal.
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
          ]
      )