{-# 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.KinesisAnalytics.Types.ApplicationDetail
-- 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.KinesisAnalytics.Types.ApplicationDetail where

import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalytics.Types.ApplicationStatus
import Amazonka.KinesisAnalytics.Types.CloudWatchLoggingOptionDescription
import Amazonka.KinesisAnalytics.Types.InputDescription
import Amazonka.KinesisAnalytics.Types.OutputDescription
import Amazonka.KinesisAnalytics.Types.ReferenceDataSourceDescription
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | This documentation is for version 1 of the Amazon Kinesis Data Analytics
-- API, which only supports SQL applications. Version 2 of the API supports
-- SQL and Java applications. For more information about version 2, see
-- </kinesisanalytics/latest/apiv2/Welcome.html Amazon Kinesis Data Analytics API V2 Documentation>.
--
-- Provides a description of the application, including the application
-- Amazon Resource Name (ARN), status, latest version, and input and output
-- configuration.
--
-- /See:/ 'newApplicationDetail' smart constructor.
data ApplicationDetail = ApplicationDetail'
  { -- | Description of the application.
    ApplicationDetail -> Maybe Text
applicationDescription :: Prelude.Maybe Prelude.Text,
    -- | Describes the application output configuration. For more information,
    -- see
    -- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html Configuring Application Output>.
    ApplicationDetail -> Maybe [OutputDescription]
outputDescriptions :: Prelude.Maybe [OutputDescription],
    -- | Describes the CloudWatch log streams that are configured to receive
    -- application messages. For more information about using CloudWatch log
    -- streams with Amazon Kinesis Analytics applications, see
    -- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/cloudwatch-logs.html Working with Amazon CloudWatch Logs>.
    ApplicationDetail -> Maybe [CloudWatchLoggingOptionDescription]
cloudWatchLoggingOptionDescriptions :: Prelude.Maybe [CloudWatchLoggingOptionDescription],
    -- | Describes reference data sources configured for the application. For
    -- more information, see
    -- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html Configuring Application Input>.
    ApplicationDetail -> Maybe [ReferenceDataSourceDescription]
referenceDataSourceDescriptions :: Prelude.Maybe [ReferenceDataSourceDescription],
    -- | Describes the application input configuration. For more information, see
    -- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html Configuring Application Input>.
    ApplicationDetail -> Maybe [InputDescription]
inputDescriptions :: Prelude.Maybe [InputDescription],
    -- | Returns the application code that you provided to perform data analysis
    -- on any of the in-application streams in your application.
    ApplicationDetail -> Maybe Text
applicationCode :: Prelude.Maybe Prelude.Text,
    -- | Time stamp when the application version was created.
    ApplicationDetail -> Maybe POSIX
createTimestamp :: Prelude.Maybe Core.POSIX,
    -- | Time stamp when the application was last updated.
    ApplicationDetail -> Maybe POSIX
lastUpdateTimestamp :: Prelude.Maybe Core.POSIX,
    -- | Name of the application.
    ApplicationDetail -> Text
applicationName :: Prelude.Text,
    -- | ARN of the application.
    ApplicationDetail -> Text
applicationARN :: Prelude.Text,
    -- | Status of the application.
    ApplicationDetail -> ApplicationStatus
applicationStatus :: ApplicationStatus,
    -- | Provides the current application version.
    ApplicationDetail -> Natural
applicationVersionId :: Prelude.Natural
  }
  deriving (ApplicationDetail -> ApplicationDetail -> Bool
(ApplicationDetail -> ApplicationDetail -> Bool)
-> (ApplicationDetail -> ApplicationDetail -> Bool)
-> Eq ApplicationDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationDetail -> ApplicationDetail -> Bool
$c/= :: ApplicationDetail -> ApplicationDetail -> Bool
== :: ApplicationDetail -> ApplicationDetail -> Bool
$c== :: ApplicationDetail -> ApplicationDetail -> Bool
Prelude.Eq, ReadPrec [ApplicationDetail]
ReadPrec ApplicationDetail
Int -> ReadS ApplicationDetail
ReadS [ApplicationDetail]
(Int -> ReadS ApplicationDetail)
-> ReadS [ApplicationDetail]
-> ReadPrec ApplicationDetail
-> ReadPrec [ApplicationDetail]
-> Read ApplicationDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationDetail]
$creadListPrec :: ReadPrec [ApplicationDetail]
readPrec :: ReadPrec ApplicationDetail
$creadPrec :: ReadPrec ApplicationDetail
readList :: ReadS [ApplicationDetail]
$creadList :: ReadS [ApplicationDetail]
readsPrec :: Int -> ReadS ApplicationDetail
$creadsPrec :: Int -> ReadS ApplicationDetail
Prelude.Read, Int -> ApplicationDetail -> ShowS
[ApplicationDetail] -> ShowS
ApplicationDetail -> String
(Int -> ApplicationDetail -> ShowS)
-> (ApplicationDetail -> String)
-> ([ApplicationDetail] -> ShowS)
-> Show ApplicationDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationDetail] -> ShowS
$cshowList :: [ApplicationDetail] -> ShowS
show :: ApplicationDetail -> String
$cshow :: ApplicationDetail -> String
showsPrec :: Int -> ApplicationDetail -> ShowS
$cshowsPrec :: Int -> ApplicationDetail -> ShowS
Prelude.Show, (forall x. ApplicationDetail -> Rep ApplicationDetail x)
-> (forall x. Rep ApplicationDetail x -> ApplicationDetail)
-> Generic ApplicationDetail
forall x. Rep ApplicationDetail x -> ApplicationDetail
forall x. ApplicationDetail -> Rep ApplicationDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ApplicationDetail x -> ApplicationDetail
$cfrom :: forall x. ApplicationDetail -> Rep ApplicationDetail x
Prelude.Generic)

-- |
-- Create a value of 'ApplicationDetail' 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:
--
-- 'applicationDescription', 'applicationDetail_applicationDescription' - Description of the application.
--
-- 'outputDescriptions', 'applicationDetail_outputDescriptions' - Describes the application output configuration. For more information,
-- see
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html Configuring Application Output>.
--
-- 'cloudWatchLoggingOptionDescriptions', 'applicationDetail_cloudWatchLoggingOptionDescriptions' - Describes the CloudWatch log streams that are configured to receive
-- application messages. For more information about using CloudWatch log
-- streams with Amazon Kinesis Analytics applications, see
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/cloudwatch-logs.html Working with Amazon CloudWatch Logs>.
--
-- 'referenceDataSourceDescriptions', 'applicationDetail_referenceDataSourceDescriptions' - Describes reference data sources configured for the application. For
-- more information, see
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html Configuring Application Input>.
--
-- 'inputDescriptions', 'applicationDetail_inputDescriptions' - Describes the application input configuration. For more information, see
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html Configuring Application Input>.
--
-- 'applicationCode', 'applicationDetail_applicationCode' - Returns the application code that you provided to perform data analysis
-- on any of the in-application streams in your application.
--
-- 'createTimestamp', 'applicationDetail_createTimestamp' - Time stamp when the application version was created.
--
-- 'lastUpdateTimestamp', 'applicationDetail_lastUpdateTimestamp' - Time stamp when the application was last updated.
--
-- 'applicationName', 'applicationDetail_applicationName' - Name of the application.
--
-- 'applicationARN', 'applicationDetail_applicationARN' - ARN of the application.
--
-- 'applicationStatus', 'applicationDetail_applicationStatus' - Status of the application.
--
-- 'applicationVersionId', 'applicationDetail_applicationVersionId' - Provides the current application version.
newApplicationDetail ::
  -- | 'applicationName'
  Prelude.Text ->
  -- | 'applicationARN'
  Prelude.Text ->
  -- | 'applicationStatus'
  ApplicationStatus ->
  -- | 'applicationVersionId'
  Prelude.Natural ->
  ApplicationDetail
newApplicationDetail :: Text -> Text -> ApplicationStatus -> Natural -> ApplicationDetail
newApplicationDetail
  Text
pApplicationName_
  Text
pApplicationARN_
  ApplicationStatus
pApplicationStatus_
  Natural
pApplicationVersionId_ =
    ApplicationDetail' :: Maybe Text
-> Maybe [OutputDescription]
-> Maybe [CloudWatchLoggingOptionDescription]
-> Maybe [ReferenceDataSourceDescription]
-> Maybe [InputDescription]
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Text
-> Text
-> ApplicationStatus
-> Natural
-> ApplicationDetail
ApplicationDetail'
      { $sel:applicationDescription:ApplicationDetail' :: Maybe Text
applicationDescription =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:outputDescriptions:ApplicationDetail' :: Maybe [OutputDescription]
outputDescriptions = Maybe [OutputDescription]
forall a. Maybe a
Prelude.Nothing,
        $sel:cloudWatchLoggingOptionDescriptions:ApplicationDetail' :: Maybe [CloudWatchLoggingOptionDescription]
cloudWatchLoggingOptionDescriptions =
          Maybe [CloudWatchLoggingOptionDescription]
forall a. Maybe a
Prelude.Nothing,
        $sel:referenceDataSourceDescriptions:ApplicationDetail' :: Maybe [ReferenceDataSourceDescription]
referenceDataSourceDescriptions = Maybe [ReferenceDataSourceDescription]
forall a. Maybe a
Prelude.Nothing,
        $sel:inputDescriptions:ApplicationDetail' :: Maybe [InputDescription]
inputDescriptions = Maybe [InputDescription]
forall a. Maybe a
Prelude.Nothing,
        $sel:applicationCode:ApplicationDetail' :: Maybe Text
applicationCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:createTimestamp:ApplicationDetail' :: Maybe POSIX
createTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:lastUpdateTimestamp:ApplicationDetail' :: Maybe POSIX
lastUpdateTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:applicationName:ApplicationDetail' :: Text
applicationName = Text
pApplicationName_,
        $sel:applicationARN:ApplicationDetail' :: Text
applicationARN = Text
pApplicationARN_,
        $sel:applicationStatus:ApplicationDetail' :: ApplicationStatus
applicationStatus = ApplicationStatus
pApplicationStatus_,
        $sel:applicationVersionId:ApplicationDetail' :: Natural
applicationVersionId = Natural
pApplicationVersionId_
      }

-- | Description of the application.
applicationDetail_applicationDescription :: Lens.Lens' ApplicationDetail (Prelude.Maybe Prelude.Text)
applicationDetail_applicationDescription :: (Maybe Text -> f (Maybe Text))
-> ApplicationDetail -> f ApplicationDetail
applicationDetail_applicationDescription = (ApplicationDetail -> Maybe Text)
-> (ApplicationDetail -> Maybe Text -> ApplicationDetail)
-> Lens
     ApplicationDetail ApplicationDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDetail' {Maybe Text
applicationDescription :: Maybe Text
$sel:applicationDescription:ApplicationDetail' :: ApplicationDetail -> Maybe Text
applicationDescription} -> Maybe Text
applicationDescription) (\s :: ApplicationDetail
s@ApplicationDetail' {} Maybe Text
a -> ApplicationDetail
s {$sel:applicationDescription:ApplicationDetail' :: Maybe Text
applicationDescription = Maybe Text
a} :: ApplicationDetail)

-- | Describes the application output configuration. For more information,
-- see
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html Configuring Application Output>.
applicationDetail_outputDescriptions :: Lens.Lens' ApplicationDetail (Prelude.Maybe [OutputDescription])
applicationDetail_outputDescriptions :: (Maybe [OutputDescription] -> f (Maybe [OutputDescription]))
-> ApplicationDetail -> f ApplicationDetail
applicationDetail_outputDescriptions = (ApplicationDetail -> Maybe [OutputDescription])
-> (ApplicationDetail
    -> Maybe [OutputDescription] -> ApplicationDetail)
-> Lens
     ApplicationDetail
     ApplicationDetail
     (Maybe [OutputDescription])
     (Maybe [OutputDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDetail' {Maybe [OutputDescription]
outputDescriptions :: Maybe [OutputDescription]
$sel:outputDescriptions:ApplicationDetail' :: ApplicationDetail -> Maybe [OutputDescription]
outputDescriptions} -> Maybe [OutputDescription]
outputDescriptions) (\s :: ApplicationDetail
s@ApplicationDetail' {} Maybe [OutputDescription]
a -> ApplicationDetail
s {$sel:outputDescriptions:ApplicationDetail' :: Maybe [OutputDescription]
outputDescriptions = Maybe [OutputDescription]
a} :: ApplicationDetail) ((Maybe [OutputDescription] -> f (Maybe [OutputDescription]))
 -> ApplicationDetail -> f ApplicationDetail)
-> ((Maybe [OutputDescription] -> f (Maybe [OutputDescription]))
    -> Maybe [OutputDescription] -> f (Maybe [OutputDescription]))
-> (Maybe [OutputDescription] -> f (Maybe [OutputDescription]))
-> ApplicationDetail
-> f ApplicationDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [OutputDescription]
  [OutputDescription]
  [OutputDescription]
  [OutputDescription]
-> Iso
     (Maybe [OutputDescription])
     (Maybe [OutputDescription])
     (Maybe [OutputDescription])
     (Maybe [OutputDescription])
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
  [OutputDescription]
  [OutputDescription]
  [OutputDescription]
  [OutputDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Describes the CloudWatch log streams that are configured to receive
-- application messages. For more information about using CloudWatch log
-- streams with Amazon Kinesis Analytics applications, see
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/cloudwatch-logs.html Working with Amazon CloudWatch Logs>.
applicationDetail_cloudWatchLoggingOptionDescriptions :: Lens.Lens' ApplicationDetail (Prelude.Maybe [CloudWatchLoggingOptionDescription])
applicationDetail_cloudWatchLoggingOptionDescriptions :: (Maybe [CloudWatchLoggingOptionDescription]
 -> f (Maybe [CloudWatchLoggingOptionDescription]))
-> ApplicationDetail -> f ApplicationDetail
applicationDetail_cloudWatchLoggingOptionDescriptions = (ApplicationDetail -> Maybe [CloudWatchLoggingOptionDescription])
-> (ApplicationDetail
    -> Maybe [CloudWatchLoggingOptionDescription] -> ApplicationDetail)
-> Lens
     ApplicationDetail
     ApplicationDetail
     (Maybe [CloudWatchLoggingOptionDescription])
     (Maybe [CloudWatchLoggingOptionDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDetail' {Maybe [CloudWatchLoggingOptionDescription]
cloudWatchLoggingOptionDescriptions :: Maybe [CloudWatchLoggingOptionDescription]
$sel:cloudWatchLoggingOptionDescriptions:ApplicationDetail' :: ApplicationDetail -> Maybe [CloudWatchLoggingOptionDescription]
cloudWatchLoggingOptionDescriptions} -> Maybe [CloudWatchLoggingOptionDescription]
cloudWatchLoggingOptionDescriptions) (\s :: ApplicationDetail
s@ApplicationDetail' {} Maybe [CloudWatchLoggingOptionDescription]
a -> ApplicationDetail
s {$sel:cloudWatchLoggingOptionDescriptions:ApplicationDetail' :: Maybe [CloudWatchLoggingOptionDescription]
cloudWatchLoggingOptionDescriptions = Maybe [CloudWatchLoggingOptionDescription]
a} :: ApplicationDetail) ((Maybe [CloudWatchLoggingOptionDescription]
  -> f (Maybe [CloudWatchLoggingOptionDescription]))
 -> ApplicationDetail -> f ApplicationDetail)
-> ((Maybe [CloudWatchLoggingOptionDescription]
     -> f (Maybe [CloudWatchLoggingOptionDescription]))
    -> Maybe [CloudWatchLoggingOptionDescription]
    -> f (Maybe [CloudWatchLoggingOptionDescription]))
-> (Maybe [CloudWatchLoggingOptionDescription]
    -> f (Maybe [CloudWatchLoggingOptionDescription]))
-> ApplicationDetail
-> f ApplicationDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [CloudWatchLoggingOptionDescription]
  [CloudWatchLoggingOptionDescription]
  [CloudWatchLoggingOptionDescription]
  [CloudWatchLoggingOptionDescription]
-> Iso
     (Maybe [CloudWatchLoggingOptionDescription])
     (Maybe [CloudWatchLoggingOptionDescription])
     (Maybe [CloudWatchLoggingOptionDescription])
     (Maybe [CloudWatchLoggingOptionDescription])
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
  [CloudWatchLoggingOptionDescription]
  [CloudWatchLoggingOptionDescription]
  [CloudWatchLoggingOptionDescription]
  [CloudWatchLoggingOptionDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Describes reference data sources configured for the application. For
-- more information, see
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html Configuring Application Input>.
applicationDetail_referenceDataSourceDescriptions :: Lens.Lens' ApplicationDetail (Prelude.Maybe [ReferenceDataSourceDescription])
applicationDetail_referenceDataSourceDescriptions :: (Maybe [ReferenceDataSourceDescription]
 -> f (Maybe [ReferenceDataSourceDescription]))
-> ApplicationDetail -> f ApplicationDetail
applicationDetail_referenceDataSourceDescriptions = (ApplicationDetail -> Maybe [ReferenceDataSourceDescription])
-> (ApplicationDetail
    -> Maybe [ReferenceDataSourceDescription] -> ApplicationDetail)
-> Lens
     ApplicationDetail
     ApplicationDetail
     (Maybe [ReferenceDataSourceDescription])
     (Maybe [ReferenceDataSourceDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDetail' {Maybe [ReferenceDataSourceDescription]
referenceDataSourceDescriptions :: Maybe [ReferenceDataSourceDescription]
$sel:referenceDataSourceDescriptions:ApplicationDetail' :: ApplicationDetail -> Maybe [ReferenceDataSourceDescription]
referenceDataSourceDescriptions} -> Maybe [ReferenceDataSourceDescription]
referenceDataSourceDescriptions) (\s :: ApplicationDetail
s@ApplicationDetail' {} Maybe [ReferenceDataSourceDescription]
a -> ApplicationDetail
s {$sel:referenceDataSourceDescriptions:ApplicationDetail' :: Maybe [ReferenceDataSourceDescription]
referenceDataSourceDescriptions = Maybe [ReferenceDataSourceDescription]
a} :: ApplicationDetail) ((Maybe [ReferenceDataSourceDescription]
  -> f (Maybe [ReferenceDataSourceDescription]))
 -> ApplicationDetail -> f ApplicationDetail)
-> ((Maybe [ReferenceDataSourceDescription]
     -> f (Maybe [ReferenceDataSourceDescription]))
    -> Maybe [ReferenceDataSourceDescription]
    -> f (Maybe [ReferenceDataSourceDescription]))
-> (Maybe [ReferenceDataSourceDescription]
    -> f (Maybe [ReferenceDataSourceDescription]))
-> ApplicationDetail
-> f ApplicationDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ReferenceDataSourceDescription]
  [ReferenceDataSourceDescription]
  [ReferenceDataSourceDescription]
  [ReferenceDataSourceDescription]
-> Iso
     (Maybe [ReferenceDataSourceDescription])
     (Maybe [ReferenceDataSourceDescription])
     (Maybe [ReferenceDataSourceDescription])
     (Maybe [ReferenceDataSourceDescription])
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
  [ReferenceDataSourceDescription]
  [ReferenceDataSourceDescription]
  [ReferenceDataSourceDescription]
  [ReferenceDataSourceDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Describes the application input configuration. For more information, see
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html Configuring Application Input>.
applicationDetail_inputDescriptions :: Lens.Lens' ApplicationDetail (Prelude.Maybe [InputDescription])
applicationDetail_inputDescriptions :: (Maybe [InputDescription] -> f (Maybe [InputDescription]))
-> ApplicationDetail -> f ApplicationDetail
applicationDetail_inputDescriptions = (ApplicationDetail -> Maybe [InputDescription])
-> (ApplicationDetail
    -> Maybe [InputDescription] -> ApplicationDetail)
-> Lens
     ApplicationDetail
     ApplicationDetail
     (Maybe [InputDescription])
     (Maybe [InputDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDetail' {Maybe [InputDescription]
inputDescriptions :: Maybe [InputDescription]
$sel:inputDescriptions:ApplicationDetail' :: ApplicationDetail -> Maybe [InputDescription]
inputDescriptions} -> Maybe [InputDescription]
inputDescriptions) (\s :: ApplicationDetail
s@ApplicationDetail' {} Maybe [InputDescription]
a -> ApplicationDetail
s {$sel:inputDescriptions:ApplicationDetail' :: Maybe [InputDescription]
inputDescriptions = Maybe [InputDescription]
a} :: ApplicationDetail) ((Maybe [InputDescription] -> f (Maybe [InputDescription]))
 -> ApplicationDetail -> f ApplicationDetail)
-> ((Maybe [InputDescription] -> f (Maybe [InputDescription]))
    -> Maybe [InputDescription] -> f (Maybe [InputDescription]))
-> (Maybe [InputDescription] -> f (Maybe [InputDescription]))
-> ApplicationDetail
-> f ApplicationDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InputDescription]
  [InputDescription]
  [InputDescription]
  [InputDescription]
-> Iso
     (Maybe [InputDescription])
     (Maybe [InputDescription])
     (Maybe [InputDescription])
     (Maybe [InputDescription])
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
  [InputDescription]
  [InputDescription]
  [InputDescription]
  [InputDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Returns the application code that you provided to perform data analysis
-- on any of the in-application streams in your application.
applicationDetail_applicationCode :: Lens.Lens' ApplicationDetail (Prelude.Maybe Prelude.Text)
applicationDetail_applicationCode :: (Maybe Text -> f (Maybe Text))
-> ApplicationDetail -> f ApplicationDetail
applicationDetail_applicationCode = (ApplicationDetail -> Maybe Text)
-> (ApplicationDetail -> Maybe Text -> ApplicationDetail)
-> Lens
     ApplicationDetail ApplicationDetail (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDetail' {Maybe Text
applicationCode :: Maybe Text
$sel:applicationCode:ApplicationDetail' :: ApplicationDetail -> Maybe Text
applicationCode} -> Maybe Text
applicationCode) (\s :: ApplicationDetail
s@ApplicationDetail' {} Maybe Text
a -> ApplicationDetail
s {$sel:applicationCode:ApplicationDetail' :: Maybe Text
applicationCode = Maybe Text
a} :: ApplicationDetail)

-- | Time stamp when the application version was created.
applicationDetail_createTimestamp :: Lens.Lens' ApplicationDetail (Prelude.Maybe Prelude.UTCTime)
applicationDetail_createTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ApplicationDetail -> f ApplicationDetail
applicationDetail_createTimestamp = (ApplicationDetail -> Maybe POSIX)
-> (ApplicationDetail -> Maybe POSIX -> ApplicationDetail)
-> Lens
     ApplicationDetail ApplicationDetail (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDetail' {Maybe POSIX
createTimestamp :: Maybe POSIX
$sel:createTimestamp:ApplicationDetail' :: ApplicationDetail -> Maybe POSIX
createTimestamp} -> Maybe POSIX
createTimestamp) (\s :: ApplicationDetail
s@ApplicationDetail' {} Maybe POSIX
a -> ApplicationDetail
s {$sel:createTimestamp:ApplicationDetail' :: Maybe POSIX
createTimestamp = Maybe POSIX
a} :: ApplicationDetail) ((Maybe POSIX -> f (Maybe POSIX))
 -> ApplicationDetail -> f ApplicationDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ApplicationDetail
-> f ApplicationDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Time stamp when the application was last updated.
applicationDetail_lastUpdateTimestamp :: Lens.Lens' ApplicationDetail (Prelude.Maybe Prelude.UTCTime)
applicationDetail_lastUpdateTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ApplicationDetail -> f ApplicationDetail
applicationDetail_lastUpdateTimestamp = (ApplicationDetail -> Maybe POSIX)
-> (ApplicationDetail -> Maybe POSIX -> ApplicationDetail)
-> Lens
     ApplicationDetail ApplicationDetail (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDetail' {Maybe POSIX
lastUpdateTimestamp :: Maybe POSIX
$sel:lastUpdateTimestamp:ApplicationDetail' :: ApplicationDetail -> Maybe POSIX
lastUpdateTimestamp} -> Maybe POSIX
lastUpdateTimestamp) (\s :: ApplicationDetail
s@ApplicationDetail' {} Maybe POSIX
a -> ApplicationDetail
s {$sel:lastUpdateTimestamp:ApplicationDetail' :: Maybe POSIX
lastUpdateTimestamp = Maybe POSIX
a} :: ApplicationDetail) ((Maybe POSIX -> f (Maybe POSIX))
 -> ApplicationDetail -> f ApplicationDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ApplicationDetail
-> f ApplicationDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Name of the application.
applicationDetail_applicationName :: Lens.Lens' ApplicationDetail Prelude.Text
applicationDetail_applicationName :: (Text -> f Text) -> ApplicationDetail -> f ApplicationDetail
applicationDetail_applicationName = (ApplicationDetail -> Text)
-> (ApplicationDetail -> Text -> ApplicationDetail)
-> Lens ApplicationDetail ApplicationDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDetail' {Text
applicationName :: Text
$sel:applicationName:ApplicationDetail' :: ApplicationDetail -> Text
applicationName} -> Text
applicationName) (\s :: ApplicationDetail
s@ApplicationDetail' {} Text
a -> ApplicationDetail
s {$sel:applicationName:ApplicationDetail' :: Text
applicationName = Text
a} :: ApplicationDetail)

-- | ARN of the application.
applicationDetail_applicationARN :: Lens.Lens' ApplicationDetail Prelude.Text
applicationDetail_applicationARN :: (Text -> f Text) -> ApplicationDetail -> f ApplicationDetail
applicationDetail_applicationARN = (ApplicationDetail -> Text)
-> (ApplicationDetail -> Text -> ApplicationDetail)
-> Lens ApplicationDetail ApplicationDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDetail' {Text
applicationARN :: Text
$sel:applicationARN:ApplicationDetail' :: ApplicationDetail -> Text
applicationARN} -> Text
applicationARN) (\s :: ApplicationDetail
s@ApplicationDetail' {} Text
a -> ApplicationDetail
s {$sel:applicationARN:ApplicationDetail' :: Text
applicationARN = Text
a} :: ApplicationDetail)

-- | Status of the application.
applicationDetail_applicationStatus :: Lens.Lens' ApplicationDetail ApplicationStatus
applicationDetail_applicationStatus :: (ApplicationStatus -> f ApplicationStatus)
-> ApplicationDetail -> f ApplicationDetail
applicationDetail_applicationStatus = (ApplicationDetail -> ApplicationStatus)
-> (ApplicationDetail -> ApplicationStatus -> ApplicationDetail)
-> Lens
     ApplicationDetail
     ApplicationDetail
     ApplicationStatus
     ApplicationStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDetail' {ApplicationStatus
applicationStatus :: ApplicationStatus
$sel:applicationStatus:ApplicationDetail' :: ApplicationDetail -> ApplicationStatus
applicationStatus} -> ApplicationStatus
applicationStatus) (\s :: ApplicationDetail
s@ApplicationDetail' {} ApplicationStatus
a -> ApplicationDetail
s {$sel:applicationStatus:ApplicationDetail' :: ApplicationStatus
applicationStatus = ApplicationStatus
a} :: ApplicationDetail)

-- | Provides the current application version.
applicationDetail_applicationVersionId :: Lens.Lens' ApplicationDetail Prelude.Natural
applicationDetail_applicationVersionId :: (Natural -> f Natural) -> ApplicationDetail -> f ApplicationDetail
applicationDetail_applicationVersionId = (ApplicationDetail -> Natural)
-> (ApplicationDetail -> Natural -> ApplicationDetail)
-> Lens ApplicationDetail ApplicationDetail Natural Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationDetail' {Natural
applicationVersionId :: Natural
$sel:applicationVersionId:ApplicationDetail' :: ApplicationDetail -> Natural
applicationVersionId} -> Natural
applicationVersionId) (\s :: ApplicationDetail
s@ApplicationDetail' {} Natural
a -> ApplicationDetail
s {$sel:applicationVersionId:ApplicationDetail' :: Natural
applicationVersionId = Natural
a} :: ApplicationDetail)

instance Core.FromJSON ApplicationDetail where
  parseJSON :: Value -> Parser ApplicationDetail
parseJSON =
    String
-> (Object -> Parser ApplicationDetail)
-> Value
-> Parser ApplicationDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ApplicationDetail"
      ( \Object
x ->
          Maybe Text
-> Maybe [OutputDescription]
-> Maybe [CloudWatchLoggingOptionDescription]
-> Maybe [ReferenceDataSourceDescription]
-> Maybe [InputDescription]
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Text
-> Text
-> ApplicationStatus
-> Natural
-> ApplicationDetail
ApplicationDetail'
            (Maybe Text
 -> Maybe [OutputDescription]
 -> Maybe [CloudWatchLoggingOptionDescription]
 -> Maybe [ReferenceDataSourceDescription]
 -> Maybe [InputDescription]
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Text
 -> Text
 -> ApplicationStatus
 -> Natural
 -> ApplicationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe [OutputDescription]
      -> Maybe [CloudWatchLoggingOptionDescription]
      -> Maybe [ReferenceDataSourceDescription]
      -> Maybe [InputDescription]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Text
      -> Text
      -> ApplicationStatus
      -> Natural
      -> ApplicationDetail)
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
"ApplicationDescription")
            Parser
  (Maybe [OutputDescription]
   -> Maybe [CloudWatchLoggingOptionDescription]
   -> Maybe [ReferenceDataSourceDescription]
   -> Maybe [InputDescription]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Text
   -> Text
   -> ApplicationStatus
   -> Natural
   -> ApplicationDetail)
-> Parser (Maybe [OutputDescription])
-> Parser
     (Maybe [CloudWatchLoggingOptionDescription]
      -> Maybe [ReferenceDataSourceDescription]
      -> Maybe [InputDescription]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Text
      -> Text
      -> ApplicationStatus
      -> Natural
      -> ApplicationDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [OutputDescription]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputDescriptions"
                            Parser (Maybe (Maybe [OutputDescription]))
-> Maybe [OutputDescription] -> Parser (Maybe [OutputDescription])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [OutputDescription]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe [CloudWatchLoggingOptionDescription]
   -> Maybe [ReferenceDataSourceDescription]
   -> Maybe [InputDescription]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Text
   -> Text
   -> ApplicationStatus
   -> Natural
   -> ApplicationDetail)
-> Parser (Maybe [CloudWatchLoggingOptionDescription])
-> Parser
     (Maybe [ReferenceDataSourceDescription]
      -> Maybe [InputDescription]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Text
      -> Text
      -> ApplicationStatus
      -> Natural
      -> ApplicationDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe [CloudWatchLoggingOptionDescription]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CloudWatchLoggingOptionDescriptions"
                            Parser (Maybe (Maybe [CloudWatchLoggingOptionDescription]))
-> Maybe [CloudWatchLoggingOptionDescription]
-> Parser (Maybe [CloudWatchLoggingOptionDescription])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [CloudWatchLoggingOptionDescription]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe [ReferenceDataSourceDescription]
   -> Maybe [InputDescription]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Text
   -> Text
   -> ApplicationStatus
   -> Natural
   -> ApplicationDetail)
-> Parser (Maybe [ReferenceDataSourceDescription])
-> Parser
     (Maybe [InputDescription]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Text
      -> Text
      -> ApplicationStatus
      -> Natural
      -> ApplicationDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [ReferenceDataSourceDescription]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ReferenceDataSourceDescriptions"
                            Parser (Maybe (Maybe [ReferenceDataSourceDescription]))
-> Maybe [ReferenceDataSourceDescription]
-> Parser (Maybe [ReferenceDataSourceDescription])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ReferenceDataSourceDescription]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe [InputDescription]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Text
   -> Text
   -> ApplicationStatus
   -> Natural
   -> ApplicationDetail)
-> Parser (Maybe [InputDescription])
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Text
      -> Text
      -> ApplicationStatus
      -> Natural
      -> ApplicationDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [InputDescription]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InputDescriptions"
                            Parser (Maybe (Maybe [InputDescription]))
-> Maybe [InputDescription] -> Parser (Maybe [InputDescription])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [InputDescription]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Text
   -> Text
   -> ApplicationStatus
   -> Natural
   -> ApplicationDetail)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Text
      -> Text
      -> ApplicationStatus
      -> Natural
      -> ApplicationDetail)
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
"ApplicationCode")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Text
   -> Text
   -> ApplicationStatus
   -> Natural
   -> ApplicationDetail)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Text
      -> Text
      -> ApplicationStatus
      -> Natural
      -> ApplicationDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreateTimestamp")
            Parser
  (Maybe POSIX
   -> Text
   -> Text
   -> ApplicationStatus
   -> Natural
   -> ApplicationDetail)
-> Parser (Maybe POSIX)
-> Parser
     (Text -> Text -> ApplicationStatus -> Natural -> ApplicationDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdateTimestamp")
            Parser
  (Text -> Text -> ApplicationStatus -> Natural -> ApplicationDetail)
-> Parser Text
-> Parser
     (Text -> ApplicationStatus -> Natural -> ApplicationDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ApplicationName")
            Parser (Text -> ApplicationStatus -> Natural -> ApplicationDetail)
-> Parser Text
-> Parser (ApplicationStatus -> Natural -> ApplicationDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ApplicationARN")
            Parser (ApplicationStatus -> Natural -> ApplicationDetail)
-> Parser ApplicationStatus
-> Parser (Natural -> ApplicationDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ApplicationStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ApplicationStatus")
            Parser (Natural -> ApplicationDetail)
-> Parser Natural -> Parser ApplicationDetail
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Natural
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ApplicationVersionId")
      )

instance Prelude.Hashable ApplicationDetail

instance Prelude.NFData ApplicationDetail