{-# 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.GetReportDefinition
-- 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)
--
-- Retrieves the definition of a report already configured in AWS
-- Application Cost Profiler.
module Amazonka.ApplicationCostProfiler.GetReportDefinition
  ( -- * Creating a Request
    GetReportDefinition (..),
    newGetReportDefinition,

    -- * Request Lenses
    getReportDefinition_reportId,

    -- * Destructuring the Response
    GetReportDefinitionResponse (..),
    newGetReportDefinitionResponse,

    -- * Response Lenses
    getReportDefinitionResponse_httpStatus,
    getReportDefinitionResponse_reportId,
    getReportDefinitionResponse_reportDescription,
    getReportDefinitionResponse_reportFrequency,
    getReportDefinitionResponse_format,
    getReportDefinitionResponse_destinationS3Location,
    getReportDefinitionResponse_createdAt,
    getReportDefinitionResponse_lastUpdated,
  )
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:/ 'newGetReportDefinition' smart constructor.
data GetReportDefinition = GetReportDefinition'
  { -- | ID of the report to retrieve.
    GetReportDefinition -> Text
reportId :: Prelude.Text
  }
  deriving (GetReportDefinition -> GetReportDefinition -> Bool
(GetReportDefinition -> GetReportDefinition -> Bool)
-> (GetReportDefinition -> GetReportDefinition -> Bool)
-> Eq GetReportDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReportDefinition -> GetReportDefinition -> Bool
$c/= :: GetReportDefinition -> GetReportDefinition -> Bool
== :: GetReportDefinition -> GetReportDefinition -> Bool
$c== :: GetReportDefinition -> GetReportDefinition -> Bool
Prelude.Eq, ReadPrec [GetReportDefinition]
ReadPrec GetReportDefinition
Int -> ReadS GetReportDefinition
ReadS [GetReportDefinition]
(Int -> ReadS GetReportDefinition)
-> ReadS [GetReportDefinition]
-> ReadPrec GetReportDefinition
-> ReadPrec [GetReportDefinition]
-> Read GetReportDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetReportDefinition]
$creadListPrec :: ReadPrec [GetReportDefinition]
readPrec :: ReadPrec GetReportDefinition
$creadPrec :: ReadPrec GetReportDefinition
readList :: ReadS [GetReportDefinition]
$creadList :: ReadS [GetReportDefinition]
readsPrec :: Int -> ReadS GetReportDefinition
$creadsPrec :: Int -> ReadS GetReportDefinition
Prelude.Read, Int -> GetReportDefinition -> ShowS
[GetReportDefinition] -> ShowS
GetReportDefinition -> String
(Int -> GetReportDefinition -> ShowS)
-> (GetReportDefinition -> String)
-> ([GetReportDefinition] -> ShowS)
-> Show GetReportDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReportDefinition] -> ShowS
$cshowList :: [GetReportDefinition] -> ShowS
show :: GetReportDefinition -> String
$cshow :: GetReportDefinition -> String
showsPrec :: Int -> GetReportDefinition -> ShowS
$cshowsPrec :: Int -> GetReportDefinition -> ShowS
Prelude.Show, (forall x. GetReportDefinition -> Rep GetReportDefinition x)
-> (forall x. Rep GetReportDefinition x -> GetReportDefinition)
-> Generic GetReportDefinition
forall x. Rep GetReportDefinition x -> GetReportDefinition
forall x. GetReportDefinition -> Rep GetReportDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetReportDefinition x -> GetReportDefinition
$cfrom :: forall x. GetReportDefinition -> Rep GetReportDefinition x
Prelude.Generic)

-- |
-- Create a value of 'GetReportDefinition' 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', 'getReportDefinition_reportId' - ID of the report to retrieve.
newGetReportDefinition ::
  -- | 'reportId'
  Prelude.Text ->
  GetReportDefinition
newGetReportDefinition :: Text -> GetReportDefinition
newGetReportDefinition Text
pReportId_ =
  GetReportDefinition' :: Text -> GetReportDefinition
GetReportDefinition' {$sel:reportId:GetReportDefinition' :: Text
reportId = Text
pReportId_}

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

instance Core.AWSRequest GetReportDefinition where
  type
    AWSResponse GetReportDefinition =
      GetReportDefinitionResponse
  request :: GetReportDefinition -> Request GetReportDefinition
request = Service -> GetReportDefinition -> Request GetReportDefinition
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetReportDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetReportDefinition)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetReportDefinition))
-> Logger
-> Service
-> Proxy GetReportDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetReportDefinition)))
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 ->
          Int
-> Text
-> Text
-> ReportFrequency
-> Format
-> S3Location
-> POSIX
-> POSIX
-> GetReportDefinitionResponse
GetReportDefinitionResponse'
            (Int
 -> Text
 -> Text
 -> ReportFrequency
 -> Format
 -> S3Location
 -> POSIX
 -> POSIX
 -> GetReportDefinitionResponse)
-> Either String Int
-> Either
     String
     (Text
      -> Text
      -> ReportFrequency
      -> Format
      -> S3Location
      -> POSIX
      -> POSIX
      -> GetReportDefinitionResponse)
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))
            Either
  String
  (Text
   -> Text
   -> ReportFrequency
   -> Format
   -> S3Location
   -> POSIX
   -> POSIX
   -> GetReportDefinitionResponse)
-> Either String Text
-> Either
     String
     (Text
      -> ReportFrequency
      -> Format
      -> S3Location
      -> POSIX
      -> POSIX
      -> GetReportDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"reportId")
            Either
  String
  (Text
   -> ReportFrequency
   -> Format
   -> S3Location
   -> POSIX
   -> POSIX
   -> GetReportDefinitionResponse)
-> Either String Text
-> Either
     String
     (ReportFrequency
      -> Format
      -> S3Location
      -> POSIX
      -> POSIX
      -> GetReportDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"reportDescription")
            Either
  String
  (ReportFrequency
   -> Format
   -> S3Location
   -> POSIX
   -> POSIX
   -> GetReportDefinitionResponse)
-> Either String ReportFrequency
-> Either
     String
     (Format
      -> S3Location -> POSIX -> POSIX -> GetReportDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String ReportFrequency
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"reportFrequency")
            Either
  String
  (Format
   -> S3Location -> POSIX -> POSIX -> GetReportDefinitionResponse)
-> Either String Format
-> Either
     String
     (S3Location -> POSIX -> POSIX -> GetReportDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Format
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"format")
            Either
  String
  (S3Location -> POSIX -> POSIX -> GetReportDefinitionResponse)
-> Either String S3Location
-> Either String (POSIX -> POSIX -> GetReportDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String S3Location
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"destinationS3Location")
            Either String (POSIX -> POSIX -> GetReportDefinitionResponse)
-> Either String POSIX
-> Either String (POSIX -> GetReportDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"createdAt")
            Either String (POSIX -> GetReportDefinitionResponse)
-> Either String POSIX -> Either String GetReportDefinitionResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"lastUpdated")
      )

instance Prelude.Hashable GetReportDefinition

instance Prelude.NFData GetReportDefinition

instance Core.ToHeaders GetReportDefinition where
  toHeaders :: GetReportDefinition -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetReportDefinition -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath GetReportDefinition where
  toPath :: GetReportDefinition -> ByteString
toPath GetReportDefinition' {Text
reportId :: Text
$sel:reportId:GetReportDefinition' :: GetReportDefinition -> 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 GetReportDefinition where
  toQuery :: GetReportDefinition -> QueryString
toQuery = QueryString -> GetReportDefinition -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetReportDefinitionResponse' smart constructor.
data GetReportDefinitionResponse = GetReportDefinitionResponse'
  { -- | The response's http status code.
    GetReportDefinitionResponse -> Int
httpStatus :: Prelude.Int,
    -- | ID of the report retrieved.
    GetReportDefinitionResponse -> Text
reportId :: Prelude.Text,
    -- | Description of the report.
    GetReportDefinitionResponse -> Text
reportDescription :: Prelude.Text,
    -- | Cadence used to generate the report.
    GetReportDefinitionResponse -> ReportFrequency
reportFrequency :: ReportFrequency,
    -- | Format of the generated report.
    GetReportDefinitionResponse -> Format
format :: Format,
    -- | Amazon Simple Storage Service (Amazon S3) location where the report is
    -- uploaded.
    GetReportDefinitionResponse -> S3Location
destinationS3Location :: S3Location,
    -- | Timestamp (milliseconds) when this report definition was created.
    GetReportDefinitionResponse -> POSIX
createdAt :: Core.POSIX,
    -- | Timestamp (milliseconds) when this report definition was last updated.
    GetReportDefinitionResponse -> POSIX
lastUpdated :: Core.POSIX
  }
  deriving (GetReportDefinitionResponse -> GetReportDefinitionResponse -> Bool
(GetReportDefinitionResponse
 -> GetReportDefinitionResponse -> Bool)
-> (GetReportDefinitionResponse
    -> GetReportDefinitionResponse -> Bool)
-> Eq GetReportDefinitionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReportDefinitionResponse -> GetReportDefinitionResponse -> Bool
$c/= :: GetReportDefinitionResponse -> GetReportDefinitionResponse -> Bool
== :: GetReportDefinitionResponse -> GetReportDefinitionResponse -> Bool
$c== :: GetReportDefinitionResponse -> GetReportDefinitionResponse -> Bool
Prelude.Eq, ReadPrec [GetReportDefinitionResponse]
ReadPrec GetReportDefinitionResponse
Int -> ReadS GetReportDefinitionResponse
ReadS [GetReportDefinitionResponse]
(Int -> ReadS GetReportDefinitionResponse)
-> ReadS [GetReportDefinitionResponse]
-> ReadPrec GetReportDefinitionResponse
-> ReadPrec [GetReportDefinitionResponse]
-> Read GetReportDefinitionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetReportDefinitionResponse]
$creadListPrec :: ReadPrec [GetReportDefinitionResponse]
readPrec :: ReadPrec GetReportDefinitionResponse
$creadPrec :: ReadPrec GetReportDefinitionResponse
readList :: ReadS [GetReportDefinitionResponse]
$creadList :: ReadS [GetReportDefinitionResponse]
readsPrec :: Int -> ReadS GetReportDefinitionResponse
$creadsPrec :: Int -> ReadS GetReportDefinitionResponse
Prelude.Read, Int -> GetReportDefinitionResponse -> ShowS
[GetReportDefinitionResponse] -> ShowS
GetReportDefinitionResponse -> String
(Int -> GetReportDefinitionResponse -> ShowS)
-> (GetReportDefinitionResponse -> String)
-> ([GetReportDefinitionResponse] -> ShowS)
-> Show GetReportDefinitionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReportDefinitionResponse] -> ShowS
$cshowList :: [GetReportDefinitionResponse] -> ShowS
show :: GetReportDefinitionResponse -> String
$cshow :: GetReportDefinitionResponse -> String
showsPrec :: Int -> GetReportDefinitionResponse -> ShowS
$cshowsPrec :: Int -> GetReportDefinitionResponse -> ShowS
Prelude.Show, (forall x.
 GetReportDefinitionResponse -> Rep GetReportDefinitionResponse x)
-> (forall x.
    Rep GetReportDefinitionResponse x -> GetReportDefinitionResponse)
-> Generic GetReportDefinitionResponse
forall x.
Rep GetReportDefinitionResponse x -> GetReportDefinitionResponse
forall x.
GetReportDefinitionResponse -> Rep GetReportDefinitionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetReportDefinitionResponse x -> GetReportDefinitionResponse
$cfrom :: forall x.
GetReportDefinitionResponse -> Rep GetReportDefinitionResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetReportDefinitionResponse' 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', 'getReportDefinitionResponse_httpStatus' - The response's http status code.
--
-- 'reportId', 'getReportDefinitionResponse_reportId' - ID of the report retrieved.
--
-- 'reportDescription', 'getReportDefinitionResponse_reportDescription' - Description of the report.
--
-- 'reportFrequency', 'getReportDefinitionResponse_reportFrequency' - Cadence used to generate the report.
--
-- 'format', 'getReportDefinitionResponse_format' - Format of the generated report.
--
-- 'destinationS3Location', 'getReportDefinitionResponse_destinationS3Location' - Amazon Simple Storage Service (Amazon S3) location where the report is
-- uploaded.
--
-- 'createdAt', 'getReportDefinitionResponse_createdAt' - Timestamp (milliseconds) when this report definition was created.
--
-- 'lastUpdated', 'getReportDefinitionResponse_lastUpdated' - Timestamp (milliseconds) when this report definition was last updated.
newGetReportDefinitionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'reportId'
  Prelude.Text ->
  -- | 'reportDescription'
  Prelude.Text ->
  -- | 'reportFrequency'
  ReportFrequency ->
  -- | 'format'
  Format ->
  -- | 'destinationS3Location'
  S3Location ->
  -- | 'createdAt'
  Prelude.UTCTime ->
  -- | 'lastUpdated'
  Prelude.UTCTime ->
  GetReportDefinitionResponse
newGetReportDefinitionResponse :: Int
-> Text
-> Text
-> ReportFrequency
-> Format
-> S3Location
-> UTCTime
-> UTCTime
-> GetReportDefinitionResponse
newGetReportDefinitionResponse
  Int
pHttpStatus_
  Text
pReportId_
  Text
pReportDescription_
  ReportFrequency
pReportFrequency_
  Format
pFormat_
  S3Location
pDestinationS3Location_
  UTCTime
pCreatedAt_
  UTCTime
pLastUpdated_ =
    GetReportDefinitionResponse' :: Int
-> Text
-> Text
-> ReportFrequency
-> Format
-> S3Location
-> POSIX
-> POSIX
-> GetReportDefinitionResponse
GetReportDefinitionResponse'
      { $sel:httpStatus:GetReportDefinitionResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:reportId:GetReportDefinitionResponse' :: Text
reportId = Text
pReportId_,
        $sel:reportDescription:GetReportDefinitionResponse' :: Text
reportDescription = Text
pReportDescription_,
        $sel:reportFrequency:GetReportDefinitionResponse' :: ReportFrequency
reportFrequency = ReportFrequency
pReportFrequency_,
        $sel:format:GetReportDefinitionResponse' :: Format
format = Format
pFormat_,
        $sel:destinationS3Location:GetReportDefinitionResponse' :: S3Location
destinationS3Location =
          S3Location
pDestinationS3Location_,
        $sel:createdAt:GetReportDefinitionResponse' :: POSIX
createdAt = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedAt_,
        $sel:lastUpdated:GetReportDefinitionResponse' :: POSIX
lastUpdated = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdated_
      }

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

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

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

-- | Cadence used to generate the report.
getReportDefinitionResponse_reportFrequency :: Lens.Lens' GetReportDefinitionResponse ReportFrequency
getReportDefinitionResponse_reportFrequency :: (ReportFrequency -> f ReportFrequency)
-> GetReportDefinitionResponse -> f GetReportDefinitionResponse
getReportDefinitionResponse_reportFrequency = (GetReportDefinitionResponse -> ReportFrequency)
-> (GetReportDefinitionResponse
    -> ReportFrequency -> GetReportDefinitionResponse)
-> Lens
     GetReportDefinitionResponse
     GetReportDefinitionResponse
     ReportFrequency
     ReportFrequency
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReportDefinitionResponse' {ReportFrequency
reportFrequency :: ReportFrequency
$sel:reportFrequency:GetReportDefinitionResponse' :: GetReportDefinitionResponse -> ReportFrequency
reportFrequency} -> ReportFrequency
reportFrequency) (\s :: GetReportDefinitionResponse
s@GetReportDefinitionResponse' {} ReportFrequency
a -> GetReportDefinitionResponse
s {$sel:reportFrequency:GetReportDefinitionResponse' :: ReportFrequency
reportFrequency = ReportFrequency
a} :: GetReportDefinitionResponse)

-- | Format of the generated report.
getReportDefinitionResponse_format :: Lens.Lens' GetReportDefinitionResponse Format
getReportDefinitionResponse_format :: (Format -> f Format)
-> GetReportDefinitionResponse -> f GetReportDefinitionResponse
getReportDefinitionResponse_format = (GetReportDefinitionResponse -> Format)
-> (GetReportDefinitionResponse
    -> Format -> GetReportDefinitionResponse)
-> Lens
     GetReportDefinitionResponse
     GetReportDefinitionResponse
     Format
     Format
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReportDefinitionResponse' {Format
format :: Format
$sel:format:GetReportDefinitionResponse' :: GetReportDefinitionResponse -> Format
format} -> Format
format) (\s :: GetReportDefinitionResponse
s@GetReportDefinitionResponse' {} Format
a -> GetReportDefinitionResponse
s {$sel:format:GetReportDefinitionResponse' :: Format
format = Format
a} :: GetReportDefinitionResponse)

-- | Amazon Simple Storage Service (Amazon S3) location where the report is
-- uploaded.
getReportDefinitionResponse_destinationS3Location :: Lens.Lens' GetReportDefinitionResponse S3Location
getReportDefinitionResponse_destinationS3Location :: (S3Location -> f S3Location)
-> GetReportDefinitionResponse -> f GetReportDefinitionResponse
getReportDefinitionResponse_destinationS3Location = (GetReportDefinitionResponse -> S3Location)
-> (GetReportDefinitionResponse
    -> S3Location -> GetReportDefinitionResponse)
-> Lens
     GetReportDefinitionResponse
     GetReportDefinitionResponse
     S3Location
     S3Location
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReportDefinitionResponse' {S3Location
destinationS3Location :: S3Location
$sel:destinationS3Location:GetReportDefinitionResponse' :: GetReportDefinitionResponse -> S3Location
destinationS3Location} -> S3Location
destinationS3Location) (\s :: GetReportDefinitionResponse
s@GetReportDefinitionResponse' {} S3Location
a -> GetReportDefinitionResponse
s {$sel:destinationS3Location:GetReportDefinitionResponse' :: S3Location
destinationS3Location = S3Location
a} :: GetReportDefinitionResponse)

-- | Timestamp (milliseconds) when this report definition was created.
getReportDefinitionResponse_createdAt :: Lens.Lens' GetReportDefinitionResponse Prelude.UTCTime
getReportDefinitionResponse_createdAt :: (UTCTime -> f UTCTime)
-> GetReportDefinitionResponse -> f GetReportDefinitionResponse
getReportDefinitionResponse_createdAt = (GetReportDefinitionResponse -> POSIX)
-> (GetReportDefinitionResponse
    -> POSIX -> GetReportDefinitionResponse)
-> Lens
     GetReportDefinitionResponse GetReportDefinitionResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReportDefinitionResponse' {POSIX
createdAt :: POSIX
$sel:createdAt:GetReportDefinitionResponse' :: GetReportDefinitionResponse -> POSIX
createdAt} -> POSIX
createdAt) (\s :: GetReportDefinitionResponse
s@GetReportDefinitionResponse' {} POSIX
a -> GetReportDefinitionResponse
s {$sel:createdAt:GetReportDefinitionResponse' :: POSIX
createdAt = POSIX
a} :: GetReportDefinitionResponse) ((POSIX -> f POSIX)
 -> GetReportDefinitionResponse -> f GetReportDefinitionResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetReportDefinitionResponse
-> f GetReportDefinitionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Timestamp (milliseconds) when this report definition was last updated.
getReportDefinitionResponse_lastUpdated :: Lens.Lens' GetReportDefinitionResponse Prelude.UTCTime
getReportDefinitionResponse_lastUpdated :: (UTCTime -> f UTCTime)
-> GetReportDefinitionResponse -> f GetReportDefinitionResponse
getReportDefinitionResponse_lastUpdated = (GetReportDefinitionResponse -> POSIX)
-> (GetReportDefinitionResponse
    -> POSIX -> GetReportDefinitionResponse)
-> Lens
     GetReportDefinitionResponse GetReportDefinitionResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReportDefinitionResponse' {POSIX
lastUpdated :: POSIX
$sel:lastUpdated:GetReportDefinitionResponse' :: GetReportDefinitionResponse -> POSIX
lastUpdated} -> POSIX
lastUpdated) (\s :: GetReportDefinitionResponse
s@GetReportDefinitionResponse' {} POSIX
a -> GetReportDefinitionResponse
s {$sel:lastUpdated:GetReportDefinitionResponse' :: POSIX
lastUpdated = POSIX
a} :: GetReportDefinitionResponse) ((POSIX -> f POSIX)
 -> GetReportDefinitionResponse -> f GetReportDefinitionResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> GetReportDefinitionResponse
-> f GetReportDefinitionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Prelude.NFData GetReportDefinitionResponse