{-# 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.MediaLive.Types.BatchScheduleActionDeleteResult
-- 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.MediaLive.Types.BatchScheduleActionDeleteResult where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.ScheduleAction
import qualified Amazonka.Prelude as Prelude

-- | List of actions that have been deleted from the schedule.
--
-- /See:/ 'newBatchScheduleActionDeleteResult' smart constructor.
data BatchScheduleActionDeleteResult = BatchScheduleActionDeleteResult'
  { -- | List of actions that have been deleted from the schedule.
    BatchScheduleActionDeleteResult -> [ScheduleAction]
scheduleActions :: [ScheduleAction]
  }
  deriving (BatchScheduleActionDeleteResult
-> BatchScheduleActionDeleteResult -> Bool
(BatchScheduleActionDeleteResult
 -> BatchScheduleActionDeleteResult -> Bool)
-> (BatchScheduleActionDeleteResult
    -> BatchScheduleActionDeleteResult -> Bool)
-> Eq BatchScheduleActionDeleteResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchScheduleActionDeleteResult
-> BatchScheduleActionDeleteResult -> Bool
$c/= :: BatchScheduleActionDeleteResult
-> BatchScheduleActionDeleteResult -> Bool
== :: BatchScheduleActionDeleteResult
-> BatchScheduleActionDeleteResult -> Bool
$c== :: BatchScheduleActionDeleteResult
-> BatchScheduleActionDeleteResult -> Bool
Prelude.Eq, ReadPrec [BatchScheduleActionDeleteResult]
ReadPrec BatchScheduleActionDeleteResult
Int -> ReadS BatchScheduleActionDeleteResult
ReadS [BatchScheduleActionDeleteResult]
(Int -> ReadS BatchScheduleActionDeleteResult)
-> ReadS [BatchScheduleActionDeleteResult]
-> ReadPrec BatchScheduleActionDeleteResult
-> ReadPrec [BatchScheduleActionDeleteResult]
-> Read BatchScheduleActionDeleteResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchScheduleActionDeleteResult]
$creadListPrec :: ReadPrec [BatchScheduleActionDeleteResult]
readPrec :: ReadPrec BatchScheduleActionDeleteResult
$creadPrec :: ReadPrec BatchScheduleActionDeleteResult
readList :: ReadS [BatchScheduleActionDeleteResult]
$creadList :: ReadS [BatchScheduleActionDeleteResult]
readsPrec :: Int -> ReadS BatchScheduleActionDeleteResult
$creadsPrec :: Int -> ReadS BatchScheduleActionDeleteResult
Prelude.Read, Int -> BatchScheduleActionDeleteResult -> ShowS
[BatchScheduleActionDeleteResult] -> ShowS
BatchScheduleActionDeleteResult -> String
(Int -> BatchScheduleActionDeleteResult -> ShowS)
-> (BatchScheduleActionDeleteResult -> String)
-> ([BatchScheduleActionDeleteResult] -> ShowS)
-> Show BatchScheduleActionDeleteResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchScheduleActionDeleteResult] -> ShowS
$cshowList :: [BatchScheduleActionDeleteResult] -> ShowS
show :: BatchScheduleActionDeleteResult -> String
$cshow :: BatchScheduleActionDeleteResult -> String
showsPrec :: Int -> BatchScheduleActionDeleteResult -> ShowS
$cshowsPrec :: Int -> BatchScheduleActionDeleteResult -> ShowS
Prelude.Show, (forall x.
 BatchScheduleActionDeleteResult
 -> Rep BatchScheduleActionDeleteResult x)
-> (forall x.
    Rep BatchScheduleActionDeleteResult x
    -> BatchScheduleActionDeleteResult)
-> Generic BatchScheduleActionDeleteResult
forall x.
Rep BatchScheduleActionDeleteResult x
-> BatchScheduleActionDeleteResult
forall x.
BatchScheduleActionDeleteResult
-> Rep BatchScheduleActionDeleteResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchScheduleActionDeleteResult x
-> BatchScheduleActionDeleteResult
$cfrom :: forall x.
BatchScheduleActionDeleteResult
-> Rep BatchScheduleActionDeleteResult x
Prelude.Generic)

-- |
-- Create a value of 'BatchScheduleActionDeleteResult' 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:
--
-- 'scheduleActions', 'batchScheduleActionDeleteResult_scheduleActions' - List of actions that have been deleted from the schedule.
newBatchScheduleActionDeleteResult ::
  BatchScheduleActionDeleteResult
newBatchScheduleActionDeleteResult :: BatchScheduleActionDeleteResult
newBatchScheduleActionDeleteResult =
  BatchScheduleActionDeleteResult' :: [ScheduleAction] -> BatchScheduleActionDeleteResult
BatchScheduleActionDeleteResult'
    { $sel:scheduleActions:BatchScheduleActionDeleteResult' :: [ScheduleAction]
scheduleActions =
        [ScheduleAction]
forall a. Monoid a => a
Prelude.mempty
    }

-- | List of actions that have been deleted from the schedule.
batchScheduleActionDeleteResult_scheduleActions :: Lens.Lens' BatchScheduleActionDeleteResult [ScheduleAction]
batchScheduleActionDeleteResult_scheduleActions :: ([ScheduleAction] -> f [ScheduleAction])
-> BatchScheduleActionDeleteResult
-> f BatchScheduleActionDeleteResult
batchScheduleActionDeleteResult_scheduleActions = (BatchScheduleActionDeleteResult -> [ScheduleAction])
-> (BatchScheduleActionDeleteResult
    -> [ScheduleAction] -> BatchScheduleActionDeleteResult)
-> Lens
     BatchScheduleActionDeleteResult
     BatchScheduleActionDeleteResult
     [ScheduleAction]
     [ScheduleAction]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchScheduleActionDeleteResult' {[ScheduleAction]
scheduleActions :: [ScheduleAction]
$sel:scheduleActions:BatchScheduleActionDeleteResult' :: BatchScheduleActionDeleteResult -> [ScheduleAction]
scheduleActions} -> [ScheduleAction]
scheduleActions) (\s :: BatchScheduleActionDeleteResult
s@BatchScheduleActionDeleteResult' {} [ScheduleAction]
a -> BatchScheduleActionDeleteResult
s {$sel:scheduleActions:BatchScheduleActionDeleteResult' :: [ScheduleAction]
scheduleActions = [ScheduleAction]
a} :: BatchScheduleActionDeleteResult) (([ScheduleAction] -> f [ScheduleAction])
 -> BatchScheduleActionDeleteResult
 -> f BatchScheduleActionDeleteResult)
-> (([ScheduleAction] -> f [ScheduleAction])
    -> [ScheduleAction] -> f [ScheduleAction])
-> ([ScheduleAction] -> f [ScheduleAction])
-> BatchScheduleActionDeleteResult
-> f BatchScheduleActionDeleteResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ScheduleAction] -> f [ScheduleAction])
-> [ScheduleAction] -> f [ScheduleAction]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.FromJSON
    BatchScheduleActionDeleteResult
  where
  parseJSON :: Value -> Parser BatchScheduleActionDeleteResult
parseJSON =
    String
-> (Object -> Parser BatchScheduleActionDeleteResult)
-> Value
-> Parser BatchScheduleActionDeleteResult
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BatchScheduleActionDeleteResult"
      ( \Object
x ->
          [ScheduleAction] -> BatchScheduleActionDeleteResult
BatchScheduleActionDeleteResult'
            ([ScheduleAction] -> BatchScheduleActionDeleteResult)
-> Parser [ScheduleAction]
-> Parser BatchScheduleActionDeleteResult
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe [ScheduleAction])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"scheduleActions"
                            Parser (Maybe [ScheduleAction])
-> [ScheduleAction] -> Parser [ScheduleAction]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [ScheduleAction]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance
  Prelude.Hashable
    BatchScheduleActionDeleteResult

instance
  Prelude.NFData
    BatchScheduleActionDeleteResult