{-# 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.Greengrass.ListConnectorDefinitionVersions
-- 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 the versions of a connector definition, which are containers for
-- connectors. Connectors run on the Greengrass core and contain built-in
-- integration with local infrastructure, device protocols, AWS, and other
-- cloud services.
--
-- This operation returns paginated results.
module Amazonka.Greengrass.ListConnectorDefinitionVersions
  ( -- * Creating a Request
    ListConnectorDefinitionVersions (..),
    newListConnectorDefinitionVersions,

    -- * Request Lenses
    listConnectorDefinitionVersions_maxResults,
    listConnectorDefinitionVersions_nextToken,
    listConnectorDefinitionVersions_connectorDefinitionId,

    -- * Destructuring the Response
    ListConnectorDefinitionVersionsResponse (..),
    newListConnectorDefinitionVersionsResponse,

    -- * Response Lenses
    listConnectorDefinitionVersionsResponse_nextToken,
    listConnectorDefinitionVersionsResponse_versions,
    listConnectorDefinitionVersionsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListConnectorDefinitionVersions' smart constructor.
data ListConnectorDefinitionVersions = ListConnectorDefinitionVersions'
  { -- | The maximum number of results to be returned per request.
    ListConnectorDefinitionVersions -> Maybe Text
maxResults :: Prelude.Maybe Prelude.Text,
    -- | The token for the next set of results, or \'\'null\'\' if there are no
    -- additional results.
    ListConnectorDefinitionVersions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the connector definition.
    ListConnectorDefinitionVersions -> Text
connectorDefinitionId :: Prelude.Text
  }
  deriving (ListConnectorDefinitionVersions
-> ListConnectorDefinitionVersions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListConnectorDefinitionVersions
-> ListConnectorDefinitionVersions -> Bool
$c/= :: ListConnectorDefinitionVersions
-> ListConnectorDefinitionVersions -> Bool
== :: ListConnectorDefinitionVersions
-> ListConnectorDefinitionVersions -> Bool
$c== :: ListConnectorDefinitionVersions
-> ListConnectorDefinitionVersions -> Bool
Prelude.Eq, ReadPrec [ListConnectorDefinitionVersions]
ReadPrec ListConnectorDefinitionVersions
Int -> ReadS ListConnectorDefinitionVersions
ReadS [ListConnectorDefinitionVersions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListConnectorDefinitionVersions]
$creadListPrec :: ReadPrec [ListConnectorDefinitionVersions]
readPrec :: ReadPrec ListConnectorDefinitionVersions
$creadPrec :: ReadPrec ListConnectorDefinitionVersions
readList :: ReadS [ListConnectorDefinitionVersions]
$creadList :: ReadS [ListConnectorDefinitionVersions]
readsPrec :: Int -> ReadS ListConnectorDefinitionVersions
$creadsPrec :: Int -> ReadS ListConnectorDefinitionVersions
Prelude.Read, Int -> ListConnectorDefinitionVersions -> ShowS
[ListConnectorDefinitionVersions] -> ShowS
ListConnectorDefinitionVersions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListConnectorDefinitionVersions] -> ShowS
$cshowList :: [ListConnectorDefinitionVersions] -> ShowS
show :: ListConnectorDefinitionVersions -> String
$cshow :: ListConnectorDefinitionVersions -> String
showsPrec :: Int -> ListConnectorDefinitionVersions -> ShowS
$cshowsPrec :: Int -> ListConnectorDefinitionVersions -> ShowS
Prelude.Show, forall x.
Rep ListConnectorDefinitionVersions x
-> ListConnectorDefinitionVersions
forall x.
ListConnectorDefinitionVersions
-> Rep ListConnectorDefinitionVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListConnectorDefinitionVersions x
-> ListConnectorDefinitionVersions
$cfrom :: forall x.
ListConnectorDefinitionVersions
-> Rep ListConnectorDefinitionVersions x
Prelude.Generic)

-- |
-- Create a value of 'ListConnectorDefinitionVersions' 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', 'listConnectorDefinitionVersions_maxResults' - The maximum number of results to be returned per request.
--
-- 'nextToken', 'listConnectorDefinitionVersions_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'connectorDefinitionId', 'listConnectorDefinitionVersions_connectorDefinitionId' - The ID of the connector definition.
newListConnectorDefinitionVersions ::
  -- | 'connectorDefinitionId'
  Prelude.Text ->
  ListConnectorDefinitionVersions
newListConnectorDefinitionVersions :: Text -> ListConnectorDefinitionVersions
newListConnectorDefinitionVersions
  Text
pConnectorDefinitionId_ =
    ListConnectorDefinitionVersions'
      { $sel:maxResults:ListConnectorDefinitionVersions' :: Maybe Text
maxResults =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListConnectorDefinitionVersions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:connectorDefinitionId:ListConnectorDefinitionVersions' :: Text
connectorDefinitionId =
          Text
pConnectorDefinitionId_
      }

-- | The maximum number of results to be returned per request.
listConnectorDefinitionVersions_maxResults :: Lens.Lens' ListConnectorDefinitionVersions (Prelude.Maybe Prelude.Text)
listConnectorDefinitionVersions_maxResults :: Lens' ListConnectorDefinitionVersions (Maybe Text)
listConnectorDefinitionVersions_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectorDefinitionVersions' {Maybe Text
maxResults :: Maybe Text
$sel:maxResults:ListConnectorDefinitionVersions' :: ListConnectorDefinitionVersions -> Maybe Text
maxResults} -> Maybe Text
maxResults) (\s :: ListConnectorDefinitionVersions
s@ListConnectorDefinitionVersions' {} Maybe Text
a -> ListConnectorDefinitionVersions
s {$sel:maxResults:ListConnectorDefinitionVersions' :: Maybe Text
maxResults = Maybe Text
a} :: ListConnectorDefinitionVersions)

-- | The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
listConnectorDefinitionVersions_nextToken :: Lens.Lens' ListConnectorDefinitionVersions (Prelude.Maybe Prelude.Text)
listConnectorDefinitionVersions_nextToken :: Lens' ListConnectorDefinitionVersions (Maybe Text)
listConnectorDefinitionVersions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectorDefinitionVersions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListConnectorDefinitionVersions' :: ListConnectorDefinitionVersions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListConnectorDefinitionVersions
s@ListConnectorDefinitionVersions' {} Maybe Text
a -> ListConnectorDefinitionVersions
s {$sel:nextToken:ListConnectorDefinitionVersions' :: Maybe Text
nextToken = Maybe Text
a} :: ListConnectorDefinitionVersions)

-- | The ID of the connector definition.
listConnectorDefinitionVersions_connectorDefinitionId :: Lens.Lens' ListConnectorDefinitionVersions Prelude.Text
listConnectorDefinitionVersions_connectorDefinitionId :: Lens' ListConnectorDefinitionVersions Text
listConnectorDefinitionVersions_connectorDefinitionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectorDefinitionVersions' {Text
connectorDefinitionId :: Text
$sel:connectorDefinitionId:ListConnectorDefinitionVersions' :: ListConnectorDefinitionVersions -> Text
connectorDefinitionId} -> Text
connectorDefinitionId) (\s :: ListConnectorDefinitionVersions
s@ListConnectorDefinitionVersions' {} Text
a -> ListConnectorDefinitionVersions
s {$sel:connectorDefinitionId:ListConnectorDefinitionVersions' :: Text
connectorDefinitionId = Text
a} :: ListConnectorDefinitionVersions)

instance
  Core.AWSPager
    ListConnectorDefinitionVersions
  where
  page :: ListConnectorDefinitionVersions
-> AWSResponse ListConnectorDefinitionVersions
-> Maybe ListConnectorDefinitionVersions
page ListConnectorDefinitionVersions
rq AWSResponse ListConnectorDefinitionVersions
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListConnectorDefinitionVersions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListConnectorDefinitionVersionsResponse (Maybe Text)
listConnectorDefinitionVersionsResponse_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 ListConnectorDefinitionVersions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListConnectorDefinitionVersionsResponse
  (Maybe [VersionInformation])
listConnectorDefinitionVersionsResponse_versions
            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.$ ListConnectorDefinitionVersions
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListConnectorDefinitionVersions (Maybe Text)
listConnectorDefinitionVersions_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListConnectorDefinitionVersions
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListConnectorDefinitionVersionsResponse (Maybe Text)
listConnectorDefinitionVersionsResponse_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
    ListConnectorDefinitionVersions
  where
  type
    AWSResponse ListConnectorDefinitionVersions =
      ListConnectorDefinitionVersionsResponse
  request :: (Service -> Service)
-> ListConnectorDefinitionVersions
-> Request ListConnectorDefinitionVersions
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 ListConnectorDefinitionVersions
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListConnectorDefinitionVersions)))
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 [VersionInformation]
-> Int
-> ListConnectorDefinitionVersionsResponse
ListConnectorDefinitionVersionsResponse'
            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
"Versions" 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
    ListConnectorDefinitionVersions
  where
  hashWithSalt :: Int -> ListConnectorDefinitionVersions -> Int
hashWithSalt
    Int
_salt
    ListConnectorDefinitionVersions' {Maybe Text
Text
connectorDefinitionId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Text
$sel:connectorDefinitionId:ListConnectorDefinitionVersions' :: ListConnectorDefinitionVersions -> Text
$sel:nextToken:ListConnectorDefinitionVersions' :: ListConnectorDefinitionVersions -> Maybe Text
$sel:maxResults:ListConnectorDefinitionVersions' :: ListConnectorDefinitionVersions -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
connectorDefinitionId

instance
  Prelude.NFData
    ListConnectorDefinitionVersions
  where
  rnf :: ListConnectorDefinitionVersions -> ()
rnf ListConnectorDefinitionVersions' {Maybe Text
Text
connectorDefinitionId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Text
$sel:connectorDefinitionId:ListConnectorDefinitionVersions' :: ListConnectorDefinitionVersions -> Text
$sel:nextToken:ListConnectorDefinitionVersions' :: ListConnectorDefinitionVersions -> Maybe Text
$sel:maxResults:ListConnectorDefinitionVersions' :: ListConnectorDefinitionVersions -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
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
connectorDefinitionId

instance
  Data.ToHeaders
    ListConnectorDefinitionVersions
  where
  toHeaders :: ListConnectorDefinitionVersions -> 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 ListConnectorDefinitionVersions where
  toPath :: ListConnectorDefinitionVersions -> ByteString
toPath ListConnectorDefinitionVersions' {Maybe Text
Text
connectorDefinitionId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Text
$sel:connectorDefinitionId:ListConnectorDefinitionVersions' :: ListConnectorDefinitionVersions -> Text
$sel:nextToken:ListConnectorDefinitionVersions' :: ListConnectorDefinitionVersions -> Maybe Text
$sel:maxResults:ListConnectorDefinitionVersions' :: ListConnectorDefinitionVersions -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/greengrass/definition/connectors/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
connectorDefinitionId,
        ByteString
"/versions"
      ]

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

-- | /See:/ 'newListConnectorDefinitionVersionsResponse' smart constructor.
data ListConnectorDefinitionVersionsResponse = ListConnectorDefinitionVersionsResponse'
  { -- | The token for the next set of results, or \'\'null\'\' if there are no
    -- additional results.
    ListConnectorDefinitionVersionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about a version.
    ListConnectorDefinitionVersionsResponse
-> Maybe [VersionInformation]
versions :: Prelude.Maybe [VersionInformation],
    -- | The response's http status code.
    ListConnectorDefinitionVersionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListConnectorDefinitionVersionsResponse
-> ListConnectorDefinitionVersionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListConnectorDefinitionVersionsResponse
-> ListConnectorDefinitionVersionsResponse -> Bool
$c/= :: ListConnectorDefinitionVersionsResponse
-> ListConnectorDefinitionVersionsResponse -> Bool
== :: ListConnectorDefinitionVersionsResponse
-> ListConnectorDefinitionVersionsResponse -> Bool
$c== :: ListConnectorDefinitionVersionsResponse
-> ListConnectorDefinitionVersionsResponse -> Bool
Prelude.Eq, ReadPrec [ListConnectorDefinitionVersionsResponse]
ReadPrec ListConnectorDefinitionVersionsResponse
Int -> ReadS ListConnectorDefinitionVersionsResponse
ReadS [ListConnectorDefinitionVersionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListConnectorDefinitionVersionsResponse]
$creadListPrec :: ReadPrec [ListConnectorDefinitionVersionsResponse]
readPrec :: ReadPrec ListConnectorDefinitionVersionsResponse
$creadPrec :: ReadPrec ListConnectorDefinitionVersionsResponse
readList :: ReadS [ListConnectorDefinitionVersionsResponse]
$creadList :: ReadS [ListConnectorDefinitionVersionsResponse]
readsPrec :: Int -> ReadS ListConnectorDefinitionVersionsResponse
$creadsPrec :: Int -> ReadS ListConnectorDefinitionVersionsResponse
Prelude.Read, Int -> ListConnectorDefinitionVersionsResponse -> ShowS
[ListConnectorDefinitionVersionsResponse] -> ShowS
ListConnectorDefinitionVersionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListConnectorDefinitionVersionsResponse] -> ShowS
$cshowList :: [ListConnectorDefinitionVersionsResponse] -> ShowS
show :: ListConnectorDefinitionVersionsResponse -> String
$cshow :: ListConnectorDefinitionVersionsResponse -> String
showsPrec :: Int -> ListConnectorDefinitionVersionsResponse -> ShowS
$cshowsPrec :: Int -> ListConnectorDefinitionVersionsResponse -> ShowS
Prelude.Show, forall x.
Rep ListConnectorDefinitionVersionsResponse x
-> ListConnectorDefinitionVersionsResponse
forall x.
ListConnectorDefinitionVersionsResponse
-> Rep ListConnectorDefinitionVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListConnectorDefinitionVersionsResponse x
-> ListConnectorDefinitionVersionsResponse
$cfrom :: forall x.
ListConnectorDefinitionVersionsResponse
-> Rep ListConnectorDefinitionVersionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListConnectorDefinitionVersionsResponse' 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', 'listConnectorDefinitionVersionsResponse_nextToken' - The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
--
-- 'versions', 'listConnectorDefinitionVersionsResponse_versions' - Information about a version.
--
-- 'httpStatus', 'listConnectorDefinitionVersionsResponse_httpStatus' - The response's http status code.
newListConnectorDefinitionVersionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListConnectorDefinitionVersionsResponse
newListConnectorDefinitionVersionsResponse :: Int -> ListConnectorDefinitionVersionsResponse
newListConnectorDefinitionVersionsResponse
  Int
pHttpStatus_ =
    ListConnectorDefinitionVersionsResponse'
      { $sel:nextToken:ListConnectorDefinitionVersionsResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:versions:ListConnectorDefinitionVersionsResponse' :: Maybe [VersionInformation]
versions = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListConnectorDefinitionVersionsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The token for the next set of results, or \'\'null\'\' if there are no
-- additional results.
listConnectorDefinitionVersionsResponse_nextToken :: Lens.Lens' ListConnectorDefinitionVersionsResponse (Prelude.Maybe Prelude.Text)
listConnectorDefinitionVersionsResponse_nextToken :: Lens' ListConnectorDefinitionVersionsResponse (Maybe Text)
listConnectorDefinitionVersionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectorDefinitionVersionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListConnectorDefinitionVersionsResponse' :: ListConnectorDefinitionVersionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListConnectorDefinitionVersionsResponse
s@ListConnectorDefinitionVersionsResponse' {} Maybe Text
a -> ListConnectorDefinitionVersionsResponse
s {$sel:nextToken:ListConnectorDefinitionVersionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListConnectorDefinitionVersionsResponse)

-- | Information about a version.
listConnectorDefinitionVersionsResponse_versions :: Lens.Lens' ListConnectorDefinitionVersionsResponse (Prelude.Maybe [VersionInformation])
listConnectorDefinitionVersionsResponse_versions :: Lens'
  ListConnectorDefinitionVersionsResponse
  (Maybe [VersionInformation])
listConnectorDefinitionVersionsResponse_versions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectorDefinitionVersionsResponse' {Maybe [VersionInformation]
versions :: Maybe [VersionInformation]
$sel:versions:ListConnectorDefinitionVersionsResponse' :: ListConnectorDefinitionVersionsResponse
-> Maybe [VersionInformation]
versions} -> Maybe [VersionInformation]
versions) (\s :: ListConnectorDefinitionVersionsResponse
s@ListConnectorDefinitionVersionsResponse' {} Maybe [VersionInformation]
a -> ListConnectorDefinitionVersionsResponse
s {$sel:versions:ListConnectorDefinitionVersionsResponse' :: Maybe [VersionInformation]
versions = Maybe [VersionInformation]
a} :: ListConnectorDefinitionVersionsResponse) 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.
listConnectorDefinitionVersionsResponse_httpStatus :: Lens.Lens' ListConnectorDefinitionVersionsResponse Prelude.Int
listConnectorDefinitionVersionsResponse_httpStatus :: Lens' ListConnectorDefinitionVersionsResponse Int
listConnectorDefinitionVersionsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListConnectorDefinitionVersionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListConnectorDefinitionVersionsResponse' :: ListConnectorDefinitionVersionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListConnectorDefinitionVersionsResponse
s@ListConnectorDefinitionVersionsResponse' {} Int
a -> ListConnectorDefinitionVersionsResponse
s {$sel:httpStatus:ListConnectorDefinitionVersionsResponse' :: Int
httpStatus = Int
a} :: ListConnectorDefinitionVersionsResponse)

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