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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.InstanceAggregatedAssociationOverview
import Amazonka.SSM.Types.PingStatus
import Amazonka.SSM.Types.PlatformType
import Amazonka.SSM.Types.ResourceType

-- | Describes a filter for a specific list of instances.
--
-- /See:/ 'newInstanceInformation' smart constructor.
data InstanceInformation = InstanceInformation'
  { -- | The instance ID.
    InstanceInformation -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
    -- | Connection status of SSM Agent.
    --
    -- The status @Inactive@ has been deprecated and is no longer in use.
    InstanceInformation -> Maybe PingStatus
pingStatus :: Prelude.Maybe PingStatus,
    -- | The IP address of the managed instance.
    InstanceInformation -> Maybe Text
iPAddress :: Prelude.Maybe Prelude.Text,
    -- | The type of instance. Instances are either EC2 instances or managed
    -- instances.
    InstanceInformation -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
    -- | The date the server or VM was registered with Amazon Web Services as a
    -- managed instance.
    InstanceInformation -> Maybe POSIX
registrationDate :: Prelude.Maybe Core.POSIX,
    -- | The version of the OS platform running on your instance.
    InstanceInformation -> Maybe Text
platformVersion :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether the latest version of SSM Agent is running on your
    -- Linux Managed Instance. This field doesn\'t indicate whether or not the
    -- latest version is installed on Windows managed instances, because some
    -- older versions of Windows Server use the EC2Config service to process
    -- Systems Manager requests.
    InstanceInformation -> Maybe Bool
isLatestVersion :: Prelude.Maybe Prelude.Bool,
    -- | The version of SSM Agent running on your Linux instance.
    InstanceInformation -> Maybe Text
agentVersion :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the agent last pinged the Systems Manager
    -- service.
    InstanceInformation -> Maybe POSIX
lastPingDateTime :: Prelude.Maybe Core.POSIX,
    -- | The last date the association was successfully run.
    InstanceInformation -> Maybe POSIX
lastSuccessfulAssociationExecutionDate :: Prelude.Maybe Core.POSIX,
    -- | The activation ID created by Amazon Web Services Systems Manager when
    -- the server or virtual machine (VM) was registered.
    InstanceInformation -> Maybe Text
activationId :: Prelude.Maybe Prelude.Text,
    -- | The name assigned to an on-premises server or virtual machine (VM) when
    -- it is activated as a Systems Manager managed instance. The name is
    -- specified as the @DefaultInstanceName@ property using the
    -- CreateActivation command. It is applied to the managed instance by
    -- specifying the Activation Code and Activation ID when you install SSM
    -- Agent on the instance, as explained in
    -- <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-linux.html Install SSM Agent for a hybrid environment (Linux)>
    -- and
    -- <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-win.html Install SSM Agent for a hybrid environment (Windows)>.
    -- To retrieve the Name tag of an EC2 instance, use the Amazon EC2
    -- @DescribeInstances@ operation. For information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html DescribeInstances>
    -- in the /Amazon EC2 API Reference/ or
    -- <https://docs.aws.amazon.com/cli/latest/ec2/describe-instances.html describe-instances>
    -- in the /Amazon Web Services CLI Command Reference/.
    InstanceInformation -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The operating system platform type.
    InstanceInformation -> Maybe PlatformType
platformType :: Prelude.Maybe PlatformType,
    -- | Information about the association.
    InstanceInformation -> Maybe InstanceAggregatedAssociationOverview
associationOverview :: Prelude.Maybe InstanceAggregatedAssociationOverview,
    -- | The status of the association.
    InstanceInformation -> Maybe Text
associationStatus :: Prelude.Maybe Prelude.Text,
    -- | The date the association was last run.
    InstanceInformation -> Maybe POSIX
lastAssociationExecutionDate :: Prelude.Maybe Core.POSIX,
    -- | The name of the operating system platform running on your instance.
    InstanceInformation -> Maybe Text
platformName :: Prelude.Maybe Prelude.Text,
    -- | The fully qualified host name of the managed instance.
    InstanceInformation -> Maybe Text
computerName :: Prelude.Maybe Prelude.Text,
    -- | The Identity and Access Management (IAM) role assigned to the
    -- on-premises Systems Manager managed instance. This call doesn\'t return
    -- the IAM role for Amazon Elastic Compute Cloud (Amazon EC2) instances. To
    -- retrieve the IAM role for an EC2 instance, use the Amazon EC2
    -- @DescribeInstances@ operation. For information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html DescribeInstances>
    -- in the /Amazon EC2 API Reference/ or
    -- <https://docs.aws.amazon.com/cli/latest/ec2/describe-instances.html describe-instances>
    -- in the /Amazon Web Services CLI Command Reference/.
    InstanceInformation -> Maybe Text
iamRole :: Prelude.Maybe Prelude.Text
  }
  deriving (InstanceInformation -> InstanceInformation -> Bool
(InstanceInformation -> InstanceInformation -> Bool)
-> (InstanceInformation -> InstanceInformation -> Bool)
-> Eq InstanceInformation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceInformation -> InstanceInformation -> Bool
$c/= :: InstanceInformation -> InstanceInformation -> Bool
== :: InstanceInformation -> InstanceInformation -> Bool
$c== :: InstanceInformation -> InstanceInformation -> Bool
Prelude.Eq, ReadPrec [InstanceInformation]
ReadPrec InstanceInformation
Int -> ReadS InstanceInformation
ReadS [InstanceInformation]
(Int -> ReadS InstanceInformation)
-> ReadS [InstanceInformation]
-> ReadPrec InstanceInformation
-> ReadPrec [InstanceInformation]
-> Read InstanceInformation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstanceInformation]
$creadListPrec :: ReadPrec [InstanceInformation]
readPrec :: ReadPrec InstanceInformation
$creadPrec :: ReadPrec InstanceInformation
readList :: ReadS [InstanceInformation]
$creadList :: ReadS [InstanceInformation]
readsPrec :: Int -> ReadS InstanceInformation
$creadsPrec :: Int -> ReadS InstanceInformation
Prelude.Read, Int -> InstanceInformation -> ShowS
[InstanceInformation] -> ShowS
InstanceInformation -> String
(Int -> InstanceInformation -> ShowS)
-> (InstanceInformation -> String)
-> ([InstanceInformation] -> ShowS)
-> Show InstanceInformation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceInformation] -> ShowS
$cshowList :: [InstanceInformation] -> ShowS
show :: InstanceInformation -> String
$cshow :: InstanceInformation -> String
showsPrec :: Int -> InstanceInformation -> ShowS
$cshowsPrec :: Int -> InstanceInformation -> ShowS
Prelude.Show, (forall x. InstanceInformation -> Rep InstanceInformation x)
-> (forall x. Rep InstanceInformation x -> InstanceInformation)
-> Generic InstanceInformation
forall x. Rep InstanceInformation x -> InstanceInformation
forall x. InstanceInformation -> Rep InstanceInformation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstanceInformation x -> InstanceInformation
$cfrom :: forall x. InstanceInformation -> Rep InstanceInformation x
Prelude.Generic)

-- |
-- Create a value of 'InstanceInformation' 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:
--
-- 'instanceId', 'instanceInformation_instanceId' - The instance ID.
--
-- 'pingStatus', 'instanceInformation_pingStatus' - Connection status of SSM Agent.
--
-- The status @Inactive@ has been deprecated and is no longer in use.
--
-- 'iPAddress', 'instanceInformation_iPAddress' - The IP address of the managed instance.
--
-- 'resourceType', 'instanceInformation_resourceType' - The type of instance. Instances are either EC2 instances or managed
-- instances.
--
-- 'registrationDate', 'instanceInformation_registrationDate' - The date the server or VM was registered with Amazon Web Services as a
-- managed instance.
--
-- 'platformVersion', 'instanceInformation_platformVersion' - The version of the OS platform running on your instance.
--
-- 'isLatestVersion', 'instanceInformation_isLatestVersion' - Indicates whether the latest version of SSM Agent is running on your
-- Linux Managed Instance. This field doesn\'t indicate whether or not the
-- latest version is installed on Windows managed instances, because some
-- older versions of Windows Server use the EC2Config service to process
-- Systems Manager requests.
--
-- 'agentVersion', 'instanceInformation_agentVersion' - The version of SSM Agent running on your Linux instance.
--
-- 'lastPingDateTime', 'instanceInformation_lastPingDateTime' - The date and time when the agent last pinged the Systems Manager
-- service.
--
-- 'lastSuccessfulAssociationExecutionDate', 'instanceInformation_lastSuccessfulAssociationExecutionDate' - The last date the association was successfully run.
--
-- 'activationId', 'instanceInformation_activationId' - The activation ID created by Amazon Web Services Systems Manager when
-- the server or virtual machine (VM) was registered.
--
-- 'name', 'instanceInformation_name' - The name assigned to an on-premises server or virtual machine (VM) when
-- it is activated as a Systems Manager managed instance. The name is
-- specified as the @DefaultInstanceName@ property using the
-- CreateActivation command. It is applied to the managed instance by
-- specifying the Activation Code and Activation ID when you install SSM
-- Agent on the instance, as explained in
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-linux.html Install SSM Agent for a hybrid environment (Linux)>
-- and
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-win.html Install SSM Agent for a hybrid environment (Windows)>.
-- To retrieve the Name tag of an EC2 instance, use the Amazon EC2
-- @DescribeInstances@ operation. For information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html DescribeInstances>
-- in the /Amazon EC2 API Reference/ or
-- <https://docs.aws.amazon.com/cli/latest/ec2/describe-instances.html describe-instances>
-- in the /Amazon Web Services CLI Command Reference/.
--
-- 'platformType', 'instanceInformation_platformType' - The operating system platform type.
--
-- 'associationOverview', 'instanceInformation_associationOverview' - Information about the association.
--
-- 'associationStatus', 'instanceInformation_associationStatus' - The status of the association.
--
-- 'lastAssociationExecutionDate', 'instanceInformation_lastAssociationExecutionDate' - The date the association was last run.
--
-- 'platformName', 'instanceInformation_platformName' - The name of the operating system platform running on your instance.
--
-- 'computerName', 'instanceInformation_computerName' - The fully qualified host name of the managed instance.
--
-- 'iamRole', 'instanceInformation_iamRole' - The Identity and Access Management (IAM) role assigned to the
-- on-premises Systems Manager managed instance. This call doesn\'t return
-- the IAM role for Amazon Elastic Compute Cloud (Amazon EC2) instances. To
-- retrieve the IAM role for an EC2 instance, use the Amazon EC2
-- @DescribeInstances@ operation. For information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html DescribeInstances>
-- in the /Amazon EC2 API Reference/ or
-- <https://docs.aws.amazon.com/cli/latest/ec2/describe-instances.html describe-instances>
-- in the /Amazon Web Services CLI Command Reference/.
newInstanceInformation ::
  InstanceInformation
newInstanceInformation :: InstanceInformation
newInstanceInformation =
  InstanceInformation' :: Maybe Text
-> Maybe PingStatus
-> Maybe Text
-> Maybe ResourceType
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe PlatformType
-> Maybe InstanceAggregatedAssociationOverview
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> InstanceInformation
InstanceInformation'
    { $sel:instanceId:InstanceInformation' :: Maybe Text
instanceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pingStatus:InstanceInformation' :: Maybe PingStatus
pingStatus = Maybe PingStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:iPAddress:InstanceInformation' :: Maybe Text
iPAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:InstanceInformation' :: Maybe ResourceType
resourceType = Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:registrationDate:InstanceInformation' :: Maybe POSIX
registrationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:platformVersion:InstanceInformation' :: Maybe Text
platformVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:isLatestVersion:InstanceInformation' :: Maybe Bool
isLatestVersion = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:agentVersion:InstanceInformation' :: Maybe Text
agentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastPingDateTime:InstanceInformation' :: Maybe POSIX
lastPingDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastSuccessfulAssociationExecutionDate:InstanceInformation' :: Maybe POSIX
lastSuccessfulAssociationExecutionDate =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:activationId:InstanceInformation' :: Maybe Text
activationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:InstanceInformation' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:platformType:InstanceInformation' :: Maybe PlatformType
platformType = Maybe PlatformType
forall a. Maybe a
Prelude.Nothing,
      $sel:associationOverview:InstanceInformation' :: Maybe InstanceAggregatedAssociationOverview
associationOverview = Maybe InstanceAggregatedAssociationOverview
forall a. Maybe a
Prelude.Nothing,
      $sel:associationStatus:InstanceInformation' :: Maybe Text
associationStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastAssociationExecutionDate:InstanceInformation' :: Maybe POSIX
lastAssociationExecutionDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:platformName:InstanceInformation' :: Maybe Text
platformName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:computerName:InstanceInformation' :: Maybe Text
computerName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:iamRole:InstanceInformation' :: Maybe Text
iamRole = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

-- | Connection status of SSM Agent.
--
-- The status @Inactive@ has been deprecated and is no longer in use.
instanceInformation_pingStatus :: Lens.Lens' InstanceInformation (Prelude.Maybe PingStatus)
instanceInformation_pingStatus :: (Maybe PingStatus -> f (Maybe PingStatus))
-> InstanceInformation -> f InstanceInformation
instanceInformation_pingStatus = (InstanceInformation -> Maybe PingStatus)
-> (InstanceInformation -> Maybe PingStatus -> InstanceInformation)
-> Lens
     InstanceInformation
     InstanceInformation
     (Maybe PingStatus)
     (Maybe PingStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe PingStatus
pingStatus :: Maybe PingStatus
$sel:pingStatus:InstanceInformation' :: InstanceInformation -> Maybe PingStatus
pingStatus} -> Maybe PingStatus
pingStatus) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe PingStatus
a -> InstanceInformation
s {$sel:pingStatus:InstanceInformation' :: Maybe PingStatus
pingStatus = Maybe PingStatus
a} :: InstanceInformation)

-- | The IP address of the managed instance.
instanceInformation_iPAddress :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.Text)
instanceInformation_iPAddress :: (Maybe Text -> f (Maybe Text))
-> InstanceInformation -> f InstanceInformation
instanceInformation_iPAddress = (InstanceInformation -> Maybe Text)
-> (InstanceInformation -> Maybe Text -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe Text
iPAddress :: Maybe Text
$sel:iPAddress:InstanceInformation' :: InstanceInformation -> Maybe Text
iPAddress} -> Maybe Text
iPAddress) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe Text
a -> InstanceInformation
s {$sel:iPAddress:InstanceInformation' :: Maybe Text
iPAddress = Maybe Text
a} :: InstanceInformation)

-- | The type of instance. Instances are either EC2 instances or managed
-- instances.
instanceInformation_resourceType :: Lens.Lens' InstanceInformation (Prelude.Maybe ResourceType)
instanceInformation_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> InstanceInformation -> f InstanceInformation
instanceInformation_resourceType = (InstanceInformation -> Maybe ResourceType)
-> (InstanceInformation
    -> Maybe ResourceType -> InstanceInformation)
-> Lens
     InstanceInformation
     InstanceInformation
     (Maybe ResourceType)
     (Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:InstanceInformation' :: InstanceInformation -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe ResourceType
a -> InstanceInformation
s {$sel:resourceType:InstanceInformation' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: InstanceInformation)

-- | The date the server or VM was registered with Amazon Web Services as a
-- managed instance.
instanceInformation_registrationDate :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.UTCTime)
instanceInformation_registrationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceInformation -> f InstanceInformation
instanceInformation_registrationDate = (InstanceInformation -> Maybe POSIX)
-> (InstanceInformation -> Maybe POSIX -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe POSIX
registrationDate :: Maybe POSIX
$sel:registrationDate:InstanceInformation' :: InstanceInformation -> Maybe POSIX
registrationDate} -> Maybe POSIX
registrationDate) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe POSIX
a -> InstanceInformation
s {$sel:registrationDate:InstanceInformation' :: Maybe POSIX
registrationDate = Maybe POSIX
a} :: InstanceInformation) ((Maybe POSIX -> f (Maybe POSIX))
 -> InstanceInformation -> f InstanceInformation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceInformation
-> f InstanceInformation
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 version of the OS platform running on your instance.
instanceInformation_platformVersion :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.Text)
instanceInformation_platformVersion :: (Maybe Text -> f (Maybe Text))
-> InstanceInformation -> f InstanceInformation
instanceInformation_platformVersion = (InstanceInformation -> Maybe Text)
-> (InstanceInformation -> Maybe Text -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe Text
platformVersion :: Maybe Text
$sel:platformVersion:InstanceInformation' :: InstanceInformation -> Maybe Text
platformVersion} -> Maybe Text
platformVersion) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe Text
a -> InstanceInformation
s {$sel:platformVersion:InstanceInformation' :: Maybe Text
platformVersion = Maybe Text
a} :: InstanceInformation)

-- | Indicates whether the latest version of SSM Agent is running on your
-- Linux Managed Instance. This field doesn\'t indicate whether or not the
-- latest version is installed on Windows managed instances, because some
-- older versions of Windows Server use the EC2Config service to process
-- Systems Manager requests.
instanceInformation_isLatestVersion :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.Bool)
instanceInformation_isLatestVersion :: (Maybe Bool -> f (Maybe Bool))
-> InstanceInformation -> f InstanceInformation
instanceInformation_isLatestVersion = (InstanceInformation -> Maybe Bool)
-> (InstanceInformation -> Maybe Bool -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe Bool
isLatestVersion :: Maybe Bool
$sel:isLatestVersion:InstanceInformation' :: InstanceInformation -> Maybe Bool
isLatestVersion} -> Maybe Bool
isLatestVersion) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe Bool
a -> InstanceInformation
s {$sel:isLatestVersion:InstanceInformation' :: Maybe Bool
isLatestVersion = Maybe Bool
a} :: InstanceInformation)

-- | The version of SSM Agent running on your Linux instance.
instanceInformation_agentVersion :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.Text)
instanceInformation_agentVersion :: (Maybe Text -> f (Maybe Text))
-> InstanceInformation -> f InstanceInformation
instanceInformation_agentVersion = (InstanceInformation -> Maybe Text)
-> (InstanceInformation -> Maybe Text -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe Text
agentVersion :: Maybe Text
$sel:agentVersion:InstanceInformation' :: InstanceInformation -> Maybe Text
agentVersion} -> Maybe Text
agentVersion) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe Text
a -> InstanceInformation
s {$sel:agentVersion:InstanceInformation' :: Maybe Text
agentVersion = Maybe Text
a} :: InstanceInformation)

-- | The date and time when the agent last pinged the Systems Manager
-- service.
instanceInformation_lastPingDateTime :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.UTCTime)
instanceInformation_lastPingDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceInformation -> f InstanceInformation
instanceInformation_lastPingDateTime = (InstanceInformation -> Maybe POSIX)
-> (InstanceInformation -> Maybe POSIX -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe POSIX
lastPingDateTime :: Maybe POSIX
$sel:lastPingDateTime:InstanceInformation' :: InstanceInformation -> Maybe POSIX
lastPingDateTime} -> Maybe POSIX
lastPingDateTime) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe POSIX
a -> InstanceInformation
s {$sel:lastPingDateTime:InstanceInformation' :: Maybe POSIX
lastPingDateTime = Maybe POSIX
a} :: InstanceInformation) ((Maybe POSIX -> f (Maybe POSIX))
 -> InstanceInformation -> f InstanceInformation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceInformation
-> f InstanceInformation
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 last date the association was successfully run.
instanceInformation_lastSuccessfulAssociationExecutionDate :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.UTCTime)
instanceInformation_lastSuccessfulAssociationExecutionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceInformation -> f InstanceInformation
instanceInformation_lastSuccessfulAssociationExecutionDate = (InstanceInformation -> Maybe POSIX)
-> (InstanceInformation -> Maybe POSIX -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe POSIX
lastSuccessfulAssociationExecutionDate :: Maybe POSIX
$sel:lastSuccessfulAssociationExecutionDate:InstanceInformation' :: InstanceInformation -> Maybe POSIX
lastSuccessfulAssociationExecutionDate} -> Maybe POSIX
lastSuccessfulAssociationExecutionDate) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe POSIX
a -> InstanceInformation
s {$sel:lastSuccessfulAssociationExecutionDate:InstanceInformation' :: Maybe POSIX
lastSuccessfulAssociationExecutionDate = Maybe POSIX
a} :: InstanceInformation) ((Maybe POSIX -> f (Maybe POSIX))
 -> InstanceInformation -> f InstanceInformation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceInformation
-> f InstanceInformation
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 activation ID created by Amazon Web Services Systems Manager when
-- the server or virtual machine (VM) was registered.
instanceInformation_activationId :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.Text)
instanceInformation_activationId :: (Maybe Text -> f (Maybe Text))
-> InstanceInformation -> f InstanceInformation
instanceInformation_activationId = (InstanceInformation -> Maybe Text)
-> (InstanceInformation -> Maybe Text -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe Text
activationId :: Maybe Text
$sel:activationId:InstanceInformation' :: InstanceInformation -> Maybe Text
activationId} -> Maybe Text
activationId) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe Text
a -> InstanceInformation
s {$sel:activationId:InstanceInformation' :: Maybe Text
activationId = Maybe Text
a} :: InstanceInformation)

-- | The name assigned to an on-premises server or virtual machine (VM) when
-- it is activated as a Systems Manager managed instance. The name is
-- specified as the @DefaultInstanceName@ property using the
-- CreateActivation command. It is applied to the managed instance by
-- specifying the Activation Code and Activation ID when you install SSM
-- Agent on the instance, as explained in
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-linux.html Install SSM Agent for a hybrid environment (Linux)>
-- and
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-win.html Install SSM Agent for a hybrid environment (Windows)>.
-- To retrieve the Name tag of an EC2 instance, use the Amazon EC2
-- @DescribeInstances@ operation. For information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html DescribeInstances>
-- in the /Amazon EC2 API Reference/ or
-- <https://docs.aws.amazon.com/cli/latest/ec2/describe-instances.html describe-instances>
-- in the /Amazon Web Services CLI Command Reference/.
instanceInformation_name :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.Text)
instanceInformation_name :: (Maybe Text -> f (Maybe Text))
-> InstanceInformation -> f InstanceInformation
instanceInformation_name = (InstanceInformation -> Maybe Text)
-> (InstanceInformation -> Maybe Text -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe Text
name :: Maybe Text
$sel:name:InstanceInformation' :: InstanceInformation -> Maybe Text
name} -> Maybe Text
name) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe Text
a -> InstanceInformation
s {$sel:name:InstanceInformation' :: Maybe Text
name = Maybe Text
a} :: InstanceInformation)

-- | The operating system platform type.
instanceInformation_platformType :: Lens.Lens' InstanceInformation (Prelude.Maybe PlatformType)
instanceInformation_platformType :: (Maybe PlatformType -> f (Maybe PlatformType))
-> InstanceInformation -> f InstanceInformation
instanceInformation_platformType = (InstanceInformation -> Maybe PlatformType)
-> (InstanceInformation
    -> Maybe PlatformType -> InstanceInformation)
-> Lens
     InstanceInformation
     InstanceInformation
     (Maybe PlatformType)
     (Maybe PlatformType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe PlatformType
platformType :: Maybe PlatformType
$sel:platformType:InstanceInformation' :: InstanceInformation -> Maybe PlatformType
platformType} -> Maybe PlatformType
platformType) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe PlatformType
a -> InstanceInformation
s {$sel:platformType:InstanceInformation' :: Maybe PlatformType
platformType = Maybe PlatformType
a} :: InstanceInformation)

-- | Information about the association.
instanceInformation_associationOverview :: Lens.Lens' InstanceInformation (Prelude.Maybe InstanceAggregatedAssociationOverview)
instanceInformation_associationOverview :: (Maybe InstanceAggregatedAssociationOverview
 -> f (Maybe InstanceAggregatedAssociationOverview))
-> InstanceInformation -> f InstanceInformation
instanceInformation_associationOverview = (InstanceInformation
 -> Maybe InstanceAggregatedAssociationOverview)
-> (InstanceInformation
    -> Maybe InstanceAggregatedAssociationOverview
    -> InstanceInformation)
-> Lens
     InstanceInformation
     InstanceInformation
     (Maybe InstanceAggregatedAssociationOverview)
     (Maybe InstanceAggregatedAssociationOverview)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe InstanceAggregatedAssociationOverview
associationOverview :: Maybe InstanceAggregatedAssociationOverview
$sel:associationOverview:InstanceInformation' :: InstanceInformation -> Maybe InstanceAggregatedAssociationOverview
associationOverview} -> Maybe InstanceAggregatedAssociationOverview
associationOverview) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe InstanceAggregatedAssociationOverview
a -> InstanceInformation
s {$sel:associationOverview:InstanceInformation' :: Maybe InstanceAggregatedAssociationOverview
associationOverview = Maybe InstanceAggregatedAssociationOverview
a} :: InstanceInformation)

-- | The status of the association.
instanceInformation_associationStatus :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.Text)
instanceInformation_associationStatus :: (Maybe Text -> f (Maybe Text))
-> InstanceInformation -> f InstanceInformation
instanceInformation_associationStatus = (InstanceInformation -> Maybe Text)
-> (InstanceInformation -> Maybe Text -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe Text
associationStatus :: Maybe Text
$sel:associationStatus:InstanceInformation' :: InstanceInformation -> Maybe Text
associationStatus} -> Maybe Text
associationStatus) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe Text
a -> InstanceInformation
s {$sel:associationStatus:InstanceInformation' :: Maybe Text
associationStatus = Maybe Text
a} :: InstanceInformation)

-- | The date the association was last run.
instanceInformation_lastAssociationExecutionDate :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.UTCTime)
instanceInformation_lastAssociationExecutionDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceInformation -> f InstanceInformation
instanceInformation_lastAssociationExecutionDate = (InstanceInformation -> Maybe POSIX)
-> (InstanceInformation -> Maybe POSIX -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe POSIX
lastAssociationExecutionDate :: Maybe POSIX
$sel:lastAssociationExecutionDate:InstanceInformation' :: InstanceInformation -> Maybe POSIX
lastAssociationExecutionDate} -> Maybe POSIX
lastAssociationExecutionDate) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe POSIX
a -> InstanceInformation
s {$sel:lastAssociationExecutionDate:InstanceInformation' :: Maybe POSIX
lastAssociationExecutionDate = Maybe POSIX
a} :: InstanceInformation) ((Maybe POSIX -> f (Maybe POSIX))
 -> InstanceInformation -> f InstanceInformation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> InstanceInformation
-> f InstanceInformation
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 name of the operating system platform running on your instance.
instanceInformation_platformName :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.Text)
instanceInformation_platformName :: (Maybe Text -> f (Maybe Text))
-> InstanceInformation -> f InstanceInformation
instanceInformation_platformName = (InstanceInformation -> Maybe Text)
-> (InstanceInformation -> Maybe Text -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe Text
platformName :: Maybe Text
$sel:platformName:InstanceInformation' :: InstanceInformation -> Maybe Text
platformName} -> Maybe Text
platformName) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe Text
a -> InstanceInformation
s {$sel:platformName:InstanceInformation' :: Maybe Text
platformName = Maybe Text
a} :: InstanceInformation)

-- | The fully qualified host name of the managed instance.
instanceInformation_computerName :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.Text)
instanceInformation_computerName :: (Maybe Text -> f (Maybe Text))
-> InstanceInformation -> f InstanceInformation
instanceInformation_computerName = (InstanceInformation -> Maybe Text)
-> (InstanceInformation -> Maybe Text -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe Text
computerName :: Maybe Text
$sel:computerName:InstanceInformation' :: InstanceInformation -> Maybe Text
computerName} -> Maybe Text
computerName) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe Text
a -> InstanceInformation
s {$sel:computerName:InstanceInformation' :: Maybe Text
computerName = Maybe Text
a} :: InstanceInformation)

-- | The Identity and Access Management (IAM) role assigned to the
-- on-premises Systems Manager managed instance. This call doesn\'t return
-- the IAM role for Amazon Elastic Compute Cloud (Amazon EC2) instances. To
-- retrieve the IAM role for an EC2 instance, use the Amazon EC2
-- @DescribeInstances@ operation. For information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html DescribeInstances>
-- in the /Amazon EC2 API Reference/ or
-- <https://docs.aws.amazon.com/cli/latest/ec2/describe-instances.html describe-instances>
-- in the /Amazon Web Services CLI Command Reference/.
instanceInformation_iamRole :: Lens.Lens' InstanceInformation (Prelude.Maybe Prelude.Text)
instanceInformation_iamRole :: (Maybe Text -> f (Maybe Text))
-> InstanceInformation -> f InstanceInformation
instanceInformation_iamRole = (InstanceInformation -> Maybe Text)
-> (InstanceInformation -> Maybe Text -> InstanceInformation)
-> Lens
     InstanceInformation InstanceInformation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceInformation' {Maybe Text
iamRole :: Maybe Text
$sel:iamRole:InstanceInformation' :: InstanceInformation -> Maybe Text
iamRole} -> Maybe Text
iamRole) (\s :: InstanceInformation
s@InstanceInformation' {} Maybe Text
a -> InstanceInformation
s {$sel:iamRole:InstanceInformation' :: Maybe Text
iamRole = Maybe Text
a} :: InstanceInformation)

instance Core.FromJSON InstanceInformation where
  parseJSON :: Value -> Parser InstanceInformation
parseJSON =
    String
-> (Object -> Parser InstanceInformation)
-> Value
-> Parser InstanceInformation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"InstanceInformation"
      ( \Object
x ->
          Maybe Text
-> Maybe PingStatus
-> Maybe Text
-> Maybe ResourceType
-> Maybe POSIX
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe PlatformType
-> Maybe InstanceAggregatedAssociationOverview
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> InstanceInformation
InstanceInformation'
            (Maybe Text
 -> Maybe PingStatus
 -> Maybe Text
 -> Maybe ResourceType
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe PlatformType
 -> Maybe InstanceAggregatedAssociationOverview
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> InstanceInformation)
-> Parser (Maybe Text)
-> Parser
     (Maybe PingStatus
      -> Maybe Text
      -> Maybe ResourceType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe PlatformType
      -> Maybe InstanceAggregatedAssociationOverview
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
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
"InstanceId")
            Parser
  (Maybe PingStatus
   -> Maybe Text
   -> Maybe ResourceType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe PlatformType
   -> Maybe InstanceAggregatedAssociationOverview
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe PingStatus)
-> Parser
     (Maybe Text
      -> Maybe ResourceType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe PlatformType
      -> Maybe InstanceAggregatedAssociationOverview
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PingStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PingStatus")
            Parser
  (Maybe Text
   -> Maybe ResourceType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe PlatformType
   -> Maybe InstanceAggregatedAssociationOverview
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe Text)
-> Parser
     (Maybe ResourceType
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe PlatformType
      -> Maybe InstanceAggregatedAssociationOverview
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
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
"IPAddress")
            Parser
  (Maybe ResourceType
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe PlatformType
   -> Maybe InstanceAggregatedAssociationOverview
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe ResourceType)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe PlatformType
      -> Maybe InstanceAggregatedAssociationOverview
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResourceType")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe PlatformType
   -> Maybe InstanceAggregatedAssociationOverview
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe PlatformType
      -> Maybe InstanceAggregatedAssociationOverview
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
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
"RegistrationDate")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe PlatformType
   -> Maybe InstanceAggregatedAssociationOverview
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe PlatformType
      -> Maybe InstanceAggregatedAssociationOverview
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
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
"PlatformVersion")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe PlatformType
   -> Maybe InstanceAggregatedAssociationOverview
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe PlatformType
      -> Maybe InstanceAggregatedAssociationOverview
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
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
"IsLatestVersion")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe PlatformType
   -> Maybe InstanceAggregatedAssociationOverview
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe PlatformType
      -> Maybe InstanceAggregatedAssociationOverview
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
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
"AgentVersion")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe PlatformType
   -> Maybe InstanceAggregatedAssociationOverview
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe PlatformType
      -> Maybe InstanceAggregatedAssociationOverview
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
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
"LastPingDateTime")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe PlatformType
   -> Maybe InstanceAggregatedAssociationOverview
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe PlatformType
      -> Maybe InstanceAggregatedAssociationOverview
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
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
"LastSuccessfulAssociationExecutionDate")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe PlatformType
   -> Maybe InstanceAggregatedAssociationOverview
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe PlatformType
      -> Maybe InstanceAggregatedAssociationOverview
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
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
"ActivationId")
            Parser
  (Maybe Text
   -> Maybe PlatformType
   -> Maybe InstanceAggregatedAssociationOverview
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe Text)
-> Parser
     (Maybe PlatformType
      -> Maybe InstanceAggregatedAssociationOverview
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
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 PlatformType
   -> Maybe InstanceAggregatedAssociationOverview
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe PlatformType)
-> Parser
     (Maybe InstanceAggregatedAssociationOverview
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PlatformType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PlatformType")
            Parser
  (Maybe InstanceAggregatedAssociationOverview
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe InstanceAggregatedAssociationOverview)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> InstanceInformation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe InstanceAggregatedAssociationOverview)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AssociationOverview")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> InstanceInformation)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text -> Maybe Text -> Maybe Text -> InstanceInformation)
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
"AssociationStatus")
            Parser
  (Maybe POSIX
   -> Maybe Text -> Maybe Text -> Maybe Text -> InstanceInformation)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> InstanceInformation)
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
"LastAssociationExecutionDate")
            Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> InstanceInformation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> InstanceInformation)
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
"PlatformName")
            Parser (Maybe Text -> Maybe Text -> InstanceInformation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> InstanceInformation)
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
"ComputerName")
            Parser (Maybe Text -> InstanceInformation)
-> Parser (Maybe Text) -> Parser InstanceInformation
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
"IamRole")
      )

instance Prelude.Hashable InstanceInformation

instance Prelude.NFData InstanceInformation