{-# 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.GetDetectorModelAnalysisResults
-- 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)
--
-- Retrieves one or more analysis results of the detector model.
--
-- After AWS IoT Events starts analyzing your detector model, you have up
-- to 24 hours to retrieve the analysis results.
module Amazonka.IoTEvents.GetDetectorModelAnalysisResults
  ( -- * Creating a Request
    GetDetectorModelAnalysisResults (..),
    newGetDetectorModelAnalysisResults,

    -- * Request Lenses
    getDetectorModelAnalysisResults_nextToken,
    getDetectorModelAnalysisResults_maxResults,
    getDetectorModelAnalysisResults_analysisId,

    -- * Destructuring the Response
    GetDetectorModelAnalysisResultsResponse (..),
    newGetDetectorModelAnalysisResultsResponse,

    -- * Response Lenses
    getDetectorModelAnalysisResultsResponse_nextToken,
    getDetectorModelAnalysisResultsResponse_analysisResults,
    getDetectorModelAnalysisResultsResponse_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:/ 'newGetDetectorModelAnalysisResults' smart constructor.
data GetDetectorModelAnalysisResults = GetDetectorModelAnalysisResults'
  { -- | The token that you can use to return the next set of results.
    GetDetectorModelAnalysisResults -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to be returned per request.
    GetDetectorModelAnalysisResults -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The ID of the analysis result that you want to retrieve.
    GetDetectorModelAnalysisResults -> Text
analysisId :: Prelude.Text
  }
  deriving (GetDetectorModelAnalysisResults
-> GetDetectorModelAnalysisResults -> Bool
(GetDetectorModelAnalysisResults
 -> GetDetectorModelAnalysisResults -> Bool)
-> (GetDetectorModelAnalysisResults
    -> GetDetectorModelAnalysisResults -> Bool)
-> Eq GetDetectorModelAnalysisResults
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDetectorModelAnalysisResults
-> GetDetectorModelAnalysisResults -> Bool
$c/= :: GetDetectorModelAnalysisResults
-> GetDetectorModelAnalysisResults -> Bool
== :: GetDetectorModelAnalysisResults
-> GetDetectorModelAnalysisResults -> Bool
$c== :: GetDetectorModelAnalysisResults
-> GetDetectorModelAnalysisResults -> Bool
Prelude.Eq, ReadPrec [GetDetectorModelAnalysisResults]
ReadPrec GetDetectorModelAnalysisResults
Int -> ReadS GetDetectorModelAnalysisResults
ReadS [GetDetectorModelAnalysisResults]
(Int -> ReadS GetDetectorModelAnalysisResults)
-> ReadS [GetDetectorModelAnalysisResults]
-> ReadPrec GetDetectorModelAnalysisResults
-> ReadPrec [GetDetectorModelAnalysisResults]
-> Read GetDetectorModelAnalysisResults
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDetectorModelAnalysisResults]
$creadListPrec :: ReadPrec [GetDetectorModelAnalysisResults]
readPrec :: ReadPrec GetDetectorModelAnalysisResults
$creadPrec :: ReadPrec GetDetectorModelAnalysisResults
readList :: ReadS [GetDetectorModelAnalysisResults]
$creadList :: ReadS [GetDetectorModelAnalysisResults]
readsPrec :: Int -> ReadS GetDetectorModelAnalysisResults
$creadsPrec :: Int -> ReadS GetDetectorModelAnalysisResults
Prelude.Read, Int -> GetDetectorModelAnalysisResults -> ShowS
[GetDetectorModelAnalysisResults] -> ShowS
GetDetectorModelAnalysisResults -> String
(Int -> GetDetectorModelAnalysisResults -> ShowS)
-> (GetDetectorModelAnalysisResults -> String)
-> ([GetDetectorModelAnalysisResults] -> ShowS)
-> Show GetDetectorModelAnalysisResults
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDetectorModelAnalysisResults] -> ShowS
$cshowList :: [GetDetectorModelAnalysisResults] -> ShowS
show :: GetDetectorModelAnalysisResults -> String
$cshow :: GetDetectorModelAnalysisResults -> String
showsPrec :: Int -> GetDetectorModelAnalysisResults -> ShowS
$cshowsPrec :: Int -> GetDetectorModelAnalysisResults -> ShowS
Prelude.Show, (forall x.
 GetDetectorModelAnalysisResults
 -> Rep GetDetectorModelAnalysisResults x)
-> (forall x.
    Rep GetDetectorModelAnalysisResults x
    -> GetDetectorModelAnalysisResults)
-> Generic GetDetectorModelAnalysisResults
forall x.
Rep GetDetectorModelAnalysisResults x
-> GetDetectorModelAnalysisResults
forall x.
GetDetectorModelAnalysisResults
-> Rep GetDetectorModelAnalysisResults x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDetectorModelAnalysisResults x
-> GetDetectorModelAnalysisResults
$cfrom :: forall x.
GetDetectorModelAnalysisResults
-> Rep GetDetectorModelAnalysisResults x
Prelude.Generic)

-- |
-- Create a value of 'GetDetectorModelAnalysisResults' 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', 'getDetectorModelAnalysisResults_nextToken' - The token that you can use to return the next set of results.
--
-- 'maxResults', 'getDetectorModelAnalysisResults_maxResults' - The maximum number of results to be returned per request.
--
-- 'analysisId', 'getDetectorModelAnalysisResults_analysisId' - The ID of the analysis result that you want to retrieve.
newGetDetectorModelAnalysisResults ::
  -- | 'analysisId'
  Prelude.Text ->
  GetDetectorModelAnalysisResults
newGetDetectorModelAnalysisResults :: Text -> GetDetectorModelAnalysisResults
newGetDetectorModelAnalysisResults Text
pAnalysisId_ =
  GetDetectorModelAnalysisResults' :: Maybe Text -> Maybe Int -> Text -> GetDetectorModelAnalysisResults
GetDetectorModelAnalysisResults'
    { $sel:nextToken:GetDetectorModelAnalysisResults' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetDetectorModelAnalysisResults' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:analysisId:GetDetectorModelAnalysisResults' :: Text
analysisId = Text
pAnalysisId_
    }

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

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

-- | The ID of the analysis result that you want to retrieve.
getDetectorModelAnalysisResults_analysisId :: Lens.Lens' GetDetectorModelAnalysisResults Prelude.Text
getDetectorModelAnalysisResults_analysisId :: (Text -> f Text)
-> GetDetectorModelAnalysisResults
-> f GetDetectorModelAnalysisResults
getDetectorModelAnalysisResults_analysisId = (GetDetectorModelAnalysisResults -> Text)
-> (GetDetectorModelAnalysisResults
    -> Text -> GetDetectorModelAnalysisResults)
-> Lens
     GetDetectorModelAnalysisResults
     GetDetectorModelAnalysisResults
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDetectorModelAnalysisResults' {Text
analysisId :: Text
$sel:analysisId:GetDetectorModelAnalysisResults' :: GetDetectorModelAnalysisResults -> Text
analysisId} -> Text
analysisId) (\s :: GetDetectorModelAnalysisResults
s@GetDetectorModelAnalysisResults' {} Text
a -> GetDetectorModelAnalysisResults
s {$sel:analysisId:GetDetectorModelAnalysisResults' :: Text
analysisId = Text
a} :: GetDetectorModelAnalysisResults)

instance
  Core.AWSRequest
    GetDetectorModelAnalysisResults
  where
  type
    AWSResponse GetDetectorModelAnalysisResults =
      GetDetectorModelAnalysisResultsResponse
  request :: GetDetectorModelAnalysisResults
-> Request GetDetectorModelAnalysisResults
request = Service
-> GetDetectorModelAnalysisResults
-> Request GetDetectorModelAnalysisResults
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetDetectorModelAnalysisResults
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetDetectorModelAnalysisResults)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetDetectorModelAnalysisResults))
-> Logger
-> Service
-> Proxy GetDetectorModelAnalysisResults
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetDetectorModelAnalysisResults)))
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 [AnalysisResult]
-> Int
-> GetDetectorModelAnalysisResultsResponse
GetDetectorModelAnalysisResultsResponse'
            (Maybe Text
 -> Maybe [AnalysisResult]
 -> Int
 -> GetDetectorModelAnalysisResultsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [AnalysisResult]
      -> Int -> GetDetectorModelAnalysisResultsResponse)
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 [AnalysisResult]
   -> Int -> GetDetectorModelAnalysisResultsResponse)
-> Either String (Maybe [AnalysisResult])
-> Either String (Int -> GetDetectorModelAnalysisResultsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [AnalysisResult]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"analysisResults"
                            Either String (Maybe (Maybe [AnalysisResult]))
-> Maybe [AnalysisResult] -> Either String (Maybe [AnalysisResult])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AnalysisResult]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> GetDetectorModelAnalysisResultsResponse)
-> Either String Int
-> Either String GetDetectorModelAnalysisResultsResponse
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
    GetDetectorModelAnalysisResults

instance
  Prelude.NFData
    GetDetectorModelAnalysisResults

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

instance Core.ToPath GetDetectorModelAnalysisResults where
  toPath :: GetDetectorModelAnalysisResults -> ByteString
toPath GetDetectorModelAnalysisResults' {Maybe Int
Maybe Text
Text
analysisId :: Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:analysisId:GetDetectorModelAnalysisResults' :: GetDetectorModelAnalysisResults -> Text
$sel:maxResults:GetDetectorModelAnalysisResults' :: GetDetectorModelAnalysisResults -> Maybe Int
$sel:nextToken:GetDetectorModelAnalysisResults' :: GetDetectorModelAnalysisResults -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/analysis/detector-models/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
analysisId,
        ByteString
"/results"
      ]

instance Core.ToQuery GetDetectorModelAnalysisResults where
  toQuery :: GetDetectorModelAnalysisResults -> QueryString
toQuery GetDetectorModelAnalysisResults' {Maybe Int
Maybe Text
Text
analysisId :: Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:analysisId:GetDetectorModelAnalysisResults' :: GetDetectorModelAnalysisResults -> Text
$sel:maxResults:GetDetectorModelAnalysisResults' :: GetDetectorModelAnalysisResults -> Maybe Int
$sel:nextToken:GetDetectorModelAnalysisResults' :: GetDetectorModelAnalysisResults -> 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 Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxResults
      ]

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

-- |
-- Create a value of 'GetDetectorModelAnalysisResultsResponse' 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', 'getDetectorModelAnalysisResultsResponse_nextToken' - The token that you can use to return the next set of results, or @null@
-- if there are no more results.
--
-- 'analysisResults', 'getDetectorModelAnalysisResultsResponse_analysisResults' - Contains information about one or more analysis results.
--
-- 'httpStatus', 'getDetectorModelAnalysisResultsResponse_httpStatus' - The response's http status code.
newGetDetectorModelAnalysisResultsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDetectorModelAnalysisResultsResponse
newGetDetectorModelAnalysisResultsResponse :: Int -> GetDetectorModelAnalysisResultsResponse
newGetDetectorModelAnalysisResultsResponse
  Int
pHttpStatus_ =
    GetDetectorModelAnalysisResultsResponse' :: Maybe Text
-> Maybe [AnalysisResult]
-> Int
-> GetDetectorModelAnalysisResultsResponse
GetDetectorModelAnalysisResultsResponse'
      { $sel:nextToken:GetDetectorModelAnalysisResultsResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:analysisResults:GetDetectorModelAnalysisResultsResponse' :: Maybe [AnalysisResult]
analysisResults = Maybe [AnalysisResult]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetDetectorModelAnalysisResultsResponse' :: 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.
getDetectorModelAnalysisResultsResponse_nextToken :: Lens.Lens' GetDetectorModelAnalysisResultsResponse (Prelude.Maybe Prelude.Text)
getDetectorModelAnalysisResultsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetDetectorModelAnalysisResultsResponse
-> f GetDetectorModelAnalysisResultsResponse
getDetectorModelAnalysisResultsResponse_nextToken = (GetDetectorModelAnalysisResultsResponse -> Maybe Text)
-> (GetDetectorModelAnalysisResultsResponse
    -> Maybe Text -> GetDetectorModelAnalysisResultsResponse)
-> Lens
     GetDetectorModelAnalysisResultsResponse
     GetDetectorModelAnalysisResultsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDetectorModelAnalysisResultsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetDetectorModelAnalysisResultsResponse' :: GetDetectorModelAnalysisResultsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetDetectorModelAnalysisResultsResponse
s@GetDetectorModelAnalysisResultsResponse' {} Maybe Text
a -> GetDetectorModelAnalysisResultsResponse
s {$sel:nextToken:GetDetectorModelAnalysisResultsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetDetectorModelAnalysisResultsResponse)

-- | Contains information about one or more analysis results.
getDetectorModelAnalysisResultsResponse_analysisResults :: Lens.Lens' GetDetectorModelAnalysisResultsResponse (Prelude.Maybe [AnalysisResult])
getDetectorModelAnalysisResultsResponse_analysisResults :: (Maybe [AnalysisResult] -> f (Maybe [AnalysisResult]))
-> GetDetectorModelAnalysisResultsResponse
-> f GetDetectorModelAnalysisResultsResponse
getDetectorModelAnalysisResultsResponse_analysisResults = (GetDetectorModelAnalysisResultsResponse -> Maybe [AnalysisResult])
-> (GetDetectorModelAnalysisResultsResponse
    -> Maybe [AnalysisResult]
    -> GetDetectorModelAnalysisResultsResponse)
-> Lens
     GetDetectorModelAnalysisResultsResponse
     GetDetectorModelAnalysisResultsResponse
     (Maybe [AnalysisResult])
     (Maybe [AnalysisResult])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDetectorModelAnalysisResultsResponse' {Maybe [AnalysisResult]
analysisResults :: Maybe [AnalysisResult]
$sel:analysisResults:GetDetectorModelAnalysisResultsResponse' :: GetDetectorModelAnalysisResultsResponse -> Maybe [AnalysisResult]
analysisResults} -> Maybe [AnalysisResult]
analysisResults) (\s :: GetDetectorModelAnalysisResultsResponse
s@GetDetectorModelAnalysisResultsResponse' {} Maybe [AnalysisResult]
a -> GetDetectorModelAnalysisResultsResponse
s {$sel:analysisResults:GetDetectorModelAnalysisResultsResponse' :: Maybe [AnalysisResult]
analysisResults = Maybe [AnalysisResult]
a} :: GetDetectorModelAnalysisResultsResponse) ((Maybe [AnalysisResult] -> f (Maybe [AnalysisResult]))
 -> GetDetectorModelAnalysisResultsResponse
 -> f GetDetectorModelAnalysisResultsResponse)
-> ((Maybe [AnalysisResult] -> f (Maybe [AnalysisResult]))
    -> Maybe [AnalysisResult] -> f (Maybe [AnalysisResult]))
-> (Maybe [AnalysisResult] -> f (Maybe [AnalysisResult]))
-> GetDetectorModelAnalysisResultsResponse
-> f GetDetectorModelAnalysisResultsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AnalysisResult] [AnalysisResult] [AnalysisResult] [AnalysisResult]
-> Iso
     (Maybe [AnalysisResult])
     (Maybe [AnalysisResult])
     (Maybe [AnalysisResult])
     (Maybe [AnalysisResult])
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
  [AnalysisResult] [AnalysisResult] [AnalysisResult] [AnalysisResult]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    GetDetectorModelAnalysisResultsResponse