{-# 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.AlexaBusiness.Types.SkillGroup
-- 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.AlexaBusiness.Types.SkillGroup 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

-- | A skill group with attributes.
--
-- /See:/ 'newSkillGroup' smart constructor.
data SkillGroup = SkillGroup'
  { -- | The description of a skill group.
    SkillGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The ARN of a skill group.
    SkillGroup -> Maybe Text
skillGroupArn :: Prelude.Maybe Prelude.Text,
    -- | The name of a skill group.
    SkillGroup -> Maybe Text
skillGroupName :: Prelude.Maybe Prelude.Text
  }
  deriving (SkillGroup -> SkillGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SkillGroup -> SkillGroup -> Bool
$c/= :: SkillGroup -> SkillGroup -> Bool
== :: SkillGroup -> SkillGroup -> Bool
$c== :: SkillGroup -> SkillGroup -> Bool
Prelude.Eq, ReadPrec [SkillGroup]
ReadPrec SkillGroup
Int -> ReadS SkillGroup
ReadS [SkillGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SkillGroup]
$creadListPrec :: ReadPrec [SkillGroup]
readPrec :: ReadPrec SkillGroup
$creadPrec :: ReadPrec SkillGroup
readList :: ReadS [SkillGroup]
$creadList :: ReadS [SkillGroup]
readsPrec :: Int -> ReadS SkillGroup
$creadsPrec :: Int -> ReadS SkillGroup
Prelude.Read, Int -> SkillGroup -> ShowS
[SkillGroup] -> ShowS
SkillGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SkillGroup] -> ShowS
$cshowList :: [SkillGroup] -> ShowS
show :: SkillGroup -> String
$cshow :: SkillGroup -> String
showsPrec :: Int -> SkillGroup -> ShowS
$cshowsPrec :: Int -> SkillGroup -> ShowS
Prelude.Show, forall x. Rep SkillGroup x -> SkillGroup
forall x. SkillGroup -> Rep SkillGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SkillGroup x -> SkillGroup
$cfrom :: forall x. SkillGroup -> Rep SkillGroup x
Prelude.Generic)

-- |
-- Create a value of 'SkillGroup' 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:
--
-- 'description', 'skillGroup_description' - The description of a skill group.
--
-- 'skillGroupArn', 'skillGroup_skillGroupArn' - The ARN of a skill group.
--
-- 'skillGroupName', 'skillGroup_skillGroupName' - The name of a skill group.
newSkillGroup ::
  SkillGroup
newSkillGroup :: SkillGroup
newSkillGroup =
  SkillGroup'
    { $sel:description:SkillGroup' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:skillGroupArn:SkillGroup' :: Maybe Text
skillGroupArn = forall a. Maybe a
Prelude.Nothing,
      $sel:skillGroupName:SkillGroup' :: Maybe Text
skillGroupName = forall a. Maybe a
Prelude.Nothing
    }

-- | The description of a skill group.
skillGroup_description :: Lens.Lens' SkillGroup (Prelude.Maybe Prelude.Text)
skillGroup_description :: Lens' SkillGroup (Maybe Text)
skillGroup_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillGroup' {Maybe Text
description :: Maybe Text
$sel:description:SkillGroup' :: SkillGroup -> Maybe Text
description} -> Maybe Text
description) (\s :: SkillGroup
s@SkillGroup' {} Maybe Text
a -> SkillGroup
s {$sel:description:SkillGroup' :: Maybe Text
description = Maybe Text
a} :: SkillGroup)

-- | The ARN of a skill group.
skillGroup_skillGroupArn :: Lens.Lens' SkillGroup (Prelude.Maybe Prelude.Text)
skillGroup_skillGroupArn :: Lens' SkillGroup (Maybe Text)
skillGroup_skillGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillGroup' {Maybe Text
skillGroupArn :: Maybe Text
$sel:skillGroupArn:SkillGroup' :: SkillGroup -> Maybe Text
skillGroupArn} -> Maybe Text
skillGroupArn) (\s :: SkillGroup
s@SkillGroup' {} Maybe Text
a -> SkillGroup
s {$sel:skillGroupArn:SkillGroup' :: Maybe Text
skillGroupArn = Maybe Text
a} :: SkillGroup)

-- | The name of a skill group.
skillGroup_skillGroupName :: Lens.Lens' SkillGroup (Prelude.Maybe Prelude.Text)
skillGroup_skillGroupName :: Lens' SkillGroup (Maybe Text)
skillGroup_skillGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillGroup' {Maybe Text
skillGroupName :: Maybe Text
$sel:skillGroupName:SkillGroup' :: SkillGroup -> Maybe Text
skillGroupName} -> Maybe Text
skillGroupName) (\s :: SkillGroup
s@SkillGroup' {} Maybe Text
a -> SkillGroup
s {$sel:skillGroupName:SkillGroup' :: Maybe Text
skillGroupName = Maybe Text
a} :: SkillGroup)

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

instance Prelude.Hashable SkillGroup where
  hashWithSalt :: Int -> SkillGroup -> Int
hashWithSalt Int
_salt SkillGroup' {Maybe Text
skillGroupName :: Maybe Text
skillGroupArn :: Maybe Text
description :: Maybe Text
$sel:skillGroupName:SkillGroup' :: SkillGroup -> Maybe Text
$sel:skillGroupArn:SkillGroup' :: SkillGroup -> Maybe Text
$sel:description:SkillGroup' :: SkillGroup -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
skillGroupArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
skillGroupName

instance Prelude.NFData SkillGroup where
  rnf :: SkillGroup -> ()
rnf SkillGroup' {Maybe Text
skillGroupName :: Maybe Text
skillGroupArn :: Maybe Text
description :: Maybe Text
$sel:skillGroupName:SkillGroup' :: SkillGroup -> Maybe Text
$sel:skillGroupArn:SkillGroup' :: SkillGroup -> Maybe Text
$sel:description:SkillGroup' :: SkillGroup -> Maybe Text
..} =
    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
skillGroupArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
skillGroupName