{-# 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.S3.Types.StorageClassAnalysis 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.StorageClassAnalysisDataExport
data StorageClassAnalysis = StorageClassAnalysis'
{
StorageClassAnalysis -> Maybe StorageClassAnalysisDataExport
dataExport :: Prelude.Maybe StorageClassAnalysisDataExport
}
deriving (StorageClassAnalysis -> StorageClassAnalysis -> Bool
(StorageClassAnalysis -> StorageClassAnalysis -> Bool)
-> (StorageClassAnalysis -> StorageClassAnalysis -> Bool)
-> Eq StorageClassAnalysis
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StorageClassAnalysis -> StorageClassAnalysis -> Bool
$c/= :: StorageClassAnalysis -> StorageClassAnalysis -> Bool
== :: StorageClassAnalysis -> StorageClassAnalysis -> Bool
$c== :: StorageClassAnalysis -> StorageClassAnalysis -> Bool
Prelude.Eq, ReadPrec [StorageClassAnalysis]
ReadPrec StorageClassAnalysis
Int -> ReadS StorageClassAnalysis
ReadS [StorageClassAnalysis]
(Int -> ReadS StorageClassAnalysis)
-> ReadS [StorageClassAnalysis]
-> ReadPrec StorageClassAnalysis
-> ReadPrec [StorageClassAnalysis]
-> Read StorageClassAnalysis
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StorageClassAnalysis]
$creadListPrec :: ReadPrec [StorageClassAnalysis]
readPrec :: ReadPrec StorageClassAnalysis
$creadPrec :: ReadPrec StorageClassAnalysis
readList :: ReadS [StorageClassAnalysis]
$creadList :: ReadS [StorageClassAnalysis]
readsPrec :: Int -> ReadS StorageClassAnalysis
$creadsPrec :: Int -> ReadS StorageClassAnalysis
Prelude.Read, Int -> StorageClassAnalysis -> ShowS
[StorageClassAnalysis] -> ShowS
StorageClassAnalysis -> String
(Int -> StorageClassAnalysis -> ShowS)
-> (StorageClassAnalysis -> String)
-> ([StorageClassAnalysis] -> ShowS)
-> Show StorageClassAnalysis
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StorageClassAnalysis] -> ShowS
$cshowList :: [StorageClassAnalysis] -> ShowS
show :: StorageClassAnalysis -> String
$cshow :: StorageClassAnalysis -> String
showsPrec :: Int -> StorageClassAnalysis -> ShowS
$cshowsPrec :: Int -> StorageClassAnalysis -> ShowS
Prelude.Show, (forall x. StorageClassAnalysis -> Rep StorageClassAnalysis x)
-> (forall x. Rep StorageClassAnalysis x -> StorageClassAnalysis)
-> Generic StorageClassAnalysis
forall x. Rep StorageClassAnalysis x -> StorageClassAnalysis
forall x. StorageClassAnalysis -> Rep StorageClassAnalysis x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StorageClassAnalysis x -> StorageClassAnalysis
$cfrom :: forall x. StorageClassAnalysis -> Rep StorageClassAnalysis x
Prelude.Generic)
newStorageClassAnalysis ::
StorageClassAnalysis
newStorageClassAnalysis :: StorageClassAnalysis
newStorageClassAnalysis =
StorageClassAnalysis' :: Maybe StorageClassAnalysisDataExport -> StorageClassAnalysis
StorageClassAnalysis' {$sel:dataExport:StorageClassAnalysis' :: Maybe StorageClassAnalysisDataExport
dataExport = Maybe StorageClassAnalysisDataExport
forall a. Maybe a
Prelude.Nothing}
storageClassAnalysis_dataExport :: Lens.Lens' StorageClassAnalysis (Prelude.Maybe StorageClassAnalysisDataExport)
storageClassAnalysis_dataExport :: (Maybe StorageClassAnalysisDataExport
-> f (Maybe StorageClassAnalysisDataExport))
-> StorageClassAnalysis -> f StorageClassAnalysis
storageClassAnalysis_dataExport = (StorageClassAnalysis -> Maybe StorageClassAnalysisDataExport)
-> (StorageClassAnalysis
-> Maybe StorageClassAnalysisDataExport -> StorageClassAnalysis)
-> Lens
StorageClassAnalysis
StorageClassAnalysis
(Maybe StorageClassAnalysisDataExport)
(Maybe StorageClassAnalysisDataExport)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageClassAnalysis' {Maybe StorageClassAnalysisDataExport
dataExport :: Maybe StorageClassAnalysisDataExport
$sel:dataExport:StorageClassAnalysis' :: StorageClassAnalysis -> Maybe StorageClassAnalysisDataExport
dataExport} -> Maybe StorageClassAnalysisDataExport
dataExport) (\s :: StorageClassAnalysis
s@StorageClassAnalysis' {} Maybe StorageClassAnalysisDataExport
a -> StorageClassAnalysis
s {$sel:dataExport:StorageClassAnalysis' :: Maybe StorageClassAnalysisDataExport
dataExport = Maybe StorageClassAnalysisDataExport
a} :: StorageClassAnalysis)
instance Core.FromXML StorageClassAnalysis where
parseXML :: [Node] -> Either String StorageClassAnalysis
parseXML [Node]
x =
Maybe StorageClassAnalysisDataExport -> StorageClassAnalysis
StorageClassAnalysis'
(Maybe StorageClassAnalysisDataExport -> StorageClassAnalysis)
-> Either String (Maybe StorageClassAnalysisDataExport)
-> Either String StorageClassAnalysis
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node]
-> Text -> Either String (Maybe StorageClassAnalysisDataExport)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DataExport")
instance Prelude.Hashable StorageClassAnalysis
instance Prelude.NFData StorageClassAnalysis
instance Core.ToXML StorageClassAnalysis where
toXML :: StorageClassAnalysis -> XML
toXML StorageClassAnalysis' {Maybe StorageClassAnalysisDataExport
dataExport :: Maybe StorageClassAnalysisDataExport
$sel:dataExport:StorageClassAnalysis' :: StorageClassAnalysis -> Maybe StorageClassAnalysisDataExport
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"DataExport" Name -> Maybe StorageClassAnalysisDataExport -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe StorageClassAnalysisDataExport
dataExport]