{-# 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.MaintenanceWindowTarget 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
import Amazonka.SSM.Types.MaintenanceWindowResourceType
import Amazonka.SSM.Types.Target
data MaintenanceWindowTarget = MaintenanceWindowTarget'
{
MaintenanceWindowTarget -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Data.Sensitive Prelude.Text),
MaintenanceWindowTarget -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
MaintenanceWindowTarget -> Maybe (Sensitive Text)
ownerInformation :: Prelude.Maybe (Data.Sensitive Prelude.Text),
MaintenanceWindowTarget -> Maybe MaintenanceWindowResourceType
resourceType :: Prelude.Maybe MaintenanceWindowResourceType,
MaintenanceWindowTarget -> Maybe [Target]
targets :: Prelude.Maybe [Target],
MaintenanceWindowTarget -> Maybe Text
windowId :: Prelude.Maybe Prelude.Text,
MaintenanceWindowTarget -> Maybe Text
windowTargetId :: Prelude.Maybe Prelude.Text
}
deriving (MaintenanceWindowTarget -> MaintenanceWindowTarget -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MaintenanceWindowTarget -> MaintenanceWindowTarget -> Bool
$c/= :: MaintenanceWindowTarget -> MaintenanceWindowTarget -> Bool
== :: MaintenanceWindowTarget -> MaintenanceWindowTarget -> Bool
$c== :: MaintenanceWindowTarget -> MaintenanceWindowTarget -> Bool
Prelude.Eq, Int -> MaintenanceWindowTarget -> ShowS
[MaintenanceWindowTarget] -> ShowS
MaintenanceWindowTarget -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MaintenanceWindowTarget] -> ShowS
$cshowList :: [MaintenanceWindowTarget] -> ShowS
show :: MaintenanceWindowTarget -> String
$cshow :: MaintenanceWindowTarget -> String
showsPrec :: Int -> MaintenanceWindowTarget -> ShowS
$cshowsPrec :: Int -> MaintenanceWindowTarget -> ShowS
Prelude.Show, forall x. Rep MaintenanceWindowTarget x -> MaintenanceWindowTarget
forall x. MaintenanceWindowTarget -> Rep MaintenanceWindowTarget x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MaintenanceWindowTarget x -> MaintenanceWindowTarget
$cfrom :: forall x. MaintenanceWindowTarget -> Rep MaintenanceWindowTarget x
Prelude.Generic)
newMaintenanceWindowTarget ::
MaintenanceWindowTarget
newMaintenanceWindowTarget :: MaintenanceWindowTarget
newMaintenanceWindowTarget =
MaintenanceWindowTarget'
{ $sel:description:MaintenanceWindowTarget' :: Maybe (Sensitive Text)
description =
forall a. Maybe a
Prelude.Nothing,
$sel:name:MaintenanceWindowTarget' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:ownerInformation:MaintenanceWindowTarget' :: Maybe (Sensitive Text)
ownerInformation = forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:MaintenanceWindowTarget' :: Maybe MaintenanceWindowResourceType
resourceType = forall a. Maybe a
Prelude.Nothing,
$sel:targets:MaintenanceWindowTarget' :: Maybe [Target]
targets = forall a. Maybe a
Prelude.Nothing,
$sel:windowId:MaintenanceWindowTarget' :: Maybe Text
windowId = forall a. Maybe a
Prelude.Nothing,
$sel:windowTargetId:MaintenanceWindowTarget' :: Maybe Text
windowTargetId = forall a. Maybe a
Prelude.Nothing
}
maintenanceWindowTarget_description :: Lens.Lens' MaintenanceWindowTarget (Prelude.Maybe Prelude.Text)
maintenanceWindowTarget_description :: Lens' MaintenanceWindowTarget (Maybe Text)
maintenanceWindowTarget_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTarget' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: MaintenanceWindowTarget
s@MaintenanceWindowTarget' {} Maybe (Sensitive Text)
a -> MaintenanceWindowTarget
s {$sel:description:MaintenanceWindowTarget' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: MaintenanceWindowTarget) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
maintenanceWindowTarget_name :: Lens.Lens' MaintenanceWindowTarget (Prelude.Maybe Prelude.Text)
maintenanceWindowTarget_name :: Lens' MaintenanceWindowTarget (Maybe Text)
maintenanceWindowTarget_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTarget' {Maybe Text
name :: Maybe Text
$sel:name:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe Text
name} -> Maybe Text
name) (\s :: MaintenanceWindowTarget
s@MaintenanceWindowTarget' {} Maybe Text
a -> MaintenanceWindowTarget
s {$sel:name:MaintenanceWindowTarget' :: Maybe Text
name = Maybe Text
a} :: MaintenanceWindowTarget)
maintenanceWindowTarget_ownerInformation :: Lens.Lens' MaintenanceWindowTarget (Prelude.Maybe Prelude.Text)
maintenanceWindowTarget_ownerInformation :: Lens' MaintenanceWindowTarget (Maybe Text)
maintenanceWindowTarget_ownerInformation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTarget' {Maybe (Sensitive Text)
ownerInformation :: Maybe (Sensitive Text)
$sel:ownerInformation:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe (Sensitive Text)
ownerInformation} -> Maybe (Sensitive Text)
ownerInformation) (\s :: MaintenanceWindowTarget
s@MaintenanceWindowTarget' {} Maybe (Sensitive Text)
a -> MaintenanceWindowTarget
s {$sel:ownerInformation:MaintenanceWindowTarget' :: Maybe (Sensitive Text)
ownerInformation = Maybe (Sensitive Text)
a} :: MaintenanceWindowTarget) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
maintenanceWindowTarget_resourceType :: Lens.Lens' MaintenanceWindowTarget (Prelude.Maybe MaintenanceWindowResourceType)
maintenanceWindowTarget_resourceType :: Lens' MaintenanceWindowTarget (Maybe MaintenanceWindowResourceType)
maintenanceWindowTarget_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTarget' {Maybe MaintenanceWindowResourceType
resourceType :: Maybe MaintenanceWindowResourceType
$sel:resourceType:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe MaintenanceWindowResourceType
resourceType} -> Maybe MaintenanceWindowResourceType
resourceType) (\s :: MaintenanceWindowTarget
s@MaintenanceWindowTarget' {} Maybe MaintenanceWindowResourceType
a -> MaintenanceWindowTarget
s {$sel:resourceType:MaintenanceWindowTarget' :: Maybe MaintenanceWindowResourceType
resourceType = Maybe MaintenanceWindowResourceType
a} :: MaintenanceWindowTarget)
maintenanceWindowTarget_targets :: Lens.Lens' MaintenanceWindowTarget (Prelude.Maybe [Target])
maintenanceWindowTarget_targets :: Lens' MaintenanceWindowTarget (Maybe [Target])
maintenanceWindowTarget_targets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTarget' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: MaintenanceWindowTarget
s@MaintenanceWindowTarget' {} Maybe [Target]
a -> MaintenanceWindowTarget
s {$sel:targets:MaintenanceWindowTarget' :: Maybe [Target]
targets = Maybe [Target]
a} :: MaintenanceWindowTarget) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
maintenanceWindowTarget_windowId :: Lens.Lens' MaintenanceWindowTarget (Prelude.Maybe Prelude.Text)
maintenanceWindowTarget_windowId :: Lens' MaintenanceWindowTarget (Maybe Text)
maintenanceWindowTarget_windowId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTarget' {Maybe Text
windowId :: Maybe Text
$sel:windowId:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe Text
windowId} -> Maybe Text
windowId) (\s :: MaintenanceWindowTarget
s@MaintenanceWindowTarget' {} Maybe Text
a -> MaintenanceWindowTarget
s {$sel:windowId:MaintenanceWindowTarget' :: Maybe Text
windowId = Maybe Text
a} :: MaintenanceWindowTarget)
maintenanceWindowTarget_windowTargetId :: Lens.Lens' MaintenanceWindowTarget (Prelude.Maybe Prelude.Text)
maintenanceWindowTarget_windowTargetId :: Lens' MaintenanceWindowTarget (Maybe Text)
maintenanceWindowTarget_windowTargetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MaintenanceWindowTarget' {Maybe Text
windowTargetId :: Maybe Text
$sel:windowTargetId:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe Text
windowTargetId} -> Maybe Text
windowTargetId) (\s :: MaintenanceWindowTarget
s@MaintenanceWindowTarget' {} Maybe Text
a -> MaintenanceWindowTarget
s {$sel:windowTargetId:MaintenanceWindowTarget' :: Maybe Text
windowTargetId = Maybe Text
a} :: MaintenanceWindowTarget)
instance Data.FromJSON MaintenanceWindowTarget where
parseJSON :: Value -> Parser MaintenanceWindowTarget
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MaintenanceWindowTarget"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe MaintenanceWindowResourceType
-> Maybe [Target]
-> Maybe Text
-> Maybe Text
-> MaintenanceWindowTarget
MaintenanceWindowTarget'
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
"Description")
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
"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
"OwnerInformation")
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
"ResourceType")
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
"Targets" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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")
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
"WindowTargetId")
)
instance Prelude.Hashable MaintenanceWindowTarget where
hashWithSalt :: Int -> MaintenanceWindowTarget -> Int
hashWithSalt Int
_salt MaintenanceWindowTarget' {Maybe [Target]
Maybe Text
Maybe (Sensitive Text)
Maybe MaintenanceWindowResourceType
windowTargetId :: Maybe Text
windowId :: Maybe Text
targets :: Maybe [Target]
resourceType :: Maybe MaintenanceWindowResourceType
ownerInformation :: Maybe (Sensitive Text)
name :: Maybe Text
description :: Maybe (Sensitive Text)
$sel:windowTargetId:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe Text
$sel:windowId:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe Text
$sel:targets:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe [Target]
$sel:resourceType:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe MaintenanceWindowResourceType
$sel:ownerInformation:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe (Sensitive Text)
$sel:name:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe Text
$sel:description:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe (Sensitive Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
ownerInformation
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MaintenanceWindowResourceType
resourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Target]
targets
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
windowId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
windowTargetId
instance Prelude.NFData MaintenanceWindowTarget where
rnf :: MaintenanceWindowTarget -> ()
rnf MaintenanceWindowTarget' {Maybe [Target]
Maybe Text
Maybe (Sensitive Text)
Maybe MaintenanceWindowResourceType
windowTargetId :: Maybe Text
windowId :: Maybe Text
targets :: Maybe [Target]
resourceType :: Maybe MaintenanceWindowResourceType
ownerInformation :: Maybe (Sensitive Text)
name :: Maybe Text
description :: Maybe (Sensitive Text)
$sel:windowTargetId:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe Text
$sel:windowId:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe Text
$sel:targets:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe [Target]
$sel:resourceType:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe MaintenanceWindowResourceType
$sel:ownerInformation:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe (Sensitive Text)
$sel:name:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe Text
$sel:description:MaintenanceWindowTarget' :: MaintenanceWindowTarget -> Maybe (Sensitive Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
description
seq :: forall a b. a -> b -> b
`Prelude.seq` 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 (Sensitive Text)
ownerInformation
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MaintenanceWindowResourceType
resourceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Target]
targets
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
windowId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
windowTargetId