{-# 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.ServiceCatalogAppRegistry.Types.ApplicationSummary
-- 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.ServiceCatalogAppRegistry.Types.ApplicationSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Summary of a Amazon Web Services Service Catalog AppRegistry
-- application.
--
-- /See:/ 'newApplicationSummary' smart constructor.
data ApplicationSummary = ApplicationSummary'
  { -- | The Amazon resource name (ARN) that specifies the application across
    -- services.
    ApplicationSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The ISO-8601 formatted timestamp of the moment when the application was
    -- created.
    ApplicationSummary -> Maybe ISO8601
creationTime :: Prelude.Maybe Data.ISO8601,
    -- | The description of the application.
    ApplicationSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The identifier of the application.
    ApplicationSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The ISO-8601 formatted timestamp of the moment when the application was
    -- last updated.
    ApplicationSummary -> Maybe ISO8601
lastUpdateTime :: Prelude.Maybe Data.ISO8601,
    -- | The name of the application. The name must be unique in the region in
    -- which you are creating the application.
    ApplicationSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text
  }
  deriving (ApplicationSummary -> ApplicationSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationSummary -> ApplicationSummary -> Bool
$c/= :: ApplicationSummary -> ApplicationSummary -> Bool
== :: ApplicationSummary -> ApplicationSummary -> Bool
$c== :: ApplicationSummary -> ApplicationSummary -> Bool
Prelude.Eq, ReadPrec [ApplicationSummary]
ReadPrec ApplicationSummary
Int -> ReadS ApplicationSummary
ReadS [ApplicationSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationSummary]
$creadListPrec :: ReadPrec [ApplicationSummary]
readPrec :: ReadPrec ApplicationSummary
$creadPrec :: ReadPrec ApplicationSummary
readList :: ReadS [ApplicationSummary]
$creadList :: ReadS [ApplicationSummary]
readsPrec :: Int -> ReadS ApplicationSummary
$creadsPrec :: Int -> ReadS ApplicationSummary
Prelude.Read, Int -> ApplicationSummary -> ShowS
[ApplicationSummary] -> ShowS
ApplicationSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationSummary] -> ShowS
$cshowList :: [ApplicationSummary] -> ShowS
show :: ApplicationSummary -> String
$cshow :: ApplicationSummary -> String
showsPrec :: Int -> ApplicationSummary -> ShowS
$cshowsPrec :: Int -> ApplicationSummary -> ShowS
Prelude.Show, forall x. Rep ApplicationSummary x -> ApplicationSummary
forall x. ApplicationSummary -> Rep ApplicationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ApplicationSummary x -> ApplicationSummary
$cfrom :: forall x. ApplicationSummary -> Rep ApplicationSummary x
Prelude.Generic)

-- |
-- Create a value of 'ApplicationSummary' 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:
--
-- 'arn', 'applicationSummary_arn' - The Amazon resource name (ARN) that specifies the application across
-- services.
--
-- 'creationTime', 'applicationSummary_creationTime' - The ISO-8601 formatted timestamp of the moment when the application was
-- created.
--
-- 'description', 'applicationSummary_description' - The description of the application.
--
-- 'id', 'applicationSummary_id' - The identifier of the application.
--
-- 'lastUpdateTime', 'applicationSummary_lastUpdateTime' - The ISO-8601 formatted timestamp of the moment when the application was
-- last updated.
--
-- 'name', 'applicationSummary_name' - The name of the application. The name must be unique in the region in
-- which you are creating the application.
newApplicationSummary ::
  ApplicationSummary
newApplicationSummary :: ApplicationSummary
newApplicationSummary =
  ApplicationSummary'
    { $sel:arn:ApplicationSummary' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:creationTime:ApplicationSummary' :: Maybe ISO8601
creationTime = forall a. Maybe a
Prelude.Nothing,
      $sel:description:ApplicationSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:id:ApplicationSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdateTime:ApplicationSummary' :: Maybe ISO8601
lastUpdateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:name:ApplicationSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon resource name (ARN) that specifies the application across
-- services.
applicationSummary_arn :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.Text)
applicationSummary_arn :: Lens' ApplicationSummary (Maybe Text)
applicationSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:ApplicationSummary' :: ApplicationSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe Text
a -> ApplicationSummary
s {$sel:arn:ApplicationSummary' :: Maybe Text
arn = Maybe Text
a} :: ApplicationSummary)

-- | The ISO-8601 formatted timestamp of the moment when the application was
-- created.
applicationSummary_creationTime :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.UTCTime)
applicationSummary_creationTime :: Lens' ApplicationSummary (Maybe UTCTime)
applicationSummary_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe ISO8601
creationTime :: Maybe ISO8601
$sel:creationTime:ApplicationSummary' :: ApplicationSummary -> Maybe ISO8601
creationTime} -> Maybe ISO8601
creationTime) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe ISO8601
a -> ApplicationSummary
s {$sel:creationTime:ApplicationSummary' :: Maybe ISO8601
creationTime = Maybe ISO8601
a} :: ApplicationSummary) 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 :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The description of the application.
applicationSummary_description :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.Text)
applicationSummary_description :: Lens' ApplicationSummary (Maybe Text)
applicationSummary_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe Text
description :: Maybe Text
$sel:description:ApplicationSummary' :: ApplicationSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe Text
a -> ApplicationSummary
s {$sel:description:ApplicationSummary' :: Maybe Text
description = Maybe Text
a} :: ApplicationSummary)

-- | The identifier of the application.
applicationSummary_id :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.Text)
applicationSummary_id :: Lens' ApplicationSummary (Maybe Text)
applicationSummary_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe Text
id :: Maybe Text
$sel:id:ApplicationSummary' :: ApplicationSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe Text
a -> ApplicationSummary
s {$sel:id:ApplicationSummary' :: Maybe Text
id = Maybe Text
a} :: ApplicationSummary)

-- | The ISO-8601 formatted timestamp of the moment when the application was
-- last updated.
applicationSummary_lastUpdateTime :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.UTCTime)
applicationSummary_lastUpdateTime :: Lens' ApplicationSummary (Maybe UTCTime)
applicationSummary_lastUpdateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe ISO8601
lastUpdateTime :: Maybe ISO8601
$sel:lastUpdateTime:ApplicationSummary' :: ApplicationSummary -> Maybe ISO8601
lastUpdateTime} -> Maybe ISO8601
lastUpdateTime) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe ISO8601
a -> ApplicationSummary
s {$sel:lastUpdateTime:ApplicationSummary' :: Maybe ISO8601
lastUpdateTime = Maybe ISO8601
a} :: ApplicationSummary) 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 :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The name of the application. The name must be unique in the region in
-- which you are creating the application.
applicationSummary_name :: Lens.Lens' ApplicationSummary (Prelude.Maybe Prelude.Text)
applicationSummary_name :: Lens' ApplicationSummary (Maybe Text)
applicationSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationSummary' {Maybe Text
name :: Maybe Text
$sel:name:ApplicationSummary' :: ApplicationSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: ApplicationSummary
s@ApplicationSummary' {} Maybe Text
a -> ApplicationSummary
s {$sel:name:ApplicationSummary' :: Maybe Text
name = Maybe Text
a} :: ApplicationSummary)

instance Data.FromJSON ApplicationSummary where
  parseJSON :: Value -> Parser ApplicationSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ApplicationSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> ApplicationSummary
ApplicationSummary'
            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
"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
"creationTime")
            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
"id")
            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
"lastUpdateTime")
            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")
      )

instance Prelude.Hashable ApplicationSummary where
  hashWithSalt :: Int -> ApplicationSummary -> Int
hashWithSalt Int
_salt ApplicationSummary' {Maybe Text
Maybe ISO8601
name :: Maybe Text
lastUpdateTime :: Maybe ISO8601
id :: Maybe Text
description :: Maybe Text
creationTime :: Maybe ISO8601
arn :: Maybe Text
$sel:name:ApplicationSummary' :: ApplicationSummary -> Maybe Text
$sel:lastUpdateTime:ApplicationSummary' :: ApplicationSummary -> Maybe ISO8601
$sel:id:ApplicationSummary' :: ApplicationSummary -> Maybe Text
$sel:description:ApplicationSummary' :: ApplicationSummary -> Maybe Text
$sel:creationTime:ApplicationSummary' :: ApplicationSummary -> Maybe ISO8601
$sel:arn:ApplicationSummary' :: ApplicationSummary -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
creationTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
lastUpdateTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name

instance Prelude.NFData ApplicationSummary where
  rnf :: ApplicationSummary -> ()
rnf ApplicationSummary' {Maybe Text
Maybe ISO8601
name :: Maybe Text
lastUpdateTime :: Maybe ISO8601
id :: Maybe Text
description :: Maybe Text
creationTime :: Maybe ISO8601
arn :: Maybe Text
$sel:name:ApplicationSummary' :: ApplicationSummary -> Maybe Text
$sel:lastUpdateTime:ApplicationSummary' :: ApplicationSummary -> Maybe ISO8601
$sel:id:ApplicationSummary' :: ApplicationSummary -> Maybe Text
$sel:description:ApplicationSummary' :: ApplicationSummary -> Maybe Text
$sel:creationTime:ApplicationSummary' :: ApplicationSummary -> Maybe ISO8601
$sel:arn:ApplicationSummary' :: ApplicationSummary -> Maybe Text
..} =
    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 ISO8601
creationTime
      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 Text
id
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
lastUpdateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name