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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.AssociationOverview
import Amazonka.SSM.Types.Target

-- | Describes an association of a Amazon Web Services Systems Manager
-- document (SSM document) and an instance.
--
-- /See:/ 'newAssociation' smart constructor.
data Association = Association'
  { -- | The ID created by the system when you create an association. An
    -- association is a binding between a document and a set of targets with a
    -- schedule.
    Association -> Maybe Text
associationId :: Prelude.Maybe Prelude.Text,
    -- | The instance ID.
    Association -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
    -- | Information about the association.
    Association -> Maybe AssociationOverview
overview :: Prelude.Maybe AssociationOverview,
    -- | The date on which the association was last run.
    Association -> Maybe POSIX
lastExecutionDate :: Prelude.Maybe Core.POSIX,
    -- | A cron expression that specifies a schedule when the association runs.
    -- The schedule runs in Coordinated Universal Time (UTC).
    Association -> Maybe Text
scheduleExpression :: Prelude.Maybe Prelude.Text,
    -- | The name of the SSM document.
    Association -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The instances targeted by the request to create an association. You can
    -- target all instances in an Amazon Web Services account by specifying the
    -- @InstanceIds@ key with a value of @*@.
    Association -> Maybe [Target]
targets :: Prelude.Maybe [Target],
    -- | The version of the document used in the association.
    Association -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
    -- | The association version.
    Association -> Maybe Text
associationVersion :: Prelude.Maybe Prelude.Text,
    -- | The association name.
    Association -> Maybe Text
associationName :: Prelude.Maybe Prelude.Text
  }
  deriving (Association -> Association -> Bool
(Association -> Association -> Bool)
-> (Association -> Association -> Bool) -> Eq Association
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Association -> Association -> Bool
$c/= :: Association -> Association -> Bool
== :: Association -> Association -> Bool
$c== :: Association -> Association -> Bool
Prelude.Eq, ReadPrec [Association]
ReadPrec Association
Int -> ReadS Association
ReadS [Association]
(Int -> ReadS Association)
-> ReadS [Association]
-> ReadPrec Association
-> ReadPrec [Association]
-> Read Association
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Association]
$creadListPrec :: ReadPrec [Association]
readPrec :: ReadPrec Association
$creadPrec :: ReadPrec Association
readList :: ReadS [Association]
$creadList :: ReadS [Association]
readsPrec :: Int -> ReadS Association
$creadsPrec :: Int -> ReadS Association
Prelude.Read, Int -> Association -> ShowS
[Association] -> ShowS
Association -> String
(Int -> Association -> ShowS)
-> (Association -> String)
-> ([Association] -> ShowS)
-> Show Association
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Association] -> ShowS
$cshowList :: [Association] -> ShowS
show :: Association -> String
$cshow :: Association -> String
showsPrec :: Int -> Association -> ShowS
$cshowsPrec :: Int -> Association -> ShowS
Prelude.Show, (forall x. Association -> Rep Association x)
-> (forall x. Rep Association x -> Association)
-> Generic Association
forall x. Rep Association x -> Association
forall x. Association -> Rep Association x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Association x -> Association
$cfrom :: forall x. Association -> Rep Association x
Prelude.Generic)

-- |
-- Create a value of 'Association' 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', 'association_associationId' - The ID created by the system when you create an association. An
-- association is a binding between a document and a set of targets with a
-- schedule.
--
-- 'instanceId', 'association_instanceId' - The instance ID.
--
-- 'overview', 'association_overview' - Information about the association.
--
-- 'lastExecutionDate', 'association_lastExecutionDate' - The date on which the association was last run.
--
-- 'scheduleExpression', 'association_scheduleExpression' - A cron expression that specifies a schedule when the association runs.
-- The schedule runs in Coordinated Universal Time (UTC).
--
-- 'name', 'association_name' - The name of the SSM document.
--
-- 'targets', 'association_targets' - The instances targeted by the request to create an association. You can
-- target all instances in an Amazon Web Services account by specifying the
-- @InstanceIds@ key with a value of @*@.
--
-- 'documentVersion', 'association_documentVersion' - The version of the document used in the association.
--
-- 'associationVersion', 'association_associationVersion' - The association version.
--
-- 'associationName', 'association_associationName' - The association name.
newAssociation ::
  Association
newAssociation :: Association
newAssociation =
  Association' :: Maybe Text
-> Maybe Text
-> Maybe AssociationOverview
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [Target]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Association
Association'
    { $sel:associationId:Association' :: Maybe Text
associationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceId:Association' :: Maybe Text
instanceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:overview:Association' :: Maybe AssociationOverview
overview = Maybe AssociationOverview
forall a. Maybe a
Prelude.Nothing,
      $sel:lastExecutionDate:Association' :: Maybe POSIX
lastExecutionDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduleExpression:Association' :: Maybe Text
scheduleExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Association' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targets:Association' :: Maybe [Target]
targets = Maybe [Target]
forall a. Maybe a
Prelude.Nothing,
      $sel:documentVersion:Association' :: Maybe Text
documentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associationVersion:Association' :: Maybe Text
associationVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associationName:Association' :: Maybe Text
associationName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The ID created by the system when you create an association. An
-- association is a binding between a document and a set of targets with a
-- schedule.
association_associationId :: Lens.Lens' Association (Prelude.Maybe Prelude.Text)
association_associationId :: (Maybe Text -> f (Maybe Text)) -> Association -> f Association
association_associationId = (Association -> Maybe Text)
-> (Association -> Maybe Text -> Association)
-> Lens Association Association (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Association' {Maybe Text
associationId :: Maybe Text
$sel:associationId:Association' :: Association -> Maybe Text
associationId} -> Maybe Text
associationId) (\s :: Association
s@Association' {} Maybe Text
a -> Association
s {$sel:associationId:Association' :: Maybe Text
associationId = Maybe Text
a} :: Association)

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

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

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

-- | A cron expression that specifies a schedule when the association runs.
-- The schedule runs in Coordinated Universal Time (UTC).
association_scheduleExpression :: Lens.Lens' Association (Prelude.Maybe Prelude.Text)
association_scheduleExpression :: (Maybe Text -> f (Maybe Text)) -> Association -> f Association
association_scheduleExpression = (Association -> Maybe Text)
-> (Association -> Maybe Text -> Association)
-> Lens Association Association (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Association' {Maybe Text
scheduleExpression :: Maybe Text
$sel:scheduleExpression:Association' :: Association -> Maybe Text
scheduleExpression} -> Maybe Text
scheduleExpression) (\s :: Association
s@Association' {} Maybe Text
a -> Association
s {$sel:scheduleExpression:Association' :: Maybe Text
scheduleExpression = Maybe Text
a} :: Association)

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

-- | The instances targeted by the request to create an association. You can
-- target all instances in an Amazon Web Services account by specifying the
-- @InstanceIds@ key with a value of @*@.
association_targets :: Lens.Lens' Association (Prelude.Maybe [Target])
association_targets :: (Maybe [Target] -> f (Maybe [Target]))
-> Association -> f Association
association_targets = (Association -> Maybe [Target])
-> (Association -> Maybe [Target] -> Association)
-> Lens Association Association (Maybe [Target]) (Maybe [Target])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Association' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:Association' :: Association -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: Association
s@Association' {} Maybe [Target]
a -> Association
s {$sel:targets:Association' :: Maybe [Target]
targets = Maybe [Target]
a} :: Association) ((Maybe [Target] -> f (Maybe [Target]))
 -> Association -> f Association)
-> ((Maybe [Target] -> f (Maybe [Target]))
    -> Maybe [Target] -> f (Maybe [Target]))
-> (Maybe [Target] -> f (Maybe [Target]))
-> Association
-> f Association
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

-- | The version of the document used in the association.
association_documentVersion :: Lens.Lens' Association (Prelude.Maybe Prelude.Text)
association_documentVersion :: (Maybe Text -> f (Maybe Text)) -> Association -> f Association
association_documentVersion = (Association -> Maybe Text)
-> (Association -> Maybe Text -> Association)
-> Lens Association Association (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Association' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:Association' :: Association -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: Association
s@Association' {} Maybe Text
a -> Association
s {$sel:documentVersion:Association' :: Maybe Text
documentVersion = Maybe Text
a} :: Association)

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

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

instance Core.FromJSON Association where
  parseJSON :: Value -> Parser Association
parseJSON =
    String
-> (Object -> Parser Association) -> Value -> Parser Association
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Association"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe AssociationOverview
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [Target]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Association
Association'
            (Maybe Text
 -> Maybe Text
 -> Maybe AssociationOverview
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Target]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Association)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AssociationOverview
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Association)
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 AssociationOverview
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Association)
-> Parser (Maybe Text)
-> Parser
     (Maybe AssociationOverview
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Association)
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 AssociationOverview
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Association)
-> Parser (Maybe AssociationOverview)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Association)
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 Text
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Association)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Association)
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 [Target]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Association)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Target]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Association)
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 [Target]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Association)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Target]
      -> Maybe Text -> Maybe Text -> Maybe Text -> Association)
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 [Target]
   -> Maybe Text -> Maybe Text -> Maybe Text -> Association)
-> Parser (Maybe [Target])
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> Association)
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 Text -> Maybe Text -> Maybe Text -> Association)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Association)
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 -> Association)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Association)
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 -> Association)
-> Parser (Maybe Text) -> Parser Association
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")
      )

instance Prelude.Hashable Association

instance Prelude.NFData Association