{-# 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.IoTEvents.ListDetectorModelVersions
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all the versions of a detector model. Only the metadata associated
-- with each detector model version is returned.
module Amazonka.IoTEvents.ListDetectorModelVersions
  ( -- * Creating a Request
    ListDetectorModelVersions (..),
    newListDetectorModelVersions,

    -- * Request Lenses
    listDetectorModelVersions_nextToken,
    listDetectorModelVersions_maxResults,
    listDetectorModelVersions_detectorModelName,

    -- * Destructuring the Response
    ListDetectorModelVersionsResponse (..),
    newListDetectorModelVersionsResponse,

    -- * Response Lenses
    listDetectorModelVersionsResponse_nextToken,
    listDetectorModelVersionsResponse_detectorModelVersionSummaries,
    listDetectorModelVersionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoTEvents.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListDetectorModelVersions' smart constructor.
data ListDetectorModelVersions = ListDetectorModelVersions'
  { -- | The token that you can use to return the next set of results.
    ListDetectorModelVersions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to be returned per request.
    ListDetectorModelVersions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The name of the detector model whose versions are returned.
    ListDetectorModelVersions -> Text
detectorModelName :: Prelude.Text
  }
  deriving (ListDetectorModelVersions -> ListDetectorModelVersions -> Bool
(ListDetectorModelVersions -> ListDetectorModelVersions -> Bool)
-> (ListDetectorModelVersions -> ListDetectorModelVersions -> Bool)
-> Eq ListDetectorModelVersions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDetectorModelVersions -> ListDetectorModelVersions -> Bool
$c/= :: ListDetectorModelVersions -> ListDetectorModelVersions -> Bool
== :: ListDetectorModelVersions -> ListDetectorModelVersions -> Bool
$c== :: ListDetectorModelVersions -> ListDetectorModelVersions -> Bool
Prelude.Eq, ReadPrec [ListDetectorModelVersions]
ReadPrec ListDetectorModelVersions
Int -> ReadS ListDetectorModelVersions
ReadS [ListDetectorModelVersions]
(Int -> ReadS ListDetectorModelVersions)
-> ReadS [ListDetectorModelVersions]
-> ReadPrec ListDetectorModelVersions
-> ReadPrec [ListDetectorModelVersions]
-> Read ListDetectorModelVersions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDetectorModelVersions]
$creadListPrec :: ReadPrec [ListDetectorModelVersions]
readPrec :: ReadPrec ListDetectorModelVersions
$creadPrec :: ReadPrec ListDetectorModelVersions
readList :: ReadS [ListDetectorModelVersions]
$creadList :: ReadS [ListDetectorModelVersions]
readsPrec :: Int -> ReadS ListDetectorModelVersions
$creadsPrec :: Int -> ReadS ListDetectorModelVersions
Prelude.Read, Int -> ListDetectorModelVersions -> ShowS
[ListDetectorModelVersions] -> ShowS
ListDetectorModelVersions -> String
(Int -> ListDetectorModelVersions -> ShowS)
-> (ListDetectorModelVersions -> String)
-> ([ListDetectorModelVersions] -> ShowS)
-> Show ListDetectorModelVersions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDetectorModelVersions] -> ShowS
$cshowList :: [ListDetectorModelVersions] -> ShowS
show :: ListDetectorModelVersions -> String
$cshow :: ListDetectorModelVersions -> String
showsPrec :: Int -> ListDetectorModelVersions -> ShowS
$cshowsPrec :: Int -> ListDetectorModelVersions -> ShowS
Prelude.Show, (forall x.
 ListDetectorModelVersions -> Rep ListDetectorModelVersions x)
-> (forall x.
    Rep ListDetectorModelVersions x -> ListDetectorModelVersions)
-> Generic ListDetectorModelVersions
forall x.
Rep ListDetectorModelVersions x -> ListDetectorModelVersions
forall x.
ListDetectorModelVersions -> Rep ListDetectorModelVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDetectorModelVersions x -> ListDetectorModelVersions
$cfrom :: forall x.
ListDetectorModelVersions -> Rep ListDetectorModelVersions x
Prelude.Generic)

-- |
-- Create a value of 'ListDetectorModelVersions' 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', 'listDetectorModelVersions_nextToken' - The token that you can use to return the next set of results.
--
-- 'maxResults', 'listDetectorModelVersions_maxResults' - The maximum number of results to be returned per request.
--
-- 'detectorModelName', 'listDetectorModelVersions_detectorModelName' - The name of the detector model whose versions are returned.
newListDetectorModelVersions ::
  -- | 'detectorModelName'
  Prelude.Text ->
  ListDetectorModelVersions
newListDetectorModelVersions :: Text -> ListDetectorModelVersions
newListDetectorModelVersions Text
pDetectorModelName_ =
  ListDetectorModelVersions' :: Maybe Text -> Maybe Natural -> Text -> ListDetectorModelVersions
ListDetectorModelVersions'
    { $sel:nextToken:ListDetectorModelVersions' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListDetectorModelVersions' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorModelName:ListDetectorModelVersions' :: Text
detectorModelName = Text
pDetectorModelName_
    }

-- | The token that you can use to return the next set of results.
listDetectorModelVersions_nextToken :: Lens.Lens' ListDetectorModelVersions (Prelude.Maybe Prelude.Text)
listDetectorModelVersions_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDetectorModelVersions -> f ListDetectorModelVersions
listDetectorModelVersions_nextToken = (ListDetectorModelVersions -> Maybe Text)
-> (ListDetectorModelVersions
    -> Maybe Text -> ListDetectorModelVersions)
-> Lens
     ListDetectorModelVersions
     ListDetectorModelVersions
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectorModelVersions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDetectorModelVersions' :: ListDetectorModelVersions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDetectorModelVersions
s@ListDetectorModelVersions' {} Maybe Text
a -> ListDetectorModelVersions
s {$sel:nextToken:ListDetectorModelVersions' :: Maybe Text
nextToken = Maybe Text
a} :: ListDetectorModelVersions)

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

-- | The name of the detector model whose versions are returned.
listDetectorModelVersions_detectorModelName :: Lens.Lens' ListDetectorModelVersions Prelude.Text
listDetectorModelVersions_detectorModelName :: (Text -> f Text)
-> ListDetectorModelVersions -> f ListDetectorModelVersions
listDetectorModelVersions_detectorModelName = (ListDetectorModelVersions -> Text)
-> (ListDetectorModelVersions -> Text -> ListDetectorModelVersions)
-> Lens
     ListDetectorModelVersions ListDetectorModelVersions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectorModelVersions' {Text
detectorModelName :: Text
$sel:detectorModelName:ListDetectorModelVersions' :: ListDetectorModelVersions -> Text
detectorModelName} -> Text
detectorModelName) (\s :: ListDetectorModelVersions
s@ListDetectorModelVersions' {} Text
a -> ListDetectorModelVersions
s {$sel:detectorModelName:ListDetectorModelVersions' :: Text
detectorModelName = Text
a} :: ListDetectorModelVersions)

instance Core.AWSRequest ListDetectorModelVersions where
  type
    AWSResponse ListDetectorModelVersions =
      ListDetectorModelVersionsResponse
  request :: ListDetectorModelVersions -> Request ListDetectorModelVersions
request = Service
-> ListDetectorModelVersions -> Request ListDetectorModelVersions
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListDetectorModelVersions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDetectorModelVersions)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListDetectorModelVersions))
-> Logger
-> Service
-> Proxy ListDetectorModelVersions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDetectorModelVersions)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [DetectorModelVersionSummary]
-> Int
-> ListDetectorModelVersionsResponse
ListDetectorModelVersionsResponse'
            (Maybe Text
 -> Maybe [DetectorModelVersionSummary]
 -> Int
 -> ListDetectorModelVersionsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [DetectorModelVersionSummary]
      -> Int -> ListDetectorModelVersionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
            Either
  String
  (Maybe [DetectorModelVersionSummary]
   -> Int -> ListDetectorModelVersionsResponse)
-> Either String (Maybe [DetectorModelVersionSummary])
-> Either String (Int -> ListDetectorModelVersionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe [DetectorModelVersionSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"detectorModelVersionSummaries"
                            Either String (Maybe (Maybe [DetectorModelVersionSummary]))
-> Maybe [DetectorModelVersionSummary]
-> Either String (Maybe [DetectorModelVersionSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DetectorModelVersionSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListDetectorModelVersionsResponse)
-> Either String Int
-> Either String ListDetectorModelVersionsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListDetectorModelVersions

instance Prelude.NFData ListDetectorModelVersions

instance Core.ToHeaders ListDetectorModelVersions where
  toHeaders :: ListDetectorModelVersions -> ResponseHeaders
toHeaders = ResponseHeaders -> ListDetectorModelVersions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath ListDetectorModelVersions where
  toPath :: ListDetectorModelVersions -> ByteString
toPath ListDetectorModelVersions' {Maybe Natural
Maybe Text
Text
detectorModelName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:detectorModelName:ListDetectorModelVersions' :: ListDetectorModelVersions -> Text
$sel:maxResults:ListDetectorModelVersions' :: ListDetectorModelVersions -> Maybe Natural
$sel:nextToken:ListDetectorModelVersions' :: ListDetectorModelVersions -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/detector-models/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
detectorModelName,
        ByteString
"/versions"
      ]

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

-- | /See:/ 'newListDetectorModelVersionsResponse' smart constructor.
data ListDetectorModelVersionsResponse = ListDetectorModelVersionsResponse'
  { -- | The token that you can use to return the next set of results, or @null@
    -- if there are no more results.
    ListDetectorModelVersionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Summary information about the detector model versions.
    ListDetectorModelVersionsResponse
-> Maybe [DetectorModelVersionSummary]
detectorModelVersionSummaries :: Prelude.Maybe [DetectorModelVersionSummary],
    -- | The response's http status code.
    ListDetectorModelVersionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDetectorModelVersionsResponse
-> ListDetectorModelVersionsResponse -> Bool
(ListDetectorModelVersionsResponse
 -> ListDetectorModelVersionsResponse -> Bool)
-> (ListDetectorModelVersionsResponse
    -> ListDetectorModelVersionsResponse -> Bool)
-> Eq ListDetectorModelVersionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDetectorModelVersionsResponse
-> ListDetectorModelVersionsResponse -> Bool
$c/= :: ListDetectorModelVersionsResponse
-> ListDetectorModelVersionsResponse -> Bool
== :: ListDetectorModelVersionsResponse
-> ListDetectorModelVersionsResponse -> Bool
$c== :: ListDetectorModelVersionsResponse
-> ListDetectorModelVersionsResponse -> Bool
Prelude.Eq, ReadPrec [ListDetectorModelVersionsResponse]
ReadPrec ListDetectorModelVersionsResponse
Int -> ReadS ListDetectorModelVersionsResponse
ReadS [ListDetectorModelVersionsResponse]
(Int -> ReadS ListDetectorModelVersionsResponse)
-> ReadS [ListDetectorModelVersionsResponse]
-> ReadPrec ListDetectorModelVersionsResponse
-> ReadPrec [ListDetectorModelVersionsResponse]
-> Read ListDetectorModelVersionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDetectorModelVersionsResponse]
$creadListPrec :: ReadPrec [ListDetectorModelVersionsResponse]
readPrec :: ReadPrec ListDetectorModelVersionsResponse
$creadPrec :: ReadPrec ListDetectorModelVersionsResponse
readList :: ReadS [ListDetectorModelVersionsResponse]
$creadList :: ReadS [ListDetectorModelVersionsResponse]
readsPrec :: Int -> ReadS ListDetectorModelVersionsResponse
$creadsPrec :: Int -> ReadS ListDetectorModelVersionsResponse
Prelude.Read, Int -> ListDetectorModelVersionsResponse -> ShowS
[ListDetectorModelVersionsResponse] -> ShowS
ListDetectorModelVersionsResponse -> String
(Int -> ListDetectorModelVersionsResponse -> ShowS)
-> (ListDetectorModelVersionsResponse -> String)
-> ([ListDetectorModelVersionsResponse] -> ShowS)
-> Show ListDetectorModelVersionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDetectorModelVersionsResponse] -> ShowS
$cshowList :: [ListDetectorModelVersionsResponse] -> ShowS
show :: ListDetectorModelVersionsResponse -> String
$cshow :: ListDetectorModelVersionsResponse -> String
showsPrec :: Int -> ListDetectorModelVersionsResponse -> ShowS
$cshowsPrec :: Int -> ListDetectorModelVersionsResponse -> ShowS
Prelude.Show, (forall x.
 ListDetectorModelVersionsResponse
 -> Rep ListDetectorModelVersionsResponse x)
-> (forall x.
    Rep ListDetectorModelVersionsResponse x
    -> ListDetectorModelVersionsResponse)
-> Generic ListDetectorModelVersionsResponse
forall x.
Rep ListDetectorModelVersionsResponse x
-> ListDetectorModelVersionsResponse
forall x.
ListDetectorModelVersionsResponse
-> Rep ListDetectorModelVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDetectorModelVersionsResponse x
-> ListDetectorModelVersionsResponse
$cfrom :: forall x.
ListDetectorModelVersionsResponse
-> Rep ListDetectorModelVersionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDetectorModelVersionsResponse' 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', 'listDetectorModelVersionsResponse_nextToken' - The token that you can use to return the next set of results, or @null@
-- if there are no more results.
--
-- 'detectorModelVersionSummaries', 'listDetectorModelVersionsResponse_detectorModelVersionSummaries' - Summary information about the detector model versions.
--
-- 'httpStatus', 'listDetectorModelVersionsResponse_httpStatus' - The response's http status code.
newListDetectorModelVersionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDetectorModelVersionsResponse
newListDetectorModelVersionsResponse :: Int -> ListDetectorModelVersionsResponse
newListDetectorModelVersionsResponse Int
pHttpStatus_ =
  ListDetectorModelVersionsResponse' :: Maybe Text
-> Maybe [DetectorModelVersionSummary]
-> Int
-> ListDetectorModelVersionsResponse
ListDetectorModelVersionsResponse'
    { $sel:nextToken:ListDetectorModelVersionsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorModelVersionSummaries:ListDetectorModelVersionsResponse' :: Maybe [DetectorModelVersionSummary]
detectorModelVersionSummaries =
        Maybe [DetectorModelVersionSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDetectorModelVersionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token that you can use to return the next set of results, or @null@
-- if there are no more results.
listDetectorModelVersionsResponse_nextToken :: Lens.Lens' ListDetectorModelVersionsResponse (Prelude.Maybe Prelude.Text)
listDetectorModelVersionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDetectorModelVersionsResponse
-> f ListDetectorModelVersionsResponse
listDetectorModelVersionsResponse_nextToken = (ListDetectorModelVersionsResponse -> Maybe Text)
-> (ListDetectorModelVersionsResponse
    -> Maybe Text -> ListDetectorModelVersionsResponse)
-> Lens
     ListDetectorModelVersionsResponse
     ListDetectorModelVersionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectorModelVersionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDetectorModelVersionsResponse' :: ListDetectorModelVersionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDetectorModelVersionsResponse
s@ListDetectorModelVersionsResponse' {} Maybe Text
a -> ListDetectorModelVersionsResponse
s {$sel:nextToken:ListDetectorModelVersionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDetectorModelVersionsResponse)

-- | Summary information about the detector model versions.
listDetectorModelVersionsResponse_detectorModelVersionSummaries :: Lens.Lens' ListDetectorModelVersionsResponse (Prelude.Maybe [DetectorModelVersionSummary])
listDetectorModelVersionsResponse_detectorModelVersionSummaries :: (Maybe [DetectorModelVersionSummary]
 -> f (Maybe [DetectorModelVersionSummary]))
-> ListDetectorModelVersionsResponse
-> f ListDetectorModelVersionsResponse
listDetectorModelVersionsResponse_detectorModelVersionSummaries = (ListDetectorModelVersionsResponse
 -> Maybe [DetectorModelVersionSummary])
-> (ListDetectorModelVersionsResponse
    -> Maybe [DetectorModelVersionSummary]
    -> ListDetectorModelVersionsResponse)
-> Lens
     ListDetectorModelVersionsResponse
     ListDetectorModelVersionsResponse
     (Maybe [DetectorModelVersionSummary])
     (Maybe [DetectorModelVersionSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDetectorModelVersionsResponse' {Maybe [DetectorModelVersionSummary]
detectorModelVersionSummaries :: Maybe [DetectorModelVersionSummary]
$sel:detectorModelVersionSummaries:ListDetectorModelVersionsResponse' :: ListDetectorModelVersionsResponse
-> Maybe [DetectorModelVersionSummary]
detectorModelVersionSummaries} -> Maybe [DetectorModelVersionSummary]
detectorModelVersionSummaries) (\s :: ListDetectorModelVersionsResponse
s@ListDetectorModelVersionsResponse' {} Maybe [DetectorModelVersionSummary]
a -> ListDetectorModelVersionsResponse
s {$sel:detectorModelVersionSummaries:ListDetectorModelVersionsResponse' :: Maybe [DetectorModelVersionSummary]
detectorModelVersionSummaries = Maybe [DetectorModelVersionSummary]
a} :: ListDetectorModelVersionsResponse) ((Maybe [DetectorModelVersionSummary]
  -> f (Maybe [DetectorModelVersionSummary]))
 -> ListDetectorModelVersionsResponse
 -> f ListDetectorModelVersionsResponse)
-> ((Maybe [DetectorModelVersionSummary]
     -> f (Maybe [DetectorModelVersionSummary]))
    -> Maybe [DetectorModelVersionSummary]
    -> f (Maybe [DetectorModelVersionSummary]))
-> (Maybe [DetectorModelVersionSummary]
    -> f (Maybe [DetectorModelVersionSummary]))
-> ListDetectorModelVersionsResponse
-> f ListDetectorModelVersionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DetectorModelVersionSummary]
  [DetectorModelVersionSummary]
  [DetectorModelVersionSummary]
  [DetectorModelVersionSummary]
-> Iso
     (Maybe [DetectorModelVersionSummary])
     (Maybe [DetectorModelVersionSummary])
     (Maybe [DetectorModelVersionSummary])
     (Maybe [DetectorModelVersionSummary])
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
  [DetectorModelVersionSummary]
  [DetectorModelVersionSummary]
  [DetectorModelVersionSummary]
  [DetectorModelVersionSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListDetectorModelVersionsResponse