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

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

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

-- |
-- Create a value of 'SkillGroupData' 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:
--
-- 'skillGroupArn', 'skillGroupData_skillGroupArn' - The skill group ARN of a skill group.
--
-- 'description', 'skillGroupData_description' - The description of a skill group.
--
-- 'skillGroupName', 'skillGroupData_skillGroupName' - The skill group name of a skill group.
newSkillGroupData ::
  SkillGroupData
newSkillGroupData :: SkillGroupData
newSkillGroupData =
  SkillGroupData' :: Maybe Text -> Maybe Text -> Maybe Text -> SkillGroupData
SkillGroupData'
    { $sel:skillGroupArn:SkillGroupData' :: Maybe Text
skillGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:SkillGroupData' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:skillGroupName:SkillGroupData' :: Maybe Text
skillGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

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

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

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

instance Prelude.Hashable SkillGroupData

instance Prelude.NFData SkillGroupData