{-# 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.AlexaBusiness.Types.BusinessReportSchedule where
import Amazonka.AlexaBusiness.Types.BusinessReport
import Amazonka.AlexaBusiness.Types.BusinessReportContentRange
import Amazonka.AlexaBusiness.Types.BusinessReportFormat
import Amazonka.AlexaBusiness.Types.BusinessReportRecurrence
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BusinessReportSchedule = BusinessReportSchedule'
{
BusinessReportSchedule -> Maybe Text
s3KeyPrefix :: Prelude.Maybe Prelude.Text,
BusinessReportSchedule -> Maybe BusinessReport
lastBusinessReport :: Prelude.Maybe BusinessReport,
BusinessReportSchedule -> Maybe BusinessReportFormat
format :: Prelude.Maybe BusinessReportFormat,
BusinessReportSchedule -> Maybe BusinessReportRecurrence
recurrence :: Prelude.Maybe BusinessReportRecurrence,
BusinessReportSchedule -> Maybe Text
scheduleName :: Prelude.Maybe Prelude.Text,
BusinessReportSchedule -> Maybe Text
scheduleArn :: Prelude.Maybe Prelude.Text,
BusinessReportSchedule -> Maybe BusinessReportContentRange
contentRange :: Prelude.Maybe BusinessReportContentRange,
BusinessReportSchedule -> Maybe Text
s3BucketName :: Prelude.Maybe Prelude.Text
}
deriving (BusinessReportSchedule -> BusinessReportSchedule -> Bool
(BusinessReportSchedule -> BusinessReportSchedule -> Bool)
-> (BusinessReportSchedule -> BusinessReportSchedule -> Bool)
-> Eq BusinessReportSchedule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BusinessReportSchedule -> BusinessReportSchedule -> Bool
$c/= :: BusinessReportSchedule -> BusinessReportSchedule -> Bool
== :: BusinessReportSchedule -> BusinessReportSchedule -> Bool
$c== :: BusinessReportSchedule -> BusinessReportSchedule -> Bool
Prelude.Eq, ReadPrec [BusinessReportSchedule]
ReadPrec BusinessReportSchedule
Int -> ReadS BusinessReportSchedule
ReadS [BusinessReportSchedule]
(Int -> ReadS BusinessReportSchedule)
-> ReadS [BusinessReportSchedule]
-> ReadPrec BusinessReportSchedule
-> ReadPrec [BusinessReportSchedule]
-> Read BusinessReportSchedule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BusinessReportSchedule]
$creadListPrec :: ReadPrec [BusinessReportSchedule]
readPrec :: ReadPrec BusinessReportSchedule
$creadPrec :: ReadPrec BusinessReportSchedule
readList :: ReadS [BusinessReportSchedule]
$creadList :: ReadS [BusinessReportSchedule]
readsPrec :: Int -> ReadS BusinessReportSchedule
$creadsPrec :: Int -> ReadS BusinessReportSchedule
Prelude.Read, Int -> BusinessReportSchedule -> ShowS
[BusinessReportSchedule] -> ShowS
BusinessReportSchedule -> String
(Int -> BusinessReportSchedule -> ShowS)
-> (BusinessReportSchedule -> String)
-> ([BusinessReportSchedule] -> ShowS)
-> Show BusinessReportSchedule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BusinessReportSchedule] -> ShowS
$cshowList :: [BusinessReportSchedule] -> ShowS
show :: BusinessReportSchedule -> String
$cshow :: BusinessReportSchedule -> String
showsPrec :: Int -> BusinessReportSchedule -> ShowS
$cshowsPrec :: Int -> BusinessReportSchedule -> ShowS
Prelude.Show, (forall x. BusinessReportSchedule -> Rep BusinessReportSchedule x)
-> (forall x.
Rep BusinessReportSchedule x -> BusinessReportSchedule)
-> Generic BusinessReportSchedule
forall x. Rep BusinessReportSchedule x -> BusinessReportSchedule
forall x. BusinessReportSchedule -> Rep BusinessReportSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BusinessReportSchedule x -> BusinessReportSchedule
$cfrom :: forall x. BusinessReportSchedule -> Rep BusinessReportSchedule x
Prelude.Generic)
newBusinessReportSchedule ::
BusinessReportSchedule
newBusinessReportSchedule :: BusinessReportSchedule
newBusinessReportSchedule =
BusinessReportSchedule' :: Maybe Text
-> Maybe BusinessReport
-> Maybe BusinessReportFormat
-> Maybe BusinessReportRecurrence
-> Maybe Text
-> Maybe Text
-> Maybe BusinessReportContentRange
-> Maybe Text
-> BusinessReportSchedule
BusinessReportSchedule'
{ $sel:s3KeyPrefix:BusinessReportSchedule' :: Maybe Text
s3KeyPrefix =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastBusinessReport:BusinessReportSchedule' :: Maybe BusinessReport
lastBusinessReport = Maybe BusinessReport
forall a. Maybe a
Prelude.Nothing,
$sel:format:BusinessReportSchedule' :: Maybe BusinessReportFormat
format = Maybe BusinessReportFormat
forall a. Maybe a
Prelude.Nothing,
$sel:recurrence:BusinessReportSchedule' :: Maybe BusinessReportRecurrence
recurrence = Maybe BusinessReportRecurrence
forall a. Maybe a
Prelude.Nothing,
$sel:scheduleName:BusinessReportSchedule' :: Maybe Text
scheduleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:scheduleArn:BusinessReportSchedule' :: Maybe Text
scheduleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:contentRange:BusinessReportSchedule' :: Maybe BusinessReportContentRange
contentRange = Maybe BusinessReportContentRange
forall a. Maybe a
Prelude.Nothing,
$sel:s3BucketName:BusinessReportSchedule' :: Maybe Text
s3BucketName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
businessReportSchedule_s3KeyPrefix :: Lens.Lens' BusinessReportSchedule (Prelude.Maybe Prelude.Text)
businessReportSchedule_s3KeyPrefix :: (Maybe Text -> f (Maybe Text))
-> BusinessReportSchedule -> f BusinessReportSchedule
businessReportSchedule_s3KeyPrefix = (BusinessReportSchedule -> Maybe Text)
-> (BusinessReportSchedule -> Maybe Text -> BusinessReportSchedule)
-> Lens
BusinessReportSchedule
BusinessReportSchedule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessReportSchedule' {Maybe Text
s3KeyPrefix :: Maybe Text
$sel:s3KeyPrefix:BusinessReportSchedule' :: BusinessReportSchedule -> Maybe Text
s3KeyPrefix} -> Maybe Text
s3KeyPrefix) (\s :: BusinessReportSchedule
s@BusinessReportSchedule' {} Maybe Text
a -> BusinessReportSchedule
s {$sel:s3KeyPrefix:BusinessReportSchedule' :: Maybe Text
s3KeyPrefix = Maybe Text
a} :: BusinessReportSchedule)
businessReportSchedule_lastBusinessReport :: Lens.Lens' BusinessReportSchedule (Prelude.Maybe BusinessReport)
businessReportSchedule_lastBusinessReport :: (Maybe BusinessReport -> f (Maybe BusinessReport))
-> BusinessReportSchedule -> f BusinessReportSchedule
businessReportSchedule_lastBusinessReport = (BusinessReportSchedule -> Maybe BusinessReport)
-> (BusinessReportSchedule
-> Maybe BusinessReport -> BusinessReportSchedule)
-> Lens
BusinessReportSchedule
BusinessReportSchedule
(Maybe BusinessReport)
(Maybe BusinessReport)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessReportSchedule' {Maybe BusinessReport
lastBusinessReport :: Maybe BusinessReport
$sel:lastBusinessReport:BusinessReportSchedule' :: BusinessReportSchedule -> Maybe BusinessReport
lastBusinessReport} -> Maybe BusinessReport
lastBusinessReport) (\s :: BusinessReportSchedule
s@BusinessReportSchedule' {} Maybe BusinessReport
a -> BusinessReportSchedule
s {$sel:lastBusinessReport:BusinessReportSchedule' :: Maybe BusinessReport
lastBusinessReport = Maybe BusinessReport
a} :: BusinessReportSchedule)
businessReportSchedule_format :: Lens.Lens' BusinessReportSchedule (Prelude.Maybe BusinessReportFormat)
businessReportSchedule_format :: (Maybe BusinessReportFormat -> f (Maybe BusinessReportFormat))
-> BusinessReportSchedule -> f BusinessReportSchedule
businessReportSchedule_format = (BusinessReportSchedule -> Maybe BusinessReportFormat)
-> (BusinessReportSchedule
-> Maybe BusinessReportFormat -> BusinessReportSchedule)
-> Lens
BusinessReportSchedule
BusinessReportSchedule
(Maybe BusinessReportFormat)
(Maybe BusinessReportFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessReportSchedule' {Maybe BusinessReportFormat
format :: Maybe BusinessReportFormat
$sel:format:BusinessReportSchedule' :: BusinessReportSchedule -> Maybe BusinessReportFormat
format} -> Maybe BusinessReportFormat
format) (\s :: BusinessReportSchedule
s@BusinessReportSchedule' {} Maybe BusinessReportFormat
a -> BusinessReportSchedule
s {$sel:format:BusinessReportSchedule' :: Maybe BusinessReportFormat
format = Maybe BusinessReportFormat
a} :: BusinessReportSchedule)
businessReportSchedule_recurrence :: Lens.Lens' BusinessReportSchedule (Prelude.Maybe BusinessReportRecurrence)
businessReportSchedule_recurrence :: (Maybe BusinessReportRecurrence
-> f (Maybe BusinessReportRecurrence))
-> BusinessReportSchedule -> f BusinessReportSchedule
businessReportSchedule_recurrence = (BusinessReportSchedule -> Maybe BusinessReportRecurrence)
-> (BusinessReportSchedule
-> Maybe BusinessReportRecurrence -> BusinessReportSchedule)
-> Lens
BusinessReportSchedule
BusinessReportSchedule
(Maybe BusinessReportRecurrence)
(Maybe BusinessReportRecurrence)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessReportSchedule' {Maybe BusinessReportRecurrence
recurrence :: Maybe BusinessReportRecurrence
$sel:recurrence:BusinessReportSchedule' :: BusinessReportSchedule -> Maybe BusinessReportRecurrence
recurrence} -> Maybe BusinessReportRecurrence
recurrence) (\s :: BusinessReportSchedule
s@BusinessReportSchedule' {} Maybe BusinessReportRecurrence
a -> BusinessReportSchedule
s {$sel:recurrence:BusinessReportSchedule' :: Maybe BusinessReportRecurrence
recurrence = Maybe BusinessReportRecurrence
a} :: BusinessReportSchedule)
businessReportSchedule_scheduleName :: Lens.Lens' BusinessReportSchedule (Prelude.Maybe Prelude.Text)
businessReportSchedule_scheduleName :: (Maybe Text -> f (Maybe Text))
-> BusinessReportSchedule -> f BusinessReportSchedule
businessReportSchedule_scheduleName = (BusinessReportSchedule -> Maybe Text)
-> (BusinessReportSchedule -> Maybe Text -> BusinessReportSchedule)
-> Lens
BusinessReportSchedule
BusinessReportSchedule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessReportSchedule' {Maybe Text
scheduleName :: Maybe Text
$sel:scheduleName:BusinessReportSchedule' :: BusinessReportSchedule -> Maybe Text
scheduleName} -> Maybe Text
scheduleName) (\s :: BusinessReportSchedule
s@BusinessReportSchedule' {} Maybe Text
a -> BusinessReportSchedule
s {$sel:scheduleName:BusinessReportSchedule' :: Maybe Text
scheduleName = Maybe Text
a} :: BusinessReportSchedule)
businessReportSchedule_scheduleArn :: Lens.Lens' BusinessReportSchedule (Prelude.Maybe Prelude.Text)
businessReportSchedule_scheduleArn :: (Maybe Text -> f (Maybe Text))
-> BusinessReportSchedule -> f BusinessReportSchedule
businessReportSchedule_scheduleArn = (BusinessReportSchedule -> Maybe Text)
-> (BusinessReportSchedule -> Maybe Text -> BusinessReportSchedule)
-> Lens
BusinessReportSchedule
BusinessReportSchedule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessReportSchedule' {Maybe Text
scheduleArn :: Maybe Text
$sel:scheduleArn:BusinessReportSchedule' :: BusinessReportSchedule -> Maybe Text
scheduleArn} -> Maybe Text
scheduleArn) (\s :: BusinessReportSchedule
s@BusinessReportSchedule' {} Maybe Text
a -> BusinessReportSchedule
s {$sel:scheduleArn:BusinessReportSchedule' :: Maybe Text
scheduleArn = Maybe Text
a} :: BusinessReportSchedule)
businessReportSchedule_contentRange :: Lens.Lens' BusinessReportSchedule (Prelude.Maybe BusinessReportContentRange)
businessReportSchedule_contentRange :: (Maybe BusinessReportContentRange
-> f (Maybe BusinessReportContentRange))
-> BusinessReportSchedule -> f BusinessReportSchedule
businessReportSchedule_contentRange = (BusinessReportSchedule -> Maybe BusinessReportContentRange)
-> (BusinessReportSchedule
-> Maybe BusinessReportContentRange -> BusinessReportSchedule)
-> Lens
BusinessReportSchedule
BusinessReportSchedule
(Maybe BusinessReportContentRange)
(Maybe BusinessReportContentRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessReportSchedule' {Maybe BusinessReportContentRange
contentRange :: Maybe BusinessReportContentRange
$sel:contentRange:BusinessReportSchedule' :: BusinessReportSchedule -> Maybe BusinessReportContentRange
contentRange} -> Maybe BusinessReportContentRange
contentRange) (\s :: BusinessReportSchedule
s@BusinessReportSchedule' {} Maybe BusinessReportContentRange
a -> BusinessReportSchedule
s {$sel:contentRange:BusinessReportSchedule' :: Maybe BusinessReportContentRange
contentRange = Maybe BusinessReportContentRange
a} :: BusinessReportSchedule)
businessReportSchedule_s3BucketName :: Lens.Lens' BusinessReportSchedule (Prelude.Maybe Prelude.Text)
businessReportSchedule_s3BucketName :: (Maybe Text -> f (Maybe Text))
-> BusinessReportSchedule -> f BusinessReportSchedule
businessReportSchedule_s3BucketName = (BusinessReportSchedule -> Maybe Text)
-> (BusinessReportSchedule -> Maybe Text -> BusinessReportSchedule)
-> Lens
BusinessReportSchedule
BusinessReportSchedule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessReportSchedule' {Maybe Text
s3BucketName :: Maybe Text
$sel:s3BucketName:BusinessReportSchedule' :: BusinessReportSchedule -> Maybe Text
s3BucketName} -> Maybe Text
s3BucketName) (\s :: BusinessReportSchedule
s@BusinessReportSchedule' {} Maybe Text
a -> BusinessReportSchedule
s {$sel:s3BucketName:BusinessReportSchedule' :: Maybe Text
s3BucketName = Maybe Text
a} :: BusinessReportSchedule)
instance Core.FromJSON BusinessReportSchedule where
parseJSON :: Value -> Parser BusinessReportSchedule
parseJSON =
String
-> (Object -> Parser BusinessReportSchedule)
-> Value
-> Parser BusinessReportSchedule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BusinessReportSchedule"
( \Object
x ->
Maybe Text
-> Maybe BusinessReport
-> Maybe BusinessReportFormat
-> Maybe BusinessReportRecurrence
-> Maybe Text
-> Maybe Text
-> Maybe BusinessReportContentRange
-> Maybe Text
-> BusinessReportSchedule
BusinessReportSchedule'
(Maybe Text
-> Maybe BusinessReport
-> Maybe BusinessReportFormat
-> Maybe BusinessReportRecurrence
-> Maybe Text
-> Maybe Text
-> Maybe BusinessReportContentRange
-> Maybe Text
-> BusinessReportSchedule)
-> Parser (Maybe Text)
-> Parser
(Maybe BusinessReport
-> Maybe BusinessReportFormat
-> Maybe BusinessReportRecurrence
-> Maybe Text
-> Maybe Text
-> Maybe BusinessReportContentRange
-> Maybe Text
-> BusinessReportSchedule)
forall (f :: * -> *) a b. Functor 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
"S3KeyPrefix")
Parser
(Maybe BusinessReport
-> Maybe BusinessReportFormat
-> Maybe BusinessReportRecurrence
-> Maybe Text
-> Maybe Text
-> Maybe BusinessReportContentRange
-> Maybe Text
-> BusinessReportSchedule)
-> Parser (Maybe BusinessReport)
-> Parser
(Maybe BusinessReportFormat
-> Maybe BusinessReportRecurrence
-> Maybe Text
-> Maybe Text
-> Maybe BusinessReportContentRange
-> Maybe Text
-> BusinessReportSchedule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BusinessReport)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastBusinessReport")
Parser
(Maybe BusinessReportFormat
-> Maybe BusinessReportRecurrence
-> Maybe Text
-> Maybe Text
-> Maybe BusinessReportContentRange
-> Maybe Text
-> BusinessReportSchedule)
-> Parser (Maybe BusinessReportFormat)
-> Parser
(Maybe BusinessReportRecurrence
-> Maybe Text
-> Maybe Text
-> Maybe BusinessReportContentRange
-> Maybe Text
-> BusinessReportSchedule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BusinessReportFormat)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Format")
Parser
(Maybe BusinessReportRecurrence
-> Maybe Text
-> Maybe Text
-> Maybe BusinessReportContentRange
-> Maybe Text
-> BusinessReportSchedule)
-> Parser (Maybe BusinessReportRecurrence)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe BusinessReportContentRange
-> Maybe Text
-> BusinessReportSchedule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BusinessReportRecurrence)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Recurrence")
Parser
(Maybe Text
-> Maybe Text
-> Maybe BusinessReportContentRange
-> Maybe Text
-> BusinessReportSchedule)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe BusinessReportContentRange
-> Maybe Text
-> BusinessReportSchedule)
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
"ScheduleName")
Parser
(Maybe Text
-> Maybe BusinessReportContentRange
-> Maybe Text
-> BusinessReportSchedule)
-> Parser (Maybe Text)
-> Parser
(Maybe BusinessReportContentRange
-> Maybe Text -> BusinessReportSchedule)
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
"ScheduleArn")
Parser
(Maybe BusinessReportContentRange
-> Maybe Text -> BusinessReportSchedule)
-> Parser (Maybe BusinessReportContentRange)
-> Parser (Maybe Text -> BusinessReportSchedule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BusinessReportContentRange)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ContentRange")
Parser (Maybe Text -> BusinessReportSchedule)
-> Parser (Maybe Text) -> Parser BusinessReportSchedule
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
"S3BucketName")
)
instance Prelude.Hashable BusinessReportSchedule
instance Prelude.NFData BusinessReportSchedule