{-# 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.PutExternalModel
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates or updates an Amazon SageMaker model endpoint. You can also use
-- this action to update the configuration of the model endpoint, including
-- the IAM role and\/or the mapped variables.
module Amazonka.FraudDetector.PutExternalModel
  ( -- * Creating a Request
    PutExternalModel (..),
    newPutExternalModel,

    -- * Request Lenses
    putExternalModel_tags,
    putExternalModel_modelEndpoint,
    putExternalModel_modelSource,
    putExternalModel_invokeModelEndpointRoleArn,
    putExternalModel_inputConfiguration,
    putExternalModel_outputConfiguration,
    putExternalModel_modelEndpointStatus,

    -- * Destructuring the Response
    PutExternalModelResponse (..),
    newPutExternalModelResponse,

    -- * Response Lenses
    putExternalModelResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.FraudDetector.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newPutExternalModel' smart constructor.
data PutExternalModel = PutExternalModel'
  { -- | A collection of key and value pairs.
    PutExternalModel -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The model endpoints name.
    PutExternalModel -> Text
modelEndpoint :: Prelude.Text,
    -- | The source of the model.
    PutExternalModel -> ModelSource
modelSource :: ModelSource,
    -- | The IAM role used to invoke the model endpoint.
    PutExternalModel -> Text
invokeModelEndpointRoleArn :: Prelude.Text,
    -- | The model endpoint input configuration.
    PutExternalModel -> ModelInputConfiguration
inputConfiguration :: ModelInputConfiguration,
    -- | The model endpoint output configuration.
    PutExternalModel -> ModelOutputConfiguration
outputConfiguration :: ModelOutputConfiguration,
    -- | The model endpoint’s status in Amazon Fraud Detector.
    PutExternalModel -> ModelEndpointStatus
modelEndpointStatus :: ModelEndpointStatus
  }
  deriving (PutExternalModel -> PutExternalModel -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutExternalModel -> PutExternalModel -> Bool
$c/= :: PutExternalModel -> PutExternalModel -> Bool
== :: PutExternalModel -> PutExternalModel -> Bool
$c== :: PutExternalModel -> PutExternalModel -> Bool
Prelude.Eq, ReadPrec [PutExternalModel]
ReadPrec PutExternalModel
Int -> ReadS PutExternalModel
ReadS [PutExternalModel]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutExternalModel]
$creadListPrec :: ReadPrec [PutExternalModel]
readPrec :: ReadPrec PutExternalModel
$creadPrec :: ReadPrec PutExternalModel
readList :: ReadS [PutExternalModel]
$creadList :: ReadS [PutExternalModel]
readsPrec :: Int -> ReadS PutExternalModel
$creadsPrec :: Int -> ReadS PutExternalModel
Prelude.Read, Int -> PutExternalModel -> ShowS
[PutExternalModel] -> ShowS
PutExternalModel -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutExternalModel] -> ShowS
$cshowList :: [PutExternalModel] -> ShowS
show :: PutExternalModel -> String
$cshow :: PutExternalModel -> String
showsPrec :: Int -> PutExternalModel -> ShowS
$cshowsPrec :: Int -> PutExternalModel -> ShowS
Prelude.Show, forall x. Rep PutExternalModel x -> PutExternalModel
forall x. PutExternalModel -> Rep PutExternalModel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutExternalModel x -> PutExternalModel
$cfrom :: forall x. PutExternalModel -> Rep PutExternalModel x
Prelude.Generic)

-- |
-- Create a value of 'PutExternalModel' 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:
--
-- 'tags', 'putExternalModel_tags' - A collection of key and value pairs.
--
-- 'modelEndpoint', 'putExternalModel_modelEndpoint' - The model endpoints name.
--
-- 'modelSource', 'putExternalModel_modelSource' - The source of the model.
--
-- 'invokeModelEndpointRoleArn', 'putExternalModel_invokeModelEndpointRoleArn' - The IAM role used to invoke the model endpoint.
--
-- 'inputConfiguration', 'putExternalModel_inputConfiguration' - The model endpoint input configuration.
--
-- 'outputConfiguration', 'putExternalModel_outputConfiguration' - The model endpoint output configuration.
--
-- 'modelEndpointStatus', 'putExternalModel_modelEndpointStatus' - The model endpoint’s status in Amazon Fraud Detector.
newPutExternalModel ::
  -- | 'modelEndpoint'
  Prelude.Text ->
  -- | 'modelSource'
  ModelSource ->
  -- | 'invokeModelEndpointRoleArn'
  Prelude.Text ->
  -- | 'inputConfiguration'
  ModelInputConfiguration ->
  -- | 'outputConfiguration'
  ModelOutputConfiguration ->
  -- | 'modelEndpointStatus'
  ModelEndpointStatus ->
  PutExternalModel
newPutExternalModel :: Text
-> ModelSource
-> Text
-> ModelInputConfiguration
-> ModelOutputConfiguration
-> ModelEndpointStatus
-> PutExternalModel
newPutExternalModel
  Text
pModelEndpoint_
  ModelSource
pModelSource_
  Text
pInvokeModelEndpointRoleArn_
  ModelInputConfiguration
pInputConfiguration_
  ModelOutputConfiguration
pOutputConfiguration_
  ModelEndpointStatus
pModelEndpointStatus_ =
    PutExternalModel'
      { $sel:tags:PutExternalModel' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:modelEndpoint:PutExternalModel' :: Text
modelEndpoint = Text
pModelEndpoint_,
        $sel:modelSource:PutExternalModel' :: ModelSource
modelSource = ModelSource
pModelSource_,
        $sel:invokeModelEndpointRoleArn:PutExternalModel' :: Text
invokeModelEndpointRoleArn =
          Text
pInvokeModelEndpointRoleArn_,
        $sel:inputConfiguration:PutExternalModel' :: ModelInputConfiguration
inputConfiguration = ModelInputConfiguration
pInputConfiguration_,
        $sel:outputConfiguration:PutExternalModel' :: ModelOutputConfiguration
outputConfiguration = ModelOutputConfiguration
pOutputConfiguration_,
        $sel:modelEndpointStatus:PutExternalModel' :: ModelEndpointStatus
modelEndpointStatus = ModelEndpointStatus
pModelEndpointStatus_
      }

-- | A collection of key and value pairs.
putExternalModel_tags :: Lens.Lens' PutExternalModel (Prelude.Maybe [Tag])
putExternalModel_tags :: Lens' PutExternalModel (Maybe [Tag])
putExternalModel_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutExternalModel' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:PutExternalModel' :: PutExternalModel -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: PutExternalModel
s@PutExternalModel' {} Maybe [Tag]
a -> PutExternalModel
s {$sel:tags:PutExternalModel' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: PutExternalModel) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The model endpoints name.
putExternalModel_modelEndpoint :: Lens.Lens' PutExternalModel Prelude.Text
putExternalModel_modelEndpoint :: Lens' PutExternalModel Text
putExternalModel_modelEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutExternalModel' {Text
modelEndpoint :: Text
$sel:modelEndpoint:PutExternalModel' :: PutExternalModel -> Text
modelEndpoint} -> Text
modelEndpoint) (\s :: PutExternalModel
s@PutExternalModel' {} Text
a -> PutExternalModel
s {$sel:modelEndpoint:PutExternalModel' :: Text
modelEndpoint = Text
a} :: PutExternalModel)

-- | The source of the model.
putExternalModel_modelSource :: Lens.Lens' PutExternalModel ModelSource
putExternalModel_modelSource :: Lens' PutExternalModel ModelSource
putExternalModel_modelSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutExternalModel' {ModelSource
modelSource :: ModelSource
$sel:modelSource:PutExternalModel' :: PutExternalModel -> ModelSource
modelSource} -> ModelSource
modelSource) (\s :: PutExternalModel
s@PutExternalModel' {} ModelSource
a -> PutExternalModel
s {$sel:modelSource:PutExternalModel' :: ModelSource
modelSource = ModelSource
a} :: PutExternalModel)

-- | The IAM role used to invoke the model endpoint.
putExternalModel_invokeModelEndpointRoleArn :: Lens.Lens' PutExternalModel Prelude.Text
putExternalModel_invokeModelEndpointRoleArn :: Lens' PutExternalModel Text
putExternalModel_invokeModelEndpointRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutExternalModel' {Text
invokeModelEndpointRoleArn :: Text
$sel:invokeModelEndpointRoleArn:PutExternalModel' :: PutExternalModel -> Text
invokeModelEndpointRoleArn} -> Text
invokeModelEndpointRoleArn) (\s :: PutExternalModel
s@PutExternalModel' {} Text
a -> PutExternalModel
s {$sel:invokeModelEndpointRoleArn:PutExternalModel' :: Text
invokeModelEndpointRoleArn = Text
a} :: PutExternalModel)

-- | The model endpoint input configuration.
putExternalModel_inputConfiguration :: Lens.Lens' PutExternalModel ModelInputConfiguration
putExternalModel_inputConfiguration :: Lens' PutExternalModel ModelInputConfiguration
putExternalModel_inputConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutExternalModel' {ModelInputConfiguration
inputConfiguration :: ModelInputConfiguration
$sel:inputConfiguration:PutExternalModel' :: PutExternalModel -> ModelInputConfiguration
inputConfiguration} -> ModelInputConfiguration
inputConfiguration) (\s :: PutExternalModel
s@PutExternalModel' {} ModelInputConfiguration
a -> PutExternalModel
s {$sel:inputConfiguration:PutExternalModel' :: ModelInputConfiguration
inputConfiguration = ModelInputConfiguration
a} :: PutExternalModel)

-- | The model endpoint output configuration.
putExternalModel_outputConfiguration :: Lens.Lens' PutExternalModel ModelOutputConfiguration
putExternalModel_outputConfiguration :: Lens' PutExternalModel ModelOutputConfiguration
putExternalModel_outputConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutExternalModel' {ModelOutputConfiguration
outputConfiguration :: ModelOutputConfiguration
$sel:outputConfiguration:PutExternalModel' :: PutExternalModel -> ModelOutputConfiguration
outputConfiguration} -> ModelOutputConfiguration
outputConfiguration) (\s :: PutExternalModel
s@PutExternalModel' {} ModelOutputConfiguration
a -> PutExternalModel
s {$sel:outputConfiguration:PutExternalModel' :: ModelOutputConfiguration
outputConfiguration = ModelOutputConfiguration
a} :: PutExternalModel)

-- | The model endpoint’s status in Amazon Fraud Detector.
putExternalModel_modelEndpointStatus :: Lens.Lens' PutExternalModel ModelEndpointStatus
putExternalModel_modelEndpointStatus :: Lens' PutExternalModel ModelEndpointStatus
putExternalModel_modelEndpointStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutExternalModel' {ModelEndpointStatus
modelEndpointStatus :: ModelEndpointStatus
$sel:modelEndpointStatus:PutExternalModel' :: PutExternalModel -> ModelEndpointStatus
modelEndpointStatus} -> ModelEndpointStatus
modelEndpointStatus) (\s :: PutExternalModel
s@PutExternalModel' {} ModelEndpointStatus
a -> PutExternalModel
s {$sel:modelEndpointStatus:PutExternalModel' :: ModelEndpointStatus
modelEndpointStatus = ModelEndpointStatus
a} :: PutExternalModel)

instance Core.AWSRequest PutExternalModel where
  type
    AWSResponse PutExternalModel =
      PutExternalModelResponse
  request :: (Service -> Service)
-> PutExternalModel -> Request PutExternalModel
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy PutExternalModel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutExternalModel)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> PutExternalModelResponse
PutExternalModelResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable PutExternalModel where
  hashWithSalt :: Int -> PutExternalModel -> Int
hashWithSalt Int
_salt PutExternalModel' {Maybe [Tag]
Text
ModelEndpointStatus
ModelInputConfiguration
ModelOutputConfiguration
ModelSource
modelEndpointStatus :: ModelEndpointStatus
outputConfiguration :: ModelOutputConfiguration
inputConfiguration :: ModelInputConfiguration
invokeModelEndpointRoleArn :: Text
modelSource :: ModelSource
modelEndpoint :: Text
tags :: Maybe [Tag]
$sel:modelEndpointStatus:PutExternalModel' :: PutExternalModel -> ModelEndpointStatus
$sel:outputConfiguration:PutExternalModel' :: PutExternalModel -> ModelOutputConfiguration
$sel:inputConfiguration:PutExternalModel' :: PutExternalModel -> ModelInputConfiguration
$sel:invokeModelEndpointRoleArn:PutExternalModel' :: PutExternalModel -> Text
$sel:modelSource:PutExternalModel' :: PutExternalModel -> ModelSource
$sel:modelEndpoint:PutExternalModel' :: PutExternalModel -> Text
$sel:tags:PutExternalModel' :: PutExternalModel -> Maybe [Tag]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
modelEndpoint
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ModelSource
modelSource
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
invokeModelEndpointRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ModelInputConfiguration
inputConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ModelOutputConfiguration
outputConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ModelEndpointStatus
modelEndpointStatus

instance Prelude.NFData PutExternalModel where
  rnf :: PutExternalModel -> ()
rnf PutExternalModel' {Maybe [Tag]
Text
ModelEndpointStatus
ModelInputConfiguration
ModelOutputConfiguration
ModelSource
modelEndpointStatus :: ModelEndpointStatus
outputConfiguration :: ModelOutputConfiguration
inputConfiguration :: ModelInputConfiguration
invokeModelEndpointRoleArn :: Text
modelSource :: ModelSource
modelEndpoint :: Text
tags :: Maybe [Tag]
$sel:modelEndpointStatus:PutExternalModel' :: PutExternalModel -> ModelEndpointStatus
$sel:outputConfiguration:PutExternalModel' :: PutExternalModel -> ModelOutputConfiguration
$sel:inputConfiguration:PutExternalModel' :: PutExternalModel -> ModelInputConfiguration
$sel:invokeModelEndpointRoleArn:PutExternalModel' :: PutExternalModel -> Text
$sel:modelSource:PutExternalModel' :: PutExternalModel -> ModelSource
$sel:modelEndpoint:PutExternalModel' :: PutExternalModel -> Text
$sel:tags:PutExternalModel' :: PutExternalModel -> Maybe [Tag]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
modelEndpoint
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ModelSource
modelSource
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
invokeModelEndpointRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ModelInputConfiguration
inputConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ModelOutputConfiguration
outputConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ModelEndpointStatus
modelEndpointStatus

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

instance Data.ToJSON PutExternalModel where
  toJSON :: PutExternalModel -> Value
toJSON PutExternalModel' {Maybe [Tag]
Text
ModelEndpointStatus
ModelInputConfiguration
ModelOutputConfiguration
ModelSource
modelEndpointStatus :: ModelEndpointStatus
outputConfiguration :: ModelOutputConfiguration
inputConfiguration :: ModelInputConfiguration
invokeModelEndpointRoleArn :: Text
modelSource :: ModelSource
modelEndpoint :: Text
tags :: Maybe [Tag]
$sel:modelEndpointStatus:PutExternalModel' :: PutExternalModel -> ModelEndpointStatus
$sel:outputConfiguration:PutExternalModel' :: PutExternalModel -> ModelOutputConfiguration
$sel:inputConfiguration:PutExternalModel' :: PutExternalModel -> ModelInputConfiguration
$sel:invokeModelEndpointRoleArn:PutExternalModel' :: PutExternalModel -> Text
$sel:modelSource:PutExternalModel' :: PutExternalModel -> ModelSource
$sel:modelEndpoint:PutExternalModel' :: PutExternalModel -> Text
$sel:tags:PutExternalModel' :: PutExternalModel -> Maybe [Tag]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"modelEndpoint" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
modelEndpoint),
            forall a. a -> Maybe a
Prelude.Just (Key
"modelSource" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ModelSource
modelSource),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"invokeModelEndpointRoleArn"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
invokeModelEndpointRoleArn
              ),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"inputConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ModelInputConfiguration
inputConfiguration),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"outputConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ModelOutputConfiguration
outputConfiguration),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"modelEndpointStatus" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ModelEndpointStatus
modelEndpointStatus)
          ]
      )

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

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

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

-- |
-- Create a value of 'PutExternalModelResponse' 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:
--
-- 'httpStatus', 'putExternalModelResponse_httpStatus' - The response's http status code.
newPutExternalModelResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  PutExternalModelResponse
newPutExternalModelResponse :: Int -> PutExternalModelResponse
newPutExternalModelResponse Int
pHttpStatus_ =
  PutExternalModelResponse'
    { $sel:httpStatus:PutExternalModelResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance Prelude.NFData PutExternalModelResponse where
  rnf :: PutExternalModelResponse -> ()
rnf PutExternalModelResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutExternalModelResponse' :: PutExternalModelResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus