{-# 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.UpdateTrialComponent
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates one or more properties of a trial component.
module Amazonka.SageMaker.UpdateTrialComponent
  ( -- * Creating a Request
    UpdateTrialComponent (..),
    newUpdateTrialComponent,

    -- * Request Lenses
    updateTrialComponent_displayName,
    updateTrialComponent_endTime,
    updateTrialComponent_inputArtifacts,
    updateTrialComponent_inputArtifactsToRemove,
    updateTrialComponent_outputArtifacts,
    updateTrialComponent_outputArtifactsToRemove,
    updateTrialComponent_parameters,
    updateTrialComponent_parametersToRemove,
    updateTrialComponent_startTime,
    updateTrialComponent_status,
    updateTrialComponent_trialComponentName,

    -- * Destructuring the Response
    UpdateTrialComponentResponse (..),
    newUpdateTrialComponentResponse,

    -- * Response Lenses
    updateTrialComponentResponse_trialComponentArn,
    updateTrialComponentResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateTrialComponent' smart constructor.
data UpdateTrialComponent = UpdateTrialComponent'
  { -- | The name of the component as displayed. The name doesn\'t need to be
    -- unique. If @DisplayName@ isn\'t specified, @TrialComponentName@ is
    -- displayed.
    UpdateTrialComponent -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | When the component ended.
    UpdateTrialComponent -> Maybe POSIX
endTime :: Prelude.Maybe Data.POSIX,
    -- | Replaces all of the component\'s input artifacts with the specified
    -- artifacts.
    UpdateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts :: Prelude.Maybe (Prelude.HashMap Prelude.Text TrialComponentArtifact),
    -- | The input artifacts to remove from the component.
    UpdateTrialComponent -> Maybe [Text]
inputArtifactsToRemove :: Prelude.Maybe [Prelude.Text],
    -- | Replaces all of the component\'s output artifacts with the specified
    -- artifacts.
    UpdateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts :: Prelude.Maybe (Prelude.HashMap Prelude.Text TrialComponentArtifact),
    -- | The output artifacts to remove from the component.
    UpdateTrialComponent -> Maybe [Text]
outputArtifactsToRemove :: Prelude.Maybe [Prelude.Text],
    -- | Replaces all of the component\'s hyperparameters with the specified
    -- hyperparameters.
    UpdateTrialComponent
-> Maybe (HashMap Text TrialComponentParameterValue)
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text TrialComponentParameterValue),
    -- | The hyperparameters to remove from the component.
    UpdateTrialComponent -> Maybe [Text]
parametersToRemove :: Prelude.Maybe [Prelude.Text],
    -- | When the component started.
    UpdateTrialComponent -> Maybe POSIX
startTime :: Prelude.Maybe Data.POSIX,
    -- | The new status of the component.
    UpdateTrialComponent -> Maybe TrialComponentStatus
status :: Prelude.Maybe TrialComponentStatus,
    -- | The name of the component to update.
    UpdateTrialComponent -> Text
trialComponentName :: Prelude.Text
  }
  deriving (UpdateTrialComponent -> UpdateTrialComponent -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTrialComponent -> UpdateTrialComponent -> Bool
$c/= :: UpdateTrialComponent -> UpdateTrialComponent -> Bool
== :: UpdateTrialComponent -> UpdateTrialComponent -> Bool
$c== :: UpdateTrialComponent -> UpdateTrialComponent -> Bool
Prelude.Eq, ReadPrec [UpdateTrialComponent]
ReadPrec UpdateTrialComponent
Int -> ReadS UpdateTrialComponent
ReadS [UpdateTrialComponent]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTrialComponent]
$creadListPrec :: ReadPrec [UpdateTrialComponent]
readPrec :: ReadPrec UpdateTrialComponent
$creadPrec :: ReadPrec UpdateTrialComponent
readList :: ReadS [UpdateTrialComponent]
$creadList :: ReadS [UpdateTrialComponent]
readsPrec :: Int -> ReadS UpdateTrialComponent
$creadsPrec :: Int -> ReadS UpdateTrialComponent
Prelude.Read, Int -> UpdateTrialComponent -> ShowS
[UpdateTrialComponent] -> ShowS
UpdateTrialComponent -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTrialComponent] -> ShowS
$cshowList :: [UpdateTrialComponent] -> ShowS
show :: UpdateTrialComponent -> String
$cshow :: UpdateTrialComponent -> String
showsPrec :: Int -> UpdateTrialComponent -> ShowS
$cshowsPrec :: Int -> UpdateTrialComponent -> ShowS
Prelude.Show, forall x. Rep UpdateTrialComponent x -> UpdateTrialComponent
forall x. UpdateTrialComponent -> Rep UpdateTrialComponent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateTrialComponent x -> UpdateTrialComponent
$cfrom :: forall x. UpdateTrialComponent -> Rep UpdateTrialComponent x
Prelude.Generic)

-- |
-- Create a value of 'UpdateTrialComponent' 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:
--
-- 'displayName', 'updateTrialComponent_displayName' - The name of the component as displayed. The name doesn\'t need to be
-- unique. If @DisplayName@ isn\'t specified, @TrialComponentName@ is
-- displayed.
--
-- 'endTime', 'updateTrialComponent_endTime' - When the component ended.
--
-- 'inputArtifacts', 'updateTrialComponent_inputArtifacts' - Replaces all of the component\'s input artifacts with the specified
-- artifacts.
--
-- 'inputArtifactsToRemove', 'updateTrialComponent_inputArtifactsToRemove' - The input artifacts to remove from the component.
--
-- 'outputArtifacts', 'updateTrialComponent_outputArtifacts' - Replaces all of the component\'s output artifacts with the specified
-- artifacts.
--
-- 'outputArtifactsToRemove', 'updateTrialComponent_outputArtifactsToRemove' - The output artifacts to remove from the component.
--
-- 'parameters', 'updateTrialComponent_parameters' - Replaces all of the component\'s hyperparameters with the specified
-- hyperparameters.
--
-- 'parametersToRemove', 'updateTrialComponent_parametersToRemove' - The hyperparameters to remove from the component.
--
-- 'startTime', 'updateTrialComponent_startTime' - When the component started.
--
-- 'status', 'updateTrialComponent_status' - The new status of the component.
--
-- 'trialComponentName', 'updateTrialComponent_trialComponentName' - The name of the component to update.
newUpdateTrialComponent ::
  -- | 'trialComponentName'
  Prelude.Text ->
  UpdateTrialComponent
newUpdateTrialComponent :: Text -> UpdateTrialComponent
newUpdateTrialComponent Text
pTrialComponentName_ =
  UpdateTrialComponent'
    { $sel:displayName:UpdateTrialComponent' :: Maybe Text
displayName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:UpdateTrialComponent' :: Maybe POSIX
endTime = forall a. Maybe a
Prelude.Nothing,
      $sel:inputArtifacts:UpdateTrialComponent' :: Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts = forall a. Maybe a
Prelude.Nothing,
      $sel:inputArtifactsToRemove:UpdateTrialComponent' :: Maybe [Text]
inputArtifactsToRemove = forall a. Maybe a
Prelude.Nothing,
      $sel:outputArtifacts:UpdateTrialComponent' :: Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts = forall a. Maybe a
Prelude.Nothing,
      $sel:outputArtifactsToRemove:UpdateTrialComponent' :: Maybe [Text]
outputArtifactsToRemove = forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:UpdateTrialComponent' :: Maybe (HashMap Text TrialComponentParameterValue)
parameters = forall a. Maybe a
Prelude.Nothing,
      $sel:parametersToRemove:UpdateTrialComponent' :: Maybe [Text]
parametersToRemove = forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:UpdateTrialComponent' :: Maybe POSIX
startTime = forall a. Maybe a
Prelude.Nothing,
      $sel:status:UpdateTrialComponent' :: Maybe TrialComponentStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:trialComponentName:UpdateTrialComponent' :: Text
trialComponentName = Text
pTrialComponentName_
    }

-- | The name of the component as displayed. The name doesn\'t need to be
-- unique. If @DisplayName@ isn\'t specified, @TrialComponentName@ is
-- displayed.
updateTrialComponent_displayName :: Lens.Lens' UpdateTrialComponent (Prelude.Maybe Prelude.Text)
updateTrialComponent_displayName :: Lens' UpdateTrialComponent (Maybe Text)
updateTrialComponent_displayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrialComponent' {Maybe Text
displayName :: Maybe Text
$sel:displayName:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: UpdateTrialComponent
s@UpdateTrialComponent' {} Maybe Text
a -> UpdateTrialComponent
s {$sel:displayName:UpdateTrialComponent' :: Maybe Text
displayName = Maybe Text
a} :: UpdateTrialComponent)

-- | When the component ended.
updateTrialComponent_endTime :: Lens.Lens' UpdateTrialComponent (Prelude.Maybe Prelude.UTCTime)
updateTrialComponent_endTime :: Lens' UpdateTrialComponent (Maybe UTCTime)
updateTrialComponent_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrialComponent' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: UpdateTrialComponent
s@UpdateTrialComponent' {} Maybe POSIX
a -> UpdateTrialComponent
s {$sel:endTime:UpdateTrialComponent' :: Maybe POSIX
endTime = Maybe POSIX
a} :: UpdateTrialComponent) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Replaces all of the component\'s input artifacts with the specified
-- artifacts.
updateTrialComponent_inputArtifacts :: Lens.Lens' UpdateTrialComponent (Prelude.Maybe (Prelude.HashMap Prelude.Text TrialComponentArtifact))
updateTrialComponent_inputArtifacts :: Lens'
  UpdateTrialComponent (Maybe (HashMap Text TrialComponentArtifact))
updateTrialComponent_inputArtifacts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrialComponent' {Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts :: Maybe (HashMap Text TrialComponentArtifact)
$sel:inputArtifacts:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts} -> Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts) (\s :: UpdateTrialComponent
s@UpdateTrialComponent' {} Maybe (HashMap Text TrialComponentArtifact)
a -> UpdateTrialComponent
s {$sel:inputArtifacts:UpdateTrialComponent' :: Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts = Maybe (HashMap Text TrialComponentArtifact)
a} :: UpdateTrialComponent) 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 input artifacts to remove from the component.
updateTrialComponent_inputArtifactsToRemove :: Lens.Lens' UpdateTrialComponent (Prelude.Maybe [Prelude.Text])
updateTrialComponent_inputArtifactsToRemove :: Lens' UpdateTrialComponent (Maybe [Text])
updateTrialComponent_inputArtifactsToRemove = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrialComponent' {Maybe [Text]
inputArtifactsToRemove :: Maybe [Text]
$sel:inputArtifactsToRemove:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe [Text]
inputArtifactsToRemove} -> Maybe [Text]
inputArtifactsToRemove) (\s :: UpdateTrialComponent
s@UpdateTrialComponent' {} Maybe [Text]
a -> UpdateTrialComponent
s {$sel:inputArtifactsToRemove:UpdateTrialComponent' :: Maybe [Text]
inputArtifactsToRemove = Maybe [Text]
a} :: UpdateTrialComponent) 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

-- | Replaces all of the component\'s output artifacts with the specified
-- artifacts.
updateTrialComponent_outputArtifacts :: Lens.Lens' UpdateTrialComponent (Prelude.Maybe (Prelude.HashMap Prelude.Text TrialComponentArtifact))
updateTrialComponent_outputArtifacts :: Lens'
  UpdateTrialComponent (Maybe (HashMap Text TrialComponentArtifact))
updateTrialComponent_outputArtifacts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrialComponent' {Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts :: Maybe (HashMap Text TrialComponentArtifact)
$sel:outputArtifacts:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts} -> Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts) (\s :: UpdateTrialComponent
s@UpdateTrialComponent' {} Maybe (HashMap Text TrialComponentArtifact)
a -> UpdateTrialComponent
s {$sel:outputArtifacts:UpdateTrialComponent' :: Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts = Maybe (HashMap Text TrialComponentArtifact)
a} :: UpdateTrialComponent) 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 output artifacts to remove from the component.
updateTrialComponent_outputArtifactsToRemove :: Lens.Lens' UpdateTrialComponent (Prelude.Maybe [Prelude.Text])
updateTrialComponent_outputArtifactsToRemove :: Lens' UpdateTrialComponent (Maybe [Text])
updateTrialComponent_outputArtifactsToRemove = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrialComponent' {Maybe [Text]
outputArtifactsToRemove :: Maybe [Text]
$sel:outputArtifactsToRemove:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe [Text]
outputArtifactsToRemove} -> Maybe [Text]
outputArtifactsToRemove) (\s :: UpdateTrialComponent
s@UpdateTrialComponent' {} Maybe [Text]
a -> UpdateTrialComponent
s {$sel:outputArtifactsToRemove:UpdateTrialComponent' :: Maybe [Text]
outputArtifactsToRemove = Maybe [Text]
a} :: UpdateTrialComponent) 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

-- | Replaces all of the component\'s hyperparameters with the specified
-- hyperparameters.
updateTrialComponent_parameters :: Lens.Lens' UpdateTrialComponent (Prelude.Maybe (Prelude.HashMap Prelude.Text TrialComponentParameterValue))
updateTrialComponent_parameters :: Lens'
  UpdateTrialComponent
  (Maybe (HashMap Text TrialComponentParameterValue))
updateTrialComponent_parameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrialComponent' {Maybe (HashMap Text TrialComponentParameterValue)
parameters :: Maybe (HashMap Text TrialComponentParameterValue)
$sel:parameters:UpdateTrialComponent' :: UpdateTrialComponent
-> Maybe (HashMap Text TrialComponentParameterValue)
parameters} -> Maybe (HashMap Text TrialComponentParameterValue)
parameters) (\s :: UpdateTrialComponent
s@UpdateTrialComponent' {} Maybe (HashMap Text TrialComponentParameterValue)
a -> UpdateTrialComponent
s {$sel:parameters:UpdateTrialComponent' :: Maybe (HashMap Text TrialComponentParameterValue)
parameters = Maybe (HashMap Text TrialComponentParameterValue)
a} :: UpdateTrialComponent) 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 hyperparameters to remove from the component.
updateTrialComponent_parametersToRemove :: Lens.Lens' UpdateTrialComponent (Prelude.Maybe [Prelude.Text])
updateTrialComponent_parametersToRemove :: Lens' UpdateTrialComponent (Maybe [Text])
updateTrialComponent_parametersToRemove = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrialComponent' {Maybe [Text]
parametersToRemove :: Maybe [Text]
$sel:parametersToRemove:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe [Text]
parametersToRemove} -> Maybe [Text]
parametersToRemove) (\s :: UpdateTrialComponent
s@UpdateTrialComponent' {} Maybe [Text]
a -> UpdateTrialComponent
s {$sel:parametersToRemove:UpdateTrialComponent' :: Maybe [Text]
parametersToRemove = Maybe [Text]
a} :: UpdateTrialComponent) 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

-- | When the component started.
updateTrialComponent_startTime :: Lens.Lens' UpdateTrialComponent (Prelude.Maybe Prelude.UTCTime)
updateTrialComponent_startTime :: Lens' UpdateTrialComponent (Maybe UTCTime)
updateTrialComponent_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrialComponent' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: UpdateTrialComponent
s@UpdateTrialComponent' {} Maybe POSIX
a -> UpdateTrialComponent
s {$sel:startTime:UpdateTrialComponent' :: Maybe POSIX
startTime = Maybe POSIX
a} :: UpdateTrialComponent) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The new status of the component.
updateTrialComponent_status :: Lens.Lens' UpdateTrialComponent (Prelude.Maybe TrialComponentStatus)
updateTrialComponent_status :: Lens' UpdateTrialComponent (Maybe TrialComponentStatus)
updateTrialComponent_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrialComponent' {Maybe TrialComponentStatus
status :: Maybe TrialComponentStatus
$sel:status:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe TrialComponentStatus
status} -> Maybe TrialComponentStatus
status) (\s :: UpdateTrialComponent
s@UpdateTrialComponent' {} Maybe TrialComponentStatus
a -> UpdateTrialComponent
s {$sel:status:UpdateTrialComponent' :: Maybe TrialComponentStatus
status = Maybe TrialComponentStatus
a} :: UpdateTrialComponent)

-- | The name of the component to update.
updateTrialComponent_trialComponentName :: Lens.Lens' UpdateTrialComponent Prelude.Text
updateTrialComponent_trialComponentName :: Lens' UpdateTrialComponent Text
updateTrialComponent_trialComponentName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrialComponent' {Text
trialComponentName :: Text
$sel:trialComponentName:UpdateTrialComponent' :: UpdateTrialComponent -> Text
trialComponentName} -> Text
trialComponentName) (\s :: UpdateTrialComponent
s@UpdateTrialComponent' {} Text
a -> UpdateTrialComponent
s {$sel:trialComponentName:UpdateTrialComponent' :: Text
trialComponentName = Text
a} :: UpdateTrialComponent)

instance Core.AWSRequest UpdateTrialComponent where
  type
    AWSResponse UpdateTrialComponent =
      UpdateTrialComponentResponse
  request :: (Service -> Service)
-> UpdateTrialComponent -> Request UpdateTrialComponent
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 UpdateTrialComponent
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateTrialComponent)))
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 Text -> Int -> UpdateTrialComponentResponse
UpdateTrialComponentResponse'
            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
"TrialComponentArn")
            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 UpdateTrialComponent where
  hashWithSalt :: Int -> UpdateTrialComponent -> Int
hashWithSalt Int
_salt UpdateTrialComponent' {Maybe [Text]
Maybe Text
Maybe (HashMap Text TrialComponentArtifact)
Maybe (HashMap Text TrialComponentParameterValue)
Maybe POSIX
Maybe TrialComponentStatus
Text
trialComponentName :: Text
status :: Maybe TrialComponentStatus
startTime :: Maybe POSIX
parametersToRemove :: Maybe [Text]
parameters :: Maybe (HashMap Text TrialComponentParameterValue)
outputArtifactsToRemove :: Maybe [Text]
outputArtifacts :: Maybe (HashMap Text TrialComponentArtifact)
inputArtifactsToRemove :: Maybe [Text]
inputArtifacts :: Maybe (HashMap Text TrialComponentArtifact)
endTime :: Maybe POSIX
displayName :: Maybe Text
$sel:trialComponentName:UpdateTrialComponent' :: UpdateTrialComponent -> Text
$sel:status:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe TrialComponentStatus
$sel:startTime:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe POSIX
$sel:parametersToRemove:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe [Text]
$sel:parameters:UpdateTrialComponent' :: UpdateTrialComponent
-> Maybe (HashMap Text TrialComponentParameterValue)
$sel:outputArtifactsToRemove:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe [Text]
$sel:outputArtifacts:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
$sel:inputArtifactsToRemove:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe [Text]
$sel:inputArtifacts:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
$sel:endTime:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe POSIX
$sel:displayName:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
displayName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
endTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
inputArtifactsToRemove
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
outputArtifactsToRemove
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text TrialComponentParameterValue)
parameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
parametersToRemove
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
startTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TrialComponentStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
trialComponentName

instance Prelude.NFData UpdateTrialComponent where
  rnf :: UpdateTrialComponent -> ()
rnf UpdateTrialComponent' {Maybe [Text]
Maybe Text
Maybe (HashMap Text TrialComponentArtifact)
Maybe (HashMap Text TrialComponentParameterValue)
Maybe POSIX
Maybe TrialComponentStatus
Text
trialComponentName :: Text
status :: Maybe TrialComponentStatus
startTime :: Maybe POSIX
parametersToRemove :: Maybe [Text]
parameters :: Maybe (HashMap Text TrialComponentParameterValue)
outputArtifactsToRemove :: Maybe [Text]
outputArtifacts :: Maybe (HashMap Text TrialComponentArtifact)
inputArtifactsToRemove :: Maybe [Text]
inputArtifacts :: Maybe (HashMap Text TrialComponentArtifact)
endTime :: Maybe POSIX
displayName :: Maybe Text
$sel:trialComponentName:UpdateTrialComponent' :: UpdateTrialComponent -> Text
$sel:status:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe TrialComponentStatus
$sel:startTime:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe POSIX
$sel:parametersToRemove:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe [Text]
$sel:parameters:UpdateTrialComponent' :: UpdateTrialComponent
-> Maybe (HashMap Text TrialComponentParameterValue)
$sel:outputArtifactsToRemove:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe [Text]
$sel:outputArtifacts:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
$sel:inputArtifactsToRemove:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe [Text]
$sel:inputArtifacts:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
$sel:endTime:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe POSIX
$sel:displayName:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
displayName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
endTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
inputArtifactsToRemove
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
outputArtifactsToRemove
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text TrialComponentParameterValue)
parameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
parametersToRemove
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
startTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TrialComponentStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
trialComponentName

instance Data.ToHeaders UpdateTrialComponent where
  toHeaders :: UpdateTrialComponent -> 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
"SageMaker.UpdateTrialComponent" ::
                          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 UpdateTrialComponent where
  toJSON :: UpdateTrialComponent -> Value
toJSON UpdateTrialComponent' {Maybe [Text]
Maybe Text
Maybe (HashMap Text TrialComponentArtifact)
Maybe (HashMap Text TrialComponentParameterValue)
Maybe POSIX
Maybe TrialComponentStatus
Text
trialComponentName :: Text
status :: Maybe TrialComponentStatus
startTime :: Maybe POSIX
parametersToRemove :: Maybe [Text]
parameters :: Maybe (HashMap Text TrialComponentParameterValue)
outputArtifactsToRemove :: Maybe [Text]
outputArtifacts :: Maybe (HashMap Text TrialComponentArtifact)
inputArtifactsToRemove :: Maybe [Text]
inputArtifacts :: Maybe (HashMap Text TrialComponentArtifact)
endTime :: Maybe POSIX
displayName :: Maybe Text
$sel:trialComponentName:UpdateTrialComponent' :: UpdateTrialComponent -> Text
$sel:status:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe TrialComponentStatus
$sel:startTime:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe POSIX
$sel:parametersToRemove:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe [Text]
$sel:parameters:UpdateTrialComponent' :: UpdateTrialComponent
-> Maybe (HashMap Text TrialComponentParameterValue)
$sel:outputArtifactsToRemove:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe [Text]
$sel:outputArtifacts:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
$sel:inputArtifactsToRemove:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe [Text]
$sel:inputArtifacts:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
$sel:endTime:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe POSIX
$sel:displayName:UpdateTrialComponent' :: UpdateTrialComponent -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"DisplayName" 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 Text
displayName,
            (Key
"EndTime" 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 POSIX
endTime,
            (Key
"InputArtifacts" 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 (HashMap Text TrialComponentArtifact)
inputArtifacts,
            (Key
"InputArtifactsToRemove" 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 [Text]
inputArtifactsToRemove,
            (Key
"OutputArtifacts" 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 (HashMap Text TrialComponentArtifact)
outputArtifacts,
            (Key
"OutputArtifactsToRemove" 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 [Text]
outputArtifactsToRemove,
            (Key
"Parameters" 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 (HashMap Text TrialComponentParameterValue)
parameters,
            (Key
"ParametersToRemove" 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 [Text]
parametersToRemove,
            (Key
"StartTime" 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 POSIX
startTime,
            (Key
"Status" 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 TrialComponentStatus
status,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"TrialComponentName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
trialComponentName)
          ]
      )

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

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

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

-- |
-- Create a value of 'UpdateTrialComponentResponse' 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:
--
-- 'trialComponentArn', 'updateTrialComponentResponse_trialComponentArn' - The Amazon Resource Name (ARN) of the trial component.
--
-- 'httpStatus', 'updateTrialComponentResponse_httpStatus' - The response's http status code.
newUpdateTrialComponentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateTrialComponentResponse
newUpdateTrialComponentResponse :: Int -> UpdateTrialComponentResponse
newUpdateTrialComponentResponse Int
pHttpStatus_ =
  UpdateTrialComponentResponse'
    { $sel:trialComponentArn:UpdateTrialComponentResponse' :: Maybe Text
trialComponentArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateTrialComponentResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the trial component.
updateTrialComponentResponse_trialComponentArn :: Lens.Lens' UpdateTrialComponentResponse (Prelude.Maybe Prelude.Text)
updateTrialComponentResponse_trialComponentArn :: Lens' UpdateTrialComponentResponse (Maybe Text)
updateTrialComponentResponse_trialComponentArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrialComponentResponse' {Maybe Text
trialComponentArn :: Maybe Text
$sel:trialComponentArn:UpdateTrialComponentResponse' :: UpdateTrialComponentResponse -> Maybe Text
trialComponentArn} -> Maybe Text
trialComponentArn) (\s :: UpdateTrialComponentResponse
s@UpdateTrialComponentResponse' {} Maybe Text
a -> UpdateTrialComponentResponse
s {$sel:trialComponentArn:UpdateTrialComponentResponse' :: Maybe Text
trialComponentArn = Maybe Text
a} :: UpdateTrialComponentResponse)

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

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