{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- 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.Lens as Lens
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
(UpdateLicenseManagerReportGenerator
 -> UpdateLicenseManagerReportGenerator -> Bool)
-> (UpdateLicenseManagerReportGenerator
    -> UpdateLicenseManagerReportGenerator -> Bool)
-> Eq UpdateLicenseManagerReportGenerator
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]
(Int -> ReadS UpdateLicenseManagerReportGenerator)
-> ReadS [UpdateLicenseManagerReportGenerator]
-> ReadPrec UpdateLicenseManagerReportGenerator
-> ReadPrec [UpdateLicenseManagerReportGenerator]
-> Read 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
(Int -> UpdateLicenseManagerReportGenerator -> ShowS)
-> (UpdateLicenseManagerReportGenerator -> String)
-> ([UpdateLicenseManagerReportGenerator] -> ShowS)
-> Show UpdateLicenseManagerReportGenerator
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.
 UpdateLicenseManagerReportGenerator
 -> Rep UpdateLicenseManagerReportGenerator x)
-> (forall x.
    Rep UpdateLicenseManagerReportGenerator x
    -> UpdateLicenseManagerReportGenerator)
-> Generic UpdateLicenseManagerReportGenerator
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' :: Maybe Text
-> Text
-> Text
-> [ReportType]
-> ReportContext
-> ReportFrequency
-> Text
-> UpdateLicenseManagerReportGenerator
UpdateLicenseManagerReportGenerator'
      { $sel:description:UpdateLicenseManagerReportGenerator' :: Maybe Text
description =
          Maybe Text
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' = [ReportType]
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 :: (Maybe Text -> f (Maybe Text))
-> UpdateLicenseManagerReportGenerator
-> f UpdateLicenseManagerReportGenerator
updateLicenseManagerReportGenerator_description = (UpdateLicenseManagerReportGenerator -> Maybe Text)
-> (UpdateLicenseManagerReportGenerator
    -> Maybe Text -> UpdateLicenseManagerReportGenerator)
-> Lens
     UpdateLicenseManagerReportGenerator
     UpdateLicenseManagerReportGenerator
     (Maybe Text)
     (Maybe Text)
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 :: (Text -> f Text)
-> UpdateLicenseManagerReportGenerator
-> f UpdateLicenseManagerReportGenerator
updateLicenseManagerReportGenerator_licenseManagerReportGeneratorArn = (UpdateLicenseManagerReportGenerator -> Text)
-> (UpdateLicenseManagerReportGenerator
    -> Text -> UpdateLicenseManagerReportGenerator)
-> Lens
     UpdateLicenseManagerReportGenerator
     UpdateLicenseManagerReportGenerator
     Text
     Text
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 :: (Text -> f Text)
-> UpdateLicenseManagerReportGenerator
-> f UpdateLicenseManagerReportGenerator
updateLicenseManagerReportGenerator_reportGeneratorName = (UpdateLicenseManagerReportGenerator -> Text)
-> (UpdateLicenseManagerReportGenerator
    -> Text -> UpdateLicenseManagerReportGenerator)
-> Lens
     UpdateLicenseManagerReportGenerator
     UpdateLicenseManagerReportGenerator
     Text
     Text
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 :: ([ReportType] -> f [ReportType])
-> UpdateLicenseManagerReportGenerator
-> f UpdateLicenseManagerReportGenerator
updateLicenseManagerReportGenerator_type = (UpdateLicenseManagerReportGenerator -> [ReportType])
-> (UpdateLicenseManagerReportGenerator
    -> [ReportType] -> UpdateLicenseManagerReportGenerator)
-> Lens
     UpdateLicenseManagerReportGenerator
     UpdateLicenseManagerReportGenerator
     [ReportType]
     [ReportType]
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) (([ReportType] -> f [ReportType])
 -> UpdateLicenseManagerReportGenerator
 -> f UpdateLicenseManagerReportGenerator)
-> (([ReportType] -> f [ReportType])
    -> [ReportType] -> f [ReportType])
-> ([ReportType] -> f [ReportType])
-> UpdateLicenseManagerReportGenerator
-> f UpdateLicenseManagerReportGenerator
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ReportType] -> f [ReportType]) -> [ReportType] -> f [ReportType]
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 :: (ReportContext -> f ReportContext)
-> UpdateLicenseManagerReportGenerator
-> f UpdateLicenseManagerReportGenerator
updateLicenseManagerReportGenerator_reportContext = (UpdateLicenseManagerReportGenerator -> ReportContext)
-> (UpdateLicenseManagerReportGenerator
    -> ReportContext -> UpdateLicenseManagerReportGenerator)
-> Lens
     UpdateLicenseManagerReportGenerator
     UpdateLicenseManagerReportGenerator
     ReportContext
     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 :: (ReportFrequency -> f ReportFrequency)
-> UpdateLicenseManagerReportGenerator
-> f UpdateLicenseManagerReportGenerator
updateLicenseManagerReportGenerator_reportFrequency = (UpdateLicenseManagerReportGenerator -> ReportFrequency)
-> (UpdateLicenseManagerReportGenerator
    -> ReportFrequency -> UpdateLicenseManagerReportGenerator)
-> Lens
     UpdateLicenseManagerReportGenerator
     UpdateLicenseManagerReportGenerator
     ReportFrequency
     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 :: (Text -> f Text)
-> UpdateLicenseManagerReportGenerator
-> f UpdateLicenseManagerReportGenerator
updateLicenseManagerReportGenerator_clientToken = (UpdateLicenseManagerReportGenerator -> Text)
-> (UpdateLicenseManagerReportGenerator
    -> Text -> UpdateLicenseManagerReportGenerator)
-> Lens
     UpdateLicenseManagerReportGenerator
     UpdateLicenseManagerReportGenerator
     Text
     Text
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 :: UpdateLicenseManagerReportGenerator
-> Request UpdateLicenseManagerReportGenerator
request = Service
-> UpdateLicenseManagerReportGenerator
-> Request UpdateLicenseManagerReportGenerator
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateLicenseManagerReportGenerator
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateLicenseManagerReportGenerator)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse UpdateLicenseManagerReportGenerator))
-> Logger
-> Service
-> Proxy UpdateLicenseManagerReportGenerator
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateLicenseManagerReportGenerator)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateLicenseManagerReportGeneratorResponse
UpdateLicenseManagerReportGeneratorResponse'
            (Int -> UpdateLicenseManagerReportGeneratorResponse)
-> Either String Int
-> Either String UpdateLicenseManagerReportGeneratorResponse
forall (f :: * -> *) a b. Functor 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
    UpdateLicenseManagerReportGenerator

instance
  Prelude.NFData
    UpdateLicenseManagerReportGenerator

instance
  Core.ToHeaders
    UpdateLicenseManagerReportGenerator
  where
  toHeaders :: UpdateLicenseManagerReportGenerator -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> UpdateLicenseManagerReportGenerator -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSLicenseManager.UpdateLicenseManagerReportGenerator" ::
                          Prelude.ByteString
                      ),
            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.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
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"LicenseManagerReportGeneratorArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
licenseManagerReportGeneratorArn
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ReportGeneratorName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
reportGeneratorName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Type" Text -> [ReportType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [ReportType]
type'),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ReportContext" Text -> ReportContext -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ReportContext
reportContext),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ReportFrequency" Text -> ReportFrequency -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ReportFrequency
reportFrequency),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ClientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientToken)
          ]
      )

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

instance
  Core.ToQuery
    UpdateLicenseManagerReportGenerator
  where
  toQuery :: UpdateLicenseManagerReportGenerator -> QueryString
toQuery = QueryString -> UpdateLicenseManagerReportGenerator -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(UpdateLicenseManagerReportGeneratorResponse
 -> UpdateLicenseManagerReportGeneratorResponse -> Bool)
-> (UpdateLicenseManagerReportGeneratorResponse
    -> UpdateLicenseManagerReportGeneratorResponse -> Bool)
-> Eq UpdateLicenseManagerReportGeneratorResponse
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]
(Int -> ReadS UpdateLicenseManagerReportGeneratorResponse)
-> ReadS [UpdateLicenseManagerReportGeneratorResponse]
-> ReadPrec UpdateLicenseManagerReportGeneratorResponse
-> ReadPrec [UpdateLicenseManagerReportGeneratorResponse]
-> Read 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
(Int -> UpdateLicenseManagerReportGeneratorResponse -> ShowS)
-> (UpdateLicenseManagerReportGeneratorResponse -> String)
-> ([UpdateLicenseManagerReportGeneratorResponse] -> ShowS)
-> Show UpdateLicenseManagerReportGeneratorResponse
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.
 UpdateLicenseManagerReportGeneratorResponse
 -> Rep UpdateLicenseManagerReportGeneratorResponse x)
-> (forall x.
    Rep UpdateLicenseManagerReportGeneratorResponse x
    -> UpdateLicenseManagerReportGeneratorResponse)
-> Generic UpdateLicenseManagerReportGeneratorResponse
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' :: Int -> UpdateLicenseManagerReportGeneratorResponse
UpdateLicenseManagerReportGeneratorResponse'
      { $sel:httpStatus:UpdateLicenseManagerReportGeneratorResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | The response's http status code.
updateLicenseManagerReportGeneratorResponse_httpStatus :: Lens.Lens' UpdateLicenseManagerReportGeneratorResponse Prelude.Int
updateLicenseManagerReportGeneratorResponse_httpStatus :: (Int -> f Int)
-> UpdateLicenseManagerReportGeneratorResponse
-> f UpdateLicenseManagerReportGeneratorResponse
updateLicenseManagerReportGeneratorResponse_httpStatus = (UpdateLicenseManagerReportGeneratorResponse -> Int)
-> (UpdateLicenseManagerReportGeneratorResponse
    -> Int -> UpdateLicenseManagerReportGeneratorResponse)
-> Lens
     UpdateLicenseManagerReportGeneratorResponse
     UpdateLicenseManagerReportGeneratorResponse
     Int
     Int
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