{-# 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.ImageBuilder.Types.InfrastructureConfiguration
-- 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.ImageBuilder.Types.InfrastructureConfiguration where

import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.Types.InstanceMetadataOptions
import Amazonka.ImageBuilder.Types.Logging
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Details of the infrastructure configuration.
--
-- /See:/ 'newInfrastructureConfiguration' smart constructor.
data InfrastructureConfiguration = InfrastructureConfiguration'
  { -- | The security group IDs of the infrastructure configuration.
    InfrastructureConfiguration -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | The SNS topic Amazon Resource Name (ARN) of the infrastructure
    -- configuration.
    InfrastructureConfiguration -> Maybe Text
snsTopicArn :: Prelude.Maybe Prelude.Text,
    -- | The instance types of the infrastructure configuration.
    InfrastructureConfiguration -> Maybe [Text]
instanceTypes :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon Resource Name (ARN) of the infrastructure configuration.
    InfrastructureConfiguration -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon EC2 key pair of the infrastructure configuration.
    InfrastructureConfiguration -> Maybe Text
keyPair :: Prelude.Maybe Prelude.Text,
    -- | The tags attached to the resource created by Image Builder.
    InfrastructureConfiguration -> Maybe (HashMap Text Text)
resourceTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The subnet ID of the infrastructure configuration.
    InfrastructureConfiguration -> Maybe Text
subnetId :: Prelude.Maybe Prelude.Text,
    -- | The date on which the infrastructure configuration was last updated.
    InfrastructureConfiguration -> Maybe Text
dateUpdated :: Prelude.Maybe Prelude.Text,
    -- | The date on which the infrastructure configuration was created.
    InfrastructureConfiguration -> Maybe Text
dateCreated :: Prelude.Maybe Prelude.Text,
    -- | The instance metadata option settings for the infrastructure
    -- configuration.
    InfrastructureConfiguration -> Maybe InstanceMetadataOptions
instanceMetadataOptions :: Prelude.Maybe InstanceMetadataOptions,
    -- | The name of the infrastructure configuration.
    InfrastructureConfiguration -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The instance profile of the infrastructure configuration.
    InfrastructureConfiguration -> Maybe Text
instanceProfileName :: Prelude.Maybe Prelude.Text,
    -- | The logging configuration of the infrastructure configuration.
    InfrastructureConfiguration -> Maybe Logging
logging :: Prelude.Maybe Logging,
    -- | The description of the infrastructure configuration.
    InfrastructureConfiguration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags of the infrastructure configuration.
    InfrastructureConfiguration -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The terminate instance on failure configuration of the infrastructure
    -- configuration.
    InfrastructureConfiguration -> Maybe Bool
terminateInstanceOnFailure :: Prelude.Maybe Prelude.Bool
  }
  deriving (InfrastructureConfiguration -> InfrastructureConfiguration -> Bool
(InfrastructureConfiguration
 -> InfrastructureConfiguration -> Bool)
-> (InfrastructureConfiguration
    -> InfrastructureConfiguration -> Bool)
-> Eq InfrastructureConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InfrastructureConfiguration -> InfrastructureConfiguration -> Bool
$c/= :: InfrastructureConfiguration -> InfrastructureConfiguration -> Bool
== :: InfrastructureConfiguration -> InfrastructureConfiguration -> Bool
$c== :: InfrastructureConfiguration -> InfrastructureConfiguration -> Bool
Prelude.Eq, ReadPrec [InfrastructureConfiguration]
ReadPrec InfrastructureConfiguration
Int -> ReadS InfrastructureConfiguration
ReadS [InfrastructureConfiguration]
(Int -> ReadS InfrastructureConfiguration)
-> ReadS [InfrastructureConfiguration]
-> ReadPrec InfrastructureConfiguration
-> ReadPrec [InfrastructureConfiguration]
-> Read InfrastructureConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InfrastructureConfiguration]
$creadListPrec :: ReadPrec [InfrastructureConfiguration]
readPrec :: ReadPrec InfrastructureConfiguration
$creadPrec :: ReadPrec InfrastructureConfiguration
readList :: ReadS [InfrastructureConfiguration]
$creadList :: ReadS [InfrastructureConfiguration]
readsPrec :: Int -> ReadS InfrastructureConfiguration
$creadsPrec :: Int -> ReadS InfrastructureConfiguration
Prelude.Read, Int -> InfrastructureConfiguration -> ShowS
[InfrastructureConfiguration] -> ShowS
InfrastructureConfiguration -> String
(Int -> InfrastructureConfiguration -> ShowS)
-> (InfrastructureConfiguration -> String)
-> ([InfrastructureConfiguration] -> ShowS)
-> Show InfrastructureConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InfrastructureConfiguration] -> ShowS
$cshowList :: [InfrastructureConfiguration] -> ShowS
show :: InfrastructureConfiguration -> String
$cshow :: InfrastructureConfiguration -> String
showsPrec :: Int -> InfrastructureConfiguration -> ShowS
$cshowsPrec :: Int -> InfrastructureConfiguration -> ShowS
Prelude.Show, (forall x.
 InfrastructureConfiguration -> Rep InfrastructureConfiguration x)
-> (forall x.
    Rep InfrastructureConfiguration x -> InfrastructureConfiguration)
-> Generic InfrastructureConfiguration
forall x.
Rep InfrastructureConfiguration x -> InfrastructureConfiguration
forall x.
InfrastructureConfiguration -> Rep InfrastructureConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InfrastructureConfiguration x -> InfrastructureConfiguration
$cfrom :: forall x.
InfrastructureConfiguration -> Rep InfrastructureConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'InfrastructureConfiguration' 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:
--
-- 'securityGroupIds', 'infrastructureConfiguration_securityGroupIds' - The security group IDs of the infrastructure configuration.
--
-- 'snsTopicArn', 'infrastructureConfiguration_snsTopicArn' - The SNS topic Amazon Resource Name (ARN) of the infrastructure
-- configuration.
--
-- 'instanceTypes', 'infrastructureConfiguration_instanceTypes' - The instance types of the infrastructure configuration.
--
-- 'arn', 'infrastructureConfiguration_arn' - The Amazon Resource Name (ARN) of the infrastructure configuration.
--
-- 'keyPair', 'infrastructureConfiguration_keyPair' - The Amazon EC2 key pair of the infrastructure configuration.
--
-- 'resourceTags', 'infrastructureConfiguration_resourceTags' - The tags attached to the resource created by Image Builder.
--
-- 'subnetId', 'infrastructureConfiguration_subnetId' - The subnet ID of the infrastructure configuration.
--
-- 'dateUpdated', 'infrastructureConfiguration_dateUpdated' - The date on which the infrastructure configuration was last updated.
--
-- 'dateCreated', 'infrastructureConfiguration_dateCreated' - The date on which the infrastructure configuration was created.
--
-- 'instanceMetadataOptions', 'infrastructureConfiguration_instanceMetadataOptions' - The instance metadata option settings for the infrastructure
-- configuration.
--
-- 'name', 'infrastructureConfiguration_name' - The name of the infrastructure configuration.
--
-- 'instanceProfileName', 'infrastructureConfiguration_instanceProfileName' - The instance profile of the infrastructure configuration.
--
-- 'logging', 'infrastructureConfiguration_logging' - The logging configuration of the infrastructure configuration.
--
-- 'description', 'infrastructureConfiguration_description' - The description of the infrastructure configuration.
--
-- 'tags', 'infrastructureConfiguration_tags' - The tags of the infrastructure configuration.
--
-- 'terminateInstanceOnFailure', 'infrastructureConfiguration_terminateInstanceOnFailure' - The terminate instance on failure configuration of the infrastructure
-- configuration.
newInfrastructureConfiguration ::
  InfrastructureConfiguration
newInfrastructureConfiguration :: InfrastructureConfiguration
newInfrastructureConfiguration =
  InfrastructureConfiguration' :: Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstanceMetadataOptions
-> Maybe Text
-> Maybe Text
-> Maybe Logging
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Bool
-> InfrastructureConfiguration
InfrastructureConfiguration'
    { $sel:securityGroupIds:InfrastructureConfiguration' :: Maybe [Text]
securityGroupIds =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:snsTopicArn:InfrastructureConfiguration' :: Maybe Text
snsTopicArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceTypes:InfrastructureConfiguration' :: Maybe [Text]
instanceTypes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:InfrastructureConfiguration' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:keyPair:InfrastructureConfiguration' :: Maybe Text
keyPair = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceTags:InfrastructureConfiguration' :: Maybe (HashMap Text Text)
resourceTags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:subnetId:InfrastructureConfiguration' :: Maybe Text
subnetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dateUpdated:InfrastructureConfiguration' :: Maybe Text
dateUpdated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dateCreated:InfrastructureConfiguration' :: Maybe Text
dateCreated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceMetadataOptions:InfrastructureConfiguration' :: Maybe InstanceMetadataOptions
instanceMetadataOptions = Maybe InstanceMetadataOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:name:InfrastructureConfiguration' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceProfileName:InfrastructureConfiguration' :: Maybe Text
instanceProfileName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logging:InfrastructureConfiguration' :: Maybe Logging
logging = Maybe Logging
forall a. Maybe a
Prelude.Nothing,
      $sel:description:InfrastructureConfiguration' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:InfrastructureConfiguration' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:terminateInstanceOnFailure:InfrastructureConfiguration' :: Maybe Bool
terminateInstanceOnFailure = Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

-- | The security group IDs of the infrastructure configuration.
infrastructureConfiguration_securityGroupIds :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe [Prelude.Text])
infrastructureConfiguration_securityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_securityGroupIds = (InfrastructureConfiguration -> Maybe [Text])
-> (InfrastructureConfiguration
    -> Maybe [Text] -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe [Text]
a -> InfrastructureConfiguration
s {$sel:securityGroupIds:InfrastructureConfiguration' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: InfrastructureConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
 -> InfrastructureConfiguration -> f InfrastructureConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> InfrastructureConfiguration
-> f InfrastructureConfiguration
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 SNS topic Amazon Resource Name (ARN) of the infrastructure
-- configuration.
infrastructureConfiguration_snsTopicArn :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe Prelude.Text)
infrastructureConfiguration_snsTopicArn :: (Maybe Text -> f (Maybe Text))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_snsTopicArn = (InfrastructureConfiguration -> Maybe Text)
-> (InfrastructureConfiguration
    -> Maybe Text -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe Text
snsTopicArn :: Maybe Text
$sel:snsTopicArn:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe Text
snsTopicArn} -> Maybe Text
snsTopicArn) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe Text
a -> InfrastructureConfiguration
s {$sel:snsTopicArn:InfrastructureConfiguration' :: Maybe Text
snsTopicArn = Maybe Text
a} :: InfrastructureConfiguration)

-- | The instance types of the infrastructure configuration.
infrastructureConfiguration_instanceTypes :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe [Prelude.Text])
infrastructureConfiguration_instanceTypes :: (Maybe [Text] -> f (Maybe [Text]))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_instanceTypes = (InfrastructureConfiguration -> Maybe [Text])
-> (InfrastructureConfiguration
    -> Maybe [Text] -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe [Text]
instanceTypes :: Maybe [Text]
$sel:instanceTypes:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe [Text]
instanceTypes} -> Maybe [Text]
instanceTypes) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe [Text]
a -> InfrastructureConfiguration
s {$sel:instanceTypes:InfrastructureConfiguration' :: Maybe [Text]
instanceTypes = Maybe [Text]
a} :: InfrastructureConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
 -> InfrastructureConfiguration -> f InfrastructureConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> InfrastructureConfiguration
-> f InfrastructureConfiguration
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 Amazon Resource Name (ARN) of the infrastructure configuration.
infrastructureConfiguration_arn :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe Prelude.Text)
infrastructureConfiguration_arn :: (Maybe Text -> f (Maybe Text))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_arn = (InfrastructureConfiguration -> Maybe Text)
-> (InfrastructureConfiguration
    -> Maybe Text -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe Text
arn :: Maybe Text
$sel:arn:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe Text
arn} -> Maybe Text
arn) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe Text
a -> InfrastructureConfiguration
s {$sel:arn:InfrastructureConfiguration' :: Maybe Text
arn = Maybe Text
a} :: InfrastructureConfiguration)

-- | The Amazon EC2 key pair of the infrastructure configuration.
infrastructureConfiguration_keyPair :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe Prelude.Text)
infrastructureConfiguration_keyPair :: (Maybe Text -> f (Maybe Text))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_keyPair = (InfrastructureConfiguration -> Maybe Text)
-> (InfrastructureConfiguration
    -> Maybe Text -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe Text
keyPair :: Maybe Text
$sel:keyPair:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe Text
keyPair} -> Maybe Text
keyPair) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe Text
a -> InfrastructureConfiguration
s {$sel:keyPair:InfrastructureConfiguration' :: Maybe Text
keyPair = Maybe Text
a} :: InfrastructureConfiguration)

-- | The tags attached to the resource created by Image Builder.
infrastructureConfiguration_resourceTags :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
infrastructureConfiguration_resourceTags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_resourceTags = (InfrastructureConfiguration -> Maybe (HashMap Text Text))
-> (InfrastructureConfiguration
    -> Maybe (HashMap Text Text) -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (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 (\InfrastructureConfiguration' {Maybe (HashMap Text Text)
resourceTags :: Maybe (HashMap Text Text)
$sel:resourceTags:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe (HashMap Text Text)
resourceTags} -> Maybe (HashMap Text Text)
resourceTags) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe (HashMap Text Text)
a -> InfrastructureConfiguration
s {$sel:resourceTags:InfrastructureConfiguration' :: Maybe (HashMap Text Text)
resourceTags = Maybe (HashMap Text Text)
a} :: InfrastructureConfiguration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> InfrastructureConfiguration -> f InfrastructureConfiguration)
-> ((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)))
-> InfrastructureConfiguration
-> f InfrastructureConfiguration
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 subnet ID of the infrastructure configuration.
infrastructureConfiguration_subnetId :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe Prelude.Text)
infrastructureConfiguration_subnetId :: (Maybe Text -> f (Maybe Text))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_subnetId = (InfrastructureConfiguration -> Maybe Text)
-> (InfrastructureConfiguration
    -> Maybe Text -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe Text
subnetId :: Maybe Text
$sel:subnetId:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe Text
subnetId} -> Maybe Text
subnetId) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe Text
a -> InfrastructureConfiguration
s {$sel:subnetId:InfrastructureConfiguration' :: Maybe Text
subnetId = Maybe Text
a} :: InfrastructureConfiguration)

-- | The date on which the infrastructure configuration was last updated.
infrastructureConfiguration_dateUpdated :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe Prelude.Text)
infrastructureConfiguration_dateUpdated :: (Maybe Text -> f (Maybe Text))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_dateUpdated = (InfrastructureConfiguration -> Maybe Text)
-> (InfrastructureConfiguration
    -> Maybe Text -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe Text
dateUpdated :: Maybe Text
$sel:dateUpdated:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe Text
dateUpdated} -> Maybe Text
dateUpdated) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe Text
a -> InfrastructureConfiguration
s {$sel:dateUpdated:InfrastructureConfiguration' :: Maybe Text
dateUpdated = Maybe Text
a} :: InfrastructureConfiguration)

-- | The date on which the infrastructure configuration was created.
infrastructureConfiguration_dateCreated :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe Prelude.Text)
infrastructureConfiguration_dateCreated :: (Maybe Text -> f (Maybe Text))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_dateCreated = (InfrastructureConfiguration -> Maybe Text)
-> (InfrastructureConfiguration
    -> Maybe Text -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe Text
dateCreated :: Maybe Text
$sel:dateCreated:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe Text
dateCreated} -> Maybe Text
dateCreated) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe Text
a -> InfrastructureConfiguration
s {$sel:dateCreated:InfrastructureConfiguration' :: Maybe Text
dateCreated = Maybe Text
a} :: InfrastructureConfiguration)

-- | The instance metadata option settings for the infrastructure
-- configuration.
infrastructureConfiguration_instanceMetadataOptions :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe InstanceMetadataOptions)
infrastructureConfiguration_instanceMetadataOptions :: (Maybe InstanceMetadataOptions
 -> f (Maybe InstanceMetadataOptions))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_instanceMetadataOptions = (InfrastructureConfiguration -> Maybe InstanceMetadataOptions)
-> (InfrastructureConfiguration
    -> Maybe InstanceMetadataOptions -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe InstanceMetadataOptions)
     (Maybe InstanceMetadataOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe InstanceMetadataOptions
instanceMetadataOptions :: Maybe InstanceMetadataOptions
$sel:instanceMetadataOptions:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe InstanceMetadataOptions
instanceMetadataOptions} -> Maybe InstanceMetadataOptions
instanceMetadataOptions) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe InstanceMetadataOptions
a -> InfrastructureConfiguration
s {$sel:instanceMetadataOptions:InfrastructureConfiguration' :: Maybe InstanceMetadataOptions
instanceMetadataOptions = Maybe InstanceMetadataOptions
a} :: InfrastructureConfiguration)

-- | The name of the infrastructure configuration.
infrastructureConfiguration_name :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe Prelude.Text)
infrastructureConfiguration_name :: (Maybe Text -> f (Maybe Text))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_name = (InfrastructureConfiguration -> Maybe Text)
-> (InfrastructureConfiguration
    -> Maybe Text -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe Text
name :: Maybe Text
$sel:name:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe Text
name} -> Maybe Text
name) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe Text
a -> InfrastructureConfiguration
s {$sel:name:InfrastructureConfiguration' :: Maybe Text
name = Maybe Text
a} :: InfrastructureConfiguration)

-- | The instance profile of the infrastructure configuration.
infrastructureConfiguration_instanceProfileName :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe Prelude.Text)
infrastructureConfiguration_instanceProfileName :: (Maybe Text -> f (Maybe Text))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_instanceProfileName = (InfrastructureConfiguration -> Maybe Text)
-> (InfrastructureConfiguration
    -> Maybe Text -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe Text
instanceProfileName :: Maybe Text
$sel:instanceProfileName:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe Text
instanceProfileName} -> Maybe Text
instanceProfileName) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe Text
a -> InfrastructureConfiguration
s {$sel:instanceProfileName:InfrastructureConfiguration' :: Maybe Text
instanceProfileName = Maybe Text
a} :: InfrastructureConfiguration)

-- | The logging configuration of the infrastructure configuration.
infrastructureConfiguration_logging :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe Logging)
infrastructureConfiguration_logging :: (Maybe Logging -> f (Maybe Logging))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_logging = (InfrastructureConfiguration -> Maybe Logging)
-> (InfrastructureConfiguration
    -> Maybe Logging -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe Logging)
     (Maybe Logging)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe Logging
logging :: Maybe Logging
$sel:logging:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe Logging
logging} -> Maybe Logging
logging) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe Logging
a -> InfrastructureConfiguration
s {$sel:logging:InfrastructureConfiguration' :: Maybe Logging
logging = Maybe Logging
a} :: InfrastructureConfiguration)

-- | The description of the infrastructure configuration.
infrastructureConfiguration_description :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe Prelude.Text)
infrastructureConfiguration_description :: (Maybe Text -> f (Maybe Text))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_description = (InfrastructureConfiguration -> Maybe Text)
-> (InfrastructureConfiguration
    -> Maybe Text -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe Text
description :: Maybe Text
$sel:description:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe Text
description} -> Maybe Text
description) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe Text
a -> InfrastructureConfiguration
s {$sel:description:InfrastructureConfiguration' :: Maybe Text
description = Maybe Text
a} :: InfrastructureConfiguration)

-- | The tags of the infrastructure configuration.
infrastructureConfiguration_tags :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
infrastructureConfiguration_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_tags = (InfrastructureConfiguration -> Maybe (HashMap Text Text))
-> (InfrastructureConfiguration
    -> Maybe (HashMap Text Text) -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (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 (\InfrastructureConfiguration' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe (HashMap Text Text)
a -> InfrastructureConfiguration
s {$sel:tags:InfrastructureConfiguration' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: InfrastructureConfiguration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> InfrastructureConfiguration -> f InfrastructureConfiguration)
-> ((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)))
-> InfrastructureConfiguration
-> f InfrastructureConfiguration
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 terminate instance on failure configuration of the infrastructure
-- configuration.
infrastructureConfiguration_terminateInstanceOnFailure :: Lens.Lens' InfrastructureConfiguration (Prelude.Maybe Prelude.Bool)
infrastructureConfiguration_terminateInstanceOnFailure :: (Maybe Bool -> f (Maybe Bool))
-> InfrastructureConfiguration -> f InfrastructureConfiguration
infrastructureConfiguration_terminateInstanceOnFailure = (InfrastructureConfiguration -> Maybe Bool)
-> (InfrastructureConfiguration
    -> Maybe Bool -> InfrastructureConfiguration)
-> Lens
     InfrastructureConfiguration
     InfrastructureConfiguration
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InfrastructureConfiguration' {Maybe Bool
terminateInstanceOnFailure :: Maybe Bool
$sel:terminateInstanceOnFailure:InfrastructureConfiguration' :: InfrastructureConfiguration -> Maybe Bool
terminateInstanceOnFailure} -> Maybe Bool
terminateInstanceOnFailure) (\s :: InfrastructureConfiguration
s@InfrastructureConfiguration' {} Maybe Bool
a -> InfrastructureConfiguration
s {$sel:terminateInstanceOnFailure:InfrastructureConfiguration' :: Maybe Bool
terminateInstanceOnFailure = Maybe Bool
a} :: InfrastructureConfiguration)

instance Core.FromJSON InfrastructureConfiguration where
  parseJSON :: Value -> Parser InfrastructureConfiguration
parseJSON =
    String
-> (Object -> Parser InfrastructureConfiguration)
-> Value
-> Parser InfrastructureConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"InfrastructureConfiguration"
      ( \Object
x ->
          Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe InstanceMetadataOptions
-> Maybe Text
-> Maybe Text
-> Maybe Logging
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Bool
-> InfrastructureConfiguration
InfrastructureConfiguration'
            (Maybe [Text]
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe InstanceMetadataOptions
 -> Maybe Text
 -> Maybe Text
 -> Maybe Logging
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Bool
 -> InfrastructureConfiguration)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe Logging
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> InfrastructureConfiguration)
forall (f :: * -> *) a b. Functor 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
"securityGroupIds"
                            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 Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe Logging
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> InfrastructureConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe Logging
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> InfrastructureConfiguration)
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
"snsTopicArn")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe Logging
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> InfrastructureConfiguration)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe Logging
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> InfrastructureConfiguration)
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
"instanceTypes" 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 Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe Logging
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> InfrastructureConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe Logging
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> InfrastructureConfiguration)
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
"arn")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe Logging
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> InfrastructureConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe Logging
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> InfrastructureConfiguration)
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
"keyPair")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe Logging
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> InfrastructureConfiguration)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe Logging
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> InfrastructureConfiguration)
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
"resourceTags" 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 InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe Logging
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> InfrastructureConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe Logging
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> InfrastructureConfiguration)
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
"subnetId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe Logging
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> InfrastructureConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe Logging
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> InfrastructureConfiguration)
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
"dateUpdated")
            Parser
  (Maybe Text
   -> Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe Logging
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> InfrastructureConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe InstanceMetadataOptions
      -> Maybe Text
      -> Maybe Text
      -> Maybe Logging
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> InfrastructureConfiguration)
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
"dateCreated")
            Parser
  (Maybe InstanceMetadataOptions
   -> Maybe Text
   -> Maybe Text
   -> Maybe Logging
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> InfrastructureConfiguration)
-> Parser (Maybe InstanceMetadataOptions)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Logging
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> InfrastructureConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InstanceMetadataOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"instanceMetadataOptions")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Logging
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> InfrastructureConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Logging
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> InfrastructureConfiguration)
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 Text
   -> Maybe Logging
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> InfrastructureConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Logging
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> InfrastructureConfiguration)
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
"instanceProfileName")
            Parser
  (Maybe Logging
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> InfrastructureConfiguration)
-> Parser (Maybe Logging)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Bool
      -> InfrastructureConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Logging)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"logging")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Bool
   -> InfrastructureConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Bool -> InfrastructureConfiguration)
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
"description")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe Bool -> InfrastructureConfiguration)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe Bool -> InfrastructureConfiguration)
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
"tags" 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 Bool -> InfrastructureConfiguration)
-> Parser (Maybe Bool) -> Parser InfrastructureConfiguration
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
"terminateInstanceOnFailure")
      )

instance Prelude.Hashable InfrastructureConfiguration

instance Prelude.NFData InfrastructureConfiguration