{-# 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.S3.Types.GlacierJobParameters
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.S3.Types.GlacierJobParameters 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
import Amazonka.S3.Internal
import Amazonka.S3.Types.Tier

-- | Container for S3 Glacier job parameters.
--
-- /See:/ 'newGlacierJobParameters' smart constructor.
data GlacierJobParameters = GlacierJobParameters'
  { -- | Retrieval tier at which the restore will be processed.
    GlacierJobParameters -> Tier
tier :: Tier
  }
  deriving (GlacierJobParameters -> GlacierJobParameters -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GlacierJobParameters -> GlacierJobParameters -> Bool
$c/= :: GlacierJobParameters -> GlacierJobParameters -> Bool
== :: GlacierJobParameters -> GlacierJobParameters -> Bool
$c== :: GlacierJobParameters -> GlacierJobParameters -> Bool
Prelude.Eq, ReadPrec [GlacierJobParameters]
ReadPrec GlacierJobParameters
Int -> ReadS GlacierJobParameters
ReadS [GlacierJobParameters]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GlacierJobParameters]
$creadListPrec :: ReadPrec [GlacierJobParameters]
readPrec :: ReadPrec GlacierJobParameters
$creadPrec :: ReadPrec GlacierJobParameters
readList :: ReadS [GlacierJobParameters]
$creadList :: ReadS [GlacierJobParameters]
readsPrec :: Int -> ReadS GlacierJobParameters
$creadsPrec :: Int -> ReadS GlacierJobParameters
Prelude.Read, Int -> GlacierJobParameters -> ShowS
[GlacierJobParameters] -> ShowS
GlacierJobParameters -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GlacierJobParameters] -> ShowS
$cshowList :: [GlacierJobParameters] -> ShowS
show :: GlacierJobParameters -> String
$cshow :: GlacierJobParameters -> String
showsPrec :: Int -> GlacierJobParameters -> ShowS
$cshowsPrec :: Int -> GlacierJobParameters -> ShowS
Prelude.Show, forall x. Rep GlacierJobParameters x -> GlacierJobParameters
forall x. GlacierJobParameters -> Rep GlacierJobParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GlacierJobParameters x -> GlacierJobParameters
$cfrom :: forall x. GlacierJobParameters -> Rep GlacierJobParameters x
Prelude.Generic)

-- |
-- Create a value of 'GlacierJobParameters' 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:
--
-- 'tier', 'glacierJobParameters_tier' - Retrieval tier at which the restore will be processed.
newGlacierJobParameters ::
  -- | 'tier'
  Tier ->
  GlacierJobParameters
newGlacierJobParameters :: Tier -> GlacierJobParameters
newGlacierJobParameters Tier
pTier_ =
  GlacierJobParameters' {$sel:tier:GlacierJobParameters' :: Tier
tier = Tier
pTier_}

-- | Retrieval tier at which the restore will be processed.
glacierJobParameters_tier :: Lens.Lens' GlacierJobParameters Tier
glacierJobParameters_tier :: Lens' GlacierJobParameters Tier
glacierJobParameters_tier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlacierJobParameters' {Tier
tier :: Tier
$sel:tier:GlacierJobParameters' :: GlacierJobParameters -> Tier
tier} -> Tier
tier) (\s :: GlacierJobParameters
s@GlacierJobParameters' {} Tier
a -> GlacierJobParameters
s {$sel:tier:GlacierJobParameters' :: Tier
tier = Tier
a} :: GlacierJobParameters)

instance Prelude.Hashable GlacierJobParameters where
  hashWithSalt :: Int -> GlacierJobParameters -> Int
hashWithSalt Int
_salt GlacierJobParameters' {Tier
tier :: Tier
$sel:tier:GlacierJobParameters' :: GlacierJobParameters -> Tier
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Tier
tier

instance Prelude.NFData GlacierJobParameters where
  rnf :: GlacierJobParameters -> ()
rnf GlacierJobParameters' {Tier
tier :: Tier
$sel:tier:GlacierJobParameters' :: GlacierJobParameters -> Tier
..} = forall a. NFData a => a -> ()
Prelude.rnf Tier
tier

instance Data.ToXML GlacierJobParameters where
  toXML :: GlacierJobParameters -> XML
toXML GlacierJobParameters' {Tier
tier :: Tier
$sel:tier:GlacierJobParameters' :: GlacierJobParameters -> Tier
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"Tier" forall a. ToXML a => Name -> a -> XML
Data.@= Tier
tier]