{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SSM.Types.InstancePatchState
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SSM.Types.InstancePatchState where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.PatchOperationType
import Amazonka.SSM.Types.RebootOption

-- | Defines the high-level patch compliance state for a managed instance,
-- providing information about the number of installed, missing, not
-- applicable, and failed patches along with metadata about the operation
-- when this information was gathered for the instance.
--
-- /See:/ 'newInstancePatchState' smart constructor.
data InstancePatchState = InstancePatchState'
  { -- | The number of patches beyond the supported limit of @NotApplicableCount@
    -- that aren\'t reported by name to Inventory. Inventory is a capability of
    -- Amazon Web Services Systems Manager.
    InstancePatchState -> Maybe Int
unreportedNotApplicableCount :: Prelude.Maybe Prelude.Int,
    -- | The number of instances with patches installed that are specified as
    -- other than @Critical@ or @Security@ but aren\'t compliant with the patch
    -- baseline. The status of these instances is @NON_COMPLIANT@.
    InstancePatchState -> Maybe Int
otherNonCompliantCount :: Prelude.Maybe Prelude.Int,
    -- | Indicates the reboot option specified in the patch baseline.
    --
    -- Reboot options apply to @Install@ operations only. Reboots aren\'t
    -- attempted for Patch Manager @Scan@ operations.
    --
    -- -   @RebootIfNeeded@: Patch Manager tries to reboot the instance if it
    --     installed any patches, or if any patches are detected with a status
    --     of @InstalledPendingReboot@.
    --
    -- -   @NoReboot@: Patch Manager attempts to install missing packages
    --     without trying to reboot the system. Patches installed with this
    --     option are assigned a status of @InstalledPendingReboot@. These
    --     patches might not be in effect until a reboot is performed.
    InstancePatchState -> Maybe RebootOption
rebootOption :: Prelude.Maybe RebootOption,
    -- | The number of patches installed by Patch Manager since the last time the
    -- instance was rebooted.
    InstancePatchState -> Maybe Int
installedPendingRebootCount :: Prelude.Maybe Prelude.Int,
    -- | Placeholder information. This field will always be empty in the current
    -- release of the service.
    InstancePatchState -> Maybe (Sensitive Text)
ownerInformation :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The number of instances where patches that are specified as @Security@
    -- in a patch advisory aren\'t installed. These patches might be missing,
    -- have failed installation, were rejected, or were installed but awaiting
    -- a required instance reboot. The status of these instances is
    -- @NON_COMPLIANT@.
    InstancePatchState -> Maybe Int
securityNonCompliantCount :: Prelude.Maybe Prelude.Int,
    -- | The number of patches installed on an instance that are specified in a
    -- @RejectedPatches@ list. Patches with a status of @InstalledRejected@
    -- were typically installed before they were added to a @RejectedPatches@
    -- list.
    --
    -- If @ALLOW_AS_DEPENDENCY@ is the specified option for
    -- @RejectedPatchesAction@, the value of @InstalledRejectedCount@ will
    -- always be @0@ (zero).
    InstancePatchState -> Maybe Int
installedRejectedCount :: Prelude.Maybe Prelude.Int,
    -- | The number of patches from the patch baseline that were attempted to be
    -- installed during the last patching operation, but failed to install.
    InstancePatchState -> Maybe Int
failedCount :: Prelude.Maybe Prelude.Int,
    -- | The number of patches not specified in the patch baseline that are
    -- installed on the instance.
    InstancePatchState -> Maybe Int
installedOtherCount :: Prelude.Maybe Prelude.Int,
    -- | The number of patches from the patch baseline that are applicable for
    -- the instance but aren\'t currently installed.
    InstancePatchState -> Maybe Int
missingCount :: Prelude.Maybe Prelude.Int,
    -- | An https URL or an Amazon Simple Storage Service (Amazon S3) path-style
    -- URL to a list of patches to be installed. This patch installation list,
    -- which you maintain in an S3 bucket in YAML format and specify in the SSM
    -- document @AWS-RunPatchBaseline@, overrides the patches specified by the
    -- default patch baseline.
    --
    -- For more information about the @InstallOverrideList@ parameter, see
    -- <https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html About the AWS-RunPatchBaseline>
    -- SSM document in the /Amazon Web Services Systems Manager User Guide/.
    InstancePatchState -> Maybe Text
installOverrideList :: Prelude.Maybe Prelude.Text,
    -- | The number of instances where patches that are specified as @Critical@
    -- for compliance reporting in the patch baseline aren\'t installed. These
    -- patches might be missing, have failed installation, were rejected, or
    -- were installed but awaiting a required instance reboot. The status of
    -- these instances is @NON_COMPLIANT@.
    InstancePatchState -> Maybe Int
criticalNonCompliantCount :: Prelude.Maybe Prelude.Int,
    -- | The number of patches from the patch baseline that aren\'t applicable
    -- for the instance and therefore aren\'t installed on the instance. This
    -- number may be truncated if the list of patch names is very large. The
    -- number of patches beyond this limit are reported in
    -- @UnreportedNotApplicableCount@.
    InstancePatchState -> Maybe Int
notApplicableCount :: Prelude.Maybe Prelude.Int,
    -- | The number of patches from the patch baseline that are installed on the
    -- instance.
    InstancePatchState -> Maybe Int
installedCount :: Prelude.Maybe Prelude.Int,
    -- | The time of the last attempt to patch the instance with @NoReboot@
    -- specified as the reboot option.
    InstancePatchState -> Maybe POSIX
lastNoRebootInstallOperationTime :: Prelude.Maybe Core.POSIX,
    -- | The ID of the patch baseline snapshot used during the patching operation
    -- when this compliance data was collected.
    InstancePatchState -> Maybe Text
snapshotId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the managed instance the high-level patch compliance
    -- information was collected for.
    InstancePatchState -> Text
instanceId :: Prelude.Text,
    -- | The name of the patch group the managed instance belongs to.
    InstancePatchState -> Text
patchGroup :: Prelude.Text,
    -- | The ID of the patch baseline used to patch the instance.
    InstancePatchState -> Text
baselineId :: Prelude.Text,
    -- | The time the most recent patching operation was started on the instance.
    InstancePatchState -> POSIX
operationStartTime :: Core.POSIX,
    -- | The time the most recent patching operation completed on the instance.
    InstancePatchState -> POSIX
operationEndTime :: Core.POSIX,
    -- | The type of patching operation that was performed: or
    --
    -- -   @SCAN@ assesses the patch compliance state.
    --
    -- -   @INSTALL@ installs missing patches.
    InstancePatchState -> PatchOperationType
operation :: PatchOperationType
  }
  deriving (InstancePatchState -> InstancePatchState -> Bool
(InstancePatchState -> InstancePatchState -> Bool)
-> (InstancePatchState -> InstancePatchState -> Bool)
-> Eq InstancePatchState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstancePatchState -> InstancePatchState -> Bool
$c/= :: InstancePatchState -> InstancePatchState -> Bool
== :: InstancePatchState -> InstancePatchState -> Bool
$c== :: InstancePatchState -> InstancePatchState -> Bool
Prelude.Eq, Int -> InstancePatchState -> ShowS
[InstancePatchState] -> ShowS
InstancePatchState -> String
(Int -> InstancePatchState -> ShowS)
-> (InstancePatchState -> String)
-> ([InstancePatchState] -> ShowS)
-> Show InstancePatchState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstancePatchState] -> ShowS
$cshowList :: [InstancePatchState] -> ShowS
show :: InstancePatchState -> String
$cshow :: InstancePatchState -> String
showsPrec :: Int -> InstancePatchState -> ShowS
$cshowsPrec :: Int -> InstancePatchState -> ShowS
Prelude.Show, (forall x. InstancePatchState -> Rep InstancePatchState x)
-> (forall x. Rep InstancePatchState x -> InstancePatchState)
-> Generic InstancePatchState
forall x. Rep InstancePatchState x -> InstancePatchState
forall x. InstancePatchState -> Rep InstancePatchState x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstancePatchState x -> InstancePatchState
$cfrom :: forall x. InstancePatchState -> Rep InstancePatchState x
Prelude.Generic)

-- |
-- Create a value of 'InstancePatchState' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'unreportedNotApplicableCount', 'instancePatchState_unreportedNotApplicableCount' - The number of patches beyond the supported limit of @NotApplicableCount@
-- that aren\'t reported by name to Inventory. Inventory is a capability of
-- Amazon Web Services Systems Manager.
--
-- 'otherNonCompliantCount', 'instancePatchState_otherNonCompliantCount' - The number of instances with patches installed that are specified as
-- other than @Critical@ or @Security@ but aren\'t compliant with the patch
-- baseline. The status of these instances is @NON_COMPLIANT@.
--
-- 'rebootOption', 'instancePatchState_rebootOption' - Indicates the reboot option specified in the patch baseline.
--
-- Reboot options apply to @Install@ operations only. Reboots aren\'t
-- attempted for Patch Manager @Scan@ operations.
--
-- -   @RebootIfNeeded@: Patch Manager tries to reboot the instance if it
--     installed any patches, or if any patches are detected with a status
--     of @InstalledPendingReboot@.
--
-- -   @NoReboot@: Patch Manager attempts to install missing packages
--     without trying to reboot the system. Patches installed with this
--     option are assigned a status of @InstalledPendingReboot@. These
--     patches might not be in effect until a reboot is performed.
--
-- 'installedPendingRebootCount', 'instancePatchState_installedPendingRebootCount' - The number of patches installed by Patch Manager since the last time the
-- instance was rebooted.
--
-- 'ownerInformation', 'instancePatchState_ownerInformation' - Placeholder information. This field will always be empty in the current
-- release of the service.
--
-- 'securityNonCompliantCount', 'instancePatchState_securityNonCompliantCount' - The number of instances where patches that are specified as @Security@
-- in a patch advisory aren\'t installed. These patches might be missing,
-- have failed installation, were rejected, or were installed but awaiting
-- a required instance reboot. The status of these instances is
-- @NON_COMPLIANT@.
--
-- 'installedRejectedCount', 'instancePatchState_installedRejectedCount' - The number of patches installed on an instance that are specified in a
-- @RejectedPatches@ list. Patches with a status of @InstalledRejected@
-- were typically installed before they were added to a @RejectedPatches@
-- list.
--
-- If @ALLOW_AS_DEPENDENCY@ is the specified option for
-- @RejectedPatchesAction@, the value of @InstalledRejectedCount@ will
-- always be @0@ (zero).
--
-- 'failedCount', 'instancePatchState_failedCount' - The number of patches from the patch baseline that were attempted to be
-- installed during the last patching operation, but failed to install.
--
-- 'installedOtherCount', 'instancePatchState_installedOtherCount' - The number of patches not specified in the patch baseline that are
-- installed on the instance.
--
-- 'missingCount', 'instancePatchState_missingCount' - The number of patches from the patch baseline that are applicable for
-- the instance but aren\'t currently installed.
--
-- 'installOverrideList', 'instancePatchState_installOverrideList' - An https URL or an Amazon Simple Storage Service (Amazon S3) path-style
-- URL to a list of patches to be installed. This patch installation list,
-- which you maintain in an S3 bucket in YAML format and specify in the SSM
-- document @AWS-RunPatchBaseline@, overrides the patches specified by the
-- default patch baseline.
--
-- For more information about the @InstallOverrideList@ parameter, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html About the AWS-RunPatchBaseline>
-- SSM document in the /Amazon Web Services Systems Manager User Guide/.
--
-- 'criticalNonCompliantCount', 'instancePatchState_criticalNonCompliantCount' - The number of instances where patches that are specified as @Critical@
-- for compliance reporting in the patch baseline aren\'t installed. These
-- patches might be missing, have failed installation, were rejected, or
-- were installed but awaiting a required instance reboot. The status of
-- these instances is @NON_COMPLIANT@.
--
-- 'notApplicableCount', 'instancePatchState_notApplicableCount' - The number of patches from the patch baseline that aren\'t applicable
-- for the instance and therefore aren\'t installed on the instance. This
-- number may be truncated if the list of patch names is very large. The
-- number of patches beyond this limit are reported in
-- @UnreportedNotApplicableCount@.
--
-- 'installedCount', 'instancePatchState_installedCount' - The number of patches from the patch baseline that are installed on the
-- instance.
--
-- 'lastNoRebootInstallOperationTime', 'instancePatchState_lastNoRebootInstallOperationTime' - The time of the last attempt to patch the instance with @NoReboot@
-- specified as the reboot option.
--
-- 'snapshotId', 'instancePatchState_snapshotId' - The ID of the patch baseline snapshot used during the patching operation
-- when this compliance data was collected.
--
-- 'instanceId', 'instancePatchState_instanceId' - The ID of the managed instance the high-level patch compliance
-- information was collected for.
--
-- 'patchGroup', 'instancePatchState_patchGroup' - The name of the patch group the managed instance belongs to.
--
-- 'baselineId', 'instancePatchState_baselineId' - The ID of the patch baseline used to patch the instance.
--
-- 'operationStartTime', 'instancePatchState_operationStartTime' - The time the most recent patching operation was started on the instance.
--
-- 'operationEndTime', 'instancePatchState_operationEndTime' - The time the most recent patching operation completed on the instance.
--
-- 'operation', 'instancePatchState_operation' - The type of patching operation that was performed: or
--
-- -   @SCAN@ assesses the patch compliance state.
--
-- -   @INSTALL@ installs missing patches.
newInstancePatchState ::
  -- | 'instanceId'
  Prelude.Text ->
  -- | 'patchGroup'
  Prelude.Text ->
  -- | 'baselineId'
  Prelude.Text ->
  -- | 'operationStartTime'
  Prelude.UTCTime ->
  -- | 'operationEndTime'
  Prelude.UTCTime ->
  -- | 'operation'
  PatchOperationType ->
  InstancePatchState
newInstancePatchState :: Text
-> Text
-> Text
-> UTCTime
-> UTCTime
-> PatchOperationType
-> InstancePatchState
newInstancePatchState
  Text
pInstanceId_
  Text
pPatchGroup_
  Text
pBaselineId_
  UTCTime
pOperationStartTime_
  UTCTime
pOperationEndTime_
  PatchOperationType
pOperation_ =
    InstancePatchState' :: Maybe Int
-> Maybe Int
-> Maybe RebootOption
-> Maybe Int
-> Maybe (Sensitive Text)
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Text
-> Text
-> Text
-> POSIX
-> POSIX
-> PatchOperationType
-> InstancePatchState
InstancePatchState'
      { $sel:unreportedNotApplicableCount:InstancePatchState' :: Maybe Int
unreportedNotApplicableCount =
          Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:otherNonCompliantCount:InstancePatchState' :: Maybe Int
otherNonCompliantCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:rebootOption:InstancePatchState' :: Maybe RebootOption
rebootOption = Maybe RebootOption
forall a. Maybe a
Prelude.Nothing,
        $sel:installedPendingRebootCount:InstancePatchState' :: Maybe Int
installedPendingRebootCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:ownerInformation:InstancePatchState' :: Maybe (Sensitive Text)
ownerInformation = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:securityNonCompliantCount:InstancePatchState' :: Maybe Int
securityNonCompliantCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:installedRejectedCount:InstancePatchState' :: Maybe Int
installedRejectedCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:failedCount:InstancePatchState' :: Maybe Int
failedCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:installedOtherCount:InstancePatchState' :: Maybe Int
installedOtherCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:missingCount:InstancePatchState' :: Maybe Int
missingCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:installOverrideList:InstancePatchState' :: Maybe Text
installOverrideList = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:criticalNonCompliantCount:InstancePatchState' :: Maybe Int
criticalNonCompliantCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:notApplicableCount:InstancePatchState' :: Maybe Int
notApplicableCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:installedCount:InstancePatchState' :: Maybe Int
installedCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:lastNoRebootInstallOperationTime:InstancePatchState' :: Maybe POSIX
lastNoRebootInstallOperationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:snapshotId:InstancePatchState' :: Maybe Text
snapshotId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:instanceId:InstancePatchState' :: Text
instanceId = Text
pInstanceId_,
        $sel:patchGroup:InstancePatchState' :: Text
patchGroup = Text
pPatchGroup_,
        $sel:baselineId:InstancePatchState' :: Text
baselineId = Text
pBaselineId_,
        $sel:operationStartTime:InstancePatchState' :: POSIX
operationStartTime =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pOperationStartTime_,
        $sel:operationEndTime:InstancePatchState' :: POSIX
operationEndTime =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pOperationEndTime_,
        $sel:operation:InstancePatchState' :: PatchOperationType
operation = PatchOperationType
pOperation_
      }

-- | The number of patches beyond the supported limit of @NotApplicableCount@
-- that aren\'t reported by name to Inventory. Inventory is a capability of
-- Amazon Web Services Systems Manager.
instancePatchState_unreportedNotApplicableCount :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Int)
instancePatchState_unreportedNotApplicableCount :: (Maybe Int -> f (Maybe Int))
-> InstancePatchState -> f InstancePatchState
instancePatchState_unreportedNotApplicableCount = (InstancePatchState -> Maybe Int)
-> (InstancePatchState -> Maybe Int -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe Int
unreportedNotApplicableCount :: Maybe Int
$sel:unreportedNotApplicableCount:InstancePatchState' :: InstancePatchState -> Maybe Int
unreportedNotApplicableCount} -> Maybe Int
unreportedNotApplicableCount) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe Int
a -> InstancePatchState
s {$sel:unreportedNotApplicableCount:InstancePatchState' :: Maybe Int
unreportedNotApplicableCount = Maybe Int
a} :: InstancePatchState)

-- | The number of instances with patches installed that are specified as
-- other than @Critical@ or @Security@ but aren\'t compliant with the patch
-- baseline. The status of these instances is @NON_COMPLIANT@.
instancePatchState_otherNonCompliantCount :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Int)
instancePatchState_otherNonCompliantCount :: (Maybe Int -> f (Maybe Int))
-> InstancePatchState -> f InstancePatchState
instancePatchState_otherNonCompliantCount = (InstancePatchState -> Maybe Int)
-> (InstancePatchState -> Maybe Int -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe Int
otherNonCompliantCount :: Maybe Int
$sel:otherNonCompliantCount:InstancePatchState' :: InstancePatchState -> Maybe Int
otherNonCompliantCount} -> Maybe Int
otherNonCompliantCount) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe Int
a -> InstancePatchState
s {$sel:otherNonCompliantCount:InstancePatchState' :: Maybe Int
otherNonCompliantCount = Maybe Int
a} :: InstancePatchState)

-- | Indicates the reboot option specified in the patch baseline.
--
-- Reboot options apply to @Install@ operations only. Reboots aren\'t
-- attempted for Patch Manager @Scan@ operations.
--
-- -   @RebootIfNeeded@: Patch Manager tries to reboot the instance if it
--     installed any patches, or if any patches are detected with a status
--     of @InstalledPendingReboot@.
--
-- -   @NoReboot@: Patch Manager attempts to install missing packages
--     without trying to reboot the system. Patches installed with this
--     option are assigned a status of @InstalledPendingReboot@. These
--     patches might not be in effect until a reboot is performed.
instancePatchState_rebootOption :: Lens.Lens' InstancePatchState (Prelude.Maybe RebootOption)
instancePatchState_rebootOption :: (Maybe RebootOption -> f (Maybe RebootOption))
-> InstancePatchState -> f InstancePatchState
instancePatchState_rebootOption = (InstancePatchState -> Maybe RebootOption)
-> (InstancePatchState -> Maybe RebootOption -> InstancePatchState)
-> Lens
     InstancePatchState
     InstancePatchState
     (Maybe RebootOption)
     (Maybe RebootOption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe RebootOption
rebootOption :: Maybe RebootOption
$sel:rebootOption:InstancePatchState' :: InstancePatchState -> Maybe RebootOption
rebootOption} -> Maybe RebootOption
rebootOption) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe RebootOption
a -> InstancePatchState
s {$sel:rebootOption:InstancePatchState' :: Maybe RebootOption
rebootOption = Maybe RebootOption
a} :: InstancePatchState)

-- | The number of patches installed by Patch Manager since the last time the
-- instance was rebooted.
instancePatchState_installedPendingRebootCount :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Int)
instancePatchState_installedPendingRebootCount :: (Maybe Int -> f (Maybe Int))
-> InstancePatchState -> f InstancePatchState
instancePatchState_installedPendingRebootCount = (InstancePatchState -> Maybe Int)
-> (InstancePatchState -> Maybe Int -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe Int
installedPendingRebootCount :: Maybe Int
$sel:installedPendingRebootCount:InstancePatchState' :: InstancePatchState -> Maybe Int
installedPendingRebootCount} -> Maybe Int
installedPendingRebootCount) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe Int
a -> InstancePatchState
s {$sel:installedPendingRebootCount:InstancePatchState' :: Maybe Int
installedPendingRebootCount = Maybe Int
a} :: InstancePatchState)

-- | Placeholder information. This field will always be empty in the current
-- release of the service.
instancePatchState_ownerInformation :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Text)
instancePatchState_ownerInformation :: (Maybe Text -> f (Maybe Text))
-> InstancePatchState -> f InstancePatchState
instancePatchState_ownerInformation = (InstancePatchState -> Maybe (Sensitive Text))
-> (InstancePatchState
    -> Maybe (Sensitive Text) -> InstancePatchState)
-> Lens
     InstancePatchState
     InstancePatchState
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe (Sensitive Text)
ownerInformation :: Maybe (Sensitive Text)
$sel:ownerInformation:InstancePatchState' :: InstancePatchState -> Maybe (Sensitive Text)
ownerInformation} -> Maybe (Sensitive Text)
ownerInformation) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe (Sensitive Text)
a -> InstancePatchState
s {$sel:ownerInformation:InstancePatchState' :: Maybe (Sensitive Text)
ownerInformation = Maybe (Sensitive Text)
a} :: InstancePatchState) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> InstancePatchState -> f InstancePatchState)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> InstancePatchState
-> f InstancePatchState
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
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 AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The number of instances where patches that are specified as @Security@
-- in a patch advisory aren\'t installed. These patches might be missing,
-- have failed installation, were rejected, or were installed but awaiting
-- a required instance reboot. The status of these instances is
-- @NON_COMPLIANT@.
instancePatchState_securityNonCompliantCount :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Int)
instancePatchState_securityNonCompliantCount :: (Maybe Int -> f (Maybe Int))
-> InstancePatchState -> f InstancePatchState
instancePatchState_securityNonCompliantCount = (InstancePatchState -> Maybe Int)
-> (InstancePatchState -> Maybe Int -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe Int
securityNonCompliantCount :: Maybe Int
$sel:securityNonCompliantCount:InstancePatchState' :: InstancePatchState -> Maybe Int
securityNonCompliantCount} -> Maybe Int
securityNonCompliantCount) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe Int
a -> InstancePatchState
s {$sel:securityNonCompliantCount:InstancePatchState' :: Maybe Int
securityNonCompliantCount = Maybe Int
a} :: InstancePatchState)

-- | The number of patches installed on an instance that are specified in a
-- @RejectedPatches@ list. Patches with a status of @InstalledRejected@
-- were typically installed before they were added to a @RejectedPatches@
-- list.
--
-- If @ALLOW_AS_DEPENDENCY@ is the specified option for
-- @RejectedPatchesAction@, the value of @InstalledRejectedCount@ will
-- always be @0@ (zero).
instancePatchState_installedRejectedCount :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Int)
instancePatchState_installedRejectedCount :: (Maybe Int -> f (Maybe Int))
-> InstancePatchState -> f InstancePatchState
instancePatchState_installedRejectedCount = (InstancePatchState -> Maybe Int)
-> (InstancePatchState -> Maybe Int -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe Int
installedRejectedCount :: Maybe Int
$sel:installedRejectedCount:InstancePatchState' :: InstancePatchState -> Maybe Int
installedRejectedCount} -> Maybe Int
installedRejectedCount) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe Int
a -> InstancePatchState
s {$sel:installedRejectedCount:InstancePatchState' :: Maybe Int
installedRejectedCount = Maybe Int
a} :: InstancePatchState)

-- | The number of patches from the patch baseline that were attempted to be
-- installed during the last patching operation, but failed to install.
instancePatchState_failedCount :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Int)
instancePatchState_failedCount :: (Maybe Int -> f (Maybe Int))
-> InstancePatchState -> f InstancePatchState
instancePatchState_failedCount = (InstancePatchState -> Maybe Int)
-> (InstancePatchState -> Maybe Int -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe Int
failedCount :: Maybe Int
$sel:failedCount:InstancePatchState' :: InstancePatchState -> Maybe Int
failedCount} -> Maybe Int
failedCount) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe Int
a -> InstancePatchState
s {$sel:failedCount:InstancePatchState' :: Maybe Int
failedCount = Maybe Int
a} :: InstancePatchState)

-- | The number of patches not specified in the patch baseline that are
-- installed on the instance.
instancePatchState_installedOtherCount :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Int)
instancePatchState_installedOtherCount :: (Maybe Int -> f (Maybe Int))
-> InstancePatchState -> f InstancePatchState
instancePatchState_installedOtherCount = (InstancePatchState -> Maybe Int)
-> (InstancePatchState -> Maybe Int -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe Int
installedOtherCount :: Maybe Int
$sel:installedOtherCount:InstancePatchState' :: InstancePatchState -> Maybe Int
installedOtherCount} -> Maybe Int
installedOtherCount) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe Int
a -> InstancePatchState
s {$sel:installedOtherCount:InstancePatchState' :: Maybe Int
installedOtherCount = Maybe Int
a} :: InstancePatchState)

-- | The number of patches from the patch baseline that are applicable for
-- the instance but aren\'t currently installed.
instancePatchState_missingCount :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Int)
instancePatchState_missingCount :: (Maybe Int -> f (Maybe Int))
-> InstancePatchState -> f InstancePatchState
instancePatchState_missingCount = (InstancePatchState -> Maybe Int)
-> (InstancePatchState -> Maybe Int -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe Int
missingCount :: Maybe Int
$sel:missingCount:InstancePatchState' :: InstancePatchState -> Maybe Int
missingCount} -> Maybe Int
missingCount) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe Int
a -> InstancePatchState
s {$sel:missingCount:InstancePatchState' :: Maybe Int
missingCount = Maybe Int
a} :: InstancePatchState)

-- | An https URL or an Amazon Simple Storage Service (Amazon S3) path-style
-- URL to a list of patches to be installed. This patch installation list,
-- which you maintain in an S3 bucket in YAML format and specify in the SSM
-- document @AWS-RunPatchBaseline@, overrides the patches specified by the
-- default patch baseline.
--
-- For more information about the @InstallOverrideList@ parameter, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html About the AWS-RunPatchBaseline>
-- SSM document in the /Amazon Web Services Systems Manager User Guide/.
instancePatchState_installOverrideList :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Text)
instancePatchState_installOverrideList :: (Maybe Text -> f (Maybe Text))
-> InstancePatchState -> f InstancePatchState
instancePatchState_installOverrideList = (InstancePatchState -> Maybe Text)
-> (InstancePatchState -> Maybe Text -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe Text
installOverrideList :: Maybe Text
$sel:installOverrideList:InstancePatchState' :: InstancePatchState -> Maybe Text
installOverrideList} -> Maybe Text
installOverrideList) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe Text
a -> InstancePatchState
s {$sel:installOverrideList:InstancePatchState' :: Maybe Text
installOverrideList = Maybe Text
a} :: InstancePatchState)

-- | The number of instances where patches that are specified as @Critical@
-- for compliance reporting in the patch baseline aren\'t installed. These
-- patches might be missing, have failed installation, were rejected, or
-- were installed but awaiting a required instance reboot. The status of
-- these instances is @NON_COMPLIANT@.
instancePatchState_criticalNonCompliantCount :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Int)
instancePatchState_criticalNonCompliantCount :: (Maybe Int -> f (Maybe Int))
-> InstancePatchState -> f InstancePatchState
instancePatchState_criticalNonCompliantCount = (InstancePatchState -> Maybe Int)
-> (InstancePatchState -> Maybe Int -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe Int
criticalNonCompliantCount :: Maybe Int
$sel:criticalNonCompliantCount:InstancePatchState' :: InstancePatchState -> Maybe Int
criticalNonCompliantCount} -> Maybe Int
criticalNonCompliantCount) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe Int
a -> InstancePatchState
s {$sel:criticalNonCompliantCount:InstancePatchState' :: Maybe Int
criticalNonCompliantCount = Maybe Int
a} :: InstancePatchState)

-- | The number of patches from the patch baseline that aren\'t applicable
-- for the instance and therefore aren\'t installed on the instance. This
-- number may be truncated if the list of patch names is very large. The
-- number of patches beyond this limit are reported in
-- @UnreportedNotApplicableCount@.
instancePatchState_notApplicableCount :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Int)
instancePatchState_notApplicableCount :: (Maybe Int -> f (Maybe Int))
-> InstancePatchState -> f InstancePatchState
instancePatchState_notApplicableCount = (InstancePatchState -> Maybe Int)
-> (InstancePatchState -> Maybe Int -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe Int
notApplicableCount :: Maybe Int
$sel:notApplicableCount:InstancePatchState' :: InstancePatchState -> Maybe Int
notApplicableCount} -> Maybe Int
notApplicableCount) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe Int
a -> InstancePatchState
s {$sel:notApplicableCount:InstancePatchState' :: Maybe Int
notApplicableCount = Maybe Int
a} :: InstancePatchState)

-- | The number of patches from the patch baseline that are installed on the
-- instance.
instancePatchState_installedCount :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Int)
instancePatchState_installedCount :: (Maybe Int -> f (Maybe Int))
-> InstancePatchState -> f InstancePatchState
instancePatchState_installedCount = (InstancePatchState -> Maybe Int)
-> (InstancePatchState -> Maybe Int -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe Int
installedCount :: Maybe Int
$sel:installedCount:InstancePatchState' :: InstancePatchState -> Maybe Int
installedCount} -> Maybe Int
installedCount) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe Int
a -> InstancePatchState
s {$sel:installedCount:InstancePatchState' :: Maybe Int
installedCount = Maybe Int
a} :: InstancePatchState)

-- | The time of the last attempt to patch the instance with @NoReboot@
-- specified as the reboot option.
instancePatchState_lastNoRebootInstallOperationTime :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.UTCTime)
instancePatchState_lastNoRebootInstallOperationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InstancePatchState -> f InstancePatchState
instancePatchState_lastNoRebootInstallOperationTime = (InstancePatchState -> Maybe POSIX)
-> (InstancePatchState -> Maybe POSIX -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe POSIX
lastNoRebootInstallOperationTime :: Maybe POSIX
$sel:lastNoRebootInstallOperationTime:InstancePatchState' :: InstancePatchState -> Maybe POSIX
lastNoRebootInstallOperationTime} -> Maybe POSIX
lastNoRebootInstallOperationTime) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe POSIX
a -> InstancePatchState
s {$sel:lastNoRebootInstallOperationTime:InstancePatchState' :: Maybe POSIX
lastNoRebootInstallOperationTime = Maybe POSIX
a} :: InstancePatchState) ((Maybe POSIX -> f (Maybe POSIX))
 -> InstancePatchState -> f InstancePatchState)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InstancePatchState
-> f InstancePatchState
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The ID of the patch baseline snapshot used during the patching operation
-- when this compliance data was collected.
instancePatchState_snapshotId :: Lens.Lens' InstancePatchState (Prelude.Maybe Prelude.Text)
instancePatchState_snapshotId :: (Maybe Text -> f (Maybe Text))
-> InstancePatchState -> f InstancePatchState
instancePatchState_snapshotId = (InstancePatchState -> Maybe Text)
-> (InstancePatchState -> Maybe Text -> InstancePatchState)
-> Lens
     InstancePatchState InstancePatchState (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Maybe Text
snapshotId :: Maybe Text
$sel:snapshotId:InstancePatchState' :: InstancePatchState -> Maybe Text
snapshotId} -> Maybe Text
snapshotId) (\s :: InstancePatchState
s@InstancePatchState' {} Maybe Text
a -> InstancePatchState
s {$sel:snapshotId:InstancePatchState' :: Maybe Text
snapshotId = Maybe Text
a} :: InstancePatchState)

-- | The ID of the managed instance the high-level patch compliance
-- information was collected for.
instancePatchState_instanceId :: Lens.Lens' InstancePatchState Prelude.Text
instancePatchState_instanceId :: (Text -> f Text) -> InstancePatchState -> f InstancePatchState
instancePatchState_instanceId = (InstancePatchState -> Text)
-> (InstancePatchState -> Text -> InstancePatchState)
-> Lens InstancePatchState InstancePatchState Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Text
instanceId :: Text
$sel:instanceId:InstancePatchState' :: InstancePatchState -> Text
instanceId} -> Text
instanceId) (\s :: InstancePatchState
s@InstancePatchState' {} Text
a -> InstancePatchState
s {$sel:instanceId:InstancePatchState' :: Text
instanceId = Text
a} :: InstancePatchState)

-- | The name of the patch group the managed instance belongs to.
instancePatchState_patchGroup :: Lens.Lens' InstancePatchState Prelude.Text
instancePatchState_patchGroup :: (Text -> f Text) -> InstancePatchState -> f InstancePatchState
instancePatchState_patchGroup = (InstancePatchState -> Text)
-> (InstancePatchState -> Text -> InstancePatchState)
-> Lens InstancePatchState InstancePatchState Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Text
patchGroup :: Text
$sel:patchGroup:InstancePatchState' :: InstancePatchState -> Text
patchGroup} -> Text
patchGroup) (\s :: InstancePatchState
s@InstancePatchState' {} Text
a -> InstancePatchState
s {$sel:patchGroup:InstancePatchState' :: Text
patchGroup = Text
a} :: InstancePatchState)

-- | The ID of the patch baseline used to patch the instance.
instancePatchState_baselineId :: Lens.Lens' InstancePatchState Prelude.Text
instancePatchState_baselineId :: (Text -> f Text) -> InstancePatchState -> f InstancePatchState
instancePatchState_baselineId = (InstancePatchState -> Text)
-> (InstancePatchState -> Text -> InstancePatchState)
-> Lens InstancePatchState InstancePatchState Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {Text
baselineId :: Text
$sel:baselineId:InstancePatchState' :: InstancePatchState -> Text
baselineId} -> Text
baselineId) (\s :: InstancePatchState
s@InstancePatchState' {} Text
a -> InstancePatchState
s {$sel:baselineId:InstancePatchState' :: Text
baselineId = Text
a} :: InstancePatchState)

-- | The time the most recent patching operation was started on the instance.
instancePatchState_operationStartTime :: Lens.Lens' InstancePatchState Prelude.UTCTime
instancePatchState_operationStartTime :: (UTCTime -> f UTCTime)
-> InstancePatchState -> f InstancePatchState
instancePatchState_operationStartTime = (InstancePatchState -> POSIX)
-> (InstancePatchState -> POSIX -> InstancePatchState)
-> Lens InstancePatchState InstancePatchState POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {POSIX
operationStartTime :: POSIX
$sel:operationStartTime:InstancePatchState' :: InstancePatchState -> POSIX
operationStartTime} -> POSIX
operationStartTime) (\s :: InstancePatchState
s@InstancePatchState' {} POSIX
a -> InstancePatchState
s {$sel:operationStartTime:InstancePatchState' :: POSIX
operationStartTime = POSIX
a} :: InstancePatchState) ((POSIX -> f POSIX) -> InstancePatchState -> f InstancePatchState)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> InstancePatchState
-> f InstancePatchState
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The time the most recent patching operation completed on the instance.
instancePatchState_operationEndTime :: Lens.Lens' InstancePatchState Prelude.UTCTime
instancePatchState_operationEndTime :: (UTCTime -> f UTCTime)
-> InstancePatchState -> f InstancePatchState
instancePatchState_operationEndTime = (InstancePatchState -> POSIX)
-> (InstancePatchState -> POSIX -> InstancePatchState)
-> Lens InstancePatchState InstancePatchState POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {POSIX
operationEndTime :: POSIX
$sel:operationEndTime:InstancePatchState' :: InstancePatchState -> POSIX
operationEndTime} -> POSIX
operationEndTime) (\s :: InstancePatchState
s@InstancePatchState' {} POSIX
a -> InstancePatchState
s {$sel:operationEndTime:InstancePatchState' :: POSIX
operationEndTime = POSIX
a} :: InstancePatchState) ((POSIX -> f POSIX) -> InstancePatchState -> f InstancePatchState)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> InstancePatchState
-> f InstancePatchState
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The type of patching operation that was performed: or
--
-- -   @SCAN@ assesses the patch compliance state.
--
-- -   @INSTALL@ installs missing patches.
instancePatchState_operation :: Lens.Lens' InstancePatchState PatchOperationType
instancePatchState_operation :: (PatchOperationType -> f PatchOperationType)
-> InstancePatchState -> f InstancePatchState
instancePatchState_operation = (InstancePatchState -> PatchOperationType)
-> (InstancePatchState -> PatchOperationType -> InstancePatchState)
-> Lens
     InstancePatchState
     InstancePatchState
     PatchOperationType
     PatchOperationType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstancePatchState' {PatchOperationType
operation :: PatchOperationType
$sel:operation:InstancePatchState' :: InstancePatchState -> PatchOperationType
operation} -> PatchOperationType
operation) (\s :: InstancePatchState
s@InstancePatchState' {} PatchOperationType
a -> InstancePatchState
s {$sel:operation:InstancePatchState' :: PatchOperationType
operation = PatchOperationType
a} :: InstancePatchState)

instance Core.FromJSON InstancePatchState where
  parseJSON :: Value -> Parser InstancePatchState
parseJSON =
    String
-> (Object -> Parser InstancePatchState)
-> Value
-> Parser InstancePatchState
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"InstancePatchState"
      ( \Object
x ->
          Maybe Int
-> Maybe Int
-> Maybe RebootOption
-> Maybe Int
-> Maybe (Sensitive Text)
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe POSIX
-> Maybe Text
-> Text
-> Text
-> Text
-> POSIX
-> POSIX
-> PatchOperationType
-> InstancePatchState
InstancePatchState'
            (Maybe Int
 -> Maybe Int
 -> Maybe RebootOption
 -> Maybe Int
 -> Maybe (Sensitive Text)
 -> Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> Maybe POSIX
 -> Maybe Text
 -> Text
 -> Text
 -> Text
 -> POSIX
 -> POSIX
 -> PatchOperationType
 -> InstancePatchState)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe RebootOption
      -> Maybe Int
      -> Maybe (Sensitive Text)
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UnreportedNotApplicableCount")
            Parser
  (Maybe Int
   -> Maybe RebootOption
   -> Maybe Int
   -> Maybe (Sensitive Text)
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe Int)
-> Parser
     (Maybe RebootOption
      -> Maybe Int
      -> Maybe (Sensitive Text)
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OtherNonCompliantCount")
            Parser
  (Maybe RebootOption
   -> Maybe Int
   -> Maybe (Sensitive Text)
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe RebootOption)
-> Parser
     (Maybe Int
      -> Maybe (Sensitive Text)
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RebootOption)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RebootOption")
            Parser
  (Maybe Int
   -> Maybe (Sensitive Text)
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe Int)
-> Parser
     (Maybe (Sensitive Text)
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstalledPendingRebootCount")
            Parser
  (Maybe (Sensitive Text)
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe (Sensitive Text))
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OwnerInformation")
            Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SecurityNonCompliantCount")
            Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstalledRejectedCount")
            Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FailedCount")
            Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstalledOtherCount")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MissingCount")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
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
"InstallOverrideList")
            Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CriticalNonCompliantCount")
            Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotApplicableCount")
            Parser
  (Maybe Int
   -> Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe Int)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstalledCount")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastNoRebootInstallOperationTime")
            Parser
  (Maybe Text
   -> Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser (Maybe Text)
-> Parser
     (Text
      -> Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
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
"SnapshotId")
            Parser
  (Text
   -> Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser Text
-> Parser
     (Text
      -> Text
      -> POSIX
      -> POSIX
      -> PatchOperationType
      -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"InstanceId")
            Parser
  (Text
   -> Text
   -> POSIX
   -> POSIX
   -> PatchOperationType
   -> InstancePatchState)
-> Parser Text
-> Parser
     (Text
      -> POSIX -> POSIX -> PatchOperationType -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"PatchGroup")
            Parser
  (Text
   -> POSIX -> POSIX -> PatchOperationType -> InstancePatchState)
-> Parser Text
-> Parser
     (POSIX -> POSIX -> PatchOperationType -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"BaselineId")
            Parser (POSIX -> POSIX -> PatchOperationType -> InstancePatchState)
-> Parser POSIX
-> Parser (POSIX -> PatchOperationType -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"OperationStartTime")
            Parser (POSIX -> PatchOperationType -> InstancePatchState)
-> Parser POSIX
-> Parser (PatchOperationType -> InstancePatchState)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"OperationEndTime")
            Parser (PatchOperationType -> InstancePatchState)
-> Parser PatchOperationType -> Parser InstancePatchState
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser PatchOperationType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Operation")
      )

instance Prelude.Hashable InstancePatchState

instance Prelude.NFData InstancePatchState