{-# 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 #-}
module Amazonka.AlexaBusiness.Types.SkillSummary where
import Amazonka.AlexaBusiness.Types.EnablementType
import Amazonka.AlexaBusiness.Types.SkillType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SkillSummary = SkillSummary'
{
SkillSummary -> Maybe Text
skillId :: Prelude.Maybe Prelude.Text,
SkillSummary -> Maybe Bool
supportsLinking :: Prelude.Maybe Prelude.Bool,
SkillSummary -> Maybe SkillType
skillType :: Prelude.Maybe SkillType,
SkillSummary -> Maybe EnablementType
enablementType :: Prelude.Maybe EnablementType,
SkillSummary -> Maybe Text
skillName :: Prelude.Maybe Prelude.Text
}
deriving (SkillSummary -> SkillSummary -> Bool
(SkillSummary -> SkillSummary -> Bool)
-> (SkillSummary -> SkillSummary -> Bool) -> Eq SkillSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SkillSummary -> SkillSummary -> Bool
$c/= :: SkillSummary -> SkillSummary -> Bool
== :: SkillSummary -> SkillSummary -> Bool
$c== :: SkillSummary -> SkillSummary -> Bool
Prelude.Eq, ReadPrec [SkillSummary]
ReadPrec SkillSummary
Int -> ReadS SkillSummary
ReadS [SkillSummary]
(Int -> ReadS SkillSummary)
-> ReadS [SkillSummary]
-> ReadPrec SkillSummary
-> ReadPrec [SkillSummary]
-> Read SkillSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SkillSummary]
$creadListPrec :: ReadPrec [SkillSummary]
readPrec :: ReadPrec SkillSummary
$creadPrec :: ReadPrec SkillSummary
readList :: ReadS [SkillSummary]
$creadList :: ReadS [SkillSummary]
readsPrec :: Int -> ReadS SkillSummary
$creadsPrec :: Int -> ReadS SkillSummary
Prelude.Read, Int -> SkillSummary -> ShowS
[SkillSummary] -> ShowS
SkillSummary -> String
(Int -> SkillSummary -> ShowS)
-> (SkillSummary -> String)
-> ([SkillSummary] -> ShowS)
-> Show SkillSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SkillSummary] -> ShowS
$cshowList :: [SkillSummary] -> ShowS
show :: SkillSummary -> String
$cshow :: SkillSummary -> String
showsPrec :: Int -> SkillSummary -> ShowS
$cshowsPrec :: Int -> SkillSummary -> ShowS
Prelude.Show, (forall x. SkillSummary -> Rep SkillSummary x)
-> (forall x. Rep SkillSummary x -> SkillSummary)
-> Generic SkillSummary
forall x. Rep SkillSummary x -> SkillSummary
forall x. SkillSummary -> Rep SkillSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SkillSummary x -> SkillSummary
$cfrom :: forall x. SkillSummary -> Rep SkillSummary x
Prelude.Generic)
newSkillSummary ::
SkillSummary
newSkillSummary :: SkillSummary
newSkillSummary =
SkillSummary' :: Maybe Text
-> Maybe Bool
-> Maybe SkillType
-> Maybe EnablementType
-> Maybe Text
-> SkillSummary
SkillSummary'
{ $sel:skillId:SkillSummary' :: Maybe Text
skillId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:supportsLinking:SkillSummary' :: Maybe Bool
supportsLinking = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:skillType:SkillSummary' :: Maybe SkillType
skillType = Maybe SkillType
forall a. Maybe a
Prelude.Nothing,
$sel:enablementType:SkillSummary' :: Maybe EnablementType
enablementType = Maybe EnablementType
forall a. Maybe a
Prelude.Nothing,
$sel:skillName:SkillSummary' :: Maybe Text
skillName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
skillSummary_skillId :: Lens.Lens' SkillSummary (Prelude.Maybe Prelude.Text)
skillSummary_skillId :: (Maybe Text -> f (Maybe Text)) -> SkillSummary -> f SkillSummary
skillSummary_skillId = (SkillSummary -> Maybe Text)
-> (SkillSummary -> Maybe Text -> SkillSummary)
-> Lens SkillSummary SkillSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillSummary' {Maybe Text
skillId :: Maybe Text
$sel:skillId:SkillSummary' :: SkillSummary -> Maybe Text
skillId} -> Maybe Text
skillId) (\s :: SkillSummary
s@SkillSummary' {} Maybe Text
a -> SkillSummary
s {$sel:skillId:SkillSummary' :: Maybe Text
skillId = Maybe Text
a} :: SkillSummary)
skillSummary_supportsLinking :: Lens.Lens' SkillSummary (Prelude.Maybe Prelude.Bool)
skillSummary_supportsLinking :: (Maybe Bool -> f (Maybe Bool)) -> SkillSummary -> f SkillSummary
skillSummary_supportsLinking = (SkillSummary -> Maybe Bool)
-> (SkillSummary -> Maybe Bool -> SkillSummary)
-> Lens SkillSummary SkillSummary (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillSummary' {Maybe Bool
supportsLinking :: Maybe Bool
$sel:supportsLinking:SkillSummary' :: SkillSummary -> Maybe Bool
supportsLinking} -> Maybe Bool
supportsLinking) (\s :: SkillSummary
s@SkillSummary' {} Maybe Bool
a -> SkillSummary
s {$sel:supportsLinking:SkillSummary' :: Maybe Bool
supportsLinking = Maybe Bool
a} :: SkillSummary)
skillSummary_skillType :: Lens.Lens' SkillSummary (Prelude.Maybe SkillType)
skillSummary_skillType :: (Maybe SkillType -> f (Maybe SkillType))
-> SkillSummary -> f SkillSummary
skillSummary_skillType = (SkillSummary -> Maybe SkillType)
-> (SkillSummary -> Maybe SkillType -> SkillSummary)
-> Lens
SkillSummary SkillSummary (Maybe SkillType) (Maybe SkillType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillSummary' {Maybe SkillType
skillType :: Maybe SkillType
$sel:skillType:SkillSummary' :: SkillSummary -> Maybe SkillType
skillType} -> Maybe SkillType
skillType) (\s :: SkillSummary
s@SkillSummary' {} Maybe SkillType
a -> SkillSummary
s {$sel:skillType:SkillSummary' :: Maybe SkillType
skillType = Maybe SkillType
a} :: SkillSummary)
skillSummary_enablementType :: Lens.Lens' SkillSummary (Prelude.Maybe EnablementType)
skillSummary_enablementType :: (Maybe EnablementType -> f (Maybe EnablementType))
-> SkillSummary -> f SkillSummary
skillSummary_enablementType = (SkillSummary -> Maybe EnablementType)
-> (SkillSummary -> Maybe EnablementType -> SkillSummary)
-> Lens
SkillSummary
SkillSummary
(Maybe EnablementType)
(Maybe EnablementType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillSummary' {Maybe EnablementType
enablementType :: Maybe EnablementType
$sel:enablementType:SkillSummary' :: SkillSummary -> Maybe EnablementType
enablementType} -> Maybe EnablementType
enablementType) (\s :: SkillSummary
s@SkillSummary' {} Maybe EnablementType
a -> SkillSummary
s {$sel:enablementType:SkillSummary' :: Maybe EnablementType
enablementType = Maybe EnablementType
a} :: SkillSummary)
skillSummary_skillName :: Lens.Lens' SkillSummary (Prelude.Maybe Prelude.Text)
skillSummary_skillName :: (Maybe Text -> f (Maybe Text)) -> SkillSummary -> f SkillSummary
skillSummary_skillName = (SkillSummary -> Maybe Text)
-> (SkillSummary -> Maybe Text -> SkillSummary)
-> Lens SkillSummary SkillSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillSummary' {Maybe Text
skillName :: Maybe Text
$sel:skillName:SkillSummary' :: SkillSummary -> Maybe Text
skillName} -> Maybe Text
skillName) (\s :: SkillSummary
s@SkillSummary' {} Maybe Text
a -> SkillSummary
s {$sel:skillName:SkillSummary' :: Maybe Text
skillName = Maybe Text
a} :: SkillSummary)
instance Core.FromJSON SkillSummary where
parseJSON :: Value -> Parser SkillSummary
parseJSON =
String
-> (Object -> Parser SkillSummary) -> Value -> Parser SkillSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SkillSummary"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe SkillType
-> Maybe EnablementType
-> Maybe Text
-> SkillSummary
SkillSummary'
(Maybe Text
-> Maybe Bool
-> Maybe SkillType
-> Maybe EnablementType
-> Maybe Text
-> SkillSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe SkillType
-> Maybe EnablementType
-> Maybe Text
-> SkillSummary)
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
"SkillId")
Parser
(Maybe Bool
-> Maybe SkillType
-> Maybe EnablementType
-> Maybe Text
-> SkillSummary)
-> Parser (Maybe Bool)
-> Parser
(Maybe SkillType
-> Maybe EnablementType -> Maybe Text -> SkillSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SupportsLinking")
Parser
(Maybe SkillType
-> Maybe EnablementType -> Maybe Text -> SkillSummary)
-> Parser (Maybe SkillType)
-> Parser (Maybe EnablementType -> Maybe Text -> SkillSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SkillType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SkillType")
Parser (Maybe EnablementType -> Maybe Text -> SkillSummary)
-> Parser (Maybe EnablementType)
-> Parser (Maybe Text -> SkillSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EnablementType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EnablementType")
Parser (Maybe Text -> SkillSummary)
-> Parser (Maybe Text) -> Parser SkillSummary
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
"SkillName")
)
instance Prelude.Hashable SkillSummary
instance Prelude.NFData SkillSummary