{-# 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.SageMaker.UpdateTrainingJob
-- 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)
--
-- Update a model training job to request a new Debugger profiling
-- configuration.
module Amazonka.SageMaker.UpdateTrainingJob
  ( -- * Creating a Request
    UpdateTrainingJob (..),
    newUpdateTrainingJob,

    -- * Request Lenses
    updateTrainingJob_profilerConfig,
    updateTrainingJob_profilerRuleConfigurations,
    updateTrainingJob_trainingJobName,

    -- * Destructuring the Response
    UpdateTrainingJobResponse (..),
    newUpdateTrainingJobResponse,

    -- * Response Lenses
    updateTrainingJobResponse_httpStatus,
    updateTrainingJobResponse_trainingJobArn,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types

-- | /See:/ 'newUpdateTrainingJob' smart constructor.
data UpdateTrainingJob = UpdateTrainingJob'
  { -- | Configuration information for Debugger system monitoring, framework
    -- profiling, and storage paths.
    UpdateTrainingJob -> Maybe ProfilerConfigForUpdate
profilerConfig :: Prelude.Maybe ProfilerConfigForUpdate,
    -- | Configuration information for Debugger rules for profiling system and
    -- framework metrics.
    UpdateTrainingJob -> Maybe [ProfilerRuleConfiguration]
profilerRuleConfigurations :: Prelude.Maybe [ProfilerRuleConfiguration],
    -- | The name of a training job to update the Debugger profiling
    -- configuration.
    UpdateTrainingJob -> Text
trainingJobName :: Prelude.Text
  }
  deriving (UpdateTrainingJob -> UpdateTrainingJob -> Bool
(UpdateTrainingJob -> UpdateTrainingJob -> Bool)
-> (UpdateTrainingJob -> UpdateTrainingJob -> Bool)
-> Eq UpdateTrainingJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTrainingJob -> UpdateTrainingJob -> Bool
$c/= :: UpdateTrainingJob -> UpdateTrainingJob -> Bool
== :: UpdateTrainingJob -> UpdateTrainingJob -> Bool
$c== :: UpdateTrainingJob -> UpdateTrainingJob -> Bool
Prelude.Eq, ReadPrec [UpdateTrainingJob]
ReadPrec UpdateTrainingJob
Int -> ReadS UpdateTrainingJob
ReadS [UpdateTrainingJob]
(Int -> ReadS UpdateTrainingJob)
-> ReadS [UpdateTrainingJob]
-> ReadPrec UpdateTrainingJob
-> ReadPrec [UpdateTrainingJob]
-> Read UpdateTrainingJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTrainingJob]
$creadListPrec :: ReadPrec [UpdateTrainingJob]
readPrec :: ReadPrec UpdateTrainingJob
$creadPrec :: ReadPrec UpdateTrainingJob
readList :: ReadS [UpdateTrainingJob]
$creadList :: ReadS [UpdateTrainingJob]
readsPrec :: Int -> ReadS UpdateTrainingJob
$creadsPrec :: Int -> ReadS UpdateTrainingJob
Prelude.Read, Int -> UpdateTrainingJob -> ShowS
[UpdateTrainingJob] -> ShowS
UpdateTrainingJob -> String
(Int -> UpdateTrainingJob -> ShowS)
-> (UpdateTrainingJob -> String)
-> ([UpdateTrainingJob] -> ShowS)
-> Show UpdateTrainingJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTrainingJob] -> ShowS
$cshowList :: [UpdateTrainingJob] -> ShowS
show :: UpdateTrainingJob -> String
$cshow :: UpdateTrainingJob -> String
showsPrec :: Int -> UpdateTrainingJob -> ShowS
$cshowsPrec :: Int -> UpdateTrainingJob -> ShowS
Prelude.Show, (forall x. UpdateTrainingJob -> Rep UpdateTrainingJob x)
-> (forall x. Rep UpdateTrainingJob x -> UpdateTrainingJob)
-> Generic UpdateTrainingJob
forall x. Rep UpdateTrainingJob x -> UpdateTrainingJob
forall x. UpdateTrainingJob -> Rep UpdateTrainingJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateTrainingJob x -> UpdateTrainingJob
$cfrom :: forall x. UpdateTrainingJob -> Rep UpdateTrainingJob x
Prelude.Generic)

-- |
-- Create a value of 'UpdateTrainingJob' 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:
--
-- 'profilerConfig', 'updateTrainingJob_profilerConfig' - Configuration information for Debugger system monitoring, framework
-- profiling, and storage paths.
--
-- 'profilerRuleConfigurations', 'updateTrainingJob_profilerRuleConfigurations' - Configuration information for Debugger rules for profiling system and
-- framework metrics.
--
-- 'trainingJobName', 'updateTrainingJob_trainingJobName' - The name of a training job to update the Debugger profiling
-- configuration.
newUpdateTrainingJob ::
  -- | 'trainingJobName'
  Prelude.Text ->
  UpdateTrainingJob
newUpdateTrainingJob :: Text -> UpdateTrainingJob
newUpdateTrainingJob Text
pTrainingJobName_ =
  UpdateTrainingJob' :: Maybe ProfilerConfigForUpdate
-> Maybe [ProfilerRuleConfiguration] -> Text -> UpdateTrainingJob
UpdateTrainingJob'
    { $sel:profilerConfig:UpdateTrainingJob' :: Maybe ProfilerConfigForUpdate
profilerConfig =
        Maybe ProfilerConfigForUpdate
forall a. Maybe a
Prelude.Nothing,
      $sel:profilerRuleConfigurations:UpdateTrainingJob' :: Maybe [ProfilerRuleConfiguration]
profilerRuleConfigurations = Maybe [ProfilerRuleConfiguration]
forall a. Maybe a
Prelude.Nothing,
      $sel:trainingJobName:UpdateTrainingJob' :: Text
trainingJobName = Text
pTrainingJobName_
    }

-- | Configuration information for Debugger system monitoring, framework
-- profiling, and storage paths.
updateTrainingJob_profilerConfig :: Lens.Lens' UpdateTrainingJob (Prelude.Maybe ProfilerConfigForUpdate)
updateTrainingJob_profilerConfig :: (Maybe ProfilerConfigForUpdate
 -> f (Maybe ProfilerConfigForUpdate))
-> UpdateTrainingJob -> f UpdateTrainingJob
updateTrainingJob_profilerConfig = (UpdateTrainingJob -> Maybe ProfilerConfigForUpdate)
-> (UpdateTrainingJob
    -> Maybe ProfilerConfigForUpdate -> UpdateTrainingJob)
-> Lens
     UpdateTrainingJob
     UpdateTrainingJob
     (Maybe ProfilerConfigForUpdate)
     (Maybe ProfilerConfigForUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrainingJob' {Maybe ProfilerConfigForUpdate
profilerConfig :: Maybe ProfilerConfigForUpdate
$sel:profilerConfig:UpdateTrainingJob' :: UpdateTrainingJob -> Maybe ProfilerConfigForUpdate
profilerConfig} -> Maybe ProfilerConfigForUpdate
profilerConfig) (\s :: UpdateTrainingJob
s@UpdateTrainingJob' {} Maybe ProfilerConfigForUpdate
a -> UpdateTrainingJob
s {$sel:profilerConfig:UpdateTrainingJob' :: Maybe ProfilerConfigForUpdate
profilerConfig = Maybe ProfilerConfigForUpdate
a} :: UpdateTrainingJob)

-- | Configuration information for Debugger rules for profiling system and
-- framework metrics.
updateTrainingJob_profilerRuleConfigurations :: Lens.Lens' UpdateTrainingJob (Prelude.Maybe [ProfilerRuleConfiguration])
updateTrainingJob_profilerRuleConfigurations :: (Maybe [ProfilerRuleConfiguration]
 -> f (Maybe [ProfilerRuleConfiguration]))
-> UpdateTrainingJob -> f UpdateTrainingJob
updateTrainingJob_profilerRuleConfigurations = (UpdateTrainingJob -> Maybe [ProfilerRuleConfiguration])
-> (UpdateTrainingJob
    -> Maybe [ProfilerRuleConfiguration] -> UpdateTrainingJob)
-> Lens
     UpdateTrainingJob
     UpdateTrainingJob
     (Maybe [ProfilerRuleConfiguration])
     (Maybe [ProfilerRuleConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrainingJob' {Maybe [ProfilerRuleConfiguration]
profilerRuleConfigurations :: Maybe [ProfilerRuleConfiguration]
$sel:profilerRuleConfigurations:UpdateTrainingJob' :: UpdateTrainingJob -> Maybe [ProfilerRuleConfiguration]
profilerRuleConfigurations} -> Maybe [ProfilerRuleConfiguration]
profilerRuleConfigurations) (\s :: UpdateTrainingJob
s@UpdateTrainingJob' {} Maybe [ProfilerRuleConfiguration]
a -> UpdateTrainingJob
s {$sel:profilerRuleConfigurations:UpdateTrainingJob' :: Maybe [ProfilerRuleConfiguration]
profilerRuleConfigurations = Maybe [ProfilerRuleConfiguration]
a} :: UpdateTrainingJob) ((Maybe [ProfilerRuleConfiguration]
  -> f (Maybe [ProfilerRuleConfiguration]))
 -> UpdateTrainingJob -> f UpdateTrainingJob)
-> ((Maybe [ProfilerRuleConfiguration]
     -> f (Maybe [ProfilerRuleConfiguration]))
    -> Maybe [ProfilerRuleConfiguration]
    -> f (Maybe [ProfilerRuleConfiguration]))
-> (Maybe [ProfilerRuleConfiguration]
    -> f (Maybe [ProfilerRuleConfiguration]))
-> UpdateTrainingJob
-> f UpdateTrainingJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ProfilerRuleConfiguration]
  [ProfilerRuleConfiguration]
  [ProfilerRuleConfiguration]
  [ProfilerRuleConfiguration]
-> Iso
     (Maybe [ProfilerRuleConfiguration])
     (Maybe [ProfilerRuleConfiguration])
     (Maybe [ProfilerRuleConfiguration])
     (Maybe [ProfilerRuleConfiguration])
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
  [ProfilerRuleConfiguration]
  [ProfilerRuleConfiguration]
  [ProfilerRuleConfiguration]
  [ProfilerRuleConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of a training job to update the Debugger profiling
-- configuration.
updateTrainingJob_trainingJobName :: Lens.Lens' UpdateTrainingJob Prelude.Text
updateTrainingJob_trainingJobName :: (Text -> f Text) -> UpdateTrainingJob -> f UpdateTrainingJob
updateTrainingJob_trainingJobName = (UpdateTrainingJob -> Text)
-> (UpdateTrainingJob -> Text -> UpdateTrainingJob)
-> Lens UpdateTrainingJob UpdateTrainingJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrainingJob' {Text
trainingJobName :: Text
$sel:trainingJobName:UpdateTrainingJob' :: UpdateTrainingJob -> Text
trainingJobName} -> Text
trainingJobName) (\s :: UpdateTrainingJob
s@UpdateTrainingJob' {} Text
a -> UpdateTrainingJob
s {$sel:trainingJobName:UpdateTrainingJob' :: Text
trainingJobName = Text
a} :: UpdateTrainingJob)

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

instance Prelude.Hashable UpdateTrainingJob

instance Prelude.NFData UpdateTrainingJob

instance Core.ToHeaders UpdateTrainingJob where
  toHeaders :: UpdateTrainingJob -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateTrainingJob -> 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
"SageMaker.UpdateTrainingJob" ::
                          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 UpdateTrainingJob where
  toJSON :: UpdateTrainingJob -> Value
toJSON UpdateTrainingJob' {Maybe [ProfilerRuleConfiguration]
Maybe ProfilerConfigForUpdate
Text
trainingJobName :: Text
profilerRuleConfigurations :: Maybe [ProfilerRuleConfiguration]
profilerConfig :: Maybe ProfilerConfigForUpdate
$sel:trainingJobName:UpdateTrainingJob' :: UpdateTrainingJob -> Text
$sel:profilerRuleConfigurations:UpdateTrainingJob' :: UpdateTrainingJob -> Maybe [ProfilerRuleConfiguration]
$sel:profilerConfig:UpdateTrainingJob' :: UpdateTrainingJob -> Maybe ProfilerConfigForUpdate
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ProfilerConfig" Text -> ProfilerConfigForUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ProfilerConfigForUpdate -> Pair)
-> Maybe ProfilerConfigForUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProfilerConfigForUpdate
profilerConfig,
            (Text
"ProfilerRuleConfigurations" Text -> [ProfilerRuleConfiguration] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([ProfilerRuleConfiguration] -> Pair)
-> Maybe [ProfilerRuleConfiguration] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ProfilerRuleConfiguration]
profilerRuleConfigurations,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"TrainingJobName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
trainingJobName)
          ]
      )

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

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

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

-- |
-- Create a value of 'UpdateTrainingJobResponse' 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', 'updateTrainingJobResponse_httpStatus' - The response's http status code.
--
-- 'trainingJobArn', 'updateTrainingJobResponse_trainingJobArn' - The Amazon Resource Name (ARN) of the training job.
newUpdateTrainingJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'trainingJobArn'
  Prelude.Text ->
  UpdateTrainingJobResponse
newUpdateTrainingJobResponse :: Int -> Text -> UpdateTrainingJobResponse
newUpdateTrainingJobResponse
  Int
pHttpStatus_
  Text
pTrainingJobArn_ =
    UpdateTrainingJobResponse' :: Int -> Text -> UpdateTrainingJobResponse
UpdateTrainingJobResponse'
      { $sel:httpStatus:UpdateTrainingJobResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:trainingJobArn:UpdateTrainingJobResponse' :: Text
trainingJobArn = Text
pTrainingJobArn_
      }

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

-- | The Amazon Resource Name (ARN) of the training job.
updateTrainingJobResponse_trainingJobArn :: Lens.Lens' UpdateTrainingJobResponse Prelude.Text
updateTrainingJobResponse_trainingJobArn :: (Text -> f Text)
-> UpdateTrainingJobResponse -> f UpdateTrainingJobResponse
updateTrainingJobResponse_trainingJobArn = (UpdateTrainingJobResponse -> Text)
-> (UpdateTrainingJobResponse -> Text -> UpdateTrainingJobResponse)
-> Lens
     UpdateTrainingJobResponse UpdateTrainingJobResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrainingJobResponse' {Text
trainingJobArn :: Text
$sel:trainingJobArn:UpdateTrainingJobResponse' :: UpdateTrainingJobResponse -> Text
trainingJobArn} -> Text
trainingJobArn) (\s :: UpdateTrainingJobResponse
s@UpdateTrainingJobResponse' {} Text
a -> UpdateTrainingJobResponse
s {$sel:trainingJobArn:UpdateTrainingJobResponse' :: Text
trainingJobArn = Text
a} :: UpdateTrainingJobResponse)

instance Prelude.NFData UpdateTrainingJobResponse