{-# 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.MediaLive.BatchUpdateSchedule
-- 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)
--
-- Update a channel schedule
module Amazonka.MediaLive.BatchUpdateSchedule
  ( -- * Creating a Request
    BatchUpdateSchedule (..),
    newBatchUpdateSchedule,

    -- * Request Lenses
    batchUpdateSchedule_creates,
    batchUpdateSchedule_deletes,
    batchUpdateSchedule_channelId,

    -- * Destructuring the Response
    BatchUpdateScheduleResponse (..),
    newBatchUpdateScheduleResponse,

    -- * Response Lenses
    batchUpdateScheduleResponse_creates,
    batchUpdateScheduleResponse_deletes,
    batchUpdateScheduleResponse_httpStatus,
  )
where

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

-- | List of actions to create and list of actions to delete.
--
-- /See:/ 'newBatchUpdateSchedule' smart constructor.
data BatchUpdateSchedule = BatchUpdateSchedule'
  { -- | Schedule actions to create in the schedule.
    BatchUpdateSchedule -> Maybe BatchScheduleActionCreateRequest
creates :: Prelude.Maybe BatchScheduleActionCreateRequest,
    -- | Schedule actions to delete from the schedule.
    BatchUpdateSchedule -> Maybe BatchScheduleActionDeleteRequest
deletes :: Prelude.Maybe BatchScheduleActionDeleteRequest,
    -- | Id of the channel whose schedule is being updated.
    BatchUpdateSchedule -> Text
channelId :: Prelude.Text
  }
  deriving (BatchUpdateSchedule -> BatchUpdateSchedule -> Bool
(BatchUpdateSchedule -> BatchUpdateSchedule -> Bool)
-> (BatchUpdateSchedule -> BatchUpdateSchedule -> Bool)
-> Eq BatchUpdateSchedule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchUpdateSchedule -> BatchUpdateSchedule -> Bool
$c/= :: BatchUpdateSchedule -> BatchUpdateSchedule -> Bool
== :: BatchUpdateSchedule -> BatchUpdateSchedule -> Bool
$c== :: BatchUpdateSchedule -> BatchUpdateSchedule -> Bool
Prelude.Eq, ReadPrec [BatchUpdateSchedule]
ReadPrec BatchUpdateSchedule
Int -> ReadS BatchUpdateSchedule
ReadS [BatchUpdateSchedule]
(Int -> ReadS BatchUpdateSchedule)
-> ReadS [BatchUpdateSchedule]
-> ReadPrec BatchUpdateSchedule
-> ReadPrec [BatchUpdateSchedule]
-> Read BatchUpdateSchedule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchUpdateSchedule]
$creadListPrec :: ReadPrec [BatchUpdateSchedule]
readPrec :: ReadPrec BatchUpdateSchedule
$creadPrec :: ReadPrec BatchUpdateSchedule
readList :: ReadS [BatchUpdateSchedule]
$creadList :: ReadS [BatchUpdateSchedule]
readsPrec :: Int -> ReadS BatchUpdateSchedule
$creadsPrec :: Int -> ReadS BatchUpdateSchedule
Prelude.Read, Int -> BatchUpdateSchedule -> ShowS
[BatchUpdateSchedule] -> ShowS
BatchUpdateSchedule -> String
(Int -> BatchUpdateSchedule -> ShowS)
-> (BatchUpdateSchedule -> String)
-> ([BatchUpdateSchedule] -> ShowS)
-> Show BatchUpdateSchedule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchUpdateSchedule] -> ShowS
$cshowList :: [BatchUpdateSchedule] -> ShowS
show :: BatchUpdateSchedule -> String
$cshow :: BatchUpdateSchedule -> String
showsPrec :: Int -> BatchUpdateSchedule -> ShowS
$cshowsPrec :: Int -> BatchUpdateSchedule -> ShowS
Prelude.Show, (forall x. BatchUpdateSchedule -> Rep BatchUpdateSchedule x)
-> (forall x. Rep BatchUpdateSchedule x -> BatchUpdateSchedule)
-> Generic BatchUpdateSchedule
forall x. Rep BatchUpdateSchedule x -> BatchUpdateSchedule
forall x. BatchUpdateSchedule -> Rep BatchUpdateSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchUpdateSchedule x -> BatchUpdateSchedule
$cfrom :: forall x. BatchUpdateSchedule -> Rep BatchUpdateSchedule x
Prelude.Generic)

-- |
-- Create a value of 'BatchUpdateSchedule' 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:
--
-- 'creates', 'batchUpdateSchedule_creates' - Schedule actions to create in the schedule.
--
-- 'deletes', 'batchUpdateSchedule_deletes' - Schedule actions to delete from the schedule.
--
-- 'channelId', 'batchUpdateSchedule_channelId' - Id of the channel whose schedule is being updated.
newBatchUpdateSchedule ::
  -- | 'channelId'
  Prelude.Text ->
  BatchUpdateSchedule
newBatchUpdateSchedule :: Text -> BatchUpdateSchedule
newBatchUpdateSchedule Text
pChannelId_ =
  BatchUpdateSchedule' :: Maybe BatchScheduleActionCreateRequest
-> Maybe BatchScheduleActionDeleteRequest
-> Text
-> BatchUpdateSchedule
BatchUpdateSchedule'
    { $sel:creates:BatchUpdateSchedule' :: Maybe BatchScheduleActionCreateRequest
creates = Maybe BatchScheduleActionCreateRequest
forall a. Maybe a
Prelude.Nothing,
      $sel:deletes:BatchUpdateSchedule' :: Maybe BatchScheduleActionDeleteRequest
deletes = Maybe BatchScheduleActionDeleteRequest
forall a. Maybe a
Prelude.Nothing,
      $sel:channelId:BatchUpdateSchedule' :: Text
channelId = Text
pChannelId_
    }

-- | Schedule actions to create in the schedule.
batchUpdateSchedule_creates :: Lens.Lens' BatchUpdateSchedule (Prelude.Maybe BatchScheduleActionCreateRequest)
batchUpdateSchedule_creates :: (Maybe BatchScheduleActionCreateRequest
 -> f (Maybe BatchScheduleActionCreateRequest))
-> BatchUpdateSchedule -> f BatchUpdateSchedule
batchUpdateSchedule_creates = (BatchUpdateSchedule -> Maybe BatchScheduleActionCreateRequest)
-> (BatchUpdateSchedule
    -> Maybe BatchScheduleActionCreateRequest -> BatchUpdateSchedule)
-> Lens
     BatchUpdateSchedule
     BatchUpdateSchedule
     (Maybe BatchScheduleActionCreateRequest)
     (Maybe BatchScheduleActionCreateRequest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateSchedule' {Maybe BatchScheduleActionCreateRequest
creates :: Maybe BatchScheduleActionCreateRequest
$sel:creates:BatchUpdateSchedule' :: BatchUpdateSchedule -> Maybe BatchScheduleActionCreateRequest
creates} -> Maybe BatchScheduleActionCreateRequest
creates) (\s :: BatchUpdateSchedule
s@BatchUpdateSchedule' {} Maybe BatchScheduleActionCreateRequest
a -> BatchUpdateSchedule
s {$sel:creates:BatchUpdateSchedule' :: Maybe BatchScheduleActionCreateRequest
creates = Maybe BatchScheduleActionCreateRequest
a} :: BatchUpdateSchedule)

-- | Schedule actions to delete from the schedule.
batchUpdateSchedule_deletes :: Lens.Lens' BatchUpdateSchedule (Prelude.Maybe BatchScheduleActionDeleteRequest)
batchUpdateSchedule_deletes :: (Maybe BatchScheduleActionDeleteRequest
 -> f (Maybe BatchScheduleActionDeleteRequest))
-> BatchUpdateSchedule -> f BatchUpdateSchedule
batchUpdateSchedule_deletes = (BatchUpdateSchedule -> Maybe BatchScheduleActionDeleteRequest)
-> (BatchUpdateSchedule
    -> Maybe BatchScheduleActionDeleteRequest -> BatchUpdateSchedule)
-> Lens
     BatchUpdateSchedule
     BatchUpdateSchedule
     (Maybe BatchScheduleActionDeleteRequest)
     (Maybe BatchScheduleActionDeleteRequest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateSchedule' {Maybe BatchScheduleActionDeleteRequest
deletes :: Maybe BatchScheduleActionDeleteRequest
$sel:deletes:BatchUpdateSchedule' :: BatchUpdateSchedule -> Maybe BatchScheduleActionDeleteRequest
deletes} -> Maybe BatchScheduleActionDeleteRequest
deletes) (\s :: BatchUpdateSchedule
s@BatchUpdateSchedule' {} Maybe BatchScheduleActionDeleteRequest
a -> BatchUpdateSchedule
s {$sel:deletes:BatchUpdateSchedule' :: Maybe BatchScheduleActionDeleteRequest
deletes = Maybe BatchScheduleActionDeleteRequest
a} :: BatchUpdateSchedule)

-- | Id of the channel whose schedule is being updated.
batchUpdateSchedule_channelId :: Lens.Lens' BatchUpdateSchedule Prelude.Text
batchUpdateSchedule_channelId :: (Text -> f Text) -> BatchUpdateSchedule -> f BatchUpdateSchedule
batchUpdateSchedule_channelId = (BatchUpdateSchedule -> Text)
-> (BatchUpdateSchedule -> Text -> BatchUpdateSchedule)
-> Lens BatchUpdateSchedule BatchUpdateSchedule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateSchedule' {Text
channelId :: Text
$sel:channelId:BatchUpdateSchedule' :: BatchUpdateSchedule -> Text
channelId} -> Text
channelId) (\s :: BatchUpdateSchedule
s@BatchUpdateSchedule' {} Text
a -> BatchUpdateSchedule
s {$sel:channelId:BatchUpdateSchedule' :: Text
channelId = Text
a} :: BatchUpdateSchedule)

instance Core.AWSRequest BatchUpdateSchedule where
  type
    AWSResponse BatchUpdateSchedule =
      BatchUpdateScheduleResponse
  request :: BatchUpdateSchedule -> Request BatchUpdateSchedule
request = Service -> BatchUpdateSchedule -> Request BatchUpdateSchedule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy BatchUpdateSchedule
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchUpdateSchedule)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse BatchUpdateSchedule))
-> Logger
-> Service
-> Proxy BatchUpdateSchedule
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse BatchUpdateSchedule)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe BatchScheduleActionCreateResult
-> Maybe BatchScheduleActionDeleteResult
-> Int
-> BatchUpdateScheduleResponse
BatchUpdateScheduleResponse'
            (Maybe BatchScheduleActionCreateResult
 -> Maybe BatchScheduleActionDeleteResult
 -> Int
 -> BatchUpdateScheduleResponse)
-> Either String (Maybe BatchScheduleActionCreateResult)
-> Either
     String
     (Maybe BatchScheduleActionDeleteResult
      -> Int -> BatchUpdateScheduleResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe BatchScheduleActionCreateResult)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"creates")
            Either
  String
  (Maybe BatchScheduleActionDeleteResult
   -> Int -> BatchUpdateScheduleResponse)
-> Either String (Maybe BatchScheduleActionDeleteResult)
-> Either String (Int -> BatchUpdateScheduleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe BatchScheduleActionDeleteResult)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deletes")
            Either String (Int -> BatchUpdateScheduleResponse)
-> Either String Int -> Either String BatchUpdateScheduleResponse
forall (f :: * -> *) a b. Applicative f => 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 BatchUpdateSchedule

instance Prelude.NFData BatchUpdateSchedule

instance Core.ToHeaders BatchUpdateSchedule where
  toHeaders :: BatchUpdateSchedule -> ResponseHeaders
toHeaders =
    ResponseHeaders -> BatchUpdateSchedule -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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 BatchUpdateSchedule where
  toJSON :: BatchUpdateSchedule -> Value
toJSON BatchUpdateSchedule' {Maybe BatchScheduleActionDeleteRequest
Maybe BatchScheduleActionCreateRequest
Text
channelId :: Text
deletes :: Maybe BatchScheduleActionDeleteRequest
creates :: Maybe BatchScheduleActionCreateRequest
$sel:channelId:BatchUpdateSchedule' :: BatchUpdateSchedule -> Text
$sel:deletes:BatchUpdateSchedule' :: BatchUpdateSchedule -> Maybe BatchScheduleActionDeleteRequest
$sel:creates:BatchUpdateSchedule' :: BatchUpdateSchedule -> Maybe BatchScheduleActionCreateRequest
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"creates" Text -> BatchScheduleActionCreateRequest -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (BatchScheduleActionCreateRequest -> Pair)
-> Maybe BatchScheduleActionCreateRequest -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchScheduleActionCreateRequest
creates,
            (Text
"deletes" Text -> BatchScheduleActionDeleteRequest -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (BatchScheduleActionDeleteRequest -> Pair)
-> Maybe BatchScheduleActionDeleteRequest -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchScheduleActionDeleteRequest
deletes
          ]
      )

instance Core.ToPath BatchUpdateSchedule where
  toPath :: BatchUpdateSchedule -> ByteString
toPath BatchUpdateSchedule' {Maybe BatchScheduleActionDeleteRequest
Maybe BatchScheduleActionCreateRequest
Text
channelId :: Text
deletes :: Maybe BatchScheduleActionDeleteRequest
creates :: Maybe BatchScheduleActionCreateRequest
$sel:channelId:BatchUpdateSchedule' :: BatchUpdateSchedule -> Text
$sel:deletes:BatchUpdateSchedule' :: BatchUpdateSchedule -> Maybe BatchScheduleActionDeleteRequest
$sel:creates:BatchUpdateSchedule' :: BatchUpdateSchedule -> Maybe BatchScheduleActionCreateRequest
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/prod/channels/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
channelId, ByteString
"/schedule"]

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

-- | Placeholder documentation for BatchUpdateScheduleResponse
--
-- /See:/ 'newBatchUpdateScheduleResponse' smart constructor.
data BatchUpdateScheduleResponse = BatchUpdateScheduleResponse'
  { -- | Schedule actions created in the schedule.
    BatchUpdateScheduleResponse
-> Maybe BatchScheduleActionCreateResult
creates :: Prelude.Maybe BatchScheduleActionCreateResult,
    -- | Schedule actions deleted from the schedule.
    BatchUpdateScheduleResponse
-> Maybe BatchScheduleActionDeleteResult
deletes :: Prelude.Maybe BatchScheduleActionDeleteResult,
    -- | The response's http status code.
    BatchUpdateScheduleResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchUpdateScheduleResponse -> BatchUpdateScheduleResponse -> Bool
(BatchUpdateScheduleResponse
 -> BatchUpdateScheduleResponse -> Bool)
-> (BatchUpdateScheduleResponse
    -> BatchUpdateScheduleResponse -> Bool)
-> Eq BatchUpdateScheduleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchUpdateScheduleResponse -> BatchUpdateScheduleResponse -> Bool
$c/= :: BatchUpdateScheduleResponse -> BatchUpdateScheduleResponse -> Bool
== :: BatchUpdateScheduleResponse -> BatchUpdateScheduleResponse -> Bool
$c== :: BatchUpdateScheduleResponse -> BatchUpdateScheduleResponse -> Bool
Prelude.Eq, ReadPrec [BatchUpdateScheduleResponse]
ReadPrec BatchUpdateScheduleResponse
Int -> ReadS BatchUpdateScheduleResponse
ReadS [BatchUpdateScheduleResponse]
(Int -> ReadS BatchUpdateScheduleResponse)
-> ReadS [BatchUpdateScheduleResponse]
-> ReadPrec BatchUpdateScheduleResponse
-> ReadPrec [BatchUpdateScheduleResponse]
-> Read BatchUpdateScheduleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchUpdateScheduleResponse]
$creadListPrec :: ReadPrec [BatchUpdateScheduleResponse]
readPrec :: ReadPrec BatchUpdateScheduleResponse
$creadPrec :: ReadPrec BatchUpdateScheduleResponse
readList :: ReadS [BatchUpdateScheduleResponse]
$creadList :: ReadS [BatchUpdateScheduleResponse]
readsPrec :: Int -> ReadS BatchUpdateScheduleResponse
$creadsPrec :: Int -> ReadS BatchUpdateScheduleResponse
Prelude.Read, Int -> BatchUpdateScheduleResponse -> ShowS
[BatchUpdateScheduleResponse] -> ShowS
BatchUpdateScheduleResponse -> String
(Int -> BatchUpdateScheduleResponse -> ShowS)
-> (BatchUpdateScheduleResponse -> String)
-> ([BatchUpdateScheduleResponse] -> ShowS)
-> Show BatchUpdateScheduleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchUpdateScheduleResponse] -> ShowS
$cshowList :: [BatchUpdateScheduleResponse] -> ShowS
show :: BatchUpdateScheduleResponse -> String
$cshow :: BatchUpdateScheduleResponse -> String
showsPrec :: Int -> BatchUpdateScheduleResponse -> ShowS
$cshowsPrec :: Int -> BatchUpdateScheduleResponse -> ShowS
Prelude.Show, (forall x.
 BatchUpdateScheduleResponse -> Rep BatchUpdateScheduleResponse x)
-> (forall x.
    Rep BatchUpdateScheduleResponse x -> BatchUpdateScheduleResponse)
-> Generic BatchUpdateScheduleResponse
forall x.
Rep BatchUpdateScheduleResponse x -> BatchUpdateScheduleResponse
forall x.
BatchUpdateScheduleResponse -> Rep BatchUpdateScheduleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchUpdateScheduleResponse x -> BatchUpdateScheduleResponse
$cfrom :: forall x.
BatchUpdateScheduleResponse -> Rep BatchUpdateScheduleResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchUpdateScheduleResponse' 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:
--
-- 'creates', 'batchUpdateScheduleResponse_creates' - Schedule actions created in the schedule.
--
-- 'deletes', 'batchUpdateScheduleResponse_deletes' - Schedule actions deleted from the schedule.
--
-- 'httpStatus', 'batchUpdateScheduleResponse_httpStatus' - The response's http status code.
newBatchUpdateScheduleResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchUpdateScheduleResponse
newBatchUpdateScheduleResponse :: Int -> BatchUpdateScheduleResponse
newBatchUpdateScheduleResponse Int
pHttpStatus_ =
  BatchUpdateScheduleResponse' :: Maybe BatchScheduleActionCreateResult
-> Maybe BatchScheduleActionDeleteResult
-> Int
-> BatchUpdateScheduleResponse
BatchUpdateScheduleResponse'
    { $sel:creates:BatchUpdateScheduleResponse' :: Maybe BatchScheduleActionCreateResult
creates =
        Maybe BatchScheduleActionCreateResult
forall a. Maybe a
Prelude.Nothing,
      $sel:deletes:BatchUpdateScheduleResponse' :: Maybe BatchScheduleActionDeleteResult
deletes = Maybe BatchScheduleActionDeleteResult
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:BatchUpdateScheduleResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Schedule actions created in the schedule.
batchUpdateScheduleResponse_creates :: Lens.Lens' BatchUpdateScheduleResponse (Prelude.Maybe BatchScheduleActionCreateResult)
batchUpdateScheduleResponse_creates :: (Maybe BatchScheduleActionCreateResult
 -> f (Maybe BatchScheduleActionCreateResult))
-> BatchUpdateScheduleResponse -> f BatchUpdateScheduleResponse
batchUpdateScheduleResponse_creates = (BatchUpdateScheduleResponse
 -> Maybe BatchScheduleActionCreateResult)
-> (BatchUpdateScheduleResponse
    -> Maybe BatchScheduleActionCreateResult
    -> BatchUpdateScheduleResponse)
-> Lens
     BatchUpdateScheduleResponse
     BatchUpdateScheduleResponse
     (Maybe BatchScheduleActionCreateResult)
     (Maybe BatchScheduleActionCreateResult)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateScheduleResponse' {Maybe BatchScheduleActionCreateResult
creates :: Maybe BatchScheduleActionCreateResult
$sel:creates:BatchUpdateScheduleResponse' :: BatchUpdateScheduleResponse
-> Maybe BatchScheduleActionCreateResult
creates} -> Maybe BatchScheduleActionCreateResult
creates) (\s :: BatchUpdateScheduleResponse
s@BatchUpdateScheduleResponse' {} Maybe BatchScheduleActionCreateResult
a -> BatchUpdateScheduleResponse
s {$sel:creates:BatchUpdateScheduleResponse' :: Maybe BatchScheduleActionCreateResult
creates = Maybe BatchScheduleActionCreateResult
a} :: BatchUpdateScheduleResponse)

-- | Schedule actions deleted from the schedule.
batchUpdateScheduleResponse_deletes :: Lens.Lens' BatchUpdateScheduleResponse (Prelude.Maybe BatchScheduleActionDeleteResult)
batchUpdateScheduleResponse_deletes :: (Maybe BatchScheduleActionDeleteResult
 -> f (Maybe BatchScheduleActionDeleteResult))
-> BatchUpdateScheduleResponse -> f BatchUpdateScheduleResponse
batchUpdateScheduleResponse_deletes = (BatchUpdateScheduleResponse
 -> Maybe BatchScheduleActionDeleteResult)
-> (BatchUpdateScheduleResponse
    -> Maybe BatchScheduleActionDeleteResult
    -> BatchUpdateScheduleResponse)
-> Lens
     BatchUpdateScheduleResponse
     BatchUpdateScheduleResponse
     (Maybe BatchScheduleActionDeleteResult)
     (Maybe BatchScheduleActionDeleteResult)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateScheduleResponse' {Maybe BatchScheduleActionDeleteResult
deletes :: Maybe BatchScheduleActionDeleteResult
$sel:deletes:BatchUpdateScheduleResponse' :: BatchUpdateScheduleResponse
-> Maybe BatchScheduleActionDeleteResult
deletes} -> Maybe BatchScheduleActionDeleteResult
deletes) (\s :: BatchUpdateScheduleResponse
s@BatchUpdateScheduleResponse' {} Maybe BatchScheduleActionDeleteResult
a -> BatchUpdateScheduleResponse
s {$sel:deletes:BatchUpdateScheduleResponse' :: Maybe BatchScheduleActionDeleteResult
deletes = Maybe BatchScheduleActionDeleteResult
a} :: BatchUpdateScheduleResponse)

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

instance Prelude.NFData BatchUpdateScheduleResponse