{-# 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.LookoutVision.StartModel
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Starts the running of the version of an Amazon Lookout for Vision model.
-- Starting a model takes a while to complete. To check the current state
-- of the model, use DescribeModel.
--
-- A model is ready to use when its status is @HOSTED@.
--
-- Once the model is running, you can detect custom labels in new images by
-- calling DetectAnomalies.
--
-- You are charged for the amount of time that the model is running. To
-- stop a running model, call StopModel.
--
-- This operation requires permissions to perform the
-- @lookoutvision:StartModel@ operation.
module Amazonka.LookoutVision.StartModel
  ( -- * Creating a Request
    StartModel (..),
    newStartModel,

    -- * Request Lenses
    startModel_clientToken,
    startModel_maxInferenceUnits,
    startModel_projectName,
    startModel_modelVersion,
    startModel_minInferenceUnits,

    -- * Destructuring the Response
    StartModelResponse (..),
    newStartModelResponse,

    -- * Response Lenses
    startModelResponse_status,
    startModelResponse_httpStatus,
  )
where

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

-- | /See:/ 'newStartModel' smart constructor.
data StartModel = StartModel'
  { -- | ClientToken is an idempotency token that ensures a call to @StartModel@
    -- completes only once. You choose the value to pass. For example, An issue
    -- might prevent you from getting a response from @StartModel@. In this
    -- case, safely retry your call to @StartModel@ by using the same
    -- @ClientToken@ parameter value.
    --
    -- If you don\'t supply a value for @ClientToken@, the AWS SDK you are
    -- using inserts a value for you. This prevents retries after a network
    -- error from making multiple start requests. You\'ll need to provide your
    -- own value for other use cases.
    --
    -- An error occurs if the other input parameters are not the same as in the
    -- first request. Using a different value for @ClientToken@ is considered a
    -- new call to @StartModel@. An idempotency token is active for 8 hours.
    StartModel -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of inference units to use for auto-scaling the model.
    -- If you don\'t specify a value, Amazon Lookout for Vision doesn\'t
    -- auto-scale the model.
    StartModel -> Maybe Natural
maxInferenceUnits :: Prelude.Maybe Prelude.Natural,
    -- | The name of the project that contains the model that you want to start.
    StartModel -> Text
projectName :: Prelude.Text,
    -- | The version of the model that you want to start.
    StartModel -> Text
modelVersion :: Prelude.Text,
    -- | The minimum number of inference units to use. A single inference unit
    -- represents 1 hour of processing. Use a higher number to increase the TPS
    -- throughput of your model. You are charged for the number of inference
    -- units that you use.
    StartModel -> Natural
minInferenceUnits :: Prelude.Natural
  }
  deriving (StartModel -> StartModel -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartModel -> StartModel -> Bool
$c/= :: StartModel -> StartModel -> Bool
== :: StartModel -> StartModel -> Bool
$c== :: StartModel -> StartModel -> Bool
Prelude.Eq, ReadPrec [StartModel]
ReadPrec StartModel
Int -> ReadS StartModel
ReadS [StartModel]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartModel]
$creadListPrec :: ReadPrec [StartModel]
readPrec :: ReadPrec StartModel
$creadPrec :: ReadPrec StartModel
readList :: ReadS [StartModel]
$creadList :: ReadS [StartModel]
readsPrec :: Int -> ReadS StartModel
$creadsPrec :: Int -> ReadS StartModel
Prelude.Read, Int -> StartModel -> ShowS
[StartModel] -> ShowS
StartModel -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartModel] -> ShowS
$cshowList :: [StartModel] -> ShowS
show :: StartModel -> String
$cshow :: StartModel -> String
showsPrec :: Int -> StartModel -> ShowS
$cshowsPrec :: Int -> StartModel -> ShowS
Prelude.Show, forall x. Rep StartModel x -> StartModel
forall x. StartModel -> Rep StartModel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartModel x -> StartModel
$cfrom :: forall x. StartModel -> Rep StartModel x
Prelude.Generic)

-- |
-- Create a value of 'StartModel' 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:
--
-- 'clientToken', 'startModel_clientToken' - ClientToken is an idempotency token that ensures a call to @StartModel@
-- completes only once. You choose the value to pass. For example, An issue
-- might prevent you from getting a response from @StartModel@. In this
-- case, safely retry your call to @StartModel@ by using the same
-- @ClientToken@ parameter value.
--
-- If you don\'t supply a value for @ClientToken@, the AWS SDK you are
-- using inserts a value for you. This prevents retries after a network
-- error from making multiple start requests. You\'ll need to provide your
-- own value for other use cases.
--
-- An error occurs if the other input parameters are not the same as in the
-- first request. Using a different value for @ClientToken@ is considered a
-- new call to @StartModel@. An idempotency token is active for 8 hours.
--
-- 'maxInferenceUnits', 'startModel_maxInferenceUnits' - The maximum number of inference units to use for auto-scaling the model.
-- If you don\'t specify a value, Amazon Lookout for Vision doesn\'t
-- auto-scale the model.
--
-- 'projectName', 'startModel_projectName' - The name of the project that contains the model that you want to start.
--
-- 'modelVersion', 'startModel_modelVersion' - The version of the model that you want to start.
--
-- 'minInferenceUnits', 'startModel_minInferenceUnits' - The minimum number of inference units to use. A single inference unit
-- represents 1 hour of processing. Use a higher number to increase the TPS
-- throughput of your model. You are charged for the number of inference
-- units that you use.
newStartModel ::
  -- | 'projectName'
  Prelude.Text ->
  -- | 'modelVersion'
  Prelude.Text ->
  -- | 'minInferenceUnits'
  Prelude.Natural ->
  StartModel
newStartModel :: Text -> Text -> Natural -> StartModel
newStartModel
  Text
pProjectName_
  Text
pModelVersion_
  Natural
pMinInferenceUnits_ =
    StartModel'
      { $sel:clientToken:StartModel' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
        $sel:maxInferenceUnits:StartModel' :: Maybe Natural
maxInferenceUnits = forall a. Maybe a
Prelude.Nothing,
        $sel:projectName:StartModel' :: Text
projectName = Text
pProjectName_,
        $sel:modelVersion:StartModel' :: Text
modelVersion = Text
pModelVersion_,
        $sel:minInferenceUnits:StartModel' :: Natural
minInferenceUnits = Natural
pMinInferenceUnits_
      }

-- | ClientToken is an idempotency token that ensures a call to @StartModel@
-- completes only once. You choose the value to pass. For example, An issue
-- might prevent you from getting a response from @StartModel@. In this
-- case, safely retry your call to @StartModel@ by using the same
-- @ClientToken@ parameter value.
--
-- If you don\'t supply a value for @ClientToken@, the AWS SDK you are
-- using inserts a value for you. This prevents retries after a network
-- error from making multiple start requests. You\'ll need to provide your
-- own value for other use cases.
--
-- An error occurs if the other input parameters are not the same as in the
-- first request. Using a different value for @ClientToken@ is considered a
-- new call to @StartModel@. An idempotency token is active for 8 hours.
startModel_clientToken :: Lens.Lens' StartModel (Prelude.Maybe Prelude.Text)
startModel_clientToken :: Lens' StartModel (Maybe Text)
startModel_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartModel' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:StartModel' :: StartModel -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: StartModel
s@StartModel' {} Maybe Text
a -> StartModel
s {$sel:clientToken:StartModel' :: Maybe Text
clientToken = Maybe Text
a} :: StartModel)

-- | The maximum number of inference units to use for auto-scaling the model.
-- If you don\'t specify a value, Amazon Lookout for Vision doesn\'t
-- auto-scale the model.
startModel_maxInferenceUnits :: Lens.Lens' StartModel (Prelude.Maybe Prelude.Natural)
startModel_maxInferenceUnits :: Lens' StartModel (Maybe Natural)
startModel_maxInferenceUnits = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartModel' {Maybe Natural
maxInferenceUnits :: Maybe Natural
$sel:maxInferenceUnits:StartModel' :: StartModel -> Maybe Natural
maxInferenceUnits} -> Maybe Natural
maxInferenceUnits) (\s :: StartModel
s@StartModel' {} Maybe Natural
a -> StartModel
s {$sel:maxInferenceUnits:StartModel' :: Maybe Natural
maxInferenceUnits = Maybe Natural
a} :: StartModel)

-- | The name of the project that contains the model that you want to start.
startModel_projectName :: Lens.Lens' StartModel Prelude.Text
startModel_projectName :: Lens' StartModel Text
startModel_projectName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartModel' {Text
projectName :: Text
$sel:projectName:StartModel' :: StartModel -> Text
projectName} -> Text
projectName) (\s :: StartModel
s@StartModel' {} Text
a -> StartModel
s {$sel:projectName:StartModel' :: Text
projectName = Text
a} :: StartModel)

-- | The version of the model that you want to start.
startModel_modelVersion :: Lens.Lens' StartModel Prelude.Text
startModel_modelVersion :: Lens' StartModel Text
startModel_modelVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartModel' {Text
modelVersion :: Text
$sel:modelVersion:StartModel' :: StartModel -> Text
modelVersion} -> Text
modelVersion) (\s :: StartModel
s@StartModel' {} Text
a -> StartModel
s {$sel:modelVersion:StartModel' :: Text
modelVersion = Text
a} :: StartModel)

-- | The minimum number of inference units to use. A single inference unit
-- represents 1 hour of processing. Use a higher number to increase the TPS
-- throughput of your model. You are charged for the number of inference
-- units that you use.
startModel_minInferenceUnits :: Lens.Lens' StartModel Prelude.Natural
startModel_minInferenceUnits :: Lens' StartModel Natural
startModel_minInferenceUnits = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartModel' {Natural
minInferenceUnits :: Natural
$sel:minInferenceUnits:StartModel' :: StartModel -> Natural
minInferenceUnits} -> Natural
minInferenceUnits) (\s :: StartModel
s@StartModel' {} Natural
a -> StartModel
s {$sel:minInferenceUnits:StartModel' :: Natural
minInferenceUnits = Natural
a} :: StartModel)

instance Core.AWSRequest StartModel where
  type AWSResponse StartModel = StartModelResponse
  request :: (Service -> Service) -> StartModel -> Request StartModel
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 StartModel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartModel)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe ModelHostingStatus -> Int -> StartModelResponse
StartModelResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Status")
            forall (f :: * -> *) a b. Applicative f => 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 StartModel where
  hashWithSalt :: Int -> StartModel -> Int
hashWithSalt Int
_salt StartModel' {Natural
Maybe Natural
Maybe Text
Text
minInferenceUnits :: Natural
modelVersion :: Text
projectName :: Text
maxInferenceUnits :: Maybe Natural
clientToken :: Maybe Text
$sel:minInferenceUnits:StartModel' :: StartModel -> Natural
$sel:modelVersion:StartModel' :: StartModel -> Text
$sel:projectName:StartModel' :: StartModel -> Text
$sel:maxInferenceUnits:StartModel' :: StartModel -> Maybe Natural
$sel:clientToken:StartModel' :: StartModel -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxInferenceUnits
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
projectName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
modelVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
minInferenceUnits

instance Prelude.NFData StartModel where
  rnf :: StartModel -> ()
rnf StartModel' {Natural
Maybe Natural
Maybe Text
Text
minInferenceUnits :: Natural
modelVersion :: Text
projectName :: Text
maxInferenceUnits :: Maybe Natural
clientToken :: Maybe Text
$sel:minInferenceUnits:StartModel' :: StartModel -> Natural
$sel:modelVersion:StartModel' :: StartModel -> Text
$sel:projectName:StartModel' :: StartModel -> Text
$sel:maxInferenceUnits:StartModel' :: StartModel -> Maybe Natural
$sel:clientToken:StartModel' :: StartModel -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxInferenceUnits
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
projectName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
modelVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
minInferenceUnits

instance Data.ToHeaders StartModel where
  toHeaders :: StartModel -> ResponseHeaders
toHeaders StartModel' {Natural
Maybe Natural
Maybe Text
Text
minInferenceUnits :: Natural
modelVersion :: Text
projectName :: Text
maxInferenceUnits :: Maybe Natural
clientToken :: Maybe Text
$sel:minInferenceUnits:StartModel' :: StartModel -> Natural
$sel:modelVersion:StartModel' :: StartModel -> Text
$sel:projectName:StartModel' :: StartModel -> Text
$sel:maxInferenceUnits:StartModel' :: StartModel -> Maybe Natural
$sel:clientToken:StartModel' :: StartModel -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"X-Amzn-Client-Token" forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# Maybe Text
clientToken,
        HeaderName
"Content-Type"
          forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"application/x-amz-json-1.1" :: Prelude.ByteString)
      ]

instance Data.ToJSON StartModel where
  toJSON :: StartModel -> Value
toJSON StartModel' {Natural
Maybe Natural
Maybe Text
Text
minInferenceUnits :: Natural
modelVersion :: Text
projectName :: Text
maxInferenceUnits :: Maybe Natural
clientToken :: Maybe Text
$sel:minInferenceUnits:StartModel' :: StartModel -> Natural
$sel:modelVersion:StartModel' :: StartModel -> Text
$sel:projectName:StartModel' :: StartModel -> Text
$sel:maxInferenceUnits:StartModel' :: StartModel -> Maybe Natural
$sel:clientToken:StartModel' :: StartModel -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxInferenceUnits" 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 Natural
maxInferenceUnits,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"MinInferenceUnits" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
minInferenceUnits)
          ]
      )

instance Data.ToPath StartModel where
  toPath :: StartModel -> ByteString
toPath StartModel' {Natural
Maybe Natural
Maybe Text
Text
minInferenceUnits :: Natural
modelVersion :: Text
projectName :: Text
maxInferenceUnits :: Maybe Natural
clientToken :: Maybe Text
$sel:minInferenceUnits:StartModel' :: StartModel -> Natural
$sel:modelVersion:StartModel' :: StartModel -> Text
$sel:projectName:StartModel' :: StartModel -> Text
$sel:maxInferenceUnits:StartModel' :: StartModel -> Maybe Natural
$sel:clientToken:StartModel' :: StartModel -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2020-11-20/projects/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
projectName,
        ByteString
"/models/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
modelVersion,
        ByteString
"/start"
      ]

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

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

-- |
-- Create a value of 'StartModelResponse' 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', 'startModelResponse_status' - The current running status of the model.
--
-- 'httpStatus', 'startModelResponse_httpStatus' - The response's http status code.
newStartModelResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartModelResponse
newStartModelResponse :: Int -> StartModelResponse
newStartModelResponse Int
pHttpStatus_ =
  StartModelResponse'
    { $sel:status:StartModelResponse' :: Maybe ModelHostingStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartModelResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current running status of the model.
startModelResponse_status :: Lens.Lens' StartModelResponse (Prelude.Maybe ModelHostingStatus)
startModelResponse_status :: Lens' StartModelResponse (Maybe ModelHostingStatus)
startModelResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartModelResponse' {Maybe ModelHostingStatus
status :: Maybe ModelHostingStatus
$sel:status:StartModelResponse' :: StartModelResponse -> Maybe ModelHostingStatus
status} -> Maybe ModelHostingStatus
status) (\s :: StartModelResponse
s@StartModelResponse' {} Maybe ModelHostingStatus
a -> StartModelResponse
s {$sel:status:StartModelResponse' :: Maybe ModelHostingStatus
status = Maybe ModelHostingStatus
a} :: StartModelResponse)

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

instance Prelude.NFData StartModelResponse where
  rnf :: StartModelResponse -> ()
rnf StartModelResponse' {Int
Maybe ModelHostingStatus
httpStatus :: Int
status :: Maybe ModelHostingStatus
$sel:httpStatus:StartModelResponse' :: StartModelResponse -> Int
$sel:status:StartModelResponse' :: StartModelResponse -> Maybe ModelHostingStatus
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ModelHostingStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus