{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.ListSkillsStoreSkillsByCategory
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all skills in the Alexa skill store by category.
--
-- This operation returns paginated results.
module Amazonka.AlexaBusiness.ListSkillsStoreSkillsByCategory
  ( -- * Creating a Request
    ListSkillsStoreSkillsByCategory (..),
    newListSkillsStoreSkillsByCategory,

    -- * Request Lenses
    listSkillsStoreSkillsByCategory_maxResults,
    listSkillsStoreSkillsByCategory_nextToken,
    listSkillsStoreSkillsByCategory_categoryId,

    -- * Destructuring the Response
    ListSkillsStoreSkillsByCategoryResponse (..),
    newListSkillsStoreSkillsByCategoryResponse,

    -- * Response Lenses
    listSkillsStoreSkillsByCategoryResponse_nextToken,
    listSkillsStoreSkillsByCategoryResponse_skillsStoreSkills,
    listSkillsStoreSkillsByCategoryResponse_httpStatus,
  )
where

import Amazonka.AlexaBusiness.Types
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
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListSkillsStoreSkillsByCategory' smart constructor.
data ListSkillsStoreSkillsByCategory = ListSkillsStoreSkillsByCategory'
  { -- | The maximum number of skills returned per paginated calls.
    ListSkillsStoreSkillsByCategory -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The tokens used for pagination.
    ListSkillsStoreSkillsByCategory -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The category ID for which the skills are being retrieved from the skill
    -- store.
    ListSkillsStoreSkillsByCategory -> Natural
categoryId :: Prelude.Natural
  }
  deriving (ListSkillsStoreSkillsByCategory
-> ListSkillsStoreSkillsByCategory -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSkillsStoreSkillsByCategory
-> ListSkillsStoreSkillsByCategory -> Bool
$c/= :: ListSkillsStoreSkillsByCategory
-> ListSkillsStoreSkillsByCategory -> Bool
== :: ListSkillsStoreSkillsByCategory
-> ListSkillsStoreSkillsByCategory -> Bool
$c== :: ListSkillsStoreSkillsByCategory
-> ListSkillsStoreSkillsByCategory -> Bool
Prelude.Eq, ReadPrec [ListSkillsStoreSkillsByCategory]
ReadPrec ListSkillsStoreSkillsByCategory
Int -> ReadS ListSkillsStoreSkillsByCategory
ReadS [ListSkillsStoreSkillsByCategory]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSkillsStoreSkillsByCategory]
$creadListPrec :: ReadPrec [ListSkillsStoreSkillsByCategory]
readPrec :: ReadPrec ListSkillsStoreSkillsByCategory
$creadPrec :: ReadPrec ListSkillsStoreSkillsByCategory
readList :: ReadS [ListSkillsStoreSkillsByCategory]
$creadList :: ReadS [ListSkillsStoreSkillsByCategory]
readsPrec :: Int -> ReadS ListSkillsStoreSkillsByCategory
$creadsPrec :: Int -> ReadS ListSkillsStoreSkillsByCategory
Prelude.Read, Int -> ListSkillsStoreSkillsByCategory -> ShowS
[ListSkillsStoreSkillsByCategory] -> ShowS
ListSkillsStoreSkillsByCategory -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSkillsStoreSkillsByCategory] -> ShowS
$cshowList :: [ListSkillsStoreSkillsByCategory] -> ShowS
show :: ListSkillsStoreSkillsByCategory -> String
$cshow :: ListSkillsStoreSkillsByCategory -> String
showsPrec :: Int -> ListSkillsStoreSkillsByCategory -> ShowS
$cshowsPrec :: Int -> ListSkillsStoreSkillsByCategory -> ShowS
Prelude.Show, forall x.
Rep ListSkillsStoreSkillsByCategory x
-> ListSkillsStoreSkillsByCategory
forall x.
ListSkillsStoreSkillsByCategory
-> Rep ListSkillsStoreSkillsByCategory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSkillsStoreSkillsByCategory x
-> ListSkillsStoreSkillsByCategory
$cfrom :: forall x.
ListSkillsStoreSkillsByCategory
-> Rep ListSkillsStoreSkillsByCategory x
Prelude.Generic)

-- |
-- Create a value of 'ListSkillsStoreSkillsByCategory' 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:
--
-- 'maxResults', 'listSkillsStoreSkillsByCategory_maxResults' - The maximum number of skills returned per paginated calls.
--
-- 'nextToken', 'listSkillsStoreSkillsByCategory_nextToken' - The tokens used for pagination.
--
-- 'categoryId', 'listSkillsStoreSkillsByCategory_categoryId' - The category ID for which the skills are being retrieved from the skill
-- store.
newListSkillsStoreSkillsByCategory ::
  -- | 'categoryId'
  Prelude.Natural ->
  ListSkillsStoreSkillsByCategory
newListSkillsStoreSkillsByCategory :: Natural -> ListSkillsStoreSkillsByCategory
newListSkillsStoreSkillsByCategory Natural
pCategoryId_ =
  ListSkillsStoreSkillsByCategory'
    { $sel:maxResults:ListSkillsStoreSkillsByCategory' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListSkillsStoreSkillsByCategory' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:categoryId:ListSkillsStoreSkillsByCategory' :: Natural
categoryId = Natural
pCategoryId_
    }

-- | The maximum number of skills returned per paginated calls.
listSkillsStoreSkillsByCategory_maxResults :: Lens.Lens' ListSkillsStoreSkillsByCategory (Prelude.Maybe Prelude.Natural)
listSkillsStoreSkillsByCategory_maxResults :: Lens' ListSkillsStoreSkillsByCategory (Maybe Natural)
listSkillsStoreSkillsByCategory_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSkillsStoreSkillsByCategory' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListSkillsStoreSkillsByCategory' :: ListSkillsStoreSkillsByCategory -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListSkillsStoreSkillsByCategory
s@ListSkillsStoreSkillsByCategory' {} Maybe Natural
a -> ListSkillsStoreSkillsByCategory
s {$sel:maxResults:ListSkillsStoreSkillsByCategory' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListSkillsStoreSkillsByCategory)

-- | The tokens used for pagination.
listSkillsStoreSkillsByCategory_nextToken :: Lens.Lens' ListSkillsStoreSkillsByCategory (Prelude.Maybe Prelude.Text)
listSkillsStoreSkillsByCategory_nextToken :: Lens' ListSkillsStoreSkillsByCategory (Maybe Text)
listSkillsStoreSkillsByCategory_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSkillsStoreSkillsByCategory' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSkillsStoreSkillsByCategory' :: ListSkillsStoreSkillsByCategory -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSkillsStoreSkillsByCategory
s@ListSkillsStoreSkillsByCategory' {} Maybe Text
a -> ListSkillsStoreSkillsByCategory
s {$sel:nextToken:ListSkillsStoreSkillsByCategory' :: Maybe Text
nextToken = Maybe Text
a} :: ListSkillsStoreSkillsByCategory)

-- | The category ID for which the skills are being retrieved from the skill
-- store.
listSkillsStoreSkillsByCategory_categoryId :: Lens.Lens' ListSkillsStoreSkillsByCategory Prelude.Natural
listSkillsStoreSkillsByCategory_categoryId :: Lens' ListSkillsStoreSkillsByCategory Natural
listSkillsStoreSkillsByCategory_categoryId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSkillsStoreSkillsByCategory' {Natural
categoryId :: Natural
$sel:categoryId:ListSkillsStoreSkillsByCategory' :: ListSkillsStoreSkillsByCategory -> Natural
categoryId} -> Natural
categoryId) (\s :: ListSkillsStoreSkillsByCategory
s@ListSkillsStoreSkillsByCategory' {} Natural
a -> ListSkillsStoreSkillsByCategory
s {$sel:categoryId:ListSkillsStoreSkillsByCategory' :: Natural
categoryId = Natural
a} :: ListSkillsStoreSkillsByCategory)

instance
  Core.AWSPager
    ListSkillsStoreSkillsByCategory
  where
  page :: ListSkillsStoreSkillsByCategory
-> AWSResponse ListSkillsStoreSkillsByCategory
-> Maybe ListSkillsStoreSkillsByCategory
page ListSkillsStoreSkillsByCategory
rq AWSResponse ListSkillsStoreSkillsByCategory
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSkillsStoreSkillsByCategory
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSkillsStoreSkillsByCategoryResponse (Maybe Text)
listSkillsStoreSkillsByCategoryResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSkillsStoreSkillsByCategory
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListSkillsStoreSkillsByCategoryResponse (Maybe [SkillsStoreSkill])
listSkillsStoreSkillsByCategoryResponse_skillsStoreSkills
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListSkillsStoreSkillsByCategory
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListSkillsStoreSkillsByCategory (Maybe Text)
listSkillsStoreSkillsByCategory_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSkillsStoreSkillsByCategory
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSkillsStoreSkillsByCategoryResponse (Maybe Text)
listSkillsStoreSkillsByCategoryResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance
  Core.AWSRequest
    ListSkillsStoreSkillsByCategory
  where
  type
    AWSResponse ListSkillsStoreSkillsByCategory =
      ListSkillsStoreSkillsByCategoryResponse
  request :: (Service -> Service)
-> ListSkillsStoreSkillsByCategory
-> Request ListSkillsStoreSkillsByCategory
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListSkillsStoreSkillsByCategory
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListSkillsStoreSkillsByCategory)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [SkillsStoreSkill]
-> Int
-> ListSkillsStoreSkillsByCategoryResponse
ListSkillsStoreSkillsByCategoryResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SkillsStoreSkills"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ListSkillsStoreSkillsByCategory
  where
  hashWithSalt :: Int -> ListSkillsStoreSkillsByCategory -> Int
hashWithSalt
    Int
_salt
    ListSkillsStoreSkillsByCategory' {Natural
Maybe Natural
Maybe Text
categoryId :: Natural
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:categoryId:ListSkillsStoreSkillsByCategory' :: ListSkillsStoreSkillsByCategory -> Natural
$sel:nextToken:ListSkillsStoreSkillsByCategory' :: ListSkillsStoreSkillsByCategory -> Maybe Text
$sel:maxResults:ListSkillsStoreSkillsByCategory' :: ListSkillsStoreSkillsByCategory -> Maybe Natural
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
categoryId

instance
  Prelude.NFData
    ListSkillsStoreSkillsByCategory
  where
  rnf :: ListSkillsStoreSkillsByCategory -> ()
rnf ListSkillsStoreSkillsByCategory' {Natural
Maybe Natural
Maybe Text
categoryId :: Natural
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:categoryId:ListSkillsStoreSkillsByCategory' :: ListSkillsStoreSkillsByCategory -> Natural
$sel:nextToken:ListSkillsStoreSkillsByCategory' :: ListSkillsStoreSkillsByCategory -> Maybe Text
$sel:maxResults:ListSkillsStoreSkillsByCategory' :: ListSkillsStoreSkillsByCategory -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
categoryId

instance
  Data.ToHeaders
    ListSkillsStoreSkillsByCategory
  where
  toHeaders :: ListSkillsStoreSkillsByCategory -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AlexaForBusiness.ListSkillsStoreSkillsByCategory" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListSkillsStoreSkillsByCategory where
  toJSON :: ListSkillsStoreSkillsByCategory -> Value
toJSON ListSkillsStoreSkillsByCategory' {Natural
Maybe Natural
Maybe Text
categoryId :: Natural
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:categoryId:ListSkillsStoreSkillsByCategory' :: ListSkillsStoreSkillsByCategory -> Natural
$sel:nextToken:ListSkillsStoreSkillsByCategory' :: ListSkillsStoreSkillsByCategory -> Maybe Text
$sel:maxResults:ListSkillsStoreSkillsByCategory' :: ListSkillsStoreSkillsByCategory -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            forall a. a -> Maybe a
Prelude.Just (Key
"CategoryId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
categoryId)
          ]
      )

instance Data.ToPath ListSkillsStoreSkillsByCategory where
  toPath :: ListSkillsStoreSkillsByCategory -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery ListSkillsStoreSkillsByCategory where
  toQuery :: ListSkillsStoreSkillsByCategory -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListSkillsStoreSkillsByCategoryResponse' smart constructor.
data ListSkillsStoreSkillsByCategoryResponse = ListSkillsStoreSkillsByCategoryResponse'
  { -- | The tokens used for pagination.
    ListSkillsStoreSkillsByCategoryResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The skill store skills.
    ListSkillsStoreSkillsByCategoryResponse -> Maybe [SkillsStoreSkill]
skillsStoreSkills :: Prelude.Maybe [SkillsStoreSkill],
    -- | The response's http status code.
    ListSkillsStoreSkillsByCategoryResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListSkillsStoreSkillsByCategoryResponse
-> ListSkillsStoreSkillsByCategoryResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSkillsStoreSkillsByCategoryResponse
-> ListSkillsStoreSkillsByCategoryResponse -> Bool
$c/= :: ListSkillsStoreSkillsByCategoryResponse
-> ListSkillsStoreSkillsByCategoryResponse -> Bool
== :: ListSkillsStoreSkillsByCategoryResponse
-> ListSkillsStoreSkillsByCategoryResponse -> Bool
$c== :: ListSkillsStoreSkillsByCategoryResponse
-> ListSkillsStoreSkillsByCategoryResponse -> Bool
Prelude.Eq, ReadPrec [ListSkillsStoreSkillsByCategoryResponse]
ReadPrec ListSkillsStoreSkillsByCategoryResponse
Int -> ReadS ListSkillsStoreSkillsByCategoryResponse
ReadS [ListSkillsStoreSkillsByCategoryResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSkillsStoreSkillsByCategoryResponse]
$creadListPrec :: ReadPrec [ListSkillsStoreSkillsByCategoryResponse]
readPrec :: ReadPrec ListSkillsStoreSkillsByCategoryResponse
$creadPrec :: ReadPrec ListSkillsStoreSkillsByCategoryResponse
readList :: ReadS [ListSkillsStoreSkillsByCategoryResponse]
$creadList :: ReadS [ListSkillsStoreSkillsByCategoryResponse]
readsPrec :: Int -> ReadS ListSkillsStoreSkillsByCategoryResponse
$creadsPrec :: Int -> ReadS ListSkillsStoreSkillsByCategoryResponse
Prelude.Read, Int -> ListSkillsStoreSkillsByCategoryResponse -> ShowS
[ListSkillsStoreSkillsByCategoryResponse] -> ShowS
ListSkillsStoreSkillsByCategoryResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSkillsStoreSkillsByCategoryResponse] -> ShowS
$cshowList :: [ListSkillsStoreSkillsByCategoryResponse] -> ShowS
show :: ListSkillsStoreSkillsByCategoryResponse -> String
$cshow :: ListSkillsStoreSkillsByCategoryResponse -> String
showsPrec :: Int -> ListSkillsStoreSkillsByCategoryResponse -> ShowS
$cshowsPrec :: Int -> ListSkillsStoreSkillsByCategoryResponse -> ShowS
Prelude.Show, forall x.
Rep ListSkillsStoreSkillsByCategoryResponse x
-> ListSkillsStoreSkillsByCategoryResponse
forall x.
ListSkillsStoreSkillsByCategoryResponse
-> Rep ListSkillsStoreSkillsByCategoryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSkillsStoreSkillsByCategoryResponse x
-> ListSkillsStoreSkillsByCategoryResponse
$cfrom :: forall x.
ListSkillsStoreSkillsByCategoryResponse
-> Rep ListSkillsStoreSkillsByCategoryResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListSkillsStoreSkillsByCategoryResponse' 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:
--
-- 'nextToken', 'listSkillsStoreSkillsByCategoryResponse_nextToken' - The tokens used for pagination.
--
-- 'skillsStoreSkills', 'listSkillsStoreSkillsByCategoryResponse_skillsStoreSkills' - The skill store skills.
--
-- 'httpStatus', 'listSkillsStoreSkillsByCategoryResponse_httpStatus' - The response's http status code.
newListSkillsStoreSkillsByCategoryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSkillsStoreSkillsByCategoryResponse
newListSkillsStoreSkillsByCategoryResponse :: Int -> ListSkillsStoreSkillsByCategoryResponse
newListSkillsStoreSkillsByCategoryResponse
  Int
pHttpStatus_ =
    ListSkillsStoreSkillsByCategoryResponse'
      { $sel:nextToken:ListSkillsStoreSkillsByCategoryResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:skillsStoreSkills:ListSkillsStoreSkillsByCategoryResponse' :: Maybe [SkillsStoreSkill]
skillsStoreSkills =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListSkillsStoreSkillsByCategoryResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The tokens used for pagination.
listSkillsStoreSkillsByCategoryResponse_nextToken :: Lens.Lens' ListSkillsStoreSkillsByCategoryResponse (Prelude.Maybe Prelude.Text)
listSkillsStoreSkillsByCategoryResponse_nextToken :: Lens' ListSkillsStoreSkillsByCategoryResponse (Maybe Text)
listSkillsStoreSkillsByCategoryResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSkillsStoreSkillsByCategoryResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSkillsStoreSkillsByCategoryResponse' :: ListSkillsStoreSkillsByCategoryResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSkillsStoreSkillsByCategoryResponse
s@ListSkillsStoreSkillsByCategoryResponse' {} Maybe Text
a -> ListSkillsStoreSkillsByCategoryResponse
s {$sel:nextToken:ListSkillsStoreSkillsByCategoryResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListSkillsStoreSkillsByCategoryResponse)

-- | The skill store skills.
listSkillsStoreSkillsByCategoryResponse_skillsStoreSkills :: Lens.Lens' ListSkillsStoreSkillsByCategoryResponse (Prelude.Maybe [SkillsStoreSkill])
listSkillsStoreSkillsByCategoryResponse_skillsStoreSkills :: Lens'
  ListSkillsStoreSkillsByCategoryResponse (Maybe [SkillsStoreSkill])
listSkillsStoreSkillsByCategoryResponse_skillsStoreSkills = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSkillsStoreSkillsByCategoryResponse' {Maybe [SkillsStoreSkill]
skillsStoreSkills :: Maybe [SkillsStoreSkill]
$sel:skillsStoreSkills:ListSkillsStoreSkillsByCategoryResponse' :: ListSkillsStoreSkillsByCategoryResponse -> Maybe [SkillsStoreSkill]
skillsStoreSkills} -> Maybe [SkillsStoreSkill]
skillsStoreSkills) (\s :: ListSkillsStoreSkillsByCategoryResponse
s@ListSkillsStoreSkillsByCategoryResponse' {} Maybe [SkillsStoreSkill]
a -> ListSkillsStoreSkillsByCategoryResponse
s {$sel:skillsStoreSkills:ListSkillsStoreSkillsByCategoryResponse' :: Maybe [SkillsStoreSkill]
skillsStoreSkills = Maybe [SkillsStoreSkill]
a} :: ListSkillsStoreSkillsByCategoryResponse) 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

-- | The response's http status code.
listSkillsStoreSkillsByCategoryResponse_httpStatus :: Lens.Lens' ListSkillsStoreSkillsByCategoryResponse Prelude.Int
listSkillsStoreSkillsByCategoryResponse_httpStatus :: Lens' ListSkillsStoreSkillsByCategoryResponse Int
listSkillsStoreSkillsByCategoryResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSkillsStoreSkillsByCategoryResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListSkillsStoreSkillsByCategoryResponse' :: ListSkillsStoreSkillsByCategoryResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListSkillsStoreSkillsByCategoryResponse
s@ListSkillsStoreSkillsByCategoryResponse' {} Int
a -> ListSkillsStoreSkillsByCategoryResponse
s {$sel:httpStatus:ListSkillsStoreSkillsByCategoryResponse' :: Int
httpStatus = Int
a} :: ListSkillsStoreSkillsByCategoryResponse)

instance
  Prelude.NFData
    ListSkillsStoreSkillsByCategoryResponse
  where
  rnf :: ListSkillsStoreSkillsByCategoryResponse -> ()
rnf ListSkillsStoreSkillsByCategoryResponse' {Int
Maybe [SkillsStoreSkill]
Maybe Text
httpStatus :: Int
skillsStoreSkills :: Maybe [SkillsStoreSkill]
nextToken :: Maybe Text
$sel:httpStatus:ListSkillsStoreSkillsByCategoryResponse' :: ListSkillsStoreSkillsByCategoryResponse -> Int
$sel:skillsStoreSkills:ListSkillsStoreSkillsByCategoryResponse' :: ListSkillsStoreSkillsByCategoryResponse -> Maybe [SkillsStoreSkill]
$sel:nextToken:ListSkillsStoreSkillsByCategoryResponse' :: ListSkillsStoreSkillsByCategoryResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SkillsStoreSkill]
skillsStoreSkills
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus