{-# 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.LexModels.GetSlotTypeVersions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about all versions of a slot type.
--
-- The @GetSlotTypeVersions@ operation returns a @SlotTypeMetadata@ object
-- for each version of a slot type. For example, if a slot type has three
-- numbered versions, the @GetSlotTypeVersions@ operation returns four
-- @SlotTypeMetadata@ objects in the response, one for each numbered
-- version and one for the @$LATEST@ version.
--
-- The @GetSlotTypeVersions@ operation always returns at least one version,
-- the @$LATEST@ version.
--
-- This operation requires permissions for the @lex:GetSlotTypeVersions@
-- action.
--
-- This operation returns paginated results.
module Amazonka.LexModels.GetSlotTypeVersions
  ( -- * Creating a Request
    GetSlotTypeVersions (..),
    newGetSlotTypeVersions,

    -- * Request Lenses
    getSlotTypeVersions_maxResults,
    getSlotTypeVersions_nextToken,
    getSlotTypeVersions_name,

    -- * Destructuring the Response
    GetSlotTypeVersionsResponse (..),
    newGetSlotTypeVersionsResponse,

    -- * Response Lenses
    getSlotTypeVersionsResponse_nextToken,
    getSlotTypeVersionsResponse_slotTypes,
    getSlotTypeVersionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LexModels.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetSlotTypeVersions' smart constructor.
data GetSlotTypeVersions = GetSlotTypeVersions'
  { -- | The maximum number of slot type versions to return in the response. The
    -- default is 10.
    GetSlotTypeVersions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A pagination token for fetching the next page of slot type versions. If
    -- the response to this call is truncated, Amazon Lex returns a pagination
    -- token in the response. To fetch the next page of versions, specify the
    -- pagination token in the next request.
    GetSlotTypeVersions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the slot type for which versions should be returned.
    GetSlotTypeVersions -> Text
name :: Prelude.Text
  }
  deriving (GetSlotTypeVersions -> GetSlotTypeVersions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSlotTypeVersions -> GetSlotTypeVersions -> Bool
$c/= :: GetSlotTypeVersions -> GetSlotTypeVersions -> Bool
== :: GetSlotTypeVersions -> GetSlotTypeVersions -> Bool
$c== :: GetSlotTypeVersions -> GetSlotTypeVersions -> Bool
Prelude.Eq, ReadPrec [GetSlotTypeVersions]
ReadPrec GetSlotTypeVersions
Int -> ReadS GetSlotTypeVersions
ReadS [GetSlotTypeVersions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSlotTypeVersions]
$creadListPrec :: ReadPrec [GetSlotTypeVersions]
readPrec :: ReadPrec GetSlotTypeVersions
$creadPrec :: ReadPrec GetSlotTypeVersions
readList :: ReadS [GetSlotTypeVersions]
$creadList :: ReadS [GetSlotTypeVersions]
readsPrec :: Int -> ReadS GetSlotTypeVersions
$creadsPrec :: Int -> ReadS GetSlotTypeVersions
Prelude.Read, Int -> GetSlotTypeVersions -> ShowS
[GetSlotTypeVersions] -> ShowS
GetSlotTypeVersions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSlotTypeVersions] -> ShowS
$cshowList :: [GetSlotTypeVersions] -> ShowS
show :: GetSlotTypeVersions -> String
$cshow :: GetSlotTypeVersions -> String
showsPrec :: Int -> GetSlotTypeVersions -> ShowS
$cshowsPrec :: Int -> GetSlotTypeVersions -> ShowS
Prelude.Show, forall x. Rep GetSlotTypeVersions x -> GetSlotTypeVersions
forall x. GetSlotTypeVersions -> Rep GetSlotTypeVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetSlotTypeVersions x -> GetSlotTypeVersions
$cfrom :: forall x. GetSlotTypeVersions -> Rep GetSlotTypeVersions x
Prelude.Generic)

-- |
-- Create a value of 'GetSlotTypeVersions' 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', 'getSlotTypeVersions_maxResults' - The maximum number of slot type versions to return in the response. The
-- default is 10.
--
-- 'nextToken', 'getSlotTypeVersions_nextToken' - A pagination token for fetching the next page of slot type versions. If
-- the response to this call is truncated, Amazon Lex returns a pagination
-- token in the response. To fetch the next page of versions, specify the
-- pagination token in the next request.
--
-- 'name', 'getSlotTypeVersions_name' - The name of the slot type for which versions should be returned.
newGetSlotTypeVersions ::
  -- | 'name'
  Prelude.Text ->
  GetSlotTypeVersions
newGetSlotTypeVersions :: Text -> GetSlotTypeVersions
newGetSlotTypeVersions Text
pName_ =
  GetSlotTypeVersions'
    { $sel:maxResults:GetSlotTypeVersions' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetSlotTypeVersions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetSlotTypeVersions' :: Text
name = Text
pName_
    }

-- | The maximum number of slot type versions to return in the response. The
-- default is 10.
getSlotTypeVersions_maxResults :: Lens.Lens' GetSlotTypeVersions (Prelude.Maybe Prelude.Natural)
getSlotTypeVersions_maxResults :: Lens' GetSlotTypeVersions (Maybe Natural)
getSlotTypeVersions_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSlotTypeVersions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetSlotTypeVersions' :: GetSlotTypeVersions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetSlotTypeVersions
s@GetSlotTypeVersions' {} Maybe Natural
a -> GetSlotTypeVersions
s {$sel:maxResults:GetSlotTypeVersions' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetSlotTypeVersions)

-- | A pagination token for fetching the next page of slot type versions. If
-- the response to this call is truncated, Amazon Lex returns a pagination
-- token in the response. To fetch the next page of versions, specify the
-- pagination token in the next request.
getSlotTypeVersions_nextToken :: Lens.Lens' GetSlotTypeVersions (Prelude.Maybe Prelude.Text)
getSlotTypeVersions_nextToken :: Lens' GetSlotTypeVersions (Maybe Text)
getSlotTypeVersions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSlotTypeVersions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetSlotTypeVersions' :: GetSlotTypeVersions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetSlotTypeVersions
s@GetSlotTypeVersions' {} Maybe Text
a -> GetSlotTypeVersions
s {$sel:nextToken:GetSlotTypeVersions' :: Maybe Text
nextToken = Maybe Text
a} :: GetSlotTypeVersions)

-- | The name of the slot type for which versions should be returned.
getSlotTypeVersions_name :: Lens.Lens' GetSlotTypeVersions Prelude.Text
getSlotTypeVersions_name :: Lens' GetSlotTypeVersions Text
getSlotTypeVersions_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSlotTypeVersions' {Text
name :: Text
$sel:name:GetSlotTypeVersions' :: GetSlotTypeVersions -> Text
name} -> Text
name) (\s :: GetSlotTypeVersions
s@GetSlotTypeVersions' {} Text
a -> GetSlotTypeVersions
s {$sel:name:GetSlotTypeVersions' :: Text
name = Text
a} :: GetSlotTypeVersions)

instance Core.AWSPager GetSlotTypeVersions where
  page :: GetSlotTypeVersions
-> AWSResponse GetSlotTypeVersions -> Maybe GetSlotTypeVersions
page GetSlotTypeVersions
rq AWSResponse GetSlotTypeVersions
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetSlotTypeVersions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetSlotTypeVersionsResponse (Maybe Text)
getSlotTypeVersionsResponse_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 GetSlotTypeVersions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetSlotTypeVersionsResponse (Maybe [SlotTypeMetadata])
getSlotTypeVersionsResponse_slotTypes
            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.$ GetSlotTypeVersions
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetSlotTypeVersions (Maybe Text)
getSlotTypeVersions_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetSlotTypeVersions
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetSlotTypeVersionsResponse (Maybe Text)
getSlotTypeVersionsResponse_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 GetSlotTypeVersions where
  type
    AWSResponse GetSlotTypeVersions =
      GetSlotTypeVersionsResponse
  request :: (Service -> Service)
-> GetSlotTypeVersions -> Request GetSlotTypeVersions
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetSlotTypeVersions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetSlotTypeVersions)))
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 [SlotTypeMetadata] -> Int -> GetSlotTypeVersionsResponse
GetSlotTypeVersionsResponse'
            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
"slotTypes" 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 GetSlotTypeVersions where
  hashWithSalt :: Int -> GetSlotTypeVersions -> Int
hashWithSalt Int
_salt GetSlotTypeVersions' {Maybe Natural
Maybe Text
Text
name :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:GetSlotTypeVersions' :: GetSlotTypeVersions -> Text
$sel:nextToken:GetSlotTypeVersions' :: GetSlotTypeVersions -> Maybe Text
$sel:maxResults:GetSlotTypeVersions' :: GetSlotTypeVersions -> 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` Text
name

instance Prelude.NFData GetSlotTypeVersions where
  rnf :: GetSlotTypeVersions -> ()
rnf GetSlotTypeVersions' {Maybe Natural
Maybe Text
Text
name :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:GetSlotTypeVersions' :: GetSlotTypeVersions -> Text
$sel:nextToken:GetSlotTypeVersions' :: GetSlotTypeVersions -> Maybe Text
$sel:maxResults:GetSlotTypeVersions' :: GetSlotTypeVersions -> 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 Text
name

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

instance Data.ToPath GetSlotTypeVersions where
  toPath :: GetSlotTypeVersions -> ByteString
toPath GetSlotTypeVersions' {Maybe Natural
Maybe Text
Text
name :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:GetSlotTypeVersions' :: GetSlotTypeVersions -> Text
$sel:nextToken:GetSlotTypeVersions' :: GetSlotTypeVersions -> Maybe Text
$sel:maxResults:GetSlotTypeVersions' :: GetSlotTypeVersions -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/slottypes/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
name, ByteString
"/versions/"]

instance Data.ToQuery GetSlotTypeVersions where
  toQuery :: GetSlotTypeVersions -> QueryString
toQuery GetSlotTypeVersions' {Maybe Natural
Maybe Text
Text
name :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:GetSlotTypeVersions' :: GetSlotTypeVersions -> Text
$sel:nextToken:GetSlotTypeVersions' :: GetSlotTypeVersions -> Maybe Text
$sel:maxResults:GetSlotTypeVersions' :: GetSlotTypeVersions -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newGetSlotTypeVersionsResponse' smart constructor.
data GetSlotTypeVersionsResponse = GetSlotTypeVersionsResponse'
  { -- | A pagination token for fetching the next page of slot type versions. If
    -- the response to this call is truncated, Amazon Lex returns a pagination
    -- token in the response. To fetch the next page of versions, specify the
    -- pagination token in the next request.
    GetSlotTypeVersionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | An array of @SlotTypeMetadata@ objects, one for each numbered version of
    -- the slot type plus one for the @$LATEST@ version.
    GetSlotTypeVersionsResponse -> Maybe [SlotTypeMetadata]
slotTypes :: Prelude.Maybe [SlotTypeMetadata],
    -- | The response's http status code.
    GetSlotTypeVersionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetSlotTypeVersionsResponse -> GetSlotTypeVersionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSlotTypeVersionsResponse -> GetSlotTypeVersionsResponse -> Bool
$c/= :: GetSlotTypeVersionsResponse -> GetSlotTypeVersionsResponse -> Bool
== :: GetSlotTypeVersionsResponse -> GetSlotTypeVersionsResponse -> Bool
$c== :: GetSlotTypeVersionsResponse -> GetSlotTypeVersionsResponse -> Bool
Prelude.Eq, ReadPrec [GetSlotTypeVersionsResponse]
ReadPrec GetSlotTypeVersionsResponse
Int -> ReadS GetSlotTypeVersionsResponse
ReadS [GetSlotTypeVersionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSlotTypeVersionsResponse]
$creadListPrec :: ReadPrec [GetSlotTypeVersionsResponse]
readPrec :: ReadPrec GetSlotTypeVersionsResponse
$creadPrec :: ReadPrec GetSlotTypeVersionsResponse
readList :: ReadS [GetSlotTypeVersionsResponse]
$creadList :: ReadS [GetSlotTypeVersionsResponse]
readsPrec :: Int -> ReadS GetSlotTypeVersionsResponse
$creadsPrec :: Int -> ReadS GetSlotTypeVersionsResponse
Prelude.Read, Int -> GetSlotTypeVersionsResponse -> ShowS
[GetSlotTypeVersionsResponse] -> ShowS
GetSlotTypeVersionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSlotTypeVersionsResponse] -> ShowS
$cshowList :: [GetSlotTypeVersionsResponse] -> ShowS
show :: GetSlotTypeVersionsResponse -> String
$cshow :: GetSlotTypeVersionsResponse -> String
showsPrec :: Int -> GetSlotTypeVersionsResponse -> ShowS
$cshowsPrec :: Int -> GetSlotTypeVersionsResponse -> ShowS
Prelude.Show, forall x.
Rep GetSlotTypeVersionsResponse x -> GetSlotTypeVersionsResponse
forall x.
GetSlotTypeVersionsResponse -> Rep GetSlotTypeVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetSlotTypeVersionsResponse x -> GetSlotTypeVersionsResponse
$cfrom :: forall x.
GetSlotTypeVersionsResponse -> Rep GetSlotTypeVersionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetSlotTypeVersionsResponse' 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', 'getSlotTypeVersionsResponse_nextToken' - A pagination token for fetching the next page of slot type versions. If
-- the response to this call is truncated, Amazon Lex returns a pagination
-- token in the response. To fetch the next page of versions, specify the
-- pagination token in the next request.
--
-- 'slotTypes', 'getSlotTypeVersionsResponse_slotTypes' - An array of @SlotTypeMetadata@ objects, one for each numbered version of
-- the slot type plus one for the @$LATEST@ version.
--
-- 'httpStatus', 'getSlotTypeVersionsResponse_httpStatus' - The response's http status code.
newGetSlotTypeVersionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetSlotTypeVersionsResponse
newGetSlotTypeVersionsResponse :: Int -> GetSlotTypeVersionsResponse
newGetSlotTypeVersionsResponse Int
pHttpStatus_ =
  GetSlotTypeVersionsResponse'
    { $sel:nextToken:GetSlotTypeVersionsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:slotTypes:GetSlotTypeVersionsResponse' :: Maybe [SlotTypeMetadata]
slotTypes = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetSlotTypeVersionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A pagination token for fetching the next page of slot type versions. If
-- the response to this call is truncated, Amazon Lex returns a pagination
-- token in the response. To fetch the next page of versions, specify the
-- pagination token in the next request.
getSlotTypeVersionsResponse_nextToken :: Lens.Lens' GetSlotTypeVersionsResponse (Prelude.Maybe Prelude.Text)
getSlotTypeVersionsResponse_nextToken :: Lens' GetSlotTypeVersionsResponse (Maybe Text)
getSlotTypeVersionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSlotTypeVersionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetSlotTypeVersionsResponse' :: GetSlotTypeVersionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetSlotTypeVersionsResponse
s@GetSlotTypeVersionsResponse' {} Maybe Text
a -> GetSlotTypeVersionsResponse
s {$sel:nextToken:GetSlotTypeVersionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetSlotTypeVersionsResponse)

-- | An array of @SlotTypeMetadata@ objects, one for each numbered version of
-- the slot type plus one for the @$LATEST@ version.
getSlotTypeVersionsResponse_slotTypes :: Lens.Lens' GetSlotTypeVersionsResponse (Prelude.Maybe [SlotTypeMetadata])
getSlotTypeVersionsResponse_slotTypes :: Lens' GetSlotTypeVersionsResponse (Maybe [SlotTypeMetadata])
getSlotTypeVersionsResponse_slotTypes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSlotTypeVersionsResponse' {Maybe [SlotTypeMetadata]
slotTypes :: Maybe [SlotTypeMetadata]
$sel:slotTypes:GetSlotTypeVersionsResponse' :: GetSlotTypeVersionsResponse -> Maybe [SlotTypeMetadata]
slotTypes} -> Maybe [SlotTypeMetadata]
slotTypes) (\s :: GetSlotTypeVersionsResponse
s@GetSlotTypeVersionsResponse' {} Maybe [SlotTypeMetadata]
a -> GetSlotTypeVersionsResponse
s {$sel:slotTypes:GetSlotTypeVersionsResponse' :: Maybe [SlotTypeMetadata]
slotTypes = Maybe [SlotTypeMetadata]
a} :: GetSlotTypeVersionsResponse) 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.
getSlotTypeVersionsResponse_httpStatus :: Lens.Lens' GetSlotTypeVersionsResponse Prelude.Int
getSlotTypeVersionsResponse_httpStatus :: Lens' GetSlotTypeVersionsResponse Int
getSlotTypeVersionsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSlotTypeVersionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetSlotTypeVersionsResponse' :: GetSlotTypeVersionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetSlotTypeVersionsResponse
s@GetSlotTypeVersionsResponse' {} Int
a -> GetSlotTypeVersionsResponse
s {$sel:httpStatus:GetSlotTypeVersionsResponse' :: Int
httpStatus = Int
a} :: GetSlotTypeVersionsResponse)

instance Prelude.NFData GetSlotTypeVersionsResponse where
  rnf :: GetSlotTypeVersionsResponse -> ()
rnf GetSlotTypeVersionsResponse' {Int
Maybe [SlotTypeMetadata]
Maybe Text
httpStatus :: Int
slotTypes :: Maybe [SlotTypeMetadata]
nextToken :: Maybe Text
$sel:httpStatus:GetSlotTypeVersionsResponse' :: GetSlotTypeVersionsResponse -> Int
$sel:slotTypes:GetSlotTypeVersionsResponse' :: GetSlotTypeVersionsResponse -> Maybe [SlotTypeMetadata]
$sel:nextToken:GetSlotTypeVersionsResponse' :: GetSlotTypeVersionsResponse -> 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 [SlotTypeMetadata]
slotTypes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus