{-# 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.ApplicationCostProfiler.UpdateReportDefinition
-- 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 existing report in AWS Application Cost Profiler.
module Amazonka.ApplicationCostProfiler.UpdateReportDefinition
  ( -- * Creating a Request
    UpdateReportDefinition (..),
    newUpdateReportDefinition,

    -- * Request Lenses
    updateReportDefinition_reportId,
    updateReportDefinition_reportDescription,
    updateReportDefinition_reportFrequency,
    updateReportDefinition_format,
    updateReportDefinition_destinationS3Location,

    -- * Destructuring the Response
    UpdateReportDefinitionResponse (..),
    newUpdateReportDefinitionResponse,

    -- * Response Lenses
    updateReportDefinitionResponse_reportId,
    updateReportDefinitionResponse_httpStatus,
  )
where

import Amazonka.ApplicationCostProfiler.Types
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

-- | /See:/ 'newUpdateReportDefinition' smart constructor.
data UpdateReportDefinition = UpdateReportDefinition'
  { -- | Required. ID of the report to update.
    UpdateReportDefinition -> Text
reportId :: Prelude.Text,
    -- | Required. Description of the report.
    UpdateReportDefinition -> Text
reportDescription :: Prelude.Text,
    -- | Required. The cadence to generate the report.
    UpdateReportDefinition -> ReportFrequency
reportFrequency :: ReportFrequency,
    -- | Required. The format to use for the generated report.
    UpdateReportDefinition -> Format
format :: Format,
    -- | Required. Amazon Simple Storage Service (Amazon S3) location where
    -- Application Cost Profiler uploads the report.
    UpdateReportDefinition -> S3Location
destinationS3Location :: S3Location
  }
  deriving (UpdateReportDefinition -> UpdateReportDefinition -> Bool
(UpdateReportDefinition -> UpdateReportDefinition -> Bool)
-> (UpdateReportDefinition -> UpdateReportDefinition -> Bool)
-> Eq UpdateReportDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateReportDefinition -> UpdateReportDefinition -> Bool
$c/= :: UpdateReportDefinition -> UpdateReportDefinition -> Bool
== :: UpdateReportDefinition -> UpdateReportDefinition -> Bool
$c== :: UpdateReportDefinition -> UpdateReportDefinition -> Bool
Prelude.Eq, ReadPrec [UpdateReportDefinition]
ReadPrec UpdateReportDefinition
Int -> ReadS UpdateReportDefinition
ReadS [UpdateReportDefinition]
(Int -> ReadS UpdateReportDefinition)
-> ReadS [UpdateReportDefinition]
-> ReadPrec UpdateReportDefinition
-> ReadPrec [UpdateReportDefinition]
-> Read UpdateReportDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateReportDefinition]
$creadListPrec :: ReadPrec [UpdateReportDefinition]
readPrec :: ReadPrec UpdateReportDefinition
$creadPrec :: ReadPrec UpdateReportDefinition
readList :: ReadS [UpdateReportDefinition]
$creadList :: ReadS [UpdateReportDefinition]
readsPrec :: Int -> ReadS UpdateReportDefinition
$creadsPrec :: Int -> ReadS UpdateReportDefinition
Prelude.Read, Int -> UpdateReportDefinition -> ShowS
[UpdateReportDefinition] -> ShowS
UpdateReportDefinition -> String
(Int -> UpdateReportDefinition -> ShowS)
-> (UpdateReportDefinition -> String)
-> ([UpdateReportDefinition] -> ShowS)
-> Show UpdateReportDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateReportDefinition] -> ShowS
$cshowList :: [UpdateReportDefinition] -> ShowS
show :: UpdateReportDefinition -> String
$cshow :: UpdateReportDefinition -> String
showsPrec :: Int -> UpdateReportDefinition -> ShowS
$cshowsPrec :: Int -> UpdateReportDefinition -> ShowS
Prelude.Show, (forall x. UpdateReportDefinition -> Rep UpdateReportDefinition x)
-> (forall x.
    Rep UpdateReportDefinition x -> UpdateReportDefinition)
-> Generic UpdateReportDefinition
forall x. Rep UpdateReportDefinition x -> UpdateReportDefinition
forall x. UpdateReportDefinition -> Rep UpdateReportDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateReportDefinition x -> UpdateReportDefinition
$cfrom :: forall x. UpdateReportDefinition -> Rep UpdateReportDefinition x
Prelude.Generic)

-- |
-- Create a value of 'UpdateReportDefinition' 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:
--
-- 'reportId', 'updateReportDefinition_reportId' - Required. ID of the report to update.
--
-- 'reportDescription', 'updateReportDefinition_reportDescription' - Required. Description of the report.
--
-- 'reportFrequency', 'updateReportDefinition_reportFrequency' - Required. The cadence to generate the report.
--
-- 'format', 'updateReportDefinition_format' - Required. The format to use for the generated report.
--
-- 'destinationS3Location', 'updateReportDefinition_destinationS3Location' - Required. Amazon Simple Storage Service (Amazon S3) location where
-- Application Cost Profiler uploads the report.
newUpdateReportDefinition ::
  -- | 'reportId'
  Prelude.Text ->
  -- | 'reportDescription'
  Prelude.Text ->
  -- | 'reportFrequency'
  ReportFrequency ->
  -- | 'format'
  Format ->
  -- | 'destinationS3Location'
  S3Location ->
  UpdateReportDefinition
newUpdateReportDefinition :: Text
-> Text
-> ReportFrequency
-> Format
-> S3Location
-> UpdateReportDefinition
newUpdateReportDefinition
  Text
pReportId_
  Text
pReportDescription_
  ReportFrequency
pReportFrequency_
  Format
pFormat_
  S3Location
pDestinationS3Location_ =
    UpdateReportDefinition' :: Text
-> Text
-> ReportFrequency
-> Format
-> S3Location
-> UpdateReportDefinition
UpdateReportDefinition'
      { $sel:reportId:UpdateReportDefinition' :: Text
reportId = Text
pReportId_,
        $sel:reportDescription:UpdateReportDefinition' :: Text
reportDescription = Text
pReportDescription_,
        $sel:reportFrequency:UpdateReportDefinition' :: ReportFrequency
reportFrequency = ReportFrequency
pReportFrequency_,
        $sel:format:UpdateReportDefinition' :: Format
format = Format
pFormat_,
        $sel:destinationS3Location:UpdateReportDefinition' :: S3Location
destinationS3Location = S3Location
pDestinationS3Location_
      }

-- | Required. ID of the report to update.
updateReportDefinition_reportId :: Lens.Lens' UpdateReportDefinition Prelude.Text
updateReportDefinition_reportId :: (Text -> f Text)
-> UpdateReportDefinition -> f UpdateReportDefinition
updateReportDefinition_reportId = (UpdateReportDefinition -> Text)
-> (UpdateReportDefinition -> Text -> UpdateReportDefinition)
-> Lens UpdateReportDefinition UpdateReportDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReportDefinition' {Text
reportId :: Text
$sel:reportId:UpdateReportDefinition' :: UpdateReportDefinition -> Text
reportId} -> Text
reportId) (\s :: UpdateReportDefinition
s@UpdateReportDefinition' {} Text
a -> UpdateReportDefinition
s {$sel:reportId:UpdateReportDefinition' :: Text
reportId = Text
a} :: UpdateReportDefinition)

-- | Required. Description of the report.
updateReportDefinition_reportDescription :: Lens.Lens' UpdateReportDefinition Prelude.Text
updateReportDefinition_reportDescription :: (Text -> f Text)
-> UpdateReportDefinition -> f UpdateReportDefinition
updateReportDefinition_reportDescription = (UpdateReportDefinition -> Text)
-> (UpdateReportDefinition -> Text -> UpdateReportDefinition)
-> Lens UpdateReportDefinition UpdateReportDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReportDefinition' {Text
reportDescription :: Text
$sel:reportDescription:UpdateReportDefinition' :: UpdateReportDefinition -> Text
reportDescription} -> Text
reportDescription) (\s :: UpdateReportDefinition
s@UpdateReportDefinition' {} Text
a -> UpdateReportDefinition
s {$sel:reportDescription:UpdateReportDefinition' :: Text
reportDescription = Text
a} :: UpdateReportDefinition)

-- | Required. The cadence to generate the report.
updateReportDefinition_reportFrequency :: Lens.Lens' UpdateReportDefinition ReportFrequency
updateReportDefinition_reportFrequency :: (ReportFrequency -> f ReportFrequency)
-> UpdateReportDefinition -> f UpdateReportDefinition
updateReportDefinition_reportFrequency = (UpdateReportDefinition -> ReportFrequency)
-> (UpdateReportDefinition
    -> ReportFrequency -> UpdateReportDefinition)
-> Lens
     UpdateReportDefinition
     UpdateReportDefinition
     ReportFrequency
     ReportFrequency
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReportDefinition' {ReportFrequency
reportFrequency :: ReportFrequency
$sel:reportFrequency:UpdateReportDefinition' :: UpdateReportDefinition -> ReportFrequency
reportFrequency} -> ReportFrequency
reportFrequency) (\s :: UpdateReportDefinition
s@UpdateReportDefinition' {} ReportFrequency
a -> UpdateReportDefinition
s {$sel:reportFrequency:UpdateReportDefinition' :: ReportFrequency
reportFrequency = ReportFrequency
a} :: UpdateReportDefinition)

-- | Required. The format to use for the generated report.
updateReportDefinition_format :: Lens.Lens' UpdateReportDefinition Format
updateReportDefinition_format :: (Format -> f Format)
-> UpdateReportDefinition -> f UpdateReportDefinition
updateReportDefinition_format = (UpdateReportDefinition -> Format)
-> (UpdateReportDefinition -> Format -> UpdateReportDefinition)
-> Lens UpdateReportDefinition UpdateReportDefinition Format Format
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReportDefinition' {Format
format :: Format
$sel:format:UpdateReportDefinition' :: UpdateReportDefinition -> Format
format} -> Format
format) (\s :: UpdateReportDefinition
s@UpdateReportDefinition' {} Format
a -> UpdateReportDefinition
s {$sel:format:UpdateReportDefinition' :: Format
format = Format
a} :: UpdateReportDefinition)

-- | Required. Amazon Simple Storage Service (Amazon S3) location where
-- Application Cost Profiler uploads the report.
updateReportDefinition_destinationS3Location :: Lens.Lens' UpdateReportDefinition S3Location
updateReportDefinition_destinationS3Location :: (S3Location -> f S3Location)
-> UpdateReportDefinition -> f UpdateReportDefinition
updateReportDefinition_destinationS3Location = (UpdateReportDefinition -> S3Location)
-> (UpdateReportDefinition -> S3Location -> UpdateReportDefinition)
-> Lens
     UpdateReportDefinition UpdateReportDefinition S3Location S3Location
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReportDefinition' {S3Location
destinationS3Location :: S3Location
$sel:destinationS3Location:UpdateReportDefinition' :: UpdateReportDefinition -> S3Location
destinationS3Location} -> S3Location
destinationS3Location) (\s :: UpdateReportDefinition
s@UpdateReportDefinition' {} S3Location
a -> UpdateReportDefinition
s {$sel:destinationS3Location:UpdateReportDefinition' :: S3Location
destinationS3Location = S3Location
a} :: UpdateReportDefinition)

instance Core.AWSRequest UpdateReportDefinition where
  type
    AWSResponse UpdateReportDefinition =
      UpdateReportDefinitionResponse
  request :: UpdateReportDefinition -> Request UpdateReportDefinition
request = Service -> UpdateReportDefinition -> Request UpdateReportDefinition
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateReportDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateReportDefinition)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateReportDefinition))
-> Logger
-> Service
-> Proxy UpdateReportDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateReportDefinition)))
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 Text -> Int -> UpdateReportDefinitionResponse
UpdateReportDefinitionResponse'
            (Maybe Text -> Int -> UpdateReportDefinitionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateReportDefinitionResponse)
forall (f :: * -> *) a b. Functor 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
"reportId")
            Either String (Int -> UpdateReportDefinitionResponse)
-> Either String Int
-> Either String UpdateReportDefinitionResponse
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 UpdateReportDefinition

instance Prelude.NFData UpdateReportDefinition

instance Core.ToHeaders UpdateReportDefinition where
  toHeaders :: UpdateReportDefinition -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateReportDefinition -> 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.ToJSON UpdateReportDefinition where
  toJSON :: UpdateReportDefinition -> Value
toJSON UpdateReportDefinition' {Text
Format
ReportFrequency
S3Location
destinationS3Location :: S3Location
format :: Format
reportFrequency :: ReportFrequency
reportDescription :: Text
reportId :: Text
$sel:destinationS3Location:UpdateReportDefinition' :: UpdateReportDefinition -> S3Location
$sel:format:UpdateReportDefinition' :: UpdateReportDefinition -> Format
$sel:reportFrequency:UpdateReportDefinition' :: UpdateReportDefinition -> ReportFrequency
$sel:reportDescription:UpdateReportDefinition' :: UpdateReportDefinition -> Text
$sel:reportId:UpdateReportDefinition' :: UpdateReportDefinition -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"reportDescription" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
reportDescription),
            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
"format" Text -> Format -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Format
format),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"destinationS3Location"
                  Text -> S3Location -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= S3Location
destinationS3Location
              )
          ]
      )

instance Core.ToPath UpdateReportDefinition where
  toPath :: UpdateReportDefinition -> ByteString
toPath UpdateReportDefinition' {Text
Format
ReportFrequency
S3Location
destinationS3Location :: S3Location
format :: Format
reportFrequency :: ReportFrequency
reportDescription :: Text
reportId :: Text
$sel:destinationS3Location:UpdateReportDefinition' :: UpdateReportDefinition -> S3Location
$sel:format:UpdateReportDefinition' :: UpdateReportDefinition -> Format
$sel:reportFrequency:UpdateReportDefinition' :: UpdateReportDefinition -> ReportFrequency
$sel:reportDescription:UpdateReportDefinition' :: UpdateReportDefinition -> Text
$sel:reportId:UpdateReportDefinition' :: UpdateReportDefinition -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/reportDefinition/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
reportId]

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

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

-- |
-- Create a value of 'UpdateReportDefinitionResponse' 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:
--
-- 'reportId', 'updateReportDefinitionResponse_reportId' - ID of the report.
--
-- 'httpStatus', 'updateReportDefinitionResponse_httpStatus' - The response's http status code.
newUpdateReportDefinitionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateReportDefinitionResponse
newUpdateReportDefinitionResponse :: Int -> UpdateReportDefinitionResponse
newUpdateReportDefinitionResponse Int
pHttpStatus_ =
  UpdateReportDefinitionResponse' :: Maybe Text -> Int -> UpdateReportDefinitionResponse
UpdateReportDefinitionResponse'
    { $sel:reportId:UpdateReportDefinitionResponse' :: Maybe Text
reportId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateReportDefinitionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | ID of the report.
updateReportDefinitionResponse_reportId :: Lens.Lens' UpdateReportDefinitionResponse (Prelude.Maybe Prelude.Text)
updateReportDefinitionResponse_reportId :: (Maybe Text -> f (Maybe Text))
-> UpdateReportDefinitionResponse
-> f UpdateReportDefinitionResponse
updateReportDefinitionResponse_reportId = (UpdateReportDefinitionResponse -> Maybe Text)
-> (UpdateReportDefinitionResponse
    -> Maybe Text -> UpdateReportDefinitionResponse)
-> Lens
     UpdateReportDefinitionResponse
     UpdateReportDefinitionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateReportDefinitionResponse' {Maybe Text
reportId :: Maybe Text
$sel:reportId:UpdateReportDefinitionResponse' :: UpdateReportDefinitionResponse -> Maybe Text
reportId} -> Maybe Text
reportId) (\s :: UpdateReportDefinitionResponse
s@UpdateReportDefinitionResponse' {} Maybe Text
a -> UpdateReportDefinitionResponse
s {$sel:reportId:UpdateReportDefinitionResponse' :: Maybe Text
reportId = Maybe Text
a} :: UpdateReportDefinitionResponse)

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

instance
  Prelude.NFData
    UpdateReportDefinitionResponse