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

import Amazonka.AlexaBusiness.Types.SkillDetails
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

-- | The detailed information about an Alexa skill.
--
-- /See:/ 'newSkillsStoreSkill' smart constructor.
data SkillsStoreSkill = SkillsStoreSkill'
  { -- | The URL where the skill icon resides.
    SkillsStoreSkill -> Maybe Text
iconUrl :: Prelude.Maybe Prelude.Text,
    -- | Sample utterances that interact with the skill.
    SkillsStoreSkill -> Maybe [Text]
sampleUtterances :: Prelude.Maybe [Prelude.Text],
    -- | Short description about the skill.
    SkillsStoreSkill -> Maybe Text
shortDescription :: Prelude.Maybe Prelude.Text,
    -- | Information about the skill.
    SkillsStoreSkill -> Maybe SkillDetails
skillDetails :: Prelude.Maybe SkillDetails,
    -- | The ARN of the skill.
    SkillsStoreSkill -> Maybe Text
skillId :: Prelude.Maybe Prelude.Text,
    -- | The name of the skill.
    SkillsStoreSkill -> Maybe Text
skillName :: Prelude.Maybe Prelude.Text,
    -- | Linking support for a skill.
    SkillsStoreSkill -> Maybe Bool
supportsLinking :: Prelude.Maybe Prelude.Bool
  }
  deriving (SkillsStoreSkill -> SkillsStoreSkill -> Bool
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]
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
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. 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)

-- |
-- Create a value of 'SkillsStoreSkill' 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:
--
-- 'iconUrl', 'skillsStoreSkill_iconUrl' - The URL where the skill icon resides.
--
-- 'sampleUtterances', 'skillsStoreSkill_sampleUtterances' - Sample utterances that interact with the skill.
--
-- 'shortDescription', 'skillsStoreSkill_shortDescription' - Short description about the skill.
--
-- 'skillDetails', 'skillsStoreSkill_skillDetails' - Information about the skill.
--
-- 'skillId', 'skillsStoreSkill_skillId' - The ARN of the skill.
--
-- 'skillName', 'skillsStoreSkill_skillName' - The name of the skill.
--
-- 'supportsLinking', 'skillsStoreSkill_supportsLinking' - Linking support for a skill.
newSkillsStoreSkill ::
  SkillsStoreSkill
newSkillsStoreSkill :: SkillsStoreSkill
newSkillsStoreSkill =
  SkillsStoreSkill'
    { $sel:iconUrl:SkillsStoreSkill' :: Maybe Text
iconUrl = forall a. Maybe a
Prelude.Nothing,
      $sel:sampleUtterances:SkillsStoreSkill' :: Maybe [Text]
sampleUtterances = forall a. Maybe a
Prelude.Nothing,
      $sel:shortDescription:SkillsStoreSkill' :: Maybe Text
shortDescription = forall a. Maybe a
Prelude.Nothing,
      $sel:skillDetails:SkillsStoreSkill' :: Maybe SkillDetails
skillDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:skillId:SkillsStoreSkill' :: Maybe Text
skillId = forall a. Maybe a
Prelude.Nothing,
      $sel:skillName:SkillsStoreSkill' :: Maybe Text
skillName = forall a. Maybe a
Prelude.Nothing,
      $sel:supportsLinking:SkillsStoreSkill' :: Maybe Bool
supportsLinking = forall a. Maybe a
Prelude.Nothing
    }

-- | The URL where the skill icon resides.
skillsStoreSkill_iconUrl :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe Prelude.Text)
skillsStoreSkill_iconUrl :: Lens' SkillsStoreSkill (Maybe Text)
skillsStoreSkill_iconUrl = 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)

-- | Sample utterances that interact with the skill.
skillsStoreSkill_sampleUtterances :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe [Prelude.Text])
skillsStoreSkill_sampleUtterances :: Lens' SkillsStoreSkill (Maybe [Text])
skillsStoreSkill_sampleUtterances = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Short description about the skill.
skillsStoreSkill_shortDescription :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe Prelude.Text)
skillsStoreSkill_shortDescription :: Lens' SkillsStoreSkill (Maybe Text)
skillsStoreSkill_shortDescription = 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)

-- | Information about the skill.
skillsStoreSkill_skillDetails :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe SkillDetails)
skillsStoreSkill_skillDetails :: Lens' SkillsStoreSkill (Maybe SkillDetails)
skillsStoreSkill_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)

-- | The ARN of the skill.
skillsStoreSkill_skillId :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe Prelude.Text)
skillsStoreSkill_skillId :: Lens' SkillsStoreSkill (Maybe Text)
skillsStoreSkill_skillId = 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)

-- | The name of the skill.
skillsStoreSkill_skillName :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe Prelude.Text)
skillsStoreSkill_skillName :: Lens' SkillsStoreSkill (Maybe Text)
skillsStoreSkill_skillName = 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)

-- | Linking support for a skill.
skillsStoreSkill_supportsLinking :: Lens.Lens' SkillsStoreSkill (Prelude.Maybe Prelude.Bool)
skillsStoreSkill_supportsLinking :: Lens' SkillsStoreSkill (Maybe Bool)
skillsStoreSkill_supportsLinking = 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)

instance Data.FromJSON SkillsStoreSkill where
  parseJSON :: Value -> Parser SkillsStoreSkill
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"SkillsStoreSkill"
      ( \Object
x ->
          Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe SkillDetails
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> SkillsStoreSkill
SkillsStoreSkill'
            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
"IconUrl")
            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
"SampleUtterances"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            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
"ShortDescription")
            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
"SkillDetails")
            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
"SkillId")
            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
"SkillName")
            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
"SupportsLinking")
      )

instance Prelude.Hashable SkillsStoreSkill where
  hashWithSalt :: Int -> SkillsStoreSkill -> Int
hashWithSalt Int
_salt SkillsStoreSkill' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe SkillDetails
supportsLinking :: Maybe Bool
skillName :: Maybe Text
skillId :: Maybe Text
skillDetails :: Maybe SkillDetails
shortDescription :: Maybe Text
sampleUtterances :: Maybe [Text]
iconUrl :: Maybe Text
$sel:supportsLinking:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Bool
$sel:skillName:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Text
$sel:skillId:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Text
$sel:skillDetails:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe SkillDetails
$sel:shortDescription:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Text
$sel:sampleUtterances:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe [Text]
$sel:iconUrl:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
iconUrl
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
sampleUtterances
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
shortDescription
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SkillDetails
skillDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
skillId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
skillName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
supportsLinking

instance Prelude.NFData SkillsStoreSkill where
  rnf :: SkillsStoreSkill -> ()
rnf SkillsStoreSkill' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe SkillDetails
supportsLinking :: Maybe Bool
skillName :: Maybe Text
skillId :: Maybe Text
skillDetails :: Maybe SkillDetails
shortDescription :: Maybe Text
sampleUtterances :: Maybe [Text]
iconUrl :: Maybe Text
$sel:supportsLinking:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Bool
$sel:skillName:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Text
$sel:skillId:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Text
$sel:skillDetails:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe SkillDetails
$sel:shortDescription:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Text
$sel:sampleUtterances:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe [Text]
$sel:iconUrl:SkillsStoreSkill' :: SkillsStoreSkill -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
iconUrl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
sampleUtterances
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
shortDescription
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SkillDetails
skillDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
skillId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
skillName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
supportsLinking