{-# 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.SecurityHub.Types.AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails = AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails'
{
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Maybe Int
days :: Prelude.Maybe Prelude.Int,
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Maybe Text
storageClass :: Prelude.Maybe Prelude.Text
}
deriving (AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Bool
(AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Bool)
-> (AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Bool)
-> Eq
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Bool
$c/= :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Bool
== :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Bool
$c== :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Bool
Prelude.Eq, ReadPrec
[AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails]
ReadPrec
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
Int
-> ReadS
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
ReadS
[AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails]
(Int
-> ReadS
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails)
-> ReadS
[AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails]
-> ReadPrec
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> ReadPrec
[AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails]
-> Read
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec
[AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails]
$creadListPrec :: ReadPrec
[AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails]
readPrec :: ReadPrec
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
$creadPrec :: ReadPrec
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
readList :: ReadS
[AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails]
$creadList :: ReadS
[AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails]
readsPrec :: Int
-> ReadS
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
$creadsPrec :: Int
-> ReadS
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
Prelude.Read, Int
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> ShowS
[AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails]
-> ShowS
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> String
(Int
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> ShowS)
-> (AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> String)
-> ([AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails]
-> ShowS)
-> Show
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails]
-> ShowS
$cshowList :: [AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails]
-> ShowS
show :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> String
$cshow :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> String
showsPrec :: Int
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> ShowS
$cshowsPrec :: Int
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> ShowS
Prelude.Show, (forall x.
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Rep
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
x)
-> (forall x.
Rep
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
x
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails)
-> Generic
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
forall x.
Rep
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
x
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
forall x.
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Rep
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
x
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
$cfrom :: forall x.
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Rep
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
x
Prelude.Generic)
newAwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails ::
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
newAwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
newAwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails =
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' :: Maybe Int
-> Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails'
{ $sel:days:AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' :: Maybe Int
days =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:storageClass:AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' :: Maybe Text
storageClass =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails_days :: Lens.Lens' AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails (Prelude.Maybe Prelude.Int)
awsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails_days :: (Maybe Int -> f (Maybe Int))
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> f AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
awsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails_days = (AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Maybe Int)
-> (AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Maybe Int
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails)
-> Lens
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' {Maybe Int
days :: Maybe Int
$sel:days:AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Maybe Int
days} -> Maybe Int
days) (\s :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
s@AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' {} Maybe Int
a -> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
s {$sel:days:AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' :: Maybe Int
days = Maybe Int
a} :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails)
awsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails_storageClass :: Lens.Lens' AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails (Prelude.Maybe Prelude.Text)
awsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails_storageClass :: (Maybe Text -> f (Maybe Text))
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> f AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
awsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails_storageClass = (AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Maybe Text)
-> (AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails)
-> Lens
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' {Maybe Text
storageClass :: Maybe Text
$sel:storageClass:AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Maybe Text
storageClass} -> Maybe Text
storageClass) (\s :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
s@AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' {} Maybe Text
a -> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
s {$sel:storageClass:AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' :: Maybe Text
storageClass = Maybe Text
a} :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails)
instance
Core.FromJSON
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
where
parseJSON :: Value
-> Parser
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
parseJSON =
String
-> (Object
-> Parser
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails)
-> Value
-> Parser
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails"
( \Object
x ->
Maybe Int
-> Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails'
(Maybe Int
-> Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Days")
Parser
(Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails)
-> Parser (Maybe Text)
-> Parser
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StorageClass")
)
instance
Prelude.Hashable
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
instance
Prelude.NFData
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
instance
Core.ToJSON
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
where
toJSON :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Value
toJSON
AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' {Maybe Int
Maybe Text
storageClass :: Maybe Text
days :: Maybe Int
$sel:storageClass:AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Maybe Text
$sel:days:AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails' :: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails
-> Maybe Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Days" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
days,
(Text
"StorageClass" 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
storageClass
]
)