{-# 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.MGN.Types.Application
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MGN.Types.Application where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MGN.Types.ApplicationAggregatedStatus
import qualified Amazonka.Prelude as Prelude

-- | /See:/ 'newApplication' smart constructor.
data Application = Application'
  { -- | Application aggregated status.
    Application -> Maybe ApplicationAggregatedStatus
applicationAggregatedStatus :: Prelude.Maybe ApplicationAggregatedStatus,
    -- | Application ID.
    Application -> Maybe Text
applicationID :: Prelude.Maybe Prelude.Text,
    -- | Application ARN.
    Application -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Application creation dateTime.
    Application -> Maybe Text
creationDateTime :: Prelude.Maybe Prelude.Text,
    -- | Application description.
    Application -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Application archival status.
    Application -> Maybe Bool
isArchived :: Prelude.Maybe Prelude.Bool,
    -- | Application last modified dateTime.
    Application -> Maybe Text
lastModifiedDateTime :: Prelude.Maybe Prelude.Text,
    -- | Application name.
    Application -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Application tags.
    Application -> Maybe (Sensitive (HashMap Text Text))
tags :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | Application wave ID.
    Application -> Maybe Text
waveID :: Prelude.Maybe Prelude.Text
  }
  deriving (Application -> Application -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Application -> Application -> Bool
$c/= :: Application -> Application -> Bool
== :: Application -> Application -> Bool
$c== :: Application -> Application -> Bool
Prelude.Eq, Int -> Application -> ShowS
[Application] -> ShowS
Application -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Application] -> ShowS
$cshowList :: [Application] -> ShowS
show :: Application -> String
$cshow :: Application -> String
showsPrec :: Int -> Application -> ShowS
$cshowsPrec :: Int -> Application -> ShowS
Prelude.Show, forall x. Rep Application x -> Application
forall x. Application -> Rep Application x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Application x -> Application
$cfrom :: forall x. Application -> Rep Application x
Prelude.Generic)

-- |
-- Create a value of 'Application' 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:
--
-- 'applicationAggregatedStatus', 'application_applicationAggregatedStatus' - Application aggregated status.
--
-- 'applicationID', 'application_applicationID' - Application ID.
--
-- 'arn', 'application_arn' - Application ARN.
--
-- 'creationDateTime', 'application_creationDateTime' - Application creation dateTime.
--
-- 'description', 'application_description' - Application description.
--
-- 'isArchived', 'application_isArchived' - Application archival status.
--
-- 'lastModifiedDateTime', 'application_lastModifiedDateTime' - Application last modified dateTime.
--
-- 'name', 'application_name' - Application name.
--
-- 'tags', 'application_tags' - Application tags.
--
-- 'waveID', 'application_waveID' - Application wave ID.
newApplication ::
  Application
newApplication :: Application
newApplication =
  Application'
    { $sel:applicationAggregatedStatus:Application' :: Maybe ApplicationAggregatedStatus
applicationAggregatedStatus =
        forall a. Maybe a
Prelude.Nothing,
      $sel:applicationID:Application' :: Maybe Text
applicationID = forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Application' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:creationDateTime:Application' :: Maybe Text
creationDateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:description:Application' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:isArchived:Application' :: Maybe Bool
isArchived = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedDateTime:Application' :: Maybe Text
lastModifiedDateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:name:Application' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Application' :: Maybe (Sensitive (HashMap Text Text))
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:waveID:Application' :: Maybe Text
waveID = forall a. Maybe a
Prelude.Nothing
    }

-- | Application aggregated status.
application_applicationAggregatedStatus :: Lens.Lens' Application (Prelude.Maybe ApplicationAggregatedStatus)
application_applicationAggregatedStatus :: Lens' Application (Maybe ApplicationAggregatedStatus)
application_applicationAggregatedStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe ApplicationAggregatedStatus
applicationAggregatedStatus :: Maybe ApplicationAggregatedStatus
$sel:applicationAggregatedStatus:Application' :: Application -> Maybe ApplicationAggregatedStatus
applicationAggregatedStatus} -> Maybe ApplicationAggregatedStatus
applicationAggregatedStatus) (\s :: Application
s@Application' {} Maybe ApplicationAggregatedStatus
a -> Application
s {$sel:applicationAggregatedStatus:Application' :: Maybe ApplicationAggregatedStatus
applicationAggregatedStatus = Maybe ApplicationAggregatedStatus
a} :: Application)

-- | Application ID.
application_applicationID :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_applicationID :: Lens' Application (Maybe Text)
application_applicationID = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Text
applicationID :: Maybe Text
$sel:applicationID:Application' :: Application -> Maybe Text
applicationID} -> Maybe Text
applicationID) (\s :: Application
s@Application' {} Maybe Text
a -> Application
s {$sel:applicationID:Application' :: Maybe Text
applicationID = Maybe Text
a} :: Application)

-- | Application ARN.
application_arn :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_arn :: Lens' Application (Maybe Text)
application_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Text
arn :: Maybe Text
$sel:arn:Application' :: Application -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Application
s@Application' {} Maybe Text
a -> Application
s {$sel:arn:Application' :: Maybe Text
arn = Maybe Text
a} :: Application)

-- | Application creation dateTime.
application_creationDateTime :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_creationDateTime :: Lens' Application (Maybe Text)
application_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Text
creationDateTime :: Maybe Text
$sel:creationDateTime:Application' :: Application -> Maybe Text
creationDateTime} -> Maybe Text
creationDateTime) (\s :: Application
s@Application' {} Maybe Text
a -> Application
s {$sel:creationDateTime:Application' :: Maybe Text
creationDateTime = Maybe Text
a} :: Application)

-- | Application description.
application_description :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_description :: Lens' Application (Maybe Text)
application_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Text
description :: Maybe Text
$sel:description:Application' :: Application -> Maybe Text
description} -> Maybe Text
description) (\s :: Application
s@Application' {} Maybe Text
a -> Application
s {$sel:description:Application' :: Maybe Text
description = Maybe Text
a} :: Application)

-- | Application archival status.
application_isArchived :: Lens.Lens' Application (Prelude.Maybe Prelude.Bool)
application_isArchived :: Lens' Application (Maybe Bool)
application_isArchived = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Bool
isArchived :: Maybe Bool
$sel:isArchived:Application' :: Application -> Maybe Bool
isArchived} -> Maybe Bool
isArchived) (\s :: Application
s@Application' {} Maybe Bool
a -> Application
s {$sel:isArchived:Application' :: Maybe Bool
isArchived = Maybe Bool
a} :: Application)

-- | Application last modified dateTime.
application_lastModifiedDateTime :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_lastModifiedDateTime :: Lens' Application (Maybe Text)
application_lastModifiedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Text
lastModifiedDateTime :: Maybe Text
$sel:lastModifiedDateTime:Application' :: Application -> Maybe Text
lastModifiedDateTime} -> Maybe Text
lastModifiedDateTime) (\s :: Application
s@Application' {} Maybe Text
a -> Application
s {$sel:lastModifiedDateTime:Application' :: Maybe Text
lastModifiedDateTime = Maybe Text
a} :: Application)

-- | Application name.
application_name :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_name :: Lens' Application (Maybe Text)
application_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Text
name :: Maybe Text
$sel:name:Application' :: Application -> Maybe Text
name} -> Maybe Text
name) (\s :: Application
s@Application' {} Maybe Text
a -> Application
s {$sel:name:Application' :: Maybe Text
name = Maybe Text
a} :: Application)

-- | Application tags.
application_tags :: Lens.Lens' Application (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
application_tags :: Lens' Application (Maybe (HashMap Text Text))
application_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe (Sensitive (HashMap Text Text))
tags :: Maybe (Sensitive (HashMap Text Text))
$sel:tags:Application' :: Application -> Maybe (Sensitive (HashMap Text Text))
tags} -> Maybe (Sensitive (HashMap Text Text))
tags) (\s :: Application
s@Application' {} Maybe (Sensitive (HashMap Text Text))
a -> Application
s {$sel:tags:Application' :: Maybe (Sensitive (HashMap Text Text))
tags = Maybe (Sensitive (HashMap Text Text))
a} :: Application) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 (forall a. Iso' (Sensitive a) a
Data._Sensitive forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

-- | Application wave ID.
application_waveID :: Lens.Lens' Application (Prelude.Maybe Prelude.Text)
application_waveID :: Lens' Application (Maybe Text)
application_waveID = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Application' {Maybe Text
waveID :: Maybe Text
$sel:waveID:Application' :: Application -> Maybe Text
waveID} -> Maybe Text
waveID) (\s :: Application
s@Application' {} Maybe Text
a -> Application
s {$sel:waveID:Application' :: Maybe Text
waveID = Maybe Text
a} :: Application)

instance Data.FromJSON Application where
  parseJSON :: Value -> Parser Application
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Application"
      ( \Object
x ->
          Maybe ApplicationAggregatedStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe (Sensitive (HashMap Text Text))
-> Maybe Text
-> Application
Application'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"applicationAggregatedStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"applicationID")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"creationDateTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"isArchived")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"lastModifiedDateTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"waveID")
      )

instance Prelude.Hashable Application where
  hashWithSalt :: Int -> Application -> Int
hashWithSalt Int
_salt Application' {Maybe Bool
Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe ApplicationAggregatedStatus
waveID :: Maybe Text
tags :: Maybe (Sensitive (HashMap Text Text))
name :: Maybe Text
lastModifiedDateTime :: Maybe Text
isArchived :: Maybe Bool
description :: Maybe Text
creationDateTime :: Maybe Text
arn :: Maybe Text
applicationID :: Maybe Text
applicationAggregatedStatus :: Maybe ApplicationAggregatedStatus
$sel:waveID:Application' :: Application -> Maybe Text
$sel:tags:Application' :: Application -> Maybe (Sensitive (HashMap Text Text))
$sel:name:Application' :: Application -> Maybe Text
$sel:lastModifiedDateTime:Application' :: Application -> Maybe Text
$sel:isArchived:Application' :: Application -> Maybe Bool
$sel:description:Application' :: Application -> Maybe Text
$sel:creationDateTime:Application' :: Application -> Maybe Text
$sel:arn:Application' :: Application -> Maybe Text
$sel:applicationID:Application' :: Application -> Maybe Text
$sel:applicationAggregatedStatus:Application' :: Application -> Maybe ApplicationAggregatedStatus
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ApplicationAggregatedStatus
applicationAggregatedStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
applicationID
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
creationDateTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isArchived
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastModifiedDateTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive (HashMap Text Text))
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
waveID

instance Prelude.NFData Application where
  rnf :: Application -> ()
rnf Application' {Maybe Bool
Maybe Text
Maybe (Sensitive (HashMap Text Text))
Maybe ApplicationAggregatedStatus
waveID :: Maybe Text
tags :: Maybe (Sensitive (HashMap Text Text))
name :: Maybe Text
lastModifiedDateTime :: Maybe Text
isArchived :: Maybe Bool
description :: Maybe Text
creationDateTime :: Maybe Text
arn :: Maybe Text
applicationID :: Maybe Text
applicationAggregatedStatus :: Maybe ApplicationAggregatedStatus
$sel:waveID:Application' :: Application -> Maybe Text
$sel:tags:Application' :: Application -> Maybe (Sensitive (HashMap Text Text))
$sel:name:Application' :: Application -> Maybe Text
$sel:lastModifiedDateTime:Application' :: Application -> Maybe Text
$sel:isArchived:Application' :: Application -> Maybe Bool
$sel:description:Application' :: Application -> Maybe Text
$sel:creationDateTime:Application' :: Application -> Maybe Text
$sel:arn:Application' :: Application -> Maybe Text
$sel:applicationID:Application' :: Application -> Maybe Text
$sel:applicationAggregatedStatus:Application' :: Application -> Maybe ApplicationAggregatedStatus
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ApplicationAggregatedStatus
applicationAggregatedStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
applicationID
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
creationDateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isArchived
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastModifiedDateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive (HashMap Text Text))
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
waveID