{-# 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.AssociationDescription
-- 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.AssociationDescription where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.AssociationComplianceSeverity
import Amazonka.SSM.Types.AssociationOverview
import Amazonka.SSM.Types.AssociationStatus
import Amazonka.SSM.Types.AssociationSyncCompliance
import Amazonka.SSM.Types.InstanceAssociationOutputLocation
import Amazonka.SSM.Types.Target
import Amazonka.SSM.Types.TargetLocation

-- | Describes the parameters for a document.
--
-- /See:/ 'newAssociationDescription' smart constructor.
data AssociationDescription = AssociationDescription'
  { -- | The association ID.
    AssociationDescription -> Maybe Text
associationId :: Prelude.Maybe Prelude.Text,
    -- | The instance ID.
    AssociationDescription -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
    -- | The association status.
    AssociationDescription -> Maybe AssociationStatus
status :: Prelude.Maybe AssociationStatus,
    -- | The combination of Amazon Web Services Regions and Amazon Web Services
    -- accounts where you want to run the association.
    AssociationDescription -> Maybe (NonEmpty TargetLocation)
targetLocations :: Prelude.Maybe (Prelude.NonEmpty TargetLocation),
    -- | By default, when you create a new associations, the system runs it
    -- immediately after it is created and then according to the schedule you
    -- specified. Specify this option if you don\'t want an association to run
    -- immediately after you create it. This parameter isn\'t supported for
    -- rate expressions.
    AssociationDescription -> Maybe Bool
applyOnlyAtCronInterval :: Prelude.Maybe Prelude.Bool,
    -- | The last date on which the association was successfully run.
    AssociationDescription -> Maybe POSIX
lastSuccessfulExecutionDate :: Prelude.Maybe Core.POSIX,
    -- | Information about the association.
    AssociationDescription -> Maybe AssociationOverview
overview :: Prelude.Maybe AssociationOverview,
    -- | The date when the association was last updated.
    AssociationDescription -> Maybe POSIX
lastUpdateAssociationDate :: Prelude.Maybe Core.POSIX,
    -- | The date when the association was made.
    AssociationDescription -> Maybe POSIX
date :: Prelude.Maybe Core.POSIX,
    -- | The date on which the association was last run.
    AssociationDescription -> Maybe POSIX
lastExecutionDate :: Prelude.Maybe Core.POSIX,
    -- | The number of errors that are allowed before the system stops sending
    -- requests to run the association on additional targets. You can specify
    -- either an absolute number of errors, for example 10, or a percentage of
    -- the target set, for example 10%. If you specify 3, for example, the
    -- system stops sending requests when the fourth error is received. If you
    -- specify 0, then the system stops sending requests after the first error
    -- is returned. If you run an association on 50 instances and set
    -- @MaxError@ to 10%, then the system stops sending the request when the
    -- sixth error is received.
    --
    -- Executions that are already running an association when @MaxErrors@ is
    -- reached are allowed to complete, but some of these executions may fail
    -- as well. If you need to ensure that there won\'t be more than max-errors
    -- failed executions, set @MaxConcurrency@ to 1 so that executions proceed
    -- one at a time.
    AssociationDescription -> Maybe Text
maxErrors :: Prelude.Maybe Prelude.Text,
    -- | A cron expression that specifies a schedule when the association runs.
    AssociationDescription -> Maybe Text
scheduleExpression :: Prelude.Maybe Prelude.Text,
    -- | The name of the SSM document.
    AssociationDescription -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | An S3 bucket where you want to store the output details of the request.
    AssociationDescription -> Maybe InstanceAssociationOutputLocation
outputLocation :: Prelude.Maybe InstanceAssociationOutputLocation,
    -- | The mode for generating association compliance. You can specify @AUTO@
    -- or @MANUAL@. In @AUTO@ mode, the system uses the status of the
    -- association execution to determine the compliance status. If the
    -- association execution runs successfully, then the association is
    -- @COMPLIANT@. If the association execution doesn\'t run successfully, the
    -- association is @NON-COMPLIANT@.
    --
    -- In @MANUAL@ mode, you must specify the @AssociationId@ as a parameter
    -- for the PutComplianceItems API operation. In this case, compliance data
    -- isn\'t managed by State Manager, a capability of Amazon Web Services
    -- Systems Manager. It is managed by your direct call to the
    -- PutComplianceItems API operation.
    --
    -- By default, all associations use @AUTO@ mode.
    AssociationDescription -> Maybe AssociationSyncCompliance
syncCompliance :: Prelude.Maybe AssociationSyncCompliance,
    -- | The instances targeted by the request.
    AssociationDescription -> Maybe [Target]
targets :: Prelude.Maybe [Target],
    -- | A description of the parameters for a document.
    AssociationDescription -> Maybe (HashMap Text [Text])
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
    -- | The document version.
    AssociationDescription -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
    -- | Specify the target for the association. This target is required for
    -- associations that use an Automation runbook and target resources by
    -- using rate controls. Automation is a capability of Amazon Web Services
    -- Systems Manager.
    AssociationDescription -> Maybe Text
automationTargetParameterName :: Prelude.Maybe Prelude.Text,
    -- | The association version.
    AssociationDescription -> Maybe Text
associationVersion :: Prelude.Maybe Prelude.Text,
    -- | The association name.
    AssociationDescription -> Maybe Text
associationName :: Prelude.Maybe Prelude.Text,
    -- | The names or Amazon Resource Names (ARNs) of the Change Calendar type
    -- documents your associations are gated under. The associations only run
    -- when that change calendar is open. For more information, see
    -- <https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar Amazon Web Services Systems Manager Change Calendar>.
    AssociationDescription -> Maybe [Text]
calendarNames :: Prelude.Maybe [Prelude.Text],
    -- | The severity level that is assigned to the association.
    AssociationDescription -> Maybe AssociationComplianceSeverity
complianceSeverity :: Prelude.Maybe AssociationComplianceSeverity,
    -- | The maximum number of targets allowed to run the association at the same
    -- time. You can specify a number, for example 10, or a percentage of the
    -- target set, for example 10%. The default value is 100%, which means all
    -- targets run the association at the same time.
    --
    -- If a new instance starts and attempts to run an association while
    -- Systems Manager is running @MaxConcurrency@ associations, the
    -- association is allowed to run. During the next association interval, the
    -- new instance will process its association within the limit specified for
    -- @MaxConcurrency@.
    AssociationDescription -> Maybe Text
maxConcurrency :: Prelude.Maybe Prelude.Text
  }
  deriving (AssociationDescription -> AssociationDescription -> Bool
(AssociationDescription -> AssociationDescription -> Bool)
-> (AssociationDescription -> AssociationDescription -> Bool)
-> Eq AssociationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociationDescription -> AssociationDescription -> Bool
$c/= :: AssociationDescription -> AssociationDescription -> Bool
== :: AssociationDescription -> AssociationDescription -> Bool
$c== :: AssociationDescription -> AssociationDescription -> Bool
Prelude.Eq, ReadPrec [AssociationDescription]
ReadPrec AssociationDescription
Int -> ReadS AssociationDescription
ReadS [AssociationDescription]
(Int -> ReadS AssociationDescription)
-> ReadS [AssociationDescription]
-> ReadPrec AssociationDescription
-> ReadPrec [AssociationDescription]
-> Read AssociationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociationDescription]
$creadListPrec :: ReadPrec [AssociationDescription]
readPrec :: ReadPrec AssociationDescription
$creadPrec :: ReadPrec AssociationDescription
readList :: ReadS [AssociationDescription]
$creadList :: ReadS [AssociationDescription]
readsPrec :: Int -> ReadS AssociationDescription
$creadsPrec :: Int -> ReadS AssociationDescription
Prelude.Read, Int -> AssociationDescription -> ShowS
[AssociationDescription] -> ShowS
AssociationDescription -> String
(Int -> AssociationDescription -> ShowS)
-> (AssociationDescription -> String)
-> ([AssociationDescription] -> ShowS)
-> Show AssociationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociationDescription] -> ShowS
$cshowList :: [AssociationDescription] -> ShowS
show :: AssociationDescription -> String
$cshow :: AssociationDescription -> String
showsPrec :: Int -> AssociationDescription -> ShowS
$cshowsPrec :: Int -> AssociationDescription -> ShowS
Prelude.Show, (forall x. AssociationDescription -> Rep AssociationDescription x)
-> (forall x.
    Rep AssociationDescription x -> AssociationDescription)
-> Generic AssociationDescription
forall x. Rep AssociationDescription x -> AssociationDescription
forall x. AssociationDescription -> Rep AssociationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssociationDescription x -> AssociationDescription
$cfrom :: forall x. AssociationDescription -> Rep AssociationDescription x
Prelude.Generic)

-- |
-- Create a value of 'AssociationDescription' 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:
--
-- 'associationId', 'associationDescription_associationId' - The association ID.
--
-- 'instanceId', 'associationDescription_instanceId' - The instance ID.
--
-- 'status', 'associationDescription_status' - The association status.
--
-- 'targetLocations', 'associationDescription_targetLocations' - The combination of Amazon Web Services Regions and Amazon Web Services
-- accounts where you want to run the association.
--
-- 'applyOnlyAtCronInterval', 'associationDescription_applyOnlyAtCronInterval' - By default, when you create a new associations, the system runs it
-- immediately after it is created and then according to the schedule you
-- specified. Specify this option if you don\'t want an association to run
-- immediately after you create it. This parameter isn\'t supported for
-- rate expressions.
--
-- 'lastSuccessfulExecutionDate', 'associationDescription_lastSuccessfulExecutionDate' - The last date on which the association was successfully run.
--
-- 'overview', 'associationDescription_overview' - Information about the association.
--
-- 'lastUpdateAssociationDate', 'associationDescription_lastUpdateAssociationDate' - The date when the association was last updated.
--
-- 'date', 'associationDescription_date' - The date when the association was made.
--
-- 'lastExecutionDate', 'associationDescription_lastExecutionDate' - The date on which the association was last run.
--
-- 'maxErrors', 'associationDescription_maxErrors' - The number of errors that are allowed before the system stops sending
-- requests to run the association on additional targets. You can specify
-- either an absolute number of errors, for example 10, or a percentage of
-- the target set, for example 10%. If you specify 3, for example, the
-- system stops sending requests when the fourth error is received. If you
-- specify 0, then the system stops sending requests after the first error
-- is returned. If you run an association on 50 instances and set
-- @MaxError@ to 10%, then the system stops sending the request when the
-- sixth error is received.
--
-- Executions that are already running an association when @MaxErrors@ is
-- reached are allowed to complete, but some of these executions may fail
-- as well. If you need to ensure that there won\'t be more than max-errors
-- failed executions, set @MaxConcurrency@ to 1 so that executions proceed
-- one at a time.
--
-- 'scheduleExpression', 'associationDescription_scheduleExpression' - A cron expression that specifies a schedule when the association runs.
--
-- 'name', 'associationDescription_name' - The name of the SSM document.
--
-- 'outputLocation', 'associationDescription_outputLocation' - An S3 bucket where you want to store the output details of the request.
--
-- 'syncCompliance', 'associationDescription_syncCompliance' - The mode for generating association compliance. You can specify @AUTO@
-- or @MANUAL@. In @AUTO@ mode, the system uses the status of the
-- association execution to determine the compliance status. If the
-- association execution runs successfully, then the association is
-- @COMPLIANT@. If the association execution doesn\'t run successfully, the
-- association is @NON-COMPLIANT@.
--
-- In @MANUAL@ mode, you must specify the @AssociationId@ as a parameter
-- for the PutComplianceItems API operation. In this case, compliance data
-- isn\'t managed by State Manager, a capability of Amazon Web Services
-- Systems Manager. It is managed by your direct call to the
-- PutComplianceItems API operation.
--
-- By default, all associations use @AUTO@ mode.
--
-- 'targets', 'associationDescription_targets' - The instances targeted by the request.
--
-- 'parameters', 'associationDescription_parameters' - A description of the parameters for a document.
--
-- 'documentVersion', 'associationDescription_documentVersion' - The document version.
--
-- 'automationTargetParameterName', 'associationDescription_automationTargetParameterName' - Specify the target for the association. This target is required for
-- associations that use an Automation runbook and target resources by
-- using rate controls. Automation is a capability of Amazon Web Services
-- Systems Manager.
--
-- 'associationVersion', 'associationDescription_associationVersion' - The association version.
--
-- 'associationName', 'associationDescription_associationName' - The association name.
--
-- 'calendarNames', 'associationDescription_calendarNames' - The names or Amazon Resource Names (ARNs) of the Change Calendar type
-- documents your associations are gated under. The associations only run
-- when that change calendar is open. For more information, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar Amazon Web Services Systems Manager Change Calendar>.
--
-- 'complianceSeverity', 'associationDescription_complianceSeverity' - The severity level that is assigned to the association.
--
-- 'maxConcurrency', 'associationDescription_maxConcurrency' - The maximum number of targets allowed to run the association at the same
-- time. You can specify a number, for example 10, or a percentage of the
-- target set, for example 10%. The default value is 100%, which means all
-- targets run the association at the same time.
--
-- If a new instance starts and attempts to run an association while
-- Systems Manager is running @MaxConcurrency@ associations, the
-- association is allowed to run. During the next association interval, the
-- new instance will process its association within the limit specified for
-- @MaxConcurrency@.
newAssociationDescription ::
  AssociationDescription
newAssociationDescription :: AssociationDescription
newAssociationDescription =
  AssociationDescription' :: Maybe Text
-> Maybe Text
-> Maybe AssociationStatus
-> Maybe (NonEmpty TargetLocation)
-> Maybe Bool
-> Maybe POSIX
-> Maybe AssociationOverview
-> Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstanceAssociationOutputLocation
-> Maybe AssociationSyncCompliance
-> Maybe [Target]
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe AssociationComplianceSeverity
-> Maybe Text
-> AssociationDescription
AssociationDescription'
    { $sel:associationId:AssociationDescription' :: Maybe Text
associationId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceId:AssociationDescription' :: Maybe Text
instanceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:AssociationDescription' :: Maybe AssociationStatus
status = Maybe AssociationStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:targetLocations:AssociationDescription' :: Maybe (NonEmpty TargetLocation)
targetLocations = Maybe (NonEmpty TargetLocation)
forall a. Maybe a
Prelude.Nothing,
      $sel:applyOnlyAtCronInterval:AssociationDescription' :: Maybe Bool
applyOnlyAtCronInterval = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:lastSuccessfulExecutionDate:AssociationDescription' :: Maybe POSIX
lastSuccessfulExecutionDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:overview:AssociationDescription' :: Maybe AssociationOverview
overview = Maybe AssociationOverview
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdateAssociationDate:AssociationDescription' :: Maybe POSIX
lastUpdateAssociationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:date:AssociationDescription' :: Maybe POSIX
date = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastExecutionDate:AssociationDescription' :: Maybe POSIX
lastExecutionDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:maxErrors:AssociationDescription' :: Maybe Text
maxErrors = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduleExpression:AssociationDescription' :: Maybe Text
scheduleExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:AssociationDescription' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outputLocation:AssociationDescription' :: Maybe InstanceAssociationOutputLocation
outputLocation = Maybe InstanceAssociationOutputLocation
forall a. Maybe a
Prelude.Nothing,
      $sel:syncCompliance:AssociationDescription' :: Maybe AssociationSyncCompliance
syncCompliance = Maybe AssociationSyncCompliance
forall a. Maybe a
Prelude.Nothing,
      $sel:targets:AssociationDescription' :: Maybe [Target]
targets = Maybe [Target]
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:AssociationDescription' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
      $sel:documentVersion:AssociationDescription' :: Maybe Text
documentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:automationTargetParameterName:AssociationDescription' :: Maybe Text
automationTargetParameterName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associationVersion:AssociationDescription' :: Maybe Text
associationVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associationName:AssociationDescription' :: Maybe Text
associationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:calendarNames:AssociationDescription' :: Maybe [Text]
calendarNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:complianceSeverity:AssociationDescription' :: Maybe AssociationComplianceSeverity
complianceSeverity = Maybe AssociationComplianceSeverity
forall a. Maybe a
Prelude.Nothing,
      $sel:maxConcurrency:AssociationDescription' :: Maybe Text
maxConcurrency = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The association ID.
associationDescription_associationId :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.Text)
associationDescription_associationId :: (Maybe Text -> f (Maybe Text))
-> AssociationDescription -> f AssociationDescription
associationDescription_associationId = (AssociationDescription -> Maybe Text)
-> (AssociationDescription -> Maybe Text -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe Text
associationId :: Maybe Text
$sel:associationId:AssociationDescription' :: AssociationDescription -> Maybe Text
associationId} -> Maybe Text
associationId) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe Text
a -> AssociationDescription
s {$sel:associationId:AssociationDescription' :: Maybe Text
associationId = Maybe Text
a} :: AssociationDescription)

-- | The instance ID.
associationDescription_instanceId :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.Text)
associationDescription_instanceId :: (Maybe Text -> f (Maybe Text))
-> AssociationDescription -> f AssociationDescription
associationDescription_instanceId = (AssociationDescription -> Maybe Text)
-> (AssociationDescription -> Maybe Text -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe Text
instanceId :: Maybe Text
$sel:instanceId:AssociationDescription' :: AssociationDescription -> Maybe Text
instanceId} -> Maybe Text
instanceId) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe Text
a -> AssociationDescription
s {$sel:instanceId:AssociationDescription' :: Maybe Text
instanceId = Maybe Text
a} :: AssociationDescription)

-- | The association status.
associationDescription_status :: Lens.Lens' AssociationDescription (Prelude.Maybe AssociationStatus)
associationDescription_status :: (Maybe AssociationStatus -> f (Maybe AssociationStatus))
-> AssociationDescription -> f AssociationDescription
associationDescription_status = (AssociationDescription -> Maybe AssociationStatus)
-> (AssociationDescription
    -> Maybe AssociationStatus -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe AssociationStatus)
     (Maybe AssociationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe AssociationStatus
status :: Maybe AssociationStatus
$sel:status:AssociationDescription' :: AssociationDescription -> Maybe AssociationStatus
status} -> Maybe AssociationStatus
status) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe AssociationStatus
a -> AssociationDescription
s {$sel:status:AssociationDescription' :: Maybe AssociationStatus
status = Maybe AssociationStatus
a} :: AssociationDescription)

-- | The combination of Amazon Web Services Regions and Amazon Web Services
-- accounts where you want to run the association.
associationDescription_targetLocations :: Lens.Lens' AssociationDescription (Prelude.Maybe (Prelude.NonEmpty TargetLocation))
associationDescription_targetLocations :: (Maybe (NonEmpty TargetLocation)
 -> f (Maybe (NonEmpty TargetLocation)))
-> AssociationDescription -> f AssociationDescription
associationDescription_targetLocations = (AssociationDescription -> Maybe (NonEmpty TargetLocation))
-> (AssociationDescription
    -> Maybe (NonEmpty TargetLocation) -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe (NonEmpty TargetLocation))
     (Maybe (NonEmpty TargetLocation))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe (NonEmpty TargetLocation)
targetLocations :: Maybe (NonEmpty TargetLocation)
$sel:targetLocations:AssociationDescription' :: AssociationDescription -> Maybe (NonEmpty TargetLocation)
targetLocations} -> Maybe (NonEmpty TargetLocation)
targetLocations) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe (NonEmpty TargetLocation)
a -> AssociationDescription
s {$sel:targetLocations:AssociationDescription' :: Maybe (NonEmpty TargetLocation)
targetLocations = Maybe (NonEmpty TargetLocation)
a} :: AssociationDescription) ((Maybe (NonEmpty TargetLocation)
  -> f (Maybe (NonEmpty TargetLocation)))
 -> AssociationDescription -> f AssociationDescription)
-> ((Maybe (NonEmpty TargetLocation)
     -> f (Maybe (NonEmpty TargetLocation)))
    -> Maybe (NonEmpty TargetLocation)
    -> f (Maybe (NonEmpty TargetLocation)))
-> (Maybe (NonEmpty TargetLocation)
    -> f (Maybe (NonEmpty TargetLocation)))
-> AssociationDescription
-> f AssociationDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
-> Iso
     (Maybe (NonEmpty TargetLocation))
     (Maybe (NonEmpty TargetLocation))
     (Maybe (NonEmpty TargetLocation))
     (Maybe (NonEmpty TargetLocation))
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
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | By default, when you create a new associations, the system runs it
-- immediately after it is created and then according to the schedule you
-- specified. Specify this option if you don\'t want an association to run
-- immediately after you create it. This parameter isn\'t supported for
-- rate expressions.
associationDescription_applyOnlyAtCronInterval :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.Bool)
associationDescription_applyOnlyAtCronInterval :: (Maybe Bool -> f (Maybe Bool))
-> AssociationDescription -> f AssociationDescription
associationDescription_applyOnlyAtCronInterval = (AssociationDescription -> Maybe Bool)
-> (AssociationDescription -> Maybe Bool -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe Bool
applyOnlyAtCronInterval :: Maybe Bool
$sel:applyOnlyAtCronInterval:AssociationDescription' :: AssociationDescription -> Maybe Bool
applyOnlyAtCronInterval} -> Maybe Bool
applyOnlyAtCronInterval) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe Bool
a -> AssociationDescription
s {$sel:applyOnlyAtCronInterval:AssociationDescription' :: Maybe Bool
applyOnlyAtCronInterval = Maybe Bool
a} :: AssociationDescription)

-- | The last date on which the association was successfully run.
associationDescription_lastSuccessfulExecutionDate :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.UTCTime)
associationDescription_lastSuccessfulExecutionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AssociationDescription -> f AssociationDescription
associationDescription_lastSuccessfulExecutionDate = (AssociationDescription -> Maybe POSIX)
-> (AssociationDescription
    -> Maybe POSIX -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe POSIX
lastSuccessfulExecutionDate :: Maybe POSIX
$sel:lastSuccessfulExecutionDate:AssociationDescription' :: AssociationDescription -> Maybe POSIX
lastSuccessfulExecutionDate} -> Maybe POSIX
lastSuccessfulExecutionDate) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe POSIX
a -> AssociationDescription
s {$sel:lastSuccessfulExecutionDate:AssociationDescription' :: Maybe POSIX
lastSuccessfulExecutionDate = Maybe POSIX
a} :: AssociationDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> AssociationDescription -> f AssociationDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AssociationDescription
-> f AssociationDescription
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

-- | Information about the association.
associationDescription_overview :: Lens.Lens' AssociationDescription (Prelude.Maybe AssociationOverview)
associationDescription_overview :: (Maybe AssociationOverview -> f (Maybe AssociationOverview))
-> AssociationDescription -> f AssociationDescription
associationDescription_overview = (AssociationDescription -> Maybe AssociationOverview)
-> (AssociationDescription
    -> Maybe AssociationOverview -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe AssociationOverview)
     (Maybe AssociationOverview)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe AssociationOverview
overview :: Maybe AssociationOverview
$sel:overview:AssociationDescription' :: AssociationDescription -> Maybe AssociationOverview
overview} -> Maybe AssociationOverview
overview) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe AssociationOverview
a -> AssociationDescription
s {$sel:overview:AssociationDescription' :: Maybe AssociationOverview
overview = Maybe AssociationOverview
a} :: AssociationDescription)

-- | The date when the association was last updated.
associationDescription_lastUpdateAssociationDate :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.UTCTime)
associationDescription_lastUpdateAssociationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AssociationDescription -> f AssociationDescription
associationDescription_lastUpdateAssociationDate = (AssociationDescription -> Maybe POSIX)
-> (AssociationDescription
    -> Maybe POSIX -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe POSIX
lastUpdateAssociationDate :: Maybe POSIX
$sel:lastUpdateAssociationDate:AssociationDescription' :: AssociationDescription -> Maybe POSIX
lastUpdateAssociationDate} -> Maybe POSIX
lastUpdateAssociationDate) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe POSIX
a -> AssociationDescription
s {$sel:lastUpdateAssociationDate:AssociationDescription' :: Maybe POSIX
lastUpdateAssociationDate = Maybe POSIX
a} :: AssociationDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> AssociationDescription -> f AssociationDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AssociationDescription
-> f AssociationDescription
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 date when the association was made.
associationDescription_date :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.UTCTime)
associationDescription_date :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AssociationDescription -> f AssociationDescription
associationDescription_date = (AssociationDescription -> Maybe POSIX)
-> (AssociationDescription
    -> Maybe POSIX -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe POSIX
date :: Maybe POSIX
$sel:date:AssociationDescription' :: AssociationDescription -> Maybe POSIX
date} -> Maybe POSIX
date) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe POSIX
a -> AssociationDescription
s {$sel:date:AssociationDescription' :: Maybe POSIX
date = Maybe POSIX
a} :: AssociationDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> AssociationDescription -> f AssociationDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AssociationDescription
-> f AssociationDescription
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 date on which the association was last run.
associationDescription_lastExecutionDate :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.UTCTime)
associationDescription_lastExecutionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AssociationDescription -> f AssociationDescription
associationDescription_lastExecutionDate = (AssociationDescription -> Maybe POSIX)
-> (AssociationDescription
    -> Maybe POSIX -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe POSIX
lastExecutionDate :: Maybe POSIX
$sel:lastExecutionDate:AssociationDescription' :: AssociationDescription -> Maybe POSIX
lastExecutionDate} -> Maybe POSIX
lastExecutionDate) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe POSIX
a -> AssociationDescription
s {$sel:lastExecutionDate:AssociationDescription' :: Maybe POSIX
lastExecutionDate = Maybe POSIX
a} :: AssociationDescription) ((Maybe POSIX -> f (Maybe POSIX))
 -> AssociationDescription -> f AssociationDescription)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AssociationDescription
-> f AssociationDescription
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 number of errors that are allowed before the system stops sending
-- requests to run the association on additional targets. You can specify
-- either an absolute number of errors, for example 10, or a percentage of
-- the target set, for example 10%. If you specify 3, for example, the
-- system stops sending requests when the fourth error is received. If you
-- specify 0, then the system stops sending requests after the first error
-- is returned. If you run an association on 50 instances and set
-- @MaxError@ to 10%, then the system stops sending the request when the
-- sixth error is received.
--
-- Executions that are already running an association when @MaxErrors@ is
-- reached are allowed to complete, but some of these executions may fail
-- as well. If you need to ensure that there won\'t be more than max-errors
-- failed executions, set @MaxConcurrency@ to 1 so that executions proceed
-- one at a time.
associationDescription_maxErrors :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.Text)
associationDescription_maxErrors :: (Maybe Text -> f (Maybe Text))
-> AssociationDescription -> f AssociationDescription
associationDescription_maxErrors = (AssociationDescription -> Maybe Text)
-> (AssociationDescription -> Maybe Text -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe Text
maxErrors :: Maybe Text
$sel:maxErrors:AssociationDescription' :: AssociationDescription -> Maybe Text
maxErrors} -> Maybe Text
maxErrors) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe Text
a -> AssociationDescription
s {$sel:maxErrors:AssociationDescription' :: Maybe Text
maxErrors = Maybe Text
a} :: AssociationDescription)

-- | A cron expression that specifies a schedule when the association runs.
associationDescription_scheduleExpression :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.Text)
associationDescription_scheduleExpression :: (Maybe Text -> f (Maybe Text))
-> AssociationDescription -> f AssociationDescription
associationDescription_scheduleExpression = (AssociationDescription -> Maybe Text)
-> (AssociationDescription -> Maybe Text -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe Text
scheduleExpression :: Maybe Text
$sel:scheduleExpression:AssociationDescription' :: AssociationDescription -> Maybe Text
scheduleExpression} -> Maybe Text
scheduleExpression) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe Text
a -> AssociationDescription
s {$sel:scheduleExpression:AssociationDescription' :: Maybe Text
scheduleExpression = Maybe Text
a} :: AssociationDescription)

-- | The name of the SSM document.
associationDescription_name :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.Text)
associationDescription_name :: (Maybe Text -> f (Maybe Text))
-> AssociationDescription -> f AssociationDescription
associationDescription_name = (AssociationDescription -> Maybe Text)
-> (AssociationDescription -> Maybe Text -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe Text
name :: Maybe Text
$sel:name:AssociationDescription' :: AssociationDescription -> Maybe Text
name} -> Maybe Text
name) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe Text
a -> AssociationDescription
s {$sel:name:AssociationDescription' :: Maybe Text
name = Maybe Text
a} :: AssociationDescription)

-- | An S3 bucket where you want to store the output details of the request.
associationDescription_outputLocation :: Lens.Lens' AssociationDescription (Prelude.Maybe InstanceAssociationOutputLocation)
associationDescription_outputLocation :: (Maybe InstanceAssociationOutputLocation
 -> f (Maybe InstanceAssociationOutputLocation))
-> AssociationDescription -> f AssociationDescription
associationDescription_outputLocation = (AssociationDescription -> Maybe InstanceAssociationOutputLocation)
-> (AssociationDescription
    -> Maybe InstanceAssociationOutputLocation
    -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe InstanceAssociationOutputLocation)
     (Maybe InstanceAssociationOutputLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe InstanceAssociationOutputLocation
outputLocation :: Maybe InstanceAssociationOutputLocation
$sel:outputLocation:AssociationDescription' :: AssociationDescription -> Maybe InstanceAssociationOutputLocation
outputLocation} -> Maybe InstanceAssociationOutputLocation
outputLocation) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe InstanceAssociationOutputLocation
a -> AssociationDescription
s {$sel:outputLocation:AssociationDescription' :: Maybe InstanceAssociationOutputLocation
outputLocation = Maybe InstanceAssociationOutputLocation
a} :: AssociationDescription)

-- | The mode for generating association compliance. You can specify @AUTO@
-- or @MANUAL@. In @AUTO@ mode, the system uses the status of the
-- association execution to determine the compliance status. If the
-- association execution runs successfully, then the association is
-- @COMPLIANT@. If the association execution doesn\'t run successfully, the
-- association is @NON-COMPLIANT@.
--
-- In @MANUAL@ mode, you must specify the @AssociationId@ as a parameter
-- for the PutComplianceItems API operation. In this case, compliance data
-- isn\'t managed by State Manager, a capability of Amazon Web Services
-- Systems Manager. It is managed by your direct call to the
-- PutComplianceItems API operation.
--
-- By default, all associations use @AUTO@ mode.
associationDescription_syncCompliance :: Lens.Lens' AssociationDescription (Prelude.Maybe AssociationSyncCompliance)
associationDescription_syncCompliance :: (Maybe AssociationSyncCompliance
 -> f (Maybe AssociationSyncCompliance))
-> AssociationDescription -> f AssociationDescription
associationDescription_syncCompliance = (AssociationDescription -> Maybe AssociationSyncCompliance)
-> (AssociationDescription
    -> Maybe AssociationSyncCompliance -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe AssociationSyncCompliance)
     (Maybe AssociationSyncCompliance)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe AssociationSyncCompliance
syncCompliance :: Maybe AssociationSyncCompliance
$sel:syncCompliance:AssociationDescription' :: AssociationDescription -> Maybe AssociationSyncCompliance
syncCompliance} -> Maybe AssociationSyncCompliance
syncCompliance) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe AssociationSyncCompliance
a -> AssociationDescription
s {$sel:syncCompliance:AssociationDescription' :: Maybe AssociationSyncCompliance
syncCompliance = Maybe AssociationSyncCompliance
a} :: AssociationDescription)

-- | The instances targeted by the request.
associationDescription_targets :: Lens.Lens' AssociationDescription (Prelude.Maybe [Target])
associationDescription_targets :: (Maybe [Target] -> f (Maybe [Target]))
-> AssociationDescription -> f AssociationDescription
associationDescription_targets = (AssociationDescription -> Maybe [Target])
-> (AssociationDescription
    -> Maybe [Target] -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe [Target])
     (Maybe [Target])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:AssociationDescription' :: AssociationDescription -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe [Target]
a -> AssociationDescription
s {$sel:targets:AssociationDescription' :: Maybe [Target]
targets = Maybe [Target]
a} :: AssociationDescription) ((Maybe [Target] -> f (Maybe [Target]))
 -> AssociationDescription -> f AssociationDescription)
-> ((Maybe [Target] -> f (Maybe [Target]))
    -> Maybe [Target] -> f (Maybe [Target]))
-> (Maybe [Target] -> f (Maybe [Target]))
-> AssociationDescription
-> f AssociationDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Target] [Target] [Target] [Target]
-> Iso
     (Maybe [Target]) (Maybe [Target]) (Maybe [Target]) (Maybe [Target])
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 [Target] [Target] [Target] [Target]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A description of the parameters for a document.
associationDescription_parameters :: Lens.Lens' AssociationDescription (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
associationDescription_parameters :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> AssociationDescription -> f AssociationDescription
associationDescription_parameters = (AssociationDescription -> Maybe (HashMap Text [Text]))
-> (AssociationDescription
    -> Maybe (HashMap Text [Text]) -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe (HashMap Text [Text])
parameters :: Maybe (HashMap Text [Text])
$sel:parameters:AssociationDescription' :: AssociationDescription -> Maybe (HashMap Text [Text])
parameters} -> Maybe (HashMap Text [Text])
parameters) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe (HashMap Text [Text])
a -> AssociationDescription
s {$sel:parameters:AssociationDescription' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
a} :: AssociationDescription) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
 -> AssociationDescription -> f AssociationDescription)
-> ((Maybe (HashMap Text [Text])
     -> f (Maybe (HashMap Text [Text])))
    -> Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> AssociationDescription
-> f AssociationDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
-> Iso
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [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
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The document version.
associationDescription_documentVersion :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.Text)
associationDescription_documentVersion :: (Maybe Text -> f (Maybe Text))
-> AssociationDescription -> f AssociationDescription
associationDescription_documentVersion = (AssociationDescription -> Maybe Text)
-> (AssociationDescription -> Maybe Text -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:AssociationDescription' :: AssociationDescription -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe Text
a -> AssociationDescription
s {$sel:documentVersion:AssociationDescription' :: Maybe Text
documentVersion = Maybe Text
a} :: AssociationDescription)

-- | Specify the target for the association. This target is required for
-- associations that use an Automation runbook and target resources by
-- using rate controls. Automation is a capability of Amazon Web Services
-- Systems Manager.
associationDescription_automationTargetParameterName :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.Text)
associationDescription_automationTargetParameterName :: (Maybe Text -> f (Maybe Text))
-> AssociationDescription -> f AssociationDescription
associationDescription_automationTargetParameterName = (AssociationDescription -> Maybe Text)
-> (AssociationDescription -> Maybe Text -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe Text
automationTargetParameterName :: Maybe Text
$sel:automationTargetParameterName:AssociationDescription' :: AssociationDescription -> Maybe Text
automationTargetParameterName} -> Maybe Text
automationTargetParameterName) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe Text
a -> AssociationDescription
s {$sel:automationTargetParameterName:AssociationDescription' :: Maybe Text
automationTargetParameterName = Maybe Text
a} :: AssociationDescription)

-- | The association version.
associationDescription_associationVersion :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.Text)
associationDescription_associationVersion :: (Maybe Text -> f (Maybe Text))
-> AssociationDescription -> f AssociationDescription
associationDescription_associationVersion = (AssociationDescription -> Maybe Text)
-> (AssociationDescription -> Maybe Text -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe Text
associationVersion :: Maybe Text
$sel:associationVersion:AssociationDescription' :: AssociationDescription -> Maybe Text
associationVersion} -> Maybe Text
associationVersion) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe Text
a -> AssociationDescription
s {$sel:associationVersion:AssociationDescription' :: Maybe Text
associationVersion = Maybe Text
a} :: AssociationDescription)

-- | The association name.
associationDescription_associationName :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.Text)
associationDescription_associationName :: (Maybe Text -> f (Maybe Text))
-> AssociationDescription -> f AssociationDescription
associationDescription_associationName = (AssociationDescription -> Maybe Text)
-> (AssociationDescription -> Maybe Text -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe Text
associationName :: Maybe Text
$sel:associationName:AssociationDescription' :: AssociationDescription -> Maybe Text
associationName} -> Maybe Text
associationName) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe Text
a -> AssociationDescription
s {$sel:associationName:AssociationDescription' :: Maybe Text
associationName = Maybe Text
a} :: AssociationDescription)

-- | The names or Amazon Resource Names (ARNs) of the Change Calendar type
-- documents your associations are gated under. The associations only run
-- when that change calendar is open. For more information, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar Amazon Web Services Systems Manager Change Calendar>.
associationDescription_calendarNames :: Lens.Lens' AssociationDescription (Prelude.Maybe [Prelude.Text])
associationDescription_calendarNames :: (Maybe [Text] -> f (Maybe [Text]))
-> AssociationDescription -> f AssociationDescription
associationDescription_calendarNames = (AssociationDescription -> Maybe [Text])
-> (AssociationDescription
    -> Maybe [Text] -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe [Text]
calendarNames :: Maybe [Text]
$sel:calendarNames:AssociationDescription' :: AssociationDescription -> Maybe [Text]
calendarNames} -> Maybe [Text]
calendarNames) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe [Text]
a -> AssociationDescription
s {$sel:calendarNames:AssociationDescription' :: Maybe [Text]
calendarNames = Maybe [Text]
a} :: AssociationDescription) ((Maybe [Text] -> f (Maybe [Text]))
 -> AssociationDescription -> f AssociationDescription)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AssociationDescription
-> f AssociationDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The severity level that is assigned to the association.
associationDescription_complianceSeverity :: Lens.Lens' AssociationDescription (Prelude.Maybe AssociationComplianceSeverity)
associationDescription_complianceSeverity :: (Maybe AssociationComplianceSeverity
 -> f (Maybe AssociationComplianceSeverity))
-> AssociationDescription -> f AssociationDescription
associationDescription_complianceSeverity = (AssociationDescription -> Maybe AssociationComplianceSeverity)
-> (AssociationDescription
    -> Maybe AssociationComplianceSeverity -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe AssociationComplianceSeverity)
     (Maybe AssociationComplianceSeverity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe AssociationComplianceSeverity
complianceSeverity :: Maybe AssociationComplianceSeverity
$sel:complianceSeverity:AssociationDescription' :: AssociationDescription -> Maybe AssociationComplianceSeverity
complianceSeverity} -> Maybe AssociationComplianceSeverity
complianceSeverity) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe AssociationComplianceSeverity
a -> AssociationDescription
s {$sel:complianceSeverity:AssociationDescription' :: Maybe AssociationComplianceSeverity
complianceSeverity = Maybe AssociationComplianceSeverity
a} :: AssociationDescription)

-- | The maximum number of targets allowed to run the association at the same
-- time. You can specify a number, for example 10, or a percentage of the
-- target set, for example 10%. The default value is 100%, which means all
-- targets run the association at the same time.
--
-- If a new instance starts and attempts to run an association while
-- Systems Manager is running @MaxConcurrency@ associations, the
-- association is allowed to run. During the next association interval, the
-- new instance will process its association within the limit specified for
-- @MaxConcurrency@.
associationDescription_maxConcurrency :: Lens.Lens' AssociationDescription (Prelude.Maybe Prelude.Text)
associationDescription_maxConcurrency :: (Maybe Text -> f (Maybe Text))
-> AssociationDescription -> f AssociationDescription
associationDescription_maxConcurrency = (AssociationDescription -> Maybe Text)
-> (AssociationDescription -> Maybe Text -> AssociationDescription)
-> Lens
     AssociationDescription
     AssociationDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationDescription' {Maybe Text
maxConcurrency :: Maybe Text
$sel:maxConcurrency:AssociationDescription' :: AssociationDescription -> Maybe Text
maxConcurrency} -> Maybe Text
maxConcurrency) (\s :: AssociationDescription
s@AssociationDescription' {} Maybe Text
a -> AssociationDescription
s {$sel:maxConcurrency:AssociationDescription' :: Maybe Text
maxConcurrency = Maybe Text
a} :: AssociationDescription)

instance Core.FromJSON AssociationDescription where
  parseJSON :: Value -> Parser AssociationDescription
parseJSON =
    String
-> (Object -> Parser AssociationDescription)
-> Value
-> Parser AssociationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AssociationDescription"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe AssociationStatus
-> Maybe (NonEmpty TargetLocation)
-> Maybe Bool
-> Maybe POSIX
-> Maybe AssociationOverview
-> Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstanceAssociationOutputLocation
-> Maybe AssociationSyncCompliance
-> Maybe [Target]
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe AssociationComplianceSeverity
-> Maybe Text
-> AssociationDescription
AssociationDescription'
            (Maybe Text
 -> Maybe Text
 -> Maybe AssociationStatus
 -> Maybe (NonEmpty TargetLocation)
 -> Maybe Bool
 -> Maybe POSIX
 -> Maybe AssociationOverview
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe InstanceAssociationOutputLocation
 -> Maybe AssociationSyncCompliance
 -> Maybe [Target]
 -> Maybe (HashMap Text [Text])
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe AssociationComplianceSeverity
 -> Maybe Text
 -> AssociationDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AssociationStatus
      -> Maybe (NonEmpty TargetLocation)
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe AssociationOverview
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"AssociationId")
            Parser
  (Maybe Text
   -> Maybe AssociationStatus
   -> Maybe (NonEmpty TargetLocation)
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe AssociationOverview
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe AssociationStatus
      -> Maybe (NonEmpty TargetLocation)
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe AssociationOverview
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"InstanceId")
            Parser
  (Maybe AssociationStatus
   -> Maybe (NonEmpty TargetLocation)
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe AssociationOverview
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe AssociationStatus)
-> Parser
     (Maybe (NonEmpty TargetLocation)
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe AssociationOverview
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AssociationStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe (NonEmpty TargetLocation)
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe AssociationOverview
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe (NonEmpty TargetLocation))
-> Parser
     (Maybe Bool
      -> Maybe POSIX
      -> Maybe AssociationOverview
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty TargetLocation))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TargetLocations")
            Parser
  (Maybe Bool
   -> Maybe POSIX
   -> Maybe AssociationOverview
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe Bool)
-> Parser
     (Maybe POSIX
      -> Maybe AssociationOverview
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"ApplyOnlyAtCronInterval")
            Parser
  (Maybe POSIX
   -> Maybe AssociationOverview
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe AssociationOverview
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"LastSuccessfulExecutionDate")
            Parser
  (Maybe AssociationOverview
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe AssociationOverview)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AssociationOverview)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Overview")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"LastUpdateAssociationDate")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"Date")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"LastExecutionDate")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"MaxErrors")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"ScheduleExpression")
            Parser
  (Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"Name")
            Parser
  (Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe InstanceAssociationOutputLocation)
-> Parser
     (Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InstanceAssociationOutputLocation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputLocation")
            Parser
  (Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe AssociationSyncCompliance)
-> Parser
     (Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AssociationSyncCompliance)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SyncCompliance")
            Parser
  (Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe [Target])
-> Parser
     (Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Target]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Targets" Parser (Maybe (Maybe [Target]))
-> Maybe [Target] -> Parser (Maybe [Target])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Target]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe (HashMap Text [Text]))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text [Text])))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Parameters" Parser (Maybe (Maybe (HashMap Text [Text])))
-> Maybe (HashMap Text [Text])
-> Parser (Maybe (HashMap Text [Text]))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text [Text])
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"DocumentVersion")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"AutomationTargetParameterName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"AssociationVersion")
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationDescription)
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
"AssociationName")
            Parser
  (Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationDescription)
-> Parser (Maybe [Text])
-> Parser
     (Maybe AssociationComplianceSeverity
      -> Maybe Text -> AssociationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CalendarNames" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe AssociationComplianceSeverity
   -> Maybe Text -> AssociationDescription)
-> Parser (Maybe AssociationComplianceSeverity)
-> Parser (Maybe Text -> AssociationDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AssociationComplianceSeverity)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ComplianceSeverity")
            Parser (Maybe Text -> AssociationDescription)
-> Parser (Maybe Text) -> Parser AssociationDescription
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
"MaxConcurrency")
      )

instance Prelude.Hashable AssociationDescription

instance Prelude.NFData AssociationDescription