{-# 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.Macie.Types.ClassificationTypeUpdate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Macie.Types.S3ContinuousClassificationType
import Amazonka.Macie.Types.S3OneTimeClassificationType
import qualified Amazonka.Prelude as Prelude
data ClassificationTypeUpdate = ClassificationTypeUpdate'
{
ClassificationTypeUpdate -> Maybe S3ContinuousClassificationType
continuous :: Prelude.Maybe S3ContinuousClassificationType,
ClassificationTypeUpdate -> Maybe S3OneTimeClassificationType
oneTime :: Prelude.Maybe S3OneTimeClassificationType
}
deriving (ClassificationTypeUpdate -> ClassificationTypeUpdate -> Bool
(ClassificationTypeUpdate -> ClassificationTypeUpdate -> Bool)
-> (ClassificationTypeUpdate -> ClassificationTypeUpdate -> Bool)
-> Eq ClassificationTypeUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClassificationTypeUpdate -> ClassificationTypeUpdate -> Bool
$c/= :: ClassificationTypeUpdate -> ClassificationTypeUpdate -> Bool
== :: ClassificationTypeUpdate -> ClassificationTypeUpdate -> Bool
$c== :: ClassificationTypeUpdate -> ClassificationTypeUpdate -> Bool
Prelude.Eq, ReadPrec [ClassificationTypeUpdate]
ReadPrec ClassificationTypeUpdate
Int -> ReadS ClassificationTypeUpdate
ReadS [ClassificationTypeUpdate]
(Int -> ReadS ClassificationTypeUpdate)
-> ReadS [ClassificationTypeUpdate]
-> ReadPrec ClassificationTypeUpdate
-> ReadPrec [ClassificationTypeUpdate]
-> Read ClassificationTypeUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ClassificationTypeUpdate]
$creadListPrec :: ReadPrec [ClassificationTypeUpdate]
readPrec :: ReadPrec ClassificationTypeUpdate
$creadPrec :: ReadPrec ClassificationTypeUpdate
readList :: ReadS [ClassificationTypeUpdate]
$creadList :: ReadS [ClassificationTypeUpdate]
readsPrec :: Int -> ReadS ClassificationTypeUpdate
$creadsPrec :: Int -> ReadS ClassificationTypeUpdate
Prelude.Read, Int -> ClassificationTypeUpdate -> ShowS
[ClassificationTypeUpdate] -> ShowS
ClassificationTypeUpdate -> String
(Int -> ClassificationTypeUpdate -> ShowS)
-> (ClassificationTypeUpdate -> String)
-> ([ClassificationTypeUpdate] -> ShowS)
-> Show ClassificationTypeUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClassificationTypeUpdate] -> ShowS
$cshowList :: [ClassificationTypeUpdate] -> ShowS
show :: ClassificationTypeUpdate -> String
$cshow :: ClassificationTypeUpdate -> String
showsPrec :: Int -> ClassificationTypeUpdate -> ShowS
$cshowsPrec :: Int -> ClassificationTypeUpdate -> ShowS
Prelude.Show, (forall x.
ClassificationTypeUpdate -> Rep ClassificationTypeUpdate x)
-> (forall x.
Rep ClassificationTypeUpdate x -> ClassificationTypeUpdate)
-> Generic ClassificationTypeUpdate
forall x.
Rep ClassificationTypeUpdate x -> ClassificationTypeUpdate
forall x.
ClassificationTypeUpdate -> Rep ClassificationTypeUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ClassificationTypeUpdate x -> ClassificationTypeUpdate
$cfrom :: forall x.
ClassificationTypeUpdate -> Rep ClassificationTypeUpdate x
Prelude.Generic)
newClassificationTypeUpdate ::
ClassificationTypeUpdate
newClassificationTypeUpdate :: ClassificationTypeUpdate
newClassificationTypeUpdate =
ClassificationTypeUpdate' :: Maybe S3ContinuousClassificationType
-> Maybe S3OneTimeClassificationType -> ClassificationTypeUpdate
ClassificationTypeUpdate'
{ $sel:continuous:ClassificationTypeUpdate' :: Maybe S3ContinuousClassificationType
continuous =
Maybe S3ContinuousClassificationType
forall a. Maybe a
Prelude.Nothing,
$sel:oneTime:ClassificationTypeUpdate' :: Maybe S3OneTimeClassificationType
oneTime = Maybe S3OneTimeClassificationType
forall a. Maybe a
Prelude.Nothing
}
classificationTypeUpdate_continuous :: Lens.Lens' ClassificationTypeUpdate (Prelude.Maybe S3ContinuousClassificationType)
classificationTypeUpdate_continuous :: (Maybe S3ContinuousClassificationType
-> f (Maybe S3ContinuousClassificationType))
-> ClassificationTypeUpdate -> f ClassificationTypeUpdate
classificationTypeUpdate_continuous = (ClassificationTypeUpdate -> Maybe S3ContinuousClassificationType)
-> (ClassificationTypeUpdate
-> Maybe S3ContinuousClassificationType
-> ClassificationTypeUpdate)
-> Lens
ClassificationTypeUpdate
ClassificationTypeUpdate
(Maybe S3ContinuousClassificationType)
(Maybe S3ContinuousClassificationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClassificationTypeUpdate' {Maybe S3ContinuousClassificationType
continuous :: Maybe S3ContinuousClassificationType
$sel:continuous:ClassificationTypeUpdate' :: ClassificationTypeUpdate -> Maybe S3ContinuousClassificationType
continuous} -> Maybe S3ContinuousClassificationType
continuous) (\s :: ClassificationTypeUpdate
s@ClassificationTypeUpdate' {} Maybe S3ContinuousClassificationType
a -> ClassificationTypeUpdate
s {$sel:continuous:ClassificationTypeUpdate' :: Maybe S3ContinuousClassificationType
continuous = Maybe S3ContinuousClassificationType
a} :: ClassificationTypeUpdate)
classificationTypeUpdate_oneTime :: Lens.Lens' ClassificationTypeUpdate (Prelude.Maybe S3OneTimeClassificationType)
classificationTypeUpdate_oneTime :: (Maybe S3OneTimeClassificationType
-> f (Maybe S3OneTimeClassificationType))
-> ClassificationTypeUpdate -> f ClassificationTypeUpdate
classificationTypeUpdate_oneTime = (ClassificationTypeUpdate -> Maybe S3OneTimeClassificationType)
-> (ClassificationTypeUpdate
-> Maybe S3OneTimeClassificationType -> ClassificationTypeUpdate)
-> Lens
ClassificationTypeUpdate
ClassificationTypeUpdate
(Maybe S3OneTimeClassificationType)
(Maybe S3OneTimeClassificationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ClassificationTypeUpdate' {Maybe S3OneTimeClassificationType
oneTime :: Maybe S3OneTimeClassificationType
$sel:oneTime:ClassificationTypeUpdate' :: ClassificationTypeUpdate -> Maybe S3OneTimeClassificationType
oneTime} -> Maybe S3OneTimeClassificationType
oneTime) (\s :: ClassificationTypeUpdate
s@ClassificationTypeUpdate' {} Maybe S3OneTimeClassificationType
a -> ClassificationTypeUpdate
s {$sel:oneTime:ClassificationTypeUpdate' :: Maybe S3OneTimeClassificationType
oneTime = Maybe S3OneTimeClassificationType
a} :: ClassificationTypeUpdate)
instance Prelude.Hashable ClassificationTypeUpdate
instance Prelude.NFData ClassificationTypeUpdate
instance Core.ToJSON ClassificationTypeUpdate where
toJSON :: ClassificationTypeUpdate -> Value
toJSON ClassificationTypeUpdate' {Maybe S3ContinuousClassificationType
Maybe S3OneTimeClassificationType
oneTime :: Maybe S3OneTimeClassificationType
continuous :: Maybe S3ContinuousClassificationType
$sel:oneTime:ClassificationTypeUpdate' :: ClassificationTypeUpdate -> Maybe S3OneTimeClassificationType
$sel:continuous:ClassificationTypeUpdate' :: ClassificationTypeUpdate -> Maybe S3ContinuousClassificationType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"continuous" Text -> S3ContinuousClassificationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (S3ContinuousClassificationType -> Pair)
-> Maybe S3ContinuousClassificationType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3ContinuousClassificationType
continuous,
(Text
"oneTime" Text -> S3OneTimeClassificationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (S3OneTimeClassificationType -> Pair)
-> Maybe S3OneTimeClassificationType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3OneTimeClassificationType
oneTime
]
)