{-# 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.AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails = AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails'
{
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Int
days :: Prelude.Maybe Prelude.Int,
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Text
date :: Prelude.Maybe Prelude.Text,
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Text
storageClass :: Prelude.Maybe Prelude.Text
}
deriving (AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Bool
(AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Bool)
-> (AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Bool)
-> Eq
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Bool
$c/= :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Bool
== :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Bool
$c== :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Bool
Prelude.Eq, ReadPrec
[AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails]
ReadPrec
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
Int
-> ReadS
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
ReadS
[AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails]
(Int
-> ReadS
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
-> ReadS
[AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails]
-> ReadPrec
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> ReadPrec
[AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails]
-> Read
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec
[AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails]
$creadListPrec :: ReadPrec
[AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails]
readPrec :: ReadPrec
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
$creadPrec :: ReadPrec
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
readList :: ReadS
[AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails]
$creadList :: ReadS
[AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails]
readsPrec :: Int
-> ReadS
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
$creadsPrec :: Int
-> ReadS
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
Prelude.Read, Int
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> ShowS
[AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails]
-> ShowS
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> String
(Int
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> ShowS)
-> (AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> String)
-> ([AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails]
-> ShowS)
-> Show
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails]
-> ShowS
$cshowList :: [AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails]
-> ShowS
show :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> String
$cshow :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> String
showsPrec :: Int
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> ShowS
$cshowsPrec :: Int
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> ShowS
Prelude.Show, (forall x.
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Rep
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails x)
-> (forall x.
Rep
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails x
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
-> Generic
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
forall x.
Rep
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails x
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
forall x.
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Rep
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails x
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
$cfrom :: forall x.
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Rep
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails x
Prelude.Generic)
newAwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails ::
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
newAwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
newAwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails =
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' :: Maybe Int
-> Maybe Text
-> Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails'
{ $sel:days:AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' :: Maybe Int
days =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:date:AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' :: Maybe Text
date =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:storageClass:AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' :: Maybe Text
storageClass =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails_days :: Lens.Lens' AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails (Prelude.Maybe Prelude.Int)
awsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails_days :: (Maybe Int -> f (Maybe Int))
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> f AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
awsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails_days = (AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Int)
-> (AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Int
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
-> Lens
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' {Maybe Int
days :: Maybe Int
$sel:days:AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Int
days} -> Maybe Int
days) (\s :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
s@AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' {} Maybe Int
a -> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
s {$sel:days:AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' :: Maybe Int
days = Maybe Int
a} :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
awsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails_date :: Lens.Lens' AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails (Prelude.Maybe Prelude.Text)
awsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails_date :: (Maybe Text -> f (Maybe Text))
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> f AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
awsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails_date = (AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Text)
-> (AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
-> Lens
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' {Maybe Text
date :: Maybe Text
$sel:date:AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Text
date} -> Maybe Text
date) (\s :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
s@AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' {} Maybe Text
a -> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
s {$sel:date:AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' :: Maybe Text
date = Maybe Text
a} :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
awsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails_storageClass :: Lens.Lens' AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails (Prelude.Maybe Prelude.Text)
awsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails_storageClass :: (Maybe Text -> f (Maybe Text))
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> f AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
awsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails_storageClass = (AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Text)
-> (AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
-> Lens
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' {Maybe Text
storageClass :: Maybe Text
$sel:storageClass:AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Text
storageClass} -> Maybe Text
storageClass) (\s :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
s@AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' {} Maybe Text
a -> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
s {$sel:storageClass:AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' :: Maybe Text
storageClass = Maybe Text
a} :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
instance
Core.FromJSON
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
where
parseJSON :: Value
-> Parser
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
parseJSON =
String
-> (Object
-> Parser
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
-> Value
-> Parser
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails"
( \Object
x ->
Maybe Int
-> Maybe Text
-> Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails'
(Maybe Int
-> Maybe Text
-> Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
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
-> Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
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
"Date")
Parser
(Maybe Text
-> AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails)
-> Parser (Maybe Text)
-> Parser
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
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
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
instance
Prelude.NFData
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
instance
Core.ToJSON
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
where
toJSON :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Value
toJSON
AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' {Maybe Int
Maybe Text
storageClass :: Maybe Text
date :: Maybe Text
days :: Maybe Int
$sel:storageClass:AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Text
$sel:date:AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> Maybe Text
$sel:days:AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails' :: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails
-> 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
"Date" 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
date,
(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
]
)