{-# 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 #-}
module Amazonka.MediaLive.Types.BatchScheduleActionCreateRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaLive.Types.ScheduleAction
import qualified Amazonka.Prelude as Prelude
data BatchScheduleActionCreateRequest = BatchScheduleActionCreateRequest'
{
BatchScheduleActionCreateRequest -> [ScheduleAction]
scheduleActions :: [ScheduleAction]
}
deriving (BatchScheduleActionCreateRequest
-> BatchScheduleActionCreateRequest -> Bool
(BatchScheduleActionCreateRequest
-> BatchScheduleActionCreateRequest -> Bool)
-> (BatchScheduleActionCreateRequest
-> BatchScheduleActionCreateRequest -> Bool)
-> Eq BatchScheduleActionCreateRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchScheduleActionCreateRequest
-> BatchScheduleActionCreateRequest -> Bool
$c/= :: BatchScheduleActionCreateRequest
-> BatchScheduleActionCreateRequest -> Bool
== :: BatchScheduleActionCreateRequest
-> BatchScheduleActionCreateRequest -> Bool
$c== :: BatchScheduleActionCreateRequest
-> BatchScheduleActionCreateRequest -> Bool
Prelude.Eq, ReadPrec [BatchScheduleActionCreateRequest]
ReadPrec BatchScheduleActionCreateRequest
Int -> ReadS BatchScheduleActionCreateRequest
ReadS [BatchScheduleActionCreateRequest]
(Int -> ReadS BatchScheduleActionCreateRequest)
-> ReadS [BatchScheduleActionCreateRequest]
-> ReadPrec BatchScheduleActionCreateRequest
-> ReadPrec [BatchScheduleActionCreateRequest]
-> Read BatchScheduleActionCreateRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchScheduleActionCreateRequest]
$creadListPrec :: ReadPrec [BatchScheduleActionCreateRequest]
readPrec :: ReadPrec BatchScheduleActionCreateRequest
$creadPrec :: ReadPrec BatchScheduleActionCreateRequest
readList :: ReadS [BatchScheduleActionCreateRequest]
$creadList :: ReadS [BatchScheduleActionCreateRequest]
readsPrec :: Int -> ReadS BatchScheduleActionCreateRequest
$creadsPrec :: Int -> ReadS BatchScheduleActionCreateRequest
Prelude.Read, Int -> BatchScheduleActionCreateRequest -> ShowS
[BatchScheduleActionCreateRequest] -> ShowS
BatchScheduleActionCreateRequest -> String
(Int -> BatchScheduleActionCreateRequest -> ShowS)
-> (BatchScheduleActionCreateRequest -> String)
-> ([BatchScheduleActionCreateRequest] -> ShowS)
-> Show BatchScheduleActionCreateRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchScheduleActionCreateRequest] -> ShowS
$cshowList :: [BatchScheduleActionCreateRequest] -> ShowS
show :: BatchScheduleActionCreateRequest -> String
$cshow :: BatchScheduleActionCreateRequest -> String
showsPrec :: Int -> BatchScheduleActionCreateRequest -> ShowS
$cshowsPrec :: Int -> BatchScheduleActionCreateRequest -> ShowS
Prelude.Show, (forall x.
BatchScheduleActionCreateRequest
-> Rep BatchScheduleActionCreateRequest x)
-> (forall x.
Rep BatchScheduleActionCreateRequest x
-> BatchScheduleActionCreateRequest)
-> Generic BatchScheduleActionCreateRequest
forall x.
Rep BatchScheduleActionCreateRequest x
-> BatchScheduleActionCreateRequest
forall x.
BatchScheduleActionCreateRequest
-> Rep BatchScheduleActionCreateRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchScheduleActionCreateRequest x
-> BatchScheduleActionCreateRequest
$cfrom :: forall x.
BatchScheduleActionCreateRequest
-> Rep BatchScheduleActionCreateRequest x
Prelude.Generic)
newBatchScheduleActionCreateRequest ::
BatchScheduleActionCreateRequest
newBatchScheduleActionCreateRequest :: BatchScheduleActionCreateRequest
newBatchScheduleActionCreateRequest =
BatchScheduleActionCreateRequest' :: [ScheduleAction] -> BatchScheduleActionCreateRequest
BatchScheduleActionCreateRequest'
{ $sel:scheduleActions:BatchScheduleActionCreateRequest' :: [ScheduleAction]
scheduleActions =
[ScheduleAction]
forall a. Monoid a => a
Prelude.mempty
}
batchScheduleActionCreateRequest_scheduleActions :: Lens.Lens' BatchScheduleActionCreateRequest [ScheduleAction]
batchScheduleActionCreateRequest_scheduleActions :: ([ScheduleAction] -> f [ScheduleAction])
-> BatchScheduleActionCreateRequest
-> f BatchScheduleActionCreateRequest
batchScheduleActionCreateRequest_scheduleActions = (BatchScheduleActionCreateRequest -> [ScheduleAction])
-> (BatchScheduleActionCreateRequest
-> [ScheduleAction] -> BatchScheduleActionCreateRequest)
-> Lens
BatchScheduleActionCreateRequest
BatchScheduleActionCreateRequest
[ScheduleAction]
[ScheduleAction]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchScheduleActionCreateRequest' {[ScheduleAction]
scheduleActions :: [ScheduleAction]
$sel:scheduleActions:BatchScheduleActionCreateRequest' :: BatchScheduleActionCreateRequest -> [ScheduleAction]
scheduleActions} -> [ScheduleAction]
scheduleActions) (\s :: BatchScheduleActionCreateRequest
s@BatchScheduleActionCreateRequest' {} [ScheduleAction]
a -> BatchScheduleActionCreateRequest
s {$sel:scheduleActions:BatchScheduleActionCreateRequest' :: [ScheduleAction]
scheduleActions = [ScheduleAction]
a} :: BatchScheduleActionCreateRequest) (([ScheduleAction] -> f [ScheduleAction])
-> BatchScheduleActionCreateRequest
-> f BatchScheduleActionCreateRequest)
-> (([ScheduleAction] -> f [ScheduleAction])
-> [ScheduleAction] -> f [ScheduleAction])
-> ([ScheduleAction] -> f [ScheduleAction])
-> BatchScheduleActionCreateRequest
-> f BatchScheduleActionCreateRequest
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
Prelude.Hashable
BatchScheduleActionCreateRequest
instance
Prelude.NFData
BatchScheduleActionCreateRequest
instance Core.ToJSON BatchScheduleActionCreateRequest where
toJSON :: BatchScheduleActionCreateRequest -> Value
toJSON BatchScheduleActionCreateRequest' {[ScheduleAction]
scheduleActions :: [ScheduleAction]
$sel:scheduleActions:BatchScheduleActionCreateRequest' :: BatchScheduleActionCreateRequest -> [ScheduleAction]
..} =
[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
"scheduleActions" Text -> [ScheduleAction] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [ScheduleAction]
scheduleActions)
]
)