{-# 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.SkillsStoreSkill where
import Amazonka.AlexaBusiness.Types.SkillDetails
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SkillsStoreSkill = SkillsStoreSkill'
{
SkillsStoreSkill -> Maybe Text
skillId :: Prelude.Maybe Prelude.Text,
SkillsStoreSkill -> Maybe Bool
supportsLinking :: Prelude.Maybe Prelude.Bool,
SkillsStoreSkill -> Maybe [Text]
sampleUtterances :: Prelude.Maybe [Prelude.Text],
SkillsStoreSkill -> Maybe Text
shortDescription :: Prelude.Maybe Prelude.Text,
SkillsStoreSkill -> Maybe Text
iconUrl :: Prelude.Maybe Prelude.Text,
SkillsStoreSkill -> Maybe SkillDetails
skillDetails :: Prelude.Maybe SkillDetails,
SkillsStoreSkill -> Maybe Text
skillName :: Prelude.Maybe Prelude.Text
}
deriving (SkillsStoreSkill -> SkillsStoreSkill -> Bool
(SkillsStoreSkill -> SkillsStoreSkill -> Bool)
-> (SkillsStoreSkill -> SkillsStoreSkill -> Bool)
-> Eq SkillsStoreSkill
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SkillsStoreSkill -> SkillsStoreSkill -> Bool
$c/= :: SkillsStoreSkill -> SkillsStoreSkill -> Bool
== :: SkillsStoreSkill -> SkillsStoreSkill -> Bool
$c== :: SkillsStoreSkill -> SkillsStoreSkill -> Bool
Prelude.Eq, ReadPrec [SkillsStoreSkill]
ReadPrec SkillsStoreSkill
Int -> ReadS SkillsStoreSkill
ReadS [SkillsStoreSkill]
(Int -> ReadS SkillsStoreSkill)
-> ReadS [SkillsStoreSkill]
-> ReadPrec SkillsStoreSkill
-> ReadPrec [SkillsStoreSkill]
-> Read SkillsStoreSkill
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SkillsStoreSkill]
$creadListPrec :: ReadPrec [SkillsStoreSkill]
readPrec :: ReadPrec SkillsStoreSkill
$creadPrec :: ReadPrec SkillsStoreSkill
readList :: ReadS [SkillsStoreSkill]
$creadList :: ReadS [SkillsStoreSkill]
readsPrec :: Int -> ReadS SkillsStoreSkill
$creadsPrec :: Int -> ReadS SkillsStoreSkill
Prelude.Read, Int -> SkillsStoreSkill -> ShowS
[SkillsStoreSkill] -> ShowS
SkillsStoreSkill -> String
(Int -> SkillsStoreSkill -> ShowS)
-> (SkillsStoreSkill -> String)
-> ([SkillsStoreSkill] -> ShowS)
-> Show SkillsStoreSkill
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SkillsStoreSkill] -> ShowS
$cshowList :: [SkillsStoreSkill] -> ShowS
show :: SkillsStoreSkill -> String
$cshow :: SkillsStoreSkill -> String
showsPrec :: Int -> SkillsStoreSkill -> ShowS
$cshowsPrec :: Int -> SkillsStoreSkill -> ShowS
Prelude.Show, (forall x. SkillsStoreSkill -> Rep SkillsStoreSkill x)
-> (forall x. Rep SkillsStoreSkill x -> SkillsStoreSkill)
-> Generic SkillsStoreSkill
forall x. Rep SkillsStoreSkill x -> SkillsStoreSkill
forall x. SkillsStoreSkill -> Rep SkillsStoreSkill x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SkillsStoreSkill x -> SkillsStoreSkill
$cfrom :: forall x. SkillsStoreSkill -> Rep SkillsStoreSkill x
Prelude.Generic)
newSkillsStoreSkill ::
SkillsStoreSkill
newSkillsStoreSkill :: SkillsStoreSkill
newSkillsStoreSkill =
SkillsStoreSkill' :: Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe SkillDetails
-> Maybe Text
-> SkillsStoreSkill
SkillsStoreSkill'
{ $sel:skillId:SkillsStoreSkill' :: Maybe Text
skillId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:supportsLinking:SkillsStoreSkill' :: Maybe Bool
supportsLinking = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:sampleUtterances:SkillsStoreSkill' :: Maybe [Text]
sampleUtterances = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:shortDescription:SkillsStoreSkill' :: Maybe Text
shortDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:iconUrl:SkillsStoreSkill' :: Maybe Text
iconUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:skillDetails:SkillsStoreSkill' :: Maybe SkillDetails
skillDetails = Maybe SkillDetails
forall a. Maybe a
Prelude.Nothing,
$sel:skillName:SkillsStoreSkill' :: Maybe Text
skillName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
skillsStoreSkill_skillId :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe Prelude.Text)
skillsStoreSkill_skillId :: (Maybe Text -> f (Maybe Text))
-> SkillsStoreSkill -> f SkillsStoreSkill
skillsStoreSkill_skillId = (SkillsStoreSkill -> Maybe Text)
-> (SkillsStoreSkill -> Maybe Text -> SkillsStoreSkill)
-> Lens SkillsStoreSkill SkillsStoreSkill (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillsStoreSkill' {Maybe Text
skillId :: Maybe Text
$sel:skillId:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Text
skillId} -> Maybe Text
skillId) (\s :: SkillsStoreSkill
s@SkillsStoreSkill' {} Maybe Text
a -> SkillsStoreSkill
s {$sel:skillId:SkillsStoreSkill' :: Maybe Text
skillId = Maybe Text
a} :: SkillsStoreSkill)
skillsStoreSkill_supportsLinking :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe Prelude.Bool)
skillsStoreSkill_supportsLinking :: (Maybe Bool -> f (Maybe Bool))
-> SkillsStoreSkill -> f SkillsStoreSkill
skillsStoreSkill_supportsLinking = (SkillsStoreSkill -> Maybe Bool)
-> (SkillsStoreSkill -> Maybe Bool -> SkillsStoreSkill)
-> Lens SkillsStoreSkill SkillsStoreSkill (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillsStoreSkill' {Maybe Bool
supportsLinking :: Maybe Bool
$sel:supportsLinking:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Bool
supportsLinking} -> Maybe Bool
supportsLinking) (\s :: SkillsStoreSkill
s@SkillsStoreSkill' {} Maybe Bool
a -> SkillsStoreSkill
s {$sel:supportsLinking:SkillsStoreSkill' :: Maybe Bool
supportsLinking = Maybe Bool
a} :: SkillsStoreSkill)
skillsStoreSkill_sampleUtterances :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe [Prelude.Text])
skillsStoreSkill_sampleUtterances :: (Maybe [Text] -> f (Maybe [Text]))
-> SkillsStoreSkill -> f SkillsStoreSkill
skillsStoreSkill_sampleUtterances = (SkillsStoreSkill -> Maybe [Text])
-> (SkillsStoreSkill -> Maybe [Text] -> SkillsStoreSkill)
-> Lens
SkillsStoreSkill SkillsStoreSkill (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillsStoreSkill' {Maybe [Text]
sampleUtterances :: Maybe [Text]
$sel:sampleUtterances:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe [Text]
sampleUtterances} -> Maybe [Text]
sampleUtterances) (\s :: SkillsStoreSkill
s@SkillsStoreSkill' {} Maybe [Text]
a -> SkillsStoreSkill
s {$sel:sampleUtterances:SkillsStoreSkill' :: Maybe [Text]
sampleUtterances = Maybe [Text]
a} :: SkillsStoreSkill) ((Maybe [Text] -> f (Maybe [Text]))
-> SkillsStoreSkill -> f SkillsStoreSkill)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SkillsStoreSkill
-> f SkillsStoreSkill
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
skillsStoreSkill_shortDescription :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe Prelude.Text)
skillsStoreSkill_shortDescription :: (Maybe Text -> f (Maybe Text))
-> SkillsStoreSkill -> f SkillsStoreSkill
skillsStoreSkill_shortDescription = (SkillsStoreSkill -> Maybe Text)
-> (SkillsStoreSkill -> Maybe Text -> SkillsStoreSkill)
-> Lens SkillsStoreSkill SkillsStoreSkill (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillsStoreSkill' {Maybe Text
shortDescription :: Maybe Text
$sel:shortDescription:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Text
shortDescription} -> Maybe Text
shortDescription) (\s :: SkillsStoreSkill
s@SkillsStoreSkill' {} Maybe Text
a -> SkillsStoreSkill
s {$sel:shortDescription:SkillsStoreSkill' :: Maybe Text
shortDescription = Maybe Text
a} :: SkillsStoreSkill)
skillsStoreSkill_iconUrl :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe Prelude.Text)
skillsStoreSkill_iconUrl :: (Maybe Text -> f (Maybe Text))
-> SkillsStoreSkill -> f SkillsStoreSkill
skillsStoreSkill_iconUrl = (SkillsStoreSkill -> Maybe Text)
-> (SkillsStoreSkill -> Maybe Text -> SkillsStoreSkill)
-> Lens SkillsStoreSkill SkillsStoreSkill (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillsStoreSkill' {Maybe Text
iconUrl :: Maybe Text
$sel:iconUrl:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Text
iconUrl} -> Maybe Text
iconUrl) (\s :: SkillsStoreSkill
s@SkillsStoreSkill' {} Maybe Text
a -> SkillsStoreSkill
s {$sel:iconUrl:SkillsStoreSkill' :: Maybe Text
iconUrl = Maybe Text
a} :: SkillsStoreSkill)
skillsStoreSkill_skillDetails :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe SkillDetails)
skillsStoreSkill_skillDetails :: (Maybe SkillDetails -> f (Maybe SkillDetails))
-> SkillsStoreSkill -> f SkillsStoreSkill
skillsStoreSkill_skillDetails = (SkillsStoreSkill -> Maybe SkillDetails)
-> (SkillsStoreSkill -> Maybe SkillDetails -> SkillsStoreSkill)
-> Lens
SkillsStoreSkill
SkillsStoreSkill
(Maybe SkillDetails)
(Maybe SkillDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillsStoreSkill' {Maybe SkillDetails
skillDetails :: Maybe SkillDetails
$sel:skillDetails:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe SkillDetails
skillDetails} -> Maybe SkillDetails
skillDetails) (\s :: SkillsStoreSkill
s@SkillsStoreSkill' {} Maybe SkillDetails
a -> SkillsStoreSkill
s {$sel:skillDetails:SkillsStoreSkill' :: Maybe SkillDetails
skillDetails = Maybe SkillDetails
a} :: SkillsStoreSkill)
skillsStoreSkill_skillName :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe Prelude.Text)
skillsStoreSkill_skillName :: (Maybe Text -> f (Maybe Text))
-> SkillsStoreSkill -> f SkillsStoreSkill
skillsStoreSkill_skillName = (SkillsStoreSkill -> Maybe Text)
-> (SkillsStoreSkill -> Maybe Text -> SkillsStoreSkill)
-> Lens SkillsStoreSkill SkillsStoreSkill (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SkillsStoreSkill' {Maybe Text
skillName :: Maybe Text
$sel:skillName:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Text
skillName} -> Maybe Text
skillName) (\s :: SkillsStoreSkill
s@SkillsStoreSkill' {} Maybe Text
a -> SkillsStoreSkill
s {$sel:skillName:SkillsStoreSkill' :: Maybe Text
skillName = Maybe Text
a} :: SkillsStoreSkill)
instance Core.FromJSON SkillsStoreSkill where
parseJSON :: Value -> Parser SkillsStoreSkill
parseJSON =
String
-> (Object -> Parser SkillsStoreSkill)
-> Value
-> Parser SkillsStoreSkill
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SkillsStoreSkill"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe SkillDetails
-> Maybe Text
-> SkillsStoreSkill
SkillsStoreSkill'
(Maybe Text
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe SkillDetails
-> Maybe Text
-> SkillsStoreSkill)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe SkillDetails
-> Maybe Text
-> SkillsStoreSkill)
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 [Text]
-> Maybe Text
-> Maybe Text
-> Maybe SkillDetails
-> Maybe Text
-> SkillsStoreSkill)
-> Parser (Maybe Bool)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe SkillDetails
-> Maybe Text
-> SkillsStoreSkill)
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 [Text]
-> Maybe Text
-> Maybe Text
-> Maybe SkillDetails
-> Maybe Text
-> SkillsStoreSkill)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe SkillDetails
-> Maybe Text
-> SkillsStoreSkill)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SampleUtterances"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe Text
-> Maybe SkillDetails
-> Maybe Text
-> SkillsStoreSkill)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe SkillDetails -> Maybe Text -> SkillsStoreSkill)
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
"ShortDescription")
Parser
(Maybe Text
-> Maybe SkillDetails -> Maybe Text -> SkillsStoreSkill)
-> Parser (Maybe Text)
-> Parser (Maybe SkillDetails -> Maybe Text -> SkillsStoreSkill)
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
"IconUrl")
Parser (Maybe SkillDetails -> Maybe Text -> SkillsStoreSkill)
-> Parser (Maybe SkillDetails)
-> Parser (Maybe Text -> SkillsStoreSkill)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SkillDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SkillDetails")
Parser (Maybe Text -> SkillsStoreSkill)
-> Parser (Maybe Text) -> Parser SkillsStoreSkill
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 SkillsStoreSkill
instance Prelude.NFData SkillsStoreSkill