{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.ReportGenerator
-- 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)
module Amazonka.LicenseManager.Types.ReportGenerator where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LicenseManager.Types.ReportContext
import Amazonka.LicenseManager.Types.ReportFrequency
import Amazonka.LicenseManager.Types.ReportType
import Amazonka.LicenseManager.Types.S3Location
import Amazonka.LicenseManager.Types.Tag
import qualified Amazonka.Prelude as Prelude

-- | Describe the details of a report generator.
--
-- /See:/ 'newReportGenerator' smart constructor.
data ReportGenerator = ReportGenerator'
  { -- | Time the last report was generated at.
    ReportGenerator -> Maybe Text
lastReportGenerationTime :: Prelude.Maybe Prelude.Text,
    -- | Failure message for the last report generation attempt.
    ReportGenerator -> Maybe Text
lastRunFailureReason :: Prelude.Maybe Prelude.Text,
    -- | Status of the last report generation attempt.
    ReportGenerator -> Maybe Text
lastRunStatus :: Prelude.Maybe Prelude.Text,
    -- | Name of the report generator.
    ReportGenerator -> Maybe Text
reportGeneratorName :: Prelude.Maybe Prelude.Text,
    -- | Details about how frequently reports are generated.
    ReportGenerator -> Maybe ReportFrequency
reportFrequency :: Prelude.Maybe ReportFrequency,
    -- | Details of the S3 bucket that report generator reports are published to.
    ReportGenerator -> Maybe S3Location
s3Location :: Prelude.Maybe S3Location,
    -- | Amazon Resource Name (ARN) of the report generator.
    ReportGenerator -> Maybe Text
licenseManagerReportGeneratorArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services account ID used to create the report generator.
    ReportGenerator -> Maybe Text
reportCreatorAccount :: Prelude.Maybe Prelude.Text,
    -- | Description of the report generator.
    ReportGenerator -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Type of reports that are generated.
    ReportGenerator -> Maybe [ReportType]
reportType :: Prelude.Maybe [ReportType],
    -- | Time the report was created.
    ReportGenerator -> Maybe Text
createTime :: Prelude.Maybe Prelude.Text,
    -- | Tags associated with the report generator.
    ReportGenerator -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | License configuration type for this generator.
    ReportGenerator -> Maybe ReportContext
reportContext :: Prelude.Maybe ReportContext
  }
  deriving (ReportGenerator -> ReportGenerator -> Bool
(ReportGenerator -> ReportGenerator -> Bool)
-> (ReportGenerator -> ReportGenerator -> Bool)
-> Eq ReportGenerator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReportGenerator -> ReportGenerator -> Bool
$c/= :: ReportGenerator -> ReportGenerator -> Bool
== :: ReportGenerator -> ReportGenerator -> Bool
$c== :: ReportGenerator -> ReportGenerator -> Bool
Prelude.Eq, ReadPrec [ReportGenerator]
ReadPrec ReportGenerator
Int -> ReadS ReportGenerator
ReadS [ReportGenerator]
(Int -> ReadS ReportGenerator)
-> ReadS [ReportGenerator]
-> ReadPrec ReportGenerator
-> ReadPrec [ReportGenerator]
-> Read ReportGenerator
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReportGenerator]
$creadListPrec :: ReadPrec [ReportGenerator]
readPrec :: ReadPrec ReportGenerator
$creadPrec :: ReadPrec ReportGenerator
readList :: ReadS [ReportGenerator]
$creadList :: ReadS [ReportGenerator]
readsPrec :: Int -> ReadS ReportGenerator
$creadsPrec :: Int -> ReadS ReportGenerator
Prelude.Read, Int -> ReportGenerator -> ShowS
[ReportGenerator] -> ShowS
ReportGenerator -> String
(Int -> ReportGenerator -> ShowS)
-> (ReportGenerator -> String)
-> ([ReportGenerator] -> ShowS)
-> Show ReportGenerator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReportGenerator] -> ShowS
$cshowList :: [ReportGenerator] -> ShowS
show :: ReportGenerator -> String
$cshow :: ReportGenerator -> String
showsPrec :: Int -> ReportGenerator -> ShowS
$cshowsPrec :: Int -> ReportGenerator -> ShowS
Prelude.Show, (forall x. ReportGenerator -> Rep ReportGenerator x)
-> (forall x. Rep ReportGenerator x -> ReportGenerator)
-> Generic ReportGenerator
forall x. Rep ReportGenerator x -> ReportGenerator
forall x. ReportGenerator -> Rep ReportGenerator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ReportGenerator x -> ReportGenerator
$cfrom :: forall x. ReportGenerator -> Rep ReportGenerator x
Prelude.Generic)

-- |
-- Create a value of 'ReportGenerator' 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:
--
-- 'lastReportGenerationTime', 'reportGenerator_lastReportGenerationTime' - Time the last report was generated at.
--
-- 'lastRunFailureReason', 'reportGenerator_lastRunFailureReason' - Failure message for the last report generation attempt.
--
-- 'lastRunStatus', 'reportGenerator_lastRunStatus' - Status of the last report generation attempt.
--
-- 'reportGeneratorName', 'reportGenerator_reportGeneratorName' - Name of the report generator.
--
-- 'reportFrequency', 'reportGenerator_reportFrequency' - Details about how frequently reports are generated.
--
-- 's3Location', 'reportGenerator_s3Location' - Details of the S3 bucket that report generator reports are published to.
--
-- 'licenseManagerReportGeneratorArn', 'reportGenerator_licenseManagerReportGeneratorArn' - Amazon Resource Name (ARN) of the report generator.
--
-- 'reportCreatorAccount', 'reportGenerator_reportCreatorAccount' - The Amazon Web Services account ID used to create the report generator.
--
-- 'description', 'reportGenerator_description' - Description of the report generator.
--
-- 'reportType', 'reportGenerator_reportType' - Type of reports that are generated.
--
-- 'createTime', 'reportGenerator_createTime' - Time the report was created.
--
-- 'tags', 'reportGenerator_tags' - Tags associated with the report generator.
--
-- 'reportContext', 'reportGenerator_reportContext' - License configuration type for this generator.
newReportGenerator ::
  ReportGenerator
newReportGenerator :: ReportGenerator
newReportGenerator =
  ReportGenerator' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ReportFrequency
-> Maybe S3Location
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ReportType]
-> Maybe Text
-> Maybe [Tag]
-> Maybe ReportContext
-> ReportGenerator
ReportGenerator'
    { $sel:lastReportGenerationTime:ReportGenerator' :: Maybe Text
lastReportGenerationTime =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastRunFailureReason:ReportGenerator' :: Maybe Text
lastRunFailureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastRunStatus:ReportGenerator' :: Maybe Text
lastRunStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:reportGeneratorName:ReportGenerator' :: Maybe Text
reportGeneratorName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:reportFrequency:ReportGenerator' :: Maybe ReportFrequency
reportFrequency = Maybe ReportFrequency
forall a. Maybe a
Prelude.Nothing,
      $sel:s3Location:ReportGenerator' :: Maybe S3Location
s3Location = Maybe S3Location
forall a. Maybe a
Prelude.Nothing,
      $sel:licenseManagerReportGeneratorArn:ReportGenerator' :: Maybe Text
licenseManagerReportGeneratorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:reportCreatorAccount:ReportGenerator' :: Maybe Text
reportCreatorAccount = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:ReportGenerator' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:reportType:ReportGenerator' :: Maybe [ReportType]
reportType = Maybe [ReportType]
forall a. Maybe a
Prelude.Nothing,
      $sel:createTime:ReportGenerator' :: Maybe Text
createTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ReportGenerator' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:reportContext:ReportGenerator' :: Maybe ReportContext
reportContext = Maybe ReportContext
forall a. Maybe a
Prelude.Nothing
    }

-- | Time the last report was generated at.
reportGenerator_lastReportGenerationTime :: Lens.Lens' ReportGenerator (Prelude.Maybe Prelude.Text)
reportGenerator_lastReportGenerationTime :: (Maybe Text -> f (Maybe Text))
-> ReportGenerator -> f ReportGenerator
reportGenerator_lastReportGenerationTime = (ReportGenerator -> Maybe Text)
-> (ReportGenerator -> Maybe Text -> ReportGenerator)
-> Lens ReportGenerator ReportGenerator (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGenerator' {Maybe Text
lastReportGenerationTime :: Maybe Text
$sel:lastReportGenerationTime:ReportGenerator' :: ReportGenerator -> Maybe Text
lastReportGenerationTime} -> Maybe Text
lastReportGenerationTime) (\s :: ReportGenerator
s@ReportGenerator' {} Maybe Text
a -> ReportGenerator
s {$sel:lastReportGenerationTime:ReportGenerator' :: Maybe Text
lastReportGenerationTime = Maybe Text
a} :: ReportGenerator)

-- | Failure message for the last report generation attempt.
reportGenerator_lastRunFailureReason :: Lens.Lens' ReportGenerator (Prelude.Maybe Prelude.Text)
reportGenerator_lastRunFailureReason :: (Maybe Text -> f (Maybe Text))
-> ReportGenerator -> f ReportGenerator
reportGenerator_lastRunFailureReason = (ReportGenerator -> Maybe Text)
-> (ReportGenerator -> Maybe Text -> ReportGenerator)
-> Lens ReportGenerator ReportGenerator (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGenerator' {Maybe Text
lastRunFailureReason :: Maybe Text
$sel:lastRunFailureReason:ReportGenerator' :: ReportGenerator -> Maybe Text
lastRunFailureReason} -> Maybe Text
lastRunFailureReason) (\s :: ReportGenerator
s@ReportGenerator' {} Maybe Text
a -> ReportGenerator
s {$sel:lastRunFailureReason:ReportGenerator' :: Maybe Text
lastRunFailureReason = Maybe Text
a} :: ReportGenerator)

-- | Status of the last report generation attempt.
reportGenerator_lastRunStatus :: Lens.Lens' ReportGenerator (Prelude.Maybe Prelude.Text)
reportGenerator_lastRunStatus :: (Maybe Text -> f (Maybe Text))
-> ReportGenerator -> f ReportGenerator
reportGenerator_lastRunStatus = (ReportGenerator -> Maybe Text)
-> (ReportGenerator -> Maybe Text -> ReportGenerator)
-> Lens ReportGenerator ReportGenerator (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGenerator' {Maybe Text
lastRunStatus :: Maybe Text
$sel:lastRunStatus:ReportGenerator' :: ReportGenerator -> Maybe Text
lastRunStatus} -> Maybe Text
lastRunStatus) (\s :: ReportGenerator
s@ReportGenerator' {} Maybe Text
a -> ReportGenerator
s {$sel:lastRunStatus:ReportGenerator' :: Maybe Text
lastRunStatus = Maybe Text
a} :: ReportGenerator)

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

-- | Details about how frequently reports are generated.
reportGenerator_reportFrequency :: Lens.Lens' ReportGenerator (Prelude.Maybe ReportFrequency)
reportGenerator_reportFrequency :: (Maybe ReportFrequency -> f (Maybe ReportFrequency))
-> ReportGenerator -> f ReportGenerator
reportGenerator_reportFrequency = (ReportGenerator -> Maybe ReportFrequency)
-> (ReportGenerator -> Maybe ReportFrequency -> ReportGenerator)
-> Lens
     ReportGenerator
     ReportGenerator
     (Maybe ReportFrequency)
     (Maybe ReportFrequency)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGenerator' {Maybe ReportFrequency
reportFrequency :: Maybe ReportFrequency
$sel:reportFrequency:ReportGenerator' :: ReportGenerator -> Maybe ReportFrequency
reportFrequency} -> Maybe ReportFrequency
reportFrequency) (\s :: ReportGenerator
s@ReportGenerator' {} Maybe ReportFrequency
a -> ReportGenerator
s {$sel:reportFrequency:ReportGenerator' :: Maybe ReportFrequency
reportFrequency = Maybe ReportFrequency
a} :: ReportGenerator)

-- | Details of the S3 bucket that report generator reports are published to.
reportGenerator_s3Location :: Lens.Lens' ReportGenerator (Prelude.Maybe S3Location)
reportGenerator_s3Location :: (Maybe S3Location -> f (Maybe S3Location))
-> ReportGenerator -> f ReportGenerator
reportGenerator_s3Location = (ReportGenerator -> Maybe S3Location)
-> (ReportGenerator -> Maybe S3Location -> ReportGenerator)
-> Lens
     ReportGenerator
     ReportGenerator
     (Maybe S3Location)
     (Maybe S3Location)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGenerator' {Maybe S3Location
s3Location :: Maybe S3Location
$sel:s3Location:ReportGenerator' :: ReportGenerator -> Maybe S3Location
s3Location} -> Maybe S3Location
s3Location) (\s :: ReportGenerator
s@ReportGenerator' {} Maybe S3Location
a -> ReportGenerator
s {$sel:s3Location:ReportGenerator' :: Maybe S3Location
s3Location = Maybe S3Location
a} :: ReportGenerator)

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

-- | The Amazon Web Services account ID used to create the report generator.
reportGenerator_reportCreatorAccount :: Lens.Lens' ReportGenerator (Prelude.Maybe Prelude.Text)
reportGenerator_reportCreatorAccount :: (Maybe Text -> f (Maybe Text))
-> ReportGenerator -> f ReportGenerator
reportGenerator_reportCreatorAccount = (ReportGenerator -> Maybe Text)
-> (ReportGenerator -> Maybe Text -> ReportGenerator)
-> Lens ReportGenerator ReportGenerator (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGenerator' {Maybe Text
reportCreatorAccount :: Maybe Text
$sel:reportCreatorAccount:ReportGenerator' :: ReportGenerator -> Maybe Text
reportCreatorAccount} -> Maybe Text
reportCreatorAccount) (\s :: ReportGenerator
s@ReportGenerator' {} Maybe Text
a -> ReportGenerator
s {$sel:reportCreatorAccount:ReportGenerator' :: Maybe Text
reportCreatorAccount = Maybe Text
a} :: ReportGenerator)

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

-- | Type of reports that are generated.
reportGenerator_reportType :: Lens.Lens' ReportGenerator (Prelude.Maybe [ReportType])
reportGenerator_reportType :: (Maybe [ReportType] -> f (Maybe [ReportType]))
-> ReportGenerator -> f ReportGenerator
reportGenerator_reportType = (ReportGenerator -> Maybe [ReportType])
-> (ReportGenerator -> Maybe [ReportType] -> ReportGenerator)
-> Lens
     ReportGenerator
     ReportGenerator
     (Maybe [ReportType])
     (Maybe [ReportType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGenerator' {Maybe [ReportType]
reportType :: Maybe [ReportType]
$sel:reportType:ReportGenerator' :: ReportGenerator -> Maybe [ReportType]
reportType} -> Maybe [ReportType]
reportType) (\s :: ReportGenerator
s@ReportGenerator' {} Maybe [ReportType]
a -> ReportGenerator
s {$sel:reportType:ReportGenerator' :: Maybe [ReportType]
reportType = Maybe [ReportType]
a} :: ReportGenerator) ((Maybe [ReportType] -> f (Maybe [ReportType]))
 -> ReportGenerator -> f ReportGenerator)
-> ((Maybe [ReportType] -> f (Maybe [ReportType]))
    -> Maybe [ReportType] -> f (Maybe [ReportType]))
-> (Maybe [ReportType] -> f (Maybe [ReportType]))
-> ReportGenerator
-> f ReportGenerator
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ReportType] [ReportType] [ReportType] [ReportType]
-> Iso
     (Maybe [ReportType])
     (Maybe [ReportType])
     (Maybe [ReportType])
     (Maybe [ReportType])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [ReportType] [ReportType] [ReportType] [ReportType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Time the report was created.
reportGenerator_createTime :: Lens.Lens' ReportGenerator (Prelude.Maybe Prelude.Text)
reportGenerator_createTime :: (Maybe Text -> f (Maybe Text))
-> ReportGenerator -> f ReportGenerator
reportGenerator_createTime = (ReportGenerator -> Maybe Text)
-> (ReportGenerator -> Maybe Text -> ReportGenerator)
-> Lens ReportGenerator ReportGenerator (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGenerator' {Maybe Text
createTime :: Maybe Text
$sel:createTime:ReportGenerator' :: ReportGenerator -> Maybe Text
createTime} -> Maybe Text
createTime) (\s :: ReportGenerator
s@ReportGenerator' {} Maybe Text
a -> ReportGenerator
s {$sel:createTime:ReportGenerator' :: Maybe Text
createTime = Maybe Text
a} :: ReportGenerator)

-- | Tags associated with the report generator.
reportGenerator_tags :: Lens.Lens' ReportGenerator (Prelude.Maybe [Tag])
reportGenerator_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> ReportGenerator -> f ReportGenerator
reportGenerator_tags = (ReportGenerator -> Maybe [Tag])
-> (ReportGenerator -> Maybe [Tag] -> ReportGenerator)
-> Lens ReportGenerator ReportGenerator (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGenerator' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:ReportGenerator' :: ReportGenerator -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: ReportGenerator
s@ReportGenerator' {} Maybe [Tag]
a -> ReportGenerator
s {$sel:tags:ReportGenerator' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: ReportGenerator) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> ReportGenerator -> f ReportGenerator)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> ReportGenerator
-> f ReportGenerator
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | License configuration type for this generator.
reportGenerator_reportContext :: Lens.Lens' ReportGenerator (Prelude.Maybe ReportContext)
reportGenerator_reportContext :: (Maybe ReportContext -> f (Maybe ReportContext))
-> ReportGenerator -> f ReportGenerator
reportGenerator_reportContext = (ReportGenerator -> Maybe ReportContext)
-> (ReportGenerator -> Maybe ReportContext -> ReportGenerator)
-> Lens
     ReportGenerator
     ReportGenerator
     (Maybe ReportContext)
     (Maybe ReportContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReportGenerator' {Maybe ReportContext
reportContext :: Maybe ReportContext
$sel:reportContext:ReportGenerator' :: ReportGenerator -> Maybe ReportContext
reportContext} -> Maybe ReportContext
reportContext) (\s :: ReportGenerator
s@ReportGenerator' {} Maybe ReportContext
a -> ReportGenerator
s {$sel:reportContext:ReportGenerator' :: Maybe ReportContext
reportContext = Maybe ReportContext
a} :: ReportGenerator)

instance Core.FromJSON ReportGenerator where
  parseJSON :: Value -> Parser ReportGenerator
parseJSON =
    String
-> (Object -> Parser ReportGenerator)
-> Value
-> Parser ReportGenerator
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ReportGenerator"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ReportFrequency
-> Maybe S3Location
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ReportType]
-> Maybe Text
-> Maybe [Tag]
-> Maybe ReportContext
-> ReportGenerator
ReportGenerator'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ReportFrequency
 -> Maybe S3Location
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [ReportType]
 -> Maybe Text
 -> Maybe [Tag]
 -> Maybe ReportContext
 -> ReportGenerator)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ReportFrequency
      -> Maybe S3Location
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ReportType]
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe ReportContext
      -> ReportGenerator)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastReportGenerationTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ReportFrequency
   -> Maybe S3Location
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ReportType]
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe ReportContext
   -> ReportGenerator)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ReportFrequency
      -> Maybe S3Location
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ReportType]
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe ReportContext
      -> ReportGenerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastRunFailureReason")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ReportFrequency
   -> Maybe S3Location
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ReportType]
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe ReportContext
   -> ReportGenerator)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ReportFrequency
      -> Maybe S3Location
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ReportType]
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe ReportContext
      -> ReportGenerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastRunStatus")
            Parser
  (Maybe Text
   -> Maybe ReportFrequency
   -> Maybe S3Location
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ReportType]
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe ReportContext
   -> ReportGenerator)
-> Parser (Maybe Text)
-> Parser
     (Maybe ReportFrequency
      -> Maybe S3Location
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ReportType]
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe ReportContext
      -> ReportGenerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReportGeneratorName")
            Parser
  (Maybe ReportFrequency
   -> Maybe S3Location
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ReportType]
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe ReportContext
   -> ReportGenerator)
-> Parser (Maybe ReportFrequency)
-> Parser
     (Maybe S3Location
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ReportType]
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe ReportContext
      -> ReportGenerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReportFrequency)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReportFrequency")
            Parser
  (Maybe S3Location
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ReportType]
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe ReportContext
   -> ReportGenerator)
-> Parser (Maybe S3Location)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ReportType]
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe ReportContext
      -> ReportGenerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe S3Location)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"S3Location")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ReportType]
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe ReportContext
   -> ReportGenerator)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [ReportType]
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe ReportContext
      -> ReportGenerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LicenseManagerReportGeneratorArn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [ReportType]
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe ReportContext
   -> ReportGenerator)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [ReportType]
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe ReportContext
      -> ReportGenerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReportCreatorAccount")
            Parser
  (Maybe Text
   -> Maybe [ReportType]
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe ReportContext
   -> ReportGenerator)
-> Parser (Maybe Text)
-> Parser
     (Maybe [ReportType]
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe ReportContext
      -> ReportGenerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
            Parser
  (Maybe [ReportType]
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe ReportContext
   -> ReportGenerator)
-> Parser (Maybe [ReportType])
-> Parser
     (Maybe Text
      -> Maybe [Tag] -> Maybe ReportContext -> ReportGenerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [ReportType]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReportType" Parser (Maybe (Maybe [ReportType]))
-> Maybe [ReportType] -> Parser (Maybe [ReportType])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ReportType]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe [Tag] -> Maybe ReportContext -> ReportGenerator)
-> Parser (Maybe Text)
-> Parser (Maybe [Tag] -> Maybe ReportContext -> ReportGenerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreateTime")
            Parser (Maybe [Tag] -> Maybe ReportContext -> ReportGenerator)
-> Parser (Maybe [Tag])
-> Parser (Maybe ReportContext -> ReportGenerator)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe ReportContext -> ReportGenerator)
-> Parser (Maybe ReportContext) -> Parser ReportGenerator
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ReportContext)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReportContext")
      )

instance Prelude.Hashable ReportGenerator

instance Prelude.NFData ReportGenerator