{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SMS.GetAppLaunchConfiguration
-- 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)
--
-- Retrieves the application launch configuration associated with the
-- specified application.
module Amazonka.SMS.GetAppLaunchConfiguration
  ( -- * Creating a Request
    GetAppLaunchConfiguration (..),
    newGetAppLaunchConfiguration,

    -- * Request Lenses
    getAppLaunchConfiguration_appId,

    -- * Destructuring the Response
    GetAppLaunchConfigurationResponse (..),
    newGetAppLaunchConfigurationResponse,

    -- * Response Lenses
    getAppLaunchConfigurationResponse_serverGroupLaunchConfigurations,
    getAppLaunchConfigurationResponse_autoLaunch,
    getAppLaunchConfigurationResponse_roleName,
    getAppLaunchConfigurationResponse_appId,
    getAppLaunchConfigurationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SMS.Types

-- | /See:/ 'newGetAppLaunchConfiguration' smart constructor.
data GetAppLaunchConfiguration = GetAppLaunchConfiguration'
  { -- | The ID of the application.
    GetAppLaunchConfiguration -> Maybe Text
appId :: Prelude.Maybe Prelude.Text
  }
  deriving (GetAppLaunchConfiguration -> GetAppLaunchConfiguration -> Bool
(GetAppLaunchConfiguration -> GetAppLaunchConfiguration -> Bool)
-> (GetAppLaunchConfiguration -> GetAppLaunchConfiguration -> Bool)
-> Eq GetAppLaunchConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAppLaunchConfiguration -> GetAppLaunchConfiguration -> Bool
$c/= :: GetAppLaunchConfiguration -> GetAppLaunchConfiguration -> Bool
== :: GetAppLaunchConfiguration -> GetAppLaunchConfiguration -> Bool
$c== :: GetAppLaunchConfiguration -> GetAppLaunchConfiguration -> Bool
Prelude.Eq, ReadPrec [GetAppLaunchConfiguration]
ReadPrec GetAppLaunchConfiguration
Int -> ReadS GetAppLaunchConfiguration
ReadS [GetAppLaunchConfiguration]
(Int -> ReadS GetAppLaunchConfiguration)
-> ReadS [GetAppLaunchConfiguration]
-> ReadPrec GetAppLaunchConfiguration
-> ReadPrec [GetAppLaunchConfiguration]
-> Read GetAppLaunchConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAppLaunchConfiguration]
$creadListPrec :: ReadPrec [GetAppLaunchConfiguration]
readPrec :: ReadPrec GetAppLaunchConfiguration
$creadPrec :: ReadPrec GetAppLaunchConfiguration
readList :: ReadS [GetAppLaunchConfiguration]
$creadList :: ReadS [GetAppLaunchConfiguration]
readsPrec :: Int -> ReadS GetAppLaunchConfiguration
$creadsPrec :: Int -> ReadS GetAppLaunchConfiguration
Prelude.Read, Int -> GetAppLaunchConfiguration -> ShowS
[GetAppLaunchConfiguration] -> ShowS
GetAppLaunchConfiguration -> String
(Int -> GetAppLaunchConfiguration -> ShowS)
-> (GetAppLaunchConfiguration -> String)
-> ([GetAppLaunchConfiguration] -> ShowS)
-> Show GetAppLaunchConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAppLaunchConfiguration] -> ShowS
$cshowList :: [GetAppLaunchConfiguration] -> ShowS
show :: GetAppLaunchConfiguration -> String
$cshow :: GetAppLaunchConfiguration -> String
showsPrec :: Int -> GetAppLaunchConfiguration -> ShowS
$cshowsPrec :: Int -> GetAppLaunchConfiguration -> ShowS
Prelude.Show, (forall x.
 GetAppLaunchConfiguration -> Rep GetAppLaunchConfiguration x)
-> (forall x.
    Rep GetAppLaunchConfiguration x -> GetAppLaunchConfiguration)
-> Generic GetAppLaunchConfiguration
forall x.
Rep GetAppLaunchConfiguration x -> GetAppLaunchConfiguration
forall x.
GetAppLaunchConfiguration -> Rep GetAppLaunchConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAppLaunchConfiguration x -> GetAppLaunchConfiguration
$cfrom :: forall x.
GetAppLaunchConfiguration -> Rep GetAppLaunchConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'GetAppLaunchConfiguration' 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:
--
-- 'appId', 'getAppLaunchConfiguration_appId' - The ID of the application.
newGetAppLaunchConfiguration ::
  GetAppLaunchConfiguration
newGetAppLaunchConfiguration :: GetAppLaunchConfiguration
newGetAppLaunchConfiguration =
  GetAppLaunchConfiguration' :: Maybe Text -> GetAppLaunchConfiguration
GetAppLaunchConfiguration' {$sel:appId:GetAppLaunchConfiguration' :: Maybe Text
appId = Maybe Text
forall a. Maybe a
Prelude.Nothing}

-- | The ID of the application.
getAppLaunchConfiguration_appId :: Lens.Lens' GetAppLaunchConfiguration (Prelude.Maybe Prelude.Text)
getAppLaunchConfiguration_appId :: (Maybe Text -> f (Maybe Text))
-> GetAppLaunchConfiguration -> f GetAppLaunchConfiguration
getAppLaunchConfiguration_appId = (GetAppLaunchConfiguration -> Maybe Text)
-> (GetAppLaunchConfiguration
    -> Maybe Text -> GetAppLaunchConfiguration)
-> Lens
     GetAppLaunchConfiguration
     GetAppLaunchConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAppLaunchConfiguration' {Maybe Text
appId :: Maybe Text
$sel:appId:GetAppLaunchConfiguration' :: GetAppLaunchConfiguration -> Maybe Text
appId} -> Maybe Text
appId) (\s :: GetAppLaunchConfiguration
s@GetAppLaunchConfiguration' {} Maybe Text
a -> GetAppLaunchConfiguration
s {$sel:appId:GetAppLaunchConfiguration' :: Maybe Text
appId = Maybe Text
a} :: GetAppLaunchConfiguration)

instance Core.AWSRequest GetAppLaunchConfiguration where
  type
    AWSResponse GetAppLaunchConfiguration =
      GetAppLaunchConfigurationResponse
  request :: GetAppLaunchConfiguration -> Request GetAppLaunchConfiguration
request = Service
-> GetAppLaunchConfiguration -> Request GetAppLaunchConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetAppLaunchConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetAppLaunchConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetAppLaunchConfiguration))
-> Logger
-> Service
-> Proxy GetAppLaunchConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetAppLaunchConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [ServerGroupLaunchConfiguration]
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Int
-> GetAppLaunchConfigurationResponse
GetAppLaunchConfigurationResponse'
            (Maybe [ServerGroupLaunchConfiguration]
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> GetAppLaunchConfigurationResponse)
-> Either String (Maybe [ServerGroupLaunchConfiguration])
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetAppLaunchConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [ServerGroupLaunchConfiguration]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"serverGroupLaunchConfigurations"
                            Either String (Maybe (Maybe [ServerGroupLaunchConfiguration]))
-> Maybe [ServerGroupLaunchConfiguration]
-> Either String (Maybe [ServerGroupLaunchConfiguration])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ServerGroupLaunchConfiguration]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetAppLaunchConfigurationResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Int -> GetAppLaunchConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"autoLaunch")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Int -> GetAppLaunchConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> GetAppLaunchConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"roleName")
            Either
  String (Maybe Text -> Int -> GetAppLaunchConfigurationResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetAppLaunchConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"appId")
            Either String (Int -> GetAppLaunchConfigurationResponse)
-> Either String Int
-> Either String GetAppLaunchConfigurationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetAppLaunchConfiguration

instance Prelude.NFData GetAppLaunchConfiguration

instance Core.ToHeaders GetAppLaunchConfiguration where
  toHeaders :: GetAppLaunchConfiguration -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetAppLaunchConfiguration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSServerMigrationService_V2016_10_24.GetAppLaunchConfiguration" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON GetAppLaunchConfiguration where
  toJSON :: GetAppLaunchConfiguration -> Value
toJSON GetAppLaunchConfiguration' {Maybe Text
appId :: Maybe Text
$sel:appId:GetAppLaunchConfiguration' :: GetAppLaunchConfiguration -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(Text
"appId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
appId]
      )

instance Core.ToPath GetAppLaunchConfiguration where
  toPath :: GetAppLaunchConfiguration -> ByteString
toPath = ByteString -> GetAppLaunchConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery GetAppLaunchConfiguration where
  toQuery :: GetAppLaunchConfiguration -> QueryString
toQuery = QueryString -> GetAppLaunchConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetAppLaunchConfigurationResponse' smart constructor.
data GetAppLaunchConfigurationResponse = GetAppLaunchConfigurationResponse'
  { -- | The launch configurations for server groups in this application.
    GetAppLaunchConfigurationResponse
-> Maybe [ServerGroupLaunchConfiguration]
serverGroupLaunchConfigurations :: Prelude.Maybe [ServerGroupLaunchConfiguration],
    -- | Indicates whether the application is configured to launch automatically
    -- after replication is complete.
    GetAppLaunchConfigurationResponse -> Maybe Bool
autoLaunch :: Prelude.Maybe Prelude.Bool,
    -- | The name of the service role in the customer\'s account that AWS
    -- CloudFormation uses to launch the application.
    GetAppLaunchConfigurationResponse -> Maybe Text
roleName :: Prelude.Maybe Prelude.Text,
    -- | The ID of the application.
    GetAppLaunchConfigurationResponse -> Maybe Text
appId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetAppLaunchConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetAppLaunchConfigurationResponse
-> GetAppLaunchConfigurationResponse -> Bool
(GetAppLaunchConfigurationResponse
 -> GetAppLaunchConfigurationResponse -> Bool)
-> (GetAppLaunchConfigurationResponse
    -> GetAppLaunchConfigurationResponse -> Bool)
-> Eq GetAppLaunchConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAppLaunchConfigurationResponse
-> GetAppLaunchConfigurationResponse -> Bool
$c/= :: GetAppLaunchConfigurationResponse
-> GetAppLaunchConfigurationResponse -> Bool
== :: GetAppLaunchConfigurationResponse
-> GetAppLaunchConfigurationResponse -> Bool
$c== :: GetAppLaunchConfigurationResponse
-> GetAppLaunchConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [GetAppLaunchConfigurationResponse]
ReadPrec GetAppLaunchConfigurationResponse
Int -> ReadS GetAppLaunchConfigurationResponse
ReadS [GetAppLaunchConfigurationResponse]
(Int -> ReadS GetAppLaunchConfigurationResponse)
-> ReadS [GetAppLaunchConfigurationResponse]
-> ReadPrec GetAppLaunchConfigurationResponse
-> ReadPrec [GetAppLaunchConfigurationResponse]
-> Read GetAppLaunchConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAppLaunchConfigurationResponse]
$creadListPrec :: ReadPrec [GetAppLaunchConfigurationResponse]
readPrec :: ReadPrec GetAppLaunchConfigurationResponse
$creadPrec :: ReadPrec GetAppLaunchConfigurationResponse
readList :: ReadS [GetAppLaunchConfigurationResponse]
$creadList :: ReadS [GetAppLaunchConfigurationResponse]
readsPrec :: Int -> ReadS GetAppLaunchConfigurationResponse
$creadsPrec :: Int -> ReadS GetAppLaunchConfigurationResponse
Prelude.Read, Int -> GetAppLaunchConfigurationResponse -> ShowS
[GetAppLaunchConfigurationResponse] -> ShowS
GetAppLaunchConfigurationResponse -> String
(Int -> GetAppLaunchConfigurationResponse -> ShowS)
-> (GetAppLaunchConfigurationResponse -> String)
-> ([GetAppLaunchConfigurationResponse] -> ShowS)
-> Show GetAppLaunchConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAppLaunchConfigurationResponse] -> ShowS
$cshowList :: [GetAppLaunchConfigurationResponse] -> ShowS
show :: GetAppLaunchConfigurationResponse -> String
$cshow :: GetAppLaunchConfigurationResponse -> String
showsPrec :: Int -> GetAppLaunchConfigurationResponse -> ShowS
$cshowsPrec :: Int -> GetAppLaunchConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 GetAppLaunchConfigurationResponse
 -> Rep GetAppLaunchConfigurationResponse x)
-> (forall x.
    Rep GetAppLaunchConfigurationResponse x
    -> GetAppLaunchConfigurationResponse)
-> Generic GetAppLaunchConfigurationResponse
forall x.
Rep GetAppLaunchConfigurationResponse x
-> GetAppLaunchConfigurationResponse
forall x.
GetAppLaunchConfigurationResponse
-> Rep GetAppLaunchConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAppLaunchConfigurationResponse x
-> GetAppLaunchConfigurationResponse
$cfrom :: forall x.
GetAppLaunchConfigurationResponse
-> Rep GetAppLaunchConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetAppLaunchConfigurationResponse' 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:
--
-- 'serverGroupLaunchConfigurations', 'getAppLaunchConfigurationResponse_serverGroupLaunchConfigurations' - The launch configurations for server groups in this application.
--
-- 'autoLaunch', 'getAppLaunchConfigurationResponse_autoLaunch' - Indicates whether the application is configured to launch automatically
-- after replication is complete.
--
-- 'roleName', 'getAppLaunchConfigurationResponse_roleName' - The name of the service role in the customer\'s account that AWS
-- CloudFormation uses to launch the application.
--
-- 'appId', 'getAppLaunchConfigurationResponse_appId' - The ID of the application.
--
-- 'httpStatus', 'getAppLaunchConfigurationResponse_httpStatus' - The response's http status code.
newGetAppLaunchConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetAppLaunchConfigurationResponse
newGetAppLaunchConfigurationResponse :: Int -> GetAppLaunchConfigurationResponse
newGetAppLaunchConfigurationResponse Int
pHttpStatus_ =
  GetAppLaunchConfigurationResponse' :: Maybe [ServerGroupLaunchConfiguration]
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Int
-> GetAppLaunchConfigurationResponse
GetAppLaunchConfigurationResponse'
    { $sel:serverGroupLaunchConfigurations:GetAppLaunchConfigurationResponse' :: Maybe [ServerGroupLaunchConfiguration]
serverGroupLaunchConfigurations =
        Maybe [ServerGroupLaunchConfiguration]
forall a. Maybe a
Prelude.Nothing,
      $sel:autoLaunch:GetAppLaunchConfigurationResponse' :: Maybe Bool
autoLaunch = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:roleName:GetAppLaunchConfigurationResponse' :: Maybe Text
roleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:appId:GetAppLaunchConfigurationResponse' :: Maybe Text
appId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetAppLaunchConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The launch configurations for server groups in this application.
getAppLaunchConfigurationResponse_serverGroupLaunchConfigurations :: Lens.Lens' GetAppLaunchConfigurationResponse (Prelude.Maybe [ServerGroupLaunchConfiguration])
getAppLaunchConfigurationResponse_serverGroupLaunchConfigurations :: (Maybe [ServerGroupLaunchConfiguration]
 -> f (Maybe [ServerGroupLaunchConfiguration]))
-> GetAppLaunchConfigurationResponse
-> f GetAppLaunchConfigurationResponse
getAppLaunchConfigurationResponse_serverGroupLaunchConfigurations = (GetAppLaunchConfigurationResponse
 -> Maybe [ServerGroupLaunchConfiguration])
-> (GetAppLaunchConfigurationResponse
    -> Maybe [ServerGroupLaunchConfiguration]
    -> GetAppLaunchConfigurationResponse)
-> Lens
     GetAppLaunchConfigurationResponse
     GetAppLaunchConfigurationResponse
     (Maybe [ServerGroupLaunchConfiguration])
     (Maybe [ServerGroupLaunchConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAppLaunchConfigurationResponse' {Maybe [ServerGroupLaunchConfiguration]
serverGroupLaunchConfigurations :: Maybe [ServerGroupLaunchConfiguration]
$sel:serverGroupLaunchConfigurations:GetAppLaunchConfigurationResponse' :: GetAppLaunchConfigurationResponse
-> Maybe [ServerGroupLaunchConfiguration]
serverGroupLaunchConfigurations} -> Maybe [ServerGroupLaunchConfiguration]
serverGroupLaunchConfigurations) (\s :: GetAppLaunchConfigurationResponse
s@GetAppLaunchConfigurationResponse' {} Maybe [ServerGroupLaunchConfiguration]
a -> GetAppLaunchConfigurationResponse
s {$sel:serverGroupLaunchConfigurations:GetAppLaunchConfigurationResponse' :: Maybe [ServerGroupLaunchConfiguration]
serverGroupLaunchConfigurations = Maybe [ServerGroupLaunchConfiguration]
a} :: GetAppLaunchConfigurationResponse) ((Maybe [ServerGroupLaunchConfiguration]
  -> f (Maybe [ServerGroupLaunchConfiguration]))
 -> GetAppLaunchConfigurationResponse
 -> f GetAppLaunchConfigurationResponse)
-> ((Maybe [ServerGroupLaunchConfiguration]
     -> f (Maybe [ServerGroupLaunchConfiguration]))
    -> Maybe [ServerGroupLaunchConfiguration]
    -> f (Maybe [ServerGroupLaunchConfiguration]))
-> (Maybe [ServerGroupLaunchConfiguration]
    -> f (Maybe [ServerGroupLaunchConfiguration]))
-> GetAppLaunchConfigurationResponse
-> f GetAppLaunchConfigurationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ServerGroupLaunchConfiguration]
  [ServerGroupLaunchConfiguration]
  [ServerGroupLaunchConfiguration]
  [ServerGroupLaunchConfiguration]
-> Iso
     (Maybe [ServerGroupLaunchConfiguration])
     (Maybe [ServerGroupLaunchConfiguration])
     (Maybe [ServerGroupLaunchConfiguration])
     (Maybe [ServerGroupLaunchConfiguration])
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
  [ServerGroupLaunchConfiguration]
  [ServerGroupLaunchConfiguration]
  [ServerGroupLaunchConfiguration]
  [ServerGroupLaunchConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Indicates whether the application is configured to launch automatically
-- after replication is complete.
getAppLaunchConfigurationResponse_autoLaunch :: Lens.Lens' GetAppLaunchConfigurationResponse (Prelude.Maybe Prelude.Bool)
getAppLaunchConfigurationResponse_autoLaunch :: (Maybe Bool -> f (Maybe Bool))
-> GetAppLaunchConfigurationResponse
-> f GetAppLaunchConfigurationResponse
getAppLaunchConfigurationResponse_autoLaunch = (GetAppLaunchConfigurationResponse -> Maybe Bool)
-> (GetAppLaunchConfigurationResponse
    -> Maybe Bool -> GetAppLaunchConfigurationResponse)
-> Lens
     GetAppLaunchConfigurationResponse
     GetAppLaunchConfigurationResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAppLaunchConfigurationResponse' {Maybe Bool
autoLaunch :: Maybe Bool
$sel:autoLaunch:GetAppLaunchConfigurationResponse' :: GetAppLaunchConfigurationResponse -> Maybe Bool
autoLaunch} -> Maybe Bool
autoLaunch) (\s :: GetAppLaunchConfigurationResponse
s@GetAppLaunchConfigurationResponse' {} Maybe Bool
a -> GetAppLaunchConfigurationResponse
s {$sel:autoLaunch:GetAppLaunchConfigurationResponse' :: Maybe Bool
autoLaunch = Maybe Bool
a} :: GetAppLaunchConfigurationResponse)

-- | The name of the service role in the customer\'s account that AWS
-- CloudFormation uses to launch the application.
getAppLaunchConfigurationResponse_roleName :: Lens.Lens' GetAppLaunchConfigurationResponse (Prelude.Maybe Prelude.Text)
getAppLaunchConfigurationResponse_roleName :: (Maybe Text -> f (Maybe Text))
-> GetAppLaunchConfigurationResponse
-> f GetAppLaunchConfigurationResponse
getAppLaunchConfigurationResponse_roleName = (GetAppLaunchConfigurationResponse -> Maybe Text)
-> (GetAppLaunchConfigurationResponse
    -> Maybe Text -> GetAppLaunchConfigurationResponse)
-> Lens
     GetAppLaunchConfigurationResponse
     GetAppLaunchConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAppLaunchConfigurationResponse' {Maybe Text
roleName :: Maybe Text
$sel:roleName:GetAppLaunchConfigurationResponse' :: GetAppLaunchConfigurationResponse -> Maybe Text
roleName} -> Maybe Text
roleName) (\s :: GetAppLaunchConfigurationResponse
s@GetAppLaunchConfigurationResponse' {} Maybe Text
a -> GetAppLaunchConfigurationResponse
s {$sel:roleName:GetAppLaunchConfigurationResponse' :: Maybe Text
roleName = Maybe Text
a} :: GetAppLaunchConfigurationResponse)

-- | The ID of the application.
getAppLaunchConfigurationResponse_appId :: Lens.Lens' GetAppLaunchConfigurationResponse (Prelude.Maybe Prelude.Text)
getAppLaunchConfigurationResponse_appId :: (Maybe Text -> f (Maybe Text))
-> GetAppLaunchConfigurationResponse
-> f GetAppLaunchConfigurationResponse
getAppLaunchConfigurationResponse_appId = (GetAppLaunchConfigurationResponse -> Maybe Text)
-> (GetAppLaunchConfigurationResponse
    -> Maybe Text -> GetAppLaunchConfigurationResponse)
-> Lens
     GetAppLaunchConfigurationResponse
     GetAppLaunchConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAppLaunchConfigurationResponse' {Maybe Text
appId :: Maybe Text
$sel:appId:GetAppLaunchConfigurationResponse' :: GetAppLaunchConfigurationResponse -> Maybe Text
appId} -> Maybe Text
appId) (\s :: GetAppLaunchConfigurationResponse
s@GetAppLaunchConfigurationResponse' {} Maybe Text
a -> GetAppLaunchConfigurationResponse
s {$sel:appId:GetAppLaunchConfigurationResponse' :: Maybe Text
appId = Maybe Text
a} :: GetAppLaunchConfigurationResponse)

-- | The response's http status code.
getAppLaunchConfigurationResponse_httpStatus :: Lens.Lens' GetAppLaunchConfigurationResponse Prelude.Int
getAppLaunchConfigurationResponse_httpStatus :: (Int -> f Int)
-> GetAppLaunchConfigurationResponse
-> f GetAppLaunchConfigurationResponse
getAppLaunchConfigurationResponse_httpStatus = (GetAppLaunchConfigurationResponse -> Int)
-> (GetAppLaunchConfigurationResponse
    -> Int -> GetAppLaunchConfigurationResponse)
-> Lens
     GetAppLaunchConfigurationResponse
     GetAppLaunchConfigurationResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAppLaunchConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetAppLaunchConfigurationResponse' :: GetAppLaunchConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetAppLaunchConfigurationResponse
s@GetAppLaunchConfigurationResponse' {} Int
a -> GetAppLaunchConfigurationResponse
s {$sel:httpStatus:GetAppLaunchConfigurationResponse' :: Int
httpStatus = Int
a} :: GetAppLaunchConfigurationResponse)

instance
  Prelude.NFData
    GetAppLaunchConfigurationResponse