{-# 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-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.S3.Types.GlacierJobParameters where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
(GlacierJobParameters -> GlacierJobParameters -> Bool)
-> (GlacierJobParameters -> GlacierJobParameters -> Bool)
-> Eq GlacierJobParameters
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]
(Int -> ReadS GlacierJobParameters)
-> ReadS [GlacierJobParameters]
-> ReadPrec GlacierJobParameters
-> ReadPrec [GlacierJobParameters]
-> Read 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
(Int -> GlacierJobParameters -> ShowS)
-> (GlacierJobParameters -> String)
-> ([GlacierJobParameters] -> ShowS)
-> Show GlacierJobParameters
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. GlacierJobParameters -> Rep GlacierJobParameters x)
-> (forall x. Rep GlacierJobParameters x -> GlacierJobParameters)
-> Generic GlacierJobParameters
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' :: Tier -> GlacierJobParameters
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 :: (Tier -> f Tier) -> GlacierJobParameters -> f GlacierJobParameters
glacierJobParameters_tier = (GlacierJobParameters -> Tier)
-> (GlacierJobParameters -> Tier -> GlacierJobParameters)
-> Lens GlacierJobParameters GlacierJobParameters Tier 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

instance Prelude.NFData GlacierJobParameters

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