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

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

-- | A skill group with attributes.
--
-- /See:/ 'newSkillGroup' smart constructor.
data SkillGroup = SkillGroup'
  { -- | The ARN of a skill group.
    SkillGroup -> Maybe Text
skillGroupArn :: Prelude.Maybe Prelude.Text,
    -- | The description of a skill group.
    SkillGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The name of a skill group.
    SkillGroup -> Maybe Text
skillGroupName :: Prelude.Maybe Prelude.Text
  }
  deriving (SkillGroup -> SkillGroup -> Bool
(SkillGroup -> SkillGroup -> Bool)
-> (SkillGroup -> SkillGroup -> Bool) -> Eq SkillGroup
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]
(Int -> ReadS SkillGroup)
-> ReadS [SkillGroup]
-> ReadPrec SkillGroup
-> ReadPrec [SkillGroup]
-> Read 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
(Int -> SkillGroup -> ShowS)
-> (SkillGroup -> String)
-> ([SkillGroup] -> ShowS)
-> Show SkillGroup
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. SkillGroup -> Rep SkillGroup x)
-> (forall x. Rep SkillGroup x -> SkillGroup) -> Generic SkillGroup
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:
--
-- 'skillGroupArn', 'skillGroup_skillGroupArn' - The ARN of a skill group.
--
-- 'description', 'skillGroup_description' - The description of a skill group.
--
-- 'skillGroupName', 'skillGroup_skillGroupName' - The name of a skill group.
newSkillGroup ::
  SkillGroup
newSkillGroup :: SkillGroup
newSkillGroup =
  SkillGroup' :: Maybe Text -> Maybe Text -> Maybe Text -> SkillGroup
SkillGroup'
    { $sel:skillGroupArn:SkillGroup' :: Maybe Text
skillGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:SkillGroup' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:skillGroupName:SkillGroup' :: Maybe Text
skillGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of a skill group.
skillGroup_skillGroupArn :: Lens.Lens' SkillGroup (Prelude.Maybe Prelude.Text)
skillGroup_skillGroupArn :: (Maybe Text -> f (Maybe Text)) -> SkillGroup -> f SkillGroup
skillGroup_skillGroupArn = (SkillGroup -> Maybe Text)
-> (SkillGroup -> Maybe Text -> SkillGroup)
-> Lens SkillGroup SkillGroup (Maybe Text) (Maybe Text)
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 description of a skill group.
skillGroup_description :: Lens.Lens' SkillGroup (Prelude.Maybe Prelude.Text)
skillGroup_description :: (Maybe Text -> f (Maybe Text)) -> SkillGroup -> f SkillGroup
skillGroup_description = (SkillGroup -> Maybe Text)
-> (SkillGroup -> Maybe Text -> SkillGroup)
-> Lens SkillGroup SkillGroup (Maybe Text) (Maybe Text)
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 name of a skill group.
skillGroup_skillGroupName :: Lens.Lens' SkillGroup (Prelude.Maybe Prelude.Text)
skillGroup_skillGroupName :: (Maybe Text -> f (Maybe Text)) -> SkillGroup -> f SkillGroup
skillGroup_skillGroupName = (SkillGroup -> Maybe Text)
-> (SkillGroup -> Maybe Text -> SkillGroup)
-> Lens SkillGroup SkillGroup (Maybe Text) (Maybe Text)
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 Core.FromJSON SkillGroup where
  parseJSON :: Value -> Parser SkillGroup
parseJSON =
    String
-> (Object -> Parser SkillGroup) -> Value -> Parser SkillGroup
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SkillGroup"
      ( \Object
x ->
          Maybe Text -> Maybe Text -> Maybe Text -> SkillGroup
SkillGroup'
            (Maybe Text -> Maybe Text -> Maybe Text -> SkillGroup)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> SkillGroup)
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 -> SkillGroup)
-> Parser (Maybe Text) -> Parser (Maybe Text -> SkillGroup)
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 -> SkillGroup)
-> Parser (Maybe Text) -> Parser SkillGroup
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 SkillGroup

instance Prelude.NFData SkillGroup