{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
{ $sel:name:MaintenanceWindowIdentityForTarget' :: Maybe Text
name =
forall a. Maybe a
Prelude.Nothing,
$sel:windowId:MaintenanceWindowIdentityForTarget' :: Maybe Text
windowId = forall a. Maybe a
Prelude.Nothing
}
maintenanceWindowIdentityForTarget_name :: Lens.Lens' MaintenanceWindowIdentityForTarget (Prelude.Maybe Prelude.Text)
maintenanceWindowIdentityForTarget_name :: Lens' MaintenanceWindowIdentityForTarget (Maybe Text)
maintenanceWindowIdentityForTarget_name = 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 :: Lens' MaintenanceWindowIdentityForTarget (Maybe Text)
maintenanceWindowIdentityForTarget_windowId = 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
Data.FromJSON
MaintenanceWindowIdentityForTarget
where
parseJSON :: Value -> Parser MaintenanceWindowIdentityForTarget
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MaintenanceWindowIdentityForTarget"
( \Object
x ->
Maybe Text -> Maybe Text -> MaintenanceWindowIdentityForTarget
MaintenanceWindowIdentityForTarget'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"WindowId")
)
instance
Prelude.Hashable
MaintenanceWindowIdentityForTarget
where
hashWithSalt :: Int -> MaintenanceWindowIdentityForTarget -> Int
hashWithSalt
Int
_salt
MaintenanceWindowIdentityForTarget' {Maybe Text
windowId :: Maybe Text
name :: Maybe Text
$sel:windowId:MaintenanceWindowIdentityForTarget' :: MaintenanceWindowIdentityForTarget -> Maybe Text
$sel:name:MaintenanceWindowIdentityForTarget' :: MaintenanceWindowIdentityForTarget -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
windowId
instance
Prelude.NFData
MaintenanceWindowIdentityForTarget
where
rnf :: MaintenanceWindowIdentityForTarget -> ()
rnf MaintenanceWindowIdentityForTarget' {Maybe Text
windowId :: Maybe Text
name :: Maybe Text
$sel:windowId:MaintenanceWindowIdentityForTarget' :: MaintenanceWindowIdentityForTarget -> Maybe Text
$sel:name:MaintenanceWindowIdentityForTarget' :: MaintenanceWindowIdentityForTarget -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
windowId