{-# 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.SSM.Types.MaintenanceWindowExecution where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.MaintenanceWindowExecutionStatus
data MaintenanceWindowExecution = MaintenanceWindowExecution'
{
MaintenanceWindowExecution
-> Maybe MaintenanceWindowExecutionStatus
status :: Prelude.Maybe MaintenanceWindowExecutionStatus,
MaintenanceWindowExecution -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
MaintenanceWindowExecution -> Maybe Text
windowExecutionId :: Prelude.Maybe Prelude.Text,
MaintenanceWindowExecution -> Maybe Text
statusDetails :: Prelude.Maybe Prelude.Text,
MaintenanceWindowExecution -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
MaintenanceWindowExecution -> Maybe Text
windowId :: Prelude.Maybe Prelude.Text
}
deriving (MaintenanceWindowExecution -> MaintenanceWindowExecution -> Bool
(MaintenanceWindowExecution -> MaintenanceWindowExecution -> Bool)
-> (MaintenanceWindowExecution
-> MaintenanceWindowExecution -> Bool)
-> Eq MaintenanceWindowExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MaintenanceWindowExecution -> MaintenanceWindowExecution -> Bool
$c/= :: MaintenanceWindowExecution -> MaintenanceWindowExecution -> Bool
== :: MaintenanceWindowExecution -> MaintenanceWindowExecution -> Bool
$c== :: MaintenanceWindowExecution -> MaintenanceWindowExecution -> Bool
Prelude.Eq, ReadPrec [MaintenanceWindowExecution]
ReadPrec MaintenanceWindowExecution
Int -> ReadS MaintenanceWindowExecution
ReadS [MaintenanceWindowExecution]
(Int -> ReadS MaintenanceWindowExecution)
-> ReadS [MaintenanceWindowExecution]
-> ReadPrec MaintenanceWindowExecution
-> ReadPrec [MaintenanceWindowExecution]
-> Read MaintenanceWindowExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MaintenanceWindowExecution]
$creadListPrec :: ReadPrec [MaintenanceWindowExecution]
readPrec :: ReadPrec MaintenanceWindowExecution
$creadPrec :: ReadPrec MaintenanceWindowExecution
readList :: ReadS [MaintenanceWindowExecution]
$creadList :: ReadS [MaintenanceWindowExecution]
readsPrec :: Int -> ReadS MaintenanceWindowExecution
$creadsPrec :: Int -> ReadS MaintenanceWindowExecution
Prelude.Read, Int -> MaintenanceWindowExecution -> ShowS
[MaintenanceWindowExecution] -> ShowS
MaintenanceWindowExecution -> String
(Int -> MaintenanceWindowExecution -> ShowS)
-> (MaintenanceWindowExecution -> String)
-> ([MaintenanceWindowExecution] -> ShowS)
-> Show MaintenanceWindowExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MaintenanceWindowExecution] -> ShowS
$cshowList :: [MaintenanceWindowExecution] -> ShowS
show :: MaintenanceWindowExecution -> String
$cshow :: MaintenanceWindowExecution -> String
showsPrec :: Int -> MaintenanceWindowExecution -> ShowS
$cshowsPrec :: Int -> MaintenanceWindowExecution -> ShowS
Prelude.Show, (forall x.
MaintenanceWindowExecution -> Rep MaintenanceWindowExecution x)
-> (forall x.
Rep MaintenanceWindowExecution x -> MaintenanceWindowExecution)
-> Generic MaintenanceWindowExecution
forall x.
Rep MaintenanceWindowExecution x -> MaintenanceWindowExecution
forall x.
MaintenanceWindowExecution -> Rep MaintenanceWindowExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MaintenanceWindowExecution x -> MaintenanceWindowExecution
$cfrom :: forall x.
MaintenanceWindowExecution -> Rep MaintenanceWindowExecution x
Prelude.Generic)
newMaintenanceWindowExecution ::
MaintenanceWindowExecution
newMaintenanceWindowExecution :: MaintenanceWindowExecution
newMaintenanceWindowExecution =
MaintenanceWindowExecution' :: Maybe MaintenanceWindowExecutionStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> MaintenanceWindowExecution
MaintenanceWindowExecution'
{ $sel:status:MaintenanceWindowExecution' :: Maybe MaintenanceWindowExecutionStatus
status =
Maybe MaintenanceWindowExecutionStatus
forall a. Maybe a
Prelude.Nothing,
$sel:startTime:MaintenanceWindowExecution' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:windowExecutionId:MaintenanceWindowExecution' :: Maybe Text
windowExecutionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:statusDetails:MaintenanceWindowExecution' :: Maybe Text
statusDetails = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:MaintenanceWindowExecution' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:windowId:MaintenanceWindowExecution' :: Maybe Text
windowId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
maintenanceWindowExecution_status :: Lens.Lens' MaintenanceWindowExecution (Prelude.Maybe MaintenanceWindowExecutionStatus)
maintenanceWindowExecution_status :: (Maybe MaintenanceWindowExecutionStatus
-> f (Maybe MaintenanceWindowExecutionStatus))
-> MaintenanceWindowExecution -> f MaintenanceWindowExecution
maintenanceWindowExecution_status = (MaintenanceWindowExecution
-> Maybe MaintenanceWindowExecutionStatus)
-> (MaintenanceWindowExecution
-> Maybe MaintenanceWindowExecutionStatus
-> MaintenanceWindowExecution)
-> Lens
MaintenanceWindowExecution
MaintenanceWindowExecution
(Maybe MaintenanceWindowExecutionStatus)
(Maybe MaintenanceWindowExecutionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecution' {Maybe MaintenanceWindowExecutionStatus
status :: Maybe MaintenanceWindowExecutionStatus
$sel:status:MaintenanceWindowExecution' :: MaintenanceWindowExecution
-> Maybe MaintenanceWindowExecutionStatus
status} -> Maybe MaintenanceWindowExecutionStatus
status) (\s :: MaintenanceWindowExecution
s@MaintenanceWindowExecution' {} Maybe MaintenanceWindowExecutionStatus
a -> MaintenanceWindowExecution
s {$sel:status:MaintenanceWindowExecution' :: Maybe MaintenanceWindowExecutionStatus
status = Maybe MaintenanceWindowExecutionStatus
a} :: MaintenanceWindowExecution)
maintenanceWindowExecution_startTime :: Lens.Lens' MaintenanceWindowExecution (Prelude.Maybe Prelude.UTCTime)
maintenanceWindowExecution_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MaintenanceWindowExecution -> f MaintenanceWindowExecution
maintenanceWindowExecution_startTime = (MaintenanceWindowExecution -> Maybe POSIX)
-> (MaintenanceWindowExecution
-> Maybe POSIX -> MaintenanceWindowExecution)
-> Lens
MaintenanceWindowExecution
MaintenanceWindowExecution
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecution' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:MaintenanceWindowExecution' :: MaintenanceWindowExecution -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: MaintenanceWindowExecution
s@MaintenanceWindowExecution' {} Maybe POSIX
a -> MaintenanceWindowExecution
s {$sel:startTime:MaintenanceWindowExecution' :: Maybe POSIX
startTime = Maybe POSIX
a} :: MaintenanceWindowExecution) ((Maybe POSIX -> f (Maybe POSIX))
-> MaintenanceWindowExecution -> f MaintenanceWindowExecution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MaintenanceWindowExecution
-> f MaintenanceWindowExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
maintenanceWindowExecution_windowExecutionId :: Lens.Lens' MaintenanceWindowExecution (Prelude.Maybe Prelude.Text)
maintenanceWindowExecution_windowExecutionId :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowExecution -> f MaintenanceWindowExecution
maintenanceWindowExecution_windowExecutionId = (MaintenanceWindowExecution -> Maybe Text)
-> (MaintenanceWindowExecution
-> Maybe Text -> MaintenanceWindowExecution)
-> Lens
MaintenanceWindowExecution
MaintenanceWindowExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecution' {Maybe Text
windowExecutionId :: Maybe Text
$sel:windowExecutionId:MaintenanceWindowExecution' :: MaintenanceWindowExecution -> Maybe Text
windowExecutionId} -> Maybe Text
windowExecutionId) (\s :: MaintenanceWindowExecution
s@MaintenanceWindowExecution' {} Maybe Text
a -> MaintenanceWindowExecution
s {$sel:windowExecutionId:MaintenanceWindowExecution' :: Maybe Text
windowExecutionId = Maybe Text
a} :: MaintenanceWindowExecution)
maintenanceWindowExecution_statusDetails :: Lens.Lens' MaintenanceWindowExecution (Prelude.Maybe Prelude.Text)
maintenanceWindowExecution_statusDetails :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowExecution -> f MaintenanceWindowExecution
maintenanceWindowExecution_statusDetails = (MaintenanceWindowExecution -> Maybe Text)
-> (MaintenanceWindowExecution
-> Maybe Text -> MaintenanceWindowExecution)
-> Lens
MaintenanceWindowExecution
MaintenanceWindowExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecution' {Maybe Text
statusDetails :: Maybe Text
$sel:statusDetails:MaintenanceWindowExecution' :: MaintenanceWindowExecution -> Maybe Text
statusDetails} -> Maybe Text
statusDetails) (\s :: MaintenanceWindowExecution
s@MaintenanceWindowExecution' {} Maybe Text
a -> MaintenanceWindowExecution
s {$sel:statusDetails:MaintenanceWindowExecution' :: Maybe Text
statusDetails = Maybe Text
a} :: MaintenanceWindowExecution)
maintenanceWindowExecution_endTime :: Lens.Lens' MaintenanceWindowExecution (Prelude.Maybe Prelude.UTCTime)
maintenanceWindowExecution_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MaintenanceWindowExecution -> f MaintenanceWindowExecution
maintenanceWindowExecution_endTime = (MaintenanceWindowExecution -> Maybe POSIX)
-> (MaintenanceWindowExecution
-> Maybe POSIX -> MaintenanceWindowExecution)
-> Lens
MaintenanceWindowExecution
MaintenanceWindowExecution
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecution' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:MaintenanceWindowExecution' :: MaintenanceWindowExecution -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: MaintenanceWindowExecution
s@MaintenanceWindowExecution' {} Maybe POSIX
a -> MaintenanceWindowExecution
s {$sel:endTime:MaintenanceWindowExecution' :: Maybe POSIX
endTime = Maybe POSIX
a} :: MaintenanceWindowExecution) ((Maybe POSIX -> f (Maybe POSIX))
-> MaintenanceWindowExecution -> f MaintenanceWindowExecution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MaintenanceWindowExecution
-> f MaintenanceWindowExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
maintenanceWindowExecution_windowId :: Lens.Lens' MaintenanceWindowExecution (Prelude.Maybe Prelude.Text)
maintenanceWindowExecution_windowId :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowExecution -> f MaintenanceWindowExecution
maintenanceWindowExecution_windowId = (MaintenanceWindowExecution -> Maybe Text)
-> (MaintenanceWindowExecution
-> Maybe Text -> MaintenanceWindowExecution)
-> Lens
MaintenanceWindowExecution
MaintenanceWindowExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowExecution' {Maybe Text
windowId :: Maybe Text
$sel:windowId:MaintenanceWindowExecution' :: MaintenanceWindowExecution -> Maybe Text
windowId} -> Maybe Text
windowId) (\s :: MaintenanceWindowExecution
s@MaintenanceWindowExecution' {} Maybe Text
a -> MaintenanceWindowExecution
s {$sel:windowId:MaintenanceWindowExecution' :: Maybe Text
windowId = Maybe Text
a} :: MaintenanceWindowExecution)
instance Core.FromJSON MaintenanceWindowExecution where
parseJSON :: Value -> Parser MaintenanceWindowExecution
parseJSON =
String
-> (Object -> Parser MaintenanceWindowExecution)
-> Value
-> Parser MaintenanceWindowExecution
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MaintenanceWindowExecution"
( \Object
x ->
Maybe MaintenanceWindowExecutionStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> MaintenanceWindowExecution
MaintenanceWindowExecution'
(Maybe MaintenanceWindowExecutionStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> MaintenanceWindowExecution)
-> Parser (Maybe MaintenanceWindowExecutionStatus)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> MaintenanceWindowExecution)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MaintenanceWindowExecutionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> MaintenanceWindowExecution)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> MaintenanceWindowExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartTime")
Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> MaintenanceWindowExecution)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX -> Maybe Text -> MaintenanceWindowExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"WindowExecutionId")
Parser
(Maybe Text
-> Maybe POSIX -> Maybe Text -> MaintenanceWindowExecution)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> MaintenanceWindowExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StatusDetails")
Parser (Maybe POSIX -> Maybe Text -> MaintenanceWindowExecution)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> MaintenanceWindowExecution)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EndTime")
Parser (Maybe Text -> MaintenanceWindowExecution)
-> Parser (Maybe Text) -> Parser MaintenanceWindowExecution
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"WindowId")
)
instance Prelude.Hashable MaintenanceWindowExecution
instance Prelude.NFData MaintenanceWindowExecution