{-# 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.LicenseManager.GetLicenseManagerReportGenerator
(
GetLicenseManagerReportGenerator (..),
newGetLicenseManagerReportGenerator,
getLicenseManagerReportGenerator_licenseManagerReportGeneratorArn,
GetLicenseManagerReportGeneratorResponse (..),
newGetLicenseManagerReportGeneratorResponse,
getLicenseManagerReportGeneratorResponse_reportGenerator,
getLicenseManagerReportGeneratorResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LicenseManager.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetLicenseManagerReportGenerator = GetLicenseManagerReportGenerator'
{
GetLicenseManagerReportGenerator -> Text
licenseManagerReportGeneratorArn :: Prelude.Text
}
deriving (GetLicenseManagerReportGenerator
-> GetLicenseManagerReportGenerator -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLicenseManagerReportGenerator
-> GetLicenseManagerReportGenerator -> Bool
$c/= :: GetLicenseManagerReportGenerator
-> GetLicenseManagerReportGenerator -> Bool
== :: GetLicenseManagerReportGenerator
-> GetLicenseManagerReportGenerator -> Bool
$c== :: GetLicenseManagerReportGenerator
-> GetLicenseManagerReportGenerator -> Bool
Prelude.Eq, ReadPrec [GetLicenseManagerReportGenerator]
ReadPrec GetLicenseManagerReportGenerator
Int -> ReadS GetLicenseManagerReportGenerator
ReadS [GetLicenseManagerReportGenerator]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLicenseManagerReportGenerator]
$creadListPrec :: ReadPrec [GetLicenseManagerReportGenerator]
readPrec :: ReadPrec GetLicenseManagerReportGenerator
$creadPrec :: ReadPrec GetLicenseManagerReportGenerator
readList :: ReadS [GetLicenseManagerReportGenerator]
$creadList :: ReadS [GetLicenseManagerReportGenerator]
readsPrec :: Int -> ReadS GetLicenseManagerReportGenerator
$creadsPrec :: Int -> ReadS GetLicenseManagerReportGenerator
Prelude.Read, Int -> GetLicenseManagerReportGenerator -> ShowS
[GetLicenseManagerReportGenerator] -> ShowS
GetLicenseManagerReportGenerator -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLicenseManagerReportGenerator] -> ShowS
$cshowList :: [GetLicenseManagerReportGenerator] -> ShowS
show :: GetLicenseManagerReportGenerator -> String
$cshow :: GetLicenseManagerReportGenerator -> String
showsPrec :: Int -> GetLicenseManagerReportGenerator -> ShowS
$cshowsPrec :: Int -> GetLicenseManagerReportGenerator -> ShowS
Prelude.Show, forall x.
Rep GetLicenseManagerReportGenerator x
-> GetLicenseManagerReportGenerator
forall x.
GetLicenseManagerReportGenerator
-> Rep GetLicenseManagerReportGenerator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetLicenseManagerReportGenerator x
-> GetLicenseManagerReportGenerator
$cfrom :: forall x.
GetLicenseManagerReportGenerator
-> Rep GetLicenseManagerReportGenerator x
Prelude.Generic)
newGetLicenseManagerReportGenerator ::
Prelude.Text ->
GetLicenseManagerReportGenerator
newGetLicenseManagerReportGenerator :: Text -> GetLicenseManagerReportGenerator
newGetLicenseManagerReportGenerator
Text
pLicenseManagerReportGeneratorArn_ =
GetLicenseManagerReportGenerator'
{ $sel:licenseManagerReportGeneratorArn:GetLicenseManagerReportGenerator' :: Text
licenseManagerReportGeneratorArn =
Text
pLicenseManagerReportGeneratorArn_
}
getLicenseManagerReportGenerator_licenseManagerReportGeneratorArn :: Lens.Lens' GetLicenseManagerReportGenerator Prelude.Text
getLicenseManagerReportGenerator_licenseManagerReportGeneratorArn :: Lens' GetLicenseManagerReportGenerator Text
getLicenseManagerReportGenerator_licenseManagerReportGeneratorArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLicenseManagerReportGenerator' {Text
licenseManagerReportGeneratorArn :: Text
$sel:licenseManagerReportGeneratorArn:GetLicenseManagerReportGenerator' :: GetLicenseManagerReportGenerator -> Text
licenseManagerReportGeneratorArn} -> Text
licenseManagerReportGeneratorArn) (\s :: GetLicenseManagerReportGenerator
s@GetLicenseManagerReportGenerator' {} Text
a -> GetLicenseManagerReportGenerator
s {$sel:licenseManagerReportGeneratorArn:GetLicenseManagerReportGenerator' :: Text
licenseManagerReportGeneratorArn = Text
a} :: GetLicenseManagerReportGenerator)
instance
Core.AWSRequest
GetLicenseManagerReportGenerator
where
type
AWSResponse GetLicenseManagerReportGenerator =
GetLicenseManagerReportGeneratorResponse
request :: (Service -> Service)
-> GetLicenseManagerReportGenerator
-> Request GetLicenseManagerReportGenerator
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 GetLicenseManagerReportGenerator
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetLicenseManagerReportGenerator)))
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 ReportGenerator
-> Int -> GetLicenseManagerReportGeneratorResponse
GetLicenseManagerReportGeneratorResponse'
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
"ReportGenerator")
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
GetLicenseManagerReportGenerator
where
hashWithSalt :: Int -> GetLicenseManagerReportGenerator -> Int
hashWithSalt
Int
_salt
GetLicenseManagerReportGenerator' {Text
licenseManagerReportGeneratorArn :: Text
$sel:licenseManagerReportGeneratorArn:GetLicenseManagerReportGenerator' :: GetLicenseManagerReportGenerator -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
licenseManagerReportGeneratorArn
instance
Prelude.NFData
GetLicenseManagerReportGenerator
where
rnf :: GetLicenseManagerReportGenerator -> ()
rnf GetLicenseManagerReportGenerator' {Text
licenseManagerReportGeneratorArn :: Text
$sel:licenseManagerReportGeneratorArn:GetLicenseManagerReportGenerator' :: GetLicenseManagerReportGenerator -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
licenseManagerReportGeneratorArn
instance
Data.ToHeaders
GetLicenseManagerReportGenerator
where
toHeaders :: GetLicenseManagerReportGenerator -> 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
"AWSLicenseManager.GetLicenseManagerReportGenerator" ::
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 GetLicenseManagerReportGenerator where
toJSON :: GetLicenseManagerReportGenerator -> Value
toJSON GetLicenseManagerReportGenerator' {Text
licenseManagerReportGeneratorArn :: Text
$sel:licenseManagerReportGeneratorArn:GetLicenseManagerReportGenerator' :: GetLicenseManagerReportGenerator -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"LicenseManagerReportGeneratorArn"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
licenseManagerReportGeneratorArn
)
]
)
instance Data.ToPath GetLicenseManagerReportGenerator where
toPath :: GetLicenseManagerReportGenerator -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
GetLicenseManagerReportGenerator
where
toQuery :: GetLicenseManagerReportGenerator -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetLicenseManagerReportGeneratorResponse = GetLicenseManagerReportGeneratorResponse'
{
GetLicenseManagerReportGeneratorResponse -> Maybe ReportGenerator
reportGenerator :: Prelude.Maybe ReportGenerator,
GetLicenseManagerReportGeneratorResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetLicenseManagerReportGeneratorResponse
-> GetLicenseManagerReportGeneratorResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetLicenseManagerReportGeneratorResponse
-> GetLicenseManagerReportGeneratorResponse -> Bool
$c/= :: GetLicenseManagerReportGeneratorResponse
-> GetLicenseManagerReportGeneratorResponse -> Bool
== :: GetLicenseManagerReportGeneratorResponse
-> GetLicenseManagerReportGeneratorResponse -> Bool
$c== :: GetLicenseManagerReportGeneratorResponse
-> GetLicenseManagerReportGeneratorResponse -> Bool
Prelude.Eq, ReadPrec [GetLicenseManagerReportGeneratorResponse]
ReadPrec GetLicenseManagerReportGeneratorResponse
Int -> ReadS GetLicenseManagerReportGeneratorResponse
ReadS [GetLicenseManagerReportGeneratorResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetLicenseManagerReportGeneratorResponse]
$creadListPrec :: ReadPrec [GetLicenseManagerReportGeneratorResponse]
readPrec :: ReadPrec GetLicenseManagerReportGeneratorResponse
$creadPrec :: ReadPrec GetLicenseManagerReportGeneratorResponse
readList :: ReadS [GetLicenseManagerReportGeneratorResponse]
$creadList :: ReadS [GetLicenseManagerReportGeneratorResponse]
readsPrec :: Int -> ReadS GetLicenseManagerReportGeneratorResponse
$creadsPrec :: Int -> ReadS GetLicenseManagerReportGeneratorResponse
Prelude.Read, Int -> GetLicenseManagerReportGeneratorResponse -> ShowS
[GetLicenseManagerReportGeneratorResponse] -> ShowS
GetLicenseManagerReportGeneratorResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetLicenseManagerReportGeneratorResponse] -> ShowS
$cshowList :: [GetLicenseManagerReportGeneratorResponse] -> ShowS
show :: GetLicenseManagerReportGeneratorResponse -> String
$cshow :: GetLicenseManagerReportGeneratorResponse -> String
showsPrec :: Int -> GetLicenseManagerReportGeneratorResponse -> ShowS
$cshowsPrec :: Int -> GetLicenseManagerReportGeneratorResponse -> ShowS
Prelude.Show, forall x.
Rep GetLicenseManagerReportGeneratorResponse x
-> GetLicenseManagerReportGeneratorResponse
forall x.
GetLicenseManagerReportGeneratorResponse
-> Rep GetLicenseManagerReportGeneratorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetLicenseManagerReportGeneratorResponse x
-> GetLicenseManagerReportGeneratorResponse
$cfrom :: forall x.
GetLicenseManagerReportGeneratorResponse
-> Rep GetLicenseManagerReportGeneratorResponse x
Prelude.Generic)
newGetLicenseManagerReportGeneratorResponse ::
Prelude.Int ->
GetLicenseManagerReportGeneratorResponse
newGetLicenseManagerReportGeneratorResponse :: Int -> GetLicenseManagerReportGeneratorResponse
newGetLicenseManagerReportGeneratorResponse
Int
pHttpStatus_ =
GetLicenseManagerReportGeneratorResponse'
{ $sel:reportGenerator:GetLicenseManagerReportGeneratorResponse' :: Maybe ReportGenerator
reportGenerator =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetLicenseManagerReportGeneratorResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getLicenseManagerReportGeneratorResponse_reportGenerator :: Lens.Lens' GetLicenseManagerReportGeneratorResponse (Prelude.Maybe ReportGenerator)
getLicenseManagerReportGeneratorResponse_reportGenerator :: Lens'
GetLicenseManagerReportGeneratorResponse (Maybe ReportGenerator)
getLicenseManagerReportGeneratorResponse_reportGenerator = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLicenseManagerReportGeneratorResponse' {Maybe ReportGenerator
reportGenerator :: Maybe ReportGenerator
$sel:reportGenerator:GetLicenseManagerReportGeneratorResponse' :: GetLicenseManagerReportGeneratorResponse -> Maybe ReportGenerator
reportGenerator} -> Maybe ReportGenerator
reportGenerator) (\s :: GetLicenseManagerReportGeneratorResponse
s@GetLicenseManagerReportGeneratorResponse' {} Maybe ReportGenerator
a -> GetLicenseManagerReportGeneratorResponse
s {$sel:reportGenerator:GetLicenseManagerReportGeneratorResponse' :: Maybe ReportGenerator
reportGenerator = Maybe ReportGenerator
a} :: GetLicenseManagerReportGeneratorResponse)
getLicenseManagerReportGeneratorResponse_httpStatus :: Lens.Lens' GetLicenseManagerReportGeneratorResponse Prelude.Int
getLicenseManagerReportGeneratorResponse_httpStatus :: Lens' GetLicenseManagerReportGeneratorResponse Int
getLicenseManagerReportGeneratorResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetLicenseManagerReportGeneratorResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetLicenseManagerReportGeneratorResponse' :: GetLicenseManagerReportGeneratorResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetLicenseManagerReportGeneratorResponse
s@GetLicenseManagerReportGeneratorResponse' {} Int
a -> GetLicenseManagerReportGeneratorResponse
s {$sel:httpStatus:GetLicenseManagerReportGeneratorResponse' :: Int
httpStatus = Int
a} :: GetLicenseManagerReportGeneratorResponse)
instance
Prelude.NFData
GetLicenseManagerReportGeneratorResponse
where
rnf :: GetLicenseManagerReportGeneratorResponse -> ()
rnf GetLicenseManagerReportGeneratorResponse' {Int
Maybe ReportGenerator
httpStatus :: Int
reportGenerator :: Maybe ReportGenerator
$sel:httpStatus:GetLicenseManagerReportGeneratorResponse' :: GetLicenseManagerReportGeneratorResponse -> Int
$sel:reportGenerator:GetLicenseManagerReportGeneratorResponse' :: GetLicenseManagerReportGeneratorResponse -> Maybe ReportGenerator
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ReportGenerator
reportGenerator
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus