{-# 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.UpdateDetectorModel
-- 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)
--
-- Updates a detector model. Detectors (instances) spawned by the previous
-- version are deleted and then re-created as new inputs arrive.
module Amazonka.IoTEvents.UpdateDetectorModel
  ( -- * Creating a Request
    UpdateDetectorModel (..),
    newUpdateDetectorModel,

    -- * Request Lenses
    updateDetectorModel_detectorModelDescription,
    updateDetectorModel_evaluationMethod,
    updateDetectorModel_detectorModelName,
    updateDetectorModel_detectorModelDefinition,
    updateDetectorModel_roleArn,

    -- * Destructuring the Response
    UpdateDetectorModelResponse (..),
    newUpdateDetectorModelResponse,

    -- * Response Lenses
    updateDetectorModelResponse_detectorModelConfiguration,
    updateDetectorModelResponse_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:/ 'newUpdateDetectorModel' smart constructor.
data UpdateDetectorModel = UpdateDetectorModel'
  { -- | A brief description of the detector model.
    UpdateDetectorModel -> Maybe Text
detectorModelDescription :: Prelude.Maybe Prelude.Text,
    -- | Information about the order in which events are evaluated and how
    -- actions are executed.
    UpdateDetectorModel -> Maybe EvaluationMethod
evaluationMethod :: Prelude.Maybe EvaluationMethod,
    -- | The name of the detector model that is updated.
    UpdateDetectorModel -> Text
detectorModelName :: Prelude.Text,
    -- | Information that defines how a detector operates.
    UpdateDetectorModel -> DetectorModelDefinition
detectorModelDefinition :: DetectorModelDefinition,
    -- | The ARN of the role that grants permission to AWS IoT Events to perform
    -- its operations.
    UpdateDetectorModel -> Text
roleArn :: Prelude.Text
  }
  deriving (UpdateDetectorModel -> UpdateDetectorModel -> Bool
(UpdateDetectorModel -> UpdateDetectorModel -> Bool)
-> (UpdateDetectorModel -> UpdateDetectorModel -> Bool)
-> Eq UpdateDetectorModel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDetectorModel -> UpdateDetectorModel -> Bool
$c/= :: UpdateDetectorModel -> UpdateDetectorModel -> Bool
== :: UpdateDetectorModel -> UpdateDetectorModel -> Bool
$c== :: UpdateDetectorModel -> UpdateDetectorModel -> Bool
Prelude.Eq, ReadPrec [UpdateDetectorModel]
ReadPrec UpdateDetectorModel
Int -> ReadS UpdateDetectorModel
ReadS [UpdateDetectorModel]
(Int -> ReadS UpdateDetectorModel)
-> ReadS [UpdateDetectorModel]
-> ReadPrec UpdateDetectorModel
-> ReadPrec [UpdateDetectorModel]
-> Read UpdateDetectorModel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDetectorModel]
$creadListPrec :: ReadPrec [UpdateDetectorModel]
readPrec :: ReadPrec UpdateDetectorModel
$creadPrec :: ReadPrec UpdateDetectorModel
readList :: ReadS [UpdateDetectorModel]
$creadList :: ReadS [UpdateDetectorModel]
readsPrec :: Int -> ReadS UpdateDetectorModel
$creadsPrec :: Int -> ReadS UpdateDetectorModel
Prelude.Read, Int -> UpdateDetectorModel -> ShowS
[UpdateDetectorModel] -> ShowS
UpdateDetectorModel -> String
(Int -> UpdateDetectorModel -> ShowS)
-> (UpdateDetectorModel -> String)
-> ([UpdateDetectorModel] -> ShowS)
-> Show UpdateDetectorModel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDetectorModel] -> ShowS
$cshowList :: [UpdateDetectorModel] -> ShowS
show :: UpdateDetectorModel -> String
$cshow :: UpdateDetectorModel -> String
showsPrec :: Int -> UpdateDetectorModel -> ShowS
$cshowsPrec :: Int -> UpdateDetectorModel -> ShowS
Prelude.Show, (forall x. UpdateDetectorModel -> Rep UpdateDetectorModel x)
-> (forall x. Rep UpdateDetectorModel x -> UpdateDetectorModel)
-> Generic UpdateDetectorModel
forall x. Rep UpdateDetectorModel x -> UpdateDetectorModel
forall x. UpdateDetectorModel -> Rep UpdateDetectorModel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDetectorModel x -> UpdateDetectorModel
$cfrom :: forall x. UpdateDetectorModel -> Rep UpdateDetectorModel x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDetectorModel' 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:
--
-- 'detectorModelDescription', 'updateDetectorModel_detectorModelDescription' - A brief description of the detector model.
--
-- 'evaluationMethod', 'updateDetectorModel_evaluationMethod' - Information about the order in which events are evaluated and how
-- actions are executed.
--
-- 'detectorModelName', 'updateDetectorModel_detectorModelName' - The name of the detector model that is updated.
--
-- 'detectorModelDefinition', 'updateDetectorModel_detectorModelDefinition' - Information that defines how a detector operates.
--
-- 'roleArn', 'updateDetectorModel_roleArn' - The ARN of the role that grants permission to AWS IoT Events to perform
-- its operations.
newUpdateDetectorModel ::
  -- | 'detectorModelName'
  Prelude.Text ->
  -- | 'detectorModelDefinition'
  DetectorModelDefinition ->
  -- | 'roleArn'
  Prelude.Text ->
  UpdateDetectorModel
newUpdateDetectorModel :: Text -> DetectorModelDefinition -> Text -> UpdateDetectorModel
newUpdateDetectorModel
  Text
pDetectorModelName_
  DetectorModelDefinition
pDetectorModelDefinition_
  Text
pRoleArn_ =
    UpdateDetectorModel' :: Maybe Text
-> Maybe EvaluationMethod
-> Text
-> DetectorModelDefinition
-> Text
-> UpdateDetectorModel
UpdateDetectorModel'
      { $sel:detectorModelDescription:UpdateDetectorModel' :: Maybe Text
detectorModelDescription =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:evaluationMethod:UpdateDetectorModel' :: Maybe EvaluationMethod
evaluationMethod = Maybe EvaluationMethod
forall a. Maybe a
Prelude.Nothing,
        $sel:detectorModelName:UpdateDetectorModel' :: Text
detectorModelName = Text
pDetectorModelName_,
        $sel:detectorModelDefinition:UpdateDetectorModel' :: DetectorModelDefinition
detectorModelDefinition = DetectorModelDefinition
pDetectorModelDefinition_,
        $sel:roleArn:UpdateDetectorModel' :: Text
roleArn = Text
pRoleArn_
      }

-- | A brief description of the detector model.
updateDetectorModel_detectorModelDescription :: Lens.Lens' UpdateDetectorModel (Prelude.Maybe Prelude.Text)
updateDetectorModel_detectorModelDescription :: (Maybe Text -> f (Maybe Text))
-> UpdateDetectorModel -> f UpdateDetectorModel
updateDetectorModel_detectorModelDescription = (UpdateDetectorModel -> Maybe Text)
-> (UpdateDetectorModel -> Maybe Text -> UpdateDetectorModel)
-> Lens
     UpdateDetectorModel UpdateDetectorModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDetectorModel' {Maybe Text
detectorModelDescription :: Maybe Text
$sel:detectorModelDescription:UpdateDetectorModel' :: UpdateDetectorModel -> Maybe Text
detectorModelDescription} -> Maybe Text
detectorModelDescription) (\s :: UpdateDetectorModel
s@UpdateDetectorModel' {} Maybe Text
a -> UpdateDetectorModel
s {$sel:detectorModelDescription:UpdateDetectorModel' :: Maybe Text
detectorModelDescription = Maybe Text
a} :: UpdateDetectorModel)

-- | Information about the order in which events are evaluated and how
-- actions are executed.
updateDetectorModel_evaluationMethod :: Lens.Lens' UpdateDetectorModel (Prelude.Maybe EvaluationMethod)
updateDetectorModel_evaluationMethod :: (Maybe EvaluationMethod -> f (Maybe EvaluationMethod))
-> UpdateDetectorModel -> f UpdateDetectorModel
updateDetectorModel_evaluationMethod = (UpdateDetectorModel -> Maybe EvaluationMethod)
-> (UpdateDetectorModel
    -> Maybe EvaluationMethod -> UpdateDetectorModel)
-> Lens
     UpdateDetectorModel
     UpdateDetectorModel
     (Maybe EvaluationMethod)
     (Maybe EvaluationMethod)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDetectorModel' {Maybe EvaluationMethod
evaluationMethod :: Maybe EvaluationMethod
$sel:evaluationMethod:UpdateDetectorModel' :: UpdateDetectorModel -> Maybe EvaluationMethod
evaluationMethod} -> Maybe EvaluationMethod
evaluationMethod) (\s :: UpdateDetectorModel
s@UpdateDetectorModel' {} Maybe EvaluationMethod
a -> UpdateDetectorModel
s {$sel:evaluationMethod:UpdateDetectorModel' :: Maybe EvaluationMethod
evaluationMethod = Maybe EvaluationMethod
a} :: UpdateDetectorModel)

-- | The name of the detector model that is updated.
updateDetectorModel_detectorModelName :: Lens.Lens' UpdateDetectorModel Prelude.Text
updateDetectorModel_detectorModelName :: (Text -> f Text) -> UpdateDetectorModel -> f UpdateDetectorModel
updateDetectorModel_detectorModelName = (UpdateDetectorModel -> Text)
-> (UpdateDetectorModel -> Text -> UpdateDetectorModel)
-> Lens UpdateDetectorModel UpdateDetectorModel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDetectorModel' {Text
detectorModelName :: Text
$sel:detectorModelName:UpdateDetectorModel' :: UpdateDetectorModel -> Text
detectorModelName} -> Text
detectorModelName) (\s :: UpdateDetectorModel
s@UpdateDetectorModel' {} Text
a -> UpdateDetectorModel
s {$sel:detectorModelName:UpdateDetectorModel' :: Text
detectorModelName = Text
a} :: UpdateDetectorModel)

-- | Information that defines how a detector operates.
updateDetectorModel_detectorModelDefinition :: Lens.Lens' UpdateDetectorModel DetectorModelDefinition
updateDetectorModel_detectorModelDefinition :: (DetectorModelDefinition -> f DetectorModelDefinition)
-> UpdateDetectorModel -> f UpdateDetectorModel
updateDetectorModel_detectorModelDefinition = (UpdateDetectorModel -> DetectorModelDefinition)
-> (UpdateDetectorModel
    -> DetectorModelDefinition -> UpdateDetectorModel)
-> Lens
     UpdateDetectorModel
     UpdateDetectorModel
     DetectorModelDefinition
     DetectorModelDefinition
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDetectorModel' {DetectorModelDefinition
detectorModelDefinition :: DetectorModelDefinition
$sel:detectorModelDefinition:UpdateDetectorModel' :: UpdateDetectorModel -> DetectorModelDefinition
detectorModelDefinition} -> DetectorModelDefinition
detectorModelDefinition) (\s :: UpdateDetectorModel
s@UpdateDetectorModel' {} DetectorModelDefinition
a -> UpdateDetectorModel
s {$sel:detectorModelDefinition:UpdateDetectorModel' :: DetectorModelDefinition
detectorModelDefinition = DetectorModelDefinition
a} :: UpdateDetectorModel)

-- | The ARN of the role that grants permission to AWS IoT Events to perform
-- its operations.
updateDetectorModel_roleArn :: Lens.Lens' UpdateDetectorModel Prelude.Text
updateDetectorModel_roleArn :: (Text -> f Text) -> UpdateDetectorModel -> f UpdateDetectorModel
updateDetectorModel_roleArn = (UpdateDetectorModel -> Text)
-> (UpdateDetectorModel -> Text -> UpdateDetectorModel)
-> Lens UpdateDetectorModel UpdateDetectorModel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDetectorModel' {Text
roleArn :: Text
$sel:roleArn:UpdateDetectorModel' :: UpdateDetectorModel -> Text
roleArn} -> Text
roleArn) (\s :: UpdateDetectorModel
s@UpdateDetectorModel' {} Text
a -> UpdateDetectorModel
s {$sel:roleArn:UpdateDetectorModel' :: Text
roleArn = Text
a} :: UpdateDetectorModel)

instance Core.AWSRequest UpdateDetectorModel where
  type
    AWSResponse UpdateDetectorModel =
      UpdateDetectorModelResponse
  request :: UpdateDetectorModel -> Request UpdateDetectorModel
request = Service -> UpdateDetectorModel -> Request UpdateDetectorModel
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateDetectorModel
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDetectorModel)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateDetectorModel))
-> Logger
-> Service
-> Proxy UpdateDetectorModel
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDetectorModel)))
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 DetectorModelConfiguration
-> Int -> UpdateDetectorModelResponse
UpdateDetectorModelResponse'
            (Maybe DetectorModelConfiguration
 -> Int -> UpdateDetectorModelResponse)
-> Either String (Maybe DetectorModelConfiguration)
-> Either String (Int -> UpdateDetectorModelResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe DetectorModelConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"detectorModelConfiguration")
            Either String (Int -> UpdateDetectorModelResponse)
-> Either String Int -> Either String UpdateDetectorModelResponse
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 UpdateDetectorModel

instance Prelude.NFData UpdateDetectorModel

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

instance Core.ToJSON UpdateDetectorModel where
  toJSON :: UpdateDetectorModel -> Value
toJSON UpdateDetectorModel' {Maybe Text
Maybe EvaluationMethod
Text
DetectorModelDefinition
roleArn :: Text
detectorModelDefinition :: DetectorModelDefinition
detectorModelName :: Text
evaluationMethod :: Maybe EvaluationMethod
detectorModelDescription :: Maybe Text
$sel:roleArn:UpdateDetectorModel' :: UpdateDetectorModel -> Text
$sel:detectorModelDefinition:UpdateDetectorModel' :: UpdateDetectorModel -> DetectorModelDefinition
$sel:detectorModelName:UpdateDetectorModel' :: UpdateDetectorModel -> Text
$sel:evaluationMethod:UpdateDetectorModel' :: UpdateDetectorModel -> Maybe EvaluationMethod
$sel:detectorModelDescription:UpdateDetectorModel' :: UpdateDetectorModel -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"detectorModelDescription" 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
detectorModelDescription,
            (Text
"evaluationMethod" Text -> EvaluationMethod -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (EvaluationMethod -> Pair) -> Maybe EvaluationMethod -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EvaluationMethod
evaluationMethod,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"detectorModelDefinition"
                  Text -> DetectorModelDefinition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DetectorModelDefinition
detectorModelDefinition
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"roleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn)
          ]
      )

instance Core.ToPath UpdateDetectorModel where
  toPath :: UpdateDetectorModel -> ByteString
toPath UpdateDetectorModel' {Maybe Text
Maybe EvaluationMethod
Text
DetectorModelDefinition
roleArn :: Text
detectorModelDefinition :: DetectorModelDefinition
detectorModelName :: Text
evaluationMethod :: Maybe EvaluationMethod
detectorModelDescription :: Maybe Text
$sel:roleArn:UpdateDetectorModel' :: UpdateDetectorModel -> Text
$sel:detectorModelDefinition:UpdateDetectorModel' :: UpdateDetectorModel -> DetectorModelDefinition
$sel:detectorModelName:UpdateDetectorModel' :: UpdateDetectorModel -> Text
$sel:evaluationMethod:UpdateDetectorModel' :: UpdateDetectorModel -> Maybe EvaluationMethod
$sel:detectorModelDescription:UpdateDetectorModel' :: UpdateDetectorModel -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/detector-models/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
detectorModelName]

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

-- | /See:/ 'newUpdateDetectorModelResponse' smart constructor.
data UpdateDetectorModelResponse = UpdateDetectorModelResponse'
  { -- | Information about how the detector model is configured.
    UpdateDetectorModelResponse -> Maybe DetectorModelConfiguration
detectorModelConfiguration :: Prelude.Maybe DetectorModelConfiguration,
    -- | The response's http status code.
    UpdateDetectorModelResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateDetectorModelResponse -> UpdateDetectorModelResponse -> Bool
(UpdateDetectorModelResponse
 -> UpdateDetectorModelResponse -> Bool)
-> (UpdateDetectorModelResponse
    -> UpdateDetectorModelResponse -> Bool)
-> Eq UpdateDetectorModelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDetectorModelResponse -> UpdateDetectorModelResponse -> Bool
$c/= :: UpdateDetectorModelResponse -> UpdateDetectorModelResponse -> Bool
== :: UpdateDetectorModelResponse -> UpdateDetectorModelResponse -> Bool
$c== :: UpdateDetectorModelResponse -> UpdateDetectorModelResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDetectorModelResponse]
ReadPrec UpdateDetectorModelResponse
Int -> ReadS UpdateDetectorModelResponse
ReadS [UpdateDetectorModelResponse]
(Int -> ReadS UpdateDetectorModelResponse)
-> ReadS [UpdateDetectorModelResponse]
-> ReadPrec UpdateDetectorModelResponse
-> ReadPrec [UpdateDetectorModelResponse]
-> Read UpdateDetectorModelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDetectorModelResponse]
$creadListPrec :: ReadPrec [UpdateDetectorModelResponse]
readPrec :: ReadPrec UpdateDetectorModelResponse
$creadPrec :: ReadPrec UpdateDetectorModelResponse
readList :: ReadS [UpdateDetectorModelResponse]
$creadList :: ReadS [UpdateDetectorModelResponse]
readsPrec :: Int -> ReadS UpdateDetectorModelResponse
$creadsPrec :: Int -> ReadS UpdateDetectorModelResponse
Prelude.Read, Int -> UpdateDetectorModelResponse -> ShowS
[UpdateDetectorModelResponse] -> ShowS
UpdateDetectorModelResponse -> String
(Int -> UpdateDetectorModelResponse -> ShowS)
-> (UpdateDetectorModelResponse -> String)
-> ([UpdateDetectorModelResponse] -> ShowS)
-> Show UpdateDetectorModelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDetectorModelResponse] -> ShowS
$cshowList :: [UpdateDetectorModelResponse] -> ShowS
show :: UpdateDetectorModelResponse -> String
$cshow :: UpdateDetectorModelResponse -> String
showsPrec :: Int -> UpdateDetectorModelResponse -> ShowS
$cshowsPrec :: Int -> UpdateDetectorModelResponse -> ShowS
Prelude.Show, (forall x.
 UpdateDetectorModelResponse -> Rep UpdateDetectorModelResponse x)
-> (forall x.
    Rep UpdateDetectorModelResponse x -> UpdateDetectorModelResponse)
-> Generic UpdateDetectorModelResponse
forall x.
Rep UpdateDetectorModelResponse x -> UpdateDetectorModelResponse
forall x.
UpdateDetectorModelResponse -> Rep UpdateDetectorModelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDetectorModelResponse x -> UpdateDetectorModelResponse
$cfrom :: forall x.
UpdateDetectorModelResponse -> Rep UpdateDetectorModelResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDetectorModelResponse' 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:
--
-- 'detectorModelConfiguration', 'updateDetectorModelResponse_detectorModelConfiguration' - Information about how the detector model is configured.
--
-- 'httpStatus', 'updateDetectorModelResponse_httpStatus' - The response's http status code.
newUpdateDetectorModelResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateDetectorModelResponse
newUpdateDetectorModelResponse :: Int -> UpdateDetectorModelResponse
newUpdateDetectorModelResponse Int
pHttpStatus_ =
  UpdateDetectorModelResponse' :: Maybe DetectorModelConfiguration
-> Int -> UpdateDetectorModelResponse
UpdateDetectorModelResponse'
    { $sel:detectorModelConfiguration:UpdateDetectorModelResponse' :: Maybe DetectorModelConfiguration
detectorModelConfiguration =
        Maybe DetectorModelConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateDetectorModelResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about how the detector model is configured.
updateDetectorModelResponse_detectorModelConfiguration :: Lens.Lens' UpdateDetectorModelResponse (Prelude.Maybe DetectorModelConfiguration)
updateDetectorModelResponse_detectorModelConfiguration :: (Maybe DetectorModelConfiguration
 -> f (Maybe DetectorModelConfiguration))
-> UpdateDetectorModelResponse -> f UpdateDetectorModelResponse
updateDetectorModelResponse_detectorModelConfiguration = (UpdateDetectorModelResponse -> Maybe DetectorModelConfiguration)
-> (UpdateDetectorModelResponse
    -> Maybe DetectorModelConfiguration -> UpdateDetectorModelResponse)
-> Lens
     UpdateDetectorModelResponse
     UpdateDetectorModelResponse
     (Maybe DetectorModelConfiguration)
     (Maybe DetectorModelConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDetectorModelResponse' {Maybe DetectorModelConfiguration
detectorModelConfiguration :: Maybe DetectorModelConfiguration
$sel:detectorModelConfiguration:UpdateDetectorModelResponse' :: UpdateDetectorModelResponse -> Maybe DetectorModelConfiguration
detectorModelConfiguration} -> Maybe DetectorModelConfiguration
detectorModelConfiguration) (\s :: UpdateDetectorModelResponse
s@UpdateDetectorModelResponse' {} Maybe DetectorModelConfiguration
a -> UpdateDetectorModelResponse
s {$sel:detectorModelConfiguration:UpdateDetectorModelResponse' :: Maybe DetectorModelConfiguration
detectorModelConfiguration = Maybe DetectorModelConfiguration
a} :: UpdateDetectorModelResponse)

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

instance Prelude.NFData UpdateDetectorModelResponse