{-# 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.MaintenanceWindowIdentityForTarget where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MaintenanceWindowIdentityForTarget = MaintenanceWindowIdentityForTarget'
{
MaintenanceWindowIdentityForTarget -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
MaintenanceWindowIdentityForTarget -> Maybe Text
windowId :: Prelude.Maybe Prelude.Text
}
deriving (MaintenanceWindowIdentityForTarget
-> MaintenanceWindowIdentityForTarget -> Bool
(MaintenanceWindowIdentityForTarget
-> MaintenanceWindowIdentityForTarget -> Bool)
-> (MaintenanceWindowIdentityForTarget
-> MaintenanceWindowIdentityForTarget -> Bool)
-> Eq MaintenanceWindowIdentityForTarget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MaintenanceWindowIdentityForTarget
-> MaintenanceWindowIdentityForTarget -> Bool
$c/= :: MaintenanceWindowIdentityForTarget
-> MaintenanceWindowIdentityForTarget -> Bool
== :: MaintenanceWindowIdentityForTarget
-> MaintenanceWindowIdentityForTarget -> Bool
$c== :: MaintenanceWindowIdentityForTarget
-> MaintenanceWindowIdentityForTarget -> Bool
Prelude.Eq, ReadPrec [MaintenanceWindowIdentityForTarget]
ReadPrec MaintenanceWindowIdentityForTarget
Int -> ReadS MaintenanceWindowIdentityForTarget
ReadS [MaintenanceWindowIdentityForTarget]
(Int -> ReadS MaintenanceWindowIdentityForTarget)
-> ReadS [MaintenanceWindowIdentityForTarget]
-> ReadPrec MaintenanceWindowIdentityForTarget
-> ReadPrec [MaintenanceWindowIdentityForTarget]
-> Read MaintenanceWindowIdentityForTarget
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MaintenanceWindowIdentityForTarget]
$creadListPrec :: ReadPrec [MaintenanceWindowIdentityForTarget]
readPrec :: ReadPrec MaintenanceWindowIdentityForTarget
$creadPrec :: ReadPrec MaintenanceWindowIdentityForTarget
readList :: ReadS [MaintenanceWindowIdentityForTarget]
$creadList :: ReadS [MaintenanceWindowIdentityForTarget]
readsPrec :: Int -> ReadS MaintenanceWindowIdentityForTarget
$creadsPrec :: Int -> ReadS MaintenanceWindowIdentityForTarget
Prelude.Read, Int -> MaintenanceWindowIdentityForTarget -> ShowS
[MaintenanceWindowIdentityForTarget] -> ShowS
MaintenanceWindowIdentityForTarget -> String
(Int -> MaintenanceWindowIdentityForTarget -> ShowS)
-> (MaintenanceWindowIdentityForTarget -> String)
-> ([MaintenanceWindowIdentityForTarget] -> ShowS)
-> Show MaintenanceWindowIdentityForTarget
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MaintenanceWindowIdentityForTarget] -> ShowS
$cshowList :: [MaintenanceWindowIdentityForTarget] -> ShowS
show :: MaintenanceWindowIdentityForTarget -> String
$cshow :: MaintenanceWindowIdentityForTarget -> String
showsPrec :: Int -> MaintenanceWindowIdentityForTarget -> ShowS
$cshowsPrec :: Int -> MaintenanceWindowIdentityForTarget -> ShowS
Prelude.Show, (forall x.
MaintenanceWindowIdentityForTarget
-> Rep MaintenanceWindowIdentityForTarget x)
-> (forall x.
Rep MaintenanceWindowIdentityForTarget x
-> MaintenanceWindowIdentityForTarget)
-> Generic MaintenanceWindowIdentityForTarget
forall x.
Rep MaintenanceWindowIdentityForTarget x
-> MaintenanceWindowIdentityForTarget
forall x.
MaintenanceWindowIdentityForTarget
-> Rep MaintenanceWindowIdentityForTarget x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MaintenanceWindowIdentityForTarget x
-> MaintenanceWindowIdentityForTarget
$cfrom :: forall x.
MaintenanceWindowIdentityForTarget
-> Rep MaintenanceWindowIdentityForTarget x
Prelude.Generic)
newMaintenanceWindowIdentityForTarget ::
MaintenanceWindowIdentityForTarget
newMaintenanceWindowIdentityForTarget :: MaintenanceWindowIdentityForTarget
newMaintenanceWindowIdentityForTarget =
MaintenanceWindowIdentityForTarget' :: Maybe Text -> Maybe Text -> MaintenanceWindowIdentityForTarget
MaintenanceWindowIdentityForTarget'
{ $sel:name:MaintenanceWindowIdentityForTarget' :: Maybe Text
name =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:windowId:MaintenanceWindowIdentityForTarget' :: Maybe Text
windowId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
maintenanceWindowIdentityForTarget_name :: Lens.Lens' MaintenanceWindowIdentityForTarget (Prelude.Maybe Prelude.Text)
maintenanceWindowIdentityForTarget_name :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowIdentityForTarget
-> f MaintenanceWindowIdentityForTarget
maintenanceWindowIdentityForTarget_name = (MaintenanceWindowIdentityForTarget -> Maybe Text)
-> (MaintenanceWindowIdentityForTarget
-> Maybe Text -> MaintenanceWindowIdentityForTarget)
-> Lens
MaintenanceWindowIdentityForTarget
MaintenanceWindowIdentityForTarget
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowIdentityForTarget' {Maybe Text
name :: Maybe Text
$sel:name:MaintenanceWindowIdentityForTarget' :: MaintenanceWindowIdentityForTarget -> Maybe Text
name} -> Maybe Text
name) (\s :: MaintenanceWindowIdentityForTarget
s@MaintenanceWindowIdentityForTarget' {} Maybe Text
a -> MaintenanceWindowIdentityForTarget
s {$sel:name:MaintenanceWindowIdentityForTarget' :: Maybe Text
name = Maybe Text
a} :: MaintenanceWindowIdentityForTarget)
maintenanceWindowIdentityForTarget_windowId :: Lens.Lens' MaintenanceWindowIdentityForTarget (Prelude.Maybe Prelude.Text)
maintenanceWindowIdentityForTarget_windowId :: (Maybe Text -> f (Maybe Text))
-> MaintenanceWindowIdentityForTarget
-> f MaintenanceWindowIdentityForTarget
maintenanceWindowIdentityForTarget_windowId = (MaintenanceWindowIdentityForTarget -> Maybe Text)
-> (MaintenanceWindowIdentityForTarget
-> Maybe Text -> MaintenanceWindowIdentityForTarget)
-> Lens
MaintenanceWindowIdentityForTarget
MaintenanceWindowIdentityForTarget
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowIdentityForTarget' {Maybe Text
windowId :: Maybe Text
$sel:windowId:MaintenanceWindowIdentityForTarget' :: MaintenanceWindowIdentityForTarget -> Maybe Text
windowId} -> Maybe Text
windowId) (\s :: MaintenanceWindowIdentityForTarget
s@MaintenanceWindowIdentityForTarget' {} Maybe Text
a -> MaintenanceWindowIdentityForTarget
s {$sel:windowId:MaintenanceWindowIdentityForTarget' :: Maybe Text
windowId = Maybe Text
a} :: MaintenanceWindowIdentityForTarget)
instance
Core.FromJSON
MaintenanceWindowIdentityForTarget
where
parseJSON :: Value -> Parser MaintenanceWindowIdentityForTarget
parseJSON =
String
-> (Object -> Parser MaintenanceWindowIdentityForTarget)
-> Value
-> Parser MaintenanceWindowIdentityForTarget
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MaintenanceWindowIdentityForTarget"
( \Object
x ->
Maybe Text -> Maybe Text -> MaintenanceWindowIdentityForTarget
MaintenanceWindowIdentityForTarget'
(Maybe Text -> Maybe Text -> MaintenanceWindowIdentityForTarget)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> MaintenanceWindowIdentityForTarget)
forall (f :: * -> *) a b. Functor 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
"Name")
Parser (Maybe Text -> MaintenanceWindowIdentityForTarget)
-> Parser (Maybe Text) -> Parser MaintenanceWindowIdentityForTarget
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
MaintenanceWindowIdentityForTarget
instance
Prelude.NFData
MaintenanceWindowIdentityForTarget