{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaLive.Types.BatchScheduleActionDeleteRequest where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
    { $sel:actionNames:BatchScheduleActionDeleteRequest' :: [Text]
actionNames =
        forall a. Monoid a => a
Prelude.mempty
    }

-- | A list of schedule actions to delete.
batchScheduleActionDeleteRequest_actionNames :: Lens.Lens' BatchScheduleActionDeleteRequest [Prelude.Text]
batchScheduleActionDeleteRequest_actionNames :: Lens' BatchScheduleActionDeleteRequest [Text]
batchScheduleActionDeleteRequest_actionNames = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.Hashable
    BatchScheduleActionDeleteRequest
  where
  hashWithSalt :: Int -> BatchScheduleActionDeleteRequest -> Int
hashWithSalt
    Int
_salt
    BatchScheduleActionDeleteRequest' {[Text]
actionNames :: [Text]
$sel:actionNames:BatchScheduleActionDeleteRequest' :: BatchScheduleActionDeleteRequest -> [Text]
..} =
      Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
actionNames

instance
  Prelude.NFData
    BatchScheduleActionDeleteRequest
  where
  rnf :: BatchScheduleActionDeleteRequest -> ()
rnf BatchScheduleActionDeleteRequest' {[Text]
actionNames :: [Text]
$sel:actionNames:BatchScheduleActionDeleteRequest' :: BatchScheduleActionDeleteRequest -> [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf [Text]
actionNames

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