{-# 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.AssociationVersionInfo
-- 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.AssociationVersionInfo 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.AssociationSyncCompliance
import Amazonka.SSM.Types.InstanceAssociationOutputLocation
import Amazonka.SSM.Types.Target
import Amazonka.SSM.Types.TargetLocation

-- | Information about the association version.
--
-- /See:/ 'newAssociationVersionInfo' smart constructor.
data AssociationVersionInfo = AssociationVersionInfo'
  { -- | The ID created by the system when the association was created.
    AssociationVersionInfo -> Maybe Text
associationId :: Prelude.Maybe Prelude.Text,
    -- | The combination of Amazon Web Services Regions and Amazon Web Services
    -- accounts where you wanted to run the association when this association
    -- version was created.
    AssociationVersionInfo -> 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.
    AssociationVersionInfo -> Maybe Bool
applyOnlyAtCronInterval :: Prelude.Maybe Prelude.Bool,
    -- | The date the association version was created.
    AssociationVersionInfo -> Maybe POSIX
createdDate :: 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.
    AssociationVersionInfo -> Maybe Text
maxErrors :: Prelude.Maybe Prelude.Text,
    -- | The cron or rate schedule specified for the association when the
    -- association version was created.
    AssociationVersionInfo -> Maybe Text
scheduleExpression :: Prelude.Maybe Prelude.Text,
    -- | The name specified when the association was created.
    AssociationVersionInfo -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The location in Amazon S3 specified for the association when the
    -- association version was created.
    AssociationVersionInfo -> 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.
    AssociationVersionInfo -> Maybe AssociationSyncCompliance
syncCompliance :: Prelude.Maybe AssociationSyncCompliance,
    -- | The targets specified for the association when the association version
    -- was created.
    AssociationVersionInfo -> Maybe [Target]
targets :: Prelude.Maybe [Target],
    -- | Parameters specified when the association version was created.
    AssociationVersionInfo -> Maybe (HashMap Text [Text])
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
    -- | The version of an Amazon Web Services Systems Manager document (SSM
    -- document) used when the association version was created.
    AssociationVersionInfo -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
    -- | The association version.
    AssociationVersionInfo -> Maybe Text
associationVersion :: Prelude.Maybe Prelude.Text,
    -- | The name specified for the association version when the association
    -- version was created.
    AssociationVersionInfo -> 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 for this
    -- version 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>.
    AssociationVersionInfo -> Maybe [Text]
calendarNames :: Prelude.Maybe [Prelude.Text],
    -- | The severity level that is assigned to the association.
    AssociationVersionInfo -> 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@.
    AssociationVersionInfo -> Maybe Text
maxConcurrency :: Prelude.Maybe Prelude.Text
  }
  deriving (AssociationVersionInfo -> AssociationVersionInfo -> Bool
(AssociationVersionInfo -> AssociationVersionInfo -> Bool)
-> (AssociationVersionInfo -> AssociationVersionInfo -> Bool)
-> Eq AssociationVersionInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociationVersionInfo -> AssociationVersionInfo -> Bool
$c/= :: AssociationVersionInfo -> AssociationVersionInfo -> Bool
== :: AssociationVersionInfo -> AssociationVersionInfo -> Bool
$c== :: AssociationVersionInfo -> AssociationVersionInfo -> Bool
Prelude.Eq, ReadPrec [AssociationVersionInfo]
ReadPrec AssociationVersionInfo
Int -> ReadS AssociationVersionInfo
ReadS [AssociationVersionInfo]
(Int -> ReadS AssociationVersionInfo)
-> ReadS [AssociationVersionInfo]
-> ReadPrec AssociationVersionInfo
-> ReadPrec [AssociationVersionInfo]
-> Read AssociationVersionInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociationVersionInfo]
$creadListPrec :: ReadPrec [AssociationVersionInfo]
readPrec :: ReadPrec AssociationVersionInfo
$creadPrec :: ReadPrec AssociationVersionInfo
readList :: ReadS [AssociationVersionInfo]
$creadList :: ReadS [AssociationVersionInfo]
readsPrec :: Int -> ReadS AssociationVersionInfo
$creadsPrec :: Int -> ReadS AssociationVersionInfo
Prelude.Read, Int -> AssociationVersionInfo -> ShowS
[AssociationVersionInfo] -> ShowS
AssociationVersionInfo -> String
(Int -> AssociationVersionInfo -> ShowS)
-> (AssociationVersionInfo -> String)
-> ([AssociationVersionInfo] -> ShowS)
-> Show AssociationVersionInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociationVersionInfo] -> ShowS
$cshowList :: [AssociationVersionInfo] -> ShowS
show :: AssociationVersionInfo -> String
$cshow :: AssociationVersionInfo -> String
showsPrec :: Int -> AssociationVersionInfo -> ShowS
$cshowsPrec :: Int -> AssociationVersionInfo -> ShowS
Prelude.Show, (forall x. AssociationVersionInfo -> Rep AssociationVersionInfo x)
-> (forall x.
    Rep AssociationVersionInfo x -> AssociationVersionInfo)
-> Generic AssociationVersionInfo
forall x. Rep AssociationVersionInfo x -> AssociationVersionInfo
forall x. AssociationVersionInfo -> Rep AssociationVersionInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssociationVersionInfo x -> AssociationVersionInfo
$cfrom :: forall x. AssociationVersionInfo -> Rep AssociationVersionInfo x
Prelude.Generic)

-- |
-- Create a value of 'AssociationVersionInfo' 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', 'associationVersionInfo_associationId' - The ID created by the system when the association was created.
--
-- 'targetLocations', 'associationVersionInfo_targetLocations' - The combination of Amazon Web Services Regions and Amazon Web Services
-- accounts where you wanted to run the association when this association
-- version was created.
--
-- 'applyOnlyAtCronInterval', 'associationVersionInfo_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.
--
-- 'createdDate', 'associationVersionInfo_createdDate' - The date the association version was created.
--
-- 'maxErrors', 'associationVersionInfo_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', 'associationVersionInfo_scheduleExpression' - The cron or rate schedule specified for the association when the
-- association version was created.
--
-- 'name', 'associationVersionInfo_name' - The name specified when the association was created.
--
-- 'outputLocation', 'associationVersionInfo_outputLocation' - The location in Amazon S3 specified for the association when the
-- association version was created.
--
-- 'syncCompliance', 'associationVersionInfo_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', 'associationVersionInfo_targets' - The targets specified for the association when the association version
-- was created.
--
-- 'parameters', 'associationVersionInfo_parameters' - Parameters specified when the association version was created.
--
-- 'documentVersion', 'associationVersionInfo_documentVersion' - The version of an Amazon Web Services Systems Manager document (SSM
-- document) used when the association version was created.
--
-- 'associationVersion', 'associationVersionInfo_associationVersion' - The association version.
--
-- 'associationName', 'associationVersionInfo_associationName' - The name specified for the association version when the association
-- version was created.
--
-- 'calendarNames', 'associationVersionInfo_calendarNames' - The names or Amazon Resource Names (ARNs) of the Change Calendar type
-- documents your associations are gated under. The associations for this
-- version 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', 'associationVersionInfo_complianceSeverity' - The severity level that is assigned to the association.
--
-- 'maxConcurrency', 'associationVersionInfo_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@.
newAssociationVersionInfo ::
  AssociationVersionInfo
newAssociationVersionInfo :: AssociationVersionInfo
newAssociationVersionInfo =
  AssociationVersionInfo' :: Maybe Text
-> Maybe (NonEmpty TargetLocation)
-> Maybe Bool
-> 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 AssociationComplianceSeverity
-> Maybe Text
-> AssociationVersionInfo
AssociationVersionInfo'
    { $sel:associationId:AssociationVersionInfo' :: Maybe Text
associationId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targetLocations:AssociationVersionInfo' :: Maybe (NonEmpty TargetLocation)
targetLocations = Maybe (NonEmpty TargetLocation)
forall a. Maybe a
Prelude.Nothing,
      $sel:applyOnlyAtCronInterval:AssociationVersionInfo' :: Maybe Bool
applyOnlyAtCronInterval = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:AssociationVersionInfo' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:maxErrors:AssociationVersionInfo' :: Maybe Text
maxErrors = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduleExpression:AssociationVersionInfo' :: Maybe Text
scheduleExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:AssociationVersionInfo' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outputLocation:AssociationVersionInfo' :: Maybe InstanceAssociationOutputLocation
outputLocation = Maybe InstanceAssociationOutputLocation
forall a. Maybe a
Prelude.Nothing,
      $sel:syncCompliance:AssociationVersionInfo' :: Maybe AssociationSyncCompliance
syncCompliance = Maybe AssociationSyncCompliance
forall a. Maybe a
Prelude.Nothing,
      $sel:targets:AssociationVersionInfo' :: Maybe [Target]
targets = Maybe [Target]
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:AssociationVersionInfo' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
      $sel:documentVersion:AssociationVersionInfo' :: Maybe Text
documentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associationVersion:AssociationVersionInfo' :: Maybe Text
associationVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associationName:AssociationVersionInfo' :: Maybe Text
associationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:calendarNames:AssociationVersionInfo' :: Maybe [Text]
calendarNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:complianceSeverity:AssociationVersionInfo' :: Maybe AssociationComplianceSeverity
complianceSeverity = Maybe AssociationComplianceSeverity
forall a. Maybe a
Prelude.Nothing,
      $sel:maxConcurrency:AssociationVersionInfo' :: Maybe Text
maxConcurrency = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The ID created by the system when the association was created.
associationVersionInfo_associationId :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe Prelude.Text)
associationVersionInfo_associationId :: (Maybe Text -> f (Maybe Text))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_associationId = (AssociationVersionInfo -> Maybe Text)
-> (AssociationVersionInfo -> Maybe Text -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe Text
associationId :: Maybe Text
$sel:associationId:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe Text
associationId} -> Maybe Text
associationId) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe Text
a -> AssociationVersionInfo
s {$sel:associationId:AssociationVersionInfo' :: Maybe Text
associationId = Maybe Text
a} :: AssociationVersionInfo)

-- | The combination of Amazon Web Services Regions and Amazon Web Services
-- accounts where you wanted to run the association when this association
-- version was created.
associationVersionInfo_targetLocations :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe (Prelude.NonEmpty TargetLocation))
associationVersionInfo_targetLocations :: (Maybe (NonEmpty TargetLocation)
 -> f (Maybe (NonEmpty TargetLocation)))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_targetLocations = (AssociationVersionInfo -> Maybe (NonEmpty TargetLocation))
-> (AssociationVersionInfo
    -> Maybe (NonEmpty TargetLocation) -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe (NonEmpty TargetLocation))
     (Maybe (NonEmpty TargetLocation))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe (NonEmpty TargetLocation)
targetLocations :: Maybe (NonEmpty TargetLocation)
$sel:targetLocations:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe (NonEmpty TargetLocation)
targetLocations} -> Maybe (NonEmpty TargetLocation)
targetLocations) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe (NonEmpty TargetLocation)
a -> AssociationVersionInfo
s {$sel:targetLocations:AssociationVersionInfo' :: Maybe (NonEmpty TargetLocation)
targetLocations = Maybe (NonEmpty TargetLocation)
a} :: AssociationVersionInfo) ((Maybe (NonEmpty TargetLocation)
  -> f (Maybe (NonEmpty TargetLocation)))
 -> AssociationVersionInfo -> f AssociationVersionInfo)
-> ((Maybe (NonEmpty TargetLocation)
     -> f (Maybe (NonEmpty TargetLocation)))
    -> Maybe (NonEmpty TargetLocation)
    -> f (Maybe (NonEmpty TargetLocation)))
-> (Maybe (NonEmpty TargetLocation)
    -> f (Maybe (NonEmpty TargetLocation)))
-> AssociationVersionInfo
-> f AssociationVersionInfo
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.
associationVersionInfo_applyOnlyAtCronInterval :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe Prelude.Bool)
associationVersionInfo_applyOnlyAtCronInterval :: (Maybe Bool -> f (Maybe Bool))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_applyOnlyAtCronInterval = (AssociationVersionInfo -> Maybe Bool)
-> (AssociationVersionInfo -> Maybe Bool -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe Bool
applyOnlyAtCronInterval :: Maybe Bool
$sel:applyOnlyAtCronInterval:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe Bool
applyOnlyAtCronInterval} -> Maybe Bool
applyOnlyAtCronInterval) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe Bool
a -> AssociationVersionInfo
s {$sel:applyOnlyAtCronInterval:AssociationVersionInfo' :: Maybe Bool
applyOnlyAtCronInterval = Maybe Bool
a} :: AssociationVersionInfo)

-- | The date the association version was created.
associationVersionInfo_createdDate :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe Prelude.UTCTime)
associationVersionInfo_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_createdDate = (AssociationVersionInfo -> Maybe POSIX)
-> (AssociationVersionInfo
    -> Maybe POSIX -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe POSIX
a -> AssociationVersionInfo
s {$sel:createdDate:AssociationVersionInfo' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: AssociationVersionInfo) ((Maybe POSIX -> f (Maybe POSIX))
 -> AssociationVersionInfo -> f AssociationVersionInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AssociationVersionInfo
-> f AssociationVersionInfo
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.
associationVersionInfo_maxErrors :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe Prelude.Text)
associationVersionInfo_maxErrors :: (Maybe Text -> f (Maybe Text))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_maxErrors = (AssociationVersionInfo -> Maybe Text)
-> (AssociationVersionInfo -> Maybe Text -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe Text
maxErrors :: Maybe Text
$sel:maxErrors:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe Text
maxErrors} -> Maybe Text
maxErrors) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe Text
a -> AssociationVersionInfo
s {$sel:maxErrors:AssociationVersionInfo' :: Maybe Text
maxErrors = Maybe Text
a} :: AssociationVersionInfo)

-- | The cron or rate schedule specified for the association when the
-- association version was created.
associationVersionInfo_scheduleExpression :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe Prelude.Text)
associationVersionInfo_scheduleExpression :: (Maybe Text -> f (Maybe Text))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_scheduleExpression = (AssociationVersionInfo -> Maybe Text)
-> (AssociationVersionInfo -> Maybe Text -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe Text
scheduleExpression :: Maybe Text
$sel:scheduleExpression:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe Text
scheduleExpression} -> Maybe Text
scheduleExpression) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe Text
a -> AssociationVersionInfo
s {$sel:scheduleExpression:AssociationVersionInfo' :: Maybe Text
scheduleExpression = Maybe Text
a} :: AssociationVersionInfo)

-- | The name specified when the association was created.
associationVersionInfo_name :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe Prelude.Text)
associationVersionInfo_name :: (Maybe Text -> f (Maybe Text))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_name = (AssociationVersionInfo -> Maybe Text)
-> (AssociationVersionInfo -> Maybe Text -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe Text
name :: Maybe Text
$sel:name:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe Text
name} -> Maybe Text
name) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe Text
a -> AssociationVersionInfo
s {$sel:name:AssociationVersionInfo' :: Maybe Text
name = Maybe Text
a} :: AssociationVersionInfo)

-- | The location in Amazon S3 specified for the association when the
-- association version was created.
associationVersionInfo_outputLocation :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe InstanceAssociationOutputLocation)
associationVersionInfo_outputLocation :: (Maybe InstanceAssociationOutputLocation
 -> f (Maybe InstanceAssociationOutputLocation))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_outputLocation = (AssociationVersionInfo -> Maybe InstanceAssociationOutputLocation)
-> (AssociationVersionInfo
    -> Maybe InstanceAssociationOutputLocation
    -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe InstanceAssociationOutputLocation)
     (Maybe InstanceAssociationOutputLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe InstanceAssociationOutputLocation
outputLocation :: Maybe InstanceAssociationOutputLocation
$sel:outputLocation:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe InstanceAssociationOutputLocation
outputLocation} -> Maybe InstanceAssociationOutputLocation
outputLocation) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe InstanceAssociationOutputLocation
a -> AssociationVersionInfo
s {$sel:outputLocation:AssociationVersionInfo' :: Maybe InstanceAssociationOutputLocation
outputLocation = Maybe InstanceAssociationOutputLocation
a} :: AssociationVersionInfo)

-- | 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.
associationVersionInfo_syncCompliance :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe AssociationSyncCompliance)
associationVersionInfo_syncCompliance :: (Maybe AssociationSyncCompliance
 -> f (Maybe AssociationSyncCompliance))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_syncCompliance = (AssociationVersionInfo -> Maybe AssociationSyncCompliance)
-> (AssociationVersionInfo
    -> Maybe AssociationSyncCompliance -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe AssociationSyncCompliance)
     (Maybe AssociationSyncCompliance)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe AssociationSyncCompliance
syncCompliance :: Maybe AssociationSyncCompliance
$sel:syncCompliance:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe AssociationSyncCompliance
syncCompliance} -> Maybe AssociationSyncCompliance
syncCompliance) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe AssociationSyncCompliance
a -> AssociationVersionInfo
s {$sel:syncCompliance:AssociationVersionInfo' :: Maybe AssociationSyncCompliance
syncCompliance = Maybe AssociationSyncCompliance
a} :: AssociationVersionInfo)

-- | The targets specified for the association when the association version
-- was created.
associationVersionInfo_targets :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe [Target])
associationVersionInfo_targets :: (Maybe [Target] -> f (Maybe [Target]))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_targets = (AssociationVersionInfo -> Maybe [Target])
-> (AssociationVersionInfo
    -> Maybe [Target] -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe [Target])
     (Maybe [Target])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe [Target]
a -> AssociationVersionInfo
s {$sel:targets:AssociationVersionInfo' :: Maybe [Target]
targets = Maybe [Target]
a} :: AssociationVersionInfo) ((Maybe [Target] -> f (Maybe [Target]))
 -> AssociationVersionInfo -> f AssociationVersionInfo)
-> ((Maybe [Target] -> f (Maybe [Target]))
    -> Maybe [Target] -> f (Maybe [Target]))
-> (Maybe [Target] -> f (Maybe [Target]))
-> AssociationVersionInfo
-> f AssociationVersionInfo
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

-- | Parameters specified when the association version was created.
associationVersionInfo_parameters :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
associationVersionInfo_parameters :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_parameters = (AssociationVersionInfo -> Maybe (HashMap Text [Text]))
-> (AssociationVersionInfo
    -> Maybe (HashMap Text [Text]) -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (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 (\AssociationVersionInfo' {Maybe (HashMap Text [Text])
parameters :: Maybe (HashMap Text [Text])
$sel:parameters:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe (HashMap Text [Text])
parameters} -> Maybe (HashMap Text [Text])
parameters) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe (HashMap Text [Text])
a -> AssociationVersionInfo
s {$sel:parameters:AssociationVersionInfo' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
a} :: AssociationVersionInfo) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
 -> AssociationVersionInfo -> f AssociationVersionInfo)
-> ((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])))
-> AssociationVersionInfo
-> f AssociationVersionInfo
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 version of an Amazon Web Services Systems Manager document (SSM
-- document) used when the association version was created.
associationVersionInfo_documentVersion :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe Prelude.Text)
associationVersionInfo_documentVersion :: (Maybe Text -> f (Maybe Text))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_documentVersion = (AssociationVersionInfo -> Maybe Text)
-> (AssociationVersionInfo -> Maybe Text -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe Text
a -> AssociationVersionInfo
s {$sel:documentVersion:AssociationVersionInfo' :: Maybe Text
documentVersion = Maybe Text
a} :: AssociationVersionInfo)

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

-- | The name specified for the association version when the association
-- version was created.
associationVersionInfo_associationName :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe Prelude.Text)
associationVersionInfo_associationName :: (Maybe Text -> f (Maybe Text))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_associationName = (AssociationVersionInfo -> Maybe Text)
-> (AssociationVersionInfo -> Maybe Text -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe Text
associationName :: Maybe Text
$sel:associationName:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe Text
associationName} -> Maybe Text
associationName) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe Text
a -> AssociationVersionInfo
s {$sel:associationName:AssociationVersionInfo' :: Maybe Text
associationName = Maybe Text
a} :: AssociationVersionInfo)

-- | The names or Amazon Resource Names (ARNs) of the Change Calendar type
-- documents your associations are gated under. The associations for this
-- version 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>.
associationVersionInfo_calendarNames :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe [Prelude.Text])
associationVersionInfo_calendarNames :: (Maybe [Text] -> f (Maybe [Text]))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_calendarNames = (AssociationVersionInfo -> Maybe [Text])
-> (AssociationVersionInfo
    -> Maybe [Text] -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe [Text]
calendarNames :: Maybe [Text]
$sel:calendarNames:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe [Text]
calendarNames} -> Maybe [Text]
calendarNames) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe [Text]
a -> AssociationVersionInfo
s {$sel:calendarNames:AssociationVersionInfo' :: Maybe [Text]
calendarNames = Maybe [Text]
a} :: AssociationVersionInfo) ((Maybe [Text] -> f (Maybe [Text]))
 -> AssociationVersionInfo -> f AssociationVersionInfo)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> AssociationVersionInfo
-> f AssociationVersionInfo
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.
associationVersionInfo_complianceSeverity :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe AssociationComplianceSeverity)
associationVersionInfo_complianceSeverity :: (Maybe AssociationComplianceSeverity
 -> f (Maybe AssociationComplianceSeverity))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_complianceSeverity = (AssociationVersionInfo -> Maybe AssociationComplianceSeverity)
-> (AssociationVersionInfo
    -> Maybe AssociationComplianceSeverity -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe AssociationComplianceSeverity)
     (Maybe AssociationComplianceSeverity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe AssociationComplianceSeverity
complianceSeverity :: Maybe AssociationComplianceSeverity
$sel:complianceSeverity:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe AssociationComplianceSeverity
complianceSeverity} -> Maybe AssociationComplianceSeverity
complianceSeverity) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe AssociationComplianceSeverity
a -> AssociationVersionInfo
s {$sel:complianceSeverity:AssociationVersionInfo' :: Maybe AssociationComplianceSeverity
complianceSeverity = Maybe AssociationComplianceSeverity
a} :: AssociationVersionInfo)

-- | 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@.
associationVersionInfo_maxConcurrency :: Lens.Lens' AssociationVersionInfo (Prelude.Maybe Prelude.Text)
associationVersionInfo_maxConcurrency :: (Maybe Text -> f (Maybe Text))
-> AssociationVersionInfo -> f AssociationVersionInfo
associationVersionInfo_maxConcurrency = (AssociationVersionInfo -> Maybe Text)
-> (AssociationVersionInfo -> Maybe Text -> AssociationVersionInfo)
-> Lens
     AssociationVersionInfo
     AssociationVersionInfo
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociationVersionInfo' {Maybe Text
maxConcurrency :: Maybe Text
$sel:maxConcurrency:AssociationVersionInfo' :: AssociationVersionInfo -> Maybe Text
maxConcurrency} -> Maybe Text
maxConcurrency) (\s :: AssociationVersionInfo
s@AssociationVersionInfo' {} Maybe Text
a -> AssociationVersionInfo
s {$sel:maxConcurrency:AssociationVersionInfo' :: Maybe Text
maxConcurrency = Maybe Text
a} :: AssociationVersionInfo)

instance Core.FromJSON AssociationVersionInfo where
  parseJSON :: Value -> Parser AssociationVersionInfo
parseJSON =
    String
-> (Object -> Parser AssociationVersionInfo)
-> Value
-> Parser AssociationVersionInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AssociationVersionInfo"
      ( \Object
x ->
          Maybe Text
-> Maybe (NonEmpty TargetLocation)
-> Maybe Bool
-> 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 AssociationComplianceSeverity
-> Maybe Text
-> AssociationVersionInfo
AssociationVersionInfo'
            (Maybe Text
 -> Maybe (NonEmpty TargetLocation)
 -> Maybe Bool
 -> 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 AssociationComplianceSeverity
 -> Maybe Text
 -> AssociationVersionInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty TargetLocation)
      -> Maybe Bool
      -> 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 AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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 (NonEmpty TargetLocation)
   -> Maybe Bool
   -> 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 AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationVersionInfo)
-> Parser (Maybe (NonEmpty TargetLocation))
-> Parser
     (Maybe Bool
      -> 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 AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationVersionInfo)
-> Parser (Maybe Bool)
-> 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 AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationVersionInfo)
-> 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 AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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
"CreatedDate")
            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 AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationVersionInfo)
-> 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 AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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 AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationVersionInfo)
-> 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 AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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 AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationVersionInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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 AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationVersionInfo)
-> Parser (Maybe InstanceAssociationOutputLocation)
-> Parser
     (Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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 AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationVersionInfo)
-> Parser (Maybe AssociationSyncCompliance)
-> Parser
     (Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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 AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationVersionInfo)
-> Parser (Maybe [Target])
-> Parser
     (Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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 AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationVersionInfo)
-> Parser (Maybe (HashMap Text [Text]))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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 AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationVersionInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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 AssociationComplianceSeverity
   -> Maybe Text
   -> AssociationVersionInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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
   -> AssociationVersionInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> AssociationVersionInfo)
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
   -> AssociationVersionInfo)
-> Parser (Maybe [Text])
-> Parser
     (Maybe AssociationComplianceSeverity
      -> Maybe Text -> AssociationVersionInfo)
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 -> AssociationVersionInfo)
-> Parser (Maybe AssociationComplianceSeverity)
-> Parser (Maybe Text -> AssociationVersionInfo)
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 -> AssociationVersionInfo)
-> Parser (Maybe Text) -> Parser AssociationVersionInfo
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 AssociationVersionInfo

instance Prelude.NFData AssociationVersionInfo