{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.UpdateBusinessReportSchedule
-- 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)
--
-- Updates the configuration of the report delivery schedule with the
-- specified schedule ARN.
module Amazonka.AlexaBusiness.UpdateBusinessReportSchedule
  ( -- * Creating a Request
    UpdateBusinessReportSchedule (..),
    newUpdateBusinessReportSchedule,

    -- * Request Lenses
    updateBusinessReportSchedule_s3KeyPrefix,
    updateBusinessReportSchedule_format,
    updateBusinessReportSchedule_recurrence,
    updateBusinessReportSchedule_scheduleName,
    updateBusinessReportSchedule_s3BucketName,
    updateBusinessReportSchedule_scheduleArn,

    -- * Destructuring the Response
    UpdateBusinessReportScheduleResponse (..),
    newUpdateBusinessReportScheduleResponse,

    -- * Response Lenses
    updateBusinessReportScheduleResponse_httpStatus,
  )
where

import Amazonka.AlexaBusiness.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateBusinessReportSchedule' smart constructor.
data UpdateBusinessReportSchedule = UpdateBusinessReportSchedule'
  { -- | The S3 key where the report is delivered.
    UpdateBusinessReportSchedule -> Maybe Text
s3KeyPrefix :: Prelude.Maybe Prelude.Text,
    -- | The format of the generated report (individual CSV files or zipped files
    -- of individual files).
    UpdateBusinessReportSchedule -> Maybe BusinessReportFormat
format :: Prelude.Maybe BusinessReportFormat,
    -- | The recurrence of the reports.
    UpdateBusinessReportSchedule -> Maybe BusinessReportRecurrence
recurrence :: Prelude.Maybe BusinessReportRecurrence,
    -- | The name identifier of the schedule.
    UpdateBusinessReportSchedule -> Maybe Text
scheduleName :: Prelude.Maybe Prelude.Text,
    -- | The S3 location of the output reports.
    UpdateBusinessReportSchedule -> Maybe Text
s3BucketName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the business report schedule.
    UpdateBusinessReportSchedule -> Text
scheduleArn :: Prelude.Text
  }
  deriving (UpdateBusinessReportSchedule
-> UpdateBusinessReportSchedule -> Bool
(UpdateBusinessReportSchedule
 -> UpdateBusinessReportSchedule -> Bool)
-> (UpdateBusinessReportSchedule
    -> UpdateBusinessReportSchedule -> Bool)
-> Eq UpdateBusinessReportSchedule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBusinessReportSchedule
-> UpdateBusinessReportSchedule -> Bool
$c/= :: UpdateBusinessReportSchedule
-> UpdateBusinessReportSchedule -> Bool
== :: UpdateBusinessReportSchedule
-> UpdateBusinessReportSchedule -> Bool
$c== :: UpdateBusinessReportSchedule
-> UpdateBusinessReportSchedule -> Bool
Prelude.Eq, ReadPrec [UpdateBusinessReportSchedule]
ReadPrec UpdateBusinessReportSchedule
Int -> ReadS UpdateBusinessReportSchedule
ReadS [UpdateBusinessReportSchedule]
(Int -> ReadS UpdateBusinessReportSchedule)
-> ReadS [UpdateBusinessReportSchedule]
-> ReadPrec UpdateBusinessReportSchedule
-> ReadPrec [UpdateBusinessReportSchedule]
-> Read UpdateBusinessReportSchedule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateBusinessReportSchedule]
$creadListPrec :: ReadPrec [UpdateBusinessReportSchedule]
readPrec :: ReadPrec UpdateBusinessReportSchedule
$creadPrec :: ReadPrec UpdateBusinessReportSchedule
readList :: ReadS [UpdateBusinessReportSchedule]
$creadList :: ReadS [UpdateBusinessReportSchedule]
readsPrec :: Int -> ReadS UpdateBusinessReportSchedule
$creadsPrec :: Int -> ReadS UpdateBusinessReportSchedule
Prelude.Read, Int -> UpdateBusinessReportSchedule -> ShowS
[UpdateBusinessReportSchedule] -> ShowS
UpdateBusinessReportSchedule -> String
(Int -> UpdateBusinessReportSchedule -> ShowS)
-> (UpdateBusinessReportSchedule -> String)
-> ([UpdateBusinessReportSchedule] -> ShowS)
-> Show UpdateBusinessReportSchedule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBusinessReportSchedule] -> ShowS
$cshowList :: [UpdateBusinessReportSchedule] -> ShowS
show :: UpdateBusinessReportSchedule -> String
$cshow :: UpdateBusinessReportSchedule -> String
showsPrec :: Int -> UpdateBusinessReportSchedule -> ShowS
$cshowsPrec :: Int -> UpdateBusinessReportSchedule -> ShowS
Prelude.Show, (forall x.
 UpdateBusinessReportSchedule -> Rep UpdateBusinessReportSchedule x)
-> (forall x.
    Rep UpdateBusinessReportSchedule x -> UpdateBusinessReportSchedule)
-> Generic UpdateBusinessReportSchedule
forall x.
Rep UpdateBusinessReportSchedule x -> UpdateBusinessReportSchedule
forall x.
UpdateBusinessReportSchedule -> Rep UpdateBusinessReportSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateBusinessReportSchedule x -> UpdateBusinessReportSchedule
$cfrom :: forall x.
UpdateBusinessReportSchedule -> Rep UpdateBusinessReportSchedule x
Prelude.Generic)

-- |
-- Create a value of 'UpdateBusinessReportSchedule' 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', 'updateBusinessReportSchedule_s3KeyPrefix' - The S3 key where the report is delivered.
--
-- 'format', 'updateBusinessReportSchedule_format' - The format of the generated report (individual CSV files or zipped files
-- of individual files).
--
-- 'recurrence', 'updateBusinessReportSchedule_recurrence' - The recurrence of the reports.
--
-- 'scheduleName', 'updateBusinessReportSchedule_scheduleName' - The name identifier of the schedule.
--
-- 's3BucketName', 'updateBusinessReportSchedule_s3BucketName' - The S3 location of the output reports.
--
-- 'scheduleArn', 'updateBusinessReportSchedule_scheduleArn' - The ARN of the business report schedule.
newUpdateBusinessReportSchedule ::
  -- | 'scheduleArn'
  Prelude.Text ->
  UpdateBusinessReportSchedule
newUpdateBusinessReportSchedule :: Text -> UpdateBusinessReportSchedule
newUpdateBusinessReportSchedule Text
pScheduleArn_ =
  UpdateBusinessReportSchedule' :: Maybe Text
-> Maybe BusinessReportFormat
-> Maybe BusinessReportRecurrence
-> Maybe Text
-> Maybe Text
-> Text
-> UpdateBusinessReportSchedule
UpdateBusinessReportSchedule'
    { $sel:s3KeyPrefix:UpdateBusinessReportSchedule' :: Maybe Text
s3KeyPrefix =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:format:UpdateBusinessReportSchedule' :: Maybe BusinessReportFormat
format = Maybe BusinessReportFormat
forall a. Maybe a
Prelude.Nothing,
      $sel:recurrence:UpdateBusinessReportSchedule' :: Maybe BusinessReportRecurrence
recurrence = Maybe BusinessReportRecurrence
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduleName:UpdateBusinessReportSchedule' :: Maybe Text
scheduleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:s3BucketName:UpdateBusinessReportSchedule' :: Maybe Text
s3BucketName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduleArn:UpdateBusinessReportSchedule' :: Text
scheduleArn = Text
pScheduleArn_
    }

-- | The S3 key where the report is delivered.
updateBusinessReportSchedule_s3KeyPrefix :: Lens.Lens' UpdateBusinessReportSchedule (Prelude.Maybe Prelude.Text)
updateBusinessReportSchedule_s3KeyPrefix :: (Maybe Text -> f (Maybe Text))
-> UpdateBusinessReportSchedule -> f UpdateBusinessReportSchedule
updateBusinessReportSchedule_s3KeyPrefix = (UpdateBusinessReportSchedule -> Maybe Text)
-> (UpdateBusinessReportSchedule
    -> Maybe Text -> UpdateBusinessReportSchedule)
-> Lens
     UpdateBusinessReportSchedule
     UpdateBusinessReportSchedule
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBusinessReportSchedule' {Maybe Text
s3KeyPrefix :: Maybe Text
$sel:s3KeyPrefix:UpdateBusinessReportSchedule' :: UpdateBusinessReportSchedule -> Maybe Text
s3KeyPrefix} -> Maybe Text
s3KeyPrefix) (\s :: UpdateBusinessReportSchedule
s@UpdateBusinessReportSchedule' {} Maybe Text
a -> UpdateBusinessReportSchedule
s {$sel:s3KeyPrefix:UpdateBusinessReportSchedule' :: Maybe Text
s3KeyPrefix = Maybe Text
a} :: UpdateBusinessReportSchedule)

-- | The format of the generated report (individual CSV files or zipped files
-- of individual files).
updateBusinessReportSchedule_format :: Lens.Lens' UpdateBusinessReportSchedule (Prelude.Maybe BusinessReportFormat)
updateBusinessReportSchedule_format :: (Maybe BusinessReportFormat -> f (Maybe BusinessReportFormat))
-> UpdateBusinessReportSchedule -> f UpdateBusinessReportSchedule
updateBusinessReportSchedule_format = (UpdateBusinessReportSchedule -> Maybe BusinessReportFormat)
-> (UpdateBusinessReportSchedule
    -> Maybe BusinessReportFormat -> UpdateBusinessReportSchedule)
-> Lens
     UpdateBusinessReportSchedule
     UpdateBusinessReportSchedule
     (Maybe BusinessReportFormat)
     (Maybe BusinessReportFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBusinessReportSchedule' {Maybe BusinessReportFormat
format :: Maybe BusinessReportFormat
$sel:format:UpdateBusinessReportSchedule' :: UpdateBusinessReportSchedule -> Maybe BusinessReportFormat
format} -> Maybe BusinessReportFormat
format) (\s :: UpdateBusinessReportSchedule
s@UpdateBusinessReportSchedule' {} Maybe BusinessReportFormat
a -> UpdateBusinessReportSchedule
s {$sel:format:UpdateBusinessReportSchedule' :: Maybe BusinessReportFormat
format = Maybe BusinessReportFormat
a} :: UpdateBusinessReportSchedule)

-- | The recurrence of the reports.
updateBusinessReportSchedule_recurrence :: Lens.Lens' UpdateBusinessReportSchedule (Prelude.Maybe BusinessReportRecurrence)
updateBusinessReportSchedule_recurrence :: (Maybe BusinessReportRecurrence
 -> f (Maybe BusinessReportRecurrence))
-> UpdateBusinessReportSchedule -> f UpdateBusinessReportSchedule
updateBusinessReportSchedule_recurrence = (UpdateBusinessReportSchedule -> Maybe BusinessReportRecurrence)
-> (UpdateBusinessReportSchedule
    -> Maybe BusinessReportRecurrence -> UpdateBusinessReportSchedule)
-> Lens
     UpdateBusinessReportSchedule
     UpdateBusinessReportSchedule
     (Maybe BusinessReportRecurrence)
     (Maybe BusinessReportRecurrence)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBusinessReportSchedule' {Maybe BusinessReportRecurrence
recurrence :: Maybe BusinessReportRecurrence
$sel:recurrence:UpdateBusinessReportSchedule' :: UpdateBusinessReportSchedule -> Maybe BusinessReportRecurrence
recurrence} -> Maybe BusinessReportRecurrence
recurrence) (\s :: UpdateBusinessReportSchedule
s@UpdateBusinessReportSchedule' {} Maybe BusinessReportRecurrence
a -> UpdateBusinessReportSchedule
s {$sel:recurrence:UpdateBusinessReportSchedule' :: Maybe BusinessReportRecurrence
recurrence = Maybe BusinessReportRecurrence
a} :: UpdateBusinessReportSchedule)

-- | The name identifier of the schedule.
updateBusinessReportSchedule_scheduleName :: Lens.Lens' UpdateBusinessReportSchedule (Prelude.Maybe Prelude.Text)
updateBusinessReportSchedule_scheduleName :: (Maybe Text -> f (Maybe Text))
-> UpdateBusinessReportSchedule -> f UpdateBusinessReportSchedule
updateBusinessReportSchedule_scheduleName = (UpdateBusinessReportSchedule -> Maybe Text)
-> (UpdateBusinessReportSchedule
    -> Maybe Text -> UpdateBusinessReportSchedule)
-> Lens
     UpdateBusinessReportSchedule
     UpdateBusinessReportSchedule
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBusinessReportSchedule' {Maybe Text
scheduleName :: Maybe Text
$sel:scheduleName:UpdateBusinessReportSchedule' :: UpdateBusinessReportSchedule -> Maybe Text
scheduleName} -> Maybe Text
scheduleName) (\s :: UpdateBusinessReportSchedule
s@UpdateBusinessReportSchedule' {} Maybe Text
a -> UpdateBusinessReportSchedule
s {$sel:scheduleName:UpdateBusinessReportSchedule' :: Maybe Text
scheduleName = Maybe Text
a} :: UpdateBusinessReportSchedule)

-- | The S3 location of the output reports.
updateBusinessReportSchedule_s3BucketName :: Lens.Lens' UpdateBusinessReportSchedule (Prelude.Maybe Prelude.Text)
updateBusinessReportSchedule_s3BucketName :: (Maybe Text -> f (Maybe Text))
-> UpdateBusinessReportSchedule -> f UpdateBusinessReportSchedule
updateBusinessReportSchedule_s3BucketName = (UpdateBusinessReportSchedule -> Maybe Text)
-> (UpdateBusinessReportSchedule
    -> Maybe Text -> UpdateBusinessReportSchedule)
-> Lens
     UpdateBusinessReportSchedule
     UpdateBusinessReportSchedule
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBusinessReportSchedule' {Maybe Text
s3BucketName :: Maybe Text
$sel:s3BucketName:UpdateBusinessReportSchedule' :: UpdateBusinessReportSchedule -> Maybe Text
s3BucketName} -> Maybe Text
s3BucketName) (\s :: UpdateBusinessReportSchedule
s@UpdateBusinessReportSchedule' {} Maybe Text
a -> UpdateBusinessReportSchedule
s {$sel:s3BucketName:UpdateBusinessReportSchedule' :: Maybe Text
s3BucketName = Maybe Text
a} :: UpdateBusinessReportSchedule)

-- | The ARN of the business report schedule.
updateBusinessReportSchedule_scheduleArn :: Lens.Lens' UpdateBusinessReportSchedule Prelude.Text
updateBusinessReportSchedule_scheduleArn :: (Text -> f Text)
-> UpdateBusinessReportSchedule -> f UpdateBusinessReportSchedule
updateBusinessReportSchedule_scheduleArn = (UpdateBusinessReportSchedule -> Text)
-> (UpdateBusinessReportSchedule
    -> Text -> UpdateBusinessReportSchedule)
-> Lens
     UpdateBusinessReportSchedule UpdateBusinessReportSchedule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBusinessReportSchedule' {Text
scheduleArn :: Text
$sel:scheduleArn:UpdateBusinessReportSchedule' :: UpdateBusinessReportSchedule -> Text
scheduleArn} -> Text
scheduleArn) (\s :: UpdateBusinessReportSchedule
s@UpdateBusinessReportSchedule' {} Text
a -> UpdateBusinessReportSchedule
s {$sel:scheduleArn:UpdateBusinessReportSchedule' :: Text
scheduleArn = Text
a} :: UpdateBusinessReportSchedule)

instance Core.AWSRequest UpdateBusinessReportSchedule where
  type
    AWSResponse UpdateBusinessReportSchedule =
      UpdateBusinessReportScheduleResponse
  request :: UpdateBusinessReportSchedule
-> Request UpdateBusinessReportSchedule
request = Service
-> UpdateBusinessReportSchedule
-> Request UpdateBusinessReportSchedule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateBusinessReportSchedule
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateBusinessReportSchedule)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse UpdateBusinessReportSchedule))
-> Logger
-> Service
-> Proxy UpdateBusinessReportSchedule
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateBusinessReportSchedule)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateBusinessReportScheduleResponse
UpdateBusinessReportScheduleResponse'
            (Int -> UpdateBusinessReportScheduleResponse)
-> Either String Int
-> Either String UpdateBusinessReportScheduleResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    UpdateBusinessReportSchedule

instance Prelude.NFData UpdateBusinessReportSchedule

instance Core.ToHeaders UpdateBusinessReportSchedule where
  toHeaders :: UpdateBusinessReportSchedule -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateBusinessReportSchedule -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AlexaForBusiness.UpdateBusinessReportSchedule" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateBusinessReportSchedule where
  toJSON :: UpdateBusinessReportSchedule -> Value
toJSON UpdateBusinessReportSchedule' {Maybe Text
Maybe BusinessReportFormat
Maybe BusinessReportRecurrence
Text
scheduleArn :: Text
s3BucketName :: Maybe Text
scheduleName :: Maybe Text
recurrence :: Maybe BusinessReportRecurrence
format :: Maybe BusinessReportFormat
s3KeyPrefix :: Maybe Text
$sel:scheduleArn:UpdateBusinessReportSchedule' :: UpdateBusinessReportSchedule -> Text
$sel:s3BucketName:UpdateBusinessReportSchedule' :: UpdateBusinessReportSchedule -> Maybe Text
$sel:scheduleName:UpdateBusinessReportSchedule' :: UpdateBusinessReportSchedule -> Maybe Text
$sel:recurrence:UpdateBusinessReportSchedule' :: UpdateBusinessReportSchedule -> Maybe BusinessReportRecurrence
$sel:format:UpdateBusinessReportSchedule' :: UpdateBusinessReportSchedule -> Maybe BusinessReportFormat
$sel:s3KeyPrefix:UpdateBusinessReportSchedule' :: UpdateBusinessReportSchedule -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"S3KeyPrefix" 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
s3KeyPrefix,
            (Text
"Format" Text -> BusinessReportFormat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (BusinessReportFormat -> Pair)
-> Maybe BusinessReportFormat -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BusinessReportFormat
format,
            (Text
"Recurrence" Text -> BusinessReportRecurrence -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (BusinessReportRecurrence -> Pair)
-> Maybe BusinessReportRecurrence -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BusinessReportRecurrence
recurrence,
            (Text
"ScheduleName" 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
scheduleName,
            (Text
"S3BucketName" 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
s3BucketName,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ScheduleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
scheduleArn)
          ]
      )

instance Core.ToPath UpdateBusinessReportSchedule where
  toPath :: UpdateBusinessReportSchedule -> ByteString
toPath = ByteString -> UpdateBusinessReportSchedule -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery UpdateBusinessReportSchedule where
  toQuery :: UpdateBusinessReportSchedule -> QueryString
toQuery = QueryString -> UpdateBusinessReportSchedule -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateBusinessReportScheduleResponse' smart constructor.
data UpdateBusinessReportScheduleResponse = UpdateBusinessReportScheduleResponse'
  { -- | The response's http status code.
    UpdateBusinessReportScheduleResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateBusinessReportScheduleResponse
-> UpdateBusinessReportScheduleResponse -> Bool
(UpdateBusinessReportScheduleResponse
 -> UpdateBusinessReportScheduleResponse -> Bool)
-> (UpdateBusinessReportScheduleResponse
    -> UpdateBusinessReportScheduleResponse -> Bool)
-> Eq UpdateBusinessReportScheduleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateBusinessReportScheduleResponse
-> UpdateBusinessReportScheduleResponse -> Bool
$c/= :: UpdateBusinessReportScheduleResponse
-> UpdateBusinessReportScheduleResponse -> Bool
== :: UpdateBusinessReportScheduleResponse
-> UpdateBusinessReportScheduleResponse -> Bool
$c== :: UpdateBusinessReportScheduleResponse
-> UpdateBusinessReportScheduleResponse -> Bool
Prelude.Eq, ReadPrec [UpdateBusinessReportScheduleResponse]
ReadPrec UpdateBusinessReportScheduleResponse
Int -> ReadS UpdateBusinessReportScheduleResponse
ReadS [UpdateBusinessReportScheduleResponse]
(Int -> ReadS UpdateBusinessReportScheduleResponse)
-> ReadS [UpdateBusinessReportScheduleResponse]
-> ReadPrec UpdateBusinessReportScheduleResponse
-> ReadPrec [UpdateBusinessReportScheduleResponse]
-> Read UpdateBusinessReportScheduleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateBusinessReportScheduleResponse]
$creadListPrec :: ReadPrec [UpdateBusinessReportScheduleResponse]
readPrec :: ReadPrec UpdateBusinessReportScheduleResponse
$creadPrec :: ReadPrec UpdateBusinessReportScheduleResponse
readList :: ReadS [UpdateBusinessReportScheduleResponse]
$creadList :: ReadS [UpdateBusinessReportScheduleResponse]
readsPrec :: Int -> ReadS UpdateBusinessReportScheduleResponse
$creadsPrec :: Int -> ReadS UpdateBusinessReportScheduleResponse
Prelude.Read, Int -> UpdateBusinessReportScheduleResponse -> ShowS
[UpdateBusinessReportScheduleResponse] -> ShowS
UpdateBusinessReportScheduleResponse -> String
(Int -> UpdateBusinessReportScheduleResponse -> ShowS)
-> (UpdateBusinessReportScheduleResponse -> String)
-> ([UpdateBusinessReportScheduleResponse] -> ShowS)
-> Show UpdateBusinessReportScheduleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateBusinessReportScheduleResponse] -> ShowS
$cshowList :: [UpdateBusinessReportScheduleResponse] -> ShowS
show :: UpdateBusinessReportScheduleResponse -> String
$cshow :: UpdateBusinessReportScheduleResponse -> String
showsPrec :: Int -> UpdateBusinessReportScheduleResponse -> ShowS
$cshowsPrec :: Int -> UpdateBusinessReportScheduleResponse -> ShowS
Prelude.Show, (forall x.
 UpdateBusinessReportScheduleResponse
 -> Rep UpdateBusinessReportScheduleResponse x)
-> (forall x.
    Rep UpdateBusinessReportScheduleResponse x
    -> UpdateBusinessReportScheduleResponse)
-> Generic UpdateBusinessReportScheduleResponse
forall x.
Rep UpdateBusinessReportScheduleResponse x
-> UpdateBusinessReportScheduleResponse
forall x.
UpdateBusinessReportScheduleResponse
-> Rep UpdateBusinessReportScheduleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateBusinessReportScheduleResponse x
-> UpdateBusinessReportScheduleResponse
$cfrom :: forall x.
UpdateBusinessReportScheduleResponse
-> Rep UpdateBusinessReportScheduleResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateBusinessReportScheduleResponse' 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:
--
-- 'httpStatus', 'updateBusinessReportScheduleResponse_httpStatus' - The response's http status code.
newUpdateBusinessReportScheduleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateBusinessReportScheduleResponse
newUpdateBusinessReportScheduleResponse :: Int -> UpdateBusinessReportScheduleResponse
newUpdateBusinessReportScheduleResponse Int
pHttpStatus_ =
  UpdateBusinessReportScheduleResponse' :: Int -> UpdateBusinessReportScheduleResponse
UpdateBusinessReportScheduleResponse'
    { $sel:httpStatus:UpdateBusinessReportScheduleResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

-- | The response's http status code.
updateBusinessReportScheduleResponse_httpStatus :: Lens.Lens' UpdateBusinessReportScheduleResponse Prelude.Int
updateBusinessReportScheduleResponse_httpStatus :: (Int -> f Int)
-> UpdateBusinessReportScheduleResponse
-> f UpdateBusinessReportScheduleResponse
updateBusinessReportScheduleResponse_httpStatus = (UpdateBusinessReportScheduleResponse -> Int)
-> (UpdateBusinessReportScheduleResponse
    -> Int -> UpdateBusinessReportScheduleResponse)
-> Lens
     UpdateBusinessReportScheduleResponse
     UpdateBusinessReportScheduleResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateBusinessReportScheduleResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateBusinessReportScheduleResponse' :: UpdateBusinessReportScheduleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateBusinessReportScheduleResponse
s@UpdateBusinessReportScheduleResponse' {} Int
a -> UpdateBusinessReportScheduleResponse
s {$sel:httpStatus:UpdateBusinessReportScheduleResponse' :: Int
httpStatus = Int
a} :: UpdateBusinessReportScheduleResponse)

instance
  Prelude.NFData
    UpdateBusinessReportScheduleResponse