{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.LicenseManager.UpdateLicenseManagerReportGenerator
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates a report generator.
--
-- After you make changes to a report generator, it starts generating new
-- reports within 60 minutes of being updated.
module Amazonka.LicenseManager.UpdateLicenseManagerReportGenerator
  ( -- * Creating a Request
    UpdateLicenseManagerReportGenerator (..),
    newUpdateLicenseManagerReportGenerator,

    -- * Request Lenses
    updateLicenseManagerReportGenerator_description,
    updateLicenseManagerReportGenerator_licenseManagerReportGeneratorArn,
    updateLicenseManagerReportGenerator_reportGeneratorName,
    updateLicenseManagerReportGenerator_type,
    updateLicenseManagerReportGenerator_reportContext,
    updateLicenseManagerReportGenerator_reportFrequency,
    updateLicenseManagerReportGenerator_clientToken,

    -- * Destructuring the Response
    UpdateLicenseManagerReportGeneratorResponse (..),
    newUpdateLicenseManagerReportGeneratorResponse,

    -- * Response Lenses
    updateLicenseManagerReportGeneratorResponse_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

-- | /See:/ 'newUpdateLicenseManagerReportGenerator' smart constructor.
data UpdateLicenseManagerReportGenerator = UpdateLicenseManagerReportGenerator'
  { -- | Description of the report generator.
    UpdateLicenseManagerReportGenerator -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Amazon Resource Name (ARN) of the report generator to update.
    UpdateLicenseManagerReportGenerator -> Text
licenseManagerReportGeneratorArn :: Prelude.Text,
    -- | Name of the report generator.
    UpdateLicenseManagerReportGenerator -> Text
reportGeneratorName :: Prelude.Text,
    -- | Type of reports to generate. The following report types are supported:
    --
    -- -   License configuration report - Reports the number and details of
    --     consumed licenses for a license configuration.
    --
    -- -   Resource report - Reports the tracked licenses and resource
    --     consumption for a license configuration.
    UpdateLicenseManagerReportGenerator -> [ReportType]
type' :: [ReportType],
    -- | The report context.
    UpdateLicenseManagerReportGenerator -> ReportContext
reportContext :: ReportContext,
    -- | Frequency by which reports are generated.
    UpdateLicenseManagerReportGenerator -> ReportFrequency
reportFrequency :: ReportFrequency,
    -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    UpdateLicenseManagerReportGenerator -> Text
clientToken :: Prelude.Text
  }
  deriving (UpdateLicenseManagerReportGenerator
-> UpdateLicenseManagerReportGenerator -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLicenseManagerReportGenerator
-> UpdateLicenseManagerReportGenerator -> Bool
$c/= :: UpdateLicenseManagerReportGenerator
-> UpdateLicenseManagerReportGenerator -> Bool
== :: UpdateLicenseManagerReportGenerator
-> UpdateLicenseManagerReportGenerator -> Bool
$c== :: UpdateLicenseManagerReportGenerator
-> UpdateLicenseManagerReportGenerator -> Bool
Prelude.Eq, ReadPrec [UpdateLicenseManagerReportGenerator]
ReadPrec UpdateLicenseManagerReportGenerator
Int -> ReadS UpdateLicenseManagerReportGenerator
ReadS [UpdateLicenseManagerReportGenerator]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLicenseManagerReportGenerator]
$creadListPrec :: ReadPrec [UpdateLicenseManagerReportGenerator]
readPrec :: ReadPrec UpdateLicenseManagerReportGenerator
$creadPrec :: ReadPrec UpdateLicenseManagerReportGenerator
readList :: ReadS [UpdateLicenseManagerReportGenerator]
$creadList :: ReadS [UpdateLicenseManagerReportGenerator]
readsPrec :: Int -> ReadS UpdateLicenseManagerReportGenerator
$creadsPrec :: Int -> ReadS UpdateLicenseManagerReportGenerator
Prelude.Read, Int -> UpdateLicenseManagerReportGenerator -> ShowS
[UpdateLicenseManagerReportGenerator] -> ShowS
UpdateLicenseManagerReportGenerator -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLicenseManagerReportGenerator] -> ShowS
$cshowList :: [UpdateLicenseManagerReportGenerator] -> ShowS
show :: UpdateLicenseManagerReportGenerator -> String
$cshow :: UpdateLicenseManagerReportGenerator -> String
showsPrec :: Int -> UpdateLicenseManagerReportGenerator -> ShowS
$cshowsPrec :: Int -> UpdateLicenseManagerReportGenerator -> ShowS
Prelude.Show, forall x.
Rep UpdateLicenseManagerReportGenerator x
-> UpdateLicenseManagerReportGenerator
forall x.
UpdateLicenseManagerReportGenerator
-> Rep UpdateLicenseManagerReportGenerator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateLicenseManagerReportGenerator x
-> UpdateLicenseManagerReportGenerator
$cfrom :: forall x.
UpdateLicenseManagerReportGenerator
-> Rep UpdateLicenseManagerReportGenerator x
Prelude.Generic)

-- |
-- Create a value of 'UpdateLicenseManagerReportGenerator' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'description', 'updateLicenseManagerReportGenerator_description' - Description of the report generator.
--
-- 'licenseManagerReportGeneratorArn', 'updateLicenseManagerReportGenerator_licenseManagerReportGeneratorArn' - Amazon Resource Name (ARN) of the report generator to update.
--
-- 'reportGeneratorName', 'updateLicenseManagerReportGenerator_reportGeneratorName' - Name of the report generator.
--
-- 'type'', 'updateLicenseManagerReportGenerator_type' - Type of reports to generate. The following report types are supported:
--
-- -   License configuration report - Reports the number and details of
--     consumed licenses for a license configuration.
--
-- -   Resource report - Reports the tracked licenses and resource
--     consumption for a license configuration.
--
-- 'reportContext', 'updateLicenseManagerReportGenerator_reportContext' - The report context.
--
-- 'reportFrequency', 'updateLicenseManagerReportGenerator_reportFrequency' - Frequency by which reports are generated.
--
-- 'clientToken', 'updateLicenseManagerReportGenerator_clientToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
newUpdateLicenseManagerReportGenerator ::
  -- | 'licenseManagerReportGeneratorArn'
  Prelude.Text ->
  -- | 'reportGeneratorName'
  Prelude.Text ->
  -- | 'reportContext'
  ReportContext ->
  -- | 'reportFrequency'
  ReportFrequency ->
  -- | 'clientToken'
  Prelude.Text ->
  UpdateLicenseManagerReportGenerator
newUpdateLicenseManagerReportGenerator :: Text
-> Text
-> ReportContext
-> ReportFrequency
-> Text
-> UpdateLicenseManagerReportGenerator
newUpdateLicenseManagerReportGenerator
  Text
pLicenseManagerReportGeneratorArn_
  Text
pReportGeneratorName_
  ReportContext
pReportContext_
  ReportFrequency
pReportFrequency_
  Text
pClientToken_ =
    UpdateLicenseManagerReportGenerator'
      { $sel:description:UpdateLicenseManagerReportGenerator' :: Maybe Text
description =
          forall a. Maybe a
Prelude.Nothing,
        $sel:licenseManagerReportGeneratorArn:UpdateLicenseManagerReportGenerator' :: Text
licenseManagerReportGeneratorArn =
          Text
pLicenseManagerReportGeneratorArn_,
        $sel:reportGeneratorName:UpdateLicenseManagerReportGenerator' :: Text
reportGeneratorName =
          Text
pReportGeneratorName_,
        $sel:type':UpdateLicenseManagerReportGenerator' :: [ReportType]
type' = forall a. Monoid a => a
Prelude.mempty,
        $sel:reportContext:UpdateLicenseManagerReportGenerator' :: ReportContext
reportContext = ReportContext
pReportContext_,
        $sel:reportFrequency:UpdateLicenseManagerReportGenerator' :: ReportFrequency
reportFrequency = ReportFrequency
pReportFrequency_,
        $sel:clientToken:UpdateLicenseManagerReportGenerator' :: Text
clientToken = Text
pClientToken_
      }

-- | Description of the report generator.
updateLicenseManagerReportGenerator_description :: Lens.Lens' UpdateLicenseManagerReportGenerator (Prelude.Maybe Prelude.Text)
updateLicenseManagerReportGenerator_description :: Lens' UpdateLicenseManagerReportGenerator (Maybe Text)
updateLicenseManagerReportGenerator_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLicenseManagerReportGenerator' {Maybe Text
description :: Maybe Text
$sel:description:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateLicenseManagerReportGenerator
s@UpdateLicenseManagerReportGenerator' {} Maybe Text
a -> UpdateLicenseManagerReportGenerator
s {$sel:description:UpdateLicenseManagerReportGenerator' :: Maybe Text
description = Maybe Text
a} :: UpdateLicenseManagerReportGenerator)

-- | Amazon Resource Name (ARN) of the report generator to update.
updateLicenseManagerReportGenerator_licenseManagerReportGeneratorArn :: Lens.Lens' UpdateLicenseManagerReportGenerator Prelude.Text
updateLicenseManagerReportGenerator_licenseManagerReportGeneratorArn :: Lens' UpdateLicenseManagerReportGenerator Text
updateLicenseManagerReportGenerator_licenseManagerReportGeneratorArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLicenseManagerReportGenerator' {Text
licenseManagerReportGeneratorArn :: Text
$sel:licenseManagerReportGeneratorArn:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Text
licenseManagerReportGeneratorArn} -> Text
licenseManagerReportGeneratorArn) (\s :: UpdateLicenseManagerReportGenerator
s@UpdateLicenseManagerReportGenerator' {} Text
a -> UpdateLicenseManagerReportGenerator
s {$sel:licenseManagerReportGeneratorArn:UpdateLicenseManagerReportGenerator' :: Text
licenseManagerReportGeneratorArn = Text
a} :: UpdateLicenseManagerReportGenerator)

-- | Name of the report generator.
updateLicenseManagerReportGenerator_reportGeneratorName :: Lens.Lens' UpdateLicenseManagerReportGenerator Prelude.Text
updateLicenseManagerReportGenerator_reportGeneratorName :: Lens' UpdateLicenseManagerReportGenerator Text
updateLicenseManagerReportGenerator_reportGeneratorName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLicenseManagerReportGenerator' {Text
reportGeneratorName :: Text
$sel:reportGeneratorName:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Text
reportGeneratorName} -> Text
reportGeneratorName) (\s :: UpdateLicenseManagerReportGenerator
s@UpdateLicenseManagerReportGenerator' {} Text
a -> UpdateLicenseManagerReportGenerator
s {$sel:reportGeneratorName:UpdateLicenseManagerReportGenerator' :: Text
reportGeneratorName = Text
a} :: UpdateLicenseManagerReportGenerator)

-- | Type of reports to generate. The following report types are supported:
--
-- -   License configuration report - Reports the number and details of
--     consumed licenses for a license configuration.
--
-- -   Resource report - Reports the tracked licenses and resource
--     consumption for a license configuration.
updateLicenseManagerReportGenerator_type :: Lens.Lens' UpdateLicenseManagerReportGenerator [ReportType]
updateLicenseManagerReportGenerator_type :: Lens' UpdateLicenseManagerReportGenerator [ReportType]
updateLicenseManagerReportGenerator_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLicenseManagerReportGenerator' {[ReportType]
type' :: [ReportType]
$sel:type':UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> [ReportType]
type'} -> [ReportType]
type') (\s :: UpdateLicenseManagerReportGenerator
s@UpdateLicenseManagerReportGenerator' {} [ReportType]
a -> UpdateLicenseManagerReportGenerator
s {$sel:type':UpdateLicenseManagerReportGenerator' :: [ReportType]
type' = [ReportType]
a} :: UpdateLicenseManagerReportGenerator) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The report context.
updateLicenseManagerReportGenerator_reportContext :: Lens.Lens' UpdateLicenseManagerReportGenerator ReportContext
updateLicenseManagerReportGenerator_reportContext :: Lens' UpdateLicenseManagerReportGenerator ReportContext
updateLicenseManagerReportGenerator_reportContext = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLicenseManagerReportGenerator' {ReportContext
reportContext :: ReportContext
$sel:reportContext:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> ReportContext
reportContext} -> ReportContext
reportContext) (\s :: UpdateLicenseManagerReportGenerator
s@UpdateLicenseManagerReportGenerator' {} ReportContext
a -> UpdateLicenseManagerReportGenerator
s {$sel:reportContext:UpdateLicenseManagerReportGenerator' :: ReportContext
reportContext = ReportContext
a} :: UpdateLicenseManagerReportGenerator)

-- | Frequency by which reports are generated.
updateLicenseManagerReportGenerator_reportFrequency :: Lens.Lens' UpdateLicenseManagerReportGenerator ReportFrequency
updateLicenseManagerReportGenerator_reportFrequency :: Lens' UpdateLicenseManagerReportGenerator ReportFrequency
updateLicenseManagerReportGenerator_reportFrequency = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLicenseManagerReportGenerator' {ReportFrequency
reportFrequency :: ReportFrequency
$sel:reportFrequency:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> ReportFrequency
reportFrequency} -> ReportFrequency
reportFrequency) (\s :: UpdateLicenseManagerReportGenerator
s@UpdateLicenseManagerReportGenerator' {} ReportFrequency
a -> UpdateLicenseManagerReportGenerator
s {$sel:reportFrequency:UpdateLicenseManagerReportGenerator' :: ReportFrequency
reportFrequency = ReportFrequency
a} :: UpdateLicenseManagerReportGenerator)

-- | Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
updateLicenseManagerReportGenerator_clientToken :: Lens.Lens' UpdateLicenseManagerReportGenerator Prelude.Text
updateLicenseManagerReportGenerator_clientToken :: Lens' UpdateLicenseManagerReportGenerator Text
updateLicenseManagerReportGenerator_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLicenseManagerReportGenerator' {Text
clientToken :: Text
$sel:clientToken:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Text
clientToken} -> Text
clientToken) (\s :: UpdateLicenseManagerReportGenerator
s@UpdateLicenseManagerReportGenerator' {} Text
a -> UpdateLicenseManagerReportGenerator
s {$sel:clientToken:UpdateLicenseManagerReportGenerator' :: Text
clientToken = Text
a} :: UpdateLicenseManagerReportGenerator)

instance
  Core.AWSRequest
    UpdateLicenseManagerReportGenerator
  where
  type
    AWSResponse UpdateLicenseManagerReportGenerator =
      UpdateLicenseManagerReportGeneratorResponse
  request :: (Service -> Service)
-> UpdateLicenseManagerReportGenerator
-> Request UpdateLicenseManagerReportGenerator
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 UpdateLicenseManagerReportGenerator
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateLicenseManagerReportGenerator)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateLicenseManagerReportGeneratorResponse
UpdateLicenseManagerReportGeneratorResponse'
            forall (f :: * -> *) a b. Functor 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
    UpdateLicenseManagerReportGenerator
  where
  hashWithSalt :: Int -> UpdateLicenseManagerReportGenerator -> Int
hashWithSalt
    Int
_salt
    UpdateLicenseManagerReportGenerator' {[ReportType]
Maybe Text
Text
ReportContext
ReportFrequency
clientToken :: Text
reportFrequency :: ReportFrequency
reportContext :: ReportContext
type' :: [ReportType]
reportGeneratorName :: Text
licenseManagerReportGeneratorArn :: Text
description :: Maybe Text
$sel:clientToken:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Text
$sel:reportFrequency:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> ReportFrequency
$sel:reportContext:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> ReportContext
$sel:type':UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> [ReportType]
$sel:reportGeneratorName:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Text
$sel:licenseManagerReportGeneratorArn:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Text
$sel:description:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
licenseManagerReportGeneratorArn
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
reportGeneratorName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [ReportType]
type'
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ReportContext
reportContext
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ReportFrequency
reportFrequency
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clientToken

instance
  Prelude.NFData
    UpdateLicenseManagerReportGenerator
  where
  rnf :: UpdateLicenseManagerReportGenerator -> ()
rnf UpdateLicenseManagerReportGenerator' {[ReportType]
Maybe Text
Text
ReportContext
ReportFrequency
clientToken :: Text
reportFrequency :: ReportFrequency
reportContext :: ReportContext
type' :: [ReportType]
reportGeneratorName :: Text
licenseManagerReportGeneratorArn :: Text
description :: Maybe Text
$sel:clientToken:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Text
$sel:reportFrequency:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> ReportFrequency
$sel:reportContext:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> ReportContext
$sel:type':UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> [ReportType]
$sel:reportGeneratorName:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Text
$sel:licenseManagerReportGeneratorArn:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Text
$sel:description:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
licenseManagerReportGeneratorArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
reportGeneratorName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [ReportType]
type'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ReportContext
reportContext
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ReportFrequency
reportFrequency
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clientToken

instance
  Data.ToHeaders
    UpdateLicenseManagerReportGenerator
  where
  toHeaders :: UpdateLicenseManagerReportGenerator -> 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.UpdateLicenseManagerReportGenerator" ::
                          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
    UpdateLicenseManagerReportGenerator
  where
  toJSON :: UpdateLicenseManagerReportGenerator -> Value
toJSON UpdateLicenseManagerReportGenerator' {[ReportType]
Maybe Text
Text
ReportContext
ReportFrequency
clientToken :: Text
reportFrequency :: ReportFrequency
reportContext :: ReportContext
type' :: [ReportType]
reportGeneratorName :: Text
licenseManagerReportGeneratorArn :: Text
description :: Maybe Text
$sel:clientToken:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Text
$sel:reportFrequency:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> ReportFrequency
$sel:reportContext:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> ReportContext
$sel:type':UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> [ReportType]
$sel:reportGeneratorName:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Text
$sel:licenseManagerReportGeneratorArn:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Text
$sel:description:UpdateLicenseManagerReportGenerator' :: UpdateLicenseManagerReportGenerator -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Description" 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
description,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"LicenseManagerReportGeneratorArn"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
licenseManagerReportGeneratorArn
              ),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"ReportGeneratorName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
reportGeneratorName),
            forall a. a -> Maybe a
Prelude.Just (Key
"Type" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [ReportType]
type'),
            forall a. a -> Maybe a
Prelude.Just (Key
"ReportContext" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ReportContext
reportContext),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"ReportFrequency" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ReportFrequency
reportFrequency),
            forall a. a -> Maybe a
Prelude.Just (Key
"ClientToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
clientToken)
          ]
      )

instance
  Data.ToPath
    UpdateLicenseManagerReportGenerator
  where
  toPath :: UpdateLicenseManagerReportGenerator -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance
  Data.ToQuery
    UpdateLicenseManagerReportGenerator
  where
  toQuery :: UpdateLicenseManagerReportGenerator -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateLicenseManagerReportGeneratorResponse' smart constructor.
data UpdateLicenseManagerReportGeneratorResponse = UpdateLicenseManagerReportGeneratorResponse'
  { -- | The response's http status code.
    UpdateLicenseManagerReportGeneratorResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateLicenseManagerReportGeneratorResponse
-> UpdateLicenseManagerReportGeneratorResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateLicenseManagerReportGeneratorResponse
-> UpdateLicenseManagerReportGeneratorResponse -> Bool
$c/= :: UpdateLicenseManagerReportGeneratorResponse
-> UpdateLicenseManagerReportGeneratorResponse -> Bool
== :: UpdateLicenseManagerReportGeneratorResponse
-> UpdateLicenseManagerReportGeneratorResponse -> Bool
$c== :: UpdateLicenseManagerReportGeneratorResponse
-> UpdateLicenseManagerReportGeneratorResponse -> Bool
Prelude.Eq, ReadPrec [UpdateLicenseManagerReportGeneratorResponse]
ReadPrec UpdateLicenseManagerReportGeneratorResponse
Int -> ReadS UpdateLicenseManagerReportGeneratorResponse
ReadS [UpdateLicenseManagerReportGeneratorResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateLicenseManagerReportGeneratorResponse]
$creadListPrec :: ReadPrec [UpdateLicenseManagerReportGeneratorResponse]
readPrec :: ReadPrec UpdateLicenseManagerReportGeneratorResponse
$creadPrec :: ReadPrec UpdateLicenseManagerReportGeneratorResponse
readList :: ReadS [UpdateLicenseManagerReportGeneratorResponse]
$creadList :: ReadS [UpdateLicenseManagerReportGeneratorResponse]
readsPrec :: Int -> ReadS UpdateLicenseManagerReportGeneratorResponse
$creadsPrec :: Int -> ReadS UpdateLicenseManagerReportGeneratorResponse
Prelude.Read, Int -> UpdateLicenseManagerReportGeneratorResponse -> ShowS
[UpdateLicenseManagerReportGeneratorResponse] -> ShowS
UpdateLicenseManagerReportGeneratorResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateLicenseManagerReportGeneratorResponse] -> ShowS
$cshowList :: [UpdateLicenseManagerReportGeneratorResponse] -> ShowS
show :: UpdateLicenseManagerReportGeneratorResponse -> String
$cshow :: UpdateLicenseManagerReportGeneratorResponse -> String
showsPrec :: Int -> UpdateLicenseManagerReportGeneratorResponse -> ShowS
$cshowsPrec :: Int -> UpdateLicenseManagerReportGeneratorResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateLicenseManagerReportGeneratorResponse x
-> UpdateLicenseManagerReportGeneratorResponse
forall x.
UpdateLicenseManagerReportGeneratorResponse
-> Rep UpdateLicenseManagerReportGeneratorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateLicenseManagerReportGeneratorResponse x
-> UpdateLicenseManagerReportGeneratorResponse
$cfrom :: forall x.
UpdateLicenseManagerReportGeneratorResponse
-> Rep UpdateLicenseManagerReportGeneratorResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateLicenseManagerReportGeneratorResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'updateLicenseManagerReportGeneratorResponse_httpStatus' - The response's http status code.
newUpdateLicenseManagerReportGeneratorResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateLicenseManagerReportGeneratorResponse
newUpdateLicenseManagerReportGeneratorResponse :: Int -> UpdateLicenseManagerReportGeneratorResponse
newUpdateLicenseManagerReportGeneratorResponse
  Int
pHttpStatus_ =
    UpdateLicenseManagerReportGeneratorResponse'
      { $sel:httpStatus:UpdateLicenseManagerReportGeneratorResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | The response's http status code.
updateLicenseManagerReportGeneratorResponse_httpStatus :: Lens.Lens' UpdateLicenseManagerReportGeneratorResponse Prelude.Int
updateLicenseManagerReportGeneratorResponse_httpStatus :: Lens' UpdateLicenseManagerReportGeneratorResponse Int
updateLicenseManagerReportGeneratorResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateLicenseManagerReportGeneratorResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateLicenseManagerReportGeneratorResponse' :: UpdateLicenseManagerReportGeneratorResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateLicenseManagerReportGeneratorResponse
s@UpdateLicenseManagerReportGeneratorResponse' {} Int
a -> UpdateLicenseManagerReportGeneratorResponse
s {$sel:httpStatus:UpdateLicenseManagerReportGeneratorResponse' :: Int
httpStatus = Int
a} :: UpdateLicenseManagerReportGeneratorResponse)

instance
  Prelude.NFData
    UpdateLicenseManagerReportGeneratorResponse
  where
  rnf :: UpdateLicenseManagerReportGeneratorResponse -> ()
rnf UpdateLicenseManagerReportGeneratorResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateLicenseManagerReportGeneratorResponse' :: UpdateLicenseManagerReportGeneratorResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus