{-# 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.GetDetectorVersion
-- 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 a particular detector version.
module Amazonka.FraudDetector.GetDetectorVersion
  ( -- * Creating a Request
    GetDetectorVersion (..),
    newGetDetectorVersion,

    -- * Request Lenses
    getDetectorVersion_detectorId,
    getDetectorVersion_detectorVersionId,

    -- * Destructuring the Response
    GetDetectorVersionResponse (..),
    newGetDetectorVersionResponse,

    -- * Response Lenses
    getDetectorVersionResponse_status,
    getDetectorVersionResponse_ruleExecutionMode,
    getDetectorVersionResponse_lastUpdatedTime,
    getDetectorVersionResponse_arn,
    getDetectorVersionResponse_rules,
    getDetectorVersionResponse_detectorVersionId,
    getDetectorVersionResponse_createdTime,
    getDetectorVersionResponse_modelVersions,
    getDetectorVersionResponse_detectorId,
    getDetectorVersionResponse_externalModelEndpoints,
    getDetectorVersionResponse_description,
    getDetectorVersionResponse_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:/ 'newGetDetectorVersion' smart constructor.
data GetDetectorVersion = GetDetectorVersion'
  { -- | The detector ID.
    GetDetectorVersion -> Text
detectorId :: Prelude.Text,
    -- | The detector version ID.
    GetDetectorVersion -> Text
detectorVersionId :: Prelude.Text
  }
  deriving (GetDetectorVersion -> GetDetectorVersion -> Bool
(GetDetectorVersion -> GetDetectorVersion -> Bool)
-> (GetDetectorVersion -> GetDetectorVersion -> Bool)
-> Eq GetDetectorVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDetectorVersion -> GetDetectorVersion -> Bool
$c/= :: GetDetectorVersion -> GetDetectorVersion -> Bool
== :: GetDetectorVersion -> GetDetectorVersion -> Bool
$c== :: GetDetectorVersion -> GetDetectorVersion -> Bool
Prelude.Eq, ReadPrec [GetDetectorVersion]
ReadPrec GetDetectorVersion
Int -> ReadS GetDetectorVersion
ReadS [GetDetectorVersion]
(Int -> ReadS GetDetectorVersion)
-> ReadS [GetDetectorVersion]
-> ReadPrec GetDetectorVersion
-> ReadPrec [GetDetectorVersion]
-> Read GetDetectorVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDetectorVersion]
$creadListPrec :: ReadPrec [GetDetectorVersion]
readPrec :: ReadPrec GetDetectorVersion
$creadPrec :: ReadPrec GetDetectorVersion
readList :: ReadS [GetDetectorVersion]
$creadList :: ReadS [GetDetectorVersion]
readsPrec :: Int -> ReadS GetDetectorVersion
$creadsPrec :: Int -> ReadS GetDetectorVersion
Prelude.Read, Int -> GetDetectorVersion -> ShowS
[GetDetectorVersion] -> ShowS
GetDetectorVersion -> String
(Int -> GetDetectorVersion -> ShowS)
-> (GetDetectorVersion -> String)
-> ([GetDetectorVersion] -> ShowS)
-> Show GetDetectorVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDetectorVersion] -> ShowS
$cshowList :: [GetDetectorVersion] -> ShowS
show :: GetDetectorVersion -> String
$cshow :: GetDetectorVersion -> String
showsPrec :: Int -> GetDetectorVersion -> ShowS
$cshowsPrec :: Int -> GetDetectorVersion -> ShowS
Prelude.Show, (forall x. GetDetectorVersion -> Rep GetDetectorVersion x)
-> (forall x. Rep GetDetectorVersion x -> GetDetectorVersion)
-> Generic GetDetectorVersion
forall x. Rep GetDetectorVersion x -> GetDetectorVersion
forall x. GetDetectorVersion -> Rep GetDetectorVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDetectorVersion x -> GetDetectorVersion
$cfrom :: forall x. GetDetectorVersion -> Rep GetDetectorVersion x
Prelude.Generic)

-- |
-- Create a value of 'GetDetectorVersion' 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:
--
-- 'detectorId', 'getDetectorVersion_detectorId' - The detector ID.
--
-- 'detectorVersionId', 'getDetectorVersion_detectorVersionId' - The detector version ID.
newGetDetectorVersion ::
  -- | 'detectorId'
  Prelude.Text ->
  -- | 'detectorVersionId'
  Prelude.Text ->
  GetDetectorVersion
newGetDetectorVersion :: Text -> Text -> GetDetectorVersion
newGetDetectorVersion
  Text
pDetectorId_
  Text
pDetectorVersionId_ =
    GetDetectorVersion' :: Text -> Text -> GetDetectorVersion
GetDetectorVersion'
      { $sel:detectorId:GetDetectorVersion' :: Text
detectorId = Text
pDetectorId_,
        $sel:detectorVersionId:GetDetectorVersion' :: Text
detectorVersionId = Text
pDetectorVersionId_
      }

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

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

instance Core.AWSRequest GetDetectorVersion where
  type
    AWSResponse GetDetectorVersion =
      GetDetectorVersionResponse
  request :: GetDetectorVersion -> Request GetDetectorVersion
request = Service -> GetDetectorVersion -> Request GetDetectorVersion
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetDetectorVersion
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetDetectorVersion)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetDetectorVersion))
-> Logger
-> Service
-> Proxy GetDetectorVersion
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetDetectorVersion)))
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 DetectorVersionStatus
-> Maybe RuleExecutionMode
-> Maybe Text
-> Maybe Text
-> Maybe [Rule]
-> Maybe Text
-> Maybe Text
-> Maybe [ModelVersion]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Int
-> GetDetectorVersionResponse
GetDetectorVersionResponse'
            (Maybe DetectorVersionStatus
 -> Maybe RuleExecutionMode
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Rule]
 -> Maybe Text
 -> Maybe Text
 -> Maybe [ModelVersion]
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Int
 -> GetDetectorVersionResponse)
-> Either String (Maybe DetectorVersionStatus)
-> Either
     String
     (Maybe RuleExecutionMode
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Rule]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ModelVersion]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Int
      -> GetDetectorVersionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe DetectorVersionStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"status")
            Either
  String
  (Maybe RuleExecutionMode
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Rule]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ModelVersion]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Int
   -> GetDetectorVersionResponse)
-> Either String (Maybe RuleExecutionMode)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [Rule]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ModelVersion]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Int
      -> GetDetectorVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe RuleExecutionMode)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ruleExecutionMode")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [Rule]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ModelVersion]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Int
   -> GetDetectorVersionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [Rule]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ModelVersion]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Int
      -> GetDetectorVersionResponse)
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
"lastUpdatedTime")
            Either
  String
  (Maybe Text
   -> Maybe [Rule]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ModelVersion]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Int
   -> GetDetectorVersionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Rule]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [ModelVersion]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Int
      -> GetDetectorVersionResponse)
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 [Rule]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [ModelVersion]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Int
   -> GetDetectorVersionResponse)
-> Either String (Maybe [Rule])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [ModelVersion]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Int
      -> GetDetectorVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Rule]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"rules" Either String (Maybe (Maybe [Rule]))
-> Maybe [Rule] -> Either String (Maybe [Rule])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Rule]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [ModelVersion]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Int
   -> GetDetectorVersionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [ModelVersion]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Int
      -> GetDetectorVersionResponse)
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
"detectorVersionId")
            Either
  String
  (Maybe Text
   -> Maybe [ModelVersion]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Int
   -> GetDetectorVersionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ModelVersion]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Int
      -> GetDetectorVersionResponse)
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
"createdTime")
            Either
  String
  (Maybe [ModelVersion]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Int
   -> GetDetectorVersionResponse)
-> Either String (Maybe [ModelVersion])
-> Either
     String
     (Maybe Text
      -> Maybe [Text] -> Maybe Text -> Int -> GetDetectorVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [ModelVersion]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"modelVersions" Either String (Maybe (Maybe [ModelVersion]))
-> Maybe [ModelVersion] -> Either String (Maybe [ModelVersion])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ModelVersion]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe [Text] -> Maybe Text -> Int -> GetDetectorVersionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text] -> Maybe Text -> Int -> GetDetectorVersionResponse)
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
  (Maybe [Text] -> Maybe Text -> Int -> GetDetectorVersionResponse)
-> Either String (Maybe [Text])
-> Either String (Maybe Text -> Int -> GetDetectorVersionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"externalModelEndpoints"
                            Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> GetDetectorVersionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetDetectorVersionResponse)
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
"description")
            Either String (Int -> GetDetectorVersionResponse)
-> Either String Int -> Either String GetDetectorVersionResponse
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 GetDetectorVersion

instance Prelude.NFData GetDetectorVersion

instance Core.ToHeaders GetDetectorVersion where
  toHeaders :: GetDetectorVersion -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetDetectorVersion -> 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.GetDetectorVersion" ::
                          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 GetDetectorVersion where
  toJSON :: GetDetectorVersion -> Value
toJSON GetDetectorVersion' {Text
detectorVersionId :: Text
detectorId :: Text
$sel:detectorVersionId:GetDetectorVersion' :: GetDetectorVersion -> Text
$sel:detectorId:GetDetectorVersion' :: GetDetectorVersion -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ 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),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"detectorVersionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
detectorVersionId)
          ]
      )

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

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

-- | /See:/ 'newGetDetectorVersionResponse' smart constructor.
data GetDetectorVersionResponse = GetDetectorVersionResponse'
  { -- | The status of the detector version.
    GetDetectorVersionResponse -> Maybe DetectorVersionStatus
status :: Prelude.Maybe DetectorVersionStatus,
    -- | The execution mode of the rule in the dectector
    --
    -- @FIRST_MATCHED@ indicates that Amazon Fraud Detector evaluates rules
    -- sequentially, first to last, stopping at the first matched rule. Amazon
    -- Fraud dectector then provides the outcomes for that single rule.
    --
    -- @ALL_MATCHED@ indicates that Amazon Fraud Detector evaluates all rules
    -- and returns the outcomes for all matched rules. You can define and edit
    -- the rule mode at the detector version level, when it is in draft status.
    GetDetectorVersionResponse -> Maybe RuleExecutionMode
ruleExecutionMode :: Prelude.Maybe RuleExecutionMode,
    -- | The timestamp when the detector version was last updated.
    GetDetectorVersionResponse -> Maybe Text
lastUpdatedTime :: Prelude.Maybe Prelude.Text,
    -- | The detector version ARN.
    GetDetectorVersionResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The rules included in the detector version.
    GetDetectorVersionResponse -> Maybe [Rule]
rules :: Prelude.Maybe [Rule],
    -- | The detector version ID.
    GetDetectorVersionResponse -> Maybe Text
detectorVersionId :: Prelude.Maybe Prelude.Text,
    -- | The timestamp when the detector version was created.
    GetDetectorVersionResponse -> Maybe Text
createdTime :: Prelude.Maybe Prelude.Text,
    -- | The model versions included in the detector version.
    GetDetectorVersionResponse -> Maybe [ModelVersion]
modelVersions :: Prelude.Maybe [ModelVersion],
    -- | The detector ID.
    GetDetectorVersionResponse -> Maybe Text
detectorId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon SageMaker model endpoints included in the detector version.
    GetDetectorVersionResponse -> Maybe [Text]
externalModelEndpoints :: Prelude.Maybe [Prelude.Text],
    -- | The detector version description.
    GetDetectorVersionResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetDetectorVersionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetDetectorVersionResponse -> GetDetectorVersionResponse -> Bool
(GetDetectorVersionResponse -> GetDetectorVersionResponse -> Bool)
-> (GetDetectorVersionResponse
    -> GetDetectorVersionResponse -> Bool)
-> Eq GetDetectorVersionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDetectorVersionResponse -> GetDetectorVersionResponse -> Bool
$c/= :: GetDetectorVersionResponse -> GetDetectorVersionResponse -> Bool
== :: GetDetectorVersionResponse -> GetDetectorVersionResponse -> Bool
$c== :: GetDetectorVersionResponse -> GetDetectorVersionResponse -> Bool
Prelude.Eq, ReadPrec [GetDetectorVersionResponse]
ReadPrec GetDetectorVersionResponse
Int -> ReadS GetDetectorVersionResponse
ReadS [GetDetectorVersionResponse]
(Int -> ReadS GetDetectorVersionResponse)
-> ReadS [GetDetectorVersionResponse]
-> ReadPrec GetDetectorVersionResponse
-> ReadPrec [GetDetectorVersionResponse]
-> Read GetDetectorVersionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDetectorVersionResponse]
$creadListPrec :: ReadPrec [GetDetectorVersionResponse]
readPrec :: ReadPrec GetDetectorVersionResponse
$creadPrec :: ReadPrec GetDetectorVersionResponse
readList :: ReadS [GetDetectorVersionResponse]
$creadList :: ReadS [GetDetectorVersionResponse]
readsPrec :: Int -> ReadS GetDetectorVersionResponse
$creadsPrec :: Int -> ReadS GetDetectorVersionResponse
Prelude.Read, Int -> GetDetectorVersionResponse -> ShowS
[GetDetectorVersionResponse] -> ShowS
GetDetectorVersionResponse -> String
(Int -> GetDetectorVersionResponse -> ShowS)
-> (GetDetectorVersionResponse -> String)
-> ([GetDetectorVersionResponse] -> ShowS)
-> Show GetDetectorVersionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDetectorVersionResponse] -> ShowS
$cshowList :: [GetDetectorVersionResponse] -> ShowS
show :: GetDetectorVersionResponse -> String
$cshow :: GetDetectorVersionResponse -> String
showsPrec :: Int -> GetDetectorVersionResponse -> ShowS
$cshowsPrec :: Int -> GetDetectorVersionResponse -> ShowS
Prelude.Show, (forall x.
 GetDetectorVersionResponse -> Rep GetDetectorVersionResponse x)
-> (forall x.
    Rep GetDetectorVersionResponse x -> GetDetectorVersionResponse)
-> Generic GetDetectorVersionResponse
forall x.
Rep GetDetectorVersionResponse x -> GetDetectorVersionResponse
forall x.
GetDetectorVersionResponse -> Rep GetDetectorVersionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDetectorVersionResponse x -> GetDetectorVersionResponse
$cfrom :: forall x.
GetDetectorVersionResponse -> Rep GetDetectorVersionResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetDetectorVersionResponse' 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:
--
-- 'status', 'getDetectorVersionResponse_status' - The status of the detector version.
--
-- 'ruleExecutionMode', 'getDetectorVersionResponse_ruleExecutionMode' - The execution mode of the rule in the dectector
--
-- @FIRST_MATCHED@ indicates that Amazon Fraud Detector evaluates rules
-- sequentially, first to last, stopping at the first matched rule. Amazon
-- Fraud dectector then provides the outcomes for that single rule.
--
-- @ALL_MATCHED@ indicates that Amazon Fraud Detector evaluates all rules
-- and returns the outcomes for all matched rules. You can define and edit
-- the rule mode at the detector version level, when it is in draft status.
--
-- 'lastUpdatedTime', 'getDetectorVersionResponse_lastUpdatedTime' - The timestamp when the detector version was last updated.
--
-- 'arn', 'getDetectorVersionResponse_arn' - The detector version ARN.
--
-- 'rules', 'getDetectorVersionResponse_rules' - The rules included in the detector version.
--
-- 'detectorVersionId', 'getDetectorVersionResponse_detectorVersionId' - The detector version ID.
--
-- 'createdTime', 'getDetectorVersionResponse_createdTime' - The timestamp when the detector version was created.
--
-- 'modelVersions', 'getDetectorVersionResponse_modelVersions' - The model versions included in the detector version.
--
-- 'detectorId', 'getDetectorVersionResponse_detectorId' - The detector ID.
--
-- 'externalModelEndpoints', 'getDetectorVersionResponse_externalModelEndpoints' - The Amazon SageMaker model endpoints included in the detector version.
--
-- 'description', 'getDetectorVersionResponse_description' - The detector version description.
--
-- 'httpStatus', 'getDetectorVersionResponse_httpStatus' - The response's http status code.
newGetDetectorVersionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDetectorVersionResponse
newGetDetectorVersionResponse :: Int -> GetDetectorVersionResponse
newGetDetectorVersionResponse Int
pHttpStatus_ =
  GetDetectorVersionResponse' :: Maybe DetectorVersionStatus
-> Maybe RuleExecutionMode
-> Maybe Text
-> Maybe Text
-> Maybe [Rule]
-> Maybe Text
-> Maybe Text
-> Maybe [ModelVersion]
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Int
-> GetDetectorVersionResponse
GetDetectorVersionResponse'
    { $sel:status:GetDetectorVersionResponse' :: Maybe DetectorVersionStatus
status =
        Maybe DetectorVersionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:ruleExecutionMode:GetDetectorVersionResponse' :: Maybe RuleExecutionMode
ruleExecutionMode = Maybe RuleExecutionMode
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTime:GetDetectorVersionResponse' :: Maybe Text
lastUpdatedTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:GetDetectorVersionResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:rules:GetDetectorVersionResponse' :: Maybe [Rule]
rules = Maybe [Rule]
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorVersionId:GetDetectorVersionResponse' :: Maybe Text
detectorVersionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:GetDetectorVersionResponse' :: Maybe Text
createdTime = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:modelVersions:GetDetectorVersionResponse' :: Maybe [ModelVersion]
modelVersions = Maybe [ModelVersion]
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorId:GetDetectorVersionResponse' :: Maybe Text
detectorId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:externalModelEndpoints:GetDetectorVersionResponse' :: Maybe [Text]
externalModelEndpoints = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetDetectorVersionResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetDetectorVersionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The status of the detector version.
getDetectorVersionResponse_status :: Lens.Lens' GetDetectorVersionResponse (Prelude.Maybe DetectorVersionStatus)
getDetectorVersionResponse_status :: (Maybe DetectorVersionStatus -> f (Maybe DetectorVersionStatus))
-> GetDetectorVersionResponse -> f GetDetectorVersionResponse
getDetectorVersionResponse_status = (GetDetectorVersionResponse -> Maybe DetectorVersionStatus)
-> (GetDetectorVersionResponse
    -> Maybe DetectorVersionStatus -> GetDetectorVersionResponse)
-> Lens
     GetDetectorVersionResponse
     GetDetectorVersionResponse
     (Maybe DetectorVersionStatus)
     (Maybe DetectorVersionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDetectorVersionResponse' {Maybe DetectorVersionStatus
status :: Maybe DetectorVersionStatus
$sel:status:GetDetectorVersionResponse' :: GetDetectorVersionResponse -> Maybe DetectorVersionStatus
status} -> Maybe DetectorVersionStatus
status) (\s :: GetDetectorVersionResponse
s@GetDetectorVersionResponse' {} Maybe DetectorVersionStatus
a -> GetDetectorVersionResponse
s {$sel:status:GetDetectorVersionResponse' :: Maybe DetectorVersionStatus
status = Maybe DetectorVersionStatus
a} :: GetDetectorVersionResponse)

-- | The execution mode of the rule in the dectector
--
-- @FIRST_MATCHED@ indicates that Amazon Fraud Detector evaluates rules
-- sequentially, first to last, stopping at the first matched rule. Amazon
-- Fraud dectector then provides the outcomes for that single rule.
--
-- @ALL_MATCHED@ indicates that Amazon Fraud Detector evaluates all rules
-- and returns the outcomes for all matched rules. You can define and edit
-- the rule mode at the detector version level, when it is in draft status.
getDetectorVersionResponse_ruleExecutionMode :: Lens.Lens' GetDetectorVersionResponse (Prelude.Maybe RuleExecutionMode)
getDetectorVersionResponse_ruleExecutionMode :: (Maybe RuleExecutionMode -> f (Maybe RuleExecutionMode))
-> GetDetectorVersionResponse -> f GetDetectorVersionResponse
getDetectorVersionResponse_ruleExecutionMode = (GetDetectorVersionResponse -> Maybe RuleExecutionMode)
-> (GetDetectorVersionResponse
    -> Maybe RuleExecutionMode -> GetDetectorVersionResponse)
-> Lens
     GetDetectorVersionResponse
     GetDetectorVersionResponse
     (Maybe RuleExecutionMode)
     (Maybe RuleExecutionMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDetectorVersionResponse' {Maybe RuleExecutionMode
ruleExecutionMode :: Maybe RuleExecutionMode
$sel:ruleExecutionMode:GetDetectorVersionResponse' :: GetDetectorVersionResponse -> Maybe RuleExecutionMode
ruleExecutionMode} -> Maybe RuleExecutionMode
ruleExecutionMode) (\s :: GetDetectorVersionResponse
s@GetDetectorVersionResponse' {} Maybe RuleExecutionMode
a -> GetDetectorVersionResponse
s {$sel:ruleExecutionMode:GetDetectorVersionResponse' :: Maybe RuleExecutionMode
ruleExecutionMode = Maybe RuleExecutionMode
a} :: GetDetectorVersionResponse)

-- | The timestamp when the detector version was last updated.
getDetectorVersionResponse_lastUpdatedTime :: Lens.Lens' GetDetectorVersionResponse (Prelude.Maybe Prelude.Text)
getDetectorVersionResponse_lastUpdatedTime :: (Maybe Text -> f (Maybe Text))
-> GetDetectorVersionResponse -> f GetDetectorVersionResponse
getDetectorVersionResponse_lastUpdatedTime = (GetDetectorVersionResponse -> Maybe Text)
-> (GetDetectorVersionResponse
    -> Maybe Text -> GetDetectorVersionResponse)
-> Lens
     GetDetectorVersionResponse
     GetDetectorVersionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDetectorVersionResponse' {Maybe Text
lastUpdatedTime :: Maybe Text
$sel:lastUpdatedTime:GetDetectorVersionResponse' :: GetDetectorVersionResponse -> Maybe Text
lastUpdatedTime} -> Maybe Text
lastUpdatedTime) (\s :: GetDetectorVersionResponse
s@GetDetectorVersionResponse' {} Maybe Text
a -> GetDetectorVersionResponse
s {$sel:lastUpdatedTime:GetDetectorVersionResponse' :: Maybe Text
lastUpdatedTime = Maybe Text
a} :: GetDetectorVersionResponse)

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

-- | The rules included in the detector version.
getDetectorVersionResponse_rules :: Lens.Lens' GetDetectorVersionResponse (Prelude.Maybe [Rule])
getDetectorVersionResponse_rules :: (Maybe [Rule] -> f (Maybe [Rule]))
-> GetDetectorVersionResponse -> f GetDetectorVersionResponse
getDetectorVersionResponse_rules = (GetDetectorVersionResponse -> Maybe [Rule])
-> (GetDetectorVersionResponse
    -> Maybe [Rule] -> GetDetectorVersionResponse)
-> Lens
     GetDetectorVersionResponse
     GetDetectorVersionResponse
     (Maybe [Rule])
     (Maybe [Rule])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDetectorVersionResponse' {Maybe [Rule]
rules :: Maybe [Rule]
$sel:rules:GetDetectorVersionResponse' :: GetDetectorVersionResponse -> Maybe [Rule]
rules} -> Maybe [Rule]
rules) (\s :: GetDetectorVersionResponse
s@GetDetectorVersionResponse' {} Maybe [Rule]
a -> GetDetectorVersionResponse
s {$sel:rules:GetDetectorVersionResponse' :: Maybe [Rule]
rules = Maybe [Rule]
a} :: GetDetectorVersionResponse) ((Maybe [Rule] -> f (Maybe [Rule]))
 -> GetDetectorVersionResponse -> f GetDetectorVersionResponse)
-> ((Maybe [Rule] -> f (Maybe [Rule]))
    -> Maybe [Rule] -> f (Maybe [Rule]))
-> (Maybe [Rule] -> f (Maybe [Rule]))
-> GetDetectorVersionResponse
-> f GetDetectorVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Rule] [Rule] [Rule] [Rule]
-> Iso (Maybe [Rule]) (Maybe [Rule]) (Maybe [Rule]) (Maybe [Rule])
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 [Rule] [Rule] [Rule] [Rule]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The timestamp when the detector version was created.
getDetectorVersionResponse_createdTime :: Lens.Lens' GetDetectorVersionResponse (Prelude.Maybe Prelude.Text)
getDetectorVersionResponse_createdTime :: (Maybe Text -> f (Maybe Text))
-> GetDetectorVersionResponse -> f GetDetectorVersionResponse
getDetectorVersionResponse_createdTime = (GetDetectorVersionResponse -> Maybe Text)
-> (GetDetectorVersionResponse
    -> Maybe Text -> GetDetectorVersionResponse)
-> Lens
     GetDetectorVersionResponse
     GetDetectorVersionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDetectorVersionResponse' {Maybe Text
createdTime :: Maybe Text
$sel:createdTime:GetDetectorVersionResponse' :: GetDetectorVersionResponse -> Maybe Text
createdTime} -> Maybe Text
createdTime) (\s :: GetDetectorVersionResponse
s@GetDetectorVersionResponse' {} Maybe Text
a -> GetDetectorVersionResponse
s {$sel:createdTime:GetDetectorVersionResponse' :: Maybe Text
createdTime = Maybe Text
a} :: GetDetectorVersionResponse)

-- | The model versions included in the detector version.
getDetectorVersionResponse_modelVersions :: Lens.Lens' GetDetectorVersionResponse (Prelude.Maybe [ModelVersion])
getDetectorVersionResponse_modelVersions :: (Maybe [ModelVersion] -> f (Maybe [ModelVersion]))
-> GetDetectorVersionResponse -> f GetDetectorVersionResponse
getDetectorVersionResponse_modelVersions = (GetDetectorVersionResponse -> Maybe [ModelVersion])
-> (GetDetectorVersionResponse
    -> Maybe [ModelVersion] -> GetDetectorVersionResponse)
-> Lens
     GetDetectorVersionResponse
     GetDetectorVersionResponse
     (Maybe [ModelVersion])
     (Maybe [ModelVersion])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDetectorVersionResponse' {Maybe [ModelVersion]
modelVersions :: Maybe [ModelVersion]
$sel:modelVersions:GetDetectorVersionResponse' :: GetDetectorVersionResponse -> Maybe [ModelVersion]
modelVersions} -> Maybe [ModelVersion]
modelVersions) (\s :: GetDetectorVersionResponse
s@GetDetectorVersionResponse' {} Maybe [ModelVersion]
a -> GetDetectorVersionResponse
s {$sel:modelVersions:GetDetectorVersionResponse' :: Maybe [ModelVersion]
modelVersions = Maybe [ModelVersion]
a} :: GetDetectorVersionResponse) ((Maybe [ModelVersion] -> f (Maybe [ModelVersion]))
 -> GetDetectorVersionResponse -> f GetDetectorVersionResponse)
-> ((Maybe [ModelVersion] -> f (Maybe [ModelVersion]))
    -> Maybe [ModelVersion] -> f (Maybe [ModelVersion]))
-> (Maybe [ModelVersion] -> f (Maybe [ModelVersion]))
-> GetDetectorVersionResponse
-> f GetDetectorVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ModelVersion] [ModelVersion] [ModelVersion] [ModelVersion]
-> Iso
     (Maybe [ModelVersion])
     (Maybe [ModelVersion])
     (Maybe [ModelVersion])
     (Maybe [ModelVersion])
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 [ModelVersion] [ModelVersion] [ModelVersion] [ModelVersion]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The Amazon SageMaker model endpoints included in the detector version.
getDetectorVersionResponse_externalModelEndpoints :: Lens.Lens' GetDetectorVersionResponse (Prelude.Maybe [Prelude.Text])
getDetectorVersionResponse_externalModelEndpoints :: (Maybe [Text] -> f (Maybe [Text]))
-> GetDetectorVersionResponse -> f GetDetectorVersionResponse
getDetectorVersionResponse_externalModelEndpoints = (GetDetectorVersionResponse -> Maybe [Text])
-> (GetDetectorVersionResponse
    -> Maybe [Text] -> GetDetectorVersionResponse)
-> Lens
     GetDetectorVersionResponse
     GetDetectorVersionResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDetectorVersionResponse' {Maybe [Text]
externalModelEndpoints :: Maybe [Text]
$sel:externalModelEndpoints:GetDetectorVersionResponse' :: GetDetectorVersionResponse -> Maybe [Text]
externalModelEndpoints} -> Maybe [Text]
externalModelEndpoints) (\s :: GetDetectorVersionResponse
s@GetDetectorVersionResponse' {} Maybe [Text]
a -> GetDetectorVersionResponse
s {$sel:externalModelEndpoints:GetDetectorVersionResponse' :: Maybe [Text]
externalModelEndpoints = Maybe [Text]
a} :: GetDetectorVersionResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> GetDetectorVersionResponse -> f GetDetectorVersionResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetDetectorVersionResponse
-> f GetDetectorVersionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The detector version description.
getDetectorVersionResponse_description :: Lens.Lens' GetDetectorVersionResponse (Prelude.Maybe Prelude.Text)
getDetectorVersionResponse_description :: (Maybe Text -> f (Maybe Text))
-> GetDetectorVersionResponse -> f GetDetectorVersionResponse
getDetectorVersionResponse_description = (GetDetectorVersionResponse -> Maybe Text)
-> (GetDetectorVersionResponse
    -> Maybe Text -> GetDetectorVersionResponse)
-> Lens
     GetDetectorVersionResponse
     GetDetectorVersionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDetectorVersionResponse' {Maybe Text
description :: Maybe Text
$sel:description:GetDetectorVersionResponse' :: GetDetectorVersionResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: GetDetectorVersionResponse
s@GetDetectorVersionResponse' {} Maybe Text
a -> GetDetectorVersionResponse
s {$sel:description:GetDetectorVersionResponse' :: Maybe Text
description = Maybe Text
a} :: GetDetectorVersionResponse)

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

instance Prelude.NFData GetDetectorVersionResponse