{-# 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.UpdateApp
-- 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 specified application.
module Amazonka.SMS.UpdateApp
  ( -- * Creating a Request
    UpdateApp (..),
    newUpdateApp,

    -- * Request Lenses
    updateApp_appId,
    updateApp_description,
    updateApp_name,
    updateApp_roleName,
    updateApp_serverGroups,
    updateApp_tags,

    -- * Destructuring the Response
    UpdateAppResponse (..),
    newUpdateAppResponse,

    -- * Response Lenses
    updateAppResponse_appSummary,
    updateAppResponse_serverGroups,
    updateAppResponse_tags,
    updateAppResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateApp' smart constructor.
data UpdateApp = UpdateApp'
  { -- | The ID of the application.
    UpdateApp -> Maybe Text
appId :: Prelude.Maybe Prelude.Text,
    -- | The new description of the application.
    UpdateApp -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The new name of the application.
    UpdateApp -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The name of the service role in the customer\'s account used by Server
    -- Migration Service.
    UpdateApp -> Maybe Text
roleName :: Prelude.Maybe Prelude.Text,
    -- | The server groups in the application to update.
    UpdateApp -> Maybe [ServerGroup]
serverGroups :: Prelude.Maybe [ServerGroup],
    -- | The tags to associate with the application.
    UpdateApp -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
  }
  deriving (UpdateApp -> UpdateApp -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApp -> UpdateApp -> Bool
$c/= :: UpdateApp -> UpdateApp -> Bool
== :: UpdateApp -> UpdateApp -> Bool
$c== :: UpdateApp -> UpdateApp -> Bool
Prelude.Eq, ReadPrec [UpdateApp]
ReadPrec UpdateApp
Int -> ReadS UpdateApp
ReadS [UpdateApp]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateApp]
$creadListPrec :: ReadPrec [UpdateApp]
readPrec :: ReadPrec UpdateApp
$creadPrec :: ReadPrec UpdateApp
readList :: ReadS [UpdateApp]
$creadList :: ReadS [UpdateApp]
readsPrec :: Int -> ReadS UpdateApp
$creadsPrec :: Int -> ReadS UpdateApp
Prelude.Read, Int -> UpdateApp -> ShowS
[UpdateApp] -> ShowS
UpdateApp -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApp] -> ShowS
$cshowList :: [UpdateApp] -> ShowS
show :: UpdateApp -> String
$cshow :: UpdateApp -> String
showsPrec :: Int -> UpdateApp -> ShowS
$cshowsPrec :: Int -> UpdateApp -> ShowS
Prelude.Show, forall x. Rep UpdateApp x -> UpdateApp
forall x. UpdateApp -> Rep UpdateApp x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateApp x -> UpdateApp
$cfrom :: forall x. UpdateApp -> Rep UpdateApp x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApp' 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', 'updateApp_appId' - The ID of the application.
--
-- 'description', 'updateApp_description' - The new description of the application.
--
-- 'name', 'updateApp_name' - The new name of the application.
--
-- 'roleName', 'updateApp_roleName' - The name of the service role in the customer\'s account used by Server
-- Migration Service.
--
-- 'serverGroups', 'updateApp_serverGroups' - The server groups in the application to update.
--
-- 'tags', 'updateApp_tags' - The tags to associate with the application.
newUpdateApp ::
  UpdateApp
newUpdateApp :: UpdateApp
newUpdateApp =
  UpdateApp'
    { $sel:appId:UpdateApp' :: Maybe Text
appId = forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateApp' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateApp' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:roleName:UpdateApp' :: Maybe Text
roleName = forall a. Maybe a
Prelude.Nothing,
      $sel:serverGroups:UpdateApp' :: Maybe [ServerGroup]
serverGroups = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:UpdateApp' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing
    }

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

-- | The new description of the application.
updateApp_description :: Lens.Lens' UpdateApp (Prelude.Maybe Prelude.Text)
updateApp_description :: Lens' UpdateApp (Maybe Text)
updateApp_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApp' {Maybe Text
description :: Maybe Text
$sel:description:UpdateApp' :: UpdateApp -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateApp
s@UpdateApp' {} Maybe Text
a -> UpdateApp
s {$sel:description:UpdateApp' :: Maybe Text
description = Maybe Text
a} :: UpdateApp)

-- | The new name of the application.
updateApp_name :: Lens.Lens' UpdateApp (Prelude.Maybe Prelude.Text)
updateApp_name :: Lens' UpdateApp (Maybe Text)
updateApp_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApp' {Maybe Text
name :: Maybe Text
$sel:name:UpdateApp' :: UpdateApp -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateApp
s@UpdateApp' {} Maybe Text
a -> UpdateApp
s {$sel:name:UpdateApp' :: Maybe Text
name = Maybe Text
a} :: UpdateApp)

-- | The name of the service role in the customer\'s account used by Server
-- Migration Service.
updateApp_roleName :: Lens.Lens' UpdateApp (Prelude.Maybe Prelude.Text)
updateApp_roleName :: Lens' UpdateApp (Maybe Text)
updateApp_roleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApp' {Maybe Text
roleName :: Maybe Text
$sel:roleName:UpdateApp' :: UpdateApp -> Maybe Text
roleName} -> Maybe Text
roleName) (\s :: UpdateApp
s@UpdateApp' {} Maybe Text
a -> UpdateApp
s {$sel:roleName:UpdateApp' :: Maybe Text
roleName = Maybe Text
a} :: UpdateApp)

-- | The server groups in the application to update.
updateApp_serverGroups :: Lens.Lens' UpdateApp (Prelude.Maybe [ServerGroup])
updateApp_serverGroups :: Lens' UpdateApp (Maybe [ServerGroup])
updateApp_serverGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApp' {Maybe [ServerGroup]
serverGroups :: Maybe [ServerGroup]
$sel:serverGroups:UpdateApp' :: UpdateApp -> Maybe [ServerGroup]
serverGroups} -> Maybe [ServerGroup]
serverGroups) (\s :: UpdateApp
s@UpdateApp' {} Maybe [ServerGroup]
a -> UpdateApp
s {$sel:serverGroups:UpdateApp' :: Maybe [ServerGroup]
serverGroups = Maybe [ServerGroup]
a} :: UpdateApp) 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 tags to associate with the application.
updateApp_tags :: Lens.Lens' UpdateApp (Prelude.Maybe [Tag])
updateApp_tags :: Lens' UpdateApp (Maybe [Tag])
updateApp_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApp' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:UpdateApp' :: UpdateApp -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: UpdateApp
s@UpdateApp' {} Maybe [Tag]
a -> UpdateApp
s {$sel:tags:UpdateApp' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: UpdateApp) 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

instance Core.AWSRequest UpdateApp where
  type AWSResponse UpdateApp = UpdateAppResponse
  request :: (Service -> Service) -> UpdateApp -> Request UpdateApp
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 UpdateApp
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateApp)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe AppSummary
-> Maybe [ServerGroup] -> Maybe [Tag] -> Int -> UpdateAppResponse
UpdateAppResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"appSummary")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"serverGroups" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => 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 UpdateApp where
  hashWithSalt :: Int -> UpdateApp -> Int
hashWithSalt Int
_salt UpdateApp' {Maybe [Tag]
Maybe [ServerGroup]
Maybe Text
tags :: Maybe [Tag]
serverGroups :: Maybe [ServerGroup]
roleName :: Maybe Text
name :: Maybe Text
description :: Maybe Text
appId :: Maybe Text
$sel:tags:UpdateApp' :: UpdateApp -> Maybe [Tag]
$sel:serverGroups:UpdateApp' :: UpdateApp -> Maybe [ServerGroup]
$sel:roleName:UpdateApp' :: UpdateApp -> Maybe Text
$sel:name:UpdateApp' :: UpdateApp -> Maybe Text
$sel:description:UpdateApp' :: UpdateApp -> Maybe Text
$sel:appId:UpdateApp' :: UpdateApp -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
appId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ServerGroup]
serverGroups
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags

instance Prelude.NFData UpdateApp where
  rnf :: UpdateApp -> ()
rnf UpdateApp' {Maybe [Tag]
Maybe [ServerGroup]
Maybe Text
tags :: Maybe [Tag]
serverGroups :: Maybe [ServerGroup]
roleName :: Maybe Text
name :: Maybe Text
description :: Maybe Text
appId :: Maybe Text
$sel:tags:UpdateApp' :: UpdateApp -> Maybe [Tag]
$sel:serverGroups:UpdateApp' :: UpdateApp -> Maybe [ServerGroup]
$sel:roleName:UpdateApp' :: UpdateApp -> Maybe Text
$sel:name:UpdateApp' :: UpdateApp -> Maybe Text
$sel:description:UpdateApp' :: UpdateApp -> Maybe Text
$sel:appId:UpdateApp' :: UpdateApp -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
appId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ServerGroup]
serverGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags

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

instance Data.ToJSON UpdateApp where
  toJSON :: UpdateApp -> Value
toJSON UpdateApp' {Maybe [Tag]
Maybe [ServerGroup]
Maybe Text
tags :: Maybe [Tag]
serverGroups :: Maybe [ServerGroup]
roleName :: Maybe Text
name :: Maybe Text
description :: Maybe Text
appId :: Maybe Text
$sel:tags:UpdateApp' :: UpdateApp -> Maybe [Tag]
$sel:serverGroups:UpdateApp' :: UpdateApp -> Maybe [ServerGroup]
$sel:roleName:UpdateApp' :: UpdateApp -> Maybe Text
$sel:name:UpdateApp' :: UpdateApp -> Maybe Text
$sel:description:UpdateApp' :: UpdateApp -> Maybe Text
$sel:appId:UpdateApp' :: UpdateApp -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"appId" 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 Text
appId,
            (Key
"description" 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 Text
description,
            (Key
"name" 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 Text
name,
            (Key
"roleName" 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 Text
roleName,
            (Key
"serverGroups" 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 [ServerGroup]
serverGroups,
            (Key
"tags" 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 [Tag]
tags
          ]
      )

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

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

-- | /See:/ 'newUpdateAppResponse' smart constructor.
data UpdateAppResponse = UpdateAppResponse'
  { -- | A summary description of the application.
    UpdateAppResponse -> Maybe AppSummary
appSummary :: Prelude.Maybe AppSummary,
    -- | The updated server groups in the application.
    UpdateAppResponse -> Maybe [ServerGroup]
serverGroups :: Prelude.Maybe [ServerGroup],
    -- | The tags associated with the application.
    UpdateAppResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The response's http status code.
    UpdateAppResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateAppResponse -> UpdateAppResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAppResponse -> UpdateAppResponse -> Bool
$c/= :: UpdateAppResponse -> UpdateAppResponse -> Bool
== :: UpdateAppResponse -> UpdateAppResponse -> Bool
$c== :: UpdateAppResponse -> UpdateAppResponse -> Bool
Prelude.Eq, ReadPrec [UpdateAppResponse]
ReadPrec UpdateAppResponse
Int -> ReadS UpdateAppResponse
ReadS [UpdateAppResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAppResponse]
$creadListPrec :: ReadPrec [UpdateAppResponse]
readPrec :: ReadPrec UpdateAppResponse
$creadPrec :: ReadPrec UpdateAppResponse
readList :: ReadS [UpdateAppResponse]
$creadList :: ReadS [UpdateAppResponse]
readsPrec :: Int -> ReadS UpdateAppResponse
$creadsPrec :: Int -> ReadS UpdateAppResponse
Prelude.Read, Int -> UpdateAppResponse -> ShowS
[UpdateAppResponse] -> ShowS
UpdateAppResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAppResponse] -> ShowS
$cshowList :: [UpdateAppResponse] -> ShowS
show :: UpdateAppResponse -> String
$cshow :: UpdateAppResponse -> String
showsPrec :: Int -> UpdateAppResponse -> ShowS
$cshowsPrec :: Int -> UpdateAppResponse -> ShowS
Prelude.Show, forall x. Rep UpdateAppResponse x -> UpdateAppResponse
forall x. UpdateAppResponse -> Rep UpdateAppResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateAppResponse x -> UpdateAppResponse
$cfrom :: forall x. UpdateAppResponse -> Rep UpdateAppResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateAppResponse' 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:
--
-- 'appSummary', 'updateAppResponse_appSummary' - A summary description of the application.
--
-- 'serverGroups', 'updateAppResponse_serverGroups' - The updated server groups in the application.
--
-- 'tags', 'updateAppResponse_tags' - The tags associated with the application.
--
-- 'httpStatus', 'updateAppResponse_httpStatus' - The response's http status code.
newUpdateAppResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateAppResponse
newUpdateAppResponse :: Int -> UpdateAppResponse
newUpdateAppResponse Int
pHttpStatus_ =
  UpdateAppResponse'
    { $sel:appSummary:UpdateAppResponse' :: Maybe AppSummary
appSummary = forall a. Maybe a
Prelude.Nothing,
      $sel:serverGroups:UpdateAppResponse' :: Maybe [ServerGroup]
serverGroups = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:UpdateAppResponse' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateAppResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A summary description of the application.
updateAppResponse_appSummary :: Lens.Lens' UpdateAppResponse (Prelude.Maybe AppSummary)
updateAppResponse_appSummary :: Lens' UpdateAppResponse (Maybe AppSummary)
updateAppResponse_appSummary = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAppResponse' {Maybe AppSummary
appSummary :: Maybe AppSummary
$sel:appSummary:UpdateAppResponse' :: UpdateAppResponse -> Maybe AppSummary
appSummary} -> Maybe AppSummary
appSummary) (\s :: UpdateAppResponse
s@UpdateAppResponse' {} Maybe AppSummary
a -> UpdateAppResponse
s {$sel:appSummary:UpdateAppResponse' :: Maybe AppSummary
appSummary = Maybe AppSummary
a} :: UpdateAppResponse)

-- | The updated server groups in the application.
updateAppResponse_serverGroups :: Lens.Lens' UpdateAppResponse (Prelude.Maybe [ServerGroup])
updateAppResponse_serverGroups :: Lens' UpdateAppResponse (Maybe [ServerGroup])
updateAppResponse_serverGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAppResponse' {Maybe [ServerGroup]
serverGroups :: Maybe [ServerGroup]
$sel:serverGroups:UpdateAppResponse' :: UpdateAppResponse -> Maybe [ServerGroup]
serverGroups} -> Maybe [ServerGroup]
serverGroups) (\s :: UpdateAppResponse
s@UpdateAppResponse' {} Maybe [ServerGroup]
a -> UpdateAppResponse
s {$sel:serverGroups:UpdateAppResponse' :: Maybe [ServerGroup]
serverGroups = Maybe [ServerGroup]
a} :: UpdateAppResponse) 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 tags associated with the application.
updateAppResponse_tags :: Lens.Lens' UpdateAppResponse (Prelude.Maybe [Tag])
updateAppResponse_tags :: Lens' UpdateAppResponse (Maybe [Tag])
updateAppResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAppResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:UpdateAppResponse' :: UpdateAppResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: UpdateAppResponse
s@UpdateAppResponse' {} Maybe [Tag]
a -> UpdateAppResponse
s {$sel:tags:UpdateAppResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: UpdateAppResponse) 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 response's http status code.
updateAppResponse_httpStatus :: Lens.Lens' UpdateAppResponse Prelude.Int
updateAppResponse_httpStatus :: Lens' UpdateAppResponse Int
updateAppResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAppResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateAppResponse' :: UpdateAppResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateAppResponse
s@UpdateAppResponse' {} Int
a -> UpdateAppResponse
s {$sel:httpStatus:UpdateAppResponse' :: Int
httpStatus = Int
a} :: UpdateAppResponse)

instance Prelude.NFData UpdateAppResponse where
  rnf :: UpdateAppResponse -> ()
rnf UpdateAppResponse' {Int
Maybe [Tag]
Maybe [ServerGroup]
Maybe AppSummary
httpStatus :: Int
tags :: Maybe [Tag]
serverGroups :: Maybe [ServerGroup]
appSummary :: Maybe AppSummary
$sel:httpStatus:UpdateAppResponse' :: UpdateAppResponse -> Int
$sel:tags:UpdateAppResponse' :: UpdateAppResponse -> Maybe [Tag]
$sel:serverGroups:UpdateAppResponse' :: UpdateAppResponse -> Maybe [ServerGroup]
$sel:appSummary:UpdateAppResponse' :: UpdateAppResponse -> Maybe AppSummary
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AppSummary
appSummary
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ServerGroup]
serverGroups
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus