{-# 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.WellArchitected.UpdateLensReview
(
UpdateLensReview (..),
newUpdateLensReview,
updateLensReview_lensNotes,
updateLensReview_pillarNotes,
updateLensReview_workloadId,
updateLensReview_lensAlias,
UpdateLensReviewResponse (..),
newUpdateLensReviewResponse,
updateLensReviewResponse_lensReview,
updateLensReviewResponse_workloadId,
updateLensReviewResponse_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.WellArchitected.Types
data UpdateLensReview = UpdateLensReview'
{ UpdateLensReview -> Maybe Text
lensNotes :: Prelude.Maybe Prelude.Text,
UpdateLensReview -> Maybe (HashMap Text Text)
pillarNotes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
UpdateLensReview -> Text
workloadId :: Prelude.Text,
UpdateLensReview -> Text
lensAlias :: Prelude.Text
}
deriving (UpdateLensReview -> UpdateLensReview -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLensReview -> UpdateLensReview -> Bool
$c/= :: UpdateLensReview -> UpdateLensReview -> Bool
== :: UpdateLensReview -> UpdateLensReview -> Bool
$c== :: UpdateLensReview -> UpdateLensReview -> Bool
Prelude.Eq, ReadPrec [UpdateLensReview]
ReadPrec UpdateLensReview
Int -> ReadS UpdateLensReview
ReadS [UpdateLensReview]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLensReview]
$creadListPrec :: ReadPrec [UpdateLensReview]
readPrec :: ReadPrec UpdateLensReview
$creadPrec :: ReadPrec UpdateLensReview
readList :: ReadS [UpdateLensReview]
$creadList :: ReadS [UpdateLensReview]
readsPrec :: Int -> ReadS UpdateLensReview
$creadsPrec :: Int -> ReadS UpdateLensReview
Prelude.Read, Int -> UpdateLensReview -> ShowS
[UpdateLensReview] -> ShowS
UpdateLensReview -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLensReview] -> ShowS
$cshowList :: [UpdateLensReview] -> ShowS
show :: UpdateLensReview -> String
$cshow :: UpdateLensReview -> String
showsPrec :: Int -> UpdateLensReview -> ShowS
$cshowsPrec :: Int -> UpdateLensReview -> ShowS
Prelude.Show, forall x. Rep UpdateLensReview x -> UpdateLensReview
forall x. UpdateLensReview -> Rep UpdateLensReview x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateLensReview x -> UpdateLensReview
$cfrom :: forall x. UpdateLensReview -> Rep UpdateLensReview x
Prelude.Generic)
newUpdateLensReview ::
Prelude.Text ->
Prelude.Text ->
UpdateLensReview
newUpdateLensReview :: Text -> Text -> UpdateLensReview
newUpdateLensReview Text
pWorkloadId_ Text
pLensAlias_ =
UpdateLensReview'
{ $sel:lensNotes:UpdateLensReview' :: Maybe Text
lensNotes = forall a. Maybe a
Prelude.Nothing,
$sel:pillarNotes:UpdateLensReview' :: Maybe (HashMap Text Text)
pillarNotes = forall a. Maybe a
Prelude.Nothing,
$sel:workloadId:UpdateLensReview' :: Text
workloadId = Text
pWorkloadId_,
$sel:lensAlias:UpdateLensReview' :: Text
lensAlias = Text
pLensAlias_
}
updateLensReview_lensNotes :: Lens.Lens' UpdateLensReview (Prelude.Maybe Prelude.Text)
updateLensReview_lensNotes :: Lens' UpdateLensReview (Maybe Text)
updateLensReview_lensNotes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLensReview' {Maybe Text
lensNotes :: Maybe Text
$sel:lensNotes:UpdateLensReview' :: UpdateLensReview -> Maybe Text
lensNotes} -> Maybe Text
lensNotes) (\s :: UpdateLensReview
s@UpdateLensReview' {} Maybe Text
a -> UpdateLensReview
s {$sel:lensNotes:UpdateLensReview' :: Maybe Text
lensNotes = Maybe Text
a} :: UpdateLensReview)
updateLensReview_pillarNotes :: Lens.Lens' UpdateLensReview (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateLensReview_pillarNotes :: Lens' UpdateLensReview (Maybe (HashMap Text Text))
updateLensReview_pillarNotes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLensReview' {Maybe (HashMap Text Text)
pillarNotes :: Maybe (HashMap Text Text)
$sel:pillarNotes:UpdateLensReview' :: UpdateLensReview -> Maybe (HashMap Text Text)
pillarNotes} -> Maybe (HashMap Text Text)
pillarNotes) (\s :: UpdateLensReview
s@UpdateLensReview' {} Maybe (HashMap Text Text)
a -> UpdateLensReview
s {$sel:pillarNotes:UpdateLensReview' :: Maybe (HashMap Text Text)
pillarNotes = Maybe (HashMap Text Text)
a} :: UpdateLensReview) 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
updateLensReview_workloadId :: Lens.Lens' UpdateLensReview Prelude.Text
updateLensReview_workloadId :: Lens' UpdateLensReview Text
updateLensReview_workloadId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLensReview' {Text
workloadId :: Text
$sel:workloadId:UpdateLensReview' :: UpdateLensReview -> Text
workloadId} -> Text
workloadId) (\s :: UpdateLensReview
s@UpdateLensReview' {} Text
a -> UpdateLensReview
s {$sel:workloadId:UpdateLensReview' :: Text
workloadId = Text
a} :: UpdateLensReview)
updateLensReview_lensAlias :: Lens.Lens' UpdateLensReview Prelude.Text
updateLensReview_lensAlias :: Lens' UpdateLensReview Text
updateLensReview_lensAlias = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLensReview' {Text
lensAlias :: Text
$sel:lensAlias:UpdateLensReview' :: UpdateLensReview -> Text
lensAlias} -> Text
lensAlias) (\s :: UpdateLensReview
s@UpdateLensReview' {} Text
a -> UpdateLensReview
s {$sel:lensAlias:UpdateLensReview' :: Text
lensAlias = Text
a} :: UpdateLensReview)
instance Core.AWSRequest UpdateLensReview where
type
AWSResponse UpdateLensReview =
UpdateLensReviewResponse
request :: (Service -> Service)
-> UpdateLensReview -> Request UpdateLensReview
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateLensReview
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateLensReview)))
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 LensReview -> Maybe Text -> Int -> UpdateLensReviewResponse
UpdateLensReviewResponse'
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
"LensReview")
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
"WorkloadId")
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 UpdateLensReview where
hashWithSalt :: Int -> UpdateLensReview -> Int
hashWithSalt Int
_salt UpdateLensReview' {Maybe Text
Maybe (HashMap Text Text)
Text
lensAlias :: Text
workloadId :: Text
pillarNotes :: Maybe (HashMap Text Text)
lensNotes :: Maybe Text
$sel:lensAlias:UpdateLensReview' :: UpdateLensReview -> Text
$sel:workloadId:UpdateLensReview' :: UpdateLensReview -> Text
$sel:pillarNotes:UpdateLensReview' :: UpdateLensReview -> Maybe (HashMap Text Text)
$sel:lensNotes:UpdateLensReview' :: UpdateLensReview -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lensNotes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
pillarNotes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
workloadId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
lensAlias
instance Prelude.NFData UpdateLensReview where
rnf :: UpdateLensReview -> ()
rnf UpdateLensReview' {Maybe Text
Maybe (HashMap Text Text)
Text
lensAlias :: Text
workloadId :: Text
pillarNotes :: Maybe (HashMap Text Text)
lensNotes :: Maybe Text
$sel:lensAlias:UpdateLensReview' :: UpdateLensReview -> Text
$sel:workloadId:UpdateLensReview' :: UpdateLensReview -> Text
$sel:pillarNotes:UpdateLensReview' :: UpdateLensReview -> Maybe (HashMap Text Text)
$sel:lensNotes:UpdateLensReview' :: UpdateLensReview -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lensNotes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
pillarNotes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
workloadId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
lensAlias
instance Data.ToHeaders UpdateLensReview where
toHeaders :: UpdateLensReview -> 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 UpdateLensReview where
toJSON :: UpdateLensReview -> Value
toJSON UpdateLensReview' {Maybe Text
Maybe (HashMap Text Text)
Text
lensAlias :: Text
workloadId :: Text
pillarNotes :: Maybe (HashMap Text Text)
lensNotes :: Maybe Text
$sel:lensAlias:UpdateLensReview' :: UpdateLensReview -> Text
$sel:workloadId:UpdateLensReview' :: UpdateLensReview -> Text
$sel:pillarNotes:UpdateLensReview' :: UpdateLensReview -> Maybe (HashMap Text Text)
$sel:lensNotes:UpdateLensReview' :: UpdateLensReview -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"LensNotes" 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
lensNotes,
(Key
"PillarNotes" 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 (HashMap Text Text)
pillarNotes
]
)
instance Data.ToPath UpdateLensReview where
toPath :: UpdateLensReview -> ByteString
toPath UpdateLensReview' {Maybe Text
Maybe (HashMap Text Text)
Text
lensAlias :: Text
workloadId :: Text
pillarNotes :: Maybe (HashMap Text Text)
lensNotes :: Maybe Text
$sel:lensAlias:UpdateLensReview' :: UpdateLensReview -> Text
$sel:workloadId:UpdateLensReview' :: UpdateLensReview -> Text
$sel:pillarNotes:UpdateLensReview' :: UpdateLensReview -> Maybe (HashMap Text Text)
$sel:lensNotes:UpdateLensReview' :: UpdateLensReview -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/workloads/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
workloadId,
ByteString
"/lensReviews/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
lensAlias
]
instance Data.ToQuery UpdateLensReview where
toQuery :: UpdateLensReview -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateLensReviewResponse = UpdateLensReviewResponse'
{ UpdateLensReviewResponse -> Maybe LensReview
lensReview :: Prelude.Maybe LensReview,
UpdateLensReviewResponse -> Maybe Text
workloadId :: Prelude.Maybe Prelude.Text,
UpdateLensReviewResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateLensReviewResponse -> UpdateLensReviewResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLensReviewResponse -> UpdateLensReviewResponse -> Bool
$c/= :: UpdateLensReviewResponse -> UpdateLensReviewResponse -> Bool
== :: UpdateLensReviewResponse -> UpdateLensReviewResponse -> Bool
$c== :: UpdateLensReviewResponse -> UpdateLensReviewResponse -> Bool
Prelude.Eq, ReadPrec [UpdateLensReviewResponse]
ReadPrec UpdateLensReviewResponse
Int -> ReadS UpdateLensReviewResponse
ReadS [UpdateLensReviewResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLensReviewResponse]
$creadListPrec :: ReadPrec [UpdateLensReviewResponse]
readPrec :: ReadPrec UpdateLensReviewResponse
$creadPrec :: ReadPrec UpdateLensReviewResponse
readList :: ReadS [UpdateLensReviewResponse]
$creadList :: ReadS [UpdateLensReviewResponse]
readsPrec :: Int -> ReadS UpdateLensReviewResponse
$creadsPrec :: Int -> ReadS UpdateLensReviewResponse
Prelude.Read, Int -> UpdateLensReviewResponse -> ShowS
[UpdateLensReviewResponse] -> ShowS
UpdateLensReviewResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLensReviewResponse] -> ShowS
$cshowList :: [UpdateLensReviewResponse] -> ShowS
show :: UpdateLensReviewResponse -> String
$cshow :: UpdateLensReviewResponse -> String
showsPrec :: Int -> UpdateLensReviewResponse -> ShowS
$cshowsPrec :: Int -> UpdateLensReviewResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateLensReviewResponse x -> UpdateLensReviewResponse
forall x.
UpdateLensReviewResponse -> Rep UpdateLensReviewResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateLensReviewResponse x -> UpdateLensReviewResponse
$cfrom :: forall x.
UpdateLensReviewResponse -> Rep UpdateLensReviewResponse x
Prelude.Generic)
newUpdateLensReviewResponse ::
Prelude.Int ->
UpdateLensReviewResponse
newUpdateLensReviewResponse :: Int -> UpdateLensReviewResponse
newUpdateLensReviewResponse Int
pHttpStatus_ =
UpdateLensReviewResponse'
{ $sel:lensReview:UpdateLensReviewResponse' :: Maybe LensReview
lensReview =
forall a. Maybe a
Prelude.Nothing,
$sel:workloadId:UpdateLensReviewResponse' :: Maybe Text
workloadId = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateLensReviewResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateLensReviewResponse_lensReview :: Lens.Lens' UpdateLensReviewResponse (Prelude.Maybe LensReview)
updateLensReviewResponse_lensReview :: Lens' UpdateLensReviewResponse (Maybe LensReview)
updateLensReviewResponse_lensReview = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLensReviewResponse' {Maybe LensReview
lensReview :: Maybe LensReview
$sel:lensReview:UpdateLensReviewResponse' :: UpdateLensReviewResponse -> Maybe LensReview
lensReview} -> Maybe LensReview
lensReview) (\s :: UpdateLensReviewResponse
s@UpdateLensReviewResponse' {} Maybe LensReview
a -> UpdateLensReviewResponse
s {$sel:lensReview:UpdateLensReviewResponse' :: Maybe LensReview
lensReview = Maybe LensReview
a} :: UpdateLensReviewResponse)
updateLensReviewResponse_workloadId :: Lens.Lens' UpdateLensReviewResponse (Prelude.Maybe Prelude.Text)
updateLensReviewResponse_workloadId :: Lens' UpdateLensReviewResponse (Maybe Text)
updateLensReviewResponse_workloadId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLensReviewResponse' {Maybe Text
workloadId :: Maybe Text
$sel:workloadId:UpdateLensReviewResponse' :: UpdateLensReviewResponse -> Maybe Text
workloadId} -> Maybe Text
workloadId) (\s :: UpdateLensReviewResponse
s@UpdateLensReviewResponse' {} Maybe Text
a -> UpdateLensReviewResponse
s {$sel:workloadId:UpdateLensReviewResponse' :: Maybe Text
workloadId = Maybe Text
a} :: UpdateLensReviewResponse)
updateLensReviewResponse_httpStatus :: Lens.Lens' UpdateLensReviewResponse Prelude.Int
updateLensReviewResponse_httpStatus :: Lens' UpdateLensReviewResponse Int
updateLensReviewResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLensReviewResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateLensReviewResponse' :: UpdateLensReviewResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateLensReviewResponse
s@UpdateLensReviewResponse' {} Int
a -> UpdateLensReviewResponse
s {$sel:httpStatus:UpdateLensReviewResponse' :: Int
httpStatus = Int
a} :: UpdateLensReviewResponse)
instance Prelude.NFData UpdateLensReviewResponse where
rnf :: UpdateLensReviewResponse -> ()
rnf UpdateLensReviewResponse' {Int
Maybe Text
Maybe LensReview
httpStatus :: Int
workloadId :: Maybe Text
lensReview :: Maybe LensReview
$sel:httpStatus:UpdateLensReviewResponse' :: UpdateLensReviewResponse -> Int
$sel:workloadId:UpdateLensReviewResponse' :: UpdateLensReviewResponse -> Maybe Text
$sel:lensReview:UpdateLensReviewResponse' :: UpdateLensReviewResponse -> Maybe LensReview
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe LensReview
lensReview
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
workloadId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus