{-# 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.BatchScheduleActionDeleteRequest
-- 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.BatchScheduleActionDeleteRequest where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A list of schedule actions to delete.
--
-- /See:/ 'newBatchScheduleActionDeleteRequest' smart constructor.
data BatchScheduleActionDeleteRequest = BatchScheduleActionDeleteRequest'
  { -- | A list of schedule actions to delete.
    BatchScheduleActionDeleteRequest -> [Text]
actionNames :: [Prelude.Text]
  }
  deriving (BatchScheduleActionDeleteRequest
-> BatchScheduleActionDeleteRequest -> Bool
(BatchScheduleActionDeleteRequest
 -> BatchScheduleActionDeleteRequest -> Bool)
-> (BatchScheduleActionDeleteRequest
    -> BatchScheduleActionDeleteRequest -> Bool)
-> Eq BatchScheduleActionDeleteRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchScheduleActionDeleteRequest
-> BatchScheduleActionDeleteRequest -> Bool
$c/= :: BatchScheduleActionDeleteRequest
-> BatchScheduleActionDeleteRequest -> Bool
== :: BatchScheduleActionDeleteRequest
-> BatchScheduleActionDeleteRequest -> Bool
$c== :: BatchScheduleActionDeleteRequest
-> BatchScheduleActionDeleteRequest -> Bool
Prelude.Eq, ReadPrec [BatchScheduleActionDeleteRequest]
ReadPrec BatchScheduleActionDeleteRequest
Int -> ReadS BatchScheduleActionDeleteRequest
ReadS [BatchScheduleActionDeleteRequest]
(Int -> ReadS BatchScheduleActionDeleteRequest)
-> ReadS [BatchScheduleActionDeleteRequest]
-> ReadPrec BatchScheduleActionDeleteRequest
-> ReadPrec [BatchScheduleActionDeleteRequest]
-> Read BatchScheduleActionDeleteRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchScheduleActionDeleteRequest]
$creadListPrec :: ReadPrec [BatchScheduleActionDeleteRequest]
readPrec :: ReadPrec BatchScheduleActionDeleteRequest
$creadPrec :: ReadPrec BatchScheduleActionDeleteRequest
readList :: ReadS [BatchScheduleActionDeleteRequest]
$creadList :: ReadS [BatchScheduleActionDeleteRequest]
readsPrec :: Int -> ReadS BatchScheduleActionDeleteRequest
$creadsPrec :: Int -> ReadS BatchScheduleActionDeleteRequest
Prelude.Read, Int -> BatchScheduleActionDeleteRequest -> ShowS
[BatchScheduleActionDeleteRequest] -> ShowS
BatchScheduleActionDeleteRequest -> String
(Int -> BatchScheduleActionDeleteRequest -> ShowS)
-> (BatchScheduleActionDeleteRequest -> String)
-> ([BatchScheduleActionDeleteRequest] -> ShowS)
-> Show BatchScheduleActionDeleteRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchScheduleActionDeleteRequest] -> ShowS
$cshowList :: [BatchScheduleActionDeleteRequest] -> ShowS
show :: BatchScheduleActionDeleteRequest -> String
$cshow :: BatchScheduleActionDeleteRequest -> String
showsPrec :: Int -> BatchScheduleActionDeleteRequest -> ShowS
$cshowsPrec :: Int -> BatchScheduleActionDeleteRequest -> ShowS
Prelude.Show, (forall x.
 BatchScheduleActionDeleteRequest
 -> Rep BatchScheduleActionDeleteRequest x)
-> (forall x.
    Rep BatchScheduleActionDeleteRequest x
    -> BatchScheduleActionDeleteRequest)
-> Generic BatchScheduleActionDeleteRequest
forall x.
Rep BatchScheduleActionDeleteRequest x
-> BatchScheduleActionDeleteRequest
forall x.
BatchScheduleActionDeleteRequest
-> Rep BatchScheduleActionDeleteRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchScheduleActionDeleteRequest x
-> BatchScheduleActionDeleteRequest
$cfrom :: forall x.
BatchScheduleActionDeleteRequest
-> Rep BatchScheduleActionDeleteRequest x
Prelude.Generic)

-- |
-- Create a value of 'BatchScheduleActionDeleteRequest' 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:
--
-- 'actionNames', 'batchScheduleActionDeleteRequest_actionNames' - A list of schedule actions to delete.
newBatchScheduleActionDeleteRequest ::
  BatchScheduleActionDeleteRequest
newBatchScheduleActionDeleteRequest :: BatchScheduleActionDeleteRequest
newBatchScheduleActionDeleteRequest =
  BatchScheduleActionDeleteRequest' :: [Text] -> BatchScheduleActionDeleteRequest
BatchScheduleActionDeleteRequest'
    { $sel:actionNames:BatchScheduleActionDeleteRequest' :: [Text]
actionNames =
        [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | A list of schedule actions to delete.
batchScheduleActionDeleteRequest_actionNames :: Lens.Lens' BatchScheduleActionDeleteRequest [Prelude.Text]
batchScheduleActionDeleteRequest_actionNames :: ([Text] -> f [Text])
-> BatchScheduleActionDeleteRequest
-> f BatchScheduleActionDeleteRequest
batchScheduleActionDeleteRequest_actionNames = (BatchScheduleActionDeleteRequest -> [Text])
-> (BatchScheduleActionDeleteRequest
    -> [Text] -> BatchScheduleActionDeleteRequest)
-> Lens
     BatchScheduleActionDeleteRequest
     BatchScheduleActionDeleteRequest
     [Text]
     [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchScheduleActionDeleteRequest' {[Text]
actionNames :: [Text]
$sel:actionNames:BatchScheduleActionDeleteRequest' :: BatchScheduleActionDeleteRequest -> [Text]
actionNames} -> [Text]
actionNames) (\s :: BatchScheduleActionDeleteRequest
s@BatchScheduleActionDeleteRequest' {} [Text]
a -> BatchScheduleActionDeleteRequest
s {$sel:actionNames:BatchScheduleActionDeleteRequest' :: [Text]
actionNames = [Text]
a} :: BatchScheduleActionDeleteRequest) (([Text] -> f [Text])
 -> BatchScheduleActionDeleteRequest
 -> f BatchScheduleActionDeleteRequest)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> BatchScheduleActionDeleteRequest
-> f BatchScheduleActionDeleteRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.Hashable
    BatchScheduleActionDeleteRequest

instance
  Prelude.NFData
    BatchScheduleActionDeleteRequest

instance Core.ToJSON BatchScheduleActionDeleteRequest where
  toJSON :: BatchScheduleActionDeleteRequest -> Value
toJSON BatchScheduleActionDeleteRequest' {[Text]
actionNames :: [Text]
$sel:actionNames:BatchScheduleActionDeleteRequest' :: BatchScheduleActionDeleteRequest -> [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"actionNames" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
actionNames)]
      )