{-# 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.FraudDetector.DescribeDetector
-- 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)
--
-- Gets all versions for a specified detector.
module Amazonka.FraudDetector.DescribeDetector
  ( -- * Creating a Request
    DescribeDetector (..),
    newDescribeDetector,

    -- * Request Lenses
    describeDetector_nextToken,
    describeDetector_maxResults,
    describeDetector_detectorId,

    -- * Destructuring the Response
    DescribeDetectorResponse (..),
    newDescribeDetectorResponse,

    -- * Response Lenses
    describeDetectorResponse_detectorVersionSummaries,
    describeDetectorResponse_arn,
    describeDetectorResponse_nextToken,
    describeDetectorResponse_detectorId,
    describeDetectorResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.FraudDetector.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:/ 'newDescribeDetector' smart constructor.
data DescribeDetector = DescribeDetector'
  { -- | The next token from the previous response.
    DescribeDetector -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return for the request.
    DescribeDetector -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The detector ID.
    DescribeDetector -> Text
detectorId :: Prelude.Text
  }
  deriving (DescribeDetector -> DescribeDetector -> Bool
(DescribeDetector -> DescribeDetector -> Bool)
-> (DescribeDetector -> DescribeDetector -> Bool)
-> Eq DescribeDetector
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDetector -> DescribeDetector -> Bool
$c/= :: DescribeDetector -> DescribeDetector -> Bool
== :: DescribeDetector -> DescribeDetector -> Bool
$c== :: DescribeDetector -> DescribeDetector -> Bool
Prelude.Eq, ReadPrec [DescribeDetector]
ReadPrec DescribeDetector
Int -> ReadS DescribeDetector
ReadS [DescribeDetector]
(Int -> ReadS DescribeDetector)
-> ReadS [DescribeDetector]
-> ReadPrec DescribeDetector
-> ReadPrec [DescribeDetector]
-> Read DescribeDetector
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDetector]
$creadListPrec :: ReadPrec [DescribeDetector]
readPrec :: ReadPrec DescribeDetector
$creadPrec :: ReadPrec DescribeDetector
readList :: ReadS [DescribeDetector]
$creadList :: ReadS [DescribeDetector]
readsPrec :: Int -> ReadS DescribeDetector
$creadsPrec :: Int -> ReadS DescribeDetector
Prelude.Read, Int -> DescribeDetector -> ShowS
[DescribeDetector] -> ShowS
DescribeDetector -> String
(Int -> DescribeDetector -> ShowS)
-> (DescribeDetector -> String)
-> ([DescribeDetector] -> ShowS)
-> Show DescribeDetector
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDetector] -> ShowS
$cshowList :: [DescribeDetector] -> ShowS
show :: DescribeDetector -> String
$cshow :: DescribeDetector -> String
showsPrec :: Int -> DescribeDetector -> ShowS
$cshowsPrec :: Int -> DescribeDetector -> ShowS
Prelude.Show, (forall x. DescribeDetector -> Rep DescribeDetector x)
-> (forall x. Rep DescribeDetector x -> DescribeDetector)
-> Generic DescribeDetector
forall x. Rep DescribeDetector x -> DescribeDetector
forall x. DescribeDetector -> Rep DescribeDetector x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDetector x -> DescribeDetector
$cfrom :: forall x. DescribeDetector -> Rep DescribeDetector x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDetector' 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', 'describeDetector_nextToken' - The next token from the previous response.
--
-- 'maxResults', 'describeDetector_maxResults' - The maximum number of results to return for the request.
--
-- 'detectorId', 'describeDetector_detectorId' - The detector ID.
newDescribeDetector ::
  -- | 'detectorId'
  Prelude.Text ->
  DescribeDetector
newDescribeDetector :: Text -> DescribeDetector
newDescribeDetector Text
pDetectorId_ =
  DescribeDetector' :: Maybe Text -> Maybe Natural -> Text -> DescribeDetector
DescribeDetector'
    { $sel:nextToken:DescribeDetector' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeDetector' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorId:DescribeDetector' :: Text
detectorId = Text
pDetectorId_
    }

-- | The next token from the previous response.
describeDetector_nextToken :: Lens.Lens' DescribeDetector (Prelude.Maybe Prelude.Text)
describeDetector_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeDetector -> f DescribeDetector
describeDetector_nextToken = (DescribeDetector -> Maybe Text)
-> (DescribeDetector -> Maybe Text -> DescribeDetector)
-> Lens DescribeDetector DescribeDetector (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDetector' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDetector' :: DescribeDetector -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDetector
s@DescribeDetector' {} Maybe Text
a -> DescribeDetector
s {$sel:nextToken:DescribeDetector' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDetector)

-- | The maximum number of results to return for the request.
describeDetector_maxResults :: Lens.Lens' DescribeDetector (Prelude.Maybe Prelude.Natural)
describeDetector_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeDetector -> f DescribeDetector
describeDetector_maxResults = (DescribeDetector -> Maybe Natural)
-> (DescribeDetector -> Maybe Natural -> DescribeDetector)
-> Lens
     DescribeDetector DescribeDetector (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDetector' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeDetector' :: DescribeDetector -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeDetector
s@DescribeDetector' {} Maybe Natural
a -> DescribeDetector
s {$sel:maxResults:DescribeDetector' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeDetector)

-- | The detector ID.
describeDetector_detectorId :: Lens.Lens' DescribeDetector Prelude.Text
describeDetector_detectorId :: (Text -> f Text) -> DescribeDetector -> f DescribeDetector
describeDetector_detectorId = (DescribeDetector -> Text)
-> (DescribeDetector -> Text -> DescribeDetector)
-> Lens DescribeDetector DescribeDetector Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDetector' {Text
detectorId :: Text
$sel:detectorId:DescribeDetector' :: DescribeDetector -> Text
detectorId} -> Text
detectorId) (\s :: DescribeDetector
s@DescribeDetector' {} Text
a -> DescribeDetector
s {$sel:detectorId:DescribeDetector' :: Text
detectorId = Text
a} :: DescribeDetector)

instance Core.AWSRequest DescribeDetector where
  type
    AWSResponse DescribeDetector =
      DescribeDetectorResponse
  request :: DescribeDetector -> Request DescribeDetector
request = Service -> DescribeDetector -> Request DescribeDetector
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDetector
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeDetector)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeDetector))
-> Logger
-> Service
-> Proxy DescribeDetector
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeDetector)))
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 [DetectorVersionSummary]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeDetectorResponse
DescribeDetectorResponse'
            (Maybe [DetectorVersionSummary]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeDetectorResponse)
-> Either String (Maybe [DetectorVersionSummary])
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Int -> DescribeDetectorResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [DetectorVersionSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"detectorVersionSummaries"
                            Either String (Maybe (Maybe [DetectorVersionSummary]))
-> Maybe [DetectorVersionSummary]
-> Either String (Maybe [DetectorVersionSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DetectorVersionSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Int -> DescribeDetectorResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe Text -> Int -> DescribeDetectorResponse)
forall (f :: * -> *) a b. Applicative f => 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
"arn")
            Either
  String
  (Maybe Text -> Maybe Text -> Int -> DescribeDetectorResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> DescribeDetectorResponse)
forall (f :: * -> *) a b. Applicative f => 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 Text -> Int -> DescribeDetectorResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeDetectorResponse)
forall (f :: * -> *) a b. Applicative f => 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
"detectorId")
            Either String (Int -> DescribeDetectorResponse)
-> Either String Int -> Either String DescribeDetectorResponse
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 DescribeDetector

instance Prelude.NFData DescribeDetector

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

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

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

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

-- | /See:/ 'newDescribeDetectorResponse' smart constructor.
data DescribeDetectorResponse = DescribeDetectorResponse'
  { -- | The status and description for each detector version.
    DescribeDetectorResponse -> Maybe [DetectorVersionSummary]
detectorVersionSummaries :: Prelude.Maybe [DetectorVersionSummary],
    -- | The detector ARN.
    DescribeDetectorResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The next token to be used for subsequent requests.
    DescribeDetectorResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The detector ID.
    DescribeDetectorResponse -> Maybe Text
detectorId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeDetectorResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDetectorResponse -> DescribeDetectorResponse -> Bool
(DescribeDetectorResponse -> DescribeDetectorResponse -> Bool)
-> (DescribeDetectorResponse -> DescribeDetectorResponse -> Bool)
-> Eq DescribeDetectorResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDetectorResponse -> DescribeDetectorResponse -> Bool
$c/= :: DescribeDetectorResponse -> DescribeDetectorResponse -> Bool
== :: DescribeDetectorResponse -> DescribeDetectorResponse -> Bool
$c== :: DescribeDetectorResponse -> DescribeDetectorResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDetectorResponse]
ReadPrec DescribeDetectorResponse
Int -> ReadS DescribeDetectorResponse
ReadS [DescribeDetectorResponse]
(Int -> ReadS DescribeDetectorResponse)
-> ReadS [DescribeDetectorResponse]
-> ReadPrec DescribeDetectorResponse
-> ReadPrec [DescribeDetectorResponse]
-> Read DescribeDetectorResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDetectorResponse]
$creadListPrec :: ReadPrec [DescribeDetectorResponse]
readPrec :: ReadPrec DescribeDetectorResponse
$creadPrec :: ReadPrec DescribeDetectorResponse
readList :: ReadS [DescribeDetectorResponse]
$creadList :: ReadS [DescribeDetectorResponse]
readsPrec :: Int -> ReadS DescribeDetectorResponse
$creadsPrec :: Int -> ReadS DescribeDetectorResponse
Prelude.Read, Int -> DescribeDetectorResponse -> ShowS
[DescribeDetectorResponse] -> ShowS
DescribeDetectorResponse -> String
(Int -> DescribeDetectorResponse -> ShowS)
-> (DescribeDetectorResponse -> String)
-> ([DescribeDetectorResponse] -> ShowS)
-> Show DescribeDetectorResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDetectorResponse] -> ShowS
$cshowList :: [DescribeDetectorResponse] -> ShowS
show :: DescribeDetectorResponse -> String
$cshow :: DescribeDetectorResponse -> String
showsPrec :: Int -> DescribeDetectorResponse -> ShowS
$cshowsPrec :: Int -> DescribeDetectorResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDetectorResponse -> Rep DescribeDetectorResponse x)
-> (forall x.
    Rep DescribeDetectorResponse x -> DescribeDetectorResponse)
-> Generic DescribeDetectorResponse
forall x.
Rep DescribeDetectorResponse x -> DescribeDetectorResponse
forall x.
DescribeDetectorResponse -> Rep DescribeDetectorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDetectorResponse x -> DescribeDetectorResponse
$cfrom :: forall x.
DescribeDetectorResponse -> Rep DescribeDetectorResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDetectorResponse' 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:
--
-- 'detectorVersionSummaries', 'describeDetectorResponse_detectorVersionSummaries' - The status and description for each detector version.
--
-- 'arn', 'describeDetectorResponse_arn' - The detector ARN.
--
-- 'nextToken', 'describeDetectorResponse_nextToken' - The next token to be used for subsequent requests.
--
-- 'detectorId', 'describeDetectorResponse_detectorId' - The detector ID.
--
-- 'httpStatus', 'describeDetectorResponse_httpStatus' - The response's http status code.
newDescribeDetectorResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDetectorResponse
newDescribeDetectorResponse :: Int -> DescribeDetectorResponse
newDescribeDetectorResponse Int
pHttpStatus_ =
  DescribeDetectorResponse' :: Maybe [DetectorVersionSummary]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeDetectorResponse
DescribeDetectorResponse'
    { $sel:detectorVersionSummaries:DescribeDetectorResponse' :: Maybe [DetectorVersionSummary]
detectorVersionSummaries =
        Maybe [DetectorVersionSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeDetectorResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeDetectorResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorId:DescribeDetectorResponse' :: Maybe Text
detectorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDetectorResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The status and description for each detector version.
describeDetectorResponse_detectorVersionSummaries :: Lens.Lens' DescribeDetectorResponse (Prelude.Maybe [DetectorVersionSummary])
describeDetectorResponse_detectorVersionSummaries :: (Maybe [DetectorVersionSummary]
 -> f (Maybe [DetectorVersionSummary]))
-> DescribeDetectorResponse -> f DescribeDetectorResponse
describeDetectorResponse_detectorVersionSummaries = (DescribeDetectorResponse -> Maybe [DetectorVersionSummary])
-> (DescribeDetectorResponse
    -> Maybe [DetectorVersionSummary] -> DescribeDetectorResponse)
-> Lens
     DescribeDetectorResponse
     DescribeDetectorResponse
     (Maybe [DetectorVersionSummary])
     (Maybe [DetectorVersionSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDetectorResponse' {Maybe [DetectorVersionSummary]
detectorVersionSummaries :: Maybe [DetectorVersionSummary]
$sel:detectorVersionSummaries:DescribeDetectorResponse' :: DescribeDetectorResponse -> Maybe [DetectorVersionSummary]
detectorVersionSummaries} -> Maybe [DetectorVersionSummary]
detectorVersionSummaries) (\s :: DescribeDetectorResponse
s@DescribeDetectorResponse' {} Maybe [DetectorVersionSummary]
a -> DescribeDetectorResponse
s {$sel:detectorVersionSummaries:DescribeDetectorResponse' :: Maybe [DetectorVersionSummary]
detectorVersionSummaries = Maybe [DetectorVersionSummary]
a} :: DescribeDetectorResponse) ((Maybe [DetectorVersionSummary]
  -> f (Maybe [DetectorVersionSummary]))
 -> DescribeDetectorResponse -> f DescribeDetectorResponse)
-> ((Maybe [DetectorVersionSummary]
     -> f (Maybe [DetectorVersionSummary]))
    -> Maybe [DetectorVersionSummary]
    -> f (Maybe [DetectorVersionSummary]))
-> (Maybe [DetectorVersionSummary]
    -> f (Maybe [DetectorVersionSummary]))
-> DescribeDetectorResponse
-> f DescribeDetectorResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DetectorVersionSummary]
  [DetectorVersionSummary]
  [DetectorVersionSummary]
  [DetectorVersionSummary]
-> Iso
     (Maybe [DetectorVersionSummary])
     (Maybe [DetectorVersionSummary])
     (Maybe [DetectorVersionSummary])
     (Maybe [DetectorVersionSummary])
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
  [DetectorVersionSummary]
  [DetectorVersionSummary]
  [DetectorVersionSummary]
  [DetectorVersionSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The detector ARN.
describeDetectorResponse_arn :: Lens.Lens' DescribeDetectorResponse (Prelude.Maybe Prelude.Text)
describeDetectorResponse_arn :: (Maybe Text -> f (Maybe Text))
-> DescribeDetectorResponse -> f DescribeDetectorResponse
describeDetectorResponse_arn = (DescribeDetectorResponse -> Maybe Text)
-> (DescribeDetectorResponse
    -> Maybe Text -> DescribeDetectorResponse)
-> Lens
     DescribeDetectorResponse
     DescribeDetectorResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDetectorResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeDetectorResponse' :: DescribeDetectorResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeDetectorResponse
s@DescribeDetectorResponse' {} Maybe Text
a -> DescribeDetectorResponse
s {$sel:arn:DescribeDetectorResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeDetectorResponse)

-- | The next token to be used for subsequent requests.
describeDetectorResponse_nextToken :: Lens.Lens' DescribeDetectorResponse (Prelude.Maybe Prelude.Text)
describeDetectorResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeDetectorResponse -> f DescribeDetectorResponse
describeDetectorResponse_nextToken = (DescribeDetectorResponse -> Maybe Text)
-> (DescribeDetectorResponse
    -> Maybe Text -> DescribeDetectorResponse)
-> Lens
     DescribeDetectorResponse
     DescribeDetectorResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDetectorResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDetectorResponse' :: DescribeDetectorResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDetectorResponse
s@DescribeDetectorResponse' {} Maybe Text
a -> DescribeDetectorResponse
s {$sel:nextToken:DescribeDetectorResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDetectorResponse)

-- | The detector ID.
describeDetectorResponse_detectorId :: Lens.Lens' DescribeDetectorResponse (Prelude.Maybe Prelude.Text)
describeDetectorResponse_detectorId :: (Maybe Text -> f (Maybe Text))
-> DescribeDetectorResponse -> f DescribeDetectorResponse
describeDetectorResponse_detectorId = (DescribeDetectorResponse -> Maybe Text)
-> (DescribeDetectorResponse
    -> Maybe Text -> DescribeDetectorResponse)
-> Lens
     DescribeDetectorResponse
     DescribeDetectorResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDetectorResponse' {Maybe Text
detectorId :: Maybe Text
$sel:detectorId:DescribeDetectorResponse' :: DescribeDetectorResponse -> Maybe Text
detectorId} -> Maybe Text
detectorId) (\s :: DescribeDetectorResponse
s@DescribeDetectorResponse' {} Maybe Text
a -> DescribeDetectorResponse
s {$sel:detectorId:DescribeDetectorResponse' :: Maybe Text
detectorId = Maybe Text
a} :: DescribeDetectorResponse)

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

instance Prelude.NFData DescribeDetectorResponse