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

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

-- | Summary of a Amazon Web Services Service Catalog AppRegistry attribute
-- group.
--
-- /See:/ 'newAttributeGroupSummary' smart constructor.
data AttributeGroupSummary = AttributeGroupSummary'
  { -- | The ISO-8601 formatted timestamp of the moment the attribute group was
    -- created.
    AttributeGroupSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The Amazon resource name (ARN) that specifies the attribute group across
    -- services.
    AttributeGroupSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The name of the attribute group.
    AttributeGroupSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The globally unique attribute group identifier of the attribute group.
    AttributeGroupSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The ISO-8601 formatted timestamp of the moment the attribute group was
    -- last updated. This time is the same as the creationTime for a newly
    -- created attribute group.
    AttributeGroupSummary -> Maybe POSIX
lastUpdateTime :: Prelude.Maybe Core.POSIX,
    -- | The description of the attribute group that the user provides.
    AttributeGroupSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (AttributeGroupSummary -> AttributeGroupSummary -> Bool
(AttributeGroupSummary -> AttributeGroupSummary -> Bool)
-> (AttributeGroupSummary -> AttributeGroupSummary -> Bool)
-> Eq AttributeGroupSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttributeGroupSummary -> AttributeGroupSummary -> Bool
$c/= :: AttributeGroupSummary -> AttributeGroupSummary -> Bool
== :: AttributeGroupSummary -> AttributeGroupSummary -> Bool
$c== :: AttributeGroupSummary -> AttributeGroupSummary -> Bool
Prelude.Eq, ReadPrec [AttributeGroupSummary]
ReadPrec AttributeGroupSummary
Int -> ReadS AttributeGroupSummary
ReadS [AttributeGroupSummary]
(Int -> ReadS AttributeGroupSummary)
-> ReadS [AttributeGroupSummary]
-> ReadPrec AttributeGroupSummary
-> ReadPrec [AttributeGroupSummary]
-> Read AttributeGroupSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AttributeGroupSummary]
$creadListPrec :: ReadPrec [AttributeGroupSummary]
readPrec :: ReadPrec AttributeGroupSummary
$creadPrec :: ReadPrec AttributeGroupSummary
readList :: ReadS [AttributeGroupSummary]
$creadList :: ReadS [AttributeGroupSummary]
readsPrec :: Int -> ReadS AttributeGroupSummary
$creadsPrec :: Int -> ReadS AttributeGroupSummary
Prelude.Read, Int -> AttributeGroupSummary -> ShowS
[AttributeGroupSummary] -> ShowS
AttributeGroupSummary -> String
(Int -> AttributeGroupSummary -> ShowS)
-> (AttributeGroupSummary -> String)
-> ([AttributeGroupSummary] -> ShowS)
-> Show AttributeGroupSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttributeGroupSummary] -> ShowS
$cshowList :: [AttributeGroupSummary] -> ShowS
show :: AttributeGroupSummary -> String
$cshow :: AttributeGroupSummary -> String
showsPrec :: Int -> AttributeGroupSummary -> ShowS
$cshowsPrec :: Int -> AttributeGroupSummary -> ShowS
Prelude.Show, (forall x. AttributeGroupSummary -> Rep AttributeGroupSummary x)
-> (forall x. Rep AttributeGroupSummary x -> AttributeGroupSummary)
-> Generic AttributeGroupSummary
forall x. Rep AttributeGroupSummary x -> AttributeGroupSummary
forall x. AttributeGroupSummary -> Rep AttributeGroupSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AttributeGroupSummary x -> AttributeGroupSummary
$cfrom :: forall x. AttributeGroupSummary -> Rep AttributeGroupSummary x
Prelude.Generic)

-- |
-- Create a value of 'AttributeGroupSummary' 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:
--
-- 'creationTime', 'attributeGroupSummary_creationTime' - The ISO-8601 formatted timestamp of the moment the attribute group was
-- created.
--
-- 'arn', 'attributeGroupSummary_arn' - The Amazon resource name (ARN) that specifies the attribute group across
-- services.
--
-- 'name', 'attributeGroupSummary_name' - The name of the attribute group.
--
-- 'id', 'attributeGroupSummary_id' - The globally unique attribute group identifier of the attribute group.
--
-- 'lastUpdateTime', 'attributeGroupSummary_lastUpdateTime' - The ISO-8601 formatted timestamp of the moment the attribute group was
-- last updated. This time is the same as the creationTime for a newly
-- created attribute group.
--
-- 'description', 'attributeGroupSummary_description' - The description of the attribute group that the user provides.
newAttributeGroupSummary ::
  AttributeGroupSummary
newAttributeGroupSummary :: AttributeGroupSummary
newAttributeGroupSummary =
  AttributeGroupSummary' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> AttributeGroupSummary
AttributeGroupSummary'
    { $sel:creationTime:AttributeGroupSummary' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:AttributeGroupSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:AttributeGroupSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:AttributeGroupSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdateTime:AttributeGroupSummary' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:AttributeGroupSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The ISO-8601 formatted timestamp of the moment the attribute group was
-- created.
attributeGroupSummary_creationTime :: Lens.Lens' AttributeGroupSummary (Prelude.Maybe Prelude.UTCTime)
attributeGroupSummary_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AttributeGroupSummary -> f AttributeGroupSummary
attributeGroupSummary_creationTime = (AttributeGroupSummary -> Maybe POSIX)
-> (AttributeGroupSummary -> Maybe POSIX -> AttributeGroupSummary)
-> Lens
     AttributeGroupSummary
     AttributeGroupSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttributeGroupSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:AttributeGroupSummary' :: AttributeGroupSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: AttributeGroupSummary
s@AttributeGroupSummary' {} Maybe POSIX
a -> AttributeGroupSummary
s {$sel:creationTime:AttributeGroupSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: AttributeGroupSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> AttributeGroupSummary -> f AttributeGroupSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AttributeGroupSummary
-> f AttributeGroupSummary
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

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

-- | The name of the attribute group.
attributeGroupSummary_name :: Lens.Lens' AttributeGroupSummary (Prelude.Maybe Prelude.Text)
attributeGroupSummary_name :: (Maybe Text -> f (Maybe Text))
-> AttributeGroupSummary -> f AttributeGroupSummary
attributeGroupSummary_name = (AttributeGroupSummary -> Maybe Text)
-> (AttributeGroupSummary -> Maybe Text -> AttributeGroupSummary)
-> Lens
     AttributeGroupSummary
     AttributeGroupSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttributeGroupSummary' {Maybe Text
name :: Maybe Text
$sel:name:AttributeGroupSummary' :: AttributeGroupSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: AttributeGroupSummary
s@AttributeGroupSummary' {} Maybe Text
a -> AttributeGroupSummary
s {$sel:name:AttributeGroupSummary' :: Maybe Text
name = Maybe Text
a} :: AttributeGroupSummary)

-- | The globally unique attribute group identifier of the attribute group.
attributeGroupSummary_id :: Lens.Lens' AttributeGroupSummary (Prelude.Maybe Prelude.Text)
attributeGroupSummary_id :: (Maybe Text -> f (Maybe Text))
-> AttributeGroupSummary -> f AttributeGroupSummary
attributeGroupSummary_id = (AttributeGroupSummary -> Maybe Text)
-> (AttributeGroupSummary -> Maybe Text -> AttributeGroupSummary)
-> Lens
     AttributeGroupSummary
     AttributeGroupSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttributeGroupSummary' {Maybe Text
id :: Maybe Text
$sel:id:AttributeGroupSummary' :: AttributeGroupSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: AttributeGroupSummary
s@AttributeGroupSummary' {} Maybe Text
a -> AttributeGroupSummary
s {$sel:id:AttributeGroupSummary' :: Maybe Text
id = Maybe Text
a} :: AttributeGroupSummary)

-- | The ISO-8601 formatted timestamp of the moment the attribute group was
-- last updated. This time is the same as the creationTime for a newly
-- created attribute group.
attributeGroupSummary_lastUpdateTime :: Lens.Lens' AttributeGroupSummary (Prelude.Maybe Prelude.UTCTime)
attributeGroupSummary_lastUpdateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> AttributeGroupSummary -> f AttributeGroupSummary
attributeGroupSummary_lastUpdateTime = (AttributeGroupSummary -> Maybe POSIX)
-> (AttributeGroupSummary -> Maybe POSIX -> AttributeGroupSummary)
-> Lens
     AttributeGroupSummary
     AttributeGroupSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttributeGroupSummary' {Maybe POSIX
lastUpdateTime :: Maybe POSIX
$sel:lastUpdateTime:AttributeGroupSummary' :: AttributeGroupSummary -> Maybe POSIX
lastUpdateTime} -> Maybe POSIX
lastUpdateTime) (\s :: AttributeGroupSummary
s@AttributeGroupSummary' {} Maybe POSIX
a -> AttributeGroupSummary
s {$sel:lastUpdateTime:AttributeGroupSummary' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
a} :: AttributeGroupSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> AttributeGroupSummary -> f AttributeGroupSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> AttributeGroupSummary
-> f AttributeGroupSummary
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

-- | The description of the attribute group that the user provides.
attributeGroupSummary_description :: Lens.Lens' AttributeGroupSummary (Prelude.Maybe Prelude.Text)
attributeGroupSummary_description :: (Maybe Text -> f (Maybe Text))
-> AttributeGroupSummary -> f AttributeGroupSummary
attributeGroupSummary_description = (AttributeGroupSummary -> Maybe Text)
-> (AttributeGroupSummary -> Maybe Text -> AttributeGroupSummary)
-> Lens
     AttributeGroupSummary
     AttributeGroupSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttributeGroupSummary' {Maybe Text
description :: Maybe Text
$sel:description:AttributeGroupSummary' :: AttributeGroupSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: AttributeGroupSummary
s@AttributeGroupSummary' {} Maybe Text
a -> AttributeGroupSummary
s {$sel:description:AttributeGroupSummary' :: Maybe Text
description = Maybe Text
a} :: AttributeGroupSummary)

instance Core.FromJSON AttributeGroupSummary where
  parseJSON :: Value -> Parser AttributeGroupSummary
parseJSON =
    String
-> (Object -> Parser AttributeGroupSummary)
-> Value
-> Parser AttributeGroupSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AttributeGroupSummary"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> AttributeGroupSummary
AttributeGroupSummary'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> AttributeGroupSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> AttributeGroupSummary)
forall (f :: * -> *) a b. Functor 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
"creationTime")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> AttributeGroupSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> AttributeGroupSummary)
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
"arn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> AttributeGroupSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe POSIX -> Maybe Text -> AttributeGroupSummary)
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
"name")
            Parser
  (Maybe Text -> Maybe POSIX -> Maybe Text -> AttributeGroupSummary)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> AttributeGroupSummary)
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
"id")
            Parser (Maybe POSIX -> Maybe Text -> AttributeGroupSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> AttributeGroupSummary)
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
"lastUpdateTime")
            Parser (Maybe Text -> AttributeGroupSummary)
-> Parser (Maybe Text) -> Parser AttributeGroupSummary
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")
      )

instance Prelude.Hashable AttributeGroupSummary

instance Prelude.NFData AttributeGroupSummary