{-# 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.GetLensReviewReport
(
GetLensReviewReport (..),
newGetLensReviewReport,
getLensReviewReport_milestoneNumber,
getLensReviewReport_workloadId,
getLensReviewReport_lensAlias,
GetLensReviewReportResponse (..),
newGetLensReviewReportResponse,
getLensReviewReportResponse_lensReviewReport,
getLensReviewReportResponse_milestoneNumber,
getLensReviewReportResponse_workloadId,
getLensReviewReportResponse_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 GetLensReviewReport = GetLensReviewReport'
{ GetLensReviewReport -> Maybe Natural
milestoneNumber :: Prelude.Maybe Prelude.Natural,
GetLensReviewReport -> Text
workloadId :: Prelude.Text,
GetLensReviewReport -> Text
lensAlias :: Prelude.Text
}
deriving (GetLensReviewReport -> GetLensReviewReport -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLensReviewReport -> GetLensReviewReport -> Bool
$c/= :: GetLensReviewReport -> GetLensReviewReport -> Bool
== :: GetLensReviewReport -> GetLensReviewReport -> Bool
$c== :: GetLensReviewReport -> GetLensReviewReport -> Bool
Prelude.Eq, ReadPrec [GetLensReviewReport]
ReadPrec GetLensReviewReport
Int -> ReadS GetLensReviewReport
ReadS [GetLensReviewReport]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLensReviewReport]
$creadListPrec :: ReadPrec [GetLensReviewReport]
readPrec :: ReadPrec GetLensReviewReport
$creadPrec :: ReadPrec GetLensReviewReport
readList :: ReadS [GetLensReviewReport]
$creadList :: ReadS [GetLensReviewReport]
readsPrec :: Int -> ReadS GetLensReviewReport
$creadsPrec :: Int -> ReadS GetLensReviewReport
Prelude.Read, Int -> GetLensReviewReport -> ShowS
[GetLensReviewReport] -> ShowS
GetLensReviewReport -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLensReviewReport] -> ShowS
$cshowList :: [GetLensReviewReport] -> ShowS
show :: GetLensReviewReport -> String
$cshow :: GetLensReviewReport -> String
showsPrec :: Int -> GetLensReviewReport -> ShowS
$cshowsPrec :: Int -> GetLensReviewReport -> ShowS
Prelude.Show, forall x. Rep GetLensReviewReport x -> GetLensReviewReport
forall x. GetLensReviewReport -> Rep GetLensReviewReport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetLensReviewReport x -> GetLensReviewReport
$cfrom :: forall x. GetLensReviewReport -> Rep GetLensReviewReport x
Prelude.Generic)
newGetLensReviewReport ::
Prelude.Text ->
Prelude.Text ->
GetLensReviewReport
newGetLensReviewReport :: Text -> Text -> GetLensReviewReport
newGetLensReviewReport Text
pWorkloadId_ Text
pLensAlias_ =
GetLensReviewReport'
{ $sel:milestoneNumber:GetLensReviewReport' :: Maybe Natural
milestoneNumber =
forall a. Maybe a
Prelude.Nothing,
$sel:workloadId:GetLensReviewReport' :: Text
workloadId = Text
pWorkloadId_,
$sel:lensAlias:GetLensReviewReport' :: Text
lensAlias = Text
pLensAlias_
}
getLensReviewReport_milestoneNumber :: Lens.Lens' GetLensReviewReport (Prelude.Maybe Prelude.Natural)
getLensReviewReport_milestoneNumber :: Lens' GetLensReviewReport (Maybe Natural)
getLensReviewReport_milestoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLensReviewReport' {Maybe Natural
milestoneNumber :: Maybe Natural
$sel:milestoneNumber:GetLensReviewReport' :: GetLensReviewReport -> Maybe Natural
milestoneNumber} -> Maybe Natural
milestoneNumber) (\s :: GetLensReviewReport
s@GetLensReviewReport' {} Maybe Natural
a -> GetLensReviewReport
s {$sel:milestoneNumber:GetLensReviewReport' :: Maybe Natural
milestoneNumber = Maybe Natural
a} :: GetLensReviewReport)
getLensReviewReport_workloadId :: Lens.Lens' GetLensReviewReport Prelude.Text
getLensReviewReport_workloadId :: Lens' GetLensReviewReport Text
getLensReviewReport_workloadId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLensReviewReport' {Text
workloadId :: Text
$sel:workloadId:GetLensReviewReport' :: GetLensReviewReport -> Text
workloadId} -> Text
workloadId) (\s :: GetLensReviewReport
s@GetLensReviewReport' {} Text
a -> GetLensReviewReport
s {$sel:workloadId:GetLensReviewReport' :: Text
workloadId = Text
a} :: GetLensReviewReport)
getLensReviewReport_lensAlias :: Lens.Lens' GetLensReviewReport Prelude.Text
getLensReviewReport_lensAlias :: Lens' GetLensReviewReport Text
getLensReviewReport_lensAlias = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLensReviewReport' {Text
lensAlias :: Text
$sel:lensAlias:GetLensReviewReport' :: GetLensReviewReport -> Text
lensAlias} -> Text
lensAlias) (\s :: GetLensReviewReport
s@GetLensReviewReport' {} Text
a -> GetLensReviewReport
s {$sel:lensAlias:GetLensReviewReport' :: Text
lensAlias = Text
a} :: GetLensReviewReport)
instance Core.AWSRequest GetLensReviewReport where
type
AWSResponse GetLensReviewReport =
GetLensReviewReportResponse
request :: (Service -> Service)
-> GetLensReviewReport -> Request GetLensReviewReport
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetLensReviewReport
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetLensReviewReport)))
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 LensReviewReport
-> Maybe Natural
-> Maybe Text
-> Int
-> GetLensReviewReportResponse
GetLensReviewReportResponse'
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
"LensReviewReport")
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
"MilestoneNumber")
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 GetLensReviewReport where
hashWithSalt :: Int -> GetLensReviewReport -> Int
hashWithSalt Int
_salt GetLensReviewReport' {Maybe Natural
Text
lensAlias :: Text
workloadId :: Text
milestoneNumber :: Maybe Natural
$sel:lensAlias:GetLensReviewReport' :: GetLensReviewReport -> Text
$sel:workloadId:GetLensReviewReport' :: GetLensReviewReport -> Text
$sel:milestoneNumber:GetLensReviewReport' :: GetLensReviewReport -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
milestoneNumber
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 GetLensReviewReport where
rnf :: GetLensReviewReport -> ()
rnf GetLensReviewReport' {Maybe Natural
Text
lensAlias :: Text
workloadId :: Text
milestoneNumber :: Maybe Natural
$sel:lensAlias:GetLensReviewReport' :: GetLensReviewReport -> Text
$sel:workloadId:GetLensReviewReport' :: GetLensReviewReport -> Text
$sel:milestoneNumber:GetLensReviewReport' :: GetLensReviewReport -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
milestoneNumber
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 GetLensReviewReport where
toHeaders :: GetLensReviewReport -> 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.ToPath GetLensReviewReport where
toPath :: GetLensReviewReport -> ByteString
toPath GetLensReviewReport' {Maybe Natural
Text
lensAlias :: Text
workloadId :: Text
milestoneNumber :: Maybe Natural
$sel:lensAlias:GetLensReviewReport' :: GetLensReviewReport -> Text
$sel:workloadId:GetLensReviewReport' :: GetLensReviewReport -> Text
$sel:milestoneNumber:GetLensReviewReport' :: GetLensReviewReport -> Maybe Natural
..} =
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,
ByteString
"/report"
]
instance Data.ToQuery GetLensReviewReport where
toQuery :: GetLensReviewReport -> QueryString
toQuery GetLensReviewReport' {Maybe Natural
Text
lensAlias :: Text
workloadId :: Text
milestoneNumber :: Maybe Natural
$sel:lensAlias:GetLensReviewReport' :: GetLensReviewReport -> Text
$sel:workloadId:GetLensReviewReport' :: GetLensReviewReport -> Text
$sel:milestoneNumber:GetLensReviewReport' :: GetLensReviewReport -> Maybe Natural
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"MilestoneNumber" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
milestoneNumber]
data GetLensReviewReportResponse = GetLensReviewReportResponse'
{ GetLensReviewReportResponse -> Maybe LensReviewReport
lensReviewReport :: Prelude.Maybe LensReviewReport,
GetLensReviewReportResponse -> Maybe Natural
milestoneNumber :: Prelude.Maybe Prelude.Natural,
GetLensReviewReportResponse -> Maybe Text
workloadId :: Prelude.Maybe Prelude.Text,
GetLensReviewReportResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetLensReviewReportResponse -> GetLensReviewReportResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLensReviewReportResponse -> GetLensReviewReportResponse -> Bool
$c/= :: GetLensReviewReportResponse -> GetLensReviewReportResponse -> Bool
== :: GetLensReviewReportResponse -> GetLensReviewReportResponse -> Bool
$c== :: GetLensReviewReportResponse -> GetLensReviewReportResponse -> Bool
Prelude.Eq, ReadPrec [GetLensReviewReportResponse]
ReadPrec GetLensReviewReportResponse
Int -> ReadS GetLensReviewReportResponse
ReadS [GetLensReviewReportResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLensReviewReportResponse]
$creadListPrec :: ReadPrec [GetLensReviewReportResponse]
readPrec :: ReadPrec GetLensReviewReportResponse
$creadPrec :: ReadPrec GetLensReviewReportResponse
readList :: ReadS [GetLensReviewReportResponse]
$creadList :: ReadS [GetLensReviewReportResponse]
readsPrec :: Int -> ReadS GetLensReviewReportResponse
$creadsPrec :: Int -> ReadS GetLensReviewReportResponse
Prelude.Read, Int -> GetLensReviewReportResponse -> ShowS
[GetLensReviewReportResponse] -> ShowS
GetLensReviewReportResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLensReviewReportResponse] -> ShowS
$cshowList :: [GetLensReviewReportResponse] -> ShowS
show :: GetLensReviewReportResponse -> String
$cshow :: GetLensReviewReportResponse -> String
showsPrec :: Int -> GetLensReviewReportResponse -> ShowS
$cshowsPrec :: Int -> GetLensReviewReportResponse -> ShowS
Prelude.Show, forall x.
Rep GetLensReviewReportResponse x -> GetLensReviewReportResponse
forall x.
GetLensReviewReportResponse -> Rep GetLensReviewReportResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetLensReviewReportResponse x -> GetLensReviewReportResponse
$cfrom :: forall x.
GetLensReviewReportResponse -> Rep GetLensReviewReportResponse x
Prelude.Generic)
newGetLensReviewReportResponse ::
Prelude.Int ->
GetLensReviewReportResponse
newGetLensReviewReportResponse :: Int -> GetLensReviewReportResponse
newGetLensReviewReportResponse Int
pHttpStatus_ =
GetLensReviewReportResponse'
{ $sel:lensReviewReport:GetLensReviewReportResponse' :: Maybe LensReviewReport
lensReviewReport =
forall a. Maybe a
Prelude.Nothing,
$sel:milestoneNumber:GetLensReviewReportResponse' :: Maybe Natural
milestoneNumber = forall a. Maybe a
Prelude.Nothing,
$sel:workloadId:GetLensReviewReportResponse' :: Maybe Text
workloadId = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetLensReviewReportResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getLensReviewReportResponse_lensReviewReport :: Lens.Lens' GetLensReviewReportResponse (Prelude.Maybe LensReviewReport)
getLensReviewReportResponse_lensReviewReport :: Lens' GetLensReviewReportResponse (Maybe LensReviewReport)
getLensReviewReportResponse_lensReviewReport = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLensReviewReportResponse' {Maybe LensReviewReport
lensReviewReport :: Maybe LensReviewReport
$sel:lensReviewReport:GetLensReviewReportResponse' :: GetLensReviewReportResponse -> Maybe LensReviewReport
lensReviewReport} -> Maybe LensReviewReport
lensReviewReport) (\s :: GetLensReviewReportResponse
s@GetLensReviewReportResponse' {} Maybe LensReviewReport
a -> GetLensReviewReportResponse
s {$sel:lensReviewReport:GetLensReviewReportResponse' :: Maybe LensReviewReport
lensReviewReport = Maybe LensReviewReport
a} :: GetLensReviewReportResponse)
getLensReviewReportResponse_milestoneNumber :: Lens.Lens' GetLensReviewReportResponse (Prelude.Maybe Prelude.Natural)
getLensReviewReportResponse_milestoneNumber :: Lens' GetLensReviewReportResponse (Maybe Natural)
getLensReviewReportResponse_milestoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLensReviewReportResponse' {Maybe Natural
milestoneNumber :: Maybe Natural
$sel:milestoneNumber:GetLensReviewReportResponse' :: GetLensReviewReportResponse -> Maybe Natural
milestoneNumber} -> Maybe Natural
milestoneNumber) (\s :: GetLensReviewReportResponse
s@GetLensReviewReportResponse' {} Maybe Natural
a -> GetLensReviewReportResponse
s {$sel:milestoneNumber:GetLensReviewReportResponse' :: Maybe Natural
milestoneNumber = Maybe Natural
a} :: GetLensReviewReportResponse)
getLensReviewReportResponse_workloadId :: Lens.Lens' GetLensReviewReportResponse (Prelude.Maybe Prelude.Text)
getLensReviewReportResponse_workloadId :: Lens' GetLensReviewReportResponse (Maybe Text)
getLensReviewReportResponse_workloadId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLensReviewReportResponse' {Maybe Text
workloadId :: Maybe Text
$sel:workloadId:GetLensReviewReportResponse' :: GetLensReviewReportResponse -> Maybe Text
workloadId} -> Maybe Text
workloadId) (\s :: GetLensReviewReportResponse
s@GetLensReviewReportResponse' {} Maybe Text
a -> GetLensReviewReportResponse
s {$sel:workloadId:GetLensReviewReportResponse' :: Maybe Text
workloadId = Maybe Text
a} :: GetLensReviewReportResponse)
getLensReviewReportResponse_httpStatus :: Lens.Lens' GetLensReviewReportResponse Prelude.Int
getLensReviewReportResponse_httpStatus :: Lens' GetLensReviewReportResponse Int
getLensReviewReportResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLensReviewReportResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetLensReviewReportResponse' :: GetLensReviewReportResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetLensReviewReportResponse
s@GetLensReviewReportResponse' {} Int
a -> GetLensReviewReportResponse
s {$sel:httpStatus:GetLensReviewReportResponse' :: Int
httpStatus = Int
a} :: GetLensReviewReportResponse)
instance Prelude.NFData GetLensReviewReportResponse where
rnf :: GetLensReviewReportResponse -> ()
rnf GetLensReviewReportResponse' {Int
Maybe Natural
Maybe Text
Maybe LensReviewReport
httpStatus :: Int
workloadId :: Maybe Text
milestoneNumber :: Maybe Natural
lensReviewReport :: Maybe LensReviewReport
$sel:httpStatus:GetLensReviewReportResponse' :: GetLensReviewReportResponse -> Int
$sel:workloadId:GetLensReviewReportResponse' :: GetLensReviewReportResponse -> Maybe Text
$sel:milestoneNumber:GetLensReviewReportResponse' :: GetLensReviewReportResponse -> Maybe Natural
$sel:lensReviewReport:GetLensReviewReportResponse' :: GetLensReviewReportResponse -> Maybe LensReviewReport
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe LensReviewReport
lensReviewReport
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
milestoneNumber
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