{-# 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 #-}
module Amazonka.SMS.UpdateApp
(
UpdateApp (..),
newUpdateApp,
updateApp_roleName,
updateApp_appId,
updateApp_name,
updateApp_description,
updateApp_serverGroups,
updateApp_tags,
UpdateAppResponse (..),
newUpdateAppResponse,
updateAppResponse_appSummary,
updateAppResponse_serverGroups,
updateAppResponse_tags,
updateAppResponse_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
data UpdateApp = UpdateApp'
{
UpdateApp -> Maybe Text
roleName :: Prelude.Maybe Prelude.Text,
UpdateApp -> Maybe Text
appId :: Prelude.Maybe Prelude.Text,
UpdateApp -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
UpdateApp -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateApp -> Maybe [ServerGroup]
serverGroups :: Prelude.Maybe [ServerGroup],
UpdateApp -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
}
deriving (UpdateApp -> UpdateApp -> Bool
(UpdateApp -> UpdateApp -> Bool)
-> (UpdateApp -> UpdateApp -> Bool) -> Eq UpdateApp
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]
(Int -> ReadS UpdateApp)
-> ReadS [UpdateApp]
-> ReadPrec UpdateApp
-> ReadPrec [UpdateApp]
-> Read 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
(Int -> UpdateApp -> ShowS)
-> (UpdateApp -> String)
-> ([UpdateApp] -> ShowS)
-> Show UpdateApp
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. UpdateApp -> Rep UpdateApp x)
-> (forall x. Rep UpdateApp x -> UpdateApp) -> Generic UpdateApp
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)
newUpdateApp ::
UpdateApp
newUpdateApp :: UpdateApp
newUpdateApp =
UpdateApp' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ServerGroup]
-> Maybe [Tag]
-> UpdateApp
UpdateApp'
{ $sel:roleName:UpdateApp' :: Maybe Text
roleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:appId:UpdateApp' :: Maybe Text
appId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:UpdateApp' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateApp' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serverGroups:UpdateApp' :: Maybe [ServerGroup]
serverGroups = Maybe [ServerGroup]
forall a. Maybe a
Prelude.Nothing,
$sel:tags:UpdateApp' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
}
updateApp_roleName :: Lens.Lens' UpdateApp (Prelude.Maybe Prelude.Text)
updateApp_roleName :: (Maybe Text -> f (Maybe Text)) -> UpdateApp -> f UpdateApp
updateApp_roleName = (UpdateApp -> Maybe Text)
-> (UpdateApp -> Maybe Text -> UpdateApp)
-> Lens UpdateApp UpdateApp (Maybe Text) (Maybe Text)
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)
updateApp_appId :: Lens.Lens' UpdateApp (Prelude.Maybe Prelude.Text)
updateApp_appId :: (Maybe Text -> f (Maybe Text)) -> UpdateApp -> f UpdateApp
updateApp_appId = (UpdateApp -> Maybe Text)
-> (UpdateApp -> Maybe Text -> UpdateApp)
-> Lens UpdateApp UpdateApp (Maybe Text) (Maybe Text)
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)
updateApp_name :: Lens.Lens' UpdateApp (Prelude.Maybe Prelude.Text)
updateApp_name :: (Maybe Text -> f (Maybe Text)) -> UpdateApp -> f UpdateApp
updateApp_name = (UpdateApp -> Maybe Text)
-> (UpdateApp -> Maybe Text -> UpdateApp)
-> Lens UpdateApp UpdateApp (Maybe Text) (Maybe Text)
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)
updateApp_description :: Lens.Lens' UpdateApp (Prelude.Maybe Prelude.Text)
updateApp_description :: (Maybe Text -> f (Maybe Text)) -> UpdateApp -> f UpdateApp
updateApp_description = (UpdateApp -> Maybe Text)
-> (UpdateApp -> Maybe Text -> UpdateApp)
-> Lens UpdateApp UpdateApp (Maybe Text) (Maybe Text)
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)
updateApp_serverGroups :: Lens.Lens' UpdateApp (Prelude.Maybe [ServerGroup])
updateApp_serverGroups :: (Maybe [ServerGroup] -> f (Maybe [ServerGroup]))
-> UpdateApp -> f UpdateApp
updateApp_serverGroups = (UpdateApp -> Maybe [ServerGroup])
-> (UpdateApp -> Maybe [ServerGroup] -> UpdateApp)
-> Lens
UpdateApp UpdateApp (Maybe [ServerGroup]) (Maybe [ServerGroup])
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) ((Maybe [ServerGroup] -> f (Maybe [ServerGroup]))
-> UpdateApp -> f UpdateApp)
-> ((Maybe [ServerGroup] -> f (Maybe [ServerGroup]))
-> Maybe [ServerGroup] -> f (Maybe [ServerGroup]))
-> (Maybe [ServerGroup] -> f (Maybe [ServerGroup]))
-> UpdateApp
-> f UpdateApp
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ServerGroup] [ServerGroup] [ServerGroup] [ServerGroup]
-> Iso
(Maybe [ServerGroup])
(Maybe [ServerGroup])
(Maybe [ServerGroup])
(Maybe [ServerGroup])
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 [ServerGroup] [ServerGroup] [ServerGroup] [ServerGroup]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateApp_tags :: Lens.Lens' UpdateApp (Prelude.Maybe [Tag])
updateApp_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> UpdateApp -> f UpdateApp
updateApp_tags = (UpdateApp -> Maybe [Tag])
-> (UpdateApp -> Maybe [Tag] -> UpdateApp)
-> Lens UpdateApp UpdateApp (Maybe [Tag]) (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag])) -> UpdateApp -> f UpdateApp)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> UpdateApp
-> f UpdateApp
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
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 :: UpdateApp -> Request UpdateApp
request = Service -> UpdateApp -> Request UpdateApp
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateApp
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateApp)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateApp))
-> Logger
-> Service
-> Proxy UpdateApp
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateApp)))
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 AppSummary
-> Maybe [ServerGroup] -> Maybe [Tag] -> Int -> UpdateAppResponse
UpdateAppResponse'
(Maybe AppSummary
-> Maybe [ServerGroup] -> Maybe [Tag] -> Int -> UpdateAppResponse)
-> Either String (Maybe AppSummary)
-> Either
String
(Maybe [ServerGroup] -> Maybe [Tag] -> Int -> UpdateAppResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe AppSummary)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"appSummary")
Either
String
(Maybe [ServerGroup] -> Maybe [Tag] -> Int -> UpdateAppResponse)
-> Either String (Maybe [ServerGroup])
-> Either String (Maybe [Tag] -> Int -> UpdateAppResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [ServerGroup]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"serverGroups" Either String (Maybe (Maybe [ServerGroup]))
-> Maybe [ServerGroup] -> Either String (Maybe [ServerGroup])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ServerGroup]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe [Tag] -> Int -> UpdateAppResponse)
-> Either String (Maybe [Tag])
-> Either String (Int -> UpdateAppResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe [Tag]))
-> Maybe [Tag] -> Either String (Maybe [Tag])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> UpdateAppResponse)
-> Either String Int -> Either String UpdateAppResponse
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 UpdateApp
instance Prelude.NFData UpdateApp
instance Core.ToHeaders UpdateApp where
toHeaders :: UpdateApp -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateApp -> 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.UpdateApp" ::
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 UpdateApp where
toJSON :: UpdateApp -> Value
toJSON UpdateApp' {Maybe [Tag]
Maybe [ServerGroup]
Maybe Text
tags :: Maybe [Tag]
serverGroups :: Maybe [ServerGroup]
description :: Maybe Text
name :: Maybe Text
appId :: Maybe Text
roleName :: Maybe Text
$sel:tags:UpdateApp' :: UpdateApp -> Maybe [Tag]
$sel:serverGroups:UpdateApp' :: UpdateApp -> Maybe [ServerGroup]
$sel:description:UpdateApp' :: UpdateApp -> Maybe Text
$sel:name:UpdateApp' :: UpdateApp -> Maybe Text
$sel:appId:UpdateApp' :: UpdateApp -> Maybe Text
$sel:roleName:UpdateApp' :: UpdateApp -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"roleName" 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
roleName,
(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,
(Text
"name" 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
name,
(Text
"description" 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
description,
(Text
"serverGroups" Text -> [ServerGroup] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([ServerGroup] -> Pair) -> Maybe [ServerGroup] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ServerGroup]
serverGroups,
(Text
"tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags
]
)
instance Core.ToPath UpdateApp where
toPath :: UpdateApp -> ByteString
toPath = ByteString -> UpdateApp -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateApp where
toQuery :: UpdateApp -> QueryString
toQuery = QueryString -> UpdateApp -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateAppResponse = UpdateAppResponse'
{
UpdateAppResponse -> Maybe AppSummary
appSummary :: Prelude.Maybe AppSummary,
UpdateAppResponse -> Maybe [ServerGroup]
serverGroups :: Prelude.Maybe [ServerGroup],
UpdateAppResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
UpdateAppResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateAppResponse -> UpdateAppResponse -> Bool
(UpdateAppResponse -> UpdateAppResponse -> Bool)
-> (UpdateAppResponse -> UpdateAppResponse -> Bool)
-> Eq UpdateAppResponse
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]
(Int -> ReadS UpdateAppResponse)
-> ReadS [UpdateAppResponse]
-> ReadPrec UpdateAppResponse
-> ReadPrec [UpdateAppResponse]
-> Read 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
(Int -> UpdateAppResponse -> ShowS)
-> (UpdateAppResponse -> String)
-> ([UpdateAppResponse] -> ShowS)
-> Show UpdateAppResponse
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. UpdateAppResponse -> Rep UpdateAppResponse x)
-> (forall x. Rep UpdateAppResponse x -> UpdateAppResponse)
-> Generic UpdateAppResponse
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)
newUpdateAppResponse ::
Prelude.Int ->
UpdateAppResponse
newUpdateAppResponse :: Int -> UpdateAppResponse
newUpdateAppResponse Int
pHttpStatus_ =
UpdateAppResponse' :: Maybe AppSummary
-> Maybe [ServerGroup] -> Maybe [Tag] -> Int -> UpdateAppResponse
UpdateAppResponse'
{ $sel:appSummary:UpdateAppResponse' :: Maybe AppSummary
appSummary = Maybe AppSummary
forall a. Maybe a
Prelude.Nothing,
$sel:serverGroups:UpdateAppResponse' :: Maybe [ServerGroup]
serverGroups = Maybe [ServerGroup]
forall a. Maybe a
Prelude.Nothing,
$sel:tags:UpdateAppResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateAppResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateAppResponse_appSummary :: Lens.Lens' UpdateAppResponse (Prelude.Maybe AppSummary)
updateAppResponse_appSummary :: (Maybe AppSummary -> f (Maybe AppSummary))
-> UpdateAppResponse -> f UpdateAppResponse
updateAppResponse_appSummary = (UpdateAppResponse -> Maybe AppSummary)
-> (UpdateAppResponse -> Maybe AppSummary -> UpdateAppResponse)
-> Lens
UpdateAppResponse
UpdateAppResponse
(Maybe AppSummary)
(Maybe 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)
updateAppResponse_serverGroups :: Lens.Lens' UpdateAppResponse (Prelude.Maybe [ServerGroup])
updateAppResponse_serverGroups :: (Maybe [ServerGroup] -> f (Maybe [ServerGroup]))
-> UpdateAppResponse -> f UpdateAppResponse
updateAppResponse_serverGroups = (UpdateAppResponse -> Maybe [ServerGroup])
-> (UpdateAppResponse -> Maybe [ServerGroup] -> UpdateAppResponse)
-> Lens
UpdateAppResponse
UpdateAppResponse
(Maybe [ServerGroup])
(Maybe [ServerGroup])
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) ((Maybe [ServerGroup] -> f (Maybe [ServerGroup]))
-> UpdateAppResponse -> f UpdateAppResponse)
-> ((Maybe [ServerGroup] -> f (Maybe [ServerGroup]))
-> Maybe [ServerGroup] -> f (Maybe [ServerGroup]))
-> (Maybe [ServerGroup] -> f (Maybe [ServerGroup]))
-> UpdateAppResponse
-> f UpdateAppResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ServerGroup] [ServerGroup] [ServerGroup] [ServerGroup]
-> Iso
(Maybe [ServerGroup])
(Maybe [ServerGroup])
(Maybe [ServerGroup])
(Maybe [ServerGroup])
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 [ServerGroup] [ServerGroup] [ServerGroup] [ServerGroup]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateAppResponse_tags :: Lens.Lens' UpdateAppResponse (Prelude.Maybe [Tag])
updateAppResponse_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> UpdateAppResponse -> f UpdateAppResponse
updateAppResponse_tags = (UpdateAppResponse -> Maybe [Tag])
-> (UpdateAppResponse -> Maybe [Tag] -> UpdateAppResponse)
-> Lens
UpdateAppResponse UpdateAppResponse (Maybe [Tag]) (Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
-> UpdateAppResponse -> f UpdateAppResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> UpdateAppResponse
-> f UpdateAppResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateAppResponse_httpStatus :: Lens.Lens' UpdateAppResponse Prelude.Int
updateAppResponse_httpStatus :: (Int -> f Int) -> UpdateAppResponse -> f UpdateAppResponse
updateAppResponse_httpStatus = (UpdateAppResponse -> Int)
-> (UpdateAppResponse -> Int -> UpdateAppResponse)
-> Lens UpdateAppResponse UpdateAppResponse Int Int
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