{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types.ScheduleAction
import qualified Amazonka.Prelude as Prelude
data BatchScheduleActionCreateRequest = BatchScheduleActionCreateRequest'
{
BatchScheduleActionCreateRequest -> [ScheduleAction]
scheduleActions :: [ScheduleAction]
}
deriving (BatchScheduleActionCreateRequest
-> BatchScheduleActionCreateRequest -> Bool
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]
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
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.
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'
{ $sel:scheduleActions:BatchScheduleActionCreateRequest' :: [ScheduleAction]
scheduleActions =
forall a. Monoid a => a
Prelude.mempty
}
batchScheduleActionCreateRequest_scheduleActions :: Lens.Lens' BatchScheduleActionCreateRequest [ScheduleAction]
batchScheduleActionCreateRequest_scheduleActions :: Lens' BatchScheduleActionCreateRequest [ScheduleAction]
batchScheduleActionCreateRequest_scheduleActions = 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) 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
BatchScheduleActionCreateRequest
where
hashWithSalt :: Int -> BatchScheduleActionCreateRequest -> Int
hashWithSalt
Int
_salt
BatchScheduleActionCreateRequest' {[ScheduleAction]
scheduleActions :: [ScheduleAction]
$sel:scheduleActions:BatchScheduleActionCreateRequest' :: BatchScheduleActionCreateRequest -> [ScheduleAction]
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [ScheduleAction]
scheduleActions
instance
Prelude.NFData
BatchScheduleActionCreateRequest
where
rnf :: BatchScheduleActionCreateRequest -> ()
rnf BatchScheduleActionCreateRequest' {[ScheduleAction]
scheduleActions :: [ScheduleAction]
$sel:scheduleActions:BatchScheduleActionCreateRequest' :: BatchScheduleActionCreateRequest -> [ScheduleAction]
..} =
forall a. NFData a => a -> ()
Prelude.rnf [ScheduleAction]
scheduleActions
instance Data.ToJSON BatchScheduleActionCreateRequest where
toJSON :: BatchScheduleActionCreateRequest -> Value
toJSON BatchScheduleActionCreateRequest' {[ScheduleAction]
scheduleActions :: [ScheduleAction]
$sel:scheduleActions:BatchScheduleActionCreateRequest' :: BatchScheduleActionCreateRequest -> [ScheduleAction]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"scheduleActions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [ScheduleAction]
scheduleActions)
]
)