{-# 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.IoT.Types.ScheduledAuditMetadata where
import qualified Amazonka.Core as Core
import Amazonka.IoT.Types.AuditFrequency
import Amazonka.IoT.Types.DayOfWeek
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ScheduledAuditMetadata = ScheduledAuditMetadata'
{
ScheduledAuditMetadata -> Maybe AuditFrequency
frequency :: Prelude.Maybe AuditFrequency,
ScheduledAuditMetadata -> Maybe Text
scheduledAuditName :: Prelude.Maybe Prelude.Text,
ScheduledAuditMetadata -> Maybe Text
dayOfMonth :: Prelude.Maybe Prelude.Text,
ScheduledAuditMetadata -> Maybe DayOfWeek
dayOfWeek :: Prelude.Maybe DayOfWeek,
ScheduledAuditMetadata -> Maybe Text
scheduledAuditArn :: Prelude.Maybe Prelude.Text
}
deriving (ScheduledAuditMetadata -> ScheduledAuditMetadata -> Bool
(ScheduledAuditMetadata -> ScheduledAuditMetadata -> Bool)
-> (ScheduledAuditMetadata -> ScheduledAuditMetadata -> Bool)
-> Eq ScheduledAuditMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScheduledAuditMetadata -> ScheduledAuditMetadata -> Bool
$c/= :: ScheduledAuditMetadata -> ScheduledAuditMetadata -> Bool
== :: ScheduledAuditMetadata -> ScheduledAuditMetadata -> Bool
$c== :: ScheduledAuditMetadata -> ScheduledAuditMetadata -> Bool
Prelude.Eq, ReadPrec [ScheduledAuditMetadata]
ReadPrec ScheduledAuditMetadata
Int -> ReadS ScheduledAuditMetadata
ReadS [ScheduledAuditMetadata]
(Int -> ReadS ScheduledAuditMetadata)
-> ReadS [ScheduledAuditMetadata]
-> ReadPrec ScheduledAuditMetadata
-> ReadPrec [ScheduledAuditMetadata]
-> Read ScheduledAuditMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ScheduledAuditMetadata]
$creadListPrec :: ReadPrec [ScheduledAuditMetadata]
readPrec :: ReadPrec ScheduledAuditMetadata
$creadPrec :: ReadPrec ScheduledAuditMetadata
readList :: ReadS [ScheduledAuditMetadata]
$creadList :: ReadS [ScheduledAuditMetadata]
readsPrec :: Int -> ReadS ScheduledAuditMetadata
$creadsPrec :: Int -> ReadS ScheduledAuditMetadata
Prelude.Read, Int -> ScheduledAuditMetadata -> ShowS
[ScheduledAuditMetadata] -> ShowS
ScheduledAuditMetadata -> String
(Int -> ScheduledAuditMetadata -> ShowS)
-> (ScheduledAuditMetadata -> String)
-> ([ScheduledAuditMetadata] -> ShowS)
-> Show ScheduledAuditMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScheduledAuditMetadata] -> ShowS
$cshowList :: [ScheduledAuditMetadata] -> ShowS
show :: ScheduledAuditMetadata -> String
$cshow :: ScheduledAuditMetadata -> String
showsPrec :: Int -> ScheduledAuditMetadata -> ShowS
$cshowsPrec :: Int -> ScheduledAuditMetadata -> ShowS
Prelude.Show, (forall x. ScheduledAuditMetadata -> Rep ScheduledAuditMetadata x)
-> (forall x.
Rep ScheduledAuditMetadata x -> ScheduledAuditMetadata)
-> Generic ScheduledAuditMetadata
forall x. Rep ScheduledAuditMetadata x -> ScheduledAuditMetadata
forall x. ScheduledAuditMetadata -> Rep ScheduledAuditMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ScheduledAuditMetadata x -> ScheduledAuditMetadata
$cfrom :: forall x. ScheduledAuditMetadata -> Rep ScheduledAuditMetadata x
Prelude.Generic)
newScheduledAuditMetadata ::
ScheduledAuditMetadata
newScheduledAuditMetadata :: ScheduledAuditMetadata
newScheduledAuditMetadata =
ScheduledAuditMetadata' :: Maybe AuditFrequency
-> Maybe Text
-> Maybe Text
-> Maybe DayOfWeek
-> Maybe Text
-> ScheduledAuditMetadata
ScheduledAuditMetadata'
{ $sel:frequency:ScheduledAuditMetadata' :: Maybe AuditFrequency
frequency =
Maybe AuditFrequency
forall a. Maybe a
Prelude.Nothing,
$sel:scheduledAuditName:ScheduledAuditMetadata' :: Maybe Text
scheduledAuditName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dayOfMonth:ScheduledAuditMetadata' :: Maybe Text
dayOfMonth = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dayOfWeek:ScheduledAuditMetadata' :: Maybe DayOfWeek
dayOfWeek = Maybe DayOfWeek
forall a. Maybe a
Prelude.Nothing,
$sel:scheduledAuditArn:ScheduledAuditMetadata' :: Maybe Text
scheduledAuditArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
scheduledAuditMetadata_frequency :: Lens.Lens' ScheduledAuditMetadata (Prelude.Maybe AuditFrequency)
scheduledAuditMetadata_frequency :: (Maybe AuditFrequency -> f (Maybe AuditFrequency))
-> ScheduledAuditMetadata -> f ScheduledAuditMetadata
scheduledAuditMetadata_frequency = (ScheduledAuditMetadata -> Maybe AuditFrequency)
-> (ScheduledAuditMetadata
-> Maybe AuditFrequency -> ScheduledAuditMetadata)
-> Lens
ScheduledAuditMetadata
ScheduledAuditMetadata
(Maybe AuditFrequency)
(Maybe AuditFrequency)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAuditMetadata' {Maybe AuditFrequency
frequency :: Maybe AuditFrequency
$sel:frequency:ScheduledAuditMetadata' :: ScheduledAuditMetadata -> Maybe AuditFrequency
frequency} -> Maybe AuditFrequency
frequency) (\s :: ScheduledAuditMetadata
s@ScheduledAuditMetadata' {} Maybe AuditFrequency
a -> ScheduledAuditMetadata
s {$sel:frequency:ScheduledAuditMetadata' :: Maybe AuditFrequency
frequency = Maybe AuditFrequency
a} :: ScheduledAuditMetadata)
scheduledAuditMetadata_scheduledAuditName :: Lens.Lens' ScheduledAuditMetadata (Prelude.Maybe Prelude.Text)
scheduledAuditMetadata_scheduledAuditName :: (Maybe Text -> f (Maybe Text))
-> ScheduledAuditMetadata -> f ScheduledAuditMetadata
scheduledAuditMetadata_scheduledAuditName = (ScheduledAuditMetadata -> Maybe Text)
-> (ScheduledAuditMetadata -> Maybe Text -> ScheduledAuditMetadata)
-> Lens
ScheduledAuditMetadata
ScheduledAuditMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAuditMetadata' {Maybe Text
scheduledAuditName :: Maybe Text
$sel:scheduledAuditName:ScheduledAuditMetadata' :: ScheduledAuditMetadata -> Maybe Text
scheduledAuditName} -> Maybe Text
scheduledAuditName) (\s :: ScheduledAuditMetadata
s@ScheduledAuditMetadata' {} Maybe Text
a -> ScheduledAuditMetadata
s {$sel:scheduledAuditName:ScheduledAuditMetadata' :: Maybe Text
scheduledAuditName = Maybe Text
a} :: ScheduledAuditMetadata)
scheduledAuditMetadata_dayOfMonth :: Lens.Lens' ScheduledAuditMetadata (Prelude.Maybe Prelude.Text)
scheduledAuditMetadata_dayOfMonth :: (Maybe Text -> f (Maybe Text))
-> ScheduledAuditMetadata -> f ScheduledAuditMetadata
scheduledAuditMetadata_dayOfMonth = (ScheduledAuditMetadata -> Maybe Text)
-> (ScheduledAuditMetadata -> Maybe Text -> ScheduledAuditMetadata)
-> Lens
ScheduledAuditMetadata
ScheduledAuditMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAuditMetadata' {Maybe Text
dayOfMonth :: Maybe Text
$sel:dayOfMonth:ScheduledAuditMetadata' :: ScheduledAuditMetadata -> Maybe Text
dayOfMonth} -> Maybe Text
dayOfMonth) (\s :: ScheduledAuditMetadata
s@ScheduledAuditMetadata' {} Maybe Text
a -> ScheduledAuditMetadata
s {$sel:dayOfMonth:ScheduledAuditMetadata' :: Maybe Text
dayOfMonth = Maybe Text
a} :: ScheduledAuditMetadata)
scheduledAuditMetadata_dayOfWeek :: Lens.Lens' ScheduledAuditMetadata (Prelude.Maybe DayOfWeek)
scheduledAuditMetadata_dayOfWeek :: (Maybe DayOfWeek -> f (Maybe DayOfWeek))
-> ScheduledAuditMetadata -> f ScheduledAuditMetadata
scheduledAuditMetadata_dayOfWeek = (ScheduledAuditMetadata -> Maybe DayOfWeek)
-> (ScheduledAuditMetadata
-> Maybe DayOfWeek -> ScheduledAuditMetadata)
-> Lens
ScheduledAuditMetadata
ScheduledAuditMetadata
(Maybe DayOfWeek)
(Maybe DayOfWeek)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAuditMetadata' {Maybe DayOfWeek
dayOfWeek :: Maybe DayOfWeek
$sel:dayOfWeek:ScheduledAuditMetadata' :: ScheduledAuditMetadata -> Maybe DayOfWeek
dayOfWeek} -> Maybe DayOfWeek
dayOfWeek) (\s :: ScheduledAuditMetadata
s@ScheduledAuditMetadata' {} Maybe DayOfWeek
a -> ScheduledAuditMetadata
s {$sel:dayOfWeek:ScheduledAuditMetadata' :: Maybe DayOfWeek
dayOfWeek = Maybe DayOfWeek
a} :: ScheduledAuditMetadata)
scheduledAuditMetadata_scheduledAuditArn :: Lens.Lens' ScheduledAuditMetadata (Prelude.Maybe Prelude.Text)
scheduledAuditMetadata_scheduledAuditArn :: (Maybe Text -> f (Maybe Text))
-> ScheduledAuditMetadata -> f ScheduledAuditMetadata
scheduledAuditMetadata_scheduledAuditArn = (ScheduledAuditMetadata -> Maybe Text)
-> (ScheduledAuditMetadata -> Maybe Text -> ScheduledAuditMetadata)
-> Lens
ScheduledAuditMetadata
ScheduledAuditMetadata
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ScheduledAuditMetadata' {Maybe Text
scheduledAuditArn :: Maybe Text
$sel:scheduledAuditArn:ScheduledAuditMetadata' :: ScheduledAuditMetadata -> Maybe Text
scheduledAuditArn} -> Maybe Text
scheduledAuditArn) (\s :: ScheduledAuditMetadata
s@ScheduledAuditMetadata' {} Maybe Text
a -> ScheduledAuditMetadata
s {$sel:scheduledAuditArn:ScheduledAuditMetadata' :: Maybe Text
scheduledAuditArn = Maybe Text
a} :: ScheduledAuditMetadata)
instance Core.FromJSON ScheduledAuditMetadata where
parseJSON :: Value -> Parser ScheduledAuditMetadata
parseJSON =
String
-> (Object -> Parser ScheduledAuditMetadata)
-> Value
-> Parser ScheduledAuditMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ScheduledAuditMetadata"
( \Object
x ->
Maybe AuditFrequency
-> Maybe Text
-> Maybe Text
-> Maybe DayOfWeek
-> Maybe Text
-> ScheduledAuditMetadata
ScheduledAuditMetadata'
(Maybe AuditFrequency
-> Maybe Text
-> Maybe Text
-> Maybe DayOfWeek
-> Maybe Text
-> ScheduledAuditMetadata)
-> Parser (Maybe AuditFrequency)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe DayOfWeek
-> Maybe Text
-> ScheduledAuditMetadata)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AuditFrequency)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"frequency")
Parser
(Maybe Text
-> Maybe Text
-> Maybe DayOfWeek
-> Maybe Text
-> ScheduledAuditMetadata)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe DayOfWeek -> Maybe Text -> ScheduledAuditMetadata)
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
"scheduledAuditName")
Parser
(Maybe Text
-> Maybe DayOfWeek -> Maybe Text -> ScheduledAuditMetadata)
-> Parser (Maybe Text)
-> Parser (Maybe DayOfWeek -> Maybe Text -> ScheduledAuditMetadata)
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
"dayOfMonth")
Parser (Maybe DayOfWeek -> Maybe Text -> ScheduledAuditMetadata)
-> Parser (Maybe DayOfWeek)
-> Parser (Maybe Text -> ScheduledAuditMetadata)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DayOfWeek)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dayOfWeek")
Parser (Maybe Text -> ScheduledAuditMetadata)
-> Parser (Maybe Text) -> Parser ScheduledAuditMetadata
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
"scheduledAuditArn")
)
instance Prelude.Hashable ScheduledAuditMetadata
instance Prelude.NFData ScheduledAuditMetadata