{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AlexaBusiness.Types.BusinessReportSchedule
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | The schedule of the usage report.
--
-- /See:/ 'newBusinessReportSchedule' smart constructor.
data BusinessReportSchedule = BusinessReportSchedule'
  { -- | The S3 key where the report is delivered.
    BusinessReportSchedule -> Maybe Text
s3KeyPrefix :: Prelude.Maybe Prelude.Text,
    -- | The details of the last business report delivery for a specified time
    -- interval.
    BusinessReportSchedule -> Maybe BusinessReport
lastBusinessReport :: Prelude.Maybe BusinessReport,
    -- | The format of the generated report (individual CSV files or zipped files
    -- of individual files).
    BusinessReportSchedule -> Maybe BusinessReportFormat
format :: Prelude.Maybe BusinessReportFormat,
    -- | The recurrence of the reports.
    BusinessReportSchedule -> Maybe BusinessReportRecurrence
recurrence :: Prelude.Maybe BusinessReportRecurrence,
    -- | The name identifier of the schedule.
    BusinessReportSchedule -> Maybe Text
scheduleName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the business report schedule.
    BusinessReportSchedule -> Maybe Text
scheduleArn :: Prelude.Maybe Prelude.Text,
    -- | The content range of the reports.
    BusinessReportSchedule -> Maybe BusinessReportContentRange
contentRange :: Prelude.Maybe BusinessReportContentRange,
    -- | The S3 bucket name of the output reports.
    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)

-- |
-- Create a value of 'BusinessReportSchedule' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 's3KeyPrefix', 'businessReportSchedule_s3KeyPrefix' - The S3 key where the report is delivered.
--
-- 'lastBusinessReport', 'businessReportSchedule_lastBusinessReport' - The details of the last business report delivery for a specified time
-- interval.
--
-- 'format', 'businessReportSchedule_format' - The format of the generated report (individual CSV files or zipped files
-- of individual files).
--
-- 'recurrence', 'businessReportSchedule_recurrence' - The recurrence of the reports.
--
-- 'scheduleName', 'businessReportSchedule_scheduleName' - The name identifier of the schedule.
--
-- 'scheduleArn', 'businessReportSchedule_scheduleArn' - The ARN of the business report schedule.
--
-- 'contentRange', 'businessReportSchedule_contentRange' - The content range of the reports.
--
-- 's3BucketName', 'businessReportSchedule_s3BucketName' - The S3 bucket name of the output reports.
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
    }

-- | The S3 key where the report is delivered.
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)

-- | The details of the last business report delivery for a specified time
-- interval.
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)

-- | The format of the generated report (individual CSV files or zipped files
-- of individual files).
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)

-- | The recurrence of the reports.
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)

-- | The name identifier of the schedule.
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)

-- | The ARN of the business report schedule.
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)

-- | The content range of the reports.
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)

-- | The S3 bucket name of the output reports.
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