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