{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.OperatingSystem
data PatchBaselineIdentity = PatchBaselineIdentity'
{
PatchBaselineIdentity -> Maybe Text
baselineDescription :: Prelude.Maybe Prelude.Text,
PatchBaselineIdentity -> Maybe Text
baselineId :: Prelude.Maybe Prelude.Text,
PatchBaselineIdentity -> Maybe Text
baselineName :: Prelude.Maybe Prelude.Text,
PatchBaselineIdentity -> Maybe Bool
defaultBaseline :: Prelude.Maybe Prelude.Bool,
PatchBaselineIdentity -> Maybe OperatingSystem
operatingSystem :: Prelude.Maybe OperatingSystem
}
deriving (PatchBaselineIdentity -> PatchBaselineIdentity -> Bool
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]
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
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. 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'
{ $sel:baselineDescription:PatchBaselineIdentity' :: Maybe Text
baselineDescription =
forall a. Maybe a
Prelude.Nothing,
$sel:baselineId:PatchBaselineIdentity' :: Maybe Text
baselineId = forall a. Maybe a
Prelude.Nothing,
$sel:baselineName:PatchBaselineIdentity' :: Maybe Text
baselineName = forall a. Maybe a
Prelude.Nothing,
$sel:defaultBaseline:PatchBaselineIdentity' :: Maybe Bool
defaultBaseline = forall a. Maybe a
Prelude.Nothing,
$sel:operatingSystem:PatchBaselineIdentity' :: Maybe OperatingSystem
operatingSystem = forall a. Maybe a
Prelude.Nothing
}
patchBaselineIdentity_baselineDescription :: Lens.Lens' PatchBaselineIdentity (Prelude.Maybe Prelude.Text)
patchBaselineIdentity_baselineDescription :: Lens' PatchBaselineIdentity (Maybe Text)
patchBaselineIdentity_baselineDescription = 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_baselineId :: Lens.Lens' PatchBaselineIdentity (Prelude.Maybe Prelude.Text)
patchBaselineIdentity_baselineId :: Lens' PatchBaselineIdentity (Maybe Text)
patchBaselineIdentity_baselineId = 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)
patchBaselineIdentity_baselineName :: Lens.Lens' PatchBaselineIdentity (Prelude.Maybe Prelude.Text)
patchBaselineIdentity_baselineName :: Lens' PatchBaselineIdentity (Maybe Text)
patchBaselineIdentity_baselineName = 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_defaultBaseline :: Lens.Lens' PatchBaselineIdentity (Prelude.Maybe Prelude.Bool)
patchBaselineIdentity_defaultBaseline :: Lens' PatchBaselineIdentity (Maybe Bool)
patchBaselineIdentity_defaultBaseline = 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_operatingSystem :: Lens.Lens' PatchBaselineIdentity (Prelude.Maybe OperatingSystem)
patchBaselineIdentity_operatingSystem :: Lens' PatchBaselineIdentity (Maybe OperatingSystem)
patchBaselineIdentity_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)
instance Data.FromJSON PatchBaselineIdentity where
parseJSON :: Value -> Parser PatchBaselineIdentity
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PatchBaselineIdentity"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe OperatingSystem
-> PatchBaselineIdentity
PatchBaselineIdentity'
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
"BaselineDescription")
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
"BaselineId")
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
"BaselineName")
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
"DefaultBaseline")
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
"OperatingSystem")
)
instance Prelude.Hashable PatchBaselineIdentity where
hashWithSalt :: Int -> PatchBaselineIdentity -> Int
hashWithSalt Int
_salt PatchBaselineIdentity' {Maybe Bool
Maybe Text
Maybe OperatingSystem
operatingSystem :: Maybe OperatingSystem
defaultBaseline :: Maybe Bool
baselineName :: Maybe Text
baselineId :: Maybe Text
baselineDescription :: Maybe Text
$sel:operatingSystem:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe OperatingSystem
$sel:defaultBaseline:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe Bool
$sel:baselineName:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe Text
$sel:baselineId:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe Text
$sel:baselineDescription:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
baselineDescription
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
baselineId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
baselineName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
defaultBaseline
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OperatingSystem
operatingSystem
instance Prelude.NFData PatchBaselineIdentity where
rnf :: PatchBaselineIdentity -> ()
rnf PatchBaselineIdentity' {Maybe Bool
Maybe Text
Maybe OperatingSystem
operatingSystem :: Maybe OperatingSystem
defaultBaseline :: Maybe Bool
baselineName :: Maybe Text
baselineId :: Maybe Text
baselineDescription :: Maybe Text
$sel:operatingSystem:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe OperatingSystem
$sel:defaultBaseline:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe Bool
$sel:baselineName:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe Text
$sel:baselineId:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe Text
$sel:baselineDescription:PatchBaselineIdentity' :: PatchBaselineIdentity -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
baselineDescription
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
baselineId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
baselineName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
defaultBaseline
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OperatingSystem
operatingSystem