{-# 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.MigrationHubStrategy.UpdateApplicationComponentConfig
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates the configuration of an application component.
module Amazonka.MigrationHubStrategy.UpdateApplicationComponentConfig
  ( -- * Creating a Request
    UpdateApplicationComponentConfig (..),
    newUpdateApplicationComponentConfig,

    -- * Request Lenses
    updateApplicationComponentConfig_appType,
    updateApplicationComponentConfig_configureOnly,
    updateApplicationComponentConfig_inclusionStatus,
    updateApplicationComponentConfig_secretsManagerKey,
    updateApplicationComponentConfig_sourceCodeList,
    updateApplicationComponentConfig_strategyOption,
    updateApplicationComponentConfig_applicationComponentId,

    -- * Destructuring the Response
    UpdateApplicationComponentConfigResponse (..),
    newUpdateApplicationComponentConfigResponse,

    -- * Response Lenses
    updateApplicationComponentConfigResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MigrationHubStrategy.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateApplicationComponentConfig' smart constructor.
data UpdateApplicationComponentConfig = UpdateApplicationComponentConfig'
  { -- | The type of known component.
    UpdateApplicationComponentConfig -> Maybe AppType
appType :: Prelude.Maybe AppType,
    -- | Update the configuration request of an application component. If it is
    -- set to true, the source code and\/or database credentials are updated.
    -- If it is set to false, the source code and\/or database credentials are
    -- updated and an analysis is initiated.
    UpdateApplicationComponentConfig -> Maybe Bool
configureOnly :: Prelude.Maybe Prelude.Bool,
    -- | Indicates whether the application component has been included for server
    -- recommendation or not.
    UpdateApplicationComponentConfig -> Maybe InclusionStatus
inclusionStatus :: Prelude.Maybe InclusionStatus,
    -- | Database credentials.
    UpdateApplicationComponentConfig -> Maybe (Sensitive Text)
secretsManagerKey :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The list of source code configurations to update for the application
    -- component.
    UpdateApplicationComponentConfig -> Maybe [SourceCode]
sourceCodeList :: Prelude.Maybe [SourceCode],
    -- | The preferred strategy options for the application component. Use values
    -- from the GetApplicationComponentStrategies response.
    UpdateApplicationComponentConfig -> Maybe StrategyOption
strategyOption :: Prelude.Maybe StrategyOption,
    -- | The ID of the application component. The ID is unique within an AWS
    -- account.
    UpdateApplicationComponentConfig -> Text
applicationComponentId :: Prelude.Text
  }
  deriving (UpdateApplicationComponentConfig
-> UpdateApplicationComponentConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApplicationComponentConfig
-> UpdateApplicationComponentConfig -> Bool
$c/= :: UpdateApplicationComponentConfig
-> UpdateApplicationComponentConfig -> Bool
== :: UpdateApplicationComponentConfig
-> UpdateApplicationComponentConfig -> Bool
$c== :: UpdateApplicationComponentConfig
-> UpdateApplicationComponentConfig -> Bool
Prelude.Eq, Int -> UpdateApplicationComponentConfig -> ShowS
[UpdateApplicationComponentConfig] -> ShowS
UpdateApplicationComponentConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApplicationComponentConfig] -> ShowS
$cshowList :: [UpdateApplicationComponentConfig] -> ShowS
show :: UpdateApplicationComponentConfig -> String
$cshow :: UpdateApplicationComponentConfig -> String
showsPrec :: Int -> UpdateApplicationComponentConfig -> ShowS
$cshowsPrec :: Int -> UpdateApplicationComponentConfig -> ShowS
Prelude.Show, forall x.
Rep UpdateApplicationComponentConfig x
-> UpdateApplicationComponentConfig
forall x.
UpdateApplicationComponentConfig
-> Rep UpdateApplicationComponentConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateApplicationComponentConfig x
-> UpdateApplicationComponentConfig
$cfrom :: forall x.
UpdateApplicationComponentConfig
-> Rep UpdateApplicationComponentConfig x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApplicationComponentConfig' 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:
--
-- 'appType', 'updateApplicationComponentConfig_appType' - The type of known component.
--
-- 'configureOnly', 'updateApplicationComponentConfig_configureOnly' - Update the configuration request of an application component. If it is
-- set to true, the source code and\/or database credentials are updated.
-- If it is set to false, the source code and\/or database credentials are
-- updated and an analysis is initiated.
--
-- 'inclusionStatus', 'updateApplicationComponentConfig_inclusionStatus' - Indicates whether the application component has been included for server
-- recommendation or not.
--
-- 'secretsManagerKey', 'updateApplicationComponentConfig_secretsManagerKey' - Database credentials.
--
-- 'sourceCodeList', 'updateApplicationComponentConfig_sourceCodeList' - The list of source code configurations to update for the application
-- component.
--
-- 'strategyOption', 'updateApplicationComponentConfig_strategyOption' - The preferred strategy options for the application component. Use values
-- from the GetApplicationComponentStrategies response.
--
-- 'applicationComponentId', 'updateApplicationComponentConfig_applicationComponentId' - The ID of the application component. The ID is unique within an AWS
-- account.
newUpdateApplicationComponentConfig ::
  -- | 'applicationComponentId'
  Prelude.Text ->
  UpdateApplicationComponentConfig
newUpdateApplicationComponentConfig :: Text -> UpdateApplicationComponentConfig
newUpdateApplicationComponentConfig
  Text
pApplicationComponentId_ =
    UpdateApplicationComponentConfig'
      { $sel:appType:UpdateApplicationComponentConfig' :: Maybe AppType
appType =
          forall a. Maybe a
Prelude.Nothing,
        $sel:configureOnly:UpdateApplicationComponentConfig' :: Maybe Bool
configureOnly = forall a. Maybe a
Prelude.Nothing,
        $sel:inclusionStatus:UpdateApplicationComponentConfig' :: Maybe InclusionStatus
inclusionStatus = forall a. Maybe a
Prelude.Nothing,
        $sel:secretsManagerKey:UpdateApplicationComponentConfig' :: Maybe (Sensitive Text)
secretsManagerKey = forall a. Maybe a
Prelude.Nothing,
        $sel:sourceCodeList:UpdateApplicationComponentConfig' :: Maybe [SourceCode]
sourceCodeList = forall a. Maybe a
Prelude.Nothing,
        $sel:strategyOption:UpdateApplicationComponentConfig' :: Maybe StrategyOption
strategyOption = forall a. Maybe a
Prelude.Nothing,
        $sel:applicationComponentId:UpdateApplicationComponentConfig' :: Text
applicationComponentId =
          Text
pApplicationComponentId_
      }

-- | The type of known component.
updateApplicationComponentConfig_appType :: Lens.Lens' UpdateApplicationComponentConfig (Prelude.Maybe AppType)
updateApplicationComponentConfig_appType :: Lens' UpdateApplicationComponentConfig (Maybe AppType)
updateApplicationComponentConfig_appType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationComponentConfig' {Maybe AppType
appType :: Maybe AppType
$sel:appType:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe AppType
appType} -> Maybe AppType
appType) (\s :: UpdateApplicationComponentConfig
s@UpdateApplicationComponentConfig' {} Maybe AppType
a -> UpdateApplicationComponentConfig
s {$sel:appType:UpdateApplicationComponentConfig' :: Maybe AppType
appType = Maybe AppType
a} :: UpdateApplicationComponentConfig)

-- | Update the configuration request of an application component. If it is
-- set to true, the source code and\/or database credentials are updated.
-- If it is set to false, the source code and\/or database credentials are
-- updated and an analysis is initiated.
updateApplicationComponentConfig_configureOnly :: Lens.Lens' UpdateApplicationComponentConfig (Prelude.Maybe Prelude.Bool)
updateApplicationComponentConfig_configureOnly :: Lens' UpdateApplicationComponentConfig (Maybe Bool)
updateApplicationComponentConfig_configureOnly = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationComponentConfig' {Maybe Bool
configureOnly :: Maybe Bool
$sel:configureOnly:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe Bool
configureOnly} -> Maybe Bool
configureOnly) (\s :: UpdateApplicationComponentConfig
s@UpdateApplicationComponentConfig' {} Maybe Bool
a -> UpdateApplicationComponentConfig
s {$sel:configureOnly:UpdateApplicationComponentConfig' :: Maybe Bool
configureOnly = Maybe Bool
a} :: UpdateApplicationComponentConfig)

-- | Indicates whether the application component has been included for server
-- recommendation or not.
updateApplicationComponentConfig_inclusionStatus :: Lens.Lens' UpdateApplicationComponentConfig (Prelude.Maybe InclusionStatus)
updateApplicationComponentConfig_inclusionStatus :: Lens' UpdateApplicationComponentConfig (Maybe InclusionStatus)
updateApplicationComponentConfig_inclusionStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationComponentConfig' {Maybe InclusionStatus
inclusionStatus :: Maybe InclusionStatus
$sel:inclusionStatus:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe InclusionStatus
inclusionStatus} -> Maybe InclusionStatus
inclusionStatus) (\s :: UpdateApplicationComponentConfig
s@UpdateApplicationComponentConfig' {} Maybe InclusionStatus
a -> UpdateApplicationComponentConfig
s {$sel:inclusionStatus:UpdateApplicationComponentConfig' :: Maybe InclusionStatus
inclusionStatus = Maybe InclusionStatus
a} :: UpdateApplicationComponentConfig)

-- | Database credentials.
updateApplicationComponentConfig_secretsManagerKey :: Lens.Lens' UpdateApplicationComponentConfig (Prelude.Maybe Prelude.Text)
updateApplicationComponentConfig_secretsManagerKey :: Lens' UpdateApplicationComponentConfig (Maybe Text)
updateApplicationComponentConfig_secretsManagerKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationComponentConfig' {Maybe (Sensitive Text)
secretsManagerKey :: Maybe (Sensitive Text)
$sel:secretsManagerKey:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe (Sensitive Text)
secretsManagerKey} -> Maybe (Sensitive Text)
secretsManagerKey) (\s :: UpdateApplicationComponentConfig
s@UpdateApplicationComponentConfig' {} Maybe (Sensitive Text)
a -> UpdateApplicationComponentConfig
s {$sel:secretsManagerKey:UpdateApplicationComponentConfig' :: Maybe (Sensitive Text)
secretsManagerKey = Maybe (Sensitive Text)
a} :: UpdateApplicationComponentConfig) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The list of source code configurations to update for the application
-- component.
updateApplicationComponentConfig_sourceCodeList :: Lens.Lens' UpdateApplicationComponentConfig (Prelude.Maybe [SourceCode])
updateApplicationComponentConfig_sourceCodeList :: Lens' UpdateApplicationComponentConfig (Maybe [SourceCode])
updateApplicationComponentConfig_sourceCodeList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationComponentConfig' {Maybe [SourceCode]
sourceCodeList :: Maybe [SourceCode]
$sel:sourceCodeList:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe [SourceCode]
sourceCodeList} -> Maybe [SourceCode]
sourceCodeList) (\s :: UpdateApplicationComponentConfig
s@UpdateApplicationComponentConfig' {} Maybe [SourceCode]
a -> UpdateApplicationComponentConfig
s {$sel:sourceCodeList:UpdateApplicationComponentConfig' :: Maybe [SourceCode]
sourceCodeList = Maybe [SourceCode]
a} :: UpdateApplicationComponentConfig) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The preferred strategy options for the application component. Use values
-- from the GetApplicationComponentStrategies response.
updateApplicationComponentConfig_strategyOption :: Lens.Lens' UpdateApplicationComponentConfig (Prelude.Maybe StrategyOption)
updateApplicationComponentConfig_strategyOption :: Lens' UpdateApplicationComponentConfig (Maybe StrategyOption)
updateApplicationComponentConfig_strategyOption = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationComponentConfig' {Maybe StrategyOption
strategyOption :: Maybe StrategyOption
$sel:strategyOption:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe StrategyOption
strategyOption} -> Maybe StrategyOption
strategyOption) (\s :: UpdateApplicationComponentConfig
s@UpdateApplicationComponentConfig' {} Maybe StrategyOption
a -> UpdateApplicationComponentConfig
s {$sel:strategyOption:UpdateApplicationComponentConfig' :: Maybe StrategyOption
strategyOption = Maybe StrategyOption
a} :: UpdateApplicationComponentConfig)

-- | The ID of the application component. The ID is unique within an AWS
-- account.
updateApplicationComponentConfig_applicationComponentId :: Lens.Lens' UpdateApplicationComponentConfig Prelude.Text
updateApplicationComponentConfig_applicationComponentId :: Lens' UpdateApplicationComponentConfig Text
updateApplicationComponentConfig_applicationComponentId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationComponentConfig' {Text
applicationComponentId :: Text
$sel:applicationComponentId:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Text
applicationComponentId} -> Text
applicationComponentId) (\s :: UpdateApplicationComponentConfig
s@UpdateApplicationComponentConfig' {} Text
a -> UpdateApplicationComponentConfig
s {$sel:applicationComponentId:UpdateApplicationComponentConfig' :: Text
applicationComponentId = Text
a} :: UpdateApplicationComponentConfig)

instance
  Core.AWSRequest
    UpdateApplicationComponentConfig
  where
  type
    AWSResponse UpdateApplicationComponentConfig =
      UpdateApplicationComponentConfigResponse
  request :: (Service -> Service)
-> UpdateApplicationComponentConfig
-> Request UpdateApplicationComponentConfig
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateApplicationComponentConfig
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateApplicationComponentConfig)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateApplicationComponentConfigResponse
UpdateApplicationComponentConfigResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    UpdateApplicationComponentConfig
  where
  hashWithSalt :: Int -> UpdateApplicationComponentConfig -> Int
hashWithSalt
    Int
_salt
    UpdateApplicationComponentConfig' {Maybe Bool
Maybe [SourceCode]
Maybe (Sensitive Text)
Maybe AppType
Maybe InclusionStatus
Maybe StrategyOption
Text
applicationComponentId :: Text
strategyOption :: Maybe StrategyOption
sourceCodeList :: Maybe [SourceCode]
secretsManagerKey :: Maybe (Sensitive Text)
inclusionStatus :: Maybe InclusionStatus
configureOnly :: Maybe Bool
appType :: Maybe AppType
$sel:applicationComponentId:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Text
$sel:strategyOption:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe StrategyOption
$sel:sourceCodeList:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe [SourceCode]
$sel:secretsManagerKey:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe (Sensitive Text)
$sel:inclusionStatus:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe InclusionStatus
$sel:configureOnly:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe Bool
$sel:appType:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe AppType
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AppType
appType
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
configureOnly
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InclusionStatus
inclusionStatus
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
secretsManagerKey
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SourceCode]
sourceCodeList
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StrategyOption
strategyOption
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
applicationComponentId

instance
  Prelude.NFData
    UpdateApplicationComponentConfig
  where
  rnf :: UpdateApplicationComponentConfig -> ()
rnf UpdateApplicationComponentConfig' {Maybe Bool
Maybe [SourceCode]
Maybe (Sensitive Text)
Maybe AppType
Maybe InclusionStatus
Maybe StrategyOption
Text
applicationComponentId :: Text
strategyOption :: Maybe StrategyOption
sourceCodeList :: Maybe [SourceCode]
secretsManagerKey :: Maybe (Sensitive Text)
inclusionStatus :: Maybe InclusionStatus
configureOnly :: Maybe Bool
appType :: Maybe AppType
$sel:applicationComponentId:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Text
$sel:strategyOption:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe StrategyOption
$sel:sourceCodeList:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe [SourceCode]
$sel:secretsManagerKey:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe (Sensitive Text)
$sel:inclusionStatus:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe InclusionStatus
$sel:configureOnly:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe Bool
$sel:appType:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe AppType
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AppType
appType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
configureOnly
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InclusionStatus
inclusionStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
secretsManagerKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SourceCode]
sourceCodeList
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StrategyOption
strategyOption
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
applicationComponentId

instance
  Data.ToHeaders
    UpdateApplicationComponentConfig
  where
  toHeaders :: UpdateApplicationComponentConfig -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateApplicationComponentConfig where
  toJSON :: UpdateApplicationComponentConfig -> Value
toJSON UpdateApplicationComponentConfig' {Maybe Bool
Maybe [SourceCode]
Maybe (Sensitive Text)
Maybe AppType
Maybe InclusionStatus
Maybe StrategyOption
Text
applicationComponentId :: Text
strategyOption :: Maybe StrategyOption
sourceCodeList :: Maybe [SourceCode]
secretsManagerKey :: Maybe (Sensitive Text)
inclusionStatus :: Maybe InclusionStatus
configureOnly :: Maybe Bool
appType :: Maybe AppType
$sel:applicationComponentId:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Text
$sel:strategyOption:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe StrategyOption
$sel:sourceCodeList:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe [SourceCode]
$sel:secretsManagerKey:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe (Sensitive Text)
$sel:inclusionStatus:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe InclusionStatus
$sel:configureOnly:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe Bool
$sel:appType:UpdateApplicationComponentConfig' :: UpdateApplicationComponentConfig -> Maybe AppType
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"appType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AppType
appType,
            (Key
"configureOnly" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
configureOnly,
            (Key
"inclusionStatus" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InclusionStatus
inclusionStatus,
            (Key
"secretsManagerKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
secretsManagerKey,
            (Key
"sourceCodeList" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SourceCode]
sourceCodeList,
            (Key
"strategyOption" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe StrategyOption
strategyOption,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"applicationComponentId"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
applicationComponentId
              )
          ]
      )

instance Data.ToPath UpdateApplicationComponentConfig where
  toPath :: UpdateApplicationComponentConfig -> ByteString
toPath =
    forall a b. a -> b -> a
Prelude.const
      ByteString
"/update-applicationcomponent-config/"

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

-- | /See:/ 'newUpdateApplicationComponentConfigResponse' smart constructor.
data UpdateApplicationComponentConfigResponse = UpdateApplicationComponentConfigResponse'
  { -- | The response's http status code.
    UpdateApplicationComponentConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateApplicationComponentConfigResponse
-> UpdateApplicationComponentConfigResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApplicationComponentConfigResponse
-> UpdateApplicationComponentConfigResponse -> Bool
$c/= :: UpdateApplicationComponentConfigResponse
-> UpdateApplicationComponentConfigResponse -> Bool
== :: UpdateApplicationComponentConfigResponse
-> UpdateApplicationComponentConfigResponse -> Bool
$c== :: UpdateApplicationComponentConfigResponse
-> UpdateApplicationComponentConfigResponse -> Bool
Prelude.Eq, ReadPrec [UpdateApplicationComponentConfigResponse]
ReadPrec UpdateApplicationComponentConfigResponse
Int -> ReadS UpdateApplicationComponentConfigResponse
ReadS [UpdateApplicationComponentConfigResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateApplicationComponentConfigResponse]
$creadListPrec :: ReadPrec [UpdateApplicationComponentConfigResponse]
readPrec :: ReadPrec UpdateApplicationComponentConfigResponse
$creadPrec :: ReadPrec UpdateApplicationComponentConfigResponse
readList :: ReadS [UpdateApplicationComponentConfigResponse]
$creadList :: ReadS [UpdateApplicationComponentConfigResponse]
readsPrec :: Int -> ReadS UpdateApplicationComponentConfigResponse
$creadsPrec :: Int -> ReadS UpdateApplicationComponentConfigResponse
Prelude.Read, Int -> UpdateApplicationComponentConfigResponse -> ShowS
[UpdateApplicationComponentConfigResponse] -> ShowS
UpdateApplicationComponentConfigResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApplicationComponentConfigResponse] -> ShowS
$cshowList :: [UpdateApplicationComponentConfigResponse] -> ShowS
show :: UpdateApplicationComponentConfigResponse -> String
$cshow :: UpdateApplicationComponentConfigResponse -> String
showsPrec :: Int -> UpdateApplicationComponentConfigResponse -> ShowS
$cshowsPrec :: Int -> UpdateApplicationComponentConfigResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateApplicationComponentConfigResponse x
-> UpdateApplicationComponentConfigResponse
forall x.
UpdateApplicationComponentConfigResponse
-> Rep UpdateApplicationComponentConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateApplicationComponentConfigResponse x
-> UpdateApplicationComponentConfigResponse
$cfrom :: forall x.
UpdateApplicationComponentConfigResponse
-> Rep UpdateApplicationComponentConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApplicationComponentConfigResponse' 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:
--
-- 'httpStatus', 'updateApplicationComponentConfigResponse_httpStatus' - The response's http status code.
newUpdateApplicationComponentConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateApplicationComponentConfigResponse
newUpdateApplicationComponentConfigResponse :: Int -> UpdateApplicationComponentConfigResponse
newUpdateApplicationComponentConfigResponse
  Int
pHttpStatus_ =
    UpdateApplicationComponentConfigResponse'
      { $sel:httpStatus:UpdateApplicationComponentConfigResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

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

instance
  Prelude.NFData
    UpdateApplicationComponentConfigResponse
  where
  rnf :: UpdateApplicationComponentConfigResponse -> ()
rnf UpdateApplicationComponentConfigResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateApplicationComponentConfigResponse' :: UpdateApplicationComponentConfigResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus