{-# 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_milestoneNumber,
getLensReviewReportResponse_workloadId,
getLensReviewReportResponse_lensReviewReport,
getLensReviewReportResponse_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.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
(GetLensReviewReport -> GetLensReviewReport -> Bool)
-> (GetLensReviewReport -> GetLensReviewReport -> Bool)
-> Eq GetLensReviewReport
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]
(Int -> ReadS GetLensReviewReport)
-> ReadS [GetLensReviewReport]
-> ReadPrec GetLensReviewReport
-> ReadPrec [GetLensReviewReport]
-> Read 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
(Int -> GetLensReviewReport -> ShowS)
-> (GetLensReviewReport -> String)
-> ([GetLensReviewReport] -> ShowS)
-> Show GetLensReviewReport
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. GetLensReviewReport -> Rep GetLensReviewReport x)
-> (forall x. Rep GetLensReviewReport x -> GetLensReviewReport)
-> Generic GetLensReviewReport
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' :: Maybe Natural -> Text -> Text -> GetLensReviewReport
GetLensReviewReport'
{ $sel:milestoneNumber:GetLensReviewReport' :: Maybe Natural
milestoneNumber =
Maybe Natural
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 :: (Maybe Natural -> f (Maybe Natural))
-> GetLensReviewReport -> f GetLensReviewReport
getLensReviewReport_milestoneNumber = (GetLensReviewReport -> Maybe Natural)
-> (GetLensReviewReport -> Maybe Natural -> GetLensReviewReport)
-> Lens
GetLensReviewReport
GetLensReviewReport
(Maybe Natural)
(Maybe Natural)
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 :: (Text -> f Text) -> GetLensReviewReport -> f GetLensReviewReport
getLensReviewReport_workloadId = (GetLensReviewReport -> Text)
-> (GetLensReviewReport -> Text -> GetLensReviewReport)
-> Lens GetLensReviewReport GetLensReviewReport Text Text
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 :: (Text -> f Text) -> GetLensReviewReport -> f GetLensReviewReport
getLensReviewReport_lensAlias = (GetLensReviewReport -> Text)
-> (GetLensReviewReport -> Text -> GetLensReviewReport)
-> Lens GetLensReviewReport GetLensReviewReport Text Text
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 :: GetLensReviewReport -> Request GetLensReviewReport
request = Service -> GetLensReviewReport -> Request GetLensReviewReport
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetLensReviewReport
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetLensReviewReport)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetLensReviewReport))
-> Logger
-> Service
-> Proxy GetLensReviewReport
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetLensReviewReport)))
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 Natural
-> Maybe Text
-> Maybe LensReviewReport
-> Int
-> GetLensReviewReportResponse
GetLensReviewReportResponse'
(Maybe Natural
-> Maybe Text
-> Maybe LensReviewReport
-> Int
-> GetLensReviewReportResponse)
-> Either String (Maybe Natural)
-> Either
String
(Maybe Text
-> Maybe LensReviewReport -> Int -> GetLensReviewReportResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MilestoneNumber")
Either
String
(Maybe Text
-> Maybe LensReviewReport -> Int -> GetLensReviewReportResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe LensReviewReport -> Int -> GetLensReviewReportResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"WorkloadId")
Either
String
(Maybe LensReviewReport -> Int -> GetLensReviewReportResponse)
-> Either String (Maybe LensReviewReport)
-> Either String (Int -> GetLensReviewReportResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe LensReviewReport)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LensReviewReport")
Either String (Int -> GetLensReviewReportResponse)
-> Either String Int -> Either String GetLensReviewReportResponse
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 GetLensReviewReport
instance Prelude.NFData GetLensReviewReport
instance Core.ToHeaders GetLensReviewReport where
toHeaders :: GetLensReviewReport -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetLensReviewReport -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.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
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/workloads/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
workloadId,
ByteString
"/lensReviews/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
lensAlias,
ByteString
"/report"
]
instance Core.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
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"MilestoneNumber" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
milestoneNumber]
data GetLensReviewReportResponse = GetLensReviewReportResponse'
{ GetLensReviewReportResponse -> Maybe Natural
milestoneNumber :: Prelude.Maybe Prelude.Natural,
GetLensReviewReportResponse -> Maybe Text
workloadId :: Prelude.Maybe Prelude.Text,
GetLensReviewReportResponse -> Maybe LensReviewReport
lensReviewReport :: Prelude.Maybe LensReviewReport,
GetLensReviewReportResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetLensReviewReportResponse -> GetLensReviewReportResponse -> Bool
(GetLensReviewReportResponse
-> GetLensReviewReportResponse -> Bool)
-> (GetLensReviewReportResponse
-> GetLensReviewReportResponse -> Bool)
-> Eq GetLensReviewReportResponse
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]
(Int -> ReadS GetLensReviewReportResponse)
-> ReadS [GetLensReviewReportResponse]
-> ReadPrec GetLensReviewReportResponse
-> ReadPrec [GetLensReviewReportResponse]
-> Read 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
(Int -> GetLensReviewReportResponse -> ShowS)
-> (GetLensReviewReportResponse -> String)
-> ([GetLensReviewReportResponse] -> ShowS)
-> Show GetLensReviewReportResponse
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.
GetLensReviewReportResponse -> Rep GetLensReviewReportResponse x)
-> (forall x.
Rep GetLensReviewReportResponse x -> GetLensReviewReportResponse)
-> Generic GetLensReviewReportResponse
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' :: Maybe Natural
-> Maybe Text
-> Maybe LensReviewReport
-> Int
-> GetLensReviewReportResponse
GetLensReviewReportResponse'
{ $sel:milestoneNumber:GetLensReviewReportResponse' :: Maybe Natural
milestoneNumber =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:workloadId:GetLensReviewReportResponse' :: Maybe Text
workloadId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lensReviewReport:GetLensReviewReportResponse' :: Maybe LensReviewReport
lensReviewReport = Maybe LensReviewReport
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetLensReviewReportResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getLensReviewReportResponse_milestoneNumber :: Lens.Lens' GetLensReviewReportResponse (Prelude.Maybe Prelude.Natural)
getLensReviewReportResponse_milestoneNumber :: (Maybe Natural -> f (Maybe Natural))
-> GetLensReviewReportResponse -> f GetLensReviewReportResponse
getLensReviewReportResponse_milestoneNumber = (GetLensReviewReportResponse -> Maybe Natural)
-> (GetLensReviewReportResponse
-> Maybe Natural -> GetLensReviewReportResponse)
-> Lens
GetLensReviewReportResponse
GetLensReviewReportResponse
(Maybe Natural)
(Maybe Natural)
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 :: (Maybe Text -> f (Maybe Text))
-> GetLensReviewReportResponse -> f GetLensReviewReportResponse
getLensReviewReportResponse_workloadId = (GetLensReviewReportResponse -> Maybe Text)
-> (GetLensReviewReportResponse
-> Maybe Text -> GetLensReviewReportResponse)
-> Lens
GetLensReviewReportResponse
GetLensReviewReportResponse
(Maybe Text)
(Maybe Text)
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_lensReviewReport :: Lens.Lens' GetLensReviewReportResponse (Prelude.Maybe LensReviewReport)
getLensReviewReportResponse_lensReviewReport :: (Maybe LensReviewReport -> f (Maybe LensReviewReport))
-> GetLensReviewReportResponse -> f GetLensReviewReportResponse
getLensReviewReportResponse_lensReviewReport = (GetLensReviewReportResponse -> Maybe LensReviewReport)
-> (GetLensReviewReportResponse
-> Maybe LensReviewReport -> GetLensReviewReportResponse)
-> Lens
GetLensReviewReportResponse
GetLensReviewReportResponse
(Maybe LensReviewReport)
(Maybe 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_httpStatus :: Lens.Lens' GetLensReviewReportResponse Prelude.Int
getLensReviewReportResponse_httpStatus :: (Int -> f Int)
-> GetLensReviewReportResponse -> f GetLensReviewReportResponse
getLensReviewReportResponse_httpStatus = (GetLensReviewReportResponse -> Int)
-> (GetLensReviewReportResponse
-> Int -> GetLensReviewReportResponse)
-> Lens
GetLensReviewReportResponse GetLensReviewReportResponse Int Int
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