{-# 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.ApplicationInsights.UpdateApplication
-- 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)
--
-- Updates the application.
module Amazonka.ApplicationInsights.UpdateApplication
  ( -- * Creating a Request
    UpdateApplication (..),
    newUpdateApplication,

    -- * Request Lenses
    updateApplication_cWEMonitorEnabled,
    updateApplication_opsItemSNSTopicArn,
    updateApplication_removeSNSTopic,
    updateApplication_opsCenterEnabled,
    updateApplication_resourceGroupName,

    -- * Destructuring the Response
    UpdateApplicationResponse (..),
    newUpdateApplicationResponse,

    -- * Response Lenses
    updateApplicationResponse_applicationInfo,
    updateApplicationResponse_httpStatus,
  )
where

import Amazonka.ApplicationInsights.Types
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

-- | /See:/ 'newUpdateApplication' smart constructor.
data UpdateApplication = UpdateApplication'
  { -- | Indicates whether Application Insights can listen to CloudWatch events
    -- for the application resources, such as @instance terminated@,
    -- @failed deployment@, and others.
    UpdateApplication -> Maybe Bool
cWEMonitorEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The SNS topic provided to Application Insights that is associated to the
    -- created opsItem. Allows you to receive notifications for updates to the
    -- opsItem.
    UpdateApplication -> Maybe Text
opsItemSNSTopicArn :: Prelude.Maybe Prelude.Text,
    -- | Disassociates the SNS topic from the opsItem created for detected
    -- problems.
    UpdateApplication -> Maybe Bool
removeSNSTopic :: Prelude.Maybe Prelude.Bool,
    -- | When set to @true@, creates opsItems for any problems detected on an
    -- application.
    UpdateApplication -> Maybe Bool
opsCenterEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The name of the resource group.
    UpdateApplication -> Text
resourceGroupName :: Prelude.Text
  }
  deriving (UpdateApplication -> UpdateApplication -> Bool
(UpdateApplication -> UpdateApplication -> Bool)
-> (UpdateApplication -> UpdateApplication -> Bool)
-> Eq UpdateApplication
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApplication -> UpdateApplication -> Bool
$c/= :: UpdateApplication -> UpdateApplication -> Bool
== :: UpdateApplication -> UpdateApplication -> Bool
$c== :: UpdateApplication -> UpdateApplication -> Bool
Prelude.Eq, ReadPrec [UpdateApplication]
ReadPrec UpdateApplication
Int -> ReadS UpdateApplication
ReadS [UpdateApplication]
(Int -> ReadS UpdateApplication)
-> ReadS [UpdateApplication]
-> ReadPrec UpdateApplication
-> ReadPrec [UpdateApplication]
-> Read UpdateApplication
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateApplication]
$creadListPrec :: ReadPrec [UpdateApplication]
readPrec :: ReadPrec UpdateApplication
$creadPrec :: ReadPrec UpdateApplication
readList :: ReadS [UpdateApplication]
$creadList :: ReadS [UpdateApplication]
readsPrec :: Int -> ReadS UpdateApplication
$creadsPrec :: Int -> ReadS UpdateApplication
Prelude.Read, Int -> UpdateApplication -> ShowS
[UpdateApplication] -> ShowS
UpdateApplication -> String
(Int -> UpdateApplication -> ShowS)
-> (UpdateApplication -> String)
-> ([UpdateApplication] -> ShowS)
-> Show UpdateApplication
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApplication] -> ShowS
$cshowList :: [UpdateApplication] -> ShowS
show :: UpdateApplication -> String
$cshow :: UpdateApplication -> String
showsPrec :: Int -> UpdateApplication -> ShowS
$cshowsPrec :: Int -> UpdateApplication -> ShowS
Prelude.Show, (forall x. UpdateApplication -> Rep UpdateApplication x)
-> (forall x. Rep UpdateApplication x -> UpdateApplication)
-> Generic UpdateApplication
forall x. Rep UpdateApplication x -> UpdateApplication
forall x. UpdateApplication -> Rep UpdateApplication x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateApplication x -> UpdateApplication
$cfrom :: forall x. UpdateApplication -> Rep UpdateApplication x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApplication' 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:
--
-- 'cWEMonitorEnabled', 'updateApplication_cWEMonitorEnabled' - Indicates whether Application Insights can listen to CloudWatch events
-- for the application resources, such as @instance terminated@,
-- @failed deployment@, and others.
--
-- 'opsItemSNSTopicArn', 'updateApplication_opsItemSNSTopicArn' - The SNS topic provided to Application Insights that is associated to the
-- created opsItem. Allows you to receive notifications for updates to the
-- opsItem.
--
-- 'removeSNSTopic', 'updateApplication_removeSNSTopic' - Disassociates the SNS topic from the opsItem created for detected
-- problems.
--
-- 'opsCenterEnabled', 'updateApplication_opsCenterEnabled' - When set to @true@, creates opsItems for any problems detected on an
-- application.
--
-- 'resourceGroupName', 'updateApplication_resourceGroupName' - The name of the resource group.
newUpdateApplication ::
  -- | 'resourceGroupName'
  Prelude.Text ->
  UpdateApplication
newUpdateApplication :: Text -> UpdateApplication
newUpdateApplication Text
pResourceGroupName_ =
  UpdateApplication' :: Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Text
-> UpdateApplication
UpdateApplication'
    { $sel:cWEMonitorEnabled:UpdateApplication' :: Maybe Bool
cWEMonitorEnabled =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:opsItemSNSTopicArn:UpdateApplication' :: Maybe Text
opsItemSNSTopicArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:removeSNSTopic:UpdateApplication' :: Maybe Bool
removeSNSTopic = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:opsCenterEnabled:UpdateApplication' :: Maybe Bool
opsCenterEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceGroupName:UpdateApplication' :: Text
resourceGroupName = Text
pResourceGroupName_
    }

-- | Indicates whether Application Insights can listen to CloudWatch events
-- for the application resources, such as @instance terminated@,
-- @failed deployment@, and others.
updateApplication_cWEMonitorEnabled :: Lens.Lens' UpdateApplication (Prelude.Maybe Prelude.Bool)
updateApplication_cWEMonitorEnabled :: (Maybe Bool -> f (Maybe Bool))
-> UpdateApplication -> f UpdateApplication
updateApplication_cWEMonitorEnabled = (UpdateApplication -> Maybe Bool)
-> (UpdateApplication -> Maybe Bool -> UpdateApplication)
-> Lens
     UpdateApplication UpdateApplication (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplication' {Maybe Bool
cWEMonitorEnabled :: Maybe Bool
$sel:cWEMonitorEnabled:UpdateApplication' :: UpdateApplication -> Maybe Bool
cWEMonitorEnabled} -> Maybe Bool
cWEMonitorEnabled) (\s :: UpdateApplication
s@UpdateApplication' {} Maybe Bool
a -> UpdateApplication
s {$sel:cWEMonitorEnabled:UpdateApplication' :: Maybe Bool
cWEMonitorEnabled = Maybe Bool
a} :: UpdateApplication)

-- | The SNS topic provided to Application Insights that is associated to the
-- created opsItem. Allows you to receive notifications for updates to the
-- opsItem.
updateApplication_opsItemSNSTopicArn :: Lens.Lens' UpdateApplication (Prelude.Maybe Prelude.Text)
updateApplication_opsItemSNSTopicArn :: (Maybe Text -> f (Maybe Text))
-> UpdateApplication -> f UpdateApplication
updateApplication_opsItemSNSTopicArn = (UpdateApplication -> Maybe Text)
-> (UpdateApplication -> Maybe Text -> UpdateApplication)
-> Lens
     UpdateApplication UpdateApplication (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplication' {Maybe Text
opsItemSNSTopicArn :: Maybe Text
$sel:opsItemSNSTopicArn:UpdateApplication' :: UpdateApplication -> Maybe Text
opsItemSNSTopicArn} -> Maybe Text
opsItemSNSTopicArn) (\s :: UpdateApplication
s@UpdateApplication' {} Maybe Text
a -> UpdateApplication
s {$sel:opsItemSNSTopicArn:UpdateApplication' :: Maybe Text
opsItemSNSTopicArn = Maybe Text
a} :: UpdateApplication)

-- | Disassociates the SNS topic from the opsItem created for detected
-- problems.
updateApplication_removeSNSTopic :: Lens.Lens' UpdateApplication (Prelude.Maybe Prelude.Bool)
updateApplication_removeSNSTopic :: (Maybe Bool -> f (Maybe Bool))
-> UpdateApplication -> f UpdateApplication
updateApplication_removeSNSTopic = (UpdateApplication -> Maybe Bool)
-> (UpdateApplication -> Maybe Bool -> UpdateApplication)
-> Lens
     UpdateApplication UpdateApplication (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplication' {Maybe Bool
removeSNSTopic :: Maybe Bool
$sel:removeSNSTopic:UpdateApplication' :: UpdateApplication -> Maybe Bool
removeSNSTopic} -> Maybe Bool
removeSNSTopic) (\s :: UpdateApplication
s@UpdateApplication' {} Maybe Bool
a -> UpdateApplication
s {$sel:removeSNSTopic:UpdateApplication' :: Maybe Bool
removeSNSTopic = Maybe Bool
a} :: UpdateApplication)

-- | When set to @true@, creates opsItems for any problems detected on an
-- application.
updateApplication_opsCenterEnabled :: Lens.Lens' UpdateApplication (Prelude.Maybe Prelude.Bool)
updateApplication_opsCenterEnabled :: (Maybe Bool -> f (Maybe Bool))
-> UpdateApplication -> f UpdateApplication
updateApplication_opsCenterEnabled = (UpdateApplication -> Maybe Bool)
-> (UpdateApplication -> Maybe Bool -> UpdateApplication)
-> Lens
     UpdateApplication UpdateApplication (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplication' {Maybe Bool
opsCenterEnabled :: Maybe Bool
$sel:opsCenterEnabled:UpdateApplication' :: UpdateApplication -> Maybe Bool
opsCenterEnabled} -> Maybe Bool
opsCenterEnabled) (\s :: UpdateApplication
s@UpdateApplication' {} Maybe Bool
a -> UpdateApplication
s {$sel:opsCenterEnabled:UpdateApplication' :: Maybe Bool
opsCenterEnabled = Maybe Bool
a} :: UpdateApplication)

-- | The name of the resource group.
updateApplication_resourceGroupName :: Lens.Lens' UpdateApplication Prelude.Text
updateApplication_resourceGroupName :: (Text -> f Text) -> UpdateApplication -> f UpdateApplication
updateApplication_resourceGroupName = (UpdateApplication -> Text)
-> (UpdateApplication -> Text -> UpdateApplication)
-> Lens UpdateApplication UpdateApplication Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplication' {Text
resourceGroupName :: Text
$sel:resourceGroupName:UpdateApplication' :: UpdateApplication -> Text
resourceGroupName} -> Text
resourceGroupName) (\s :: UpdateApplication
s@UpdateApplication' {} Text
a -> UpdateApplication
s {$sel:resourceGroupName:UpdateApplication' :: Text
resourceGroupName = Text
a} :: UpdateApplication)

instance Core.AWSRequest UpdateApplication where
  type
    AWSResponse UpdateApplication =
      UpdateApplicationResponse
  request :: UpdateApplication -> Request UpdateApplication
request = Service -> UpdateApplication -> Request UpdateApplication
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateApplication
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateApplication)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateApplication))
-> Logger
-> Service
-> Proxy UpdateApplication
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateApplication)))
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 ApplicationInfo -> Int -> UpdateApplicationResponse
UpdateApplicationResponse'
            (Maybe ApplicationInfo -> Int -> UpdateApplicationResponse)
-> Either String (Maybe ApplicationInfo)
-> Either String (Int -> UpdateApplicationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ApplicationInfo)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ApplicationInfo")
            Either String (Int -> UpdateApplicationResponse)
-> Either String Int -> Either String UpdateApplicationResponse
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 UpdateApplication

instance Prelude.NFData UpdateApplication

instance Core.ToHeaders UpdateApplication where
  toHeaders :: UpdateApplication -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateApplication -> 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
"EC2WindowsBarleyService.UpdateApplication" ::
                          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 UpdateApplication where
  toJSON :: UpdateApplication -> Value
toJSON UpdateApplication' {Maybe Bool
Maybe Text
Text
resourceGroupName :: Text
opsCenterEnabled :: Maybe Bool
removeSNSTopic :: Maybe Bool
opsItemSNSTopicArn :: Maybe Text
cWEMonitorEnabled :: Maybe Bool
$sel:resourceGroupName:UpdateApplication' :: UpdateApplication -> Text
$sel:opsCenterEnabled:UpdateApplication' :: UpdateApplication -> Maybe Bool
$sel:removeSNSTopic:UpdateApplication' :: UpdateApplication -> Maybe Bool
$sel:opsItemSNSTopicArn:UpdateApplication' :: UpdateApplication -> Maybe Text
$sel:cWEMonitorEnabled:UpdateApplication' :: UpdateApplication -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"CWEMonitorEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
cWEMonitorEnabled,
            (Text
"OpsItemSNSTopicArn" 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
opsItemSNSTopicArn,
            (Text
"RemoveSNSTopic" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
removeSNSTopic,
            (Text
"OpsCenterEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
opsCenterEnabled,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ResourceGroupName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceGroupName)
          ]
      )

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

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

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

-- |
-- Create a value of 'UpdateApplicationResponse' 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:
--
-- 'applicationInfo', 'updateApplicationResponse_applicationInfo' - Information about the application.
--
-- 'httpStatus', 'updateApplicationResponse_httpStatus' - The response's http status code.
newUpdateApplicationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateApplicationResponse
newUpdateApplicationResponse :: Int -> UpdateApplicationResponse
newUpdateApplicationResponse Int
pHttpStatus_ =
  UpdateApplicationResponse' :: Maybe ApplicationInfo -> Int -> UpdateApplicationResponse
UpdateApplicationResponse'
    { $sel:applicationInfo:UpdateApplicationResponse' :: Maybe ApplicationInfo
applicationInfo =
        Maybe ApplicationInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateApplicationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the application.
updateApplicationResponse_applicationInfo :: Lens.Lens' UpdateApplicationResponse (Prelude.Maybe ApplicationInfo)
updateApplicationResponse_applicationInfo :: (Maybe ApplicationInfo -> f (Maybe ApplicationInfo))
-> UpdateApplicationResponse -> f UpdateApplicationResponse
updateApplicationResponse_applicationInfo = (UpdateApplicationResponse -> Maybe ApplicationInfo)
-> (UpdateApplicationResponse
    -> Maybe ApplicationInfo -> UpdateApplicationResponse)
-> Lens
     UpdateApplicationResponse
     UpdateApplicationResponse
     (Maybe ApplicationInfo)
     (Maybe ApplicationInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationResponse' {Maybe ApplicationInfo
applicationInfo :: Maybe ApplicationInfo
$sel:applicationInfo:UpdateApplicationResponse' :: UpdateApplicationResponse -> Maybe ApplicationInfo
applicationInfo} -> Maybe ApplicationInfo
applicationInfo) (\s :: UpdateApplicationResponse
s@UpdateApplicationResponse' {} Maybe ApplicationInfo
a -> UpdateApplicationResponse
s {$sel:applicationInfo:UpdateApplicationResponse' :: Maybe ApplicationInfo
applicationInfo = Maybe ApplicationInfo
a} :: UpdateApplicationResponse)

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

instance Prelude.NFData UpdateApplicationResponse