{-# 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.AttributeGroupDetails
-- 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.AttributeGroupDetails 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

-- | The details related to a specific AttributeGroup.
--
-- /See:/ 'newAttributeGroupDetails' smart constructor.
data AttributeGroupDetails = AttributeGroupDetails'
  { -- | The Amazon resource name (ARN) that specifies the attribute group.
    AttributeGroupDetails -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the attribute group.
    AttributeGroupDetails -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | This field is no longer supported. We recommend you don\'t use the field
    -- when using @ListAttributeGroupsForApplication@.
    --
    -- The name of the attribute group.
    AttributeGroupDetails -> Maybe Text
name :: Prelude.Maybe Prelude.Text
  }
  deriving (AttributeGroupDetails -> AttributeGroupDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttributeGroupDetails -> AttributeGroupDetails -> Bool
$c/= :: AttributeGroupDetails -> AttributeGroupDetails -> Bool
== :: AttributeGroupDetails -> AttributeGroupDetails -> Bool
$c== :: AttributeGroupDetails -> AttributeGroupDetails -> Bool
Prelude.Eq, ReadPrec [AttributeGroupDetails]
ReadPrec AttributeGroupDetails
Int -> ReadS AttributeGroupDetails
ReadS [AttributeGroupDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AttributeGroupDetails]
$creadListPrec :: ReadPrec [AttributeGroupDetails]
readPrec :: ReadPrec AttributeGroupDetails
$creadPrec :: ReadPrec AttributeGroupDetails
readList :: ReadS [AttributeGroupDetails]
$creadList :: ReadS [AttributeGroupDetails]
readsPrec :: Int -> ReadS AttributeGroupDetails
$creadsPrec :: Int -> ReadS AttributeGroupDetails
Prelude.Read, Int -> AttributeGroupDetails -> ShowS
[AttributeGroupDetails] -> ShowS
AttributeGroupDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttributeGroupDetails] -> ShowS
$cshowList :: [AttributeGroupDetails] -> ShowS
show :: AttributeGroupDetails -> String
$cshow :: AttributeGroupDetails -> String
showsPrec :: Int -> AttributeGroupDetails -> ShowS
$cshowsPrec :: Int -> AttributeGroupDetails -> ShowS
Prelude.Show, forall x. Rep AttributeGroupDetails x -> AttributeGroupDetails
forall x. AttributeGroupDetails -> Rep AttributeGroupDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AttributeGroupDetails x -> AttributeGroupDetails
$cfrom :: forall x. AttributeGroupDetails -> Rep AttributeGroupDetails x
Prelude.Generic)

-- |
-- Create a value of 'AttributeGroupDetails' 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', 'attributeGroupDetails_arn' - The Amazon resource name (ARN) that specifies the attribute group.
--
-- 'id', 'attributeGroupDetails_id' - The unique identifier of the attribute group.
--
-- 'name', 'attributeGroupDetails_name' - This field is no longer supported. We recommend you don\'t use the field
-- when using @ListAttributeGroupsForApplication@.
--
-- The name of the attribute group.
newAttributeGroupDetails ::
  AttributeGroupDetails
newAttributeGroupDetails :: AttributeGroupDetails
newAttributeGroupDetails =
  AttributeGroupDetails'
    { $sel:arn:AttributeGroupDetails' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:id:AttributeGroupDetails' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:name:AttributeGroupDetails' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing
    }

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

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

-- | This field is no longer supported. We recommend you don\'t use the field
-- when using @ListAttributeGroupsForApplication@.
--
-- The name of the attribute group.
attributeGroupDetails_name :: Lens.Lens' AttributeGroupDetails (Prelude.Maybe Prelude.Text)
attributeGroupDetails_name :: Lens' AttributeGroupDetails (Maybe Text)
attributeGroupDetails_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AttributeGroupDetails' {Maybe Text
name :: Maybe Text
$sel:name:AttributeGroupDetails' :: AttributeGroupDetails -> Maybe Text
name} -> Maybe Text
name) (\s :: AttributeGroupDetails
s@AttributeGroupDetails' {} Maybe Text
a -> AttributeGroupDetails
s {$sel:name:AttributeGroupDetails' :: Maybe Text
name = Maybe Text
a} :: AttributeGroupDetails)

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

instance Prelude.Hashable AttributeGroupDetails where
  hashWithSalt :: Int -> AttributeGroupDetails -> Int
hashWithSalt Int
_salt AttributeGroupDetails' {Maybe Text
name :: Maybe Text
id :: Maybe Text
arn :: Maybe Text
$sel:name:AttributeGroupDetails' :: AttributeGroupDetails -> Maybe Text
$sel:id:AttributeGroupDetails' :: AttributeGroupDetails -> Maybe Text
$sel:arn:AttributeGroupDetails' :: AttributeGroupDetails -> 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 Text
id
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name

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