{-# 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.MaintenanceUpdateSettings 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 MaintenanceUpdateSettings = MaintenanceUpdateSettings'
{
MaintenanceUpdateSettings -> Maybe MaintenanceDay
maintenanceDay :: Prelude.Maybe MaintenanceDay,
MaintenanceUpdateSettings -> Maybe Text
maintenanceScheduledDate :: Prelude.Maybe Prelude.Text,
MaintenanceUpdateSettings -> Maybe Text
maintenanceStartTime :: Prelude.Maybe Prelude.Text
}
deriving (MaintenanceUpdateSettings -> MaintenanceUpdateSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MaintenanceUpdateSettings -> MaintenanceUpdateSettings -> Bool
$c/= :: MaintenanceUpdateSettings -> MaintenanceUpdateSettings -> Bool
== :: MaintenanceUpdateSettings -> MaintenanceUpdateSettings -> Bool
$c== :: MaintenanceUpdateSettings -> MaintenanceUpdateSettings -> Bool
Prelude.Eq, ReadPrec [MaintenanceUpdateSettings]
ReadPrec MaintenanceUpdateSettings
Int -> ReadS MaintenanceUpdateSettings
ReadS [MaintenanceUpdateSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MaintenanceUpdateSettings]
$creadListPrec :: ReadPrec [MaintenanceUpdateSettings]
readPrec :: ReadPrec MaintenanceUpdateSettings
$creadPrec :: ReadPrec MaintenanceUpdateSettings
readList :: ReadS [MaintenanceUpdateSettings]
$creadList :: ReadS [MaintenanceUpdateSettings]
readsPrec :: Int -> ReadS MaintenanceUpdateSettings
$creadsPrec :: Int -> ReadS MaintenanceUpdateSettings
Prelude.Read, Int -> MaintenanceUpdateSettings -> ShowS
[MaintenanceUpdateSettings] -> ShowS
MaintenanceUpdateSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MaintenanceUpdateSettings] -> ShowS
$cshowList :: [MaintenanceUpdateSettings] -> ShowS
show :: MaintenanceUpdateSettings -> String
$cshow :: MaintenanceUpdateSettings -> String
showsPrec :: Int -> MaintenanceUpdateSettings -> ShowS
$cshowsPrec :: Int -> MaintenanceUpdateSettings -> ShowS
Prelude.Show, forall x.
Rep MaintenanceUpdateSettings x -> MaintenanceUpdateSettings
forall x.
MaintenanceUpdateSettings -> Rep MaintenanceUpdateSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MaintenanceUpdateSettings x -> MaintenanceUpdateSettings
$cfrom :: forall x.
MaintenanceUpdateSettings -> Rep MaintenanceUpdateSettings x
Prelude.Generic)
newMaintenanceUpdateSettings ::
MaintenanceUpdateSettings
newMaintenanceUpdateSettings :: MaintenanceUpdateSettings
newMaintenanceUpdateSettings =
MaintenanceUpdateSettings'
{ $sel:maintenanceDay:MaintenanceUpdateSettings' :: Maybe MaintenanceDay
maintenanceDay =
forall a. Maybe a
Prelude.Nothing,
$sel:maintenanceScheduledDate:MaintenanceUpdateSettings' :: Maybe Text
maintenanceScheduledDate = forall a. Maybe a
Prelude.Nothing,
$sel:maintenanceStartTime:MaintenanceUpdateSettings' :: Maybe Text
maintenanceStartTime = forall a. Maybe a
Prelude.Nothing
}
maintenanceUpdateSettings_maintenanceDay :: Lens.Lens' MaintenanceUpdateSettings (Prelude.Maybe MaintenanceDay)
maintenanceUpdateSettings_maintenanceDay :: Lens' MaintenanceUpdateSettings (Maybe MaintenanceDay)
maintenanceUpdateSettings_maintenanceDay = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceUpdateSettings' {Maybe MaintenanceDay
maintenanceDay :: Maybe MaintenanceDay
$sel:maintenanceDay:MaintenanceUpdateSettings' :: MaintenanceUpdateSettings -> Maybe MaintenanceDay
maintenanceDay} -> Maybe MaintenanceDay
maintenanceDay) (\s :: MaintenanceUpdateSettings
s@MaintenanceUpdateSettings' {} Maybe MaintenanceDay
a -> MaintenanceUpdateSettings
s {$sel:maintenanceDay:MaintenanceUpdateSettings' :: Maybe MaintenanceDay
maintenanceDay = Maybe MaintenanceDay
a} :: MaintenanceUpdateSettings)
maintenanceUpdateSettings_maintenanceScheduledDate :: Lens.Lens' MaintenanceUpdateSettings (Prelude.Maybe Prelude.Text)
maintenanceUpdateSettings_maintenanceScheduledDate :: Lens' MaintenanceUpdateSettings (Maybe Text)
maintenanceUpdateSettings_maintenanceScheduledDate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceUpdateSettings' {Maybe Text
maintenanceScheduledDate :: Maybe Text
$sel:maintenanceScheduledDate:MaintenanceUpdateSettings' :: MaintenanceUpdateSettings -> Maybe Text
maintenanceScheduledDate} -> Maybe Text
maintenanceScheduledDate) (\s :: MaintenanceUpdateSettings
s@MaintenanceUpdateSettings' {} Maybe Text
a -> MaintenanceUpdateSettings
s {$sel:maintenanceScheduledDate:MaintenanceUpdateSettings' :: Maybe Text
maintenanceScheduledDate = Maybe Text
a} :: MaintenanceUpdateSettings)
maintenanceUpdateSettings_maintenanceStartTime :: Lens.Lens' MaintenanceUpdateSettings (Prelude.Maybe Prelude.Text)
maintenanceUpdateSettings_maintenanceStartTime :: Lens' MaintenanceUpdateSettings (Maybe Text)
maintenanceUpdateSettings_maintenanceStartTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceUpdateSettings' {Maybe Text
maintenanceStartTime :: Maybe Text
$sel:maintenanceStartTime:MaintenanceUpdateSettings' :: MaintenanceUpdateSettings -> Maybe Text
maintenanceStartTime} -> Maybe Text
maintenanceStartTime) (\s :: MaintenanceUpdateSettings
s@MaintenanceUpdateSettings' {} Maybe Text
a -> MaintenanceUpdateSettings
s {$sel:maintenanceStartTime:MaintenanceUpdateSettings' :: Maybe Text
maintenanceStartTime = Maybe Text
a} :: MaintenanceUpdateSettings)
instance Prelude.Hashable MaintenanceUpdateSettings where
hashWithSalt :: Int -> MaintenanceUpdateSettings -> Int
hashWithSalt Int
_salt MaintenanceUpdateSettings' {Maybe Text
Maybe MaintenanceDay
maintenanceStartTime :: Maybe Text
maintenanceScheduledDate :: Maybe Text
maintenanceDay :: Maybe MaintenanceDay
$sel:maintenanceStartTime:MaintenanceUpdateSettings' :: MaintenanceUpdateSettings -> Maybe Text
$sel:maintenanceScheduledDate:MaintenanceUpdateSettings' :: MaintenanceUpdateSettings -> Maybe Text
$sel:maintenanceDay:MaintenanceUpdateSettings' :: MaintenanceUpdateSettings -> 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
maintenanceScheduledDate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
maintenanceStartTime
instance Prelude.NFData MaintenanceUpdateSettings where
rnf :: MaintenanceUpdateSettings -> ()
rnf MaintenanceUpdateSettings' {Maybe Text
Maybe MaintenanceDay
maintenanceStartTime :: Maybe Text
maintenanceScheduledDate :: Maybe Text
maintenanceDay :: Maybe MaintenanceDay
$sel:maintenanceStartTime:MaintenanceUpdateSettings' :: MaintenanceUpdateSettings -> Maybe Text
$sel:maintenanceScheduledDate:MaintenanceUpdateSettings' :: MaintenanceUpdateSettings -> Maybe Text
$sel:maintenanceDay:MaintenanceUpdateSettings' :: MaintenanceUpdateSettings -> 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
maintenanceScheduledDate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
maintenanceStartTime
instance Data.ToJSON MaintenanceUpdateSettings where
toJSON :: MaintenanceUpdateSettings -> Value
toJSON MaintenanceUpdateSettings' {Maybe Text
Maybe MaintenanceDay
maintenanceStartTime :: Maybe Text
maintenanceScheduledDate :: Maybe Text
maintenanceDay :: Maybe MaintenanceDay
$sel:maintenanceStartTime:MaintenanceUpdateSettings' :: MaintenanceUpdateSettings -> Maybe Text
$sel:maintenanceScheduledDate:MaintenanceUpdateSettings' :: MaintenanceUpdateSettings -> Maybe Text
$sel:maintenanceDay:MaintenanceUpdateSettings' :: MaintenanceUpdateSettings -> 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
"maintenanceScheduledDate" 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
maintenanceScheduledDate,
(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
]
)