{-# 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.Nimble.Types.LaunchProfileInitialization
-- 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.Nimble.Types.LaunchProfileInitialization where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Nimble.Types.LaunchProfileInitializationActiveDirectory
import Amazonka.Nimble.Types.LaunchProfileInitializationScript
import Amazonka.Nimble.Types.LaunchProfilePlatform
import qualified Amazonka.Prelude as Prelude

-- |
--
-- /See:/ 'newLaunchProfileInitialization' smart constructor.
data LaunchProfileInitialization = LaunchProfileInitialization'
  { -- | The platform of the launch platform, either WINDOWS or LINUX.
    LaunchProfileInitialization -> Maybe LaunchProfilePlatform
platform :: Prelude.Maybe LaunchProfilePlatform,
    -- | A LaunchProfileInitializationActiveDirectory resource.
    LaunchProfileInitialization
-> Maybe LaunchProfileInitializationActiveDirectory
activeDirectory :: Prelude.Maybe LaunchProfileInitializationActiveDirectory,
    -- | The launch purpose.
    LaunchProfileInitialization -> Maybe Text
launchPurpose :: Prelude.Maybe Prelude.Text,
    -- | The launch profile ID.
    LaunchProfileInitialization -> Maybe Text
launchProfileId :: Prelude.Maybe Prelude.Text,
    -- | The EC2 security groups that control access to the studio component.
    LaunchProfileInitialization -> Maybe (NonEmpty Text)
ec2SecurityGroupIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The name for the launch profile.
    LaunchProfileInitialization -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The version number of the protocol that is used by the launch profile.
    -- The only valid version is \"2021-03-31\".
    LaunchProfileInitialization -> Maybe Text
launchProfileProtocolVersion :: Prelude.Maybe Prelude.Text,
    -- | The user initializtion scripts.
    LaunchProfileInitialization
-> Maybe [LaunchProfileInitializationScript]
userInitializationScripts :: Prelude.Maybe [LaunchProfileInitializationScript],
    -- | The system initializtion scripts.
    LaunchProfileInitialization
-> Maybe [LaunchProfileInitializationScript]
systemInitializationScripts :: Prelude.Maybe [LaunchProfileInitializationScript]
  }
  deriving (LaunchProfileInitialization -> LaunchProfileInitialization -> Bool
(LaunchProfileInitialization
 -> LaunchProfileInitialization -> Bool)
-> (LaunchProfileInitialization
    -> LaunchProfileInitialization -> Bool)
-> Eq LaunchProfileInitialization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LaunchProfileInitialization -> LaunchProfileInitialization -> Bool
$c/= :: LaunchProfileInitialization -> LaunchProfileInitialization -> Bool
== :: LaunchProfileInitialization -> LaunchProfileInitialization -> Bool
$c== :: LaunchProfileInitialization -> LaunchProfileInitialization -> Bool
Prelude.Eq, ReadPrec [LaunchProfileInitialization]
ReadPrec LaunchProfileInitialization
Int -> ReadS LaunchProfileInitialization
ReadS [LaunchProfileInitialization]
(Int -> ReadS LaunchProfileInitialization)
-> ReadS [LaunchProfileInitialization]
-> ReadPrec LaunchProfileInitialization
-> ReadPrec [LaunchProfileInitialization]
-> Read LaunchProfileInitialization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LaunchProfileInitialization]
$creadListPrec :: ReadPrec [LaunchProfileInitialization]
readPrec :: ReadPrec LaunchProfileInitialization
$creadPrec :: ReadPrec LaunchProfileInitialization
readList :: ReadS [LaunchProfileInitialization]
$creadList :: ReadS [LaunchProfileInitialization]
readsPrec :: Int -> ReadS LaunchProfileInitialization
$creadsPrec :: Int -> ReadS LaunchProfileInitialization
Prelude.Read, Int -> LaunchProfileInitialization -> ShowS
[LaunchProfileInitialization] -> ShowS
LaunchProfileInitialization -> String
(Int -> LaunchProfileInitialization -> ShowS)
-> (LaunchProfileInitialization -> String)
-> ([LaunchProfileInitialization] -> ShowS)
-> Show LaunchProfileInitialization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LaunchProfileInitialization] -> ShowS
$cshowList :: [LaunchProfileInitialization] -> ShowS
show :: LaunchProfileInitialization -> String
$cshow :: LaunchProfileInitialization -> String
showsPrec :: Int -> LaunchProfileInitialization -> ShowS
$cshowsPrec :: Int -> LaunchProfileInitialization -> ShowS
Prelude.Show, (forall x.
 LaunchProfileInitialization -> Rep LaunchProfileInitialization x)
-> (forall x.
    Rep LaunchProfileInitialization x -> LaunchProfileInitialization)
-> Generic LaunchProfileInitialization
forall x.
Rep LaunchProfileInitialization x -> LaunchProfileInitialization
forall x.
LaunchProfileInitialization -> Rep LaunchProfileInitialization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LaunchProfileInitialization x -> LaunchProfileInitialization
$cfrom :: forall x.
LaunchProfileInitialization -> Rep LaunchProfileInitialization x
Prelude.Generic)

-- |
-- Create a value of 'LaunchProfileInitialization' 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:
--
-- 'platform', 'launchProfileInitialization_platform' - The platform of the launch platform, either WINDOWS or LINUX.
--
-- 'activeDirectory', 'launchProfileInitialization_activeDirectory' - A LaunchProfileInitializationActiveDirectory resource.
--
-- 'launchPurpose', 'launchProfileInitialization_launchPurpose' - The launch purpose.
--
-- 'launchProfileId', 'launchProfileInitialization_launchProfileId' - The launch profile ID.
--
-- 'ec2SecurityGroupIds', 'launchProfileInitialization_ec2SecurityGroupIds' - The EC2 security groups that control access to the studio component.
--
-- 'name', 'launchProfileInitialization_name' - The name for the launch profile.
--
-- 'launchProfileProtocolVersion', 'launchProfileInitialization_launchProfileProtocolVersion' - The version number of the protocol that is used by the launch profile.
-- The only valid version is \"2021-03-31\".
--
-- 'userInitializationScripts', 'launchProfileInitialization_userInitializationScripts' - The user initializtion scripts.
--
-- 'systemInitializationScripts', 'launchProfileInitialization_systemInitializationScripts' - The system initializtion scripts.
newLaunchProfileInitialization ::
  LaunchProfileInitialization
newLaunchProfileInitialization :: LaunchProfileInitialization
newLaunchProfileInitialization =
  LaunchProfileInitialization' :: Maybe LaunchProfilePlatform
-> Maybe LaunchProfileInitializationActiveDirectory
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe Text
-> Maybe [LaunchProfileInitializationScript]
-> Maybe [LaunchProfileInitializationScript]
-> LaunchProfileInitialization
LaunchProfileInitialization'
    { $sel:platform:LaunchProfileInitialization' :: Maybe LaunchProfilePlatform
platform =
        Maybe LaunchProfilePlatform
forall a. Maybe a
Prelude.Nothing,
      $sel:activeDirectory:LaunchProfileInitialization' :: Maybe LaunchProfileInitializationActiveDirectory
activeDirectory = Maybe LaunchProfileInitializationActiveDirectory
forall a. Maybe a
Prelude.Nothing,
      $sel:launchPurpose:LaunchProfileInitialization' :: Maybe Text
launchPurpose = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:launchProfileId:LaunchProfileInitialization' :: Maybe Text
launchProfileId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ec2SecurityGroupIds:LaunchProfileInitialization' :: Maybe (NonEmpty Text)
ec2SecurityGroupIds = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:name:LaunchProfileInitialization' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:launchProfileProtocolVersion:LaunchProfileInitialization' :: Maybe Text
launchProfileProtocolVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:userInitializationScripts:LaunchProfileInitialization' :: Maybe [LaunchProfileInitializationScript]
userInitializationScripts = Maybe [LaunchProfileInitializationScript]
forall a. Maybe a
Prelude.Nothing,
      $sel:systemInitializationScripts:LaunchProfileInitialization' :: Maybe [LaunchProfileInitializationScript]
systemInitializationScripts = Maybe [LaunchProfileInitializationScript]
forall a. Maybe a
Prelude.Nothing
    }

-- | The platform of the launch platform, either WINDOWS or LINUX.
launchProfileInitialization_platform :: Lens.Lens' LaunchProfileInitialization (Prelude.Maybe LaunchProfilePlatform)
launchProfileInitialization_platform :: (Maybe LaunchProfilePlatform -> f (Maybe LaunchProfilePlatform))
-> LaunchProfileInitialization -> f LaunchProfileInitialization
launchProfileInitialization_platform = (LaunchProfileInitialization -> Maybe LaunchProfilePlatform)
-> (LaunchProfileInitialization
    -> Maybe LaunchProfilePlatform -> LaunchProfileInitialization)
-> Lens
     LaunchProfileInitialization
     LaunchProfileInitialization
     (Maybe LaunchProfilePlatform)
     (Maybe LaunchProfilePlatform)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfileInitialization' {Maybe LaunchProfilePlatform
platform :: Maybe LaunchProfilePlatform
$sel:platform:LaunchProfileInitialization' :: LaunchProfileInitialization -> Maybe LaunchProfilePlatform
platform} -> Maybe LaunchProfilePlatform
platform) (\s :: LaunchProfileInitialization
s@LaunchProfileInitialization' {} Maybe LaunchProfilePlatform
a -> LaunchProfileInitialization
s {$sel:platform:LaunchProfileInitialization' :: Maybe LaunchProfilePlatform
platform = Maybe LaunchProfilePlatform
a} :: LaunchProfileInitialization)

-- | A LaunchProfileInitializationActiveDirectory resource.
launchProfileInitialization_activeDirectory :: Lens.Lens' LaunchProfileInitialization (Prelude.Maybe LaunchProfileInitializationActiveDirectory)
launchProfileInitialization_activeDirectory :: (Maybe LaunchProfileInitializationActiveDirectory
 -> f (Maybe LaunchProfileInitializationActiveDirectory))
-> LaunchProfileInitialization -> f LaunchProfileInitialization
launchProfileInitialization_activeDirectory = (LaunchProfileInitialization
 -> Maybe LaunchProfileInitializationActiveDirectory)
-> (LaunchProfileInitialization
    -> Maybe LaunchProfileInitializationActiveDirectory
    -> LaunchProfileInitialization)
-> Lens
     LaunchProfileInitialization
     LaunchProfileInitialization
     (Maybe LaunchProfileInitializationActiveDirectory)
     (Maybe LaunchProfileInitializationActiveDirectory)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfileInitialization' {Maybe LaunchProfileInitializationActiveDirectory
activeDirectory :: Maybe LaunchProfileInitializationActiveDirectory
$sel:activeDirectory:LaunchProfileInitialization' :: LaunchProfileInitialization
-> Maybe LaunchProfileInitializationActiveDirectory
activeDirectory} -> Maybe LaunchProfileInitializationActiveDirectory
activeDirectory) (\s :: LaunchProfileInitialization
s@LaunchProfileInitialization' {} Maybe LaunchProfileInitializationActiveDirectory
a -> LaunchProfileInitialization
s {$sel:activeDirectory:LaunchProfileInitialization' :: Maybe LaunchProfileInitializationActiveDirectory
activeDirectory = Maybe LaunchProfileInitializationActiveDirectory
a} :: LaunchProfileInitialization)

-- | The launch purpose.
launchProfileInitialization_launchPurpose :: Lens.Lens' LaunchProfileInitialization (Prelude.Maybe Prelude.Text)
launchProfileInitialization_launchPurpose :: (Maybe Text -> f (Maybe Text))
-> LaunchProfileInitialization -> f LaunchProfileInitialization
launchProfileInitialization_launchPurpose = (LaunchProfileInitialization -> Maybe Text)
-> (LaunchProfileInitialization
    -> Maybe Text -> LaunchProfileInitialization)
-> Lens
     LaunchProfileInitialization
     LaunchProfileInitialization
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfileInitialization' {Maybe Text
launchPurpose :: Maybe Text
$sel:launchPurpose:LaunchProfileInitialization' :: LaunchProfileInitialization -> Maybe Text
launchPurpose} -> Maybe Text
launchPurpose) (\s :: LaunchProfileInitialization
s@LaunchProfileInitialization' {} Maybe Text
a -> LaunchProfileInitialization
s {$sel:launchPurpose:LaunchProfileInitialization' :: Maybe Text
launchPurpose = Maybe Text
a} :: LaunchProfileInitialization)

-- | The launch profile ID.
launchProfileInitialization_launchProfileId :: Lens.Lens' LaunchProfileInitialization (Prelude.Maybe Prelude.Text)
launchProfileInitialization_launchProfileId :: (Maybe Text -> f (Maybe Text))
-> LaunchProfileInitialization -> f LaunchProfileInitialization
launchProfileInitialization_launchProfileId = (LaunchProfileInitialization -> Maybe Text)
-> (LaunchProfileInitialization
    -> Maybe Text -> LaunchProfileInitialization)
-> Lens
     LaunchProfileInitialization
     LaunchProfileInitialization
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfileInitialization' {Maybe Text
launchProfileId :: Maybe Text
$sel:launchProfileId:LaunchProfileInitialization' :: LaunchProfileInitialization -> Maybe Text
launchProfileId} -> Maybe Text
launchProfileId) (\s :: LaunchProfileInitialization
s@LaunchProfileInitialization' {} Maybe Text
a -> LaunchProfileInitialization
s {$sel:launchProfileId:LaunchProfileInitialization' :: Maybe Text
launchProfileId = Maybe Text
a} :: LaunchProfileInitialization)

-- | The EC2 security groups that control access to the studio component.
launchProfileInitialization_ec2SecurityGroupIds :: Lens.Lens' LaunchProfileInitialization (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
launchProfileInitialization_ec2SecurityGroupIds :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> LaunchProfileInitialization -> f LaunchProfileInitialization
launchProfileInitialization_ec2SecurityGroupIds = (LaunchProfileInitialization -> Maybe (NonEmpty Text))
-> (LaunchProfileInitialization
    -> Maybe (NonEmpty Text) -> LaunchProfileInitialization)
-> Lens
     LaunchProfileInitialization
     LaunchProfileInitialization
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfileInitialization' {Maybe (NonEmpty Text)
ec2SecurityGroupIds :: Maybe (NonEmpty Text)
$sel:ec2SecurityGroupIds:LaunchProfileInitialization' :: LaunchProfileInitialization -> Maybe (NonEmpty Text)
ec2SecurityGroupIds} -> Maybe (NonEmpty Text)
ec2SecurityGroupIds) (\s :: LaunchProfileInitialization
s@LaunchProfileInitialization' {} Maybe (NonEmpty Text)
a -> LaunchProfileInitialization
s {$sel:ec2SecurityGroupIds:LaunchProfileInitialization' :: Maybe (NonEmpty Text)
ec2SecurityGroupIds = Maybe (NonEmpty Text)
a} :: LaunchProfileInitialization) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> LaunchProfileInitialization -> f LaunchProfileInitialization)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> LaunchProfileInitialization
-> f LaunchProfileInitialization
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name for the launch profile.
launchProfileInitialization_name :: Lens.Lens' LaunchProfileInitialization (Prelude.Maybe Prelude.Text)
launchProfileInitialization_name :: (Maybe Text -> f (Maybe Text))
-> LaunchProfileInitialization -> f LaunchProfileInitialization
launchProfileInitialization_name = (LaunchProfileInitialization -> Maybe Text)
-> (LaunchProfileInitialization
    -> Maybe Text -> LaunchProfileInitialization)
-> Lens
     LaunchProfileInitialization
     LaunchProfileInitialization
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfileInitialization' {Maybe Text
name :: Maybe Text
$sel:name:LaunchProfileInitialization' :: LaunchProfileInitialization -> Maybe Text
name} -> Maybe Text
name) (\s :: LaunchProfileInitialization
s@LaunchProfileInitialization' {} Maybe Text
a -> LaunchProfileInitialization
s {$sel:name:LaunchProfileInitialization' :: Maybe Text
name = Maybe Text
a} :: LaunchProfileInitialization)

-- | The version number of the protocol that is used by the launch profile.
-- The only valid version is \"2021-03-31\".
launchProfileInitialization_launchProfileProtocolVersion :: Lens.Lens' LaunchProfileInitialization (Prelude.Maybe Prelude.Text)
launchProfileInitialization_launchProfileProtocolVersion :: (Maybe Text -> f (Maybe Text))
-> LaunchProfileInitialization -> f LaunchProfileInitialization
launchProfileInitialization_launchProfileProtocolVersion = (LaunchProfileInitialization -> Maybe Text)
-> (LaunchProfileInitialization
    -> Maybe Text -> LaunchProfileInitialization)
-> Lens
     LaunchProfileInitialization
     LaunchProfileInitialization
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfileInitialization' {Maybe Text
launchProfileProtocolVersion :: Maybe Text
$sel:launchProfileProtocolVersion:LaunchProfileInitialization' :: LaunchProfileInitialization -> Maybe Text
launchProfileProtocolVersion} -> Maybe Text
launchProfileProtocolVersion) (\s :: LaunchProfileInitialization
s@LaunchProfileInitialization' {} Maybe Text
a -> LaunchProfileInitialization
s {$sel:launchProfileProtocolVersion:LaunchProfileInitialization' :: Maybe Text
launchProfileProtocolVersion = Maybe Text
a} :: LaunchProfileInitialization)

-- | The user initializtion scripts.
launchProfileInitialization_userInitializationScripts :: Lens.Lens' LaunchProfileInitialization (Prelude.Maybe [LaunchProfileInitializationScript])
launchProfileInitialization_userInitializationScripts :: (Maybe [LaunchProfileInitializationScript]
 -> f (Maybe [LaunchProfileInitializationScript]))
-> LaunchProfileInitialization -> f LaunchProfileInitialization
launchProfileInitialization_userInitializationScripts = (LaunchProfileInitialization
 -> Maybe [LaunchProfileInitializationScript])
-> (LaunchProfileInitialization
    -> Maybe [LaunchProfileInitializationScript]
    -> LaunchProfileInitialization)
-> Lens
     LaunchProfileInitialization
     LaunchProfileInitialization
     (Maybe [LaunchProfileInitializationScript])
     (Maybe [LaunchProfileInitializationScript])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfileInitialization' {Maybe [LaunchProfileInitializationScript]
userInitializationScripts :: Maybe [LaunchProfileInitializationScript]
$sel:userInitializationScripts:LaunchProfileInitialization' :: LaunchProfileInitialization
-> Maybe [LaunchProfileInitializationScript]
userInitializationScripts} -> Maybe [LaunchProfileInitializationScript]
userInitializationScripts) (\s :: LaunchProfileInitialization
s@LaunchProfileInitialization' {} Maybe [LaunchProfileInitializationScript]
a -> LaunchProfileInitialization
s {$sel:userInitializationScripts:LaunchProfileInitialization' :: Maybe [LaunchProfileInitializationScript]
userInitializationScripts = Maybe [LaunchProfileInitializationScript]
a} :: LaunchProfileInitialization) ((Maybe [LaunchProfileInitializationScript]
  -> f (Maybe [LaunchProfileInitializationScript]))
 -> LaunchProfileInitialization -> f LaunchProfileInitialization)
-> ((Maybe [LaunchProfileInitializationScript]
     -> f (Maybe [LaunchProfileInitializationScript]))
    -> Maybe [LaunchProfileInitializationScript]
    -> f (Maybe [LaunchProfileInitializationScript]))
-> (Maybe [LaunchProfileInitializationScript]
    -> f (Maybe [LaunchProfileInitializationScript]))
-> LaunchProfileInitialization
-> f LaunchProfileInitialization
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [LaunchProfileInitializationScript]
  [LaunchProfileInitializationScript]
  [LaunchProfileInitializationScript]
  [LaunchProfileInitializationScript]
-> Iso
     (Maybe [LaunchProfileInitializationScript])
     (Maybe [LaunchProfileInitializationScript])
     (Maybe [LaunchProfileInitializationScript])
     (Maybe [LaunchProfileInitializationScript])
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
  [LaunchProfileInitializationScript]
  [LaunchProfileInitializationScript]
  [LaunchProfileInitializationScript]
  [LaunchProfileInitializationScript]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The system initializtion scripts.
launchProfileInitialization_systemInitializationScripts :: Lens.Lens' LaunchProfileInitialization (Prelude.Maybe [LaunchProfileInitializationScript])
launchProfileInitialization_systemInitializationScripts :: (Maybe [LaunchProfileInitializationScript]
 -> f (Maybe [LaunchProfileInitializationScript]))
-> LaunchProfileInitialization -> f LaunchProfileInitialization
launchProfileInitialization_systemInitializationScripts = (LaunchProfileInitialization
 -> Maybe [LaunchProfileInitializationScript])
-> (LaunchProfileInitialization
    -> Maybe [LaunchProfileInitializationScript]
    -> LaunchProfileInitialization)
-> Lens
     LaunchProfileInitialization
     LaunchProfileInitialization
     (Maybe [LaunchProfileInitializationScript])
     (Maybe [LaunchProfileInitializationScript])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfileInitialization' {Maybe [LaunchProfileInitializationScript]
systemInitializationScripts :: Maybe [LaunchProfileInitializationScript]
$sel:systemInitializationScripts:LaunchProfileInitialization' :: LaunchProfileInitialization
-> Maybe [LaunchProfileInitializationScript]
systemInitializationScripts} -> Maybe [LaunchProfileInitializationScript]
systemInitializationScripts) (\s :: LaunchProfileInitialization
s@LaunchProfileInitialization' {} Maybe [LaunchProfileInitializationScript]
a -> LaunchProfileInitialization
s {$sel:systemInitializationScripts:LaunchProfileInitialization' :: Maybe [LaunchProfileInitializationScript]
systemInitializationScripts = Maybe [LaunchProfileInitializationScript]
a} :: LaunchProfileInitialization) ((Maybe [LaunchProfileInitializationScript]
  -> f (Maybe [LaunchProfileInitializationScript]))
 -> LaunchProfileInitialization -> f LaunchProfileInitialization)
-> ((Maybe [LaunchProfileInitializationScript]
     -> f (Maybe [LaunchProfileInitializationScript]))
    -> Maybe [LaunchProfileInitializationScript]
    -> f (Maybe [LaunchProfileInitializationScript]))
-> (Maybe [LaunchProfileInitializationScript]
    -> f (Maybe [LaunchProfileInitializationScript]))
-> LaunchProfileInitialization
-> f LaunchProfileInitialization
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [LaunchProfileInitializationScript]
  [LaunchProfileInitializationScript]
  [LaunchProfileInitializationScript]
  [LaunchProfileInitializationScript]
-> Iso
     (Maybe [LaunchProfileInitializationScript])
     (Maybe [LaunchProfileInitializationScript])
     (Maybe [LaunchProfileInitializationScript])
     (Maybe [LaunchProfileInitializationScript])
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
  [LaunchProfileInitializationScript]
  [LaunchProfileInitializationScript]
  [LaunchProfileInitializationScript]
  [LaunchProfileInitializationScript]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON LaunchProfileInitialization where
  parseJSON :: Value -> Parser LaunchProfileInitialization
parseJSON =
    String
-> (Object -> Parser LaunchProfileInitialization)
-> Value
-> Parser LaunchProfileInitialization
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LaunchProfileInitialization"
      ( \Object
x ->
          Maybe LaunchProfilePlatform
-> Maybe LaunchProfileInitializationActiveDirectory
-> Maybe Text
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe Text
-> Maybe [LaunchProfileInitializationScript]
-> Maybe [LaunchProfileInitializationScript]
-> LaunchProfileInitialization
LaunchProfileInitialization'
            (Maybe LaunchProfilePlatform
 -> Maybe LaunchProfileInitializationActiveDirectory
 -> Maybe Text
 -> Maybe Text
 -> Maybe (NonEmpty Text)
 -> Maybe Text
 -> Maybe Text
 -> Maybe [LaunchProfileInitializationScript]
 -> Maybe [LaunchProfileInitializationScript]
 -> LaunchProfileInitialization)
-> Parser (Maybe LaunchProfilePlatform)
-> Parser
     (Maybe LaunchProfileInitializationActiveDirectory
      -> Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LaunchProfileInitializationScript]
      -> Maybe [LaunchProfileInitializationScript]
      -> LaunchProfileInitialization)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe LaunchProfilePlatform)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"platform")
            Parser
  (Maybe LaunchProfileInitializationActiveDirectory
   -> Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LaunchProfileInitializationScript]
   -> Maybe [LaunchProfileInitializationScript]
   -> LaunchProfileInitialization)
-> Parser (Maybe LaunchProfileInitializationActiveDirectory)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LaunchProfileInitializationScript]
      -> Maybe [LaunchProfileInitializationScript]
      -> LaunchProfileInitialization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser (Maybe LaunchProfileInitializationActiveDirectory)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"activeDirectory")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LaunchProfileInitializationScript]
   -> Maybe [LaunchProfileInitializationScript]
   -> LaunchProfileInitialization)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LaunchProfileInitializationScript]
      -> Maybe [LaunchProfileInitializationScript]
      -> LaunchProfileInitialization)
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
"launchPurpose")
            Parser
  (Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LaunchProfileInitializationScript]
   -> Maybe [LaunchProfileInitializationScript]
   -> LaunchProfileInitialization)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LaunchProfileInitializationScript]
      -> Maybe [LaunchProfileInitializationScript]
      -> LaunchProfileInitialization)
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
"launchProfileId")
            Parser
  (Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LaunchProfileInitializationScript]
   -> Maybe [LaunchProfileInitializationScript]
   -> LaunchProfileInitialization)
-> Parser (Maybe (NonEmpty Text))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [LaunchProfileInitializationScript]
      -> Maybe [LaunchProfileInitializationScript]
      -> LaunchProfileInitialization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ec2SecurityGroupIds")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [LaunchProfileInitializationScript]
   -> Maybe [LaunchProfileInitializationScript]
   -> LaunchProfileInitialization)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [LaunchProfileInitializationScript]
      -> Maybe [LaunchProfileInitializationScript]
      -> LaunchProfileInitialization)
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 [LaunchProfileInitializationScript]
   -> Maybe [LaunchProfileInitializationScript]
   -> LaunchProfileInitialization)
-> Parser (Maybe Text)
-> Parser
     (Maybe [LaunchProfileInitializationScript]
      -> Maybe [LaunchProfileInitializationScript]
      -> LaunchProfileInitialization)
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
"launchProfileProtocolVersion")
            Parser
  (Maybe [LaunchProfileInitializationScript]
   -> Maybe [LaunchProfileInitializationScript]
   -> LaunchProfileInitialization)
-> Parser (Maybe [LaunchProfileInitializationScript])
-> Parser
     (Maybe [LaunchProfileInitializationScript]
      -> LaunchProfileInitialization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe [LaunchProfileInitializationScript]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"userInitializationScripts"
                            Parser (Maybe (Maybe [LaunchProfileInitializationScript]))
-> Maybe [LaunchProfileInitializationScript]
-> Parser (Maybe [LaunchProfileInitializationScript])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [LaunchProfileInitializationScript]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe [LaunchProfileInitializationScript]
   -> LaunchProfileInitialization)
-> Parser (Maybe [LaunchProfileInitializationScript])
-> Parser LaunchProfileInitialization
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe [LaunchProfileInitializationScript]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"systemInitializationScripts"
                            Parser (Maybe (Maybe [LaunchProfileInitializationScript]))
-> Maybe [LaunchProfileInitializationScript]
-> Parser (Maybe [LaunchProfileInitializationScript])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [LaunchProfileInitializationScript]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable LaunchProfileInitialization

instance Prelude.NFData LaunchProfileInitialization