{-# 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.PatchBaselineIdentity where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.OperatingSystem
data PatchBaselineIdentity = PatchBaselineIdentity'
{
PatchBaselineIdentity -> Maybe Text
baselineName :: Prelude.Maybe Prelude.Text,
PatchBaselineIdentity -> Maybe Text
baselineDescription :: Prelude.Maybe Prelude.Text,
PatchBaselineIdentity -> Maybe OperatingSystem
operatingSystem :: Prelude.Maybe OperatingSystem,
PatchBaselineIdentity -> Maybe Bool
defaultBaseline :: Prelude.Maybe Prelude.Bool,
PatchBaselineIdentity -> Maybe Text
baselineId :: Prelude.Maybe Prelude.Text
}
deriving (PatchBaselineIdentity -> PatchBaselineIdentity -> Bool
(PatchBaselineIdentity -> PatchBaselineIdentity -> Bool)
-> (PatchBaselineIdentity -> PatchBaselineIdentity -> Bool)
-> Eq PatchBaselineIdentity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PatchBaselineIdentity -> PatchBaselineIdentity -> Bool
$c/= :: PatchBaselineIdentity -> PatchBaselineIdentity -> Bool
== :: PatchBaselineIdentity -> PatchBaselineIdentity -> Bool
$c== :: PatchBaselineIdentity -> PatchBaselineIdentity -> Bool
Prelude.Eq, ReadPrec [PatchBaselineIdentity]
ReadPrec PatchBaselineIdentity
Int -> ReadS PatchBaselineIdentity
ReadS [PatchBaselineIdentity]
(Int -> ReadS PatchBaselineIdentity)
-> ReadS [PatchBaselineIdentity]
-> ReadPrec PatchBaselineIdentity
-> ReadPrec [PatchBaselineIdentity]
-> Read PatchBaselineIdentity
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PatchBaselineIdentity]
$creadListPrec :: ReadPrec [PatchBaselineIdentity]
readPrec :: ReadPrec PatchBaselineIdentity
$creadPrec :: ReadPrec PatchBaselineIdentity
readList :: ReadS [PatchBaselineIdentity]
$creadList :: ReadS [PatchBaselineIdentity]
readsPrec :: Int -> ReadS PatchBaselineIdentity
$creadsPrec :: Int -> ReadS PatchBaselineIdentity
Prelude.Read, Int -> PatchBaselineIdentity -> ShowS
[PatchBaselineIdentity] -> ShowS
PatchBaselineIdentity -> String
(Int -> PatchBaselineIdentity -> ShowS)
-> (PatchBaselineIdentity -> String)
-> ([PatchBaselineIdentity] -> ShowS)
-> Show PatchBaselineIdentity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PatchBaselineIdentity] -> ShowS
$cshowList :: [PatchBaselineIdentity] -> ShowS
show :: PatchBaselineIdentity -> String
$cshow :: PatchBaselineIdentity -> String
showsPrec :: Int -> PatchBaselineIdentity -> ShowS
$cshowsPrec :: Int -> PatchBaselineIdentity -> ShowS
Prelude.Show, (forall x. PatchBaselineIdentity -> Rep PatchBaselineIdentity x)
-> (forall x. Rep PatchBaselineIdentity x -> PatchBaselineIdentity)
-> Generic PatchBaselineIdentity
forall x. Rep PatchBaselineIdentity x -> PatchBaselineIdentity
forall x. PatchBaselineIdentity -> Rep PatchBaselineIdentity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PatchBaselineIdentity x -> PatchBaselineIdentity
$cfrom :: forall x. PatchBaselineIdentity -> Rep PatchBaselineIdentity x
Prelude.Generic)
newPatchBaselineIdentity ::
PatchBaselineIdentity
newPatchBaselineIdentity :: PatchBaselineIdentity
newPatchBaselineIdentity =
PatchBaselineIdentity' :: Maybe Text
-> Maybe Text
-> Maybe OperatingSystem
-> Maybe Bool
-> Maybe Text
-> PatchBaselineIdentity
PatchBaselineIdentity'
{ $sel:baselineName:PatchBaselineIdentity' :: Maybe Text
baselineName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:baselineDescription:PatchBaselineIdentity' :: Maybe Text
baselineDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:operatingSystem:PatchBaselineIdentity' :: Maybe OperatingSystem
operatingSystem = Maybe OperatingSystem
forall a. Maybe a
Prelude.Nothing,
$sel:defaultBaseline:PatchBaselineIdentity' :: Maybe Bool
defaultBaseline = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:baselineId:PatchBaselineIdentity' :: Maybe Text
baselineId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
patchBaselineIdentity_baselineName :: Lens.Lens' PatchBaselineIdentity (Prelude.Maybe Prelude.Text)
patchBaselineIdentity_baselineName :: (Maybe Text -> f (Maybe Text))
-> PatchBaselineIdentity -> f PatchBaselineIdentity
patchBaselineIdentity_baselineName = (PatchBaselineIdentity -> Maybe Text)
-> (PatchBaselineIdentity -> Maybe Text -> PatchBaselineIdentity)
-> Lens
PatchBaselineIdentity
PatchBaselineIdentity
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PatchBaselineIdentity' {Maybe Text
baselineName :: Maybe Text
$sel:baselineName:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe Text
baselineName} -> Maybe Text
baselineName) (\s :: PatchBaselineIdentity
s@PatchBaselineIdentity' {} Maybe Text
a -> PatchBaselineIdentity
s {$sel:baselineName:PatchBaselineIdentity' :: Maybe Text
baselineName = Maybe Text
a} :: PatchBaselineIdentity)
patchBaselineIdentity_baselineDescription :: Lens.Lens' PatchBaselineIdentity (Prelude.Maybe Prelude.Text)
patchBaselineIdentity_baselineDescription :: (Maybe Text -> f (Maybe Text))
-> PatchBaselineIdentity -> f PatchBaselineIdentity
patchBaselineIdentity_baselineDescription = (PatchBaselineIdentity -> Maybe Text)
-> (PatchBaselineIdentity -> Maybe Text -> PatchBaselineIdentity)
-> Lens
PatchBaselineIdentity
PatchBaselineIdentity
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PatchBaselineIdentity' {Maybe Text
baselineDescription :: Maybe Text
$sel:baselineDescription:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe Text
baselineDescription} -> Maybe Text
baselineDescription) (\s :: PatchBaselineIdentity
s@PatchBaselineIdentity' {} Maybe Text
a -> PatchBaselineIdentity
s {$sel:baselineDescription:PatchBaselineIdentity' :: Maybe Text
baselineDescription = Maybe Text
a} :: PatchBaselineIdentity)
patchBaselineIdentity_operatingSystem :: Lens.Lens' PatchBaselineIdentity (Prelude.Maybe OperatingSystem)
patchBaselineIdentity_operatingSystem :: (Maybe OperatingSystem -> f (Maybe OperatingSystem))
-> PatchBaselineIdentity -> f PatchBaselineIdentity
patchBaselineIdentity_operatingSystem = (PatchBaselineIdentity -> Maybe OperatingSystem)
-> (PatchBaselineIdentity
-> Maybe OperatingSystem -> PatchBaselineIdentity)
-> Lens
PatchBaselineIdentity
PatchBaselineIdentity
(Maybe OperatingSystem)
(Maybe OperatingSystem)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PatchBaselineIdentity' {Maybe OperatingSystem
operatingSystem :: Maybe OperatingSystem
$sel:operatingSystem:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe OperatingSystem
operatingSystem} -> Maybe OperatingSystem
operatingSystem) (\s :: PatchBaselineIdentity
s@PatchBaselineIdentity' {} Maybe OperatingSystem
a -> PatchBaselineIdentity
s {$sel:operatingSystem:PatchBaselineIdentity' :: Maybe OperatingSystem
operatingSystem = Maybe OperatingSystem
a} :: PatchBaselineIdentity)
patchBaselineIdentity_defaultBaseline :: Lens.Lens' PatchBaselineIdentity (Prelude.Maybe Prelude.Bool)
patchBaselineIdentity_defaultBaseline :: (Maybe Bool -> f (Maybe Bool))
-> PatchBaselineIdentity -> f PatchBaselineIdentity
patchBaselineIdentity_defaultBaseline = (PatchBaselineIdentity -> Maybe Bool)
-> (PatchBaselineIdentity -> Maybe Bool -> PatchBaselineIdentity)
-> Lens
PatchBaselineIdentity
PatchBaselineIdentity
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PatchBaselineIdentity' {Maybe Bool
defaultBaseline :: Maybe Bool
$sel:defaultBaseline:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe Bool
defaultBaseline} -> Maybe Bool
defaultBaseline) (\s :: PatchBaselineIdentity
s@PatchBaselineIdentity' {} Maybe Bool
a -> PatchBaselineIdentity
s {$sel:defaultBaseline:PatchBaselineIdentity' :: Maybe Bool
defaultBaseline = Maybe Bool
a} :: PatchBaselineIdentity)
patchBaselineIdentity_baselineId :: Lens.Lens' PatchBaselineIdentity (Prelude.Maybe Prelude.Text)
patchBaselineIdentity_baselineId :: (Maybe Text -> f (Maybe Text))
-> PatchBaselineIdentity -> f PatchBaselineIdentity
patchBaselineIdentity_baselineId = (PatchBaselineIdentity -> Maybe Text)
-> (PatchBaselineIdentity -> Maybe Text -> PatchBaselineIdentity)
-> Lens
PatchBaselineIdentity
PatchBaselineIdentity
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PatchBaselineIdentity' {Maybe Text
baselineId :: Maybe Text
$sel:baselineId:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe Text
baselineId} -> Maybe Text
baselineId) (\s :: PatchBaselineIdentity
s@PatchBaselineIdentity' {} Maybe Text
a -> PatchBaselineIdentity
s {$sel:baselineId:PatchBaselineIdentity' :: Maybe Text
baselineId = Maybe Text
a} :: PatchBaselineIdentity)
instance Core.FromJSON PatchBaselineIdentity where
parseJSON :: Value -> Parser PatchBaselineIdentity
parseJSON =
String
-> (Object -> Parser PatchBaselineIdentity)
-> Value
-> Parser PatchBaselineIdentity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PatchBaselineIdentity"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe OperatingSystem
-> Maybe Bool
-> Maybe Text
-> PatchBaselineIdentity
PatchBaselineIdentity'
(Maybe Text
-> Maybe Text
-> Maybe OperatingSystem
-> Maybe Bool
-> Maybe Text
-> PatchBaselineIdentity)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe OperatingSystem
-> Maybe Bool
-> Maybe Text
-> PatchBaselineIdentity)
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
"BaselineName")
Parser
(Maybe Text
-> Maybe OperatingSystem
-> Maybe Bool
-> Maybe Text
-> PatchBaselineIdentity)
-> Parser (Maybe Text)
-> Parser
(Maybe OperatingSystem
-> Maybe Bool -> Maybe Text -> PatchBaselineIdentity)
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
"BaselineDescription")
Parser
(Maybe OperatingSystem
-> Maybe Bool -> Maybe Text -> PatchBaselineIdentity)
-> Parser (Maybe OperatingSystem)
-> Parser (Maybe Bool -> Maybe Text -> PatchBaselineIdentity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OperatingSystem)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OperatingSystem")
Parser (Maybe Bool -> Maybe Text -> PatchBaselineIdentity)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> PatchBaselineIdentity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultBaseline")
Parser (Maybe Text -> PatchBaselineIdentity)
-> Parser (Maybe Text) -> Parser PatchBaselineIdentity
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
"BaselineId")
)
instance Prelude.Hashable PatchBaselineIdentity
instance Prelude.NFData PatchBaselineIdentity