{-# 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.MaintenanceCreateSettings 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.MaintenanceDay
import qualified Amazonka.Prelude as Prelude
data MaintenanceCreateSettings = MaintenanceCreateSettings'
{
MaintenanceCreateSettings -> Maybe MaintenanceDay
maintenanceDay :: Prelude.Maybe MaintenanceDay,
MaintenanceCreateSettings -> Maybe Text
maintenanceStartTime :: Prelude.Maybe Prelude.Text
}
deriving (MaintenanceCreateSettings -> MaintenanceCreateSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MaintenanceCreateSettings -> MaintenanceCreateSettings -> Bool
$c/= :: MaintenanceCreateSettings -> MaintenanceCreateSettings -> Bool
== :: MaintenanceCreateSettings -> MaintenanceCreateSettings -> Bool
$c== :: MaintenanceCreateSettings -> MaintenanceCreateSettings -> Bool
Prelude.Eq, ReadPrec [MaintenanceCreateSettings]
ReadPrec MaintenanceCreateSettings
Int -> ReadS MaintenanceCreateSettings
ReadS [MaintenanceCreateSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MaintenanceCreateSettings]
$creadListPrec :: ReadPrec [MaintenanceCreateSettings]
readPrec :: ReadPrec MaintenanceCreateSettings
$creadPrec :: ReadPrec MaintenanceCreateSettings
readList :: ReadS [MaintenanceCreateSettings]
$creadList :: ReadS [MaintenanceCreateSettings]
readsPrec :: Int -> ReadS MaintenanceCreateSettings
$creadsPrec :: Int -> ReadS MaintenanceCreateSettings
Prelude.Read, Int -> MaintenanceCreateSettings -> ShowS
[MaintenanceCreateSettings] -> ShowS
MaintenanceCreateSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MaintenanceCreateSettings] -> ShowS
$cshowList :: [MaintenanceCreateSettings] -> ShowS
show :: MaintenanceCreateSettings -> String
$cshow :: MaintenanceCreateSettings -> String
showsPrec :: Int -> MaintenanceCreateSettings -> ShowS
$cshowsPrec :: Int -> MaintenanceCreateSettings -> ShowS
Prelude.Show, forall x.
Rep MaintenanceCreateSettings x -> MaintenanceCreateSettings
forall x.
MaintenanceCreateSettings -> Rep MaintenanceCreateSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MaintenanceCreateSettings x -> MaintenanceCreateSettings
$cfrom :: forall x.
MaintenanceCreateSettings -> Rep MaintenanceCreateSettings x
Prelude.Generic)
newMaintenanceCreateSettings ::
MaintenanceCreateSettings
newMaintenanceCreateSettings :: MaintenanceCreateSettings
newMaintenanceCreateSettings =
MaintenanceCreateSettings'
{ $sel:maintenanceDay:MaintenanceCreateSettings' :: Maybe MaintenanceDay
maintenanceDay =
forall a. Maybe a
Prelude.Nothing,
$sel:maintenanceStartTime:MaintenanceCreateSettings' :: Maybe Text
maintenanceStartTime = forall a. Maybe a
Prelude.Nothing
}
maintenanceCreateSettings_maintenanceDay :: Lens.Lens' MaintenanceCreateSettings (Prelude.Maybe MaintenanceDay)
maintenanceCreateSettings_maintenanceDay :: Lens' MaintenanceCreateSettings (Maybe MaintenanceDay)
maintenanceCreateSettings_maintenanceDay = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceCreateSettings' {Maybe MaintenanceDay
maintenanceDay :: Maybe MaintenanceDay
$sel:maintenanceDay:MaintenanceCreateSettings' :: MaintenanceCreateSettings -> Maybe MaintenanceDay
maintenanceDay} -> Maybe MaintenanceDay
maintenanceDay) (\s :: MaintenanceCreateSettings
s@MaintenanceCreateSettings' {} Maybe MaintenanceDay
a -> MaintenanceCreateSettings
s {$sel:maintenanceDay:MaintenanceCreateSettings' :: Maybe MaintenanceDay
maintenanceDay = Maybe MaintenanceDay
a} :: MaintenanceCreateSettings)
maintenanceCreateSettings_maintenanceStartTime :: Lens.Lens' MaintenanceCreateSettings (Prelude.Maybe Prelude.Text)
maintenanceCreateSettings_maintenanceStartTime :: Lens' MaintenanceCreateSettings (Maybe Text)
maintenanceCreateSettings_maintenanceStartTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceCreateSettings' {Maybe Text
maintenanceStartTime :: Maybe Text
$sel:maintenanceStartTime:MaintenanceCreateSettings' :: MaintenanceCreateSettings -> Maybe Text
maintenanceStartTime} -> Maybe Text
maintenanceStartTime) (\s :: MaintenanceCreateSettings
s@MaintenanceCreateSettings' {} Maybe Text
a -> MaintenanceCreateSettings
s {$sel:maintenanceStartTime:MaintenanceCreateSettings' :: Maybe Text
maintenanceStartTime = Maybe Text
a} :: MaintenanceCreateSettings)
instance Prelude.Hashable MaintenanceCreateSettings where
hashWithSalt :: Int -> MaintenanceCreateSettings -> Int
hashWithSalt Int
_salt MaintenanceCreateSettings' {Maybe Text
Maybe MaintenanceDay
maintenanceStartTime :: Maybe Text
maintenanceDay :: Maybe MaintenanceDay
$sel:maintenanceStartTime:MaintenanceCreateSettings' :: MaintenanceCreateSettings -> Maybe Text
$sel:maintenanceDay:MaintenanceCreateSettings' :: MaintenanceCreateSettings -> Maybe MaintenanceDay
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MaintenanceDay
maintenanceDay
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
maintenanceStartTime
instance Prelude.NFData MaintenanceCreateSettings where
rnf :: MaintenanceCreateSettings -> ()
rnf MaintenanceCreateSettings' {Maybe Text
Maybe MaintenanceDay
maintenanceStartTime :: Maybe Text
maintenanceDay :: Maybe MaintenanceDay
$sel:maintenanceStartTime:MaintenanceCreateSettings' :: MaintenanceCreateSettings -> Maybe Text
$sel:maintenanceDay:MaintenanceCreateSettings' :: MaintenanceCreateSettings -> Maybe MaintenanceDay
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe MaintenanceDay
maintenanceDay
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
maintenanceStartTime
instance Data.ToJSON MaintenanceCreateSettings where
toJSON :: MaintenanceCreateSettings -> Value
toJSON MaintenanceCreateSettings' {Maybe Text
Maybe MaintenanceDay
maintenanceStartTime :: Maybe Text
maintenanceDay :: Maybe MaintenanceDay
$sel:maintenanceStartTime:MaintenanceCreateSettings' :: MaintenanceCreateSettings -> Maybe Text
$sel:maintenanceDay:MaintenanceCreateSettings' :: MaintenanceCreateSettings -> Maybe MaintenanceDay
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"maintenanceDay" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MaintenanceDay
maintenanceDay,
(Key
"maintenanceStartTime" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
maintenanceStartTime
]
)